﻿globals
hashtable achieveHT=InitHashtable()
hashtable battleHT=InitHashtable()
unit array sking
integer skingcount=0
boolean array hblm_ok
integer array meepo_cnt
integer array meepo_max
boolean array meepo_sec
boolean array meepo_agh
unit array meepo_main
real fsspeed=900
boolean TestMode=false
integer array LastNeutralType
boolean D=false
constant boolean E=false
integer CNModeIndex=0
gamecache G
constant string I="6.81b"
constant integer J=1
constant integer K=StringHash("AIDummyState")
trigger AchTrig
boolean NotTimerExpired=false
boolean Mode_FP=false
boolean Mode_CC=false
real Mode_XP_CameraAngle=0
boolean Mode_XP_DOWN=false
boolean Mode_XP_UP=false
boolean Mode_XP_RIGHT=false
boolean Mode_XP_LEFT=false
boolean Mode_DD=false
integer NowDamageType=0
integer Puzzle_Agha
integer Goblin_Agha
integer DragonHawk_Agha
integer Medivh_Agha
integer EatTree_Share
integer ShadowFiend_Agha
boolean Mode_ND=false
boolean Mode_RM=false
boolean Mode_NA=false
boolean Mode_CG=false
boolean Mode_DB=false
boolean Mode_FN=false
real array CG_Values
boolean LongRevive=false
unit lastCreatedIllusion=null
unit BlackHoleSource
integer array ExtraReviveTime
real EMPShockManaBurn=0
unit globalS
unit globalU
real globalX
real globalY
real globalA
real globalR
boolean globalB
integer globalI
real getDamage=0
integer M=1
integer N=0
real time=0
integer Bloodlust_Check=0
unit Bloodluster
integer array BloodlusterAttackArray
boolean Web_IsInRange=false
unit Webber
boolean array O
integer array P
integer array Q
integer array T
boolean U=false
boolean V=false
string array W
boolean array B
timer array A
integer array C
timer array L
integer array D4
timer E4=null
integer array F
integer O4=0
integer P4=0
integer array H
integer array R4
boolean T4=false
boolean V4=false
boolean W4=false
boolean X4=false
boolean Y4=false
multiboard A4=null
unit C4=null
boolean array D7
integer E7=0
boolean F7=false
boolean G7=false
boolean M7=false
location Z=null
location vv=null
location ev=null
location ov=null
location rv=null
boolean av=false
boolean Ev=false
boolean Ov=false
boolean Rv=false
boolean Av=false
boolean Nv=false
boolean O7=false
boolean Bv=false
boolean P7=false
boolean Cv=false
boolean Dv=false
boolean fv=false
integer S7=0
integer T7=0
location Jv=null
location lv=null
location Lv=null
location mv=null
location pv=null
location qv=null
location Qv=null
location sv=null
location tv=null
location Tv=null
location Uv=null
location U7=null
location W7=null
location X7=null
unit array Y7
integer ae=0
integer ne=0
player array Z7
player array A7
integer array B7
integer array C7
integer array L7
unit array D8
integer array Be
force E8=null
force F8=null
player array G8
player array N8
player O8=null
player P8=null
boolean ge=false
integer Ge=0
integer he=0
integer array je
hashtable R8=null
player V8=null
unit W8=null
integer X8=0
real Y8=0
item array se
item array Se
item array We
item array ze
item array Ze
item array vx
boolean Z8=false
integer A8=0
location array B8
unit ox=null
group C8=null
boolean L8=false
boolean AJ=false
boolean D9=false
boolean E9=false
boolean Ox=false
boolean Rx=false
boolean Nx=false
boolean bx=false
string cx=""
boolean F9=false
integer G9=0
item jx=null
player lx=null
boolean O9=false
boolean array mx
integer array P9
integer S9=0
force T9=null
boolean U9=false
real V9=0
boolean W9=false
boolean X9=false
boolean Y9=false
boolean array Z9
string vo=""
boolean array eo
boolean array oo
boolean A9=false
boolean B9=false
trigger C9
integer array L9
integer array ED
integer array FD
weathereffect bo=null
weathereffect Bo=null
boolean GD=false
location HD=null
real MD=0
string ND=""
string array OD
rect go=null
rect jo=null
rect lo=null
rect PD=null
rect Qo=null
rect to=null
rect Uo=null
rect wo=null
rect zo=null
rect er=null
rect QD=null
rect ar=null
rect Er=null
rect Xr=null
rect TD=null
rect WD=null
rect XD=null
rect YD=null
rect Br=null
rect cr=null
rect Cr=null
rect fr=null
rect Fr=null
rect Hr=null
rect jr=null
rect Jr=null
rect lr=null
rect mr=null
rect ZD=null
rect qr=null
rect AD=null
rect Sr=null
rect Ur=null
rect Wr=null
rect zr=null
rect Zr=null
rect vi=null
rect ei=null
rect xi=null
rect oi=null
rect ai=null
rect BD=null
rect LD=null
rect Ai=null
rect Ni=null
rect bi=null
rect Bi=null
rect KE=null
rect RE=null
rect di=null
rect fi=null
rect Fi=null
rect Gi=null
rect Ji=null
rect li=null
rect Li=null
rect pi=null
rect SE=null
rect TE=null
rect WE=null
rect YE=null
rect ZE=null
rect EF=null
rect FF=null
rect GF=null
rect HF=null
rect JF=null
rect KF=null
rect MF=null
rect NF=null
rect OF=null
rect PF=null
rect QF=null
rect RF=null
rect SF=null
rect TF=null
rect UF=null
rect WF=null
rect XF=null
rect YF=null
rect ZF=null
rect BF=null
rect CF=null
rect LF=null
rect DG=null
rect EG=null
rect FG=null
rect GG=null
rect JG=null
rect MG=null
rect OG=null
rect PG=null
rect QG=null
rect RG=null
rect SG=null
rect TG=null
rect UG=null
rect VG=null
rect WG=null
rect XG=null
rect ZG=null
rect AG=null
rect BG=null
rect CG=null
rect LG=null
rect DH=null
rect EH=null
rect FH=null
rect GH=null
rect HH=null
rect JH=null
rect MH=null
rect NH=null
rect OH=null
rect PH=null
rect QH=null
rect RH=null
rect TH=null
rect UH=null
rect WH=null
rect XH=null
rect YH=null
rect ZH=null
rect AH=null
rect CH=null
rect LH=null
rect DI=null
rect EI=null
rect GI=null
rect HI=null
rect II=null
rect JI=null
rect NI=null
rect PI=null
rect SI=null
rect TI=null
rect UI=null
rect WI=null
rect XI=null
rect YI=null
rect BI=null
rect CI=null
rect LI=null
rect TJ=null
rect XJ=null
rect MK=null
rect UK=null
rect YK=null
rect SM=null
rect TM=null
rect UM=null
rect WM=null
rect YM=null
rect JN=null
rect MN=null
rect TN=null
rect UN=null
rect WN=null
rect eE=null
rect oE=null
rect aE=null
rect nE=null
rect VE=null
rect EE=null
rect XE=null
rect OE=null
rect IE=null
rect AE=null
rect bE=null
rect BE=null
rect cE=null
rect CE=null
rect dE=null
rect fE=null
rect FE=null
rect gE=null
rect GE=null
rect JE=null
rect lE=null
rect LE=null
rect ME=null
rect pE=null
rect PE=null
rect qE=null
rect QE=null
rect YN=null
rect ZN=null
sound yE=null
sound zE=null
sound vX=null
sound AN=null
sound BN=null
sound CN=null
sound nX=null
sound EX=null
sound OX=null
sound DO=null
sound JO=null
sound bX=null
sound BX=null
sound cX=null
sound CX=null
sound fX=null
sound kX=null
sound LX=null
sound mX=null
sound MX=null
sound PX=null
sound qX=null
sound QX=null
sound tX=null
sound TX=null
sound PO=null
sound UX=null
sound TO=null
sound VO=null
sound oO=null
sound YO=null
sound aO=null
sound ZO=null
sound EO=null
sound XO=null
sound OO=null
sound AO=null
sound NO=null
sound bO=null
sound BO=null
sound cO=null
sound CO=null
sound fO=null
sound FO=null
sound gO=null
sound hO=null
sound HO=null
sound kO=null
sound lO=null
sound mO=null
sound pO=null
sound qO=null
sound QO=null
sound tO=null
sound UO=null
sound wO=null
sound WO=null
sound zO=null
sound vR=null
sound eR=null
sound oR=null
sound rR=null
sound aR=null
sound RR=null
sound bR=null
sound BR=null
sound LO=null
sound CR=null
sound DP=null
sound EP=null
sound hR=null
sound GP=null
sound JR=null
sound lR=null
sound LR=null
sound mR=null
sound pR=null
sound PR=null
sound qR=null
sound QR=null
sound sR=null
sound SR=null
sound UR=null
sound WR=null
sound zR=null
sound IP=null
sound JP=null
sound eI=null
sound oI=null
sound KP=null
sound OP=null
sound RI=null
sound PP=null
string QP="Sound\\Music\\mp3Music\\Undead1.mp3"
string RP="Sound\\Music\\mp3Music\\Undead2.mp3"
string TP="Sound\\Music\\mp3Music\\Undead3.mp3"
string VP="Sound\\Music\\mp3Music\\Orc1.mp3"
string XP="Sound\\Music\\mp3Music\\Orc2.mp3"
string YP="Sound\\Music\\mp3Music\\Orc3.mp3"
string ZP="Sound\\Music\\mp3Music\\NightElf1.mp3"
string BP="Sound\\Music\\mp3Music\\NightElf2.mp3"
string GQ="Sound\\Music\\mp3Music\\NightElf3.mp3"
string IQ="Sound\\Music\\mp3Music\\Human1.mp3"
string JQ="Sound\\Music\\mp3Music\\Human2.mp3"
string YQ="Sound\\Music\\mp3Music\\Human3.mp3"
string GR="Sound\\Music\\mp3Music\\BloodElfTheme.mp3"
string HR="Sound\\Music\\mp3Music\\DarkAgents.mp3"
string IR="Sound\\Music\\mp3Music\\TragicConfrontation.mp3"
string OR="Sound\\Music\\mp3Music\\SadMystery.mp3"
string XR="Sound\\Music\\mp3Music\\IllidansTheme.mp3"
string YR="Sound\\Music\\mp3Music\\PH1.mp3"
trigger ZR=null
trigger DS=null
trigger ES=null
trigger ZI=null
trigger vA=null
trigger eA=null
trigger xA=null
trigger FS=null
trigger EA=null
trigger OA=null
trigger RA=null
trigger GS=null
trigger HS=null
trigger JS=null
trigger cA=null
trigger CA=null
trigger dA=null
trigger DA=null
trigger fA=null
trigger FA=null
trigger gA=null
trigger GA=null
trigger LA=null
trigger mA=null
trigger MA=null
trigger PA=null
trigger SA=null
trigger TA=null
trigger KS=null
trigger wA=null
trigger MS=null
trigger OS=null
real WS=0
integer array YS
constant real VN=1
constant real EN=4
constant real XN=4
constant real ON=150
real ZS=1.
boolean bN=false
boolean BS=false
boolean CS=false
integer array LS
real dN
unit DN
unit fN
integer FN
group gN
unit DT
integer ET
integer pN=0
real SN
real tN
unit FT
unit IT
real JT
boolean array KT
integer array vb
boolean array MT
boolean array ob
boolean array ib
boolean array ab
real array nb
integer array OT
boolean array PT
boolean array Ob
boolean array Ab
boolean array Nb
integer bb
integer Bb
integer cb
string array Cb
boolean array db
boolean array QT
boolean array fb
integer Fb=0
boolean gb=true
string array RT
integer UT=0
string Lb
real mb
real array Mb
integer array pb
integer array Qb
integer Tb=1
constant real wb=15
boolean VT=false
boolean WT=false
boolean XT=false
boolean ZT=false
boolean AT=false
boolean BT=false
boolean CT=false
boolean LT=false
boolean EU=false
boolean FU=false
integer array IU
player array JU
integer array MU
integer array NU
constant real OU=55
integer EB='h06J'
real OB
real AB
unit BB
unit cB
group CB=null
string dB=null
real DB
integer PU
unit QU
unit gB
real lB
unit RU
real SU
unit MB
real pB
unit PB
destructable SB=null
unit TB=null
real wB=0
constant real ZU=26
constant real yB=550
constant real zB=500
group ZB
unit vc
real ec
integer xc
integer ac
unit nc=null
unit Vc=null
integer array AU
integer array BU
integer array CU
integer array LU
string array DV
integer array EV
integer array FV
integer JV=0
integer suduzhixue
integer jiasushoutao
integer jinglingpixue
integer guizuyuanhuan
integer jurenliliangyaodai
integer huanxinzhiren
integer gongjizhizhao
integer kuojian
integer suozijia
integer dajian
integer emodaofeng
integer yingjiaogong
integer nengliangzhiqiu
integer liliangshoutao
integer zhenshibaoshi
integer OW
integer tieyitoukui
integer zhenfenbaoshi
integer tieshuzhigan
integer keledebishou
integer keledebishou2
integer zhilidoupeng
integer siwangmianju
integer ximeisitedelveduo
integer miyinchui
integer shenmifazhang
integer shirenmozhifu
integer liulangfashidoupeng
integer banjia
integer jingqizhiqiu
integer duangun
integer zhiliaozhihuan
integer shouhuzhihuan
integer huifujiezhi
integer fashichangpao
integer shengzheyiwu
integer minjiebianxie
integer yirenmianzhao
integer molifazhang
integer yuandun
integer yuandun2
integer jixianfaqiu
integer huolizhiqiu
integer xuwubaoshi
integer biaoqiang
integer UY
integer VY
integer XY
integer YY
integer ZY
integer AY
integer BY
integer CY
integer DZ
integer EZ
integer mobang
integer yazhizhiren
integer yazhizhiren2
integer shanbihufu
integer UZ
integer XZ
integer zhangu
integer zhangu2
integer fenzhengmiansha2
integer jingmizhixie
integer jingmizhixie2
integer atuosizhigun
integer NA
integer tianyingzhijie
integer tianyingzhijie2
integer WA
integer YA
integer ZA
integer BA
integer FB
integer GB
integer JB
integer QB
integer RB
integer VB
integer WB
integer YB
integer LB
integer EC
integer yongqixunzhang
integer fenzhengmiansha
integer tiantangzhiji
integer shenyuanzhiren
integer OC
integer PC
integer jianrenqiu
integer huifutoujin
integer xuanmingdunpai
integer shengdianzhihuan
integer shengdianzhihuan2
integer yuanxingxie
integer donglixie1
integer donglixie2
integer donglixie3
integer maidasizhishou
integer maidasizhishou2
integer kongmingzhang
integer huwan
integer youlingxidai
integer wuyongguajian
integer yecha
integer sanhua
integer suiguchui
integer suiguchui2
integer renjia
integer xuanwo
integer sanshizhiren
integer sanshizhiren2
integer sanshizhiren3
integer sanshizhiren4
integer zhipeitoukui
integer zhipeitoukui2
integer fengkuangmianju
integer euldeshenshengfazhang
integer zhenhunshi
integer meikensimu
integer sanyeduijian
integer anmie
integer kuangzhanfu
integer shuijingjian
integer heihuangzhang
integer WL
integer ZL
integer AL
integer LL
integer D1
integer E1
integer F1
integer huanyingfu
integer huanyingfu2
integer luosazhifeng
integer dagongzhishenli
integer dagongzhishenli2
integer dagongzhishenli3
integer dagongzhishenli4
integer dagongzhishenli5
integer silingshu
integer silingshu2
integer silingshu3
integer linkenfaqiu
integer linkenfaqiu2
integer J0
integer N0
integer dapao
integer jingubang
integer jingubang2
integer huiyao
integer huiyao2
integer molongzhixin
integer molongzhixin2
integer sadanzhixieli
integer sijiadizhiyan
integer sijiadizhiyan2
integer hudie
integer shuaxinqiu
integer xieeliandao
integer xianfengdun
integer xianfengdun2
integer W5
integer leishenzhichui
integer B5
integer jipin
integer qiangxizhuangjia
integer xuejingshi
integer tiaozhantoujin
integer bizhang
integer bizhang2
integer bizhang3
integer bizhang4
integer xiwadeshouhu
integer xiwadshouhu2
integer ziyuan
integer xiangweixie
integer mozhang
integer yuanlifazhang
integer dongchayandou
integer qiongguidun
integer qiongguidun2
integer yingzhilingkan
integer yingzhilingkan2
integer youhunquanzhang
integer DH4
integer DI4
integer DJ4
integer DK4
integer DM4
integer DN4
integer DO4
integer DP4
integer DQ4
integer DR4
integer DS4
integer DT4
integer DU4
integer DV4
integer DW4
integer DX4
integer DY4
integer DZ4
integer DA4
integer DB4
integer DC4
integer D34
integer D64
integer DL4
integer D04
integer D54
integer D24
integer D_4
integer E44
integer E74
integer E84
integer E94
integer ED4
integer EE4
integer EF4
integer EG4
integer EH4
integer EI4
integer EJ4
integer EK4
integer EM4
integer EN4
integer EO4
integer linghunzhijie
integer xulingzhiren
integer zuduzhiqiu
integer ES4
integer mifaxie
integer EU4
integer EV4
integer EW4
integer EX4
integer EY4
integer EZ4
integer EA4
integer EB4=-1
integer array EC4
integer array E34
integer array E64
integer array EL4
integer array E14
integer array E04
integer E54=0
integer Agha
integer E_4
integer F44
integer F74
integer F84
integer F94
integer FD4
integer FE4
integer FF4
integer FG4
integer FH4
integer FI4
integer FJ4
integer FK4
integer FM4
integer FN4
integer FO4
integer FP4
integer FQ4
integer FR4
integer FS4
integer FT4
integer FU4
integer FV4
integer FW4
integer FX4
integer FY4
integer FZ4
integer FA4
integer FB4
integer FC4
integer F34
integer F64
integer FL4
integer F14
integer F04
integer F54
integer F24
integer F_4
integer G44
integer G74
integer G84
integer G94
integer GD4
integer GE4
integer GG4
integer GH4
integer GI4
integer GJ4
integer GK4
integer GM4
integer GN4
integer GO4
integer GP4
integer GQ4
integer GR4
integer Saar_Agha
player Sh
boolean Th=false
boolean Uh=false
player GS4
unit GT4
unit zh
integer array Zh
integer array GU4
unit eH
boolean GV4=true
boolean oH=false
trigger GW4
integer GX4=0
integer GY4=0
integer GZ4=0
integer GA4=0
integer GB4=0
integer G34=0
boolean G64=false
boolexpr bH=null
trigger BH
trigger cH
constant real GL4=40
integer array dH
integer array G14
rect pH=null
integer array G04
integer array G54
integer array G24
integer array G_4
integer array H44
integer array H74
integer array H84
integer array H94
integer array HD4
integer array HE4
string array HF4
string array HG4
string array HH4
string array HI4
constant real HJ4=4
item HK4=null
integer HM4=0
integer HN4=0
string Dj="|c00ff0303"
string fj="|c00ff0303"
string gj="|c000042ff"
string Gj="|c00646464"
string Hj="|c00ffffff"
boolean jj=false
boolean Jj=false
boolean lj=false
boolean HO4=false
integer array HP4
integer array HQ4
integer array HR4
trigger HS4=null
trigger Tj=null
trigger Uj=null
trigger wj=null
trigger zj=null
trigger Zj=null
trigger vJ=null
trigger eJ=null
trigger xJ=null
trigger oJ=null
trigger iJ=null
trigger HT4=null
trigger nJ=null
trigger do=null
trigger VJ=null
trigger dq=null
trigger HU4=null
trigger dr=null
trigger dT=null
trigger du=null
trigger dX=null
trigger dY=null
trigger dZ=null
trigger d0=null
trigger HV4=null
trigger HW4=null
trigger d3=null
trigger d4=null
trigger d5=null
trigger HX4=null
trigger d8=null
trigger d9=null
trigger Dc=null
trigger DC=null
trigger OJ=null
trigger DF=null
trigger RJ=null
trigger HY4=null
trigger DK=null
trigger Dm=null
trigger NJ=null
trigger Do=null
trigger DQ=null
unit BJ=null
unit cJ=null
unit CJ=null
unit dJ=null
unit DJ=null
unit fJ=null
unit FJ=null
unit gJ=null
unit GJ=null
unit HJ=null
unit JJ=null
unit lJ=null
unit LJ=null
unit MJ=null
unit PJ=null
unit qJ=null
unit QJ=null
unit SJ=null
unit tJ=null
unit HZ4=null
unit UJ=null
unit wJ=null
unit WJ=null
unit yJ=null
unit zJ=null
unit ZJ=null
unit vk=null
unit ek=null
unit xk=null
unit ok=null
unit ik=null
unit ak=null
unit nk=null
unit Vk=null
unit Ek=null
unit Ok=null
unit Rk=null
unit Ak=null
unit Nk=null
unit bk=null
unit Bk=null
unit ck=null
unit Ck=null
unit dk=null
unit fk=null
unit Fk=null
unit gk=null
unit Gk=null
unit jk=null
unit Jk=null
unit lk=null
unit Lk=null
unit pk=null
unit Pk=null
unit qk=null
unit Qk=null
unit Sk=null
unit tk=null
unit Uk=null
unit wk=null
unit Wk=null
unit yk=null
unit zk=null
unit vK=null
unit eK=null
unit xK=null
unit aK=null
unit VK=null
unit EK=null
unit XK=null
unit OK=null
unit AK=null
unit NK=null
unit bK=null
unit BK=null
unit cK=null
unit CK=null
unit dK=null
unit fK=null
unit FK=null
unit gK=null
unit GK=null
unit JK=null
unit lK=null
unit LK=null
unit PK=null
unit qK=null
unit QK=null
unit SK=null
unit TK=null
unit wK=null
unit WK=null
unit zK=null
unit ZK=null
unit vl=null
unit el=null
unit xl=null
unit ol=null
unit rl=null
unit al=null
unit Vl=null
unit El=null
unit Xl=null
unit Ol=null
unit Rl=null
unit Al=null
unit Nl=null
unit bl=null
unit Bl=null
unit cl=null
unit Cl=null
unit dl=null
unit array fl
unit array Fl
unit array gl
integer Hl=0
trigger array Dx
real array DX
integer Dy=0
boolean array HA4
real array Jl
integer array ll
integer array Ll
integer Ml=0
string array Pl
integer array ql
integer Ql=0
integer sl=0
integer HB4
integer HC4
integer H34
real H64
real HL4
real H14
real Zl
real vL
real eL
unit H04
unit H54
trigger eC
group H24
group H_4
player I44
boolean EL
string I74
unit IE4=null
region IF4
integer array NL
integer array bL
integer array BL
integer array cL
integer CL=0
gamecache IG4
boolean array IH4
weathereffect fL
weathereffect FL
rect IJ4
constant playercolor gL=ConvertPlayerColor(0)
constant playercolor hL=ConvertPlayerColor(6)
constant playercolor JL=ConvertPlayerColor(12)
real IK4=-7168
real IM4=-7264
real ML=-6816
real PL=-7264
real QL=-7200
real SL=-6752
real tL=-7200
real TL=-6944
real UL=-6560
real wL=-7264
real zL=-6560
real vm=-6560
real em=-6688
real xm=-6496
real om=-6816
real rm=-6496
real im=-6944
real am=-6496
real Vm=-7072
real Em=-6560
real Xm=-7328
real Om=-5984
real Am=-5632
real Nm=-6144
real bm=-6112
real Bm=1568
real cm=-1504
real Cm=-1824
real dm=4960
real fm=-6752
real Fm=-6112
real hm=-1248
real Jm=-3488
real lm=-3296
real Mm=-544
real pm=-6688
real Pm=-6368
real Qm=-4256
real Tm=-4448
real Um=-4960
real wm=-3744
real Wm=-6816
real zm=-5600
real vM=-5728
real eM=-5280
real oM=-6112
real rM=-6080
real iM=-4480
real aM=-4416
real nM=-5312
real VM=-4032
real XM=-7040
real AM=-6656
real bM=-4480
real BM=-4864
real cM=-4992
real dM=-4032
real fM=-6528
real gM=-5792
real hM=-5408
real HM=-6624
real JM=-5088
real kM=-5344
real lM=-3936
real pM=-4832
real sM=-4384
real tM=-3936
real wM=-5216
real zM=-5088
real vp=-5536
real ep=-4896
real op=-6240
real rp=-3616
real ap=-5728
real Vp=-4512
real Ep=-7072
real Xp=-5472
real Rp=-4704
real Ap=-4512
real bp=-5856
real Bp=-6080
real cp=-5120
real Cp=-4544
real dp=-6528
real fp=-6400
real Fp=-5696
real gp=-5248
real Hp=-6848
unit IN4
unit IO4
unit IP4
unit IQ4
unit IR4
unit IS4
unit IT4
unit IU4
unit IV4
unit IW4
unit IX4
unit IY4
unit IZ4
unit I34
unit IL4
unit I04
unit I24
unit I_4
unit J44
unit J74
unit J84
unit J94
unit JD4
unit JE4
unit JF4
unit JG4
unit JH4
unit JI4
unit JJ4
unit fP
unit FP
unit lP
unit LP
unit MP
unit pP
unit JK4
unit JM4
unit JN4
unit JO4
unit JP4
unit WP
unit zP
unit vq
unit eq
real JQ4=6272
real JR4=5504
real rq=6464
real iq=5120
real aq=5952
real Eq=5568
real Rq=6080
real Aq=5568
real Nq=6464
real bq=4736
real Bq=5696
real cq=5120
real Cq=5568
real Dq=5248
real fq=5568
real Fq=5376
real Hq=5696
real jq=5504
real Jq=5568
real Mq=5696
real qq=5568
real Qq=5696
real Sq=4992
real tq=4544
real Uq=-4704
real zq=5920
real Zq=1056
real vQ=-160
real eQ=6048
real xQ=-2080
real oQ=32
real iQ=5856
real aQ=2400
real EQ=1696
real OQ=6112
real RQ=-96
real AQ=3168
real NQ=5920
real bQ=3616
real BQ=3296
real cQ=6048
real CQ=2784
real fQ=4640
real FQ=4576
real hQ=5088
real HQ=4192
real lQ=3776
real LQ=5888
real mQ=4096
real MQ=3392
real PQ=6208
real QQ=3264
real SQ=3520
real UQ=5376
real WQ=3776
real zQ=3840
real ZQ=5696
real vs=3264
real es=3168
real os=4000
real rs=4192
real as=5536
real ns=4128
real Vs=4512
real Es=4640
real Xs=3680
real Rs=4832
real As=3104
real Ns=5408
real bs=2592
real Bs=5408
real cs=3296
real Cs=6112
real Ds=4000
real fs=3040
real Fs=5088
real Hs=6304
real js=3744
real Js=6304
real Ks=3744
real ls=3520
real Ls=4608
real ms=4096
real Ms=2624
real ps=4096
real Ps=2624
real Qs=4096
real Ss=2624
unit JS4
unit JT4
unit zs
unit Zs
unit JU4
unit eS
unit oS
unit rS
unit aS
unit nS
unit VS
unit JV4
unit JW4
unit JX4
unit JY4
unit JZ4
unit JA4
unit JB4
unit JC4
unit J34
unit J64
unit JL4
unit J14
unit J04
unit J54
unit J24
unit J_4
unit K44
unit K74
unit PS
unit QS
unit SS
unit tS
unit TS
unit US
unit K84
unit K94
unit KD4
unit KE4
unit KF4
unit ot
unit rt
unit at
unit Vt
unit KG4
unit KH4
unit KI4
unit KJ4
unit KK4
unit KM4
unit KN4
unit KO4
unit KP4
unit KQ4
unit array KR4
real array KS4
real array KT4
player KU4
player KV4
string array KW4
integer array KX4
integer array KY4
integer array KZ4
integer array KA4
integer array KB4
integer KC4
integer K34
integer K64
integer KL4
integer array K14
integer K04
integer array K54
integer K24
integer array K_4
integer M44
integer array M74
integer M84
integer array M94
integer MD4
string array ME4
integer array MF4
string array MG4
string array MH4
string array MI4
string array MJ4
string array MK4
unit MM4
unit MN4
unit MO4
unit MP4
unit MQ4
unit MR4
unit MS4
unit MT4
unit MU4
unit MV4
unit MW4
unit MX4
integer array MY4
integer MZ4=0
boolean MA4=false
integer MB4=0
trigger MC4
boolean M34=false
trigger M64
trigger ML4
trigger M14
real M04=0
real M54=0
hashtable M24
timer array M_4
integer array N44
integer array N74
multiboard N84
integer array N94
integer array ND4
player array NE4
integer NF4=0
string Fx="|c00FF6600"
multiboard NG4
trigger NH4
unit array NI4
real array NJ4
boolean array NK4
integer NM4=0
unit array qu
real array Qu
boolean array Su
integer array NN4
integer array NO4
integer array NP4
integer array NQ4
integer array NR4
integer array NS4
unit NT4=null
boolean NU4=true
integer NV4=1
trigger NW4
integer NX4=0
integer NY4
integer NZ4
integer array NA4
integer array NB4
integer NC4
integer N34
integer array N64
boolean NL4=false
unit N14=null
unit N04=null
group KU
boolean N54=true
boolean N24=false
boolean N_4=false
integer O44
player O74
trigger O84=null
trigger O94=null
integer OD4
integer TU='A0HU'
integer vw='A0HX'
trigger OE4
region ow
integer array gD
unit array rw
unit OF4=null
unit OG4
region Ew
integer array Rw
integer OH4='A11F'
integer OI4='A11E'
integer OJ4='A0S3'
integer OK4='A11D'
integer OM4='A11G'
integer ON4='A11H'
integer OO4='A2LI'
integer OP4='A11B'
integer OQ4='A11A'
integer OR4='A0S2'
integer OS4='A119'
integer OT4='A11C'
integer OU4='A118'
integer OV4='A2LH'
integer OW4='A0FY'
unit Mw
group pw
unit qw
unit Qw
boolean tw=false
boolean Uw=false
boolean zw=false
boolean vW=false
boolean eW=false
boolean oW=false
boolean rW=false
boolean iW=false
unit array OX4
timer array gg
integer array FI
boolean OY4=false
real array Fj
integer gi=0
real array OZ4
item array OA4
integer OB4=0
boolean array AW
boolean array OC4
leaderboard array gm
boolean bW=true
weathereffect BW
boolean array cW
boolean array CW
integer dW=0
integer array O34
integer array DW
integer array fW
integer array FW
integer array hW
integer array LW
integer array mW
integer array MW
integer array pW
integer array PW
string O64="No Mode"
unit gr
boolean OL4=false
boolean O14=false
boolean Fz=false
integer array O04
constant real O54=-6950
constant real O24=6750
boolean O_4=false
boolean F0=false
boolean P44=false
boolean gH=false
boolean P74=false
integer P84
boolean P94=false
boolean oy=true
boolean PD4=false
boolean PE4=false
boolean PF4=false
boolean PG4=false
boolean PH4=false
boolean Ny=false
boolean PI4=false
boolean PJ4=false
unit array PK4
integer Ly='A10N'
integer my='A0S0'
integer My='A10O'
integer py='A10P'
real PM4
real PN4
unit PO4
trigger PP4
integer PQ4='A05V'
unit PR4
boolean PS4=false
boolean uy=false
boolean vY=true
boolean Gs=false
boolean PT4=false
boolean PU4=false
boolean GT=false
boolean GU=false
boolean Gv=true
boolean Gw=true
boolean PV4=true
boolean PW4=true
boolean PX4=false
boolean array GZ
boolean array G0
integer G1=0
integer G2=0
integer G3=-1
integer G4=-1
boolean PY4=true
boolean PZ4=true
integer PA4=0
integer PB4=0
integer PC4=0
integer P34=0
integer P64=0
integer PL4=0
integer P14=0
integer P04=0
integer P54=4
integer P24=5
integer P_4=5
integer hD=0
integer hE=0
integer hF=0
integer array hG
integer array eY
integer array hj
integer xY=0
integer oY
integer rY
real Q44=0
real Q74=0
real Q84=0
real Q94=0
real QD4=0
real QE4=0
real QF4=0
real QG4=0
real QH4=0
real QI4=0
real QJ4=0
real QK4=0
real QM4=0
real QN4=0
real QO4=0
real QP4=0
real QQ4=0
real QR4=0
real QS4=0
real QT4=0
real QU4=0
real QV4=0
real QW4=0
real QX4=0
real QY4=0
real QZ4=0
real QA4=0
real QB4=0
real QC4=0
real Q34=0
constant real Q64=90
boolean QL4=false
boolean Q14=false
boolean Q04=false
boolean Q54=false
boolean Q24=false
boolean Q_4=false
boolean R44=false
boolean R74=false
timer R84
boolean R94=false
integer RD4=90
boolean RE4=false
real Bz=.0
real array hq
unit hr=null
unit hS=null
unit hx=null
unit hy=null
unit hz=null
unit hZ=null
unit h0=null
unit array h4
unit array h7
unit array h8
unit array h9
location Ha
location HA
location Hb
location HB
location Hc
location array HC
rect cz=null
real RF4
real RG4
real RH4
real RI4
real RJ4
real RK4
player RM4
rect RN4=null
rect RO4=null
rect RP4=null
rect Cz=null
rect RQ4=null
rect RR4=null
rect RS4=null
rect He=null
player RT4=null
player RU4=null
player RV4=null
player RW4=null
force RX4=CreateForce()
boolean array RY4
trigger HK=CreateTrigger()
trigger RZ4=CreateTrigger()
trigger RA4=CreateTrigger()
trigger Hn=CreateTrigger()
trigger HN=CreateTrigger()
trigger Ho=CreateTrigger()
trigger RB4=CreateTrigger()
trigger RC4=CreateTrigger()
trigger R34
trigger R64
trigger RL4
trigger R14
trigger array R04
item Hu
destructable H0
group H8=CreateGroup()
group H9=CreateGroup()
group iA=CreateGroup()
group R54=CreateGroup()
group iC=CreateGroup()
group iE=CreateGroup()
group iF=CreateGroup()
group ig=CreateGroup()
group iG=CreateGroup()
group iH=CreateGroup()
group ii=CreateGroup()
group ij=null
boolexpr R24=null
boolexpr iL
boolexpr R_4
boolexpr ip
boolexpr iP
integer S44=StringHash("PBMN|AI")
integer array S74
integer array S84
real Wz=.0
real Yz=.0
group Zz=null
unit vZ
integer S94
unit SD4
unit SE4
unit SF4
unit SG4
group SH4
real VZ
unit SI4
group SJ4
constant real SK4=6
integer array SM4
integer array SN4
integer array SO4
integer array SP4
integer array SQ4
integer array SR4
integer array SS4
integer array ST4
unit SU4
real SV4
unit FZ
real gZ
integer jZ
integer JZ
unit LZ
real mZ
integer MZ
player QZ
unit sZ
integer tZ
player TZ
integer SW4
unit array wZ
integer WZ
unit array SX4
unit array zZ
integer ZZ
unit array v0
unit e0
unit o0
integer array SY4
unit array SZ4
integer n0
boolean V0=false
unit SA4
integer SB4
boolean SC4=false
boolean array A0
boolean S34=false
integer S64
unit SL4
real S14
integer S04
unit S54
real S24
real j0
real K0
integer l0
unit m0
integer M0
group p0
unit Q0
real S_4
group t0
integer T44
unit U0
real T74
integer array W0
integer array z0
real Z0
unit v1
unit T84
real T94
integer TD4
integer array n1
boolean TE4=false
unit TF4
unit N1
integer TG4
real B1
real C1
unit TH4
integer TI4
integer TJ4
integer TK4
group M1
unit TM4
real TN4
integer TO4
integer TP4
integer TQ4
unit array TR4
boolean w1=false
boolean W1=false
unit Y1
unit z1
real Z1
real v2
real TS4
real o2
boolean a2=false
boolean TT4=false
force V2=null
real TU4
unit TV4
integer array TW4
integer array TX4
real A2
real N2
unit b2
unit B2=null
unit C2=null
unit D2=null
unit TY4
integer array TZ4
unit array TA4
integer l2=0
integer TB4
constant real M2=6
constant real p2=600
unit TC4
trigger T34
boolean array U2
real array T64
real array TL4
real array T14
unit array T04
integer array T54
integer array T24
constant real T_4=17
integer a3
unit n3
integer V3
unit E3
unit A3
region U44
unit U74
unit U84
real U94
real UD4
unit array D3
boolean f3=false
integer F3=0
string array j3
constant real L3=8
unit UE4
integer UF4
boolean p3=false
player array UG4
real array UH4
real array UI4
real array UJ4
integer UK4=-1
constant real e4=25
constant real o4=525
region UM4
integer array UN4
integer UO4=0
integer array UP4
integer array UQ4
integer array UR4
integer array N4
integer array US4
boolean B4=false
integer UT4
integer array UU4
boolean array UV4
group array UW4
integer UX4=0
integer UY4=0
boolean UZ4=false
unit UA4
unit UB4
real UC4
real U34
real U64
real array UL4
real array U14
unit U54
boolean U24=false
boolean U_4=false
boolean V44=false
real array V74
string array V84
boolean V94=true
boolean VD4=false
integer array VE4
real array VF4
real array VG4
boolean array VH4
item array VI4
item array VJ4
item array VK4
item array VM4
boolean array VN4
boolean array VO4
boolean array VP4
integer VQ4
integer VR4=10
boolean array VS4
boolean array VT4
unit VU4
unit VV4
unit VW4
unit VX4
unit VY4
unit VZ4
real VA4
real VB4
real VC4
real V34
constant real V64=325
constant real VL4=20
unit V14
unit V04
integer V54
group V24
real V_4
real W44
integer W74
integer W84
integer W94
region WD4
region WE4
real WF4
unit WG4
boolean WH4=false
sound WI4=null
sound WJ4=null
sound WK4=null
sound WM4=null
sound WN4=null
unit WO4
group WP4
integer array WQ4
boolean WR4=false
unit WS4
sound WT4
sound WU4=null
string WV4
string WW4
string WX4
string WY4
sound WZ4=null
sound WA4=null
constant integer WB4='e01H'
constant integer WC4='n00I'
constant integer W34='n022'
constant integer W64='n021'
constant integer WL4='n0KY'
constant integer W14='n0KZ'
constant integer W04='n0LE'
constant integer W54='e01Z'
constant integer W24='n023'
constant integer W_4='n024'
constant integer X44='n025'
constant integer X74='n0L0'
constant integer X84='n0L1'
constant integer X94='n0M4'
constant integer XD4='e02T'
constant integer XE4='e02S'
constant integer XF4='e030'
constant integer XG4='n00M'
constant integer XH4='n0HV'
constant integer XI4='e02R'
constant integer XJ4='n0LS'
constant integer XK4='S00F'
constant integer XM4='S01F'
constant integer XN4='S015'
constant real XO4=.025
constant integer XP4='n0EQ'
unit XQ4
unit XR4
unit XS4
real XT4
real XU4
real XV4
unit XW4
real XX4
real XY4
unit XZ4
real XA4
real XB4
real XC4
boolean X34=false
boolean array X64
destructable XL4
real X14
real X04
real X54
real X24
real X_4
real Y44
real Y74
real Y84
unit Y94
integer YD4
unit YE4
constant real YF4=5.
integer array YG4
integer array YH4
integer array YI4
integer array YJ4
constant integer YK4='n02Q'
integer YM4
player YN4
region YO4=null
region YP4=null
region YQ4=null
region YR4=null
trigger YS4=null
trigger YT4=null
real YU4
real YV4
trigger YW4=null
constant integer YX4='n02H'
boolean YY4=false
sound YZ4=null
sound YA4=null
sound YB4=null
unit YC4=null
unit Y34=null
unit Y64=null
constant integer YL4='A2O7'
constant integer Y14='B0GC'
group Y04
integer Y54
unit Y24
constant integer Y_4=500
constant integer Z44=1400
constant real Z74=1300
constant real Z84=20
constant real Z94=20
constant real ZD4=20
constant real ZE4=6.
integer ZF4
unit ZG4
group ZH4
real ZI4
real ZJ4
constant integer ZK4='A1YX'
unit ZM4
integer ZN4
unit ZO4
constant integer ZP4='A2L8'
constant integer ZQ4='A21U'
constant integer ZR4='A2L1'
constant string ZS4="Environment\\LargeBuildingFire\\LargeBuildingFire1.mdl"
constant integer ZT4='A2L8'
unit ZU4
unit ZX4
integer ZY4
group ZZ4
group ZA4
unit ZB4
unit ZC4
unit Z34
integer Z64
real ZL4
real Z14
real Z04
integer Z54
destructable array Z24
destructable array Z_4
destructable array A44
integer A74=0
integer A84=0
unit A94
integer AD4
constant real AE4=6
player AF4
boolean AG4=false
trigger AH4=null
trigger AI4=null
boolean AJ4=false
group AK4=null
player AM4=null
integer AN4=0
integer AO4=0
trigger AP4=null
trigger AQ4=null
unit AR4
boolean AS4=false
player AT4=null
player AU4=null
integer array AV4
constant integer AW4=0
constant integer AX4=1
constant integer AY4=3
constant integer AZ4=5
constant integer AA4=0
constant integer NormalFire=1
constant integer HeroNormal=2
constant integer HeroMagic=3
constant integer NormalPierce=4
constant integer NormalNormal=5
constant integer LifeDrain=6
constant integer Chaos=7
unit A54
real A24
integer array A_4
group B44
group B74
unit B84
integer B94
trigger BD4=null
string BE4=""
boolean BF4=false
unit BG4=null
unit BH4
unit BI4
group BJ4
group BK4
group BM4
integer BN4=0
unit BO4
constant real BV4=3
unit BW4
unit BZ4
unit BA4
real BB4
group BC4
integer B34
sound B64=null
sound BL4=null
sound B14=null
sound B04=null
sound B54=null
sound B24=null
sound B_4=null
sound CK4=null
unit CM4
integer CN4
group CP4
integer CQ4
unit CR4
unit CS4
unit CU4
group CL4
integer C_4
unit L44
unit L74
unit L84
group L94
real LD4
integer array LE4
integer LF4=0
integer LG4
constant real LH4=25
constant real LI4=7
constant real LJ4=300
unit LK4
real LM4
unit LN4
unit LO4
real LP4
unit LQ4
real LR4
real LS4
real LT4
unit LU4
real LV4
real LW4
group LX4
unit LY4
unit LZ4
real LA4
real LB4
real LC4
trigger L34
integer L64=0
boolean LL4=false
integer array L14
boolean L04
boolean L54=false
boolean L24=false
integer array L_4
integer D47
player D77
integer D87
integer D97
player DD7
player DE7
integer DF7
integer DG7
integer array DH7
integer array DI7
integer DJ7=0
integer DK7=0
integer array DM7
integer array DN7
integer DO7=0
integer DP7=0
constant integer DQ7=90
constant string DR7="|c006699CC"
constant string DS7="|c00ff0303"
constant string DT7="|c00555555"
multiboard DU7
image DV7
image DW7
image DX7
image DY7
boolean DZ7=false
image DA7=null
real DB7=-7030
real DC7=6966
unit D37
integer D67
player DL7
boolean D17=false
constant integer D07=852164
constant integer D57=852526
constant integer D27=852599
unit D_7=null
unit E47=null
unit E77=null
unit E87=null
integer E97=0
integer ED7=0
constant string EE7="Abilities\\Spells\\Human\\MagicSentry\\MagicSentryCaster.mdl"
constant real EF7=16
constant real EG7=4
constant real EH7=15
constant real EI7=4
integer EJ7
integer EK7
real EM7
real EN7
unit EO7
integer array EP7
constant real EQ7=7
constant string ER7="war3mapImported\\EpiPulse_1_4.mdx"
constant string ES7="war3mapImported\\EpiPulse_5_8.mdx"
constant string ET7="war3mapImported\\EpiPulse_9_12.mdx"
unit array EU7
integer array EV7
integer array EW7
integer EX7=0
integer EY7=0
integer array EZ7
integer array EA7
constant integer EB7=20
constant integer EC7=34
constant integer E37=2
constant integer E67=30
unit array EL7
integer E17=0
boolean E07=true
boolean array E57
boolean E27=false
boolean E_7=false
boolean F47=true
unit F77=null
trigger F87=null
trigger F97=null
trigger FD7=null
timer FE7=null
real array FF7
constant string FG7="|c0020c060"
constant string FH7="|c00ffcc60"
real FI7=.35
real FJ7=.66
real FK7=.25
real FM7=2.
real FN7=.05
integer FO7=5
real FP7=.66
real FQ7=.25
integer FR7=72
integer FS7=144
real FT7=FI7/ 2
integer FU7=3
integer FV7=300
integer FW7=180
boolean FX7=false
hashtable FY7
boolean FZ7=false
real FA7=1
real FB7=1
string FC7=""
real F37=0
real F67=0
widget FL7=null
boolean F17=false
player F07=null
force F57=null
item F27=null
item F_7=null
integer G47=0
unit G77=null
real G87=0
constant real G97=200
trigger GD7=null
constant integer GE7=67
constant integer GF7=75
string GG7=""
string GH7=""
boolean GI7=true
boolean GJ7=false
constant string GK7="Doodads\\Icecrown\\Water\\BubbleGeyserSteam\\BubbleGeyserSteam.mdx"
integer array GM7
unit array GN7
real array GO7
boolexpr GP7=null
integer array GQ7
integer GR7=0
integer GS7=1
constant integer GT7=1
constant integer GU7=2
constant integer GV7=3
constant integer GW7=4
constant integer GX7=5
constant integer GY7=6
constant integer GZ7=7
constant integer GA7=8
constant integer GB7=GA7-1
constant integer GC7=2
constant integer G37=4
constant integer G67=6
constant real GL7=60.
constant integer G17=8
boolean G07=true
boolean G57=true
real G27=.0
constant integer G_7=425
constant integer H47=G_7+200
constant real H77=700.
constant real H87=10.
constant real H97=15.
constant real HD7=180.
constant integer HE7=20
unit HF7=null
constant real HG7=120.
constant real HH7=.05
constant real HI7=60.
constant real HJ7=10.
constant real HK7=20.
constant integer HM7=30
constant real HN7=10.
constant real HO7=15.
constant real HP7=20.
constant real HQ7=.4
constant real HR7=.1
constant string HS7="|c00dd8dff"
constant string HT7="|c00a0a0a0"
constant string HU7="  "
string HV7=null
string HW7=null
string HX7=null
string HY7=null
constant real HZ7=8
real HA7=HG7
integer HB7
boolean HC7=false
unit H37
integer H67
boolean HL7=false
unit H17
unit H07
location H57=Location(0,0)
unit H27
boolean H_7=false
boolean I47=false
boolean I77=false
constant integer I87=4
unit I97=null
unit ID7=null
real IE7=99999999.
trigger IF7=null
unit IG7
integer IH7
integer II7
unit IJ7
real IK7
real IM7
real IN7
unit IO7
integer array IP7
boolean IQ7=true
unit IR7
integer IS7
unit IT7
group IU7
real IV7
integer array IW7
integer array IX7
integer IY7
integer IZ7
integer IA7
unit IB7
integer IC7
integer I37
boolean I67=false
constant real IL7=300
integer I17
integer I07
integer array I57
constant real I27=200
constant real I_7=200
group J47
unit J77
integer J87
unit J97
integer JD7
unit JE7
integer JF7
leaderboard array JG7
integer JH7
integer JI7=0
integer JJ7=0
integer array JK7
integer array JM7
integer JN7=-1
integer array JO7
sound JP7=null
unit JQ7
group JR7
boolean array JS7
integer JT7=600
integer JU7=360
integer JV7
constant real JW7=5
unit JX7
real JY7
unit JZ7
unit JA7
integer JB7
constant real JC7=3.75
boolean J37
unit J67
integer JL7
group J17
unit J07
real J57
integer J27
unit J_7
real K47
real K77
real K87
unit K97
integer KD7
integer KE7
boolean KF7=false
real KG7
unit KH7
constant real KI7=.05
constant real KJ7=1.
constant real KK7=4
constant integer KM7='A2B4'
group KN7
constant real KO7=20
integer KP7
unit KQ7
integer KR7
constant integer KS7='A2L9'
constant integer KT7='A2LE'
constant integer KU7='B0G1'
constant integer KV7='A2LA'
constant integer KW7='A2MK'
constant integer KX7='B0G4'
unit KY7
unit KZ7
real KA7=1.35
real KB7=500
constant integer KC7='A2LB'
constant integer K37='A2LD'
constant string K67="war3mapImported\\Cryofreeze5.mdx"
constant integer KL7='A0Z0'
group K17
trigger K07
unit K57
unit K27=null
constant string K_7="war3mapImported\\WintersCurse.mdx"
constant string M47="war3mapImported\\WintersCurseAoE.mdx"
constant integer M77='A2N3'
constant integer M87='B0G7'
constant string M97="effects\\BasicWaterFlash.mdx"
constant real MD7=6
constant integer ME7='A2NE'
constant integer MF7='A2NB'
constant integer MG7='A2NA'
constant integer MH7='A2N6'
constant integer MI7='A2N8'
constant integer MJ7='A2NC'
constant integer MK7='A2N7'
constant integer MM7='A2ND'
constant integer MN7='A2N9'
constant integer MO7='B0GA'
constant real MP7=6
constant integer MQ7='A2LL'
constant integer MR7='h0EG'
constant real MS7=50
constant integer MT7='A2LM'
constant integer MU7='A2M9'
constant integer MV7='A2MA'
constant integer MW7='A2LN'
constant integer MX7='A2M8'
constant integer MY7='A2NP'
constant integer MZ7='A2NS'
constant integer MA7='A2NR'
constant integer MB7='A2NQ'
constant string MC7="war3mapImported\\MagneticField04.mdl"
integer M37
integer M67
unit ML7
unit M17
integer M07
trigger M57=null
constant real M27=1000
group M_7
unit N47
integer N77
real N87
real N97
integer ND7
constant real NE7=30
constant real NF7=800
unit NG7
unit NH7
group NI7
integer NJ7
integer array NK7
boolean NM7
real NN7
integer NO7
unit NP7
constant real NQ7=1200
group NR7
unit NS7
unit NT7
integer NU7
real NV7
integer NW7
integer NX7
unit NY7
unit NZ7
unit NA7
constant integer NB7='A2M1'
constant integer NC7='A2LW'
constant integer N37='A2LY'
constant integer N67='B0G2'
constant integer NL7='B0G3'
constant string N17="war3mapImported\\Flux3.mdx"
constant integer N07='A2M0'
constant integer N57='N0MM'
constant string N27="Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl"
constant integer N_7='A0VC'
constant integer O47='A2NX'
constant integer O77='A029'
constant integer A029Aura_Hero='A2NY'
constant integer A029Aura_All='A2O1'
constant integer OD7=1
constant integer OE7=2
constant integer OF7=2
constant integer OG7=3
constant integer OH7=1
item array OI7
integer array OJ7
integer array OK7
boolean array OM7
player ON7=null
integer OO7=0
constant integer OP7=2000
constant integer OQ7=0
constant integer OR7=1
constant integer OS7=2
constant real OT7=30.
constant integer OU7=30
constant boolean OV7=true
constant boolean OW7=false
string array OX7
integer array OY7
integer OZ7=-1
constant integer OA7='d'
texttag array OB7
string array OC7
integer O37=0
constant integer O67=6
timer OL7=null
timer O17=null
constant real O07=.02
constant real O57=.3
constant real O27=.03
unit O_7=null
integer P47=0
integer P77=0
unit P87=null
integer P97=0
unit PD7=null
integer array PE7
unit PF7=null
unit PG7=null
boolean PH7=false
boolean PI7=true
constant boolean PJ7=false
constant boolean PK7=true
unit PM7=null
unit PN7=null
constant integer PO7=2
integer PP7=0
integer PQ7=0
integer PR7=0
integer PS7=0
constant real PT7=200.
string PU7="0123456789"
string PV7="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
string PW7="abcdefghijklmnopqrstuvwxyz"
string PX7="on"
string PY7="-text"
string PZ7="-!!"
string PA7="-spell "
string PB7="-despell "
string PC7="-ratio "
string P37="-lock "
string P67="-enable "
string PL7="-disable "
string P17="-search "
string P07="-debug "
string P57="-spellmsg "
string P27="-regen "
string P_7="-dmgdbg "
string Q47="-invul "
string Q77="-share "
string Q87="-charge "
string Q97="-item "
string QD7="-desitem "
string QE7="-drop "
string QF7="-decease "
string QG7="-get "
string QH7="-stat "
string QI7=" "
string QJ7="|c00FF0000Object ID:|r  "
string QK7="|c00FF0000Name:|r  "
string QM7="|c00FF0000Spell List: |r
"
string QN7="
"
string QO7="|cffff0303NeutralPlayer|r"
string QP7="|cffff0303**Hero Player Number|r: "
string QQ7="|c00fffc01Spawned Unit`Name is|r "
string QR7="   *|cff1ce6b9Unit Type Id|r:  "
string QS7="**|c00fffc01OwningPlayer|r "
string QT7="|cffff0303 Caster is|r "
string QU7="|cffff0303 Spell Name is|r  "
string QV7="   |cff1ce6b9 SpellAbility ID |r : "
string QW7="    |c00fffc01 Last Order String |r: "
string QX7="    |c00fffc01 OrderId: |r: "
string QY7="|c00FF0000 Damage Source: |r"
string QZ7="|c00FF0000 Target: |r"
string QA7="|c00FF0000 Value: |r"
string QB7="|c00FF8000 AI_Debug On |r"
trigger QC7=CreateTrigger()
trigger Q37=CreateTrigger()
trigger Q67=CreateTrigger()
trigger QL7=CreateTrigger()
trigger Q17=CreateTrigger()
trigger Q07=CreateTrigger()
integer Q57='ablt'
unit array Q27
hashtable Q_7=InitHashtable()
region R47=null
boolean array R77
boolean array R87
boolean R97=false
boolean array RD7
boolean RE7=true
integer RF7=0
group RG7=CreateGroup()
unit RH7=null
unit RI7=null
unit array RJ7
real RK7=.0
real RM7=.0
boolexpr RN7=null
trigger RO7=CreateTrigger()
constant integer RP7=StringHash("listtop1")
constant integer RQ7=StringHash("listtop2")
constant integer RR7=StringHash("attack")
hashtable RS7=InitHashtable()
unit array RT7
integer array RU7
constant integer RV7=1
constant integer RW7=2
integer RX7=0
integer RY7=0
integer RZ7=0
real RA7
integer RB7=0
integer RC7=0
location array R37
constant integer R67=16
constant integer RL7=32
trigger array R17
integer R07=0
group R57=null
integer R27=0
integer R_7=0
hashtable S47=InitHashtable()
group S77=CreateGroup()
constant integer S87=1
constant integer S97=2
real SD7=1000.
constant integer SE7=8
constant real SF7=.5
constant real SG7=2.
real SH7=.0
real SI7=.0
real SJ7=.0
real SK7=.0
location SM7=null
group SN7
integer SO7=0
real SP7=.0
real SQ7=.0
real array SR7
real array SS7
integer ST7=0
boolean SU7=false
real SV7=.0
real SW7=.0
real SX7=0
real SY7
unit SZ7
boolean array S67
timer array SL7
timer S17=null
unit array S07
integer array S57
real array S27
real array S_7
integer array T47
boolean array T77
real array T87
integer array T97
unit TD7=null
real TE7=.0
real TF7=50.
real TG7=700
integer TH7=0
unit TI7=null
constant integer TJ7=360
integer TK7=0
string TM7="#Error: Timer-LinearTable leakage. LastFunc: "
integer TN7=0
constant integer TO7=0
constant integer TP7=1
constant integer TQ7=2
constant integer TR7=3
constant integer TS7=4
real TT7=.0
real TU7=.0
real TV7=.0
unit TW7=null
location TX7=null
real TY7=.0
real TZ7=.0
integer TA7=0
unit TB7=null
integer TC7=0
unit T37=null
real T67=.0
boolean TL7=false
trigger T17=null
constant boolean T07=false
boolean T57=false
boolean T27=false
boolean T_7=false
rect U47
unit U77=null
unit U87=null
unit U97=null
unit UD7=null
unit UE7=null
unit UF7=null
integer UG7
integer UH7
integer UI7
integer UJ7
integer UK7
integer UM7
integer UN7
integer UO7
integer UP7
integer UQ7
integer UR7
integer US7
integer UT7
trigger array UU7
trigger array UV7
trigger array UW7
trigger array UX7
trigger array UY7
trigger array UZ7
trigger array UA7
trigger array UB7
boolean array UC7
integer U37
integer U67
integer UL7
integer U17
integer U07
integer U57
integer U27
integer U_7
integer V47
integer V77
integer V87
integer V97
timer VD7=null
force VI7=null
boolexpr VJ7=null
endglobals
function OrganicUnitsFEnemy takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false)and(IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()),GetOwningPlayer(GetSpellAbilityUnit()))==true))
endfunction
function fspirslow4 takes nothing returns nothing
local unit f
local location MFS=GetSpellTargetLoc()
set f=CreateUnitAtLoc(GetOwningPlayer(GetSpellAbilityUnit()),'e0M3',MFS,bj_UNIT_FACING)
call UnitAddAbility(f,'AF2L')
call UnitApplyTimedLifeBJ(2.00,'BTLF',f)
call IssueTargetOrderBJ(f,"slow",GetEnumUnit())
set MFS=null
set f=null
endfunction
function SpellCastsFunc takes nothing returns nothing
local real a
local group b=CreateGroup()
local integer c
local location YAF=GetUnitLoc(GetSpellAbilityUnit())
local location YSF=GetSpellTargetLoc()
if GetSpellAbilityId()=='A1Z2' and GetUnitAbilityLevel(GetSpellAbilityUnit(),'A1YX')==4 then
set a=DistanceBetweenPoints(YAF,YSF)
call TriggerSleepAction((a/ fsspeed)-0.2)
call GroupEnumUnitsInRangeOfLoc(b,YSF,175,Condition(function OrganicUnitsFEnemy))
set c=CountUnitsInGroup(b)
if c>0 then
call ForGroup(b,function fspirslow4)
endif
endif
call DestroyGroup(b)
set YAF=null
set YSF=null
endfunction
function LearnFixesB takes nothing returns nothing
local unit m=GetLearningUnit()
local integer y=GetPlayerId(GetOwningPlayer(GetLearningUnit()))
if GetLearnedSkill()=='A0MB' then
if GetUnitAbilityLevel(m,'A0MB')==1 then
call UnitAddAbility(m,'AF3L')
elseif GetUnitAbilityLevel(m,'A0MB')>1 then
call SetUnitAbilityLevel(m,'AF3L',GetUnitAbilityLevel(m,'A0MB'))
endif
elseif GetLearnedSkill()=='A0MW' and GetUnitTypeId(m)=='H00I' then
set meepo_max[y]=GetUnitAbilityLevel(m,'A0MW')+1
if UnitHasItemOfTypeBJ(meepo_main[y],'I0NX')or UnitHasItemOfTypeBJ(meepo_main[y],'I0AY')then
set meepo_max[y]=meepo_max[y]+1
endif
elseif GetLearnedSkill()=='A27C' and GetUnitTypeId(m)=='H00I' then
set meepo_max[y]=GetUnitAbilityLevel(m,'A27C')+1
if UnitHasItemOfTypeBJ(meepo_main[y],'I0NX')or UnitHasItemOfTypeBJ(meepo_main[y],'I0AY')then
set meepo_max[y]=meepo_max[y]+1
endif
endif
endfunction
function MeepoFilter takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='H00I' or GetUnitTypeId(GetFilterUnit())=='H00J')and IsUnitIllusion(GetFilterUnit())==false
endfunction
function MeepoEnter takes nothing returns nothing
local unit m=GetEnteringUnit()
local integer y=GetPlayerId(GetOwningPlayer(GetEnteringUnit()))
local group g=CreateGroup()
if GetUnitTypeId(m)=='H00I' and meepo_sec[y]==false then
set meepo_max[y]=1
set meepo_sec[y]=true
set meepo_main[y]=m
elseif GetUnitTypeId(m)=='H00J' then
call GroupEnumUnitsOfPlayer(g,GetOwningPlayer(m),Condition(function MeepoFilter))
if CountUnitsInGroup(g)>meepo_max[y]and meepo_agh[y]==true then
call RemoveUnit(m)
elseif CountUnitsInGroup(g)>meepo_max[y]and meepo_agh[y]==false then
set meepo_agh[y]=true
endif
endif
call DestroyGroup(g)
endfunction
function MeepoInit takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterEnterRectSimple(t,GetEntireMapRect())
call TriggerAddAction(t,function MeepoEnter)
set t=null
endfunction
function SpellCastsInit takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(t,function SpellCastsFunc)
set t=null
endfunction
function LearnFixA takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddAction(t,function LearnFixesB)
set t=null
endfunction
function B2I takes boolean b returns integer
if b then
return 1
endif
return 0
endfunction
function TestMsg takes string s returns nothing
if TestMode then
call BJDebugMsg(s)
endif
endfunction
function AchieveCanBeGetTwice takes integer i returns boolean
return i=='CJ05' or i=='CJ06' or i=='CJ07' or i=='CJ09' or i=='CJ10' or i=='CJ12' or i=='CJ13' or i=='CJ14' or i=='CJ15' or i=='CJ16' or i=='CJ17' or i=='CJ19' or i=='CJ26'
endfunction
function GetAdd takes integer i returns string
if i>=0 then
return"(+"
else
return"("
endif
endfunction
function Achieve takes player p,integer id returns nothing
local integer l=GetPlayerId(p)
local integer k=0
local integer h=GetHandleId(p)
if(Mode_NA)and LoadBoolean(achieveHT,h,id)==false and l!=0 and l!=6 and l<12 and GetPlayerSlotState(p)==PLAYER_SLOT_STATE_PLAYING then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,W[l]+KW4[l]+"|r "+GetObjectName('CJ00')+GetAdd(LoadInteger(achieveHT,'Achi',id))+I2S(LoadInteger(achieveHT,'Achi',id))+") - "+"|cffffff00"+GetObjectName(id)+"|r!")
call SetPlayerName(p,GetObjectName(id+'TX00'-'CJ00')+SubString(GetPlayerName(p),StringLength(LoadStr(achieveHT,'pNam',l)),StringLength(GetPlayerName(p))))
call SaveStr(achieveHT,'pNam',l,GetObjectName(id+'TX00'-'CJ00'))
set k=LoadInteger(achieveHT,h,'aNum')+1
call SaveInteger(achieveHT,h,'aNum',k)
call SaveInteger(achieveHT,'Ac00'+l,k,id)
if AchieveCanBeGetTwice(id)==false then
call SaveBoolean(achieveHT,h,id,true)
endif
call SaveInteger(achieveHT,h,'AchP',LoadInteger(achieveHT,h,'AchP')+LoadInteger(achieveHT,'Achi',id))
endif
endfunction
function ShowAchieve takes player p returns nothing
local integer l=GetPlayerId(p)
local integer k=1
local integer h=GetHandleId(p)
local integer i=LoadInteger(achieveHT,h,'aNum')
local string s=GetObjectName(LoadInteger(achieveHT,'Ac00'+l,k))
if s=="" then
call DisplayTimedTextToPlayer(p,0,0,10,GetObjectName('TX00')+"N/A(+0)")
endif
loop
set k=k+1
exitwhen k>i
set s=s+" / "+GetObjectName(LoadInteger(achieveHT,'Ac00'+l,k))
endloop
call DisplayTimedTextToPlayer(p,0,0,10,GetObjectName('TX00')+s+GetAdd(LoadInteger(achieveHT,h,'AchP'))+I2S(LoadInteger(achieveHT,h,'AchP'))+")")
endfunction
function IsUnitVisibleEx takes unit u,player p returns boolean
return IsUnitVisible(u,p)and GetUnitTypeId(u)!='H0ER'
endfunction
function ASCII takes integer i returns string
if i>='0'then
if i<='9' then
return SubString("0123456789",i-48,i-47)
elseif i<='Z' then
return SubString("ABCDEFGHIJKLMNOPQRSTUVWXYZ",i-65,i-64)
elseif i<='z' then
return SubString("abcdefghijklmnopqrstuvwxyz",i-97,i-96)
endif
endif
return""
endfunction
function I2S_ASCII takes integer i returns string
local integer z=0
local string x=""
loop
exitwhen i<256*256*256
set i=i-256*256*256
set z=z+1
endloop
set x=x+ASCII(z)
set z=0
loop
exitwhen i<256*256
set i=i-256*256
set z=z+1
endloop
set x=x+ASCII(z)
set z=0
loop
exitwhen i<256
set i=i-256
set z=z+1
endloop
set x=x+ASCII(z)+ASCII(i)
return x
endfunction
function VM7 takes real VN7 returns nothing
local real VO7
local real st=TimerGetElapsed(VD7)
if st<=0 then
set VD7=CreateTimer()
call TimerStart(VD7,0xF4240,false,null)
endif
if(VN7>0)then
loop
set VO7=VN7-TimerGetElapsed(VD7)+st
exitwhen VO7<=0
if(VO7>bj_POLLED_WAIT_SKIP_THRESHOLD)then
call TriggerSleepAction(.1*VO7)
else
call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)
endif
endloop
endif
endfunction
function VQ7 takes player VR7 returns force
set VI7=CreateForce()
call ForceEnumEnemies(VI7,VR7,VJ7)
return VI7
endfunction
function VL7 takes nothing returns boolean
return GetPlayerController(GetOwningPlayer(GetFilterUnit()))==MAP_CONTROL_USER and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)
endfunction
function V17 takes unit u returns nothing
local integer V07=GetUnitTypeId(u)
local player p=GetOwningPlayer(u)
local integer i=1
loop
exitwhen i>5
call SetPlayerAbilityAvailable(p,LoadInteger(S47,V07,i),true)
set i=i+1
endloop
endfunction
function V57 takes nothing returns nothing
call V17(GetEnumUnit())
endfunction
function AvailableHumanTimer takes nothing returns nothing
call GroupClear(S77)
call GroupEnumUnitsInRect(S77,GetWorldBounds(),Condition(function VL7))
call ForGroup(S77,function V57)
endfunction
function bug_SkillEnableInit takes nothing returns boolean
call DestroyTrigger(GetTriggeringTrigger())
return false
endfunction
function V27 takes nothing returns nothing
endfunction
function V_7 takes boolean W47,unit W77,unit W87 returns unit
if W47 then
return W77
else
return W87
endif
return null
endfunction
function W97 takes boolean W47,integer WD7,integer WE7 returns integer
if W47 then
return WD7
else
return WE7
endif
return 0
endfunction
function WF7 takes boolean W47,string WG7,string WH7 returns string
if W47 then
return WG7
else
return WH7
endif
return""
endfunction
function WI7 takes boolean W47,real WD7,real WE7 returns real
if W47 then
return WD7
else
return WE7
endif
return .0
endfunction
function GetLastEnumedGroup takes nothing returns group
return R57
endfunction
function WJ7 takes real WK7,location WM7,boolexpr WN7 returns group
set R57=CreateGroup()
call GroupEnumUnitsInRangeOfLoc(R57,WM7,WK7,WN7)
if WN7!=null then
call DestroyBoolExpr(WN7)
endif
return R57
endfunction
function WO7 takes rect r,boolexpr WN7 returns group
set R57=CreateGroup()
call GroupEnumUnitsInRect(R57,r,WN7)
if WN7!=null then
call DestroyBoolExpr(WN7)
endif
return R57
endfunction
function WP7 takes rect r,player VR7 returns group
set R57=CreateGroup()
set bj_groupEnumOwningPlayer=VR7
call GroupEnumUnitsInRect(R57,r,filterGetUnitsInRectOfPlayer)
return R57
endfunction
function WQ7 takes player VR7,boolexpr WN7 returns group
set R57=CreateGroup()
call GroupEnumUnitsOfPlayer(R57,VR7,WN7)
if WN7!=null then
call DestroyBoolExpr(WN7)
endif
return R57
endfunction
function WR7 takes player VR7,integer WS7 returns group
set R57=CreateGroup()
set bj_groupEnumTypeId=WS7
call GroupEnumUnitsOfPlayer(R57,VR7,filterGetUnitsOfPlayerAndTypeId)
return R57
endfunction
function WT7 takes string s returns boolean
if E and R87[GetPlayerId(GetTriggerPlayer())]then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,45,s)
endif
return true
endfunction
function WU7 takes nothing returns boolean
local integer WV7=LoadInteger(RS7,RB7,RQ7)-1
local unit WW7
local real WX7
local integer WY7=0
set RC7=0
loop
exitwhen RC7>WV7
if RA7-LoadReal(RS7,RB7,RC7)>2.5 or IsUnit(LoadUnitHandle(RS7,RB7,RC7),null)then
set WW7=LoadUnitHandle(RS7,RB7,WV7)
set WX7=LoadReal(RS7,RB7,WV7)
set WY7=LoadInteger(RS7,RB7,WV7)
call RemoveSavedBoolean(RS7,RB7,GetHandleId(LoadUnitHandle(RS7,RB7,RC7)))
call RemoveSavedInteger(RS7,RB7,GetHandleId(LoadUnitHandle(RS7,RB7,RC7)))
call SaveUnitHandle(RS7,RB7,RC7,WW7)
call SaveReal(RS7,RB7,RC7,WX7)
call SaveInteger(RS7,RB7,RC7,WY7)
call RemoveSavedHandle(RS7,RB7,WV7)
call RemoveSavedReal(RS7,RB7,WV7)
call RemoveSavedInteger(RS7,RB7,WV7)
call SaveInteger(RS7,RB7,GetHandleId(WW7),RC7)
call SaveInteger(RS7,RB7,RQ7,WV7)
set WV7=WV7-1
endif
set RC7=RC7+1
endloop
set WW7=null
return WV7==-1
endfunction
function WZ7 takes nothing returns boolean
local integer WV7=LoadInteger(RS7,RB7,RP7)-1
local integer WA7=WV7+RR7
local unit WW7
local real WX7
local integer WY7
set RC7=RR7
loop
exitwhen RC7>WA7
if RA7-LoadReal(RS7,RB7,RC7)>=2+WI7(IsUnitType(LoadUnitHandle(RS7,RB7,RC7),UNIT_TYPE_HERO),2,.8)or IsUnit(LoadUnitHandle(RS7,RB7,RC7),null)then
set WW7=LoadUnitHandle(RS7,RB7,WV7)
set WX7=LoadReal(RS7,RB7,WV7)
set WY7=LoadInteger(RS7,RB7,WV7)
call RemoveSavedBoolean(RS7,RB7,RR7+GetHandleId(LoadUnitHandle(RS7,RB7,RC7)))
call RemoveSavedInteger(RS7,RB7,RR7+GetHandleId(LoadUnitHandle(RS7,RB7,RC7)))
call SaveUnitHandle(RS7,RB7,RC7,WW7)
call SaveReal(RS7,RB7,RC7,WX7)
call SaveInteger(RS7,RB7,RC7,WY7)
call RemoveSavedHandle(RS7,RB7,WV7)
call RemoveSavedReal(RS7,RB7,WV7)
call RemoveSavedInteger(RS7,RB7,WV7)
call SaveInteger(RS7,RB7,GetHandleId(WW7),RC7)
call SaveInteger(RS7,RB7,RP7,WV7)
set WV7=WV7-1
endif
set RC7=RC7+1
endloop
set WW7=null
return WV7==-1
endfunction
function WB7 takes boolean do returns nothing
if do then
call FlushChildHashtable(RS7,RB7)
set RT7[RY7]=RT7[RX7-1]
set RU7[RY7]=RU7[RX7-1]
set RT7[RX7-1]=null
set RU7[RX7-1]=0
endif
endfunction
function WC7 takes nothing returns nothing
call WB7(WU7())
endfunction
function W37 takes nothing returns nothing
call WB7(WZ7())
endfunction
function W67 takes nothing returns boolean
set RZ7=RZ7+1
set RY7=0
set RA7=TimerGetElapsed(E4)
loop
exitwhen RY7>RX7
set RB7=GetHandleId(RT7[RY7])
if IsUnit(RT7[RY7],null)or GetWidgetLife(RT7[RY7])<=.405 then
call WB7(true)
else
if RU7[RY7]==RW7 then
call ExecuteFunc("WC7")
elseif RU7[RY7]==RV7 and RZ7-RZ7/ 2*2==0 then
call ExecuteFunc("W37")
endif
endif
set RY7=RY7+1
endloop
return false
endfunction
function WL7 takes unit W17,unit W07 returns nothing
local integer W57=GetHandleId(W17)
local integer WV7
local integer V37=GetHandleId(W07)
if not LoadBoolean(RS7,W57,V37+RR7)then
set WV7=LoadInteger(RS7,W57,RP7)
if WV7==0 then
set RT7[RX7]=(W17)
set RU7[RX7]=RV7
set RX7=RX7+1
endif
call SaveUnitHandle(RS7,W57,RR7+WV7,W07)
call SaveInteger(RS7,W57,RP7,WV7+1)
call SaveBoolean(RS7,W57,V37+RR7,true)
call SaveInteger(RS7,W57,V37+RR7,WV7)
else
set WV7=LoadInteger(RS7,W57,V37+RR7)
endif
call SaveReal(RS7,W57,RR7+WV7,TimerGetElapsed(E4))
call SaveInteger(RS7,W57,RR7+WV7,LoadInteger(RS7,W57,RR7+WV7)+1)
endfunction
function W27 takes unit W07,unit W17 returns nothing
local integer W57=GetHandleId(W07)
local integer WV7
local integer V37=GetHandleId(W17)
if not LoadBoolean(RS7,W57,V37)then
set WV7=LoadInteger(RS7,W57,RQ7)
if WV7==0 then
set RT7[RX7]=(W07)
set RX7=RX7+1
endif
call SaveUnitHandle(RS7,W57,WV7,W17)
call SaveInteger(RS7,W57,RQ7,WV7+1)
call SaveBoolean(RS7,W57,V37,true)
call SaveInteger(RS7,W57,V37,WV7)
else
set WV7=LoadInteger(RS7,W57,V37)
endif
call SaveReal(RS7,W57,WV7,TimerGetElapsed(E4))
call SaveInteger(RS7,W57,WV7,LoadInteger(RS7,W57,WV7)+1)
endfunction
function W_7 takes nothing returns boolean
local unit X47
local unit X77
local integer pointerid
set X47=GetAttacker()
set X77=GetTriggerUnit()
call WL7(X77,X47)
call W27(X47,X77)
set X47=null
set X77=null
return false
endfunction
function X87 takes unit X97 returns nothing
local trigger t=null
if IsUnit(X97,null)==false then
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,X97,EVENT_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function W_7))
set t=null
endif
endfunction
function XD7 takes unit XE7 returns integer
return LoadInteger(RS7,GetHandleId(XE7),RP7)
endfunction
function XF7 takes unit XE7 returns boolean
local integer i
local integer WA7
local integer V37
if LoadInteger(RS7,GetHandleId(XE7),RP7)==0 then
return false
endif
set i=RR7
set WA7=RR7+LoadInteger(RS7,GetHandleId(XE7),RP7)
set V37=GetHandleId(XE7)
loop
exitwhen i>=WA7
if IsUnitType(LoadUnitHandle(RS7,V37,i),UNIT_TYPE_HERO)or IsUnitType(LoadUnitHandle(RS7,V37,i),UNIT_TYPE_STRUCTURE)then
return true
endif
set i=i+1
endloop
return false
endfunction
function XG7 takes unit XE7 returns boolean
local integer i
local integer WA7
local integer V37
if LoadInteger(RS7,GetHandleId(XE7),RQ7)==0 then
return false
endif
set i=0
set WA7=LoadInteger(RS7,GetHandleId(XE7),RQ7)
set V37=GetHandleId(XE7)
loop
exitwhen i>=WA7
if IsUnitType(LoadUnitHandle(RS7,V37,i),UNIT_TYPE_HERO)or IsUnitType(LoadUnitHandle(RS7,V37,i),UNIT_TYPE_STRUCTURE)then
return true
endif
set i=i+1
endloop
return false
endfunction
function XH7 takes nothing returns nothing
local integer i=0
call TriggerRegisterTimerEvent(RO7,2.5,true)
call TriggerAddCondition(RO7,Condition(function W67))
loop
exitwhen i>1024
set RT7[i]=null
set RU7[i]=0
set i=i+1
endloop
endfunction
function XI7 takes nothing returns nothing
call X87(IZ4)
call X87(I34)
call X87(IL4)
call X87(I04)
call X87(I24)
call X87(I_4)
call X87(J44)
call X87(J74)
call X87(J84)
call X87(J94)
call X87(JD4)
call X87(JW4)
call X87(JX4)
call X87(JY4)
call X87(JZ4)
call X87(JA4)
call X87(JB4)
call X87(JC4)
call X87(J34)
call X87(J64)
call X87(JL4)
call X87(J14)
endfunction
function bool_TestVersion_CLOUD_BEGIN takes nothing returns boolean
return E
endfunction
function AIDEBUG_CRASHSCRIPT takes nothing returns nothing
set bj_forLoopAIndex=1/ 0
endfunction
function XJ7 takes string s returns boolean
return true
endfunction
function XK7 takes string s returns nothing
if(D)and(OZ7==-1)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,16.,s)
endif
endfunction
function XM7 takes integer O5,string s returns nothing
local integer i=O5
if not(i<1 or i>11 or i==0 or i==6)then
set OX7[OA7*O5+OY7[O5]]=s
set OY7[O5]=OY7[O5]+1
if OY7[O5]>=OA7 then
set OY7[O5]=0
endif
endif
set i=O5
if i==6 then
set i=11
elseif i>11 then
elseif i>5 then
set i=i-1
endif
set s=W[O5]+I2S(i)+"|r- "+s
if(D)and(OZ7==-1 or OZ7==O5)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,16.,s)
endif
endfunction
function XN7 takes nothing returns boolean
local string XO7=GetEventPlayerChatString()
local integer O5=0
local integer j
if StringLength(XO7)>5 and(XO7!="-dbgmode")then
set OZ7=S2I(SubString(XO7,5,StringLength(XO7)))
if not(OZ7<1 or OZ7>10)then
call ClearTextMessages()
set O5=OZ7
if OZ7>5 then
set O5=O5+1
endif
set j=OY7[O5]
loop
if OX7[OA7*O5+j]!=null then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,16.,W[O5]+I2S(OZ7)+"|r- "+OX7[OA7*O5+j])
endif
exitwhen(j==OY7[O5]-1)
set j=j+1
if j>=OA7 then
exitwhen(OY7[O5]==0)
set j=0
endif
endloop
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,16.,"***Debug messages of |c00ffff00"+KW4[O5]+"|r***")
endif
else
set OZ7=-1
endif
return false
endfunction
function XP7 takes integer i returns string
return I2S(i)+" "
endfunction
function XQ7 takes boolean b returns string
if b then
return"T "
endif
return"F "
endfunction
function XR7 takes location l returns string
return"("+R2S(GetLocationX(l))+", "+R2S(GetLocationY(l))+")"
endfunction
function XS7 takes integer i returns string
local string XT7="0123456789"
local string XU7="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
local string XV7="abcdefghijklmnopqrstuvwxyz"
if i>=48 and i<=57 then
return SubString(XT7,i-48,i-47)
elseif i>=65 and i<=90 then
return SubString(XU7,i-65,i-64)
elseif i>=97 and i<='z' then
return SubString(XV7,i-97,i-96)
endif
return""
endfunction
function XW7 takes integer i returns string
local integer j
local string s=""
local integer k=0
loop
exitwhen k>3
set j=ModuloInteger(i,256)
set i=(i-j)/ 256
set s=XS7(j)+s
set k=k+1
endloop
if StringLength(s)==4 then
return s
endif
return"?"
endfunction
function XX7 takes string XY7 returns nothing
local integer i
local integer O5
set i=0
loop
exitwhen i>O67
if OC7[i]==XY7 then
return
endif
set i=i+1
endloop
set OC7[O37]=XY7
set O5=0
loop
exitwhen O5>11
if O5==6 then
set O5=7
endif
if GetPlayerSlotState(Player(O5))==PLAYER_SLOT_STATE_PLAYING then
set i=O5*O67+O37
call DestroyTextTag(OB7[i])
set OB7[i]=CreateTextTag()
call SetTextTagText(OB7[i]," ",O07)
call SetTextTagPosUnit(OB7[i],Y7[O5],45*O37)
call SetTextTagVisibility(OB7[i],true)
call SetTextTagPermanent(OB7[i],true)
call SetTextTagColor(OB7[i],KX4[O5]+'d',KY4[O5]+'d',KZ4[O5]+'d',255)
endif
set O5=O5+1
endloop
set O37=O37+1
if O37>O67 then
set O37=0
endif
endfunction
function XZ7 takes nothing returns nothing
local integer i
set i=0
loop
exitwhen i>O67
set OC7[i]=""
set i=i+1
endloop
set O37=0
set i=0
loop
exitwhen i>12*O67
call DestroyTextTag(OB7[i])
set OB7[i]=null
set i=i+1
endloop
call DestroyTimer(OL7)
call DestroyTimer(O17)
set OL7=null
set O17=null
endfunction
function XA7 takes string XY7,integer O5 returns string
local integer XB7=0
local string XC7=""
local integer i=0
local integer j=StringLength(XY7)
loop
exitwhen i>=j
if SubString(XY7,i,i+1)==" " or SubString(XY7,i,i+1)=="[" then
set XB7=S2I(SubString(XY7,i+1,j))
set XY7=SubString(XY7,0,i)
exitwhen true
endif
set i=i+1
endloop
if i>=j then
return"-"
endif
if XY7=="eY" then
set XC7=I2S(eY[XB7+O5])
elseif XY7=="g_aiItemInt" then
set XC7=I2S(OJ7[XB7+O5])
elseif XY7=="hG" then
set XC7=I2S(hG[XB7+O5])
elseif XY7=="ga_rSkillCD" then
set XC7=R2S(V74[XB7+O5])
elseif XY7=="G0" then
set XC7=XQ7(G0[XB7+O5])
elseif XY7=="GZ" then
set XC7=XQ7(GZ[XB7+O5])
elseif XY7=="g_aiItemBool" then
set XC7=XQ7(OM7[XB7+O5])
elseif XY7=="h4" then
if h4[XB7+O5]==null then
set XC7="<>"
else
set XC7=GetUnitName(h4[XB7+O5])
endif
elseif XY7=="h9" then
if h9[XB7+O5]==null then
set XC7="?"
endif
set XC7=I2S(GetUnitUserData(h9[XB7+O5]))
elseif XY7=="h8" then
if h8[XB7+O5]==null then
set XC7="?"
endif
set XC7=I2S(GetUnitUserData(h8[XB7+O5]))
elseif XY7=="debugStr" then
set XC7=OX7[XB7+O5]
endif
if XC7!="" then
return XY7+"["+I2S(XB7)+"+"+I2S(O5)+"] = "+XC7
endif
return"-"
endfunction
function X37 takes nothing returns nothing
local integer i=0
local integer O5=0
loop
exitwhen i>O67
if OC7[i]!="" then
set O5=0
loop
exitwhen O5>11
if O5==6 then
set O5=7
endif
if OB7[O5*O67+i]!=null then
call SetTextTagText(OB7[O5*O67+i],XA7(OC7[i],O5),O07)
endif
set O5=O5+1
endloop
endif
set i=i+1
endloop
endfunction
function X67 takes nothing returns nothing
local integer i=0
local integer O5=0
loop
exitwhen i>O67
if OC7[i]!="" then
set O5=0
loop
exitwhen O5>11
if O5==6 then
set O5=7
endif
if OB7[O5*O67+i]!=null then
call SetTextTagPosUnit(OB7[O5*O67+i],Y7[O5],45*i)
endif
set O5=O5+1
endloop
endif
set i=i+1
endloop
endfunction
function XL7 takes nothing returns nothing
local string XY7=GetEventPlayerChatString()
local integer i=StringLength(GetEventPlayerChatStringMatched())+1
if i<StringLength(XY7)then
set XY7=SubString(XY7,i,255)
if XA7(XY7,1)=="-" then
call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"Watcher parameter not yet supported: "+XY7)
return
endif
call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"Watcher activated for |c00ffcc00"+XY7+"|r")
call XX7(XY7)
if OL7==null then
set OL7=CreateTimer()
call TimerStart(OL7,O57,true,function X37)
call X37()
set O17=CreateTimer()
call TimerStart(O17,O27,true,function X67)
endif
return
endif
call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"Watcher deactivated")
call XZ7()
endfunction
function X17 takes string s returns nothing
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,16.,s)
endfunction
function AIDEBUGFORCEORDER2 takes nothing returns nothing
call IssueImmediateOrderById(Y7[2],852526)
call WT7("order2")
endfunction
function X07 takes nothing returns boolean
call SetUnitState(Y7[2],UNIT_STATE_LIFE,10)
call SetUnitState(Y7[1],UNIT_STATE_LIFE,10)
return true
endfunction
function X57 takes boolean X27 returns nothing
local trigger t=CreateTrigger()
local integer i=0
loop
exitwhen i>11
if IsPlayerAlly(Player(i),GetTriggerPlayer())and Player(i)!=GetTriggerPlayer()then
call SetPlayerAlliance(Player(i),GetTriggerPlayer(),ALLIANCE_SHARED_CONTROL,X27)
call SetPlayerAlliance(Player(i),GetTriggerPlayer(),ALLIANCE_SHARED_ADVANCED_CONTROL,X27)
endif
set i=i+1
endloop
call TriggerRegisterPlayerChatEvent(t,GetTriggerPlayer(),"-order",false)
call TriggerAddCondition(t,Condition(function X07))
endfunction
function bool_TestVersion_CLOUD_END takes nothing returns boolean
return E
endfunction
function X_7 takes unit Y47 returns real
return GetWidgetLife(Y47)*hq[752+GetPlayerId(GetOwningPlayer(Y47))]
endfunction
function Y77 takes unit Y47,real Y87,real Y97,integer YD7 returns boolean
if YD7==S97 then
return GetUnitManaPercent(Y47)>=Y87 or GetUnitState(Y47,UNIT_STATE_MANA)>=Y97
endif
return GetUnitManaPercent(Y47)<=Y87 or GetUnitState(Y47,UNIT_STATE_MANA)<=Y97
endfunction
function YE7 takes unit Y47,real YF7,real YG7,integer YD7 returns boolean
if YD7==S97 then
return GetUnitManaPercent(Y47)>=YF7 or GetUnitState(Y47,UNIT_STATE_MANA)>=YG7
endif
return GetUnitManaPercent(Y47)<=YF7 or GetUnitState(Y47,UNIT_STATE_MANA)<=YG7
endfunction
function YH7 takes unit a,unit b returns real
return bj_RADTODEG*Atan2(GetUnitY(b)-GetUnitY(a),GetUnitX(b)-GetUnitX(a))
endfunction
function YI7 takes real x1,real y1,real x2,real y2 returns real
return bj_RADTODEG*Atan2(y2-y1,x2-x1)
endfunction
function YJ7 takes player pl returns string
if(AV4[GetPlayerId(pl)]==AX4)then
return"简单的 "
elseif(AV4[GetPlayerId(pl)]==AY4)then
return"普通的 "
else
return"疯狂的 "
endif
endfunction
function YK7 takes player p returns nothing
if GetAIDifficulty(p)==AI_DIFFICULTY_NEWBIE then
set AV4[GetPlayerId(p)]=AX4
elseif GetAIDifficulty(p)==AI_DIFFICULTY_NORMAL then
set AV4[GetPlayerId(p)]=AY4
elseif GetAIDifficulty(p)==AI_DIFFICULTY_INSANE then
set AV4[GetPlayerId(p)]=AZ4
else
set AV4[GetPlayerId(p)]=AW4
endif
endfunction
function YM7 takes integer YN7 returns integer
if(YN7=='HC49' or YN7=='HC92' or YN7=='N01O' or YN7=='Nbbc' or YN7=='Huth' or YN7=='Ogrh' or YN7=='E005' or YN7=='N016' or YN7=='Nbrn' or YN7=='Eevi' or YN7=='U006' or YN7=='Ewar' or YN7=='E004' or YN7=='EC45' or YN7=='EC77' or YN7=='Nfir' or YN7=='Hvsh' or YN7=='E01B' or YN7=='H00I' or YN7=='H071')then
return GT7
endif
if(YN7=='Hvwd' or YN7=='O00P' or YN7=='H001' or YN7=='HC49' or YN7=='HC92' or YN7=='N01O' or YN7=='Nbbc' or YN7=='Huth' or YN7=='Ogrh' or YN7=='E005' or YN7=='Usyl' or YN7=='H008' or YN7=='Naka' or YN7=='Hlgr' or YN7=='Edem' or YN7=='Nbrn' or YN7=='H00D' or YN7=='N01V' or YN7=='H00Q' or YN7=='E01Y' or YN7=='H00T' or YN7=='H06S' or YN7=='Eevi' or YN7=='EC57' or YN7=='UC11' or YN7=='U00A' or YN7=='U008' or YN7=='U006' or YN7=='H00V' or YN7=='Udre' or YN7=='UC42' or YN7=='U000' or YN7=='UC91' or YN7=='EC45' or YN7=='EC77' or YN7=='E002' or YN7=='U00C' or YN7=='O00J' or YN7=='Ubal' or YN7=='Nfir' or YN7=='U00K' or YN7=='Hvsh' or YN7=='E01B' or YN7=='H00I' or YN7=='H071' or YN7=='E02I' or YN7=='E02N' or YN7=='N0M0' or YN7=='E02K')then
return GU7
endif
if(YN7=='H001' or YN7=='Hamg' or YN7=='H008' or YN7=='Npbm' or YN7=='H000' or YN7=='Hlgr' or YN7=='N01I' or YN7=='H06S' or YN7=='UC11' or YN7=='U00A' or YN7=='U008' or YN7=='NC00' or YN7=='U00C' or YN7=='Ofar' or YN7=='U00F' or YN7=='Opgh' or YN7=='Udea' or YN7=='H00R' or YN7=='O015' or YN7=='O01F' or YN7=='E02F' or YN7=='E02K' or YN7=='E032' or(YN7=='N0MU' or YN7=='N0MW'))then
return GV7
endif
if(YN7=='Emoo' or YN7=='Otch' or YN7=='N01A' or YN7=='Uktl' or YN7=='Hblm' or YN7=='Hmkg' or YN7=='Emns' or YN7=='Ucrl' or YN7=='H00A' or YN7=='Orkn' or YN7=='Harf' or YN7=='E00P' or YN7=='N00B' or YN7=='N0EG' or YN7=='UC18' or YN7=='UC60' or YN7=='UC01' or YN7=='H00H' or YN7=='Oshd' or YN7=='U00E' or YN7=='E01A' or YN7=='U00P' or YN7=='E01C' or YN7=='N01W' or YN7=='N00R' or YN7=='H00N' or YN7=='H00U' or YN7=='N0HP' or YN7=='O016' or YN7=='E02J' or YN7=='E02H')then
return GW7
endif
if(YN7=='Hmbr' or YN7=='Emoo' or YN7=='Hjai' or YN7=='H004' or YN7=='Hmkg' or YN7=='Ntin' or YN7=='H00K' or YN7=='E00P' or YN7=='H00S' or YN7=='Ekee' or YN7=='Ulic' or YN7=='UC76' or YN7=='UC18' or YN7=='H00H' or YN7=='Oshd' or YN7=='E01A' or YN7=='U00P' or YN7=='H00U' or YN7=='E02X' or YN7=='Ucrl'or(YN7=='U01X')or YN7=='H0DO' or YN7=='N0MD')then
return GX7
endif
if((YN7=='Hmbr')or(YN7=='H004')or(YN7=='Hmkg')or(YN7=='Ntin')or(YN7=='Orkn')or(YN7=='E00P')or(YN7=='Ulic')or(YN7=='UC18')or(YN7=='UC01')or(YN7=='H00H')or(YN7=='H00U')or(YN7=='N0HP')or(YN7=='H0DO'))then
return GY7
endif
if(YN7=='Emoo')or(YN7=='Uktl')or(YN7=='Hblm')or(YN7=='Emns')or(YN7=='Ucrl')or(YN7=='U01X')or(YN7=='H00K')or(YN7=='H00A')or(YN7=='Orkn')or(YN7=='H000')or(YN7=='Nbrn')or(YN7=='E00P')or(YN7=='Ekee')or(YN7=='UC76')or(YN7=='EC57')or(YN7=='U008')or(YN7=='U006')or(YN7=='H00H')or(YN7=='E01C')or(YN7=='U00E')or(YN7=='N00R')or(YN7=='H004')or(YN7=='H00D')or(YN7=='Ogrh')or(YN7=='U00A')then
return GZ7
endif
return 0
endfunction
function YO7 takes integer YN7,integer YP7 returns boolean
if YP7==0 then
return true
elseif YP7==GT7 and(YN7=='HC49' or YN7=='HC92' or YN7=='N01O' or YN7=='Nbbc' or YN7=='Huth' or YN7=='Ogrh' or YN7=='E005' or YN7=='N016' or YN7=='Nbrn' or YN7=='Eevi' or YN7=='U006' or YN7=='Ewar' or YN7=='E004' or YN7=='EC45' or YN7=='EC77' or YN7=='Nfir' or YN7=='Hvsh' or YN7=='E01B' or YN7=='H00I' or YN7=='H071')then
return true
elseif YP7==GU7 and(YN7=='Hvwd' or YN7=='O00P' or(YN7=='U01X')or YN7=='H001' or YN7=='HC49' or YN7=='HC92' or YN7=='N01O' or YN7=='Nbbc' or YN7=='Huth' or YN7=='Ogrh' or YN7=='E005' or YN7=='Usyl' or YN7=='H008' or YN7=='Naka' or YN7=='Hlgr' or YN7=='Edem' or YN7=='Nbrn' or YN7=='H00D' or YN7=='N01V' or YN7=='H00Q' or YN7=='E01Y' or YN7=='H00T' or YN7=='H06S' or YN7=='Eevi' or YN7=='EC57' or YN7=='UC11' or YN7=='U00A' or YN7=='U008' or YN7=='U006' or YN7=='H00V' or YN7=='Udre' or YN7=='UC42' or YN7=='U000' or YN7=='UC91' or YN7=='EC45' or YN7=='EC77' or YN7=='E002' or YN7=='U00C' or YN7=='O00J' or YN7=='Ubal' or YN7=='Nfir' or YN7=='U00K' or YN7=='Hvsh' or YN7=='E01B' or YN7=='H00I' or YN7=='H071' or YN7=='E02I' or YN7=='E02N' or YN7=='N0M0' or YN7=='E02K')then
return true
elseif YP7==GV7 and(YN7=='H001' or YN7=='Hamg' or YN7=='Ucrl'or(YN7=='U01X')or YN7=='H008' or YN7=='Npbm' or YN7=='H000' or YN7=='Hlgr' or YN7=='N01I' or YN7=='H06S' or YN7=='UC11' or YN7=='U00A' or YN7=='U008' or YN7=='NC00' or YN7=='U00C' or YN7=='Ofar' or YN7=='U00F' or YN7=='Opgh' or YN7=='Udea' or YN7=='H00R' or YN7=='O015' or YN7=='O01F' or YN7=='E02F' or YN7=='E032' or(YN7=='N0MU' or YN7=='N0MW'))then
return true
elseif YP7==GW7 and(YN7=='Emoo' or YN7=='Otch' or YN7=='N01A' or YN7=='Uktl' or YN7=='Hblm' or YN7=='Hmkg' or YN7=='Emns' or YN7=='Ucrl'or(YN7=='U01X')or YN7=='H00A' or YN7=='Orkn' or YN7=='Harf' or YN7=='E00P' or YN7=='N00B' or YN7=='N0EG' or YN7=='UC18' or YN7=='UC60' or YN7=='UC01' or YN7=='H00H' or YN7=='Oshd' or YN7=='U00E' or YN7=='E01A' or YN7=='U00P' or YN7=='E01C' or YN7=='N01W' or YN7=='N00R' or YN7=='H00N' or YN7=='H00U' or YN7=='N0HP' or YN7=='O016' or YN7=='E02J' or YN7=='E02H')then
return true
elseif YP7==GX7 and(YN7=='Hmbr' or YN7=='Emoo' or YN7=='Hjai' or YN7=='H004' or YN7=='Hmkg' or YN7=='Ntin' or YN7=='H00K' or YN7=='E00P' or YN7=='H00S' or YN7=='Ekee' or YN7=='Ulic' or YN7=='UC76' or YN7=='UC18' or YN7=='H00H' or YN7=='Oshd' or YN7=='E01A' or YN7=='U00P' or YN7=='H00U' or YN7=='E02X' or YN7=='Ucrl'or(YN7=='U01X')or YN7=='H0DO' or YN7=='N0MD')then
return true
elseif YP7==GY7 and(((YN7=='Hmbr')or(YN7=='H004')or(YN7=='Hmkg')or(YN7=='Ntin')or(YN7=='Orkn')or(YN7=='E00P')or(YN7=='Ulic')or(YN7=='UC18')or(YN7=='UC01')or(YN7=='H00H')or(YN7=='H00U')or(YN7=='N0HP')or(YN7=='H0DO')))then
return true
elseif YP7==GZ7 and((YN7=='Emoo')or(YN7=='Uktl')or(YN7=='Hblm')or(YN7=='Emns')or(YN7=='Ucrl')or(YN7=='U01X')or(YN7=='H00K')or(YN7=='H00A')or(YN7=='Orkn')or(YN7=='H000')or(YN7=='Nbrn')or(YN7=='E00P')or(YN7=='Ekee')or(YN7=='UC76')or(YN7=='EC57')or(YN7=='U008')or(YN7=='U006')or(YN7=='H00H')or(YN7=='E01C')or(YN7=='U00E')or(YN7=='N00R')or(YN7=='H004')or(YN7=='H00D')or(YN7=='Ogrh')or(YN7=='U00A'))then
return true
endif
return false
endfunction
function YQ7 takes integer YN7 returns integer
if(YN7=='H004' or YN7=='Hblm' or YN7=='Ucrl' or YN7=='U01X' or YN7=='H00K' or YN7=='E00P' or YN7=='Ekee' or YN7=='UC76' or YN7=='H00H' or YN7=='Opgh' or YN7=='N00R' or YN7=='H0DO')then
return 1
endif
if(YN7=='Hjai' or YN7=='Otch' or YN7=='Hmkg' or YN7=='Ntin' or YN7=='Emns' or YN7=='Orkn' or YN7=='Ulic' or YN7=='UC18' or YN7=='U00E' or YN7=='E01A' or YN7=='H00R' or YN7=='H00N' or YN7=='H00U' or YN7=='E02J' or YN7=='E02K')then
return 2
endif
if(YN7=='Hvwd' or YN7=='Emoo' or YN7=='HC92' or YN7=='N01A' or YN7=='Hamg' or YN7=='Huth' or YN7=='H00A' or YN7=='Naka' or YN7=='Hlgr' or YN7=='Edem' or YN7=='Nbrn' or YN7=='H00Q' or YN7=='E01Y' or YN7=='H00T' or YN7=='U00A' or YN7=='Ewar' or YN7=='Udre' or YN7=='UC42' or YN7=='Oshd' or YN7=='U00F' or YN7=='E01C')then
return 4
endif
return 3
endfunction
function YR7 takes integer YS7,boolean YT7 returns string
if YS7==0 then
return GetObjectName('YLA1')
elseif YS7==1 then
return GetObjectName('YLA2')
elseif YS7==2 then
return GetObjectName('YLA3')
elseif YS7==3 and YT7 then
return GetObjectName('YLA4')
elseif YS7==4 and YT7 then
return GetObjectName('YLA5')
endif
return""
endfunction
function YU7 takes boolean YV7 returns integer
local integer YW7=W97(YV7,0,24)
local integer YX7=0
local integer k=0
local integer j
local integer i=-1
loop
exitwhen YX7>3
if YX7==0 then
set j=3
else
set j=YX7-1
endif
if GM7[YW7+8+j]>0 then
if GM7[YW7+12+j]==0 then
set i=j
exitwhen true
elseif GM7[YW7+8+j]>k or(GM7[YW7+8+j]==k and GetRandomInt(1,5-YX7)==1)then
set i=j
set k=GM7[YW7+8+j]
endif
endif
set YX7=YX7+1
endloop
return i
endfunction
function YY7 takes unit it returns real
local integer i1=GetUnitTypeId(it)
if(i1=='Usyl')then
return 550.+I2R(75*GetUnitAbilityLevel(it,'A03U'))
elseif((i1=='H000')or(i1=='Harf')or(i1=='Npbm')or(i1=='Hamg')or(i1=='H008')or(i1=='O00J')or(i1=='U00C')or(i1=='U008')or(i1=='Udre')or(i1=='N00R')or(i1=='UC91')or(i1=='H00R')or(i1=='Edem')or(i1=='Nbbc')or(i1=='HC49')or(i1=='Ogrh')or(i1=='H00I')or(i1=='Huth')or(i1=='Hvsh')or(i1=='Ewar')or(i1=='Eevi')or(i1=='E01B')or(i1=='Hmkg'))then
return 100.
elseif((i1=='H00T')or(i1=='HC92'))then
return 125.
elseif((i1=='H06S')or(i1=='Otch')or(i1=='N01I')or(i1=='U00K')or(i1=='U00F')or(i1=='Naka')or(i1=='EC45')or(i1=='U000')or(i1=='O015')or(i1=='H071')or(i1=='E02I')or(i1=='N0M0')or(i1=='E02K')or(i1=='E032'))then
return 128.
elseif((i1=='UC42')or(i1=='Udea')or(i1=='Hlgr'))then
return 150.
elseif((i1=='H00D')or(i1=='H001')or(i1=='Ucrl')or(i1=='U01X')or(i1=='UC11')or(i1=='Ofar')or(i1=='Opgh')or(i1=='U00A')or(i1=='NC00')or(i1=='H00N'))then
return 200.
elseif(i1=='U006')then
return 250.
elseif((i1=='O00P')or(i1=='Hmbr'))then
return 350.
elseif((i1=='H00Q')or(i1=='E00P'))then
return 400.
elseif(i1=='Ubal')or(i1=='N0M7')then
return 425.
elseif((i1=='EC57')or(i1=='U00P'))then
return 450.
elseif(i1=='E002')then
return 475.
elseif(i1=='H00S')then
return 480.
elseif((i1=='Nfir')or(i1=='Ntin')or(i1=='Orkn')or(i1=='N01W'))then
return 500.
elseif(i1=='N01O')or(i1=='Emoo')or(i1=='UC01')or(i1=='N00B')then
return 550.
elseif(i1=='EC77')then
return 575.
elseif((i1=='N01V')or(i1=='Nbrn')or((i1=='H00V')or(i1=='H08D')or(i1=='H08C')or(i1=='H084')or(i1=='H08B'))or(i1=='E004')or(i1=='H00A')or(i1=='N01A')or(i1=='H004')or(i1=='Ekee')or(i1=='E01A')or(i1=='UC76')or(i1=='UC18')or(i1=='H00U')or(i1=='U00E')or(i1=='H00H')or(i1=='E01C')or(i1=='N0HP')or(i1=='E02X')or(i1=='H0DO'))then
return 600.
elseif(i1=='N0MK')then
return 625.
else
return .0
endif
endfunction
function YZ7 takes unit Y47,integer O5 returns nothing
if(IsUnitAlly(Y47,G8[0]))then
if GM7[64+O5]==0 then
set h8[64+O5]=h7[2]
elseif GM7[64+O5]==1 then
set h8[64+O5]=h7[4]
elseif GM7[64+O5]==2 then
set h8[64+O5]=h7[3]
elseif GM7[64+O5]==3 then
set h8[64+O5]=h7[1]
endif
else
if GM7[64+O5]==0 then
set h8[64+O5]=h7['f']
elseif GM7[64+O5]==1 then
set h8[64+O5]=h7['g']
elseif GM7[64+O5]==2 then
set h8[64+O5]=h7['h']
elseif GM7[64+O5]==3 then
set h8[64+O5]=h7['e']
endif
endif
endfunction
function YA7 takes group g returns boolean
return FirstOfGroup(g)==null
endfunction
function YB7 takes integer YC7,unit Y37,integer Y67,integer YL7 returns boolean
set VO4[YC7]=true
call SetPlayerAbilityAvailable(GetOwningPlayer(Y37),Y67,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Y37),YL7,true)
return true
endfunction
function Y17 takes integer YC7 returns boolean
set GZ[YC7]=true
return true
endfunction
function Y07 takes real VN7 returns nothing
local real VO7
local real st=TimerGetElapsed(E4)
if st<=0 then
set E4=CreateTimer()
call TimerStart(E4,9000,false,null)
endif
if(VN7>0)then
loop
set VO7=VN7-TimerGetElapsed(E4)+st
exitwhen VO7<=0
if(VO7>bj_POLLED_WAIT_SKIP_THRESHOLD)then
call TriggerSleepAction(.1*VO7)
else
call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)
endif
endloop
endif
endfunction
function Y57 takes unit a,widget b,real Y27 returns boolean
local real Y_7=(GetUnitFacing(a)-bj_RADTODEG*Atan2(GetWidgetY(b)-GetUnitY(a),GetWidgetX(b)-GetUnitX(a)))
call XK7(R2S(GetUnitFacing(a))+" "+R2S(bj_RADTODEG*Atan2(GetWidgetY(b)-GetUnitY(a),GetWidgetX(b)-GetUnitX(a))))
if Y_7>180 then
set Y_7=360-Y_7
endif
if Y_7<0 then
set Y_7=-Y_7
endif
call XK7(R2S(Y_7))
return Y_7<=Y27
endfunction
function Z47 takes widget Z77,widget m5 returns real
local real t5
local real w5
local real Y5
local real Z5
if Z77!=null and m5!=null then
set t5=GetWidgetX(Z77)
set w5=GetWidgetY(Z77)
set Y5=GetWidgetX(m5)
set Z5=GetWidgetY(m5)
return SquareRoot((t5-Y5)*(t5-Y5)+(w5-Z5)*(w5-Z5))
endif
return 999999.
endfunction
function Z87 takes real x1,real y1,real x2,real y2 returns real
return SquareRoot(((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)))
endfunction
function Z97 takes integer O5 returns integer
local integer kc=3
if((hj[256+O5]==18)or(hj[O5]==10)or(hj[256+O5]=='v')or(hj[O5]=='n'))then
set kc=0
elseif((hj[256+O5]==40)or(hj[O5]==30)or(hj[256+O5]==140)or(hj[O5]==130))then
set kc=1
elseif((hj[256+O5]==60)or(hj[O5]==50)or(hj[256+O5]==160)or(hj[O5]==150))then
set kc=2
endif
return kc
endfunction
function ZD7 takes unit it returns integer
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer UP=GetUnitUserData(h8[O5])
if((UP==0)or(UP=='d')or(UP==1)or(UP=='e'))then
set UP=GetUnitUserData(h9[O5])
endif
return Z97(UP)
endfunction
function ZE7 takes integer O5 returns integer
set eY[80+O5]=5
if HA4[O5]then
elseif(Z47(Y7[O5],h7[0])<4000.)then
set eY[80+O5]=3
elseif(Z47(Y7[O5],h7['d'])<4000.)then
set eY[80+O5]=4
elseif IsUnitInRange(Y7[O5],h8[O5],2000.)then
set eY[80+O5]=Z97(GetUnitUserData(h8[O5]))
if eY[80+O5]==3 then
set eY[80+O5]=5
endif
elseif IsUnitInRange(Y7[O5],h8[80+O5],2000.)then
set eY[80+O5]=Z97(GetUnitUserData(h8[80+O5]))
if eY[80+O5]==3 then
set eY[80+O5]=5
endif
else
set eY[80+O5]=5
set GZ[400+O5]=true
endif
return eY[80+O5]
endfunction
function ZF7 takes integer ZG7 returns integer
local integer ZH7=0
loop
exitwhen ZH7>KL4
if MF4[ZH7]==ZG7 then
return KA4[ZH7]
endif
set ZH7=ZH7+1
endloop
return-1
endfunction
function ZI7 takes unit ZJ7 returns integer
local integer ZK7=GetHeroLevel(ZJ7)
if ZK7==1 then
return'd'
elseif ZK7==2 then
return'x'
elseif ZK7==3 then
return 160
elseif ZK7==4 then
return 220
else
return-200+'d'*ZK7
endif
return 0
endfunction
function ZM7 takes nothing returns real
return TimerGetElapsed(E4)
endfunction
function ZN7 takes unit ZO7 returns nothing
call PauseUnit(ZO7,true)
call IssueImmediateOrderById(ZO7,851972)
call PauseUnit(ZO7,false)
endfunction
function ZP7 takes location f4,real F4,real l4 returns location
return Location(GetLocationX(f4)+F4*Cos(l4*bj_DEGTORAD),GetLocationY(f4)+F4*Sin(l4*bj_DEGTORAD))
endfunction
function L4 takes nothing returns boolean
local real dx=GetDestructableX(GetFilterDestructable())-Wz
local real dy=GetDestructableY(GetFilterDestructable())-Yz
return(dx*dx+dy*dy<=bj_enumDestructableRadius)
endfunction
function M4 takes player p4 returns force
set V2=CreateForce()
call ForceEnumEnemies(V2,p4,bH)
return V2
endfunction
function IsChicken takes unit Y47 returns boolean
local integer id=GetUnitTypeId(Y47)
return id==WC4 or id==W34 or id==W64 or id==WL4 or id==W14 or id==W04 or id==W24 or id==W_4 or id==X44 or id==X74 or id==X84 or id==X94 or id==XG4 or id==XH4 or id==XJ4
endfunction
function IsBird takes unit Y47 returns boolean
local integer id=GetUnitTypeId(Y47)
return id==WB4 or id==W54 or id==XI4 or id==XD4 or id==XE4 or id==XF4
endfunction
function IsCourier takes unit Y47 returns boolean
return IsChicken(Y47)or IsBird(Y47)
endfunction
function ZT7 takes item Z4 returns nothing
call DisableTrigger(GW4)
call SetWidgetLife(Z4,1)
call RemoveItem(Z4)
call EnableTrigger(GW4)
endfunction
function ZU7 takes item ZV7 returns integer
local integer ZW7
local integer i=1
if ZV7==null then
return-2
endif
set ZW7=GetItemTypeId(ZV7)
loop
exitwhen i>JV
if AU[i]==ZW7 or BU[i]==ZW7 or LU[i]==ZW7 then
return i
endif
set i=i+1
endloop
return-1
endfunction
function ZX7 takes item ZV7 returns integer
local integer ZW7
local integer i=1
if ZV7==null then
return-2
endif
set ZW7=GetItemTypeId(ZV7)
loop
exitwhen i>JV
if AU[i]==ZW7 or BU[i]==ZW7 then
return i
endif
set i=i+1
endloop
return-1
endfunction
function ZY7 takes item ZV7 returns integer
local integer ZW7
local integer i=1
if ZV7==null then
return-2
endif
set ZW7=GetItemTypeId(ZV7)
loop
exitwhen i>JV
if LU[i]==ZW7 then
return i
endif
set i=i+1
endloop
return-1
endfunction
function V5 takes nothing returns nothing
set G04[1]='A02A'
set G54[1]='A17O'
set G24[1]='ACac'
set G_4[1]='A0IN'
set G04[2]='A020'
set G54[2]='A0JC'
set G24[2]='A0N5'
set G_4[2]='A29G'
set G04[3]='A0DW'
set G54[3]='A0DX'
set G24[3]='A01B'
set G_4[3]='A0DY'
set G04[4]='A0FN'
set G54[4]='A0G6'
set G24[4]='A0KX'
set G_4[4]='A0G8'
set G04[5]='A1E9'
set G54[5]='A04C'
set G24[5]='AHab'
set G_4[5]='A03R'
set G04[6]='A190'
set G54[6]='A01K'
set G24[6]='A2IS'
set G_4[6]='A1WH'
set G04[7]='A063'
set G54[7]='A24D'
set G24[7]='A2KU'
set G_4[7]='A07U'
set G04[8]='A0SK'
set G54[8]='A0DL'
set G24[8]='A0DJ'
set G_4[8]='A0DH'
set G04[9]='A0RG'
set G54[9]='A0K9'
set G24[9]='A0DZ'
set G_4[9]='A00J'
set G04[10]='A0A5'
set G54[10]='A1EF'
set G24[10]='A0A8'
set G_4[10]='A0AG'
set G04[11]='A01F'
set G54[11]='A027'
set G24[11]='A18X'
set G_4[11]='A01P'
set G04[12]='A05G'
set G54[12]='A047'
set G24[12]='A00K'
set G_4[12]='A0M1'
set G04[13]='A14L'
set G54[13]='A0LZ'
set G24[13]='A2NT'
set G_4[13]='A0L3'
set G04[14]='A01Z'
set G54[14]='A1G7'
set G24[14]='A01U'
set G_4[14]='A07Z'
set G04[15]='A1AA'
set G54[15]='A1A8'
set G24[15]='A1CD'
set G_4[15]='A1A1'
set G04[16]='A085'
set G54[16]='A10X'
set G24[16]='A112'
set G_4[16]='A11T'
set G04[17]='A03Y'
set G54[17]='A1P9'
set G24[17]='ANic'
set G_4[17]='A0LC'
set G04[18]='A08D'
set G54[18]='A00F'
set G24[18]='A08I'
set G_4[18]='A088'
set G04[19]='A049'
set G54[19]='A05E'
set G24[19]='A0BQ'
set G_4[19]='A065'
set G04[20]='A21E'
set G54[20]='A01O'
set G24[20]='AEfn'
set G_4[20]='A1W8'
set G04[21]='A10D'
set G54[21]='A0D7'
set G24[21]='A0DB'
set G_4[21]='A0YK'
set G04[22]='A0LL'
set G54[22]='A0BZ'
set G24[22]='A19Q'
set G_4[22]='A0CY'
set G04[23]='A05J'
set G54[23]='A06H'
set G24[23]='A06B'
set G_4[23]='A0AK'
set G04[24]='A0KM'
set G54[24]='A0LV'
set G24[24]='A28T'
set G_4[24]='A0LT'
set G04[25]='A042'
set G54[25]='A041'
set G24[25]='A062'
set G_4[25]='A054'
set G04[26]='A064'
set G54[26]='A03S'
set G24[26]='A03U'
set G_4[26]='A04P'
set G04[27]='A0BE'
set G54[27]='A0BC'
set G24[27]='A0O0'
set G_4[27]='A1EJ'
set G04[28]='A010'
set G54[28]='A0RX'
set G24[28]='A00P'
set G_4[28]='A00H'
set G04[29]='A0FW'
set G54[29]='A0GP'
set G24[29]='A0M3'
set G_4[29]='A0FV'
set G04[30]='A06M'
set G54[30]='Acdh'
set G24[30]='A0MX'
set G_4[30]='A0MQ'
set G04[31]='A00S'
set G54[31]='A2ON'
set G24[31]='A00V'
set G_4[31]='A2O6'
set G04[32]='A004'
set G54[32]='A1IQ'
set G24[32]='A07A'
set G_4[32]='A0B4'
set G04[33]='A03F'
set G54[33]='A0AR'
set G24[33]='A0CL'
set G_4[33]='A03G'
set G04[34]='A022'
set G54[34]='AEbl'
set G24[34]='A0KY'
set G_4[34]='A0E3'
set G04[35]='A026'
set G54[35]='A0QB'
set G24[35]='A029'
set G_4[35]='A0VC'
set G04[36]='A08N'
set G54[36]='A08V'
set G24[36]='A06A'
set G_4[36]='A0ER'
set G04[37]='A0O1'
set G54[37]='A0OO'
set G24[37]='A0BD'
set G_4[37]='A0O2'
set G04[38]='A0O7'
set G54[38]='A0O6'
set G24[38]='A0O8'
set G_4[38]='A0O5'
set G04[39]='A0IL'
set G54[39]='A1NI'
set G24[39]='A0O3'
set G_4[39]='ANcr'
set G04[40]='A0KV'
set G54[40]='A0L8'
set G24[40]='A0LN'
set G_4[40]='A0KU'
set G04[41]='A14P'
set G54[41]='A14R'
set G24[41]='A0QW'
set G_4[41]='A14O'
set G04[42]='A0QP'
set G54[42]='A0QN'
set G24[42]='A0QQ'
set G_4[42]='A0QR'
set G04[43]='A1EA'
set G54[43]='A0RV'
set G24[43]='A0RO'
set G_4[43]='A0RP'
set G04[44]='A0S9'
set G54[44]='A0SC'
set G24[44]='A0SB'
set G_4[44]='A0S8'
set G04[45]='A0Z4'
set G54[45]='A0Z5'
set G24[45]='A0Z6'
set G_4[45]='A0Z8'
set G04[46]='A136'
set G54[46]='A13T'
set G24[46]='A11N'
set G_4[46]='A11K'
set G04[47]='A12J'
set G54[47]='A12K'
set G24[47]='A14I'
set G_4[47]='A12P'
set G04[48]='A1SO'
set G54[48]='A1SQ'
set G24[48]='A1TW'
set G_4[48]='A1T5'
set G04[49]='A1TV'
set G54[49]='A1SW'
set G24[49]='A1SU'
set G_4[49]='A1U6'
set G04[50]='A1TA'
set G54[50]='A1T8'
set G24[50]='A28Q'
set G_4[50]='A1TB'
set G04[51]='A07F'
set G54[51]='A08R'
set G24[51]='A053'
set G_4[51]='A05T'
set G04[52]='A078'
set G54[52]='A07M'
set G24[52]='A02C'
set G_4[52]='A04N'
set G04[53]='A0X5'
set G54[53]='A0MN'
set G24[53]='A02N'
set G_4[53]='A095'
set G04[54]='A173'
set G54[54]='A0MY'
set G24[54]='A0MS'
set G_4[54]='A013'
set G04[55]='A02S'
set G54[55]='A037'
set G24[55]='A1RD'
set G_4[55]='A29L'
set G04[56]='A08X'
set G54[56]='A1NA'
set G24[56]='A0VX'
set G_4[56]='A07K'
set G04[57]='A055'
set G54[57]='A0RW'
set G24[57]='A03N'
set G_4[57]='A03O'
set G04[58]='A2QM'
set G54[58]='A2TJ'
set G24[58]='A2QI'
set G_4[58]='A2TI'
set G04[59]='A2QT'
set G54[59]='A2T5'
set G24[59]='A2SG'
set G_4[59]='A2TF'
set G04[60]='A0YM'
set G54[60]='A0PL'
set G24[60]='A03P'
set G_4[60]='A03Q'
set G04[61]='A1C0'
set G54[61]='A0G2'
set G24[61]='A0MP'
set G_4[61]='A1AT'
set G04[62]='A02H'
set G54[62]='A08E'
set G24[62]='A086'
set G_4[62]='A03K'
set G04[63]='AHtb'
set G54[63]='AUav'
set G24[63]='AOcr'
set G_4[63]='A01Y'
set G04[64]='A10R'
set G54[64]='A1OP'
set G24[64]='A094'
set G_4[64]='A0MU'
set G04[65]='A0X7'
set G54[65]='A1H5'
set G24[65]='A2KO'
set G_4[65]='A09U'
set G04[66]='A05C'
set G54[66]='A29K'
set G24[66]='A0JJ'
set G_4[66]='A034'
set G04[67]='A0Q7'
set G54[67]='A0ME'
set G24[67]='A04A'
set G_4[67]='A28R'
set G04[68]='A030'
set G54[68]='AHfa'
set G24[68]='A025'
set G_4[68]='A04Q'
set G04[69]='A0LK'
set G54[69]='A0CZ'
set G24[69]='A081'
set G_4[69]='A0J1'
set G04[70]='A09V'
set G54[70]='A1A3'
set G24[70]='A0MM'
set G_4[70]='A080'
set G04[71]='A1E7'
set G54[71]='A1DP'
set G24[71]='A1E6'
set G_4[71]='A1AO'
set G04[72]='A0T2'
set G54[72]='A0SS'
set G24[72]='A194'
set G_4[72]='A0SW'
set G04[73]='A0MT'
set G54[73]='A0CE'
set G24[73]='A09D'
set G_4[73]='A0CC'
set G04[74]='A046'
set G54[74]='A04E'
set G24[74]='A044'
set G_4[74]='A29I'
set G04[75]='A2OI'
set G54[75]='A0GK'
set G24[75]='A04Y'
set G_4[75]='A02Q'
set G04[76]='A05V'
set G54[76]='A01N'
set G24[76]='A060'
set G_4[76]='A067'
set G04[77]='A06I'
set G54[77]='A06K'
set G24[77]='A06D'
set G_4[77]='A0FL'
set G04[78]='A1P8'
set G54[78]='A0ES'
set G24[78]='A0G5'
set G_4[78]='A0G4'
set G04[79]='A1QW'
set G54[79]='A0CA'
set G24[79]='A0CG'
set G_4[79]='A0CT'
set G04[80]='A0EY'
set G54[80]='A0BR'
set G24[80]='A0FU'
set G_4[80]='A29J'
set G04[81]='A06O'
set G54[81]='A0H0'
set G24[81]='A0FA'
set G_4[81]='A06R'
set G04[82]='A0I6'
set G54[82]='A0S1'
set G24[82]='A0C6'
set G_4[82]='A0E2'
set G04[83]='A0EC'
set G54[83]='A0LE'
set G24[83]='A0I8'
set G_4[83]='A0LH'
set G04[84]='A0I3'
set G54[84]='A0MF'
set G24[84]='A0MG'
set G_4[84]='A0NS'
set G04[85]='A0HW'
set G54[85]='A0FX'
set G24[85]='A0NA'
set G_4[85]='A0H9'
set G04[86]='A0NM'
set G54[86]='A0NE'
set G24[86]='A0NO'
set G_4[86]='A0NT'
set G04[87]='A0OI'
set G54[87]='A0OJ'
set G24[87]='A0IF'
set G_4[87]='A0OK'
set G04[88]='A0J5'
set G54[88]='A0AS'
set G24[88]='A06P'
set G_4[88]='S008'
set G04[89]='A0NB'
set G54[89]='A0N8'
set G24[89]='A0N7'
set G_4[89]='A0MW'
set G04[90]='A0NQ'
set G54[90]='A10L'
set G24[90]='A0OR'
set G_4[90]='A10Q'
set G04[91]='A01I'
set G54[91]='A0RA'
set G24[91]='A288'
set G_4[91]='A0R0'
set G04[92]='A15S'
set G54[92]='A0R5'
set G24[92]='A15V'
set G_4[92]='A15J'
set G04[93]='A0QE'
set G54[93]='A0QG'
set G24[93]='A0R7'
set G_4[93]='A0QK'
set G04[94]='A21W'
set G54[94]='A21X'
set G24[94]='A21V'
set G_4[94]='A21Y'
set G04[95]='A0I7'
set G54[95]='A180'
set G24[95]='A0B1'
set G_4[95]='A1BX'
set G04[96]='A1EL'
set G54[96]='A19V'
set G24[96]='A19Z'
set G_4[96]='A19O'
set G04[97]='A1MG'
set G54[97]='A1HS'
set G24[97]='A1HQ'
set G_4[97]='A1MI'
set G04[98]='A1IM'
set G54[98]='A1J7'
set G24[98]='A1HR'
set G_4[98]='A1IN'
set G04[99]='A04L'
set G54[99]='A0H4'
set G24[99]='A0MV'
set G_4[99]='A07Q'
set G04['d']='A06W'
set G54['d']='A035'
set G24['d']='A06V'
set G_4['d']='A21F'
set G04['e']='A1S8'
set G54['e']='A1SB'
set G24['e']='A1S4'
set G_4['e']='A1SA'
set G04['n']='A2M1'
set G54['n']='A2LM'
set G24['n']='A2LL'
set G_4['n']='A2M0'
set G04['o']='A03D'
set G54['o']='A0ZF'
set G24['o']='A03E'
set G_4['o']='A093'
set G04['p']='A0BH'
set G54['p']='A0BG'
set G24['p']='A0BK'
set G_4['p']='A0WQ'
set H44[1]='A1AW'
set H44[2]='A29H'
set H44[5]='A0AV'
set H44[8]='A1OB'
set H44[11]='A09Z'
set H44[12]='A1AX'
set H44[20]='A1W9'
set H44[22]='A1VH'
set H44[23]='A1FY'
set H44[24]='A1CS'
set H44[25]='A00U'
set H44[28]='A0A1'
set H44[30]='A1B6'
set H44[38]='A1B1'
set H44[42]='A1B3'
set H44[44]='A1QP'
set H44[45]='A1CV'
set H44[47]='A1D6'
set H44[50]='A21G'
set H44[51]='A08H'
set H44[53]='A09W'
set H44[54]='A0A6'
set H44[62]='A1B0'
set H44[64]='A0A2'
set H44[67]='A28S'
set H44[69]='A1D7'
set H44[70]='A1UZ'
set H44[71]='A1UV'
set H44[73]='A02Z'
set H44[75]='A1D9'
set H44[76]='A08P'
set H44[77]='A1CX'
set H44[78]='A1D8'
set H44[81]='A1B4'
set H44[82]='A1MR'
set H44[84]='A1DA'
set H44[86]='A0NX'
set H44[87]='A1VW'
set H44[88]='S00U'
set H44[90]='A1DB'
set H44[94]='A1GU'
set HF4[1]="thunderbolt"
set HG4[1]="volcano"
set HH4[1]="passive"
set HI4[1]="forkedlightning"
set HF4[2]="chainlightning"
set HG4[2]="thunderbolt"
set HH4[2]="passive"
set HI4[2]="thunderclap"
set HF4[3]="passive"
set HG4[3]="slow"
set HH4[3]="locustswarm"
set HI4[3]="poisonarrows"
set HF4[4]="carrionswarm"
set HG4[4]="acidbomb"
set HH4[4]="replenishmana"
set HI4[4]="itemillusion"
set HF4[5]="blizzard"
set HG4[5]="entanglingroots"
set HH4[5]="passive"
set HI4[5]="channel"
set HF4[6]="acidbomb"
set HG4[6]="passive"
set HH4[6]="volcano"
set HI4[6]="chemicalrage"
set HF4[7]="mirrorimage"
set HG4[7]="ensnare"
set HH4[7]="passive"
set HI4[7]="channel"
set HF4[8]="channel"
set HG4[8]="roar"
set HH4[8]="passive"
set HI4[8]="fanofknives"
set HF4[9]="blizzard"
set HG4[9]="channel"
set HH4[9]="passive"
set HI4[9]="passive"
set HF4[10]="summongrizzly"
set HG4[10]="fanofknives"
set HH4[10]="passive"
set HI4[10]="bearform"
set HF4[11]="shockwave"
set HG4[11]="inferno"
set HH4[11]="passive"
set HI4[11]="chainlightning"
set HF4[12]="whirlwind"
set HG4[12]="healingward"
set HH4[12]="passive"
set HI4[12]="thunderbolt"
set HF4[13]="blizzard"
set HG4[13]="poisonarrows"
set HH4[13]="passive"
set HI4[13]="channel"
set HF4[14]="invisibility"
set HG4[14]="thunderbolt"
set HH4[14]="innerfire"
set HI4[14]="channel"
set HF4[15]="charm"
set HG4[15]="volcano"
set HH4[15]="passive"
set HI4[15]="channel"
set HF4[16]="channel"
set HG4[16]="acidbomb"
set HH4[16]="acolyteharvest"
set HI4[16]="metamorphosis"
set HF4[17]="thunderclap"
set HG4[17]="channel"
set HH4[17]="passive"
set HI4[17]="berserk"
set HF4[18]="thunderbolt"
set HG4[18]="acidbomb"
set HH4[18]="bloodlust"
set HI4[18]="passive"
set HF4[19]="drunkenhaze"
set HG4[19]="fanofknives"
set HH4[19]="curse"
set HI4[19]="channel"
set HF4[20]="thunderbolt"
set HG4[20]="blink"
set HH4[20]="forceofnature"
set HI4[20]="chainlightning"
set HF4[21]="acidbomb"
set HG4[21]="windwalk"
set HH4[21]="passive"
set HI4[21]="passive"
set HF4[22]="blizzard"
set HG4[22]="channel"
set HH4[22]="passive"
set HI4[22]="passive"
set HF4[23]="landmine"
set HG4[23]="stasistrap"
set HH4[23]="selfdestruct"
set HI4[23]="summonward"
set HF4[24]="drunkenhaze"
set HG4[24]="thunderbolt"
set HH4[24]="charm"
set HI4[24]="channel"
set HF4[25]="firebolt"
set HG4[25]="moonglaive"
set HH4[25]="passive"
set HI4[25]="channel"
set HF4[26]="blizzard"
set HG4[26]="passive"
set HH4[26]="moonglaive"
set HI4[26]="thunderbolt"
set HF4[27]="bearform"
set HG4[27]="curse"
set HH4[27]="passive"
set HI4[27]="fanofknives"
set HF4[28]="forkedlightning"
set HG4[28]="hex"
set HH4[28]="magicleash"
set HI4[28]="summonward"
set HF4[29]="channel"
set HG4[29]="fanofknives"
set HH4[29]="passive"
set HI4[29]="passive"
set HF4[30]="thunderclap"
set HG4[30]="drunkenhaze"
set HH4[30]="passive"
set HI4[30]="elementalfury"
set HF4[31]="stomp"
set HG4[31]="firebolt"
set HH4[31]="passive"
set HI4[31]="passive"
set HF4[32]="thunderbolt"
set HG4[32]="passive"
set HH4[32]="windwalk"
set HI4[32]="faeriefire"
set HF4[33]="breathoffire"
set HG4[33]="thunderbolt"
set HH4[33]="passive"
set HI4[33]="metamorphosis"
set HF4[34]="passive"
set HG4[34]="blink"
set HH4[34]="passive"
set HI4[34]="thunderbolt"
set HF4[35]="coldarrows"
set HG4[35]="silence"
set HH4[35]="passive"
set HI4[35]="passive"
set HF4[36]="frostarmor"
set HG4[36]="antimagicshell"
set HH4[36]="passive"
set HI4[36]="battleroar"
set HF4[37]="carrionswarm"
set HG4[37]="summonquillbeast"
set HH4[37]="passive"
set HI4[37]="thunderbolt"
set HF4[38]="carrionswarm"
set HG4[38]="breathoffire"
set HH4[38]="passive"
set HI4[38]="shockwave"
set HF4[39]="blizzard"
set HG4[39]="fanofknives"
set HH4[39]="passive"
set HI4[39]="chemicalrage"
set HF4[40]="channel"
set HG4[40]="acidbomb"
set HH4[40]="windwalk"
set HI4[40]="corporealform"
set HF4[41]="fanofknives"
set HG4[41]="chainlightning"
set HH4[41]="passive"
set HI4[41]="carrionswarm"
set HF4[42]="thunderbolt"
set HG4[42]="poisonarrows"
set HH4[42]="passive"
set HI4[42]="firebolt"
set HF4[43]="fanofknives"
set HG4[43]="windwalk"
set HH4[43]="passive"
set HI4[43]="curse"
set HF4[44]="acidbomb"
set HG4[44]="channel"
set HH4[44]="phaseshift"
set HI4[44]="blizzard"
set HF4[45]="channel"
set HG4[45]="charm"
set HH4[45]="blizzard"
set HI4[45]="clusterrockets"
set HF4[46]="blizzard"
set HG4[46]="passive"
set HH4[46]="charm"
set HI4[46]="acidbomb"
set HF4[47]="chainlightning"
set HG4[47]="acidbomb"
set HH4[47]="fanofknives"
set HI4[47]="charm"
set HF4[48]=""
set HG4[48]=""
set HH4[48]=""
set HI4[48]=""
set HF4[49]=""
set HG4[49]=""
set HH4[49]=""
set HI4[49]=""
set HF4[50]=""
set HG4[50]=""
set HH4[50]=""
set HI4[50]=""
set HF4[51]="frostnova"
set HG4[51]="frostarmor"
set HH4[51]="innerfire"
set HI4[51]="sleep"
set HF4[52]="carrionswarm"
set HG4[52]="silence"
set HH4[52]="passive"
set HI4[52]="locustswarm"
set HF4[53]="impale"
set HG4[53]="hex"
set HH4[53]="drain"
set HI4[53]="chainlightning"
set HF4[54]="volcano"
set HG4[54]="passive"
set HH4[54]="summonward"
set HI4[54]="summongrizzly"
set HF4[55]="shockwave"
set HG4[55]="innerfire"
set HH4[55]="carrionswarm"
set HI4[55]="stomp"
set HF4[56]="cripple"
set HG4[56]="creepheal"
set HH4[56]="passive"
set HI4[56]="fanofknives"
set HF4[57]="firebolt"
set HG4[57]="channel"
set HH4[57]="passive"
set HI4[57]="mirrorimage"
set HF4[58]="spiritwolf"
set HG4[58]="channel"
set HH4[58]="passive"
set HI4[58]="metamorphosis"
set HF4[59]="parasite"
set HG4[59]="inferno"
set HH4[59]="passive"
set HI4[59]="roar"
set HF4[60]="acidbomb"
set HG4[60]="channel"
set HH4[60]="passive"
set HI4[60]="passive"
set HF4[61]="bearform"
set HG4[61]="chainlightning"
set HH4[61]="manashield"
set HI4[61]="charm"
set HF4[62]="thunderbolt"
set HG4[62]="drunkenhaze"
set HH4[62]="passive"
set HI4[62]="itemchangetime"
set HF4[63]="thunderbolt"
set HG4[63]="passive"
set HH4[63]="passive"
set HI4[63]="reincarnation"
set HF4[64]="channel"
set HG4[64]="fanofknives"
set HH4[64]="firebolt"
set HI4[64]="doom"
set HF4[65]="impale"
set HG4[65]="creepheal"
set HH4[65]="carrionscarabsoff"
set HI4[65]="windwalk"
set HF4[66]="berserk"
set HG4[66]="stomp"
set HH4[66]="passive"
set HI4[66]="faeriefire"
set HF4[67]="shadowstrike"
set HG4[67]="blink"
set HH4[67]="fanofknives"
set HI4[67]="carrionswarm"
set HF4[68]="berserk"
set HG4[68]="flamingarrows"
set HH4[68]="windwalk"
set HI4[68]="innerfire"
set HF4[69]="carrionswarm"
set HG4[69]="passive"
set HH4[69]="passive"
set HI4[69]="clusterrockets"
set HF4[70]="poisonarrows"
set HG4[70]="passive"
set HH4[70]="passive"
set HI4[70]="shadowstrike"
set HF4[71]="fanofknives"
set HG4[71]="acidbomb"
set HH4[71]="passive"
set HI4[71]="darkportal"
set HF4[72]="itemareaheal"
set HG4[72]="passive"
set HH4[72]="chainlightning"
set HI4[72]="channel"
set HF4[73]="blizzard"
set HG4[73]="banish"
set HH4[73]="summongrizzly"
set HI4[73]="drain"
set HF4[74]="acidbomb"
set HG4[74]="passive"
set HH4[74]="passive"
set HI4[74]="stomp"
set HF4[75]="innerfire"
set HG4[75]="chainlightning"
set HH4[75]="sleep"
set HI4[75]="magicleash"
set HF4[76]="fanofknives"
set HG4[76]="passive"
set HH4[76]="passive"
set HI4[76]="thunderbolt"
set HF4[77]="channel"
set HG4[77]="immolation"
set HH4[77]="passive"
set HI4[77]="magicleash"
set HF4[78]="channel"
set HG4[78]="passive"
set HH4[78]="passive"
set HI4[78]="channel"
set HF4[79]="acidbomb"
set HG4[79]="windwalk"
set HH4[79]="passive"
set HI4[79]="channel"
set HF4[80]="roar"
set HG4[80]="passive"
set HH4[80]="passive"
set HI4[80]="stomp"
set HF4[81]="channel"
set HG4[81]="voodoo"
set HH4[81]="incinerate"
set HI4[81]="charm"
set HF4[82]="channel"
set HG4[82]="creepheal"
set HH4[82]="passive"
set HI4[82]="chainlightning"
set HF4[83]="soulburn"
set HG4[83]="passive"
set HH4[83]="passive"
set HI4[83]="firebolt"
set HF4[84]="acidbomb"
set HG4[84]="chainlightning"
set HH4[84]="passive"
set HI4[84]="windwalk"
set HF4[85]="acidbomb"
set HG4[85]="passive"
set HH4[85]="passive"
set HI4[85]="ancestralspirit"
set HF4[86]="chainlightning"
set HG4[86]="immolation"
set HH4[86]="blizzard"
set HI4[86]="tornado"
set HF4[87]="poisonarrows"
set HG4[87]="chainlightning"
set HH4[87]="passive"
set HI4[87]="blizzard"
set HF4[88]="thunderbolt"
set HG4[88]="creepheal"
set HH4[88]="blizzard"
set HI4[88]="inferno"
set HF4[89]="blizzard"
set HG4[89]="carrionscarabsoff"
set HH4[89]="passive"
set HI4[89]="passive"
set HF4[90]="thunderbolt"
set HG4[90]="devourmagic"
set HH4[90]="darkportal"
set HI4[90]="blizzard"
set HF4[91]="rainoffire"
set HG4[91]="flamestrike"
set HH4[91]="fanofknives"
set HI4[91]="channel"
set HF4[92]="blizzard"
set HG4[92]="volcano"
set HH4[92]="acidbomb"
set HI4[92]="metamorphosis"
set HF4[93]="blizzard"
set HG4[93]="thunderbolt"
set HH4[93]="bloodlust"
set HI4[93]="curse"
set HF4[94]="roar"
set HG4[94]="fanofknives"
set HH4[94]="battleroar"
set HI4[94]="howlofterror"
set HF4[95]="acidbomb"
set HG4[95]="thunderbolt"
set HH4[95]="channel"
set HI4[95]="cannibalize"
set HF4[96]="blizzard"
set HG4[96]="thunderbolt"
set HH4[96]="metamorphosis"
set HI4[96]="chainlightning"
set HF4[97]="channel"
set HG4[97]="blizzard"
set HH4[97]="berserk"
set HI4[97]="acidbomb"
set HF4[98]="fanofknives"
set HG4[98]="channel"
set HH4[98]="passive"
set HI4[98]="windwalk"
set HF4[99]="drain"
set HG4[99]="channel"
set HH4[99]="metamorphosis"
set HI4[99]="cripple"
set HF4['d']="inferno"
set HG4['d']="summongrizzly"
set HH4['d']="chainlightning"
set HI4['d']="immolation"
set HF4['e']=""
set HG4['e']=""
set HH4['e']=""
set HI4['e']=""
set G04[500]='A500'
set G54[500]='A501'
set G24[500]='A502'
set G_4[500]='A503'
set HF4[500]="humanbuild"
set HG4[500]="nightelfbuild"
set HH4[500]="orcbuild"
set HI4[500]="undeadbuild"
set H74[1]='A600'
set H84[1]='A601'
set H94[1]='A602'
set HD4[1]='A603'
set H74[2]='A604'
set H84[2]='A605'
set H94[2]='A606'
set HD4[2]='A607'
set H74[3]='A608'
set H84[3]='A609'
set H94[3]='A60A'
set HD4[3]='A60B'
set H74[4]='A60C'
set H84[4]='A60D'
set HD4[4]='A60F'
set H74[5]='A60G'
set H84[5]='A60H'
set H94[5]='A60I'
set HD4[5]='A60J'
set H74[6]='A60K'
set H94[6]='A60M'
set HD4[6]='A60N'
set H74[7]='A60O'
set H84[7]='A60P'
set H94[7]='A60Q'
set HD4[7]='A60R'
set H74[8]='A60S'
set H84[8]='A60T'
set H94[8]='A60U'
set HD4[8]='A60V'
set H74[9]='A60W'
set H84[9]='A60X'
set H94[9]='A60Y'
set HD4[9]='A60Z'
set H74[10]='A610'
set H84[10]='A611'
set H74[11]='A614'
set H84[11]='A615'
set H94[11]='A616'
set HD4[11]='A617'
set H74[12]='A618'
set H84[12]='A619'
set H94[12]='A61A'
set HD4[12]='A61B'
set H74[13]='A61C'
set H84[13]='A61D'
set H94[13]='A61E'
set HD4[13]='A61F'
set H74[14]='A61G'
set H84[14]='A61H'
set H94[14]='A61I'
set HD4[14]='A61J'
set H74[15]='A61K'
set H94[15]='A61M'
set HD4[15]='A61N'
set H74[16]='A61O'
set H84[16]='A61P'
set H94[16]='A61Q'
set H74[17]='A61S'
set H84[17]='A61T'
set H94[17]='A61U'
set HD4[17]='A61V'
set H74[18]='A61W'
set H84[18]='A61X'
set H94[18]='A61Y'
set H74[19]='A620'
set H84[19]='A621'
set H94[19]='A622'
set HD4[19]='A623'
set H74[20]='A624'
set H84[20]='A625'
set H94[20]='A626'
set HD4[20]='A627'
set H74[21]='A628'
set H84[21]='A629'
set H94[21]='A62A'
set HD4[21]='A62B'
set H74[22]='A62C'
set H84[22]='A62D'
set H94[22]='A62E'
set H74[23]='A62G'
set H84[23]='A62H'
set H94[23]='A62I'
set HD4[23]='A62J'
set H74[24]='A62K'
set H84[24]='A62L'
set H94[24]='A62M'
set HD4[24]='A62N'
set H74[25]='A62O'
set H94[25]='A62Q'
set HD4[25]='A62R'
set H74[26]='A62S'
set H84[26]='A62T'
set HD4[26]='A62V'
set H84[27]='A62X'
set H94[27]='A62Y'
set HD4[27]='A62Z'
set H74[28]='A630'
set H84[28]='A631'
set H94[28]='A632'
set HD4[28]='A633'
set H74[29]='A634'
set H84[29]='A635'
set H94[29]='A636'
set HD4[29]='A637'
set H74[30]='A638'
set H84[30]='A639'
set H94[30]='A63A'
set HD4[30]='A63B'
set H74[31]='A63C'
set H84[31]='A63D'
set H94[31]='A63E'
set HD4[31]='A63F'
set H74[32]='A63G'
set H84[32]='A63H'
set H94[32]='A63I'
set HD4[32]='A63J'
set H74[33]='A63K'
set H84[33]='A63L'
set H94[33]='A63M'
set H74[34]='A63O'
set H84[34]='A63P'
set H94[34]='A63Q'
set HD4[34]='A63R'
set H74[35]='A63S'
set H84[35]='A63T'
set H94[35]='A63U'
set HD4[35]='A63V'
set H74[36]='A63W'
set H84[36]='A63X'
set H94[36]='A63Y'
set HD4[36]='A63Z'
set H74[37]='A640'
set H84[37]='A641'
set H94[37]='A642'
set HD4[37]='A643'
set H74[38]='A644'
set H84[38]='A645'
set H94[38]='A646'
set HD4[38]='A647'
set H74[39]='A648'
set H94[39]='A64A'
set H74[40]='A64C'
set H84[40]='A64D'
set H94[40]='A64E'
set HD4[40]='A64F'
set H74[41]='A64G'
set H84[41]='A64H'
set H94[41]='A64I'
set HD4[41]='A64J'
set H74[42]='A64K'
set H84[42]='A64L'
set H94[42]='A64M'
set HD4[42]='A64N'
set H74[43]='A64O'
set H84[43]='A64P'
set HD4[43]='A64R'
set H74[44]='A64S'
set H84[44]='A64T'
set H94[44]='A64U'
set HD4[44]='A64V'
set H74[45]='A64W'
set H84[45]='A64X'
set H94[45]='A64Y'
set HD4[45]='A64Z'
set H74[46]='A650'
set H94[46]='A652'
set HD4[46]='A653'
set H74[47]='A654'
set H84[47]='A655'
set H94[47]='A656'
set HD4[47]='A657'
set H74[48]='A658'
set H84[48]='A659'
set H94[48]='A65A'
set HD4[48]='A65B'
set H74[49]='A65C'
set H84[49]='A65D'
set HD4[49]='A65F'
set H74[50]='A65G'
set H84[50]='A65H'
set H94[50]='A65I'
set HD4[50]='A65J'
set H74[51]='A65K'
set H84[51]='A65L'
set H94[51]='A65M'
set HD4[51]='A65N'
set H74[52]='A65O'
set H84[52]='A65P'
set HD4[52]='A65R'
set H74[53]='A65S'
set H84[53]='A65T'
set H94[53]='A65U'
set HD4[53]='A65V'
set H74[54]='A65W'
set H84[54]='A65X'
set H94[54]='A65Y'
set HD4[54]='A65Z'
set H74[55]='A660'
set H84[55]='A661'
set HD4[55]='A663'
set H74[56]='A664'
set HD4[56]='A667'
set H74[57]='A668'
set H84[57]='A669'
set H94[57]='A66A'
set HD4[57]='A66B'
set H74[58]='A66C'
set H84[58]='A66D'
set H94[58]='A66E'
set H74[59]='A66G'
set H84[59]='A66H'
set H94[59]='A66I'
set H74[60]='A66K'
set H84[60]='A66L'
set H94[60]='A66M'
set HD4[60]='A66N'
set H84[61]='A66P'
set H94[61]='A66Q'
set HD4[61]='A66R'
set H74[62]='A66S'
set H84[62]='A66T'
set H94[62]='A66U'
set HD4[62]='A66V'
set H74[63]='A66W'
set H84[63]='A66X'
set H94[63]='A66Y'
set HD4[63]='A66Z'
set H84[64]='A671'
set H94[64]='A672'
set HD4[64]='A673'
set H74[65]='A674'
set H84[65]='A675'
set H94[65]='A676'
set HD4[65]='A677'
set H74[66]='A678'
set H84[66]='A679'
set H94[66]='A67A'
set HD4[66]='A67B'
set H74[67]='A67C'
set H84[67]='A67D'
set H94[67]='A67E'
set HD4[67]='A67F'
set H74[68]='A67G'
set H84[68]='A67H'
set H94[68]='A67I'
set HD4[68]='A67J'
set H74[69]='A67K'
set H84[69]='A67L'
set H94[69]='A67M'
set HD4[69]='A67N'
set H74[70]='A67O'
set H84[70]='A67P'
set H94[70]='A67Q'
set HD4[70]='A67R'
set H74[71]='A67S'
set H84[71]='A67T'
set H94[71]='A67U'
set HD4[71]='A67V'
set H84[72]='A67X'
set H94[72]='A67Y'
set H74[73]='A680'
set H84[73]='A681'
set H94[73]='A682'
set HD4[73]='A683'
set H74[74]='A684'
set H84[74]='A685'
set HD4[74]='A687'
set H74[75]='A688'
set H84[75]='A689'
set H94[75]='A68A'
set HD4[75]='A68B'
set H74[76]='A68C'
set H84[76]='A68D'
set H94[76]='A68E'
set HD4[76]='A68F'
set H74[77]='A68G'
set H84[77]='A68H'
set H94[77]='A68I'
set HD4[77]='A68J'
set H84[78]='A68L'
set H94[78]='A68M'
set HD4[78]='A68N'
set H74[79]='A68O'
set H84[79]='A68P'
set H94[79]='A68Q'
set HD4[79]='A68R'
set H74[81]='A68W'
set H84[81]='A68X'
set H94[81]='A68Y'
set HD4[81]='A68Z'
set H74[82]='A690'
set H84[82]='A691'
set H94[82]='A692'
set HD4[82]='A693'
set H74[83]='A694'
set H84[83]='A695'
set H94[83]='A696'
set HD4[83]='A697'
set H74[84]='A698'
set H84[84]='A699'
set H94[84]='A69A'
set HD4[84]='A69B'
set H74[85]='A69C'
set H84[85]='A69D'
set H94[85]='A69E'
set HD4[85]='A69F'
set H74[86]='A69G'
set H84[86]='A69H'
set H94[86]='A69I'
set HD4[86]='A69J'
set H74[87]='A69K'
set H84[87]='A69L'
set H94[87]='A69M'
set HD4[87]='A69N'
set H74[88]='A69O'
set H84[88]='A69P'
set H94[88]='A69Q'
set HD4[88]='A69R'
set H74[89]='A69S'
set H94[89]='A69U'
set H74[90]='A69W'
set H84[90]='A69X'
set H94[90]='A69Y'
set HD4[90]='A69Z'
set H74[91]='A6A0'
set H84[91]='A6A1'
set H94[91]='A6A2'
set HD4[91]='A6A3'
set H74[92]='A6A4'
set H84[92]='A6A5'
set H94[92]='A6A6'
set H74[93]='A6A8'
set H84[93]='A6A9'
set H94[93]='A6AA'
set HD4[93]='A6AB'
set H74[95]='A6AG'
set H84[95]='A6AH'
set H94[95]='A6AI'
set HD4[95]='A6AJ'
set H74[96]='A6AK'
set H84[96]='A6AL'
set HD4[96]='A6AN'
set H74[97]='A6AO'
set H84[97]='A6AP'
set H94[97]='A6AQ'
set HD4[97]='A6AR'
set H74[98]='A6AS'
set H84[98]='A6AT'
set H94[98]='A6AU'
set HD4[98]='A6AV'
set HE4[1]='A700'
set HE4[2]='A701'
set HE4[5]='A702'
set HE4[8]='A70Y'
set HE4[11]='A703'
set HE4[12]='A704'
set HE4[20]='A705'
set HE4[23]='A706'
set HE4[24]='A707'
set HE4[25]='A708'
set HE4[28]='A709'
set HE4[30]='A70A'
set HE4[38]='A70B'
set HE4[42]='A70C'
set HE4[45]='A70D'
set HE4[47]='A70E'
set HE4[50]='A70F'
set HE4[51]='A70G'
set HE4[53]='A70H'
set HE4[54]='A70I'
set HE4[62]='A70J'
set HE4[64]='A70K'
set HE4[67]='A70L'
set HE4[69]='A70M'
set HE4[73]='A70N'
set HE4[75]='A70O'
set HE4[76]='A70P'
set HE4[77]='A70Q'
set HE4[78]='A70R'
set HE4[81]='A70S'
set HE4[82]='A70X'
set HE4[84]='A70T'
set HE4[86]='A70U'
set HE4[90]='A70V'
endfunction
function E5 takes nothing returns nothing
set G14[suduzhixue]=450
set G14[jiasushoutao]=500
set G14[jinglingpixue]=450
set G14[guizuyuanhuan]=185
set G14[jurenliliangyaodai]=450
set G14[huanxinzhiren]=1000
set G14[gongjizhizhao]=450
set G14[kuojian]=1200
set G14[suozijia]=550
set G14[dajian]=1400
set G14[emodaofeng]=2400
set G14[yingjiaogong]=3300
set G14[nengliangzhiqiu]=1000
set G14[liliangshoutao]=150
set G14[zhenshibaoshi]=900
set G14[OW]=850
set G14[tieyitoukui]=950
set G14[zhenfenbaoshi]=2100
set G14[tieshuzhigan]=50
set G14[keledebishou]=2150
set G14[keledebishou2]=2150
set G14[zhilidoupeng]=150
set G14[siwangmianju]=900
set G14[ximeisitedelveduo]=3200
set G14[miyinchui]=1600
set G14[shenmifazhang]=2700
set G14[shirenmozhifu]=1000
set G14[liulangfashidoupeng]=550
set G14[banjia]=1400
set G14[jingqizhiqiu]=1200
set G14[duangun]=900
set G14[zhiliaozhihuan]=875
set G14[shouhuzhihuan]=175
set G14[huifujiezhi]=350
set G14[fashichangpao]=450
set G14[shengzheyiwu]=3800
set G14[minjiebianxie]=150
set G14[yirenmianzhao]=325
set G14[molifazhang]=1000
set G14[yuandun]=250
set G14[yuandun2]=250
set G14[jixianfaqiu]=2100
set G14[huolizhiqiu]=1100
set G14[xuwubaoshi]=875
set G14[biaoqiang]=1500
set G14[UY]=650
set G14[VY]=650
set G14[XY]=650
set G14[YY]=650
set G14[ZY]=650
set G14[AY]=650
set G14[BY]=650
set G14[CY]=650
set G14[DZ]=650
set G14[EZ]=650
set G14[mobang]=200
set G14[yazhizhiren]=225
set G14[yazhizhiren2]=225
set G14[shanbihufu]=1800
set G14[WA]=50
set G14[YA]=0
set G14[ZA]=115
set G14[BA]=125
set G14[FB]=150
set G14[GB]=200
set G14[JB]=135
set G14[QB]=135
set G14[RB]=150
set G14[VB]=1000
set G14[WB]=0
set G14[YB]=180
set G14[jianrenqiu]=1750
set G14[huifutoujin]=603
set G14[xuanmingdunpai]=803
set G14[shengdianzhihuan]=500
set G14[shengdianzhihuan2]=500
set G14[yuanxingxie]=2450
set G14[donglixie1]=1400
set G14[donglixie2]=1400
set G14[donglixie3]=1400
set G14[maidasizhishou]=1900
set G14[kongmingzhang]=1675
set G14[huwan]=525
set G14[youlingxidai]=485
set G14[wuyongguajian]=470
set G14[yecha]=2050
set G14[sanhua]=2050
set G14[suiguchui]=2950
set G14[suiguchui2]=2950
set G14[renjia]=2200
set G14[xuanwo]=2700
set G14[sanshizhiren]=3300
set G14[sanshizhiren2]=4150
set G14[sanshizhiren3]=3300
set G14[sanshizhiren4]=4150
set G14[zhipeitoukui]=1850
set G14[zhipeitoukui2]=1850
set G14[fengkuangmianju]=1900
set G14[euldeshenshengfazhang]=2700
set G14[zhenhunshi]=3300
set G14[meikensimu]=2306
set G14[sanyeduijian]=4100
set G14[anmie]=4100
set G14[kuangzhanfu]=4350
set G14[shuijingjian]=2150
set G14[heihuangzhang]=3900
set G14[WL]=3900
set G14[ZL]=3900
set G14[AL]=3900
set G14[LL]=3900
set G14[D1]=3900
set G14[E1]=3900
set G14[F1]=0
set G14[huanyingfu]=5050
set G14[huanyingfu2]=5050
set G14[luosazhifeng]=3000
set G14[dagongzhishenli]=2730
set G14[dagongzhishenli2]=3980
set G14[dagongzhishenli3]=5230
set G14[dagongzhishenli4]=6480
set G14[dagongzhishenli5]=7730
set G14[silingshu]=2700
set G14[silingshu2]=3950
set G14[silingshu3]=5200
set G14[linkenfaqiu]=5175
set G14[linkenfaqiu2]=5175
set G14[J0]=6200
set G14[dapao]=5550
set G14[jingubang]=5400
set G14[jingubang2]=5400
set G14[huiyao]=5150
set G14[huiyao2]=5150
set G14[molongzhixin]=5500
set G14[sadanzhixieli]=6150
set G14[sijiadizhiyan]=5675
set G14[sijiadizhiyan2]=5675
set G14[hudie]=6000
set G14[shuaxinqiu]=5300
set G14[xieeliandao]=5675
set G14[xianfengdun]=2225
set G14[xianfengdun2]=2225
set G14[leishenzhichui]=5600
set G14[B5]=370
set G14[jipin]=2050
set G14[qiangxizhuangjia]=5350
set G14[xuejingshi]=5050
set G14[tiaozhantoujin]=2125
set G14[bizhang]=2600
set G14[bizhang2]=2600
set G14[bizhang3]=2600
set G14[bizhang4]=2600
set G14[xiwadeshouhu]=4700
set G14[xiwadshouhu2]=4700
set G14[ziyuan]=4125
set G14[xiangweixie]=1350
set G14[mozhang]=509
set G14[yuanlifazhang]=2250
set G14[dongchayandou]=3628
set G14[qiongguidun]=550
set G14[qiongguidun2]=550
set G14[yingzhilingkan]=875
set G14[youhunquanzhang]=1600
set G14[DH4]=200
set G14[DI4]=200
set G14[DJ4]=2000
set G14[DK4]=0
set G14[DM4]=1400
set G14[DN4]=190
set G14[DO4]=150
set G14[DP4]=135
set G14[DQ4]=600
set G14[DR4]=600
set G14[DS4]=1000
set G14[DT4]=600
set G14[DU4]=850
set G14[DV4]=1000
set G14[DW4]=500
set G14[DX4]=900
set G14[DY4]=0
set G14[DZ4]=900
set G14[DA4]=500
set G14[DB4]=1375
set G14[DC4]=900
set G14[D34]=0
set G14[D64]=1250
set G14[DL4]=1250
set G14[D04]=1325
set G14[D54]=1000
set G14[D24]=1350
set G14[D_4]=1200
set G14[E44]=1100
set G14[E74]=0
set G14[E84]=1875
set G14[ED4]=220
set G14[EE4]=300
set G14[EF4]=1300
set G14[EG4]=700
set G14[EH4]=600
set G14[EI4]=150
set G14[EJ4]=900
set G14[EK4]=900
set G14[EM4]=600
set G14[EN4]=250
set G14[EW4]=1250
set G14[EX4]=775
set G14[zuduzhiqiu]=275
set G14[ES4]=275
set G14[mifaxie]=1450
set G14[UZ]=775
set G14[XZ]=775
set G14[zhangu]=1850
set G14[zhangu2]=1850
set G14[EC]='d'
set G14[yongqixunzhang]=1075
set G14[EV4]=200
set G14[EU4]=875
set G14[fenzhengmiansha]=2670
set G14[tiantangzhiji]=3850
set G14[atuosizhigun]=3100
set G14[jingmizhixie]=975
set G14[jingmizhixie2]=975
set G14[shenyuanzhiren]=6750
set G14[tianyingzhijie]=985
set G14[tianyingzhijie2]=985
set G14[OC]=1600
set G14[E_4]=4200
set G14[F44]=4200
set G14[F74]=4200
set G14[F84]=4200
set G14[F94]=4200
set G14[FD4]=4200
set G14[FE4]=4200
set G14[FF4]=4200
set G14[FG4]=4200
set G14[FH4]=4200
set G14[FJ4]=4200
set G14[FK4]=4200
set G14[FM4]=4200
set G14[FN4]=4200
set G14[FO4]=4200
set G14[FP4]=4200
set G14[FQ4]=4200
set G14[FR4]=4200
set G14[FS4]=4200
set G14[FT4]=4200
set G14[FU4]=4200
set G14[FV4]=4200
set G14[FW4]=4200
set G14[FX4]=4200
set G14[FY4]=4200
set G14[FZ4]=4200
set G14[FA4]=4200
set G14[FB4]=4200
set G14[FC4]=4200
set G14[F34]=4200
set G14[F64]=4200
set G14[FL4]=4200
set G14[F14]=4200
set G14[F04]=4200
set G14[F54]=4200
set G14[F24]=4200
set G14[F_4]=4200
set G14[G44]=4200
set G14[FI4]=4200
set G14[G74]=4200
set G14[G84]=4200
set G14[G94]=4200
set G14[GD4]=4200
set G14[GE4]=4200
set G14[GG4]=4200
set G14[GH4]=4200
set G14[GI4]=4200
set G14[GJ4]=4200
set G14[GK4]=4200
set G14[GM4]=4200
set G14[GN4]=4200
set G14[GO4]=4200
set G14[UG7]=4200
set G14[Puzzle_Agha]=4200
set G14[Goblin_Agha]=4200
set G14[DragonHawk_Agha]=4200
set G14[ShadowFiend_Agha]=4200
set G14[Medivh_Agha]=4200
set G14[Saar_Agha]=4200
set G14[EatTree_Share]=0
endfunction
function TriggerRegisterTimer takes trigger t returns nothing
call TriggerRegisterVariableEvent(t,"time",GREATER_THAN,0)
endfunction
function GetT takes nothing returns integer
return GetHandleId(GetTriggeringTrigger())
endfunction
function is takes unit ZZ7 returns boolean
return((GetUnitCurrentOrder(ZZ7)<852000)and(Bz>hq[832+GetPlayerId(GetOwningPlayer(ZZ7))]))
endfunction
function ZA7 takes unit ZB7 returns boolean
local integer ZC7=GetUnitCurrentOrder(ZB7)
return(ZC7==0)or(ZC7==851973)or(ZC7==851975)or(ZC7==851987)or(ZC7==851993)
endfunction
function iU takes unit ZZ7 returns boolean
local integer X5=GetUnitCurrentOrder(ZZ7)
return((X5<852000)and XJ7("(GetUnitAbilityLevel(UnitObject,'B01Z')==0)")and(not LoadBoolean(R8,GetHandleId(ZZ7),'DARK'))and((X5!=851983)or(not GZ[48+GetPlayerId(GetOwningPlayer(ZZ7))]))and(Bz>hq[832+GetPlayerId(GetOwningPlayer(ZZ7))])and(GetUnitAbilityLevel(ZZ7,'B0FG')==0))
endfunction
function iy takes unit ZZ7 returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(ZZ7))
return((h4[O5]==null)and((h4[160+O5]==null)or(GetWidgetLife(h4[160+O5])<=.405)or(not IsUnitInRange(h4[160+O5],ZZ7,1000.)))and(not G0[144+O5]))
endfunction
function Z37 takes unit ZZ7 returns boolean
local integer X5=GetUnitCurrentOrder(ZZ7)
local integer i1=GetUnitTypeId(ZZ7)
local integer Z67=GetHandleId(ZZ7)
if hq[832+GetPlayerId(GetOwningPlayer(ZZ7))]>Bz then
return false
elseif((X5==851973)or(GetWidgetLife(ZZ7)<=.405)or(IsUnitPaused(ZZ7)))then
return false
elseif(X5>852007)and(X5<852014)and((GetItemTypeId(UnitItemInSlot(ZZ7,X5-852007))==BU[QB])or(GetItemTypeId(UnitItemInSlot(ZZ7,X5-852007))==BU[yuanxingxie]))then
return false
elseif((X5<852008)and((i1!='O00J')or((LoadBoolean(R8,Z67,'DARK')==false))))then
return true
elseif(GetUnitAbilityLevel(ZZ7,'B0FG')!=0)then
return false
endif
return((X5>852013)and(X5!=852480)and(X5!=852525)and(X5!=852487)and(X5!=852597)and((i1!='E01C')or(X5!=852089))and((i1!='U00K')or(X5!=852581))and((X5!=852600)or((i1!='Hjai')and(i1!='Ntin')and(i1!='Hblm')))and(((i1!='Eevi')and(i1!='Eevm')and(i1!='E02V')and(i1!='E02W')and(i1!='E02U'))or(X5!=852189))and((i1!='N00R')or(X5!=852238))and((i1!='N0EG')or(X5!=852662))and((i1!='O015')or(X5!=852581))and(i1!='N0MD' or X5!=852095))
endfunction
function ZL7 takes unit ZZ7 returns boolean
local integer X5=GetUnitCurrentOrder(ZZ7)
local integer i1=GetUnitTypeId(ZZ7)
local integer Z67=GetHandleId(ZZ7)
if hq[832+GetPlayerId(GetOwningPlayer(ZZ7))]>Bz then
return false
elseif((X5==851973)or(GetWidgetLife(ZZ7)<=.405)or(IsUnitPaused(ZZ7)))then
return false
elseif(X5>852007)and(X5<852014)and((GetItemTypeId(UnitItemInSlot(ZZ7,X5-852007))==BU[QB])or(GetItemTypeId(UnitItemInSlot(ZZ7,X5-852007))==BU[yuanxingxie]))then
return false
elseif((X5<852008)and((i1!='O00J')or((LoadBoolean(R8,Z67,'DARK')==false))))then
return true
elseif(X5==852600)and((i1=='HC49'))then
return false
elseif(GetUnitAbilityLevel(ZZ7,'B0FG')!=0)then
return false
endif
return((X5>852013)and(X5!=852480)and(X5!=852525)and(X5!=852487)and(X5!=852597)and((i1!='E01C')or(X5!=852089))and((i1!='Nfir')or(X5!=852127))and((i1!='U00K')or(X5!=852581))and((X5!=852553)or((i1!='H00I')and(i1!='H00J')))and((X5!=852600)or((i1!='Hjai')and(i1!='Ntin')and(i1!='Hblm')))and(((i1!='Eevi')and(i1!='Eevm')and(i1!='E02V')and(i1!='E02W')and(i1!='E02U'))or(X5!=852189))and((i1!='N00R')or(X5!=852238))and((i1!='N0EG')or(X5!=852662))and((i1!='O015')or(X5!=852581))and((i1!='U00K')or(X5!=852503))and((i1!='N00B')or(X5!=852514))and(((i1=='H06X')or(i1=='H06Y')or(i1=='H06W'))or(X5!=852248))or(i1!='N0MD' or X5!=852095))
endfunction
function i2 takes unit ZZ7 returns boolean
local integer X5=GetUnitCurrentOrder(ZZ7)
local integer i1=GetUnitTypeId(ZZ7)
if(X5<852008)then
return false
endif
return((X5<=852013)or(X5==852480)or(X5==852487)or(X5==852597)or((i1=='O00J')and(XJ7("GetUnitAbilityLevel(UnitObject,'B01Z')>0"))and LoadBoolean(R8,GetHandleId(ZZ7),'DARK'))or((i1=='E01C')and(X5==852089))or((i1=='Nfir')and(X5==852127))or((i1=='U00K')and(X5==852581))or(((i1=='Hjai')or(i1=='Ntin')or(i1=='Hblm'))and(X5==852600)))
endfunction
function Z17 takes integer O5 returns player
if((O5>0)and(O5<6))then
return G8[O5]
elseif((O5>5)and(O5<11))then
return N8[O5-5]
endif
return null
endfunction
function Z07 takes string O5 returns player
if O5=="0" then
set bj_forLoopAIndex=10
else
set bj_forLoopAIndex=S2I(O5)
endif
if((bj_forLoopAIndex>0)and(bj_forLoopAIndex<6))then
return G8[bj_forLoopAIndex]
elseif((bj_forLoopAIndex>5)and(bj_forLoopAIndex<11))then
return N8[bj_forLoopAIndex-5]
endif
return null
endfunction
function i5 takes player pl returns integer
local integer O5=1
loop
exitwhen O5>5
if(pl==G8[O5])then
return O5
elseif(pl==N8[O5])then
return O5+5
endif
set O5=O5+1
endloop
return 0
endfunction
function Z57 takes unit Y47 returns boolean
if IsUnitAlly(Y47,G8[0])then
return IsUnitVisibleEx(Y47,AU4)
else
return IsUnitVisibleEx(Y47,AT4)
endif
return false
endfunction
function Z27 takes unit Y47 returns boolean
if IsUnitAlly(Y47,G8[0])then
return IsVisibleToPlayer(GetUnitX(Y47),GetUnitY(Y47),AU4)
else
return IsVisibleToPlayer(GetUnitX(Y47),GetUnitY(Y47),AT4)
endif
return false
endfunction
function Z_7 takes unit it returns boolean
return(GetWidgetLife(it)>.405 and((not IsUnitType(it,UNIT_TYPE_HERO))or(not HA4[GetPlayerId(GetOwningPlayer(it))])))
endfunction
function A47 takes unit A77,unit Y47 returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(Y47))
return((IsUnitType(A77,UNIT_TYPE_HERO))and(((R2I(GetWidgetLife(A77))<(300+(GetHeroLevel(A77)*30)))and(GetUnitLifePercent(A77)<40.))or((hq[624+O5]>Bz and h4[O5]==A77)))and(Z_7(A77)))
endfunction
function A87 takes unit it returns boolean
return((IsUnitType(it,UNIT_TYPE_HERO))and(R2I(GetWidgetLife(it))<(300+(GetHeroLevel(it)*30)))and(GetUnitLifePercent(it)<40.)and(Z_7(it)))
endfunction
function A97 takes integer O5 returns boolean
return(hq[624+O5]>Bz and h4[O5]!=null)and(not A87(Y7[O5]))
endfunction
function AD7 takes unit it returns boolean
return((GetUnitAbilityLevel(it,'B0DP')>0)or(GetUnitAbilityLevel(it,'A0WR')>0)or(GetUnitAbilityLevel(it,'B02H')>0))
endfunction
function AE7 takes unit it returns boolean
return((IsUnitType(it,UNIT_TYPE_HERO))and(R2I(GetWidgetLife(it))<(600+(GetHeroLevel(it)*30)))and(GetWidgetLife(it)>.405))
endfunction
function AF7 takes unit it,unit IB returns boolean
return((IsUnitType(it,UNIT_TYPE_HERO))and(R2I(GetWidgetLife(it))<(300+(GetHeroLevel(it)*30)))and(GetUnitLifePercent(it)<40.)and(GetWidgetLife(it)>.405)and(GetUnitState(IB,UNIT_STATE_LIFE)>(GetUnitState(it,UNIT_STATE_LIFE)-(10.*GetHeroLevel(IB)))))
endfunction
function IC takes integer O5 returns boolean
return((D4[O5]-3)>=C[O5])
endfunction
function Id takes integer O5 returns boolean
return((h4[O5]!=null)and(AF7(h4[O5],Y7[O5])))
endfunction
function Ie takes rect r,boolexpr Ig returns unit
call GroupClear(ig)
call GroupEnumUnitsInRect(ig,r,Ig)
set bj_groupRandomConsidered=0
set bj_groupRandomCurrentPick=null
call ForGroup(ig,function GroupPickRandomUnitEnum)
call DestroyBoolExpr(Ig)
return bj_groupRandomCurrentPick
endfunction
function AG7 takes nothing returns nothing
set bj_groupCountUnits=bj_groupCountUnits+1
set RK7=RK7+GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)
endfunction
function IH takes player pl,boolexpr Ig returns integer
call GroupClear(ig)
call GroupEnumUnitsOfPlayer(ig,pl,Ig)
set bj_groupCountUnits=0
call ForGroup(ig,function CountUnitsInGroupEnum)
call DestroyBoolExpr(Ig)
return bj_groupCountUnits
endfunction
function AH7 takes real Im,location b5,boolexpr Ig returns unit
set bj_groupRandomConsidered=0
set bj_groupRandomCurrentPick=null
call GroupClear(H9)
call GroupEnumUnitsInRangeOfLoc(H9,b5,Im,Ig)
call ForGroup(H9,function GroupPickRandomUnitEnum)
call DestroyBoolExpr(Ig)
return bj_groupRandomCurrentPick
endfunction
function AI7 takes real Im,unit Y47,boolexpr Ig returns unit
set bj_groupRandomConsidered=0
set bj_groupRandomCurrentPick=null
call GroupClear(H9)
call GroupEnumUnitsInRange(H9,GetUnitX(Y47),GetUnitY(Y47),Im,Ig)
call ForGroup(H9,function GroupPickRandomUnitEnum)
call DestroyBoolExpr(Ig)
return bj_groupRandomCurrentPick
endfunction
function AJ7 takes real Im,location b5,boolexpr Ig returns unit
call GroupClear(H9)
call GroupEnumUnitsInRangeOfLoc(H9,b5,Im,Ig)
call DestroyBoolExpr(Ig)
return FirstOfGroup(H9)
endfunction
function AK7 takes real Im,widget AM7,boolexpr Ig returns unit
call GroupClear(H9)
call GroupEnumUnitsInRange(H9,GetWidgetX(AM7),GetWidgetY(AM7),Im,Ig)
call DestroyBoolExpr(Ig)
return FirstOfGroup(H9)
endfunction
function AN7 takes real Im,location b5,boolexpr Ig returns integer
call GroupClear(H8)
call GroupEnumUnitsInRangeOfLoc(H8,b5,Im,Ig)
set bj_groupCountUnits=0
call ForGroup(H8,function CountUnitsInGroupEnum)
call DestroyBoolExpr(Ig)
return bj_groupCountUnits
endfunction
function AO7 takes real Im,unit it,boolexpr Ig returns integer
call GroupClear(H8)
call GroupEnumUnitsInRange(H8,GetUnitX(it),GetUnitY(it),Im,Ig)
set bj_groupCountUnits=0
set RK7=.0
call ForGroup(H8,function AG7)
call DestroyBoolExpr(Ig)
return bj_groupCountUnits
endfunction
function AP7 takes real Im,real x,real y,boolexpr Ig returns integer
call GroupClear(H8)
call GroupEnumUnitsInRange(H8,x,y,Im,Ig)
set bj_groupCountUnits=0
set RK7=.0
call ForGroup(H8,function AG7)
call DestroyBoolExpr(Ig)
return bj_groupCountUnits
endfunction
function IV takes real x,real y,real IW,boolexpr Ig,code IX returns nothing
call GroupClear(iF)
call GroupEnumUnitsInRange(iF,x,y,IW,Ig)
call ForGroup(iF,IX)
call DestroyBoolExpr(Ig)
endfunction
function AQ7 takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))and(GetWidgetLife(GetFilterUnit())>.405)and((i1=='e00S')or(i1=='e011')or(i1=='e00R')or(i1=='e019')or(i1=='u00N')or(i1=='u00D')or(i1=='u00M')or(i1=='u00T')))
endfunction
function AR7 takes unit it,integer Iz returns boolean
local integer I8=0
local item ja
set bj_lastCreatedItem=null
loop
set ja=UnitItemInSlot(it,I8)
if((ja!=null)and(GetItemTypeId(ja)==Iz))then
set bj_lastCreatedItem=ja
set ja=null
return true
endif
set I8=I8+1
exitwhen I8>=bj_MAX_INVENTORY
endloop
set ja=null
return false
endfunction
function AS7 takes unit it returns boolean
local integer I8=0
loop
if(UnitItemInSlot(it,I8)==null)then
return false
endif
set I8=I8+1
exitwhen(I8>=bj_MAX_INVENTORY)
endloop
return true
endfunction
function AT7 takes unit it returns boolean
local integer I8=0
loop
if(UnitItemInSlot(it,I8)!=null)then
return false
endif
set I8=I8+1
exitwhen(I8>=bj_MAX_INVENTORY)
endloop
return true
endfunction
function AU7 takes unit S4,integer n5,item Z4 returns item
local integer D5
local item f5
set D5=0
loop
exitwhen D5>5
set f5=UnitItemInSlot(S4,D5)
if f5!=null and f5!=Z4 and GetItemTypeId(f5)==n5 then
set f5=null
return UnitItemInSlot(S4,D5)
endif
set D5=D5+1
endloop
set f5=null
return null
endfunction
function AV7 takes unit S4,integer n5 returns item
local integer D5
local item f5
set D5=0
loop
exitwhen D5>5
set f5=UnitItemInSlot(S4,D5)
if(f5!=null)and(GetItemTypeId(f5)==n5)then
set f5=null
return UnitItemInSlot(S4,D5)
endif
set D5=D5+1
endloop
set f5=null
return null
endfunction
function AW7 takes unit AX7 returns unit
return LoadUnitHandle(R8,GetHandleId(AX7)+StringHash("KaolinComboData"),StringHash("KaolinTarget"))
endfunction
function AY7 takes unit AX7 returns integer
return LoadInteger(R8,GetHandleId(AX7)+StringHash("KaolinComboData"),StringHash("KaolinTarget"))
endfunction
function AZ7 takes unit AX7 returns nothing
call FlushChildHashtable(R8,GetHandleId(AX7)+StringHash("KaolinComboData"))
endfunction
function AA7 takes unit u returns integer
return LoadInteger(R8,GetHandleId(u),(800))
endfunction
function AB7 takes unit u returns real
return LoadReal(R8,GetHandleId(u),(442))
endfunction
function Ran takes nothing returns integer
local integer r=0
loop
exitwhen GetRandomReal(0,9900.00001-r)<100.0 or r>=9900
set r=r+100
endloop
return r/ 100
endfunction
function ai_Kaolin_DelayCombo takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer W57=GetHandleId(t)
local unit AC7=LoadUnitHandle(R8,W57,0)
local unit X77=LoadUnitHandle(R8,W57,1)
local integer A37=LoadInteger(R8,W57,3)
local integer A67=LoadInteger(R8,W57,4)
local location AL7=LoadLocationHandle(R8,W57,2)
local real x=GetLocationX(AL7)
local real y=GetLocationY(AL7)
local real x1=GetUnitX(AC7)
local real y1=GetUnitY(AC7)
local real x2=GetUnitX(X77)
local real y2=GetUnitY(X77)
local real d=0
local real r=0
local boolean A17=false
if IsUnit(X77,null)==false and not(GetUnitTypeId(X77)<1 or IsUnitType(X77,UNIT_TYPE_DEAD))then
set d=RAbsBJ(Atan2BJ(y2-y1,x2-x1)-Atan2BJ(y1-y,x1-x))
set r=Z87(x,y,x2,y2)
if A37=='A2QM' then
if d<=15. or r<=I2R(225)/ GetUnitMoveSpeed(X77)*1200 then
set A17=(X77!=null)and IssueTargetOrderById(AC7,A67,X77)
if not A17 then
set A17=(X77!=null)and(GetUnitLifePercent(AC7)>20+GetUnitLifePercent(X77)/ 3.)and IssuePointOrderById(AC7,852662,x2,y2)
endif
endif
elseif A37=='A2TJ' then
elseif A37=='A2QI' then
endif
endif
call SaveInteger(R8,W57,5,LoadInteger(R8,W57,5)-1)
if LoadInteger(R8,W57,5)<=0 or LoadBoolean(R8,W57,5)==false then
call RemoveLocation(AL7)
call FlushChildHashtable(R8,W57)
call PauseTimer(t)
call DestroyTimer(t)
endif
set AL7=null
set AC7=null
set X77=null
set t=null
endfunction
function A07 takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer W57=GetHandleId(t)
local unit AC7=LoadUnitHandle(R8,W57,0)
local unit X77=LoadUnitHandle(R8,W57,1)
local integer A67=LoadInteger(R8,W57,4)
call SaveInteger(R8,W57,5,LoadInteger(R8,W57,5)-1)
if HaveSavedBoolean(R8,W57,'CAST')==false or LoadBoolean(R8,W57,'CAST')==false and LoadInteger(R8,W57,5)>=0 then
call SaveBoolean(R8,W57,'CAST',IssueTargetOrderById(AC7,A67,X77))
elseif LoadBoolean(R8,W57,'CAST')or LoadInteger(R8,W57,5)<0 then
call PauseTimer(t)
call DestroyTimer(t)
call FlushChildHashtable(R8,W57)
endif
set AC7=null
set X77=null
set t=null
endfunction
function A57 takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer W57=GetHandleId(t)
local unit AC7=LoadUnitHandle(R8,W57,0)
local location X77=LoadLocationHandle(R8,W57,2)
local integer A67=LoadInteger(R8,W57,4)
call SaveInteger(R8,W57,5,LoadInteger(R8,W57,5)-1)
if HaveSavedBoolean(R8,W57,'CAST')==false or LoadBoolean(R8,W57,'CAST')==false and LoadInteger(R8,W57,5)>=0 then
call SaveBoolean(R8,W57,'CAST',IssuePointOrderByIdLoc(AC7,A67,X77))
elseif LoadBoolean(R8,W57,'CAST')or LoadInteger(R8,W57,5)<0 then
call PauseTimer(t)
call DestroyTimer(t)
call FlushChildHashtable(R8,W57)
call RemoveLocation(X77)
endif
set AC7=null
set X77=null
set t=null
endfunction
function A27 takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and((i1=='e00S')or(i1=='e011')or(i1=='e00R')or(i1=='e019')or(i1=='u00N')or(i1=='u00D')or(i1=='u00M')or(i1=='u00T')))
endfunction
function A_7 takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and((i1=='h0CV')or(i1=='h0CX')or(i1=='h0CW')))
endfunction
function B47 takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and((i1=='unec')or(i1=='u002')or(i1=='edry')or(i1=='e00W')))
endfunction
function k6 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(Z_7(GetFilterUnit()))and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0))
endfunction
function B77 takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and((i1=='e00S')or(i1=='e011')or(i1=='e00R')or(i1=='e019')or(i1=='u00N')or(i1=='u00D')or(i1=='u00M')or(i1=='u00T')))
endfunction
function B87 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='o01X' or GetUnitTypeId(GetFilterUnit())=='o020')and GetWidgetLife(GetFilterUnit())>.405
endfunction
function KZ takes nothing returns nothing
if((hy==null)or(GetUnitState(hy,UNIT_STATE_LIFE)>GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)))and(GetEnumUnit()!=F77 or F77==null)then
set hy=GetEnumUnit()
endif
endfunction
function B97 takes real K1,unit IB,boolexpr Ig returns unit
set hy=null
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(IB),GetUnitY(IB),K1,Ig)
call ForGroup(iA,function KZ)
call DestroyBoolExpr(Ig)
return hy
endfunction
function BD7 takes nothing returns boolean
return AR7(GetFilterUnit(),BU[TC7])
endfunction
function ai_IsRockOrTarget takes nothing returns boolean
return((GetUnitTypeId(GetFilterUnit())=='o01X'or GetUnitTypeId(GetFilterUnit())=='o020')and GetWidgetLife(GetFilterUnit())>.405)or(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))
endfunction
function ai_KaolinAllyHeroSurrounded takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and GetWidgetLife(GetFilterUnit())>.405 and(GetWidgetLife(GetFilterUnit())<=250 or GetUnitLifePercent(GetFilterUnit())<=20.))and AO7(600,GetFilterUnit(),Or(Condition(function k6),Condition(function B77)))>=1 and IsUnitInRange(GetFilterUnit(),bj_lastLoadedUnit,425)==false
endfunction
function BE7 takes unit AM7,unit X77,real X,real Y,real r,boolexpr WN7 returns boolean
local group g=CreateGroup()
local real Hx=GetUnitX(AM7)
local real Hy=GetUnitY(AM7)
local player p=GetOwningPlayer(AM7)
local real dx=(X-Hx)*.5
local real dy=(Y-Hy)*.5
local real R=SquareRoot(dx*dx+dy*dy)
local unit u
local real d
local real BF7=99999.
local real BG7=.0
local real Y_7
call GroupEnumUnitsInRange(g,Hx+dx,Hy+dy,R,WN7)
set bj_lastReplacedUnit=null
set bj_lastLoadedUnit=null
set bj_forLoopAIndex=0
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
set d=((GetUnitX(u)-Hx)*dy-(GetUnitY(u)-Hy)*dx)/ R
if u!=AM7 and u!=X77 and IsUnitVisibleEx(u,p)and d*d<=r*r then
set Y_7=Z47(AM7,u)
if Y_7<BF7 then
set BF7=Y_7
set bj_lastReplacedUnit=u
endif
if Y_7>BG7 then
set BG7=Y_7
set bj_lastLoadedUnit=u
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endif
endloop
call DestroyGroup(g)
set g=null
return bj_forLoopAIndex==0
endfunction
function BH7 takes unit AM7,unit X77,real X,real Y,real r,boolexpr WN7 returns boolean
local group g=CreateGroup()
local real Hx=GetUnitX(AM7)
local real Hy=GetUnitY(AM7)
local player p=GetOwningPlayer(AM7)
local real dx=(X-Hx)*.5
local real dy=(Y-Hy)*.5
local real R=SquareRoot(dx*dx+dy*dy)
local unit u
local real d
local real BF7=99999.
local real BG7=.0
local real Y_7
set RK7=0
call GroupEnumUnitsInRange(g,Hx+dx,Hy+dy,R,WN7)
set bj_lastReplacedUnit=null
set bj_lastLoadedUnit=null
set bj_forLoopAIndex=0
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
set d=((GetUnitX(u)-Hx)*dy-(GetUnitY(u)-Hy)*dx)/ R
if u!=AM7 and u!=X77 and IsUnitVisibleEx(u,p)and d*d<=r*r then
set Y_7=Z47(AM7,u)
if Y_7<BF7 then
set BF7=Y_7
set bj_lastReplacedUnit=u
endif
if Y_7>BG7 then
set BG7=Y_7
set bj_lastLoadedUnit=u
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
set RK7=RK7+GetWidgetLife(u)
endif
endloop
call DestroyGroup(g)
set g=null
return bj_forLoopAIndex==0
endfunction
function BI7 takes unit Z77,location X77 returns real
local real BJ7=GetUnitX(Z77)
local real BK7=GetUnitY(Z77)
local real BM7=GetLocationX(X77)
local real BN7=GetLocationY(X77)
if Z77==null then
return I2R(0x540BE3FF)
else
return SquareRoot((BJ7-BM7)*(BJ7-BM7)+(BK7-BN7)*(BK7-BN7))
endif
endfunction
function BO7 takes unit u returns boolean
return GetUnitTypeId(u)<1 or IsUnitType(u,UNIT_TYPE_DEAD)
endfunction
function BP7 takes nothing returns nothing
set GT=false
endfunction
function BS7 takes widget Z77,widget X77 returns real
local real BJ7=GetWidgetX(Z77)
local real BK7=GetWidgetY(Z77)
local real BM7=GetWidgetX(X77)
local real BN7=GetWidgetY(X77)
if Z77==null or X77==null then
return I2R(0x540BE3FF)
else
return SquareRoot((BJ7-BM7)*(BJ7-BM7)+(BK7-BN7)*(BK7-BN7))
endif
endfunction
function BT7 takes unit Z77,unit X77 returns real
local real BJ7=GetUnitX(Z77)
local real BK7=GetUnitY(Z77)
local real BM7=GetUnitX(X77)
local real BN7=GetUnitY(X77)
if Z77==null or X77==null then
return I2R(0x540BE3FF)
else
return SquareRoot((BJ7-BM7)*(BJ7-BM7)+(BK7-BN7)*(BK7-BN7))
endif
endfunction
function AI_ClearWayFromEnemyEnum takes nothing returns boolean
return BO7(GetFilterUnit())==false and BE7(GetEnumUnit(),GetEnumUnit(),GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()),180,Condition(function k6))
endfunction
function BU7 takes nothing returns boolean
return(not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and(GetWidgetLife(GetFilterUnit())>.405)and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_DEAD)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_SUMMONED)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false)and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit()))))
endfunction
function BV7 takes nothing returns boolean
return(not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and(GetWidgetLife(GetFilterUnit())>.405)and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_DEAD)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_SUMMONED)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false)and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(bj_lastCreatedUnit))))
endfunction
function BW7 takes nothing returns boolean
return(not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and(GetWidgetLife(GetFilterUnit())>.405)and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_DEAD)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_SUMMONED)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false)and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit()))))
endfunction
function BX7 takes nothing returns boolean
return BO7(GetFilterUnit())==false and k6()and BE7(GetEnumUnit(),GetFilterUnit(),GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()),200,Condition(function k6))
endfunction
function BY7 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(TI7)))and(Z_7(GetFilterUnit()))and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(TI7)))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0))
endfunction
function BZ7 takes nothing returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(GetFilterUnit()))
local real BA7=BT7(GetFilterUnit(),h4[O5])
local real BB7=YH7(GetEnumUnit(),GetFilterUnit())
local boolean BC7=h4[O5]!=null and BO7(h4[O5])==false and(IsUnitType(h4[O5],UNIT_TYPE_HERO)or IsCourier(h4[O5]))and(A47(h4[O5],GetFilterUnit())or(G0[256+O5]or GZ[208+O5]))
local real B37=Z87(GetUnitX(GetFilterUnit())+TE7*CosBJ(BB7),GetUnitY(GetFilterUnit())+TE7*SinBJ(BB7),GetUnitX(h4[O5]),GetUnitY(h4[O5]))
local boolean B67=CosBJ(BB7-YH7(GetFilterUnit(),h4[O5]))>=.81
return IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit()))and B67 and BC7 and ZL7(GetFilterUnit())and(B37<=BA7 and BA7*2>=TE7)
endfunction
function BL7 takes nothing returns nothing
if((hy==null)or(GetUnitState(hy,UNIT_STATE_LIFE)<GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)))and(GetEnumUnit()!=F77 or F77==null)then
set hy=GetEnumUnit()
endif
endfunction
function B17 takes real K1,unit IB,real B07 returns unit
local boolexpr Ig=Condition(function BZ7)
set hy=null
set TE7=B07
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(IB),GetUnitY(IB),K1,Ig)
call ForGroup(iA,function BL7)
call DestroyBoolExpr(Ig)
set Ig=null
set TE7=0
return hy
endfunction
function B57 takes nothing returns boolean
return ZL7(GetFilterUnit())==false
endfunction
function B27 takes nothing returns boolean
local real B_7
local real C47
if IsUnitInRange(TB7,GetFilterUnit(),175)then
return true
endif
set B_7=Atan2(GetUnitY(TB7)-GetUnitY(GetEnumUnit()),GetUnitX(TB7)-GetUnitX(GetEnumUnit()))
set C47=Atan2(GetUnitY(TB7)-GetUnitY(GetFilterUnit()),GetUnitX(TB7)-GetUnitX(GetFilterUnit()))
return Cos(B_7-C47)>=.5
endfunction
function ai_IsRockUnitHitNearby_Less takes nothing returns boolean
local real C77=AO7(180,GetFilterUnit(),Condition(function k6))
return C77>0
endfunction
function C87 takes nothing returns boolean
local real C77
set TB7=GetFilterUnit()
set C77=AO7(180,GetFilterUnit(),And(Condition(function k6),Condition(function B27)))
return C77>0
endfunction
function ai_RockUnitHitInPath_Less takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='o01X' or GetUnitTypeId(GetFilterUnit())=='o020')and BH7(TI7,GetFilterUnit(),GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()),180,Condition(function BY7))==false
endfunction
function C97 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='o01X' or GetUnitTypeId(GetFilterUnit())=='o020')and BH7(TI7,GetFilterUnit(),GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()),180,Condition(function BY7))==false and(RK7/ I2R(bj_forLoopAIndex)<=500. or(GetUnitManaPercent(TI7)>=40. or GetUnitState(TI7,UNIT_STATE_MANA)>=400.))
endfunction
function CD7 takes nothing returns boolean
local real CE7=Atan2(GetUnitY(GetFilterUnit())-GetUnitY(TI7),GetUnitX(GetFilterUnit())-GetUnitX(TI7))
local real CF7=GetUnitX(GetFilterUnit())+1200*Cos(CE7)
local real CG7=GetUnitY(GetFilterUnit())+1200*Sin(CE7)
return(GetUnitTypeId(GetFilterUnit())=='o01X' or GetUnitTypeId(GetFilterUnit())=='o020')and BH7(TI7,GetFilterUnit(),CF7,CG7,200,Condition(function BY7))==false
endfunction
function ai_RockUnitHitInPathReverse_WithCreep takes nothing returns boolean
local real CE7=Atan2(GetUnitY(GetFilterUnit())-GetUnitY(TI7),GetUnitX(GetFilterUnit())-GetUnitX(TI7))
local real CF7=GetUnitX(GetFilterUnit())+1200*Cos(CE7)
local real CG7=GetUnitY(GetFilterUnit())+1200*Sin(CE7)
return(GetUnitTypeId(GetFilterUnit())=='o01X' or GetUnitTypeId(GetFilterUnit())=='o020')and BH7(TI7,GetFilterUnit(),CF7,CG7,180,Or(Condition(function BY7),Condition(function BU7)))==false and(RK7/ I2R(bj_forLoopAIndex)<=500. or(GetUnitManaPercent(TI7)>=40. or GetUnitState(TI7,UNIT_STATE_MANA)>=400.))
endfunction
function CI7 takes unit Y47 returns boolean
return GetUnitAbilityLevel(Y47,'B01T')>0 or GetUnitAbilityLevel(Y47,'BNsi')>0 or GetUnitAbilityLevel(Y47,'B01X')>0 or GetUnitAbilityLevel(Y47,'BNdo')>0 or GetUnitAbilityLevel(Y47,'B02M')>0 or GetUnitAbilityLevel(Y47,'Bhea')>0 or GetUnitAbilityLevel(Y47,'B07V')>0 or GetUnitAbilityLevel(Y47,'B0BY')>0 or GetUnitAbilityLevel(Y47,'B08O')>0 or GetUnitAbilityLevel(Y47,'B07U')>0 or GetUnitAbilityLevel(Y47,'B0DL')>0 or GetUnitAbilityLevel(Y47,'B08V')>0 or GetUnitAbilityLevel(Y47,'B031')>0 or GetUnitAbilityLevel(Y47,'B0FT')>0 or GetUnitAbilityLevel(Y47,'B0FG')>0
endfunction
function CK7 takes unit u returns boolean
return(GetUnitAbilityLevel((u),('B00H'))>0)or(GetUnitAbilityLevel((u),('BOhx'))>0)or(GetUnitAbilityLevel((u),('BPSE'))>0)or(GetUnitAbilityLevel((u),('B099'))>0)or(GetUnitAbilityLevel((u),('BSTN'))>0)or(GetUnitAbilityLevel((u),('B0CF'))>0)or(GetUnitAbilityLevel((u),('B0BM'))>0)or(GetUnitAbilityLevel((u),('B06M'))>0)or(GetUnitAbilityLevel((u),('B07N'))>0)or(GetUnitAbilityLevel((u),('B08S'))>0)or(GetUnitAbilityLevel((u),('B00Q'))>0)or(GetUnitAbilityLevel((u),('B04V'))>0)or(GetUnitAbilityLevel((u),('B072'))>0)or(GetUnitAbilityLevel((u),('BUan'))>0)or(GetUnitAbilityLevel((u),('B095'))>0)or(GetUnitAbilityLevel((u),('B03I'))>0)or(GetUnitAbilityLevel((u),('B0AD'))>0)or(GetUnitAbilityLevel((u),('B0AE'))>0)or(GetUnitAbilityLevel((u),('B0BE'))>0)or(GetUnitAbilityLevel((u),('B0BF'))>0)or(GetUnitAbilityLevel((u),('B008'))>0)or(GetUnitAbilityLevel((u),('B04B'))>0)or(GetUnitAbilityLevel((u),('B02F'))>0)or(GetUnitAbilityLevel((u),('BUsp'))>0)or(GetUnitAbilityLevel((u),('BUst'))>0)or(GetUnitAbilityLevel((u),('B0DD'))>0)or(LoadInteger(R8,GetHandleId(u),StringHash("state"+"DisruptionState"))==1)or(LoadInteger(R8,GetHandleId(u),StringHash("state"+"AstralImprisonmentState"))==1)or(GetUnitAbilityLevel((u),('B0C2'))>0)or(GetUnitAbilityLevel((u),('B06S'))>0)or(GetUnitAbilityLevel((u),('B02S'))>0)or(GetUnitAbilityLevel((u),('B07E'))>0)
endfunction
function CM7 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetFilterUnit()!=GetEnumUnit())and(GetWidgetLife(GetFilterUnit())>.405)and(GetUnitLifePercent(GetFilterUnit())>TF7)and(GetUnitTypeId(GetFilterUnit())!='H00J'))
endfunction
function CN7 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetFilterUnit()!=GetEnumUnit())and(GetWidgetLife(GetFilterUnit())>.405)and(GetUnitLifePercent(GetFilterUnit())>40.)and(GetUnitTypeId(GetFilterUnit())!='H00J'))
endfunction
function ai_IsAllyGeneral takes nothing returns boolean
return IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit()))
endfunction
function CO7 takes nothing returns boolean
local real x1=GetUnitX(GetEnumUnit())
local real y1=GetUnitY(GetEnumUnit())
local real x2=GetUnitX(GetFilterUnit())
local real y2=GetUnitY(GetFilterUnit())
local real CP7=Atan2(y2-y1,x2-x1)
local real x=x1+800*Cos(CP7)
local real y=y1+800*Sin(CP7)
local location l=Location(x2,y2)
local integer CQ7=0
local integer C77=0
set TF7=50.
set CQ7=AN7(600,l,Condition(function CM7))
call MoveLocation(l,x,y)
set C77=AN7(600,l,Condition(function CM7))
call RemoveLocation(l)
set l=null
return k6()and(C77>=CQ7 and C77>=1)
endfunction
function CR7 takes nothing returns boolean
local real x1=GetUnitX(GetEnumUnit())
local real y1=GetUnitY(GetEnumUnit())
local real x2=GetUnitX(GetFilterUnit())
local real y2=GetUnitY(GetFilterUnit())
local real CP7=Atan2(y2-y1,x2-x1)
local real x=x1+800*Cos(CP7)
local real y=y1+800*Sin(CP7)
local location l=Location(x2,y2)
local integer C77=0
local integer CS7=GetUnitTypeId(GetFilterUnit())
set TF7=20.
call MoveLocation(l,x,y)
set C77=AN7(600,l,Condition(function CM7))
call RemoveLocation(l)
set l=null
return k6()and((GetWidgetLife(GetFilterUnit())<50+50*GetUnitAbilityLevel(GetEnumUnit(),'A2QM'))or((YO7(CS7,GX7)or YO7(CS7,GY7))and(C77<=1)))
endfunction
function CT7 takes real lifethres,unit AX7 returns unit
return B97(250,AX7,Or(Condition(function CO7),Condition(function CR7)))
endfunction
function C37 takes unit X77 returns boolean
return(LoadReal(R8,(GetHandleId(X77)),(807)))>=TimerGetElapsed(E4)
endfunction
function C67 takes unit X77 returns boolean
return(LoadReal(R8,(GetHandleId(X77)),(807)))-TimerGetElapsed(E4)<=1.5 and LoadReal(R8,(GetHandleId(X77)),(807))>=TimerGetElapsed(E4)
endfunction
function CL7 takes unit X77 returns boolean
return(LoadReal(R8,(GetHandleId(X77)),(807)))-TimerGetElapsed(E4)<=3 and LoadReal(R8,(GetHandleId(X77)),(807))>=TimerGetElapsed(E4)
endfunction
function C17 takes nothing returns boolean
return k6()and C37(GetFilterUnit())
endfunction
function ai_KaolinUltEndFilterHero takes nothing returns boolean
return k6()and C67(GetFilterUnit())
endfunction
function C07 takes nothing returns boolean
return k6()and AO7(350,GetFilterUnit(),Condition(function B87))<1 and C67(GetFilterUnit())and(A87(GetFilterUnit())or GetWidgetLife(GetFilterUnit())-6*25*(GetUnitAbilityLevel(bj_lastCreatedUnit,'A2TI'))<=GetRandomReal(75,150))
endfunction
function C57 takes nothing returns boolean
return k6()and CL7(GetFilterUnit())and(A87(GetFilterUnit())or GetWidgetLife(GetFilterUnit())-6*25*(GetUnitAbilityLevel(bj_lastCreatedUnit,'A2TI'))<=GetRandomReal(200,350))
endfunction
function C27 takes location b returns boolean
return(GetLocationX(b)!=0 or GetLocationY(b)!=0)
endfunction
function C_7 takes unit AM7,integer A67,integer L47,unit X77 returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(AM7))
if(GetPlayerController(GetOwningPlayer(AM7))!=MAP_CONTROL_COMPUTER)then
return false
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),L47,true)
call DisableTrigger(R04[O5])
if(IssueTargetOrderById(AM7,A67,X77))then
call EnableTrigger(R04[O5])
return true
endif
call EnableTrigger(R04[O5])
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),L47,(false))
return false
endfunction
function L77 takes unit x6,integer A67,integer L47,location b5 returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(x6))
if b5==null or(GetPlayerController(GetOwningPlayer(x6))!=MAP_CONTROL_COMPUTER)then
return false
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(x6),L47,(true))
call DisableTrigger(R04[O5])
if(IssuePointOrderById(x6,A67,GetLocationX(b5),GetLocationY(b5)))then
call EnableTrigger(R04[O5])
return true
endif
call EnableTrigger(R04[O5])
call SetPlayerAbilityAvailable(GetOwningPlayer(x6),L47,false)
return false
endfunction
function L87 takes location b,real x,real y returns location
if x==0 then
set x=.01
endif
if y==0 then
set y=.01
endif
call MoveLocation(b,x,y)
return b
endfunction
function L97 takes location b,unit W17 returns location
local real x=GetWidgetX(W17)
local real y=GetWidgetY(W17)
if IsUnitType(W17,UNIT_TYPE_DEAD)or IsUnit(W17,null)then
call MoveLocation(b,0,0)
return b
endif
if x==0 then
set x=.01
endif
if y==0 then
set y=.01
endif
call MoveLocation(b,x,y)
return b
endfunction
function LD7 takes unit AX7 returns boolean
local integer V37=GetHandleId(AX7)
if not HaveSavedInteger(R8,V37,StringHash("Stone|Combo"))then
return false
endif
call RemoveSavedInteger(R8,V37,StringHash("Stone|Combo"))
call RemoveSavedHandle(R8,V37,StringHash("Stone|Combo"))
return true
endfunction
function LE7 takes unit AX7,real LF7,real LG7,unit X77,integer LH7 returns boolean
local integer V37=GetHandleId(AX7)
local integer LI7=0
local integer O5=GetPlayerId(GetOwningPlayer(AX7))
local real CW7=Z87(GetUnitX(AX7),GetUnitY(AX7),LF7,LG7)
if LH7=='A2QM' then
set LI7=16
elseif LH7=='A2TJ' then
set LI7=32
elseif LH7=='A2QI' then
set LI7=48
elseif LH7=='A2TI' then
set LI7=0
else
set LI7=-1
endif
call SaveBoolean(R8,V37,StringHash("Stone|Combo"),true)
call SaveInteger(R8,V37,StringHash("Stone|Combo"),LH7)
call SaveUnitHandle(R8,V37,StringHash("Stone|Combo"),X77)
if LI7==-1 or GetUnitAbilityLevel(AX7,LH7)<1 or CI7(AX7)or Z87(GetUnitX(AX7),GetUnitY(AX7),LF7,LG7)>=1700. or V74[LI7+O5]>=Bz or LoadInteger(FY7,LH7,4+GetUnitAbilityLevel(AX7,LH7))>GetUnitState(AX7,UNIT_STATE_MANA)or(AA7(AX7)<=0)or CW7>=1600 or IssuePointOrderById(AX7,852218,LF7,LG7)==false then
call RemoveSavedInteger(R8,V37,StringHash("Stone|Combo"))
call RemoveSavedHandle(R8,V37,StringHash("Stone|Combo"))
call RemoveSavedBoolean(R8,V37,StringHash("Stone|Combo"))
return false
endif
set TH7=LH7
return true
endfunction
function LJ7 takes unit AX7,integer LH7,unit X77 returns boolean
local real LK7=CosBJ(RAbsBJ(YH7(AX7,TD7)-YH7(TD7,X77)))
if LH7=='A2TI' then
return AO7(WI7(AO7(300,AX7,Condition(function BU7))<=0,300,600),AX7,Condition(function k6))>0
elseif LH7=='A2QM' then
return LK7>=0 or IsUnitInRange(AX7,X77,175)
elseif LH7=='A2QI' then
return LK7<=0 or IsUnitInRange(AX7,X77,180)
endif
return true
endfunction
function LM7 takes unit AX7 returns boolean
local integer V37=GetHandleId(AX7)
local integer LH7=LoadInteger(R8,V37,StringHash("Stone|Combo"))
local unit X77=LoadUnitHandle(R8,V37,StringHash("Stone|Combo"))
local boolean LN7=false
local real CW7=300
local integer ZC7=0
call TriggerSleepAction(.0)
call RemoveSavedBoolean(R8,V37,StringHash("Stone|Combo"))
call RemoveSavedInteger(R8,V37,StringHash("Stone|Combo"))
if(IsUnit(TD7,null))or LH7==0 then
set X77=null
call LD7(AX7)
return false
endif
set LN7=(X77==null)or LJ7(AX7,LH7,X77)
if LH7=='A2TI' then
set X77=null
call LD7(AX7)
return LN7 and IssueImmediateOrderById(AX7,852551)
else
if LH7=='A2QM' then
set CW7=200+WI7(CK7(X77)or GetUnitMoveSpeed(AX7)>1.5*GetUnitMoveSpeed(X77),175,50)+GetRandomReal(0,25)
set ZC7=852189
elseif LH7=='A2QI' then
set CW7=1400
set ZC7=852125
elseif LH7=='A2TJ' then
set CW7=1000
set ZC7=852662
else
set X77=null
return false
endif
set X77=null
call LD7(AX7)
if LH7!='A2QM' then
return LN7 and(TD7!=null)and IsUnitInRange(AX7,TD7,CW7)and IssueTargetOrderById(AX7,ZC7,TD7)
endif
return LN7 and(TD7!=null)and IsUnitInRange(AX7,TD7,CW7)and C_7(AX7,ZC7,'A2QM',TD7)
endif
call LD7(AX7)
set X77=null
return false
endfunction
function LO7 takes boolean LP7,unit AX7,unit X77,integer LQ7 returns boolean
if not LP7 then
return false
endif
call SaveInteger(R8,GetHandleId(AX7)+StringHash("KaolinComboData"),StringHash("KaolinTarget"),LQ7)
return SaveUnitHandle(R8,GetHandleId(AX7)+StringHash("KaolinComboData"),StringHash("KaolinTarget"),X77)
endfunction
function LR7 takes unit AX7,boolean LS7,boolean b returns boolean
local unit X77=AW7(AX7)
local integer A37=AY7(AX7)
local boolean J4=false
local integer A67=0
local boolean Check=false
local real x0=GetUnitX(AX7)
local real y0=GetUnitY(AX7)
local real x=GetUnitX(X77)
local real y=GetUnitY(X77)
local real CE7=Atan2(y-y0,x-x0)
if X77==null or A37==0 then
call AZ7(AX7)
return false
endif
if A37=='A2TI' then
set J4=IssueImmediateOrderById(AX7,852551)
elseif A37=='A2QI' then
set J4=(X77!=null)and IsUnitInRange(AX7,X77,1300)and((LS7 and LE7(AX7,x+75*Cos(CE7),y+75*Sin(CE7),null,'A2QI'))or(IssueTargetOrderById(AX7,852125,X77)))
elseif A37=='A2TJ' then
set J4=(X77!=null)and((LS7 and LE7(AX7,x0+75*Cos(CE7),y0+75*Sin(CE7),null,'A2TJ'))or(IssueTargetOrderById(AX7,852662,X77)))
elseif A37=='A2QM' then
set J4=(X77!=null)and((LS7 and LE7(AX7,x0+75*Cos(CE7),y0+75*Sin(CE7),null,'A2QM'))or(IssueTargetOrderById(AX7,852189,X77)))
endif
if b then
call AZ7(AX7)
endif
return J4
endfunction
function LU7 takes nothing returns nothing
local real CE7=Atan2(GetUnitY(TW7)-GetUnitY(GetEnumUnit()),GetUnitX(TW7)-GetUnitX(GetEnumUnit()))
local real LV7=Atan2(GetUnitY(TW7)-GetUnitY(TI7),GetUnitX(TW7)-GetUnitX(TI7))
local real a=LV7-CE7
local real LW7=BS7(TI7,TW7)
local real LX7=BS7(GetEnumUnit(),TW7)
local real CY7=LW7*RAbsBJ(Sin(a))
local real LY7=LW7*RAbsBJ(Cos(a))
local real CF7
local real CG7
set CY7=WI7(LX7<=LY7,CY7,BS7(TI7,GetEnumUnit())+75.)
set CF7=GetUnitX(TW7)+Cos(CE7)*WI7(LX7<=LY7,LY7,CY7)
set CG7=GetUnitY(TW7)+Sin(CE7)*WI7(LX7<=LY7,LY7,CY7)
if(Cos(a)>=0 and LW7>LX7)then
if(CY7<=500)and(((TY7==-1)or CY7<=TY7)or(TZ7==.0 or GetWidgetLife(TW7)-TZ7<=-300.))then
set TY7=CY7
set TZ7=GetWidgetLife(TW7)
call L87(TX7,CF7,CG7)
set TA7='A2QM'
endif
elseif(Cos(a)<0)then
set CF7=GetUnitX(GetEnumUnit())-Cos(CE7)*LY7
set CG7=GetUnitY(GetEnumUnit())-Sin(CE7)*LY7
if(CY7<=500)and(((TY7==-1)or CY7<=TY7)or(TZ7==.0 or GetWidgetLife(TW7)-TZ7<=-300.))then
set TY7=CY7
set TZ7=GetWidgetLife(TW7)
call L87(TX7,CF7,CG7)
set TA7='A2QI'
endif
endif
endfunction
function LZ7 takes integer i1 returns boolean
return(i1==BU[heihuangzhang]or i1==BU[WL]or i1==BU[ZL]or i1==BU[AL]or i1==BU[LL]or i1==BU[D1]or i1==BU[E1])
endfunction
function LA7 takes integer i1,integer Iz,boolean LB7 returns boolean
if i1==Iz then
return true
elseif(i1==qiongguidun or i1==qiongguidun2)and(Iz==qiongguidun or Iz==qiongguidun2)then
return true
elseif(i1==yuandun or i1==yuandun2)and(Iz==yuandun or Iz==yuandun2)then
return true
elseif(i1==yazhizhiren or i1==yazhizhiren2)and(Iz==yazhizhiren or Iz==yazhizhiren2)then
return true
elseif(i1==suiguchui or i1==suiguchui2)and(Iz==suiguchui or Iz==suiguchui2)then
return true
elseif(i1==UZ or i1==XZ)and(Iz==UZ or Iz==XZ)then
return true
elseif(i1==huanyingfu or i1==huanyingfu2)and(Iz==huanyingfu or Iz==huanyingfu2)then
return true
elseif(i1==sijiadizhiyan or i1==sijiadizhiyan2)and(Iz==sijiadizhiyan or Iz==sijiadizhiyan2)then
return true
elseif(i1==xianfengdun or i1==xianfengdun2)and(Iz==xianfengdun or Iz==xianfengdun2)then
return true
elseif(i1==UY or i1==VY or i1==XY or i1==YY or i1==ZY or i1==AY or i1==BY or i1==CY or i1==DZ or i1==EZ)and(Iz==UY or Iz==VY or Iz==XY or Iz==YY or Iz==ZY or Iz==AY or Iz==BY or Iz==CY or Iz==DZ or Iz==EZ)then
return true
elseif(i1==zhangu or i1==zhangu2)and(Iz==zhangu or Iz==zhangu2)then
return true
elseif(i1==donglixie1 or i1==donglixie2 or i1==donglixie3)and(Iz==donglixie1 or Iz==donglixie2 or Iz==donglixie3)then
return true
elseif(i1==yingzhilingkan or i1==yingzhilingkan2)and(Iz==yingzhilingkan or Iz==yingzhilingkan2)then
return true
elseif LB7 and((i1==sanshizhiren or i1==sanshizhiren3 or i1==sanshizhiren2 or i1==sanshizhiren4)and(Iz==sanshizhiren or Iz==sanshizhiren3 or Iz==sanshizhiren2 or Iz==sanshizhiren4))then
return true
elseif(i1==sanshizhiren or i1==sanshizhiren3)and(Iz==sanshizhiren or Iz==sanshizhiren3)then
return true
elseif(i1==sanshizhiren2 or i1==sanshizhiren4)and(Iz==sanshizhiren2 or Iz==sanshizhiren4)then
return true
elseif LB7 and((i1==dagongzhishenli or i1==dagongzhishenli2 or i1==dagongzhishenli3 or i1==dagongzhishenli4 or i1==dagongzhishenli5)and(Iz==dagongzhishenli or Iz==dagongzhishenli2 or Iz==dagongzhishenli3 or Iz==dagongzhishenli4 or Iz==dagongzhishenli5))then
return true
elseif LB7 and((i1==silingshu or i1==silingshu2 or i1==silingshu3)and(Iz==silingshu or Iz==silingshu2 or Iz==silingshu3))then
return true
elseif(i1==heihuangzhang or i1==WL or i1==ZL or i1==AL or i1==LL or i1==D1 or i1==E1)and(Iz==heihuangzhang or Iz==WL or Iz==ZL or Iz==AL or Iz==LL or Iz==D1 or Iz==E1)then
return true
elseif(i1==shengdianzhihuan or i1==shengdianzhihuan2)and(Iz==shengdianzhihuan or Iz==shengdianzhihuan2)then
return true
elseif(i1==tianyingzhijie or i1==tianyingzhijie2)and(Iz==tianyingzhijie or Iz==tianyingzhijie2)then
return true
elseif(i1==huiyao or i1==huiyao2)and(Iz==huiyao or Iz==huiyao2)then
return true
elseif(i1==jingubang or i1==jingubang2)and(Iz==jingubang or Iz==jingubang2)then
return true
elseif(i1==molongzhixin or i1==molongzhixin2)and(Iz==molongzhixin or Iz==molongzhixin2)then
return true
elseif(i1==bizhang or i1==bizhang2 or i1==bizhang3 or i1==bizhang4)and(Iz==bizhang or Iz==bizhang2 or Iz==bizhang3 or Iz==bizhang4)then
return true
elseif(i1==JB or i1==QB)and(Iz==JB or Iz==QB)then
return true
elseif(i1==linkenfaqiu or i1==linkenfaqiu2)and(Iz==linkenfaqiu or Iz==linkenfaqiu2)then
return true
elseif(i1==J0 or i1==N0)and(Iz==J0 or Iz==N0)then
return true
elseif(i1==zhipeitoukui or i1==zhipeitoukui2)and(Iz==zhipeitoukui or Iz==zhipeitoukui2)then
return true
elseif(i1==zhenshibaoshi or i1==OW)and(Iz==zhenshibaoshi or Iz==OW)then
return true
elseif(i1==maidasizhishou or i1==maidasizhishou2)and(Iz==maidasizhishou or Iz==maidasizhishou2)then
return true
elseif(i1==xiwadeshouhu or i1==xiwadshouhu2)and(Iz==xiwadeshouhu or Iz==xiwadshouhu2)then
return true
endif
return false
endfunction
function LC7 takes unit it,integer Iz returns boolean
local integer i=0
local item ja
local integer i1
local boolean L37=false
set i=0
loop
exitwhen i>JV
if AU[i]==Iz or BU[i]==Iz or LU[i]==Iz then
set Iz=i
exitwhen true
endif
set i=i+1
endloop
if i>JV then
return false
endif
set i=0
set bj_lastCreatedItem=null
loop
set ja=UnitItemInSlot(it,i)
if ja!=null then
set i1=ZU7(ja)
if LA7(i1,Iz,true)then
set bj_lastCreatedItem=ja
set ja=null
return true
endif
endif
set i=i+1
exitwhen i>=bj_MAX_INVENTORY
endloop
set ja=null
return false
endfunction
function L67 takes unit it returns boolean
local integer I8=0
local item ja
set bj_lastCreatedItem=null
loop
set ja=UnitItemInSlot(it,I8)
if((ja!=null)and(GetItemTypeId(ja)==BU[mozhang]or GetItemTypeId(ja)==BU[mobang]))then
set bj_lastCreatedItem=ja
set ja=null
return true
endif
set I8=I8+1
exitwhen I8>=bj_MAX_INVENTORY
endloop
set ja=null
return false
endfunction
function LL7 takes unit j5,integer Iz returns boolean
local boolean jR=false
local integer O5
if(LC7(j5,Iz))then
set O5=GetPlayerId(GetOwningPlayer(j5))
set GZ[224+O5]=true
set jR=UnitUseItem(j5,bj_lastCreatedItem)
set GZ[224+O5]=false
endif
return jR
endfunction
function L17 takes unit L07,unit L57 returns boolean
local boolean L27=false
local integer O5=GetPlayerId(GetOwningPlayer(L07))
if((VD4)and(not VH4[O5])and(GetUnitTypeId(L07)!='H00J')and(not IsUnitIllusion(L07))and(Bz>VG4[O5])and(L57!=null)and(GetUnitLevel(L07)>5)and(GetUnitState(L07,UNIT_STATE_MANA)>300)and(not AR7(L07,BU[dagongzhishenli]))and(not AR7(L07,BU[dagongzhishenli2]))and(not AR7(L07,BU[dagongzhishenli3]))and(not AR7(L07,BU[dagongzhishenli4]))and(not AR7(L07,BU[dagongzhishenli5]))and(GetRandomInt(1,4)!=4))then
if(GetUnitLevel(L07)>12 and GetUnitLevel(L07)<20)then
set VQ4=GetRandomInt(3,5)
elseif(GetUnitLevel(L07)>19 and GetUnitLevel(L07)<25)then
set VQ4=GetRandomInt(4,5)
elseif(GetUnitLevel(L07)>24)then
set VQ4=5
else
set VQ4=GetRandomInt(1,5)
endif
set VJ4[O5]=CreateItem(VE4[VQ4],9999,-9999)
set VH4[O5]=false
if(VJ4[O5]!=null)then
set VI4[O5]=UnitItemInSlot(L07,5)
if(VI4[O5]!=null)then
call DisableTrigger(GW4)
call UnitRemoveItem(L07,VI4[O5])
call SetItemPosition(VI4[O5],9999,-9999)
call EnableTrigger(GW4)
endif
call Y07(.2)
set VH4[O5]=(UnitAddItem(L07,VJ4[O5]))
call SetItemPlayer(VJ4[O5],GetOwningPlayer(L07),true)
endif
if(VH4[O5])then
call XK7("Dagon was added successfully for |c00ffff00"+GetUnitName(L07)+"|r")
else
call XK7("Dagon FAILED to add for |c00ffff00"+GetUnitName(L07)+"|r")
if(VI4[O5]!=null)then
call Y07(.2)
call UnitAddItem(L07,VI4[O5])
call ZT7(VJ4[O5])
endif
set VH4[O5]=false
set VJ4[O5]=null
set VI4[O5]=null
endif
else
if((AR7(L07,BU[dagongzhishenli5]))and(not IsUnitIllusion(L57))and(IsUnitInRange(L07,L57,800.))and((GetUnitState(L57,UNIT_STATE_LIFE)>10.)and(GetUnitState(L57,UNIT_STATE_LIFE)<650.)))then
set L27=(L57!=null)and(UnitUseItemTarget(L07,bj_lastCreatedItem,L57))
elseif((AR7(L07,BU[dagongzhishenli4]))and(not IsUnitIllusion(L57))and(IsUnitInRange(L07,L57,750.))and((GetUnitState(L57,UNIT_STATE_LIFE)>10.)and(GetUnitState(L57,UNIT_STATE_LIFE)<550.)))then
set L27=(L57!=null)and(UnitUseItemTarget(L07,bj_lastCreatedItem,L57))
elseif((AR7(L07,BU[dagongzhishenli3]))and(not IsUnitIllusion(L57))and(IsUnitInRange(L07,L57,700.))and((GetUnitState(L57,UNIT_STATE_LIFE)>10.)and(GetUnitState(L57,UNIT_STATE_LIFE)<450.)))then
set L27=(L57!=null)and(UnitUseItemTarget(L07,bj_lastCreatedItem,L57))
elseif((AR7(L07,BU[dagongzhishenli2]))and(not IsUnitIllusion(L57))and(IsUnitInRange(L07,L57,650.))and((GetUnitState(L57,UNIT_STATE_LIFE)>10.)and(GetUnitState(L57,UNIT_STATE_LIFE)<350.)))then
set L27=(L57!=null)and(UnitUseItemTarget(L07,bj_lastCreatedItem,L57))
elseif((AR7(L07,BU[dagongzhishenli]))and(not IsUnitIllusion(L57))and(IsUnitInRange(L07,L57,600.))and((GetUnitState(L57,UNIT_STATE_LIFE)>10.)and(GetUnitState(L57,UNIT_STATE_LIFE)<250.)))then
set L27=(L57!=null)and(UnitUseItemTarget(L07,bj_lastCreatedItem,L57))
endif
endif
return L27
endfunction
function ju takes group jU,code IX returns nothing
call ForGroup(jU,IX)
call DestroyGroup(jU)
endfunction
function L_7 takes widget it returns location
call MoveLocation(HA,GetWidgetX(it),GetWidgetY(it))
return HA
endfunction
function D48 takes unit u,integer X5,unit m5 returns boolean
local integer j=0
local integer O5=0
if(h7[GetUnitUserData(m5)]!=m5)or(X5!=851983 and X5!=851986 and X5!=851971)then
return IssuePointOrderById(u,X5,GetUnitX(m5),GetUnitY(m5))
endif
set j=GetUnitUserData(m5)
if j<=0 or j>='d' then
return IssuePointOrderById(u,X5,GetUnitX(m5),GetUnitY(m5))
else
set G87=YH7(u,m5)-90
set O5=GetPlayerId(GetOwningPlayer(u))
return IssuePointOrderById(u,X5,GetUnitX(m5)+hq[864+O5]*Cos(G87*bj_DEGTORAD),GetUnitY(m5)+hq[864+O5]*Sin(G87*bj_DEGTORAD))
endif
endfunction
function j1 takes unit j4,rect Ja returns real
local real JD=GetRectCenterX(Ja)-GetUnitX(j4)
local real Je=GetRectCenterY(Ja)-GetUnitY(j4)
return SquareRoot(JD*JD+Je*Je)
endfunction
function D78 takes unit x6,integer A67,integer L47,integer n6,unit m5 returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(x6))
if(not RY4[O5]or L47==0)or(GetPlayerController(GetOwningPlayer(x6))!=MAP_CONTROL_COMPUTER)then
return false
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(x6),L47,(true))
call SetPlayerAbilityAvailable(GetOwningPlayer(x6),n6,(true))
call DisableTrigger(R04[O5])
if(IssueTargetOrderById(x6,A67,m5))then
call EnableTrigger(R04[O5])
return true
endif
call EnableTrigger(R04[O5])
call SetPlayerAbilityAvailable(GetOwningPlayer(x6),L47,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(x6),n6,false)
return false
endfunction
function D88 takes unit x6,integer A67,integer L47,integer n6,real x,real y returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(x6))
if(not RY4[O5]or L47==0)or(GetPlayerController(GetOwningPlayer(x6))!=MAP_CONTROL_COMPUTER)then
return false
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(x6),L47,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(x6),n6,true)
call DisableTrigger(R04[O5])
if(IssuePointOrderById(x6,A67,x,y))then
call EnableTrigger(R04[O5])
return true
endif
call EnableTrigger(R04[O5])
call SetPlayerAbilityAvailable(GetOwningPlayer(x6),L47,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(x6),n6,false)
return false
endfunction
function D98 takes unit u returns boolean
call SaveInteger(FY7,K,GetHandleId(u),1)
return true
endfunction
function DD8 takes unit u,string ZC7,widget W17 returns boolean
return IssueTargetOrder(u,ZC7,W17)and D98(u)
endfunction
function DE8 takes unit x6,integer X5,integer o6 returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(x6))
if(not RY4[O5]or o6==0)or(GetPlayerController(GetOwningPlayer(x6))!=MAP_CONTROL_COMPUTER)then
return false
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(x6),o6,true)
call DisableTrigger(R04[16+O5])
if(IssueImmediateOrderById(x6,X5))then
call EnableTrigger(R04[16+O5])
return true
endif
call EnableTrigger(R04[16+O5])
call SetPlayerAbilityAvailable(GetOwningPlayer(x6),o6,false)
return false
endfunction
function DF8 takes unit DG8 returns nothing
call SaveBoolean(FY7,K,GetHandleId(DG8),true)
endfunction
function Jw takes unit it returns boolean
return((AV4[GetPlayerId(GetOwningPlayer(it))]!=AX4)or(GetRandomInt(1,5)<=2))
endfunction
function JW takes unit it returns unit
if(IsUnitAlly(it,G8[0]))then
return h7[1]
else
return h7['e']
endif
endfunction
function DH8 takes unit it returns unit
if(IsUnitAlly(it,G8[0]))then
return h7[0]
else
return h7['d']
endif
endfunction
function JX takes unit it returns unit
if(IsUnitAlly(it,N8[0]))then
return h7[0]
else
return h7['d']
endif
endfunction
function DI8 takes boolean DJ8 returns integer
if(DJ8)then
return HN4
else
return HM4
endif
endfunction
function DK8 takes integer O5,boolean DJ8 returns player
if(DJ8)then
return G8[O5]
else
return N8[O5]
endif
endfunction
function DM8 takes boolean DJ8 returns player
if(DJ8)then
return RT4
else
return RU4
endif
endfunction
function DN8 takes boolean DJ8 returns player
if(DJ8)then
return RV4
else
return RW4
endif
endfunction
function LT7 takes integer Gu returns nothing
call FlushChildHashtable(R8,Gu)
endfunction
function DO8 takes integer DP8,string GW returns nothing
call RemoveSavedHandle(R8,DP8,StringHash(GW))
endfunction
function SInt takes integer Gu,string GW,integer Gy returns nothing
call SaveInteger(R8,Gu,StringHash(GW),Gy)
endfunction
function SAInt takes integer Gu,string GW,integer Gy returns integer
local integer i=LoadInteger(R8,Gu,StringHash(GW))+Gy
call SaveInteger(R8,Gu,StringHash(GW),i)
return i
endfunction
function SAReal takes integer Gu,string GW,real Gy returns real
local real i=LoadReal(R8,Gu,StringHash(GW))+Gy
call SaveReal(R8,Gu,StringHash(GW),i)
return i
endfunction
function SReal takes integer Gu,string GW,real Gy returns nothing
call SaveReal(R8,Gu,StringHash(GW),Gy)
endfunction
function DS8 takes integer Gu,string GW,string Gy returns nothing
call SaveStr(R8,Gu,StringHash(GW),Gy)
endfunction
function SBool takes integer Gu,string GW,boolean Gy returns nothing
call SaveBoolean(R8,Gu,StringHash(GW),Gy)
endfunction
function SUnit takes integer Gu,string GW,unit Gy returns nothing
call SaveUnitHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function SEff takes integer Gu,string GW,effect Gy returns nothing
call SaveEffectHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function STrig takes integer Gu,string GW,trigger Gy returns nothing
call SaveTriggerHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function DX8 takes integer Gu,string GW,lightning Gy returns nothing
call SaveLightningHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function DY8 takes integer Gu,string GW,fogmodifier Gy returns nothing
call SaveFogModifierHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function DZ8 takes integer Gu,string GW,destructable Gy returns nothing
call SaveDestructableHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function DA8 takes integer Gu,string GW,player Gy returns nothing
call SavePlayerHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function DB8 takes integer Gu,string GW,item Gy returns nothing
call SaveItemHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function SGroup takes integer Gu,string GW,group Gy returns nothing
call SaveGroupHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function STimer takes integer Gu,string GW,timer Gy returns nothing
call SaveTimerHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function D68 takes integer Gu,string GW,widget Gy returns nothing
call SaveWidgetHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function STTag takes integer Gu,string GW,texttag Gy returns nothing
call SaveTextTagHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function D18 takes integer Gu,string GW,location Gy returns nothing
call SaveLocationHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function D08 takes integer Gu,string GW,boolexpr Gy returns nothing
call SaveBooleanExprHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function D58 takes integer Gu,string GW,button Gy returns nothing
call SaveButtonHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function D28 takes integer Gu,string GW,image Gy returns nothing
call SaveImageHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function D_8 takes integer Gu,string GW,force Gy returns nothing
call SaveForceHandle(R8,Gu,StringHash(GW),Gy)
endfunction
function E48 takes integer Gu,string GW returns fogmodifier
return LoadFogModifierHandle(R8,Gu,StringHash(GW))
endfunction
function E78 takes integer Gu,string GW returns destructable
return LoadDestructableHandle(R8,Gu,StringHash(GW))
endfunction
function LUnit takes integer Gu,string GW returns unit
return LoadUnitHandle(R8,Gu,StringHash(GW))
endfunction
function LTTag takes integer Gu,string GW returns texttag
return LoadTextTagHandle(R8,Gu,StringHash(GW))
endfunction
function ED8 takes integer Gu,string GW returns player
return LoadPlayerHandle(R8,Gu,StringHash(GW))
endfunction
function LTimer takes integer Gu,string GW returns timer
return LoadTimerHandle(R8,Gu,StringHash(GW))
endfunction
function LTrig takes integer Gu,string GW returns trigger
return LoadTriggerHandle(R8,Gu,StringHash(GW))
endfunction
function LGroup takes integer Gu,string GW returns group
return LoadGroupHandle(R8,Gu,StringHash(GW))
endfunction
function LEff takes integer Gu,string GW returns effect
return LoadEffectHandle(R8,Gu,StringHash(GW))
endfunction
function EI8 takes integer Gu,string GW returns lightning
return LoadLightningHandle(R8,Gu,StringHash(GW))
endfunction
function EJ8 takes integer Gu,string GW returns location
return LoadLocationHandle(R8,Gu,StringHash(GW))
endfunction
function EK8 takes integer Gu,string GW returns item
return LoadItemHandle(R8,Gu,StringHash(GW))
endfunction
function EM8 takes integer Gu,string GW returns image
return LoadImageHandle(R8,Gu,StringHash(GW))
endfunction
function LInt takes integer Gu,string GW returns integer
return LoadInteger(R8,Gu,StringHash(GW))
endfunction
function LReal takes integer Gu,string GW returns real
return LoadReal(R8,Gu,StringHash(GW))
endfunction
function LBool takes integer Gu,string GW returns boolean
return LoadBoolean(R8,Gu,StringHash(GW))
endfunction
function EQ8 takes integer Gu,string GW returns string
return LoadStr(R8,Gu,StringHash(GW))
endfunction
function ER8 takes integer ki,string kI returns button
return LoadButtonHandle(R8,ki,StringHash(kI))
endfunction
function ES8 takes integer ki,string kI returns boolexpr
return LoadBooleanExprHandle(R8,ki,StringHash(kI))
endfunction
function ET8 takes integer ki,string kI returns force
return LoadForceHandle(R8,ki,StringHash(kI))
endfunction
function LState takes unit hI,string Hh returns boolean
return LoadInteger(R8,GetHandleId(hI),StringHash("state"+Hh))==1
endfunction
function EV8 takes trigger hI,string Hh returns boolean
return LoadInteger(R8,GetHandleId(hI),StringHash("state"+Hh))==1
endfunction
function EW8 takes unit hI,string Hh returns nothing
call SaveInteger(R8,GetHandleId(hI),StringHash("state"+Hh),1)
endfunction
function EX8 takes trigger hI,string Hh returns nothing
call SaveInteger(R8,GetHandleId(hI),StringHash("state"+Hh),1)
endfunction
function EY8 takes unit hI,string Hh returns nothing
call SaveInteger(R8,GetHandleId(hI),StringHash("state"+Hh),2)
endfunction
function EZ8 takes trigger hI,string Hh returns nothing
call SaveInteger(R8,GetHandleId(hI),StringHash("state"+Hh),2)
endfunction
function l5 takes nothing returns nothing
local integer i=0
if U9==false and PS4==false then
loop
call DisplayTimedTextToPlayer(Player(i),0,0,'x',"|c00ff0303An internal checksum has failed|r")
call DisplayTimedTextToPlayer(Player(i),0,0,'x',"|c00ff0303This might not be a serious glitch, but it is important for me to get it|r")
call DisplayTimedTextToPlayer(Player(i),0,0,'x',"|c00ff0303Please send me the replay for this game to IceFrog@gmail.com|r")
set i=i+1
exitwhen i==12
endloop
endif
endfunction
function EA8 takes trigger t returns nothing
call DisableTrigger(t)
set Dy=Dy+1
set Dx[Dy]=t
set DX[Dy]=ZM7()+60
if Dy>8000 then
call l5()
endif
endfunction
function EB8 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
call EY8(LUnit(EC8,"hero"),EQ8(EC8,"state"))
call LT7(EC8)
call EA8(t)
set t=null
return false
endfunction
function E38 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
call EZ8(LTrig(EC8,"hero"),EQ8(EC8,"state"))
call LT7(EC8)
call EA8(t)
set t=null
return false
endfunction
function AddTimedBoolBuff takes unit hI,string Hh,real Hk returns nothing
local trigger t=CreateTrigger()
call TriggerAddCondition(t,Condition(function EB8))
call TriggerRegisterTimerEvent(t,Hk,false)
call EW8(hI,Hh)
call SUnit(GetHandleId(t),"hero",hI)
call DS8(GetHandleId(t),"state",Hh)
set t=null
endfunction
function EL8 takes trigger hI,string Hh,real Hk returns nothing
local trigger t=CreateTrigger()
call TriggerAddCondition(t,Condition(function E38))
call TriggerRegisterTimerEvent(t,Hk,false)
call EX8(hI,Hh)
call STrig(GetHandleId(t),"hero",hI)
call DS8(GetHandleId(t),"state",Hh)
set t=null
endfunction
function E18 takes group g returns integer
set bj_groupCountUnits=0
call ForGroup(g,function CountUnitsInGroupEnum)
return bj_groupCountUnits
endfunction
function E08 takes force E58,force E28 returns force
local integer E_8=0
loop
exitwhen E_8>11
if IsPlayerInForce(Player(E_8),E58)then
call ForceAddPlayer(E28,Player(E_8))
endif
set E_8=E_8+1
endloop
return E28
endfunction
function F48 takes unit Y47,string F78,player F88 returns nothing
local integer E_8=0
local integer F98=0
local unit FD8=null
local real FE8=0
local string FF8=""
local string FG8=""
set E_8=GetPlayerId(F88)
set FD8=Y7[E_8]
if Y47!=null then
set F98=GetPlayerId(GetOwningPlayer(Y47))
else
set F98=15
endif
if not(F98==0 or F98==6 or F98==15)then
if FD8!=null and GetWidgetLife(FD8)>.405 and Y47!=null then
set FE8=Z47(Y47,FD8)
if FE8<=1500 then
set FF8=""
elseif FE8<=3000. then
set FF8="|c00c0c0c0"
else
set FF8="|c00a0a0a0"
endif
endif
set FG8="|r"+W[F98]+KW4[F98]+"|r: "+FF8+F78+"|r"
elseif F98==GetPlayerId(G8[0])then
set FG8="[AI] "+W[F98]+"The Sentinel|r: "+F78
elseif F98==GetPlayerId(N8[0])then
set FG8="[AI] "+W[F98]+"The Scourge|r: "+F78
elseif F98==12 then
set FG8="[AI]: "+F78+"|r"
endif
if E57[E_8]and F88==GetLocalPlayer()then
call DisplayTimedTextToPlayer(F88,0,0,10,FG8)
endif
set FD8=null
set FF8=""
endfunction
function FH8 takes group FI8,string FG8,force FJ8 returns nothing
local integer E_8=0
local unit Y47=null
local string FK8="|r"
local integer i=1
loop
exitwhen i>10
set Y47=Y7[GetPlayerId(Z17(i))]
if IsUnitInGroup(Y47,FI8)then
call GroupRemoveUnit(FI8,Y47)
set E_8=GetPlayerId(GetOwningPlayer(Y47))
if FK8!="|r" then
set FK8=FK8+", "
endif
set FK8=FK8+W[E_8]+KW4[E_8]+"|r"
endif
set i=i+1
endloop
loop
set Y47=FirstOfGroup(FI8)
exitwhen Y47==null
call GroupRemoveUnit(FI8,Y47)
set E_8=GetPlayerId(GetOwningPlayer(Y47))
if FK8!="|r" then
set FK8=FK8+", "
endif
set FK8=FK8+W[E_8]+KW4[E_8]+"|r"
endloop
set FK8=FK8+": "
if(IsPlayerInForce(GetLocalPlayer(),FJ8))or(E and GetLocalPlayer()==G8[0])then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10.,FK8)
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10.,"   - "+FG8)
endif
endfunction
function FM8 takes nothing returns nothing
local timer FN8=GetExpiredTimer()
local force FO8=null
local integer E_8=1
local unit Y47=null
local group FI8=null
local integer FP8=GetHandleId(FN8)
local string FG8=""
if LBool(FP8,"Personal")then
set FO8=ET8(FP8,"Target")
set FG8=EQ8(FP8,"SubTag")
set Y47=LUnit(FP8,"Owner")
loop
exitwhen E_8>11
if IsPlayerInForce(Player(E_8),FO8)then
if FG8==" " then
call DisplayTimedTextToPlayer(Player(E_8),0,0,10,FG8)
else
call F48(Y47,FG8,Player(E_8))
endif
endif
set E_8=E_8+1
endloop
call LT7(FP8)
call DestroyTimer(FN8)
else
set FG8=EQ8(FP8,"SubTag")
set FP8=StringHash("cAI|Re"+FG8)
set FO8=ET8(FP8,"Target")
set FI8=LGroup(FP8,"Owner")
if LInt(FP8,"CountDn")==0 then
call PauseTimer(FN8)
if E18(FI8)==1 then
set Y47=FirstOfGroup(FI8)
loop
exitwhen E_8>11
if IsPlayerInForce(Player(E_8),FO8)then
call F48(Y47,FG8,Player(E_8))
endif
set E_8=E_8+1
endloop
else
call FH8(FI8,FG8,FO8)
endif
call DestroyGroup(FI8)
call LT7(FP8)
call DestroyTimer(FN8)
else
call SInt(FP8,"CountDn",LInt(FP8,"CountDn")-1)
endif
endif
set FI8=null
set FO8=null
endfunction
function FQ8 takes unit Y47,force FO8,string FG8 returns nothing
local force FR8=null
local group FS8=null
local timer FN8=null
local integer E_8=1
local boolean L37=true
local boolean FT8=false
local integer FP8=0
if Y47==null then
set Y47=KR4[bj_forLoopAIndex]
endif
set FP8=StringHash("cAI|Re"+FG8)
set FR8=ET8(FP8,"Target")
if FR8==null and FG8!=" " then
set FT8=true
set FR8=E08(FO8,CreateForce())
call D_8(FP8,"Target",FR8)
set FN8=CreateTimer()
call DS8(GetHandleId(FN8),"SubTag",FG8)
set FS8=CreateGroup()
call GroupAddUnit(FS8,Y47)
call SGroup(FP8,"Owner",FS8)
else
if FG8==" " then
set L37=false
else
set L37=true
set E_8=1
loop
exitwhen E_8>11
if IsPlayerInForce(Player(E_8),FO8)then
if not IsPlayerInForce(Player(E_8),FR8)then
set L37=false
set E_8=11
endif
endif
set E_8=E_8+1
endloop
endif
if L37 then
set FS8=LGroup(FP8,"Owner")
call GroupAddUnit(FS8,Y47)
else
set FT8=true
set FN8=CreateTimer()
set FP8=GetHandleId(FN8)
call DS8(FP8,"SubTag",FG8)
set FR8=E08(FO8,CreateForce())
call D_8(FP8,"Target",FR8)
call SUnit(FP8,"Owner",Y47)
call SBool(FP8,"Personal",true)
endif
endif
if FT8 then
if FG8==" " then
call TimerStart(FN8,.1,false,function FM8)
else
call TimerStart(FN8,.01,true,function FM8)
endif
endif
set FR8=null
set FS8=null
endfunction
function FU8 takes force FO8,real x,real y,integer O5 returns nothing
if(IsPlayerInForce(GetLocalPlayer(),FO8))then
if GetAllyColorFilterState()==2 then
call PingMinimapEx(x,y,5.,48,230,185,true)
else
call PingMinimapEx(x,y,5.,KX4[O5],KY4[O5],KZ4[O5],true)
endif
endif
endfunction
function FV8 takes unit Y47,force FO8 returns nothing
if Y47!=null then
if GetUnitState(Y47,UNIT_STATE_LIFE)>0 then
if(IsPlayerInForce(GetLocalPlayer(),FO8))then
call PingMinimap(GetUnitX(Y47),GetUnitY(Y47),5.)
endif
else
if IsUnitAlly(Y47,G8[0])then
set Y47=IN4
else
set Y47=JS4
endif
if(IsPlayerInForce(GetLocalPlayer(),FO8))then
call PingMinimap(GetUnitX(Y47),GetUnitY(Y47),5.)
endif
endif
endif
endfunction
function FW8 takes unit Y47,string FG8 returns nothing
local integer O5=1
local real Y_7
set F57=CreateForce()
loop
exitwhen O5>11
if O5==6 then
set O5=7
endif
if IsUnitAlly(Y47,Player(O5))then
if Y7[O5]==null or GetWidgetLife(Y7[O5])<.405 then
call ForceAddPlayer(F57,Player(O5))
else
set Y_7=Z47(Y47,Y7[O5])
if Y_7<=3000. then
call ForceAddPlayer(F57,Player(O5))
endif
endif
endif
set O5=O5+1
endloop
call FQ8(Y47,F57,FG8)
call FV8(Y47,F57)
call DestroyForce(F57)
set F57=null
endfunction
function FX8 takes unit it returns nothing
if((AR7(it,BU[xuanmingdunpai]))and(UnitUseItem(it,bj_lastCreatedItem)))then
call Y07(.3)
endif
if((AR7(it,BU[meikensimu]))and(UnitUseItem(it,bj_lastCreatedItem)))then
call Y07(.3)
endif
call IssueImmediateOrderById(it,851972)
endfunction
function FY8 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0 and GetUnitAbilityLevel(GetFilterUnit(),'Asud')==0 and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit))and GetUnitTypeId(GetFilterUnit())!='u00S' and GetUnitTypeId(GetFilterUnit())!='ncop' and IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false)
endfunction
function FZ8 takes unit it,unit A77 returns boolean
local item FA8=null
local boolean FB8=false
local item FC8=null
local integer O5=GetPlayerId(GetOwningPlayer(it))
local boolean F38=(GetPlayerController(GetOwningPlayer(it))==MAP_CONTROL_COMPUTER)
local boolean F68=false
local boolean FL8=false
local real F18=0
local real F08=0
local real F58=0
if LUnit((GetHandleId(it)),"AI|TetherSource")!=null then
return false
elseif(GetUnitTypeId(it)=='H00J')then
return false
endif
if(A77==IN4 or A77==JS4)then
if G0[352+O5]or(Z47(it,A77)<3000)then
return false
endif
elseif(Z47(it,A77)<2000)then
return false
endif
if A77==IN4 or A77==JS4 then
set F08=GetUnitX(A77)
set F58=GetUnitY(A77)
else
set bj_lastLoadedUnit=DH8(it)
set F18=Atan2(GetUnitY(bj_lastLoadedUnit)-GetUnitY(A77),GetUnitX(bj_lastLoadedUnit)-GetUnitX(A77))+GetRandomReal(-HQ7,HQ7)
set F08=GetUnitX(A77)+500.*Cos(F18)
set F58=GetUnitY(A77)+500.*Sin(F18)
endif
if((GetUnitAbilityLevel(it,'A01O')>0)and(Bz>V74[32+O5]))then
if IssuePointOrderById(it,852525,F08,F58)then
return true
endif
endif
if((GetUnitAbilityLevel(it,'A0R0')>0)and(Bz>V74[O5]))then
if IssuePointOrderById(it,852600,F08,F58)then
return true
endif
endif
if not(eY[224+O5]<R2I(Bz)and GetUnitState(it,UNIT_STATE_MANA)>GF7)then
return false
endif
if not IsUnitType(A77,UNIT_TYPE_STRUCTURE)then
set bj_lastLoadedUnit=it
set bj_lastLoadedUnit=AJ7(2000.,L_7(A77),Condition(function FY8))
set FL8=((bj_lastLoadedUnit!=null)and(Z47(it,A77)>Z47(bj_lastLoadedUnit,A77)))
else
set FL8=true
endif
if(F38 and VH4[O5])then
if(AR7(it,GetItemTypeId(VJ4[O5])))then
call DisableTrigger(GW4)
call UnitRemoveItem(it,AV7(it,GetItemTypeId(VJ4[O5])))
call RemoveItem(VJ4[O5])
call EnableTrigger(GW4)
endif
if(VI4[O5]!=null)then
call Y07(.2)
call UnitAddItem(it,VI4[O5])
endif
set VH4[O5]=false
set VJ4[O5]=null
set VI4[O5]=null
endif
if(AR7(it,BU[QB]))and FL8 then
if((GetUnitAbilityLevel(it,'B07T')==0)and(GetUnitAbilityLevel(it,'B068')==0)and(GetUnitAbilityLevel(it,'B00K')==0)and(GetUnitAbilityLevel(it,'B039')==0))then
call FX8(it)
set F68=UnitUseItemPoint(it,AV7(it,BU[QB]),F08,F58)
endif
elseif(AR7(it,BU[yuanxingxie]))then
call FX8(it)
set F68=UnitUseItemPoint(it,AV7(it,BU[yuanxingxie]),GetUnitX(A77),GetUnitY(A77))
elseif(not OM7[O5])then
if(GetUnitTypeId(it)=='H00J' or IsUnitIllusion(it))or(not FL8)then
return false
endif
set FB8=false
if((not AS7(it)))then
set FB8=true
elseif(AR7(it,BU[ZA]))then
set FC8=bj_lastCreatedItem
set FB8=true
elseif(AR7(it,BU[BA]))then
set FC8=bj_lastCreatedItem
set FB8=true
elseif(AR7(it,BU[GB]))then
set FC8=bj_lastCreatedItem
set FB8=true
endif
if FB8 then
if FC8!=null then
call ZT7(FC8)
endif
set FA8=CreateItem(BU[QB],GetUnitX(it),GetUnitY(it))
set FB8=UnitAddItem(it,FA8)
call Y07(.3)
else
if(AR7(it,BU[suduzhixue]))then
set VK4[O5]=bj_lastCreatedItem
set FB8=true
call XK7("Air system get1")
endif
if FB8 then
call DisableTrigger(GW4)
call UnitRemoveItem(it,VK4[O5])
call SetItemPosition(VK4[O5],9999,-9999)
call EnableTrigger(GW4)
set FA8=CreateItem(BU[QB],GetUnitX(it),GetUnitY(it))
set FB8=UnitAddItem(it,FA8)
set VN4[O5]=true
call Y07(.3)
endif
endif
set FC8=null
if(not FB8)then
call ZT7(FA8)
call Y07(.2)
if((not AS7(it)))then
call UnitAddItem(it,VK4[O5])
call XK7("Air system return1")
set VN4[O5]=false
set VK4[O5]=null
endif
endif
if(AR7(it,BU[QB]))then
call FX8(it)
set FB8=UnitUseItemPoint(it,AV7(it,BU[QB]),F08,F58)
call Y07(.5)
set FA8=null
set F68=FB8
if not F68 then
call Y07(.01)
set F68=(eY[224+O5]>R2I(Bz)+1)
endif
endif
endif
if F68 then
set eY[224+O5]=R2I(Bz)+GE7
set eY[208+O5]=0
set h8[144+O5]=null
else
if not FB8 then
set eY[208+O5]=0
set h8[144+O5]=null
endif
if VK4[O5]!=null then
call DisableTrigger(GW4)
call RemoveItem(AV7(it,BU[QB]))
call UnitAddItem(it,VK4[O5])
call EnableTrigger(GW4)
call XK7("Air system return1")
set VK4[O5]=null
set VN4[O5]=false
endif
endif
return F68
endfunction
function F28 takes unit it,boolean J2 returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(it))
local real F_8=.0
if((not Id(O5))or(J2))then
if(GetUnitTypeId(it)!='H00J')then
set G0[32+O5]=true
if(not GZ[160+O5])and(GetUnitLifePercent(it)<30)then
if E then
call FW8(it,GG7+" Retreating")
else
call FW8(it,"Retreating")
endif
endif
set h4[O5]=null
set hq[512+O5]=.0
set GZ[128+O5]=false
set GZ[160+O5]=true
endif
if(is(it)and GetUnitAbilityLevel(it,'A0IH')<1)then
call D48(it,851986,h9[O5])
if(AR7(it,BU[luosazhifeng]))then
call UnitUseItem(it,bj_lastCreatedItem)
endif
elseif is(it)and GetUnitAbilityLevel(it,'A0IH')>=1 then
set TI7=it
set F_8=AO7(600,it,Condition(function BY7))
if F_8<2 and GetWidgetLife(it)>500. then
call FZ8(it,V_7(IsUnitAlly(it,G8[0]),IN4,JS4))
else
call IssueImmediateOrderById(it,851993)
endif
endif
endif
endfunction
function kD takes unit u returns boolean
return((GetUnitAbilityLevel(u,'B07T')>0)or(GetUnitAbilityLevel(u,'B076')>0)or(GetUnitAbilityLevel(u,'B068')>0)or(GetUnitAbilityLevel(u,'BHfs')>0)or(GetUnitAbilityLevel(u,'B00K')>0)or(GetUnitAbilityLevel(u,'B021')>0)or(GetUnitAbilityLevel(u,'B01Q')>0)or(GetUnitAbilityLevel(u,'B039')>0)or(GetUnitAbilityLevel(u,'A00J')>0)or(GetUnitAbilityLevel(u,'A0KT')>0)or(GetUnitAbilityLevel(u,'A021')>0)or(GetUnitAbilityLevel(u,'BOwk')>0))
endfunction
function G48 takes unit it returns string
if(IsUnitAlly(it,G8[0]))then
return"Sent"
else
return"Scrg"
endif
endfunction
function G78 takes nothing returns boolean
local integer O5=LInt(GetHandleId(GetTriggeringTrigger()),"pID")
local integer G88=GetPlayerId(GetOwningPlayer(h4[O5]))
if(GetWidgetLife(Y7[O5])<.405)or(Bz>hq[608+O5])or(h4[O5]==null)or(GetWidgetLife(h4[O5])<.405)or(eY[32+G88]<=0)then
call DisableTrigger(GetTriggeringTrigger())
return false
elseif(IsUnitVisibleEx(h4[O5],Player(O5)))then
if ZL7(Y7[O5])then
call IssueTargetOrderById(Y7[O5],851983,h4[O5])
endif
call DisableTrigger(GetTriggeringTrigger())
return false
endif
if is(Y7[O5])then
if(((IsVisibleToPlayer(GetUnitX(h4[O5]),GetUnitY(h4[O5]),Player(O5)))and(not IsUnitHidden(h4[O5])))or((eY[32+G88]<2)and(kD(h4[O5]))))then
if(AR7(Y7[O5],BU[silingshu3]))then
call UnitUseItem(Y7[O5],bj_lastCreatedItem)
elseif(AR7(Y7[O5],BU[YB]))and(Z47(Y7[O5],h4[O5])<=600)then
call UnitUseItem(Y7[O5],bj_lastCreatedItem)
elseif(AR7(Y7[O5],BU[GB]))and((GetUnitX(h4[O5])!=0)or(GetUnitY(h4[O5])!=0))then
call UnitUseItemPoint(Y7[O5],bj_lastCreatedItem,GetUnitX(h4[O5]),GetUnitY(h4[O5]))
else
if(not LBool(S44,G48(Y7[O5])+"|W"))then
call SBool(S44,G48(Y7[O5])+"|W",true)
endif
call DisableTrigger(GetTriggeringTrigger())
return false
endif
endif
if eY[464+G88]==851986 or eY[464+G88]==851971 or eY[464+G88]==851990 then
call IssuePointOrderById(Y7[O5],851986,I2R(eY[480+G88]),I2R(eY[496+G88]))
else
call D48(Y7[O5],851986,h4[O5])
endif
endif
return false
endfunction
function J3 takes unit it,boolean J2 returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(it))
local boolean J4=false
local real F_8=.0
if(GetUnitAbilityLevel(it,'A0IH')>0)and AO7(700.,it,Condition(function A27))==0 then
set TI7=it
set F_8=AO7(600,it,Condition(function BY7))
set J4=is(it)and(F_8>=2 or GetUnitLifePercent(it)<=87. or GetWidgetLife(it)<=700.)and IssueImmediateOrderById(it,851993)
return
endif
if(A87(it))then
if(J2)then
if(not Id(O5))then
call F28(it,true)
elseif((Z_7(h4[O5]))and(GetUnitAbilityLevel(h4[O5],'B02F')==0))then
call IssueTargetOrderById(it,851983,h4[O5])
endif
else
call F28(it,false)
endif
elseif(G0[272+O5]or is(it))and((J2)or(((not GZ[128+O5])or((GetUnitCurrentOrder(it)!=851983)and(GetUnitCurrentOrder(it)!=851993)))and(iU(it))))then
if((G0[O5])or(G0[48+O5])or(not G0[128+O5]))then
set J4=D48(it,851986,h9[O5])
endif
if(h4[96+O5]!=null)and(GetUnitTypeId(h4[96+O5])=='u00S')then
set J4=IssueTargetOrderById(it,851983,h4[96+O5])
endif
if((not J4)and(h4[O5]!=null)and(Z_7(h4[O5]))and(GetUnitAbilityLevel(h4[O5],'B02F')==0))then
if IsUnitVisibleEx(h4[O5],GetOwningPlayer(it))then
set bj_lastLoadedUnit=it
if LBool(GetHandleId(h4[O5]),"XMarked")then
call MoveLocation(HA,LReal(GetHandleId(h4[O5]),"AI|XMark|X"),LReal(GetHandleId(h4[O5]),"AI|XMark|Y"))
if(not IsUnitInRangeLoc(h4[O5],HA,600.))then
set J4=IssuePointOrderByIdLoc(it,851986,HA)
else
set J4=IssueTargetOrderById(it,851983,h4[O5])
endif
elseif LState(it,"AI|Lasso")then
set J4=IssueTargetOrderById(it,851986,h9[O5])
elseif(GetUnitTypeId(it)=='Ekee' and GetHeroLevel(it)>=6)and(eY[320+O5]>=0)and(not IsUnitInRange(it,h4[O5],300))and((GetUnitLifePercent(it)>80)or(GetUnitLifePercent(it)>(GetUnitLifePercent(h4[O5])+30)))and(GetUnitManaPercent(it)>20)and(h4[304+O5]==null)and(AO7(900,h4[O5],Condition(function AQ7))==0)then
set J4=IssueTargetOrderById(it,851986,h4[O5])
else
set J4=IssueTargetOrderById(it,851983,h4[O5])
endif
set hq[608+O5]=Bz+HN7
elseif hq[608+O5]>Bz and eY[32+GetPlayerId(GetOwningPlayer(h4[O5]))]>0 then
if not IsVisibleToPlayer(GetUnitX(h4[O5]),GetUnitY(h4[O5]),GetOwningPlayer(it))then
call EnableTrigger(R04[96+O5])
set J4=D48(it,851986,h4[O5])
endif
else
call DisableTrigger(R04[96+O5])
endif
endif
set I97=LoadUnitHandle(R8,(GetHandleId(it)),(652))
set ID7=LUnit((GetHandleId(it)),"AI|TetherSource")
if(J4)then
elseif(I97!=null)and(not IsUnitInRange(it,I97,700)and(IsUnitType(I97,UNIT_TYPE_HERO)))then
call D48(it,851986,I97)
elseif(ID7!=null)and(not IsUnitInRange(it,ID7,700))then
call D48(it,851986,ID7)
elseif((eY[O5]>=9))then
if eY[272+O5]<=2 then
if((G0[176+O5])or(h8[48+O5]!=h8[32+O5]))then
call D48(it,851983,h8[48+O5])
else
call D48(it,851986,h9[O5])
endif
endif
elseif((eY[O5]==3)or(eY[O5]==4))then
elseif GZ[160+O5]or(not G0[128+O5])then
call D48(it,851986,h9[O5])
else
call D48(it,851983,h8[O5])
endif
endif
endfunction
function G98 takes integer O5,unit j5,integer o6 returns nothing
call XM7(O5,"AIDisableSpell "+GG7+" "+GetObjectName(o6))
call DisableTrigger(R04[O5])
if((not A87(j5))and(not G0[O5])and(not G0[64+O5])and(G0[128+O5])and(h4[O5]!=null)and(Z_7(h4[O5]))and(IsUnitVisibleEx(h4[O5],GetOwningPlayer(j5))))then
call IssueTargetOrderById(j5,851983,h4[O5])
set GZ[48+O5]=true
else
call J3(j5,true)
endif
call EnableTrigger(R04[O5])
if(o6!=0)then
call SetPlayerAbilityAvailable(GetOwningPlayer(j5),o6,not(GetPlayerController(Player(O5))==MAP_CONTROL_COMPUTER))
endif
endfunction
function J6 takes integer O5,unit j5,integer o6,integer n6 returns nothing
call G98(O5,j5,o6)
call SetPlayerAbilityAvailable(GetOwningPlayer(j5),n6,not((GetPlayerController(GetOwningPlayer(j5))==MAP_CONTROL_COMPUTER)))
endfunction
function J7 takes integer O5,unit j5,integer o6 returns nothing
call DisableTrigger(R04[O5])
if((not A87(j5))and(not G0[O5])and(not G0[64+O5])and(G0[128+O5])and(h4[O5]!=null)and(Z_7(h4[O5]))and(IsUnitVisibleEx(h4[O5],GetOwningPlayer(j5))))then
call IssueTargetOrderById(j5,851983,h4[O5])
set GZ[48+O5]=true
else
call J3(j5,true)
endif
call EnableTrigger(R04[O5])
call SetPlayerAbilityAvailable(GetOwningPlayer(j5),o6,not(GetPlayerController(GetOwningPlayer(j5))==MAP_CONTROL_COMPUTER))
endfunction
function J8 takes integer O5,boolean J9 returns boolean
set GZ[O5]=false
return J9
endfunction
function GD8 takes unit u returns boolean
if(IsUnitAlly(u,G8[0]))then
return(IsUnitInRange(u,IN4,1100.))
else
return(IsUnitInRange(u,JS4,1100.))
endif
endfunction
function kA takes unit IB,unit m5,real kb returns boolean
if(IsUnitAlly(m5,G8[0]))then
return(Z47(IB,h7[0])-Z47(m5,h7[0]))>kb
else
return(Z47(IB,h7['d'])-Z47(m5,h7['d']))>kb
endif
endfunction
function kB takes boolean J4,group jU returns integer
local unit it
local integer kc=0
local boolean kC=false
local boolean kd=false
loop
set it=FirstOfGroup(jU)
exitwhen(it==null)
if(GetUnitTypeId(it)=='H00I')then
set kc=kc+1
set kd=true
elseif(GetUnitTypeId(it)!='H00J')then
set kc=kc+1
elseif(not kC)then
set kC=true
endif
call GroupRemoveUnit(jU,it)
endloop
if((kC)and((not kd)or(J4)))then
set kc=kc+1
endif
return kc
endfunction
function kE takes string kf,string kF returns integer
local integer kg=StringLength(kf)
local integer kG=0
loop
exitwhen kg<=kG
if(SubString(kf,kg,kg+1)==kF)then
return kg
endif
set kg=kg-1
endloop
return-1
endfunction
function kh takes string kf returns integer
local integer kg=0
local integer kG=StringLength(kf)
loop
exitwhen kg>=kG
if(SubString(kf,kg,kg+1)==",")then
return kg
endif
set kg=kg+1
endloop
return-1
endfunction
function kj takes nothing returns nothing
set GT=false
endfunction
function kJ takes real x,real y returns boolean
set GT=true
call SetRect(He,x-160.,y-160.,x+160.,y+160.)
call EnumDestructablesInRect(He,R24,function kj)
return GT
endfunction
function kk takes unit it,real IW,unit r returns location
local integer kK=0
local real kl=Atan2(GetUnitY(r)-GetUnitY(it),GetUnitX(r)-GetUnitX(it))
loop
if(kJ(GetUnitX(it)+IW*Cos(kl),GetUnitY(it)+IW*Sin(kl)))then
call MoveLocation(HB,GetUnitX(it)+IW*Cos(kl),GetUnitY(it)+IW*Sin(kl))
return HB
endif
set kK=kK+1
set IW=IW-50.
exitwhen(kK>5)
endloop
return null
endfunction
function kL takes unit it,unit m5,real km returns location
local real IW=Z87(GetUnitX(it),GetUnitY(it),GetUnitX(m5),GetUnitY(m5))+km
local real kl=0
local integer kK=0
set kK=GetPlayerId(GetOwningPlayer(m5))
set kl=Atan2(GetUnitY(h9[kK])-GetUnitY(m5),GetUnitX(h9[kK])-GetUnitX(m5))
set kK=0
loop
if(kJ(GetUnitX(it)+IW*Cos(kl),GetUnitY(it)+IW*Sin(kl)))then
call MoveLocation(HB,GetUnitX(it)+IW*Cos(kl),GetUnitY(it)+IW*Sin(kl))
return HB
endif
set kK=kK+1
set IW=IW-50.
exitwhen(kK>5)
endloop
return null
endfunction
function GE8 takes unit it returns boolean
return((GetUnitAbilityLevel(it,'A04R')==0)and(GetUnitAbilityLevel(it,'Aloc')==0))
endfunction
function GF8 takes unit it returns boolean
return((GetUnitAbilityLevel(it,'A04R')==0)and(GetUnitAbilityLevel(it,'Aloc')==0)and(GetUnitTypeId(it)!='ushd')and(GetUnitTypeId(it)!='n01Q')and(GetUnitTypeId(it)!='n01R'))
endfunction
function GG8 takes unit u returns boolean
return(IsUnitType(u,UNIT_TYPE_MELEE_ATTACKER))
endfunction
function GH8 takes unit x6 returns integer
return(GetItemTypeId(UnitItemInSlot(x6,GetIssuedOrderId()-852008)))
endfunction
function GI8 takes integer Iz returns boolean
return((Iz=='A09V')or(Iz=='AHfa')or(Iz=='AZ2G')or(Iz=='A0C4')or(Iz=='A0OI')or(Iz=='A026')or(Iz=='A0DY')or(Iz=='A0LZ')or(Iz=='A0QN'))
endfunction
function kP takes integer i1 returns boolean
return((i1=='U000')or(i1=='E004')or(i1=='UC60')or(i1=='UC42')or(i1=='Udea')or(i1=='Ubal')or(i1=='Nfir')or(i1=='Ofar')or(i1=='U00P')or(i1=='N00R')or(i1=='H008')or(i1=='E005')or(i1=='Harf')or(i1=='Naka')or(i1=='Hvwd')or(i1=='Emoo')or(i1=='HC92')or(i1=='Ucrl')or(i1=='U01X')or(i1=='Otch')or(i1=='N01A')or(i1=='Ogrh')or(i1=='Hamg')or(i1=='N01V')or(YO7(i1,GX7)))
endfunction
function kq takes integer i1 returns boolean
return(not YO7(i1,GX7))
endfunction
function kQ takes unit u returns boolean
return((GetUnitAbilityLevel(u,'B05D')>0)or(GetUnitAbilityLevel(u,'B05M')>0)or(GetUnitAbilityLevel(u,'B05N')>0)or(GetUnitAbilityLevel(u,'B05O')>0))
endfunction
function kr takes unit u returns boolean
return((GetUnitAbilityLevel(u,'B078')>0)or(GetUnitAbilityLevel(u,'Bena')>0)or(GetUnitAbilityLevel(u,'Beng')>0)or(GetUnitAbilityLevel(u,'B0C1')>0))
endfunction
function GJ8 takes integer Iz returns boolean
return((Iz==BU[dagongzhishenli])or(Iz==BU[dagongzhishenli2])or(Iz==BU[dagongzhishenli3])or(Iz==BU[dagongzhishenli4])or(Iz==BU[dagongzhishenli5]))
endfunction
function ks takes integer Iz returns boolean
return((Iz==BU[silingshu])or(Iz==BU[silingshu2])or(Iz==BU[silingshu3]))
endfunction
function kS takes unit u returns integer
local integer kt=GetUnitAbilityLevel(u,'A02C')
if(kt==4)then
return'A07M'
elseif(kt==3)then
return'A07J'
elseif(kt==2)then
return'A07I'
elseif(kt==1)then
return'A07H'
else
return'A0P6'
endif
endfunction
function kT takes unit u returns integer
local integer kt=GetUnitAbilityLevel(u,'A02C')
if(kt==4)then
return'A078'
elseif(kt==3)then
return'A074'
elseif(kt==2)then
return'A072'
elseif(kt==1)then
return'A06N'
else
return'A02M'
endif
endfunction
function GK8 takes unit u returns integer
local integer kt=GetUnitAbilityLevel(u,'A02C')
if(kt==4)then
return'A04N'
elseif(kt==3)then
return'A04M'
elseif(kt==2)then
return'A04J'
elseif(kt==1)then
return'A03J'
else
return'A073'
endif
endfunction
function GM8 takes unit u returns integer
local integer kt=GetUnitAbilityLevel(u,'A088')
if(kt==3)then
return'A08D'
elseif(kt==2)then
return'A08A'
elseif(kt==1)then
return'A089'
else
return'A04W'
endif
endfunction
function GN8 takes unit u returns integer
local integer kt=GetUnitAbilityLevel(u,'A088')
if(kt==3)then
return'A00F'
elseif(kt==2)then
return'A01T'
elseif(kt==1)then
return'A007'
else
return'A011'
endif
endfunction
function GO8 takes unit u returns integer
local integer kt=GetUnitAbilityLevel(u,'A088')
if(kt==3)then
return'A08I'
elseif(kt==2)then
return'A08G'
elseif(kt==1)then
return'A08F'
else
return'A083'
endif
endfunction
function GP8 takes integer Iz returns integer
if((Iz==BU[tieshuzhigan])or(Iz==BU[ZA])or(Iz==BU[BA])or(Iz==BU[JB])or(Iz==BU[QB]))then
return'd'
elseif((Iz==BU[liliangshoutao])or(Iz==BU[minjiebianxie])or(Iz==BU[zhilidoupeng])or(Iz==BU[guizuyuanhuan])or(Iz==BU[shouhuzhihuan]))then
return 150
elseif((Iz==BU[yazhizhiren])or(Iz==BU[yazhizhiren2]))then
return 225
elseif((Iz==BU[yirenmianzhao])or(Iz==BU[huifujiezhi])or(Iz==BU[GB])or(Iz==BU[yuandun]))then
return 350
elseif((Iz==BU[suduzhixue])or(Iz==BU[jurenliliangyaodai])or(Iz==BU[jinglingpixue])or(Iz==BU[fashichangpao])or(Iz==BU[huwan])or(Iz==BU[youlingxidai])or(Iz==BU[wuyongguajian])or(Iz==BU[shengdianzhihuan]))then
return 450
elseif((Iz==BU[gongjizhizhao])or(Iz==BU[suozijia])or(Iz==BU[liulangfashidoupeng])or(Iz==BU[jiasushoutao])or(Iz==BU[zhenshibaoshi])or(Iz==BU[huifutoujin]))then
return 650
elseif((Iz==BU[tieyitoukui])or(Iz==BU[siwangmianju])or(Iz==BU[shirenmozhifu])or(Iz==BU[huanxinzhiren])or(Iz==BU[molifazhang])or(Iz==BU[zhiliaozhihuan])or(Iz==BU[xuwubaoshi])or(Iz==BU[nengliangzhiqiu])or(Iz==BU[xuanmingdunpai]))then
return 950
elseif((Iz==BU[kuojian])or(Iz==BU[duangun])or(Iz==BU[jingqizhiqiu])or(Iz==BU[huolizhiqiu]))then
return 1200
elseif((Iz==BU[dajian])or(Iz==BU[miyinchui])or(Iz==BU[banjia])or(Iz==BU[donglixie1])or(Iz==BU[jianrenqiu])or(Iz==BU[renjia])or(Iz==BU[W5])or(Iz==BU[mifaxie]))then
return 1500
elseif((Iz==BU[keledebishou])or(Iz==BU[maidasizhishou])or(Iz==BU[kongmingzhang])or(Iz==BU[fengkuangmianju])or(Iz==BU[renjia])or(Iz==BU[zhipeitoukui])or(Iz==BU[sanhua])or(Iz==BU[yecha])or(Iz==BU[jipin])or(Iz==BU[tiaozhantoujin]))then
return 2000
elseif((Iz==BU[jixianfaqiu])or(Iz==BU[emodaofeng])or(Iz==BU[zhenfenbaoshi])or(Iz==BU[yuanxingxie])or(Iz==BU[shuijingjian])or(Iz==BU[jipin])or(Iz==BU[meikensimu]))then
return 2500
elseif((Iz==BU[ximeisitedelveduo])or(Iz==BU[shenmifazhang])or(Iz==BU[suiguchui2])or(Iz==BU[suiguchui])or(Iz==BU[euldeshenshengfazhang])or(Iz==BU[sanshizhiren])or(Iz==BU[dagongzhishenli])or(Iz==BU[silingshu]))then
return 3000
elseif((Iz==BU[yingjiaogong])or(Iz==BU[xuanwo])or(Iz==BU[zhenhunshi]))then
return 3500
elseif((Iz==BU[shengzheyiwu])or(Iz==BU[luosazhifeng])or(LZ7(Iz))or(Iz==BU[silingshu2])or(Iz=='olig'))then
return 4000
elseif((Iz==BU[anmie])or(Iz==BU[dagongzhishenli2]))then
return 4500
elseif((Iz==BU[sanyeduijian])or(Iz==BU[silingshu3])or(Iz==BU[kuangzhanfu])or(Iz==BU[xieeliandao])or(Iz==BU[ziyuan]))then
return 5000
elseif((Iz==BU[huanyingfu])or(Iz==BU[huanyingfu2])or(Iz==BU[dagongzhishenli3])or(Iz==BU[linkenfaqiu])or(Iz==BU[molongzhixin])or(Iz==BU[jingubang])or(Iz==BU[huiyao])or(Iz==BU[shuaxinqiu])or(Iz==BU[xuejingshi]))then
return 5500
elseif((Iz==BU[qiangxizhuangjia])or(Iz==BU[dagongzhishenli4])or(Iz==BU[dapao])or(Iz==BU[hudie])or(Iz==BU[sadanzhixieli])or(Iz=='sor3')or(Iz=='sor4')or(Iz=='sor5')or(Iz=='sor6')or(Iz=='I016')or(Iz=='I006'))then
return 6000
elseif((Iz==BU[dagongzhishenli5])or(Iz==BU[sijiadizhiyan2])or(Iz==BU[sijiadizhiyan])or(Iz==BU[leishenzhichui]))then
return 7000
elseif(Iz==BU[J0])then
return 8000
endif
return 500
endfunction
function B6 takes trigger kW,playerunitevent kx returns nothing
call TriggerRegisterPlayerUnitEvent(kW,G8[1],kx,R24)
call TriggerRegisterPlayerUnitEvent(kW,G8[2],kx,R24)
call TriggerRegisterPlayerUnitEvent(kW,G8[3],kx,R24)
call TriggerRegisterPlayerUnitEvent(kW,G8[4],kx,R24)
call TriggerRegisterPlayerUnitEvent(kW,G8[5],kx,R24)
endfunction
function c6 takes trigger kW,playerunitevent kx returns nothing
call TriggerRegisterPlayerUnitEvent(kW,N8[1],kx,R24)
call TriggerRegisterPlayerUnitEvent(kW,N8[2],kx,R24)
call TriggerRegisterPlayerUnitEvent(kW,N8[3],kx,R24)
call TriggerRegisterPlayerUnitEvent(kW,N8[4],kx,R24)
call TriggerRegisterPlayerUnitEvent(kW,N8[5],kx,R24)
endfunction
function ky takes trigger kW,playerunitevent kx returns nothing
call B6(kW,kx)
call c6(kW,kx)
endfunction
function GQ8 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(Z_7(GetFilterUnit()))and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))))
endfunction
function GR8 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))and(Z_7(GetFilterUnit()))and(eY[32+GetPlayerId(GetOwningPlayer(GetFilterUnit()))]>0)and(ZD7(GetFilterUnit())==bj_forLoopBIndex))
endfunction
function GS8 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))and(Z_7(GetFilterUnit())))
endfunction
function GT8 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))and(Z_7(GetFilterUnit()))and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit))))
endfunction
function GU8 takes unit u returns boolean
return GetUnitAbilityLevel(u,'A0S6')>0 or GetUnitAbilityLevel(u,'A179')>0 or GetUnitAbilityLevel(u,'ACmi')>0 or GetUnitAbilityLevel(u,'A0SU')>0 or GetUnitAbilityLevel(u,'B014')>0 or GetUnitAbilityLevel(u,'A0H3')>0 or LState(u,"BladeFury|Active")
endfunction
function GV8 takes unit u returns boolean
return((GetUnitAbilityLevel(u,'A0RN')>0)or(GU8(u))or(GetUnitAbilityLevel(u,'A2T4')>0)or(GZ[256+GetPlayerId(GetOwningPlayer(u))]))
endfunction
function GW8 takes unit V07 returns boolean
local real x=GetUnitX(V07)
local real y=GetUnitY(V07)
if IsUnitAlly(V07,G8[0])then
return x<GetRectMaxX(XD)and x>GetRectMinX(XD)and y<GetRectMaxY(XD)and y>GetRectMinY(XD)
endif
return x<GetRectMaxX(WD)and x>GetRectMinX(WD)and y<GetRectMaxY(WD)and y>GetRectMinY(WD)
endfunction
function GX8 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(Z_7(GetFilterUnit()))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false and GetUnitAbilityLevel(GetFilterUnit(),'Avul')==0)and GW8(GetFilterUnit())==false)
endfunction
function GY8 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(Z_7(GetFilterUnit())))
endfunction
function GZ8 takes nothing returns boolean
if((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(Z_7(GetFilterUnit())))then
if(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))then
return true
elseif(not kD(GetFilterUnit()))then
return((eY[32+GetPlayerId(GetOwningPlayer(GetFilterUnit()))]>0)or(IsUnitInRange(GetFilterUnit(),GetTriggerUnit(),600.)))
else
return(eY[32+GetPlayerId(GetOwningPlayer(GetFilterUnit()))]>2)
endif
endif
return false
endfunction
function GA8 takes nothing returns boolean
return((GetFilterUnit()!=bj_lastLoadedUnit)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))and(Z_7(GetFilterUnit()))and(not A87(GetFilterUnit())))
endfunction
function GB8 takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))and(GetOwningPlayer(GetFilterUnit())!=Player(12))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))and(GF8(GetFilterUnit())))
endfunction
function k0 takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(GetOwningPlayer(GetFilterUnit())!=Player(12))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(GF8(GetFilterUnit())))
endfunction
function GC8 takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and((i1=='e00S')or(i1=='e011')or(i1=='e00R')or(i1=='e019')or(i1=='u00N')or(i1=='u00D')or(i1=='u00M')or(i1=='u00T')))
endfunction
function IsEnemyTowerInRangeAttacker takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetAttacker())))and(GetWidgetLife(GetFilterUnit())>.405)and((i1=='e00S')or(i1=='e011')or(i1=='e00R')or(i1=='e019')or(i1=='u00N')or(i1=='u00D')or(i1=='u00M')or(i1=='u00T')))
endfunction
function TorrentedKillableFilter takes nothing returns boolean
return A87(GetFilterUnit())and GetUnitAbilityLevel(GetFilterUnit(),'B09Q')>0
endfunction
function k2 takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(GetOwningPlayer(GetFilterUnit())!=Player(12))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(GF8(GetFilterUnit())))
endfunction
function k3 takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(GF8(GetFilterUnit())))
endfunction
function G38 takes nothing returns boolean
return(GetWidgetLife(GetFilterUnit())>.405)and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_DEAD)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_SUMMONED)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false)and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))
endfunction
function G68 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(not IsUnitIllusion(GetFilterUnit()))and(GetFilterUnit()!=GetTriggerUnit())and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function k5 takes nothing returns boolean
return((IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GetFilterUnit()!=GetTriggerUnit())and(GetWidgetLife(GetFilterUnit())>.405)and(GF8(GetFilterUnit())))
endfunction
function IsAllyTowerInRangeTrig takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and((i1=='e00S')or(i1=='e011')or(i1=='e00R')or(i1=='e019')or(i1=='u00N')or(i1=='u00D')or(i1=='u00M')or(i1=='u00T')))
endfunction
function GL8 takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit()))and Z_7(GetFilterUnit())and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit()))and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0
endfunction
function G18 takes nothing returns boolean
return IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit()))and Z_7(GetFilterUnit())and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit()))and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0
endfunction
function G08 takes nothing returns boolean
return not IsUnitInRange(GetFilterUnit(),GetEnumUnit(),SD7)
endfunction
function G58 takes nothing returns boolean
local integer i=GetUnitTypeId(GetFilterUnit())
return i=='n00H' or i=='n00G' or i=='n00K' or i=='n00J' or i=='n00A' or i=='n006'
endfunction
function G28 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(Z_7(GetFilterUnit()))and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0)and AO7(300,GetFilterUnit(),Condition(function G38))==0)
endfunction
function G_8 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetUnitLifePercent(GetFilterUnit())<=40.)and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(Z_7(GetFilterUnit()))and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0))
endfunction
function H48 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function H78 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function H88 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)!=null)
endfunction
function H98 takes nothing returns boolean
return(not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))
endfunction
function k642 takes nothing returns boolean
return((not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function k65 takes nothing returns boolean
return(not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_DEAD)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_SUMMONED)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false)and((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))or(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))))
endfunction
function k7 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetUnitLifePercent(GetFilterUnit())<50.))
endfunction
function HD8 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetUnitLifePercent(GetFilterUnit())<30.))
endfunction
function k8 takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetOwningPlayer(GetFilterUnit())!=Player(12))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GF8(GetFilterUnit())))
endfunction
function HE8 takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit()))))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GF8(GetFilterUnit()))
endfunction
function k9 takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and((GetOwningPlayer(GetFilterUnit())==G8[0])or(GetOwningPlayer(GetFilterUnit())==N8[0]))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GF8(GetFilterUnit()))and(GetUnitState(GetFilterUnit(),UNIT_STATE_MANA)>200.))
endfunction
function Ka takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetOwningPlayer(GetFilterUnit())!=Player(12))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GF8(GetFilterUnit())))
endfunction
function KA takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GF8(GetFilterUnit())))
endfunction
function HF8 takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))and(GF8(GetFilterUnit())))
endfunction
function KA_Ally takes nothing returns boolean
return((not IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GF8(GetFilterUnit())))
endfunction
function HG8 takes nothing returns boolean
if((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(not IsUnitIllusion(GetFilterUnit()))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit))))then
if Z47(GetFilterUnit(),bj_lastLoadedUnit)<=250 then
if GetUnitLifePercent(GetFilterUnit())>F37 then
set H04=GetFilterUnit()
set F37=GetUnitLifePercent(H04)
endif
else
if GetUnitLifePercent(GetFilterUnit())>F67 then
set H54=GetFilterUnit()
set F67=GetUnitLifePercent(H54)
endif
endif
endif
return false
endfunction
function HH8 takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and((i1=='e00S')or(i1=='e011')or(i1=='e00R')or(i1=='e019')or(i1=='u00N')or(i1=='u00D')or(i1=='u00M')or(i1=='u00T')))and(XD7(GetFilterUnit())>=1)
endfunction
function HI8 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(Z_7(GetFilterUnit())))and(XD7(GetFilterUnit())>=1)
endfunction
function IsUnitAllyHeroAttacking takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetFilterUnit()!=GetEnumUnit())and(GetWidgetLife(GetFilterUnit())>.405))and XG7(GetFilterUnit())
endfunction
function HJ8 takes nothing returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(GetFilterUnit()))
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit()))))and(R_7<=1)and(GetWidgetLife(h4[O5])>GetWidgetLife(GetFilterUnit())or(XD7(GetFilterUnit())>=3 and GetWidgetLife(GetFilterUnit())<=400.)or G0[256+O5]==false)
endfunction
function HK8 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetFilterUnit()!=GetEnumUnit())and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function HM8 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(Z_7(GetFilterUnit())))
endfunction
function HN8 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit))))
endfunction
function HO8 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit))))
endfunction
function HP8 takes nothing returns nothing
local integer HQ8=AO7(RM7,GetEnumUnit(),RN7)
local integer CQ7=AO7(RM7,RH7,RN7)
if(RH7==null)or(HQ8>CQ7)then
set RH7=GetEnumUnit()
endif
endfunction
function HR8 takes real HS8,real HT8,unit XE7,integer HU8,boolexpr Ig,boolexpr HV8 returns unit
set RF7=HU8
set RM7=HT8
set RN7=HV8
set RH7=null
call GroupClear(RG7)
call GroupEnumUnitsInRange(RG7,GetUnitX(XE7),GetUnitY(XE7),HS8,Ig)
call GroupRemoveUnit(RG7,XE7)
call ForGroup(RG7,function HP8)
call DestroyBoolExpr(Ig)
if HV8!=null then
call DestroyBoolExpr(RN7)
endif
set RN7=null
set Ig=null
return RH7
endfunction
function HW8 takes unit HX8,unit HY8 returns boolean
local integer HZ8=GetHeroLevel(HX8)
local integer HA8=GetHeroLevel(HY8)
local integer YP7=YM7(GetUnitTypeId(HY8))
if YP7==GT7 or YP7==GU7 then
return GetUnitLifePercent(HY8)>=GetUnitLifePercent(HX8)and(HA8>13)and(HZ8>HA8 or IAbsBJ(HZ8-HA8)<5)
endif
return GetUnitState(HY8,UNIT_STATE_LIFE)<=400 or GetUnitLifePercent(HY8)>=GetUnitLifePercent(HX8)
endfunction
function HB8 takes nothing returns nothing
local integer HQ8=AO7(SV7+SW7,GetEnumUnit(),Condition(function HN8))
local integer CQ7=AO7(SV7+SW7,RH7,Condition(function HN8))
local integer HC8=AO7(SV7+SW7,RH7,Condition(function HM8))
local real H38=RK7
local integer H68=AO7(SV7+SW7,GetEnumUnit(),Condition(function HM8))
local real HL8=RK7
if(RH7==null)or(H68>HC8)then
set RH7=GetEnumUnit()
elseif H68==HC8 then
set RH7=V_7(HL8>=H38 or HQ8>=CQ7,GetEnumUnit(),RH7)
endif
endfunction
function H18 takes real HS8,unit XE7,integer HU8,boolexpr Ig returns unit
set RF7=HU8
set RH7=null
call GroupClear(RG7)
call GroupEnumUnitsInRange(RG7,GetUnitX(XE7),GetUnitY(XE7),HS8,Ig)
call GroupRemoveUnit(RG7,XE7)
call ForGroup(RG7,function HB8)
call DestroyBoolExpr(Ig)
set Ig=null
return RH7
endfunction
function H08 takes nothing returns nothing
local unit X77=GetEnumUnit()
local unit H58
local integer H28=0
if(hy==null)or(HW8(hy,X77)and AO7(SV7+SW7,X77,Condition(function HN8))>0)then
set H58=H18(SV7+SW7,X77,H28,Condition(function BW7))
set H58=V_7(H58!=null,H58,H18(SV7+SW7,X77,H28,Condition(function HK8)))
if IsUnitType(H58,UNIT_TYPE_HERO)then
set H58=V_7(GetUnitLifePercent(H58)>GetUnitLifePercent(X77),H58,X77)
endif
set RI7=V_7((H58!=null),H58,RI7)
endif
set X77=null
set H58=null
endfunction
function H_8 takes real CW7,unit I48,real I78 returns unit
local boolexpr Ig=Condition(function k6)
set hy=null
set RI7=null
set SV7=I78
set bj_lastLoadedUnit=I48
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(I48),GetUnitY(I48),CW7,Ig)
call GroupRemoveUnit(iA,I48)
call ForGroup(iA,function H08)
call DestroyBoolExpr(Ig)
set Ig=null
set RJ7[GetPlayerId(GetOwningPlayer(I48))]=hy
return RI7
endfunction
function I88 takes unit W17,real I78 returns unit
local boolexpr Ig=Condition(function HO8)
set RH7=null
set SV7=I78
set bj_lastLoadedUnit=GetEnumUnit()
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(W17),GetUnitY(W17),SV7+SW7,Ig)
call GroupRemoveUnit(iA,W17)
call ForGroup(iA,function HB8)
call DestroyBoolExpr(Ig)
set Ig=null
call WT7(GetUnitName(RH7))
return RH7
endfunction
function I98 takes nothing returns nothing
set SH7=GetRectMinX(GetWorldBounds())
set SI7=GetRectMinY(GetWorldBounds())
endfunction
function ID8 takes nothing returns nothing
set SJ7=GetRectMaxX(GetWorldBounds())
set SK7=GetRectMaxY(GetWorldBounds())
endfunction
function IE8 takes nothing returns nothing
call I98()
call ID8()
endfunction
function aiGetGroupMaxXCallBack_Loop takes nothing returns nothing
local real x=GetUnitX(GetEnumUnit())
if x>=SH7 then
set SH7=x
endif
endfunction
function aiGetGroupMaxYCallBack_Loop takes nothing returns nothing
local real y=GetUnitY(GetEnumUnit())
if y>=SI7 then
set SI7=y
endif
endfunction
function aiGetGroupMinXCallBack_Loop takes nothing returns nothing
local real x=GetUnitX(GetEnumUnit())
if x<=SJ7 then
set SJ7=x
endif
endfunction
function aiGetGroupMinYCallBack_Loop takes nothing returns nothing
local real y=GetUnitY(GetEnumUnit())
if y<=SK7 then
set SK7=y
endif
endfunction
function IF8 takes nothing returns nothing
local real y=GetUnitY(GetEnumUnit())
local real x=GetUnitX(GetEnumUnit())
if x>=SH7 then
set SH7=x
endif
if y>=SI7 then
set SI7=y
endif
endfunction
function IG8 takes nothing returns nothing
local real x=GetUnitX(GetEnumUnit())
local real y=GetUnitY(GetEnumUnit())
if x<=SJ7 then
set SJ7=x
endif
if y<=SK7 then
set SK7=y
endif
endfunction
function IH8 takes nothing returns nothing
local real x=GetUnitX(GetEnumUnit())
local real y=GetUnitY(GetEnumUnit())
set SO7=SO7+1
set SP7=SP7+x
set SQ7=SQ7+y
if SU7 then
set SR7[ST7]=x
set SR7[ST7]=y
set ST7=ST7+1
endif
endfunction
function aiGetGroupExtremumXY_Loop takes nothing returns nothing
endfunction
function IS8 takes unit IT8,real WK7,boolexpr Ig,boolean IU8 returns location
local real x=GetUnitX(IT8)
local real y=GetUnitY(IT8)
if IsUnit(IT8,null)then
return null
endif
call GroupClear(SN7)
call GroupEnumUnitsInRange(SN7,x,y,WK7,Ig)
call IE8()
call ForGroup(SN7,function IF8)
call ForGroup(SN7,function IG8)
if IU8 then
call DestroyBoolExpr(Ig)
endif
call L87(SM7,(SH7+SJ7)*.5,(SI7+SK7)*.5)
return SM7
endfunction
function IV8 takes nothing returns nothing
local integer i=0
loop
exitwhen i>'x'
set SR7[i]=.0
set SS7[i]=.0
set i=i+1
endloop
endfunction
function IW8 takes nothing returns nothing
call ExecuteFunc("IV8")
set SM7=Location(0,0)
set ST7=0
set SN7=CreateGroup()
call IE8()
endfunction
function IX8 takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GetWidgetLife(GetFilterUnit())>.405)and((i1=='e00S')or(i1=='e011')or(i1=='e00R')or(i1=='e019')or(i1=='u00N')or(i1=='u00D')or(i1=='u00M')or(i1=='u00T')))
endfunction
function KB takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and((i1=='usep')or(i1=='utod')or(i1=='eaom')or(i1=='eaoe')))
endfunction
function Kc takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetWidgetLife(GetFilterUnit())>.405)and(GF8(GetFilterUnit()))and((GetOwningPlayer(GetFilterUnit())==G8[0])or(GetOwningPlayer(GetFilterUnit())==N8[0]))and(GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)<150.))
endfunction
function IY8 takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false)and(GetWidgetLife(GetFilterUnit())>.405)and(GF8(GetFilterUnit()))and((GetOwningPlayer(GetFilterUnit())==G8[0])or(GetOwningPlayer(GetFilterUnit())==N8[0]))and(GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)<250.))
endfunction
function FindEnemyCreepTrig takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false)and(GetWidgetLife(GetFilterUnit())>.405)and(GF8(GetFilterUnit()))and((GetOwningPlayer(GetFilterUnit())==G8[0])or(GetOwningPlayer(GetFilterUnit())==N8[0]))and(GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)<250.))
endfunction
function IZ8 takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false)and(GetWidgetLife(GetFilterUnit())>.405)and(GF8(GetFilterUnit()))and((GetOwningPlayer(GetFilterUnit())==G8[0])or(GetOwningPlayer(GetFilterUnit())==N8[0]))and(GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)<160.))
endfunction
function IA8 takes nothing returns boolean
return((IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false)and(GetWidgetLife(GetFilterUnit())>.405)and(GF8(GetFilterUnit()))and((GetOwningPlayer(GetFilterUnit())==G8[0])or(GetOwningPlayer(GetFilterUnit())==N8[0]))and(GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>200.))
endfunction
function IB8 takes nothing returns boolean
return((not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false)and(GetWidgetLife(GetFilterUnit())>.405)and(GF8(GetFilterUnit()))and((GetOwningPlayer(GetFilterUnit())==G8[0])or(GetOwningPlayer(GetFilterUnit())==N8[0]))and(GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>200.))
endfunction
function KC takes nothing returns boolean
return((IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GetFilterUnit()!=GetEnumUnit())and(GetWidgetLife(GetFilterUnit())>.405)and(GF8(GetFilterUnit())))
endfunction
function Kd takes nothing returns boolean
return((IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetWidgetLife(GetFilterUnit())>.405)and(GF8(GetFilterUnit())))
endfunction
function IC8 takes nothing returns boolean
if((IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))or GetUnitTypeId(GetTriggerUnit())=='Uktl')and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetWidgetLife(GetFilterUnit())>.405)and(GF8(GetFilterUnit()))and((GetOwningPlayer(GetFilterUnit())==G8[0])or(GetOwningPlayer(GetFilterUnit())==N8[0])or(GetOwningPlayer(GetFilterUnit())==Player(12))))then
if((GetUnitTypeId(GetTriggerUnit())=='Uktl')or(not IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)))then
return((GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)<150.)or(GetUnitLifePercent(GetFilterUnit())<35.))
elseif((GetUnitTypeId(GetTriggerUnit())=='Ulic')or(GetUnitTypeId(GetTriggerUnit())=='E004'))then
return(GetUnitLifePercent(GetFilterUnit())>70.)
endif
endif
return false
endfunction
function KD takes nothing returns boolean
if((IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit()))or GetUnitTypeId(GetEnumUnit())=='Uktl')and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetWidgetLife(GetFilterUnit())>.405)and(GF8(GetFilterUnit()))and((GetOwningPlayer(GetFilterUnit())==G8[0])or(GetOwningPlayer(GetFilterUnit())==N8[0])or(GetOwningPlayer(GetFilterUnit())==Player(12))))then
if((GetUnitTypeId(GetEnumUnit())=='Uktl')or(not IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)))then
return((GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)<150.)or(GetUnitLifePercent(GetFilterUnit())<35.))
elseif((GetUnitTypeId(GetEnumUnit())=='Ulic')or(GetUnitTypeId(GetEnumUnit())=='E004'))then
return(GetUnitLifePercent(GetFilterUnit())>70.)
endif
endif
return false
endfunction
function I38 takes nothing returns boolean
if((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetWidgetLife(GetFilterUnit())>30.)and(GF8(GetFilterUnit()))and((GetOwningPlayer(GetFilterUnit())==G8[0])or(GetOwningPlayer(GetFilterUnit())==N8[0])or(GetOwningPlayer(GetFilterUnit())==Player(12))))then
return(GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)<F37)
endif
return false
endfunction
function I68 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetFilterUnit()!=GetEnumUnit())and(GetWidgetLife(GetFilterUnit())>.405)and(GetUnitTypeId(GetFilterUnit())!='H00J'))
endfunction
function IL8 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetFilterUnit()!=GetEnumUnit())and(GetWidgetLife(GetFilterUnit())>.405)and(GetUnitLifePercent(GetFilterUnit())>40.)and(GetUnitTypeId(GetFilterUnit())!='H00J'))
endfunction
function I18 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))and(GetFilterUnit()!=bj_lastLoadedUnit)and(GetWidgetLife(GetFilterUnit())>.405)and(GetUnitLifePercent(GetFilterUnit())>40.)and(GetUnitTypeId(GetFilterUnit())!='H00J'))
endfunction
function I08 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_MELEE_ATTACKER))and(GetWidgetLife(GetFilterUnit())>.405)and(GetOwningPlayer(GetFilterUnit())!=Player(12))and(GetUnitLifePercent(GetFilterUnit())>65.)and(not IsUnitIllusion(GetFilterUnit())))
endfunction
function I58 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_RANGED_ATTACKER))and(GetWidgetLife(GetFilterUnit())>.405)and(GetOwningPlayer(GetFilterUnit())!=Player(12))and(GetUnitLifePercent(GetFilterUnit())>65.)and(not IsUnitIllusion(GetFilterUnit())))
endfunction
function Kf takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetFilterUnit()!=GetEnumUnit())and(GetWidgetLife(GetFilterUnit())>.405)and(ZL7(GetFilterUnit()))and(GetUnitTypeId(GetFilterUnit())!='H00J'))
endfunction
function I28 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetFilterUnit()!=GetEnumUnit())and(GetWidgetLife(GetFilterUnit())>.405)and(GetUnitLifePercent(GetFilterUnit())<50.))
endfunction
function I_8 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetFilterUnit()!=GetEnumUnit())and(GetWidgetLife(GetFilterUnit())>.405)and(GetUnitLifePercent(GetFilterUnit())<30.)and(ZL7(GetFilterUnit())))
endfunction
function IsUnitHeroAllyUnder70HPEnum takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetFilterUnit()!=GetEnumUnit())and(GetWidgetLife(GetFilterUnit())>.405)and(GetUnitLifePercent(GetFilterUnit())<70.))
endfunction
function J48 takes nothing returns boolean
return YO7(GetUnitTypeId(GetFilterUnit()),N)
endfunction
function J78 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetFilterUnit()!=GetEnumUnit())and(GetWidgetLife(GetFilterUnit())>.405)and(GetUnitLifePercent(GetFilterUnit())<99.)and(GetUnitTypeId(GetFilterUnit())!='H00J'))
endfunction
function J88 takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and((i1=='e00S')or(i1=='e011')or(i1=='e00R')or(i1=='e019')or(i1=='u00N')or(i1=='u00D')or(i1=='u00M')or(i1=='u00T')))
endfunction
function KG takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
if(GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetEnumUnit()))and(GetWidgetLife(GetFilterUnit())>.405)and((i1=='o018')or(i1=='o002')or(i1=='o00B')or(i1=='o01B'))then
if(GZ[272+GetPlayerId(GetOwningPlayer(GetFilterUnit()))])then
return(GetUnitUserData(GetFilterUnit())==1)
else
return(GetUnitUserData(GetFilterUnit())==0)
endif
endif
return false
endfunction
function J98 takes nothing returns boolean
return((GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(bj_lastLoadedUnit))and(GetWidgetLife(GetFilterUnit())>.405)and(GetUnitTypeId(GetFilterUnit())=='otot'))
endfunction
function aiIsTechiesMines takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return((GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetEnumUnit()))and(GetWidgetLife(GetFilterUnit())>.405)and((i1=='o018')or(i1=='o002')or(i1=='o00B')or(i1=='o01B')or(i1=='otot')or(i1=='N00O')or(i1=='N00P')or(i1=='N00Q')or(i1=='N00N')))
endfunction
function JD8 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='oeye' and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))
endfunction
function JE8 takes nothing returns boolean
if((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetFilterUnit()!=bj_lastLoadedUnit)and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))and(GetWidgetLife(GetFilterUnit())>.405)and((not F17)or(GetUnitLifePercent(GetFilterUnit())>50)))then
set bj_forLoopAIndexEnd=C[GetPlayerId(GetOwningPlayer(GetFilterUnit()))]-D4[GetPlayerId(GetOwningPlayer(GetFilterUnit()))]
if(hy==null)or(bj_forLoopAIndex<bj_forLoopAIndexEnd)then
set hy=GetFilterUnit()
set bj_forLoopAIndex=bj_forLoopAIndexEnd
endif
endif
return false
endfunction
function JF8 takes real K1,unit it,boolean JG8 returns unit
local boolexpr Ig=Condition(function JE8)
set hy=null
set bj_lastLoadedUnit=it
set bj_forLoopAIndex=0
set F17=JG8
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(it),GetUnitY(it),K1,Ig)
call DestroyBoolExpr(Ig)
set Ig=null
return hy
endfunction
function Kh takes nothing returns boolean
return((IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and(GetUnitTypeId(GetFilterUnit())=='e020'))
endfunction
function KH takes nothing returns boolean
return((GetFilterUnit()!=GetAttacker())and(GF8(GetFilterUnit()))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitInRange(GetAttacker(),GetFilterUnit(),800.)))
endfunction
function Ki takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetAttacker())))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GetWidgetLife(GetFilterUnit())>.405)and(GF8(GetFilterUnit()))and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetAttacker()))))
endfunction
function KI takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetAttacker())))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetAttacker()))))
endfunction
function Kj takes nothing returns boolean
return((IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetAttacker())))and(GetFilterUnit()!=GetAttacker())and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GF8(GetFilterUnit()))and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function KJ takes nothing returns boolean
return((IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetAttacker())))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and((GetOwningPlayer(GetFilterUnit())==G8[0])or(GetOwningPlayer(GetFilterUnit())==N8[0]))and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function Kk takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetFilterUnit()!=GetAttacker())and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetAttacker())))and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function KK takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and((A87(GetFilterUnit()))or((GetUnitLifePercent(GetEnumUnit())-GetUnitLifePercent(GetFilterUnit()))>20.)))
endfunction
function Kl takes nothing returns boolean
return((IsHeroUnitId(GetUnitTypeId(GetFilterUnit())))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and((GetUnitLifePercent(GetFilterUnit())<50.)or((GetUnitLifePercent(GetEnumUnit())-GetUnitLifePercent(GetFilterUnit()))>20.)))
endfunction
function KL takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and(GetUnitTypeId(GetFilterUnit())=='H00J'))
endfunction
function Km takes nothing returns boolean
return(((GetUnitTypeId(GetFilterUnit())=='o018')or(GetUnitTypeId(GetFilterUnit())=='o002')or(GetUnitTypeId(GetFilterUnit())=='o00B'))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(not IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function KM takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and((GetUnitAbilityLevel(GetFilterUnit(),'Bcyc')>0)or(GetUnitAbilityLevel(GetFilterUnit(),'Bcy2')>0)or(GetUnitCurrentOrder(GetFilterUnit())==851973)))
endfunction
function Kn takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(UnitCountBuffsExBJ(bj_BUFF_POLARITY_NEGATIVE,bj_BUFF_RESIST_EITHER,GetFilterUnit(),false,false)==0))
endfunction
function KN takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(kP(GetUnitTypeId(GetFilterUnit()))))
endfunction
function Ko takes nothing returns boolean
return((GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetEnumUnit()))and(GetFilterUnit()!=GetEnumUnit())and(GetWidgetLife(GetFilterUnit())>.405)and(GF8(GetFilterUnit())))
endfunction
function KO takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(GetPlayerController(GetOwningPlayer(GetFilterUnit()))==MAP_CONTROL_COMPUTER)and(GetWidgetLife(GetFilterUnit())>.405)and(AR7(GetFilterUnit(),BU[GB]))and(AV4[GetPlayerId(GetOwningPlayer(GetFilterUnit()))]!=AX4))
endfunction
function KP_OLD takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(GetPlayerController(GetOwningPlayer(GetFilterUnit()))==MAP_CONTROL_COMPUTER)and(GetWidgetLife(GetFilterUnit())>.405)and(AV4[GetPlayerId(GetOwningPlayer(GetFilterUnit()))]!=AX4))
endfunction
function JH8 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(GetPlayerController(GetOwningPlayer(GetFilterUnit()))==MAP_CONTROL_COMPUTER)and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function Kq takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(GetPlayerController(GetOwningPlayer(GetFilterUnit()))==MAP_CONTROL_COMPUTER)and(GetWidgetLife(GetFilterUnit())>.405)and(GetFilterUnit()!=GetTriggerUnit()))
endfunction
function KQ takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetSpellTargetUnit())))and(GetPlayerController(GetOwningPlayer(GetFilterUnit()))==MAP_CONTROL_COMPUTER)and(GetWidgetLife(GetFilterUnit())>.405)and(not A87(GetFilterUnit())))
endfunction
function Kr takes nothing returns boolean
if(GQ8())then
return GetUnitAbilityLevel(GetFilterUnit(),'BPSE')>0
endif
return false
endfunction
function KR takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='o003')
endfunction
function C6 takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and((GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER)or(IsUnitInForce(GetTriggerUnit(),RX4)))and(not IsUnitIllusion(GetTriggerUnit()))and(IsUnitAlly(GetTriggerUnit(),G8[0])))
endfunction
function D6 takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and((GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER)or(RY4[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]))and(not IsUnitIllusion(GetTriggerUnit()))and(IsUnitAlly(GetTriggerUnit(),N8[0])))
endfunction
function JI8 takes nothing returns boolean
return(((GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER)or(RY4[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]))and(not IsUnitIllusion(GetTriggerUnit()))and(IsUnitAlly(GetTriggerUnit(),G8[0])))
endfunction
function JJ8 takes nothing returns boolean
return(((GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER)or(RY4[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]))and(not IsUnitIllusion(GetTriggerUnit()))and(IsUnitAlly(GetTriggerUnit(),N8[0])))
endfunction
function JK8 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetFilterUnit()))==MAP_CONTROL_COMPUTER)and(not IsUnitIllusion(GetFilterUnit()))and(IsUnitAlly(GetFilterUnit(),G8[0])))
endfunction
function Kt2 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetFilterUnit()))==MAP_CONTROL_COMPUTER)and(not IsUnitIllusion(GetFilterUnit()))and(IsUnitAlly(GetFilterUnit(),G8[0]))and(eY[GetPlayerId(GetOwningPlayer(GetFilterUnit()))]==3))
endfunction
function JM8 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetFilterUnit()))==MAP_CONTROL_COMPUTER)and(not IsUnitIllusion(GetFilterUnit()))and(IsUnitAlly(GetFilterUnit(),N8[0])))
endfunction
function KT2 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetFilterUnit()))==MAP_CONTROL_COMPUTER)and(not IsUnitIllusion(GetFilterUnit()))and(IsUnitAlly(GetFilterUnit(),N8[0]))and(eY[GetPlayerId(GetOwningPlayer(GetFilterUnit()))]==3))
endfunction
function JN8 takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER)and(not IsUnitIllusion(GetTriggerUnit())))
endfunction
function JO8 takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(not IsUnitIllusion(GetTriggerUnit())))
endfunction
function Kv takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and(GetOwningPlayer(GetFilterUnit())!=Player(12))and(GF8(GetFilterUnit()))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit()))))
endfunction
function KV takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and(GetOwningPlayer(GetFilterUnit())!=Player(12))and(GF8(GetFilterUnit()))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_RANGED_ATTACKER)))
endfunction
function Kw takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and(GetOwningPlayer(GetFilterUnit())!=Player(12))and(GF8(GetFilterUnit()))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_RANGED_ATTACKER))and(not IsUnitInRange(GetEnumUnit(),GetFilterUnit(),200.)))
endfunction
function KW takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and((IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))or(eY[32+GetPlayerId(GetOwningPlayer(GetFilterUnit()))]>0)or((not kD(GetFilterUnit()))and(IsUnitInRange(GetFilterUnit(),GetEnumUnit(),600.))))and(GetUnitLifePercent(GetFilterUnit())>40.))
endfunction
function JP8 takes nothing returns boolean
if((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405))then
if(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))then
return true
elseif(not kD(GetFilterUnit()))then
return((eY[32+GetPlayerId(GetOwningPlayer(GetFilterUnit()))]>0)or(IsUnitInRange(GetFilterUnit(),GetEnumUnit(),600.)))
else
return(eY[32+GetPlayerId(GetOwningPlayer(GetFilterUnit()))]>2)
endif
endif
return false
endfunction
function KX takes nothing returns boolean
if((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetOwningPlayer(GetFilterUnit())!=Player(12))and(GetWidgetLife(GetFilterUnit())>.405)and(GF8(GetFilterUnit())))then
if((IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))or(GetOwningPlayer(GetFilterUnit())==G8[0])or(GetOwningPlayer(GetFilterUnit())==N8[0]))then
return true
elseif(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))then
return((eY[32+GetPlayerId(GetOwningPlayer(GetFilterUnit()))]>0)or((not kD(GetFilterUnit()))and(IsUnitInRange(GetFilterUnit(),GetEnumUnit(),600.))))
endif
endif
return false
endfunction
function Ky takes nothing returns boolean
if((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetOwningPlayer(GetFilterUnit())!=Player(12))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GetWidgetLife(GetFilterUnit())>.405)and(GF8(GetFilterUnit())))then
if((IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))or(GetOwningPlayer(GetFilterUnit())==G8[0])or(GetOwningPlayer(GetFilterUnit())==N8[0]))then
return true
elseif(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))then
return((eY[32+GetPlayerId(GetOwningPlayer(GetFilterUnit()))]>0)or((not kD(GetFilterUnit()))and(IsUnitInRange(GetFilterUnit(),GetEnumUnit(),600.))))
endif
endif
return false
endfunction
function KY takes real IW,location b5 returns integer
local boolexpr Ig=Condition(function KW)
call GroupClear(H8)
call GroupEnumUnitsInRangeOfLoc(H8,b5,IW,Ig)
call DestroyBoolExpr(Ig)
set Ig=null
return kB(true,H8)
endfunction
function Kz takes real IW,location b5 returns integer
local boolexpr Ig=Condition(function k6)
call GroupClear(H8)
call GroupEnumUnitsInRangeOfLoc(H8,b5,IW,Ig)
call DestroyBoolExpr(Ig)
set Ig=null
return kB(false,H8)
endfunction
function JQ8 takes nothing returns nothing
if((hy==null)or(GetUnitState(hy,UNIT_STATE_LIFE)<GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)))and(GetEnumUnit()!=F77 or F77==null)then
set hy=GetEnumUnit()
endif
endfunction
function JR8 takes real K1,unit IB,boolexpr Ig returns unit
set hy=null
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(IB),GetUnitY(IB),K1,Ig)
call ForGroup(iA,function JQ8)
call DestroyBoolExpr(Ig)
set Ig=null
return hy
endfunction
function JS8 takes real K1,unit IB returns unit
local boolexpr Ig=Condition(function GQ8)
set hy=null
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(IB),GetUnitY(IB),K1,Ig)
call ForGroup(iA,function KZ)
call DestroyBoolExpr(Ig)
set Ig=null
return hy
endfunction
function JT8 takes real K1,unit IB returns unit
local boolexpr Ig=Condition(function GT8)
set hy=null
set bj_lastLoadedUnit=IB
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(IB),GetUnitY(IB),K1,Ig)
call ForGroup(iA,function KZ)
call DestroyBoolExpr(Ig)
set Ig=null
return hy
endfunction
function JU8 takes real K1,unit IB,real x,real y returns unit
local boolexpr Ig=Condition(function GT8)
set hy=null
set bj_lastLoadedUnit=IB
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,x,y,K1,Ig)
call ForGroup(iA,function KZ)
call DestroyBoolExpr(Ig)
set Ig=null
return hy
endfunction
function JV8 takes real K1,unit IB returns unit
local boolexpr Ig=Condition(function GX8)
set hy=null
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(IB),GetUnitY(IB),K1,Ig)
call ForGroup(iA,function KZ)
call DestroyBoolExpr(Ig)
set Ig=null
return hy
endfunction
function JW8 takes real K1,unit IB returns unit
local boolexpr Ig=Condition(function GY8)
set hy=null
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(IB),GetUnitY(IB),K1,Ig)
call ForGroup(iA,function KZ)
call DestroyBoolExpr(Ig)
set Ig=null
return hy
endfunction
function JX8 takes real K1,unit IB returns unit
local boolexpr Ig=Condition(function GY8)
set hy=null
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(IB),GetUnitY(IB),K1,Ig)
call ForGroup(iA,function JQ8)
call DestroyBoolExpr(Ig)
set Ig=null
return hy
endfunction
function JY8 takes nothing returns nothing
if((hy==null)or(GetUnitState(hy,UNIT_STATE_MANA)<GetUnitState(GetEnumUnit(),UNIT_STATE_MANA)))and(GetEnumUnit()!=F77 or F77==null)then
set hy=GetEnumUnit()
endif
endfunction
function JZ8 takes real K1,unit IB returns unit
local boolexpr Ig=Condition(function GQ8)
set hy=null
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(IB),GetUnitY(IB),K1,Ig)
call ForGroup(iA,function JY8)
call DestroyBoolExpr(Ig)
set Ig=null
return hy
endfunction
function JA8 takes nothing returns nothing
if((hy==null)or(GetHeroLevel(hy)<GetHeroLevel(GetEnumUnit())))and(GetEnumUnit()!=F77 or F77==null)and(LInt(GetHandleId(GetOwningPlayer(GetEnumUnit())),"AI|Class")<=2)then
set hy=GetEnumUnit()
endif
endfunction
function JB8 takes nothing returns nothing
if((hy==null)or(GetHeroLevel(hy)<GetHeroLevel(GetEnumUnit())))and(GetEnumUnit()!=F77 or F77==null)then
set hy=GetEnumUnit()
endif
endfunction
function JC8 takes real K1,unit IB returns unit
local boolexpr Ig=Condition(function GQ8)
set hy=null
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(IB),GetUnitY(IB),K1,Ig)
call ForGroup(iA,function JA8)
call DestroyBoolExpr(Ig)
set Ig=null
return hy
endfunction
function J38 takes real K1,unit IB returns unit
local boolexpr Ig=Condition(function GS8)
set hy=null
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(IB),GetUnitY(IB),K1,Ig)
call ForGroup(iA,function JB8)
call DestroyBoolExpr(Ig)
set Ig=null
return hy
endfunction
function J68 takes nothing returns nothing
if((hy==null)or(GetUnitState(hy,UNIT_STATE_LIFE)>GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)))and(Z47(GetEnumUnit(),bj_lastLoadedUnit)>800.)and(GetEnumUnit()!=F77 or F77==null)then
set hy=GetEnumUnit()
endif
endfunction
function JL8 takes unit IB returns unit
local boolexpr Ig=Condition(function GT8)
set hy=null
set bj_lastLoadedUnit=IB
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(IB),GetUnitY(IB),1200.,Ig)
call ForGroup(iA,function J68)
call DestroyBoolExpr(Ig)
set Ig=null
return hy
endfunction
function J18 takes nothing returns nothing
if(GetUnitState(GetEnumUnit(),UNIT_STATE_MANA)>H64)and((hy==null)or(GetUnitState(hy,UNIT_STATE_MANA)<GetUnitState(GetEnumUnit(),UNIT_STATE_MANA)))and(not IsUnitType(GetEnumUnit(),UNIT_TYPE_MAGIC_IMMUNE))then
set hy=GetEnumUnit()
endif
endfunction
function J08 takes unit IB returns unit
local boolexpr Ig=Condition(function GB8)
set hy=null
set bj_lastLoadedUnit=IB
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(IB),GetUnitY(IB),750.,Ig)
call ForGroup(iA,function J18)
call DestroyBoolExpr(Ig)
set Ig=null
return hy
endfunction
function J58 takes nothing returns nothing
local real J28=RMinBJ(5.*GetHeroInt(GetEnumUnit(),true),GetUnitState(GetEnumUnit(),UNIT_STATE_MANA))
if F17 or IsUnitType(GetEnumUnit(),UNIT_TYPE_MAGIC_IMMUNE)then
elseif(GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)<J28*.75)then
set F17=true
set hy=GetEnumUnit()
elseif((hy==null)or(H64<J28))then
set hy=GetEnumUnit()
set H64=J28
endif
endfunction
function J_8 takes unit IB returns unit
local boolexpr Ig=Condition(function GT8)
set hy=null
set bj_lastLoadedUnit=IB
set F17=false
set H64=0
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(IB),GetUnitY(IB),600.,Ig)
call ForGroup(iA,function J58)
call DestroyBoolExpr(Ig)
set Ig=null
return hy
endfunction
function K2 takes real K1,location b5 returns unit
local boolexpr Ig=Condition(function GQ8)
set hy=null
call GroupClear(iA)
call GroupEnumUnitsInRangeOfLoc(iA,b5,K1,Ig)
call ForGroup(iA,function KZ)
call DestroyBoolExpr(Ig)
set Ig=null
return hy
endfunction
function K3 takes real K1,unit IB,boolexpr Ig returns unit
set hy=null
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(IB),GetUnitY(IB),K1,Ig)
call ForGroup(iA,function KZ)
call DestroyBoolExpr(Ig)
return hy
endfunction
function K4 takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(((GetHeroLevel(GetEnumUnit())>5)and(IsUnitInRange(GetFilterUnit(),GetEnumUnit(),300.)))or(Z47(GetEnumUnit(),DH8(GetEnumUnit()))>Z47(GetFilterUnit(),DH8(GetEnumUnit())))))
endfunction
function K48 takes nothing returns nothing
set GU=true
endfunction
function K78 takes nothing returns boolean
local integer d=GetDestructableTypeId(GetFilterDestructable())
return d=='ATtr' or d=='BTtw' or d=='KTtw' or d=='YTft' or d=='JTct' or d=='YTst' or d=='YTct' or d=='YTwt' or d=='JTwt' or d=='JTwt' or d=='FTtw' or d=='CTtr' or d=='ITtw' or d=='NTtw' or d=='OTtw' or d=='ZTtw' or d=='WTst' or d=='LTlt' or d=='GTsh' or d=='Xtlt' or d=='WTtw' or d=='Attc' or d=='BTtc' or d=='CTtc' or d=='ITtc' or d=='NTtc' or d=='ZTtc'
endfunction
function K5 takes nothing returns nothing
if((GetDestructableTypeId(GetEnumDestructable())=='WTst')or(GetDestructableTypeId(GetEnumDestructable())=='ITtc')or(GetDestructableTypeId(GetEnumDestructable())=='ITtw')or(GetDestructableTypeId(GetEnumDestructable())=='NTtw')or(GetDestructableTypeId(GetEnumDestructable())=='ATtr'))then
set GU=true
endif
endfunction
function K6 takes unit u returns boolean
local boolexpr b
set GU=false
call MoveLocation(Ha,GetUnitX(u),GetUnitY(u))
set bj_enumDestructableCenter=Ha
set bj_enumDestructableRadius=375.
call SetRect(He,GetUnitX(u)-375.,GetUnitY(u)-375.,GetUnitX(u)+375.,GetUnitY(u)+375.)
set b=Filter(function K78)
call EnumDestructablesInRect(He,b,function K48)
call DestroyBoolExpr(b)
return GU
endfunction
function K88 takes nothing returns nothing
local real dx=GetLocationX(bj_enumDestructableCenter)-GetDestructableX(GetEnumDestructable())
local real dy=GetLocationY(bj_enumDestructableCenter)-GetDestructableY(GetEnumDestructable())
local real r=dx*dx+dy*dy
if GetDestructableLife(GetEnumDestructable())>.405 and r<bj_enumDestructableRadius then
set XL4=GetEnumDestructable()
set bj_enumDestructableRadius=r
endif
endfunction
function K98 takes location l,real r returns boolean
local boolexpr b
set XL4=null
if bj_enumDestructableCenter==null then
set bj_enumDestructableCenter=Location(GetLocationX(l),GetLocationY(l))
else
call MoveLocation(bj_enumDestructableCenter,GetLocationX(l),GetLocationY(l))
endif
set bj_enumDestructableRadius=r*r
call SetRect(He,GetLocationX(l)-r,GetLocationY(l)-r,GetLocationX(l)+r,GetLocationY(l)+r)
set b=Filter(function K78)
call EnumDestructablesInRect(He,b,function K88)
call DestroyBoolExpr(b)
set b=null
return XL4!=null
endfunction
function KD8 takes nothing returns nothing
local real x=GetDestructableX(GetEnumDestructable())
local real y=GetDestructableY(GetEnumDestructable())
local real dx=x-GetLocationX(bj_enumDestructableCenter)
local real dy=y-GetLocationY(bj_enumDestructableCenter)
local real r=dx*dx+dy*dy
local real r2
if r<bj_enumDestructableRadius and GetDestructableLife(GetEnumDestructable())>.405 then
set dx=x-X14
set dy=y-X04
set r=dx*X54+dy*X24
set r2=dx*dx+dy*dy-r*r
if r<X_4 then
elseif r<Y44 and r2<Y84*r*r then
set bj_enumDestructableRadius=0
elseif r2<Y74*r*r then
set Y74=r2/ r/ r
set XL4=GetEnumDestructable()
endif
endif
endfunction
function KE8 takes unit u,real HS8 returns boolean
local real x=GetLocationX(H57)
local real y=GetLocationY(H57)
local real dx=x-GetUnitX(u)
local real dy=y-GetUnitY(u)
local real r=SquareRoot(dx*dx+dy*dy)
local boolexpr b
set XL4=null
if bj_enumDestructableCenter==null then
set bj_enumDestructableCenter=GetUnitLoc(u)
else
call MoveLocation(bj_enumDestructableCenter,GetUnitX(u),GetUnitY(u))
endif
set bj_enumDestructableRadius=HS8*HS8
set X_4=r*90./ 225.
set Y44=X_4+r
set X54=dx/ r
set X24=dy/ r
set X14=x-Y44*X54
set X04=y-Y44*X24
set Y74=1/(Y44*Y44/((90.+225.)*315.)-1)
set Y84=Y74
call SetRect(He,GetUnitX(u)-HS8,GetUnitY(u)-HS8,GetUnitX(u)+HS8,GetUnitY(u)+HS8)
set b=Filter(function K78)
call EnumDestructablesInRect(He,b,function KD8)
call DestroyBoolExpr(b)
set b=null
if XL4==null or bj_enumDestructableRadius==0 then
return false
endif
call MoveLocation(H57,x+(GetDestructableX(XL4)-x)*225./ 315.,y+(GetDestructableY(XL4)-y)*225./ 315.)
return true
endfunction
function K7 takes nothing returns boolean
return((IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and((GetUnitAbilityLevel(GetFilterUnit(),'Adts')>0)or(GetUnitAbilityLevel(GetFilterUnit(),'Adt1')>0)or(GetUnitAbilityLevel(GetFilterUnit(),'A0M5')>0)or(GetUnitAbilityLevel(GetFilterUnit(),'Atru')>0)or(GetUnitAbilityLevel(GetFilterUnit(),'A0JI')>0)))
endfunction
function K8 takes nothing returns boolean
return((GetDestructableTypeId(GetFilterDestructable())=='ATtr')or(GetDestructableTypeId(GetFilterDestructable())=='NTtw'))
endfunction
function K9 takes nothing returns nothing
if(GetDestructableMaxLife(GetEnumDestructable())==49.)then
set H0=GetEnumDestructable()
endif
endfunction
function la takes nothing returns nothing
if(GetDestructableMaxLife(GetEnumDestructable())==48.)then
set H0=GetEnumDestructable()
endif
endfunction
function lA takes unit it,boolean O6 returns boolean
call SetRect(He,GetUnitX(it)-600.,GetUnitY(it)-600.,GetUnitX(it)+600.,GetUnitY(it)+600.)
set H0=null
if(O6)then
call EnumDestructablesInRect(He,Condition(function K8),function K9)
else
call EnumDestructablesInRect(He,Condition(function K8),function la)
endif
return H0!=null
endfunction
function KF8 takes nothing returns boolean
return true
endfunction
function l6 takes multiboard L6,integer c,integer r,string M6 returns nothing
local multiboarditem p6=null
set p6=MultiboardGetItem(L6,r-1,c-1)
call MultiboardSetItemValue(p6,M6)
call MultiboardReleaseItem(p6)
set p6=null
endfunction
function P6 takes multiboard L6,integer c,integer r,string q6 returns nothing
local multiboarditem p6=null
set p6=MultiboardGetItem(L6,r-1,c-1)
call MultiboardSetItemIcon(p6,q6)
call MultiboardReleaseItem(p6)
set p6=null
endfunction
function s6 takes multiboard L6,integer c,integer r,boolean t6,boolean T6 returns nothing
local multiboarditem p6=null
set p6=MultiboardGetItem(L6,r-1,c-1)
call MultiboardSetItemStyle(p6,t6,T6)
call MultiboardReleaseItem(p6)
set p6=null
endfunction
function U6 takes multiboard L6,integer c,integer r,real w6,real Y6,real Z6,real e7 returns nothing
local multiboarditem p6=null
set p6=MultiboardGetItem(L6,r-1,c-1)
call MultiboardSetItemValueColor(p6,PercentTo255(w6),PercentTo255(Y6),PercentTo255(Z6),PercentTo255(100.-e7))
call MultiboardReleaseItem(p6)
set p6=null
endfunction
function x7 takes multiboard L6,integer c,integer r,real r7 returns nothing
local multiboarditem p6=null
set p6=MultiboardGetItem(L6,r-1,c-1)
call MultiboardSetItemWidth(p6,r7/'d')
call MultiboardReleaseItem(p6)
set p6=null
endfunction
function KG8 takes integer i returns nothing
if i>16000 then
set gl[i-16000]=null
elseif i>8000 then
set Fl[i-8000]=null
else
set fl[i]=null
endif
endfunction
function KH8 takes integer i returns unit
if i>16000 then
return gl[i-16000]
elseif i>8000 then
return Fl[i-8000]
else
return fl[i]
endif
return fl[i]
endfunction
function KI8 takes integer i returns destructable
if i>16000 then
return Z24[i-16000]
elseif i>8000 then
return Z_4[i-8000]
else
return A44[i]
endif
return A44[i]
endfunction
function KJ8 takes unit u returns integer
set Hl=Hl+1
if Hl>16000 then
set gl[Hl-16000]=u
elseif Hl>8000 then
set Fl[Hl-8000]=u
else
set fl[Hl]=u
endif
return Hl
endfunction
function KK8 takes integer i returns nothing
if i>16000 then
set Z24[i-16000]=null
elseif i>8000 then
set Z_4[i-8000]=null
else
set A44[i]=null
endif
endfunction
function KM8 takes destructable d returns integer
set A74=A74+1
if A74>16000 then
set Z24[A74-16000]=d
elseif A74>8000 then
set Z_4[A74-8000]=d
else
set A44[A74]=d
endif
return A74
endfunction
function IsJWPlayer takes player hd returns boolean
return((hd==G8[0])or(hd==G8[1])or(hd==G8[2])or(hd==G8[3])or(hd==G8[4])or(hd==G8[5]))
endfunction
function IsTZPlayer takes player hd returns boolean
return((hd==N8[0])or(hd==N8[1])or(hd==N8[2])or(hd==N8[3])or(hd==N8[4])or(hd==N8[5]))
endfunction
function IsPlayer takes player p returns boolean
return p==G8[1]or p==G8[2]or p==G8[3]or p==G8[4]or p==G8[5]or p==N8[1]or p==N8[2]or p==N8[3]or p==N8[4]or p==N8[5]
endfunction
function KQ8 takes player j8 returns boolean
return((GetPlayerSlotState(j8)==PLAYER_SLOT_STATE_PLAYING)and(GetPlayerController(j8)==MAP_CONTROL_USER))
endfunction
function KR8 takes player j8 returns boolean
return((GetPlayerSlotState(j8)==PLAYER_SLOT_STATE_PLAYING)and(GetPlayerController(j8)==MAP_CONTROL_COMPUTER))
endfunction
function KS8 takes player j8 returns boolean
return((GetPlayerSlotState(j8)==PLAYER_SLOT_STATE_PLAYING)and((GetPlayerController(j8)==MAP_CONTROL_USER)or(GetPlayerController(j8)==MAP_CONTROL_COMPUTER)))
endfunction
function KT8 takes player j8 returns boolean
return((GetPlayerSlotState(j8)==PLAYER_SLOT_STATE_PLAYING)and((GetPlayerController(j8)==MAP_CONTROL_USER)or(RY4[GetPlayerId(j8)])))
endfunction
function KU8 takes integer WS7,unit KV8 returns integer
local integer x=1
local integer YC7=0
loop
exitwhen x>5
if KS8(G8[x])then
if(GetUnitTypeId(Y7[x])==WS7 and IsUnitEnemy(Y7[x],GetOwningPlayer(KV8)))then
return GetPlayerId(G8[x])
endif
endif
if KS8(N8[x])then
if(GetUnitTypeId(Y7[6+x])==WS7 and IsUnitEnemy(Y7[6+x],GetOwningPlayer(KV8)))then
return GetPlayerId(N8[x])
endif
endif
set x=x+1
endloop
return YC7
endfunction
function KW8 takes unit KX8 returns integer
return LInt(GetHandleId(KX8),"Invoker|Wex")
endfunction
function KY8 takes unit KX8 returns integer
return LInt(GetHandleId(KX8),"Invoker|Quas")
endfunction
function KZ8 takes unit KX8 returns integer
return LInt(GetHandleId(KX8),"Invoker|Exort")
endfunction
function KA8 takes unit KX8,integer KB8 returns boolean
local integer KC8=GetHandleId(KX8)
local integer K38=LInt(KC8,"Invoker|Current1")
local integer K68=LInt(KC8,"Invoker|Current2")
if KB8==K38 or KB8==K68 then
return true
endif
return false
endfunction
function KL8 takes unit KX8,integer K18,integer K08,integer K58,boolean K28 returns boolean
local boolean J4=false
local integer O5=GetPlayerId(GetOwningPlayer(KX8))
if(K28)then
set J4=(Bz>V74[O5])and IssueImmediateOrderById(KX8,K18)and IssueImmediateOrderById(KX8,K08)and IssueImmediateOrderById(KX8,K58)
else
set J4=IssueImmediateOrderById(KX8,K18)and IssueImmediateOrderById(KX8,K08)and IssueImmediateOrderById(KX8,K58)
endif
if(K28 and J4)then
set J4=IssueImmediateOrderById(KX8,852588)
endif
return J4
endfunction
function K_8 takes unit KX8,integer K18,integer K08,integer K58,integer KB8 returns boolean
if(KA8(KX8,KB8))then
return true
elseif GetUnitTypeId(KX8)=='E02X' and eY[416+GetPlayerId(GetOwningPlayer(KX8))]==KB8 then
return true
else
return KL8(KX8,K18,K08,K58,true)
endif
endfunction
function M48 takes unit it returns unit
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer UP
local real M78=99999.
local unit M88
local unit m5=null
local integer j
call GroupClear(H8)
set bj_wantDestroyGroup=false
call GroupAddGroup(ii,H8)
loop
set M88=FirstOfGroup(H8)
exitwhen(M88==null)
if((m5==null)or(Z47(it,M88)<M78))then
set j=Z97(GetUnitUserData(M88))
if((j!=0 or(not PE4))and(j!=1 or(not PF4))and(j!=2 or(not PD4)))then
set m5=M88
set M78=Z47(it,M88)
endif
endif
call GroupRemoveUnit(H8,M88)
endloop
set hr=m5
set m5=null
return hr
endfunction
function M98 takes integer O5,integer UP,integer MD8,integer ME8 returns nothing
set h7[O5]=h7[UP]
set hj[O5]=MD8
set hj[256+O5]=ME8
set hj[512+UP]=O5
set hj[512+O5]=UP
endfunction
function MF8 takes unit it,integer UP returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(it))
if(UP==0)then
return
endif
set h8[O5]=h7[UP+1]
set h8[80+O5]=h7[UP]
set h9[O5]=h7[UP-1]
set h9[16+O5]=h7[hj[UP]]
set h8[16+O5]=h7[hj[256+UP]]
if(iU(it)and(h4[O5]==null)and(KR8(Player(O5)))and GetUnitAbilityLevel(it,'A0IH')<1)then
if(h4[O5]!=null and Z_7(h4[O5])and Z47(it,h4[O5])<1200)then
elseif(eY[O5]==1)then
if((G0[O5])or(G0[32+O5])or(G0[48+O5])or(not G0[128+O5])or(G0[64+O5])or((A87(it))and(not Id(O5)))or(GetUnitCurrentOrder(it)==851986))then
call D48(it,851986,h9[O5])
else
call D48(it,851983,h8[O5])
endif
elseif((eY[O5]==3)or(eY[O5]==4))then
if(GetUnitCurrentOrder(it)==851986)then
call D48(it,851986,h9[O5])
endif
endif
endif
if A87(it)or h4[O5]!=null then
set hq[864+O5]=0
else
set hq[864+O5]=GetRandomReal(-G97,G97)
endif
endfunction
function MG8 takes unit it,unit A77 returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer UP
local unit m5=M48(A77)
if(m5!=null)then
set UP=GetUnitUserData(m5)
if(IsUnitAlly(it,G8[0]))then
call MF8(it,UP)
else
call MF8(it,hj[512+UP])
endif
endif
set m5=null
endfunction
function MH8 takes unit it returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer UP
local unit m5=M48(it)
if(m5!=null)then
set UP=GetUnitUserData(m5)
if(IsUnitAlly(it,G8[0]))then
call MF8(it,UP)
else
call MF8(it,hj[512+UP])
endif
endif
set h4[96+O5]=null
set m5=null
endfunction
function M8 takes player j8 returns boolean
if(GetPlayerSlotState(j8)==PLAYER_SLOT_STATE_PLAYING or GetPlayerSlotState(j8)==PLAYER_SLOT_STATE_LEFT)then
if(GetPlayerController(j8)==MAP_CONTROL_USER or GetPlayerController(j8)==MAP_CONTROL_COMPUTER)then
return true
endif
endif
return false
endfunction
function p8 takes nothing returns nothing
if(KS8(GetEnumPlayer()))then
set bj_forceCountPlayers=bj_forceCountPlayers+1
endif
endfunction
function MI8 takes force f returns integer
set bj_forceCountPlayers=0
call ForForce(f,function p8)
return bj_forceCountPlayers
endfunction
function hh 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 q8 takes force f returns integer
set bj_forceCountPlayers=0
call ForForce(f,function hh)
return bj_forceCountPlayers
endfunction
function hi takes integer hI,player j8 returns nothing
if GV4 then
call SetPlayerTechMaxAllowed(j8,hI,0)
set O[GetUnitPointValueByType(hI)]=true
endif
endfunction
function MJ8 takes integer hI returns nothing
call hi(hI,G8[1])
call hi(hI,G8[2])
call hi(hI,G8[3])
call hi(hI,G8[4])
call hi(hI,G8[5])
call hi(hI,N8[1])
call hi(hI,N8[2])
call hi(hI,N8[3])
call hi(hI,N8[4])
call hi(hI,N8[5])
endfunction
function S8 takes integer V07 returns nothing
if GV4 then
call SetPlayerTechMaxAllowed(G8[1],V07,0)
call SetPlayerTechMaxAllowed(G8[2],V07,0)
call SetPlayerTechMaxAllowed(G8[3],V07,0)
call SetPlayerTechMaxAllowed(G8[4],V07,0)
call SetPlayerTechMaxAllowed(G8[5],V07,0)
call SetPlayerTechMaxAllowed(N8[1],V07,0)
call SetPlayerTechMaxAllowed(N8[2],V07,0)
call SetPlayerTechMaxAllowed(N8[3],V07,0)
call SetPlayerTechMaxAllowed(N8[4],V07,0)
call SetPlayerTechMaxAllowed(N8[5],V07,0)
endif
endfunction
function MK8 takes integer V07 returns nothing
local player p
if GV4 then
set p=G8[1]
if Y7[GetPlayerId(p)]==null then
call SetPlayerTechMaxAllowed(p,V07,1)
endif
set p=G8[2]
if Y7[GetPlayerId(p)]==null then
call SetPlayerTechMaxAllowed(p,V07,1)
endif
set p=G8[3]
if Y7[GetPlayerId(p)]==null then
call SetPlayerTechMaxAllowed(p,V07,1)
endif
set p=G8[4]
if Y7[GetPlayerId(p)]==null then
call SetPlayerTechMaxAllowed(p,V07,1)
endif
set p=G8[5]
if Y7[GetPlayerId(p)]==null then
call SetPlayerTechMaxAllowed(p,V07,1)
endif
set p=N8[1]
if Y7[GetPlayerId(p)]==null then
call SetPlayerTechMaxAllowed(p,V07,1)
endif
set p=N8[2]
if Y7[GetPlayerId(p)]==null then
call SetPlayerTechMaxAllowed(p,V07,1)
endif
set p=N8[3]
if Y7[GetPlayerId(p)]==null then
call SetPlayerTechMaxAllowed(p,V07,1)
endif
set p=N8[4]
if Y7[GetPlayerId(p)]==null then
call SetPlayerTechMaxAllowed(p,V07,1)
endif
set p=N8[5]
if Y7[GetPlayerId(p)]==null then
call SetPlayerTechMaxAllowed(p,V07,1)
endif
endif
endfunction
function MM8 takes player j8 returns nothing
local integer T8=KC4
local integer U8=K34
if GV4 then
loop
exitwhen T8>U8
call SetPlayerTechMaxAllowed(j8,KA4[T8],0)
set T8=T8+1
endloop
set T8=K64
set U8=KL4
loop
exitwhen T8>U8
call SetPlayerTechMaxAllowed(j8,KA4[T8],0)
set T8=T8+1
endloop
endif
endfunction
function MN8 takes nothing returns nothing
call MM8(G8[1])
call MM8(G8[2])
call MM8(G8[3])
call MM8(G8[4])
call MM8(G8[5])
call MM8(N8[1])
call MM8(N8[2])
call MM8(N8[3])
call MM8(N8[4])
call MM8(N8[5])
endfunction
function MO8 takes player p returns nothing
local integer i
if GV4 then
set i=KC4
loop
exitwhen i>KL4
if O[i]==false then
call SetPlayerTechMaxAllowed(p,KA4[i],1)
endif
set i=i+1
endloop
if IsJWPlayer(p)then
set i=KC4
loop
exitwhen i>K34
call SetPlayerTechMaxAllowed(p,KA4[i],0)
set i=i+1
endloop
else
set i=K64
loop
exitwhen i>KL4
call SetPlayerTechMaxAllowed(p,KA4[i],0)
set i=i+1
endloop
endif
endif
endfunction
function MP8 takes player p returns nothing
local integer i
if GV4 then
set i=KC4
loop
exitwhen i>KL4
if O[i]==false then
call SetPlayerTechMaxAllowed(p,KA4[i],1)
endif
set i=i+1
endloop
if IsJWPlayer(p)then
set i=K64
loop
exitwhen i>KL4
call SetPlayerTechMaxAllowed(p,KA4[i],0)
set i=i+1
endloop
else
set i=KC4
loop
exitwhen i>K34
call SetPlayerTechMaxAllowed(p,KA4[i],0)
set i=i+1
endloop
endif
endif
endfunction
function MQ8 takes nothing returns nothing
local integer i
if GV4 then
set i=K64
loop
exitwhen i>KL4
call SetPlayerTechMaxAllowed(G8[1],KA4[i],0)
call SetPlayerTechMaxAllowed(G8[2],KA4[i],0)
call SetPlayerTechMaxAllowed(G8[3],KA4[i],0)
call SetPlayerTechMaxAllowed(G8[4],KA4[i],0)
call SetPlayerTechMaxAllowed(G8[5],KA4[i],0)
set i=i+1
endloop
set i=KC4
loop
exitwhen i>K34
call SetPlayerTechMaxAllowed(N8[1],KA4[i],0)
call SetPlayerTechMaxAllowed(N8[2],KA4[i],0)
call SetPlayerTechMaxAllowed(N8[3],KA4[i],0)
call SetPlayerTechMaxAllowed(N8[4],KA4[i],0)
call SetPlayerTechMaxAllowed(N8[5],KA4[i],0)
set i=i+1
endloop
endif
endfunction
function MR8 takes nothing returns nothing
local integer T8
local integer U8
local integer MS8=0
set Ge=KC4
set T8=KC4
set U8=K34
loop
exitwhen T8>U8
set MS8=MS8+1
set je[MS8]=T8
set T8=T8+1
endloop
set T8=K64
set U8=KL4
loop
exitwhen T8>U8
set MS8=MS8+1
set je[MS8]=T8
set T8=T8+1
endloop
set he=MS8
endfunction
function MT8 takes nothing returns integer
return je[GetRandomInt(Ge,he)]
endfunction
function MU8 takes nothing returns integer
local integer MV8=GetRandomInt(Ge,he)
local integer hs=je[MV8]
set hs=je[MV8]
if(Ge==he)then
set je[MV8]=0
return hs
endif
if(MV8==he)then
set he=he-1
return hs
endif
set je[MV8]=je[he]
set he=he-1
return hs
endfunction
function MW8 takes string hT returns integer
if hT=="a"then
return 10
elseif hT=="b"then
return 11
elseif hT=="c"then
return 12
elseif hT=="d"then
return 13
elseif hT=="e"then
return 14
elseif hT=="f"then
return 15
else
return S2I(hT)
endif
endfunction
function MX8 takes string hU returns integer
return MW8(SubString(hU,0,1))*16+MW8(SubString(hU,1,2))
endfunction
function MY8 takes integer hX returns boolean
local integer i=1
loop
exitwhen i>S9
if hX==P9[i]then
return false
endif
set i=i+1
endloop
return true
endfunction
function MZ8 takes unit MA8 returns integer
local integer MB8=GetUnitTypeId(MA8)
if MB8=='e00R' or MB8=='u00M' then
return 1
elseif MB8=='e011' or MB8=='u00D' then
return 2
elseif MB8=='e00S' or MB8=='u00N' then
return 3
elseif MB8=='e019' or MB8=='u00T' then
return 4
endif
return 0
endfunction
function MC8 takes player VR7,integer M38 returns nothing
local texttag t
if M38>0 then
set WQ4[GetPlayerId(VR7)]=WQ4[GetPlayerId(VR7)]+M38
set t=CreateTextTag()
call SetPlayerState(VR7,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(VR7,PLAYER_STATE_RESOURCE_GOLD)+M38)
call SetTextTagText(t,"+"+I2S(M38),.025)
call SetTextTagPosUnit(t,Y7[GetPlayerId(VR7)],0)
call SetTextTagColor(t,255,220,0,255)
call SetTextTagVelocity(t,0,.03)
if GetLocalPlayer()==VR7 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 M68 takes unit Y47,integer ML8 returns nothing
local integer M18
local player p=GetOwningPlayer(Y47)
local integer Original=0
local integer NumOfPlayers
if ML8==1 then
set M18=264
elseif ML8==2 then
set M18=312
elseif ML8==3 then
set M18=358
elseif ML8==4 then
set M18=405
endif
if IsUnitAlly(GetDyingUnit(),p)then
if ML8==1 then
set M18='d'
elseif ML8==2 then
set M18='x'
elseif ML8==3 then
set M18=140
elseif ML8==4 then
set M18=160
endif
endif
if GetOwningPlayer(GetDyingUnit())==N8[0]then
call MC8(G8[1],M18)
call MC8(G8[2],M18)
call MC8(G8[3],M18)
call MC8(G8[4],M18)
call MC8(G8[5],M18)
else
call MC8(N8[1],M18)
call MC8(N8[2],M18)
call MC8(N8[3],M18)
call MC8(N8[4],M18)
call MC8(N8[5],M18)
endif
endfunction
function M08 takes integer M58 returns boolean
local integer i=1
loop
exitwhen i>M44
if K_4[i]==M58 then
return true
endif
set i=i+1
endloop
return false
endfunction
function M28 takes integer M58 returns boolean
local integer i=1
loop
exitwhen i>K04
if K14[i]==M58 then
return true
endif
set i=i+1
endloop
return false
endfunction
function M_8 takes integer M58 returns boolean
local integer i=1
loop
exitwhen i>K24
if K54[i]==M58 then
return true
endif
set i=i+1
endloop
return false
endfunction
function N48 takes player j8 returns nothing
local integer N78
local integer N88
local location N98
local integer MV8
local boolean GotHero=false
set D7[GetPlayerId(j8)]=true
if IsJWPlayer(j8)then
set N78=KC4
set N88=K34
set N98=GetRectCenter(QD)
else
set N78=K64
set N88=KL4
set N98=GetRectCenter(PD)
endif
if X4 then
if(GetRandomInt(1,2)==1)then
set N78=KC4
set N88=K34
else
set N78=K64
set N88=KL4
endif
endif
loop
set MV8=GetRandomInt(N78,N88)
exitwhen O[MV8]==false and M08(KA4[MV8])and KA4[MV8]!='H00K'
endloop
if E9==false then
call S8(KA4[MV8])
set O[MV8]=true
endif
call CreateUnitAtLoc(j8,KA4[MV8],N98,0)
call RemoveLocation(N98)
set N98=null
endfunction
function ND8 takes player j8 returns nothing
local integer N78
local integer N88
local location N98
local integer MV8
local boolean GotHero=false
set D7[GetPlayerId(j8)]=true
if IsJWPlayer(j8)then
set N78=KC4
set N88=K34
set N98=GetRectCenter(QD)
else
set N78=K64
set N88=KL4
set N98=GetRectCenter(PD)
endif
if X4 then
if(GetRandomInt(1,2)==1)then
set N78=KC4
set N88=K34
else
set N78=K64
set N88=KL4
endif
endif
loop
set MV8=GetRandomInt(N78,N88)
exitwhen O[MV8]==false and M_8(KA4[MV8])
endloop
if E9==false then
call S8(KA4[MV8])
set O[MV8]=true
endif
call CreateUnitAtLoc(j8,KA4[MV8],N98,0)
call RemoveLocation(N98)
set N98=null
endfunction
function NE8 takes player j8 returns nothing
local integer N78
local integer N88
local location N98
local integer MV8
local boolean GotHero=false
set D7[GetPlayerId(j8)]=true
if IsJWPlayer(j8)then
set N78=KC4
set N88=K34
set N98=GetRectCenter(QD)
else
set N78=K64
set N88=KL4
set N98=GetRectCenter(PD)
endif
if X4 then
if(GetRandomInt(1,2)==1)then
set N78=KC4
set N88=K34
else
set N78=K64
set N88=KL4
endif
endif
loop
set MV8=GetRandomInt(N78,N88)
exitwhen O[MV8]==false and M28(KA4[MV8])
endloop
if E9==false then
call S8(KA4[MV8])
set O[MV8]=true
endif
call CreateUnitAtLoc(j8,KA4[MV8],N98,0)
call RemoveLocation(N98)
set N98=null
endfunction
function NF8 takes player j8 returns nothing
local integer N78
local integer N88
local location N98
local integer MV8
local boolean GotHero=false
set D7[GetPlayerId(j8)]=true
if IsJWPlayer(j8)then
set N78=KC4
set N88=K34
set N98=GetRectCenter(QD)
else
set N78=K64
set N88=KL4
set N98=GetRectCenter(PD)
endif
if X4 then
if(GetRandomInt(1,2)==1)then
set N78=KC4
set N88=K34
else
set N78=K64
set N88=KL4
endif
endif
loop
set MV8=GetRandomInt(N78,N88)
exitwhen O[MV8]==false
endloop
if E9==false then
call S8(KA4[MV8])
set O[MV8]=true
endif
call CreateUnitAtLoc(j8,KA4[MV8],N98,0)
call RemoveLocation(N98)
set N98=null
endfunction
function NG8 takes destructable d returns boolean
return GetDestructableTypeId(d)=='NTtc'or GetDestructableTypeId(d)=='NTtw'or GetDestructableTypeId(d)=='ATtr' or GetDestructableTypeId(d)=='B002' or GetDestructableTypeId(d)=='B003' or GetDestructableTypeId(d)=='B005'
endfunction
function NH8 takes unit u returns boolean
return GetUnitAbilityLevel(u,'Bcyc')>0 or GetUnitAbilityLevel(u,'Bcy2')>0
endfunction
function NI8 takes integer id returns boolean
return id=='u014' or id=='u015' or id=='u016' or id=='u01D' or id=='u01E' or id=='u01F'or id=='u01R'or id=='u01S'or id=='u01T'
endfunction
function NJ8 takes unit u returns boolean
return GetUnitAbilityLevel(u,'BOhx')>0 or GetUnitAbilityLevel(u,'B00H')>0
endfunction
function NK8 takes integer MB8 returns boolean
return(MB8=='npn3' or MB8=='npn6' or MB8=='n010' or MB8=='n0GZ')or(MB8=='npn2' or MB8=='npn5' or MB8=='n012' or MB8=='n0H1')or(MB8=='npn1' or MB8=='npn4' or MB8=='n011' or MB8=='n0H0')
endfunction
function NM8 takes player p returns string
return KW4[GetPlayerId(p)]
endfunction
function NN8 takes force ir,real Hk,string iR returns nothing
if(IsPlayerInForce(GetLocalPlayer(),ir))then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,V9,Hk,iR)
endif
endfunction
function vlv takes nothing returns group
return CreateGroup()
endfunction
function l7 takes integer i returns nothing
if i!=Dy then
set Dx[i]=Dx[Dy]
set DX[i]=DX[Dy]
endif
set Dx[Dy]=null
set DX[Dy]=0
set Dy=Dy-1
endfunction
function l8 takes nothing returns boolean
local real NO8=ZM7()
local integer i
set i=1
loop
exitwhen i>Dy
if DX[i]<NO8 then
if Dx[i]==null or IsTriggerEnabled(Dx[i])then
call l5()
else
call DestroyTrigger(Dx[i])
endif
call l7(i)
else
set i=i+1
endif
endloop
return false
endfunction
function NP8 takes trigger t returns nothing
call LT7(GetHandleId(t))
call DisableTrigger(t)
call DestroyTrigger(t)
endfunction
function FilterTreeSentinels takes nothing returns boolean
return((GetUnitTypeId(GetFilterUnit())=='h0BT')or(GetUnitTypeId(GetFilterUnit())=='h0BU'))
endfunction
function NQ8 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer NR8=GetHandleId(t)
local unit NS8=LUnit(NR8,"TreantUnit")
local unit NT8=LUnit(NR8,"SentinelUnit")
local unit W17=null
local unit u=null
local group g=CreateGroup()
local integer O5=GetPlayerId(GetOwningPlayer(NS8))
if((GetTriggerEventId()==EVENT_UNIT_DEATH)and((GetUnitTypeId(NT8)=='h0BT')or(GetUnitTypeId(NT8)=='h0BU')))then
call FlushChildHashtable(R8,NR8)
call EA8(t)
call DestroyTrigger(t)
elseif((GetUnitTypeId(NT8)=='h0BT')and(Bz>V74[64+O5]))then
call GroupClear(g)
call GroupEnumUnitsInRangeOfLoc(g,GetUnitLoc(NT8),500,Condition(function H88))
if(not YA7(g))then
loop
set u=FirstOfGroup(g)
call GroupRemoveUnit(g,u)
exitwhen IsUnitEnemy(u,GetOwningPlayer(NS8))
endloop
set W17=u
endif
if((GetUnitState(NS8,UNIT_STATE_LIFE)>5.)and(W17!=null)and(KR8(GetOwningPlayer(NS8)))and(GetUnitTypeId(NT8)=='h0BT')and(CI7(NS8)==false))then
call IssuePointOrderById(NS8,852185,GetUnitX(NT8),GetUnitY(NT8))
set V74[64+O5]=Bz+10.
endif
endif
call DestroyGroup(g)
set t=null
set NS8=null
set NT8=null
set W17=null
set u=null
set g=null
return false
endfunction
function NU8 takes unit NV8,unit NW8 returns nothing
local unit NT8=NW8
local unit NS8=NV8
local trigger t=null
local integer NX8=0
local boolexpr b=Condition(function H88)
if(KR8(GetOwningPlayer(NS8)))then
set t=CreateTrigger()
set NX8=GetHandleId(t)
call SUnit(NX8,"TreantUnit",NS8)
call SUnit(NX8,"SentinelUnit",NT8)
if(GetUnitTypeId(NT8)=='h0BT')then
call TriggerRegisterUnitInRange(t,NT8,500,b)
endif
call TriggerRegisterUnitEvent(t,NT8,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function NQ8))
endif
call DestroyBoolExpr(b)
set NT8=null
set NS8=null
set t=null
endfunction
function NY8 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer NZ8=GetHandleId(t)
local fogmodifier NA8=(LoadFogModifierHandle(R8,(NZ8),(42)))
call FogModifierStop(NA8)
call DestroyFogModifier(NA8)
call FlushChildHashtable(R8,(NZ8))
call EA8(t)
set t=null
return false
endfunction
function NB8 takes integer id returns boolean
return id==EZ or id==CY or id==BY or id==DZ or id==AY
endfunction
function NC8 takes unit u returns string
if u==null then
return(GetObjectName(('n09T')))
elseif GetUnitPointValue(u)<500 then
return(GetObjectName((KB4[GetUnitPointValue(u)])))
elseif GetUnitPointValue(u)==500 then
return"Formless"
elseif GetUnitPointValue(u)==600 then
return"Bastion"
elseif GetUnitPointValue(u)==700 then
return"Felguard"
elseif GetUnitPointValue(u)==704 then
return"Cloud"
elseif GetUnitPointValue(u)==705 then
return"Ricky"
elseif GetUnitPointValue(u)==709 then
return"Frash"
elseif GetUnitPointValue(u)==710 then
return"Offender"
elseif GetUnitPointValue(u)==711 then
return"Rawrzi"
elseif GetUnitPointValue(u)==712 then
return"Puff"
elseif GetUnitPointValue(u)==718 then
return"Melf"
elseif GetUnitPointValue(u)==719 then
return"Boomerwang"
elseif GetUnitPointValue(u)==720 then
return"Petey"
elseif GetUnitPointValue(u)==721 then
return"Rider"
elseif GetUnitPointValue(u)==722 then
return"Gambler"
elseif GetUnitPointValue(u)==723 then
return"Old N'aix"
elseif GetUnitPointValue(u)==724 then
return"Old Medusa"
elseif GetUnitPointValue(u)==725 then
return"Old Invoker"
elseif GetUnitPointValue(u)==726 then
return"Old Mercurial"
elseif GetUnitPointValue(u)==727 then
return"God of Wind"
elseif GetUnitPointValue(u)==728 then
return"Inky"
elseif GetUnitPointValue(u)==729 then
return"Old Nortrom"
elseif GetUnitPointValue(u)==730 then
return"Old Morphling"
elseif GetUnitPointValue(u)==731 then
return"Old Rikimaru"
elseif GetUnitPointValue(u)==732 then
return"Hamsterlord"
elseif GetUnitPointValue(u)==733 then
return"Astral Trekker"
elseif GetUnitPointValue(u)==734 then
return"Void Demon"
elseif GetUnitPointValue(u)==735 then
return"Old Razor"
elseif GetUnitPointValue(u)==736 then
return"Disruptor"
elseif GetUnitPointValue(u)==737 then
return"Persuasive"
elseif GetUnitPointValue(u)==738 then
return"Mana Fiend"
elseif GetUnitPointValue(u)==739 then
return"Templar"
elseif GetUnitPointValue(u)==740 then
return"Cleric"
elseif GetUnitPointValue(u)==741 then
return"Old Butcher"
elseif GetUnitPointValue(u)==742 then
return"Old Holy Knight"
elseif GetUnitPointValue(u)==743 then
return"Flame Lord"
elseif GetUnitPointValue(u)==744 then
return"Old Bat Rider"
elseif GetUnitPointValue(u)==746 then
return"Old Raijin"
elseif GetUnitPointValue(u)==747 then
return"Squire"
elseif GetUnitPointValue(u)==748 then
return"Old Undying"
elseif GetUnitPointValue(u)==900 then
return"El Dorado"
elseif GetUnitPointValue(u)==901 then
return"Spongebob"
elseif GetUnitPointValue(u)==902 then
return"Mampherok"
elseif GetUnitPointValue(u)==903 then
return"Morsfang"
elseif GetUnitPointValue(u)==904 then
return"Benethor"
elseif GetUnitPointValue(u)==905 then
return"Soul Eater"
elseif GetUnitPointValue(u)==906 then
return"Orcish Engineer"
endif
return(GetObjectName((KB4[GetUnitPointValue(u)])))
endfunction
function N38 takes unit Y47 returns string
local integer i=GetUnitPointValue(Y47)
if HO4 then
set i=GetPlayerId(GetOwningPlayer(Y47))
if Player(i)==G8[1]then
return"Blue"
elseif Player(i)==G8[2]then
return"Teal"
elseif Player(i)==G8[3]then
return"Purple"
elseif Player(i)==G8[4]then
return"Yellow"
elseif Player(i)==G8[5]then
return"Orange"
elseif Player(i)==N8[1]then
return"Pink"
elseif Player(i)==N8[2]then
return"Gray"
elseif Player(i)==N8[3]then
return"Light"
elseif Player(i)==N8[4]then
return"Dark"
elseif Player(i)==N8[5]then
return"Brown"
endif
return"Unknown"
endif
if(i==1)then
return"Shendelzare"
elseif(i==15)then
return"Cairne"
elseif(i==18)then
return"Magi"
elseif(i==21)then
return"Azwraith"
elseif(i==29)then
return"Wisp"
elseif(i==33)then
return"Davion"
elseif(i==65)then
return"Anub'arak"
elseif(i==86)then
return"Vol'Jin"
elseif(i==91)then
return"Azgalor"
elseif(i==93)then
return"Ish'kafel"
elseif(i==97)then
return"Kaldr"
elseif(i=='e')then
return"Eredar"
endif
return NC8(Y47)
endfunction
function N68 takes integer i returns string
if i==0 then
return(GetObjectName(('n09T')))
endif
return(GetObjectName((KB4[i])))
endfunction
function NL8 takes unit S4 returns integer
local integer z8
local integer i=0
if S4==null then
return-2
endif
set z8=GetUnitTypeId(S4)
loop
exitwhen i>JV
if CU[i]==z8 then
return i
endif
set i=i+1
endloop
return-1
endfunction
function N18 takes unit u returns string
if u==null then
return"UI\\Widgets\\Console\\Undead\\undead-inventory-slotfiller.blp"
endif
return ME4[GetUnitPointValue(u)]
endfunction
function N08 takes player p returns boolean
return L8 and(KU4==p or KV4==p)
endfunction
function N58 takes unit N28 returns integer
local integer x
local integer id=GetUnitTypeId(N28)
set x=1
loop
exitwhen x>K04
if id==K14[x]then
return OF7
endif
set x=x+1
endloop
set x=1
loop
exitwhen x>K24
if id==K54[x]then
return OG7
endif
set x=x+1
endloop
set x=1
loop
exitwhen x>M44
if id==K_4[x]then
return OH7
endif
set x=x+1
endloop
if id=='Eevm' or id=='E02V' or id=='E02W' or id=='E02U' or id=='N02B' or id=='N017' or id=='H08D' or id=='H08C' or id=='H084' or id=='H08B' or id=='N013' or id=='N014' or id=='N015' or id=='E02O' or id=='N0MM' then
return OF7
endif
if id=='N01H' or id=='N01T' or id=='N01J' or id=='H00E' or id=='H00G' or id=='H00F' or id=='H07I' or id=='E015' or id=='H0CQ' or id=='H0E3' or id=='H0E4' or id=='H0E5' or id=='U01X' or id=='N0MW' then
return OG7
endif
if id=='H06X' or id=='H06Y' or id=='H06W' or id=='H0BC' or id=='O017' or id=='N0MB' or id=='N0MC' or id=='N0MO' or id=='N0MA' then
return OH7
endif
return 0
endfunction
function N_8 takes unit N28 returns integer
local integer Hm=N58(N28)
if Hm==1 then
return GetHeroInt(N28,true)
endif
if Hm==2 then
return GetHeroAgi(N28,true)
endif
if Hm==3 then
return GetHeroStr(N28,true)
endif
return 0
endfunction
function O48 takes unit u returns boolean
return GetUnitState(u,UNIT_STATE_LIFE)<1 or HA4[GetPlayerId(GetOwningPlayer(u))]
endfunction
function O78 takes integer z8,integer r,integer g,integer b returns nothing
set CL=CL+1
set NL[CL]=r
set bL[CL]=g
set BL[CL]=b
set cL[CL]=z8
endfunction
function O88 takes nothing returns nothing
call PauseUnit(GetEnumUnit(),true)
endfunction
function emv takes nothing returns nothing
call DisplayTimedTextToPlayer(GetEnumPlayer(),0,V9,DB,dB)
endfunction
function O98 takes nothing returns nothing
if MT[GetPlayerId(GetEnumPlayer())]then
call DisplayTimedTextToPlayer(GetEnumPlayer(),0,V9,mb,Lb)
endif
endfunction
function OD8 takes force ir,real Hk,string iR returns nothing
set Lb=iR
set mb=Hk
call ForForce(ir,function O98)
endfunction
function HasLinkin takes unit u returns boolean
return GetUnitAbilityLevel(u,'B0BI')>0 or GetUnitAbilityLevel(u,'BNss')>0 or GetUnitAbilityLevel(u,'B0EV')>0
endfunction
function OF8 takes group g returns nothing
local integer i=GetHandleId(g)-UX4
if i<0 or i>'x' then
set UZ4=true
call DestroyGroup(g)
else
call GroupClear(g)
set UV4[i]=false
set UY4=i
endif
endfunction
function OG8 takes nothing returns group
local integer i=UY4
loop
exitwhen i==UY4-1
if UV4[i]==false then
set UY4=i+1
if UY4=='x' then
set UY4=0
endif
set UV4[i]=true
return UW4[i]
endif
set i=i+1
if i=='x' then
set i=0
endif
endloop
call OD8(T9,5.,"|c00ff0303CRITICAL ERROR: FOUND NO AVAILABLE GROUPS|r")
call OD8(T9,5.,"|c00ff0303Send this replay to IceFrog@gmail.com|r")
return CreateGroup()
endfunction
function OH8 takes real OI8,real dx,real dy,real Vx,real Vy returns real
local real a
local real b
local real d
set a=OI8*OI8-Vx*Vx-Vy*Vy
set b=Vx*dx+Vy*dy
if a==0 then
if b>0 then
return .0
endif
return(dx*dx+dy*dy)/ 2/ b
endif
set d=b*b+a*(dx*dx+dy*dy)
if d<0 then
return .0
endif
set d=SquareRoot(d)
if b<d then
return(b+d)/ a
endif
return(b-d)/ a
endfunction
function OJ8 takes real x,real y returns boolean
return(not(x<GetRectMinX(bj_mapInitialPlayableArea)+75))and(not(x>GetRectMaxX(bj_mapInitialPlayableArea)-75))and(not(y<GetRectMinY(bj_mapInitialPlayableArea)+75))and(not(y>GetRectMaxY(bj_mapInitialPlayableArea)-75))
endfunction
function OK8 takes unit AM7,unit X77,real X,real Y,real r,boolexpr WN7 returns boolean
local group g=CreateGroup()
local real Hx=GetUnitX(AM7)
local real Hy=GetUnitY(AM7)
local player p=GetOwningPlayer(AM7)
local real dx=(X-Hx)*.5
local real dy=(Y-Hy)*.5
local real R=SquareRoot(dx*dx+dy*dy)
local unit u
local real d
local real BF7=99999.
local real BG7=.0
local real Y_7
call GroupEnumUnitsInRange(g,Hx+dx,Hy+dy,R,WN7)
set bj_lastReplacedUnit=null
set bj_lastLoadedUnit=null
set bj_forLoopAIndex=0
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
set d=((GetUnitX(u)-Hx)*dy-(GetUnitY(u)-Hy)*dx)/ R
if u!=AM7 and u!=X77 and IsUnitVisibleEx(u,p)and d*d<=r*r then
set Y_7=Z47(AM7,u)
if Y_7<BF7 then
set BF7=Y_7
set bj_lastReplacedUnit=u
endif
if Y_7>BG7 then
set BG7=Y_7
set bj_lastLoadedUnit=u
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endif
endloop
call DestroyGroup(g)
set g=null
return bj_forLoopAIndex==0
endfunction
function OM8 takes unit AM7,unit X77,real OI8,real ON8,real CW7 returns location
local real dt=TimerGetElapsed(E4)
local real X
local real Y
local real dx=GetUnitX(X77)
local real dy=GetUnitY(X77)
call Y07(.1)
set dt=TimerGetElapsed(E4)-dt
set X=GetUnitX(X77)
set Y=GetUnitY(X77)
if X==dx and Y==dy then
call MoveLocation(H57,X,Y)
if Z87(GetUnitX(AM7),GetUnitY(AM7),GetLocationX(H57),GetLocationY(H57))<=CW7 then
return H57
endif
return null
endif
set dx=(X-dx)/ dt
set dy=(Y-dy)/ dt
set dt=OH8(OI8,X+dx*ON8-GetUnitX(AM7),Y+dy*ON8-GetUnitY(AM7),dx,dy)
if dt==0 then
return null
endif
call MoveLocation(H57,X+dx*(dt+ON8),Y+dy*(dt+ON8))
if OJ8(GetLocationX(H57),GetLocationY(H57))and Z87(GetUnitX(AM7),GetUnitY(AM7),GetLocationX(H57),GetLocationY(H57))<=CW7 then
return H57
endif
return null
endfunction
function OO8 takes unit Y47,unit A77,real OP8,real CW7 returns location
local real F08=GetUnitX(A77)
local real F58=GetUnitY(A77)
local real OQ8=TimerGetElapsed(E4)
local real OR8=0
local real OS8=0
call Y07(.1)
set OQ8=1./(TimerGetElapsed(E4)-OQ8)
set OR8=(GetUnitX(A77)-F08)*OQ8
set OS8=(GetUnitY(A77)-F58)*OQ8
if not(OR8==0 and OS8==0)then
set F08=F08+OR8*OP8
set F58=F58+OS8*OP8
endif
if Z87(GetUnitX(Y47),GetUnitY(Y47),F08,F58)<=CW7 then
call MoveLocation(H57,F08,F58)
if OJ8(GetLocationX(H57),GetLocationY(H57))then
return H57
endif
endif
return null
endfunction
function OT8 takes location E58,real OU8,real OV8 returns location
local real x=GetLocationX(E58)+OU8*Cos(OV8*bj_DEGTORAD)
local real y=GetLocationY(E58)+OU8*Sin(OV8*bj_DEGTORAD)
call MoveLocation(HA,x,y)
return HA
endfunction
function OW8 takes nothing returns boolean
return((GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(bj_lastLoadedUnit))and(GetUnitTypeId(GetFilterUnit())=='HC49')and(GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>.405))
endfunction
function aiSiren_CheckRipTide_Enum takes nothing returns boolean
return((GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetEnumUnit()))and(GetUnitTypeId(GetFilterUnit())=='HC49')and(GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>.405))
endfunction
function OX8 takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false and GetUnitAbilityLevel(GetFilterUnit(),'Avul')==0)and AO7(450,GetFilterUnit(),Condition(function OW8))>=1
endfunction
function OY8 takes unit it,unit m5 returns boolean
set bj_lastLoadedUnit=it
set bj_lastLoadedUnit=AJ7(350,L_7(m5),Condition(function OW8))
return(bj_lastLoadedUnit!=null)
endfunction
function OZ8 takes nothing returns boolean
local integer OA8=0
local integer i=0
loop
exitwhen i=='x'
if UV4[i]then
set OA8=OA8+1
endif
set i=i+1
endloop
if OA8>'d' or UZ4 then
call OD8(T9,5.,"|c00ff0303Please send me this replay ("+I2S(OA8)+")")
endif
return false
endfunction
function OB8 takes nothing returns nothing
local integer i=0
set UY4=0
set UW4[i]=CreateGroup()
set UV4[i]=false
set i=i+1
set UX4=GetHandleId(UW4[0])
loop
exitwhen i=='x'
set UW4[i]=CreateGroup()
set UV4[i]=false
set i=i+1
endloop
endfunction
function OC8 takes nothing returns boolean
local group g=OG8()
call GroupEnumUnitsInRange(g,0,0,16000,Condition(function KF8))
call ForGroup(g,function O88)
call OF8(g)
set g=null
return false
endfunction
function O38 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1.,true)
call TriggerAddCondition(t,Condition(function OC8))
call TriggerEvaluate(t)
set t=null
endfunction
function AddPermanentAbility takes unit AM7,integer OL8 returns nothing
call UnitAddAbility(AM7,OL8)
call UnitMakeAbilityPermanent(AM7,true,OL8)
endfunction
function O18 takes unit u returns boolean
return GetUnitTypeId(u)<1 or IsUnitType(u,UNIT_TYPE_DEAD)
endfunction
function O08 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
call LT7(GetHandleId(LUnit(EC8,"Unit")))
call ShowUnit(LUnit(EC8,"Unit"),false)
call RemoveUnit(LUnit(EC8,"Unit"))
call LT7(EC8)
call EA8(t)
set t=null
return false
endfunction
function O58 takes unit u,real d returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,d,false)
call TriggerAddCondition(t,Condition(function O08))
call SUnit(EC8,"Unit",u)
set t=null
endfunction
function O28 takes integer O_8 returns nothing
local unit u=CreateUnit(Player(15),O_8,0,0,0)
call RemoveUnit(u)
set u=null
endfunction
function P48 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit u=LUnit(EC8,"u")
local real P78=LReal(EC8,"duration")
local integer P88=LInt(EC8,"fade")
if GetTriggerEvalCount(t)/ 10>R2I(P78)then
call SetUnitVertexColor(u,255,'d',255,255)
call LT7(EC8)
call EA8(t)
elseif O18(u)==false then
call SetUnitVertexColor(u,255,'d',255,P88)
endif
set t=null
set u=null
return false
endfunction
function P98 takes unit u,real P78,integer P88 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function P48))
call SUnit(EC8,"u",u)
call SReal(EC8,"duration",P78)
call SInt(EC8,"fade",P88)
set t=null
endfunction
function PD8 takes integer z8,real PE8,integer PF8 returns nothing
set Ml=Ml+1
set Jl[Ml]=PE8
set ll[Ml]=z8
set Ll[Ml]=PF8
endfunction
function PG8 takes unit u returns real
local integer z8=GetUnitTypeId(u)
local integer i=1
loop
exitwhen i>Ml
if ll[i]==z8 then
return Jl[i]
endif
set i=i+1
endloop
return 1.
endfunction
function PH8 takes integer z8,string PI8 returns nothing
set Ql=Ql+1
set Pl[Ql]=PI8
set ql[Ql]=z8
endfunction
function PJ8 takes unit u returns string
local integer z8=GetUnitTypeId(u)
local integer i=1
loop
exitwhen i>Ql
if ql[i]==z8 then
return Pl[i]
endif
set i=i+1
endloop
return"stand"
endfunction
function PK8 takes unit u returns nothing
if GetUnitTypeId(u)=='N01I' then
call SetUnitAnimationByIndex(u,6)
else
call SetUnitAnimation(u,PJ8(u))
endif
endfunction
function PM8 takes player hV,string Ht returns nothing
local sound HT=CreateSound(Ht,false,false,false,10,10,"DefaultEAXON")
if(GetLocalPlayer()==hV)then
call StartSound(HT)
endif
call KillSoundWhenDone(HT)
endfunction
function ShowWarningToPlayer takes player HU,string Hv returns nothing
local sound HV=CreateSoundFromLabel("InterfaceError",false,false,false,10,10)
if(GetLocalPlayer()==HU)then
if(Hv!="")and(Hv!=null)then
call ClearTextMessages()
call DisplayTimedTextToPlayer(HU,.5,-1.,2.,"|cffffcc00"+Hv+"|r")
endif
call StartSound(HV)
endif
call KillSoundWhenDone(HV)
endfunction
function PO8 takes nothing returns boolean
if(GetTimeOfDay()>6. and GetTimeOfDay()<18.)then
return true
else
return false
endif
endfunction
function PP8 takes string H4,boolean H5 returns nothing
if H5 then
call ExecuteFunc(H4)
endif
endfunction
function PQ8 takes real x returns real
local real H7=GetRectMinX(bj_mapInitialPlayableArea)+50
if(x<H7)then
return H7
endif
set H7=GetRectMaxX(bj_mapInitialPlayableArea)-50
if(x>H7)then
return H7
endif
return x
endfunction
function PR8 takes real x returns real
local real HU8=GetRectMinX(bj_mapInitialPlayableArea)+75
if(x<HU8)then
return HU8
endif
set HU8=GetRectMaxX(bj_mapInitialPlayableArea)-75
if(x>HU8)then
return HU8
endif
return x
endfunction
function PS8 takes real y returns real
local real H7=GetRectMinY(bj_mapInitialPlayableArea)+50
if(y<H7)then
return H7
endif
set H7=GetRectMaxY(bj_mapInitialPlayableArea)-50
if(y>H7)then
return H7
endif
return y
endfunction
function PT8 takes real y returns real
local real HU8=GetRectMinY(bj_mapInitialPlayableArea)+75
if(y<HU8)then
return HU8
endif
set HU8=GetRectMaxY(bj_mapInitialPlayableArea)-75
if(y>HU8)then
return HU8
endif
return y
endfunction
function PU8 takes integer PV8 returns nothing
local unit u=CreateUnit(Player(15),'H00Y',0,0,270)
call UnitAddAbility(u,PV8)
call UnitRemoveAbility(u,PV8)
call RemoveUnit(u)
set u=null
endfunction
function PW8 takes unit u,integer PV8 returns nothing
call UnitAddAbility(u,PV8)
call UnitRemoveAbility(u,PV8)
endfunction
function PX8 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer ia=LInt(EC8,"abilcode")
call PU8(ia)
call LT7(EC8)
call EA8(t)
set t=null
return false
endfunction
function PY8 takes integer ia,real PZ8 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call SInt(EC8,"abilcode",ia)
call TriggerRegisterTimerEvent(t,PZ8,false)
call TriggerAddCondition(t,Condition(function PX8))
set t=null
endfunction
function Tree_Killer takes nothing returns nothing
call KillDestructable(GetEnumDestructable())
endfunction
function PA8 takes unit N28 returns nothing
call SBool(GetHandleId(N28),"DamageRegisterAlready",false)
call LT7(GetHandleId(N28))
call RemoveUnit(N28)
endfunction
function PB8 takes unit hn,integer iB,integer ic returns nothing
if GetUnitAbilityLevel(hn,iB)==0 then
call UnitAddAbility(hn,iB)
endif
call SetUnitAbilityLevel(hn,iB,ic)
endfunction
function PC8 takes integer a,integer b returns integer
if(a<b)then
return a
else
return b
endif
endfunction
function P38 takes integer a,integer b returns integer
if(a<b)then
return b
else
return a
endif
endfunction
function P68 takes integer ih,integer a,integer b returns integer
return P38(PC8(ih,b),a)
endfunction
function PL8 takes real a,real b returns real
if(a<b)then
return a
else
return b
endif
endfunction
function P18 takes real a,real b returns real
if(a<b)then
return b
else
return a
endif
endfunction
function iI takes nothing returns nothing
local integer W57=GetHandleId(GetExpiredTimer())
local unit Y47=LUnit(W57,"Unit")
call SetUnitState(Y47,UNIT_STATE_LIFE,GetUnitState(Y47,UNIT_STATE_LIFE)+LReal(W57,"Damage"))
set Y47=null
endfunction
function m6 takes unit Y47,real P08 returns nothing
local timer t=CreateTimer()
local integer W57=GetHandleId(t)
call SReal(W57,"Damage",P08)
call SUnit(W57,"Unit",Y47)
call TimerStart(t,0,false,function iI)
set t=null
endfunction
function AddLife takes unit Y47,real P08 returns nothing
local real iK=GetUnitState(Y47,UNIT_STATE_MAX_LIFE)
local real il=GetUnitState(Y47,UNIT_STATE_LIFE)
if(GetUnitState(Y47,UNIT_STATE_LIFE)>1)then
if P08>(iK-il)then
if P08>=il then
call SetUnitState(Y47,UNIT_STATE_LIFE,iK)
call m6(Y47,P08-(iK-il))
else
call m6(Y47,P08)
endif
else
call SetUnitState(Y47,UNIT_STATE_LIFE,GetUnitState(Y47,UNIT_STATE_LIFE)+P08)
endif
endif
endfunction
function m9 takes unit Z77,unit X77,real LW7 returns boolean
local real BJ7=GetUnitX(Z77)
local real BK7=GetUnitY(Z77)
local real BM7=GetUnitX(X77)
local real BN7=GetUnitY(X77)
return((BJ7-BM7)*(BJ7-BM7)+(BK7-BN7)*(BK7-BN7))<LW7*LW7
endfunction
function P28 takes unit hn returns nothing
call SetUnitState(hn,UNIT_STATE_MANA,GetUnitState(hn,UNIT_STATE_MAX_MANA))
endfunction
function P_8 takes unit hn,real iS returns nothing
call SetUnitState(hn,UNIT_STATE_LIFE,GetUnitState(hn,UNIT_STATE_LIFE)+iS)
endfunction
function Q48 takes nothing returns nothing
call PauseAllUnitsBJ(true)
endfunction
function RepeatedPauseAll takes nothing returns nothing
call TimerStart(CreateTimer(),1,true,function Q48)
endfunction
function Q78 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8((t))
set t=null
return false
endfunction
function Q88 takes string Q98,unit Y47,string QD8,real VN7 returns nothing
local effect fx=AddSpecialEffectTarget(Q98,Y47,QD8)
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SaveEffectHandle(R8,(W57),(32),(fx))
call TriggerRegisterTimerEvent(t,VN7,false)
call TriggerAddCondition(t,Condition(function Q78))
set fx=null
set t=null
endfunction
function QF8 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
call DestroyEffect(LEff(EC8,"fx"))
call LT7(EC8)
call EA8(t)
set t=null
return false
endfunction
function QG8 takes string iv,unit hn,string iV,real Hk returns nothing
local effect fx=AddSpecialEffectTarget(iv,hn,iV)
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call SEff(EC8,"fx",fx)
call TriggerRegisterUnitEvent(t,hn,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,Hk,false)
call TriggerAddCondition(t,Condition(function QF8))
set fx=null
set t=null
endfunction
function iw takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
call DestroyEffect(LEff(EC8,"fx"))
call LT7(EC8)
call EA8(t)
set t=null
return false
endfunction
function QH8 takes string iv,real x,real y,real Hk returns nothing
local effect fx=AddSpecialEffect(iv,x,y)
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SEff(W57,"fx",fx)
call TriggerRegisterTimerEvent(t,Hk,false)
call TriggerAddCondition(t,Condition(function iw))
set fx=null
set t=null
endfunction
function ix takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local string iv=EQ8(EC8,"Effect")
local string iV=EQ8(EC8,"Attach")
local integer iX=LInt(EC8,"Count")
call QG8(iv,m5,iV,2)
if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>iX then
call LT7(EC8)
call EA8(t)
endif
set t=null
set m5=null
return false
endfunction
function QI8 takes timer t returns nothing
call PauseTimer(t)
call LT7(GetHandleId(t))
call DestroyTimer(t)
endfunction
function QJ8 takes unit it,unit m5 returns boolean
local real x=RAbsBJ(GetUnitFacing(it)-GetUnitFacing(m5))
call XK7("aiIsChasing "+R2S(GetUnitFacing(it))+" "+R2S(GetUnitFacing(m5))+" "+R2S(YH7(it,m5)))
if(x<20 or x>340)then
set x=RAbsBJ(GetUnitFacing(it)-YH7(it,m5))
return(x<20 or x>340)
endif
return false
endfunction
function i4 takes nothing returns nothing
call DestroyLightning(EI8(GetHandleId(GetExpiredTimer()),"Lightning"))
endfunction
function QK8 takes string i6,real x1,real y1,real x2,real y2,real r,real g,real b,real a,real Hk returns nothing
local timer t=CreateTimer()
local lightning i7=AddLightning(i6,true,x1,y1,x2,y2)
call SetLightningColor(i7,r,g,b,a)
call DX8(GetHandleId(t),"Lightning",i7)
call TimerStart(t,Hk,false,function i4)
set t=null
endfunction
function QM8 takes string Hx,real Hk,unit HX,real Ia,integer r,integer g,integer b,integer a returns nothing
local texttag tt=CreateTextTag()
call SetTextTagText(tt,Hx,Ia)
call SetTextTagPosUnit(tt,HX,64)
call SetTextTagColor(tt,r,g,b,a)
call SetTextTagVelocity(tt,0,.0355)
call SetTextTagFadepoint(tt,2)
call SetTextTagPermanent(tt,false)
call SetTextTagLifespan(tt,Hk)
if IsUnitVisibleEx(HX,GetLocalPlayer())or N08(GetLocalPlayer())then
call SetTextTagVisibility(tt,true)
else
call SetTextTagVisibility(tt,false)
endif
set tt=null
endfunction
function QN8 takes player p,string QO8,real VN7,unit W17,real QP8,integer r,integer g,integer b,integer a returns nothing
local texttag tt=CreateTextTag()
call SetTextTagText(tt,QO8,QP8)
call SetTextTagPosUnit(tt,W17,64)
call SetTextTagColor(tt,r,g,b,a)
call SetTextTagVelocity(tt,0,.0355)
call SetTextTagFadepoint(tt,2)
call SetTextTagPermanent(tt,false)
call SetTextTagLifespan(tt,VN7)
if IsPlayerAlly(GetLocalPlayer(),p)or N08(GetLocalPlayer())then
call SetTextTagVisibility(tt,true)
else
call SetTextTagVisibility(tt,false)
endif
set tt=null
endfunction
function TriggerRegisterAllPlayersEvent takes trigger t,playerunitevent Ib returns nothing
local integer QR8=0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(QR8),Ib,Condition(function KF8))
set QR8=QR8+1
exitwhen QR8==16
endloop
endfunction
function QS8 takes string s returns integer
local integer QT8=0
local integer QU8=1
local integer QV8=1
loop
exitwhen QU8>StringLength(s)
loop
exitwhen QV8>10
if SubString(s,QU8-1,QU8)==SubString(PU7,QV8-1,QV8)then
set QT8=QT8+R2I((48+QV8-1)*Pow(256.,I2R(StringLength(s)-QU8)))
set QV8=QV8+1
else
set QV8=QV8+1
endif
endloop
set QV8=1
loop
exitwhen QV8>26
if SubString(s,QU8-1,QU8)==SubString(PV7,QV8-1,QV8)then
set QT8=QT8+R2I(I2R(65+QV8-1)*Pow(256.,I2R(StringLength(s)-QU8)))
set QV8=QV8+1
else
set QV8=QV8+1
endif
endloop
set QV8=1
loop
exitwhen QV8>26
if SubString(s,QU8-1,QU8)==SubString(PW7,QV8-1,QV8)then
set QT8=QT8+R2I((97+QV8-1)*Pow(256.,I2R(StringLength(s)-QU8)))
set QV8=QV8+1
else
set QV8=QV8+1
endif
endloop
set QV8=1
set QU8=QU8+1
endloop
return QT8
endfunction
function QW8 takes integer i returns string
local string QT8=""
local integer QX8=0
local integer QY8=0
loop
exitwhen i==0
set QX8=i-(i/ 256)*256
if QX8>=48 and QX8<=57 then
set QY8=QX8-48
set QT8=SubString(PU7,QY8,QY8+1)+QT8
endif
if QX8>=65 and QX8<=90 then
set QY8=QX8-65
set QT8=SubString(PV7,QY8,QY8+1)+QT8
endif
if QX8>=97 and QX8<='z' then
set QY8=QX8-97
set QT8=SubString(PW7,QY8,QY8+1)+QT8
endif
set i=i/ 256
endloop
return QT8
endfunction
function QZ8 takes unit Z77,real QA8 returns boolean
return GetUnitAbilityLevel(Z77,'A01Y')>0 and TimerGetRemaining(M_4[GetPlayerId(GetOwningPlayer(Z77))])==0 and GetUnitState(Z77,UNIT_STATE_MANA)>=QA8
endfunction
function QC8 takes integer Q38,integer Q68,integer QL8,integer Q18 returns real
local integer Q08=0
if Q68==LoadInteger(S47,Q38,'Abil')then
if Q18==TO7 then
set Q08='dmg0'+QL8
elseif Q18==TP7 then
set Q08='Dur0'+QL8
elseif Q18==TQ7 then
set Q08='Ind0'+QL8
elseif Q18==TR7 then
set Q08='Skil'
elseif Q18==TS7 then
set Q08='type'
endif
elseif Q68==LoadInteger(S47,Q38,'Upab')then
if Q18==TO7 then
set Q08='Udm0'+QL8
elseif Q18==TP7 then
set Q08='Udu0'+QL8
elseif Q18==TQ7 then
set Q08='Uid0'+QL8
elseif Q18==TR7 then
set Q08='Skil'
elseif Q18==TS7 then
set Q08='type'
endif
else
return 0
endif
if Q08=='type' or Q08=='Skil' then
return I2R(LoadInteger(S47,Q38,Q08))
endif
return LoadReal(S47,Q38,Q08)
endfunction
function Q58 takes real r returns real
if r<1 and r>0 then
return 1
endif
return r
endfunction
function Q28 takes unit u returns real
local integer i=0
local real Q_8=.0
local real r=0
local real R48=0
local integer V37=GetHandleId(u)
local integer R78=0
local integer array R88
set R88[0]='BNdo'
set R88[1]='B07K'
set R88[2]='B001'
set R88[3]='A23W'
set R88[4]='A1W3'
set R88[5]='B0AQ'
set R88[6]='A1VS'
set R88[7]=StringHash("R98")
set R88[8]=StringHash("RD8")
set R88[9]=StringHash("CurseOfTheSilent")
set R88[10]='BEsh'
set R88[11]='B081'
loop
exitwhen i>10
if HaveSavedReal(S47,V37,R88[i])then
set R78=LoadInteger(S47,V37,R88[i])
set r=QC8(R88[i],T97[R78],T47[R78],TO7)
set R48=Q58(LoadReal(S47,V37,R88[i])/(S27[R78]/ QC8(R88[i],T97[R78],T47[R78],TP7)))
set Q_8=Q_8+R48*r
endif
set i=i+1
endloop
set i=11
if HaveSavedReal(S47,V37,R88[i])then
set R78=LoadInteger(S47,V37,R88[i])
set r=S_7[R78]
set R48=Q58(LoadReal(S47,V37,R88[i]))
set Q_8=Q_8+R48*r
endif
return Q_8
endfunction
function RE8 takes unit u,real RF8 returns real
local integer i=0
local real Q_8=.0
local real r=0
local real R48=0
local integer V37=GetHandleId(u)
local real RG8=0
local integer R78=0
local integer array R88
set R88[0]='BNdo'
set R88[1]='B07K'
set R88[2]='B001'
set R88[3]='A23W'
set R88[4]='A1W3'
set R88[5]='B0AQ'
set R88[6]='A1VS'
set R88[7]=StringHash("R98")
set R88[8]=StringHash("RD8")
set R88[9]=StringHash("CurseOfTheSilent")
set R88[10]='BEsh'
set R88[11]='B081'
loop
exitwhen i>10
if HaveSavedReal(S47,V37,R88[i])then
set R78=LoadInteger(S47,V37,R88[i])
set r=QC8(R88[i],T97[R78],T47[R78],TO7)
set RG8=RMinBJ(RF8,LoadReal(S47,V37,R88[i]))
set R48=Q58(RG8/(S27[R78]/ QC8(R88[i],T97[R78],T47[R78],TP7)))
set Q_8=Q_8+R48*r
endif
set i=i+1
endloop
set i=11
if HaveSavedReal(S47,V37,R88[i])then
set R78=LoadInteger(S47,V37,R88[i])
set r=S_7[R78]
set R48=Q58(LoadReal(S47,V37,R88[i]))
set Q_8=Q_8+R48*r
endif
return Q_8
endfunction
function RH8 takes unit u,real RF8,real RI8 returns real
local real RJ8=RE8(u,RF8)
local real Q_8=RJ8
local integer R88=0
local integer RK8=0
local real r=.0
local integer V37=GetHandleId(u)
local integer W57=0
local integer RM8=0
if HaveSavedReal(S47,V37,StringHash("4333"))then
set RK8=StringHash("4333")
elseif HaveSavedReal(S47,V37,StringHash("4418"))then
set RK8=StringHash("4418")
endif
if HaveSavedReal(S47,V37,StringHash("Maledict"))then
set R88=StringHash("Maledict")
endif
if R88==0 and RK8==0 then
return Q_8
endif
if LoadReal(S47,V37,StringHash("Maledict"))<LoadReal(S47,V37,RK8)and HaveSavedReal(S47,V37,StringHash("Maledict"))then
set W57=LoadInteger(S47,V37,R88)
set Q_8=Q_8+5*T47[W57]*LoadReal(S47,V37,R88)+RI8
set r=QC8(StringHash("Maledict"),'A0NO',T47[W57],TQ7)*(T87[W57]-GetWidgetLife(u)+Q_8)
set Q_8=Q_8+r
set RM8=LoadInteger(S47,V37,RK8)
set r=QC8(RK8,T97[RM8],T47[RM8],TQ7)*(GetUnitState(u,UNIT_STATE_MAX_LIFE)-GetWidgetLife(u)+Q_8)
set Q_8=Q_8+r
elseif LoadReal(S47,V37,StringHash("Maledict"))>=LoadReal(S47,V37,RK8)and HaveSavedReal(S47,V37,RK8)then
set RM8=LoadInteger(S47,V37,RK8)
set r=QC8(RK8,T97[RM8],T47[RM8],TQ7)*(GetUnitState(u,UNIT_STATE_MAX_LIFE)-GetWidgetLife(u)+Q_8+RI8)
set Q_8=Q_8+r
set W57=LoadInteger(S47,V37,R88)
set Q_8=Q_8+5*T47[W57]*LoadReal(S47,V37,R88)
set r=QC8(StringHash("Maledict"),'A0NO',T47[W57],TQ7)*(T87[W57]-GetWidgetLife(u)+Q_8)
set Q_8=Q_8+r
endif
return Q_8
endfunction
function RN8 takes nothing returns nothing
local real r=RH8(GetEnumUnit(),TV7,TT7)
if TU7==0 or r>=TU7 then
set TU7=r
set hy=GetEnumUnit()
endif
endfunction
function RO8 takes real K1,unit IB,boolexpr Ig,real RF8,real RI8 returns unit
set hy=null
set TT7=RI8
set TV7=RF8
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(IB),GetUnitY(IB),K1,Ig)
call ForGroup(iA,function RN8)
call DestroyBoolExpr(Ig)
return hy
endfunction
function GetTDSTop takes nothing returns integer
return TJ7
endfunction
function GetTDSOffset takes nothing returns integer
return TK7
endfunction
function RP8 takes timer t returns integer
local integer i=GetHandleId(t)-TK7
if i>=TJ7 or i<0 or t==null then
call XK7(TM7)
call XK7(GG7)
return-1
endif
return i
endfunction
function RQ8 takes timer t returns boolean
local integer i=RP8(t)
if i==-1 then
call DestroyTimer(t)
return false
endif
call PauseTimer(t)
set S57[i]=-1
set S27[i]=-1
set S67[i]=false
set S07[i]=null
set S_7[i]=0
set T77[i]=false
set T97[i]=0
set T87[i]=0
return true
endfunction
function RR8 takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer i=RP8(t)
local real RS8=TimerGetElapsed(t)
if i==-1 or RS8>=S27[i]or IsUnitType(S07[i],UNIT_TYPE_DEAD)or IsUnit(S07[i],null)then
call RemoveSavedReal(S47,GetHandleId(S07[i]),S57[i])
call RemoveSavedInteger(S47,GetHandleId(S07[i]),S57[i])
call RQ8(t)
set t=null
return
endif
call SaveReal(S47,GetHandleId(S07[i]),S57[i],S27[i]-RS8)
set t=null
endfunction
function RT8 takes nothing returns timer
local integer i=TN7
if i<0 or i>=TJ7 then
set i=0
endif
loop
if S67[i]==false then
set TN7=i
set S67[i]=true
call ResumeTimer(SL7[i])
return SL7[i]
endif
if i>=TJ7 then
set i=0
else
set i=i+1
endif
exitwhen i==TN7
endloop
return null
endfunction
function RU8 takes nothing returns nothing
set S07[TN7]=null
set S67[TN7]=false
set S57[TN7]=-1
set S27[TN7]=-1
set SL7[TN7]=CreateTimer()
set T77[TN7]=false
set T87[TN7]=.0
set T97[TN7]=0
set S_7[TN7]=0
call XK7("# "+I2S(GetHandleId(SL7[TN7])))
if GetHandleId(SL7[TN7])-GetHandleId(SL7[TN7-1])!=1 then
set TN7=99999
call XK7("#Error : TDS Init Failure. Handle Break.")
endif
endfunction
function RV8 takes nothing returns nothing
set T87[0]=.0
set S07[0]=null
set S67[0]=false
set S57[0]=-1
set S27[0]=-1
set SL7[0]=CreateTimer()
set T77[0]=false
set TN7=1
set T97[0]=0
set S_7[0]=0
set TK7=GetHandleId(SL7[0])
loop
exitwhen TN7>=TJ7
call ExecuteFunc("RU8")
set TN7=TN7+1
endloop
set TN7=0
endfunction
function RW8 takes unit W17,integer Q38,real interval,real VN7,unit E58,integer Q68,boolean RX8 returns timer
local integer i
set S17=RT8()
set i=RP8(S17)
if S17!=null and i>=0 and i<TJ7 then
set S07[i]=W17
set S57[i]=Q38
set S27[i]=VN7
set T97[i]=Q68
set T47[i]=GetUnitAbilityLevel(E58,Q68)
set S_7[i]=QC8(Q38,Q68,T47[i],TO7)
set T77[i]=RX8
call TimerStart(S17,.5,true,function RR8)
call SaveInteger(S47,GetHandleId(W17),Q38,i)
return S17
endif
return null
endfunction
function RY8 takes unit u,integer Q38 returns real
return LoadReal(S47,GetHandleId(u),Q38)
endfunction
function RZ8 takes unit u,integer Q38,real r returns nothing
call SaveReal(S47,GetHandleId(u),Q38,r)
endfunction
function RA8 takes integer RB8,integer RC8,real R38,real R68,real RL8,real R18,real R08,real R58,real R28,real R_8,real S48,real S78,real S88,real S98,real SD8,real SE8,real SF8,real SG8,real SH8,real SI8,real SJ8,real SK8,real SM8,real SN8,real SO8,real SP8,integer SQ8,integer SR8,integer SS8 returns nothing
call SaveInteger(S47,RB8,'Skil',RC8)
call SaveReal(S47,RB8,'Ind1',R38)
call SaveReal(S47,RB8,'Ind2',R68)
call SaveReal(S47,RB8,'Ind3',RL8)
call SaveReal(S47,RB8,'Ind4',R18)
call SaveReal(S47,RB8,'dmg1',R08)
call SaveReal(S47,RB8,'dmg2',R58)
call SaveReal(S47,RB8,'dmg3',R28)
call SaveReal(S47,RB8,'dmg4',R_8)
call SaveReal(S47,RB8,'Dur1',S48)
call SaveReal(S47,RB8,'Dur2',S78)
call SaveReal(S47,RB8,'Dur3',S88)
call SaveReal(S47,RB8,'Dur4',S98)
call SaveReal(S47,RB8,'Uid1',SD8)
call SaveReal(S47,RB8,'Uid2',SE8)
call SaveReal(S47,RB8,'Uid3',SF8)
call SaveReal(S47,RB8,'Uid4',SG8)
call SaveReal(S47,RB8,'Udm1',SH8)
call SaveReal(S47,RB8,'Udm2',SI8)
call SaveReal(S47,RB8,'Udm3',SJ8)
call SaveReal(S47,RB8,'Udm4',SK8)
call SaveReal(S47,RB8,'Udu1',SM8)
call SaveReal(S47,RB8,'Udu2',SN8)
call SaveReal(S47,RB8,'Udu3',SO8)
call SaveReal(S47,RB8,'Udu4',SP8)
call SaveInteger(S47,RB8,'Abil',SQ8)
call SaveInteger(S47,RB8,'Upab',SR8)
call SaveInteger(S47,RB8,'type',SS8)
endfunction
function ST8 takes nothing returns nothing
call RA8('BNdo',0,0,0,0,0,30,50,70,0,15,15,15,0,0,0,0,0,50,80,'n',0,16,16,16,0,'A0MU','A0A2',0)
call RA8('B07K','A17K',0,0,0,0,15,25,35,45,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,'A0AS',0,0)
call RA8('B06D',0,0,0,0,0,10,16,22,28,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,'A09V',0,0)
call RA8('B001',0,0,0,0,0,60,'d',145,0,5,5,5,0,0,0,0,0,60,'d',145,0,5,5,5,0,'A080','A1UZ',0)
call RA8('A23W',0,0,0,0,0,10,15,20,25,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,'A0MM',0,0)
call RA8('B081',0,0,0,0,0,5,10,15,20,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,'A0QN',0,0)
call RA8('A1W3','B0DO',0,0,0,0,15,21,27,33,10,13,16,19,0,0,0,0,0,0,0,0,0,0,0,0,'A0S1',0,0)
call RA8('B0AQ',0,25,50,75,'d',I2R(15*6)/ 15,I2R(30*6)/ 15,I2R(45*6)/ 15,I2R(60*6)/ 15,15,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,'A173',0,0)
call RA8('B028',0,0,0,0,0,36,58,81,0,12,14,15,0,0,0,0,0,58,81,'l',0,14,16,16,0,'A013','A0A6',0)
call RA8('A1VS','B0DN',50,'d',150,200,15,30,40,50,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,'AHtb',0,0)
call RA8(StringHash("Urn"),0,0,0,0,0,150./ 8,150./ 8,150./ 8,150./ 8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,'A1MO',0,0)
call RA8(StringHash("4333"),0,.4,.6,.9,0,0,0,0,0,1.5,1.5,1.5,0,0,0,0,0,0,0,0,0,0,0,0,0,'A067',0,2)
call RA8(StringHash("4418"),0,0,0,0,0,0,0,0,0,0,0,0,0,.6,.9,1.2,0,0,0,0,0,1.5,1.5,1.5,0,0,'A08P',2)
call RA8(StringHash("R98"),0,40,60,80,'d',40,60,80,'d',3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,'A1TV',0,0)
call RA8(StringHash("RD8"),0,0,0,0,0,150,200,250,300,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,'A2NT',0,0)
call RA8(StringHash("CurseOfTheSilent"),0,0,0,0,0,20,35,50,65,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,'A14L',0,0)
call RA8('BEsh',0,50,75,'d','}',30,40,50,60,(15.1)/ 5,(15.1)/ 5,(15.1)/ 5,(15.1)/ 5,0,0,0,0,0,0,0,0,0,0,0,0,'A0Q7',0,0)
call RA8(StringHash("Maledict"),0,.16,.24,.36,.4,5,10,15,20,12,12,12,12,0,0,0,0,0,0,0,0,0,0,0,0,'A0NO',0,1)
call RA8('A0P2',0,.2,.2,.2,.2,0,0,0,0,25,25,25,25,0,0,0,0,0,0,0,0,0,0,0,0,'A0J5',0,4)
endfunction
function SU8 takes nothing returns boolean
local real d
if GetUnitAbilityLevel(GetTriggerUnit(),'B06D')>0 and GetUnitAbilityLevel(GetEventDamageSource(),'A09V')>0 and LUnit(GetHandleId(GetTriggeringTrigger()),"Source")==GetEventDamageSource()then
call RW8(GetTriggerUnit(),'B06D',1,2,GetEventDamageSource(),'A09V',false)
call DisableTrigger(GetTriggeringTrigger())
call LT7(GetHandleId(GetTriggeringTrigger()))
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function SV8 takes nothing returns nothing
local trigger t
local unit m5
local unit Z77
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
set m5=GetSpellTargetUnit()
set Z77=GetTriggerUnit()
else
set m5=GetTriggerUnit()
set Z77=GetAttacker()
endif
if IsUnitIllusion(Z77)==false then
set t=CreateTrigger()
call SUnit(GetHandleId(t),"Source",Z77)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function SU8))
endif
set t=null
set m5=null
set Z77=null
endfunction
function SW8 takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if GetUnitAbilityLevel(GetAttacker(),'A09V')>0 and(LBool(GetHandleId(GetTriggeringTrigger()),"OrbOn")or(GZ[304+GetPlayerId(GetOwningPlayer(GetAttacker()))]))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==LUnit(GetHandleId(GetTriggeringTrigger()),"Hero")then
call SV8()
endif
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if(GetIssuedOrderId()==852255)then
call SBool(GetHandleId(GetTriggeringTrigger()),"OrbOn",true)
elseif(GetIssuedOrderId()==852256)then
call SBool(GetHandleId(GetTriggeringTrigger()),"OrbOn",false)
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='A09V' then
call SV8()
endif
return false
endfunction
function SX8 takes unit N28,boolean SY8 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function SW8))
call SUnit(GetHandleId(t),"Hero",N28)
set t=null
endfunction
function SZ8 takes nothing returns boolean
if GetLearnedSkill()=='A09V' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A09V')==1 then
call SX8(GetTriggerUnit(),false)
endif
return false
endfunction
function SA8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function SZ8))
set t=null
endfunction
function SB8 takes nothing returns nothing
if NG8(GetEnumDestructable())and IsDestructableAliveBJ(GetEnumDestructable())then
set sl=sl+1
call KillDestructable(GetEnumDestructable())
endif
endfunction
function KillTrees takes real x,real y,real d returns integer
local rect r=Rect(x-d,y-d,x+d,y+d)
set sl=0
call EnumDestructablesInRect(r,Condition(function KF8),function SB8)
call RemoveRect(r)
set r=null
return sl
endfunction
function S38 takes real x,real y returns boolean
return(not(IsTerrainPathable(x,y,PATHING_TYPE_WALKABILITY)))
endfunction
function S68 takes sound SL8,real x,real y returns nothing
call SetSoundPosition(SL8,x,y,0)
call SetSoundVolume(SL8,127)
set bj_lastPlayedSound=SL8
if(SL8!=null)then
call StartSound(SL8)
endif
endfunction
function If takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local fogmodifier IF=E48(EC8,"fog")
call FogModifierStop(IF)
call DestroyFogModifier(IF)
call LT7(EC8)
call EA8(t)
set t=null
set IF=null
return false
endfunction
function S18 takes player p,real Hk,real x,real y,real r returns nothing
local trigger t=CreateTrigger()
local fogmodifier IF=CreateFogModifierRadius(p,FOG_OF_WAR_VISIBLE,x,y,r,true,true)
call FogModifierStart(IF)
call DY8(GetHandleId(t),"fog",IF)
call TriggerRegisterTimerEvent(t,Hk,false)
call TriggerAddCondition(t,Condition(function If))
set IF=null
set t=null
endfunction
function IG takes nothing returns nothing
set bj_groupCountUnits=bj_groupCountUnits+1
endfunction
function Ih takes nothing returns nothing
if NG8(GetEnumDestructable())and GetDestructableLife(GetEnumDestructable())>0 then
set EL=true
endif
endfunction
function nA takes real x,real y,real d returns boolean
local rect r=Rect(x-d,y-d,x+d,y+d)
set EL=false
call EnumDestructablesInRect(r,null,function Ih)
call RemoveRect(r)
set r=null
return EL
endfunction
function Ii takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=LUnit(W57,"Target")
local real Ij=LReal(W57,"Speed")
local unit S08=LUnit(W57,"Projectile")
local real x=GetUnitX(S08)
local real y=GetUnitY(S08)
local real BM7=GetUnitX(X77)
local real BN7=GetUnitY(X77)
local real S58=Ij*.03
local real S28=YI7(x,y,BM7,BN7)
local real S_8=x+S58*Cos(S28*bj_DEGTORAD)
local real T48=y+S58*Sin(S28*bj_DEGTORAD)
local boolean T78=(LoadBoolean(R8,(W57),(698)))
call SetUnitX(S08,S_8)
call SetUnitY(S08,T48)
call SetUnitFacing(S08,S28)
if O18(X77)and T78==false then
call KillUnit(S08)
call LT7(W57)
call EA8(t)
elseif Z87(BM7,BN7,S_8,T48)<=S58 then
call KillUnit(S08)
set H04=LUnit(W57,"Source")
set H54=X77
call ExecuteFunc(EQ8(W57,"Callback"))
call LT7(W57)
call EA8(t)
endif
set t=null
set X77=null
set S08=null
return false
endfunction
function T88 takes unit Z77,unit m5,integer IM,string In,real Ij returns trigger
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local real iN=GetUnitX(Z77)
local real io=GetUnitY(Z77)
local real IN=GetUnitFacing(Z77)
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerAddCondition(t,Condition(function Ii))
call SReal(EC8,"Speed",Ij)
call SUnit(EC8,"Target",m5)
call DS8(EC8,"Callback",In)
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Projectile",CreateUnit(GetOwningPlayer(Z77),IM,iN,io,IN))
call SaveBoolean(R8,(EC8),(698),(false))
set eC=t
set t=null
return eC
endfunction
function Io takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
call UnitAddAbility(LUnit(EC8,"Unit"),'Aloc')
call LT7(EC8)
call EA8(t)
set t=null
return false
endfunction
function IO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer iX=GetTriggerEvalCount(t)
local unit N28=LUnit(EC8,"Hero")
local real Ip=LReal(EC8,"curscale")
local real PE8=Ip-(Ip-PG8(N28))*iX/ 40
if iX>40 or O18(N28)then
call LT7(EC8)
call EA8(t)
else
call SetUnitScale(N28,PE8,PE8,PE8)
endif
set t=null
set N28=null
return false
endfunction
function ng takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local real Iq=LReal(EC8,"EndScale")
call LT7(EC8)
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.025,true)
call TriggerAddCondition(t,Condition(function IO))
set EC8=GetHandleId(t)
call SReal(EC8,"curscale",Iq)
call SUnit(EC8,"Hero",N28)
set t=null
set N28=null
return false
endfunction
function nI takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer iX=GetTriggerEvalCount(t)
local unit N28=LUnit(EC8,"Hero")
local real Ir=(LReal(EC8,"scale")-PG8(N28))*iX/ 40
local real PE8=PG8(N28)+Ir
if iX>40 or O18(N28)then
call LT7(EC8)
call EA8(t)
else
call SetUnitScale(N28,PE8,PE8,PE8)
endif
set t=null
set N28=null
return false
endfunction
function T98 takes unit N28,real Hk,real PE8 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local real Is=PE8*PG8(N28)
local real Iq=Is
call SUnit(EC8,"Hero",N28)
call SReal(EC8,"EndScale",Iq)
call TriggerRegisterTimerEvent(t,Hk,false)
call TriggerAddCondition(t,Condition(function ng))
if Hk>3 then
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.025,true)
call TriggerAddCondition(t,Condition(function nI))
set EC8=GetHandleId(t)
call SReal(EC8,"scale",Is)
call SUnit(EC8,"Hero",N28)
else
call SetUnitScale(N28,Iq,Iq,Iq)
endif
set t=null
endfunction
function IS takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local integer It=LInt(EC8,"Ability")
if N28!=null and GetUnitAbilityLevel(N28,It)>0 then
call UnitRemoveAbility(N28,It)
endif
call LT7(EC8)
call EA8(t)
set t=null
set N28=null
return false
endfunction
function TD8 takes unit u,integer It,real Hk returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call AddPermanentAbility(u,It)
call TriggerRegisterTimerEvent(t,Hk,false)
call TriggerAddCondition(t,Condition(function IS))
call SUnit(EC8,"Hero",u)
call SInt(EC8,"Ability",It)
set t=null
endfunction
function Iu takes nothing returns nothing
set bj_groupCountUnits=bj_groupCountUnits+1
endfunction
function TE8 takes group g returns integer
set bj_groupCountUnits=0
call ForGroup(g,function Iu)
return bj_groupCountUnits
endfunction
function Iv takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local fogmodifier IF=E48(EC8,"fog")
call FogModifierStop(IF)
call DestroyFogModifier(IF)
call LT7(EC8)
call EA8(t)
set t=null
return false
endfunction
function TF8 takes fogmodifier IF,real Hk returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call FogModifierStart(IF)
call DY8(EC8,"fog",IF)
call TriggerRegisterTimerEvent(t,Hk,false)
call TriggerAddCondition(t,Condition(function Iv))
set t=null
endfunction
function Iw takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer TG8=GetHandleId(t)
local integer TH8=(LoadInteger(R8,(TG8),(55)))
local destructable d=KI8(TH8)
if d!=null then
call RemoveDestructable(d)
endif
call KK8(TH8)
call LT7(TG8)
call EA8(t)
set d=null
set t=null
return false
endfunction
function TI8 takes destructable d,real TJ8 returns nothing
local trigger t=CreateTrigger()
local integer TG8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,TJ8,false)
call TriggerAddCondition(t,Condition(function Iw))
call SaveInteger(R8,(TG8),(55),(KM8(d)))
set t=null
endfunction
function Ix takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local integer It=LInt(EC8,"Ability")
if N28!=null and GetUnitAbilityLevel(N28,It)>0 then
call UnitRemoveAbility(N28,It)
endif
call LT7(EC8)
call EA8(t)
set t=null
set N28=null
return false
endfunction
function Iy takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
call SetUnitAnimation(LUnit(EC8,"Unit"),"stand")
call LT7(EC8)
call EA8(t)
set t=null
return false
endfunction
function TK8 takes unit u,real Hk returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call SUnit(EC8,"Unit",u)
call TriggerRegisterTimerEvent(t,Hk,false)
call TriggerAddCondition(t,Condition(function Iy))
set t=null
endfunction
function nm takes real Hk,boolean IZ,real x,real y,real I0,real I1,real I2,real I3,real I4 returns nothing
local real I5
local real I6
local real I7
if(I1<=0 or I4<=0 or I3<=0)then
return
endif
set I6=2.*Hk/ I3
set I5=2.*I1/ I4
set I7=I0/ I1
call TerrainDeformRipple(x,y,I1,I2,R2I(Hk*1000),1,I5,I6,I7,IZ)
endfunction
function TM8 takes player hV,unit hn,integer M38 returns nothing
local texttag t=CreateTextTag()
call SetPlayerState(hV,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(hV,PLAYER_STATE_RESOURCE_GOLD)+M38)
call SetTextTagText(t,"+"+I2S(M38),.025)
call SetTextTagPosUnit(t,hn,0)
call SetTextTagColor(t,255,220,0,255)
call SetTextTagVelocity(t,0,.03)
if GetLocalPlayer()==hV 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 I9 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
call RemoveUnit(LUnit(EC8,"Unit"))
call LT7(EC8)
call EA8(t)
set t=null
return false
endfunction
function nn takes unit u,real d returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,d,false)
call TriggerAddCondition(t,Condition(function I9))
call SUnit(EC8,"Unit",u)
set t=null
endfunction
function jA takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
call RemoveUnit(LUnit(EC8,"Unit"))
call LT7(EC8)
call EA8(t)
set t=null
return false
endfunction
function jb takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
call KillUnit(LUnit(EC8,"Unit"))
call LT7(EC8)
call EA8(t)
set t=null
return false
endfunction
function TN8 takes unit u,real d returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,d,false)
call TriggerAddCondition(t,Condition(function jb))
call SUnit(EC8,"Unit",u)
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,d+.01,false)
call TriggerAddCondition(t,Condition(function jA))
call SUnit(EC8,"Unit",u)
set t=null
endfunction
function TO8 takes sound SL8 returns nothing
if SL8!=null and CW[GetPlayerId(GetLocalPlayer())]==false then
call StartSound(SL8)
endif
endfunction
function TP8 takes sound SL8,player HU returns nothing
if GetLocalPlayer()==HU and CW[GetPlayerId(HU)]==false then
call StartSound(SL8)
endif
endfunction
function TQ8 takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))==false
endfunction
function TR8 takes nothing returns nothing
call TP8(WT4,GetOwningPlayer(GetEnumUnit()))
endfunction
function TS8 takes unit Z77,sound TT8,real x,real y,real r returns nothing
local group g=OG8()
set H04=Z77
set WT4=TT8
call GroupEnumUnitsInRange(g,x,y,r,Condition(function TQ8))
call GroupRemoveUnit(g,Z77)
call ForGroup(g,function TR8)
call OF8(g)
set g=null
endfunction
function TU8 takes player p returns nothing
if GetLocalPlayer()==p then
call ClearTextMessages()
endif
endfunction
function TV8 takes unit u,real d returns nothing
call SetUnitState(u,UNIT_STATE_LIFE,P18(GetUnitState(u,UNIT_STATE_LIFE)-d,1))
endfunction
function TW8 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local integer TX8=LInt(EC8,"AbilityID")
if UnitRemoveAbility(m5,TX8)or GetUnitAbilityLevel(m5,TX8)==0 then
call LT7(EC8)
call EA8(t)
endif
set t=null
set m5=null
return false
endfunction
function TY8 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local integer TX8=LInt(EC8,"AbilityID")
call LT7(EC8)
call EA8(t)
if UnitRemoveAbility(m5,TX8)==false then
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,1.,true)
call TriggerAddCondition(t,Condition(function TW8))
call SUnit(EC8,"Target",m5)
call SInt(EC8,"AbilityID",TX8)
endif
set t=null
set m5=null
return false
endfunction
function TZ8 takes unit m5,integer TX8,integer TA8,real Hk returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call AddPermanentAbility(m5,TX8)
call SetUnitAbilityLevel(m5,TX8,TA8)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,Hk,false)
call TriggerAddCondition(t,Condition(function TY8))
call SUnit(EC8,"Target",m5)
call SInt(EC8,"AbilityID",TX8)
set t=null
endfunction
function TB8 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local integer o6=LInt(EC8,"AbilityID")
local integer TC8=LInt(EC8,"AbilityID")
call UnitRemoveAbility(m5,TC8)
if UnitRemoveAbility(m5,o6)or GetUnitAbilityLevel(m5,o6)==0 then
call LT7(EC8)
call EA8(t)
endif
set t=null
set m5=null
return false
endfunction
function T38 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local integer o6=LInt(EC8,"AbilityID")
local integer TC8=LInt(EC8,"BuffID")
call LT7(EC8)
call EA8(t)
call UnitRemoveAbility(m5,TC8)
if UnitRemoveAbility(m5,o6)==false then
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,1.,true)
call TriggerAddCondition(t,Condition(function TB8))
call SUnit(EC8,"Target",m5)
call SInt(EC8,"AbilityID",o6)
call SInt(EC8,"BuffID",TC8)
endif
set t=null
set m5=null
return false
endfunction
function T68 takes unit X77,integer o6,integer ML8,real TL8,integer TC8 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call AddPermanentAbility(X77,o6)
call SetUnitAbilityLevel(X77,o6,ML8)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,TL8,false)
call TriggerAddCondition(t,Condition(function T38))
call SUnit(EC8,"Target",X77)
call SInt(EC8,"AbilityID",o6)
call SInt(EC8,"BuffID",TC8)
set t=null
endfunction
function T18 takes unit S4 returns boolean
local integer z8=GetUnitTypeId(S4)
return z8=='n004' or z8=='n01G' or z8=='n01C' or z8=='n018' or z8=='e00K' or z8=='e00I' or z8=='e00L' or z8=='e01J'
endfunction
function T08 takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false
endfunction
function GenericCondition_Structure takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and O18(GetFilterUnit())==false
endfunction
function T58 takes nothing returns boolean
return GU8(GetFilterUnit())==false and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function GenericCondition_EnemyUnitsExNoImmuneNoInvisAndStructureWithAncient takes nothing returns boolean
return GU8(GetFilterUnit())==false and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04))and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and O18(GetFilterUnit())==false)
endfunction
function GenericCondition_EnemyUnitsExNoInvisAndStructureWithAncient takes nothing returns boolean
return IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04))and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and O18(GetFilterUnit())==false)
endfunction
function T28 takes nothing returns boolean
return GU8(GetFilterUnit())==false and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04))and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)
endfunction
function T_8 takes nothing returns boolean
return IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04))and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)
endfunction
function U48 takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function U78 takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)
endfunction
function U88 takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and IsPlayer(GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)
endfunction
function U98 takes unit u returns boolean
return GetUnitAbilityLevel(u,'Aetl')>0 or GetUnitAbilityLevel(u,'Bcyc')>0 or GetUnitAbilityLevel(u,'Bcy2')>0 or GetUnitAbilityLevel(u,'B01N')>0
endfunction
function UD8 takes unit u returns boolean
return(GetUnitAbilityLevel((u),('B0C1'))>0)or(GetUnitAbilityLevel((u),('BEer'))>0)or(GetUnitAbilityLevel((u),('Beng'))>0)or(GetUnitAbilityLevel((u),('Bena'))>0)or(GetUnitAbilityLevel((u),('B017'))>0)or(GetUnitAbilityLevel((u),('B078'))>0)or(GetUnitAbilityLevel((u),('B08F'))>0)or(GetUnitAbilityLevel((u),('B08E'))>0)or(GetUnitAbilityLevel((u),('B0ER'))>0)or(GetUnitAbilityLevel((u),('B0FN'))>0)
endfunction
function UE8 takes unit u returns nothing
call UnitRemoveAbility(u,'B0C1')
call UnitRemoveAbility(u,'BEer')
call UnitRemoveAbility(u,'Beng')
call UnitRemoveAbility(u,'Bena')
call UnitRemoveAbility(u,'B017')
call UnitRemoveAbility(u,'B078')
call UnitRemoveAbility(u,'B08F')
call UnitRemoveAbility(u,'B08E')
call UnitRemoveAbility(u,'B0ER')
call UnitRemoveAbility(u,'B0FN')
endfunction
function UF8 takes unit u returns nothing
call UnitRemoveAbility(u,'Abun')
call SaveInteger(R8,(GetHandleId(u)),(790),(0))
endfunction
function UG8 takes unit u returns nothing
local integer V37=GetHandleId(u)
local integer UH8=(LoadInteger(R8,(V37),(790)))
call AddPermanentAbility(u,'Abun')
set UH8=UH8+1
call SaveInteger(R8,(V37),(790),(UH8))
endfunction
function UI8 takes unit u returns nothing
local integer V37=GetHandleId(u)
local integer UH8=(LoadInteger(R8,(V37),(790)))
set UH8=IMaxBJ(UH8-1,0)
call SaveInteger(R8,(V37),(790),(UH8))
if UH8==0 then
call UF8(u)
endif
endfunction
function UJ8 takes unit u returns boolean
return(u==JW4)or(u==JX4)or(u==JY4)or(u==JZ4)or(u==JA4)or(u==JB4)or(u==JC4)or(u==J34)or(u==J64)or(u==JL4)or(u==J14)or(u==J04)or(u==J54)or(u==J24)or(u==J_4)or(u==K44)or(u==K74)or(u==IZ4)or(u==I34)or(u==IL4)or(u==I04)or(u==I24)or(u==I_4)or(u==J44)or(u==J74)or(u==J84)or(u==J94)or(u==JD4)or(u==JE4)or(u==JF4)or(u==JG4)or(u==JH4)or(u==JI4)or(u==JJ4)
endfunction
function UK8 takes nothing returns boolean
return UJ8(GetFilterUnit())and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetEnumUnit()))and GetUnitLifePercent(GetFilterUnit())<=90.
endfunction
function UM8 takes nothing returns boolean
return IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function GenericCondition_EnemyUnitsExHeroesVision takes nothing returns boolean
return(IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04))
endfunction
function GenericCondition_EnemyUnitsExHeroes takes nothing returns boolean
return(IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)
endfunction
function UN8 takes unit u returns boolean
return GetUnitAbilityLevel(u,'B068')>0 or GetUnitAbilityLevel(u,'BZ2F')>0 or GetUnitAbilityLevel(u,'B07T')>0 or GetUnitAbilityLevel(u,'B076')>0 or GetUnitAbilityLevel(u,'BOwk')>0 or GetUnitAbilityLevel(u,'B04R')>0 or GetUnitAbilityLevel(u,'B0A5')>0 or GetUnitAbilityLevel(u,'B01Q')>0 or GetUnitAbilityLevel(u,'B006')>0 or GetUnitAbilityLevel(u,'Binv')>0 or GetUnitAbilityLevel(u,'Apiv')>0 or GetUnitAbilityLevel(u,'A021')>0 or GetUnitAbilityLevel(u,'A0K4')>0 or GetUnitAbilityLevel(u,'A0XB')>0 or GetUnitAbilityLevel(u,'A0Z2')>0 or GetUnitAbilityLevel(u,'A1GA')>0 or GetUnitAbilityLevel(u,'A1HW')>0 or GetUnitAbilityLevel(u,'A1HX')>0 or GetUnitAbilityLevel(u,'A00J')>0 or GetUnitAbilityLevel(u,'B08K')>0 or GetUnitAbilityLevel(u,'B08X')>0 or GetUnitAbilityLevel(u,'B039')>0 or GetUnitAbilityLevel(u,'B00K')>0 or GetUnitAbilityLevel(u,'BHfs')>0 or GetUnitAbilityLevel(u,'A140')>0 or GetUnitAbilityLevel(u,'B021')>0 or GetUnitAbilityLevel(u,'A0ZD')>0 or GetUnitAbilityLevel(u,'A0KT')>0 or GetUnitAbilityLevel(u,'B0G8')>0 or GetUnitAbilityLevel(u,'A2T0')>0 or GetUnitAbilityLevel(u,'A2SZ')>0 or GetUnitAbilityLevel(u,'A135')>0 or GetUnitAbilityLevel(u,'A12O')>0 or GetUnitAbilityLevel(u,'A134')>0 or GetUnitAbilityLevel(u,'A139')>0
endfunction
function UO8 takes unit XE7 returns boolean
return GetUnitAbilityLevel(XE7,'A1HW')>0 or GetUnitAbilityLevel(XE7,'A1HX')>0 or GetUnitAbilityLevel(XE7,'B00K')>0 or GetUnitAbilityLevel(XE7,'B076')>0 or GetUnitAbilityLevel(XE7,'B07T')>0 or GetUnitAbilityLevel(XE7,'A021')>0 or GetUnitAbilityLevel(XE7,'A29C')>0 or GetUnitAbilityLevel(XE7,'BHfs')>0 or GetUnitAbilityLevel(XE7,'B08K')>0 or GetUnitAbilityLevel(XE7,'B068')>0 or GetUnitAbilityLevel(XE7,'B039')>0 or GetUnitAbilityLevel(XE7,'A00J')>0 or GetUnitAbilityLevel(XE7,'A0KT')>0
endfunction
function UP8 takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='oeye' or AR7(GetFilterUnit(),BU[GB])or GetUnitAbilityLevel(GetFilterUnit(),'A14K')>0 or GetUnitAbilityLevel(GetFilterUnit(),'AItb')>0
endfunction
function UQ8 takes unit u returns boolean
return GetUnitAbilityLevel(u,'B00T')==0 and GetUnitAbilityLevel(u,'B00L')==0
endfunction
function UR8 takes unit u,player p returns boolean
return UN8(u)==false or IsUnitVisibleEx(GetFilterUnit(),p)
endfunction
function GenericCondition_EnemyUnitsExHeroesNoDotaInvis takes nothing returns boolean
return((IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))
endfunction
function US8 takes nothing returns boolean
return((IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(UN8(GetFilterUnit())==false or IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04)))
endfunction
function UT8 takes nothing returns boolean
return(IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and GetUnitAbilityLevel(GetFilterUnit(),'A1RB')==0
endfunction
function GenericCondition_EnemyUnitsExVisibleAttackable takes nothing returns boolean
return((IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04)))and U98(GetFilterUnit())==false
endfunction
function UU8 takes nothing returns boolean
return(((IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04)))and(GetUnitAbilityLevel(GetFilterUnit(),'Bcyc')>0 or GetUnitAbilityLevel(GetFilterUnit(),'Bcy2')>0 or GetUnitAbilityLevel(GetFilterUnit(),'B01N')>0)==false)and GetUnitTypeId(GetFilterUnit())!='n0F5'
endfunction
function XMI2 takes nothing returns boolean
return IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function UV8 takes nothing returns boolean
return IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)
endfunction
function UW8 takes nothing returns boolean
return GU8(GetFilterUnit())==false and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function UX8 takes unit ZB7 returns boolean
return GetUnitTypeId(ZB7)=='n004' or GetUnitTypeId(ZB7)=='n018' or GetUnitTypeId(ZB7)=='n01C' or GetUnitTypeId(ZB7)=='n01G'
endfunction
function UY8 takes nothing returns boolean
return IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitTypeId(GetFilterUnit())=='ebal' or GetUnitTypeId(GetFilterUnit())=='umtw')
endfunction
function UZ8 takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false and NH8(GetFilterUnit())==false
endfunction
function UA8 takes nothing returns boolean
return UZ8()and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function jE takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and O18(GetFilterUnit())==false and NH8(GetFilterUnit())==false
endfunction
function UB8 takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and UZ8()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function GenericCondition_EnemyUnitsVisible takes nothing returns boolean
return(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function GenericCondition_EnemyUnitsAndVisibleOrWW takes nothing returns boolean
return(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))or UN8(GetFilterUnit()))
endfunction
function UC8 takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and UZ8()
endfunction
function U38 takes nothing returns boolean
return IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and UZ8()and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04))
endfunction
function U68 takes nothing returns boolean
return GU8(GetFilterUnit())==false and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false and(GetUnitAbilityLevel((GetFilterUnit()),'Bcyc')>0)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function UL8 takes nothing returns boolean
return(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04)))and GU8(GetFilterUnit())==false and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false and(GetUnitAbilityLevel((GetFilterUnit()),'Bcyc')>0)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function U18 takes nothing returns boolean
return GU8(GetFilterUnit())==false and(IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))
endfunction
function U08 takes nothing returns boolean
return IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function U58 takes nothing returns boolean
return(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function U28 takes nothing returns boolean
return GU8(GetFilterUnit())==false and(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))
endfunction
function U_8 takes nothing returns boolean
return(IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false
endfunction
function V48 takes nothing returns boolean
return GU8(GetFilterUnit())==false and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04))and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and UZ8()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function V78 takes nothing returns boolean
return GU8(GetFilterUnit())==false and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04))and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function jh takes nothing returns boolean
return IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and UZ8()
endfunction
function V88 takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)
endfunction
function ji takes nothing returns boolean
return IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))==false and UZ8()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function jI takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and UZ8()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function V98 takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function VD8 takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and UZ8()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function GenericCondition_EnemyHeroesEx_OLD takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and UZ8()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function VE8 takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function GenericCondition_EnemyHeroesExNoDotAInvis takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)or UN8(GetEnumUnit())
endfunction
function VF8 takes nothing returns boolean
return UZ8()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function VG8 takes nothing returns boolean
return UZ8()
endfunction
function VH8 takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function VI8 takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function GenericCondition_MyUnits takes nothing returns boolean
return GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function VJ8 takes nothing returns boolean
return UZ8()and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function jL takes nothing returns boolean
return UZ8()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)or IsUnitIllusion(GetFilterUnit()))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function jm takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)!=null)
endfunction
function GenericCondition_EnemyUnitsExVisible takes nothing returns boolean
return UM8()and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04))
endfunction
function GenericCondition_EnemyUnitsExNoWW takes nothing returns boolean
return(IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04))or(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04))==false and UN8(GetFilterUnit()))==false)
endfunction
function jn takes nothing returns boolean
return UZ8()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function ny takes nothing returns boolean
return jn()and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04))
endfunction
function VK8 takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and O18(GetFilterUnit())and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false and GetUnitTypeId(GetFilterUnit())!='n0F5'
endfunction
function VM8 takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(H04))and MZ8(GetFilterUnit())>0
endfunction
function VN8 takes nothing returns boolean
return IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false and(GetUnitAbilityLevel((GetFilterUnit()),'Bcyc')>0)==false)
endfunction
function VO8 takes nothing returns boolean
return GU8(GetFilterUnit())==false and(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false and(GetUnitAbilityLevel((GetFilterUnit()),'Bcyc')>0)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))
endfunction
function VP8 takes nothing returns boolean
return IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function VQ8 takes nothing returns boolean
return IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function VR8 takes nothing returns boolean
return IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))==false and(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function GenericCondition_AlliedHeroesAndCreeps takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)or GetOwningPlayer(GetFilterUnit())==G8[0]or GetOwningPlayer(GetFilterUnit())==N8[0])and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function VS8 takes nothing returns boolean
return IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))==false and IsPlayer(GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)
endfunction
function VT8 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)or GetOwningPlayer(GetFilterUnit())==G8[0]or GetOwningPlayer(GetFilterUnit())==N8[0])and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false and(GetUnitAbilityLevel((GetFilterUnit()),'Bcyc')>0)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function VU8 takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitIllusion(GetFilterUnit())==false and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false and(GetUnitAbilityLevel((GetFilterUnit()),'Bcyc')>0)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function VV8 takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false and(GetUnitAbilityLevel((GetFilterUnit()),'Bcyc')>0)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))
endfunction
function VW8 takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(H04))and GF8(GetFilterUnit())and GetWidgetLife(GetFilterUnit())>.405 and GetOwningPlayer(GetFilterUnit())!=Player(PLAYER_NEUTRAL_AGGRESSIVE)
endfunction
function VX8 takes nothing returns nothing
local destructable m5=GetEnumDestructable()
local real a=Atan2(GetDestructableY(m5)-GetUnitY(H04),GetDestructableX(m5)-GetUnitX(H04))
local real VY8=RAbsBJ((H64-a)*bj_RADTODEG)
if(NG8(m5)or GetDestructableTypeId(m5)=='B005')and GetDestructableLife(m5)>1 and VY8<wB and VY8<(ZU-5)then
set wB=VY8
set SB=m5
endif
set m5=null
endfunction
function VZ8 takes unit VA8,unit Z77,real l4 returns destructable
local real x=GetUnitX(VA8)
local real y=GetUnitY(VA8)
local rect r=Rect(x-zB,y-zB,x+zB,y+zB)
set wB=9999
set H04=VA8
set SB=null
call EnumDestructablesInRect(r,Condition(function KF8),function VX8)
call RemoveRect(r)
set r=null
return SB
endfunction
function VB8 takes nothing returns nothing
local unit m5=GetEnumUnit()
local real a=Atan2(GetUnitY(m5)-GetUnitY(H04),GetUnitX(m5)-GetUnitX(H04))
local real VY8=RAbsBJ((H64-a)*bj_RADTODEG)
if VY8<wB and VY8<ZU and m5!=H54 then
set wB=VY8
set TB=m5
endif
set m5=null
endfunction
function VC8 takes unit VA8,unit Z77,real l4 returns unit
local group g=OG8()
set TB=null
set wB=9999
set H04=VA8
set H64=Atan2(GetUnitY(Z77)-YV4,GetUnitX(Z77)-YU4)
set H54=Z77
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),yB,Condition(function U68))
call ForGroup(g,function VB8)
call OF8(g)
set g=null
return TB
endfunction
function V38 takes unit VA8,unit Z77,real l4 returns unit
local group g=OG8()
set TB=null
set wB=9999
set H04=VA8
set H64=l4
set H54=Z77
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),yB,Condition(function UL8))
call ForGroup(g,function VB8)
call OF8(g)
set g=null
return TB
endfunction
function V68 takes real VL8 returns integer
if VL8>=4. then
return 24
elseif VL8>=3.75 then
return 23
elseif VL8>=3.5 then
return 22
elseif VL8>=3.25 then
return 21
elseif VL8>=3 then
return 20
elseif VL8>=2.8 then
return 19
elseif VL8>=2.75 then
return 18
elseif VL8>=2.6 then
return 17
elseif VL8>=2.5 then
return 16
elseif VL8>=2.4 then
return 15
elseif VL8>=2.25 then
return 14
elseif VL8>=2.2 then
return 13
elseif VL8>=2 then
return 12
elseif VL8>=1.8 then
return 11
elseif VL8>=1.75 then
return 10
elseif VL8>=1.65 then
return 9
elseif VL8>=1.5 then
return 8
elseif VL8>=1.4 then
return 7
elseif VL8>=1.25 then
return 6
elseif VL8>=1.2 then
return 5
elseif VL8>=1 then
return 4
elseif VL8>=.75 then
return 3
elseif VL8>=.5 then
return 2
elseif VL8>=.25 then
return 1
endif
return 1
endfunction
function Stun takes unit Z77,unit m5,real TL8 returns nothing
local unit AC7=CreateUnit(GetOwningPlayer(m5),'e00E',GetUnitX(m5),GetUnitY(m5),0)
local integer ML8=V68(TL8)
call UnitAddAbility(AC7,'A0X6')
call SetUnitAbilityLevel(AC7,'A0X6',ML8)
call IssueTargetOrderById(AC7,852095,m5)
set AC7=null
endfunction
function ShowDamage takes unit s,integer i,real d,boolean b returns nothing
local texttag tt=CreateTextTag()
local real a=GetRandomReal(0,360)
if d<40 and i==0 then
set i=1
endif
if i==0 then
call SetTextTagColor(tt,255,0,0,255)
elseif i==1 then
call SetTextTagColor(tt,255,0,255,255)
elseif i==2 then
call SetTextTagColor(tt,128,0,0,255)
elseif i==3 then
call SetTextTagColor(tt,255,255,0,255)
elseif i==LifeDrain then
call SetTextTagColor(tt,255,255,255,255)
else
call SetTextTagColor(tt,0,0,255,255)
endif
call SetTextTagLifespan(tt,2)
call SetTextTagPosUnit(tt,s,0)
call SetTextTagVisibility(tt,b)
call SetTextTagText(tt,R2SW(d,0,2),.03)
call SetTextTagVelocity(tt,0.03*Cos(a),0.03*Sin(a))
call SetTextTagPermanent(tt,false)
call SetTextTagFadepoint(tt,1)
set tt=null
endfunction
function Dmg takes unit Z77,unit X77,integer V58,real P08 returns nothing
if V58==AA4 then
return
endif
set NowDamageType=V58
if V58==NormalFire then
call UnitDamageTarget(Z77,X77,P08,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE,WEAPON_TYPE_WHOKNOWS)
elseif V58==HeroNormal then
call UnitDamageTarget(Z77,X77,P08,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
elseif V58==HeroMagic then
call UnitDamageTarget(Z77,X77,P08,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
elseif V58==NormalPierce then
call UnitDamageTarget(Z77,X77,P08,true,true,ATTACK_TYPE_PIERCE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
elseif V58==NormalNormal then
call UnitDamageTarget(Z77,X77,P08,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
elseif V58==LifeDrain then
call SetUnitState(X77,UNIT_STATE_LIFE,RMaxBJ(GetUnitState(X77,UNIT_STATE_LIFE)-P08,1))
if Mode_DD then
call ShowDamage(X77,LifeDrain,P08,GetLocalPlayer()==GetOwningPlayer(Z77)or GetLocalPlayer()==GetOwningPlayer(X77))
endif
if GetUnitState(X77,UNIT_STATE_LIFE)<2 then
call UnitRemoveBuffs(X77,true,true)
call UnitRemoveAbility(X77,'Aetl')
if Mode_DD then
set Mode_DD=false
call UnitDamageTarget(CreateUnit(GetOwningPlayer(Z77),'e00E',0,0,0),X77,100000000.,true,false,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
set Mode_DD=true
else
call UnitDamageTarget(CreateUnit(GetOwningPlayer(Z77),'e00E',0,0,0),X77,100000000.,true,false,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endif
endif
elseif V58==Chaos then
if GetUnitAbilityLevel(X77,'Aetl')>0 or GetUnitAbilityLevel(X77,'B01N')>0 then
call UnitDamageTarget(Z77,X77,P08,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
else
call UnitDamageTarget(Z77,X77,P08,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
endif
elseif V58==8 then
call UnitDamageTarget(Z77,X77,P08,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
elseif V58==9 then
call UnitDamageTarget(Z77,X77,P08,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_ENHANCED,WEAPON_TYPE_WHOKNOWS)
endif
set NowDamageType=0
endfunction
function V28 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local integer V_8=LInt(W57,"TargetIndex")
local unit X77=KH8(V_8)
local integer V58=LInt(W57,"DamageType")
local real P08=LReal(W57,"Damage")
call Dmg(Z77,X77,V58,P08)
call KG8(V_8)
call LT7(W57)
call EA8(t)
set t=null
set Z77=null
set X77=null
return false
endfunction
function W48 takes unit Z77,unit X77,integer V58,real P08,real TL8 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SUnit(W57,"Source",Z77)
call SInt(W57,"TargetIndex",KJ8(X77))
call SInt(W57,"DamageType",V58)
call SReal(W57,"Damage",P08*1.)
call TriggerRegisterTimerEvent(t,TL8,false)
call TriggerAddCondition(t,Condition(function V28))
set t=null
endfunction
function jQ takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local unit X77=LUnit(W57,"Target")
local integer V58=LInt(W57,"DamageType")
local real P08=LReal(W57,"Damage")
call Dmg(Z77,X77,V58,P08)
call LT7(W57)
call EA8(t)
set t=null
set Z77=null
set X77=null
return false
endfunction
function W78 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 W88
if d<1 then
call UnitRemoveAbility(u,HP4[0])
call UnitRemoveAbility(u,HP4[1])
call UnitRemoveAbility(u,HP4[2])
call UnitRemoveAbility(u,HP4[3])
call UnitRemoveAbility(u,HP4[4])
call UnitRemoveAbility(u,HP4[5])
call UnitRemoveAbility(u,HP4[6])
call UnitRemoveAbility(u,HP4[7])
call UnitRemoveAbility(u,HP4[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 W88=8
set i=0
loop
exitwhen i>W88
if b[i]==1 then
call UnitAddAbility(u,HP4[i])
else
call UnitRemoveAbility(u,HP4[i])
endif
set i=i+1
endloop
endfunction
function W98 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 WD8
if d<1 then
call UnitRemoveAbility(u,UU4[0])
call UnitRemoveAbility(u,UU4[1])
call UnitRemoveAbility(u,UU4[2])
call UnitRemoveAbility(u,UU4[3])
call UnitRemoveAbility(u,UU4[4])
call UnitRemoveAbility(u,UU4[5])
call UnitRemoveAbility(u,UU4[6])
call UnitRemoveAbility(u,UU4[7])
call UnitRemoveAbility(u,UU4[8])
call UnitRemoveAbility(u,UU4[9])
call UnitRemoveAbility(u,UU4[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 WD8=10
set i=0
loop
exitwhen i>WD8
if b[i]==1 then
call UnitAddAbility(u,UU4[i])
else
call UnitRemoveAbility(u,UU4[i])
endif
set i=i+1
endloop
endfunction
function WE8 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 W88
if d<1 then
call UnitRemoveAbility(u,HQ4[0])
call UnitRemoveAbility(u,HQ4[1])
call UnitRemoveAbility(u,HQ4[2])
call UnitRemoveAbility(u,HQ4[3])
call UnitRemoveAbility(u,HQ4[4])
call UnitRemoveAbility(u,HQ4[5])
call UnitRemoveAbility(u,HQ4[6])
call UnitRemoveAbility(u,HQ4[7])
call UnitRemoveAbility(u,HQ4[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 W88=8
set i=0
loop
exitwhen i>W88
if b[i]==1 then
call UnitAddAbility(u,HQ4[i])
else
call UnitRemoveAbility(u,HQ4[i])
endif
set i=i+1
endloop
endfunction
function WF8 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 WG8
if d<1 then
call UnitRemoveAbility(u,HR4[0])
call UnitRemoveAbility(u,HR4[1])
call UnitRemoveAbility(u,HR4[2])
call UnitRemoveAbility(u,HR4[3])
call UnitRemoveAbility(u,HR4[4])
call UnitRemoveAbility(u,HR4[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 WG8=i
set i=0
loop
exitwhen i>WG8
if b[i]==1 then
call UnitAddAbility(u,HR4[i])
else
call UnitRemoveAbility(u,HR4[i])
endif
set i=i+1
endloop
endfunction
function WH8 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local player p=ED8(EC8,"p")
local integer i=LInt(EC8,"i")
local string c="|c006699CC"
if(GetObjectName(('n0HH')))=="Language: English" and(MG4[(i)]!="")then
if GetTriggerEvalCount(t)==1 then
call DisplayTimedTextToPlayer(p,0,0,15,"Tip 1: "+c+MG4[i]+"|r")
call TP8(zR,p)
elseif GetTriggerEvalCount(t)==2 then
call DisplayTimedTextToPlayer(p,0,0,15,"Tip 2: "+c+MH4[i]+"|r")
call TP8(zR,p)
elseif GetTriggerEvalCount(t)==3 then
call DisplayTimedTextToPlayer(p,0,0,15,"Tip 3: "+c+MI4[i]+"|r")
call TP8(zR,p)
elseif GetTriggerEvalCount(t)==4 then
call DisplayTimedTextToPlayer(p,0,0,15,"Tip 4: "+c+MJ4[i]+"|r")
call TP8(zR,p)
elseif GetTriggerEvalCount(t)==5 then
call DisplayTimedTextToPlayer(p,0,0,15,"Tip 5: "+c+MK4[i]+"|r")
call TP8(zR,p)
endif
endif
if GetTriggerEvalCount(t)==5 then
call EA8(t)
call LT7(EC8)
endif
set t=null
return false
endfunction
function WI8 takes player p,integer i returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,15.,false)
call TriggerRegisterTimerEvent(t,300.,true)
call TriggerAddCondition(t,Condition(function WH8))
call DA8(EC8,"p",p)
call SInt(EC8,"i",i)
set t=null
endfunction
function WJ8 takes unit Z77 returns integer
local integer MB8=GetUnitTypeId(Z77)
local integer WK8='o01P'
if MB8=='Udre' then
set WK8='o01N'
elseif MB8=='Emoo' or MB8=='H00I' or MB8=='H071' or MB8=='E005' then
set WK8='o01O'
endif
return WK8
endfunction
function WM8 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call KillUnit(AC7)
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
call SetUnitX(AC7,GetUnitX(Z77))
call SetUnitY(AC7,GetUnitY(Z77))
endif
set t=null
set Z77=null
set AC7=null
return false
endfunction
function WN8 takes unit Z77 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AC7=CreateUnit(GetOwningPlayer(Z77),WJ8(Z77),GetUnitX(Z77),GetUnitY(Z77),0)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function WM8))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(19),(AC7))
set t=null
endfunction
function WO8 takes integer WP8 returns boolean
local integer i=0
loop
exitwhen i>59
if WP8==L9[i]then
return true
endif
set i=i+1
endloop
return false
endfunction
function WQ8 takes integer TA8 returns integer
local real WR8=ZM7()-M04
local real WS8=(R2I(WR8)/ 60)-(1/ 2)
local real WT8='d'+TA8*TA8*1.5+WS8*15
local integer WU8
set WU8=R2I(WT8/ 50)
set WU8=IMinBJ(WU8,59)
set WU8=IMaxBJ(WU8,0)
return WU8
endfunction
function WV8 takes player p returns nothing
local integer id=GetPlayerId(p)
local unit WW8=KR4[id]
local unit WX8=Y7[id]
local integer WY8=GetHeroLevel(WX8)
local integer i=0
if T4 then
return
endif
if AG4==false then
return
endif
if ED[id]=='h0D4' then
return
endif
if ED[id]!=0 then
call RemoveUnitFromStock(WW8,ED[id])
endif
call AddUnitToStock(WW8,L9[WQ8(WY8)],1,1)
set ED[id]=L9[WQ8(WY8)]
set WX8=null
set WW8=null
endfunction
function WZ8 takes nothing returns boolean
if T4 then
return false
endif
call WV8(G8[1])
call WV8(G8[2])
call WV8(G8[3])
call WV8(G8[4])
call WV8(G8[5])
call WV8(N8[1])
call WV8(N8[2])
call WV8(N8[3])
call WV8(N8[4])
call WV8(N8[5])
return false
endfunction
function WA8 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer id=(LoadInteger(R8,(W57),(34)))
local unit WB8=KR4[id]
local unit AM7=Y7[id]
local integer ML8=GetHeroLevel(AM7)
local integer i=0
call RemoveUnitFromStock(WB8,'h0D4')
call AddUnitToStock(WB8,L9[WQ8(ML8)],1,1)
set ED[id]=L9[WQ8(ML8)]
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set AM7=null
return false
endfunction
function WC8 takes player p returns nothing
local integer id=GetPlayerId(p)
local unit WB8=KR4[id]
local unit AM7=Y7[id]
local integer ML8=GetHeroLevel(AM7)
local integer i=0
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call WN8(AM7)
loop
exitwhen i>59
call RemoveUnitFromStock(WB8,L9[i])
set i=i+1
endloop
call TriggerAddCondition(t,Condition(function WA8))
call TriggerRegisterTimerEvent(t,360,false)
call SaveInteger(R8,(W57),(34),(id))
set ED[id]='h0D4'
call RemoveUnitFromStock(WB8,'h0D4')
call AddUnitToStock(WB8,'h0D4',0,1)
set AM7=null
set WB8=null
set t=null
endfunction
function W38 takes nothing returns nothing
set KX4[GetPlayerId(G8[1])]=0
set KY4[GetPlayerId(G8[1])]=66
set KZ4[GetPlayerId(G8[1])]=255
set KX4[GetPlayerId(G8[2])]=48
set KY4[GetPlayerId(G8[2])]=230
set KZ4[GetPlayerId(G8[2])]=185
set KX4[GetPlayerId(G8[3])]=50
set KY4[GetPlayerId(G8[3])]=0
set KZ4[GetPlayerId(G8[3])]=129
set KX4[GetPlayerId(G8[4])]=255
set KY4[GetPlayerId(G8[4])]=252
set KZ4[GetPlayerId(G8[4])]=1
set KX4[GetPlayerId(G8[5])]=255
set KY4[GetPlayerId(G8[5])]=50
set KZ4[GetPlayerId(G8[5])]=0
set KX4[GetPlayerId(N8[1])]=220
set KY4[GetPlayerId(N8[1])]=50
set KZ4[GetPlayerId(N8[1])]=50
set KX4[GetPlayerId(N8[2])]=50
set KY4[GetPlayerId(N8[2])]=50
set KZ4[GetPlayerId(N8[2])]=50
set KX4[GetPlayerId(N8[3])]=75
set KY4[GetPlayerId(N8[3])]=150
set KZ4[GetPlayerId(N8[3])]=190
set KX4[GetPlayerId(N8[4])]=16
set KY4[GetPlayerId(N8[4])]=60
set KZ4[GetPlayerId(N8[4])]=18
set KX4[GetPlayerId(N8[5])]=68
set KY4[GetPlayerId(N8[5])]=42
set KZ4[GetPlayerId(N8[5])]=4
endfunction
function W68 takes nothing returns nothing
local integer T8
local integer U8
set W[GetPlayerId(G8[0])]="|c00ff0303"
set W[GetPlayerId(G8[1])]="|c000042ff"
set W[GetPlayerId(G8[2])]="|c001ce6b9"
set W[GetPlayerId(G8[3])]="|c00540081"
set W[GetPlayerId(G8[4])]="|c00fffc01"
set W[GetPlayerId(G8[5])]="|c00ff8000"
set W[GetPlayerId(N8[0])]="|c0020c000"
set W[GetPlayerId(N8[1])]="|c00e55bb0"
set W[GetPlayerId(N8[2])]="|c00959697"
set W[GetPlayerId(N8[3])]="|c007ebff1"
set W[GetPlayerId(N8[4])]="|c00106246"
set W[GetPlayerId(N8[5])]="|c004e2a04"
call SetPlayerColor(G8[0],PLAYER_COLOR_RED)
call SetPlayerColor(G8[1],PLAYER_COLOR_BLUE)
call SetPlayerColor(G8[2],PLAYER_COLOR_CYAN)
call SetPlayerColor(G8[3],PLAYER_COLOR_PURPLE)
call SetPlayerColor(G8[4],PLAYER_COLOR_YELLOW)
call SetPlayerColor(G8[5],PLAYER_COLOR_ORANGE)
call SetPlayerColor(N8[0],PLAYER_COLOR_GREEN)
call SetPlayerColor(N8[1],PLAYER_COLOR_PINK)
call SetPlayerColor(N8[2],PLAYER_COLOR_LIGHT_GRAY)
call SetPlayerColor(N8[3],PLAYER_COLOR_LIGHT_BLUE)
call SetPlayerColor(N8[4],PLAYER_COLOR_AQUA)
call SetPlayerColor(N8[5],PLAYER_COLOR_BROWN)
set T8=1
set U8=5
loop
call YK7(G8[T8])
if(KR8(G8[T8]))then
call SetPlayerName(G8[T8],I2S(T8)+YJ7(G8[T8])+"Computer")
endif
call YK7(N8[T8])
if(KR8(N8[T8]))then
call SetPlayerName(N8[T8],I2S(5+T8)+YJ7(N8[T8])+"Computer")
endif
set T8=T8+1
exitwhen T8>U8
endloop
endfunction
function WL8 takes unit L07 returns boolean
return GetUnitAbilityLevel(L07,'A04R')>0 and IsPlayer(GetOwningPlayer(L07))
endfunction
function W18 takes real d returns boolean
return 2<d and d<3000
endfunction
function W08 takes nothing returns nothing
local integer T8=1
set V8=G8[1]
if E then
set T8=0
set V8=G8[0]
endif
loop
exitwhen KQ8(V8)or T8>5
set T8=T8+1
set V8=G8[T8]
endloop
if not KQ8(V8)then
set V8=N8[1]
set T8=1
if E then
set T8=0
set V8=N8[0]
endif
loop
exitwhen KQ8(V8)or T8>5
set T8=T8+1
set V8=N8[T8]
endloop
endif
endfunction
function W58 takes player p,string W28,integer W_8 returns nothing
local string id=I2S(GetPlayerId(p))
call StoreInteger(IG4,id,W28,W_8)
if KS8(V8)==false then
call W08()
endif
if GetLocalPlayer()==V8 then
call SyncStoredInteger(IG4,id,W28)
endif
endfunction
function X48 takes string W28,integer W_8 returns nothing
call StoreInteger(IG4,"Data",W28,W_8)
if KS8(V8)==false then
call W08()
endif
if GetLocalPlayer()==V8 then
call SyncStoredInteger(IG4,"Data",W28)
endif
endfunction
function X78 takes nothing returns boolean
local string s
if IsUnitIllusion(GetTriggerUnit())==false and GetUnitTypeId(GetTriggerUnit())!='H00J' then
call X48("Learn"+I2S(GetPlayerId(GetTriggerPlayer())),GetLearnedSkill())
endif
return false
endfunction
function X88 takes nothing returns boolean
local string s
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and IsUnitIllusion(GetTriggerUnit())==false and GetUnitTypeId(GetTriggerUnit())!='H00J' then
call X48("Cast"+I2S(GetPlayerId(GetTriggerPlayer())),GetSpellAbilityId())
endif
return false
endfunction
function X98 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function X78))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function X88))
set t=null
endfunction
function XD8 takes string s,string XE8,string XF8 returns string
local string XG8=""
local integer i=0
local integer XH8=StringLength(s)
local string XI8
local integer XJ8=StringLength(XE8)
local boolean XK8=false
loop
exitwhen i+1>XH8
set XI8=SubString(s,i,i+XJ8)
if XI8!=XE8 or XK8 then
set XG8=XG8+SubString(s,i,i+1)
set i=i+1
else
set XG8=XG8+XF8
set i=i+XJ8
set XK8=true
endif
endloop
return XG8
endfunction
function XM8 takes player XN8,player XO8 returns string
local string s=(GetObjectName(('n0C8')))
set s=XD8(s,"$dead",W[GetPlayerId(XN8)]+(KW4[GetPlayerId((XN8))])+"|r")
set s=XD8(s,"$killer",W[GetPlayerId(XO8)]+(KW4[GetPlayerId((XO8))])+"|r")
return s
endfunction
function XP8 takes nothing returns nothing
local integer i
local integer XQ8='}'
call SetUnitOwner(KG4,G8[1],false)
set h4[512+GetPlayerId(G8[1])]=KG4
call SetUnitOwner(KH4,G8[2],false)
set h4[512+GetPlayerId(G8[2])]=KH4
call SetUnitOwner(KI4,G8[3],false)
set h4[512+GetPlayerId(G8[3])]=KI4
call SetUnitOwner(KJ4,G8[4],false)
set h4[512+GetPlayerId(G8[4])]=KJ4
call SetUnitOwner(KK4,G8[5],false)
set h4[512+GetPlayerId(G8[5])]=KK4
call SetUnitOwner(KM4,N8[1],false)
set h4[512+GetPlayerId(N8[1])]=KM4
call SetUnitOwner(KN4,N8[2],false)
set h4[512+GetPlayerId(N8[2])]=KN4
call SetUnitOwner(KO4,N8[3],false)
set h4[512+GetPlayerId(N8[3])]=KO4
call SetUnitOwner(KP4,N8[4],false)
set h4[512+GetPlayerId(N8[4])]=KP4
call SetUnitOwner(KQ4,N8[5],false)
set h4[512+GetPlayerId(N8[5])]=KQ4
set KR4[GetPlayerId(G8[1])]=KG4
set KR4[GetPlayerId(G8[2])]=KH4
set KR4[GetPlayerId(G8[3])]=KI4
set KR4[GetPlayerId(G8[4])]=KJ4
set KR4[GetPlayerId(G8[5])]=KK4
set KR4[GetPlayerId(N8[1])]=KM4
set KR4[GetPlayerId(N8[2])]=KN4
set KR4[GetPlayerId(N8[3])]=KO4
set KR4[GetPlayerId(N8[4])]=KP4
set KR4[GetPlayerId(N8[5])]=KQ4
set i=1
if GetLocalPlayer()==Player(i)then
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,255)
else
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,XQ8)
endif
set i=2
if GetLocalPlayer()==Player(i)then
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,255)
else
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,XQ8)
endif
set i=3
if GetLocalPlayer()==Player(i)then
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,255)
else
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,XQ8)
endif
set i=4
if GetLocalPlayer()==Player(i)then
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,255)
else
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,XQ8)
endif
set i=5
if GetLocalPlayer()==Player(i)then
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,255)
else
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,XQ8)
endif
set i=7
if GetLocalPlayer()==Player(i)then
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,255)
else
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,XQ8)
endif
set i=8
if GetLocalPlayer()==Player(i)then
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,255)
else
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,XQ8)
endif
set i=9
if GetLocalPlayer()==Player(i)then
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,255)
else
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,XQ8)
endif
set i=10
if GetLocalPlayer()==Player(i)then
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,255)
else
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,XQ8)
endif
set i=11
if GetLocalPlayer()==Player(i)then
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,255)
else
call SetUnitVertexColor(KR4[GetPlayerId(Player(i))],255,255,255,XQ8)
endif
set KS4[GetPlayerId(G8[1])]=GetUnitX(KR4[GetPlayerId(G8[1])])
set KS4[GetPlayerId(G8[2])]=GetUnitX(KR4[GetPlayerId(G8[2])])
set KS4[GetPlayerId(G8[3])]=GetUnitX(KR4[GetPlayerId(G8[3])])
set KS4[GetPlayerId(G8[4])]=GetUnitX(KR4[GetPlayerId(G8[4])])
set KS4[GetPlayerId(G8[5])]=GetUnitX(KR4[GetPlayerId(G8[5])])
set KS4[GetPlayerId(N8[1])]=GetUnitX(KR4[GetPlayerId(N8[1])])
set KS4[GetPlayerId(N8[2])]=GetUnitX(KR4[GetPlayerId(N8[2])])
set KS4[GetPlayerId(N8[3])]=GetUnitX(KR4[GetPlayerId(N8[3])])
set KS4[GetPlayerId(N8[4])]=GetUnitX(KR4[GetPlayerId(N8[4])])
set KS4[GetPlayerId(N8[5])]=GetUnitX(KR4[GetPlayerId(N8[5])])
set KT4[GetPlayerId(G8[1])]=GetUnitY(KR4[GetPlayerId(G8[1])])
set KT4[GetPlayerId(G8[2])]=GetUnitY(KR4[GetPlayerId(G8[2])])
set KT4[GetPlayerId(G8[3])]=GetUnitY(KR4[GetPlayerId(G8[3])])
set KT4[GetPlayerId(G8[4])]=GetUnitY(KR4[GetPlayerId(G8[4])])
set KT4[GetPlayerId(G8[5])]=GetUnitY(KR4[GetPlayerId(G8[5])])
set KT4[GetPlayerId(N8[1])]=GetUnitY(KR4[GetPlayerId(N8[1])])
set KT4[GetPlayerId(N8[2])]=GetUnitY(KR4[GetPlayerId(N8[2])])
set KT4[GetPlayerId(N8[3])]=GetUnitY(KR4[GetPlayerId(N8[3])])
set KT4[GetPlayerId(N8[4])]=GetUnitY(KR4[GetPlayerId(N8[4])])
set KT4[GetPlayerId(N8[5])]=GetUnitY(KR4[GetPlayerId(N8[5])])
endfunction
function XR8 takes unit N28 returns boolean
local integer ID=GetUnitTypeId(N28)
return ID=='n00V'or ID=='n00W'or ID=='n002'or ID=='n001'or ID=='n00X'or ID=='nC38'or ID=='n01K'or ID=='n009'
endfunction
function jw takes nothing returns nothing
if(GetOwningPlayer(GetEnumUnit())==Player(0))then
call SetUnitOwner(GetEnumUnit(),G8[0],false)
if XR8(GetEnumUnit())==false then
call SetUnitColor(GetEnumUnit(),ConvertPlayerColor(0))
endif
else
call SetUnitOwner(GetEnumUnit(),N8[0],false)
if XR8(GetEnumUnit())==false then
call SetUnitColor(GetEnumUnit(),ConvertPlayerColor(6))
endif
endif
endfunction
function Np takes nothing returns nothing
local group XS8=OG8()
call GroupEnumUnitsOfPlayer(XS8,Player(0),Condition(function KF8))
call ForGroup(XS8,function jw)
call GroupClear(XS8)
call GroupEnumUnitsOfPlayer(XS8,Player(6),Condition(function KF8))
call ForGroup(XS8,function jw)
call OF8(XS8)
set XS8=null
endfunction
function XT8 takes player p returns nothing
local integer i=0
local string jX=GetPlayerName(p)
local integer XH8=StringLength(jX)
local integer jY=XH8
loop
exitwhen i==XH8
if SubString(jX,i,i+1)=="("and SubString(jX,i-1,i)==" "then
set jY=i-1
call SetPlayerName(p,SubString(jX,0,jY))
set i=XH8
else
set i=i+1
endif
endloop
endfunction
function XU8 takes nothing returns nothing
local integer XV8
local integer XW8
local integer T8
local integer U8
local integer x=0
local integer y=0
local integer i
local location XX8=GetRectCenter(ZD)
local location XY8=GetRectCenter(qr)
if GetPlayerState(G8[0],PLAYER_STATE_OBSERVER)!=0 or GetPlayerState(N8[0],PLAYER_STATE_OBSERVER)!=0 then
set L8=true
set G8[0]=Player(13)
set N8[0]=Player(14)
set KU4=Player(0)
set KV4=Player(6)
call SetAllyColorFilterState(0)
loop
exitwhen x>5
call SetPlayerAlliance(Player(0),G8[x],ConvertAllianceType(0),true)
call SetPlayerAlliance(Player(0),G8[x],ConvertAllianceType(4),true)
call SetPlayerAlliance(Player(0),N8[x],ConvertAllianceType(0),false)
call SetPlayerAlliance(Player(0),N8[x],ConvertAllianceType(4),false)
set x=x+1
endloop
endif
call ForceAddPlayer(E8,G8[0])
call ForceAddPlayer(E8,G8[1])
call ForceAddPlayer(E8,G8[2])
call ForceAddPlayer(E8,G8[3])
call ForceAddPlayer(E8,G8[4])
call ForceAddPlayer(E8,G8[5])
call ForceAddPlayer(F8,N8[0])
call ForceAddPlayer(F8,N8[1])
call ForceAddPlayer(F8,N8[2])
call ForceAddPlayer(F8,N8[3])
call ForceAddPlayer(F8,N8[4])
call ForceAddPlayer(F8,N8[5])
call ForceAddPlayer(T9,G8[1])
call ForceAddPlayer(T9,G8[2])
call ForceAddPlayer(T9,G8[3])
call ForceAddPlayer(T9,G8[4])
call ForceAddPlayer(T9,G8[5])
call ForceAddPlayer(T9,N8[1])
call ForceAddPlayer(T9,N8[2])
call ForceAddPlayer(T9,N8[3])
call ForceAddPlayer(T9,N8[4])
call ForceAddPlayer(T9,N8[5])
if L8 then
call ForceAddPlayer(T9,Player(0))
call ForceAddPlayer(T9,Player(6))
endif
set x=0
set y=0
loop
exitwhen x>5
loop
exitwhen y>5
if(x!=y)then
call SetPlayerAlliance(G8[x],G8[y],ConvertAllianceType(0),true)
call SetPlayerAlliance(G8[x],G8[y],ConvertAllianceType(1),true)
call SetPlayerAlliance(G8[x],G8[y],ConvertAllianceType(2),true)
call SetPlayerAlliance(G8[x],G8[y],ConvertAllianceType(3),true)
call SetPlayerAlliance(G8[x],G8[y],ConvertAllianceType(4),true)
call SetPlayerAlliance(G8[x],G8[y],ConvertAllianceType(5),true)
call SetPlayerAlliance(G8[x],G8[y],ConvertAllianceType(6),false)
call SetPlayerAlliance(G8[x],G8[y],ConvertAllianceType(7),false)
call SetPlayerAlliance(N8[x],N8[y],ConvertAllianceType(0),true)
call SetPlayerAlliance(N8[x],N8[y],ConvertAllianceType(1),true)
call SetPlayerAlliance(N8[x],N8[y],ConvertAllianceType(2),true)
call SetPlayerAlliance(N8[x],N8[y],ConvertAllianceType(3),true)
call SetPlayerAlliance(N8[x],N8[y],ConvertAllianceType(4),true)
call SetPlayerAlliance(N8[x],N8[y],ConvertAllianceType(5),true)
call SetPlayerAlliance(N8[x],N8[y],ConvertAllianceType(6),false)
call SetPlayerAlliance(N8[x],N8[y],ConvertAllianceType(7),false)
call SetPlayerAlliance(G8[x],N8[y],ConvertAllianceType(0),false)
call SetPlayerAlliance(G8[x],N8[y],ConvertAllianceType(1),false)
call SetPlayerAlliance(G8[x],N8[y],ConvertAllianceType(2),false)
call SetPlayerAlliance(G8[x],N8[y],ConvertAllianceType(3),false)
call SetPlayerAlliance(G8[x],N8[y],ConvertAllianceType(4),false)
call SetPlayerAlliance(G8[x],N8[y],ConvertAllianceType(5),false)
call SetPlayerAlliance(G8[x],N8[y],ConvertAllianceType(6),false)
call SetPlayerAlliance(G8[x],N8[y],ConvertAllianceType(7),false)
call SetPlayerAlliance(N8[x],G8[y],ConvertAllianceType(0),false)
call SetPlayerAlliance(N8[x],G8[y],ConvertAllianceType(1),false)
call SetPlayerAlliance(N8[x],G8[y],ConvertAllianceType(2),false)
call SetPlayerAlliance(N8[x],G8[y],ConvertAllianceType(3),false)
call SetPlayerAlliance(N8[x],G8[y],ConvertAllianceType(4),false)
call SetPlayerAlliance(N8[x],G8[y],ConvertAllianceType(5),false)
call SetPlayerAlliance(N8[x],G8[y],ConvertAllianceType(6),false)
call SetPlayerAlliance(N8[x],G8[y],ConvertAllianceType(7),false)
endif
set y=y+1
endloop
set y=0
set x=x+1
endloop
call SetPlayerTeam(G8[0],0)
call SetPlayerTeam(G8[1],0)
call SetPlayerTeam(G8[2],0)
call SetPlayerTeam(G8[3],0)
call SetPlayerTeam(G8[4],0)
call SetPlayerTeam(G8[5],0)
call SetPlayerTeam(N8[0],1)
call SetPlayerTeam(N8[1],1)
call SetPlayerTeam(N8[2],1)
call SetPlayerTeam(N8[3],1)
call SetPlayerTeam(N8[4],1)
call SetPlayerTeam(N8[5],1)
call SetPlayerName(G8[0],(GetObjectName(('n03N'))))
call SetPlayerName(N8[0],(GetObjectName(('n03O'))))
call SetPlayerName(O8,(GetObjectName(('n0E8'))))
call XP8()
if(G8[0]!=Player(0)or N8[0]!=Player(6))then
call Np()
endif
call W68()
set XW8=q8(E8)
set XV8=q8(F8)
set T8=1
set U8=5
loop
exitwhen T8>U8
if(KS8(G8[T8]))then
call SetPlayerState(G8[T8],PLAYER_STATE_RESOURCE_GOLD,(4375/ XW8))
call SetPlayerState(G8[T8],PLAYER_STATE_RESOURCE_LUMBER,0)
endif
if(KS8(N8[T8]))then
call SetPlayerState(N8[T8],PLAYER_STATE_RESOURCE_GOLD,(4375/ XV8))
call SetPlayerState(N8[T8],PLAYER_STATE_RESOURCE_LUMBER,0)
endif
set T8=T8+1
endloop
call SetPlayerHandicapXP(G8[1],1)
call SetPlayerHandicapXP(G8[2],1)
call SetPlayerHandicapXP(G8[3],1)
call SetPlayerHandicapXP(G8[4],1)
call SetPlayerHandicapXP(G8[5],1)
call SetPlayerHandicapXP(N8[1],1)
call SetPlayerHandicapXP(N8[2],1)
call SetPlayerHandicapXP(N8[3],1)
call SetPlayerHandicapXP(N8[4],1)
call SetPlayerHandicapXP(N8[5],1)
call SetPlayerState(G8[0],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(G8[1],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(G8[2],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(G8[3],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(G8[4],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(G8[5],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(N8[0],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(N8[1],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(N8[2],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(N8[3],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(N8[4],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(N8[5],PLAYER_STATE_GIVES_BOUNTY,1)
call W08()
call W38()
call XT8(G8[1])
call XT8(G8[2])
call XT8(G8[3])
call XT8(G8[4])
call XT8(G8[5])
call XT8(N8[1])
call XT8(N8[2])
call XT8(N8[3])
call XT8(N8[4])
call XT8(N8[5])
set x=1
loop
exitwhen x>5
if KS8(G8[x])then
call CreateUnitAtLoc(G8[x],'n00C',XX8,bj_UNIT_FACING)
endif
if KS8(N8[x])then
call CreateUnitAtLoc(N8[x],'n00C',XY8,bj_UNIT_FACING)
endif
set x=x+1
endloop
call RemoveLocation(XX8)
call RemoveLocation(XY8)
set i=0
loop
set KW4[i]=GetPlayerName(Player(i))
set i=i+1
exitwhen i==16
endloop
set XX8=null
set XY8=null
endfunction
function XZ8 takes nothing returns nothing
local integer i=1
set KC4=1
set KA4[1]='Hvwd'
set MF4[1]='h03Z'
set KB4[1]='n09U'
set ME4[1]="ReplaceableTextures\\CommandButtons\\BTNAvengingWatcher.blp"
call PH8(KA4[1],"stand 4")
call PD8(KA4[1],1.35,MF4[1])
set MG4[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 MH4[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 MI4[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 MJ4[i]="Wave of Terror is used to provide sight, giving you vision over an area or providing an opportunity to use Swap."
set MK4[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 KA4[2]='Hmbr'
set MF4[2]='h040'
set KB4[2]='n09A'
set ME4[2]="ReplaceableTextures\\CommandButtons\\BTNAvatar.blp"
call PH8(KA4[2],"attack slam alternate")
call PD8(KA4[2],1.3,MF4[2])
set MG4[i]="When using Arc lightning, try to kill creeps and harass your opponent at the same time"
set MH4[i]="When ganking, you can use Lightning Bolt to ensure you will not lose sight of the target quickly."
set MI4[i]="Lightning Bolt has a mini-stun that can be used against channeling spells and teleporting heroes."
set MJ4[i]="Static Field is extremely powerful throughout the game: Use your spells as frequently as possible during fights."
set MK4[i]="Both Lightning Bolt and Wrath of the Thundergod reveal invisible units. Wrath will not damage invisible units."
set i=i+1
set KA4[3]='Emoo'
set MF4[3]='h041'
set KB4[3]='n099'
set ME4[3]="ReplaceableTextures\\CommandButtons\\BTNDryad.blp"
call PH8(KA4[3],"stand 4")
call PD8(KA4[3],1,MF4[3])
set MG4[i]="Enchant can be used on neutral creeps, meaning Enchantress can fight and use neutral creeps to engage enemy heroes effectively."
set MH4[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 MI4[i]="Untouchable is great against physical attacks, but it does not help you survive huge burst damage nukes."
set MJ4[i]="Impetus deals negligible damage at short range; switch to normal attacks if your target gets close to save mana."
set MK4[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 KA4[4]='O00P'
set MF4[4]='h042'
set KB4[4]='n098'
set ME4[4]="ReplaceableTextures\\CommandButtons\\BTNSeaElemental.blp"
call PH8(KA4[4],"stand 2")
call PD8(KA4[4],1,MF4[4])
set MG4[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 MH4[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 MI4[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 MJ4[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 MK4[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 KA4[5]='Hjai'
set MF4[5]='h043'
set KB4[5]='n09W'
set ME4[5]="ReplaceableTextures\\CommandButtons\\BTNJaina.blp"
call PH8(KA4[5],"stand victory")
call PD8(KA4[5],1,MF4[5])
set MG4[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 MH4[i]="A few points of Brilliance Aura early on provides your team with massive amounts of extra mana."
set MI4[i]="Enemies hit by Frostbite can still cast spells, so don't take them lightly. "
set MJ4[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 MK4[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 KA4[6]='H001'
set MF4[6]='h044'
set KB4[6]='n096'
set ME4[6]="ReplaceableTextures\\CommandButtons\\BTNFelGuardBlue.tga"
call PH8(KA4[6],"spell")
call PD8(KA4[6],1,MF4[6])
set MG4[i]="Storm Bolt is a skill Sven should usually get early because of its damage and stun. "
set MH4[i]="Take advantage of Storm Bolt's area of effect by hitting additional enemy creeps and heroes whenever possible. "
set MI4[i]="Try to be near your allies when you cast Warcry."
set MJ4[i]="Only items that increase Strength will give you additional damage from effect of God's Strength."
set MK4[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 KA4[7]='HC49'
set MF4[7]='h045'
set KB4[7]='n09P'
set ME4[7]="ReplaceableTextures\\CommandButtons\\BTNSeaWitch.blp"
call PH8(KA4[7],"spell")
call PD8(KA4[7],1,MF4[7])
set MG4[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 MH4[i]="Mirror Image can be used defensively to avoid certain spells and dispel debuffs or channeling spells."
set MI4[i]="Items that provide attribute bonuses improve your Image's power."
set MJ4[i]="Enemies caught by Song of the Siren are invulnerable while asleep. Save your attacks and spells for after the spell expires."
set MK4[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 KA4[8]='Otch'
set MF4[8]='h046'
set KB4[8]='n09D'
set ME4[8]="ReplaceableTextures\\CommandButtons\\BTNTauren.blp"
call PH8(KA4[8],"attack slam")
call PD8(KA4[8],1.1,MF4[8])
set MG4[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 MH4[i]="A good cast of Fissure can isolate an opponent and cut off their escape. Practice often to achieve devastating results."
set MI4[i]="Kelen's Dagger is an incredible item on ES, it allows you to quickly position yourself for the perfect Fissure or Echoslam."
set MJ4[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 MK4[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 KA4[9]='HC92'
set MF4[9]='h047'
set KB4[9]='n09X'
set ME4[9]="ReplaceableTextures\\CommandButtons\\BTNSatyrTrickster.blp"
call PH8(KA4[9],"stand 4")
call PD8(KA4[9],1,MF4[9])
set MG4[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 MH4[i]="Attacking or using your spells makes you visible: Consider the fade time of Permanent Invisibility before placing yourself at risk."
set MI4[i]="Try to position Smoke Screen slightly behind enemies so that they spend more time in the cloud if they retreat."
set MJ4[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 MK4[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 KA4[10]='N01O'
set MF4[10]='h048'
set KB4[10]='n09Y'
set ME4[10]="ReplaceableTextures\\CommandButtons\\BTNDruidOfTheClaw.blp"
call PH8(KA4[10],"spell slam")
call PD8(KA4[10],1,MF4[10])
call PD8('n013',1.1,MF4[10])
call PD8('n014',1.2,MF4[10])
call PD8('n015',1.3,MF4[10])
call PD8('n004',1,MF4[10])
call PD8('n018',1.1,MF4[10])
call PD8('n01C',1.2,MF4[10])
call PD8('n01G',1.3,MF4[10])
set MG4[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 MH4[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 MI4[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 MJ4[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 MK4[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 KA4[11]='H004'
set MF4[11]='h049'
set KB4[11]='n09Z'
set ME4[11]="ReplaceableTextures\\CommandButtons\\BTNSorceress.blp"
call PH8(KA4[11],"stand victory")
call PD8(KA4[11],1.2,MF4[11])
set MG4[i]="Light Strike Array is usually a good skill to get at level 1 because it provides you with a stun."
set MH4[i]="Target the ground in their direction instead of clicking on enemies to maximize Dragon Slave's long range."
set MI4[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 MJ4[i]="Fiery Soul can help you maneuver better during a fight."
set MK4[i]="Try to stun as many heroes as possible during team fights"
set i=i+1
set KA4[12]='Nbbc'
set MF4[12]='h04A'
set KB4[12]='n0A5'
set ME4[12]="ReplaceableTextures\\CommandButtons\\BTNChaosBlademaster.blp"
call PH8(KA4[12],"stand victory")
call PD8(KA4[12],1,MF4[12])
set MG4[i]="Blade Fury is your most important skill early game for getting hero kills and avoiding magic damage."
set MH4[i]="Avoid follow-command (right-clicking) heroes with Blade Fury and instead click the ground near the opponent."
set MI4[i]="Isolate enemy heroes before using Omnislash to prevent Juggernaut from attacking multiple targets and doing less damage."
set MJ4[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 MK4[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 KA4[13]='N01A'
set MF4[13]='h04B'
set KB4[13]='n097'
set ME4[13]="ReplaceableTextures\\CommandButtons\\BTNSpellBreaker.blp"
call PH8(KA4[13],"stand ready")
call PD8(KA4[13],1,MF4[13])
set MG4[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 MH4[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 MI4[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 MJ4[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 MK4[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 KA4[14]='Hamg'
set MF4[14]='h04C'
set KB4[14]='n09F'
set ME4[14]="ReplaceableTextures\\CommandButtons\\BTNTreant.blp"
call PH8(KA4[14],"stand 3")
call PD8(KA4[14],.72,MF4[14])
set MG4[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 MH4[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 MI4[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 MJ4[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 MK4[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 KA4[15]='O015'
set MF4[15]='h07P'
set KB4[15]='n0GC'
set ME4[15]="ReplaceableTextures\\CommandButtons\\BTNHeroTaurenChieftain.blp"
call PH8(KA4[15],"stand victory")
call PD8(KA4[15],1.1,MF4[15])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[16]='Hblm'
set MF4[16]='h04E'
set KB4[16]='n09G'
set ME4[16]="ReplaceableTextures\\CommandButtons\\BTNHeroArchMage.blp"
call PH8(KA4[16],"stand victory")
call PD8(KA4[16],1.2,MF4[16])
call PD8('H06X',1.5,MF4[16])
call PD8('H06Y',1.5,MF4[16])
call PD8('H06W',1.5,MF4[16])
set MG4[i]="Chakra Magic is an amazing support skill that you should cast on allies as often as possible if they have powerful spells."
set MH4[i]="Illuminate can be useful for earning gold or clearing creeps quickly, but channeling the blast can leave you vulnerable. "
set MI4[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 MJ4[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 MK4[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 KA4[17]='Huth'
set MF4[17]='h04F'
set KB4[17]='n09V'
set ME4[17]="ReplaceableTextures\\CommandButtons\\BTNFurbolgTracker.blp"
call PH8(KA4[17],"attack spell")
call PD8(KA4[17],1.2,MF4[17])
set MG4[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 MH4[i]="Ursa is a very effective hero to fight neutral creeps with: Vladimir's Offering is a recommended item choice."
set MI4[i]="Thanks to Enrage, Ursa usually purchases items that increase HP or Strength over Agility and Damage items."
set MJ4[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 MK4[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 KA4[18]='Hmkg'
set MF4[18]='h04G'
set KB4[18]='n0A1'
set ME4[18]="ReplaceableTextures\\CommandButtons\\BTNOgreMagi.blp"
call PH8(KA4[18],"sleep")
call PD8(KA4[18],1.4,MF4[18])
set MG4[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 MH4[i]="Fireblast provides a disable, Ignite provides a slow. Both deal damage, usually making them good skills early."
set MI4[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 MJ4[i]="Use Bloodlust to help teammates chase and escape enemies and on the hero capable of dealing the most damage before major battles."
set MK4[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 KA4[19]='Ntin'
set MF4[19]='h04H'
set KB4[19]='n0AA'
set ME4[19]="ReplaceableTextures\\CommandButtons\\BTNHeroTinker.blp"
call PH8(KA4[19],"stand 2")
call PD8(KA4[19],1,MF4[19])
set MG4[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 MH4[i]="Laser is not reduced by magic resistance or armor; you deal the number in the description exactly."
set MI4[i]="You can use the active effects of items indefinitely with Rearm, which makes Boots of Travel a very powerful item for Tinker."
set MJ4[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 MK4[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 KA4[20]='Emns'
set MF4[20]='h04I'
set KB4[20]='n0A4'
set ME4[20]="ReplaceableTextures\\CommandButtons\\BTNFurion.blp"
call PH8(KA4[20],"spell")
call PD8(KA4[20],1.2,MF4[20])
set MG4[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 MH4[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 MI4[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 MJ4[i]="Teleportation shows allies and enemies where you intend to go, so if you want to surprise enemies, teleport where they cannot see."
set MK4[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 KA4[21]='Ogrh'
set MF4[21]='h04J'
set KB4[21]='n0A3'
set ME4[21]="ReplaceableTextures\\CommandButtons\\BTNHellScream.blp"
call PH8(KA4[21],"stand victory")
call PD8(KA4[21],1,MF4[21])
set MG4[i]="Get Spirit Lance and Doppelwalk first because Juxtapose is better when your illusions have more health and damage."
set MH4[i]="Beware of the high mana costs of your spells early game, especially for Doppelwalk, which can be an escape mechanism."
set MI4[i]="Keep your opponents guessing by controlling your illusions created by Doppelwalk and Juxtapose."
set MJ4[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 MK4[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 KA4[22]='Ucrl'
set MF4[22]='h04K'
set KB4[22]='n0A7'
set ME4[22]="ReplaceableTextures\\CommandButtons\\BTNMountainGiant.blp"
call PH8(KA4[22],"spell")
call PD8(KA4[22],.5,MF4[22])
set MG4[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 MH4[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 MI4[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 MJ4[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 MK4[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 KA4[23]='H00K'
set MF4[23]='h04L'
set KB4[23]='n0A9'
set ME4[23]="ReplaceableTextures\\CommandButtons\\BTNGoblinSapper.blp"
call PH8(KA4[23],"stand 2")
call PD8(KA4[23],1,MF4[23])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[24]='H00A'
set MF4[24]='h04M'
set KB4[24]='n0AB'
set ME4[24]="ReplaceableTextures\\CommandButtons\\BTNHeroFarseer.blp"
call PH8(KA4[24],"spell chain lightning")
call PD8(KA4[24],1,MF4[24])
set MG4[i]="Chen can take control of high level neutral creeps with Holy Persuasion, making him extremely powerful at low levels even without items."
set MH4[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 MI4[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 MJ4[i]="Chen excels as a support hero, items that contribute to teammates such as Mekansm usually benefit the team more than damage items."
set MK4[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 KA4[25]='E005'
set MF4[25]='h04N'
set KB4[25]='n0BE'
set ME4[25]="ReplaceableTextures\\CommandButtons\\BTNHuntress.blp"
call PH8(KA4[25],"spell")
call PD8(KA4[25],1,MF4[25])
set MG4[i]="The level of Lucent Beam determines the damage of Eclipse, making it the most important spell to get first. "
set MH4[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 MI4[i]="Try to cast Eclipse on enemy heroes when other units are not present to maximize the damage dealt to a single target. "
set MJ4[i]="Later on with some attack speed, Lunar Blessing and Moon Glaives provide you with both massive damage and pushing power."
set MK4[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 KA4[26]='Usyl'
set MF4[26]='h04O'
set KB4[26]='n0BD'
set ME4[26]="ReplaceableTextures\\CommandButtons\\BTNRifleman.blp"
call PH8(KA4[26],"spell")
call PD8(KA4[26],1.1,MF4[26])
set MG4[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 MH4[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 MI4[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 MJ4[i]="Shrapenl can also be used for slowing opponents, pushing or defending against large waves of creeps."
set MK4[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 KA4[27]='N016'
set MF4[27]='h04P'
set KB4[27]='n0A8'
set ME4[27]="ReplaceableTextures\\CommandButtons\\BTNForestTroll.blp"
call PH8(KA4[27],"stand 3")
call PD8(KA4[27],1.25,MF4[27])
call PD8('N02B',1.25,MF4[27])
call PD8('N017',1.25,MF4[27])
set MG4[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 MH4[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 MI4[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 MJ4[i]="Play defensively and fight neutral creeps too. Switch to melee form and it will allow you to have an easier time."
set MK4[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 KA4[28]='Orkn'
set MF4[28]='h057'
set KB4[28]='n094'
set ME4[28]="ReplaceableTextures\\CommandButtons\\BTNShadowHunter.blp"
call PH8(KA4[28],"stand victory")
call PD8(KA4[28],1,MF4[28])
set MG4[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 MH4[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 MI4[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 MJ4[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 MK4[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 KA4[29]='O01F'
set MF4[29]='h0CI'
set KB4[29]='n0KS'
set ME4[29]="ReplaceableTextures\\CommandButtons\\BTNWispHero.blp"
call PH8(KA4[29],"stand 3")
call PD8(KA4[29],1.3,MF4[29])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[30]='Npbm'
set MF4[30]='h053'
set KB4[30]='n0AO'
set ME4[30]="ReplaceableTextures\\CommandButtons\\BTNPandarenBrewmaster.blp"
call PH8(KA4[30],"stand ready")
call PD8(KA4[30],1,MF4[30])
set MG4[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 MH4[i]="Drunken Haze works not only as a slow, but the miss chance reduces the damage severely for enemy heroes."
set MI4[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 MJ4[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 MK4[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 KA4[31]='H000'
set MF4[31]='h04X'
set KB4[31]='n0AN'
set ME4[31]="ReplaceableTextures\\CommandButtons\\BTNCentaurKhan.blp"
call PH8(KA4[31],"stand 3")
call PD8(KA4[31],1.75,MF4[31])
set MG4[i]="Return should be leveled if Centaur plans to fight neutral creeps, otherwise Double Edge is more useful in the lane."
set MH4[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 MI4[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 MJ4[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 MK4[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 KA4[32]='Naka'
set MF4[32]='h052'
set KB4[32]='n0AM'
set ME4[32]="ReplaceableTextures\\CommandButtons\\BTNakama.blp"
call PH8(KA4[32],"stand var4")
call PD8(KA4[32],1.2,MF4[32])
set MG4[i]="Shuriken Toss, Wind Walk and Track are much more useful than Jinada early on."
set MH4[i]="You're going to need mana regen: Bottle, Ring Of Basillius and Void Stone are examples of good options. "
set MI4[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 MJ4[i]="Shuriken Toss and Wind Walk deal a lot of damage quickly: Search the map often for low HP heroes to hunt. "
set MK4[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 KA4[33]='Hlgr'
set MF4[33]='h04V'
set KB4[33]='n0AQ'
set ME4[33]="ReplaceableTextures\\CommandButtons\\BTNTheCaptain.blp"
call PH8(KA4[33],"stand victory")
call PD8(KA4[33],1.35,MF4[33])
call PD8('H00F',1,MF4[33])
call PD8('H00G',1,MF4[33])
call PD8('H00E',1,MF4[33])
call O78('H00G',255,255,200)
call O78('H00F',255,255,200)
call O78('H00G',255,200,200)
set MG4[i]="Breath Fire is a strong nuke and farming ability. However, against difficult opponents, Dragon's Blood is very useful."
set MH4[i]="Dragon Tail is the longest duration level 1 stun in the game. One point is usually sufficient until later on."
set MI4[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 MJ4[i]="Level 1 of Elder Dragon Form has a special passive called Corrosive Attack, which deals significant damage over time against towers."
set MK4[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 KA4[34]='Edem'
set MF4[34]='h04T'
set KB4[34]='n0AR'
set ME4[34]="ReplaceableTextures\\CommandButtons\\BTNHeroDemonHunter.blp"
call PH8(KA4[34],"stand channel")
call PD8(KA4[34],1,MF4[34])
set MG4[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 MH4[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 MI4[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 MJ4[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 MK4[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 KA4[35]='Nbrn'
set MF4[35]='h055'
set KB4[35]='n0AL'
set ME4[35]="ReplaceableTextures\\CommandButtons\\BTNBansheeRanger.tga"
call PH8(KA4[35],"spell")
call PD8(KA4[35],1,MF4[35])
set MG4[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 MH4[i]="An early level of Silence is great for preventing opponents from using multiple spells on you or your allies."
set MI4[i]="Trueshot Aura and Marksmanship provide Traxex with plenty of damage even with just a few Wraith Bands and Power Treads."
set MJ4[i]="Lothar's Edge provides damage and an escape mechanism, the latter of which can help Traxex survive."
set MK4[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 KA4[36]='Harf'
set MF4[36]='h04Z'
set KB4[36]='n0AS'
set ME4[36]="ReplaceableTextures\\CommandButtons\\BTNArthas.blp"
call PH8(KA4[36],"stand victory")
call PD8(KA4[36],1.1,MF4[36])
set MG4[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 MH4[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 MI4[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 MJ4[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 MK4[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 KA4[37]='H00D'
set MF4[37]='h04S'
set KB4[37]='n0AK'
set ME4[37]="ReplaceableTextures\\CommandButtons\\BTNBeastMaster.blp"
call PH8(KA4[37],"spell slam")
call PD8(KA4[37],1,MF4[37])
set MG4[i]="Endurance Aura is usually more useful later in the game when your team is fighting together, so get your other skills first."
set MH4[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 MI4[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 MJ4[i]="Try casting Wild Axes behind the target to compensate for their movement. You can also manipulate their return path by moving Rexxar."
set MK4[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 KA4[38]='E00P'
set MF4[38]='h04R'
set KB4[38]='n0AJ'
set ME4[38]="ReplaceableTextures\\CommandButtons\\BTNChimaera.blp"
call PH8(KA4[38],"stand 3")
call PD8(KA4[38],1,MF4[38])
set MG4[i]="Dual Breath and Ice Path help to make Jakiro a strong offensive and defensive support hero. "
set MH4[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 MI4[i]="A level of Liquid Fire early on can be useful for deterring physical attacks "
set MJ4[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 MK4[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 KA4[39]='N01I'
set MF4[39]='h054'
set KB4[39]='n0AI'
set ME4[39]="ReplaceableTextures\\CommandButtons\\BTNHeroAlchemist.blp"
call PH8(KA4[39],"stand 2")
call PD8(KA4[39],1,MF4[39])
call PD8('N01J',1,MF4[39])
call PD8('N01H',1,MF4[39])
call PD8('N01T',1,MF4[39])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[40]='N01V'
set MF4[40]='h04W'
set KB4[40]='n0AH'
set ME4[40]="ReplaceableTextures\\CommandButtons\\BTNPriestessOfTheMoon.blp"
call PH8(KA4[40],"stand ready")
call PD8(KA4[40],1,MF4[40])
set MG4[i]="PotM can be extremely efficient and gank with just a few Wraith Bands, Boots of Speed and a Bottle."
set MH4[i]="Getting one level of Leap is usually sufficient early on until Starfall and Elune's Arrow are fully leveled."
set MI4[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 MJ4[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 MK4[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 KA4[41]='H00S'
set MF4[41]='h04Q'
set KB4[41]='n0AT'
set ME4[41]="ReplaceableTextures\\CommandButtons\\BTNStorm.blp"
call PH8(KA4[41],"spell")
call PD8(KA4[41],1,MF4[41])
set MG4[i]="Do not get Overload at level 1 since you do not have any spells to activate its effect with."
set MH4[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 MI4[i]="You have to wait 1 second after casting Static Remnant before it begins detecting nearby units for its explosion effect."
set MJ4[i]="In addition to chasing and escaping, Lightning Ball can be used to dodge many spells with the right timing."
set MK4[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 KA4[42]='H00Q'
set MF4[42]='h04Y'
set KB4[42]='n0AG'
set ME4[42]="ReplaceableTextures\\CommandButtons\\BTNHeadHunterBerserker.blp"
call PH8(KA4[42],"stand alternate 3")
call PD8(KA4[42],1.15,MF4[42])
set MG4[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 MH4[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 MI4[i]="Life Break deals damage based on the remaining health of the target, making it strongest at the beginning of a fight. "
set MJ4[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 MK4[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 KA4[43]='E01Y'
set MF4[43]='h058'
set KB4[43]='n0AF'
set ME4[43]="ReplaceableTextures\\CommandButtons\\BTNAssassin.blp"
call PH8(KA4[43],"stand victory")
call PD8(KA4[43],1.2,MF4[43])
set MG4[i]="Refraction is a great way of surviving in a lane, just be careful not to get hit by creeps too much."
set MH4[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 MI4[i]="Traps can be used for vision, most effectively in cramped areas like the end of ramps or at the rune powerup spots."
set MJ4[i]="You can farm extremely fast by positioning yourself so that the Psi Blades splash on multiple creeps at once."
set MK4[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 KA4[44]='N00B'
set MF4[44]='h050'
set KB4[44]='n0AE'
set ME4[44]="ReplaceableTextures\\CommandButtons\\BTNFaerieDragon.blp"
call PH8(KA4[44],"attack spell")
call PD8(KA4[44],1.1,MF4[44])
set MG4[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 MH4[i]="Puck is very fragile early game, some Bracers or Null Talismans and a level of Phase Shift can help you survive."
set MI4[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 MJ4[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 MK4[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 KA4[45]='H00T'
set MF4[45]='h051'
set KB4[45]='n0AU'
set ME4[45]="ReplaceableTextures\\CommandButtons\\BTNClockWerkGoblin.blp"
call PH8(KA4[45],"Birth")
call PD8(KA4[45],1.5,MF4[45])
set MG4[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 MH4[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 MI4[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 MJ4[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 MK4[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 KA4[46]='H06S'
set MF4[46]='h06T'
set KB4[46]='n0EE'
set ME4[46]="ReplaceableTextures\\CommandButtons\\BTNProudmoore.blp"
call PH8(KA4[46],"stand victory")
call PD8(KA4[46],1.1,MF4[46])
set MG4[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 MH4[i]="The bubble animation from Torrent can only be seen by your team so try to use this to your advantage."
set MI4[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 MJ4[i]="Escaping enemy heroes is easy by casting X Marks the Spot on them. It also prevents them from getting away."
set MK4[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 KA4[47]='N0EG'
set MF4[47]='h07A'
set KB4[47]='n0EH'
set ME4[47]="ReplaceableTextures\\CommandButtons\\BTNSylvanusWindrunner.blp"
call PH8(KA4[47],"stand victory")
call PD8(KA4[47],1.2,MF4[47])
set MG4[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 MH4[i]="An early level of Windrunner can provide you with a quick getaway and chasing tool."
set MI4[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 MJ4[i]="Focus Fire is also a powerful spell to use on buildings and Roshan."
set MK4[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 KA4[48]='E02N'
set MF4[48]='h0CC'
set KB4[48]='n0KN'
set ME4[48]="ReplaceableTextures\\CommandButtons\\BTNFlyingMachine.blp"
call PH8(KA4[48],"stand 3")
call PD8(KA4[48],1.1,MF4[48])
call PD8('E02O',1.1,MF4[48])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[49]='E02J'
set MF4[49]='h0CD'
set KB4[49]='n0KR'
set ME4[49]="ReplaceableTextures\\CommandButtons\\BTNThrall.blp"
call PH8(KA4[49],"stand 3")
call PD8(KA4[49],1.1,MF4[49])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[50]='E02I'
set MF4[50]='h0C9'
set KB4[50]='n0KK'
set ME4[50]="ReplaceableTextures\\CommandButtons\\BTNTuskaarBrown.blp"
call PH8(KA4[50],"stand 3")
call PD8(KA4[50],1.,MF4[50])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[51]='E02F'
set MF4[51]='h0C8'
set KB4[51]='n0KM'
set ME4[51]="ReplaceableTextures\\CommandButtons\\BTNPhoenix.blp"
call PH8(KA4[51],"stand 3")
call PD8(KA4[51],1.05,MF4[51])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[52]='H008'
set MF4[52]='h04U'
set KB4[52]='n0AC'
set ME4[52]="ReplaceableTextures\\CommandButtons\\BTNRazorback.blp"
call PH8(KA4[52],"stand")
call PD8(KA4[52],1.65,MF4[52])
set MG4[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 MH4[i]="Quill spray doesn't initially deal much damage, but the stacking effect makes it very powerful over time in battles."
set MI4[i]="Sometimes one level of Goo can be enough to slow down an enemy hero early game."
set MJ4[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 MK4[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 KA4[53]='E02X'
set MF4[53]='h0CT'
set KB4[53]='n0LK'
set ME4[53]="ReplaceableTextures\\CommandButtons\\BTNMedivh.blp"
call PH8(KA4[53],"stand 3")
call PD8(KA4[53],1.15,MF4[53])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[54]='N0M0'
set MF4[54]='h0DG'
set KB4[54]='n0M1'
set ME4[54]="ReplaceableTextures\\CommandButtons\\BTNFireBrewmaster.blp"
call PH8(KA4[54],"stand 3")
call PD8(KA4[54],1,MF4[54])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[55]='E02K'
set MF4[55]='h0CA'
set KB4[55]='n0KJ'
set ME4[55]="ReplaceableTextures\\CommandButtons\\BTNGarithos.blp"
call PH8(KA4[55],"stand 3")
call PD8(KA4[55],1.3,MF4[55])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[56]='H0DO'
set MF4[56]='h0DH'
set KB4[56]='n0M6'
set ME4[56]="ReplaceableTextures\\CommandButtons\\BTNDragonHawk.blp"
call PH8(KA4[56],"stand 3")
call PD8(KA4[56],1.1,MF4[56])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[57]='E032'
set MF4[57]='h0EB'
set KB4[57]='n0ME'
set ME4[57]="ReplaceableTextures\\CommandButtons\\BTNJunkGolem.blp"
call PH8(KA4[57],"stand 3")
call PD8(KA4[57],1,MF4[57])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[58]='N0MU'
set MF4[58]='h0EK'
set KB4[58]='n0MV'
set ME4[58]="ReplaceableTextures\\CommandButtons\\BTNEarthBrewmaster.blp"
call PH8(KA4[58],"stand 3")
call PD8(KA4[58],1,MF4[58])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[59]='N0MD'
set MF4[59]='h0EP'
set KB4[59]='n0MG'
set ME4[59]="ReplaceableTextures\\CommandButtons\\BTNPriest.blp"
call PH8(KA4[59],"stand victory")
call PD8(KA4[59],1.25,MF4[59])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set K34=59
set i=60
set K64=60
set KA4[60]='Ewar'
set MF4[60]='h05J'
set KB4[60]='n0B5'
set ME4[60]="ReplaceableTextures\\CommandButtons\\BTNHeroWarden.blp"
call PH8(KA4[60],"spell slam")
call PD8(KA4[60],1,MF4[60])
set MG4[i]="Stifling Dagger is used for creep-killing and slowing opponents; prevent enemies from escaping by using it with Blink Strike."
set MH4[i]="Try to Blink Strike to a nearby allied or enemy unit to make a quick escape when caught in a defensive situation. "
set MI4[i]="Be cautious when entering battles with Blink Strike, you could be caught outnumbered or disabled without your escape mechanism."
set MJ4[i]="Blur can sometimes allow you to surprise opponents if they aren't paying attention."
set MK4[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 KA4[61]='H00V'
set MF4[61]='h05K'
set KB4[61]='n0B6'
set ME4[61]="ReplaceableTextures\\CommandButtons\\BTNNagaSeaWitch.blp"
call PH8(KA4[61],"stand ready")
call PD8(KA4[61],1,MF4[61])
call PD8('H08D',1,MF4[61])
call PD8('H08C',1,MF4[61])
call PD8('H084',1,MF4[61])
call PD8('H08B',1,MF4[61])
set MG4[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 MH4[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 MI4[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 MJ4[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 MK4[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 KA4[62]='Udre'
set MF4[62]='h05L'
set KB4[62]='n0B7'
set ME4[62]="ReplaceableTextures\\CommandButtons\\BTNTichondrius.blp"
call PH8(KA4[62],"spell slam")
call PD8(KA4[62],1,MF4[62])
set MG4[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 MH4[i]="Void is your primary source of damage early game and can be used to interrupt spells and teleports with its mini-stun."
set MI4[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 MJ4[i]="Use Crippling Fear when you are hunting heroes so that they cannot disable or slow you while you are chasing them."
set MK4[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 KA4[63]='NC00'
set MF4[63]='h05M'
set KB4[63]='n0C0'
set ME4[63]="ReplaceableTextures\\CommandButtons\\BTNSkeletonArcher.tga"
call PH8(KA4[63],"stand victory")
call PD8(KA4[63],1.8,MF4[63])
call O78(KA4[63],'d','}','d')
set MG4[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 MH4[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 MI4[i]="Critical Strike is generally preferred over Vampiric Aura because its lifesteal is not very effective earlier when Leoric needs more damage."
set MJ4[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 MK4[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 KA4[64]='UC42'
set MF4[64]='h05N'
set KB4[64]='n0BV'
set ME4[64]="ReplaceableTextures\\CommandButtons\\BTNDoomGuard.blp"
call PH8(KA4[64],"stand victory")
call PD8(KA4[64],1.1,MF4[64])
set MG4[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 MH4[i]="Devour deals 20 damage per second, so consume creeps with low HP remaining so you can finish digesting the enemy quickly."
set MI4[i]="Use the command -iObsScoreInt1 to find your opponents' level for potential LVL? Death targets. Its mini-stun will also interrupt channeling spells and teleports."
set MJ4[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 MK4[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 KA4[65]='U000'
set MF4[65]='h05O'
set KB4[65]='n0BU'
set ME4[65]="ReplaceableTextures\\CommandButtons\\BTNHeroCryptLord.tga"
call PH8(KA4[65],"spell throw")
call PD8(KA4[65],.8,MF4[65])
set MG4[i]="Effective use of Impale and Mana Burn early game requires you to purchase some Null Talismans or Bracers and Bottle."
set MH4[i]="Mana Burn is a devastating spell to have in the lane, force opponents to play defensively by preventing them from casting spells."
set MI4[i]="Unlike other Agility heroes, Anub'arak is a caster. Getting items like Dagon can be more useful than purchasing damage items."
set MJ4[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 MK4[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 KA4[66]='UC91'
set MF4[66]='h05P'
set KB4[66]='n0C1'
set ME4[66]="ReplaceableTextures\\CommandButtons\\BTNNagaMyrmidon.tga"
call PH8(KA4[66],"spell")
call PD8(KA4[66],1,MF4[66])
call O78(KA4[66],175,75,200)
set MG4[i]="Slithereen Crush requires good positioning, so do your best to stand next to the hero you are trying to stun."
set MH4[i]="Sprint is a great spell for both chasing and escaping but be careful when using it because you will take bonus damage."
set MI4[i]="In addition to lowering armor, Amplify Damage provides vision of enemies, even heroes that have the ability to become invisible."
set MJ4[i]="Bash is usually more effective later in the game when you have more items like Armlet of Mordiggan."
set MK4[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 KA4[67]='UC01'
set MF4[67]='h05Q'
set KB4[67]='n0C2'
set ME4[67]="ReplaceableTextures\\CommandButtons\\BTNBlueDemoness.tga"
call PH8(KA4[67],"spell slam")
call PD8(KA4[67],1.3,MF4[67])
set MG4[i]="Blink provides you with an escape mechanism and spell dodge but on higher levels it becomes a powerful chasing tool as well."
set MH4[i]="Scream of Pain is used for killing creeps and harassing opponents, making it more useful than Shadow Strike early game."
set MI4[i]="Try to hit as many targets as possible with Sonic Wave by targeting the ground instead of on an enemy hero directly."
set MJ4[i]="Shadow Strike does decent damage but its primary use is for the slow it provides for chasing and outrunning opponents."
set MK4[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 KA4[68]='E004'
set MF4[68]='h05R'
set KB4[68]='n0BW'
set ME4[68]="ReplaceableTextures\\CommandButtons\\BTNSkeletonMage.blp"
call PH8(KA4[68],"stand victory")
call PD8(KA4[68],1,MF4[68])
set MG4[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 MH4[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 MI4[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 MJ4[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 MK4[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 KA4[69]='EC45'
set MF4[69]='h05S'
set KB4[69]='n0BS'
set ME4[69]="ReplaceableTextures\\CommandButtons\\BTNFacelessOne.blp"
call PH8(KA4[69],"spell slam")
call PD8(KA4[69],1.3,MF4[69])
call O78(KA4[69],0,255,150)
set MG4[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 MH4[i]="Get Backtrack early game if you need to play defensively, while Time Lock will allow you to be a little more aggressive."
set MI4[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 MJ4[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 MK4[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 KA4[70]='EC77'
set MF4[70]='h05T'
set KB4[70]='n0BR'
set ME4[70]="ReplaceableTextures\\CommandButtons\\BTNNetherDragon.blp"
call PH8(KA4[70],"spell slam")
call PD8(KA4[70],1.2,MF4[70])
call O78(KA4[70],75,255,25)
set MG4[i]="Poison Attack allows you to harass an opponent and permanently chase them thanks to a 0 cooldown starting at level 3."
set MH4[i]="Prevent creeps and towers from attacking you by casting Poison Attack manually by clicking 'C' and then the designated target."
set MI4[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 MJ4[i]="Early HP and movement speed items like Phase Boots or a Point/Vitality Booster can really make a difference."
set MK4[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 KA4[71]='E002'
set MF4[71]='h05U'
set KB4[71]='n0BY'
set ME4[71]="ReplaceableTextures\\CommandButtons\\BTNRevenant.blp"
call PH8(KA4[71],"spell")
call PD8(KA4[71],1,MF4[71])
set MG4[i]="Use your attack range to help gauge how far opponents need to be for Plasma Field to deal the most damage."
set MH4[i]="Unstable Current will slow opponents who cast spells on you and could be useful to help prevent yourself from being killed."
set MI4[i]="Static Link is powerful if you can stay within the range of opponents - getting Unstable Current can sometimes help with that."
set MJ4[i]="Storm Seeker strikes the target with the lowest health, so use it after creeps have died or when chasing a solitary target."
set MK4[i]="Consider increasing your HP along with damage when purchasing items."
set i=i+1
set KA4[72]='U00C'
set MF4[72]='h05V'
set KB4[72]='n0BQ'
set ME4[72]="ReplaceableTextures\\CommandButtons\\BTNGhoul.blp"
call PH8(KA4[72],"victory")
call PD8(KA4[72],1.5,MF4[72])
call O78(KA4[72],'d','d','d')
set MG4[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 MH4[i]="Feast deals percentage-based damage, which is useful against heroes with high HP and lets Naix fight neutral creeps with ease."
set MI4[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 MJ4[i]="Infest can be used for escaping, surprising your opponents, to neutral, or to just gain significant health quickly when necessary."
set MK4[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 KA4[73]='H00H'
set MF4[73]='h05W'
set KB4[73]='n0BT'
set ME4[73]="ReplaceableTextures\\CommandButtons\\BTNPugna.BLP"
call PH8(KA4[73],"stand ready")
call PD8(KA4[73],1,MF4[73])
set MG4[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 MH4[i]="Decrepify can be used on opponents either to increase spell damage from you and your allies or to prevent them from attacking."
set MI4[i]="Nether Ward will drain mana and punish opponents for using spells. Just remember to cast it where opponents cannot destroy it easily."
set MJ4[i]="Aghanim's Scepter, Linkens Sphere and Bloodstone are examples of items that offer survivability while improving his spellcasting abilities."
set MK4[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 KA4[74]='Ofar'
set MF4[74]='h05X'
set KB4[74]='n0BP'
set ME4[74]="ReplaceableTextures\\CommandButtons\\BTNSeaGiantGreen.blp"
call PH8(KA4[74],"attack slam")
call PD8(KA4[74],1,MF4[74])
set MG4[i]="Be sure to attack enemies slowed by Gush, the armor reduction means that your hits will deal more damage than normal."
set MH4[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 MI4[i]="Kraken Shell gives you some protection against physical damage as well as a debuff removal against certain spells."
set MJ4[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 MK4[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 KA4[75]='Oshd'
set MF4[75]='h05Y'
set KB4[75]='n0BO'
set ME4[75]="ReplaceableTextures\\CommandButtons\\BTNVoidWalker.blp"
call PH8(KA4[75],"spell")
call PD8(KA4[75],1.5,MF4[75])
call O78(KA4[75],150,0,150)
set MG4[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 MH4[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 MI4[i]="Use Nightmare to help teammates to aim their spells and remove an opponent from battles temporarily while you fight their allies."
set MJ4[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 MK4[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 KA4[76]='U00E'
set MF4[76]='h05Z'
set KB4[76]='n0B8'
set ME4[76]="ReplaceableTextures\\CommandButtons\\BTNGhostOfKelThuzad.blp"
call PH8(KA4[76],"stand victory")
call PD8(KA4[76],1.3,MF4[76])
set MG4[i]="Death Pulse lets you kill creeps and harass heroes simultaneously, great for pushing and healing allied units because of its low cooldown."
set MH4[i]="Sadist will provide you with some early regeneration for killing creeps, while Heartstopper Aura becomes effective as the game goes on."
set MI4[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 MJ4[i]="Your ultimate can also be used to stun opponents in certain situations, such as interrupting channeling spells and teleports."
set MK4[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 KA4[77]='U00F'
set MF4[77]='h060'
set KB4[77]='n0C5'
set ME4[77]="ReplaceableTextures\\CommandButtons\\BTNAbomination.blp"
call PH8(KA4[77],"stand 3")
call PD8(KA4[77],1.,MF4[77])
set MG4[i]="Pudge can known for his ability to isolate enemies with Meat Hook and using Rot and Dismember afterward, killing them outright. "
set MH4[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 MI4[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 MJ4[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 MK4[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 KA4[78]='O00J'
set MF4[78]='h061'
set KB4[78]='n0C3'
set ME4[78]="ReplaceableTextures\\CommandButtons\\BTNSpiritWalker.blp"
call PH8(KA4[78],"stand ready")
call PD8(KA4[78],1.2,MF4[78])
set MG4[i]="Empowering Haste is a smart skill to level first, it gives Barathrum movement speed and significant damage for killing creeps and heroes."
set MH4[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 MI4[i]="Get Strength Power Treads because the attack and movement speed benefits your other skills and the boost in HP helps you survive."
set MJ4[i]="Charge of Darkness gives Barathrum spell immunity after 12 seconds and provides vision of the target for you and your allies."
set MK4[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 KA4[79]='Ubal'
set MF4[79]='h062'
set KB4[79]='n0BX'
set ME4[79]="ReplaceableTextures\\CommandButtons\\BTNNerubianQueen.blp"
call PH8(KA4[79],"attack")
call PD8(KA4[79],1.,MF4[79])
call O78(KA4[79],255,200,200)
set MG4[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 MH4[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 MI4[i]="Shukuchi is used for harassing and chasing opponents offensively, and escaping and avoiding certain projectile spells defensively."
set MJ4[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 MK4[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 KA4[80]='Nfir'
set MF4[80]='h063'
set KB4[80]='n0BN'
set ME4[80]="ReplaceableTextures\\CommandButtons\\BTNShade.blp"
call PH8(KA4[80],"stand channel")
call PD8(KA4[80],1.15,MF4[80])
call O78(KA4[80],0,0,0)
set MG4[i]="Necromastery is important because of its massive damage gain and because your ultimate deals damage based on the number of souls."
set MH4[i]="Shadow Raze gives you three powerful nuke spells that should be maxed out first. Gauge the distance correctly and hit multiple times."
set MI4[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 MJ4[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 MK4[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 KA4[81]='U00K'
set MF4[81]='h064'
set KB4[81]='n0C4'
set ME4[81]="ReplaceableTextures\\CommandButtons\\BTNArachnathidGreen.blp"
call PH8(KA4[81],"attack 3")
call PD8(KA4[81],1,MF4[81])
set MG4[i]="Burrowstrike is both versatile and powerful: It deals damage, stuns and provides you with a useful escape or chasing mechanism."
set MH4[i]="Using Sandstorm at the right time will dodge certain projectile spells and can protect you temporarily if it is necessary."
set MI4[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 MJ4[i]="While you cannot move while Epicenter is channeling, once the pulses begin you can freely move around (mostly to chase your opponent)."
set MK4[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 KA4[82]='Opgh'
set MF4[82]='h065'
set KB4[82]='n0BM'
set ME4[82]="ReplaceableTextures\\CommandButtons\\BTNChaosGrom.blp"
call PH8(KA4[82],"stand victory")
call PD8(KA4[82],1,MF4[82])
set MG4[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 MH4[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 MI4[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 MJ4[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 MK4[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 KA4[83]='Hvsh'
set MF4[83]='h066'
set KB4[83]='n0BZ'
set ME4[83]="ReplaceableTextures\\CommandButtons\\BTNShaman.blp"
call PH8(KA4[83],"stand victory")
call PD8(KA4[83],1.25,MF4[83])
call O78(KA4[83],250,150,150)
set MG4[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 MH4[i]="An early level of Bloodrage can be useful for silencing enemies temporarily and for dealing a little bit of damage."
set MI4[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 MJ4[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 MK4[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 KA4[84]='Udea'
set MF4[84]='h067'
set KB4[84]='n0BL'
set ME4[84]="ReplaceableTextures\\CommandButtons\\BTNHeroDeathKnight.blp"
call PH8(KA4[84],"stand ready")
call PD8(KA4[84],1,MF4[84])
set MG4[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 MH4[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 MI4[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 MJ4[i]="Frostmourne is usually gotten later but it is very useful for chasing and helping your allies outrun your opponents."
set MK4[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 KA4[85]='E01B'
set MF4[85]='h068'
set KB4[85]='n0B9'
set ME4[85]="ReplaceableTextures\\CommandButtons\\BTNvengeanceincarnate.blp"
call PH8(KA4[85],"stand ready")
call PD8(KA4[85],.8,MF4[85])
set MG4[i]="Spectral Dagger is your utility spell. You can use it for chasing people down, scouting dangerous areas and escaping. "
set MH4[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 MI4[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 MJ4[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 MK4[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 KA4[86]='E01A'
set MF4[86]='h069'
set KB4[86]='n0BK'
set ME4[86]="ReplaceableTextures\\CommandButtons\\BTNWitchDoctor.blp"
call PH8(KA4[86],"stand victory")
call PD8(KA4[86],1.25,MF4[86])
set MG4[i]="Paralyzing Cask is your initiating spell for your other skills and can effectively keep two nearby units stun-locked at higher levels."
set MH4[i]="Maledict drastically reduces the damage needed to kill opponents and is an important spell to land in every fight."
set MI4[i]="An early level of Voodoo Restoration can provide a relatively cheap heal if you are forced to play defensively."
set MJ4[i]="Damaging your opponent immediately after using Maledict is wise because it will deal more bonus damage overall at the 3 ticks."
set MK4[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 KA4[87]='U00P'
set MF4[87]='h06A'
set KB4[87]='n0BA'
set ME4[87]="ReplaceableTextures\\CommandButtons\\BTNDestroyer.blp"
call PH8(KA4[87],"stand alternate 2")
call PD8(KA4[87],.85,MF4[87])
set MG4[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 MH4[i]="Use Astral Imprisonment to control your opponents' mana, for escaping/chasing, or on yourself and allies to avoid spells."
set MI4[i]="Cast Arcane Orb manually early on because you will have a greater chance of activating Essence Aura to use it endlessly."
set MJ4[i]="Guinsoo's Scythe of Vyse is a great choice because it offers Intelligence, balanced stats and provides Harbringer with a powerful disable."
set MK4[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 KA4[88]='E01C'
set MF4[88]='h06C'
set KB4[88]='n0BB'
set ME4[88]="ReplaceableTextures\\CommandButtons\\BTNGuldan.blp"
call PH8(KA4[88],"spell")
call PD8(KA4[88],1.5,MF4[88])
set MG4[i]="Shadow Word is either a heal or damage over time, definitely the most powerful early game spell to have."
set MH4[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 MI4[i]="Rain of Chaos creates a powerful Infernal that can take on heroes and is also great for killing creeps and pushing buildings."
set MJ4[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 MK4[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 KA4[89]='H00I'
set MF4[89]='h06D'
set KB4[89]='n0BJ'
set ME4[89]="ReplaceableTextures\\CommandButtons\\BTNKoboldGeomancer.blp"
call PH8(KA4[89],"spell")
call PD8(KA4[89],1.4,MF4[89])
call PD8('H00J',1.4,MF4[89])
set MG4[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 MH4[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 MI4[i]="Geomancer is an advanced hero: Be sure to monitor their individual health because if one dies, they all will."
set MJ4[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 MK4[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 KA4[90]='N01W'
set MF4[90]='h06E'
set KB4[90]='n0BI'
set ME4[90]="ReplaceableTextures\\CommandButtons\\BTNDarkTrollShadowPriest.blp"
call PH8(KA4[90],"spell")
call PD8(KA4[90],1.2,MF4[90])
set MG4[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 MH4[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 MI4[i]="In addition to slowing and damaging opponents, Poison Touch will allow you to interrupt channeling spells and teleports"
set MJ4[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 MK4[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 KA4[91]='N00R'
set MF4[91]='h06F'
set KB4[91]='n0BC'
set ME4[91]="ReplaceableTextures\\CommandButtons\\BTNPitLord.blp"
call PH8(KA4[91],"stand channel")
call PD8(KA4[91],.95,MF4[91])
set MG4[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 MH4[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 MI4[i]="Expulsion is usually used after some creeps have died so the spell lasts longer and will deal damage and mini-stun enemies."
set MJ4[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 MK4[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 KA4[92]='H00R'
set MF4[92]='h06G'
set KB4[92]='n0BH'
set ME4[92]="ReplaceableTextures\\CommandButtons\\BTNZombie.blp"
call PH8(KA4[92],"stand")
call PD8(KA4[92],2,MF4[92])
call PD8('H07I',1.3,MF4[92])
set MG4[i]="Decay is used to deal damage and make opponents more vulnerable, while increasing the survivability of Dirge temporarily."
set MH4[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 MI4[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 MJ4[i]="Use Tombstone when engaging the enemy because the zombies have a slowing capability and may also help block your opponents."
set MK4[i]="Tombstone Zombies become extremely powerful when your opponents have low health and attack and move much faster."
set i=i+1
set KA4[93]='H00N'
set MF4[93]='h06H'
set KB4[93]='n0BG'
set ME4[93]="ReplaceableTextures\\CommandButtons\\BTNDranaiMage.blp"
call PH8(KA4[93],"spell")
call PD8(KA4[93],1.15,MF4[93])
set MG4[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 MH4[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 MI4[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 MJ4[i]="Make sure they are standing closer to the edge of your targeting circle when casting Vacuum to pull your opponents further."
set MK4[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 KA4[94]='H00U'
set MF4[94]='h06B'
set KB4[94]='n0BF'
set ME4[94]="ReplaceableTextures\\CommandButtons\\BTNHeroBloodElfPrince.blp"
call PH8(KA4[94],"spell")
call PD8(KA4[94],1.25,MF4[94])
set MG4[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 MH4[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 MI4[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 MJ4[i]="Forge Spirit (EEQ) and Cold Snap (QQQ) can be effective for pushing towers and against heroes with low armor. "
set MK4[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 KA4[95]='Uktl'
set MF4[95]='h04D'
set KB4[95]='n0A6'
set ME4[95]="ReplaceableTextures\\CommandButtons\\BTNSpell_Shadow_SummonVoidWalker.blp"
call PH8(KA4[95],"stand")
call PD8(KA4[95],1.5,MF4[95])
set MG4[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 MH4[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 MI4[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 MJ4[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 MK4[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 KA4[96]='O016'
set MF4[96]='h07R'
set KB4[96]='n0G9'
set ME4[96]="ReplaceableTextures\\CommandButtons\\BTNTrollBatRider.blp"
call PH8(KA4[96],"stand")
call PD8(KA4[96],1.2,MF4[96])
call PD8('O017',1.2,MF4[96])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[97]='N0HP'
set MF4[97]='h0B0'
set KB4[97]='n0HR'
set ME4[97]="ReplaceableTextures\\CommandButtons\\BTNIcyGhost.blp"
call PH8(KA4[97],"stand")
call PD8(KA4[97],1.17,MF4[97])
call PD8('N0HP',1.2,MF4[97])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[98]='H071'
set MF4[98]='h072'
set KB4[98]='n0EF'
set ME4[98]="ReplaceableTextures\\CommandButtons\\BTNMurgulShadowCaster.blp"
call PH8(KA4[98],"stand 3")
call PD8(KA4[98],1.25,MF4[98])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4[99]='Eevi'
set MF4[99]='h056'
set KB4[99]='n0AV'
set ME4[99]="ReplaceableTextures\\CommandButtons\\BTNEvilIllidan.blp"
call PH8(KA4[99],"spell channel")
call PD8(KA4[99],1,MF4[99])
call PD8('Eevm',1,MF4[99])
call PD8('E02V',1,MF4[99])
call PD8('E02W',1,MF4[99])
call PD8('E02U',1,MF4[99])
set MG4[i]="Get Soul Steal if you need healing in the lane."
set MH4[i]="Purchase statistic-increasing items like Wraith Bands and later items like Sange and Yasha to benefit both Terrorblade and his images."
set MI4[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 MJ4[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 MK4[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 KA4['d']='Ekee'
set MF4['d']='h059'
set KB4['d']='n0AW'
set ME4['d']="ReplaceableTextures\\CommandButtons\\BTNKeeperGhostBlue.blp"
call PH8(KA4['d'],"stand victory")
call PD8(KA4['d'],1,MF4['d'])
set MG4[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 MH4[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 MI4[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 MJ4[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 MK4[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 KA4['e']='E02H'
set MF4['e']='h0CB'
set KB4['e']='n0KL'
set ME4['e']="ReplaceableTextures\\CommandButtons\\BTNArchimonde.blp"
call PH8(KA4['e'],"stand 3")
call PD8(KA4['e'],1.25,MF4['e'])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4['f']='Ulic'
set MF4['f']='h05A'
set KB4['f']='n0AX'
set ME4['f']="ReplaceableTextures\\CommandButtons\\BTNLichVersion2.blp"
call PH8(KA4['f'],"stand channel")
call PD8(KA4['f'],1.3,MF4[51])
set MG4[i]="Dark Ritual is useful for denying allied creeps and provides you with mana to use spells without buying regeneration items."
set MH4[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 MI4[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 MJ4[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 MK4[i]="The first target of your Chain Frost can interrupt channeling and teleport spells if absolutely necessary."
set i=i+1
set KA4['g']='UC76'
set MF4['g']='h05B'
set KB4['g']='n0AY'
set ME4['g']="ReplaceableTextures\\CommandButtons\\BTNBanshee.blp"
call PH8(KA4['g'],"spell wail")
call PD8(KA4['g'],1.35,MF4['g'])
set MG4[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 MH4[i]="An early level of Silence can help prevent you and your allies from being attacked by multiple spells."
set MI4[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 MJ4[i]="Exorcism also makes Krobelus extremely effective for quickly destroying enemy buildings, so be sure to push the enemy base when you can"
set MK4[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 KA4['h']='UC18'
set MF4['h']='h05C'
set KB4['h']='n0AZ'
set ME4['h']="ReplaceableTextures\\CommandButtons\\BTNLion.BLP"
call PH8(KA4['h'],"spell callstorm")
call PD8(KA4['h'],1.3,MF4['h'])
call O78(KA4['h'],50,'d',255)
set MG4[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 MH4[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 MI4[i]="Mana Drain only works on units with mana: Using Mana Drain on enemy heroes will reduce their spell use while replenishing mana."
set MJ4[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 MK4[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 KA4['i']='EC57'
set MF4['i']='h05D'
set KB4['i']='n0B0'
set ME4['i']="ReplaceableTextures\\CommandButtons\\BTNHydralisk.blp"
call PH8(KA4['i'],"attack")
call PD8(KA4['i'],1.,MF4['i'])
call O78(KA4['i'],150,200,255)
set MG4[i]="Venomous Gale is a spell that hits multiple opponents and slows them, making it very useful for getting early kills."
set MH4[i]="At least one level of Poison Sting is recommended early game for its slow effect."
set MI4[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 MJ4[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 MK4[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 KA4['j']='UC11'
set MF4['j']='h05E'
set KB4['j']='n0A2'
set ME4['j']="ReplaceableTextures\\CommandButtons\\BTNBlueMagnataur.tga"
call PH8(KA4['j'],"stand channel")
call PD8(KA4['j'],1,MF4['j'])
call O78(KA4['j'],150,150,'d')
set MG4[i]="Bottle and Perseverance help with early regeneration,. while purchasing Kelen's Dagger later will help you to land Reverse Polarity."
set MH4[i]="A few Attribute Bonus points can help you cast more spells. Save Mighty Swing for later levels when you have more damage."
set MI4[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 MJ4[i]="Magnus should cast Empower on himself and other allies with high damage before initiating team battles with his ultimate."
set MK4[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 KA4['k']='UC60'
set MF4['k']='h05F'
set KB4['k']='n0B1'
set ME4['k']="ReplaceableTextures\\CommandButtons\\BTNSpiritWyvern.blp"
call PH8(KA4['k'],"stand victory")
call PD8(KA4['k'],1,MF4['k'])
call O78(KA4['k'],150,150,150)
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4['l']='U00A'
set MF4['l']='h05G'
set KB4['l']='n0B2'
set ME4['l']="ReplaceableTextures\\CommandButtons\\BTNChaosWarlord.blp"
call PH8(KA4['l'],"stand victory")
call PD8(KA4['l'],1.05,MF4['l'])
set MG4[i]="Chaos Bolt and Blink Strike are active abilities that are more useful in the lane and for killing opponents than Critical Strike."
set MH4[i]="Chaos Bolt is a disable that switches between average and extremely powerful, the sooner you have max out this spell, the better."
set MI4[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 MJ4[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 MK4[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 KA4['m']='N0M7'
set MF4['m']='h0DW'
set KB4['m']='n0M8'
set ME4['m']="ReplaceableTextures\\CommandButtons\\BTNFrostWyrm.blp"
call PH8(KA4['m'],"stand victory")
call PD8(KA4['m'],.9,MF4['m'])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4['n']='N0MK'
set MF4['n']='h0EF'
set KB4['n']='n0ML'
set ME4['n']="ReplaceableTextures\\CommandButtons\\BTNGnollWarden.blp"
call PH8(KA4['n'],"stand victory")
call PD8(KA4['n'],1.1,MF4['n'])
set MG4[i]=""
set MH4[i]=""
set MI4[i]=""
set MJ4[i]=""
set MK4[i]=""
set i=i+1
set KA4['o']='U008'
set MF4['o']='h05H'
set KB4['o']='n0B3'
set ME4['o']="ReplaceableTextures\\CommandButtons\\BTNKiljaedin.blp"
call PH8(KA4['o'],"spell")
call PD8(KA4['o'],1.2,MF4['o'])
call PD8('E015',1,MF4['o'])
call O78(KA4['o'],255,75,255)
set MG4[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 MH4[i]="Spirit Wolves gain invisibility at level 4, making them difficult to kill and easy to harass heroes with in the lane."
set MI4[i]="Feral Heart make you and your wolves stronger overall, while Howl is an offensive spell used before engaging the enemy."
set MJ4[i]="Shapeshift makes you incredibly powerful and gives you max movement speed. Avoid being blocked by your wolves when chasing."
set MK4[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 KA4['p']='U006'
set MF4['p']='h05I'
set KB4['p']='n0B4'
set ME4['p']="ReplaceableTextures\\CommandButtons\\BTNSpiderBlack.blp"
call PH8(KA4['p'],"walk")
call PD8(KA4['p'],1.36,MF4['p'])
set MG4[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 MH4[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 MI4[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 MJ4[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 MK4[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 KL4='p'
set K14[1]='Nbrn'
set K14[2]='Edem'
set K14[3]='N016'
set K14[4]='Nbbc'
set K14[5]='Naka'
set K14[6]='O00P'
set K14[7]='Usyl'
set K14[8]='E005'
set K14[9]='N01O'
set K14[10]='HC92'
set K14[11]='Hvwd'
set K14[12]='HC49'
set K14[13]='Huth'
set K14[14]='Ogrh'
set K14[15]='U006'
set K14[16]='EC57'
set K14[17]='Eevi'
set K14[18]='Ubal'
set K14[19]='E004'
set K14[20]='EC77'
set K14[21]='Hvsh'
set K14[22]='Nfir'
set K14[23]='E002'
set K14[24]='EC45'
set K14[25]='Ewar'
set K14[26]='U000'
set K14[27]='H00V'
set K14[28]='E01B'
set K14[29]='N01V'
set K14[30]='H00I'
set K14[31]='E01Y'
set K14[32]='H071'
set K14[33]='E02N'
set K14[34]='N0M0'
set K14[35]='N0MK'
set K04=35
set K54[1]='Npbm'
set K54[2]='Hlgr'
set K54[3]='Harf'
set K54[4]='H000'
set K54[5]='H001'
set K54[6]='Hamg'
set K54[7]='H008'
set K54[8]='Ucrl'
set K54[9]='Otch'
set K54[10]='NC00'
set K54[11]='Udre'
set K54[12]='UC11'
set K54[13]='Ofar'
set K54[14]='U00F'
set K54[15]='U00K'
set K54[16]='O00J'
set K54[17]='Udea'
set K54[18]='Opgh'
set K54[19]='U00A'
set K54[20]='U00C'
set K54[21]='UC91'
set K54[22]='UC42'
set K54[23]='U008'
set K54[24]='H00D'
set K54[25]='N01I'
set K54[26]='H00Q'
set K54[27]='N00R'
set K54[28]='H00T'
set K54[29]='H06S'
set K54[30]='H00R'
set K54[31]='O015'
set K54[32]='E02I'
set K54[33]='E02F'
set K54[34]='O01F'
set K54[35]='E032'
set K54[36]='E02K'
set K54[37]='N0MU'
set K24=37
set K_4[1]='Orkn'
set K_4[2]='Emoo'
set K_4[3]='Emns'
set K_4[4]='H004'
set K_4[5]='Hjai'
set K_4[6]='Uktl'
set K_4[7]='Hmbr'
set K_4[8]='H00K'
set K_4[9]='Ntin'
set K_4[10]='Hmkg'
set K_4[11]='Hblm'
set K_4[12]='N01A'
set K_4[13]='H00A'
set K_4[14]='Ulic'
set K_4[15]='Ekee'
set K_4[16]='UC76'
set K_4[17]='UC18'
set K_4[18]='UC01'
set K_4[19]='UC60'
set K_4[20]='H00H'
set K_4[21]='Oshd'
set K_4[22]='U00E'
set K_4[23]='E01A'
set K_4[24]='U00P'
set K_4[25]='E00P'
set K_4[26]='E01C'
set K_4[27]='N01W'
set K_4[28]='H00N'
set K_4[29]='N0EG'
set K_4[30]='H00S'
set K_4[31]='N00B'
set K_4[32]='H00U'
set K_4[33]='O016'
set K_4[34]='N0HP'
set K_4[35]='E02H'
set K_4[36]='E02J'
set K_4[37]='E02X'
set K_4[38]='H0DO'
set K_4[39]='N0M7'
set K_4[40]='N0MD'
set M44=40
set M74[1]='Orkn'
set M74[2]='Emoo'
set M74[3]='Emns'
set M74[4]='H004'
set M74[5]='Hjai'
set M74[6]='Uktl'
set M74[7]='Hmbr'
set M74[8]='H00K'
set M74[9]='Ntin'
set M74[10]='Nbrn'
set M74[11]='Hblm'
set M74[12]='N01A'
set M74[13]='H00A'
set M74[14]='Ulic'
set M74[15]='Ekee'
set M74[16]='UC76'
set M74[17]='UC18'
set M74[18]='UC01'
set M74[19]='UC60'
set M74[20]='H00H'
set M74[21]='Oshd'
set M74[22]='U00E'
set M74[23]='E01A'
set M74[24]='U00P'
set M74[25]='E00P'
set M74[26]='E01C'
set M74[27]='N01W'
set M74[28]='N0EG'
set M74[29]='H00S'
set M74[30]='N00B'
set M74[31]='H00U'
set M74[32]='N016'
set M74[33]='O00P'
set M74[34]='Usyl'
set M74[35]='E005'
set M74[36]='N01O'
set M74[37]='E01Y'
set M74[38]='Hvwd'
set M74[39]='EC57'
set M74[40]='Ubal'
set M74[41]='E004'
set M74[42]='EC77'
set M74[43]='Nfir'
set M74[44]='E002'
set M74[45]='H00V'
set M74[46]='N01V'
set M74[47]='H00Q'
set M74[48]='O016'
set M74[49]='N0HP'
set M74[50]='O01F'
set M74[51]='E02H'
set M74[52]='E02N'
set M74[53]='E02J'
set M74[54]='E02F'
set M74[55]='E02X'
set M74[56]='H0DO'
set M74[57]='N0MK'
set M74[58]='N0M7'
set M74[59]='N0MD'
set M84=59
set M94[1]='Hmkg'
set M94[2]='H00N'
set M94[3]='Edem'
set M94[4]='Nbbc'
set M94[5]='Naka'
set M94[6]='HC49'
set M94[7]='Huth'
set M94[8]='Ogrh'
set M94[9]='U006'
set M94[10]='Eevi'
set M94[11]='Hvsh'
set M94[12]='EC45'
set M94[13]='Ewar'
set M94[14]='U000'
set M94[15]='E01B'
set M94[16]='H00I'
set M94[17]='HC92'
set M94[18]='Npbm'
set M94[19]='Hlgr'
set M94[20]='Harf'
set M94[21]='H000'
set M94[22]='H001'
set M94[23]='Hamg'
set M94[24]='H008'
set M94[25]='Ucrl'
set M94[26]='Otch'
set M94[27]='NC00'
set M94[28]='Udre'
set M94[29]='UC11'
set M94[30]='Ofar'
set M94[31]='U00F'
set M94[32]='U00K'
set M94[33]='O00J'
set M94[34]='Udea'
set M94[35]='Opgh'
set M94[36]='U00A'
set M94[37]='U00C'
set M94[38]='UC91'
set M94[39]='UC42'
set M94[40]='U008'
set M94[41]='H00D'
set M94[42]='N01I'
set M94[43]='N00R'
set M94[44]='H00T'
set M94[45]='H06S'
set M94[46]='H00R'
set M94[47]='O015'
set M94[48]='H071'
set M94[49]='E02I'
set M94[50]='N0M0'
set M94[51]='E032'
set M94[52]='E02K'
set M94[53]='N0MU'
set MD4=53
call MR8()
endfunction
function TavernFogFix takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
call DestroyFogModifier(CreateFogModifierRadius(G8[0],FOG_OF_WAR_MASKED,GetUnitX(MO4),GetUnitY(MO4),900,false,false))
call DestroyFogModifier(CreateFogModifierRadius(N8[0],FOG_OF_WAR_MASKED,GetUnitX(MM4),GetUnitY(MM4),900,false,false))
call EA8(t)
set t=null
return false
endfunction
function XA8 takes item Z4 returns string
if Z4==null then
return"UI\\Widgets\\Console\\Undead\\undead-inventory-slotfiller.blp"
endif
return DV[ZU7(Z4)]
endfunction
function XB8 takes nothing returns nothing
local unit a=CreateUnit(Player(0),'h07L',-6100,-5800,0)
local unit b=CreateUnit(Player(0),'h07L',-6100,-5800,0)
local item i=CreateItem('I0GM',0,0)
call UnitAddItem(a,i)
if UnitUseItem(a,i)then
endif
call UnitRemoveItem(a,i)
call UnitAddItem(b,i)
if UnitUseItem(b,i)then
set MA4=true
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,(GetObjectName(('n0HI'))))
else
set MA4=false
endif
call ShowUnit(a,false)
call KillUnit(a)
call ShowUnit(b,false)
call KillUnit(b)
call RemoveItem(i)
set i=null
set b=null
set a=null
endfunction
function XC8 takes integer id returns boolean
return id=='H00J' or id=='N0MM'
endfunction
function X38 takes integer id returns boolean
local integer i=0
loop
exitwhen i>JN7
if JM7[i]==id then
return true
endif
set i=i+1
endloop
return false
endfunction
function X68 takes nothing returns nothing
set JN7=JN7+1
set JM7[JN7]='A1ZW'
set JN7=JN7+1
set JM7[JN7]='A0B6'
set JN7=JN7+1
set JM7[JN7]='A0K7'
set JN7=JN7+1
set JM7[JN7]='A0T7'
set JN7=JN7+1
set JM7[JN7]='A0T8'
set JN7=JN7+1
set JM7[JN7]='A11F'
set JN7=JN7+1
set JM7[JN7]='A11H'
set JN7=JN7+1
set JM7[JN7]='A11G'
set JN7=JN7+1
set JM7[JN7]='A11D'
set JN7=JN7+1
set JM7[JN7]='A0S3'
set JN7=JN7+1
set JM7[JN7]='A11E'
set JN7=JN7+1
set JM7[JN7]='A15W'
set JN7=JN7+1
set JM7[JN7]='A2HQ'
set JN7=JN7+1
set JM7[JN7]='A231'
set JN7=JN7+1
set JM7[JN7]='A2HO'
set JN7=JN7+1
set JM7[JN7]='A02O'
set JN7=JN7+1
set JM7[JN7]='A08Y'
set JN7=JN7+1
set JM7[JN7]='A08Z'
set JN7=JN7+1
set JM7[JN7]='A090'
set JN7=JN7+1
set JM7[JN7]='A092'
set JN7=JN7+1
set JM7[JN7]='AIpg'
set JN7=JN7+1
set JM7[JN7]='AItb'
set JN7=JN7+1
set JM7[JN7]='A0H6'
set JN7=JN7+1
set JM7[JN7]='A1QD'
set JN7=JN7+1
set JM7[JN7]='A1T7'
set JN7=JN7+1
set JM7[JN7]='A19M'
set JN7=JN7+1
set JM7[JN7]='A1AC'
set JN7=JN7+1
set JM7[JN7]='AChx'
set JN7=JN7+1
set JM7[JN7]='A28Y'
set JN7=JN7+1
set JM7[JN7]='AIbk'
set JN7=JN7+1
set JM7[JN7]='A1EW'
set JN7=JN7+1
set JM7[JN7]='A017'
set JN7=JN7+1
set JM7[JN7]='A0JY'
set JN7=JN7+1
set JM7[JN7]='A0FO'
set JN7=JN7+1
set JM7[JN7]='A0H7'
set JN7=JN7+1
set JM7[JN7]='A0B8'
set JN7=JN7+1
set JM7[JN7]='A1WE'
set JN7=JN7+1
set JM7[JN7]='AIxk'
set JN7=JN7+1
set JM7[JN7]='A1ZI'
set JN7=JN7+1
set JM7[JN7]='A0CK'
set JN7=JN7+1
set JM7[JN7]='A0JL'
set JN7=JN7+1
set JM7[JN7]='A1FO'
set JN7=JN7+1
set JM7[JN7]='AIda'
set JN7=JN7+1
set JM7[JN7]='A0HB'
set JN7=JN7+1
set JM7[JN7]='A0D3'
set JN7=JN7+1
set JM7[JN7]='A0DF'
set JN7=JN7+1
set JM7[JN7]='A0FD'
set JN7=JN7+1
set JM7[JN7]='A12W'
set JN7=JN7+1
set JM7[JN7]='A14A'
set JN7=JN7+1
set JM7[JN7]='A1FD'
set JN7=JN7+1
set JM7[JN7]='A1IO'
set JN7=JN7+1
set JM7[JN7]='A02W'
set JN7=JN7+1
set JM7[JN7]='A269'
set JN7=JN7+1
set JM7[JN7]='A2KG'
set JN7=JN7+1
set JM7[JN7]='A1FP'
set JN7=JN7+1
set JM7[JN7]='A0T9'
set JN7=JN7+1
set JM7[JN7]='A1Q8'
set JN7=JN7+1
set JM7[JN7]='A1MO'
set JN7=JN7+1
set JM7[JN7]='A28D'
set JN7=JN7+1
set JM7[JN7]='Aeat'
set JN7=JN7+1
set JM7[JN7]='A0K0'
set JN7=JN7+1
set JM7[JN7]='AIpl'
set JN7=JN7+1
set JM7[JN7]='A0JT'
set JN7=JN7+1
set JM7[JN7]='AIpr'
set JN7=JN7+1
set JM7[JN7]='A02X'
set JN7=JN7+1
set JM7[JN7]='A1R5'
set JN7=JN7+1
set JM7[JN7]='AIsw'
set JN7=JN7+1
set JM7[JN7]='A206'
set JN7=JN7+1
set JM7[JN7]='A1ZH'
set JN7=JN7+1
set JM7[JN7]='A2EA'
set JN7=JN7+1
set JM7[JN7]='A2K4'
set JN7=JN7+1
set JM7[JN7]='A2K7'
set JN7=JN7+1
set JM7[JN7]='A2K1'
endfunction
function XL8 takes integer id returns boolean
return id=='A21F' or id=='A21G' or id=='A21H' or id=='A1S9' or id=='A24A' or id=='A24B' or id=='A1S9' or id=='A06K' or id=='A1VG' or id=='A28Q' or id=='A1WF' or id=='A0T8' or id=='A0T7' or id=='A20N' or id=='A1Z2' or id=='A1Z3' or id=='A205' or id=='A14A' or id=='A269' or id=='A2KG' or id=='A2NI' or id=='A27X' or id=='A28Y' or id=='A24E' or id=='A1ZH' or id=='A1WO' or id=='A1FQ' or id=='A0TE' or id=='A2JO' or id=='A2FX' or id=='A0MP' or id=='A2KE' or id=='A2KH' or id=='A2K9' or id=='A2JL' or id=='AZ2F' or id=='A2MB' or id=='A029' or id=='A2O9' or id=='A2TH' or id=='A2TK' or id=='A2LI'
endfunction
function X18 takes nothing returns nothing
set MZ4=MZ4+1
set MY4[MZ4]='A0H6'
set MZ4=MZ4+1
set MY4[MZ4]='A012'
set MZ4=MZ4+1
set MY4[MZ4]='A06K'
set MZ4=MZ4+1
set MY4[MZ4]='A0I9'
set MZ4=MZ4+1
set MY4[MZ4]='A0HA'
set MZ4=MZ4+1
set MY4[MZ4]='A0K5'
set MZ4=MZ4+1
set MY4[MZ4]='A0PY'
set MZ4=MZ4+1
set MY4[MZ4]='A1FO'
set MZ4=MZ4+1
set MY4[MZ4]='A0RT'
set MZ4=MZ4+1
set MY4[MZ4]='A0SA'
set MZ4=MZ4+1
set MY4[MZ4]='A0T7'
set MZ4=MZ4+1
set MY4[MZ4]='A0T8'
set MZ4=MZ4+1
set MY4[MZ4]='A14A'
set MZ4=MZ4+1
set MY4[MZ4]='A0BE'
set MZ4=MZ4+1
set MY4[MZ4]='A21X'
set MZ4=MZ4+1
set MY4[MZ4]='A21W'
set MZ4=MZ4+1
set MY4[MZ4]='A21V'
set MZ4=MZ4+1
set MY4[MZ4]='Anh1'
set MZ4=MZ4+1
set MY4[MZ4]='A1OZ'
set MZ4=MZ4+1
set MY4[MZ4]='A13D'
set MZ4=MZ4+1
set MY4[MZ4]='A026'
set MZ4=MZ4+1
set MY4[MZ4]='A1Q8'
endfunction
function X08 takes nothing returns nothing
set P9[1]='AImt'
set P9[2]='AIda'
set P9[3]='ANtm'
set P9[4]='ACch'
set P9[5]='AIxk'
set P9[6]='A0CK'
set P9[7]='A017'
set P9[8]='A0B8'
set P9[9]='A0HB'
set P9[10]='A0D3'
set P9[11]='A0DF'
set P9[12]='A02W'
set P9[13]='AIpr'
set P9[14]='AIpl'
set P9[15]='A0FO'
set P9[16]='A0H7'
set P9[17]='A0H6'
set P9[18]='A02X'
set P9[19]='AIsw'
set P9[20]='A0CX'
set P9[21]='A0B6'
set P9[22]='Aeat'
set P9[23]='A08L'
set P9[24]='AIcy'
set P9[25]='A05Z'
set P9[26]='AIbk'
set P9[27]='A0DY'
set P9[28]='A0LZ'
set P9[29]='A0OI'
set P9[30]='A0KX'
set P9[31]='A0KW'
set P9[32]='A026'
set P9[33]='A0C4'
set P9[34]='A012'
set P9[35]='A06K'
set P9[36]='A02T'
set P9[37]='AHfa'
set P9[38]='A09V'
set P9[39]='A05Y'
set P9[40]='A0I9'
set P9[41]='A0HA'
set P9[42]='A0K5'
set P9[43]='A0PY'
set P9[44]='A0QN'
set P9[45]='A0RT'
set P9[46]='A0RP'
set P9[47]='A12W'
set P9[48]='A0SA'
set P9[49]='A0T7'
set P9[50]='A0T8'
set P9[51]='A14A'
set P9[52]='A0BE'
set P9[53]='A21X'
set P9[54]='A21W'
set P9[55]='A21V'
set P9[56]='A0MP'
set P9[57]='A13D'
set P9[58]='A0JY'
set P9[59]='A15W'
set P9[60]='A1FO'
set P9[61]='A1FD'
set P9[62]='A1OZ'
set P9[63]='A1MO'
set P9[64]='A1IO'
set P9[65]='A1Q8'
set P9[66]='A1RA'
set P9[67]='A1QV'
set P9[68]='A1WE'
set P9[69]='A1WB'
set P9[70]='A2KG'
set P9[71]='A2N3'
set S9=71
endfunction
function X58 takes nothing returns boolean
call X08()
call X18()
call X68()
return false
endfunction
function X28 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.01,false)
call TriggerAddCondition(t,Condition(function X58))
endfunction
function X_8 takes nothing returns nothing
call CreateQuestBJ(0,GetObjectName('Y103'),"TRIGSTR_49999","ReplaceableTextures\\CommandButtons\\BTNOrb of Water.blp")
call CreateQuestBJ(0,GetObjectName('Y104'),"TRIGSTR_49998","ReplaceableTextures\\CommandButtons\\BTNOrb of Water.blp")
call CreateQuestBJ(0,"Contacts","TRIGSTR_50005","ReplaceableTextures\\CommandButtons\\BTNSpy.blp")
call CreateQuestBJ(0,"Modes and commands","TRIGSTR_50007","ReplaceableTextures\\CommandButtons\\BTNTome.blp")
call CreateQuestBJ(0,"Special Thanks","TRIGSTR_50009","ReplaceableTextures\\CommandButtons\\BTNAmbush.blp")
call CreateQuestBJ(2,"New Map","TRIGSTR_50011","ReplaceableTextures\\CommandButtons\\BTNScrollOfHaste.blp")
call CreateQuestBJ(2,"Beta Application","TRIGSTR_50013","ReplaceableTextures\\CommandButtons\\BTNBansheeMaster.blp")
call CreateQuestBJ(2,"Submit Bugs","TRIGSTR_50015","ReplaceableTextures\\CommandButtons\\BTNCarrionScarabs.blp")
endfunction
function Y48 takes nothing returns boolean
local string s
if IsUnitIllusion(GetTriggerUnit())==false and XC8(GetUnitTypeId(GetTriggerUnit()))==false then
set s=GetUnitName(GetTriggerUnit())+" "+(GetObjectName(('n0HB')))+" "+GetObjectName(GetLearnedSkill())+" ("+(GetObjectName(('n0HC')))+" "+I2S(GetUnitAbilityLevel(GetTriggerUnit(),GetLearnedSkill()))+")"
call DisplayTimedTextToPlayer(KU4,0,0,3,s)
call DisplayTimedTextToPlayer(KV4,0,0,3,s)
endif
return false
endfunction
function Y78 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function Y48))
set t=null
endfunction
function Y88 takes player p returns nothing
local unit AM7=Y7[GetPlayerId(p)]
local integer i=0
local item Y98
loop
exitwhen i>5
set Y98=UnitItemInSlot(AM7,i)
call SetItemDroppable(Y98,false)
set i=i+1
endloop
set AM7=null
set Y98=null
endfunction
function YD8 takes nothing returns nothing
call NN8(bj_FORCE_ALL_PLAYERS,25.,(KW4[GetPlayerId((GetTriggerPlayer()))])+"|c00ff0303 "+(GetObjectName(('n02D')))+"|r")
endfunction
function Jf takes nothing returns nothing
local player YE8=ED8(GetHandleId(GetExpiredTimer()),"Leaver")
local integer T8=1
local integer Jg
local integer M38=GetPlayerState(YE8,PLAYER_STATE_RESOURCE_GOLD)
if M38>20 then
call SetPlayerState(YE8,PLAYER_STATE_RESOURCE_GOLD,0)
set WQ4[GetPlayerId(YE8)]=0
if IsJWPlayer(YE8)then
set Jg=MI8(E8)
else
set Jg=MI8(F8)
endif
if IsJWPlayer(YE8)then
loop
exitwhen T8>5
if KS8(G8[T8])then
call SetPlayerState(G8[T8],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(G8[T8],PLAYER_STATE_RESOURCE_GOLD)+M38/ Jg)
endif
set T8=T8+1
endloop
else
loop
exitwhen T8>5
if KS8(N8[T8])then
call SetPlayerState(N8[T8],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(N8[T8],PLAYER_STATE_RESOURCE_GOLD)+M38/ Jg)
endif
set T8=T8+1
endloop
endif
endif
endfunction
function YF8 takes player YE8 returns nothing
local timer t=CreateTimer()
local integer EC8=GetHandleId(t)
call DA8(EC8,"Leaver",YE8)
call TimerStart(t,2,true,function Jf)
set t=null
endfunction
function YG8 takes player p returns nothing
local multiboarditem YH8=MultiboardGetItem(A4,N74[GetPlayerId(p)],N44[GetPlayerId(p)])
call MultiboardSetItemValue(YH8,"|c00333333"+NM8(p)+"|r")
call MultiboardReleaseItem(YH8)
endfunction
function YI8 takes nothing returns nothing
local player p=O74
local string id=I2S(GetPlayerId(p))
call StoreInteger(IG4,id,"8_0",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(0)))))
call StoreInteger(IG4,id,"8_1",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(1)))))
call StoreInteger(IG4,id,"8_2",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(2)))))
call StoreInteger(IG4,id,"8_3",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(3)))))
call StoreInteger(IG4,id,"8_4",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(4)))))
call StoreInteger(IG4,id,"8_5",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(5)))))
if GetLocalPlayer()==V8 then
call SyncStoredInteger(IG4,I2S(GetPlayerId(p)),"8_0")
call SyncStoredInteger(IG4,I2S(GetPlayerId(p)),"8_1")
call SyncStoredInteger(IG4,I2S(GetPlayerId(p)),"8_2")
call SyncStoredInteger(IG4,I2S(GetPlayerId(p)),"8_3")
call SyncStoredInteger(IG4,I2S(GetPlayerId(p)),"8_4")
call SyncStoredInteger(IG4,I2S(GetPlayerId(p)),"8_5")
endif
endfunction
function YJ8 takes nothing returns nothing
local integer XW8=MI8(E8)
local integer XV8=MI8(F8)
local integer T8
local integer U8
local string YK8
local string YM8
local unit N28=Y7[GetPlayerId(GetTriggerPlayer())]
if N28==null then
set YM8=(GetObjectName(('n0EW')))
else
set YM8=GetUnitName(N28)
endif
if(P4<10)then
set YK8=I2S(O4)+":0"+I2S(P4)
else
set YK8=I2S(O4)+":"+I2S(P4)
endif
if U9==false then
set OD[GetPlayerId(GetTriggerPlayer())]="|c00555555"+YK8+"|r"
call NN8(bj_FORCE_ALL_PLAYERS,25.,W[GetPlayerId(GetTriggerPlayer())]+(KW4[GetPlayerId((GetTriggerPlayer()))])+" ("+YM8+")|r|c00ff0303 "+(GetObjectName(('n02D')))+"|r")
if(IsJWPlayer(GetTriggerPlayer()))then
set T8=1
set U8=5
loop
exitwhen T8>U8
if(G8[T8]!=GetTriggerPlayer())then
if(KS8(G8[T8]))then
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),G8[T8],4)
endif
endif
set T8=T8+1
endloop
else
set T8=1
set U8=5
loop
exitwhen T8>U8
if(N8[T8]!=GetTriggerPlayer())then
if(KS8(N8[T8]))then
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),N8[T8],4)
endif
endif
set T8=T8+1
endloop
endif
if IsJWPlayer(GetTriggerPlayer())or IsTZPlayer(GetTriggerPlayer())then
set MB4=MB4+1
endif
call X48("C"+"K"+I2S(C7[GetPlayerId(GetTriggerPlayer())])+"D"+I2S(L7[GetPlayerId(GetTriggerPlayer())])+"N"+I2S((LoadInteger(R8,StringHash("Stats"+I2S(GetPlayerId(GetTriggerPlayer()))),StringHash("NumOfNeutrals")))),GetPlayerId(GetTriggerPlayer()))
set O74=GetTriggerPlayer()
call ExecuteFunc("YI8")
call Y88(GetTriggerPlayer())
set U2[GetPlayerId(GetTriggerPlayer())]=true
call YG8(GetTriggerPlayer())
call YF8(GetTriggerPlayer())
if MB4==2 and L8==false and Ny then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60," ")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60," ")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60,"|c006699CC"+(GetObjectName(('n0FW')))+"|r")
endif
if MB4==3 then
set N_4=true
call ExecuteFunc("YN8")
set N_4=false
endif
else
set OD[GetPlayerId(GetTriggerPlayer())]="|c00555555End|r"
call ExecuteFunc("YO8")
endif
set N28=null
endfunction
function YP8 takes unit AM7 returns nothing
if GetUnitTypeId(AM7)!='H00J' and GetUnitTypeId(AM7)!='H00I' then
if GetOwningPlayer(AM7)==GetLocalPlayer()then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1," ")
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1,"|c006699CC"+(GetObjectName(('n0GR'))))
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1," ")
endif
call TP8(WR,GetOwningPlayer(AM7))
endif
call SetUnitInvulnerable(AM7,false)
call UnitRemoveAbility(AM7,'A0AZ')
call UnitRemoveAbility(AM7,'A09J')
call UnitRemoveAbility(AM7,'A0KT')
call UnitRemoveAbility(AM7,'A0NW')
call UnitRemoveAbility(AM7,'A0NU')
call UnitRemoveAbility(AM7,'A0OW')
call UnitRemoveAbility(AM7,'A0OV')
call UnitRemoveAbility(AM7,'A0OX')
call UnitRemoveAbility(AM7,'A0OY')
call UnitRemoveAbility(AM7,'A0P0')
call UnitRemoveAbility(AM7,'A17K')
call UnitRemoveAbility(AM7,'A0PV')
call UnitRemoveAbility(AM7,'A0QO')
call UnitRemoveAbility(AM7,'A0RC')
call UnitRemoveAbility(AM7,'A0RF')
call UnitRemoveAbility(AM7,Ly)
call UnitRemoveAbility(AM7,my)
call UnitRemoveAbility(AM7,My)
call UnitRemoveAbility(AM7,py)
call UnitRemoveAbility(AM7,'A0NU')
call UnitRemoveAbility(AM7,'A0NW')
call UnitRemoveAbility(AM7,'A0FY')
call UnitRemoveAbility(AM7,'A0I5')
call UnitRemoveAbility(AM7,'A0C9')
call UnitRemoveAbility(AM7,'A0IH')
call UnitRemoveAbility(AM7,'B067')
call UnitRemoveAbility(AM7,'B08L')
call UnitRemoveAbility(AM7,'A0SR')
call UnitRemoveAbility(AM7,'A0WO')
call UnitRemoveAbility(AM7,'A0WR')
call UnitRemoveAbility(AM7,'A1CN')
call UnitRemoveAbility(AM7,'A0VH')
call UnitRemoveAbility(AM7,'A0VJ')
call UnitRemoveAbility(AM7,'A109')
call UnitRemoveAbility(AM7,'A0VW')
call UnitRemoveAbility(AM7,'A0XM')
call UnitRemoveAbility(AM7,'A11O')
call UnitRemoveAbility(AM7,'A11R')
call UnitRemoveAbility(AM7,'A147')
call UnitRemoveAbility(AM7,'A148')
call UnitRemoveAbility(AM7,'A11U')
call UnitRemoveAbility(AM7,'A149')
call UnitRemoveAbility(AM7,'A121')
call UnitRemoveAbility(AM7,'A126')
call UnitRemoveAbility(AM7,'A179')
call UnitRemoveAbility(AM7,'Aetl')
call UnitRemoveAbility(AM7,n1[0])
call UnitRemoveAbility(AM7,n1[1])
call UnitRemoveAbility(AM7,n1[2])
call UnitRemoveAbility(AM7,n1[3])
call UnitRemoveAbility(AM7,n1[4])
call UnitRemoveAbility(AM7,n1[5])
call UnitRemoveAbility(AM7,'A1G5')
call UnitRemoveAbility(AM7,'A1G3')
call UnitRemoveAbility(AM7,'A1G6')
call UnitRemoveAbility(AM7,'A1G4')
call SBool(GetHandleId(AM7),"Grapple",false)
call SetUnitPathing(AM7,true)
call PauseUnit(AM7,false)
call SetUnitFlyHeight(AM7,GetUnitDefaultFlyHeight(AM7),0)
call SetUnitScale(AM7,PG8(AM7)*ZS,PG8(AM7)*ZS,PG8(AM7)*ZS)
call UnitRemoveAbility(AM7,'A1CA')
call UnitRemoveAbility(AM7,'A1C9')
call UnitRemoveAbility(AM7,'A1CB')
call UnitRemoveAbility(AM7,'A1CC')
call UnitRemoveAbility(AM7,'A1GA')
call UnitRemoveAbility(AM7,'A1W3')
call UnitRemoveAbility(AM7,'B0DO')
call UnitRemoveAbility(AM7,'A1UH')
call UnitRemoveAbility(AM7,'A1UI')
call UnitRemoveAbility(AM7,'A1Z4')
call UnitRemoveAbility(AM7,'A1ZA')
call UnitRemoveAbility(AM7,'A1ZB')
call UnitRemoveAbility(AM7,'A1Z9')
call UnitRemoveAbility(AM7,'B0DV')
call UnitRemoveAbility(AM7,'A266')
call UnitRemoveAbility(AM7,'A265')
call UnitRemoveAbility(AM7,'A24L')
call UnitRemoveAbility(AM7,'B0ED')
call UnitRemoveAbility(AM7,'A23O')
call UnitRemoveAbility(AM7,'B0E9')
call WF8(AM7,0)
if GetUnitTypeId(AM7)=='E02N' or GetUnitTypeId(AM7)=='E02O' then
call UnitRemoveAbility(AM7,'A237')
call UnitAddAbility(AM7,'A22B')
call UnitRemoveAbility(AM7,'A22B')
if AV7(AM7,BU[GK4])!=null then
call UnitAddAbility(AM7,'A237')
endif
endif
if GetUnitTypeId(AM7)=='N0MU' or GetUnitTypeId(AM7)=='N0MW' then
call UnitAddAbility(AM7,'A2QR')
call UnitRemoveAbility(AM7,'A2QR')
endif
if GetUnitTypeId(AM7)=='H0EL' or GetUnitTypeId(AM7)=='H0EO' then
call UnitAddAbility(AM7,'A2SX')
call UnitRemoveAbility(AM7,'A2SX')
endif
if GetUnitTypeId(AM7)=='H0ER' then
call UnitAddAbility(AM7,'A2VV')
call UnitRemoveAbility(AM7,'A2VV')
endif
call UnitRemoveAbility(AM7,'A23F')
call UnitRemoveAbility(AM7,'AZ34')
call UnitRemoveAbility(AM7,'AZ35')
call UnitRemoveAbility(AM7,'AZ36')
call UnitRemoveAbility(AM7,'A2S1')
call UF8(AM7)
set H04=AM7
call ExecuteFunc("YQ8")
endfunction
function YR8 takes nothing returns boolean
if GetPlayerAlliance(GetOwningPlayer(GetFilterUnit()),QZ,ALLIANCE_SHARED_CONTROL)and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false then
set MZ=MZ+1
endif
return false
endfunction
function YS8 takes unit u,player p,real x,real y,boolean YT8 returns nothing
local group g=OG8()
set MZ=0
set QZ=p
call GroupEnumUnitsSelected(g,p,Condition(function YR8))
if MZ==0 and GetLocalPlayer()==p then
if YT8==false then
call ClearSelection()
call SelectUnit(u,true)
endif
call PanCameraToTimed(x,y,0)
endif
set MZ=0
call OF8(g)
set g=null
endfunction
function YU8 takes unit S4 returns boolean
return GetUnitTypeId(S4)=='H00I' or GetUnitTypeId(S4)=='H00J'
endfunction
function YV8 takes unit YW8 returns nothing
local integer YX8
if AV7(YW8,BU[xuejingshi])!=null and GetUnitTypeId(YW8)!='H00J' then
set YX8=R2I(GetItemCharges(AV7(YW8,BU[xuejingshi]))*.67)
if GetItemCharges(AV7(YW8,BU[xuejingshi]))==1 then
set YX8=0
endif
call SetItemCharges(AV7(YW8,BU[xuejingshi]),YX8)
call AddHeroXP(YW8,GetHeroXP(OX4[GetPlayerId(GetOwningPlayer(YW8))]),true)
call RemoveUnit(OX4[GetPlayerId(GetOwningPlayer(YW8))])
endif
endfunction
function YY8 takes unit u returns nothing
local integer EC8=GetHandleId(GetOwningPlayer(u))
local unit YZ8=LUnit(EC8,"Kobold0")
local unit YA8=LUnit(EC8,"Kobold1")
local unit YB8=LUnit(EC8,"Kobold2")
local unit YC8=LUnit(EC8,"Kobold3")
local unit Y38=LUnit(EC8,"Kobold4")
local unit Y68
set Y68=YZ8
if Y68!=null then
call RemoveUnit(Y68)
endif
set Y68=YA8
if Y68!=null then
call RemoveUnit(Y68)
endif
set Y68=YB8
if Y68!=null then
call RemoveUnit(Y68)
endif
set Y68=YC8
if Y68!=null then
call RemoveUnit(Y68)
endif
set Y68=Y38
if Y68!=null then
call RemoveUnit(Y68)
endif
set Y68=null
set Y38=null
set YC8=null
set YB8=null
set YA8=null
set YZ8=null
endfunction
function YL8 takes nothing returns boolean
call EA8(GetTriggeringTrigger())
set OY4=false
return false
endfunction
function NightSightDown_Filter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(globalS))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_DEAD)==false
endfunction
function NightSightDown takes nothing returns nothing
local integer h=GetT()
local group g=CreateGroup()
if not(GetFloatGameState(GAME_STATE_TIME_OF_DAY)>6. and GetFloatGameState(GAME_STATE_TIME_OF_DAY)<18.)then
set globalS=LUnit(h,"s")
call GroupEnumUnitsInRange(g,0,0,16000,Condition(function NightSightDown_Filter))
loop
exitwhen FirstOfGroup(g)==null
call UnitAddAbility(FirstOfGroup(g),'AZ0Z')
call GroupRemoveUnit(g,FirstOfGroup(g))
endloop
else
set globalS=LUnit(h,"s")
call GroupEnumUnitsInRange(g,0,0,16000,Condition(function NightSightDown_Filter))
loop
exitwhen FirstOfGroup(g)==null
call UnitRemoveAbility(FirstOfGroup(g),'AZ0Z')
call GroupRemoveUnit(g,FirstOfGroup(g))
endloop
endif
call DestroyGroup(g)
set g=null
endfunction
function Y18 takes unit Y08 returns nothing
local integer EC8=GetHandleId(GetOwningPlayer(Y08))
local unit YZ8=LUnit(EC8,"Kobold0")
local unit YA8=LUnit(EC8,"Kobold1")
local unit YB8=LUnit(EC8,"Kobold2")
local unit YC8=LUnit(EC8,"Kobold3")
local unit Y38=LUnit(EC8,"Kobold4")
local unit Y68
local real x=GetUnitX(YZ8)
local real y=GetUnitY(YZ8)
local trigger t
if OY4==false then
if IsJWPlayer(GetOwningPlayer(YZ8))then
set x=GetRectCenterX(QD)
set y=GetRectCenterY(QD)
else
set x=GetRectCenterX(PD)
set y=GetRectCenterY(PD)
endif
else
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,2.,false)
call TriggerAddCondition(t,Condition(function YL8))
endif
set Y68=YZ8
if Y68!=null and Y08!=Y68 then
call ReviveHero(Y68,x,y,false)
call SetUnitX(Y68,x)
call SetUnitY(Y68,y)
call YP8(Y68)
call SetUnitPathing(Y68,true)
call SetUnitState(Y68,UNIT_STATE_MANA,10000)
endif
set Y68=YA8
if Y68!=null and Y08!=Y68 then
call ReviveHero(Y68,x,y,false)
call SetUnitX(Y68,x)
call SetUnitY(Y68,y)
call YP8(Y68)
call SetUnitPathing(Y68,true)
call SetUnitState(Y68,UNIT_STATE_MANA,10000)
endif
set Y68=YB8
if Y68!=null and Y08!=Y68 then
call ReviveHero(Y68,x,y,false)
call SetUnitX(Y68,x)
call SetUnitY(Y68,y)
call YP8(Y68)
call SetUnitPathing(Y68,true)
call SetUnitState(Y68,UNIT_STATE_MANA,10000)
endif
set Y68=YC8
if Y68!=null and Y08!=Y68 then
call ReviveHero(Y68,x,y,false)
call SetUnitX(Y68,x)
call SetUnitY(Y68,y)
call YP8(Y68)
call SetUnitPathing(Y68,true)
call SetUnitState(Y68,UNIT_STATE_MANA,10000)
endif
set Y68=Y38
if Y68!=null and Y08!=Y68 then
call ReviveHero(Y68,x,y,false)
call SetUnitX(Y68,x)
call SetUnitY(Y68,y)
call YP8(Y68)
call SetUnitPathing(Y68,true)
call SetUnitState(Y68,UNIT_STATE_MANA,10000)
endif
set t=null
set Y68=null
set YC8=null
set YB8=null
set YA8=null
set YZ8=null
endfunction
function Y58 takes unit AM7 returns nothing
local integer Y28=GetUnitPointValue(AM7)
local unit Y_8
if(Y28==34)then
call ExecuteFunc("Z48")
call ExecuteFunc("Z78")
call ExecuteFunc("Z88")
elseif(Y28==37)then
call ExecuteFunc("Z98")
call ExecuteFunc("ZD8")
call ExecuteFunc("ZE8")
call ExecuteFunc("ZF8")
elseif(Y28==38)then
call ExecuteFunc("ZG8")
call ExecuteFunc("ZH8")
call ExecuteFunc("ZI8")
call ExecuteFunc("ZJ8")
elseif(Y28==32)then
call ExecuteFunc("ZK8")
call ExecuteFunc("ZM8")
call ExecuteFunc("ZN8")
elseif(Y28==52)then
call ExecuteFunc("ZO8")
call ExecuteFunc("ZP8")
call ExecuteFunc("ZQ8")
call ExecuteFunc("ZR8")
elseif(Y28==31)then
call ExecuteFunc("ZS8")
call ExecuteFunc("ZT8")
call ExecuteFunc("ZU8")
elseif(Y28==24)then
call ExecuteFunc("ZV8")
call ExecuteFunc("ZW8")
call ExecuteFunc("ZX8")
call ExecuteFunc("ZY8")
elseif(Y28==5)then
call ExecuteFunc("ZZ8")
call ExecuteFunc("ZA8")
call ExecuteFunc("ZB8")
elseif(Y28==8)then
call ExecuteFunc("ZC8")
call ExecuteFunc("Z38")
call ExecuteFunc("Z68")
call ExecuteFunc("ZL8")
call ExecuteFunc("Z18")
elseif(Y28==3)then
call ExecuteFunc("Z08")
call ExecuteFunc("Z58")
call ExecuteFunc("Z28")
call ExecuteFunc("Z_8")
elseif(Y28==95)then
call ExecuteFunc("A48")
call ExecuteFunc("A78")
call ExecuteFunc("A88")
call ExecuteFunc("A98")
call ExecuteFunc("AD8")
elseif(Y28==20)then
call ExecuteFunc("AE8")
call ExecuteFunc("AF8")
call ExecuteFunc("po")
call ExecuteFunc("AG8")
elseif(Y28==12)then
call ExecuteFunc("AH8")
call ExecuteFunc("AI8")
call ExecuteFunc("AJ8")
elseif(Y28==16)then
call ExecuteFunc("AK8")
call ExecuteFunc("AM8")
call ExecuteFunc("AN8")
call ExecuteFunc("AO8")
call ExecuteFunc("AP8")
elseif(Y28==25)then
call ExecuteFunc("AQ8")
call ExecuteFunc("AR8")
elseif(Y28==4)then
call ExecuteFunc("AS8")
call ExecuteFunc("AT8")
call ExecuteFunc("pZ")
call ExecuteFunc("AU8")
call ExecuteFunc("AV8")
call ExecuteFunc("AW8")
call SetUnitPathing(AM7,false)
set N24=true
set Y_8=CreateUnit(GetOwningPlayer(AM7),GetUnitTypeId(AM7),GetUnitX(AM7),GetUnitY(AM7),GetUnitFacing(AM7))
call SBool(GetHandleId(Y_8),"EnteredAlready",true)
set Y7[GetPlayerId(GetOwningPlayer(AM7))]=Y_8
call SetUnitPathing(Y_8,false)
call SetUnitPosition(Y_8,GetUnitX(AM7),GetUnitY(AM7))
if T4 then
call SetHeroXP(Y_8,GetHeroXP(AM7),false)
call UnitAddItem(Y_8,UnitItemInSlot(AM7,0))
call UnitAddItem(Y_8,UnitItemInSlot(AM7,1))
call UnitAddItem(Y_8,UnitItemInSlot(AM7,2))
call UnitAddItem(Y_8,UnitItemInSlot(AM7,3))
call UnitAddItem(Y_8,UnitItemInSlot(AM7,4))
call UnitAddItem(Y_8,UnitItemInSlot(AM7,5))
endif
call PA8(AM7)
call SetUnitPathing(Y_8,true)
call ClearSelectionForPlayer(GetOwningPlayer(Y_8))
call SelectUnitAddForPlayer(Y_8,GetOwningPlayer(Y_8))
elseif(Y28==7)then
call ExecuteFunc("AX8")
call ExecuteFunc("AY8")
call ExecuteFunc("AZ8")
elseif(Y28==18)then
call ExecuteFunc("AA8")
call ExecuteFunc("AB8")
elseif(Y28==36)then
call ExecuteFunc("PN")
elseif(Y28==21)then
call ExecuteFunc("Po")
call ExecuteFunc("AC8")
call ExecuteFunc("A38")
call ExecuteFunc("A68")
elseif(Y28==14)then
call ExecuteFunc("AL8")
call ExecuteFunc("A18")
call ExecuteFunc("A08")
call ExecuteFunc("A58")
call ExecuteFunc("Pr")
call ExecuteFunc("A28")
elseif(Y28==13)then
call ExecuteFunc("A_8")
call ExecuteFunc("B48")
call ExecuteFunc("B78")
call ExecuteFunc("B88")
elseif(Y28==26)then
call ExecuteFunc("B98")
call ExecuteFunc("Pv")
call ExecuteFunc("PV")
call ExecuteFunc("BD8")
elseif(Y28==9)then
call ExecuteFunc("Pw")
call ExecuteFunc("BE8")
call ExecuteFunc("BF8")
call ExecuteFunc("BG8")
elseif(Y28==10)then
call ExecuteFunc("BH8")
call ExecuteFunc("BI8")
call ExecuteFunc("BJ8")
call ExecuteFunc("BK8")
call ExecuteFunc("BM8")
call ExecuteFunc("qb")
call ExecuteFunc("qB")
call ExecuteFunc("qc")
elseif(Y28==23)then
call ExecuteFunc("qC")
call ExecuteFunc("qD")
call ExecuteFunc("qe")
call ExecuteFunc("qg")
elseif(Y28==19)then
call ExecuteFunc("BN8")
call ExecuteFunc("BO8")
call ExecuteFunc("BP8")
elseif(Y28==22)then
call ExecuteFunc("BQ8")
call ExecuteFunc("BR8")
call ExecuteFunc("BS8")
call ExecuteFunc("BT8")
elseif(Y28==17)then
call ExecuteFunc("BU8")
call ExecuteFunc("BV8")
elseif(Y28==1)then
call ExecuteFunc("BW8")
call ExecuteFunc("BX8")
call ExecuteFunc("BY8")
elseif(Y28==2)then
call ExecuteFunc("BZ8")
call ExecuteFunc("BA8")
call ExecuteFunc("BB8")
call ExecuteFunc("BC8")
elseif(Y28==27)then
call ExecuteFunc("B38")
call ExecuteFunc("B68")
call ExecuteFunc("BL8")
call ExecuteFunc("B18")
call ExecuteFunc("B08")
elseif(Y28==82)then
call ExecuteFunc("B58")
call ExecuteFunc("B28")
call ExecuteFunc("B_8")
call ExecuteFunc("C48")
elseif(Y28==75)then
call ExecuteFunc("C78")
call ExecuteFunc("C88")
call ExecuteFunc("C98")
call ExecuteFunc("CD8")
elseif(Y28==83)then
call ExecuteFunc("CE8")
call ExecuteFunc("CF8")
call ExecuteFunc("CG8")
call ExecuteFunc("CH8")
elseif(Y28=='p')then
call ExecuteFunc("CI8")
call ExecuteFunc("CJ8")
call ExecuteFunc("CK8")
call ExecuteFunc("CM8")
elseif(Y28=='l')then
call ExecuteFunc("CN8")
call ExecuteFunc("CO8")
elseif(Y28==69)then
call ExecuteFunc("CP8")
call ExecuteFunc("CQ8")
call ExecuteFunc("CR8")
call ExecuteFunc("CS8")
call ExecuteFunc("CT8")
elseif(Y28=='d')then
call ExecuteFunc("CU8")
call ExecuteFunc("CV8")
call ExecuteFunc("CW8")
elseif(Y28=='f')then
call ExecuteFunc("CX8")
elseif(Y28==64)then
call ExecuteFunc("CY8")
call ExecuteFunc("CZ8")
call ExecuteFunc("CA8")
call ExecuteFunc("CB8")
elseif(Y28=='j')then
call ExecuteFunc("CC8")
call ExecuteFunc("C38")
call ExecuteFunc("C68")
elseif(Y28==61)then
call ExecuteFunc("CL8")
call ExecuteFunc("C18")
call ExecuteFunc("C08")
elseif(Y28==76)then
call ExecuteFunc("C58")
call ExecuteFunc("C28")
call ExecuteFunc("C_8")
call ExecuteFunc("L48")
elseif(Y28==80)then
call ExecuteFunc("L78")
call ExecuteFunc("L88")
call ExecuteFunc("L98")
call ExecuteFunc("LD8")
call ExecuteFunc("RM")
elseif(Y28==62)then
call ExecuteFunc("LE8")
call ExecuteFunc("LF8")
call ExecuteFunc("LG8")
set NJ=CreateTrigger()
call TriggerRegisterTimerEvent(NJ,2,true)
call TriggerAddCondition(NJ,Condition(function NightSightDown))
call SUnit(GetHandleId(NJ),"s",AM7)
elseif(Y28==60)then
call ExecuteFunc("LH8")
call ExecuteFunc("LI8")
call ExecuteFunc("LJ8")
elseif(Y28==77)then
call ExecuteFunc("LK8")
call ExecuteFunc("LM8")
call ExecuteFunc("LN8")
call ExecuteFunc("LO8")
call ExecuteFunc("LP8")
elseif(Y28==73)then
call ExecuteFunc("LQ8")
call ExecuteFunc("LR8")
elseif(Y28==81)then
call ExecuteFunc("LS8")
call ExecuteFunc("LT8")
call ExecuteFunc("LU8")
elseif(Y28==66)then
call ExecuteFunc("LV8")
call ExecuteFunc("LW8")
elseif(Y28==78)then
call ExecuteFunc("LX8")
call ExecuteFunc("LY8")
call ExecuteFunc("LZ8")
call ExecuteFunc("LA8")
elseif(Y28==99)then
call ExecuteFunc("LB8")
call ExecuteFunc("LC8")
call ExecuteFunc("L38")
call ExecuteFunc("L68")
call ExecuteFunc("LL8")
call ExecuteFunc("L18")
elseif(Y28==74)then
call ExecuteFunc("L08")
call ExecuteFunc("L58")
call ExecuteFunc("L28")
call ExecuteFunc("L_8")
elseif(Y28=='i')then
call ExecuteFunc("D49")
call ExecuteFunc("D79")
elseif(Y28==70)then
call ExecuteFunc("D89")
call ExecuteFunc("D99")
call ExecuteFunc("DD9")
call ExecuteFunc("SA8")
elseif(Y28=='k')then
call ExecuteFunc("DE9")
call ExecuteFunc("DF9")
call ExecuteFunc("DG9")
call ExecuteFunc("DH9")
elseif(Y28==79)then
call ExecuteFunc("DI9")
call ExecuteFunc("DJ9")
call ExecuteFunc("DK9")
call ExecuteFunc("DM9")
elseif(Y28==68)then
call ExecuteFunc("DN9")
call ExecuteFunc("DO9")
elseif(Y28==84)then
call ExecuteFunc("DP9")
call ExecuteFunc("DQ9")
call ExecuteFunc("s7")
call ExecuteFunc("DR9")
elseif(Y28==85)then
call ExecuteFunc("DS9")
call ExecuteFunc("DT9")
call ExecuteFunc("DU9")
call ExecuteFunc("DV9")
call ExecuteFunc("DW9")
elseif(Y28==86)then
call ExecuteFunc("DX9")
call ExecuteFunc("DY9")
call ExecuteFunc("DZ9")
call ExecuteFunc("DA9")
elseif(Y28==87)then
call ExecuteFunc("DB9")
call ExecuteFunc("DC9")
call ExecuteFunc("D39")
call ExecuteFunc("D69")
elseif(Y28==33)then
call ExecuteFunc("DL9")
call ExecuteFunc("D19")
call ExecuteFunc("D09")
elseif(Y28==39)then
call ExecuteFunc("D59")
call ExecuteFunc("D29")
call ExecuteFunc("D_9")
elseif(Y28==88)then
call ExecuteFunc("E49")
call ExecuteFunc("E79")
call ExecuteFunc("E89")
call ExecuteFunc("E99")
elseif(Y28==40)then
call ExecuteFunc("ED9")
call ExecuteFunc("EE9")
call ExecuteFunc("EF9")
call ExecuteFunc("EG9")
elseif Y28==89 then
call ExecuteFunc("EH9")
call ExecuteFunc("EI9")
elseif Y28==90 then
call ExecuteFunc("EJ9")
call ExecuteFunc("EK9")
call ExecuteFunc("EM9")
call ExecuteFunc("EN9")
elseif Y28==71 then
call ExecuteFunc("EO9")
call ExecuteFunc("EP9")
call ExecuteFunc("EQ9")
call ExecuteFunc("ER9")
elseif Y28==93 then
call ExecuteFunc("ES9")
call ExecuteFunc("ET9")
call ExecuteFunc("EU9")
call ExecuteFunc("EV9")
elseif Y28==42 then
call ExecuteFunc("EW9")
call ExecuteFunc("EX9")
call ExecuteFunc("EY9")
call ExecuteFunc("EZ9")
elseif Y28==91 then
call ExecuteFunc("EA9")
call ExecuteFunc("EB9")
call ExecuteFunc("EC9")
call ExecuteFunc("E39")
call ExecuteFunc("E69")
call ExecuteFunc("EL9")
call ExecuteFunc("E19")
call ExecuteFunc("E09")
elseif Y28==92 then
call ExecuteFunc("E59")
call ExecuteFunc("E29")
call ExecuteFunc("E_9")
call ExecuteFunc("F49")
elseif Y28==41 then
call ExecuteFunc("F79")
call ExecuteFunc("F89")
call ExecuteFunc("F99")
call ExecuteFunc("FD9")
call ExecuteFunc("FE9")
elseif Y28==43 then
call ExecuteFunc("FF9")
call ExecuteFunc("FG9")
call ExecuteFunc("FH9")
call ExecuteFunc("FI9")
call ExecuteFunc("FJ9")
call ExecuteFunc("FK9")
elseif Y28==44 then
call ExecuteFunc("FM9")
call ExecuteFunc("FN9")
call ExecuteFunc("FO9")
call ExecuteFunc("FP9")
elseif Y28==72 then
call ExecuteFunc("FQ9")
call ExecuteFunc("FR9")
call ExecuteFunc("FS9")
call ExecuteFunc("FT9")
elseif Y28==94 then
call ExecuteFunc("FU9")
elseif Y28==6 then
call ExecuteFunc("FV9")
call ExecuteFunc("FW9")
call ExecuteFunc("FX9")
elseif Y28=='h' then
call ExecuteFunc("FY9")
call ExecuteFunc("FZ9")
elseif Y28==65 then
call ExecuteFunc("FA9")
call ExecuteFunc("FB9")
call ExecuteFunc("FC9")
call ExecuteFunc("F39")
elseif Y28=='o' then
call ExecuteFunc("F69")
call ExecuteFunc("FL9")
call ExecuteFunc("F19")
elseif Y28==63 then
call ExecuteFunc("F09")
call ExecuteFunc("F59")
call ExecuteFunc("F29")
elseif Y28==45 then
call ExecuteFunc("F_9")
call ExecuteFunc("G49")
call ExecuteFunc("G79")
call ExecuteFunc("G89")
elseif Y28==46 then
call ExecuteFunc("G99")
call ExecuteFunc("GD9")
call ExecuteFunc("GE9")
call ExecuteFunc("GF9")
elseif Y28==47 then
call ExecuteFunc("GG9")
call ExecuteFunc("GH9")
call ExecuteFunc("GI9")
call ExecuteFunc("GJ9")
elseif Y28==11 then
call ExecuteFunc("GK9")
call ExecuteFunc("GM9")
elseif Y28==96 then
call ExecuteFunc("GN9")
call ExecuteFunc("GO9")
call ExecuteFunc("GP9")
call ExecuteFunc("GQ9")
elseif Y28==15 then
call ExecuteFunc("GR9")
call ExecuteFunc("GS9")
call ExecuteFunc("GT9")
call ExecuteFunc("GU9")
elseif Y28==97 then
call ExecuteFunc("GV9")
call ExecuteFunc("GW9")
call ExecuteFunc("GX9")
call ExecuteFunc("GY9")
call ExecuteFunc("GZ9")
elseif Y28==98 then
call ExecuteFunc("GA9")
call ExecuteFunc("GB9")
call ExecuteFunc("GC9")
call ExecuteFunc("G39")
call ExecuteFunc("G69")
elseif Y28==67 then
call ExecuteFunc("GL9")
call ExecuteFunc("G19")
elseif Y28==28 then
call ExecuteFunc("G09")
elseif Y28==51 then
call ExecuteFunc("G59")
call ExecuteFunc("G29")
call ExecuteFunc("G_9")
call ExecuteFunc("H49")
call ExecuteFunc("H79")
call ExecuteFunc("H89")
call ExecuteFunc("H99")
elseif Y28=='d' then
elseif Y28=='e' then
call ExecuteFunc("HD9")
call ExecuteFunc("HE9")
call ExecuteFunc("HF9")
call ExecuteFunc("HG9")
elseif Y28==48 then
call ExecuteFunc("HH9")
call ExecuteFunc("HI9")
call ExecuteFunc("HJ9")
call ExecuteFunc("HK9")
elseif Y28==49 then
call ExecuteFunc("HM9")
call ExecuteFunc("HN9")
call ExecuteFunc("HO9")
call ExecuteFunc("HP9")
elseif Y28==29 then
call ExecuteFunc("HQ9")
call ExecuteFunc("HR9")
call ExecuteFunc("HS9")
call ExecuteFunc("HT9")
elseif Y28==50 then
call ExecuteFunc("HU9")
call ExecuteFunc("HV9")
call ExecuteFunc("HW9")
call ExecuteFunc("HX9")
elseif Y28==30 then
call ExecuteFunc("HY9")
call ExecuteFunc("HZ9")
elseif Y28==53 then
call ExecuteFunc("HA9")
call ExecuteFunc("HB9")
call ExecuteFunc("HC9")
call ExecuteFunc("H39")
elseif Y28=='g' then
call ExecuteFunc("H69")
elseif Y28==54 then
call ExecuteFunc("HL9")
call ExecuteFunc("H19")
call ExecuteFunc("H09")
call ExecuteFunc("H59")
call ExecuteFunc("H29")
elseif Y28==55 then
call ExecuteFunc("H_9")
call ExecuteFunc("I49")
call ExecuteFunc("I79")
call ExecuteFunc("I89")
elseif Y28==56 then
call ExecuteFunc("I99")
call ExecuteFunc("ID9")
call ExecuteFunc("IE9")
call ExecuteFunc("IF9")
elseif Y28==57 then
call ExecuteFunc("IG9")
call ExecuteFunc("IH9")
call ExecuteFunc("II9")
call ExecuteFunc("IJ9")
elseif Y28=='m' then
call ExecuteFunc("IK9")
call ExecuteFunc("IM9")
call ExecuteFunc("IN9")
call ExecuteFunc("IO9")
call ExecuteFunc("IP9")
call ExecuteFunc("IQ9")
elseif Y28=='n' then
call ExecuteFunc("IR9")
call ExecuteFunc("IS9")
call ExecuteFunc("IT9")
call ExecuteFunc("IU9")
call ExecuteFunc("IV9")
elseif Y28==35 then
call ExecuteFunc("IW9")
call ExecuteFunc("IX9")
elseif Y28==58 then
call ExecuteFunc("IY9")
call ExecuteFunc("IZ9")
call ExecuteFunc("IA9")
call ExecuteFunc("IB9")
call ExecuteFunc("IC9")
set H04=AM7
call ExecuteFunc("I39")
elseif Y28==59 then
call ExecuteFunc("I69")
call ExecuteFunc("IL9")
call ExecuteFunc("I19")
call ExecuteFunc("I09")
endif
call PP8("I59",false)
set Y_8=null
endfunction
function I29 takes player VR7,string I_9 returns nothing
if IsPlayerInForce(GetLocalPlayer(),VQ7(VR7))then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,V9,40,W[GetPlayerId(VR7)]+(KW4[GetPlayerId((VR7))])+"|r "+I_9)
endif
endfunction
function J49 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
set M34=true
call EA8(t)
call DestroyFogModifier(CreateFogModifierRadius(G8[0],FOG_OF_WAR_MASKED,O54,O24,700,false,false))
call DestroyFogModifier(CreateFogModifierRadius(N8[0],FOG_OF_WAR_MASKED,O54,O24,700,false,false))
set t=null
return false
endfunction
function J79 takes unit u returns boolean
return GetUnitTypeId(u)!='H00M' and GetUnitTypeId(u)!='N0MM' and GetUnitTypeId(u)!='H07G' and GetUnitTypeId(u)!='H00Y' and GetUnitTypeId(u)!='H00J' and GetUnitTypeId(u)!='H0B8'
endfunction
function J89 takes nothing returns boolean
return IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and IsUnitIllusion(GetTriggerUnit())==false and LBool(GetHandleId(GetTriggerUnit()),"EnteredAlready")==false and J79(GetTriggerUnit())
endfunction
function J99 takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='n00C'
endfunction
function JD9 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function JE9 takes player j8 returns nothing
local group XS8=OG8()
local boolexpr hP=Condition(function J99)
call GroupEnumUnitsOfPlayer(XS8,j8,hP)
call ForGroup(XS8,function JD9)
call DestroyBoolExpr(hP)
call OF8(XS8)
set hP=null
set XS8=null
endfunction
function JF9 takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='ncop'
endfunction
function JG9 takes nothing returns nothing
if VT then
call UnitRemoveAbility(KR4[GetPlayerId(GetOwningPlayer(GetEnumUnit()))],'A14F')
call UnitRemoveAbility(KR4[GetPlayerId(GetOwningPlayer(GetEnumUnit()))],'A14E')
call UnitRemoveAbility(KR4[GetPlayerId(GetOwningPlayer(GetEnumUnit()))],'A14H')
endif
if GetUnitAbilityLevel(GetEnumUnit(),'A0I4')==0 then
call UnitAddAbility(GetEnumUnit(),'A0I4')
endif
endfunction
function JH9 takes player p returns nothing
local group g=OG8()
call GroupEnumUnitsOfPlayer(g,p,Condition(function JF9))
call ForGroup(g,function JG9)
call OF8(g)
set g=null
endfunction
function u6 takes player Ua returns player
local integer O5=1
local integer Uc=0
local boolean O6=false
loop
if((Uc>0)and(DK8(O5,O6)!=null)and(IsPlayerInForce(DK8(O5,O6),RX4)))then
return DK8(O5,O6)
endif
if(G8[O5]==Ua)then
set O6=true
set Uc=O5
elseif(N8[O5]==Ua)then
set Uc=O5
endif
set O5=O5+1
exitwhen O5>5
endloop
return null
endfunction
function JI9 takes unit N28,player p returns string
local string s=(GetObjectName(('n0DB')))
set s=XD8(s,"$hero",GetUnitName(N28))
set s=XD8(s,"$p",(KW4[GetPlayerId((p))]))
return s
endfunction
function JJ9 takes unit JK9 returns nothing
local item JM9=UnitItemInSlot(JK9,0)
local item JN9=UnitItemInSlot(JK9,1)
local item JO9=UnitItemInSlot(JK9,2)
local item JP9=UnitItemInSlot(JK9,3)
local item JQ9=UnitItemInSlot(JK9,4)
local item JR9=UnitItemInSlot(JK9,5)
local integer JS9=ZX7(JM9)
local integer JT9=ZX7(JN9)
local integer JU9=ZX7(JO9)
local integer JV9=ZX7(JP9)
local integer JW9=ZX7(JQ9)
local integer JX9=ZX7(JR9)
local integer JY9=0
call DisableTrigger(GW4)
call UnitRemoveItem(JK9,JM9)
call UnitRemoveItem(JK9,JN9)
call UnitRemoveItem(JK9,JO9)
call UnitRemoveItem(JK9,JP9)
call UnitRemoveItem(JK9,JQ9)
call UnitRemoveItem(JK9,JR9)
call RemoveItem(JM9)
call RemoveItem(JN9)
call RemoveItem(JO9)
call RemoveItem(JP9)
call RemoveItem(JQ9)
call RemoveItem(JR9)
call EnableTrigger(GW4)
if JS9>-1 then
set JY9=JY9+G14[JS9]
endif
if JT9>-1 then
set JY9=JY9+G14[JT9]
endif
if JU9>-1 then
set JY9=JY9+G14[JU9]
endif
if JV9>-1 then
set JY9=JY9+G14[JV9]
endif
if JW9>-1 then
set JY9=JY9+G14[JW9]
endif
if JX9>-1 then
set JY9=JY9+G14[JX9]
endif
call SetPlayerState(GetOwningPlayer(JK9),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(GetOwningPlayer(JK9),PLAYER_STATE_RESOURCE_GOLD)+JY9)
set dH[GetPlayerId(GetOwningPlayer(JK9))]=0
set JR9=null
set JQ9=null
set JP9=null
set JO9=null
set JN9=null
set JM9=null
endfunction
function JZ9 takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local player j8=GetOwningPlayer(AM7)
local real x
local real y
local region r=CreateRegion()
local player JA9=j8
local item JB9
local trigger t
local player p
local string s
if((RA4!=null)and(IsTriggerEnabled(RA4)))then
if((GetOwningPlayer(GetTriggerUnit())==RT4)and(RV4!=null))then
call SetUnitOwner(GetTriggerUnit(),RV4,true)
call SetUnitOwner(h4[512+GetPlayerId(RT4)],RT4,false)
call SetUnitOwner(h4[512+GetPlayerId(RV4)],RV4,false)
if(not oo[GetPlayerId(RV4)])then
call AdjustPlayerStateBJ(250,RT4,PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(-250,RV4,PLAYER_STATE_RESOURCE_GOLD)
endif
call ExecuteFunc("UD")
set RV4=u6(RV4)
if(RV4!=null)then
if(not X4)then
call SetUnitOwner(h4[512+GetPlayerId(RT4)],RV4,false)
call SetUnitOwner(h4[512+GetPlayerId(RV4)],RT4,false)
endif
set s="Pick a hero for "+W[GetPlayerId(RV4)]+GetPlayerName(RV4)+"|r. Type "+HS7+"-px|r to cancel."
set p=RT4
else
call RemoveUnit(nc)
call RemoveUnit(Vc)
set nc=null
set Vc=null
set s="End of Picking"
set p=RT4
if not X4 then
call MP8(RT4)
endif
endif
elseif((GetOwningPlayer(GetTriggerUnit())==RU4)and(RW4!=null))then
call SetUnitOwner(GetTriggerUnit(),RW4,true)
call SetUnitOwner(h4[512+GetPlayerId(RU4)],RU4,false)
call SetUnitOwner(h4[512+GetPlayerId(RW4)],RW4,false)
if(not oo[GetPlayerId(RW4)])then
call AdjustPlayerStateBJ(250,RU4,PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(-250,RW4,PLAYER_STATE_RESOURCE_GOLD)
endif
call ExecuteFunc("UD")
set RW4=u6(RW4)
if(RW4!=null)then
if(not X4)then
call SetUnitOwner(h4[512+GetPlayerId(RU4)],RW4,false)
call SetUnitOwner(h4[512+GetPlayerId(RW4)],RU4,false)
endif
set s="Pick a hero for "+W[GetPlayerId(RW4)]+GetPlayerName(RW4)+"|r. Type "+HS7+"-px|r to cancel."
set p=RU4
else
call RemoveUnit(nc)
call RemoveUnit(Vc)
set nc=null
set Vc=null
set s="End of Picking"
set p=RU4
if not X4 then
call MP8(RU4)
endif
endif
endif
endif
set j8=GetOwningPlayer(AM7)
set JA9=j8
if T4==false then
call WV8(GetOwningPlayer(AM7))
endif
if(GetObjectName(('n0HH')))=="Language: English" and(MG4[(GetUnitPointValue(AM7))]!="")then
call DisplayTimedTextToPlayer(j8,0,0,4,"A |c006699CC-tips|r command is available if you would like some pointers for this hero")
endif
if QT[GetPlayerId(j8)]then
call WI8(j8,GetUnitPointValue(AM7))
endif
if M34==false and(Y7[GetPlayerId(G8[1])]!=null and Y7[GetPlayerId(G8[2])]!=null and Y7[GetPlayerId(G8[3])]!=null and Y7[GetPlayerId(G8[4])]!=null and Y7[GetPlayerId(G8[5])]!=null and Y7[GetPlayerId(N8[1])]!=null and Y7[GetPlayerId(N8[2])]!=null and Y7[GetPlayerId(N8[3])]!=null and Y7[GetPlayerId(N8[4])]!=null and Y7[GetPlayerId(N8[5])]!=null)then
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,7.,false)
call TriggerAddCondition(t,Condition(function J49))
set t=null
endif
set HA4[GetPlayerId(GetOwningPlayer((AM7)))]=false
call RegionAddRect(r,cE)
if T27 then
call RegionAddRect(r,U47)
endif
if Y9 and A9==false then
set eo[GetPlayerId(j8)]=true
set j8=ED8(StringHash("Global|ReverseMode"),(KW4[GetPlayerId((j8))]))
call SetUnitOwner(AM7,j8,true)
if(GetPlayerController(j8)==MAP_CONTROL_COMPUTER)and not T4 and not SC4 then
call SUnit(S44,"AIHSwap|U",AM7)
call ExecuteFunc("Uf")
endif
endif
if IsJWPlayer(GetOwningPlayer(AM7))then
if IsUnitInRegion(r,AM7)then
set x=GetRandomReal(GetRectMinX(QD),GetRectMaxX(QD))
set y=GetRandomReal(GetRectMinY(QD),GetRectMaxY(QD))
else
set x=GetUnitX(AM7)
set y=GetUnitY(AM7)
endif
else
if IsUnitInRegion(r,AM7)then
set x=GetRandomReal(GetRectMinX(PD),GetRectMaxX(PD))
set y=GetRandomReal(GetRectMinY(PD),GetRectMaxY(PD))
else
set x=GetUnitX(AM7)
set y=GetUnitY(AM7)
endif
endif
set Z9[GetPlayerId(j8)]=true
if(not Y9 or A9)then
if OL4==false and O14==false then
call PanCameraToTimedForPlayer(j8,x,y,0)
endif
if GetUnitTypeId(AM7)!='N0MM' then
call ClearSelectionForPlayer(j8)
endif
call SelectUnitAddForPlayer(AM7,j8)
endif
call SetUnitX(AM7,x)
call SetUnitY(AM7,y)
if GetUnitTypeId(AM7)!='N0MM' then
set Y7[GetPlayerId(j8)]=AM7
endif
call W58(j8,"9",GetUnitTypeId(AM7))
if Y9 and A9==false then
call MM8(JA9)
else
call MM8(j8)
endif
call SBool(GetHandleId(AM7),"EnteredAlready",true)
if not E9 and not SC4 then
set O[GetUnitPointValue(AM7)]=true
call MJ8(GetUnitTypeId(AM7))
endif
if T4 then
if IsJWPlayer(j8)then
set B7[0]=B7[0]+1
else
set B7[1]=B7[1]+1
endif
endif
if T4 or SC4 then
set Be[GetPlayerId(j8)]=Be[GetPlayerId(j8)]+1
if Be[GetPlayerId(GetOwningPlayer(AM7))]>1 and AM7!=D8[GetPlayerId(GetOwningPlayer(AM7))]then
call YV8(D8[GetPlayerId(GetOwningPlayer(AM7))])
call SetHeroXP(AM7,GetHeroXP(D8[GetPlayerId(GetOwningPlayer(AM7))]),false)
if GetPlayerController(GetOwningPlayer(AM7))==MAP_CONTROL_USER then
call DisableTrigger(GW4)
call UnitAddItem(AM7,UnitItemInSlot(D8[GetPlayerId(GetOwningPlayer(AM7))],0))
call UnitAddItem(AM7,UnitItemInSlot(D8[GetPlayerId(GetOwningPlayer(AM7))],1))
call UnitAddItem(AM7,UnitItemInSlot(D8[GetPlayerId(GetOwningPlayer(AM7))],2))
call UnitAddItem(AM7,UnitItemInSlot(D8[GetPlayerId(GetOwningPlayer(AM7))],3))
call UnitAddItem(AM7,UnitItemInSlot(D8[GetPlayerId(GetOwningPlayer(AM7))],4))
call UnitAddItem(AM7,UnitItemInSlot(D8[GetPlayerId(GetOwningPlayer(AM7))],5))
call EnableTrigger(GW4)
else
call JJ9(D8[GetPlayerId(GetOwningPlayer(AM7))])
endif
if YU8(D8[GetPlayerId(GetOwningPlayer(AM7))])then
call YY8(D8[GetPlayerId(GetOwningPlayer(AM7))])
else
call PA8(D8[GetPlayerId(GetOwningPlayer(AM7))])
endif
endif
endif
if j8!=G8[0]and j8!=N8[0]then
if Y9 then
if TimerGetElapsed(E4)>60 then
call I29(j8,(GetObjectName(('n02E')))+" "+GetUnitName(AM7))
elseif D7[GetPlayerId(JA9)]then
call I29(j8,JI9(AM7,JA9))
else
call SetPlayerState(JA9,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(JA9,PLAYER_STATE_RESOURCE_GOLD)+250)
call I29(j8,(GetObjectName(('n0D1')))+" "+GetUnitName(AM7)+" "+(GetObjectName(('n0D0')))+" "+(KW4[GetPlayerId((JA9))]))
endif
elseif HO4==false or j8==V8 then
if(B[GetPlayerId(GetOwningPlayer(AM7))]and HO4==false)then
call I29(j8,(GetObjectName(('n0D5')))+" "+GetUnitName(AM7)+".")
elseif((D7[GetPlayerId(j8)]and T4==false)or V4 or W4 or O9 or SC4)then
call I29(j8,(GetObjectName(('n0D3')))+" "+GetUnitName(AM7)+".")
else
call I29(j8,(GetObjectName(('n0D2')))+" "+GetUnitName(AM7)+".")
endif
endif
endif
if GV4 then
if Y9 then
call JE9(JA9)
else
call JE9(j8)
endif
endif
if(OL4 or O14)and GV4 then
call JE9(j8)
endif
call JH9(j8)
if(GetUnitTypeId(AM7)=='E005')then
call DisplayTimedTextToPlayer(j8,0,V9,60.," ")
call DisplayTimedTextToPlayer(j8,0,V9,60.,"|c00ff0303"+(GetObjectName(('n06H')))+(GetObjectName(('n0CB')))+" "+(GetObjectName(('n06E')))+"|r")
elseif GetUnitTypeId(AM7)=='O00J' or GetUnitTypeId(AM7)=='N016' or GetUnitTypeId(AM7)=='UC91' or GetUnitTypeId(AM7)=='EC45' then
call DisplayTimedTextToPlayer(j8,0,V9,10.," ")
call DisplayTimedTextToPlayer(j8,0,V9,10.,"|c00ff0303"+(GetObjectName(('n0G3')))+"|r")
endif
if(GetUnitTypeId(AM7)=='E01B')then
call DisplayTimedTextToPlayer(j8,0,V9,30.," ")
call DisplayTimedTextToPlayer(j8,0,V9,30.,"|c00ff0303"+(GetObjectName(('n06P')))+" "+(GetObjectName(('n06U')))+"|r")
endif
if(D7[GetPlayerId(j8)]==false)then
if(F9)then
call SetPlayerState(j8,PLAYER_STATE_RESOURCE_GOLD,175+GetPlayerState(j8,PLAYER_STATE_RESOURCE_GOLD))
endif
endif
set H04=AM7
call PP8("JC9",T07)
if LBool(StringHash("HeroInit:"+I2S(GetUnitPointValue(AM7))),"Initialized")==false then
call SBool(StringHash("HeroInit:"+I2S(GetUnitPointValue(AM7))),"Initialized",true)
call Y58(AM7)
endif
set H04=AM7
call ExecuteFunc("J39")
if ib[GetPlayerId(GetLocalPlayer())]==false then
if KR8(j8)then
call SetPlayerName(j8,KW4[GetPlayerId((j8))])
else
call SetPlayerName(j8,(KW4[GetPlayerId((j8))])+" ("+NC8(Y7[GetPlayerId(j8)])+")")
endif
endif
call DisplayTimedTextToPlayer(p,0,0,10.,s)
set p=null
call RemoveRegion(r)
set AM7=null
set JB9=null
endfunction
function J69 takes nothing returns boolean
return(IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)!=null)
endfunction
function JL9 takes nothing returns nothing
if((RA4!=null)and(IsTriggerEnabled(RA4)))then
if((GetOwningPlayer(GetSoldUnit())==RT4)and(RV4!=null))then
return
elseif((GetOwningPlayer(GetSoldUnit())==RU4)and(RW4!=null))then
return
endif
endif
call MM8(GetOwningPlayer(GetSoldUnit()))
endfunction
function J19 takes nothing returns boolean
local integer J09
local integer O5=1
loop
exitwhen O5>11
if O5==6 then
set O5=7
endif
set J09=0
if(IsPlayerInForce(Player(O5),RX4))then
set FF7[O5]=FF7[O5]+(I2R(AV4[48+O5])/ 8)
set J09=R2I(FF7[O5])
if J09<0 then
set J09=0
endif
set FF7[O5]=FF7[O5]-I2R(J09)
endif
if(F7)then
set J09=J09+2
else
set J09=J09+1
endif
call SetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD)+J09)
set O5=O5+1
endloop
return false
endfunction
function J59 takes nothing returns boolean
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and(LoadInteger(M24,(GetSpellAbilityId()),(GetUnitAbilityLevel(GetTriggerUnit(),GetSpellAbilityId()))))>0 then
call TimerStart(M_4[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))],(LoadInteger(M24,(GetSpellAbilityId()),(GetUnitAbilityLevel(GetTriggerUnit(),GetSpellAbilityId())))),false,null)
endif
if GetSpellAbilityId()=='A02W' then
call TimerStart(M_4[GetPlayerId((GetOwningPlayer(GetTriggerUnit())))],0,false,null)
endif
return false
endfunction
function J29 takes nothing returns nothing
local trigger t=CreateTrigger()
local integer i
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function J59))
set i=0
loop
exitwhen(i>13)
set M_4[i]=CreateTimer()
set i=i+1
endloop
set M24=InitHashtable()
call SaveInteger(M24,'A11K',1,60)
call SaveInteger(M24,'A11K',2,50)
call SaveInteger(M24,'A11K',3,40)
call SaveInteger(M24,'A0O2',1,80)
call SaveInteger(M24,'A0O2',2,75)
call SaveInteger(M24,'A0O2',3,70)
call SaveInteger(M24,'A289',1,45)
call SaveInteger(M24,'A289',2,45)
call SaveInteger(M24,'A289',3,45)
call SaveInteger(M24,'A0DH',1,150)
call SaveInteger(M24,'A0DH',2,130)
call SaveInteger(M24,'A0DH',3,'n')
call SaveInteger(M24,'A1OB',1,150)
call SaveInteger(M24,'A1OB',2,130)
call SaveInteger(M24,'A1OB',3,'n')
call SaveInteger(M24,'A0ER',1,150)
call SaveInteger(M24,'A0ER',2,150)
call SaveInteger(M24,'A0ER',3,150)
call SaveInteger(M24,'A2S8',1,150)
call SaveInteger(M24,'A2S8',2,150)
call SaveInteger(M24,'A2S8',3,150)
call SaveInteger(M24,'A0MQ',1,180)
call SaveInteger(M24,'A0MQ',2,160)
call SaveInteger(M24,'A0MQ',3,140)
call SaveInteger(M24,'A1B6',1,160)
call SaveInteger(M24,'A1B6',2,140)
call SaveInteger(M24,'A1B6',3,'x')
call SaveInteger(M24,'A1WH',1,80)
call SaveInteger(M24,'A1WH',2,80)
call SaveInteger(M24,'A1WH',3,80)
call SaveInteger(M24,'A1A1',1,'d')
call SaveInteger(M24,'A1A1',2,'d')
call SaveInteger(M24,'A1A1',3,'d')
call SaveInteger(M24,'A07Z',1,70)
call SaveInteger(M24,'A07Z',2,70)
call SaveInteger(M24,'A07Z',3,70)
call SaveInteger(M24,'ANcr',1,45)
call SaveInteger(M24,'ANcr',2,45)
call SaveInteger(M24,'ANcr',3,45)
call SaveInteger(M24,'A0Z8',1,70)
call SaveInteger(M24,'A0Z8',2,55)
call SaveInteger(M24,'A0Z8',3,40)
call SaveInteger(M24,'A1CV',1,12)
call SaveInteger(M24,'A1CV',2,12)
call SaveInteger(M24,'A1CV',3,12)
call SaveInteger(M24,'A03G',1,'s')
call SaveInteger(M24,'A03G',2,'s')
call SaveInteger(M24,'A03G',3,'s')
call SaveInteger(M24,'A29L',1,'x')
call SaveInteger(M24,'A29L',2,'n')
call SaveInteger(M24,'A29L',3,'d')
call SaveInteger(M24,'A0QR',1,45)
call SaveInteger(M24,'A0QR',2,30)
call SaveInteger(M24,'A0QR',3,15)
call SaveInteger(M24,'A1B3',1,4)
call SaveInteger(M24,'A1B3',2,4)
call SaveInteger(M24,'A1B3',3,4)
call SaveInteger(M24,'A06R',1,140)
call SaveInteger(M24,'A06R',2,'x')
call SaveInteger(M24,'A06R',3,'d')
call SaveInteger(M24,'A1B4',1,'x')
call SaveInteger(M24,'A1B4',2,'d')
call SaveInteger(M24,'A1B4',3,80)
call SaveInteger(M24,'A0G4',1,75)
call SaveInteger(M24,'A0G4',2,75)
call SaveInteger(M24,'A0G4',3,75)
call SaveInteger(M24,'A1D8',1,20)
call SaveInteger(M24,'A1D8',2,20)
call SaveInteger(M24,'A1D8',3,20)
call SaveInteger(M24,'A29I',1,150)
call SaveInteger(M24,'A29I',2,150)
call SaveInteger(M24,'A29I',3,150)
call SaveInteger(M24,'A0E2',1,75)
call SaveInteger(M24,'A0E2',2,65)
call SaveInteger(M24,'A0E2',3,55)
call SaveInteger(M24,'A1MR',1,6)
call SaveInteger(M24,'A1MR',2,6)
call SaveInteger(M24,'A1MR',3,6)
call SaveInteger(M24,'A03O',1,140)
call SaveInteger(M24,'A03O',2,140)
call SaveInteger(M24,'A03O',3,140)
call SaveInteger(M24,'A0MU',1,'n')
call SaveInteger(M24,'A0MU',2,'n')
call SaveInteger(M24,'A0MU',3,'n')
call SaveInteger(M24,'A0A2',1,'n')
call SaveInteger(M24,'A0A2',2,'n')
call SaveInteger(M24,'A0A2',3,'n')
call SaveInteger(M24,'A0SW',1,'d')
call SaveInteger(M24,'A0SW',2,'d')
call SaveInteger(M24,'A0SW',3,'d')
call SaveInteger(M24,'A093',1,'d')
call SaveInteger(M24,'A093',2,70)
call SaveInteger(M24,'A093',3,40)
call SaveInteger(M24,'A03K',1,180)
call SaveInteger(M24,'A03K',2,150)
call SaveInteger(M24,'A03K',3,'x')
call SaveInteger(M24,'A1B0',1,180)
call SaveInteger(M24,'A1B0',2,150)
call SaveInteger(M24,'A1B0',3,'x')
call SaveInteger(M24,'A0R0',1,130)
call SaveInteger(M24,'A0R0',2,130)
call SaveInteger(M24,'A0R0',3,130)
call SaveInteger(M24,'A0FL',1,30)
call SaveInteger(M24,'A0FL',2,30)
call SaveInteger(M24,'A0FL',3,30)
call SaveInteger(M24,'A1CX',1,30)
call SaveInteger(M24,'A1CX',2,30)
call SaveInteger(M24,'A1CX',3,30)
call SaveInteger(M24,'A034',1,10)
call SaveInteger(M24,'A034',2,10)
call SaveInteger(M24,'A034',3,10)
call SaveInteger(M24,'A15J',1,75)
call SaveInteger(M24,'A15J',2,75)
call SaveInteger(M24,'A15J',3,75)
call SaveInteger(M24,'A0E3',1,70)
call SaveInteger(M24,'A0E3',2,70)
call SaveInteger(M24,'A0E3',3,70)
call SaveInteger(M24,'A04P',1,20)
call SaveInteger(M24,'A04P',2,15)
call SaveInteger(M24,'A04P',3,10)
call SaveInteger(M24,'A0M1',1,130)
call SaveInteger(M24,'A0M1',2,'x')
call SaveInteger(M24,'A0M1',3,'n')
call SaveInteger(M24,'A1AX',1,70)
call SaveInteger(M24,'A1AX',2,70)
call SaveInteger(M24,'A1AX',3,70)
call SaveInteger(M24,'A054',1,160)
call SaveInteger(M24,'A054',2,150)
call SaveInteger(M24,'A054',3,140)
call SaveInteger(M24,'A00U',1,160)
call SaveInteger(M24,'A00U',2,150)
call SaveInteger(M24,'A00U',3,140)
call SaveInteger(M24,'A0G8',1,80)
call SaveInteger(M24,'A0G8',2,80)
call SaveInteger(M24,'A0G8',3,80)
call SaveInteger(M24,'A07U',1,180)
call SaveInteger(M24,'A07U',2,'x')
call SaveInteger(M24,'A07U',3,60)
call SaveInteger(M24,'A0KU',1,140)
call SaveInteger(M24,'A0KU',2,'x')
call SaveInteger(M24,'A0KU',3,'d')
call SaveInteger(M24,'A1EJ',1,30)
call SaveInteger(M24,'A1EJ',2,30)
call SaveInteger(M24,'A1EJ',3,30)
call SaveInteger(M24,'A0B4',1,10)
call SaveInteger(M24,'A0B4',2,7)
call SaveInteger(M24,'A0B4',3,5)
call SaveInteger(M24,'A0IN',1,25)
call SaveInteger(M24,'A0IN',2,25)
call SaveInteger(M24,'A0IN',3,25)
call SaveInteger(M24,'A0J1',1,'x')
call SaveInteger(M24,'A0J1',2,'n')
call SaveInteger(M24,'A0J1',3,'d')
call SaveInteger(M24,'A1D7',1,60)
call SaveInteger(M24,'A1D7',2,60)
call SaveInteger(M24,'A1D7',3,60)
call SaveInteger(M24,'A1MI',1,45)
call SaveInteger(M24,'A1MI',2,45)
call SaveInteger(M24,'A1MI',3,45)
call SaveInteger(M24,'A2QE',1,45)
call SaveInteger(M24,'A2QE',2,45)
call SaveInteger(M24,'A2QE',3,45)
call SaveInteger(M24,'A1AO',1,80)
call SaveInteger(M24,'A1AO',2,70)
call SaveInteger(M24,'A1AO',3,60)
call SaveInteger(M24,'A1UV',1,80)
call SaveInteger(M24,'A1UV',2,70)
call SaveInteger(M24,'A1UV',3,60)
call SaveInteger(M24,'A1NE',1,180)
call SaveInteger(M24,'A1NE',2,160)
call SaveInteger(M24,'A1NE',3,140)
call SaveInteger(M24,('A2IG'),(1),(180))
call SaveInteger(M24,('A2IG'),(2),(160))
call SaveInteger(M24,('A2IG'),(3),(140))
call SaveInteger(M24,('A1AT'),(1),(140))
call SaveInteger(M24,('A1AT'),(2),('d'))
call SaveInteger(M24,('A1AT'),(3),(60))
call SaveInteger(M24,'A0RP',1,11)
call SaveInteger(M24,'A0RP',2,9)
call SaveInteger(M24,'A0RP',3,7)
call SaveInteger(M24,'A0LC',1,25)
call SaveInteger(M24,'A0LC',2,25)
call SaveInteger(M24,'A0LC',3,25)
call SaveInteger(M24,'A0IN',1,45)
call SaveInteger(M24,'A0IN',2,45)
call SaveInteger(M24,'A0IN',3,45)
call SaveInteger(M24,'A1AW',1,10)
call SaveInteger(M24,'A1AW',2,10)
call SaveInteger(M24,'A1AW',3,10)
call SaveInteger(M24,'A0LH',1,70)
call SaveInteger(M24,'A0LH',2,60)
call SaveInteger(M24,'A0LH',3,50)
call SaveInteger(M24,'A04Q',1,45)
call SaveInteger(M24,'A04Q',2,45)
call SaveInteger(M24,'A04Q',3,45)
call SaveInteger(M24,'A0WQ',1,45)
call SaveInteger(M24,'A0WQ',2,45)
call SaveInteger(M24,'A0WQ',3,45)
call SaveInteger(M24,'A09U',1,70)
call SaveInteger(M24,'A09U',2,60)
call SaveInteger(M24,'A09U',3,50)
call SaveInteger(M24,'A0CT',1,60)
call SaveInteger(M24,'A0CT',2,50)
call SaveInteger(M24,'A0CT',3,40)
call SaveInteger(M24,'A29J',1,'x')
call SaveInteger(M24,'A29J',2,'n')
call SaveInteger(M24,'A29J',3,'d')
call SaveInteger(M24,'A07Q',1,120)
call SaveInteger(M24,'A07Q',2,80)
call SaveInteger(M24,'A07Q',3,40)
call SaveInteger(M24,'A0H9',1,'x')
call SaveInteger(M24,'A0H9',2,'x')
call SaveInteger(M24,'A0H9',3,'x')
call SaveInteger(M24,'A013',1,140)
call SaveInteger(M24,'A013',2,'x')
call SaveInteger(M24,'A013',3,'d')
call SaveInteger(M24,'A0A6',1,140)
call SaveInteger(M24,'A0A6',2,'x')
call SaveInteger(M24,'A0A6',3,60)
call SaveInteger(M24,'A080',1,80)
call SaveInteger(M24,'A080',2,50)
call SaveInteger(M24,'A080',3,30)
call SaveInteger(M24,'A1UZ',1,12)
call SaveInteger(M24,'A1UZ',2,12)
call SaveInteger(M24,'A1UZ',3,12)
call SaveInteger(M24,'A03R',1,150)
call SaveInteger(M24,'A03R',2,'x')
call SaveInteger(M24,'A03R',3,90)
call SaveInteger(M24,'A0AV',1,150)
call SaveInteger(M24,'A0AV',2,'x')
call SaveInteger(M24,'A0AV',3,90)
call SaveInteger(M24,'A0S8',1,85)
call SaveInteger(M24,'A0S8',2,85)
call SaveInteger(M24,'A0S8',3,85)
call SaveInteger(M24,'A1QP',1,85)
call SaveInteger(M24,'A1QP',2,85)
call SaveInteger(M24,'A1QP',3,85)
call SaveInteger(M24,'A0LT',1,140)
call SaveInteger(M24,'A0LT',2,130)
call SaveInteger(M24,'A0LT',3,'x')
call SaveInteger(M24,'A1CS',1,30)
call SaveInteger(M24,'A1CS',2,30)
call SaveInteger(M24,'A1CS',3,30)
call SaveInteger(M24,'A11T',1,80)
call SaveInteger(M24,'A11T',2,70)
call SaveInteger(M24,'A11T',3,60)
call SaveInteger(M24,'A1W8',1,90)
call SaveInteger(M24,'A1W8',2,75)
call SaveInteger(M24,'A1W8',3,60)
call SaveInteger(M24,'A1W9',1,90)
call SaveInteger(M24,'A1W9',2,75)
call SaveInteger(M24,'A1W9',3,60)
call SaveInteger(M24,'A29G',1,90)
call SaveInteger(M24,'A29G',2,90)
call SaveInteger(M24,'A29G',3,90)
call SaveInteger(M24,'A29H',1,90)
call SaveInteger(M24,'A29H',2,90)
call SaveInteger(M24,'A29H',3,90)
call SaveInteger(M24,'A0L3',1,140)
call SaveInteger(M24,'A0L3',2,140)
call SaveInteger(M24,'A0L3',3,140)
call SaveInteger(M24,'A2QC',1,140)
call SaveInteger(M24,'A2QC',2,140)
call SaveInteger(M24,'A2QC',3,140)
call SaveInteger(M24,'A01P',1,70)
call SaveInteger(M24,'A01P',2,60)
call SaveInteger(M24,'A01P',3,50)
call SaveInteger(M24,'A09Z',1,70)
call SaveInteger(M24,'A09Z',2,60)
call SaveInteger(M24,'A09Z',3,50)
call SaveInteger(M24,'A12P',1,60)
call SaveInteger(M24,'A12P',2,60)
call SaveInteger(M24,'A12P',3,60)
call SaveInteger(M24,'A1D6',1,15)
call SaveInteger(M24,'A1D6',2,15)
call SaveInteger(M24,'A1D6',3,15)
call SaveInteger(M24,'A19O',1,90)
call SaveInteger(M24,'A19O',2,70)
call SaveInteger(M24,'A19O',3,50)
call SaveInteger(M24,'A0AK',1,10)
call SaveInteger(M24,'A0AK',2,10)
call SaveInteger(M24,'A0AK',3,10)
call SaveInteger(M24,'A1FY',1,10)
call SaveInteger(M24,'A1FY',2,10)
call SaveInteger(M24,'A1FY',3,10)
call SaveInteger(M24,'A21Y',1,22)
call SaveInteger(M24,'A21Y',2,17)
call SaveInteger(M24,'A21Y',3,12)
call SaveInteger(M24,'A21Y',4,5)
call SaveInteger(M24,'A1GU',1,16)
call SaveInteger(M24,'A1GU',2,8)
call SaveInteger(M24,'A1GU',3,4)
call SaveInteger(M24,'A1GU',4,2)
call SaveInteger(M24,'A07K',1,6)
call SaveInteger(M24,'A07K',2,6)
call SaveInteger(M24,'A07K',3,6)
call SaveInteger(M24,'A10Q',1,40)
call SaveInteger(M24,'A10Q',2,40)
call SaveInteger(M24,'A10Q',3,40)
call SaveInteger(M24,'A1DB',1,40)
call SaveInteger(M24,'A1DB',2,40)
call SaveInteger(M24,'A1DB',3,40)
call SaveInteger(M24,'A00H',1,'n')
call SaveInteger(M24,'A00H',2,'n')
call SaveInteger(M24,'A00H',3,'n')
call SaveInteger(M24,'A0A1',1,'n')
call SaveInteger(M24,'A0A1',2,'n')
call SaveInteger(M24,'A0A1',3,'n')
call SaveInteger(M24,'A0O5',1,60)
call SaveInteger(M24,'A0O5',2,60)
call SaveInteger(M24,'A0O5',3,60)
call SaveInteger(M24,'A1B1',1,60)
call SaveInteger(M24,'A1B1',2,60)
call SaveInteger(M24,'A1B1',3,60)
call SaveInteger(M24,'A0NT',1,80)
call SaveInteger(M24,'A0NT',2,80)
call SaveInteger(M24,'A0NT',3,80)
call SaveInteger(M24,'A0NX',1,80)
call SaveInteger(M24,'A0NX',2,80)
call SaveInteger(M24,'A0NX',3,80)
call SaveInteger(M24,'A02Q',1,'d')
call SaveInteger(M24,'A02Q',2,'d')
call SaveInteger(M24,'A02Q',3,'d')
call SaveInteger(M24,'A1D9',1,'d')
call SaveInteger(M24,'A1D9',2,'d')
call SaveInteger(M24,'A1D9',3,'d')
call SaveInteger(M24,'A0QK',1,'d')
call SaveInteger(M24,'A0QK',2,'d')
call SaveInteger(M24,'A0QK',3,'d')
call SaveInteger(M24,'A073',1,'d')
call SaveInteger(M24,'A073',2,'d')
call SaveInteger(M24,'A073',3,'d')
call SaveInteger(M24,'A03J',1,'d')
call SaveInteger(M24,'A03J',2,'d')
call SaveInteger(M24,'A03J',3,'d')
call SaveInteger(M24,'A04J',1,'d')
call SaveInteger(M24,'A04J',2,'d')
call SaveInteger(M24,'A04J',3,'d')
call SaveInteger(M24,'A04M',1,'d')
call SaveInteger(M24,'A04M',2,'d')
call SaveInteger(M24,'A04M',3,'d')
call SaveInteger(M24,'A04N',1,'d')
call SaveInteger(M24,'A04N',2,'d')
call SaveInteger(M24,'A04N',3,'d')
call SaveInteger(M24,'A095',1,160)
call SaveInteger(M24,'A095',2,'d')
call SaveInteger(M24,'A095',3,40)
call SaveInteger(M24,'A09W',1,'d')
call SaveInteger(M24,'A09W',2,60)
call SaveInteger(M24,'A09W',3,20)
call SaveInteger(M24,'A1BX',1,200)
call SaveInteger(M24,'A1BX',2,190)
call SaveInteger(M24,'A1BX',3,180)
call SaveInteger(M24,'A05T',1,145)
call SaveInteger(M24,'A05T',2,'s')
call SaveInteger(M24,'A05T',3,60)
call SaveInteger(M24,'A08H',1,145)
call SaveInteger(M24,'A08H',2,'s')
call SaveInteger(M24,'A08H',3,60)
call SaveInteger(M24,'A067',1,'d')
call SaveInteger(M24,'A067',2,85)
call SaveInteger(M24,'A067',3,70)
call SaveInteger(M24,'A08P',1,70)
call SaveInteger(M24,'A08P',2,70)
call SaveInteger(M24,'A08P',3,70)
call SaveInteger(M24,'A0CC',1,22)
call SaveInteger(M24,'A0CC',2,22)
call SaveInteger(M24,'A0CC',3,22)
call SaveInteger(M24,'A0OK',1,160)
call SaveInteger(M24,'A0OK',2,160)
call SaveInteger(M24,'A0OK',3,160)
call SaveInteger(M24,'A1VW',1,160)
call SaveInteger(M24,'A1VW',2,160)
call SaveInteger(M24,'A1VW',3,160)
call SaveInteger(M24,'A28R',1,135)
call SaveInteger(M24,'A28R',2,135)
call SaveInteger(M24,'A28R',3,135)
call SaveInteger(M24,'A28S',1,'d')
call SaveInteger(M24,'A28S',2,70)
call SaveInteger(M24,'A28S',3,40)
call SaveInteger(M24,'S008',1,165)
call SaveInteger(M24,'S008',2,165)
call SaveInteger(M24,'S008',3,165)
call SaveInteger(M24,('S00U'),(1),(165))
call SaveInteger(M24,('S00U'),(2),(165))
call SaveInteger(M24,('S00U'),(3),(165))
call SaveInteger(M24,('A1TB'),(1),(90))
call SaveInteger(M24,('A1TB'),(2),(75))
call SaveInteger(M24,('A1TB'),(3),(60))
call SaveInteger(M24,('A1U6'),(1),(85))
call SaveInteger(M24,('A1U6'),(2),(85))
call SaveInteger(M24,('A1U6'),(3),(85))
call SaveInteger(M24,('A1T5'),(1),(55))
call SaveInteger(M24,('A1T5'),(2),(50))
call SaveInteger(M24,('A1T5'),(3),(45))
call SaveInteger(M24,('A235'),(1),(55))
call SaveInteger(M24,('A235'),(2),(50))
call SaveInteger(M24,('A235'),(3),(45))
call SaveInteger(M24,('A1SA'),(1),(50))
call SaveInteger(M24,('A1SA'),(2),(50))
call SaveInteger(M24,('A1SA'),(3),(50))
call SaveInteger(M24,('AZ3A'),(1),(1))
call SaveInteger(M24,('AZ3A'),(2),(1))
call SaveInteger(M24,('AZ3A'),(3),(1))
call SaveInteger(M24,('A1RK'),(1),('n'))
call SaveInteger(M24,('A1RK'),(2),('n'))
call SaveInteger(M24,('A1RK'),(3),('n'))
call SaveInteger(M24,('A1YQ'),(1),(30))
call SaveInteger(M24,('A1YQ'),(2),(24))
call SaveInteger(M24,('A1YQ'),(3),(18))
call SaveInteger(M24,('A27H'),(1),(20))
call SaveInteger(M24,('A27H'),(2),(18))
call SaveInteger(M24,('A27H'),(3),(16))
call SaveInteger(M24,('AZ1H'),(1),(5))
call SaveInteger(M24,('AZ1H'),(2),(5))
call SaveInteger(M24,('AZ1H'),(3),(5))
call SaveInteger(M24,('A2BG'),(1),(60))
call SaveInteger(M24,('A2BG'),(2),(40))
call SaveInteger(M24,('A2BG'),(3),(20))
call SaveInteger(M24,('A2CI'),(1),(50))
call SaveInteger(M24,('A2CI'),(2),(50))
call SaveInteger(M24,('A2CI'),(3),(50))
call SaveInteger(M24,('A2E5'),(1),(8))
call SaveInteger(M24,('A2E5'),(2),(8))
call SaveInteger(M24,('A2E5'),(3),(8))
call SaveInteger(M24,('A2M0'),(1),(65))
call SaveInteger(M24,('A2M0'),(2),(60))
call SaveInteger(M24,('A2M0'),(3),(55))
call SaveInteger(M24,('A0Z0'),(1),(90))
call SaveInteger(M24,('A0Z0'),(2),(80))
call SaveInteger(M24,('A0Z0'),(3),(70))
call SaveInteger(M24,('A2O6'),(1),(90))
call SaveInteger(M24,('A2O6'),(2),(75))
call SaveInteger(M24,('A2O6'),(3),(60))
call SaveInteger(M24,('A2TI'),(1),(80))
call SaveInteger(M24,('A2TI'),(2),(80))
call SaveInteger(M24,('A2TI'),(3),(80))
call SaveInteger(M24,('A2TF'),(1),(20))
call SaveInteger(M24,('A2TF'),(2),(20))
call SaveInteger(M24,('A2TF'),(3),(20))
set t=null
endfunction
function J_9 takes nothing returns boolean
local player p
local integer i
local integer id
local integer K49
set i=1
loop
exitwhen i>5
set p=G8[i]
set id=GetPlayerId(p)
set K49=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)
if K49<WQ4[id]then
set WQ4[id]=K49
endif
set p=N8[i]
set id=GetPlayerId(p)
set K49=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)
if K49<WQ4[id]then
set WQ4[id]=K49
endif
set i=i+1
endloop
return false
endfunction
function K79 takes nothing returns nothing
endfunction
function K89 takes nothing returns nothing
local integer id=GetUnitTypeId(GetTriggerUnit())
if GetOwningPlayer(GetTriggerUnit())==O8 then
set MU[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=MU[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
elseif(id=='ugho')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
elseif(id=='unec')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
elseif(id=='esen')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
elseif(id=='edry')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
elseif(id=='u001')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
elseif(id=='u002')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
elseif(id=='e00V')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
elseif(id=='e00W')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
elseif(id=='ebal')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
elseif(id=='e026')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
elseif(id=='umtw')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
elseif(id=='u00R')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=L7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=C7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
call K79()
endfunction
function K99 takes integer i returns nothing
local integer x=1
local integer y=1
set NI4[i]=null
set NJ4[i]=0
set NK4[i]=false
loop
exitwhen y>NM4
if NJ4[y]!=0 then
set qu[x]=NI4[y]
set Qu[x]=NJ4[y]
set Su[x]=NK4[y]
set NI4[y]=null
set NJ4[y]=0
set NK4[y]=false
set x=x+1
endif
set y=y+1
endloop
set NM4=x-1
set x=1
loop
exitwhen x>NM4
set NI4[x]=qu[x]
set NJ4[x]=Qu[x]
set NK4[x]=Su[x]
set x=x+1
endloop
endfunction
function KD9 takes nothing returns nothing
local integer T8
local integer U8
local integer KE9
local integer KF9
local integer i
local player p
set xY=xY+1
set HM4=0
set HN4=0
set i=0
loop
exitwhen i>5
set p=G8[i]
if M8(p)then
set HM4=HM4+1
endif
set p=N8[i]
if M8(p)then
set HN4=HN4+1
endif
set i=i+1
endloop
if a2==false then
set ae=HM4
set ne=HN4
endif
set T8=1
set U8=5
set KE9=1
loop
exitwhen T8>U8
set p=G8[T8]
if M8(p)then
set Z7[KE9]=p
set KE9=KE9+1
endif
set T8=T8+1
endloop
set T8=1
set U8=5
set KE9=1
loop
exitwhen T8>U8
set p=N8[T8]
if M8(p)then
set A7[KE9]=p
set KE9=KE9+1
endif
set T8=T8+1
endloop
if xY==1 then
set A4=CreateMultiboardBJ(7+6+2,3+HN4+HM4," ")
call MultiboardMinimize(A4,true)
endif
call l6(A4,2,1,"CD")
call l6(A4,3,1,"|c00838B8BL|r")
call l6(A4,4,1,Dj+"K|r")
call l6(A4,5,1,gj+"D|r")
call l6(A4,6,1,Gj+"A|r")
call l6(A4,1,2,GetObjectName('n0DK'))
call l6(A4,4,2,Dj+"0|r")
call l6(A4,5,2,gj+"0|r")
call l6(A4,1,3+HM4,GetObjectName('n0DO'))
call l6(A4,4,3+HM4,Dj+"0|r")
call l6(A4,5,3+HM4,gj+"0|r")
call U6(A4,1,2,(MX8(SubString(W[GetPlayerId((G8[0]))],4,6)))/ 255.*'d',(MX8(SubString(W[GetPlayerId((G8[0]))],6,8)))/ 255.*'d',(MX8(SubString(W[GetPlayerId((G8[0]))],8,10)))/ 255.*'d',0)
call U6(A4,1,3+HM4,(MX8(SubString(W[GetPlayerId((N8[0]))],4,6)))/ 255.*'d',(MX8(SubString(W[GetPlayerId((N8[0]))],6,8)))/ 255.*'d',(MX8(SubString(W[GetPlayerId((N8[0]))],8,10)))/ 255.*'d',0)
set T8=1
set U8=3+HN4+HM4
loop
exitwhen T8>U8
call x7(A4,1,T8,10.8)
call x7(A4,2,T8,2)
call x7(A4,3,T8,2)
call x7(A4,4,T8,1.3)
call x7(A4,5,T8,1.3)
call x7(A4,6,T8,1.3)
call x7(A4,7,T8,2.5)
call x7(A4,8,T8,.01)
call x7(A4,9,T8,.01)
call x7(A4,10,T8,.01)
call x7(A4,11,T8,.01)
call x7(A4,12,T8,.01)
call x7(A4,13,T8,.01)
call x7(A4,14,T8,.01)
call x7(A4,15,T8,.01)
set T8=T8+1
endloop
set T8=1
set U8=7+6+2
loop
exitwhen T8>U8
set KE9=1
set KF9=3+HN4+HM4
loop
exitwhen KE9>KF9
call s6(A4,T8,KE9,true,false)
set KE9=KE9+1
endloop
set T8=T8+1
endloop
set T8=1
set U8=HM4
loop
exitwhen T8>U8
call s6(A4,1,T8+2,true,true)
call U6(A4,7,T8+2,255,204,0,0)
set N44[GetPlayerId(Z7[T8])]=1-1
set N74[GetPlayerId(Z7[T8])]=T8+2-1
call l6(A4,1,T8+2,(KW4[GetPlayerId((Z7[T8]))]))
if KS8(Z7[T8])then
call U6(A4,1,T8+2,(MX8(SubString(W[GetPlayerId((Z7[T8]))],4,6)))/ 255.*'d',(MX8(SubString(W[GetPlayerId((Z7[T8]))],6,8)))/ 255.*'d',(MX8(SubString(W[GetPlayerId((Z7[T8]))],8,10)))/ 255.*'d',0)
call U6(A4,2,T8+2,(MX8(SubString(W[GetPlayerId((Z7[T8]))],4,6)))/ 255.*'d',(MX8(SubString(W[GetPlayerId((Z7[T8]))],6,8)))/ 255.*'d',(MX8(SubString(W[GetPlayerId((Z7[T8]))],8,10)))/ 255.*'d',0)
else
call l6(A4,1,T8+2,"|c00333333"+(KW4[GetPlayerId((Z7[T8]))])+"|r")
endif
call l6(A4,4,(T8+2),Dj+"0|r")
call l6(A4,5,(T8+2),gj+"0|r")
call l6(A4,6,(T8+2),Gj+"0|r")
set T8=T8+1
endloop
set T8=1
set U8=HN4
loop
exitwhen T8>U8
call s6(A4,1,T8+3+HM4,true,true)
call U6(A4,7,T8+3+HM4,255,204,0,0)
set N44[GetPlayerId(A7[T8])]=1-1
set N74[GetPlayerId(A7[T8])]=T8+3+HM4-1
call l6(A4,1,T8+3+HM4,(KW4[GetPlayerId((A7[T8]))]))
if KS8(A7[T8])then
call U6(A4,1,T8+3+HM4,(MX8(SubString(W[GetPlayerId((A7[T8]))],4,6)))/ 255.*'d',(MX8(SubString(W[GetPlayerId((A7[T8]))],6,8)))/ 255.*'d',(MX8(SubString(W[GetPlayerId((A7[T8]))],8,10)))/ 255.*'d',0)
call U6(A4,2,T8+3+HM4,(MX8(SubString(W[GetPlayerId((A7[T8]))],4,6)))/ 255.*'d',(MX8(SubString(W[GetPlayerId((A7[T8]))],6,8)))/ 255.*'d',(MX8(SubString(W[GetPlayerId((A7[T8]))],8,10)))/ 255.*'d',0)
else
call l6(A4,1,T8+3+HM4,"|c00333333"+(KW4[GetPlayerId((A7[T8]))])+"|r")
endif
call l6(A4,4,(T8+3+HM4),Dj+"0|r")
call l6(A4,5,(T8+3+HM4),gj+"0|r")
call l6(A4,6,(T8+3+HM4),Gj+"0|r")
set T8=T8+1
endloop
set oY=1
set rY=3+HN4+HM4-2
if L8 and(GetLocalPlayer()==KU4 or GetLocalPlayer()==KV4)and xY==1 then
call MultiboardDisplay(A4,false)
endif
call s6(A4,7,1,false,true)
call P6(A4,7,1,"UI\\Feedback\\Resources\\ResourceGold.blp")
call K79()
if xY>1 then
call TriggerExecute(vA)
endif
endfunction
function KG9 takes integer O5,boolean KH9 returns string
if D then
endif
if not IsPlayerInForce(Player(O5),RX4)then
return" "
elseif Y7[O5]==null then
return HT7+GetObjectName('Y105')
elseif not Z_7(Y7[O5])then
return HT7+GetObjectName('Y106')
elseif Bz<RD4-25. then
return HT7+GetObjectName('Y107')
elseif Bz<RD4 then
return GetObjectName('Y108')
elseif eY[O5]==1 then
if A87(Y7[O5])then
return GetObjectName('Y109')
elseif G0[48+O5]then
return GetObjectName('Y110')
elseif h4[O5]!=null then
if KH9 then
return GetObjectName('Y122')+W[GetPlayerId(GetOwningPlayer(h4[O5]))]+N38(h4[O5])+"|r"
else
return GetObjectName('Y121')+W[GetPlayerId(GetOwningPlayer(h4[O5]))]+N38(h4[O5])+"|r"
endif
elseif h9[64+O5]!=null then
return GetObjectName('Y111')+YR7(eY[80+O5],false)
elseif eY[80+O5]<=2 then
return GetObjectName('Y112')+YR7(eY[80+O5],false)
else
return GetObjectName('Y112')
endif
elseif eY[O5]==2 then
return GetObjectName('Y113')
elseif eY[O5]==3 then
return GetObjectName('Y114')+YR7(GM7[64+O5],true)
elseif eY[O5]==4 then
return GetObjectName('Y115')+YR7(GM7[64+O5],true)
elseif eY[O5]==9 then
if eY[272+O5]==0 then
return GetObjectName('Y116')
elseif h8[96+O5]!=null then
set bj_forLoopAIndex=GetPlayerId(GetOwningPlayer(h8[96+O5]))
return GetObjectName('Y117')+W[bj_forLoopAIndex]+I2S(bj_forLoopAIndex)+"|r"
else
return GetObjectName('Y011')+YR7(eY[288+O5],false)
endif
elseif eY[O5]==10 then
return GetObjectName('Y118')
elseif eY[O5]==11 then
if KH9 then
return GetObjectName('Y119')
else
return GetObjectName('Y120')
endif
endif
return" "
endfunction
function KI9 takes nothing returns nothing
local integer T8
local integer U8
local string KJ9
call l6(A4,4,2,Dj+I2S(C[GetPlayerId(G8[0])])+"|r")
call l6(A4,5,2,gj+I2S(D4[GetPlayerId(G8[0])])+"|r")
call l6(A4,4,3+HM4,Dj+I2S(C[GetPlayerId(N8[0])])+"|r")
call l6(A4,5,3+HM4,gj+I2S(D4[GetPlayerId(N8[0])])+"|r")
set T8=1
set U8=HM4
loop
exitwhen T8>U8
call l6(A4,4,(T8+2),Dj+I2S(C[GetPlayerId(Z7[T8])])+"|r")
call l6(A4,5,(T8+2),gj+I2S(D4[GetPlayerId(Z7[T8])])+"|r")
call l6(A4,6,(T8+2),Gj+I2S(IU[GetPlayerId(Z7[T8])])+"|r")
set KJ9=KG9(GetPlayerId(Z7[T8]),false)
if Z7[T8]==RT4 and(not D)then
set KJ9=HV7
endif
if(not E57[32+GetPlayerId(GetLocalPlayer())])then
set KJ9=" "
elseif(not(IsPlayerAlly(GetLocalPlayer(),G8[0])or D))then
set KJ9=" "
endif
call l6(A4,15,T8+2,KJ9)
set KJ9=" "
if E57[80+GetPlayerId(GetLocalPlayer())]and KR8(Z7[T8])then
if EU then
set KJ9=FG7+"+"+I2S(R2I(GetPlayerHandicapXPBJ(Z7[T8])-100.))+"%|r"
endif
if EU and FU then
set KJ9=KJ9+" - "
endif
if FU then
set KJ9=KJ9+FH7+"+"+I2S(AV4[48+GetPlayerId(Z7[T8])])+"|r"
endif
endif
call l6(A4,14,(T8+2),KJ9)
set T8=T8+1
endloop
set T8=1
set U8=HN4
loop
exitwhen T8>U8
call l6(A4,4,(T8+3+HM4),Dj+I2S(C[GetPlayerId(A7[T8])])+"|r")
call l6(A4,5,(T8+3+HM4),gj+I2S(D4[GetPlayerId(A7[T8])])+"|r")
call l6(A4,6,(T8+3+HM4),Gj+I2S(IU[GetPlayerId(A7[T8])])+"|r")
set KJ9=KG9(GetPlayerId(A7[T8]),false)
if A7[T8]==RU4 and(not D)then
set KJ9=HV7
endif
if(not E57[32+GetPlayerId(GetLocalPlayer())])then
set KJ9=" "
elseif(not(IsPlayerAlly(GetLocalPlayer(),N8[0])or D))then
set KJ9=" "
endif
call l6(A4,15,(T8+3+HM4),KJ9)
set KJ9=" "
if E57[80+GetPlayerId(GetLocalPlayer())]and KR8(A7[T8])then
if EU then
set KJ9=FG7+"+"+I2S(R2I(GetPlayerHandicapXPBJ(A7[T8])-100.))+"%|r"
endif
if EU and FU then
set KJ9=KJ9+" - "
endif
if FU then
set KJ9=KJ9+FH7+"+"+I2S(AV4[48+GetPlayerId(A7[T8])])+"|r"
endif
endif
call l6(A4,14,(T8+3+HM4),KJ9)
set T8=T8+1
endloop
endfunction
function KK9 takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='e00R')or(GetUnitTypeId(GetTriggerUnit())=='e011')or(GetUnitTypeId(GetTriggerUnit())=='e00S')or(GetUnitTypeId(GetTriggerUnit())=='e019')
endfunction
function KM9 takes nothing returns nothing
set F[1]=(F[1]+1)
endfunction
function KN9 takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='u00M')or(GetUnitTypeId(GetTriggerUnit())=='u00D')or(GetUnitTypeId(GetTriggerUnit())=='u00N')or(GetUnitTypeId(GetTriggerUnit())=='u00T')
endfunction
function KO9 takes nothing returns nothing
set F[2]=(F[2]+1)
endfunction
function KP9 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 KQ9 takes player KR9,integer KS9 returns string
if IsPlayerAlly(GetLocalPlayer(),KR9)then
return XA8(UnitItemInSlot(Y7[GetPlayerId(KR9)],KS9-1))
else
return"UI\\Widgets\\Console\\Undead\\undead-inventory-slotfiller.blp"
endif
endfunction
function KT9 takes nothing returns nothing
local integer T8
local integer U8
local string WR8
local real KU9
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 KV9
local string KW9
local string KX9
local string KY9
local string KZ9
local string s2=" "
local string s
local real KA9
local string spacer
local integer KB9=0
local string KC9=""
local string K39=""
local integer K69=0
local integer KL9=0
local string K19=""
local string KJ9
if A4==null then
return
endif
set i=1
loop
exitwhen i>5
set r=R2I(TimerGetRemaining(L[GetPlayerId(G8[i])]))
if r>0 then
set KB9=KB9+KP9(r)
if K69==0 then
if r<10 then
set KC9=W[GetPlayerId(G8[i])]+"0"+I2S(r)+" |r"
else
set KC9=W[GetPlayerId(G8[i])]+I2S(r)+" |r"
endif
else
if r<10 then
set KC9=KC9+Hj+"| |r"+W[GetPlayerId(G8[i])]+"0"+I2S(r)+" |r"
else
set KC9=KC9+Hj+"| |r"+W[GetPlayerId(G8[i])]+I2S(r)+" |r"
endif
endif
set K69=K69+1
endif
set i=i+1
endloop
if K69>0 then
if IsPlayerAlly(GetLocalPlayer(),G8[0])then
set KC9=Hj+"["+GetObjectName('n0JS')+" |r"+KC9+Hj+"]|r"
else
set KC9=fj+"["+GetObjectName('n0JR')+" |r"+KC9+fj+"]|r"
endif
endif
set i=1
loop
exitwhen i>5
set r=R2I(TimerGetRemaining(L[GetPlayerId(N8[i])]))
if r>0 then
set KB9=KB9+KP9(r)
if KL9==0 then
if r<10 then
set K39=W[GetPlayerId(N8[i])]+"0"+I2S(r)+" |r"
else
set K39=W[GetPlayerId(N8[i])]+I2S(r)+" |r"
endif
else
if r<10 then
set K39=K39+Hj+"| |r"+W[GetPlayerId(N8[i])]+"0"+I2S(r)+" |r"
else
set K39=K39+Hj+"| |r"+W[GetPlayerId(N8[i])]+I2S(r)+" |r"
endif
endif
set KL9=KL9+1
endif
set i=i+1
endloop
if KL9>0 then
if IsPlayerAlly(GetLocalPlayer(),N8[0])then
set K39=Hj+"["+GetObjectName('n0JS')+" |r"+K39+Hj+"]|r"
else
set K39=fj+"["+GetObjectName('n0JR')+" |r"+K39+fj+"]|r"
endif
endif
if A4!=null then
set id=GetPlayerId(GetLocalPlayer())
if id>=0 and id<16 then
if AW[x]then
set KV9=I2S(C[id])
set KW9=I2S(D4[id])
set KX9=I2S(IU[id])
set KY9=I2S(C7[id])
set KZ9=I2S(L7[id])
set s2=" |c00838B8B("+KV9+"/"+KW9+"/"+KX9+" - "+KY9+"/"+KZ9+" - |r|c00FFDC00"+I2S(WQ4[id])+"|r |c00838B8B)|r"
endif
endif
endif
if KL9==0 and K69==0 then
call MultiboardSetTitleText(A4,s2)
else
if IsPlayerAlly(GetLocalPlayer(),G8[0])then
call MultiboardSetTitleText(A4,K39+" "+KC9+" "+s2)
else
call MultiboardSetTitleText(A4,KC9+" "+K39+" "+s2)
endif
endif
if(L8 and(GetLocalPlayer()==KU4 or GetLocalPlayer()==KV4))==false then
call MultiboardDisplay(A4,true)
endif
if Nb[GetPlayerId(GetLocalPlayer())]==false then
call SetWaterBaseColor(0,0,255,255)
endif
set KJ9=" "
if E57[32+GetPlayerId(GetLocalPlayer())]then
set KJ9=HY7
endif
call l6(A4,15,1,KJ9)
set KJ9=" "
if E57[80+GetPlayerId(GetLocalPlayer())]then
set KJ9=HU7
if EU then
set KJ9=KJ9+HW7
endif
if EU and FU then
set KJ9=KJ9+" - "
endif
if FU then
set KJ9=KJ9+HX7
endif
endif
call l6(A4,14,1,KJ9)
set T8=1
set U8=HM4
loop
exitwhen T8>U8
call P6(A4,1,T8+2,N18(Y7[GetPlayerId(Z7[T8])]))
call l6(A4,3,T8+2,"|c00838B8B"+I2S(GetHeroLevel(Y7[GetPlayerId(Z7[T8])]))+"|r")
if ab[GetPlayerId(GetLocalPlayer())]then
call x7(A4,7,1,3)
call x7(A4,8,1,2.8)
call x7(A4,9,1,.8)
call x7(A4,10,1,.8)
call x7(A4,11,1,.8)
call x7(A4,12,1,.8)
call x7(A4,13,1,WI7(E57[32+GetPlayerId(GetLocalPlayer())],1.5,.1))
call x7(A4,7,T8+2,3)
call x7(A4,8,T8+2,1.1)
call x7(A4,9,T8+2,1.1)
call x7(A4,10,T8+2,1.1)
call x7(A4,11,T8+2,1.1)
call x7(A4,12,T8+2,1.1)
call x7(A4,13,T8+2,WI7(E57[32+GetPlayerId(GetLocalPlayer())],1.5,.1))
call s6(A4,8,T8+2,false,true)
call s6(A4,9,T8+2,false,true)
call s6(A4,10,T8+2,false,true)
call s6(A4,11,T8+2,false,true)
call s6(A4,12,T8+2,false,true)
call s6(A4,13,T8+2,false,true)
call l6(A4,8,1,"Items")
else
call x7(A4,7,1,2)
call x7(A4,8,1,.1)
call x7(A4,9,1,.1)
call x7(A4,10,1,.1)
call x7(A4,11,1,.1)
call x7(A4,12,1,.1)
call x7(A4,13,1,.1)
call x7(A4,7,T8+2,2.5)
call x7(A4,8,T8+2,.1)
call x7(A4,9,T8+2,.1)
call x7(A4,10,T8+2,.1)
call x7(A4,11,T8+2,.1)
call x7(A4,12,T8+2,.1)
call x7(A4,13,T8+2,.1)
call s6(A4,8,T8+2,false,false)
call s6(A4,9,T8+2,false,false)
call s6(A4,10,T8+2,false,false)
call s6(A4,11,T8+2,false,false)
call s6(A4,12,T8+2,false,false)
call s6(A4,13,T8+2,false,false)
call l6(A4,8,1," ")
endif
call P6(A4,8,T8+2,KQ9(Z7[T8],1))
call P6(A4,9,T8+2,KQ9(Z7[T8],2))
call P6(A4,10,T8+2,KQ9(Z7[T8],3))
call P6(A4,11,T8+2,KQ9(Z7[T8],4))
call P6(A4,12,T8+2,KQ9(Z7[T8],5))
call P6(A4,13,T8+2,KQ9(Z7[T8],6))
if(O48(Y7[GetPlayerId(Z7[T8])])and Y7[GetPlayerId(Z7[T8])]!=null and TimerGetRemaining(L[GetPlayerId(Z7[T8])])>0)then
if IsPlayerAlly(GetLocalPlayer(),Z7[T8])then
set K19=Hj+" ("+(I2S(R2I(TimerGetRemaining(L[GetPlayerId(Z7[T8])]))))+")|r"
else
set K19=fj+" ("+(I2S(R2I(TimerGetRemaining(L[GetPlayerId(Z7[T8])]))))+")|r"
endif
else
set K19=" "
endif
if U2[GetPlayerId(Z7[T8])]then
call l6(A4,1,T8+2,"|c00333333"+(KW4[GetPlayerId((Z7[T8]))])+"|r"+K19)
else
call l6(A4,1,T8+2,(KW4[GetPlayerId((Z7[T8]))])+K19)
endif
set KA9=(TimerGetRemaining(M_4[GetPlayerId((Z7[T8]))]))
if KA9>0 then
set s=I2S(R2I(KA9))
else
set s=" "
endif
if IsPlayerAlly(GetLocalPlayer(),Z7[T8])==false then
call l6(A4,7,T8+2," ")
set s=" "
else
call l6(A4,7,T8+2,"|cffffcc00"+I2S(R2I(GetPlayerState(Z7[T8],PLAYER_STATE_RESOURCE_GOLD)))+"|r")
endif
call l6(A4,2,T8+2,s)
set KJ9=KG9(GetPlayerId(Z7[T8]),false)
if Z7[T8]==RT4 and(not D)then
set KJ9=HV7
endif
if(not E57[32+GetPlayerId(GetLocalPlayer())])then
set KJ9=" "
elseif(not(IsPlayerAlly(GetLocalPlayer(),G8[0])or D))then
set KJ9=" "
endif
call l6(A4,15,T8+2,KJ9)
set KJ9=" "
if E57[80+GetPlayerId(GetLocalPlayer())]and KR8(Z7[T8])then
if EU then
set KJ9=FG7+"+"+I2S(R2I(GetPlayerHandicapXPBJ(Z7[T8])-100.))+"%|r"
endif
if EU and FU then
set KJ9=KJ9+" - "
endif
if FU then
set KJ9=KJ9+FH7+"+"+I2S(AV4[48+GetPlayerId(Z7[T8])])+"|r"
endif
endif
call l6(A4,14,T8+2,KJ9)
set T8=T8+1
endloop
set T8=1
set U8=HN4
loop
exitwhen T8>U8
call P6(A4,1,T8+3+HM4,N18(Y7[GetPlayerId(A7[T8])]))
call l6(A4,3,T8+3+HM4,"|c00838B8B"+I2S(GetHeroLevel(Y7[GetPlayerId(A7[T8])]))+"|r")
if ab[GetPlayerId(GetLocalPlayer())]then
call x7(A4,7,1,3)
call x7(A4,8,1,2.8)
call x7(A4,9,1,.8)
call x7(A4,10,1,.8)
call x7(A4,11,1,.8)
call x7(A4,12,1,.8)
call x7(A4,13,1,WI7(E57[32+GetPlayerId(GetLocalPlayer())],1.5,.1))
call x7(A4,7,T8+3+HM4,3)
call x7(A4,8,T8+3+HM4,1.1)
call x7(A4,9,T8+3+HM4,1.1)
call x7(A4,10,T8+3+HM4,1.1)
call x7(A4,11,T8+3+HM4,1.1)
call x7(A4,12,T8+3+HM4,1.1)
call x7(A4,13,T8+3+HM4,WI7(E57[32+GetPlayerId(GetLocalPlayer())],1.5,.1))
call s6(A4,8,T8+3+HM4,false,true)
call s6(A4,9,T8+3+HM4,false,true)
call s6(A4,10,T8+3+HM4,false,true)
call s6(A4,11,T8+3+HM4,false,true)
call s6(A4,12,T8+3+HM4,false,true)
call s6(A4,13,T8+3+HM4,false,true)
call l6(A4,8,1,"Items")
else
call x7(A4,7,1,2)
call x7(A4,8,1,.1)
call x7(A4,9,1,.1)
call x7(A4,10,1,.1)
call x7(A4,11,1,.1)
call x7(A4,12,1,.1)
call x7(A4,13,1,.1)
call x7(A4,7,T8+3+HM4,2.5)
call x7(A4,8,T8+3+HM4,.1)
call x7(A4,9,T8+3+HM4,.1)
call x7(A4,10,T8+3+HM4,.1)
call x7(A4,11,T8+3+HM4,.1)
call x7(A4,12,T8+3+HM4,.1)
call x7(A4,13,T8+3+HM4,.1)
call s6(A4,8,T8+3+HM4,false,false)
call s6(A4,9,T8+3+HM4,false,false)
call s6(A4,10,T8+3+HM4,false,false)
call s6(A4,11,T8+3+HM4,false,false)
call s6(A4,12,T8+3+HM4,false,false)
call s6(A4,13,T8+3+HM4,false,false)
call l6(A4,8,1," ")
endif
call P6(A4,8,T8+3+HM4,KQ9(A7[T8],1))
call P6(A4,9,T8+3+HM4,KQ9(A7[T8],2))
call P6(A4,10,T8+3+HM4,KQ9(A7[T8],3))
call P6(A4,11,T8+3+HM4,KQ9(A7[T8],4))
call P6(A4,12,T8+3+HM4,KQ9(A7[T8],5))
call P6(A4,13,T8+3+HM4,KQ9(A7[T8],6))
if(O48(Y7[GetPlayerId(A7[T8])])and Y7[GetPlayerId(A7[T8])]!=null and TimerGetRemaining(L[GetPlayerId(A7[T8])])>0)then
if IsPlayerAlly(GetLocalPlayer(),A7[T8])then
set K19=Hj+" ("+(I2S(R2I(TimerGetRemaining(L[GetPlayerId(A7[T8])]))))+")|r"
else
set K19=fj+" ("+(I2S(R2I(TimerGetRemaining(L[GetPlayerId(A7[T8])]))))+")|r"
endif
else
set K19=" "
endif
if U2[GetPlayerId(A7[T8])]then
call l6(A4,1,T8+3+HM4,"|c00333333"+(KW4[GetPlayerId((A7[T8]))])+"|r"+K19)
else
call l6(A4,1,T8+3+HM4,(KW4[GetPlayerId((A7[T8]))])+K19)
endif
set KA9=(TimerGetRemaining(M_4[GetPlayerId((A7[T8]))]))
if KA9>0 then
set s=I2S(R2I(KA9))
else
set s=" "
endif
if IsPlayerAlly(GetLocalPlayer(),A7[T8])==false then
call l6(A4,7,T8+3+HM4," ")
set s=" "
else
call l6(A4,7,T8+3+HM4,"|cffffcc00"+I2S(R2I(GetPlayerState(A7[T8],PLAYER_STATE_RESOURCE_GOLD)))+"|r")
endif
call l6(A4,2,T8+3+HM4,s)
set KJ9=KG9(GetPlayerId(A7[T8]),false)
if A7[T8]==RU4 and(not D)then
set KJ9=HV7
endif
if(not E57[32+GetPlayerId(GetLocalPlayer())])then
set KJ9=" "
elseif(not(IsPlayerAlly(GetLocalPlayer(),N8[0])or D))then
set KJ9=" "
endif
call l6(A4,15,T8+3+HM4,KJ9)
set KJ9=" "
if E57[80+GetPlayerId(GetLocalPlayer())]and KR8(A7[T8])then
if EU then
set KJ9=FG7+"+"+I2S(R2I(GetPlayerHandicapXPBJ(A7[T8])-100.))+"%|r"
endif
if EU and FU then
set KJ9=KJ9+" - "
endif
if FU then
set KJ9=KJ9+FH7+"+"+I2S(AV4[48+GetPlayerId(A7[T8])])+"|r"
endif
endif
call l6(A4,14,T8+3+HM4,KJ9)
set T8=T8+1
endloop
endfunction
function K09 takes nothing returns boolean
local real K59
local real K29
local unit u
if Q_4==false then
set u=I04
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-Q44)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
endif
if R44==false then
set u=I24
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-Q74)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
endif
if R74==false then
set u=I_4
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-Q84)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
endif
if Q24==false then
set u=J44
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-Q94)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=J74
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QD4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=J84
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QE4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=J94
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QF4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=JD4
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QG4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=JE4
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QH4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=JF4
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QI4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=JG4
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QJ4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=JH4
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QK4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=JI4
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QM4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=JJ4
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QN4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=IY4
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QO4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
endif
if Q14==false then
set u=JZ4
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QP4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
endif
if Q04==false then
set u=JA4
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QQ4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
endif
if Q54==false then
set u=JB4
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QR4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
endif
if QL4==false then
set u=JC4
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QS4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=J34
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QT4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=J64
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QU4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=JL4
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QV4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=J14
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QW4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=J04
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QX4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=J54
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QY4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=J24
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QZ4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=J_4
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QA4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=K44
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QB4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=K74
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-QC4)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
set u=JV4
if u!=null then
set K59=GetUnitState(u,UNIT_STATE_LIFE)
set K29=K59+Q64
if K29<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-Q34)then
call SetUnitState(u,UNIT_STATE_LIFE,K29)
endif
endif
endif
set u=null
return false
endfunction
function K_9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if Q14 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QP4=QP4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function M49 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if Q04 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QQ4=QQ4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function M79 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if Q54 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QR4=QR4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function M89 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if QL4 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QS4=QS4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function M99 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if QL4 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QT4=QT4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MD9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if QL4 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QU4=QU4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function ME9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if QL4 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QV4=QV4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MF9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if QL4 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QW4=QW4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MG9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if QL4 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QX4=QX4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MH9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if QL4 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QY4=QY4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MI9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if QL4 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QZ4=QZ4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MJ9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if QL4 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QA4=QA4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MK9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if QL4 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QB4=QB4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MM9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if QL4 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QC4=QC4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MN9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if QL4 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set Q34=Q34+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MO9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if Q_4 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set Q44=Q44+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MP9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if R44 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set Q74=Q74+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MQ9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if R74 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set Q84=Q84+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MR9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if Q24 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set Q94=Q94+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MS9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if Q24 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QD4=QD4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MT9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if Q24 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QE4=QE4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MU9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if Q24 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QF4=QF4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MV9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if Q24 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QG4=QG4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MW9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if Q24 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QH4=QH4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MX9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if Q24 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QI4=QI4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MY9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if Q24 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QJ4=QJ4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MZ9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if Q24 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QK4=QK4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MA9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if Q24 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QM4=QM4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MB9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if Q24 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QN4=QN4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function MC9 takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if Q24 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))then
set QO4=QO4+GetEventDamage()
else
if IsUnitIllusion(GetEventDamageSource())then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.75*GetEventDamage())
else
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+.25*GetEventDamage())
endif
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function M39 takes nothing returns boolean
if GetOwningPlayer(GetFilterUnit())==N8[0]then
set Q24=true
endif
return false
endfunction
function M69 takes nothing returns boolean
if GetOwningPlayer(GetFilterUnit())==N8[0]then
set Q_4=true
endif
return false
endfunction
function ML9 takes nothing returns boolean
if GetOwningPlayer(GetFilterUnit())==N8[0]then
set R44=true
endif
return false
endfunction
function M19 takes nothing returns boolean
if GetOwningPlayer(GetFilterUnit())==N8[0]then
set R74=true
endif
return false
endfunction
function M09 takes nothing returns boolean
if GetOwningPlayer(GetFilterUnit())==G8[0]then
set QL4=true
endif
return false
endfunction
function M59 takes nothing returns boolean
if GetOwningPlayer(GetFilterUnit())==G8[0]then
set Q14=true
endif
return false
endfunction
function M29 takes nothing returns boolean
if GetOwningPlayer(GetFilterUnit())==G8[0]then
set Q04=true
endif
return false
endfunction
function M_9 takes nothing returns boolean
if GetOwningPlayer(GetFilterUnit())==G8[0]then
set Q54=true
endif
return false
endfunction
function N49 takes nothing returns boolean
local group g=OG8()
set QL4=false
set Q14=false
set Q04=false
set Q54=false
set Q24=false
set Q_4=false
set R44=false
set R74=false
call GroupEnumUnitsInRect(g,SE,Condition(function M39))
call GroupEnumUnitsInRect(g,TE,Condition(function M39))
call GroupEnumUnitsInRect(g,WE,Condition(function M39))
call GroupEnumUnitsInRect(g,lE,Condition(function M39))
call GroupEnumUnitsInRect(g,LE,Condition(function M39))
call GroupEnumUnitsInRect(g,ME,Condition(function M39))
call GroupEnumUnitsInRect(g,GE,Condition(function M69))
call GroupEnumUnitsInRect(g,QE,Condition(function ML9))
call GroupEnumUnitsInRect(g,JE,Condition(function M19))
call GroupEnumUnitsInRect(g,YE,Condition(function M09))
call GroupEnumUnitsInRect(g,ZE,Condition(function M09))
call GroupEnumUnitsInRect(g,EF,Condition(function M09))
call GroupEnumUnitsInRect(g,qE,Condition(function M09))
call GroupEnumUnitsInRect(g,pE,Condition(function M09))
call GroupEnumUnitsInRect(g,PE,Condition(function M09))
call GroupEnumUnitsInRect(g,fE,Condition(function M59))
call GroupEnumUnitsInRect(g,FE,Condition(function M29))
call GroupEnumUnitsInRect(g,gE,Condition(function M_9))
call OF8(g)
set g=null
return false
endfunction
function N79 takes nothing returns boolean
if IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetAttacker()))and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetAttacker()))and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false and GetOwningPlayer(GetFilterUnit())!=O8 then
if IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)then
set N14=GetFilterUnit()
else
set N04=GetFilterUnit()
endif
endif
return false
endfunction
function N89 takes nothing returns nothing
local unit N99=GetAttacker()
local unit m5=GetTriggerUnit()
local group g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(N99),GetUnitY(N99),900,Condition(function N79))
call OF8(g)
call DisableTrigger(GetTriggeringTrigger())
if N14!=null then
call IssueTargetOrderById(N99,851983,N14)
call GroupAddUnit(KU,N99)
elseif IsUnitType(m5,UNIT_TYPE_HERO)and N04!=null then
call IssueTargetOrderById(N99,851983,N04)
call GroupAddUnit(KU,N99)
endif
call EnableTrigger(GetTriggeringTrigger())
set N14=null
set N04=null
set N99=null
set m5=null
set g=null
endfunction
function ND9 takes nothing returns nothing
if GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)<1 then
call GroupRemoveUnit(KU,GetEnumUnit())
endif
if GetUnitCurrentOrder(GetEnumUnit())!=851983then
call GroupRemoveUnit(KU,GetEnumUnit())
call IssuePointOrderByIdLoc(GetEnumUnit(),851983,B8[GetUnitAbilityLevel(GetEnumUnit(),A8)])
endif
endfunction
function NE9 takes nothing returns boolean
call ForGroup(KU,function ND9)
return false
endfunction
function NF9 takes string s returns nothing
set F3=F3+1
set j3[F3]=s
endfunction
function NG9 takes nothing returns boolean
local integer i=1
loop
exitwhen i>F3
call ExecuteFunc(j3[i])
set i=i+1
endloop
call ExecuteFunc("NH9")
call ExecuteFunc("NI9")
return false
endfunction
function NJ9 takes unit N28 returns nothing
local trigger t=CreateTrigger()
call SBool(GetHandleId(GetTriggerUnit()),"DamageRegisterAlready",true)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function NG9))
set t=null
endfunction
function NK9 takes nothing returns boolean
if GetUnitTypeId(GetTriggerUnit())!='H00M' and GetUnitTypeId(GetTriggerUnit())!='H07G' and GetUnitTypeId(GetTriggerUnit())!='H00Y' and GetUnitTypeId(GetTriggerUnit())!='H0B8' and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and IsUnitIllusion(GetTriggerUnit())==false and LBool(GetHandleId(GetTriggerUnit()),"DamageRegisterAlready")==false then
if N54 and(GetUnitTypeId(GetTriggerUnit())!='O00P' or(GetUnitTypeId(GetTriggerUnit())=='O00P' and N24))then
call NJ9(GetTriggerUnit())
endif
endif
return false
endfunction
function NM9 takes nothing returns boolean
local unit u
local real NN9
local boolean NO9=PO8()
set u=fP
if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 then
set NN9=GetUnitState(u,UNIT_STATE_MANA)
if NO9 then
set NN9=P18(NN9-25,0)
else
set NN9=PL8(NN9+5,300)
endif
endif
set u=FP
if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 then
set NN9=GetUnitState(u,UNIT_STATE_MANA)
if NO9 then
set NN9=P18(NN9-25,0)
else
set NN9=PL8(NN9+5,300)
endif
endif
set u=lP
if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 then
set NN9=GetUnitState(u,UNIT_STATE_MANA)
if NO9 then
set NN9=P18(NN9-25,0)
else
set NN9=PL8(NN9+5,300)
endif
endif
set u=LP
if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 then
set NN9=GetUnitState(u,UNIT_STATE_MANA)
if NO9 then
set NN9=P18(NN9-25,0)
else
set NN9=PL8(NN9+5,300)
endif
endif
set u=MP
if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 then
set NN9=GetUnitState(u,UNIT_STATE_MANA)
if NO9 then
set NN9=P18(NN9-25,0)
else
set NN9=PL8(NN9+5,300)
endif
endif
set u=pP
if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 then
set NN9=GetUnitState(u,UNIT_STATE_MANA)
if NO9 then
set NN9=P18(NN9-25,0)
else
set NN9=PL8(NN9+5,300)
endif
endif
set u=JK4
if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 then
set NN9=GetUnitState(u,UNIT_STATE_MANA)
if NO9 then
set NN9=P18(NN9-25,0)
else
set NN9=PL8(NN9+5,300)
endif
endif
set u=JM4
if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 then
set NN9=GetUnitState(u,UNIT_STATE_MANA)
if NO9 then
set NN9=P18(NN9-25,0)
else
set NN9=PL8(NN9+5,300)
endif
endif
set u=JN4
if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 then
set NN9=GetUnitState(u,UNIT_STATE_MANA)
if NO9 then
set NN9=P18(NN9-25,0)
else
set NN9=PL8(NN9+5,300)
endif
endif
set u=JO4
if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 then
set NN9=GetUnitState(u,UNIT_STATE_MANA)
if NO9 then
set NN9=P18(NN9-25,0)
else
set NN9=PL8(NN9+5,300)
endif
endif
set u=JP4
if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 then
set NN9=GetUnitState(u,UNIT_STATE_MANA)
if NO9 then
set NN9=P18(NN9-25,0)
else
set NN9=PL8(NN9+5,300)
endif
endif
set u=null
return false
endfunction
function Ln takes nothing returns string
return O64
endfunction
function LN takes nothing returns string
return ND
endfunction
function NP9 takes player j8 returns string
return W[GetPlayerId(j8)]+NM8(j8)+"|r"
endfunction
function NQ9 takes player NR9 returns string
local string NS9=I2S(NB4[GetPlayerId(NR9)])
local string NT9=NS9
if NR9==GetLocalPlayer()then
set NT9=Fx+NS9+"|r"
endif
return NT9
endfunction
function NU9 takes player NR9 returns string
local string NS9=I2S(NA4[GetPlayerId(NR9)])
local string NT9=NS9
if NR9==GetLocalPlayer()then
set NT9=Fx+NS9+"|r"
endif
return NT9
endfunction
function Lq takes player j8 returns string
return OD[GetPlayerId(j8)]
endfunction
function YO8 takes nothing returns nothing
local integer i=1
local multiboarditem YH8
loop
exitwhen i>NF4
if Lq(NE4[i])!="Here"then
set YH8=MultiboardGetItem(N84,N94[i],ND4[i])
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,"|c00555555"+Lq(NE4[i])+"|r")
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
endif
set i=i+1
endloop
endfunction
function NV9 takes player j8 returns string
local string GV=I2S(GetPlayerState(j8,PLAYER_STATE_RESOURCE_GOLD))
local string Lr=GV
if j8==GetLocalPlayer()then
set Lr=Fx+GV+"|r"
endif
return Lr
endfunction
function NW9 takes player j8 returns string
local string GV=I2S(Zh[GetPlayerId(j8)])
local string Lr=GV
if j8==GetLocalPlayer()then
set Lr=Fx+GV+"|r"
endif
return Lr
endfunction
function NX9 takes player j8 returns string
local string GV=I2S(GetUnitLevel(Y7[GetPlayerId(j8)]))
local string Lr=GV
if j8==GetLocalPlayer()then
set Lr=Fx+GV+"|r"
endif
return Lr
endfunction
function NY9 takes player j8 returns string
local string GV=I2S(GU4[GetPlayerId(j8)])
local string Lr=GV
if j8==GetLocalPlayer()then
set Lr=Fx+GV+"|r"
endif
return Lr
endfunction
function NZ9 takes player j8 returns string
local string GV=I2S(NS4[GetPlayerId(j8)])
local string Lr=GV
if j8==GetLocalPlayer()then
set Lr=Fx+GV+"|r"
endif
return Lr
endfunction
function NA9 takes player j8 returns string
local string GV=I2S(NN4[GetPlayerId(j8)])
local string Lr=GV
if j8==GetLocalPlayer()then
set Lr=Fx+GV+"|r"
endif
return Lr
endfunction
function NB9 takes player j8 returns string
local string GV=I2S(IU[GetPlayerId(j8)])
local string Lr=GV
if j8==GetLocalPlayer()then
set Lr=Fx+GV+"|r"
endif
return Lr
endfunction
function NC9 takes player j8 returns string
local string GV=I2S(C[GetPlayerId(j8)])
local string Lr=GV
if j8==GetLocalPlayer()then
set Lr=Fx+GV+"|r"
endif
return Lr
endfunction
function N39 takes player j8 returns string
local string GV=I2S(D4[GetPlayerId(j8)])
local string Lr=GV
if j8==GetLocalPlayer()then
set Lr=Fx+GV+"|r"
endif
return Lr
endfunction
function N69 takes player j8 returns string
local string GV=I2S(C7[GetPlayerId(j8)])
local string Lr=GV
if j8==GetLocalPlayer()then
set Lr=Fx+GV+"|r"
endif
return Lr
endfunction
function NL9 takes player j8 returns string
local string GV=I2S(L7[GetPlayerId(j8)])
local string Lr=GV
if j8==GetLocalPlayer()then
set Lr=Fx+GV+"|r"
endif
return Lr
endfunction
function N19 takes player j8 returns string
local string GV=I2S(LInt(StringHash("Stats"+I2S(GetPlayerId(j8))),"NumOfNeutrals"))
local string Lr=GV
if j8==GetLocalPlayer()then
set Lr=Fx+GV+"|r"
endif
return Lr
endfunction
function N09 takes player j8 returns string
local string GV=I2S(NP4[GetPlayerId(j8)])
local string Lr=GV
if j8==GetLocalPlayer()then
set Lr=Fx+GV+"|r"
endif
return Lr
endfunction
function N59 takes player j8 returns string
local string GV=I2S(NQ4[GetPlayerId(j8)])
local string Lr=GV
if j8==GetLocalPlayer()then
set Lr=Fx+GV+"|r"
endif
return Lr
endfunction
function N29 takes player j8 returns string
local string GV=I2S(NO4[GetPlayerId(j8)])
local string Lr=GV
if j8==GetLocalPlayer()then
set Lr=Fx+GV+"|r"
endif
return Lr
endfunction
function N_9 takes player j8 returns string
local string LY
local string Lz
local string Lr
local integer k=gD[GetPlayerId(j8)]
local integer d=N64[GetPlayerId(j8)]
if k<1 then
set k=0
endif
if d<1 then
set d=0
endif
set LY=I2S(k)
set Lz=I2S(d)
set Lr=LY+"/"+Lz
if j8==GetLocalPlayer()then
set Lr=Fx+LY+"|r/"+Fx+Lz+"|r"
endif
return Lr
endfunction
function O49 takes player j8 returns string
local integer L0=NR4[GetPlayerId(j8)]
local string YK8
local integer L1
local integer L2
set L1=(L0/ 60)-(1/ 2)
set L2=ModuloInteger(L0,60)
if(L2<10)then
set YK8=I2S(L1)+":0"+I2S(L2)
else
set YK8=I2S(L1)+":"+I2S(L2)
endif
if j8==GetLocalPlayer()then
set YK8=Fx+YK8+"|r"
endif
return YK8
endfunction
function O79 takes player Z77,player m5 returns string
local string LY
local string Lz
local string Lr
local integer k=LInt(StringHash("Stats"+I2S(GetPlayerId(Z77))),"Killed "+I2S(GetPlayerId(m5)))
local integer d=LInt(StringHash("Stats"+I2S(GetPlayerId(Z77))),"Died To "+I2S(GetPlayerId(m5)))
if k<1 then
set k=0
endif
if d<1 then
set d=0
endif
set LY=I2S(k)
set Lz=I2S(d)
set Lr=LY+"/"+Lz
if Z77==GetLocalPlayer()then
set Lr=Fx+LY+"|r/"+Fx+Lz+"|r"
endif
return Lr
endfunction
function O89 takes boolean YV7 returns nothing
local integer O5=1
local integer i=0
local integer j=1
local item ZV7=null
loop
exitwhen j>5
if YV7 then
set O5=GetPlayerId(G8[j])
else
set O5=GetPlayerId(N8[j])
endif
if Y7[O5]!=null then
set i=0
loop
exitwhen i>5
set ZV7=UnitItemInSlot(Y7[O5],i)
if ZV7!=null then
set PE7[O5*6+i]=ZU7(ZV7)
else
set PE7[O5*6+i]=-1
endif
set i=i+1
endloop
else
set i=0
loop
exitwhen i>5
set PE7[O5*6+i]=-1
set i=i+1
endloop
endif
set j=j+1
endloop
set ZV7=null
endfunction
function O99 takes nothing returns nothing
call O89(true)
endfunction
function OD9 takes nothing returns nothing
call O89(false)
endfunction
function OE9 takes integer O5,integer i returns string
if PE7[O5*6+i]<0 then
return"UI\\Widgets\\Console\\Undead\\undead-inventory-slotfiller.blp"
endif
return DV[PE7[O5*6+i]]
endfunction
function OF9 takes nothing returns nothing
local integer OG9=HM4
local integer OH9=HN4
local player array OI9
local player array OJ9
local integer OK9
local integer OM9
local integer ON9=21+P38(OG9,OH9)+1
local integer OO9=1+(OG9+OH9)*2
local multiboarditem OP9
local integer i
local integer x
local integer curRow1
local integer curRow2
local string e="|r"
local string c0="|cff99ccff"
local integer OQ9
local integer OR9
call XK7("FinalScoreboardFunc "+GG7)
call ExecuteFunc("O99")
call ExecuteFunc("OD9")
call DisableTrigger(FS)
call DestroyMultiboard(A4)
call TriggerSleepAction(.0)
if OG9>0 and OH9>0 then
set ON9=ON9+2
endif
set N84=CreateMultiboard()
call MultiboardSetItemsWidth(N84,0)
call MultiboardSetRowCount(N84,ON9)
call MultiboardSetColumnCount(N84,OO9)
call MultiboardSetTitleText(N84,(GetObjectName(('n0E3')))+" "+" - "+(O64))
call MultiboardMinimize(N84,true)
call MultiboardSetItemsStyle(N84,false,false)
call MultiboardDisplay(N84,true)
call MultiboardMinimize(N84,false)
call MultiboardSetTitleText(N84,(GetObjectName(('n0E3')))+" "+" - "+(O64)+" - "+("|c00ff0303"+I2S(C[GetPlayerId(G8[0])])+"|r/|c0020c000"+I2S(D4[GetPlayerId(G8[0])])+"|r"))
set x=1
set i=1
loop
exitwhen i>5
if KT8(G8[i])or GetPlayerSlotState(G8[i])==PLAYER_SLOT_STATE_LEFT then
set OI9[x]=G8[i]
set x=x+1
endif
set i=i+1
endloop
set x=1
set i=1
loop
exitwhen i>5
if KT8(N8[i])or GetPlayerSlotState(N8[i])==PLAYER_SLOT_STATE_LEFT then
set OJ9[x]=N8[i]
set x=x+1
endif
set i=i+1
endloop
set i=0
set OM9=0
loop
exitwhen i>ON9
set OP9=MultiboardGetItem(N84,i,OM9)
call MultiboardSetItemWidth(OP9,.075)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OK9=0
set OM9=0
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9," ")
call MultiboardReleaseItem(OP9)
set OM9=0
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,false,false)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NP9(OI9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NP9(OJ9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OK9=OK9+1
set OM9=0
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,false,false)
call MultiboardReleaseItem(OP9)
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,true)
call MultiboardSetItemValue(OP9,NX9(OI9[i]))
call MultiboardSetItemIcon(OP9,(N18(Y7[GetPlayerId((OI9[i]))])))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,true)
call MultiboardSetItemValue(OP9,NX9(OJ9[i]))
call MultiboardSetItemIcon(OP9,(N18(Y7[GetPlayerId((OJ9[i]))])))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OK9=OK9+1
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0EB')))+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,false,true)
call MultiboardSetItemIcon(OP9,(OE9(GetPlayerId((OI9[i])),(1)-1)))
call MultiboardSetItemWidth(OP9,.015)
call MultiboardReleaseItem(OP9)
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,false,true)
call MultiboardSetItemIcon(OP9,(OE9(GetPlayerId((OI9[i])),(2)-1)))
call MultiboardSetItemWidth(OP9,.054)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,false,true)
call MultiboardSetItemIcon(OP9,(OE9(GetPlayerId((OJ9[i])),(1)-1)))
call MultiboardSetItemWidth(OP9,.015)
call MultiboardReleaseItem(OP9)
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,false,true)
call MultiboardSetItemIcon(OP9,(OE9(GetPlayerId((OJ9[i])),(2)-1)))
call MultiboardSetItemWidth(OP9,.054)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OK9=OK9+1
set OM9=0
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+" "+e)
call MultiboardReleaseItem(OP9)
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,false,true)
call MultiboardSetItemIcon(OP9,(OE9(GetPlayerId((OI9[i])),(3)-1)))
call MultiboardSetItemWidth(OP9,.015)
call MultiboardReleaseItem(OP9)
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,false,true)
call MultiboardSetItemIcon(OP9,(OE9(GetPlayerId((OI9[i])),(4)-1)))
call MultiboardSetItemWidth(OP9,.054)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,false,true)
call MultiboardSetItemIcon(OP9,(OE9(GetPlayerId((OJ9[i])),(3)-1)))
call MultiboardSetItemWidth(OP9,.015)
call MultiboardReleaseItem(OP9)
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,false,true)
call MultiboardSetItemIcon(OP9,(OE9(GetPlayerId((OJ9[i])),(4)-1)))
call MultiboardSetItemWidth(OP9,.054)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OK9=OK9+1
set OM9=0
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+" "+e)
call MultiboardReleaseItem(OP9)
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,false,true)
call MultiboardSetItemIcon(OP9,(OE9(GetPlayerId((OI9[i])),(5)-1)))
call MultiboardSetItemWidth(OP9,.015)
call MultiboardReleaseItem(OP9)
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,false,true)
call MultiboardSetItemIcon(OP9,(OE9(GetPlayerId((OI9[i])),(6)-1)))
call MultiboardSetItemWidth(OP9,.054)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,false,true)
call MultiboardSetItemIcon(OP9,(OE9(GetPlayerId((OJ9[i])),(5)-1)))
call MultiboardSetItemWidth(OP9,.015)
call MultiboardReleaseItem(OP9)
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,false,true)
call MultiboardSetItemIcon(OP9,(OE9(GetPlayerId((OJ9[i])),(6)-1)))
call MultiboardSetItemWidth(OP9,.054)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0E2')))+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NV9(OI9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NV9(OJ9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0E1')))+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NC9(OI9[i])+"/"+N39(OI9[i])+"/"+NB9(OI9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NC9(OJ9[i])+"/"+N39(OJ9[i])+"/"+NB9(OJ9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+GetObjectName('n0JU')+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NQ9(OI9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NQ9(OJ9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+GetObjectName('n0KF')+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NU9(OI9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NU9(OJ9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0E0')))+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NY9(OI9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NY9(OJ9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0DT')))+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,N_9(OI9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,N_9(OJ9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0DZ')))+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,N69(OI9[i])+"/"+NL9(OI9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,N69(OJ9[i])+"/"+NL9(OJ9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0DY')))+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,N19(OI9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,N19(OJ9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0DU')))+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NZ9(OI9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NZ9(OJ9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0DV')))+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,O49(OI9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,O49(OJ9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0DW')))+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NA9(OI9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NA9(OJ9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0DN')))+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NW9(OI9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,NW9(OJ9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0D8')))+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,N09(OI9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,N09(OJ9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0DI')))+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,N59(OI9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,N59(OJ9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0DM')))+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,N29(OI9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,N29(OJ9[i]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
if OG9>0 and OH9>0 then
set OM9=0
set OQ9=OK9
set OR9=OM9
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0DL')))+e)
call MultiboardReleaseItem(OP9)
set OK9=OQ9
set x=1
loop
exitwhen x>OG9
set OM9=0
set OK9=OQ9
set i=1
loop
exitwhen i>OH9
set OM9=x+(x-1)
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,false,true)
call MultiboardSetItemIcon(OP9,(N18(Y7[GetPlayerId((OI9[x]))])))
call MultiboardSetItemWidth(OP9,.01)
call MultiboardReleaseItem(OP9)
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,true)
call MultiboardSetItemIcon(OP9,(N18(Y7[GetPlayerId((OJ9[i]))])))
call MultiboardSetItemValue(OP9," "+O79(OI9[x],OJ9[i]))
call MultiboardSetItemWidth(OP9,.059)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set x=x+1
endloop
set x=OG9+1
loop
exitwhen x>(OH9+OG9)
set OM9=0
set OK9=OQ9
set i=1
loop
exitwhen i>OG9
set OM9=x+(x-1)
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,false,true)
call MultiboardSetItemIcon(OP9,(N18(Y7[GetPlayerId((OJ9[x-OG9]))])))
call MultiboardSetItemWidth(OP9,.01)
call MultiboardReleaseItem(OP9)
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,true)
call MultiboardSetItemIcon(OP9,(N18(Y7[GetPlayerId((OI9[i]))])))
call MultiboardSetItemValue(OP9," "+O79(OJ9[x-OG9],OI9[i]))
call MultiboardSetItemWidth(OP9,.059)
call MultiboardReleaseItem(OP9)
set i=i+1
endloop
set x=x+1
endloop
endif
set OK9=OK9+1
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0CZ')))+e)
call MultiboardReleaseItem(OP9)
set OM9=0
set i=1
loop
exitwhen i>OG9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,(OD[GetPlayerId((OI9[i]))]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set NF4=NF4+1
set N94[NF4]=OK9
set ND4[NF4]=OM9
set NE4[NF4]=OI9[i]
set i=i+1
endloop
set i=1
loop
exitwhen i>OH9
set OM9=OM9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,(OD[GetPlayerId((OJ9[i]))]))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
set NF4=NF4+1
set N94[NF4]=OK9
set ND4[NF4]=OM9
set NE4[NF4]=OJ9[i]
set i=i+1
endloop
set OM9=0
set OK9=OK9+1
set OP9=MultiboardGetItem(N84,OK9,OM9)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,c0+(GetObjectName(('n0D9')))+e)
call MultiboardReleaseItem(OP9)
set OP9=MultiboardGetItem(N84,OK9,OM9+1)
call MultiboardSetItemStyle(OP9,true,false)
call MultiboardSetItemValue(OP9,(ND))
call MultiboardSetItemWidth(OP9,.07)
call MultiboardReleaseItem(OP9)
call MultiboardMinimize(N84,true)
call MultiboardMinimize(N84,false)
endfunction
function OS9 takes nothing returns string
return O64
endfunction
function mD takes player j8 returns string
return N18(Y7[GetPlayerId(j8)])
endfunction
function me takes player j8,integer Lp returns string
return XA8(UnitItemInSlot(Y7[GetPlayerId(j8)],Lp-1))
endfunction
function mE takes player j8 returns string
return W[GetPlayerId(j8)]+NM8(j8)+"|r"
endfunction
function mf takes player j8 returns string
return I2S(GetPlayerState(j8,PLAYER_STATE_RESOURCE_GOLD))
endfunction
function mF takes player p returns string
return I2S(Zh[GetPlayerId(p)])
endfunction
function mg takes player p returns string
return I2S(GetUnitLevel(Y7[GetPlayerId(p)]))
endfunction
function mG takes player p returns string
return I2S(LInt(StringHash("Stats"+I2S(GetPlayerId(p))),"NumOfWards"))
endfunction
function mh takes player j8 returns string
return I2S(NS4[GetPlayerId(j8)])
endfunction
function mH takes player j8 returns string
return I2S(NN4[GetPlayerId(j8)])
endfunction
function mi takes player j8 returns string
return I2S(C[GetPlayerId(j8)])
endfunction
function mI takes player j8 returns string
return I2S(D4[GetPlayerId(j8)])
endfunction
function mj takes player j8 returns string
return I2S(C7[GetPlayerId(j8)])
endfunction
function mJ takes player j8 returns string
return I2S(L7[GetPlayerId(j8)])
endfunction
function mk takes player p returns string
return I2S(LInt(StringHash("Stats"+I2S(GetPlayerId(p))),"NumOfNeutrals"))
endfunction
function mK takes player j8 returns string
return I2S(NP4[GetPlayerId(j8)])
endfunction
function ml takes player j8 returns string
return I2S(NQ4[GetPlayerId(j8)])
endfunction
function mL takes player j8 returns string
return I2S(NO4[GetPlayerId(j8)])
endfunction
function mm takes player j8 returns string
local integer k=gD[GetPlayerId(j8)]
local integer d=N64[GetPlayerId(j8)]
if k<1 then
set k=0
endif
if d<1 then
set d=0
endif
return I2S(k)+"/"+I2S(d)
endfunction
function mM takes player j8 returns string
local integer L0=NR4[GetPlayerId(j8)]
local string YK8
local integer L1
local integer L2
set L1=(L0/ 60)-(1/ 2)
set L2=ModuloInteger(L0,60)
if(L2<10)then
set YK8=I2S(L1)+":0"+I2S(L2)
else
set YK8=I2S(L1)+":"+I2S(L2)
endif
return YK8
endfunction
function mn takes player Z77,player m5 returns string
local integer k=LInt(StringHash("Stats"+I2S(GetPlayerId(Z77))),"Killed "+I2S(GetPlayerId(m5)))
local integer d=LInt(StringHash("Stats"+I2S(GetPlayerId(Z77))),"Died To "+I2S(GetPlayerId(m5)))
if k<1 then
set k=0
endif
if d<1 then
set d=0
endif
return I2S(k)+"/"+I2S(d)
endfunction
function mN takes player Z77 returns string
local string mo
if O18(Y7[GetPlayerId(Z77)])then
set mo=I2S(R2I(TimerGetRemaining(L[GetPlayerId(Z77)])))
else
set mo=" "
endif
return mo
endfunction
function OT9 takes player Z77 returns string
local real r=(TimerGetRemaining(M_4[GetPlayerId((Z77))]))
local string OU9
if r>0 then
set OU9=I2S(R2I(r))
else
set OU9=" "
endif
return OU9
endfunction
function OV9 takes integer mp,integer mP returns nothing
set NG4=CreateMultiboard()
call MultiboardSetItemsWidth(NG4,0)
call MultiboardSetRowCount(NG4,mp)
call MultiboardSetColumnCount(NG4,mP)
call MultiboardSetTitleText(NG4,(GetObjectName(('n0E3')))+" "+" - "+OS9())
call MultiboardMinimize(NG4,true)
call MultiboardSetItemsStyle(NG4,false,false)
if GetLocalPlayer()==KU4 or GetLocalPlayer()==KV4 then
call MultiboardDisplay(NG4,true)
endif
endfunction
function mq takes nothing returns string
return"|c00ff0303"+I2S(C[GetPlayerId(G8[0])])+"|r/|c0020c000"+I2S(D4[GetPlayerId(G8[0])])+"|r"
endfunction
function OW9 takes player OX9 returns string
return I2S(IU[GetPlayerId(OX9)])
endfunction
function OY9 takes nothing returns nothing
local integer XW8=HM4
local integer XV8=HN4
local player array OZ9
local player array OA9
local integer OB9
local integer OC9
local integer O39=1+19+P38(XW8,XV8)+2
local integer O69=1+(XW8+XV8)*2
local multiboarditem YH8
local integer i
local integer x
local integer curRow1
local integer curRow2
local string e="|r"
local string c0="|cff99ccff"
local integer OL9
local integer O19
local integer O09=131
local integer O59=139
local integer O29=139
local integer O_9=255
local integer KB9=0
local string KC9=""
local string K39=""
local integer K69=0
local integer KL9=0
local integer r
local string KJ9
if XW8>0 and XV8>0 then
set O39=O39+2
endif
if GetTriggerExecCount(GetTriggeringTrigger())==1 then
call OV9(O39,O69)
endif
if GetLocalPlayer()==KU4 or GetLocalPlayer()==KV4 then
call MultiboardDisplay(NG4,true)
endif
set i=1
loop
exitwhen i>5
set r=R2I(TimerGetRemaining(L[GetPlayerId(G8[i])]))
if r>0 then
set KB9=KB9+KP9(r)
if K69==0 then
if r<10 then
set KC9=W[GetPlayerId(G8[i])]+"0"+I2S(r)+" |r"
else
set KC9=W[GetPlayerId(G8[i])]+I2S(r)+" |r"
endif
else
if r<10 then
set KC9=KC9+Hj+"| |r"+W[GetPlayerId(G8[i])]+"0"+I2S(r)+" |r"
else
set KC9=KC9+Hj+"| |r"+W[GetPlayerId(G8[i])]+I2S(r)+" |r"
endif
endif
set K69=K69+1
endif
set i=i+1
endloop
if K69>0 then
set KC9=Hj+"[Sentinel: |r"+KC9+Hj+"]|r"
endif
set i=1
loop
exitwhen i>5
set r=R2I(TimerGetRemaining(L[GetPlayerId(N8[i])]))
if r>0 then
set KB9=KB9+KP9(r)
if KL9==0 then
if r<10 then
set K39=W[GetPlayerId(N8[i])]+"0"+I2S(r)+" |r"
else
set K39=W[GetPlayerId(N8[i])]+I2S(r)+" |r"
endif
else
if r<10 then
set K39=K39+Hj+"| |r"+W[GetPlayerId(N8[i])]+"0"+I2S(r)+" |r"
else
set K39=K39+Hj+"| |r"+W[GetPlayerId(N8[i])]+I2S(r)+" |r"
endif
endif
set KL9=KL9+1
endif
set i=i+1
endloop
if KL9>0 then
set K39=Hj+"[Scourge: |r"+K39+Hj+"]|r"
endif
call MultiboardSetTitleText(NG4,KC9+" "+K39+" "+GetObjectName('n0E3')+" "+" - "+(O64)+" - "+("|c00ff0303"+I2S(C[GetPlayerId(G8[0])])+"|r/|c0020c000"+I2S(D4[GetPlayerId(G8[0])])+"|r"))
set x=1
set i=1
loop
exitwhen i>5
if KT8(G8[i])or GetPlayerSlotState(G8[i])==PLAYER_SLOT_STATE_LEFT then
set OZ9[x]=G8[i]
set x=x+1
endif
set i=i+1
endloop
set x=1
set i=1
loop
exitwhen i>5
if KT8(N8[i])or GetPlayerSlotState(N8[i])==PLAYER_SLOT_STATE_LEFT then
set OA9[x]=N8[i]
set x=x+1
endif
set i=i+1
endloop
set i=0
set OC9=0
loop
exitwhen i>O39
set YH8=MultiboardGetItem(NG4,i,OC9)
call MultiboardSetItemWidth(YH8,.075)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OB9=0
set OC9=0
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8," ")
call MultiboardReleaseItem(YH8)
set OC9=0
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,false,false)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mE(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mE(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OB9=OB9+1
set OC9=0
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,false,false)
call MultiboardReleaseItem(YH8)
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,true)
call MultiboardSetItemValue(YH8,"("+mg(OZ9[i])+")")
call MultiboardSetItemIcon(YH8,mD(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,true)
call MultiboardSetItemValue(YH8,"("+mg(OA9[i])+")")
call MultiboardSetItemIcon(YH8,mD(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OB9=OB9+1
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+"Items"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,false,true)
call MultiboardSetItemIcon(YH8,me(OZ9[i],1))
call MultiboardSetItemWidth(YH8,.015)
call MultiboardReleaseItem(YH8)
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,false,true)
call MultiboardSetItemIcon(YH8,me(OZ9[i],2))
call MultiboardSetItemWidth(YH8,.054)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,false,true)
call MultiboardSetItemIcon(YH8,me(OA9[i],1))
call MultiboardSetItemWidth(YH8,.015)
call MultiboardReleaseItem(YH8)
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,false,true)
call MultiboardSetItemIcon(YH8,me(OA9[i],2))
call MultiboardSetItemWidth(YH8,.054)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OB9=OB9+1
set OC9=0
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+" "+e)
call MultiboardReleaseItem(YH8)
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,false,true)
call MultiboardSetItemIcon(YH8,me(OZ9[i],3))
call MultiboardSetItemWidth(YH8,.015)
call MultiboardReleaseItem(YH8)
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,false,true)
call MultiboardSetItemIcon(YH8,me(OZ9[i],4))
call MultiboardSetItemWidth(YH8,.054)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,false,true)
call MultiboardSetItemIcon(YH8,me(OA9[i],3))
call MultiboardSetItemWidth(YH8,.015)
call MultiboardReleaseItem(YH8)
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,false,true)
call MultiboardSetItemIcon(YH8,me(OA9[i],4))
call MultiboardSetItemWidth(YH8,.054)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OB9=OB9+1
set OC9=0
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+" "+e)
call MultiboardReleaseItem(YH8)
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,false,true)
call MultiboardSetItemIcon(YH8,me(OZ9[i],5))
call MultiboardSetItemWidth(YH8,.015)
call MultiboardReleaseItem(YH8)
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,false,true)
call MultiboardSetItemIcon(YH8,me(OZ9[i],6))
call MultiboardSetItemWidth(YH8,.054)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,false,true)
call MultiboardSetItemIcon(YH8,me(OA9[i],5))
call MultiboardSetItemWidth(YH8,.015)
call MultiboardReleaseItem(YH8)
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,false,true)
call MultiboardSetItemIcon(YH8,me(OA9[i],6))
call MultiboardSetItemWidth(YH8,.054)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+"Current Gold"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mf(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mf(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+"Hero K/D/A"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mi(OZ9[i])+"/"+mI(OZ9[i])+"/"+OW9(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mi(OA9[i])+"/"+mI(OA9[i])+"/"+OW9(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+"Wards"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mG(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mG(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+"Towers Kills"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mm(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mm(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+"Creep Stats"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mj(OZ9[i])+"/"+mJ(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mj(OA9[i])+"/"+mJ(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+"Neutral Kills"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mk(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mk(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+"Hero Kill Gold"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mh(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mh(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+"Time Dead"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mM(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mM(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+"Gold Lost"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mH(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mH(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+"Consumables"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mF(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mF(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+"Double Kills"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mK(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mK(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+"Triple Kills"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,ml(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,ml(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+"Best Spree"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mL(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,mL(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
if XW8>0 and XV8>0 then
set OC9=0
set OL9=OB9
set O19=OC9
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+"Kill Details"+e)
call MultiboardReleaseItem(YH8)
set OB9=OL9
set x=1
loop
exitwhen x>XW8
set OC9=0
set OB9=OL9
set i=1
loop
exitwhen i>XV8
set OC9=x+(x-1)
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,false,true)
call MultiboardSetItemIcon(YH8,mD(OZ9[x]))
call MultiboardSetItemWidth(YH8,.01)
call MultiboardReleaseItem(YH8)
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,true)
call MultiboardSetItemIcon(YH8,mD(OA9[i]))
call MultiboardSetItemValue(YH8," "+mn(OZ9[x],OA9[i]))
call MultiboardSetItemWidth(YH8,.059)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set x=x+1
endloop
set x=XW8+1
loop
exitwhen x>(XV8+XW8)
set OC9=0
set OB9=OL9
set i=1
loop
exitwhen i>XW8
set OC9=x+(x-1)
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,false,true)
call MultiboardSetItemIcon(YH8,mD(OA9[x-XW8]))
call MultiboardSetItemWidth(YH8,.01)
call MultiboardReleaseItem(YH8)
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,true)
call MultiboardSetItemIcon(YH8,mD(OZ9[i]))
call MultiboardSetItemValue(YH8," "+mn(OA9[x-XW8],OZ9[i]))
call MultiboardSetItemWidth(YH8,.059)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set x=x+1
endloop
endif
set OB9=OB9+1
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+GetObjectName('n0HS')+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemValueColor(YH8,O09,O59,O29,O_9)
if mN(OZ9[i])==" " then
call MultiboardSetItemStyle(YH8,true,false)
else
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemIcon(YH8,(N18(Y7[GetPlayerId((OZ9[i]))])))
endif
call MultiboardSetItemValue(YH8,OT9(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemValueColor(YH8,O09,O59,O29,O_9)
if mN(OA9[i])==" " then
call MultiboardSetItemStyle(YH8,true,false)
else
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemIcon(YH8,(N18(Y7[GetPlayerId((OA9[i]))])))
endif
call MultiboardSetItemValue(YH8,OT9(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,c0+"Respawn"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
if mN(OZ9[i])==" "then
call MultiboardSetItemStyle(YH8,true,false)
else
call MultiboardSetItemStyle(YH8,true,true)
call MultiboardSetItemIcon(YH8,mD(OZ9[i]))
endif
call MultiboardSetItemValue(YH8,mN(OZ9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
if mN(OA9[i])==" "then
call MultiboardSetItemStyle(YH8,true,false)
else
call MultiboardSetItemStyle(YH8,true,true)
call MultiboardSetItemIcon(YH8,mD(OA9[i]))
endif
call MultiboardSetItemValue(YH8,mN(OA9[i]))
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,HS7+"AI Actions"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
set KJ9=KG9(GetPlayerId(OZ9[i]),true)
if OZ9[i]==RT4 then
set KJ9=HV7
endif
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,KJ9)
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
set KJ9=KG9(GetPlayerId(OA9[i]),true)
if OA9[i]==RU4 then
set KJ9=HV7
endif
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,KJ9)
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set OC9=0
set OB9=OB9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,FG7+"Exp.|r - "+FH7+"Gold|r"+e)
call MultiboardReleaseItem(YH8)
set OC9=0
set i=1
loop
exitwhen i>XW8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
set KJ9=FG7+"+"+I2S(R2I(GetPlayerHandicapXPBJ(OZ9[i])-100.))+"%|r - "+FH7+"+"+I2S(AV4[48+GetPlayerId(OZ9[i])])+"|r"
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,KJ9)
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
set i=1
loop
exitwhen i>XV8
set OC9=OC9+1
set YH8=MultiboardGetItem(NG4,OB9,OC9)
set KJ9=FG7+"+"+I2S(R2I(GetPlayerHandicapXPBJ(OA9[i])-100.))+"%|r - "+FH7+"+"+I2S(AV4[48+GetPlayerId(OA9[i])])+"|r"
call MultiboardSetItemStyle(YH8,true,false)
call MultiboardSetItemValue(YH8,KJ9)
call MultiboardSetItemWidth(YH8,.07)
call MultiboardReleaseItem(YH8)
set i=i+1
endloop
endfunction
function P49 takes integer Z77,integer m5 returns boolean
local integer i=Tb-1
local real P79=0
local real NO8=(TimerGetElapsed(E4))
local integer P89=0
loop
exitwhen i==Tb or P79>wb or P89>200
if i==0 then
set i=8000-1
endif
set P89=P89+1
set P79=NO8-Mb[i]
if pb[i]==Z77 and Qb[i]==m5 and P79<wb then
set pb[i]=0
set Qb[i]=0
return true
endif
set i=i-1
endloop
return false
endfunction
function NH9 takes nothing returns nothing
local integer Z77=GetPlayerId(GetOwningPlayer(GetEventDamageSource()))
local integer m5=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
local real P99=GetEventDamage()
set Mb[Tb]=(TimerGetElapsed(E4))
set pb[Tb]=Z77
set Qb[Tb]=m5
set Tb=Tb+1
if Tb==8000 then
set Tb=1
endif
endfunction
function PD9 takes unit S4,unit PE9 returns string
local integer i=1
local integer PF9=GetPlayerId(GetOwningPlayer(S4))
local integer PG9=GetPlayerId(GetOwningPlayer(PE9))
local integer PH9
local string PI9=" "+GetObjectName('n0JY')+" "
local boolean PJ9=false
loop
exitwhen i>5
if IsJWPlayer(GetOwningPlayer(PE9))then
set PH9=GetPlayerId(G8[i])
else
set PH9=GetPlayerId(N8[i])
endif
if PG9!=PH9 and P49(PH9,PF9)then
set IU[PH9]=IU[PH9]+1
call X48("Assist"+I2S(PH9),PF9)
if PJ9 then
set PI9=PI9+"/"+W[PH9]+(KW4[GetPlayerId((Player(PH9)))])+"|r"
else
set PI9=PI9+W[PH9]+(KW4[GetPlayerId((Player(PH9)))])+"|r"
endif
set PJ9=true
endif
set i=i+1
endloop
if PJ9 then
return PI9
endif
return" "
endfunction
function PK9 takes integer Z77,integer m5 returns boolean
local integer i=Tb-1
local real P79=0
local real NO8=(TimerGetElapsed(E4))
local integer P89=0
loop
exitwhen i==Tb or P79>wb or P89>200
if i==0 then
set i=8000-1
endif
set P89=P89+1
set P79=NO8-Mb[i]
if pb[i]==Z77 and Qb[i]==m5 and P79<wb then
return true
endif
set i=i-1
endloop
return false
endfunction
function PM9 takes unit S4,unit PE9 returns boolean
local integer i=1
local integer PF9=GetPlayerId(GetOwningPlayer(S4))
local integer PG9=GetPlayerId(GetOwningPlayer(PE9))
local integer PH9
local string PI9=" Assists: "
local boolean PJ9=false
local integer x=1
set JU[1]=null
set JU[2]=null
set JU[3]=null
set JU[4]=null
set JU[5]=null
loop
exitwhen i>5
if IsJWPlayer(GetOwningPlayer(PE9))then
set PH9=GetPlayerId(G8[i])
else
set PH9=GetPlayerId(N8[i])
endif
if PG9!=PH9 and PK9(PH9,PF9)then
set JU[x]=Player(PH9)
set x=x+1
set PJ9=true
endif
set i=i+1
endloop
return PJ9
endfunction
function PN9 takes unit S4,unit PE9 returns string
local integer i=1
local integer PF9=GetPlayerId(GetOwningPlayer(S4))
local integer PG9=GetPlayerId(GetOwningPlayer(PE9))
local integer PH9
local string PI9=""
local boolean PJ9=false
loop
exitwhen i>5
if IsJWPlayer(GetOwningPlayer(PE9))then
set PH9=GetPlayerId(G8[i])
else
set PH9=GetPlayerId(N8[i])
endif
if PG9!=PH9 and PK9(PH9,PF9)then
if PJ9 then
set PI9=PI9+"/"+W[PH9]+(KW4[GetPlayerId((Player(PH9)))])+"|r"
else
set PI9=PI9+W[PH9]+(KW4[GetPlayerId((Player(PH9)))])+"|r"
endif
set PJ9=true
endif
set i=i+1
endloop
if PJ9 then
return PI9
endif
return" "
endfunction
function PO9 takes unit S4,unit PE9 returns integer
local integer i=1
local integer PF9=GetPlayerId(GetOwningPlayer(S4))
local integer PG9=GetPlayerId(GetOwningPlayer(PE9))
local integer PH9
local integer P89=0
loop
exitwhen i>5
if IsJWPlayer(GetOwningPlayer(PE9))then
set PH9=GetPlayerId(G8[i])
else
set PH9=GetPlayerId(N8[i])
endif
if PG9!=PH9 and PK9(PH9,PF9)then
set P89=P89+1
endif
set i=i+1
endloop
return P89
endfunction
function PP9 takes unit PQ9 returns boolean
return GetUnitTypeId(PQ9)=='H00I' or GetUnitTypeId(PQ9)=='H00J'
endfunction
function PR9 takes unit PQ9 returns boolean
local integer EC8=GetHandleId(GetOwningPlayer(PQ9))
local unit YZ8=LUnit(EC8,"Kobold0")
local unit YA8=LUnit(EC8,"Kobold1")
local unit YB8=LUnit(EC8,"Kobold2")
local unit YC8=LUnit(EC8,"Kobold3")
local unit Y38=LUnit(EC8,"Kobold4")
if GetUnitAbilityLevel(YZ8,'A0OV')!=0 or GetUnitAbilityLevel(YA8,'A0OV')!=0 or GetUnitAbilityLevel(YB8,'A0OV')!=0 or GetUnitAbilityLevel(YC8,'A0OV')!=0 or GetUnitAbilityLevel(Y38,'A0OV')!=0 then
return true
endif
set YZ8=null
set YA8=null
set YB8=null
set YC8=null
set Y38=null
return false
endfunction
function PS9 takes unit PQ9 returns boolean
local integer i=0
local integer EC8=GetHandleId(GetOwningPlayer(PQ9))
local unit PT9=LUnit(EC8,"Kobold0")
loop
exitwhen i>5
if(GetItemTypeId(UnitItemInSlot(PT9,i))==BU[F1]and GetItemCharges(UnitItemInSlot(PT9,i))>0)or(T_7 and GetItemTypeId(UnitItemInSlot(PT9,i))==BU[U67])then
set PT9=null
return true
endif
set i=i+1
endloop
set PT9=null
return false
endfunction
function PU9 takes unit PQ9,location PV9 returns nothing
local integer EC8=GetHandleId(GetOwningPlayer(PQ9))
local unit YZ8=LUnit(EC8,"Kobold0")
local unit YA8=LUnit(EC8,"Kobold1")
local unit YB8=LUnit(EC8,"Kobold2")
local unit YC8=LUnit(EC8,"Kobold3")
local unit Y38=LUnit(EC8,"Kobold4")
if YZ8!=null then
call ReviveHeroLoc(YZ8,PV9,true)
call YP8(YZ8)
endif
if YA8!=null then
call ReviveHeroLoc(YA8,PV9,true)
call YP8(YA8)
endif
if YB8!=null then
call ReviveHeroLoc(YB8,PV9,true)
call YP8(YB8)
endif
if YC8!=null then
call ReviveHeroLoc(YC8,PV9,true)
call YP8(YC8)
endif
if Y38!=null then
call ReviveHeroLoc(Y38,PV9,true)
call YP8(Y38)
endif
set Y38=null
set YC8=null
set YB8=null
set YA8=null
set YZ8=null
endfunction
function PW9 takes unit AM7,real PX9,boolean PY9 returns nothing
set NM4=NM4+1
set NI4[NM4]=AM7
set NJ4[NM4]=ZM7()+PX9
set NK4[NM4]=PY9
endfunction
function PZ9 takes integer i returns nothing
local unit PQ9=NI4[i]
local player p4=GetOwningPlayer(PQ9)
local location PV9
if IsTZPlayer(p4)then
set PV9=GetRectCenter(PD)
else
set PV9=GetRectCenter(QD)
endif
if U9==false and O18(PQ9)then
call YS8(PQ9,p4,GetLocationX(PV9),GetLocationY(PV9),true)
if YU8(PQ9)==false or GetUnitAbilityLevel(PQ9,'A0MW')==0 then
call ReviveHeroLoc(PQ9,PV9,true)
else
call PU9(PQ9,PV9)
endif
call SetUnitState(PQ9,UNIT_STATE_MANA,GetUnitState(PQ9,UNIT_STATE_MAX_MANA))
endif
call RemoveLocation(PV9)
call K99(i)
set PQ9=null
set p4=null
set PV9=null
endfunction
function PA9 takes nothing returns boolean
local real NO8=ZM7()
local integer i
set i=1
loop
exitwhen i>NM4
if NJ4[i]<NO8 and NJ4[i]!=0 then
call PZ9(i)
endif
if NJ4[i]!=0 and O18(NI4[i])==false then
set NI4[i]=null
set NJ4[i]=0
set NK4[i]=false
endif
set i=i+1
endloop
return false
endfunction
function PB9 takes unit u returns string
local string s=GetObjectName('n0FO')
set s=XD8(s,"$hero",W[GetPlayerId(GetOwningPlayer(u))]+GetUnitName(u)+"|r")
return s
endfunction
function PC9 takes unit Z77 returns boolean
if GetOwningPlayer(Z77)!=GetLocalPlayer()then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,15,PB9(Y7[GetPlayerId(GetOwningPlayer(Z77))]))
endif
return false
endfunction
function P39 takes unit P69,unit PL9 returns nothing
if BS7(P69,PL9)>1200 or(O18(P69)and GetUnitTypeId(P69)=='H00K')then
if IsPlayerAlly(GetOwningPlayer(P69),GetOwningPlayer(PL9))==false then
call XK7(GetUnitName(P69)+" of player "+GetPlayerName(GetOwningPlayer(P69))+" gained "+I2S(ZI7(PL9))+" XP")
call AddHeroXP(P69,ZI7(PL9),true)
endif
endif
endfunction
function P19 takes nothing returns nothing
if AV7(GetEnumUnit(),BU[xuejingshi])!=null then
call SetItemCharges(AV7(GetEnumUnit(),BU[xuejingshi]),GetItemCharges(AV7(GetEnumUnit(),BU[xuejingshi]))+1)
endif
endfunction
function P09 takes nothing returns boolean
if(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitIllusion(GetFilterUnit())==false then
if IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(TY4))and AV7(GetFilterUnit(),BU[xuejingshi])!=null then
return true
endif
endif
return false
endfunction
function P59 takes nothing returns boolean
local item i
local integer P29
if UF4==0 and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitIllusion(GetFilterUnit())==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(UE4))then
if AV7(GetFilterUnit(),BU[yingzhilingkan])!=null then
set UF4=UF4+1
set P29=GetItemCharges(AV7(GetFilterUnit(),BU[yingzhilingkan]))
if P29==0 then
set P29=2
else
set P29=P29+1
endif
call SetItemCharges(AV7(GetFilterUnit(),BU[yingzhilingkan]),P29)
endif
endif
set i=null
return false
endfunction
function P_9 takes unit u,unit Q49 returns nothing
local group g=OG8()
set TY4=u
call GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),1625,Condition(function P09))
if IsUnitAlly(u,GetOwningPlayer(Q49))==false then
call GroupAddUnit(g,Q49)
endif
call ForGroup(g,function P19)
call OF8(g)
set g=null
endfunction
function Q79 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Q89=(LoadUnitHandle(R8,(W57),(335)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local real x
local real y
local real a
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
if GetTriggerUnit()!=Q89 then
call KillUnit(Q89)
endif
else
set a=GetUnitFacing(X77)*bj_RADTODEG
set x=GetUnitX(X77)+75
set y=GetUnitY(X77)+75
call SetUnitX(Q89,x)
call SetUnitY(Q89,y)
call IssueTargetOrderById(Q89,851983,X77)
endif
set t=null
set Q89=null
set X77=null
return false
endfunction
function Q99 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local unit Q89
if GetSummoningUnit()==AC7 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
set Q89=GetSummonedUnit()
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterDeathEvent(t,Q89)
call TriggerRegisterDeathEvent(t,X77)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function Q79))
call SaveUnitHandle(R8,(W57),(335),(Q89))
call SaveUnitHandle(R8,(W57),(17),(X77))
call UnitAddAbility(Q89,'Aloc')
call SetUnitPosition(Q89,GetUnitX(X77)+'d',GetUnitY(X77)+'d')
call IssueTargetOrderById(Q89,851983,X77)
call SetUnitMoveSpeed(Q89,522)
endif
set t=null
set X77=null
set Z77=null
set AC7=null
return false
endfunction
function QD9 takes unit Z77,unit Q49 returns nothing
local unit X77=Q49
local unit AC7
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
if WL8(X77)then
set X77=(Y7[GetPlayerId(GetOwningPlayer((X77)))])
endif
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function Q99))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call AddPermanentAbility(AC7,'A2E7')
call IssueTargetOrderById(AC7,852274,X77)
set t=null
set X77=null
set AC7=null
endfunction
function QE9 takes nothing returns boolean
if(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitIllusion(GetFilterUnit())==false then
if IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(TY4))==false and AV7(GetFilterUnit(),BU[fenzhengmiansha2])!=null then
endif
endif
return false
endfunction
function QF9 takes unit u returns nothing
local group g=OG8()
set TY4=u
call GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),1625,Condition(function QE9))
call OF8(g)
set g=null
endfunction
function QG9 takes unit u returns nothing
local group g=OG8()
set UF4=0
set UE4=u
call GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),1425,Condition(function P59))
call OF8(g)
set UF4=0
set g=null
endfunction
function QH9 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer QI9=LInt(EC8,"side")
local integer i=1
local player p
local string M6
loop
exitwhen i>5
if QI9==0 then
set p=G8[i]
set M6=W[GetPlayerId(G8[0])]+(GetObjectName(('n03N')))+"|r "+(GetObjectName(('n03P')))+" "+W[GetPlayerId(G8[0])]+(GetObjectName(('n03Q')))+"|r"
else
set p=N8[i]
set M6=W[GetPlayerId(N8[0])]+(GetObjectName(('n03O')))+"|r "+(GetObjectName(('n03P')))+" "+W[GetPlayerId(N8[0])]+(GetObjectName(('n03Q')))+"|r"
endif
call DisplayTimedTextToPlayer(p,0,0,10,M6)
call TP8(XO,p)
set i=i+1
endloop
call LT7(EC8)
call EA8(t)
set t=null
return false
endfunction
function QJ9 takes integer QI9 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1.5,false)
call TriggerAddCondition(t,Condition(function QH9))
call SInt(EC8,"side",QI9)
set t=null
endfunction
function QK9 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer QM9=LInt(EC8,"soundIndex")
local string M6=EQ8(EC8,"msg")
if QM9==1 then
call TO8(nX)
elseif QM9==2 then
call TO8(CR)
elseif QM9==3 then
call TO8(IP)
elseif QM9==4 then
call TO8(JP)
endif
call NN8(T9,10.,M6)
call LT7(EC8)
call EA8(t)
set t=null
return false
endfunction
function QN9 takes string M6,integer QM9 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1.5,false)
call TriggerAddCondition(t,Condition(function QK9))
call DS8(EC8,"msg",M6)
call SInt(EC8,"soundIndex",QM9)
set t=null
endfunction
function QO9 takes player QP9,integer QQ9,unit PQ9 returns nothing
local texttag t=CreateTextTag()
local string s
call SetPlayerState(QP9,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(QP9,PLAYER_STATE_RESOURCE_GOLD)+QQ9)
call SetTextTagText(t,"+"+I2S(QQ9),.025)
call SetTextTagPosUnit(t,PQ9,0)
call SetTextTagColor(t,255,220,0,255)
call SetTextTagVelocity(t,0,.03)
if GetLocalPlayer()==QP9 then
call SetTextTagVisibility(t,true)
set s="UI\\Feedback\\GoldCredit\\GoldCredit.mdl"
else
call SetTextTagVisibility(t,false)
set s=""
endif
if GetUnitState(PQ9,UNIT_STATE_LIFE)>.5 then
call DestroyEffect(AddSpecialEffectTarget(s,PQ9,"overhead"))
endif
call SetTextTagFadepoint(t,2)
call SetTextTagLifespan(t,3)
call SetTextTagPermanent(t,false)
endfunction
function QR9 takes unit PQ9,unit QS9,real M38 returns nothing
local integer i=1
local integer C77=0
call PM9(PQ9,QS9)
loop
exitwhen i>5
if JU[i]!=null then
set C77=C77+1
endif
set i=i+1
endloop
set i=1
loop
exitwhen i>5
if JU[i]!=null then
set WQ4[GetPlayerId(JU[i])]=WQ4[GetPlayerId(JU[i])]+R2I(M38/ C77)
call QO9(JU[i],R2I(M38/ C77),Y7[GetPlayerId(JU[i])])
endif
set i=i+1
endloop
endfunction
function QT9 takes player QU9,integer QQ9 returns nothing
local integer T8=1
local integer Jg
if IsJWPlayer(QU9)then
set Jg=MI8(E8)
else
set Jg=MI8(F8)
endif
if IsJWPlayer(QU9)then
loop
exitwhen T8>5
if KS8(G8[T8])then
set WQ4[GetPlayerId(G8[T8])]=WQ4[GetPlayerId(G8[T8])]+QQ9/ Jg
call QO9(G8[T8],QQ9/ Jg,Y7[GetPlayerId(G8[T8])])
endif
set T8=T8+1
endloop
else
loop
exitwhen T8>5
if KS8(N8[T8])then
set WQ4[GetPlayerId(N8[T8])]=WQ4[GetPlayerId(N8[T8])]+QQ9/ Jg
call QO9(N8[T8],QQ9/ Jg,Y7[GetPlayerId(N8[T8])])
endif
set T8=T8+1
endloop
endif
endfunction
function QV9 takes unit PQ9,integer QW9 returns nothing
local player p4=GetOwningPlayer(PQ9)
call SetPlayerState(p4,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p4,PLAYER_STATE_RESOURCE_GOLD)-QW9)
endfunction
function QX9 takes nothing returns boolean
if GetUnitTypeId(GetFilterUnit())=='o003'then
call KillUnit(GetFilterUnit())
return true
endif
return false
endfunction
function QY9 takes nothing returns nothing
local boolexpr QZ9=Condition(function QX9)
local group QA9=OG8()
call GroupEnumUnitsInRect(QA9,bj_mapInitialPlayableArea,QZ9)
call OF8(QA9)
set QA9=null
endfunction
function QB9 takes player QC9 returns boolean
return(QC9==O8)
endfunction
function Q39 takes nothing returns boolean
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and GetUnitTypeId(GetTriggerUnit())!='N0MM' then
if GetUnitTypeId(GetTriggerUnit())=='H00J' and PS9(GetTriggerUnit())then
return false
endif
return true
endif
return false
endfunction
function Q69 takes player QL9,player QP9,unit QS9 returns boolean
return QS9==null or GetKillingUnit()==null or(IsJWPlayer(QL9)and IsJWPlayer(QP9))or(IsTZPlayer(QL9)and IsTZPlayer(QP9))
endfunction
function Q19 takes nothing returns nothing
if XC8(GetUnitTypeId(GetEnumUnit()))==false then
set NC4=NC4+1
if GetOwningPlayer(GetKillingUnit())!=GetOwningPlayer(GetEnumUnit())then
set N34=N34+1
endif
endif
endfunction
function Q09 takes nothing returns nothing
if(GetUnitTypeId((GetEnumUnit()))=='H00J')==false and XC8(GetUnitTypeId(GetFilterUnit()))==false then
call AddHeroXP(GetEnumUnit(),NZ4,true)
set NA4[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=NA4[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]+NZ4
if GetOwningPlayer(GetKillingUnit())!=GetOwningPlayer(GetEnumUnit())then
set NB4[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=NB4[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]+NY4
set WQ4[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=WQ4[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]+NY4
call QO9(GetOwningPlayer(GetEnumUnit()),NY4,GetEnumUnit())
endif
endif
endfunction
function Q59 takes nothing returns boolean
local integer ML8
local integer Q29=0
local integer Q_9=0
local group g
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and IsUnitIllusion(GetTriggerUnit())==false and(GetUnitTypeId((GetTriggerUnit()))=='H00J')==false and XC8(GetUnitTypeId(GetTriggerUnit()))==false then
set ML8=GetHeroLevel(GetTriggerUnit())
set NZ4=0
set NY4=0
set g=OG8()
set NC4=0
set N34=0
call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),1200+25,Condition(function V98))
call ForGroup(g,function Q19)
if NC4==1 then
set Q29=20*ML8+'x'
elseif NC4==2 then
set Q29=15*ML8+90
elseif NC4==3 then
set Q29=7*ML8+30
elseif NC4==4 then
set Q29=5*ML8+20
elseif NC4==5 then
set Q29=4*ML8+15
endif
if N34==1 then
set Q_9=12*ML8+'}'
elseif N34==2 then
set Q_9=10*ML8+40
elseif N34==3 then
set Q_9=6*ML8
elseif N34==4 then
set Q_9=6*ML8
elseif N34==5 then
set Q_9=6*ML8
endif
if F7 then
endif
set NZ4=Q29
set NY4=Q_9
call ForGroup(g,function Q09)
call OF8(g)
set g=null
endif
return false
endfunction
function R49 takes nothing returns nothing
local boolean R79=false
local unit PQ9=GetDyingUnit()
local unit QS9=GetKillingUnit()
local player QP9=GetOwningPlayer(QS9)
local player QL9=GetOwningPlayer(PQ9)
local integer QQ9=0
local integer R89=0
local boolean R99=false
local string RD9=""
local string RE9=""
local string RF9=""
local string MidText
local integer x
local string RG9
local string RH9
local string RI9
local string RJ9
local boolean PY9=false
local real RK9=1
local real RM9=1
local real RN9=1
local real RO9=1
local real RP9=0
local trigger t
local integer RQ9
local integer RR9
local item RS9
local integer id
local integer RT9=GetPlayerState(QL9,PLAYER_STATE_RESOURCE_GOLD)
local integer RU9=RT9-WQ4[GetPlayerId(QL9)]
local unit RV9
local unit RW9
local boolean RX9=LState(PQ9,"4418")
if IsPlayerAlly(QP9,QL9)==false and QB9(QP9)==false then
call Q59()
endif
if RX9 then
set IH4[GetPlayerId((QL9))]=true
endif
if QS9==null and GetUnitTypeId(PQ9)=='Npbm' then
set QS9=BG4
set QP9=GetOwningPlayer(QS9)
endif
if IsPlayerAlly(QP9,QL9)and LState(QS9,"4328")and K27!=null then
set QS9=K27
set QP9=GetOwningPlayer(QS9)
endif
if LState(PQ9,"4333")then
set QS9=PR4
set QP9=GetOwningPlayer(QS9)
endif
set RR9=PO9(PQ9,QS9)
if QS9!=null then
set id=GetUnitTypeId(QS9)
call P39(Y7[GetPlayerId(GetOwningPlayer(QS9))],PQ9)
endif
if Q69(QL9,QP9,QS9)==false and RR9==1 and IsPlayer(QP9)==false and QP9!=O8 then
call PM9(PQ9,QS9)
set QP9=JU[1]
set QS9=Y7[GetPlayerId(QP9)]
endif
set HA4[GetPlayerId(GetOwningPlayer((PQ9)))]=true
if GetUnitAbilityLevel(PQ9,'A0OV')!=0 or(PP9(PQ9)and PR9(PQ9))then
set PY9=true
call UnitRemoveAbility(PQ9,'A0OV')
set W8=PQ9
set ox=QS9
if IsUnitType(QS9,UNIT_TYPE_STRUCTURE)==false then
endif
endif
if QP9==null then
set QP9=QL9
endif
if Y4 and GetUnitTypeId(PQ9)!='H00J'then
if(GetPlayerController(GetOwningPlayer(GetDyingUnit()))==MAP_CONTROL_USER)then
set jx=UnitRemoveItemFromSlot(PQ9,GetRandomInt(0,5))
if GetItemTypeId(jx)=='I00K' then
call CreateItem('I00G',GetItemX(jx),GetItemY(jx))
call RemoveItem(jx)
endif
elseif(IsUnitInForce(GetDyingUnit(),RX4))then
set jx=UnitItemInSlot(GetDyingUnit(),GetRandomInt(0,5))
if(jx==null)then
elseif(GetItemType(jx)==ITEM_TYPE_PURCHASABLE)then
call UnitRemoveItem(GetDyingUnit(),jx)
else
set RS9=CreateItem(GetItemTypeId(jx),GetUnitX(GetDyingUnit()),GetUnitY(GetDyingUnit()))
call SetItemPlayer(RS9,GetOwningPlayer(GetDyingUnit()),false)
set hG[128+GetPlayerId(GetOwningPlayer(GetDyingUnit()))]=hG[128+GetPlayerId(GetOwningPlayer(GetDyingUnit()))]+GP8(GetItemTypeId(jx))
if((GetItemTypeId(jx)==BU[euldeshenshengfazhang])or(GetItemTypeId(jx)==BU[sanshizhiren]))then
call SetItemCharges(RS9,GetItemCharges(jx))
endif
endif
endif
endif
if IsJWPlayer(QL9)then
if IsJWPlayer(QP9)then
set R79=true
if(QP9==QL9)then
call NN8(T9,10.,(W[GetPlayerId(QL9)]+(KW4[GetPlayerId((QL9))])+"|r "+(GetObjectName(('n03R')))))
else
call NN8(T9,10.,XM8(QL9,QP9))
endif
elseif IsTZPlayer(QP9)then
set R99=true
set D4[GetPlayerId(G8[0])]=D4[GetPlayerId(G8[0])]+1
set C[GetPlayerId(N8[0])]=C[GetPlayerId(N8[0])]+1
set T[2]=T[2]+1
set T[1]=0
if QP9!=N8[0]then
set C[GetPlayerId(QP9)]=C[GetPlayerId(QP9)]+1
set P[GetPlayerId(QP9)]=P[GetPlayerId(QP9)]+1
endif
endif
endif
if IsTZPlayer(QL9)then
if IsTZPlayer(QP9)then
set R79=true
if(QP9==QL9)then
call NN8(T9,10.,(W[GetPlayerId(QL9)]+(KW4[GetPlayerId((QL9))])+"|r "+(GetObjectName(('n03R')))))
else
call NN8(T9,10.,XM8(QL9,QP9))
endif
elseif IsJWPlayer(QP9)then
set R99=true
set D4[GetPlayerId(N8[0])]=D4[GetPlayerId(N8[0])]+1
set C[GetPlayerId(G8[0])]=C[GetPlayerId(G8[0])]+1
set T[1]=T[1]+1
set T[2]=0
if QP9!=G8[0]then
set C[GetPlayerId(QP9)]=C[GetPlayerId(QP9)]+1
set P[GetPlayerId(QP9)]=P[GetPlayerId(QP9)]+1
endif
endif
endif
if QP9==O8 then
set R99=false
if GetUnitTypeId(QS9)=='n00L' then
call NN8(T9,10.,(W[GetPlayerId(QL9)]+(KW4[GetPlayerId((QL9))])+"|r "+(GetObjectName(('n03T')))))
else
call NN8(T9,10.,(W[GetPlayerId(QL9)]+(KW4[GetPlayerId((QL9))])+"|r "+(GetObjectName(('n03U')))))
endif
set R79=true
endif
if S34 then
call S68(DO,GetUnitX(PQ9),GetUnitY(PQ9))
endif
call X48("Hero"+I2S(GetPlayerId(QL9)),GetPlayerId(QP9))
set x=P[GetPlayerId(QL9)]
if x>2 and R79==false then
if x==3 then
set QQ9=125
set RD9="|c0000ff40"+(GetObjectName(('n04L')))+"|r"
elseif x==4 then
set QQ9='}'
set RD9="|c00400080"+(GetObjectName(('n04N')))+"|r"
elseif x==5 then
set QQ9=375
set RD9="|c00ff0080"+(GetObjectName(('n04M')))+"|r"
elseif x==6 then
set QQ9=500
set RD9="|c00ff8000"+(GetObjectName(('n04J')))+"|r"
elseif x==7 then
set QQ9=625
set RD9="|c00808000"+(GetObjectName(('n04I')))+"|r"
elseif x==8 then
set QQ9=750
set RD9="|c00ff80ff"+(GetObjectName(('n03V')))+"|r"
elseif x==9 then
set QQ9=875
set RD9="|c00ff0000"+(GetObjectName(('n03W')))+"|r"
else
set QQ9=1000
set RD9="|c00ff8000"+(GetObjectName(('n03X')))+"|r"
call Achieve(QL9,'CJ06')
call Achieve(QP9,'CJ07')
endif
endif
set x=P[GetPlayerId(QP9)]
if x>NO4[GetPlayerId(QP9)]then
set NO4[GetPlayerId(QP9)]=x
endif
set RV9=QS9
if IsUnitType(RV9,UNIT_TYPE_HERO)==false then
set RV9=Y7[GetPlayerId(GetOwningPlayer(RV9))]
endif
if x>2 and GetUnitTypeId(RV9)!='U00F' and O04[GetPlayerId(GetOwningPlayer(RV9))]==0 then
endif
set RW9=PQ9
if IsUnitType(RW9,UNIT_TYPE_HERO)==false then
set RW9=Y7[GetPlayerId(GetOwningPlayer(RW9))]
endif
if R79==false and R99 then
endif
if x>2 and R79==false then
if x==3 then
call TO8(VO)
set RE9=" "+(GetObjectName(('n04K')))+" |c0000ff40"+(GetObjectName(('n04L')))+"|r"+(GetObjectName(('n049')))
elseif x==4 then
call TO8(CN)
set RE9=" "+(GetObjectName(('n04H')))+" |c00400080"+(GetObjectName(('n04N')))+"|r"+(GetObjectName(('n049')))
elseif x==5 then
call TO8(YO)
set RE9=" "+(GetObjectName(('n04G')))+" |c00ff0080"+(GetObjectName(('n04M')))+"|r"+(GetObjectName(('n049')))
elseif x==6 then
call TO8(DP)
set RE9=" "+(GetObjectName(('n04H')))+" |c00ff8000"+(GetObjectName(('n04J')))+"|r"+(GetObjectName(('n04A')))
elseif x==7 then
call TO8(GP)
set RE9=" "+(GetObjectName(('n04H')))+" |c00808000"+(GetObjectName(('n04I')))+"|r"+(GetObjectName(('n04A')))
elseif x==8 then
call TO8(ZO)
set RE9=" "+(GetObjectName(('n04G')))+" |c00ff80ff"+(GetObjectName(('n03V')))+"|r"+(GetObjectName(('n04A')))
elseif x==9 then
call TO8(JO)
set RE9=" "+(GetObjectName(('n04H')))+" |c00ff0000"+(GetObjectName(('n03W')))+"|r"+(GetObjectName(('n04B')))
else
call TO8(PO)
set RE9=" "+(GetObjectName(('n04H')))+" |c00ff8000"+(GetObjectName(('n03X')))+"|r. "+(GetObjectName(('n04F')))+(GetObjectName(('n04B')))
endif
endif
if R79==false then
set QQ9=QQ9+'d'+GetHeroLevel(PQ9)*9+'d'
set RG9=W[GetPlayerId(QL9)]+(KW4[GetPlayerId((QL9))])+"|r"
set RH9=W[GetPlayerId(QP9)]+(KW4[GetPlayerId((QP9))])+"|r"
set RJ9="|c00FFDC00"+I2S(QQ9)+"|r"
if QP9==G8[0]or QP9==N8[0]then
if RR9==0 then
if QP9==G8[0]then
set RI9=RH9+" "+(GetObjectName(('n042')))+" "+RG9+(GetObjectName(('n043')))+(GetObjectName(('n049')))+" "+RJ9+" "+(GetObjectName(('n044')))+"."
call QT9(QP9,QQ9)
elseif QP9==N8[0]then
set RI9=RH9+" "+(GetObjectName(('n042')))+" "+RG9+(GetObjectName(('n043')))+(GetObjectName(('n049')))+" "+RJ9+" "+(GetObjectName(('n044')))+"."
call QT9(QP9,QQ9)
endif
elseif RR9>1 then
set RI9=RH9+" "+(GetObjectName(('n042')))+" "+RG9+(GetObjectName(('n043')))+(GetObjectName(('n049')))+" "+RJ9+" "+(GetObjectName(('n044')))+"."
call QR9(PQ9,QS9,QQ9)
endif
elseif RD9=="" and RE9=="" then
set RI9=RH9+" "+(GetObjectName(('n042')))+" "+RG9+(GetObjectName(('n043')))+" "+(GetObjectName(('n04C')))+" "+RJ9+" "+(GetObjectName(('n045')))+(GetObjectName(('n049')))
elseif RD9=="" and RE9!="" then
set RI9=RH9+" "+(GetObjectName(('n042')))+" "+RG9+(GetObjectName(('n043')))+" "+(GetObjectName(('n04C')))+" "+RJ9+" "+(GetObjectName(('n045')))+(GetObjectName(('n049')))
elseif RD9!="" and RE9=="" then
set RI9=RH9+" "+(GetObjectName(('n048')))+" "+RG9+(GetObjectName(('n047')))+" "+RD9+" "+(GetObjectName(('n046')))+" "+RJ9+" "+(GetObjectName(('n045')))+(GetObjectName(('n049')))
elseif RD9!="" and RE9!="" then
set RI9=RH9+" "+(GetObjectName(('n048')))+" "+RG9+(GetObjectName(('n047')))+" "+RD9+" "+(GetObjectName(('n046')))+" "+RJ9+" "+(GetObjectName(('n045')))+(GetObjectName(('n049')))
endif
if R99 then
set RF9=PD9(PQ9,QS9)
endif
call NN8(T9,10,RI9+RF9)
if RE9!="" then
call NN8(T9,10,RH9+RE9)
endif
set WQ4[GetPlayerId(QP9)]=WQ4[GetPlayerId(QP9)]+QQ9
call QO9(QP9,QQ9,PQ9)
set NS4[GetPlayerId(QP9)]=NS4[GetPlayerId(QP9)]+QQ9
if T[1]>4 then
call QJ9(0)
endif
if T[2]>4 then
call QJ9(1)
endif
endif
set R89=GetHeroLevel(PQ9)*30
if AV7(PQ9,BU[xuejingshi])!=null then
if GetItemCharges(AV7(PQ9,BU[xuejingshi]))>0 then
set RP9=-1*(4*GetItemCharges(AV7(PQ9,BU[xuejingshi])))
set R89=IMaxBJ(R2I(R89-25*GetItemCharges(AV7(PQ9,BU[xuejingshi]))),0)
endif
endif
if R89>RU9 then
set R89=RU9
endif
call P_9(PQ9,RV9)
call QG9(PQ9)
call QF9(PQ9)
if PY9==false then
set NN4[GetPlayerId(QL9)]=NN4[GetPlayerId(QL9)]+R89
call QV9(PQ9,R89)
endif
call SaveInteger(R8,StringHash("Stats"+I2S(GetPlayerId(QP9))),StringHash("Killed "+I2S(GetPlayerId(QL9))),((LoadInteger(R8,StringHash("Stats"+I2S(GetPlayerId(QP9))),StringHash("Killed "+I2S(GetPlayerId(QL9)))))+1))
call SaveInteger(R8,StringHash("Stats"+I2S(GetPlayerId(QL9))),StringHash("Died To "+I2S(GetPlayerId(QP9))),((LoadInteger(R8,StringHash("Stats"+I2S(GetPlayerId(QL9))),StringHash("Died To "+I2S(GetPlayerId(QP9)))))+1))
call StartTimerBJ(A[GetPlayerId(QP9)],false,18)
if R79==false and QP9!=G8[0]and QP9!=N8[0]and QP9!=O8 then
set Q[GetPlayerId(QP9)]=Q[GetPlayerId(QP9)]+1
if Q[GetPlayerId(QP9)]==2 then
set NP4[GetPlayerId(QP9)]=NP4[GetPlayerId(QP9)]+1
call QN9(W[GetPlayerId(QP9)]+(KW4[GetPlayerId((QP9))])+"|r "+(GetObjectName(('n04D')))+" |c000000ff"+(GetObjectName(('n04S')))+"|r"+(GetObjectName(('n049'))),1)
endif
if Q[GetPlayerId(QP9)]==3 then
set NQ4[GetPlayerId(QP9)]=NQ4[GetPlayerId(QP9)]+1
call QN9(W[GetPlayerId(QP9)]+(KW4[GetPlayerId((QP9))])+"|r "+(GetObjectName(('n04D')))+" |c0000ff40"+(GetObjectName(('n04E')))+"|r"+(GetObjectName(('n04B'))),2)
endif
if Q[GetPlayerId(QP9)]==4 then
set NQ4[GetPlayerId(QP9)]=NQ4[GetPlayerId(QP9)]+1
call QN9(W[GetPlayerId(QP9)]+(KW4[GetPlayerId((QP9))])+"|r "+(GetObjectName(('n04D')))+" |c0000FFFF"+(GetObjectName(('n0HJ')))+"|r"+(GetObjectName(('n04B'))),3)
endif
if Q[GetPlayerId(QP9)]>4 then
set NQ4[GetPlayerId(QP9)]=NQ4[GetPlayerId(QP9)]+1
call QN9(W[GetPlayerId(QP9)]+(KW4[GetPlayerId((QP9))])+"|r "+(GetObjectName(('n04K')))+" |c0000AAFF"+(GetObjectName(('n0HK')))+"|r"+(GetObjectName(('n04B'))),4)
call Achieve(QP9,'CJ12')
endif
endif
if(R79==false)then
set P[GetPlayerId(QL9)]=0
endif
set P[0]=0
set P[6]=0
set D4[GetPlayerId(QL9)]=D4[GetPlayerId(QL9)]+1
if PY9 then
set RK9=.4
endif
if R79 and GetUnitTypeId(PQ9)=='H00K' then
set RO9=.5
endif
set RQ9=R2I(GetHeroLevel(PQ9)*4*RK9*RM9*RN9*RO9)+R2I(RP9)
if BS then
set RQ9=R2I(RQ9*.5)
endif
if Mode_ND then
set RQ9=1
endif
if LongRevive then
set RQ9=R2I(RQ9*1.3)
set LongRevive=false
endif
if GetUnitAbilityLevel(PQ9,'A0MW')>0 then
set RQ9=R2I(RQ9*(1-GetUnitAbilityLevel(PQ9,'A0MW')*.1))
endif
if P74 then
set NR4[GetPlayerId(QL9)]=0
if GetPlayerController(QL9)==MAP_CONTROL_COMPUTER then
call TimerStart(L[GetPlayerId(QL9)],2.,false,null)
else
call TimerStart(L[GetPlayerId(QL9)],1.,false,null)
endif
else
set NR4[GetPlayerId(QL9)]=NR4[GetPlayerId(QL9)]+RQ9
call TimerStart(L[GetPlayerId(QL9)],RQ9,false,null)
endif
call TriggerExecute(vA)
if T4==false and SC4==false then
call PW9(PQ9,RQ9,PY9)
elseif SC4 and GetPlayerController(QL9)==MAP_CONTROL_USER then
call PW9(PQ9,1,false)
else
if(IsJWPlayer(QL9))then
set R4[0]=R4[0]+1
endif
if IsTZPlayer(QL9)then
set R4[1]=R4[1]+1
endif
set D8[GetPlayerId(QL9)]=PQ9
if GetUnitTypeId(PQ9)=='H00J' then
set D8[GetPlayerId(QL9)]=LUnit(GetHandleId(GetOwningPlayer(PQ9)),"Kobold0")
endif
if R4[0]==P84 then
call TriggerExecute(O94)
endif
if R4[1]==P84 then
call TriggerExecute(O84)
endif
if(GetUnitTypeId(PQ9)=='U006')then
call ExecuteFunc("QY9")
elseif GetUnitTypeId(PQ9)=='U008' or GetUnitTypeId(PQ9)=='E015' then
set IE4=PQ9
call ExecuteFunc("RY9")
elseif GetUnitTypeId(PQ9)=='Ucrl' then
set IE4=PQ9
call ExecuteFunc("RZ9")
endif
endif
set RS9=null
set t=null
set QS9=null
set PQ9=null
endfunction
function RA9 takes nothing returns boolean
local unit Q89=GetSummonedUnit()
local integer x
if IsUnitIllusion(Q89)then
set x=P[GetPlayerId(GetOwningPlayer(Q89))]
if x>2 and O04[GetPlayerId(GetOwningPlayer(Q89))]==0 then
call AddPermanentAbility(Q89,'A2KJ')
else
call UnitRemoveAbility(Q89,'A2KJ')
endif
endif
set Q89=null
return false
endfunction
function InitTrig_Image_Enters takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function RA9))
set t=null
endfunction
function RB9 takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local player QP9=GetOwningPlayer(GetKillingUnit())
local player QL9=GetOwningPlayer(GetTriggerUnit())
local string RC9
local integer RR9=PO9(GetTriggerUnit(),GetKillingUnit())
if QP9==G8[0]or QP9==N8[0]then
call QR9(GetTriggerUnit(),GetKillingUnit(),200)
set RC9=PN9(GetTriggerUnit(),GetKillingUnit())+" "+(GetObjectName(('n04W')))+" |c00ff0303"+(GetObjectName(('n04Y')))+(GetObjectName(('n049')))+"|r "
if RR9>1 then
set RC9=RC9+"(+200 "+(GetObjectName(('n044')))+")"
else
set RC9=RC9+"(+200 "+(GetObjectName(('n045')))+")"
endif
else
set RC9=W[GetPlayerId(QP9)]+(KW4[GetPlayerId((QP9))])+"|r "+(GetObjectName(('n04W')))+" |c00ff0303"+(GetObjectName(('n04Y')))+(GetObjectName(('n049')))+"|r "
set RC9=RC9+"(+200 "+(GetObjectName(('n045')))+")"
call QO9(QP9,200,Y7[GetPlayerId(QP9)])
set WQ4[GetPlayerId(QP9)]=WQ4[GetPlayerId(QP9)]+200
call Achieve(QP9,'CJ01')
call Achieve(QL9,'CJ02')
endif
call NN8(T9,10,RC9)
call TO8(EX)
call EA8(t)
set t=null
endfunction
function R39 takes nothing returns boolean
if GetOwningPlayer(GetKillingUnit())!=O8 and GetKillingUnit()!=null and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and IsPlayerEnemy(GetOwningPlayer(GetTriggerUnit()),GetOwningPlayer(GetKillingUnit()))then
if GetOwningPlayer(GetKillingUnit())==G8[0]or GetOwningPlayer(GetKillingUnit())==N8[0]then
if PO9(GetTriggerUnit(),GetKillingUnit())>0 then
call RB9()
endif
else
call RB9()
endif
endif
return false
endfunction
function R69 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit u
local region r
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call LT7(EC8)
call EA8(t)
else
set u=LUnit(EC8,"u")
set r=CreateRegion()
call RegionAddRect(r,CE)
call RegionAddRect(r,dE)
if IsUnitInRegion(r,u)==false then
if LBool(EC8,"safe")then
call SBool(EC8,"safe",false)
else
call SetUnitX(u,GetRectCenterX(AD))
call SetUnitY(u,GetRectCenterY(AD))
call SBool(EC8,"safe",true)
endif
endif
call RemoveRegion(r)
set u=null
set r=null
endif
set t=null
return false
endfunction
function RL9 takes unit u returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,10.,true)
call TriggerAddCondition(t,Condition(function R69))
call SUnit(EC8,"u",u)
call SBool(EC8,"safe",true)
set t=null
endfunction
function R19 takes nothing returns boolean
local item JB9
local integer C77=GetTriggerEvalCount(GetTriggeringTrigger())
if C77==JU7 then
call EA8(GetTriggeringTrigger())
endif
if C77==JU7-180 or C77==JU7-60 then
if NT4!=null then
set JB9=AV7(NT4,BU[F1])
if JB9!=null then
if C77==JU7-180 then
if IsJWPlayer(GetOwningPlayer(NT4))then
call NN8(E8,15,(GetObjectName(('n0E9')))+" |c00ff0303"+(GetObjectName(('n0E7')))+"|r")
else
call NN8(F8,15,(GetObjectName(('n0E9')))+" |c00ff0303"+(GetObjectName(('n0E7')))+"|r")
endif
else
if IsJWPlayer(GetOwningPlayer(NT4))then
call NN8(E8,15,(GetObjectName(('n0E9')))+" |c00ff0303"+(GetObjectName(('n0DX')))+"|r")
else
call NN8(F8,15,(GetObjectName(('n0E9')))+" |c00ff0303"+(GetObjectName(('n0DX')))+"|r")
endif
endif
endif
endif
endif
set JB9=null
return false
endfunction
function R09 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1.,true)
call TriggerAddCondition(t,Condition(function R19))
call TriggerEvaluate(t)
set t=null
endfunction
function R59 takes nothing returns boolean
set NV4=GetTriggerEvalCount(GetTriggeringTrigger())
if C4!=null and GetUnitState(C4,UNIT_STATE_LIFE)>1 then
call SetPlayerTechResearched(GetOwningPlayer(C4),'R00F',NV4)
if GetUnitAbilityLevel(C4,'A142')==0 then
call UnitAddAbility(C4,'A142')
endif
call SetUnitAbilityLevel(C4,'A142',NV4+1)
endif
return false
endfunction
function TimerOff takes nothing returns nothing
local timer tm=GetExpiredTimer()
call PauseTimer(tm)
call FlushChildHashtable(R8,GetHandleId(tm))
call DestroyTimer(tm)
set tm=null
endfunction
function TriggerOff takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
call DisableTrigger(t)
call FlushChildHashtable(R8,GetHandleId(t))
call DestroyTrigger(t)
set t=null
endfunction
function AegisRecoverFunc takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
local integer i=50-SAInt(h,"i",1)
if i==0 or GetTriggerEventId()==EVENT_UNIT_DAMAGED then
call TriggerOff()
set s=null
return
endif
call SetUnitState(s,UNIT_STATE_LIFE,GetUnitState(s,UNIT_STATE_LIFE)+(GetUnitState(s,UNIT_STATE_MAX_LIFE)-GetUnitState(s,UNIT_STATE_LIFE))/ i)
set s=null
endfunction
function AegisRecover takes unit s returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function AegisRecoverFunc))
call SUnit(GetHandleId(t),"s",s)
set t=null
endfunction
function R29 takes nothing returns nothing
local integer i=1
local unit N28
set NT4=null
loop
exitwhen i>5
set N28=Y7[GetPlayerId(G8[i])]
if N28!=null and AV7(N28,BU[F1])!=null then
call DisableTrigger(GW4)
call X48("AegisOff",GetPlayerId(GetOwningPlayer(N28)))
call RemoveItem(AV7(N28,BU[F1]))
call AegisRecover(N28)
call EnableTrigger(GW4)
endif
set N28=Y7[GetPlayerId(N8[i])]
if N28!=null and AV7(N28,BU[F1])!=null then
call DisableTrigger(GW4)
call X48("AegisOff",GetPlayerId(GetOwningPlayer(N28)))
call RemoveItem(AV7(N28,BU[F1]))
call AegisRecover(N28)
call EnableTrigger(GW4)
endif
set i=i+1
endloop
set N28=null
endfunction
function R_9 takes string S49,string S79 returns string
local string s=(GetObjectName(('n0CA')))
set s=XD8(s,"$team",S49)
set s=XD8(s,"$team",S79)
return s
endfunction
function S89 takes nothing returns boolean
return GetUnitTypeId(GetDyingUnit())=='n00L'
endfunction
function IsHero takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)!=null)
endfunction
function S99 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local location SD9
local real PE8
if GetTriggerEvalCount(t)==JT7 or AS4 then
set AS4=false
set SD9=GetRectCenter(AD)
call R29()
set NX4=NX4+1
set C4=CreateUnitAtLoc(Player(12),'n00L',SD9,bj_UNIT_FACING)
call SetUnitAcquireRange(C4,150)
call RL9(C4)
call UnitAddAbility(C4,'A142')
call SetPlayerTechResearched(GetOwningPlayer(C4),'R00F',NV4)
call SetUnitAbilityLevel(C4,'A142',NV4+1)
call RemoveLocation(SD9)
if NX4>1 then
call UnitRemoveAbility(C4,'A0K2')
call UnitAddAbility(C4,'A0Q6')
call UnitAddItem(C4,CreateItem(BU[VB],0,0))
endif
call UnitAddItem(C4,CreateItem(BU[F1],0,0))
call EA8(t)
set IE7=99999999.
elseif GetTriggerEvalCount(t)==JU7 then
call R29()
set IE7=99999999.
endif
set t=null
set SD9=null
return false
endfunction
function SE9 takes nothing returns nothing
local trigger t=CreateTrigger()
set JT7=GetRandomInt(480,660)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function S99))
set AS4=false
call R09()
set NU4=false
if(IsJWPlayer(GetOwningPlayer(GetKillingUnit())))then
call X48("Roshan",0)
call NN8(bj_FORCE_ALL_PLAYERS,10.,R_9("|c00ff0000"+(GetObjectName(('n065')))+"|r",(GetObjectName(('n065')))))
call AdjustPlayerStateBJ(200,G8[1],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(200,G8[2],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(200,G8[3],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(200,G8[4],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(200,G8[5],PLAYER_STATE_RESOURCE_GOLD)
endif
if(IsTZPlayer(GetOwningPlayer(GetKillingUnit())))then
call X48("Roshan",1)
call NN8(bj_FORCE_ALL_PLAYERS,10.,R_9("|c00004000"+(GetObjectName(('n06C')))+"|r",(GetObjectName(('n06C')))))
call AdjustPlayerStateBJ(200,N8[1],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(200,N8[2],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(200,N8[3],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(200,N8[4],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(200,N8[5],PLAYER_STATE_RESOURCE_GOLD)
endif
set t=null
endfunction
function SF9 takes nothing returns nothing
local texttag t=CreateTextTag()
local unit u=GetTriggerUnit()
local player p=GetOwningPlayer(GetKillingUnit())
call SetTextTagText(t,"$",.027)
call SetTextTagPosUnit(t,u,0)
call SetTextTagColorBJ(t,KX4[GetPlayerId(p)],KY4[GetPlayerId(p)],KZ4[GetPlayerId(p)],15)
call SetTextTagVelocity(t,0,.035)
call SetTextTagFadepoint(t,3)
call SetTextTagLifespan(t,1.5)
call SetTextTagPermanent(t,false)
call SetTextTagVisibility(t,false)
if GetLocalPlayer()==KU4 or GetLocalPlayer()==KV4 then
call SetTextTagVisibility(t,true)
endif
set t=null
set u=null
set p=null
endfunction
function SG9 takes unit u,player p returns nothing
local texttag t=CreateTextTag()
call SetTextTagText(t,"!",.03)
call SetTextTagPosUnit(t,u,0)
call SetTextTagColorBJ(t,KX4[GetPlayerId(p)],KY4[GetPlayerId(p)],KZ4[GetPlayerId(p)],15)
call SetTextTagVelocity(t,0,.035)
call SetTextTagFadepoint(t,3)
call SetTextTagLifespan(t,1.5)
call SetTextTagPermanent(t,false)
call SetTextTagVisibility(t,false)
if ob[GetPlayerId(GetLocalPlayer())]or(L8 and(GetLocalPlayer()==KU4 or GetLocalPlayer()==KV4))then
call SetTextTagVisibility(t,true)
endif
set t=null
endfunction
function SH9 takes nothing returns nothing
if true then
call AddHeroXP(GetEnumUnit(),H34/ HB4,true)
else
call AddHeroXP(GetEnumUnit(),HC4/ HB4,true)
endif
endfunction
function SI9 takes nothing returns nothing
local group g=OG8()
local integer SJ9
local integer SK9=18
local integer SM9=SK9*2
call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),1200+25,Condition(function V98))
set SJ9=TE8(g)
set HB4=SJ9
set HC4=SK9
set H34=SM9
call ForGroup(g,function SH9)
call OF8(g)
call SG9(GetDyingUnit(),GetOwningPlayer(GetKillingUnit()))
if Mode_DB then
call AddLife(GetKillingUnit(),15)
call AddHeroXP(GetKillingUnit(),10,false)
call SetUnitState(GetKillingUnit(),UNIT_STATE_MANA,GetUnitState(GetKillingUnit(),UNIT_STATE_MANA)+5)
endif
set g=null
endfunction
function SN9 takes nothing returns boolean
if IsUnitAlly(GetKillingUnit(),GetOwningPlayer(GetTriggerUnit()))then
call SI9()
else
if L8 and IsPlayer(GetOwningPlayer(GetKillingUnit()))then
call SF9()
endif
endif
return false
endfunction
function SO9 takes player XN8,player XO8 returns string
local string s=(GetObjectName(('n0AP')))
set s=XD8(s,"$dead",(KW4[GetPlayerId((XN8))]))
return s
endfunction
function SP9 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
call SetTerrainPathable(x,y,PATHING_TYPE_WALKABILITY,false)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
return false
endfunction
function SQ9 takes unit Z77 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
call SetTerrainPathable(x,y,PATHING_TYPE_WALKABILITY,true)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function SP9))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
set Z77=null
set t=null
endfunction
function SR9 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit SS9=(LoadUnitHandle(R8,(W57),(2)))
local integer C77=GetTriggerEvalCount(t)
local integer ST9=180-C77
local integer i=1
local integer id
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
if LBool(W57,"NormalCourier")then
set ST9=140-C77
endif
loop
exitwhen i>5
if IsPlayerAlly(GetOwningPlayer(SS9),G8[0])then
set id=GetPlayerId(G8[i])
else
set id=GetPlayerId(N8[i])
endif
set i=i+1
if ST9==0 then
call LeaderboardDisplay(JG7[id],false)
if IsPlayerAlly(G8[0],Player(id))then
set JS7[GetPlayerId(G8[0])]=false
endif
if IsPlayerAlly(N8[0],Player(id))then
set JS7[GetPlayerId(N8[0])]=false
endif
else
if O18(Y7[id])==false then
call PlayerSetLeaderboard(Player(id),JG7[id])
call LeaderboardDisplay(JG7[id],true)
call LeaderboardSetLabel(JG7[id],"  "+GetObjectName('n0LZ')+" "+I2S(ST9))
endif
endif
endloop
if ST9==2 then
call SetUnitPosition(SS9,x,y)
endif
if ST9==0 then
call SBool(GetHandleId(SS9),"aiCrow|Alive",true)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set SS9=null
return false
endfunction
function SU9 takes player VR7,integer M38 returns nothing
local texttag t
if M38>0 then
set t=CreateTextTag()
call SetPlayerState(VR7,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(VR7,PLAYER_STATE_RESOURCE_GOLD)+M38)
call SetTextTagText(t,"+"+I2S(M38),.025)
call SetTextTagPosUnit(t,Y7[GetPlayerId(VR7)],0)
call SetTextTagColor(t,255,220,0,255)
call SetTextTagVelocity(t,0,.03)
if GetLocalPlayer()==VR7 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 SV9 takes nothing returns boolean
local real x
local real y
local unit SS9=GetTriggerUnit()
local integer i=1
local integer M18=150
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SBool(GetHandleId(SS9),"aiCrow|Alive",false)
call X48("Courier"+I2S(GetPlayerId(GetOwningPlayer(GetTriggerUnit()))),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call NN8(T9,10.,SO9(GetOwningPlayer(GetTriggerUnit()),GetOwningPlayer(GetKillingUnit())))
call PingMinimapEx(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),6,255,0,0,false)
call TriggerRegisterTimerEvent(t,1,true)
if IsChicken(GetTriggerUnit())then
call SBool(GetHandleId(t),"NormalCourier",true)
endif
call TriggerAddCondition(t,Condition(function SR9))
call SaveUnitHandle(R8,(W57),(2),(SS9))
if IsPlayerAlly(GetOwningPlayer(SS9),G8[0])and JS7[GetPlayerId(G8[0])]==false then
set JS7[GetPlayerId(G8[0])]=true
loop
exitwhen i>5
call SU9(N8[i],M18)
set i=i+1
endloop
endif
set i=1
if IsPlayerAlly(GetOwningPlayer(SS9),N8[0])and JS7[GetPlayerId(N8[0])]==false then
set JS7[GetPlayerId(N8[0])]=true
loop
exitwhen i>5
call SU9(G8[i],M18)
set i=i+1
endloop
endif
if IsJWPlayer(GetOwningPlayer(SS9))then
set x=GetRectCenterX(QD)
set y=GetRectCenterY(QD)
else
set x=GetRectCenterX(PD)
set y=GetRectCenterY(PD)
endif
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
if IsTerrainPathable(GetUnitX(SS9),GetUnitY(SS9),PATHING_TYPE_WALKABILITY)then
call SQ9(SS9)
endif
set t=null
return false
endfunction
function SW9 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x=IK4
local real y=IM4
if IsTZPlayer(GetOwningPlayer(Z77))then
set x=JQ4
set y=JR4
endif
if O18(Z77)==false then
if Z87(GetUnitX(Z77),GetUnitY(Z77),x,y)<800 then
call AddPermanentAbility(Z77,'Avul')
else
call UnitRemoveAbility(Z77,'Avul')
endif
endif
set t=null
set Z77=null
return false
endfunction
function SX9 takes unit SS9 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SetPlayerAbilityAvailable(GetOwningPlayer(SS9),'A29N',false)
call UnitMakeAbilityPermanent(SS9,true,'A29M')
call TriggerRegisterDeathEvent(t,SS9)
call TriggerAddCondition(t,Condition(function SV9))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function SW9))
call SaveUnitHandle(R8,(W57),(2),(SS9))
set t=null
endfunction
function SY9 takes nothing returns nothing
if IsCourier(GetTriggerUnit())and IsUnitIllusion(GetTriggerUnit())==false then
call X48("Courier"+I2S(GetPlayerId(GetOwningPlayer(GetTriggerUnit()))),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call NN8(T9,10.,SO9(GetOwningPlayer(GetTriggerUnit()),GetOwningPlayer(GetKillingUnit())))
call PingMinimapEx(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),6,255,0,0,false)
endif
endfunction
function SZ9 takes nothing returns boolean
call EA8(GetTriggeringTrigger())
set JS7[GetPlayerId(G8[0])]=false
set JS7[GetPlayerId(N8[0])]=false
set JG7[GetPlayerId(G8[1])]=CreateLeaderboard()
set JG7[GetPlayerId(G8[2])]=CreateLeaderboard()
set JG7[GetPlayerId(G8[3])]=CreateLeaderboard()
set JG7[GetPlayerId(G8[4])]=CreateLeaderboard()
set JG7[GetPlayerId(G8[5])]=CreateLeaderboard()
set JG7[GetPlayerId(N8[1])]=CreateLeaderboard()
set JG7[GetPlayerId(N8[2])]=CreateLeaderboard()
set JG7[GetPlayerId(N8[3])]=CreateLeaderboard()
set JG7[GetPlayerId(N8[4])]=CreateLeaderboard()
set JG7[GetPlayerId(N8[5])]=CreateLeaderboard()
call PlayerSetLeaderboard(G8[1],JG7[GetPlayerId(G8[1])])
call PlayerSetLeaderboard(G8[2],JG7[GetPlayerId(G8[2])])
call PlayerSetLeaderboard(G8[3],JG7[GetPlayerId(G8[3])])
call PlayerSetLeaderboard(G8[4],JG7[GetPlayerId(G8[4])])
call PlayerSetLeaderboard(G8[5],JG7[GetPlayerId(G8[5])])
call PlayerSetLeaderboard(N8[1],JG7[GetPlayerId(N8[1])])
call PlayerSetLeaderboard(N8[2],JG7[GetPlayerId(N8[2])])
call PlayerSetLeaderboard(N8[3],JG7[GetPlayerId(N8[3])])
call PlayerSetLeaderboard(N8[4],JG7[GetPlayerId(N8[4])])
call PlayerSetLeaderboard(N8[5],JG7[GetPlayerId(N8[5])])
call LeaderboardDisplay(JG7[GetPlayerId(G8[1])],false)
call LeaderboardDisplay(JG7[GetPlayerId(G8[2])],false)
call LeaderboardDisplay(JG7[GetPlayerId(G8[3])],false)
call LeaderboardDisplay(JG7[GetPlayerId(G8[4])],false)
call LeaderboardDisplay(JG7[GetPlayerId(G8[5])],false)
call LeaderboardDisplay(JG7[GetPlayerId(N8[1])],false)
call LeaderboardDisplay(JG7[GetPlayerId(N8[2])],false)
call LeaderboardDisplay(JG7[GetPlayerId(N8[3])],false)
call LeaderboardDisplay(JG7[GetPlayerId(N8[4])],false)
call LeaderboardDisplay(JG7[GetPlayerId(N8[5])],false)
call LeaderboardSetLabelBJ(JG7[GetPlayerId(G8[1])]," ")
call LeaderboardSetLabelBJ(JG7[GetPlayerId(G8[2])]," ")
call LeaderboardSetLabelBJ(JG7[GetPlayerId(G8[3])]," ")
call LeaderboardSetLabelBJ(JG7[GetPlayerId(G8[4])]," ")
call LeaderboardSetLabelBJ(JG7[GetPlayerId(G8[5])]," ")
call LeaderboardSetLabelBJ(JG7[GetPlayerId(N8[1])]," ")
call LeaderboardSetLabelBJ(JG7[GetPlayerId(N8[2])]," ")
call LeaderboardSetLabelBJ(JG7[GetPlayerId(N8[3])]," ")
call LeaderboardSetLabelBJ(JG7[GetPlayerId(N8[4])]," ")
call LeaderboardSetLabelBJ(JG7[GetPlayerId(N8[5])]," ")
return false
endfunction
function SA9 takes nothing returns nothing
local integer id=GetUnitTypeId(GetTriggerUnit())
if id=='e00R' or id=='e011' or id=='e00S' or id=='e019' or id=='u00M' or id=='u00D' or id=='u00N' or id=='u00T' then
if IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit()))then
set N64[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=N64[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
call NN8(T9,10,W[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+(KW4[GetPlayerId((GetOwningPlayer(GetKillingUnit())))])+"|r "+(GetObjectName(('n04P')))+".")
else
call NN8(T9,10,W[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+(KW4[GetPlayerId((GetOwningPlayer(GetKillingUnit())))])+"|r "+(GetObjectName(('n0EN')))+".")
endif
endif
endfunction
function SB9 takes nothing returns nothing
if IsCourier(GetEnumUnit())and IsUnitAlly(GetEnumUnit(),G8[0])==false and GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)>.5 then
call UnitRemoveAbility(GetEnumUnit(),'B08H')
call Dmg(IN4,GetEnumUnit(),HeroNormal,500)
endif
endfunction
function SC9 takes nothing returns nothing
if IsCourier(GetEnumUnit())and IsUnitAlly(GetEnumUnit(),N8[0])==false and GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)>.5 then
call UnitRemoveAbility(GetEnumUnit(),'B08H')
call Dmg(JS4,GetEnumUnit(),HeroNormal,500)
endif
endfunction
function S39 takes nothing returns boolean
local group g=OG8()
call GroupEnumUnitsInRect(g,BD,Condition(function KF8))
call ForGroup(g,function SB9)
call OF8(g)
set g=OG8()
call GroupEnumUnitsInRect(g,LD,Condition(function KF8))
call ForGroup(g,function SC9)
call OF8(g)
set g=null
return false
endfunction
function S69 takes unit u returns boolean
return(GetUnitAbilityLevel((u),('B00H'))>0)or(GetUnitAbilityLevel((u),('BOhx'))>0)or(GetUnitAbilityLevel((u),('BPSE'))>0)or(GetUnitAbilityLevel((u),('B099'))>0)or(GetUnitAbilityLevel((u),('BSTN'))>0)or(GetUnitAbilityLevel((u),('B0CF'))>0)or(GetUnitAbilityLevel((u),('B0BM'))>0)or(GetUnitAbilityLevel((u),('B06M'))>0)or(GetUnitAbilityLevel((u),('B07N'))>0)or(GetUnitAbilityLevel((u),('B08S'))>0)or(GetUnitAbilityLevel((u),('B00Q'))>0)or(GetUnitAbilityLevel((u),('B04V'))>0)or(GetUnitAbilityLevel((u),('B072'))>0)or(GetUnitAbilityLevel((u),('BUan'))>0)or(GetUnitAbilityLevel((u),('B095'))>0)or(GetUnitAbilityLevel((u),('B03I'))>0)or(GetUnitAbilityLevel((u),('B0AD'))>0)or(GetUnitAbilityLevel((u),('B0AE'))>0)or(GetUnitAbilityLevel((u),('B0BE'))>0)or(GetUnitAbilityLevel((u),('B0BF'))>0)or(GetUnitAbilityLevel((u),('B008'))>0)or(GetUnitAbilityLevel((u),('B04B'))>0)or(GetUnitAbilityLevel((u),('B02F'))>0)or(GetUnitAbilityLevel((u),('BUsp'))>0)or(GetUnitAbilityLevel((u),('BUst'))>0)or(GetUnitAbilityLevel((u),('B0DD'))>0)or(LState(u,"DisruptionState"))or(LState(u,"AstralImprisonmentState"))or(GetUnitAbilityLevel((u),('B0C2'))>0)or(GetUnitAbilityLevel((u),('B06S'))>0)or(GetUnitAbilityLevel((u),('B02S'))>0)or(GetUnitAbilityLevel((u),('B07E'))>0)
endfunction
function SL9 takes unit u returns boolean
return S69(u)or UD8(u)or IsUnitPaused(u)or NH8(u)
endfunction
function S19 takes unit Y47 returns boolean
return(IsUnitType(Y47,UNIT_TYPE_STUNNED)or IsUnitType(Y47,UNIT_TYPE_SNARED)or IsUnitType(Y47,UNIT_TYPE_POLYMORPHED)or GetUnitMoveSpeed(Y47)<290 or IsUnitPaused(Y47))or S69(Y47)or UD8(Y47)
endfunction
function S09 takes integer S59,integer S29,boolean extraColor returns nothing
local integer x=0
loop
exitwhen x>15
call SetPlayerState(Player(x),PLAYER_STATE_RESOURCE_LUMBER,S59)
call SetPlayerState(Player(x),PLAYER_STATE_RESOURCE_FOOD_USED,S29)
set x=x+1
endloop
endfunction
function S_9 takes unit u returns boolean
local integer id=GetUnitTypeId(u)
return id=='n027' or id=='u014' or id=='u015' or id=='u016' or id=='u01D' or id=='u01E' or id=='u01F' or id=='u017' or id=='u019' or id=='u018' or id=='u01A' or id=='u01B' or id=='u01C'
endfunction
function T49 takes unit u,boolean b returns nothing
call SetUnitInvulnerable(u,b)
call SaveBoolean(R8,(GetHandleId(u)),(509),(b))
endfunction
function T79 takes unit u returns boolean
return(LoadBoolean(R8,(GetHandleId(u)),(509)))or GetUnitAbilityLevel(u,'Avul')>0
endfunction
function T89 takes real x,real y returns location
local real S_8
local real T48
local integer i=0
loop
exitwhen i>40
set S_8=x+i*20
set T48=y+i*20
if IsPointInRegion(IF4,S_8,T48)==false then
return Location(S_8,T48)
endif
set S_8=x+i*20
set T48=y-i*20
if IsPointInRegion(IF4,S_8,T48)==false then
return Location(S_8,T48)
endif
set S_8=x-i*20
set T48=y+i*20
if IsPointInRegion(IF4,S_8,T48)==false then
return Location(S_8,T48)
endif
set S_8=x-i*20
set T48=y-i*20
if IsPointInRegion(IF4,S_8,T48)==false then
return Location(S_8,T48)
endif
set i=i+1
endloop
return Location(x,y)
endfunction
function T99 takes unit Z77,integer ML8,integer TD9 returns nothing
local integer i
if YG4[1]==0 then
return
endif
set i=1
loop
exitwhen i>10
call UnitRemoveAbility(Z77,YG4[i])
set i=i+1
endloop
set i=1
loop
exitwhen i>10
call UnitRemoveAbility(Z77,YH4[i])
set i=i+1
endloop
set i=1
loop
exitwhen i>10
call UnitRemoveAbility(Z77,YI4[i])
set i=i+1
endloop
set i=1
loop
exitwhen i>10
call UnitRemoveAbility(Z77,YJ4[i])
set i=i+1
endloop
call UnitRemoveAbility(Z77,'B0BS')
if ML8==1 then
call UnitAddAbility(Z77,YG4[TD9])
elseif ML8==2 then
call UnitAddAbility(Z77,YH4[TD9])
elseif ML8==3 then
call UnitAddAbility(Z77,YI4[TD9])
elseif ML8==4 then
call UnitAddAbility(Z77,YJ4[TD9])
endif
endfunction
function TE9 takes integer TC8 returns nothing
set UO4=UO4+1
set UN4[UO4]=TC8
endfunction
function TF9 takes unit u returns nothing
local integer i=1
loop
exitwhen i>UO4
call UnitRemoveAbility(u,UN4[i])
set i=i+1
endloop
endfunction
function IsPurgeId takes integer OL8 returns boolean
return OL8=='AIpg' or OL8=='A02V' or OL8=='ACpu' or OL8=='A18D' or OL8=='A1OU' or OL8=='AIcy' or OL8=='A1SA' or OL8=='AZ3A' or OL8=='A2T2'
endfunction
function TH9 takes unit X77 returns nothing
call UnitRemoveAbility(X77,'A1JA')
call UnitRemoveAbility(X77,'B0CD')
call UnitRemoveAbility(X77,'A1LD')
call UnitRemoveAbility(X77,'Aetl')
call UnitRemoveAbility(X77,'A0FZ')
call UnitRemoveAbility(X77,'A26W')
call UnitRemoveAbility(X77,'B0EJ')
if LBool(GetHandleId(X77),"AphoticShield|Active")then
call TriggerEvaluate(LTrig(GetHandleId(X77),"AphoticShield|Trigger"))
endif
call T99(X77,0,0)
endfunction
function TI9 takes nothing returns boolean
if IsPurgeId(GetSpellAbilityId())then
call TH9(GetSpellTargetUnit())
endif
return false
endfunction
function TJ9 takes integer TK9 returns integer
if FV[TK9]==0 then
return TK9
else
return FV[TK9]
endif
endfunction
function TM9 takes nothing returns nothing
local integer TN9=R2I(TimerGetElapsed(E4)-M04)
local integer S59=TN9/ 60-1/ 2
local integer S29=ModuloInteger(TN9,60)
if AG4 then
call S09(S59,S29,false)
elseif R94==false then
set TN9=R2I(16-TimerGetElapsed(E4))
set S59=TN9/ 60-1/ 2
set S29=ModuloInteger(TN9,60)
call S09(S59,S29,true)
endif
set Bz=R2I(TimerGetElapsed(E4)-M54)
set O4=S59
set P4=S29
if E then
set TN9=0
loop
exitwhen TN9>11
set OY7[16+TN9]=0
set TN9=TN9+1
endloop
endif
endfunction
function TO9 takes unit TP9,integer TQ9 returns integer
local integer i
if TQ9==1 then
if GetUnitAbilityLevel(TP9,'A500')>0 then
return 500
endif
set i=KC4
loop
exitwhen i>KL4
if GetUnitAbilityLevel(TP9,G04[i])>0 then
return i
endif
set i=i+1
endloop
return 0
elseif TQ9==2 then
if GetUnitAbilityLevel(TP9,'A501')>0 then
return 500
endif
set i=KC4
loop
exitwhen i>KL4
if GetUnitAbilityLevel(TP9,G54[i])>0 then
return i
endif
set i=i+1
endloop
return 0
elseif TQ9==3 then
if GetUnitAbilityLevel(TP9,'A502')>0 then
return 500
endif
set i=KC4
loop
exitwhen i>KL4
if GetUnitAbilityLevel(TP9,G24[i])>0 then
return i
endif
set i=i+1
endloop
return 0
elseif TQ9==4 then
if GetUnitAbilityLevel(TP9,'A503')>0 then
return 500
endif
set i=KC4
loop
exitwhen i>KL4
if GetUnitAbilityLevel(TP9,G_4[i])>0 or GetUnitAbilityLevel(TP9,H44[i])>0 then
return i
endif
set i=i+1
endloop
return 0
endif
return 0
endfunction
function TR9 takes item ZV7 returns boolean
local integer TS9=ZU7(ZV7)
return TS9==Agha or TS9==E_4 or TS9==F44 or TS9==F74 or TS9==F84 or TS9==F94 or TS9==FD4 or TS9==FE4 or TS9==FF4 or TS9==FG4 or TS9==FH4 or TS9==FJ4 or TS9==FK4 or TS9==FM4 or TS9==FN4 or TS9==FO4 or TS9==FP4 or TS9==FQ4 or TS9==FS4 or TS9==FT4 or TS9==FU4 or TS9==FW4 or TS9==FX4 or TS9==FY4 or TS9==FZ4 or TS9==FA4 or TS9==FB4 or TS9==F34 or TS9==F64 or TS9==FL4 or TS9==F14 or TS9==F04 or TS9==F54 or TS9==F24 or TS9==F_4 or TS9==FC4 or TS9==G44 or TS9==FI4 or TS9==G74 or TS9==G84 or TS9==G94 or TS9==GD4 or TS9==GE4 or TS9==GG4 or TS9==GH4 or TS9==GI4 or TS9==GJ4 or TS9==GK4 or TS9==GM4 or TS9==GN4 or TS9==GO4 or TS9==GQ4 or TS9==GP4 or TS9==GR4 or TS9==Saar_Agha or TS9==Puzzle_Agha or TS9==Goblin_Agha or TS9==DragonHawk_Agha or TS9==ShadowFiend_Agha or TS9==Medivh_Agha or(T27 and DV[TS9]=="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
endfunction
function TT9 takes integer TS9 returns boolean
return TS9==B5 or TS9==VB or TS9==WA or TS9==ZA or TS9==BA or TS9==FB or TS9==GB or TS9==JB or TS9==QB or TS9==YA or TS9==LB or TS9==EC or TS9==YB
endfunction
function TU9 takes integer TS9 returns boolean
return TS9==yingzhilingkan or TS9==zhangu or TS9==sanshizhiren or TS9==sanshizhiren2 or TS9==xuejingshi or TS9==F1 or TS9==mobang or TS9==mozhang or TS9==fenzhengmiansha2
endfunction
function TV9 takes integer TS9 returns integer
if BA==TS9 then
return 4
endif
if FB==TS9 or GB==TS9 or WB==TS9 or YA==TS9 or LB==TS9 or YB==TS9 then
return 2
endif
return 1
endfunction
function TW9 takes string winner returns nothing
local integer i
local player p
local string id
local integer D5=R2I(TimerGetElapsed(E4)-M04)
local integer TX9=D5/ 60-1/ 2
local integer S29=ModuloInteger(D5,60)
call W08()
set i=1
loop
exitwhen i>5
set p=G8[i]
set id=I2S(GetPlayerId(p))
call StoreInteger(IG4,id,"1",(C[GetPlayerId((p))]))
call StoreInteger(IG4,id,"2",(D4[GetPlayerId((p))]))
call StoreInteger(IG4,id,"3",(C7[GetPlayerId((p))]))
call StoreInteger(IG4,id,"4",(L7[GetPlayerId((p))]))
call StoreInteger(IG4,id,"5",(IU[GetPlayerId((p))]))
call StoreInteger(IG4,id,"6",(GetPlayerState((p),PLAYER_STATE_RESOURCE_GOLD)))
call StoreInteger(IG4,id,"7",(LoadInteger(R8,StringHash("Stats"+I2S(GetPlayerId((p)))),StringHash("NumOfNeutrals"))))
call StoreInteger(IG4,id,"8_0",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(0)))))
call StoreInteger(IG4,id,"8_1",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(1)))))
call StoreInteger(IG4,id,"8_2",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(2)))))
call StoreInteger(IG4,id,"8_3",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(3)))))
call StoreInteger(IG4,id,"8_4",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(4)))))
call StoreInteger(IG4,id,"8_5",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(5)))))
call StoreInteger(IG4,id,"9",(GetUnitTypeId(Y7[GetPlayerId((p))])))
call StoreInteger(IG4,id,"id",i)
set p=N8[i]
set id=I2S(GetPlayerId(p))
call StoreInteger(IG4,id,"1",(C[GetPlayerId((p))]))
call StoreInteger(IG4,id,"2",(D4[GetPlayerId((p))]))
call StoreInteger(IG4,id,"3",(C7[GetPlayerId((p))]))
call StoreInteger(IG4,id,"4",(L7[GetPlayerId((p))]))
call StoreInteger(IG4,id,"5",(IU[GetPlayerId((p))]))
call StoreInteger(IG4,id,"6",(GetPlayerState((p),PLAYER_STATE_RESOURCE_GOLD)))
call StoreInteger(IG4,id,"7",(LoadInteger(R8,StringHash("Stats"+I2S(GetPlayerId((p)))),StringHash("NumOfNeutrals"))))
call StoreInteger(IG4,id,"8_0",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(0)))))
call StoreInteger(IG4,id,"8_1",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(1)))))
call StoreInteger(IG4,id,"8_2",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(2)))))
call StoreInteger(IG4,id,"8_3",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(3)))))
call StoreInteger(IG4,id,"8_4",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(4)))))
call StoreInteger(IG4,id,"8_5",(GetItemTypeId(UnitItemInSlot(Y7[GetPlayerId((p))],(5)))))
call StoreInteger(IG4,id,"9",(GetUnitTypeId(Y7[GetPlayerId((p))])))
call StoreInteger(IG4,id,"id",i+5)
if GetLocalPlayer()==V8 then
call SyncStoredInteger(IG4,I2S(GetPlayerId(G8[i])),"1")
call SyncStoredInteger(IG4,I2S(GetPlayerId(G8[i])),"2")
call SyncStoredInteger(IG4,I2S(GetPlayerId(G8[i])),"3")
call SyncStoredInteger(IG4,I2S(GetPlayerId(G8[i])),"4")
call SyncStoredInteger(IG4,I2S(GetPlayerId(G8[i])),"5")
call SyncStoredInteger(IG4,I2S(GetPlayerId(G8[i])),"6")
call SyncStoredInteger(IG4,I2S(GetPlayerId(G8[i])),"7")
call SyncStoredInteger(IG4,I2S(GetPlayerId(G8[i])),"8_0")
call SyncStoredInteger(IG4,I2S(GetPlayerId(G8[i])),"8_1")
call SyncStoredInteger(IG4,I2S(GetPlayerId(G8[i])),"8_2")
call SyncStoredInteger(IG4,I2S(GetPlayerId(G8[i])),"8_3")
call SyncStoredInteger(IG4,I2S(GetPlayerId(G8[i])),"8_4")
call SyncStoredInteger(IG4,I2S(GetPlayerId(G8[i])),"8_5")
call SyncStoredInteger(IG4,I2S(GetPlayerId(G8[i])),"9")
call SyncStoredInteger(IG4,I2S(GetPlayerId(G8[i])),"id")
call SyncStoredInteger(IG4,I2S(GetPlayerId(N8[i])),"1")
call SyncStoredInteger(IG4,I2S(GetPlayerId(N8[i])),"2")
call SyncStoredInteger(IG4,I2S(GetPlayerId(N8[i])),"3")
call SyncStoredInteger(IG4,I2S(GetPlayerId(N8[i])),"4")
call SyncStoredInteger(IG4,I2S(GetPlayerId(N8[i])),"5")
call SyncStoredInteger(IG4,I2S(GetPlayerId(N8[i])),"6")
call SyncStoredInteger(IG4,I2S(GetPlayerId(N8[i])),"7")
call SyncStoredInteger(IG4,I2S(GetPlayerId(N8[i])),"8_0")
call SyncStoredInteger(IG4,I2S(GetPlayerId(N8[i])),"8_1")
call SyncStoredInteger(IG4,I2S(GetPlayerId(N8[i])),"8_2")
call SyncStoredInteger(IG4,I2S(GetPlayerId(N8[i])),"8_3")
call SyncStoredInteger(IG4,I2S(GetPlayerId(N8[i])),"8_4")
call SyncStoredInteger(IG4,I2S(GetPlayerId(N8[i])),"8_5")
call SyncStoredInteger(IG4,I2S(GetPlayerId(N8[i])),"9")
call SyncStoredInteger(IG4,I2S(GetPlayerId(N8[i])),"id")
endif
set i=i+1
endloop
if N_4==false then
call StoreInteger(IG4,"Global","Winner",O44)
call StoreInteger(IG4,"Global","m",TX9)
call StoreInteger(IG4,"Global","s",S29)
if GetLocalPlayer()==V8 then
call SyncStoredInteger(IG4,"Global","Winner")
call SyncStoredInteger(IG4,"Global","m")
call SyncStoredInteger(IG4,"Global","s")
endif
endif
endfunction
function YN8 takes nothing returns nothing
call TW9("1")
endfunction
function TY9 takes nothing returns boolean
call ExecuteFunc("OF9")
return false
endfunction
function TZ9 takes nothing returns nothing
call PK8(GetEnumUnit())
endfunction
function TA9 takes nothing returns nothing
local group g=OG8()
call GroupEnumUnitsInRange(g,0,0,12000,Condition(function UB8))
call ForGroup(g,function TZ9)
call OF8(g)
set g=null
endfunction
function TB9 takes nothing returns nothing
call DisableTrigger(R34)
call DisableTrigger(R64)
call DisableTrigger(RL4)
call DisableTrigger(R14)
call DisableTrigger(RZ4)
call DisableTrigger(IF7)
call DisableTrigger(RB4)
call DisableTrigger(GD7)
call DisableTrigger(Hn)
endfunction
function TC9 takes nothing returns nothing
set bj_changeLevelShowScores=true
call DisableTrigger(O84)
call DisableTrigger(O94)
call ExecuteFunc("T39")
if L8 then
call DisableTrigger(NH4)
endif
call DisableTrigger(M14)
call ClearTextMessages()
call NN8(bj_FORCE_ALL_PLAYERS,60,ND+" "+(GetObjectName(('n054')))+" www.getdota.com.")
set U9=true
call O38()
call DisableTrigger(JS)
call DisableTrigger(FS)
call DisableTrigger(ML4)
call OZ8()
call TB9()
endfunction
function T69 takes nothing returns nothing
local trigger t=CreateTrigger()
call PanCameraToTimed(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),0)
call TriggerRegisterTimerEvent(t,6.5,false)
call TriggerAddCondition(t,Condition(function TY9))
set O44=2
set ND="|c0020c000"+(GetObjectName(('n03O')))+"|r"
call TC9()
call TA9()
call TW9("2")
set t=null
endfunction
function TL9 takes nothing returns boolean
call SetUnitVertexColorBJ(JV4,'d','d','d',GetTriggerEvalCount(GetTriggeringTrigger()))
if GetTriggerEvalCount(GetTriggeringTrigger())=='d' then
call ShowUnit(JV4,false)
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function T19 takes nothing returns nothing
local trigger t=CreateTrigger()
call PanCameraToTimed(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),0)
call TriggerRegisterTimerEvent(t,3.5,false)
call TriggerAddCondition(t,Condition(function TY9))
set O44=1
set ND="|c00ff0303"+(GetObjectName(('n03N')))+"|r"
call TC9()
call TA9()
call TW9("1")
call AddSpecialEffect("war3mapImported\\FrozenThronesDeath2.mdx",GetUnitX(JV4)+150,GetUnitY(JV4)+'d')
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function TL9))
set t=null
endfunction
function T09 takes unit T59 returns boolean
local unit T29=Y7[GetPlayerId(GetOwningPlayer(T59))]
if((GetUnitX(T29)-GetUnitX(T59))*(GetUnitX(T29)-GetUnitX(T59))+(GetUnitY(T29)-GetUnitY(T59))*(GetUnitY(T29)-GetUnitY(T59))>=855625)then
set T29=null
return true
endif
set T29=null
return false
endfunction
function T_9 takes nothing returns nothing
local unit N99=GetAttacker()
local integer U49=UnitInventorySize(N99)
local integer x=0
local item i
loop
exitwhen x>U49
set i=UnitItemInSlot(N99,x)
if ZX7(i)==biaoqiang and GetRandomReal(0,1)<=.2 and UN8(N99)==false then
if UX8(N99)then
if T09(N99)==false then
if GetUnitAbilityLevel(GetTriggerUnit(),'A04R')==0 then
call Dmg(N99,GetTriggerUnit(),HeroNormal,40)
endif
endif
else
if GetUnitAbilityLevel(GetTriggerUnit(),'A04R')==0 then
call Dmg(N99,GetTriggerUnit(),HeroNormal,40)
endif
endif
endif
set x=x+1
endloop
set i=null
set N99=null
endfunction
function U79 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real U89=(LoadReal(R8,(GetHandleId(Z77)),(692)))
if GetTriggerEventId()==EVENT_WIDGET_DEATH or U89<(TimerGetElapsed(E4))then
call UnitRemoveAbility(Z77,'A265')
call UnitRemoveAbility(Z77,'B08N')
call UnitRemoveAbility(Z77,'A26C')
call SaveReal(R8,(GetHandleId(Z77)),(692),((0)*1.))
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function U99 takes unit Z77 returns nothing
local trigger t
local integer W57
local real U89=(LoadReal(R8,(GetHandleId(Z77)),(692)))
call SaveReal(R8,(GetHandleId(Z77)),(692),(((TimerGetElapsed(E4))+EG7)*1.))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,EG7+.01,false)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerAddCondition(t,Condition(function U79))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call AddPermanentAbility(Z77,'A265')
call AddPermanentAbility(Z77,'A26C')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A265',false)
set t=null
endfunction
function UD9 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
if GetEventDamageSource()==Z77 and GetEventDamage()>0 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
if S_9(X77)==false then
call U99(X77)
endif
endif
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function UE9 takes nothing returns nothing
local unit Z77=GetAttacker()
local unit X77=GetTriggerUnit()
local trigger t
local integer W57
if LState(Z77,"4309")==false then
call AddTimedBoolBuff(Z77,"4309",.2)
if GetRandomReal(0,'d')<EF7 then
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerAddCondition(t,Condition(function UD9))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
endif
endif
set Z77=null
set X77=null
endfunction
function UF9 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real U89=(LoadReal(R8,(GetHandleId(Z77)),(693)))
if GetTriggerEventId()==EVENT_WIDGET_DEATH or U89<(TimerGetElapsed(E4))then
call UnitRemoveAbility(Z77,'A266')
call UnitRemoveAbility(Z77,'B02I')
call UnitRemoveAbility(Z77,'A26C')
call SaveReal(R8,(GetHandleId(Z77)),(693),((0)*1.))
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function UG9 takes unit Z77 returns nothing
local trigger t
local integer W57
local real U89=(LoadReal(R8,(GetHandleId(Z77)),(693)))
call SaveReal(R8,(GetHandleId(Z77)),(693),(((TimerGetElapsed(E4))+EI7)*1.))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,EI7+.01,false)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerAddCondition(t,Condition(function UF9))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call AddPermanentAbility(Z77,'A266')
call AddPermanentAbility(Z77,'A26C')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A266',false)
set t=null
endfunction
function UH9 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
if GetEventDamageSource()==Z77 and GetEventDamage()>0 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
if S_9(X77)==false then
call UG9(X77)
endif
endif
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function UI9 takes nothing returns nothing
local unit Z77=GetAttacker()
local unit X77=GetTriggerUnit()
local trigger t
local integer W57
if LState(Z77,"4309")==false then
call AddTimedBoolBuff(Z77,"4309",.2)
if GetRandomReal(0,'d')<EH7 then
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerAddCondition(t,Condition(function UH9))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
endif
endif
set Z77=null
set X77=null
endfunction
function UJ9 takes nothing returns nothing
local unit N99=GetAttacker()
local integer UK9=25
local integer id=GetPlayerId(GetOwningPlayer(GetAttacker()))
local integer EC8=GetHandleId(N99)
local real NO8=TimerGetElapsed(E4)
local real UM9=LReal(EC8,"bashertime")
local boolean UN9=LBool(EC8,"basheractive")
local boolean UO9=LBool(EC8,"basherremove")
local boolean UP9=NO8<UM9
local boolean UQ9=false
if IsUnitType(N99,UNIT_TYPE_MELEE_ATTACKER)==false then
set UK9=10
endif
if GetRandomInt(0,'d')<UK9 then
set UQ9=true
endif
if GetUnitAbilityLevel(N99,'A0JJ')>0 or GetUnitAbilityLevel(N99,'A081')>0 or GetUnitAbilityLevel(N99,'A0G5')>0 or GetUnitAbilityLevel(N99,'A09E')>0 then
call UnitRemoveAbility(N99,'A174')
set N99=null
return
endif
if UN9 and UP9==false and UO9==false then
call SReal(EC8,"bashertime",(NO8+2)*1.)
if UQ9==false then
call SBool(EC8,"basherremove",true)
endif
elseif UP9 or UO9 then
call UnitRemoveAbility(N99,'A174')
call SBool(EC8,"basheractive",false)
call SBool(EC8,"basherremove",false)
endif
if UQ9 then
call AddPermanentAbility(N99,'A174')
call UnitMakeAbilityPermanent(N99,true,'A175')
call SBool(EC8,"basheractive",true)
endif
set N99=null
endfunction
function UR9 takes real W_8 returns boolean
return('d'*GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)/ GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE))<W_8
endfunction
function AntiTK_Building takes nothing returns boolean
return UR9(10)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)and GetUnitTypeId(GetTriggerUnit())!='etol' and GetUnitTypeId(GetTriggerUnit())!='unpl'
endfunction
function AntiTK_Hero takes nothing returns boolean
return UR9(25)and(GetUnitAbilityLevel(GetTriggerUnit(),'BNdo')>0 or GetUnitAbilityLevel(GetTriggerUnit(),'BEsh')>0 or GetUnitAbilityLevel(GetTriggerUnit(),'B001')>0 or GetUnitAbilityLevel(GetTriggerUnit(),'B0AQ')>0 or GetUnitAbilityLevel(GetTriggerUnit(),'B0AP')>0 or GetUnitAbilityLevel(GetTriggerUnit(),'B05D')>0 or GetUnitAbilityLevel(GetTriggerUnit(),'B05M')>0 or GetUnitAbilityLevel(GetTriggerUnit(),'B05N')>0 or GetUnitAbilityLevel(GetTriggerUnit(),'B05O')>0)
endfunction
function AntiTK_Creep takes nothing returns boolean
return UR9(50)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==false and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false or GetUnitTypeId(GetTriggerUnit())=='ebal' or GetUnitTypeId(GetTriggerUnit())=='e026' or GetUnitTypeId(GetTriggerUnit())=='umtw' or GetUnitTypeId(GetTriggerUnit())=='u00R')
endfunction
function AntiTK_Exception takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit())=='u00S' or GetUnitTypeId(GetTriggerUnit())=='o01V' or LState(GetAttacker(),"4328")
endfunction
function US9 takes nothing returns nothing
if not((UR9(10)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)and GetUnitTypeId(GetTriggerUnit())!='etol' and GetUnitTypeId(GetTriggerUnit())!='unpl')or(UR9(25)and(GetUnitAbilityLevel(GetTriggerUnit(),'BNdo')>0 or GetUnitAbilityLevel(GetTriggerUnit(),'BEsh')>0 or GetUnitAbilityLevel(GetTriggerUnit(),'B001')>0 or GetUnitAbilityLevel(GetTriggerUnit(),'B0AQ')>0 or GetUnitAbilityLevel(GetTriggerUnit(),'B0AP')>0 or GetUnitAbilityLevel(GetTriggerUnit(),'B05D')>0 or GetUnitAbilityLevel(GetTriggerUnit(),'B05M')>0 or GetUnitAbilityLevel(GetTriggerUnit(),'B05N')>0 or GetUnitAbilityLevel(GetTriggerUnit(),'B05O')>0))or(UR9(50)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==false and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false or GetUnitTypeId(GetTriggerUnit())=='ebal' or GetUnitTypeId(GetTriggerUnit())=='e026' or GetUnitTypeId(GetTriggerUnit())=='umtw' or GetUnitTypeId(GetTriggerUnit())=='u00R'))or(GetUnitTypeId(GetTriggerUnit())=='u00S' or GetUnitTypeId(GetTriggerUnit())=='o01V' or LState(GetAttacker(),"4328")))then
if not T57 or GetUnitAbilityLevel(GetAttacker(),'B287')==0 then
call IssueImmediateOrderById(GetAttacker(),851972)
endif
endif
endfunction
function UT9 takes nothing returns boolean
if IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))then
call US9()
elseif IsUnitType(GetAttacker(),UNIT_TYPE_HERO)or UX8(GetAttacker())then
set OD4=GetPlayerId(GetOwningPlayer(GetAttacker()))
if SM4[OD4]>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitTypeId(GetTriggerUnit())!='n00L' and IsUnitIllusion(GetAttacker())==false and AR7(GetAttacker(),BU[biaoqiang])then
call T_9()
endif
if SP4[OD4]>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitIllusion(GetAttacker())==false and(AR7(GetAttacker(),BU[suiguchui])or AR7(GetAttacker(),BU[shenyuanzhiren]))then
call UJ9()
endif
if SS4[OD4]>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitIllusion(GetAttacker())==false and AR7(GetAttacker(),BU[sanyeduijian])then
call UE9()
elseif(ST4[OD4]>0 or JK7[OD4]>0)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitIllusion(GetAttacker())==false and(AR7(GetAttacker(),BU[sanhua])or AR7(GetAttacker(),BU[tiantangzhiji]))then
call UI9()
endif
elseif GetUnitAbilityLevel(GetAttacker(),'A17S')>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false then
call N89()
endif
return false
endfunction
function UU9 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT or LBool(GetHandleId(N28),"PendingUnfreeze")then
if LBool(GetHandleId(N28),"PendingUnfreeze")then
call SBool(GetHandleId(N28),"PendingUnfreeze",false)
call EY8(N28,"Frozen")
call UnitRemoveAbility(N28,'A04R')
call T49(N28,false)
call PauseUnit(N28,false)
call LT7(EC8)
call EA8(t)
elseif GetSpellTargetUnit()==N28 and GetSpellAbilityId()==vw and(GetPlayerSlotState(GetOwningPlayer((N28)))==PLAYER_SLOT_STATE_LEFT)and LState(N28,"Frozen")then
call EY8(N28,"Frozen")
call UnitRemoveAbility(N28,'A04R')
call T49(N28,false)
call PauseUnit(N28,false)
call LT7(EC8)
call EA8(t)
endif
elseif O18(N28)==false then
call SetUnitX(N28,x)
call SetUnitY(N28,y)
call EW8(N28,"Frozen")
call UnitAddAbility(N28,'A04R')
call T49(N28,true)
call PauseUnit(N28,true)
endif
set N28=null
set t=null
return false
endfunction
function UV9 takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit N28=GetSpellTargetUnit()
call SBool(GetHandleId(N28),"PendingUnfreeze",false)
call EW8(N28,"Frozen")
call UnitAddAbility(N28,'A04R')
call T49(N28,true)
call PauseUnit(N28,true)
call SUnit(EC8,"Hero",N28)
call SReal(EC8,"x",GetUnitX(N28)*1.)
call SReal(EC8,"y",GetUnitY(N28)*1.)
call TriggerRegisterTimerEvent(t,1.,true)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function UU9))
set t=null
set N28=null
endfunction
function UW9 takes nothing returns boolean
if GetSpellAbilityId()==TU and(GetPlayerSlotState(GetOwningPlayer((GetSpellTargetUnit())))==PLAYER_SLOT_STATE_LEFT)and LState(GetSpellTargetUnit(),"Frozen")==false then
call UV9()
elseif(GetSpellAbilityId()==vw or GetSpellAbilityId()==TU)and(GetPlayerSlotState(GetOwningPlayer((GetSpellTargetUnit())))==PLAYER_SLOT_STATE_LEFT)==false then
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),(GetObjectName(('n02N'))))
endif
return false
endfunction
function UX9 takes destructable d returns boolean
local real x=GetDestructableX(d)
local real y=GetDestructableY(d)
local group g=OG8()
local boolean UY9
call GroupEnumUnitsInRange(g,x,y,250,Condition(function VJ8))
set UY9=FirstOfGroup(g)!=null
call OF8(g)
set g=null
return UY9
endfunction
function UZ9 takes nothing returns nothing
if NG8(GetEnumDestructable())and GetDestructableLife(GetEnumDestructable())<1 and GetDestructableTypeId(GetEnumDestructable())!='B002' and GetDestructableTypeId(GetEnumDestructable())!='B003' then
if UX9(GetEnumDestructable())==false then
call DestructableRestoreLife(GetEnumDestructable(),GetDestructableMaxLife(GetEnumDestructable()),false)
if PW[GetPlayerId(GetLocalPlayer())]==1 and GetDestructableTypeId(GetEnumDestructable())=='ATtr' then
call SetDestructableAnimation(GetEnumDestructable(),"stand alternate")
endif
endif
endif
endfunction
function UA9 takes nothing returns nothing
call EnumDestructablesInRectAll(bj_mapInitialPlayableArea,function UZ9)
endfunction
function UB9 takes unit it,unit m5 returns boolean
local integer i=GetUnitAbilityLevel(it,'A10R')
local integer j=GetUnitLevel(m5)
return(i>0)and((j<=2)or(i>1 and j<=i+2))
endfunction
function UC9 takes nothing returns boolean
local unit U39=GetAttacker()
local unit U69=GetTriggerUnit()
local integer i1=GetUnitTypeId(U39)
local integer O5=GetPlayerId(GetOwningPlayer(U39))
if GetUnitTypeId(U69)=='n00L' then
if IsUnitIllusion(U39)then
call KillUnit(U39)
elseif IsUnitInRegion(ow,U39)==false then
call ShowWarningToPlayer(GetOwningPlayer(U39),(GetObjectName(('n035'))))
call IssueImmediateOrderById(U39,851972)
endif
elseif((i1=='UC42')and(Bz>V74[16+O5])and((GetUnitTypeId(U69)=='ncnk')or(GetUnitTypeId(U69)=='nkol'))and KR8(GetOwningPlayer(U39)))then
if UB9(U39,U69)then
call C_7(U39,852600,'A10R',U69)
endif
elseif((i1=='UC42')and(Bz>V74[16+O5])and KR8(GetOwningPlayer(U39))and(GetRandomInt(1,4)==1)and(not IsUnitType(U69,UNIT_TYPE_MECHANICAL))and(not IsUnitType(U69,UNIT_TYPE_ANCIENT))and GetUnitTypeId(U69)!='n0HX' and GetUnitTypeId(U69)!='nomg' and GetUnitTypeId(U69)!='nfpu' and GetUnitTypeId(U69)!='nstl' and GetUnitTypeId(U69)!='nsat' and GetUnitTypeId(U69)!='nsth' and GetUnitTypeId(U69)!='n00S' and GetUnitTypeId(U69)!='nfsh' and GetUnitTypeId(U69)!='ngns' and GetUnitTypeId(U69)!='ngh1' and GetUnitTypeId(U69)!='nowe' and GetUnitTypeId(U69)!='ndtw' and GetUnitTypeId(U69)!='nwlg')then
if UB9(U39,U69)then
call C_7(U39,852600,'A10R',U69)
endif
elseif((i1=='U00C')and KR8(GetOwningPlayer(U39))and(not IsUnitType(U69,UNIT_TYPE_MECHANICAL))and(not IsUnitType(U69,UNIT_TYPE_ANCIENT))and(GetUnitTypeId(U69)=='ncnk')or(GetUnitTypeId(U69)=='nkol')or GetUnitTypeId(U69)=='n0HX' or GetUnitTypeId(U69)=='nomg' or GetUnitTypeId(U69)=='nfpu' or GetUnitTypeId(U69)=='nstl' or GetUnitTypeId(U69)=='nsat' or GetUnitTypeId(U69)=='nsth' or GetUnitTypeId(U69)=='n00S' or GetUnitTypeId(U69)=='nfsh' or GetUnitTypeId(U69)=='ngns' or GetUnitTypeId(U69)=='ngh1' or GetUnitTypeId(U69)=='nowe' or GetUnitTypeId(U69)=='ndtw' or GetUnitTypeId(U69)=='nwlg')then
if(GetUnitAbilityLevel(U39,'A0SW')>1)then
call C_7(U39,852600,'A0SW',U69)
endif
elseif((i1=='H00U')and KR8(GetOwningPlayer(U39)))then
if((Bz>V74[128+O5])and(K_8(U39,D57,D57,D27,'A0VQ')))then
call C_7(U39,852490,'A0VQ',U39)
elseif(Bz>V74[64+O5])and(K_8(U39,D27,D27,D07,'A0VO'))then
call IssueImmediateOrderById(U39,852132)
endif
endif
set U39=null
set U69=null
return false
endfunction
function UL9 takes nothing returns nothing
local unit U19=GetSummonedUnit()
local unit Z77=GetSummoningUnit()
local string fx=""
if IsPlayerEnemy(GetLocalPlayer(),GetOwningPlayer(Z77))and N08(GetLocalPlayer())==false then
set fx="war3mapImported\\WardMark_T2.mdx"
endif
call AddSpecialEffectTarget(fx,U19,"origin")
set U19=null
set Z77=null
endfunction
function U09 takes nothing returns boolean
return true
endfunction
function U59 takes unit N28,unit U29 returns nothing
local integer U_9
local item V49
if GetUnitTypeId(GetSummonedUnit())=='o004' then
set U_9=BU[FB]
else
set U_9=BU[GB]
endif
call DisableTrigger(GW4)
set V49=AV7(N28,U_9)
if V49==null then
set I44=GetOwningPlayer(N28)
set HK4=CreateItem(U_9,0,0)
call UnitAddItem(N28,HK4)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
else
call SetItemCharges(V49,GetItemCharges(V49)+1)
endif
call EnableTrigger(GW4)
set V49=null
endfunction
function V79 takes nothing returns nothing
local unit U29=GetSummonedUnit()
local unit N28=GetSummoningUnit()
if GetUnitTypeId(GetSummonedUnit())=='o004' or GetUnitTypeId(GetSummonedUnit())=='oeye' then
if IsUnitInRegion(ow,U29)or RectContainsUnit(BD,U29)or RectContainsUnit(LD,U29)then
call U59(N28,U29)
call RemoveUnit(U29)
elseif IsCourier(N28)then
call U59(N28,U29)
call ShowWarningToPlayer(GetOwningPlayer(U29),"Couriers cannot place wards")
call RemoveUnit(U29)
else
call UL9()
endif
elseif GetUnitTypeId(U29)=='osp4' or GetUnitTypeId(U29)=='o008' or GetUnitTypeId(U29)=='o009' or GetUnitTypeId(U29)=='o01C' or GetUnitTypeId(U29)=='o01D' or GetUnitTypeId(U29)=='o01E' then
call SelectUnitAddForPlayer(U29,GetOwningPlayer(U29))
elseif GetUnitTypeId(U29)=='o000' or GetUnitTypeId(U29)=='o001' or GetUnitTypeId(U29)=='o00A' or GetUnitTypeId(U29)=='o00X' then
call SelectUnitAddForPlayer(U29,GetOwningPlayer(U29))
endif
set N28=null
set U29=null
endfunction
function V89 takes unit AM7 returns real
local real V99
if IsJWPlayer(GetOwningPlayer(AM7))then
set V99=GetRectCenterX(QD)
else
set V99=GetRectCenterX(PD)
endif
return V99
endfunction
function VD9 takes unit AM7 returns real
local real V99
if IsJWPlayer(GetOwningPlayer(AM7))then
set V99=GetRectCenterY(QD)
else
set V99=GetRectCenterY(PD)
endif
return V99
endfunction
function VE9 takes unit AM7,integer n5,integer VF9 returns item
local real x=V89(AM7)
local real y=VD9(AM7)
local item JB9=CreateItem(n5,x,y)
local integer i=0
local boolean array VG9
local item Z4
set ON7=I44
call DisableTrigger(GW4)
if n5>0 then
loop
exitwhen i>(UnitInventorySize(AM7)-1)
if UnitItemInSlot(AM7,i)==null and i!=VF9 then
set Z4=CreateItem('I02M',x,y)
call UnitAddItem(AM7,Z4)
set VG9[i]=true
else
set VG9[i]=false
endif
if i==VF9 then
call EnableTrigger(GW4)
call UnitAddItem(AM7,JB9)
call DisableTrigger(GW4)
endif
set i=i+1
endloop
set i=0
loop
exitwhen i>5
if VG9[i]then
call RemoveItem(UnitItemInSlot(AM7,i))
endif
set i=i+1
endloop
endif
call EnableTrigger(GW4)
set HK4=JB9
set JB9=null
set Z4=null
return HK4
endfunction
function VH9 takes unit Z77 returns boolean
local integer W57=GetHandleId(Z77)
local integer i=0
local real PX9=(TimerGetElapsed(E4))
local real VI9=13
return false
loop
exitwhen i>2
if(LoadReal(R8,(W57),(730+i)))<PX9-VI9 then
return false
endif
set i=i+1
endloop
return true
endfunction
function VJ9 takes unit Z77 returns nothing
local integer W57=GetHandleId(Z77)
local integer VK9=(LoadInteger(R8,(W57),(729)))
call SaveReal(R8,(W57),(730+VK9),(((TimerGetElapsed(E4)))*1.))
set VK9=VK9+1
if VK9==3 then
set VK9=0
endif
call SaveInteger(R8,(W57),(729),(VK9))
endfunction
function VM9 takes unit AM7 returns nothing
local integer i=0
local item VN9
local integer TS9
local boolean VO9=false
if VH9(AM7)then
set VO9=true
endif
loop
exitwhen i>5
set VN9=UnitItemInSlot(AM7,i)
set TS9=ZX7(VN9)
if TS9==jingmizhixie and VO9 then
call DisableTrigger(GW4)
set I44=GetItemPlayer(VN9)
call RemoveItem(VN9)
set HK4=VE9(AM7,BU[jingmizhixie2],i)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call EnableTrigger(GW4)
endif
if TS9==jingmizhixie2 and VO9==false then
call DisableTrigger(GW4)
set I44=GetItemPlayer(VN9)
call RemoveItem(VN9)
set HK4=VE9(AM7,BU[jingmizhixie],i)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call EnableTrigger(GW4)
endif
set i=i+1
endloop
set AM7=null
set VN9=null
endfunction
function NI9 takes nothing returns nothing
if GetEventDamage()>2 and(IsPlayer(GetOwningPlayer(GetEventDamageSource()))or GetUnitTypeId(GetEventDamageSource())=='n00L')then
if X64[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]==false then
call SaveReal(R8,(GetHandleId(GetTriggerUnit())),(785),(((TimerGetElapsed(E4)))*1.))
if IsUnitEnemy(GetEventDamageSource(),GetOwningPlayer(GetTriggerUnit()))then
call SaveReal(R8,(GetHandleId(GetTriggerUnit())),'lstD',time)
endif
if GetEventDamage()>20 then
call VJ9(GetTriggerUnit())
endif
endif
endif
endfunction
function VP9 takes unit N28 returns nothing
local integer i=0
local item VQ9
local integer TK9
local boolean VR9=false
if(LoadReal(R8,(GetHandleId(N28)),(785)))+3>(TimerGetElapsed(E4))then
set VR9=true
endif
loop
exitwhen i>5
set VQ9=UnitItemInSlot(N28,i)
set TK9=ZX7(VQ9)
if TK9==keledebishou and VR9 then
call DisableTrigger(GW4)
set I44=GetItemPlayer(VQ9)
call RemoveItem(VQ9)
set HK4=VE9(N28,BU[keledebishou2],i)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call EnableTrigger(GW4)
endif
if TK9==keledebishou2 and VR9==false then
call DisableTrigger(GW4)
set I44=GetItemPlayer(VQ9)
call RemoveItem(VQ9)
set HK4=VE9(N28,BU[keledebishou],i)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call EnableTrigger(GW4)
endif
set i=i+1
endloop
set N28=null
set VQ9=null
endfunction
function VS9 takes unit N28 returns nothing
local integer i=0
local item VT9
local integer TK9
local boolean VU9=false
local real RF8=4
if IsUnitType(N28,UNIT_TYPE_MELEE_ATTACKER)==false then
set RF8=6
endif
if(LoadReal(R8,(GetHandleId(N28)),'lstD'))+RF8>time then
set VU9=true
endif
loop
exitwhen i>5
set VT9=UnitItemInSlot(N28,i)
set TK9=ZX7(VT9)
if TK9==molongzhixin and VU9 then
call DisableTrigger(GW4)
set I44=GetItemPlayer(VT9)
call RemoveItem(VT9)
set HK4=VE9(N28,BU[molongzhixin2],i)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call EnableTrigger(GW4)
endif
if TK9==molongzhixin2 and VU9==false then
call DisableTrigger(GW4)
set I44=GetItemPlayer(VT9)
call RemoveItem(VT9)
set HK4=VE9(N28,BU[molongzhixin],i)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call EnableTrigger(GW4)
endif
set i=i+1
endloop
set N28=null
set VT9=null
endfunction
function VV9 takes nothing returns nothing
local unit AM7=GetEnumUnit()
local integer id=GetPlayerId(GetOwningPlayer(AM7))
if SN4[id]>0 and AM7!=null and GetUnitTypeId(AM7)>1 and IsUnitType(AM7,UNIT_TYPE_DEAD)==false then
call VP9(AM7)
endif
if SR4[id]>0 and AM7!=null and GetUnitTypeId(AM7)>1 and IsUnitType(AM7,UNIT_TYPE_DEAD)==false then
call VS9(AM7)
endif
set AM7=null
endfunction
function VW9 takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and GetUnitTypeId(GetFilterUnit())!='H00J' and GetUnitTypeId(GetFilterUnit())!='H0B8'
endfunction
function VX9 takes nothing returns boolean
local integer i=1
local unit AM7
local integer id
local group g
if GZ4>0 or G34>0 or JJ7>0 then
set g=OG8()
call GroupEnumUnitsInRange(g,0,0,9999,Condition(function VW9))
loop
exitwhen i>5
set id=GetPlayerId(G8[i])
set AM7=Y7[id]
call GroupAddUnit(g,AM7)
set id=GetPlayerId(N8[i])
set AM7=Y7[id]
call GroupAddUnit(g,AM7)
set i=i+1
endloop
call ForGroup(g,function VV9)
call OF8(g)
set g=null
endif
set AM7=null
return false
endfunction
function VY9 takes nothing returns nothing
local unit AM7=GetFilterUnit()
local integer i=0
local item Y98
local integer TS9
loop
exitwhen i>5
set Y98=UnitItemInSlot(AM7,i)
set TS9=ZU7(Y98)
if(TS9==VY or TS9==XY or TS9==YY)and GetItemUserData(Y98)>0 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl",AM7,"overhead"))
call PM8(GetOwningPlayer(AM7),"Abilities\\Spells\\Human\\Heal\\HealTarget.wav")
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=VE9(AM7,BU[ZY],i)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call UnitRemoveAbility(AM7,'B0GI')
endif
set i=i+1
endloop
set AM7=null
set Y98=null
endfunction
function VZ9 takes nothing returns boolean
if UnitInventorySize(GetFilterUnit())>0 and IsJWPlayer(GetOwningPlayer(GetFilterUnit()))and IsUnitIllusion(GetFilterUnit())==false and O18(GetFilterUnit())==false then
call VY9()
endif
return false
endfunction
function VA9 takes nothing returns boolean
if UnitInventorySize(GetFilterUnit())>0 and IsTZPlayer(GetOwningPlayer(GetFilterUnit()))and IsUnitIllusion(GetFilterUnit())==false and O18(GetFilterUnit())==false then
call VY9()
endif
return false
endfunction
function VB9 takes nothing returns boolean
local group g=OG8()
call GroupEnumUnitsInRange(g,IK4,IM4,750,Condition(function VZ9))
call OF8(g)
set g=OG8()
call GroupEnumUnitsInRange(g,JQ4,JR4,750,Condition(function VA9))
call OF8(g)
set g=null
return false
endfunction
function VC9 takes unit u returns unit
if IsUnitType(u,UNIT_TYPE_HERO)or GetUnitAbilityLevel(u,'A04R')==0 then
return u
else
return Y7[GetPlayerId(GetOwningPlayer(u))]
endif
endfunction
function V39 takes nothing returns boolean
if IsUnitType(GetKillingUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitAlly(GetDyingUnit(),GetOwningPlayer(GetKillingUnit()))==false then
if GetUnitTypeId(GetTriggerUnit())=='n00J' then
call Dmg(GetDyingUnit(),VC9(GetKillingUnit()),HeroMagic,400)
elseif GetUnitTypeId(GetTriggerUnit())=='n00A' then
call Dmg(GetDyingUnit(),VC9(GetKillingUnit()),HeroMagic,500)
elseif GetUnitTypeId(GetTriggerUnit())=='n006' then
call Dmg(GetDyingUnit(),VC9(GetKillingUnit()),HeroMagic,600)
endif
endif
return false
endfunction
function V69 takes nothing returns boolean
return GetUnitTypeId(GetEnteringUnit())=='e00E' or GetUnitTypeId(GetEnteringUnit())=='e022'
endfunction
function VL9 takes nothing returns nothing
call ShowUnitHide(GetEnteringUnit())
call SetUnitPathing(GetEnteringUnit(),false)
call SetUnitInvulnerable(GetEnteringUnit(),true)
if(GetPlayerController(GetOwningPlayer(GetEnteringUnit()))==MAP_CONTROL_USER)then
call UnitApplyTimedLifeBJ(20.,'BTLF',GetEnteringUnit())
else
call TriggerSleepAction(10.)
if((GetUnitTypeId(GetEnteringUnit())=='e00E')or(GetUnitTypeId(GetEnteringUnit())=='e022'))then
call UnitApplyTimedLifeBJ(10.,'BTLF',GetEnteringUnit())
endif
endif
endfunction
function V19 takes nothing returns boolean
return((GetUnitTypeId(GetDyingUnit())=='e00R')or(GetUnitTypeId(GetDyingUnit())=='e011')or(GetUnitTypeId(GetDyingUnit())=='e00S')or(GetUnitTypeId(GetDyingUnit())=='e019'))
endfunction
function V09 takes nothing returns nothing
if IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit()))then
set gD[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=gD[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
if(GetDyingUnit()==IZ4)then
call X48("Tower"+I2S(0)+I2S(1)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call T49(I04,false)
call M68(GetKillingUnit(),1)
set P34=1
elseif(GetDyingUnit()==I34)then
call X48("Tower"+I2S(0)+I2S(1)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call T49(I24,false)
call M68(GetKillingUnit(),1)
set PC4=1
elseif(GetDyingUnit()==IL4)then
call X48("Tower"+I2S(0)+I2S(1)+I2S(2),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call T49(I_4,false)
call M68(GetKillingUnit(),1)
set P64=1
elseif(GetDyingUnit()==I04)then
call X48("Tower"+I2S(0)+I2S(2)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call T49(J44,false)
call M68(GetKillingUnit(),2)
set P34=2
elseif(GetDyingUnit()==I24)then
call X48("Tower"+I2S(0)+I2S(2)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call T49(J74,false)
call M68(GetKillingUnit(),2)
set PC4=2
elseif(GetDyingUnit()==I_4)then
call X48("Tower"+I2S(0)+I2S(2)+I2S(2),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call T49(J84,false)
call M68(GetKillingUnit(),2)
set P64=2
elseif(GetDyingUnit()==J44)then
call X48("Tower"+I2S(0)+I2S(3)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call M68(GetKillingUnit(),3)
call T49(JE4,false)
call T49(JH4,false)
call T49(J94,false)
call T49(JD4,false)
call T49(WP,false)
call T49(zP,false)
call T49(vq,false)
call T49(eq,false)
call T49(fP,false)
call T49(FP,false)
call T49(lP,false)
call T49(LP,false)
call T49(MP,false)
call T49(pP,false)
call T49(JK4,false)
call T49(JM4,false)
call T49(JN4,false)
call T49(JO4,false)
call T49(JP4,false)
set P34=3
elseif(GetDyingUnit()==J74)then
call X48("Tower"+I2S(0)+I2S(3)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call M68(GetKillingUnit(),3)
call T49(JF4,false)
call T49(JI4,false)
call T49(J94,false)
call T49(JD4,false)
call T49(WP,false)
call T49(zP,false)
call T49(vq,false)
call T49(eq,false)
call T49(fP,false)
call T49(FP,false)
call T49(lP,false)
call T49(LP,false)
call T49(MP,false)
call T49(pP,false)
call T49(JK4,false)
call T49(JM4,false)
call T49(JN4,false)
call T49(JO4,false)
call T49(JP4,false)
set PC4=3
elseif(GetDyingUnit()==J84)then
call X48("Tower"+I2S(0)+I2S(3)+I2S(2),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call M68(GetKillingUnit(),3)
call T49(JG4,false)
call T49(JJ4,false)
call T49(J94,false)
call T49(JD4,false)
call T49(WP,false)
call T49(zP,false)
call T49(vq,false)
call T49(eq,false)
call T49(fP,false)
call T49(FP,false)
call T49(lP,false)
call T49(LP,false)
call T49(MP,false)
call T49(pP,false)
call T49(JK4,false)
call T49(JM4,false)
call T49(JN4,false)
call T49(JO4,false)
call T49(JP4,false)
set P64=3
endif
if GetDyingUnit()==J94 or GetDyingUnit()==JD4 then
call X48("Tower"+I2S(0)+I2S(4)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call M68(GetKillingUnit(),4)
endif
if(((GetDyingUnit()==J94)and(IsUnitDeadBJ(JD4)))or((GetDyingUnit()==JD4)and(IsUnitDeadBJ(J94))))then
call T49(IY4,false)
set PV4=false
endif
endfunction
function V59 takes nothing returns boolean
return((GetUnitTypeId(GetDyingUnit())=='u00M')or(GetUnitTypeId(GetDyingUnit())=='u00D')or(GetUnitTypeId(GetDyingUnit())=='u00N')or(GetUnitTypeId(GetDyingUnit())=='u00T'))
endfunction
function V29 takes nothing returns nothing
if IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit()))then
set gD[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=gD[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
if(GetDyingUnit()==JW4)then
call X48("Tower"+I2S(1)+I2S(1)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call T49(JZ4,false)
call M68(GetKillingUnit(),1)
set P14=1
elseif(GetDyingUnit()==JX4)then
call X48("Tower"+I2S(1)+I2S(1)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call T49(JA4,false)
call M68(GetKillingUnit(),1)
set PL4=1
elseif(GetDyingUnit()==JY4)then
call X48("Tower"+I2S(1)+I2S(1)+I2S(2),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call T49(JB4,false)
call M68(GetKillingUnit(),1)
set P04=1
elseif(GetDyingUnit()==JZ4)then
call X48("Tower"+I2S(1)+I2S(2)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call T49(JC4,false)
call M68(GetKillingUnit(),2)
set P14=2
elseif(GetDyingUnit()==JA4)then
call X48("Tower"+I2S(1)+I2S(2)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call T49(J34,false)
call M68(GetKillingUnit(),2)
set PL4=2
elseif(GetDyingUnit()==JB4)then
call X48("Tower"+I2S(1)+I2S(2)+I2S(2),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call T49(J64,false)
call M68(GetKillingUnit(),2)
set P04=2
elseif(GetDyingUnit()==JC4)then
call X48("Tower"+I2S(1)+I2S(3)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call M68(GetKillingUnit(),3)
call T49(J04,false)
call T49(J_4,false)
call T49(JL4,false)
call T49(J14,false)
call T49(ot,false)
call T49(rt,false)
call T49(at,false)
call T49(Vt,false)
call T49(PS,false)
call T49(QS,false)
call T49(SS,false)
call T49(tS,false)
call T49(TS,false)
call T49(US,false)
call T49(K84,false)
call T49(K94,false)
call T49(KD4,false)
call T49(KE4,false)
call T49(KF4,false)
set P14=3
elseif(GetDyingUnit()==J34)then
call X48("Tower"+I2S(1)+I2S(3)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call M68(GetKillingUnit(),3)
call T49(J54,false)
call T49(K44,false)
call T49(JL4,false)
call T49(J14,false)
call T49(ot,false)
call T49(rt,false)
call T49(at,false)
call T49(Vt,false)
call T49(PS,false)
call T49(QS,false)
call T49(SS,false)
call T49(tS,false)
call T49(TS,false)
call T49(US,false)
call T49(K84,false)
call T49(K94,false)
call T49(KD4,false)
call T49(KE4,false)
call T49(KF4,false)
set PL4=3
elseif(GetDyingUnit()==J64)then
call X48("Tower"+I2S(1)+I2S(3)+I2S(2),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call M68(GetKillingUnit(),3)
call T49(J24,false)
call T49(K74,false)
call T49(JL4,false)
call T49(J14,false)
call T49(ot,false)
call T49(rt,false)
call T49(at,false)
call T49(Vt,false)
call T49(PS,false)
call T49(QS,false)
call T49(SS,false)
call T49(tS,false)
call T49(TS,false)
call T49(US,false)
call T49(K84,false)
call T49(K94,false)
call T49(KD4,false)
call T49(KE4,false)
call T49(KF4,false)
set P04=3
endif
if GetDyingUnit()==JL4 or GetDyingUnit()==J14 then
call X48("Tower"+I2S(1)+I2S(4)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
call M68(GetKillingUnit(),4)
endif
if(((GetDyingUnit()==J14)and(IsUnitDeadBJ(JL4)))or((GetDyingUnit()==JL4)and(IsUnitDeadBJ(J14))))then
call T49(JV4,false)
set PW4=false
endif
endfunction
function V_9 takes nothing returns boolean
local integer x=0
if GetPlayerSlotState(G8[1])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(G8[2])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(G8[3])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(G8[4])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(G8[5])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(N8[1])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(N8[2])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(N8[3])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(N8[4])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(N8[5])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
return x==9
endfunction
function Ve takes nothing returns boolean
return bj_isSinglePlayer and V_9()
endfunction
function W49 takes nothing returns nothing
set AS4=true
endfunction
function W79 takes nothing returns nothing
set GV4=false
endfunction
function W89 takes nothing returns boolean
if IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false then
call KillUnit(GetFilterUnit())
endif
return false
endfunction
function W99 takes nothing returns nothing
local group g=OG8()
call GroupEnumUnitsOfPlayer(g,N8[0],Condition(function W89))
call OF8(g)
set g=null
set GD=true
endfunction
function WD9 takes nothing returns nothing
local group g=OG8()
call GroupEnumUnitsOfPlayer(g,G8[0],Condition(function W89))
call OF8(g)
set g=null
set GD=true
endfunction
function WE9 takes nothing returns boolean
if GetUnitTypeId(GetFilterUnit())=='o004' or GetUnitTypeId(GetFilterUnit())=='oeye' then
call KillUnit(GetFilterUnit())
endif
return false
endfunction
function WF9 takes nothing returns nothing
local group g=OG8()
call GroupEnumUnitsInRange(g,0,0,9999,Condition(function WE9))
call OF8(g)
set g=null
set GD=true
endfunction
function WG9 takes nothing returns nothing
set B4=false
endfunction
function WH9 takes nothing returns nothing
set B4=true
endfunction
function WI9 takes nothing returns nothing
call WD9()
call W99()
set GD=true
endfunction
function WJ9 takes nothing returns nothing
local string WK9=SubString(GetEventPlayerChatString(),5,StringLength(GetEventPlayerChatString()))
local integer WM9=S2I(WK9)
if WM9<0 or WM9>24 then
set WM9=0
endif
call SetFloatGameState(GAME_STATE_TIME_OF_DAY,WM9)
set GD=true
endfunction
function WN9 takes nothing returns boolean
if IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)then
call SetHeroLevel(GetFilterUnit(),GetHeroLevel(GetFilterUnit())+P38(HB4,1),true)
endif
return false
endfunction
function WO9 takes nothing returns nothing
local string WP9=SubString(GetEventPlayerChatString(),6,StringLength(GetEventPlayerChatString()))
local integer WQ9=S2I(WP9)
local group g=OG8()
if SubString(GetEventPlayerChatString(),0,9)!="-lvlupall" and SubString(GetEventPlayerChatString(),0,9)!="-lvlupfor" then
if WQ9<1 then
set WQ9=1
endif
set HB4=WQ9
call GroupEnumUnitsOfPlayer(g,GetTriggerPlayer(),Condition(function WN9))
endif
call OF8(g)
set g=null
set GD=true
endfunction
function WR9 takes nothing returns nothing
call TriggerExecute(JS)
set GD=true
endfunction
function WS9 takes nothing returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(GetFilterUnit()))
if IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)then
set hq[O5]=.0
set hq[16+O5]=.0
set hq[32+O5]=.0
set V74[O5]=.0
set V74[16+O5]=.0
set V74[32+O5]=.0
set V74[48+O5]=.0
call UnitResetCooldown(GetFilterUnit())
call TimerStart(M_4[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 WT9 takes nothing returns nothing
local group g=OG8()
call GroupEnumUnitsOfPlayer(g,GetTriggerPlayer(),Condition(function WS9))
call OF8(g)
set g=null
set GD=true
endfunction
function WU9 takes nothing returns nothing
if AJ4 then
return
endif
call KillUnit(Y7[GetPlayerId(GetTriggerPlayer())])
set GD=true
endfunction
function WV9 takes nothing returns nothing
local string nQ=SubString(GetEventPlayerChatString(),5,StringLength(GetEventPlayerChatString()))
local integer M38=S2I(nQ)
call SetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD)+M38)
set GD=true
endfunction
function WW9 takes nothing returns nothing
local unit PQ9=Y7[GetPlayerId(GetTriggerPlayer())]
local player QL9=GetTriggerPlayer()
local location PV9
if IsTZPlayer(QL9)then
set PV9=GetRectCenter(PD)
else
set PV9=GetRectCenter(QD)
endif
if U9==false and O18(PQ9)then
call YS8(PQ9,QL9,GetLocationX(PV9),GetLocationY(PV9),true)
if PP9(PQ9)==false or GetUnitAbilityLevel(PQ9,'A0MW')==0 then
call ReviveHeroLoc(PQ9,PV9,true)
else
call PU9(PQ9,PV9)
endif
endif
call RemoveLocation(PV9)
set PQ9=null
set QL9=null
set PV9=null
endfunction
function WX9 takes nothing returns nothing
local unit Z77=Y7[GetPlayerId(GetTriggerPlayer())]
local player WY9
local unit WZ9
local real x=GetRectCenterX(KE)
local real y=GetRectCenterX(KE)
if IsTZPlayer(GetOwningPlayer(Z77))then
set WY9=G8[1]
else
set WY9=N8[1]
endif
set WZ9=CreateUnit(WY9,'H000',x,y,0)
call SetHeroLevel(WZ9,10,false)
set Z77=null
set WZ9=null
set WY9=null
endfunction
function WA9 takes nothing returns nothing
call TriggerEvaluate(HS4)
endfunction
function WB9 takes nothing returns nothing
call TriggerEvaluate(MS)
endfunction
function WC9 takes nothing returns nothing
call UA9()
endfunction
function W39 takes nothing returns nothing
local string VH=GetEventPlayerChatString()
local integer UP
local integer O5
local player pl
local group g
if(VH=="-testhelp")then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,"Commands (XX = 2-digit Player Number, ##### = Amount): -gold #####, -goldall #####, -goldforXX #####, -lvlup ##, -lvlupall ##, -lvlupforXX, -spawncreeps, -powerup, -neutrals, -refresh, -refreshall, -kill, -kill XX, -killsent, -killscourge, -killall, -rechoose, -fog, -time ##, -noherolimit, -trees, -killwards, -spawnoff, -spawnon")
elseif(VH=="-rechoose")then
if((not O9)and(not T4)and(not SC4)and(not OL4)and(not D9)and(not Y9)and(not HO4))then
set X9=true
set B[GetPlayerId(GetTriggerPlayer())]=false
set B9=false
set W9=true
set D7[GetPlayerId(GetTriggerPlayer())]=false
set oo[GetPlayerId(GetTriggerPlayer())]=false
set Z9[GetPlayerId(GetTriggerPlayer())]=false
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,"Some restrictions in repicking/randoming are removed. You may now use -repick/-random")
else
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,"Cannot enable repicking/randoming.")
endif
elseif(SubString(VH,0,9)=="-goldall ")then
set UP=S2I(SubString(VH,9,StringLength(VH)))
set O5=1
loop
call SetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD)+UP)
set O5=O5+1
exitwhen O5>11
endloop
elseif(SubString(VH,0,8)=="-goldfor")then
set pl=Z17(S2I(SubString(VH,8,StringLength(VH))))
if((pl!=null)and(KS8(pl)))then
set UP=S2I(SubString(VH,10,StringLength(VH)))
call SetPlayerState(pl,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(pl,PLAYER_STATE_RESOURCE_GOLD)+UP)
endif
elseif(SubString(VH,0,9)=="-lvlupall")then
set O5=S2I(SubString(GetEventPlayerChatString(),9,StringLength(GetEventPlayerChatString())))
if O5<1 then
set O5=1
endif
set HB4=O5
set g=OG8()
call GroupEnumUnitsInRect(g,bj_mapInitialPlayableArea,Condition(function WN9))
call OF8(g)
elseif(SubString(VH,0,9)=="-lvlupfor")then
set pl=Z17(S2I(SubString(VH,9,StringLength(VH))))
if((pl!=null)and(KS8(pl)))then
call SetHeroLevel(Y7[GetPlayerId(pl)],GetHeroLevel(Y7[GetPlayerId(pl)])+1,true)
endif
elseif(VH=="-refreshall")then
set g=OG8()
call GroupEnumUnitsInRect(g,bj_mapInitialPlayableArea,Condition(function WS9))
call OF8(g)
elseif(SubString(VH,0,6)=="-kill ")then
set pl=Z17(S2I(SubString(VH,6,StringLength(VH))))
if((pl!=null)and(KS8(pl)))then
call KillUnit(Y7[GetPlayerId(pl)])
endif
elseif(VH=="-fog")then
call FogEnable(not IsFogEnabled())
call FogMaskEnable(not IsFogMaskEnabled())
endif
set g=null
set pl=null
endfunction
function W69 takes nothing returns nothing
local trigger t=CreateTrigger()
local integer O5=1
if E then
set O5=0
endif
loop
if(KQ8(Player(O5)))then
call TriggerRegisterPlayerChatEvent(t,Player(O5),"-",false)
endif
set O5=O5+1
exitwhen O5>11
endloop
call TriggerAddAction(t,function W39)
set t=null
endfunction
function WL9 takes nothing returns boolean
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60,"**** REMINDER ****")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60,"Single player commands enabled. You may use commands like -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,"**** REMINDER ****")
return false
endfunction
function W19 takes nothing returns nothing
local player OnlyPlayer=V8
local trigger t
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60,"Single player commands enabled. You may use commands like -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.,"For more info about the commands, type -testhelp.
	")
set t=CreateTrigger()
call TriggerAddCondition(t,Condition(function WL9))
call TriggerRegisterTimerEvent(t,GetRandomReal(60,'d'),false)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-lvlup",false)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-lvlup",false)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-lvlup",false)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-lvlup",false)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-lvlup",false)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-lvlup",false)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-lvlup",false)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-lvlup",false)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-lvlup",false)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-lvlup",false)
call TriggerAddAction(t,function WO9)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-spawncreeps",true)
if E then
call TriggerRegisterPlayerChatEvent(t,Player(0),"-spawncreeps",false)
endif
call TriggerAddAction(t,function WR9)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-refresh",true)
call TriggerAddAction(t,function WT9)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-kill",true)
call TriggerAddAction(t,function WU9)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-gold",false)
call TriggerAddAction(t,function WV9)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-time",false)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-time",false)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-time",false)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-time",false)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-time",false)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-time",false)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-time",false)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-time",false)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-time",false)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-time",false)
call TriggerAddAction(t,function WJ9)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-powerup",false)
call TriggerAddAction(t,function WA9)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-killall",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-killall",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-killall",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-killall",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-killall",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-killall",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-killall",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-killall",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-killall",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-killall",true)
if E then
call TriggerRegisterPlayerChatEvent(t,Player(0),"-killall",false)
endif
call TriggerAddAction(t,function WI9)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-killsent",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-killsent",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-killsent",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-killsent",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-killsent",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-killsent",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-killsent",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-killsent",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-killsent",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-killsent",true)
if E then
call TriggerRegisterPlayerChatEvent(t,Player(0),"-killsent",false)
endif
call TriggerAddAction(t,function WD9)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-killscourge",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-killscourge",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-killscourge",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-killscourge",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-killscourge",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-killscourge",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-killscourge",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-killscourge",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-killscourge",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-killscourge",true)
if E then
call TriggerRegisterPlayerChatEvent(t,Player(0),"-killscourge",false)
endif
call TriggerAddAction(t,function W99)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-neutrals",false)
if E then
call TriggerRegisterPlayerChatEvent(t,Player(0),"-neutrals",false)
endif
call TriggerAddAction(t,function WB9)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-noherolimit",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-noherolimit",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-noherolimit",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-noherolimit",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-noherolimit",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-noherolimit",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-noherolimit",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-noherolimit",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-noherolimit",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-noherolimit",true)
call TriggerAddAction(t,function W79)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-trees",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-trees",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-trees",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-trees",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-trees",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-trees",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-trees",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-trees",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-trees",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-trees",true)
if E then
call TriggerRegisterPlayerChatEvent(t,Player(0),"-trees",false)
endif
call TriggerAddAction(t,function WC9)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-killwards",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-killwards",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-killwards",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-killwards",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-killwards",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-killwards",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-killwards",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-killwards",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-killwards",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-killwards",true)
call TriggerAddAction(t,function WF9)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-spawnoff",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-spawnoff",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-spawnoff",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-spawnoff",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-spawnoff",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-spawnoff",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-spawnoff",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-spawnoff",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-spawnoff",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-spawnoff",true)
call TriggerAddAction(t,function WH9)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-spawnon",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-spawnon",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-spawnon",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-spawnon",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-spawnon",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-spawnon",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-spawnon",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-spawnon",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-spawnon",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-spawnon",true)
call TriggerAddAction(t,function WG9)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-roshan",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-roshan",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-roshan",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-roshan",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-roshan",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-roshan",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-roshan",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-roshan",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-roshan",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-roshan",true)
if E then
call TriggerRegisterPlayerChatEvent(t,Player(0),"-roshan",false)
endif
call TriggerAddAction(t,function W49)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-respawn",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-respawn",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-respawn",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-respawn",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-respawn",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-respawn",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-respawn",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-respawn",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-respawn",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-respawn",true)
call TriggerAddAction(t,function WW9)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-dummy",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-dummy",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-dummy",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-dummy",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-dummy",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-dummy",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-dummy",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-dummy",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-dummy",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-dummy",true)
call TriggerAddAction(t,function WX9)
call W69()
set uy=true
set t=null
endfunction
function I59 takes nothing returns nothing
call TimerStart(CreateTimer(),5,not uy,function I59)
endfunction
function W09 takes nothing returns boolean
return not V
endfunction
function nt takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit nT=LUnit(EC8,"Unit")
local integer O5=GetPlayerId(GetOwningPlayer(nT))
set hq[O5]=.0
set hq[16+O5]=.0
set hq[32+O5]=.0
set V74[O5]=.0
set V74[16+O5]=.0
set V74[32+O5]=.0
set V74[48+O5]=.0
if GetUnitTypeId(nT)!='ncop' then
call UnitResetCooldown(nT)
call SetUnitManaPercentBJ(nT,'d')
endif
call LT7(EC8)
call EA8(t)
set t=null
set nT=null
return false
endfunction
function nu takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function nt))
call SUnit(EC8,"Unit",GetTriggerUnit())
set t=null
endfunction
function W59 takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local integer nv=MI8(E8)+MI8(F8)
local integer NumRequired=PC8(nv,nv/ 2+1)
local integer EC8=GetHandleId(t)
local integer nV=LInt(EC8,"ExecCount")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60.," ")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,90.,"WTF mode activated. In this mode spells have no cooldown or manacost.")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,90.,"This is a FOR FUN ONLY mode.")
set PS4=true
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(t,function nu)
set t=null
endfunction
function W29 takes nothing returns boolean
if J79(GetTriggerUnit())and IsUnitIllusion(GetTriggerUnit())==false then
call WV8(GetOwningPlayer(GetTriggerUnit()))
call X48("Level"+I2S(GetHeroLevel(GetTriggerUnit())),GetPlayerId(GetOwningPlayer(GetTriggerUnit())))
endif
return false
endfunction
function nw takes nothing returns nothing
call W19()
call EA8(GetTriggeringTrigger())
endfunction
function W_9 takes nothing returns boolean
if V==false and Ve()==false then
call nw()
endif
return false
endfunction
function X49 takes nothing returns boolean
return GetOwningPlayer(GetTriggerUnit())==O8
endfunction
function X79 takes nothing returns nothing
call SaveInteger(R8,StringHash("Stats"+I2S(GetPlayerId(GetOwningPlayer(GetKillingUnit())))),StringHash("NumOfNeutrals"),((LoadInteger(R8,StringHash("Stats"+I2S(GetPlayerId(GetOwningPlayer(GetKillingUnit())))),StringHash("NumOfNeutrals")))+1))
endfunction
function X89 takes nothing returns boolean
if GetOwningPlayer(GetTriggerUnit())==G8[0]then
call IssuePointOrderByIdLoc(GetTriggerUnit(),851983,Z)
elseif GetOwningPlayer(GetTriggerUnit())==N8[0]then
call IssuePointOrderByIdLoc(GetTriggerUnit(),851983,vv)
endif
return false
endfunction
function X99 takes nothing returns nothing
set T7=T7+1
endfunction
function XD9 takes nothing returns nothing
set S7=S7+1
endfunction
function XE9 takes nothing returns boolean
if GetOwningPlayer(GetTriggerUnit())==G8[0]then
call IssuePointOrderByIdLoc(GetTriggerUnit(),851983,ev)
endif
return false
endfunction
function XF9 takes nothing returns boolean
if GetOwningPlayer(GetTriggerUnit())==N8[0]then
call IssuePointOrderByIdLoc(GetTriggerUnit(),851983,ev)
endif
return false
endfunction
function XG9 takes nothing returns boolean
if GetOwningPlayer(GetTriggerUnit())==G8[0]then
call IssuePointOrderByIdLoc(GetTriggerUnit(),851983,ov)
endif
return false
endfunction
function XH9 takes nothing returns boolean
if GetOwningPlayer(GetTriggerUnit())==N8[0]then
call IssuePointOrderByIdLoc(GetTriggerUnit(),851983,ov)
endif
return false
endfunction
function XI9 takes nothing returns boolean
if GetOwningPlayer(GetTriggerUnit())==G8[0]then
call IssuePointOrderByIdLoc(GetTriggerUnit(),851983,rv)
endif
return false
endfunction
function XJ9 takes nothing returns boolean
if GetOwningPlayer(GetTriggerUnit())==N8[0]then
call IssuePointOrderByIdLoc(GetTriggerUnit(),851983,rv)
endif
return false
endfunction
function XK9 takes nothing returns nothing
local integer i=1
local integer id
loop
exitwhen i>5
set id=GetPlayerId(G8[i])
call X48("CSK"+I2S(id),C7[id])
call X48("CSD"+I2S(id),L7[id])
set id=GetPlayerId(N8[i])
call X48("CSK"+I2S(id),C7[id])
call X48("CSD"+I2S(id),L7[id])
set i=i+1
endloop
endfunction
function XM9 takes boolean UN9 returns nothing
local unit u
local string XN9="stand work alternate"
local string XO9="stand work"
local string XP9="stand alternate"
local string XQ9="stand"
set u=JE4
if O18(u)==false then
if UN9 then
call SetUnitAnimation(u,XN9)
else
call SetUnitAnimation(u,XP9)
endif
endif
set u=JF4
if O18(u)==false then
if UN9 then
call SetUnitAnimation(u,XN9)
else
call SetUnitAnimation(u,XP9)
endif
endif
set u=JG4
if O18(u)==false then
if UN9 then
call SetUnitAnimation(u,XN9)
else
call SetUnitAnimation(u,XP9)
endif
endif
set u=JH4
if O18(u)==false then
if UN9 then
call SetUnitAnimation(u,XN9)
else
call SetUnitAnimation(u,XP9)
endif
endif
set u=JI4
if O18(u)==false then
if UN9 then
call SetUnitAnimation(u,XN9)
else
call SetUnitAnimation(u,XP9)
endif
endif
set u=JJ4
if O18(u)==false then
if UN9 then
call SetUnitAnimation(u,XN9)
else
call SetUnitAnimation(u,XP9)
endif
endif
set u=J04
if O18(u)==false then
if UN9 then
call SetUnitAnimation(u,XO9)
else
call SetUnitAnimation(u,XQ9)
endif
endif
set u=J54
if O18(u)==false then
if UN9 then
call SetUnitAnimation(u,XO9)
else
call SetUnitAnimation(u,XQ9)
endif
endif
set u=J24
if O18(u)==false then
if UN9 then
call SetUnitAnimation(u,XO9)
else
call SetUnitAnimation(u,XQ9)
endif
endif
set u=J_4
if O18(u)==false then
if UN9 then
call SetUnitAnimation(u,XO9)
else
call SetUnitAnimation(u,XQ9)
endif
endif
set u=K44
if O18(u)==false then
if UN9 then
call SetUnitAnimation(u,XO9)
else
call SetUnitAnimation(u,XQ9)
endif
endif
set u=K74
if O18(u)==false then
if UN9 then
call SetUnitAnimation(u,XO9)
else
call SetUnitAnimation(u,XQ9)
endif
endif
set u=null
endfunction
function XR9 takes nothing returns boolean
call XM9(true)
return false
endfunction
function Trig_Spawn_Conditions takes nothing returns boolean
if(O_4)then
return F0
elseif(P44)then
return gH
elseif OL4 then
return Fz
elseif(X4 or VT)then
return oH
endif
return U
endfunction
function XS9 takes group XT9,integer XU9 returns nothing
local unit u
loop
set u=FirstOfGroup(XT9)
exitwhen(u==null)
call GroupRemoveUnit(XT9,u)
call SetUnitAbilityLevel(u,A8,XU9)
endloop
endfunction
function K3O takes nothing returns nothing
call T68(GetEnumUnit(),'AZ1W',1,$F,'BZ1W')
endfunction
function K4O takes nothing returns nothing
call T68(GetEnumUnit(),'AZ1V',1,$F,'BZ1V')
endfunction
function K5O takes group g returns nothing
if(TimerGetElapsed(E4))<7*60 then
call ForGroup(g,function K3O)
endif
endfunction
function K6O takes group g returns nothing
if(TimerGetElapsed(E4))<7*60 then
call ForGroup(g,function K4O)
endif
endfunction
function XV9 takes nothing returns nothing
local boolean XW9=ModuloInteger(GetTriggerExecCount(JS),7)==0
if B4 then
return
endif
call XM9(false)
if XW9 then
call XK9()
endif
if GetTriggerExecCount(JS)==1 and P94==false then
call UnitResetCooldown(KR4[1])
call UnitResetCooldown(KR4[2])
call UnitResetCooldown(KR4[3])
call UnitResetCooldown(KR4[4])
call UnitResetCooldown(KR4[5])
call UnitResetCooldown(KR4[7])
call UnitResetCooldown(KR4[8])
call UnitResetCooldown(KR4[9])
call UnitResetCooldown(KR4[10])
call UnitResetCooldown(KR4[11])
call T49(IZ4,false)
call T49(I34,false)
call T49(IL4,false)
call T49(JW4,false)
call T49(JX4,false)
call T49(JY4,false)
elseif GetTriggerExecCount(JS)==1 and P94 then
call T49(I34,false)
call T49(JX4,false)
endif
if GetTriggerExecCount(JS)==1 then
call EnableTrigger(ML4)
endif
if P94==false and PF4==false then
if(Rv)then
call CreateNUnitsAtLoc(S7,'ugho',N8[0],lv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(S7,'u001',N8[0],lv,bj_UNIT_FACING)
endif
call K5O(bj_lastCreatedGroup)
call XS9(bj_lastCreatedGroup,2)
endif
if PE4==false then
if(Av)then
call CreateNUnitsAtLoc(S7,'ugho',N8[0],Jv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(S7,'u001',N8[0],Jv,bj_UNIT_FACING)
endif
call XS9(bj_lastCreatedGroup,3)
endif
if P94==false and PD4==false then
if(Nv)then
call CreateNUnitsAtLoc(S7,'ugho',N8[0],Lv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(S7,'u001',N8[0],Lv,bj_UNIT_FACING)
endif
call K6O(bj_lastCreatedGroup)
call XS9(bj_lastCreatedGroup,4)
endif
if P94==false and PF4==false then
if(av)then
call CreateNUnitsAtLoc(T7,'unec',N8[0],qv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'u002',N8[0],qv,bj_UNIT_FACING)
endif
call K5O(bj_lastCreatedGroup)
call XS9(bj_lastCreatedGroup,2)
endif
if PE4==false then
if(Ev)then
call CreateNUnitsAtLoc(T7,'unec',N8[0],mv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'u002',N8[0],mv,bj_UNIT_FACING)
endif
call XS9(bj_lastCreatedGroup,3)
endif
if P94==false and PD4==false then
if(Ov)then
call CreateNUnitsAtLoc(T7,'unec',N8[0],pv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'u002',N8[0],pv,bj_UNIT_FACING)
endif
call K6O(bj_lastCreatedGroup)
call XS9(bj_lastCreatedGroup,4)
endif
if XW9 then
if P94==false and PF4==false then
if(av)then
call CreateNUnitsAtLoc(T7,'umtw',N8[0],qv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'u00R',N8[0],qv,bj_UNIT_FACING)
endif
call XS9(bj_lastCreatedGroup,2)
endif
if PE4==false then
if(Ev)then
call CreateNUnitsAtLoc(T7,'umtw',N8[0],mv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'u00R',N8[0],mv,bj_UNIT_FACING)
endif
call XS9(bj_lastCreatedGroup,3)
endif
if P94==false and PD4==false then
if(Ov)then
call CreateNUnitsAtLoc(T7,'umtw',N8[0],pv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'u00R',N8[0],pv,bj_UNIT_FACING)
endif
call XS9(bj_lastCreatedGroup,4)
endif
endif
if P94==false and PF4==false then
if(Cv)then
call CreateNUnitsAtLoc(S7,'esen',G8[0],tv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(S7,'e00V',G8[0],tv,bj_UNIT_FACING)
endif
call K6O(bj_lastCreatedGroup)
call XS9(bj_lastCreatedGroup,2)
endif
if PE4==false then
if(Dv)then
call CreateNUnitsAtLoc(S7,'esen',G8[0],Qv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(S7,'e00V',G8[0],Qv,bj_UNIT_FACING)
endif
call XS9(bj_lastCreatedGroup,3)
endif
if P94==false and PD4==false then
if(fv)then
call CreateNUnitsAtLoc(S7,'esen',G8[0],sv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(S7,'e00V',G8[0],sv,bj_UNIT_FACING)
endif
call K5O(bj_lastCreatedGroup)
call XS9(bj_lastCreatedGroup,4)
endif
if P94==false and PF4==false then
if(O7)then
call CreateNUnitsAtLoc(T7,'edry',G8[0],U7,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'e00W',G8[0],U7,bj_UNIT_FACING)
endif
call K6O(bj_lastCreatedGroup)
call XS9(bj_lastCreatedGroup,2)
endif
if PE4==false then
if(Bv)then
call CreateNUnitsAtLoc(T7,'edry',G8[0],Tv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'e00W',G8[0],Tv,bj_UNIT_FACING)
endif
call XS9(bj_lastCreatedGroup,3)
endif
if P94==false and PD4==false then
if(P7)then
call CreateNUnitsAtLoc(T7,'edry',G8[0],Uv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'e00W',G8[0],Uv,bj_UNIT_FACING)
endif
call K5O(bj_lastCreatedGroup)
call XS9(bj_lastCreatedGroup,4)
endif
if XW9 then
if P94==false and PF4==false then
if(O7)then
call CreateNUnitsAtLoc(T7,'ebal',G8[0],U7,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'e026',G8[0],U7,bj_UNIT_FACING)
endif
call XS9(bj_lastCreatedGroup,2)
endif
if PE4==false then
if(Bv)then
call CreateNUnitsAtLoc(T7,'ebal',G8[0],Tv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'e026',G8[0],Tv,bj_UNIT_FACING)
endif
call XS9(bj_lastCreatedGroup,3)
endif
if P94==false and PD4==false then
if(P7)then
call CreateNUnitsAtLoc(T7,'ebal',G8[0],Uv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'e026',G8[0],Uv,bj_UNIT_FACING)
endif
call XS9(bj_lastCreatedGroup,4)
endif
endif
endfunction
function XX9 takes nothing returns nothing
set av=false
call DisableTrigger(cA)
call X48("Rax"+I2S(0)+I2S(0)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
endfunction
function XY9 takes nothing returns nothing
set Ev=false
call DisableTrigger(CA)
call X48("Rax"+I2S(0)+I2S(1)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
endfunction
function XZ9 takes nothing returns nothing
set Ov=false
call DisableTrigger(dA)
call X48("Rax"+I2S(0)+I2S(2)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
endfunction
function XA9 takes nothing returns nothing
set Rv=false
call DisableTrigger(DA)
call X48("Rax"+I2S(0)+I2S(0)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
endfunction
function XB9 takes nothing returns nothing
set Av=false
call DisableTrigger(fA)
call X48("Rax"+I2S(0)+I2S(1)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
endfunction
function XC9 takes nothing returns nothing
set Nv=false
call DisableTrigger(FA)
call X48("Rax"+I2S(0)+I2S(2)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
endfunction
function X39 takes nothing returns nothing
set O7=false
call DisableTrigger(gA)
call X48("Rax"+I2S(1)+I2S(0)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
endfunction
function X69 takes nothing returns nothing
set Bv=false
call DisableTrigger(GA)
call X48("Rax"+I2S(1)+I2S(1)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
endfunction
function XL9 takes nothing returns nothing
set P7=false
call DisableTrigger(LA)
call X48("Rax"+I2S(1)+I2S(2)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
endfunction
function X19 takes nothing returns nothing
set Cv=false
call DisableTrigger(mA)
call X48("Rax"+I2S(1)+I2S(0)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
endfunction
function X09 takes nothing returns nothing
set Dv=false
call DisableTrigger(MA)
call X48("Rax"+I2S(1)+I2S(1)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
endfunction
function X59 takes nothing returns nothing
set fv=false
call DisableTrigger(PA)
call X48("Rax"+I2S(1)+I2S(2)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))
endfunction
function X29 takes nothing returns boolean
local real X_9=GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)/ GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)
if X_9<.75 and iW==false then
set iW=true
call X48("Tree",75)
endif
if X_9<.5 and rW==false then
set rW=true
call X48("Tree",50)
endif
if X_9<.25 and oW==false then
set oW=true
call X48("Tree",25)
endif
if X_9<.1 and eW==false then
set eW=true
call X48("Tree",10)
endif
return false
endfunction
function Y49 takes nothing returns boolean
local real X_9=GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)/ GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)
if X_9<.75 and vW==false then
set vW=true
call X48("Throne",75)
endif
if X_9<.5 and zw==false then
set zw=true
call X48("Throne",50)
endif
if X_9<.25 and Uw==false then
set Uw=true
call X48("Throne",25)
endif
if X_9<.1 and tw==false then
set tw=true
call X48("Throne",10)
endif
return false
endfunction
function Y79 takes nothing returns boolean
return(not(Cv or Dv or fv or O7 or Bv or P7))
endfunction
function Y89 takes nothing returns nothing
call NN8(bj_FORCE_ALL_PLAYERS,20.,(GetObjectName(('n04O')))+" "+(GetObjectName(('n0C7'))))
call SetPlayerTechResearchedSwap('R00D',(GetPlayerTechCountSimple('R00D',G8[0])+30),G8[0])
call SetPlayerTechResearchedSwap('R00C',(GetPlayerTechCountSimple('R00C',G8[0])+30),G8[0])
call DisableTrigger(SA)
endfunction
function Y99 takes nothing returns boolean
return(not(Rv or Av or Nv or av or Ev or Ov))
endfunction
function YD9 takes nothing returns nothing
call NN8(bj_FORCE_ALL_PLAYERS,20.,(GetObjectName(('n04X')))+" "+(GetObjectName(('n0C9'))))
call SetPlayerTechResearchedSwap('R009',(GetPlayerTechCountSimple('R009',N8[0])+30),N8[0])
call SetPlayerTechResearchedSwap('R00B',(GetPlayerTechCountSimple('R00B',N8[0])+30),N8[0])
call DisableTrigger(TA)
endfunction
function YE9 takes nothing returns nothing
call SetPlayerTechResearchedSwap('R007',(GetPlayerTechCountSimple('R007',G8[0])+1),G8[0])
call SetPlayerTechResearchedSwap('R00C',(GetPlayerTechCountSimple('R00C',G8[0])+1),G8[0])
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',G8[0])+1),G8[0])
call SetPlayerTechResearchedSwap('R00D',(GetPlayerTechCountSimple('R00D',G8[0])+1),G8[0])
call SetPlayerTechResearchedSwap('R009',(GetPlayerTechCountSimple('R009',N8[0])+1),N8[0])
call SetPlayerTechResearchedSwap('R003',(GetPlayerTechCountSimple('R003',N8[0])+1),N8[0])
call SetPlayerTechResearchedSwap('R00A',(GetPlayerTechCountSimple('R00A',N8[0])+1),N8[0])
call SetPlayerTechResearchedSwap('R00B',(GetPlayerTechCountSimple('R00B',N8[0])+1),N8[0])
endfunction
function YF9 takes nothing returns nothing
local location YG9=GetRectCenter(KE)
call RemoveUnit(CreateUnitAtLoc(O8,'nbdo',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nbds',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'ngst',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'n026',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nggr',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nbdk',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nbwm',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nogm',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nomg',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nfpc',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nfpu',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nsth',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nstl',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nsat',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nwlg',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nkol',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nkob',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nkot',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'ncnk',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'ncen',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'ngns',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nftb',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nfsh',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'ngh1',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'npfl',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nowe',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nowb',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nmrm',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nmrr',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'nmrl',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'ndtr',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'ndtw',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'n0LC',YG9,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(O8,'n0LD',YG9,bj_UNIT_FACING))
call RemoveLocation(YG9)
set YG9=null
endfunction
function YH9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'n0HW',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'n0HX',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'n0HW',x,y,0),x,y)
endfunction
function YI9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'njg1',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'njg1',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'njga',x,y,0),x,y)
endfunction
function YJ9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'nbdo',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nbdo',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nbds',x,y,0),x,y)
endfunction
function YK9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'nbdk',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nbdk',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nbwm',x,y,0),x,y)
endfunction
function YM9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'ngst',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'ngst',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nggr',x,y,0),x,y)
endfunction
function AncientLizards_AI takes nothing returns boolean
call EA8(GetTriggeringTrigger())
call IssueTargetOrderById(GetTriggerUnit(),852209,GetTriggerUnit())
return false
endfunction
function YN9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'n0LC',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'n0LD',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'n0LD',x,y,0),x,y)
endfunction
function YO9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'nogm',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nogm',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nomg',x,y,0),x,y)
endfunction
function YP9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'nfpc',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nfpu',x,y,0),x,y)
endfunction
function YQ9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'nsth',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nstl',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nsat',x,y,0),x,y)
endfunction
function YR9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'nstl',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nstl',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nsat',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nsat',x,y,0),x,y)
endfunction
function YS9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'nwlg',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nwlg',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'n00S',x,y,0),x,y)
endfunction
function YT9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'n026',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'n026',x,y,0),x,y)
endfunction
function YU9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'nkol',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nkob',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nkob',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nkob',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nkot',x,y,0),x,y)
endfunction
function YV9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'nftb',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nftb',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nfsh',x,y,0),x,y)
endfunction
function YW9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'ncen',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'ncnk',x,y,0),x,y)
endfunction
function YX9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'ngns',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'ngns',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'ngns',x,y,0),x,y)
endfunction
function YY9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'nftb',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nftb',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nkol',x,y,0),x,y)
endfunction
function YZ9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'ngh1',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'npfl',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'npfl',x,y,0),x,y)
endfunction
function YA9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'nowe',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nowb',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'nowb',x,y,0),x,y)
endfunction
function YB9 takes real x,real y returns nothing
call SetUnitPosition(CreateUnit(O8,'ndtr',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'ndtr',x,y,0),x,y)
call SetUnitPosition(CreateUnit(O8,'ndtw',x,y,0),x,y)
endfunction
function YC9 takes real x,real y returns nothing
local integer D5
loop
set D5=GetRandomInt(1,5)
exitwhen D5!=LastNeutralType[1]
endloop
set LastNeutralType[1]=D5
if D5==1 then
call YP9(x,y)
elseif D5==2 then
call YQ9(x,y)
elseif D5==3 then
call YA9(x,y)
elseif D5==4 then
call YB9(x,y)
elseif D5==5 then
call YW9(x,y)
endif
endfunction
function Y39 takes real x,real y returns nothing
local integer D5
loop
set D5=GetRandomInt(1,5)
exitwhen D5!=LastNeutralType[2]
endloop
set LastNeutralType[2]=D5
if D5==1 then
call YP9(x,y)
elseif D5==2 then
call YQ9(x,y)
elseif D5==3 then
call YA9(x,y)
elseif D5==4 then
call YB9(x,y)
elseif D5==5 then
call YW9(x,y)
endif
endfunction
function Y69 takes real x,real y returns nothing
local integer D5
loop
set D5=GetRandomInt(1,5)
exitwhen D5!=LastNeutralType[3]
endloop
set LastNeutralType[3]=D5
if D5==1 then
call YP9(x,y)
elseif D5==2 then
call YQ9(x,y)
elseif D5==3 then
call YA9(x,y)
elseif D5==4 then
call YB9(x,y)
elseif D5==5 then
call YW9(x,y)
endif
endfunction
function YL9 takes real x,real y returns nothing
local integer D5
loop
set D5=GetRandomInt(1,5)
exitwhen D5!=LastNeutralType[4]
endloop
set LastNeutralType[4]=D5
if D5==1 then
call YP9(x,y)
elseif D5==2 then
call YQ9(x,y)
elseif D5==3 then
call YA9(x,y)
elseif D5==4 then
call YB9(x,y)
elseif D5==5 then
call YW9(x,y)
endif
endfunction
function Y19 takes real x,real y returns nothing
local integer D5
loop
set D5=GetRandomInt(1,5)
exitwhen D5!=LastNeutralType[5]
endloop
set LastNeutralType[5]=D5
if D5==1 then
call YT9(x,y)
elseif D5==2 then
call YO9(x,y)
elseif D5==3 then
call YR9(x,y)
elseif D5==4 then
call YS9(x,y)
elseif D5==5 then
call YW9(x,y)
endif
endfunction
function Y09 takes real x,real y returns nothing
local integer D5
loop
set D5=GetRandomInt(1,5)
exitwhen D5!=LastNeutralType[6]
endloop
set LastNeutralType[6]=D5
if D5==1 then
call YT9(x,y)
elseif D5==2 then
call YO9(x,y)
elseif D5==3 then
call YR9(x,y)
elseif D5==4 then
call YS9(x,y)
elseif D5==5 then
call YW9(x,y)
endif
endfunction
function Y59 takes real x,real y returns nothing
local integer D5
loop
set D5=GetRandomInt(1,5)
exitwhen D5!=LastNeutralType[7]
endloop
set LastNeutralType[7]=D5
if D5==1 then
call YT9(x,y)
elseif D5==2 then
call YO9(x,y)
elseif D5==3 then
call YR9(x,y)
elseif D5==4 then
call YS9(x,y)
elseif D5==5 then
call YW9(x,y)
endif
endfunction
function Y29 takes real x,real y returns nothing
local integer D5
loop
set D5=GetRandomInt(1,5)
exitwhen D5!=LastNeutralType[8]
endloop
set LastNeutralType[8]=D5
if D5==1 then
call YT9(x,y)
elseif D5==2 then
call YO9(x,y)
elseif D5==3 then
call YR9(x,y)
elseif D5==4 then
call YS9(x,y)
elseif D5==5 then
call YW9(x,y)
endif
endfunction
function Y_9 takes real x,real y returns nothing
local integer D5
loop
set D5=GetRandomInt(1,6)
exitwhen D5!=LastNeutralType[9]
endloop
set LastNeutralType[9]=D5
if D5==1 then
call YZ9(x,y)
elseif D5==2 then
call YY9(x,y)
elseif D5==3 then
call YX9(x,y)
elseif D5==4 then
call YU9(x,y)
elseif D5==5 then
call YV9(x,y)
elseif D5==6 then
call YH9(x,y)
endif
endfunction
function Z49 takes real x,real y returns nothing
local integer D5
loop
set D5=GetRandomInt(1,6)
exitwhen D5!=LastNeutralType[10]
endloop
set LastNeutralType[10]=D5
if D5==1 then
call YZ9(x,y)
elseif D5==2 then
call YY9(x,y)
elseif D5==3 then
call YX9(x,y)
elseif D5==4 then
call YU9(x,y)
elseif D5==5 then
call YV9(x,y)
elseif D5==6 then
call YH9(x,y)
endif
endfunction
function Z79 takes real x,real y returns nothing
local integer D5
loop
set D5=GetRandomInt(1,5)
exitwhen D5!=LastNeutralType[11]
endloop
set LastNeutralType[11]=D5
if D5==1 then
call YI9(x,y)
elseif D5==2 then
call YJ9(x,y)
elseif D5==3 then
call YK9(x,y)
elseif D5==4 then
call YM9(x,y)
elseif D5==5 then
call YN9(x,y)
endif
endfunction
function Z89 takes real x,real y returns nothing
local integer D5
loop
set D5=GetRandomInt(1,5)
exitwhen D5!=LastNeutralType[12]
endloop
set LastNeutralType[12]=D5
if D5==1 then
call YI9(x,y)
elseif D5==2 then
call YJ9(x,y)
elseif D5==3 then
call YK9(x,y)
elseif D5==4 then
call YM9(x,y)
elseif D5==5 then
call YN9(x,y)
endif
endfunction
function Z99 takes nothing returns nothing
if GetUnitAbilityLevel(GetEnumUnit(),'A0P4')!=0 then
call GroupRemoveUnit(C8,GetEnumUnit())
endif
if GetUnitTypeId(GetEnumUnit())=='o003' then
call GroupRemoveUnit(C8,GetEnumUnit())
endif
if GetUnitTypeId(GetEnumUnit())=='o01X' then
call GroupRemoveUnit(C8,GetEnumUnit())
endif
if O18(GetEnumUnit())then
call GroupRemoveUnit(C8,GetEnumUnit())
endif
if IsCourier(GetEnumUnit())then
call GroupRemoveUnit(C8,GetEnumUnit())
endif
endfunction
function ZD9 takes group g returns boolean
set C8=g
call ForGroup(g,function Z99)
return FirstOfGroup(g)==null
endfunction
function ZE9 takes nothing returns boolean
local group g
local rect r1
local rect r2
if oy==false then
return false
endif
set r1=Sr
set r2=Br
set g=OG8()
call GroupEnumUnitsInRect(g,r1,Condition(function KF8))
if ZD9(g)then
call Z79(GetRectCenterX(r2),GetRectCenterY(r2))
endif
call OF8(g)
set r1=Ur
set r2=cr
set g=OG8()
call GroupEnumUnitsInRect(g,r1,Condition(function KF8))
if ZD9(g)then
call Z89(GetRectCenterX(r2),GetRectCenterY(r2))
endif
call OF8(g)
set r1=Wr
set r2=Cr
set g=OG8()
call GroupEnumUnitsInRect(g,r1,Condition(function KF8))
if ZD9(g)then
call YC9(GetRectCenterX(r2),GetRectCenterY(r2))
endif
call OF8(g)
set r1=zr
set r2=fr
set g=OG8()
call GroupEnumUnitsInRect(g,r1,Condition(function KF8))
if ZD9(g)then
call Y69(GetRectCenterX(r2),GetRectCenterY(r2))
endif
call OF8(g)
set r1=Zr
set r2=Fr
set g=OG8()
call GroupEnumUnitsInRect(g,r1,Condition(function KF8))
if ZD9(g)then
call Y_9(GetRectCenterX(r2),GetRectCenterY(r2))
endif
call OF8(g)
set r1=vi
set r2=Hr
set g=OG8()
call GroupEnumUnitsInRect(g,r1,Condition(function KF8))
if ZD9(g)then
call Z49(GetRectCenterX(r2),GetRectCenterY(r2))
endif
call OF8(g)
set r1=ei
set r2=jr
set g=OG8()
call GroupEnumUnitsInRect(g,r1,Condition(function KF8))
if ZD9(g)then
call Y59(GetRectCenterX(r2),GetRectCenterY(r2))
endif
call OF8(g)
set r1=oi
set r2=Jr
set g=OG8()
call GroupEnumUnitsInRect(g,r1,Condition(function KF8))
if ZD9(g)then
call Y29(GetRectCenterX(r2),GetRectCenterY(r2))
endif
call OF8(g)
set r1=xi
set r2=lr
set g=OG8()
call GroupEnumUnitsInRect(g,r1,Condition(function KF8))
if ZD9(g)then
call YL9(GetRectCenterX(r2),GetRectCenterY(r2))
endif
call OF8(g)
set r1=ai
set r2=mr
set g=OG8()
call GroupEnumUnitsInRect(g,r1,Condition(function KF8))
if ZD9(g)then
call Y09(GetRectCenterX(r2),GetRectCenterY(r2))
endif
call OF8(g)
set r1=Ai
set r2=Ni
set g=OG8()
call GroupEnumUnitsInRect(g,r1,Condition(function KF8))
if ZD9(g)then
call Y19(GetRectCenterX(r2),GetRectCenterY(r2))
endif
call OF8(g)
set r1=bi
set r2=Bi
set g=OG8()
call GroupEnumUnitsInRect(g,r1,Condition(function KF8))
if ZD9(g)then
call Y39(GetRectCenterX(r2),GetRectCenterY(r2))
endif
call OF8(g)
set r1=null
set r2=null
set g=null
return false
endfunction
function ZF9 takes nothing returns nothing
local integer MV8=GetRandomInt(1,9)
local location l
if P94 then
set MV8=GetRandomInt(1,3)
if MV8==1 then
set MV8=2
endif
if MV8==2 then
set MV8=5
endif
if MV8==3 then
set MV8=8
endif
endif
if(MV8==1)then
set l=GetRectCenter(BE)
call CreateNUnitsAtLoc(1,'n003',G8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n051'))))
call XS9(bj_lastCreatedGroup,4)
call RemoveLocation(l)
endif
if(MV8==2)then
set l=GetRectCenter(bE)
call CreateNUnitsAtLoc(1,'n003',G8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n052'))))
call XS9(bj_lastCreatedGroup,2)
call RemoveLocation(l)
endif
if(MV8==3)then
set l=GetRectCenter(AE)
call CreateNUnitsAtLoc(1,'n003',G8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n053'))))
call XS9(bj_lastCreatedGroup,3)
call RemoveLocation(l)
endif
if(MV8==4)then
set l=GetRectCenter(BE)
call CreateNUnitsAtLoc(1,'n00E',G8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n058'))))
call XS9(bj_lastCreatedGroup,4)
call RemoveLocation(l)
endif
if(MV8==5)then
set l=GetRectCenter(bE)
call CreateNUnitsAtLoc(1,'n00E',G8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n04Z'))))
call XS9(bj_lastCreatedGroup,2)
call RemoveLocation(l)
endif
if(MV8==6)then
set l=GetRectCenter(AE)
call CreateNUnitsAtLoc(1,'n00E',G8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n057'))))
call XS9(bj_lastCreatedGroup,3)
call RemoveLocation(l)
endif
if(MV8==7)and P94==false then
set l=GetRectCenter(BE)
call CreateNUnitsAtLoc(1,'n00D',G8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n056'))))
call XS9(bj_lastCreatedGroup,4)
call RemoveLocation(l)
endif
if(MV8==8)and P94==false then
set l=GetRectCenter(bE)
call CreateNUnitsAtLoc(1,'n00D',G8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n04T'))))
call XS9(bj_lastCreatedGroup,2)
call RemoveLocation(l)
endif
if(MV8==9)then
set l=GetRectCenter(AE)
call CreateNUnitsAtLoc(1,'n00D',G8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n05C'))))
call XS9(bj_lastCreatedGroup,3)
call RemoveLocation(l)
endif
if(MV8==1)then
set l=GetRectCenter(OE)
call CreateNUnitsAtLoc(1,'n003',N8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n0CD'))))
call XS9(bj_lastCreatedGroup,4)
call RemoveLocation(l)
endif
if(MV8==2)then
set l=GetRectCenter(XE)
call CreateNUnitsAtLoc(1,'n003',N8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n0CE'))))
call XS9(bj_lastCreatedGroup,2)
call RemoveLocation(l)
endif
if(MV8==3)then
set l=GetRectCenter(IE)
call CreateNUnitsAtLoc(1,'n003',N8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n0CC'))))
call XS9(bj_lastCreatedGroup,3)
call RemoveLocation(l)
endif
if(MV8==4)then
set l=GetRectCenter(OE)
call CreateNUnitsAtLoc(1,'n00E',N8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n0CG'))))
call XS9(bj_lastCreatedGroup,4)
call RemoveLocation(l)
endif
if(MV8==5)then
set l=GetRectCenter(XE)
call CreateNUnitsAtLoc(1,'n00E',N8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n0CH'))))
call XS9(bj_lastCreatedGroup,2)
call RemoveLocation(l)
endif
if(MV8==6)then
set l=GetRectCenter(IE)
call CreateNUnitsAtLoc(1,'n00E',N8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n0CF'))))
call XS9(bj_lastCreatedGroup,3)
call RemoveLocation(l)
endif
if(MV8==7)then
set l=GetRectCenter(OE)
call CreateNUnitsAtLoc(1,'n00D',N8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n0CJ'))))
call XS9(bj_lastCreatedGroup,4)
call RemoveLocation(l)
endif
if(MV8==8)then
set l=GetRectCenter(XE)
call CreateNUnitsAtLoc(1,'n00D',N8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n0CK'))))
call XS9(bj_lastCreatedGroup,2)
call RemoveLocation(l)
endif
if(MV8==9)then
set l=GetRectCenter(IE)
call CreateNUnitsAtLoc(1,'n00D',N8[0],l,bj_UNIT_FACING)
call NN8(bj_FORCE_ALL_PLAYERS,10.,(GetObjectName(('n0CI'))))
call XS9(bj_lastCreatedGroup,3)
call RemoveLocation(l)
endif
set l=null
endfunction
function N9 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
if O18(N28)==false and N28!=null then
call SetUnitScale(N28,PG8(N28)*ZS,PG8(N28)*ZS,PG8(N28)*ZS)
endif
call LT7(EC8)
call EA8(t)
set t=null
set N28=null
return false
endfunction
function T39 takes nothing returns nothing
local integer x=1
local player p
loop
exitwhen x>16
if AV7(Y7[x],BU[xuejingshi])!=null then
call RemoveUnit(OX4[GetPlayerId(GetOwningPlayer(Y7[x]))])
endif
set x=x+1
endloop
endfunction
function ZG9 takes nothing returns boolean
return IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and XC8(GetUnitTypeId(GetFilterUnit()))==false and AV7(GetTriggerUnit(),BU[xuejingshi])!=null
endfunction
function ZH9 takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')!=1 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1
endfunction
function ZI9 takes nothing returns nothing
call SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)+Y8)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\BloodstoneHealTarget.mdx",GetEnumUnit(),"origin"))
endfunction
function ZJ9 takes nothing returns nothing
local group g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),1700,Condition(function ZH9))
set Y8=500+30*GetItemCharges(AV7(GetTriggerUnit(),BU[xuejingshi]))
call ForGroup(g,function ZI9)
call OF8(g)
set g=null
endfunction
function ZK9 takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit AC7=CreateUnit(GetOwningPlayer(N28),'H00M',GetUnitX(N28),GetUnitY(N28),GetUnitFacing(N28))
set OX4[GetPlayerId(GetOwningPlayer(N28))]=AC7
call ZJ9()
set AC7=null
set N28=null
endfunction
function ZM9 takes unit u returns nothing
local integer ZN9=GetItemCharges(AV7(u,BU[xuejingshi]))
if ZN9>0 then
call SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MANA)+ZN9)
endif
endfunction
function ZO9 takes nothing returns boolean
local integer i=1
local unit N28
local integer id
if GA4>0 then
loop
exitwhen i>5
set id=GetPlayerId(G8[i])
set N28=Y7[id]
if SO4[id]>0 and N28!=null and GetUnitTypeId(N28)>1 and IsUnitType(N28,UNIT_TYPE_DEAD)==false then
call ZM9(N28)
endif
set id=GetPlayerId(N8[i])
set N28=Y7[id]
if SO4[id]>0 and N28!=null and GetUnitTypeId(N28)>1 and IsUnitType(N28,UNIT_TYPE_DEAD)==false then
call ZM9(N28)
endif
set i=i+1
endloop
endif
set N28=null
return false
endfunction
function oK takes nothing returns nothing
set gg[0]=CreateTimer()
set gg[1]=CreateTimer()
set gg[2]=CreateTimer()
set gg[3]=CreateTimer()
set gg[4]=CreateTimer()
set gg[5]=CreateTimer()
set gg[6]=CreateTimer()
set gg[7]=CreateTimer()
set gg[8]=CreateTimer()
set gg[9]=CreateTimer()
set gg[10]=CreateTimer()
set gg[11]=CreateTimer()
set gg[12]=CreateTimer()
set gg[13]=CreateTimer()
set gg[14]=CreateTimer()
set gg[15]=CreateTimer()
endfunction
function ZP9 takes unit u,real d returns boolean
if IsUnitType(u,UNIT_TYPE_HERO)or GetUnitAbilityLevel(u,'A04R')>0 then
return d>5
endif
return true
endfunction
function ZQ9 takes unit u returns unit
local group g
if GetUnitAbilityLevel(u,'A04R')==0 then
return u
endif
set H04=XR4
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),900,Condition(function UM8))
set XQ4=FirstOfGroup(g)
call OF8(g)
return XQ4
endfunction
function ZR9 takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit AC7
local unit Z77
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
call DestroyEffect(LEff(EC8,"FX"))
call LT7(EC8)
call EA8(t)
else
set Z77=LUnit(EC8,"Source")
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),0)
call UnitAddAbility(AC7,'A0K6')
set XR4=Z77
if IssueTargetOrderById(AC7,852587,ZQ9(GetEventDamageSource()))then
call AddTimedBoolBuff(GetTriggerUnit(),"ZS9",1)
endif
endif
set t=null
set AC7=null
set Z77=null
endfunction
function ZT9 takes nothing returns boolean
if(GetTriggerEventId()==EVENT_UNIT_DAMAGED and ZP9(GetEventDamageSource(),GetEventDamage())and GetRandomInt(1,'d')<21 and LState(GetTriggerUnit(),"ZS9")==false)or GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
call ZR9()
endif
return false
endfunction
function ZS9 takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
if m5==null then
set m5=Z77
endif
call AddTimedBoolBuff(m5,"StaticChargeActive",15)
call TriggerRegisterTimerEvent(t,15.,false)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function ZT9))
call SEff(EC8,"FX",AddSpecialEffectTarget("Abilities\\Spells\\Orc\\LightningShield\\LightningShieldTarget.mdl",m5,"origin"))
call SUnit(EC8,"Source",Z77)
set t=null
set Z77=null
set m5=null
endfunction
function ZU9 takes nothing returns nothing
if GetSpellAbilityId()=='A0JL' and(LInt(GetHandleId(GetSpellTargetUnit()),"StaticChargeActive")==1)==false then
call ZS9()
endif
endfunction
function ZV9 takes integer i returns boolean
return i=='I006' or i=='I008' or i=='I00J' or i=='I00K' or i=='I007'
endfunction
function ZW9 takes nothing returns boolean
if GetIssuedOrderId()==851971 then
if GetOrderTargetItem()!=null and ZV9(GetItemTypeId(GetOrderTargetItem()))then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n0LU'))
endif
endif
return false
endfunction
function ZX9 takes unit ZY9 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,ZY9,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(t,Condition(function ZW9))
set t=null
endfunction
function ZZ9 takes player p returns integer
local integer r=GetRandomInt(1,6)
if IsJWPlayer(p)then
if r==1 then
return WC4
elseif r==2 then
return W34
elseif r==3 then
return W64
elseif r==4 then
return WL4
elseif r==5 then
return W14
else
return W04
endif
else
if r==1 then
return W24
elseif r==2 then
return W_4
elseif r==3 then
return X44
elseif r==4 then
return X74
elseif r==5 then
return X84
else
return X94
endif
endif
return 0
endfunction
function ZA9 takes player p returns integer
if GetRandomInt(1,3)==1 then
return XI4
elseif IsJWPlayer(p)then
return WB4
else
return W54
endif
return 0
endfunction
function ZB9 takes nothing returns nothing
local unit ZC9=CreateUnit(GetOwningPlayer(GetTriggerUnit()),ZZ9(GetOwningPlayer(GetTriggerUnit())),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetUnitFacing(GetTriggerUnit()))
local real x=GetUnitX(GetTriggerUnit())
local real y=GetUnitY(GetTriggerUnit())
local real a=GetUnitFacing(GetTriggerUnit())
call SX9(ZC9)
call SetUnitPosition(ZC9,x+25*Cos(a*bj_DEGTORAD),y+25*Sin(a*bj_DEGTORAD))
if KT[GetPlayerId(GetOwningPlayer(ZC9))]==false then
call UnitRemoveType(ZC9,UNIT_TYPE_PEON)
else
call UnitAddType(ZC9,UNIT_TYPE_PEON)
endif
set ZC9=null
endfunction
function Z39 takes unit SS9 returns nothing
local integer i=0
local integer W57=GetHandleId(SS9)
local integer O5=LInt(W57,"aiCrow|CurrentOwner")
set F27=null
call DisableTrigger(GW4)
loop
exitwhen i>5
set F27=UnitItemInSlot(SS9,i)
if F27!=null then
call UnitAddItem(KR4[O5],F27)
endif
set i=i+1
endloop
call EnableTrigger(GW4)
set OM7[224+O5]=false
call SInt(W57,"aiCrow|CurrentOwner",LInt(W57,"aiCrow|TrueOwner"))
call SBool(W57,"aiCrow|Active",false)
call STrig(W57,"aiCrow|DeliverTrigger",null)
call SInt(W57,"aiCrow|GoHomeWpt",0)
set hq[896+O5]=Bz+15
if(PK7)then
call SetUnitOwner(KR4[16+O5],Player(LInt(W57,"aiCrow|TrueOwner")),false)
endif
endfunction
function Z69 takes unit Z77 returns nothing
local real x
local real y
if IsJWPlayer(GetOwningPlayer(Z77))then
set x=GetRectCenterX(QD)
set y=GetRectCenterY(QD)
else
set x=GetRectCenterX(PD)
set y=GetRectCenterY(PD)
endif
call IssuePointOrderById(Z77,851986,x,y)
call SBool(GetHandleId(Z77),"aiCrow|Away",false)
endfunction
function ZL9 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local unit Z77=(LoadUnitHandle(R8,GetHandleId(t),(2)))
local integer W57=GetHandleId(Z77)
local real x=0
local real y=0
local effect Z19=null
local integer i=0
local integer j=0
local integer O5=LInt(W57,"aiCrow|CurrentOwner")
if O18(Z77)==false then
if(not LBool(W57,"aiCrow|Alive"))then
call SBool(W57,"aiCrow|Alive",true)
endif
if IsTZPlayer(GetOwningPlayer(Z77))then
set x=JQ4
set y=JR4
else
set x=IK4
set y=IM4
endif
if Z87(GetUnitX(Z77),GetUnitY(Z77),x,y)<825 then
if not PJ7 then
call AddPermanentAbility(Z77,'Avul')
endif
set Z19=LEff(W57,"aiCrow|EffHealHP")
if GetUnitLifePercent(Z77)<'d' then
call SetWidgetLife(Z77,GetWidgetLife(Z77)+.035*GetUnitState(Z77,UNIT_STATE_MAX_LIFE))
if Z19==null then
set Z19=AddSpecialEffectTarget("Abilities\\Spells\\Other\\ANrm\\ANrmTarget.mdl",Z77,"origin")
call SEff(W57,"aiCrow|EffHealHP",Z19)
endif
elseif Z19!=null then
call DestroyEffect(Z19)
endif
if GetUnitState(Z77,UNIT_STATE_MAX_MANA)>0 then
set Z19=LEff(W57,"aiCrow|EffHealMP")
if GetUnitManaPercent(Z77)<'d' then
call SetUnitState(Z77,UNIT_STATE_MANA,GetUnitState(Z77,UNIT_STATE_MANA)+.035*GetUnitState(Z77,UNIT_STATE_MAX_MANA))
if Z19==null then
set Z19=AddSpecialEffectTarget("Abilities\\Spells\\Other\\ANrl\\ANrlTarget.mdl",Z77,"origin")
call SEff(W57,"aiCrow|EffHealMP",Z19)
endif
elseif Z19!=null then
call DestroyEffect(Z19)
endif
endif
if LBool(W57,"aiCrow|Active")then
if HA4[O5]or LBool(W57,"aiCrow|Away")==false then
call Z39(Z77)
if IsTZPlayer(GetOwningPlayer(Z77))then
call IssuePointOrderById(Z77,851986,x+PT7,y+PT7)
else
call IssuePointOrderById(Z77,851986,x-PT7,y-PT7)
endif
else
if GetUnitCurrentOrder(Z77)!=851986 then
call IssueNeutralImmediateOrderById(Player(O5),Z77,'h085')
endif
endif
endif
else
if not PJ7 then
call UnitRemoveAbility(Z77,'Avul')
endif
set Z19=LEff(W57,"aiCrow|EffHealHP")
if Z19!=null then
call DestroyEffect(Z19)
call SEff(W57,"aiCrow|EffHealHP",null)
endif
if GetUnitState(Z77,UNIT_STATE_MAX_MANA)>0 then
set Z19=LEff(W57,"aiCrow|EffHealMP")
if Z19!=null then
call DestroyEffect(Z19)
call SEff(W57,"aiCrow|EffHealMP",null)
endif
endif
if LBool(W57,"aiCrow|Active")then
if LBool(W57,"aiCrow|Away")then
if HA4[O5]then
call Z69(Z77)
elseif GetUnitCurrentOrder(Z77)!=851986 then
call IssueNeutralImmediateOrderById(Player(O5),Z77,'h085')
endif
else
set i=LInt(W57,"aiCrow|GoHomeWpt")
call XK7("aiCrow|GoHomeWpt "+XP7(i))
if i==0 then
set j=328
set F37=99999
set F67=0
loop
exitwhen j>342
if IsTZPlayer(GetOwningPlayer(Z77))then
set F67=Z47(h7[i],h7['d'])+Z47(Z77,h7[i])
else
set F67=Z47(h7[i],h7[0])+Z47(Z77,h7[i])
endif
if i==0 or F67<F37 then
set i=j
set F37=F67
endif
set j=j+1
endloop
call XK7("aiCrow|GoHomeWpt Find "+XP7(i))
call SInt(W57,"aiCrow|GoHomeWpt",i)
call IssuePointOrderByIdLoc(Z77,851986,L_7(h7[i]))
elseif i==999 then
if GetUnitCurrentOrder(Z77)!=851986 then
call IssueImmediateOrderById(Z77,852247)
endif
else
set H04=Z77
if Z47(Z77,h7[i])<400 or(AO7(1000.,H04,Condition(function VW8))>0)then
call XK7("aiCrow|GoHomeWpt set 999")
call SInt(W57,"aiCrow|GoHomeWpt",999)
call IssueImmediateOrderById(Z77,852247)
elseif GetUnitCurrentOrder(Z77)!=851986 then
call IssuePointOrderByIdLoc(Z77,851986,L_7(h7[i]))
endif
endif
endif
endif
endif
else
if(LBool(W57,"aiCrow|Alive"))then
call SBool(W57,"aiCrow|Alive",false)
endif
endif
set t=null
set Z77=null
set Z19=null
return false
endfunction
function Z09 takes nothing returns nothing
local integer O5=0
local integer Z59=0
local integer Z29=0
set O5=1
loop
exitwhen O5>5
if KR8(G8[O5])then
set Z59=Z59+1
endif
if KR8(N8[O5])then
set Z29=Z29+1
endif
set O5=O5+1
endloop
set PQ7=R2I(I2R(Z59+1)/ I2R(PO7))
set PS7=R2I(I2R(Z29+1)/ I2R(PO7))
endfunction
function Z_9 takes integer O5,unit ZC9 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer i=GetHandleId(ZC9)
call SInt(i,"aiCrow|TrueOwner",O5)
call SInt(i,"aiCrow|CurrentOwner",O5)
call SBool(i,"aiCrow|Alive",true)
call SBool(i,"aiCrow|Active",false)
call SetPlayerAbilityAvailable(Player(O5),'A29N',false)
call UnitMakeAbilityPermanent(ZC9,true,'A29M')
call TriggerRegisterDeathEvent(t,ZC9)
call TriggerAddCondition(t,Condition(function SV9))
if PJ7 then
call AddPermanentAbility(ZC9,'Avul')
endif
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function ZL9))
call SaveUnitHandle(R8,(W57),(2),(ZC9))
set t=null
endfunction
function A49 takes nothing returns nothing
local unit ZC9=CreateUnit(GetOwningPlayer(GetTriggerUnit()),ZA9(GetOwningPlayer(GetTriggerUnit())),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetUnitFacing(GetTriggerUnit()))
call SX9(ZC9)
if KT[GetPlayerId(GetOwningPlayer(ZC9))]==false then
call UnitRemoveType(ZC9,UNIT_TYPE_PEON)
else
call UnitAddType(ZC9,UNIT_TYPE_PEON)
endif
call ZX9(ZC9)
set ZC9=null
endfunction
function A79 takes nothing returns boolean
if GetSpellAbilityId()=='A0B6' then
call ZB9()
endif
if GetSpellAbilityId()=='A0JT' then
call A49()
endif
return false
endfunction
function A89 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit ZC9=LUnit(EC8,"chicken")
local integer A99=LInt(EC8,"newability")
local integer AD9=LInt(EC8,"itemId0")
local integer AE9=LInt(EC8,"itemId1")
local integer AF9=LInt(EC8,"itemId2")
local integer AG9=LInt(EC8,"itemId3")
local integer AH9=LInt(EC8,"itemId4")
local integer AI9=LInt(EC8,"itemId5")
local player AJ9=ED8(EC8,"pPlayer0")
local player AK9=ED8(EC8,"pPlayer1")
local player AM9=ED8(EC8,"pPlayer2")
local player AN9=ED8(EC8,"pPlayer3")
local player AO9=ED8(EC8,"pPlayer4")
local player AP9=ED8(EC8,"pPlayer5")
local integer AQ9=LInt(EC8,"charges0")
local integer AR9=LInt(EC8,"charges1")
local integer AS9=LInt(EC8,"charges2")
local integer AT9=LInt(EC8,"charges3")
local integer AU9=LInt(EC8,"charges4")
local integer AV9=LInt(EC8,"charges5")
call DisableTrigger(GW4)
if GetTriggerEvalCount(t)==1 then
call UnitAddAbility(ZC9,A99)
if KT[GetPlayerId(GetOwningPlayer(ZC9))]==false then
call UnitRemoveType(ZC9,UNIT_TYPE_PEON)
else
call UnitAddType(ZC9,UNIT_TYPE_PEON)
endif
else
if AD9>0 then
set HK4=CreateItem(AD9,GetUnitX(ZC9),GetUnitY(ZC9))
call UnitAddItem(ZC9,HK4)
call SetItemPlayer(HK4,AJ9,false)
call SetItemUserData(HK4,1)
endif
if AQ9>0 then
call SetItemCharges(HK4,AQ9)
endif
if AE9>0 then
set HK4=CreateItem(AE9,GetUnitX(ZC9),GetUnitY(ZC9))
call UnitAddItem(ZC9,HK4)
call SetItemPlayer(HK4,AK9,false)
call SetItemUserData(HK4,1)
endif
if AR9>0 then
call SetItemCharges(HK4,AR9)
endif
if AF9>0 then
set HK4=CreateItem(AF9,GetUnitX(ZC9),GetUnitY(ZC9))
call UnitAddItem(ZC9,HK4)
call SetItemPlayer(HK4,AM9,false)
call SetItemUserData(HK4,1)
endif
if AS9>0 then
call SetItemCharges(HK4,AS9)
endif
if AG9>0 then
set HK4=CreateItem(AG9,GetUnitX(ZC9),GetUnitY(ZC9))
call UnitAddItem(ZC9,HK4)
call SetItemPlayer(HK4,AN9,false)
call SetItemUserData(HK4,1)
endif
if AT9>0 then
call SetItemCharges(HK4,AT9)
endif
if AH9>0 then
set HK4=CreateItem(AH9,GetUnitX(ZC9),GetUnitY(ZC9))
call UnitAddItem(ZC9,HK4)
call SetItemPlayer(HK4,AO9,false)
call SetItemUserData(HK4,1)
endif
if AU9>0 then
call SetItemCharges(HK4,AU9)
endif
if AI9>0 then
set HK4=CreateItem(AI9,GetUnitX(ZC9),GetUnitY(ZC9))
call UnitAddItem(ZC9,HK4)
call SetItemPlayer(HK4,AP9,false)
call SetItemUserData(HK4,1)
endif
if AV9>0 then
call SetItemCharges(HK4,AV9)
endif
if KT[GetPlayerId(GetOwningPlayer(ZC9))]==false then
call UnitRemoveType(ZC9,UNIT_TYPE_PEON)
else
call UnitAddType(ZC9,UNIT_TYPE_PEON)
endif
call LT7(EC8)
call EA8(t)
endif
call EnableTrigger(GW4)
set t=null
set ZC9=null
set AJ9=null
set AK9=null
set AM9=null
set AN9=null
set AO9=null
set AP9=null
return false
endfunction
function AW9 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit ZC9=(LoadUnitHandle(R8,(EC8),(2)))
local integer AX9=GetUnitTypeId(ZC9)
local real x=GetUnitX(ZC9)
local real y=GetUnitY(ZC9)
local item AY9
local item AZ9
local item AA9
local item AB9
local item AC9
local item A39
local player AJ9
local player AK9
local player AM9
local player AN9
local player AO9
local player AP9
local integer AD9
local integer AE9
local integer AF9
local integer AG9
local integer AH9
local integer AI9
local integer AQ9=-1
local integer AR9=-1
local integer AS9=-1
local integer AT9=-1
local integer AU9=-1
local integer AV9=-1
local integer A99
local item JB9
call FlushChildHashtable(R8,(EC8))
call EA8(t)
if ZC9==null or O18(ZC9)then
return false
endif
set t=CreateTrigger()
set EC8=GetHandleId(t)
set AY9=UnitItemInSlot(ZC9,0)
set AZ9=UnitItemInSlot(ZC9,1)
set AA9=UnitItemInSlot(ZC9,2)
set AB9=UnitItemInSlot(ZC9,3)
set AC9=UnitItemInSlot(ZC9,4)
set A39=UnitItemInSlot(ZC9,5)
set AD9=GetItemTypeId(AY9)
set AE9=GetItemTypeId(AZ9)
set AF9=GetItemTypeId(AA9)
set AG9=GetItemTypeId(AB9)
set AH9=GetItemTypeId(AC9)
set AI9=GetItemTypeId(A39)
set AJ9=GetItemPlayer(AY9)
set AK9=GetItemPlayer(AZ9)
set AM9=GetItemPlayer(AA9)
set AN9=GetItemPlayer(AB9)
set AO9=GetItemPlayer(AC9)
set AP9=GetItemPlayer(A39)
set JB9=AY9
if GetItemType(JB9)==ITEM_TYPE_ARTIFACT or TU9(ZU7(JB9))then
set AQ9=GetItemCharges(JB9)
endif
set JB9=AZ9
if GetItemType(JB9)==ITEM_TYPE_ARTIFACT or TU9(ZU7(JB9))then
set AR9=GetItemCharges(JB9)
endif
set JB9=AA9
if GetItemType(JB9)==ITEM_TYPE_ARTIFACT or TU9(ZU7(JB9))then
set AS9=GetItemCharges(JB9)
endif
set JB9=AB9
if GetItemType(JB9)==ITEM_TYPE_ARTIFACT or TU9(ZU7(JB9))then
set AT9=GetItemCharges(JB9)
endif
set JB9=AC9
if GetItemType(JB9)==ITEM_TYPE_ARTIFACT or TU9(ZU7(JB9))then
set AU9=GetItemCharges(JB9)
endif
set JB9=A39
if GetItemType(JB9)==ITEM_TYPE_ARTIFACT or TU9(ZU7(JB9))then
set AV9=GetItemCharges(JB9)
endif
call ZT7(AY9)
call ZT7(AZ9)
call ZT7(AA9)
call ZT7(AB9)
call ZT7(AC9)
call ZT7(A39)
if AX9==WC4 then
set A99='S009'
elseif AX9==W34 then
set A99='S00D'
elseif AX9==W64 then
set A99='S00C'
elseif AX9==W24 then
set A99='S00E'
elseif AX9==W_4 then
set A99='S00B'
elseif AX9==X44 then
set A99=XK4
elseif AX9==WL4 then
set A99='S00W'
elseif AX9==W14 then
set A99='S00Y'
elseif AX9==X74 then
set A99='S00X'
elseif AX9==X84 then
set A99='S00D'
elseif AX9==W04 then
set A99=XM4
elseif AX9==X94 then
set A99=XN4
endif
if GetRandomInt(1,10)==1 then
set A99='S00G'
endif
if GetRandomInt(1,10)<3 then
set A99='S016'
endif
if AX9==XG4 then
set A99='S00L'
elseif AX9==XJ4 then
set A99='S00L'
elseif AX9==XH4 then
set A99=XK4
endif
if AX9==WB4 then
set A99='S012'
elseif AX9==W54 then
set A99='S010'
elseif AX9==XI4 then
set A99='S014'
elseif AX9==XD4 then
set A99='S011'
elseif AX9==XE4 then
set A99='S017'
elseif AX9==XF4 then
set A99='S013'
endif
call DA8(EC8,"pPlayer0",AJ9)
call DA8(EC8,"pPlayer1",AK9)
call DA8(EC8,"pPlayer2",AM9)
call DA8(EC8,"pPlayer3",AN9)
call DA8(EC8,"pPlayer4",AO9)
call DA8(EC8,"pPlayer5",AP9)
call SInt(EC8,"itemId0",AD9)
call SInt(EC8,"itemId1",AE9)
call SInt(EC8,"itemId2",AF9)
call SInt(EC8,"itemId3",AG9)
call SInt(EC8,"itemId4",AH9)
call SInt(EC8,"itemId5",AI9)
call SInt(EC8,"charges0",AQ9)
call SInt(EC8,"charges1",AR9)
call SInt(EC8,"charges2",AS9)
call SInt(EC8,"charges3",AT9)
call SInt(EC8,"charges4",AU9)
call SInt(EC8,"charges5",AV9)
call SUnit(EC8,"chicken",ZC9)
call SInt(EC8,"newability",A99)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function A89))
set JB9=null
set t=null
set ZC9=null
set AY9=null
set AZ9=null
set AA9=null
set AB9=null
set AC9=null
set A39=null
set AJ9=null
set AK9=null
set AM9=null
set AN9=null
set AO9=null
set AP9=null
return false
endfunction
function A69 takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.05,false)
call TriggerAddCondition(t,Condition(function AW9))
call SaveUnitHandle(R8,(W57),(2),(GetTriggerUnit()))
set t=null
endfunction
function AL9 takes nothing returns boolean
if GetSpellAbilityId()=='A0OT' then
call A69()
endif
return false
endfunction
function V7 takes nothing returns boolean
local integer x=0
loop
exitwhen x>5
if UnitItemInSlot(GetTriggerUnit(),x)==null then
return true
endif
set x=x+1
endloop
return false
endfunction
function wD takes nothing returns nothing
if GetItemTypeId(GetManipulatedItem())==BU[shengdianzhihuan]then
call RemoveItem(GetManipulatedItem())
call UnitAddItem(GetTriggerUnit(),CreateItem(BU[shengdianzhihuan2],0,0))
endif
if GetItemTypeId(GetManipulatedItem())==BU[shengdianzhihuan2]then
call RemoveItem(GetManipulatedItem())
call UnitAddItem(GetTriggerUnit(),CreateItem(BU[shengdianzhihuan],0,0))
endif
endfunction
function A19 takes nothing returns nothing
if LState(GetEnumUnit(),"A09")then
call ShowWarningToPlayer(GetOwningPlayer(GetEnumUnit()),(GetObjectName(('n02M')))+" "+GetUnitName(GetEnumUnit())+" "+(GetObjectName(('n02S'))))
else
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)then
call AddTimedBoolBuff(GetEnumUnit(),"A09",25)
endif
call SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)+250)
endif
endfunction
function A09 takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local group g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),775,Condition(function V88))
call ForGroup(g,function A19)
call OF8(g)
set Z77=null
set g=null
endfunction
function A59 takes nothing returns nothing
if GetSpellAbilityId()=='A0CK' then
call A09()
endif
endfunction
function A29 takes unit N28,integer A_9,boolean B49 returns nothing
local string B79
local string s
local player p=GetOwningPlayer(N28)
local real d=2
local string B89="Use"
if B49 then
set B89="Store"
endif
if A_9=='I006' then
set B79="|c00ff0000"+GetObjectName('n0JQ')+"|r"
call X48("Rune"+B89+"1",GetPlayerId(p))
elseif A_9=='I008' then
set B79="|c0000ff00"+GetObjectName('n0JN')+"|r"
call X48("Rune"+B89+"2",GetPlayerId(p))
elseif A_9=='I00K' then
set B79="|c000000ff"+GetObjectName('n0K3')+"|r"
call X48("Rune"+B89+"3",GetPlayerId(p))
elseif A_9=='I007' then
set B79="|c00afaf00"+GetObjectName('n0K2')+"|r"
call X48("Rune"+B89+"4",GetPlayerId(p))
elseif A_9=='I00J' then
set B79="|c00652DC1"+GetObjectName('n0K4')+"|r"
call X48("Rune"+B89+"5",GetPlayerId(p))
endif
if B49 then
set s=W[GetPlayerId(p)]+GetUnitName(N28)+"|r "+GetObjectName('n0GU')+"|r "+B79+" "+GetObjectName('n0GW')
set d=1
else
if G64 then
set s=W[GetPlayerId(p)]+GetUnitName(N28)+"|r "+GetObjectName('n0GV')+"|r "+B79+" "+GetObjectName('n0GW')
else
set s=W[GetPlayerId(p)]+GetUnitName(N28)+"|r "+GetObjectName('n0GT')+"|r "+B79+" "+GetObjectName('n0GW')
endif
endif
if(IsPlayerAlly(GetLocalPlayer(),p)and GetLocalPlayer()!=p)or N08(GetLocalPlayer())then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,d,s)
endif
endfunction
function B99 takes nothing returns boolean
if GetSpellAbilityId()=='A0H6' then
call SUnit(GetHandleId(GetTriggerUnit()),"BottleTargetUnit",null)
call SInt(GetHandleId(GetTriggerUnit()),"BottleTargetItemId",0)
if(AV7(GetTriggerUnit(),BU[VY])!=null or AV7(GetTriggerUnit(),LU[VY])!=null)and(GetUnitTypeId(GetSpellTargetUnit())=='nfoh' or GetUnitTypeId(GetSpellTargetUnit())=='ndfl')then
call SUnit(GetHandleId(GetTriggerUnit()),"BottleTargetUnit",GetSpellTargetUnit())
elseif ZV9(GetItemTypeId(GetSpellTargetItem()))then
call A29(GetTriggerUnit(),GetItemTypeId(GetSpellTargetItem()),true)
call SInt(GetHandleId(GetTriggerUnit()),"BottleTargetItemId",GetItemTypeId(GetSpellTargetItem()))
call ZT7(GetSpellTargetItem())
endif
endif
return false
endfunction
function BD9 takes unit AM7 returns nothing
call SetUnitState(AM7,UNIT_STATE_LIFE,GetUnitState(AM7,UNIT_STATE_MAX_LIFE))
call SetUnitState(AM7,UNIT_STATE_MANA,GetUnitState(AM7,UNIT_STATE_MAX_MANA))
endfunction
function BE9 takes unit AM7,real x,real y returns nothing
local integer W57=GetHandleId(GetOwningPlayer(AM7))
local unit YA8=LUnit(W57,"Kobold1")
local unit YB8=LUnit(W57,"Kobold2")
local unit YC8=LUnit(W57,"Kobold3")
local unit Y38=LUnit(W57,"Kobold4")
set OY4=true
if YA8!=null then
call ReviveHero(YA8,x,y,true)
call BD9(YA8)
call YP8(YA8)
call SetUnitX(YA8,x)
call SetUnitY(YA8,y)
endif
if YB8!=null then
call ReviveHero(YB8,x,y,true)
call BD9(YB8)
call YP8(YB8)
call SetUnitX(YB8,x)
call SetUnitY(YB8,y)
endif
if YC8!=null then
call ReviveHero(YC8,x,y,true)
call BD9(YC8)
call YP8(YC8)
call SetUnitX(YC8,x)
call SetUnitY(YC8,y)
endif
if Y38!=null then
call ReviveHero(Y38,x,y,true)
call BD9(Y38)
call YP8(Y38)
call SetUnitX(Y38,x)
call SetUnitY(Y38,y)
endif
set YA8=null
set YB8=null
set YC8=null
set Y38=null
endfunction
function BF9 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7=LUnit(W57,"Hero")
call BD9(AM7)
call YP8(AM7)
call ClearSelectionForPlayer(GetOwningPlayer(AM7))
call SelectUnitAddForPlayer(AM7,GetOwningPlayer(AM7))
if GetUnitTypeId(AM7)=='H00I' then
call BE9(AM7,GetUnitX(AM7),GetUnitY(AM7))
endif
call LT7(W57)
call EA8(t)
set t=null
set AM7=null
return false
endfunction
function BG9 takes unit AM7,real x,real y returns nothing
local integer W57=GetHandleId(GetOwningPlayer(AM7))
local unit YA8=LUnit(W57,"Kobold1")
local unit YB8=LUnit(W57,"Kobold2")
local unit YC8=LUnit(W57,"Kobold3")
local unit Y38=LUnit(W57,"Kobold4")
call DisableTrigger(ES)
if YA8!=null then
call SetUnitX(YA8,x)
call SetUnitY(YA8,y)
call KillUnit(YA8)
endif
if YB8!=null then
call SetUnitX(YB8,x)
call SetUnitY(YB8,y)
call KillUnit(YB8)
endif
if YC8!=null then
call SetUnitX(YC8,x)
call SetUnitY(YC8,y)
call KillUnit(YC8)
endif
if Y38!=null then
call SetUnitX(Y38,x)
call SetUnitY(Y38,y)
call KillUnit(Y38)
endif
call EnableTrigger(ES)
set YA8=null
set YB8=null
set YC8=null
set Y38=null
endfunction
function BH9 takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local real x
local real y
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call X48("AegisOff",GetPlayerId(GetOwningPlayer(AM7)))
if GetUnitTypeId(AM7)=='H00I' then
call BG9(AM7,GetUnitX(AM7),GetUnitY(AM7))
endif
set NT4=null
call TriggerRegisterTimerEvent(t,5.,false)
call TriggerAddCondition(t,Condition(function BF9))
call SUnit(W57,"Hero",AM7)
call AddTimedBoolBuff(AM7,"JustUseAegis",5)
set t=null
set AM7=null
endfunction
function BI9 takes nothing returns nothing
if ZX7(GetManipulatedItem())==F1 then
call BH9()
endif
endfunction
function Trig_MultipleNecro_Func001002001 takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='n00H')
endfunction
function BJ9 takes nothing returns nothing
if GetWidgetLife(GetEnumItem())>0 and ZV9(GetItemTypeId(GetEnumItem()))then
set HK4=GetEnumItem()
endif
endfunction
function BK9 takes nothing returns integer
local integer i=GetRandomInt(1,5)
loop
exitwhen i!=EB4
set i=GetRandomInt(1,5)
endloop
set EB4=i
return i
endfunction
function BM9 takes nothing returns boolean
local boolean BN9=false
local boolean BO9=false
local real x
local real y
local real x1
local real y1
local real x2
local real y2
local integer BP9
if GetRandomInt(1,2)==1 then
set x=GetLocationX(W7)
set y=GetLocationY(W7)
else
set x=GetLocationX(X7)
set y=GetLocationY(X7)
endif
set x1=GetLocationX(W7)
set y1=GetLocationY(W7)
set x2=GetLocationX(X7)
set y2=GetLocationY(X7)
set HK4=null
call EnumItemsInRect(YD,Condition(function KF8),function BJ9)
if HK4==null then
set BN9=true
endif
set HK4=null
call EnumItemsInRect(TD,Condition(function KF8),function BJ9)
if HK4==null then
set BO9=true
endif
if CS==false or GetTriggerEvalCount(GetTriggeringTrigger())<20 then
if BN9 and BO9 then
set BP9=BK9()
if BP9==1 then
call CreateItem('I007',x,y)
elseif BP9==2 then
call CreateItem('I006',x,y)
elseif BP9==3 then
call CreateItem('I00K',x,y)
elseif BP9==4 then
call CreateItem('I008',x,y)
elseif BP9==5 then
call CreateItem('I00J',x,y)
endif
endif
else
if BN9 then
set BP9=BK9()
if BP9==1 then
call CreateItem('I007',x1,y1)
elseif BP9==2 then
call CreateItem('I006',x1,y1)
elseif BP9==3 then
call CreateItem('I00K',x1,y1)
elseif BP9==4 then
call CreateItem('I008',x1,y1)
elseif BP9==5 then
call CreateItem('I00J',x1,y1)
endif
endif
if BO9 then
set BP9=BK9()
if BP9==1 then
call CreateItem('I007',x2,y2)
elseif BP9==2 then
call CreateItem('I006',x2,y2)
elseif BP9==3 then
call CreateItem('I00K',x2,y2)
elseif BP9==4 then
call CreateItem('I008',x2,y2)
elseif BP9==5 then
call CreateItem('I00J',x2,y2)
endif
endif
endif
return false
endfunction
function O2 takes integer Ou,real O3 returns nothing
set FI[gi]=Ou
set Fj[gi]=O3
set gi=gi+1
endfunction
function Wq takes nothing returns nothing
call O2('horl',30)
call O2('oven',210)
call O2('mnst',45)
call O2('I002',60)
call O2('ches',60)
call O2('pdiv','d')
call O2('I001',60)
call O2('bfhr',50)
call O2('wswd',12)
call O2('rej2',30)
call O2('lnrn',36)
call O2('spre',20)
call O2('rots',300)
call O2('tlum',60)
call O2('sfog',15)
call O2('mnsf',28)
call O2('stwp',65)
call O2('schl',70)
call O2('rej1',28)
call O2('kybl',20)
call O2('rej5',40)
call O2('ccmd',26)
call O2('mlst',32)
call O2('desc',30)
call O2('I00C',25)
call O2('I00Q',45)
call O2('I00T',30)
call O2('ofro',85)
call O2('I01P',10)
call O2('I01U',30)
call O2('I100',45)
call O2('I101',90)
endfunction
function BQ9 takes nothing returns boolean
local integer i
if OB4>0 and OZ4[1]<1 then
set i=2
loop
exitwhen i>OB4
set OZ4[i-1]=OZ4[i]
set OA4[i-1]=OA4[i]
set i=i+1
endloop
set OB4=OB4-1
endif
set i=1
loop
exitwhen i>OB4
if OZ4[i]>=1 then
set OZ4[i]=OZ4[i]-1
if OZ4[i]<1 then
call SetItemDroppable(OA4[i],true)
endif
endif
set i=i+1
endloop
return false
endfunction
function BR9 takes item JB9 returns nothing
set OB4=OB4+1
set OA4[OB4]=JB9
set OZ4[OB4]=(EV[(ZX7(JB9))])
call SetItemDroppable(JB9,false)
endfunction
function BS9 takes nothing returns boolean
if GetUnitTypeId(GetTriggerUnit())!='e00E' and(EV[(ZX7(GetManipulatedItem()))])>0 then
call BR9(GetManipulatedItem())
endif
return false
endfunction
function BT9 takes unit Y47 returns integer
local integer WP8
if Y47==null then
return-2
endif
set WP8=GetUnitTypeId(Y47)
if WP8=='H004' then
return F94
elseif WP8=='UC18' then
return FD4
elseif WP8=='Hmkg' then
return FH4
elseif WP8=='Ucrl' or WP8=='U01X' then
return GG4
elseif WP8=='H00H' then
return FJ4
elseif WP8=='UC01' then
return FK4
elseif WP8=='Orkn' then
return FM4
elseif WP8=='Hmbr' then
return FQ4
elseif WP8=='Hjai' then
return FN4
elseif WP8=='Ulic' then
return F84
elseif WP8=='Ekee' then
return F74
elseif WP8=='Emns' then
return E_4
elseif WP8=='EC57' then
return FO4
elseif WP8=='U00E' then
return FG4
elseif WP8=='E005' then
return FF4
elseif WP8=='E01A' then
return FP4
elseif WP8=='UC42' then
return FE4
elseif WP8=='Npbm' then
return FC4
elseif WP8=='H00T' then
return FS4
elseif WP8=='Hvwd' then
return FT4
elseif WP8=='Nbbc' then
return FU4
elseif WP8=='H00A' then
return FW4
elseif WP8=='Udre' then
return FX4
elseif WP8=='E00P' then
return FY4
elseif WP8=='U00K' then
return FZ4
elseif WP8=='H00Q' then
return FA4
elseif WP8=='H00U' then
return FB4
elseif WP8=='U00F' then
return F34
elseif WP8=='N0EG' then
return F64
elseif WP8=='EC45' then
return FL4
elseif WP8=='O00J' then
return F14
elseif WP8=='Oshd' then
return F04
elseif WP8=='Udea' then
return F54
elseif WP8=='N01W' then
return F24
elseif WP8=='H00K' then
return F_4
elseif WP8=='Opgh' then
return G44
elseif WP8=='Otch' then
return G74
elseif WP8=='H00R' then
return FI4
elseif WP8=='H07I' then
return FI4
elseif WP8=='N00B' then
return G84
elseif WP8=='E01C' then
return G94
elseif WP8=='E002' then
return GD4
elseif WP8=='EC77' then
return GE4
elseif WP8=='U00P' then
return GH4
elseif WP8=='Emoo' then
return GI4
elseif WP8=='H00N' then
return GJ4
elseif WP8=='E02N' or WP8=='E02O' then
return GK4
elseif WP8=='H00I' then
return GM4
elseif WP8=='H00D' then
return GN4
elseif WP8=='UC60' then
return GO4
elseif WP8=='N01A' then
return GP4
elseif WP8=='N0HP' then
return GQ4
elseif WP8=='Harf' then
return GR4
elseif WP8=='E02J' then
return Saar_Agha
elseif WP8=='H06W' or WP8=='H06X' or WP8=='H06Y' or WP8=='H0BC' or WP8=='Hblm' then
return F44
elseif WP8=='Uktl' then
return Puzzle_Agha
elseif WP8=='Ntin' then
return Goblin_Agha
elseif WP8=='H0DO' then
return DragonHawk_Agha
elseif WP8=='E02H' then
return ShadowFiend_Agha
elseif WP8=='E02X' then
return Medivh_Agha
elseif not T27 then
elseif GetUnitPointValue(Y47)==500 then
return UG7
elseif GetUnitPointValue(Y47)==600 then
return UH7
elseif GetUnitPointValue(Y47)==711 then
return UI7
elseif GetUnitPointValue(Y47)==718 then
return UJ7
elseif GetUnitPointValue(Y47)==724 then
return UK7
elseif GetUnitPointValue(Y47)==725 then
return UM7
elseif GetUnitPointValue(Y47)==729 then
return UN7
elseif GetUnitPointValue(Y47)==741 then
return UO7
elseif GetUnitPointValue(Y47)==743 then
return UP7
elseif GetUnitPointValue(Y47)==900 then
return UR7
elseif GetUnitPointValue(Y47)==901 then
return UQ7
elseif GetUnitPointValue(Y47)==903 then
return US7
elseif GetUnitPointValue(Y47)==906 then
return UT7
endif
return Agha
endfunction
function GetX takes real x returns real
local real r=GetRectMinX(bj_mapInitialPlayableArea)+50
if(x<r)then
return r
endif
set r=GetRectMaxX(bj_mapInitialPlayableArea)-50
if(x>r)then
return r
endif
return x
endfunction
function GetY takes real y returns real
local real r=GetRectMinY(bj_mapInitialPlayableArea)+50
if(y<r)then
return r
endif
set r=GetRectMaxY(bj_mapInitialPlayableArea)-50
if(y>r)then
return r
endif
return y
endfunction
function SetXY takes unit u,real x,real y returns nothing
call SetUnitX(u,GetX(x))
call SetUnitY(u,GetY(y))
endfunction
function HasItem takes unit whichUnit,integer itemId returns integer
local integer index
local item indexItem
set index=0
loop
set indexItem=UnitItemInSlot(whichUnit,index)
if(indexItem!=null)and(GetItemTypeId(indexItem)==itemId)then
set indexItem=null
return index+1
endif
set index=index+1
exitwhen index>=bj_MAX_INVENTORY
endloop
set indexItem=null
return 0
endfunction
function CountItem takes unit whichUnit,integer itemId returns integer
local integer index=0
local item indexItem
local integer num=0
loop
set indexItem=UnitItemInSlot(whichUnit,index)
if(indexItem!=null)and(GetItemTypeId(indexItem)==itemId)then
set indexItem=null
set num=num+1
endif
set index=index+1
exitwhen index>=bj_MAX_INVENTORY
endloop
set indexItem=null
return num
endfunction
function RefreshCharge takes nothing returns nothing
local integer i=LInt(GetT(),"Charges")
local unit s=LUnit(GetT(),"s")
call UnitRemoveAbility(s,'AZ4H')
call UnitRemoveAbility(s,'AZ4I')
call UnitRemoveAbility(s,'AZ4J')
if GetUnitAbilityLevel(s,'AZ3A')==0 or HasItem(s,'IZ0I')==0 then
return
else
call AddPermanentAbility(s,'AZ4H'+i)
endif
if i==0 then
loop
exitwhen i>5
if UnitItemInSlot(s,i)!=null and GetItemTypeId(UnitItemInSlot(s,i))=='IZ0I' then
call SetItemDroppable(UnitItemInSlot(s,i),false)
endif
set i=i+1
endloop
elseif i>0 then
set i=0
loop
exitwhen i>5
if UnitItemInSlot(s,i)!=null and GetItemTypeId(UnitItemInSlot(s,i))=='IZ0I' then
call SetItemDroppable(UnitItemInSlot(s,i),true)
endif
set i=i+1
endloop
endif
set s=null
endfunction
function ShadowFiendChargeFunc takes nothing returns nothing
local integer h=GetT()
if GetTriggerEventId()==EVENT_UNIT_SPELL_CAST and GetSpellAbilityId()=='AZ3A' then
if LInt(h,"Charges")==0 then
call IssueImmediateOrderById(GetTriggerUnit(),851972)
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='AZ3A' then
call SAInt(h,"Charges",-1)
if LBool(h,"Charging")==false then
call SBool(h,"Charging",true)
call TimerStart(LTimer(h,"ChargeTimer"),40,true,null)
endif
elseif NotTimerExpired==false and GetTriggerEventId()==EVENT_GAME_TIMER_EXPIRED and SAInt(h,"Charges",1)>1 then
call PauseTimer(LTimer(h,"ChargeTimer"))
call SBool(h,"Charging",false)
endif
call RefreshCharge()
endfunction
function ShadowFiendCharge takes unit s returns nothing
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
local timer tm=CreateTimer()
call SBool(GetHandleId(s),"Shadow_Agha_Trig",true)
call STrig(GetHandleId(s),"Shadow_Agha_Trigger",t)
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_SPELL_CAST)
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterTimerExpireEvent(t,tm)
call TriggerAddCondition(t,Condition(function ShadowFiendChargeFunc))
call SInt(h,"Charges",2)
call STimer(h,"ChargeTimer",tm)
call SUnit(h,"s",s)
set NotTimerExpired=true
call TriggerEvaluate(t)
set NotTimerExpired=false
set t=null
endfunction
function AZ3A_DelayFunc takes nothing returns nothing
set NotTimerExpired=true
call TriggerEvaluate(LTrig(GetHandleId(LUnit(GetHandleId(GetExpiredTimer()),"s")),"Shadow_Agha_Trigger"))
set NotTimerExpired=false
call TimerOff()
endfunction
function AZ3A_RefreshDelay takes unit s returns nothing
local timer tm=CreateTimer()
call TimerStart(tm,0,false,function AZ3A_DelayFunc)
call SUnit(GetHandleId(tm),"s",s)
set tm=null
endfunction
function HbQB takes nothing returns nothing
local unit m=LUnit(GetT(),"g")
local item a
call TriggerSleepAction(LReal(GetT(),"a"))
set a=UnitAddItemById(m,LInt(GetT(),"a"))
call SetItemPlayer(a,GetOwningPlayer(m),true)
call UnitDropItemSlot(m,a,LInt(GetT(),"h"))
set a=UnitAddItemById(m,LInt(GetT(),"b"))
call SetItemPlayer(a,GetOwningPlayer(m),true)
call UnitDropItemSlot(m,a,LInt(GetT(),"i"))
set a=UnitAddItemById(m,LInt(GetT(),"c"))
call SetItemPlayer(a,GetOwningPlayer(m),true)
call UnitDropItemSlot(m,a,LInt(GetT(),"j"))
set a=UnitAddItemById(m,LInt(GetT(),"d"))
call SetItemPlayer(a,GetOwningPlayer(m),true)
call UnitDropItemSlot(m,a,LInt(GetT(),"k"))
set a=UnitAddItemById(m,LInt(GetT(),"e"))
call SetItemPlayer(a,GetOwningPlayer(m),true)
call UnitDropItemSlot(m,a,LInt(GetT(),"l"))
set a=UnitAddItemById(m,LInt(GetT(),"f"))
call SetItemPlayer(a,GetOwningPlayer(m),true)
call UnitDropItemSlot(m,a,LInt(GetT(),"m"))
set m=null
endfunction
function ResetItems takes integer a,integer b,integer c,integer d,integer e,integer f,unit g,real timex,integer h,integer i,integer j,integer k,integer l,integer m returns nothing
local trigger t=CreateTrigger()
call SInt(GetHandleId(t),"a",a)
call SInt(GetHandleId(t),"b",b)
call SInt(GetHandleId(t),"c",c)
call SInt(GetHandleId(t),"d",d)
call SInt(GetHandleId(t),"e",e)
call SInt(GetHandleId(t),"f",f)
call SInt(GetHandleId(t),"h",h)
call SInt(GetHandleId(t),"i",i)
call SInt(GetHandleId(t),"j",j)
call SInt(GetHandleId(t),"k",k)
call SInt(GetHandleId(t),"l",l)
call SInt(GetHandleId(t),"m",m)
call SUnit(GetHandleId(t),"g",g)
call SReal(GetHandleId(t),"a",timex)
call TriggerAddAction(t,function HbQB)
call TriggerExecute(t)
set t=null
endfunction
function RSkills takes nothing returns nothing
local unit m=LUnit(GetT(),"b")
local integer b=LInt(GetT(),"c")
local integer c=0
call TriggerSleepAction(LReal(GetT(),"a"))
call ModifyHeroSkillPoints(m,bj_MODIFYMETHOD_ADD,b)
loop
exitwhen(c==b)
set c=c+1
call SelectHeroSkill(m,LInt(GetT(),"a"))
endloop
set m=null
endfunction
function ResetSkill takes integer a,integer c,unit b,real timex returns nothing
local trigger t=CreateTrigger()
call SInt(GetHandleId(t),"a",a)
call SInt(GetHandleId(t),"c",c)
call SUnit(GetHandleId(t),"b",b)
call SReal(GetHandleId(t),"a",timex)
call TriggerAddAction(t,function RSkills)
call TriggerExecute(t)
set t=null
endfunction
function RemItemAfter takes nothing returns nothing
local unit m=LUnit(GetT(),"c")
call TriggerSleepAction(LReal(GetT(),"a"))
if HasItem(m,LInt(GetT(),"a"))>0 and HasItem(m,LInt(GetT(),"b"))>0 then
call RemoveItem(GetItemOfTypeFromUnitBJ(m,LInt(GetT(),"a")))
endif
set m=null
endfunction
function RemoveItemAfter takes integer a,integer b,unit c,real timex returns nothing
local trigger t=CreateTrigger()
call SInt(GetHandleId(t),"a",a)
call SInt(GetHandleId(t),"b",b)
call SUnit(GetHandleId(t),"c",c)
call SReal(GetHandleId(t),"a",timex)
call TriggerAddAction(t,function RemItemAfter)
call TriggerExecute(t)
set t=null
endfunction
function SetBolHblm takes nothing returns nothing
local unit m=LUnit(GetT(),"b")
call TriggerSleepAction(LReal(GetT(),"a"))
set hblm_ok[GetPlayerId(GetOwningPlayer(m))]=false
endfunction
function SetBooleanHblm takes real a,unit b returns nothing
local trigger t=CreateTrigger()
call SReal(GetHandleId(t),"a",a)
call SUnit(GetHandleId(t),"b",b)
call TriggerAddAction(t,function SetBolHblm)
call TriggerExecute(t)
set t=null
endfunction
function BU9 takes unit Y47 returns integer
local integer WP8
local integer CFM
local integer array BFI
local integer array BMI
local integer EMZ
local integer FYQ=-1
if Y47==null then
return-2
endif
set WP8=GetUnitTypeId(Y47)
if WP8=='H004' then
return'A0TP'
elseif WP8=='UC18' then
return'A0TR'
elseif WP8=='Hmkg' then
return'A2KT'
elseif WP8=='Ucrl' or WP8=='U01X' then
return 0
elseif WP8=='H00H' then
return'A0TV'
elseif WP8=='UC01' then
return'A0TX'
elseif WP8=='Orkn' then
return'A0TZ'
elseif WP8=='Hmbr' then
return'A0U1'
elseif WP8=='Hjai' then
return'A0U3'
elseif WP8=='Ulic' then
return'A0U5'
elseif WP8=='Ekee' then
return'A0U7'
elseif WP8=='Emns' then
return'A0U9'
elseif WP8=='EC57' then
return'A0UB'
elseif WP8=='U00E' then
return'A0UD'
elseif WP8=='E005' then
return'A0UF'
elseif WP8=='E01A' then
return'A0UH'
elseif WP8=='UC42' then
return'A0UJ'
elseif WP8=='Npbm' then
return'A1BE'
elseif WP8=='H00T' then
return'A1B9'
elseif WP8=='Hvwd' then
return'A1BA'
elseif WP8=='Nbbc' then
return'A1BB'
elseif WP8=='H00A' then
return'A1CU'
elseif WP8=='Udre' then
return'A1BG'
elseif WP8=='E00P' then
return'A1BJ'
elseif WP8=='U00K' then
return'A1BC'
elseif WP8=='H00Q' then
return'A1BI'
elseif WP8=='H00U' then
return'A1BD'
elseif WP8=='U00F' then
return'A1CY'
elseif WP8=='N0EG' then
return'A1D2'
elseif WP8=='EC45' then
return'A1D1'
elseif WP8=='O00J' then
return'A1CZ'
elseif WP8=='Oshd' then
return'A1D0'
elseif WP8=='Udea' then
return'A1D3'
elseif WP8=='N01W' then
return'A1D4'
elseif WP8=='H00K' then
return'A1G1'
elseif WP8=='Opgh' then
return'A1MT'
elseif WP8=='Otch' then
return'A1N0'
elseif WP8=='N00B' then
return'A1QS'
elseif WP8=='E01C' then
return'A1UT'
elseif WP8=='E002' then
return'A1UU'
elseif WP8=='EC77' then
return'A1V1'
elseif WP8=='U00P' then
return'A1VY'
elseif WP8=='Emoo' then
return'A1WD'
elseif WP8=='H00N' then
return'A21S'
elseif WP8=='E02N' or WP8=='E02O' then
return'A237'
elseif WP8=='H00I' then
return'A27E'
elseif WP8=='H00D' then
return'A28A'
elseif WP8=='UC60' then
return'A2IH'
elseif WP8=='N01A' then
return'A2QB'
elseif WP8=='N0HP' then
return'A2QF'
elseif WP8=='Harf' then
return'A2S7'
elseif WP8=='E02J' then
return'AZ0H'
elseif WP8=='Uktl' then
return'AZ0L'
elseif WP8=='Ntin' then
return'AZ0R'
elseif WP8=='H0DO' then
return'AZ12'
elseif WP8=='E02X' then
return'AZ1Z'
elseif WP8=='E02H' then
if HasItem(Y47,'IZ0I')>0 and LBool(GetHandleId(Y47),"Shadow_Agha_Trig")==false then
call ShadowFiendCharge(Y47)
elseif HasItem(Y47,'IZ0I')==0 or GetUnitAbilityLevel(Y47,'AZ3A')==0 then
call UnitRemoveAbility(Y47,'AZ4H')
call UnitRemoveAbility(Y47,'AZ4I')
call UnitRemoveAbility(Y47,'AZ4J')
endif
if LTrig(GetHandleId(Y47),"Shadow_Agha_Trigger")!=null then
call AZ3A_RefreshDelay(Y47)
endif
return'AZ3B'
elseif WP8=='H06W' or WP8=='H06X' or WP8=='H06Y' or WP8=='H0BC' or WP8=='Hblm' then
if(HasItem(Y47,'I00D')>0)and GetUnitAbilityLevel(Y47,'AF7Y')==0 and GetUnitAbilityLevel(Y47,'AF9Y')==0 and GetUnitAbilityLevel(Y47,'AF2Y')==0 and hblm_ok[GetPlayerId(GetOwningPlayer(Y47))]==false and(GetPlayerController(GetOwningPlayer(Y47))==MAP_CONTROL_USER)then
if GetUnitAbilityLevel(Y47,'AZ30')>0 then
call UnitRemoveAbility(Y47,'AZ30')
endif
if GetUnitAbilityLevel(Y47,'AZ31')>0 then
call UnitRemoveAbility(Y47,'AZ31')
endif
if GetUnitAbilityLevel(Y47,'AF8Y')>0 then
call UnitRemoveAbility(Y47,'AF8Y')
endif
set CFM=GetUnitAbilityLevel(Y47,'A11T')
if CFM==1 then
set hblm_ok[GetPlayerId(GetOwningPlayer(Y47))]=true
loop
exitwhen(FYQ>5)
set FYQ=FYQ+1
if UnitItemInSlot(Y47,FYQ)!=null then
set BFI[FYQ]=GetItemTypeId(UnitItemInSlot(Y47,FYQ))
set BMI[FYQ]=FYQ
call RemoveItem(UnitItemInSlot(Y47,FYQ))
endif
endloop
set EMZ=GetUnitAbilityLevel(Y47,'A0NR')
if EMZ>0 then
call UnitRemoveAbility(Y47,'A0NR')
endif
call UnitAddAbility(Y47,'AF1L')
call UnitMakeAbilityPermanent(Y47,true,'AF1L')
call UnitAddAbility(Y47,'AF7Y')
call ResetItems(BFI[0],BFI[1],BFI[2],BFI[3],BFI[4],BFI[5],Y47,0.01,BMI[0],BMI[1],BMI[2],BMI[3],BMI[4],BMI[5])
if EMZ>0 then
call ResetSkill('A0NR',EMZ,Y47,0.01)
endif
call SetBooleanHblm(1,Y47)
elseif CFM==2 then
set hblm_ok[GetPlayerId(GetOwningPlayer(Y47))]=true
loop
exitwhen(FYQ>5)
set FYQ=FYQ+1
if UnitItemInSlot(Y47,FYQ)!=null then
set BFI[FYQ]=GetItemTypeId(UnitItemInSlot(Y47,FYQ))
set BMI[FYQ]=FYQ
call RemoveItem(UnitItemInSlot(Y47,FYQ))
endif
endloop
set EMZ=GetUnitAbilityLevel(Y47,'A0NR')
if EMZ>0 then
call UnitRemoveAbility(Y47,'A0NR')
endif
call UnitAddAbility(Y47,'AF1L')
call UnitMakeAbilityPermanent(Y47,true,'AF1L')
call UnitAddAbility(Y47,'AF9Y')
call SetUnitAbilityLevel(Y47,'AF1L',2)
call ResetItems(BFI[0],BFI[1],BFI[2],BFI[3],BFI[4],BFI[5],Y47,0.01,BMI[0],BMI[1],BMI[2],BMI[3],BMI[4],BMI[5])
if EMZ>0 then
call ResetSkill('A0NR',EMZ,Y47,0.01)
endif
call SetBooleanHblm(1,Y47)
elseif CFM==3 then
set hblm_ok[GetPlayerId(GetOwningPlayer(Y47))]=true
loop
exitwhen(FYQ>5)
set FYQ=FYQ+1
if UnitItemInSlot(Y47,FYQ)!=null then
set BFI[FYQ]=GetItemTypeId(UnitItemInSlot(Y47,FYQ))
set BMI[FYQ]=FYQ
call RemoveItem(UnitItemInSlot(Y47,FYQ))
endif
endloop
set EMZ=GetUnitAbilityLevel(Y47,'A0NR')
if EMZ>0 then
call UnitRemoveAbility(Y47,'A0NR')
endif
call UnitAddAbility(Y47,'AF1L')
call UnitMakeAbilityPermanent(Y47,true,'AF1L')
call UnitAddAbility(Y47,'AF2Y')
call SetUnitAbilityLevel(Y47,'AF1L',3)
call ResetItems(BFI[0],BFI[1],BFI[2],BFI[3],BFI[4],BFI[5],Y47,0.01,BMI[0],BMI[1],BMI[2],BMI[3],BMI[4],BMI[5])
if EMZ>0 then
call ResetSkill('A0NR',EMZ,Y47,0.01)
endif
call SetBooleanHblm(1,Y47)
endif
return 0
elseif((HasItem(Y47,'I00D')>0)or(HasItem(Y47,'I0AY')>0))and GetUnitAbilityLevel(Y47,'AF7Y')==0 and GetUnitAbilityLevel(Y47,'AF9Y')==0 and GetUnitAbilityLevel(Y47,'AF2Y')==0 and hblm_ok[GetPlayerId(GetOwningPlayer(Y47))]==false and(GetPlayerController(GetOwningPlayer(Y47))==MAP_CONTROL_COMPUTER)then
if GetUnitAbilityLevel(Y47,'AZ30')>0 then
call UnitRemoveAbility(Y47,'AZ30')
endif
if GetUnitAbilityLevel(Y47,'AZ31')>0 then
call UnitRemoveAbility(Y47,'AZ31')
endif
if GetUnitAbilityLevel(Y47,'AF8Y')>0 then
call UnitRemoveAbility(Y47,'AF8Y')
endif
set CFM=GetUnitAbilityLevel(Y47,'A11T')
if CFM==1 then
set hblm_ok[GetPlayerId(GetOwningPlayer(Y47))]=true
loop
exitwhen(FYQ>5)
set FYQ=FYQ+1
if UnitItemInSlot(Y47,FYQ)!=null then
set BFI[FYQ]=GetItemTypeId(UnitItemInSlot(Y47,FYQ))
set BMI[FYQ]=FYQ
call RemoveItem(UnitItemInSlot(Y47,FYQ))
endif
endloop
set EMZ=GetUnitAbilityLevel(Y47,'A0NR')
if EMZ>0 then
call UnitRemoveAbility(Y47,'A0NR')
endif
call UnitAddAbility(Y47,'AF1L')
call UnitMakeAbilityPermanent(Y47,true,'AF1L')
call UnitAddAbility(Y47,'AF7Y')
call ResetItems(BFI[0],BFI[1],BFI[2],BFI[3],BFI[4],BFI[5],Y47,0.01,BMI[0],BMI[1],BMI[2],BMI[3],BMI[4],BMI[5])
if EMZ>0 then
call ResetSkill('A0NR',EMZ,Y47,0.01)
endif
if GetPlayerController(GetOwningPlayer(Y47))==MAP_CONTROL_COMPUTER then
call RemoveItemAfter('I0AY','I00D',Y47,0.1)
endif
call SetBooleanHblm(1,Y47)
elseif CFM==2 then
set hblm_ok[GetPlayerId(GetOwningPlayer(Y47))]=true
loop
exitwhen(FYQ>5)
set FYQ=FYQ+1
if UnitItemInSlot(Y47,FYQ)!=null then
set BFI[FYQ]=GetItemTypeId(UnitItemInSlot(Y47,FYQ))
set BMI[FYQ]=FYQ
call RemoveItem(UnitItemInSlot(Y47,FYQ))
endif
endloop
set EMZ=GetUnitAbilityLevel(Y47,'A0NR')
if EMZ>0 then
call UnitRemoveAbility(Y47,'A0NR')
endif
call UnitAddAbility(Y47,'AF1L')
call UnitMakeAbilityPermanent(Y47,true,'AF1L')
call UnitAddAbility(Y47,'AF9Y')
call SetUnitAbilityLevel(Y47,'AF1L',2)
call ResetItems(BFI[0],BFI[1],BFI[2],BFI[3],BFI[4],BFI[5],Y47,0.01,BMI[0],BMI[1],BMI[2],BMI[3],BMI[4],BMI[5])
if EMZ>0 then
call ResetSkill('A0NR',EMZ,Y47,0.01)
endif
if GetPlayerController(GetOwningPlayer(Y47))==MAP_CONTROL_COMPUTER then
call RemoveItemAfter('I0AY','I00D',Y47,0.1)
endif
call SetBooleanHblm(1,Y47)
elseif CFM==3 then
set hblm_ok[GetPlayerId(GetOwningPlayer(Y47))]=true
loop
exitwhen(FYQ>5)
set FYQ=FYQ+1
if UnitItemInSlot(Y47,FYQ)!=null then
set BFI[FYQ]=GetItemTypeId(UnitItemInSlot(Y47,FYQ))
set BMI[FYQ]=FYQ
call RemoveItem(UnitItemInSlot(Y47,FYQ))
endif
endloop
set EMZ=GetUnitAbilityLevel(Y47,'A0NR')
if EMZ>0 then
call UnitRemoveAbility(Y47,'A0NR')
endif
call UnitAddAbility(Y47,'AF1L')
call UnitMakeAbilityPermanent(Y47,true,'AF1L')
call UnitAddAbility(Y47,'AF2Y')
call SetUnitAbilityLevel(Y47,'AF1L',3)
call ResetItems(BFI[0],BFI[1],BFI[2],BFI[3],BFI[4],BFI[5],Y47,0.01,BMI[0],BMI[1],BMI[2],BMI[3],BMI[4],BMI[5])
if EMZ>0 then
call ResetSkill('A0NR',EMZ,Y47,0.01)
endif
if GetPlayerController(GetOwningPlayer(Y47))==MAP_CONTROL_COMPUTER then
call RemoveItemAfter('I0AY','I00D',Y47,0.1)
endif
call SetBooleanHblm(1,Y47)
endif
return 0
endif
elseif T27 then
if WP8=='H600' then
return'A55U'
elseif WP8=='H711' then
return'A9M9'
elseif WP8=='H718' then
return'A31V'
elseif WP8=='H724' then
return'A9O8'
elseif WP8=='H725' then
return'A9TV'
elseif WP8=='H729' then
return'A9U1'
elseif WP8=='H741' then
return'A9TK'
elseif WP8=='H743' then
return'A9TQ'
elseif WP8=='H900' then
return'Awi0'
elseif WP8=='H901' then
return'Awi2'
elseif WP8=='H903' then
return'Awi4'
elseif WP8=='H906' then
return'Awi6'
endif
endif
return 0
endfunction
function BV9 takes item Y98 returns boolean
local integer i=1
loop
exitwhen i>OB4
if Y98==OA4[i]then
return true
endif
set i=i+1
endloop
return false
endfunction
function BW9 takes unit Y47 returns location
return B8[GetUnitAbilityLevel(Y47,A8)]
endfunction
function BX9 takes unit Y47 returns boolean
return(GetOwningPlayer(Y47)==G8[0])or(GetOwningPlayer(Y47)==N8[0])
endfunction
function BY9 takes nothing returns nothing
call SetUnitUserData(GetEnumUnit(),0)
call IssuePointOrderByIdLoc(GetEnumUnit(),851983,BW9(GetEnumUnit()))
endfunction
function BZ9 takes nothing returns nothing
call IssueTargetOrderById(GetEnumUnit(),851983,W8)
call GroupAddUnit(C8,GetEnumUnit())
call SetUnitUserData(GetEnumUnit(),TB4)
endfunction
function BA9 takes nothing returns boolean
local integer id=GetUnitTypeId(GetFilterUnit())
if id=='ebal' or id=='e026' or id=='umtw' or id=='u00R' then
return false
endif
if IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(W8))and(GetOwningPlayer(GetFilterUnit())==G8[0]or GetOwningPlayer(GetFilterUnit())==N8[0])and GetUnitUserData(GetFilterUnit())==0 then
return true
endif
return false
endfunction
function BB9 takes nothing returns nothing
if GetUnitCurrentOrder(GetEnumUnit())==0 and IsUnitInRange(GetEnumUnit(),W8,GetUnitAcquireRange(GetEnumUnit()))==false then
call GroupRemoveUnit(C8,GetEnumUnit())
call SetUnitUserData(GetEnumUnit(),0)
call IssuePointOrderByIdLoc(GetEnumUnit(),851983,BW9(GetEnumUnit()))
endif
endfunction
function BC9 takes nothing returns nothing
local integer EC8=GetHandleId(LUnit(GetHandleId(GetExpiredTimer()),"Source"))
local integer B39=LInt(EC8,"Attacker")
local group B69=LGroup(EC8,"Defenders")
set TA4[B39]=null
call ForGroup(B69,function BY9)
call GroupClear(B69)
set B69=null
endfunction
function BL9 takes unit N28,unit N99 returns nothing
local integer EC8=GetHandleId(N28)
local group B69=LGroup(EC8,"Defenders")
local integer B39=LInt(EC8,"Attacker")
local unit B19=TA4[B39]
local group g
if B19!=null and B19!=N99 then
call ForGroup(B69,function BY9)
call GroupClear(B69)
endif
set TA4[B39]=N99
set C8=B69
set W8=N99
set TB4=B39
call ForGroup(B69,function BB9)
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(N99),GetUnitY(N99),500,Condition(function BA9))
call ForGroup(g,function BZ9)
call OF8(g)
call TimerStart(LTimer(EC8,"DefendTimer"),2,false,function BC9)
set g=null
set B19=null
set B69=null
endfunction
function B09 takes integer MB8 returns boolean
return MB8=='EC77' or MB8=='E004' or MB8=='Nbrn' or MB8=='U00P' or MB8=='Emoo' or MB8=='N01A' or MB8=='H00Q'
endfunction
function B59 takes nothing returns boolean
local unit N28=GetAttacker()
local unit m5=GetTriggerUnit()
local integer X5=GetIssuedOrderId()
local integer B29
local integer i1
call WL7(m5,N28)
call W27(N28,m5)
if BX9(N28)==false then
set B29=LInt(GetHandleId(m5),"Attacker")
if TA4[B29]==null or TA4[B29]==m5 or O18(TA4[B29])then
if B29!=0 then
if(not IsUnitType(N28,UNIT_TYPE_HERO))or(GetPlayerController(GetOwningPlayer(N28))!=MAP_CONTROL_COMPUTER)or(not B09(GetUnitTypeId(N28)))or(not GZ[304+GetPlayerId(GetOwningPlayer(N28))])then
call BL9(GetTriggerUnit(),GetAttacker())
endif
endif
endif
endif
set N28=null
set m5=null
return false
endfunction
function B_9 takes nothing returns boolean
local unit N28=GetTriggerUnit()
local unit m5=GetOrderTargetUnit()
local integer X5=GetIssuedOrderId()
local integer C49
if IsUnitType(m5,UNIT_TYPE_HERO)and IsUnitIllusion(m5)==false and(X5==851983 or X5==851971)and IsUnitEnemy(m5,GetOwningPlayer(N28))and IsUnitVisibleEx(N28,GetOwningPlayer(m5))then
set C49=LInt(GetHandleId(m5),"Attacker")
if TA4[C49]==null or TA4[C49]==m5 or O18(TA4[C49])then
if C49!=0 then
call BL9(m5,N28)
endif
endif
endif
set N28=null
set m5=null
return false
endfunction
function Wy takes unit N28 returns boolean
return LBool(GetHandleId(N28),"HeroAIManager")
endfunction
function C79 takes unit N28 returns nothing
local group g
local trigger t
local timer tm
local integer EC8=GetHandleId(N28)
set l2=l2+1
call SBool(EC8,"HeroAIManager",true)
call SInt(EC8,"Attacker",l2)
set g=OG8()
call SGroup(EC8,"Defenders",g)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(t,Condition(function B_9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function B59))
set tm=CreateTimer()
call STimer(GetHandleId(N28),"DefendTimer",tm)
call SUnit(GetHandleId(tm),"Source",N28)
set g=null
set t=null
set tm=null
endfunction
function C89 takes nothing returns nothing
local unit S4=GetTriggerUnit()
local unit m5=rw[GetUnitUserData(S4)]
call SetUnitPosition(S4,GetUnitX(S4),GetUnitY(S4))
if m5!=null and O18(m5)==false and IsUnitVisibleEx(m5,GetOwningPlayer(m5))then
call IssueTargetOrderById(S4,851983,m5)
else
call DisableTrigger(GetTriggeringTrigger())
call IssuePointOrderByIdLoc(S4,851983,(B8[GetUnitAbilityLevel((S4),A8)]))
call EnableTrigger(GetTriggeringTrigger())
endif
set S4=null
set m5=null
endfunction
function C99 takes nothing returns boolean
if BX9(GetTriggerUnit())then
call C89()
endif
return false
endfunction
function CD9 takes nothing returns nothing
local unit S4=GetTriggerUnit()
local unit m5=rw[GetUnitUserData(S4)]
call SetUnitPosition(S4,GetUnitX(S4),GetUnitY(S4))
if m5!=null and O18(m5)==false and IsUnitVisibleEx(m5,GetOwningPlayer(m5))then
call IssueTargetOrderById(S4,851983,m5)
else
call DisableTrigger(GetTriggeringTrigger())
call IssuePointOrderByIdLoc(S4,851983,(B8[GetUnitAbilityLevel((S4),A8)]))
call EnableTrigger(GetTriggeringTrigger())
endif
set S4=null
set m5=null
endfunction
function CE9 takes nothing returns boolean
if GetIssuedOrderId()==851986 then
call CD9()
endif
return false
endfunction
function CF9 takes nothing returns boolean
if GetOwningPlayer(GetTriggerUnit())==G8[0]then
if IsUnitFogged(GetAttacker(),G8[1])or IsUnitFogged(GetAttacker(),N8[1])then
call TF8(CreateFogModifierRadius(G8[1],FOG_OF_WAR_VISIBLE,GetUnitX(GetAttacker()),GetUnitY(GetAttacker()),128,true,false),1)
endif
elseif GetOwningPlayer(GetTriggerUnit())==N8[0]then
if IsUnitFogged(GetAttacker(),G8[1])or IsUnitFogged(GetAttacker(),N8[1])then
call TF8(CreateFogModifierRadius(N8[1],FOG_OF_WAR_VISIBLE,GetUnitX(GetAttacker()),GetUnitY(GetAttacker()),128,true,false),1)
endif
endif
return false
endfunction
function CG9 takes nothing returns boolean
local trigger t
local group g
local unit u
set Ew=CreateRegion()
call RegionAddRect(Ew,XD)
call RegionAddRect(Ew,WD)
if L8 then
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,G8[0],EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,Condition(function KF8))
call TriggerRegisterPlayerUnitEvent(t,N8[0],EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,Condition(function KF8))
call TriggerAddCondition(t,Condition(function CE9))
set t=CreateTrigger()
set g=OG8()
call GroupEnumUnitsOfPlayer(g,G8[0],Condition(function KF8))
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
if GetUnitAcquireRange(u)!=0 then
call TriggerRegisterUnitInRange(t,u,600,Condition(function KF8))
endif
endloop
call OF8(g)
set g=OG8()
call GroupEnumUnitsOfPlayer(g,N8[0],Condition(function KF8))
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 KF8))
endif
endloop
call OF8(g)
call TriggerAddCondition(t,Condition(function C99))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function CF9))
endif
call EA8(GetTriggeringTrigger())
set u=null
set g=null
set t=null
return false
endfunction
function CH9 takes nothing returns boolean
return(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(not IsUnitIllusion(GetTriggerUnit()))and(not Wy(GetTriggerUnit()))and GetUnitTypeId(GetTriggerUnit())!='H00M' and GetUnitTypeId(GetTriggerUnit())!='N0MM' and GetUnitTypeId(GetTriggerUnit())!='H00Y' and GetUnitTypeId(GetTriggerUnit())!='H07G' and GetUnitTypeId(GetTriggerUnit())!='H0B8' and(not D17)
endfunction
function CI9 takes nothing returns boolean
if GetOwningPlayer(GetTriggerUnit())==G8[0]then
call SetUnitAbilityLevel(GetTriggerUnit(),A8,5)
if rw[GetUnitUserData(GetTriggerUnit())]==null then
call SetUnitUserData(GetTriggerUnit(),0)
call IssuePointOrderByIdLoc(GetTriggerUnit(),851983,(B8[GetUnitAbilityLevel((GetTriggerUnit()),A8)]))
endif
elseif GetOwningPlayer(GetTriggerUnit())==N8[0]then
call SetUnitAbilityLevel(GetTriggerUnit(),A8,1)
if rw[GetUnitUserData(GetTriggerUnit())]==null then
call SetUnitUserData(GetTriggerUnit(),0)
call IssuePointOrderByIdLoc(GetTriggerUnit(),851983,(B8[GetUnitAbilityLevel((GetTriggerUnit()),A8)]))
endif
endif
return false
endfunction
function CJ9 takes unit S4 returns nothing
local integer i=0
loop
exitwhen(i==16)
if IsUnitAlly(S4,Player(i))then
call UnitShareVision(S4,Player(i),true)
endif
set i=i+1
endloop
endfunction
function CK9 takes nothing returns nothing
call CJ9(GetEnumUnit())
endfunction
function CM9 takes nothing returns nothing
local integer x
local group g
set x=1
loop
exitwhen x>5
call SetPlayerAlliance(G8[0],G8[x],ConvertAllianceType(5),false)
call SetPlayerAlliance(N8[0],N8[x],ConvertAllianceType(5),false)
set x=x+1
endloop
set g=OG8()
call GroupEnumUnitsOfPlayer(g,G8[0],Condition(function KF8))
call ForGroup(g,function CK9)
call OF8(g)
set g=OG8()
call GroupEnumUnitsOfPlayer(g,N8[0],Condition(function KF8))
call ForGroup(g,function CK9)
call OF8(g)
set g=null
endfunction
function CN9 takes nothing returns nothing
local integer x
set x=0
loop
exitwhen x>5
call SetPlayerAlliance(G8[x],O8,ConvertAllianceType(0),false)
call SetPlayerAlliance(G8[x],O8,ConvertAllianceType(1),false)
call SetPlayerAlliance(G8[x],O8,ConvertAllianceType(2),false)
call SetPlayerAlliance(G8[x],O8,ConvertAllianceType(3),false)
call SetPlayerAlliance(G8[x],O8,ConvertAllianceType(4),false)
call SetPlayerAlliance(G8[x],O8,ConvertAllianceType(5),false)
call SetPlayerAlliance(G8[x],O8,ConvertAllianceType(6),false)
call SetPlayerAlliance(G8[x],O8,ConvertAllianceType(7),false)
call SetPlayerAlliance(N8[x],O8,ConvertAllianceType(0),false)
call SetPlayerAlliance(N8[x],O8,ConvertAllianceType(1),false)
call SetPlayerAlliance(N8[x],O8,ConvertAllianceType(2),false)
call SetPlayerAlliance(N8[x],O8,ConvertAllianceType(3),false)
call SetPlayerAlliance(N8[x],O8,ConvertAllianceType(4),false)
call SetPlayerAlliance(N8[x],O8,ConvertAllianceType(5),false)
call SetPlayerAlliance(N8[x],O8,ConvertAllianceType(6),false)
call SetPlayerAlliance(N8[x],O8,ConvertAllianceType(7),false)
call SetPlayerAlliance(O8,G8[x],ConvertAllianceType(0),false)
call SetPlayerAlliance(O8,G8[x],ConvertAllianceType(1),false)
call SetPlayerAlliance(O8,G8[x],ConvertAllianceType(2),false)
call SetPlayerAlliance(O8,G8[x],ConvertAllianceType(3),false)
call SetPlayerAlliance(O8,G8[x],ConvertAllianceType(4),false)
call SetPlayerAlliance(O8,G8[x],ConvertAllianceType(5),false)
call SetPlayerAlliance(O8,G8[x],ConvertAllianceType(6),false)
call SetPlayerAlliance(O8,G8[x],ConvertAllianceType(7),false)
call SetPlayerAlliance(O8,N8[x],ConvertAllianceType(0),false)
call SetPlayerAlliance(O8,N8[x],ConvertAllianceType(1),false)
call SetPlayerAlliance(O8,N8[x],ConvertAllianceType(2),false)
call SetPlayerAlliance(O8,N8[x],ConvertAllianceType(3),false)
call SetPlayerAlliance(O8,N8[x],ConvertAllianceType(4),false)
call SetPlayerAlliance(O8,N8[x],ConvertAllianceType(5),false)
call SetPlayerAlliance(O8,N8[x],ConvertAllianceType(6),false)
call SetPlayerAlliance(O8,N8[x],ConvertAllianceType(7),false)
set x=x+1
endloop
endfunction
function CO9 takes nothing returns boolean
return BX9(GetTriggerUnit())
endfunction
function CP9 takes nothing returns nothing
call CJ9(GetTriggerUnit())
endfunction
function CQ9 takes nothing returns nothing
local trigger t
if not L8 then
return
endif
call CM9()
call CN9()
set t=CreateTrigger()
call TriggerRegisterEnterRectSimple(t,GetWorldBounds())
call TriggerAddCondition(t,Condition(function CO9))
call TriggerAddAction(t,function CP9)
set t=null
endfunction
function CR9 takes nothing returns nothing
call RemoveUnit(LUnit(GetHandleId(GetTriggerUnit()),"Locust"))
endfunction
function CS9 takes nothing returns nothing
local group g
local unit S4
local unit CT9
local trigger t
local integer i
set t=CreateTrigger()
call TriggerAddAction(t,function CR9)
set g=OG8()
call GroupEnumUnitsOfPlayer(g,G8[0],Condition(function KF8))
loop
set S4=FirstOfGroup(g)
exitwhen S4==null
call GroupRemoveUnit(g,S4)
if GetUnitAbilityLevel(S4,'Adts')>0 or GetUnitAbilityLevel(S4,'Atru')>0 then
call TriggerRegisterUnitEvent(t,S4,EVENT_UNIT_DEATH)
set CT9=CreateUnit(G8[1],('u00B'),-5000,-5100,0)
call SetUnitScale(CT9,0,0,0)
call SetUnitPathing(CT9,false)
call SetUnitInvulnerable(CT9,true)
call SetUnitX(CT9,GetUnitX(S4))
call SetUnitY(CT9,GetUnitY(S4))
call SUnit(GetHandleId(S4),"Locust",CT9)
endif
endloop
call OF8(g)
set g=OG8()
call GroupEnumUnitsOfPlayer(g,N8[0],Condition(function KF8))
loop
set S4=FirstOfGroup(g)
exitwhen S4==null
call GroupRemoveUnit(g,S4)
if GetUnitAbilityLevel(S4,'Adts')>0 or GetUnitAbilityLevel(S4,'Atru')>0 then
call TriggerRegisterUnitEvent(t,S4,EVENT_UNIT_DEATH)
set CT9=CreateUnit(N8[1],('u00B'),3400,4400,0)
call SetUnitScale(CT9,0,0,0)
call SetUnitPathing(CT9,false)
call SetUnitInvulnerable(CT9,true)
call SetUnitX(CT9,GetUnitX(S4))
call SetUnitY(CT9,GetUnitY(S4))
call SUnit(GetHandleId(S4),"Locust",CT9)
endif
endloop
call OF8(g)
set t=null
set CT9=null
set S4=null
set g=null
endfunction
function CU9 takes nothing returns nothing
if L8 then
set NH4=CreateTrigger()
call TriggerRegisterTimerEvent(NH4,1.,true)
call TriggerAddAction(NH4,function OY9)
endif
endfunction
function CV9 takes nothing returns boolean
call EA8(GetTriggeringTrigger())
call TriggerEvaluate(MS)
return false
endfunction
function CW9 takes nothing returns boolean
local real r=TimerGetRemaining(R84)
local real ST9=r
local integer D5=R2I(ST9)
local integer S59=D5/ 60-1/ 2
local integer S29=ModuloInteger(D5,60)
local trigger t
if r==0 then
set AG4=true
call X48("GameStart",1)
call S09(S59,S29,true)
set NL4=true
set M04=TimerGetElapsed(E4)
call EA8(GetTriggeringTrigger())
set IJ4=Rect(-7040,-7680,7040,7168)
call SetFloatGameState(GAME_STATE_TIME_OF_DAY,6.)
call SuspendTimeOfDay(false)
call SetTimeOfDayScale(.5)
if G7==false then
if CS then
call TriggerRegisterTimerEvent(HS4,120.,true)
else
call TriggerRegisterTimerEvent(HS4,120.,true)
endif
call TriggerEvaluate(HS4)
endif
if Mode_FN then
call TriggerRegisterTimerEvent(MS,15.,true)
else
call TriggerRegisterTimerEvent(MS,60.,true)
endif
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,30.,false)
call TriggerAddCondition(t,Condition(function CV9))
set t=null
call TriggerRegisterTimerEventPeriodic(JS,30.)
call TriggerExecute(JS)
call TriggerRegisterTimerEventPeriodic(KS,450.)
call TriggerRegisterTimerEventSingle(GS,2699.)
call TriggerRegisterTimerEventSingle(HS,999.)
call TriggerRegisterTimerEventSingle(HS,1999.)
call TriggerRegisterTimerEventSingle(HS,2999.)
call TriggerRegisterTimerEvent(NW4,250.,true)
call TriggerRegisterTimerEvent(OE4,300.,true)
call TriggerRegisterTimerEvent(C9,30.,true)
call TriggerEvaluate(C9)
if M7 then
call TriggerRegisterTimerEvent(OS,600.,true)
endif
elseif r==7 then
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,30.,true)
call TriggerAddCondition(t,Condition(function XR9))
elseif ST9<12 and RE4==false then
set RE4=true
call PlaySoundBJ(LO)
call S09(S59,S29,true)
elseif ST9==20 then
if GetRandomInt(0,10)<6 then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,6,"|c006699CC"+GetObjectName('n0LG')+"|r")
endif
elseif ST9==30 then
else
call S09(S59,S29,true)
endif
return false
endfunction
function CX9 takes nothing returns nothing
local trigger t
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerAddCondition(t,Condition(function CW9))
set R84=CreateTimer()
call TimerStart(R84,RD4+1,false,null)
call RemoveUnitFromStock(IR4,'h02C')
call AddUnitToStock(IR4,'h02C',1,2)
call RemoveUnitFromStock(JU4,'h02C')
call AddUnitToStock(JU4,'h02C',1,2)
set t=null
set M54=TimerGetElapsed(E4)+1
endfunction
function CY9 takes nothing returns boolean
if GetOwningPlayer(GetTriggerUnit())!=G8[0]and GetOwningPlayer(GetTriggerUnit())!=N8[0]then
set OT[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]=OT[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]+1
if GetIssuedOrderId()!=851983 then
set nb[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]=(TimerGetElapsed(E4))
set PT[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]=false
endif
if(GetIssuedOrderId()==851983 or GetIssuedOrderId()==851971)and GetOrderTargetItem()!=null then
if GetIssuedOrderId()==851983 or(GetIssuedOrderId()==851971 and LBool(GetHandleId(GetItemPlayer(GetOrderTargetItem())),"DisableHelp"))then
if GetItemPlayer(GetOrderTargetItem())!=GetOwningPlayer(GetTriggerUnit())and IsPointInRegion(Ew,GetItemX(GetOrderTargetItem()),GetItemY(GetOrderTargetItem()))then
call DisableTrigger(GetTriggeringTrigger())
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),(GetObjectName(('n0G7'))))
call EnableTrigger(GetTriggeringTrigger())
endif
endif
endif
endif
return false
endfunction
function StrStr takes string a,string b returns integer
local integer i=0
loop
exitwhen i>=StringLength(a)
if SubString(a,i,i+StringLength(b))==b then
return i
endif
set i=i+1
endloop
return i
endfunction
function ShowAIGoldExp takes nothing returns nothing
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"/===============================================/")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"AI每次击杀时的金钱加成："+I2S(R2I(CG_Values[13]))+"   /   AI每次死亡时的金钱加成："+I2S(R2I(CG_Values[5])))
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"AI最大金钱加成："+I2S(R2I(CG_Values[8]))+"   /   每次击杀时的工资减成百分比："+I2S(R2I(CG_Values[6]*100))+" %")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"AI连续击杀时工资减成的衰减百分比："+I2S(R2I(CG_Values[7]*100))+" %")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"每15秒，AI的当前金钱会增加"+I2S(R2I(CG_Values[15]))+"，之后倍增为为原来的："+I2S(R2I(CG_Values[14]*100))+" %")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"AI击杀和死亡时得到的经验基础加减成："+I2S(R2I(CG_Values[2]*100))+" %   /   AI连续击杀的经验减成衰减："+I2S(R2I(CG_Values[3]*100))+" %")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"AI最高获得的经验加成："+I2S(R2I(CG_Values[4]*100))+" %   /   AI连续死亡的经验加成衰减："+I2S(R2I(CG_Values[11]*100))+" %")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"每次死亡时的经验加成："+I2S(R2I(CG_Values[12]*100))+" %")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"AI杀死任意单位获得的额外经验值加成："+I2S(R2I(CG_Values[17]))+" %")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"/===============================================/")
endfunction
function SetGoldFunc takes string s returns nothing
local integer i=0
set i=StrStr(s,",")
if i>=StringLength(s)or i==0 then
return
endif
set CG_Values[13]=S2I(SubString(s,0,i))
set s=SubString(s,i+1,StringLength(s))
set i=StrStr(s,",")
if i>=StringLength(s)or i==0 then
return
endif
set CG_Values[5]=S2I(SubString(s,0,i))
set s=SubString(s,i+1,StringLength(s))
set i=StrStr(s,",")
if i>=StringLength(s)or i==0 then
return
endif
set CG_Values[8]=S2I(SubString(s,0,i))
set s=SubString(s,i+1,StringLength(s))
set i=StrStr(s,",")
if i>=StringLength(s)or i==0 then
return
endif
set CG_Values[6]=S2R(SubString(s,0,i))*.01
set s=SubString(s,i+1,StringLength(s))
set i=StrStr(s,",")
if i>=StringLength(s)or i==0 then
return
endif
set CG_Values[7]=S2R(SubString(s,0,i))*.01
set s=SubString(s,i+1,StringLength(s))
if StringLength(s)==0 then
return
endif
set CG_Values[14]=S2R(s)*.01
if StringLength(s)==0 then
return
endif
set CG_Values[15]=S2I(s)
endfunction
function SetExpFunc takes string s returns nothing
local integer i=0
set i=StrStr(s,",")
if i>=StringLength(s)or i==0 then
return
endif
set CG_Values[2]=S2R(SubString(s,0,i))*.01
set s=SubString(s,i+1,StringLength(s))
set i=StrStr(s,",")
if i>=StringLength(s)or i==0 then
return
endif
set CG_Values[3]=S2R(SubString(s,0,i))*.01
set s=SubString(s,i+1,StringLength(s))
set i=StrStr(s,",")
if i>=StringLength(s)or i==0 then
return
endif
set CG_Values[4]=S2R(SubString(s,0,i))*.01
set s=SubString(s,i+1,StringLength(s))
set i=StrStr(s,",")
if i>=StringLength(s)or i==0 then
return
endif
set CG_Values[11]=S2R(SubString(s,0,i))*.01
set s=SubString(s,i+1,StringLength(s))
set i=StrStr(s,",")
if i>=StringLength(s)or i==0 then
return
endif
set CG_Values[12]=S2R(SubString(s,0,i))*.01
set s=SubString(s,i+1,StringLength(s))
if StringLength(s)==0 then
return
endif
set CG_Values[16]=S2R(s)
set CG_Values[17]=S2R(s)
set CG_Values[18]=S2R(s)
endfunction
function CZ9 takes nothing returns nothing
local string CA9=StringCase(GetEventPlayerChatString(),false)
local boolean CB9=CA9=="-random" or CA9=="-random int" or CA9=="-random agi" or CA9=="-random str"
local boolean CC9=CA9=="-repick"
local boolean C39=CA9=="-gameinfo"
local boolean C69=SubString(CA9,0,5)=="-swap"
local boolean CL9=CA9=="-recreate"
local boolean C19=CA9=="-unstuck"
local boolean C09=CA9=="-matchup" or CA9=="-ma"
local boolean C59=CA9=="-movespeed" or CA9=="-ms"
local boolean C29=CA9=="-msa"
local boolean C_9=CA9=="-disablehelp"
local boolean L49=CA9=="-enablehelp"
local boolean L79=CA9=="-creepstats" or CA9=="-cs"
local boolean L89=CA9=="-cson" or CA9=="-csoff"
local boolean L99=CA9=="-hidemsg"
local boolean LD9=CA9=="-showmsg"
local boolean LE9=CA9=="-weather snow" or CA9=="-weather rain" or CA9=="-weather off" or CA9=="-weather random" or CA9=="-weather wind" or CA9=="-weather moonlight"
local boolean LF9=CA9=="-showdeny" or CA9=="-hidedeny"
local boolean LG9=CA9=="-denyinfo" or CA9=="-di"
local boolean LH9=CA9=="-don" or CA9=="-deathon" or CA9=="-doff" or CA9=="-deathoff"
local boolean LI9=SubString(CA9,0,5)=="-roll" and CA9!="-rollhero"
local boolean LJ9=CA9=="-hhn" or CA9=="-hideheronames"
local boolean LK9=CA9=="-mute"
local boolean LM9=CA9=="-apm"
local boolean LN9=CA9=="-clear"
local boolean LO9=CA9=="-courier"
local boolean LP9=CA9=="-invokelist" or CA9=="-il"
local boolean bListCommand=CA9=="-list"
local boolean LQ9=CA9=="-rolloff"
local boolean LR9=CA9=="-rollon"
local boolean LS9=SubString(CA9,0,6)=="-music"
local boolean LT9=SubString(CA9,0,6)=="-water"
local boolean LU9=SubString(CA9,0,6)=="-quote"
local boolean LV9=SubString(CA9,0,3)=="-cm"
local boolean LW9=SubString(CA9,0,9)=="-itemswap"
local boolean LX9=CA9=="-bonus"
local boolean LY9=CA9=="-rollhero" or CA9=="-rh"
local boolean LZ9=SubString(CA9,0,9)=="-rickroll"
local boolean NoSwitch=CA9=="-noswitch"
local boolean Switch=SubString(CA9,0,7)=="-switch"or CA9=="-ok"or CA9=="-no"
local boolean Terrain=CA9=="-terrain" or CA9=="-terrain default" or CA9=="-terrain snow"
local boolean LA9=CA9=="-tips"
local boolean LB9=CA9=="-ii" or CA9=="-iteminfo"
local boolean IT8=CA9=="-center" or CA9=="-centeroff" or CA9=="-c" or CA9=="-co"
local boolean Unlock=CA9=="-unlock"
local boolean LC9=CA9=="-disableselection"or CA9=="-ds"
local boolean L39=CA9=="-enableselection"or CA9=="-es"
local boolean L69=CA9=="-sleep"
local boolean LL9=CA9=="-calm"
local boolean M18=CA9=="-st"
local boolean NoHat=CA9=="-nosanta"
local boolean L19=SubString(CA9,0,10)=="-aiunstuck"
local boolean L09=StringLength(CA9)>3 and SubString(CA9,0,3)=="-cs"
local boolean L59=StringLength(CA9)>3 and SubString(CA9,0,3)=="-ms"
local boolean L29=(CA9=="-aid" or CA9=="1")
local boolean L_9=CA9=="-override"
local boolean D4D=CA9=="-formless"
local boolean D7D=CA9=="-bastion"
local boolean D8D=CA9=="-aimsg"
local boolean D9D=CA9=="-aimsgmiss"
local boolean DDD=(CA9=="-aiboard")
local boolean DED=CA9=="-aiglyph"
local boolean DFD=((CA9=="-aishowde")or(CA9=="-aishowdg")or(CA9=="-aishowdedg")or(CA9=="-aishowdynamic"))
local boolean SetGold=Mode_CG and(SubString(CA9,0,8)=="-setgold" or SubString(CA9,0,3)=="-sg")
local boolean SetAll=Mode_CG and(SubString(CA9,0,7)=="-setall" or SubString(CA9,0,3)=="-sa")
local boolean SetExp=Mode_CG and(SubString(CA9,0,7)=="-setexp" or SubString(CA9,0,3)=="-se")and SetAll==false
local boolean ShowAch=CA9=="-ach" and Mode_NA==true
if ShowAch then
call ShowAchieve(GetTriggerPlayer())
endif
if SetGold then
call SetGoldFunc(SubString(CA9,StrStr(CA9," ")+1,StringLength(CA9)))
set FI7=CG_Values[1]
set FJ7=CG_Values[2]
set FK7=CG_Values[3]
set FM7=CG_Values[4]
set FO7=R2I(CG_Values[5])
set FP7=CG_Values[6]
set FQ7=CG_Values[7]
set FR7=R2I(CG_Values[8])
set FV7=R2I(CG_Values[9])
set FW7=R2I(CG_Values[10])
set FN7=CG_Values[11]
set FT7=CG_Values[12]
set FU7=R2I(CG_Values[13])
call ShowAIGoldExp()
endif
if SetExp then
call SetExpFunc(SubString(CA9,StrStr(CA9," ")+1,StringLength(CA9)))
set FI7=CG_Values[1]
set FJ7=CG_Values[2]
set FK7=CG_Values[3]
set FM7=CG_Values[4]
set FO7=R2I(CG_Values[5])
set FP7=CG_Values[6]
set FQ7=CG_Values[7]
set FR7=R2I(CG_Values[8])
set FV7=R2I(CG_Values[9])
set FW7=R2I(CG_Values[10])
set FN7=CG_Values[11]
set FT7=CG_Values[12]
set FU7=R2I(CG_Values[13])
call ShowAIGoldExp()
endif
if SetAll then
call SetGoldFunc(SubString(CA9,StrStr(CA9," ")+1,StrStr(CA9,";")))
call SetExpFunc(SubString(CA9,StrStr(CA9,";")+1,StringLength(CA9)))
set FI7=CG_Values[1]
set FJ7=CG_Values[2]
set FK7=CG_Values[3]
set FM7=CG_Values[4]
set FO7=R2I(CG_Values[5])
set FP7=CG_Values[6]
set FQ7=CG_Values[7]
set FR7=R2I(CG_Values[8])
set FV7=R2I(CG_Values[9])
set FW7=R2I(CG_Values[10])
set FN7=CG_Values[11]
set FT7=CG_Values[12]
set FU7=R2I(CG_Values[13])
call ShowAIGoldExp()
endif
call PP8("DGD",CB9)
call PP8("DHD",CC9)
call PP8("DID",C39)
call PP8("DJD",C69)
call PP8("DKD",CL9)
call PP8("DMD",C19)
call PP8("DND",C09)
call PP8("DOD",C59)
call PP8("DPD",C29)
call PP8("DQD",C_9)
call PP8("DRD",L49)
call PP8("DSD",L79)
call PP8("DTD",L89)
call PP8("DUD",L99)
call PP8("DVD",LD9)
call PP8("DWD",LE9)
call PP8("DXD",LF9)
call PP8("DYD",LG9)
call PP8("DZD",LH9)
call PP8("DAD",LI9)
call PP8("DBD",LJ9)
call PP8("DCD",LK9)
call PP8("D3D",LM9)
call PP8("D6D",LN9)
call PP8("DLD",LO9)
call PP8("D1D",LP9)
call PP8("D0D",LQ9)
call PP8("D5D",LR9)
call PP8("D2D",LS9)
call PP8("D_D",LT9)
call PP8("E4D",LU9)
call PP8("E7D",LV9)
call PP8("E8D",LW9)
call PP8("E9D",LX9)
call PP8("EDD",LY9)
call PP8("EED",LZ9)
call PP8("EFD",LB9)
call PP8("EGD",LA9)
call PP8("EHD",IT8 and(Mode_FP==false))
call PP8("EID",LC9)
call PP8("EJD",L39)
call PP8("EKD",L69)
call PP8("EMD",M18)
call PP8("END",LL9)
call PP8("EOD",L09)
call PP8("EPD",L59)
call PP8("EQD",L29)
call PP8("ERD",L19)
call PP8("ESD",L_9)
call PP8("ETD",D4D)
call PP8("EUD",D7D)
call PP8("EVD",D8D)
call PP8("EWD",D9D)
call PP8("EXD",DDD)
call PP8("EYD",DED)
call PP8("EZD",DFD)
endfunction
function EVD takes nothing returns nothing
local integer O5=GetPlayerId(GetTriggerPlayer())
set E57[O5]=(not E57[O5])
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,GetObjectName('Y097')+WF7(E57[O5],GetObjectName('Y1ON'),GetObjectName('YOOF')))
endfunction
function EWD takes nothing returns nothing
local integer O5=GetPlayerId(GetTriggerPlayer())
set E57[16+O5]=(not E57[16+O5])
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,GetObjectName('Y096')+WF7(E57[16+O5],GetObjectName('Y1ON'),GetObjectName('YOOF')))
if(E57[16+O5])and(not E57[O5])then
call EVD()
endif
endfunction
function EAD takes player p returns nothing
local integer O5=GetPlayerId(p)
if p==RT4 then
set G07=not G07
call DisplayTimedTextToForce(E8,10.,GetObjectName('Y095')+WF7(G07,GetObjectName('Y1ON'),GetObjectName('YOOF')))
if not G07 then
call DisplayTimedTextToForce(E8,10.,GetObjectName('Y070'))
endif
call DisplayTimedTextToForce(E8,10.," ")
elseif p==RU4 then
set G57=not G57
call DisplayTimedTextToForce(F8,10.,GetObjectName('Y095')+WF7(G57,GetObjectName('Y1ON'),GetObjectName('YOOF')))
if not G57 then
call DisplayTimedTextToForce(F8,10.,GetObjectName('Y070'))
endif
call DisplayTimedTextToForce(F8,10.," ")
endif
set p=null
endfunction
function EYD takes nothing returns nothing
call EAD(GetTriggerPlayer())
endfunction
function EED takes nothing returns nothing
local integer a=S2I(SubString(GetEventPlayerChatString(),10,StringLength(GetEventPlayerChatString())))
local integer D5=GetPlayerId(GetTriggerPlayer())
set Rw[D5]=Rw[D5]+1
if Rw[D5]>10 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,(GetObjectName(('n0DQ'))))
return
endif
if a<1 or a>8 then
set a=GetRandomInt(1,8)
endif
if a==1 then
call NN8(T9,5,W[GetPlayerId(GetTriggerPlayer())]+(KW4[GetPlayerId((GetTriggerPlayer()))])+"|r's never gonna give you up")
elseif a==2 then
call NN8(T9,5,W[GetPlayerId(GetTriggerPlayer())]+(KW4[GetPlayerId((GetTriggerPlayer()))])+"|r's never gonna let you down")
elseif a==3 then
call NN8(T9,5,W[GetPlayerId(GetTriggerPlayer())]+(KW4[GetPlayerId((GetTriggerPlayer()))])+"|r's never gonna run around")
elseif a==4 then
call NN8(T9,5,W[GetPlayerId(GetTriggerPlayer())]+(KW4[GetPlayerId((GetTriggerPlayer()))])+"|r's never gonna desert you")
elseif a==5 then
call NN8(T9,5,W[GetPlayerId(GetTriggerPlayer())]+(KW4[GetPlayerId((GetTriggerPlayer()))])+"|r's never gonna make you cry")
elseif a==6 then
call NN8(T9,5,W[GetPlayerId(GetTriggerPlayer())]+(KW4[GetPlayerId((GetTriggerPlayer()))])+"|r's never gonna say goodbye")
elseif a==7 then
call NN8(T9,5,W[GetPlayerId(GetTriggerPlayer())]+(KW4[GetPlayerId((GetTriggerPlayer()))])+"|r's never gonna tell a lie")
elseif a==8 then
call NN8(T9,5,W[GetPlayerId(GetTriggerPlayer())]+(KW4[GetPlayerId((GetTriggerPlayer()))])+"|r's never gonna hurt you")
endif
endfunction
function EBD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
set t=null
return false
endfunction
function EKD takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=Y7[GetPlayerId(GetTriggerPlayer())]
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Sleep\\SleepTarget.mdl",Z77,"overhead")))
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_ISSUED_ORDER)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerAddCondition(t,Condition(function EBD))
call SetUnitAnimation(Z77,"sleep")
set t=null
set Z77=null
endfunction
function END takes nothing returns nothing
call SetUnitAnimationByIndex(Y7[GetPlayerId(GetTriggerPlayer())],23)
endfunction
function Command_NoHat takes nothing returns nothing
endfunction
function EGD takes nothing returns nothing
if QT[GetPlayerId(GetTriggerPlayer())]==false then
set QT[GetPlayerId(GetTriggerPlayer())]=true
if(GetObjectName(('n0HH')))=="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 Y7[GetPlayerId(GetTriggerPlayer())]!=null then
call WI8(GetTriggerPlayer(),GetUnitPointValue(Y7[GetPlayerId(GetTriggerPlayer())]))
endif
endif
endfunction
function ECD takes nothing returns boolean
if W9==false then
return false
endif
if D7[GetPlayerId(lx)]then
return false
endif
if V==false then
return false
endif
if Y7[GetPlayerId(lx)]!=null and Y9==false then
return false
endif
if B[GetPlayerId(lx)]then
return false
endif
if Z9[GetPlayerId(lx)]and Y9==false then
return false
endif
if Y9 and eo[GetPlayerId(lx)]then
return false
endif
if(lx==RT4 and RV4!=null)or(lx==RU4 and RW4!=null)then
call DisplayTimedTextToPlayer(lx,0,V9,10,"Cannot random when manual picking.")
return false
endif
return true
endfunction
function E3D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local player p=ED8(EC8,"p")
local string E6D=EQ8(EC8,"string")
set lx=p
if ECD()then
set D7[GetPlayerId(p)]=true
if E6D=="-random int" then
call N48(p)
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-'d')
elseif E6D=="-random str" then
call ND8(p)
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-'d')
elseif E6D=="-random agi" then
call NE8(p)
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-'d')
else
call NF8(p)
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-50)
endif
else
call DisplayTimedTextToPlayer(p,0,V9,10,(GetObjectName(('n079'))))
endif
set t=null
set p=null
return false
endfunction
function DGD takes nothing returns nothing
local player j8=GetTriggerPlayer()
local trigger t
set lx=j8
if ECD()and oo[GetPlayerId(j8)]==false then
set oo[GetPlayerId(j8)]=true
call MM8(j8)
call DisplayTimedTextToPlayer(j8,0,V9,10,(GetObjectName(('n07A'))))
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,6.,false)
call TriggerAddCondition(t,Condition(function E3D))
call DA8(GetHandleId(t),"p",j8)
call DS8(GetHandleId(t),"string",StringCase(GetEventPlayerChatString(),false))
endif
set t=null
endfunction
function ELD takes nothing returns boolean
local unit N28=Y7[GetPlayerId(GetTriggerPlayer())]
if PH4 then
call ShowWarningToPlayer(GetTriggerPlayer(),(GetObjectName(('n030'))))
return false
endif
if X9==false then
if VT==false and O9==false and OL4==false and O14==false and O_4==false and P44==false and Y9==false and D9==false then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,"-repick "+(GetObjectName(('n05B'))))
endif
return false
endif
if(B[GetPlayerId(GetTriggerPlayer())])then
return false
endif
if(Y7[GetPlayerId(GetTriggerPlayer())]==null)then
return false
endif
if T4 or O9 or Y9 or SC4 then
return false
endif
if(B9)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n050'))))
return false
endif
if(GetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD)<E7)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n059'))))
return false
endif
if GetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD)<350 and X4 or F9 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n05U'))))
return false
endif
if GetUnitState(N28,UNIT_STATE_MANA)!=GetUnitState(N28,UNIT_STATE_MAX_MANA)or GetUnitState(N28,UNIT_STATE_LIFE)!=GetUnitState(N28,UNIT_STATE_MAX_LIFE)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n05J'))))
return false
endif
return true
endfunction
function E1D takes nothing returns nothing
if(IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO))then
if(GetUnitTypeId(GetEnumUnit())=='U006')then
call ExecuteFunc("QY9")
elseif GetUnitTypeId(GetEnumUnit())=='U008' or GetUnitTypeId(GetEnumUnit())=='E015' then
set IE4=GetEnumUnit()
call ExecuteFunc("RY9")
endif
call NN8(M4(GetTriggerPlayer()),10.,(GetObjectName(('n05L')))+" "+NC8(GetEnumUnit())+".")
endif
if(GetUnitTypeId(GetEnumUnit())=='n004')then
call RemoveUnit(GetEnumUnit())
endif
if(GetUnitTypeId(GetEnumUnit())=='n018')then
call RemoveUnit(GetEnumUnit())
endif
if(GetUnitTypeId(GetEnumUnit())=='n01C')then
call RemoveUnit(GetEnumUnit())
endif
if(GetUnitTypeId(GetEnumUnit())=='n01G')then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function E0D takes nothing returns nothing
local player E5D=GetTriggerPlayer()
local group QA9=OG8()
local integer N78
local integer N88
local location N98
local integer MV8
local integer T8
local integer U8
local unit E2D
local location E_D=GetRectCenter(ZD)
local location F4D=GetRectCenter(qr)
set bj_groupEnumOwningPlayer=E5D
call GroupEnumUnitsInRect(QA9,GetWorldBounds(),filterGetUnitsInRectOfPlayer)
if(IsJWPlayer(E5D))then
set N78=KC4
set N88=K34
set N98=GetRectCenter(XD)
else
set N78=K64
set N88=KL4
set N98=GetRectCenter(WD)
endif
if V4 then
if(GetRandomInt(1,2)==1)then
set N78=KC4
set N88=K34
else
set N78=K64
set N88=KL4
endif
endif
if X4 or F9 then
set E7='d'
endif
set E2D=LUnit(GetHandleId(GetTriggerPlayer()),"ChargeUnit")
if E2D!=null and GetUnitTypeId(E2D)=='e00C' then
call RemoveUnit(E2D)
endif
set E2D=null
call AdjustPlayerStateBJ(-1*E7,E5D,PLAYER_STATE_RESOURCE_GOLD)
set B[GetPlayerId(E5D)]=true
call ForGroup(QA9,function E1D)
if D7[GetPlayerId(E5D)]then
call MK8(GetUnitTypeId(Y7[GetPlayerId(E5D)]))
endif
call PA8(Y7[GetPlayerId(E5D)])
set Y7[GetPlayerId(GetTriggerPlayer())]=null
if X4 or F9 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,60,(GetObjectName(('N05Y'))))
if X4 then
set T8=KC4
set U8=KL4
endif
if IsJWPlayer(E5D)then
if F9 then
set T8=KC4
set U8=K34
call CreateUnitAtLoc(E5D,'n00C',E_D,bj_UNIT_FACING)
else
call CreateUnitAtLoc(E5D,'n00C',E_D,bj_UNIT_FACING)
call CreateUnitAtLoc(E5D,'n00C',F4D,bj_UNIT_FACING)
endif
call PanCameraToTimedLocForPlayer(E5D,E_D,0)
else
if F9 then
set T8=K64
set U8=KL4
call CreateUnitAtLoc(E5D,'n00C',F4D,bj_UNIT_FACING)
else
call CreateUnitAtLoc(E5D,'n00C',E_D,bj_UNIT_FACING)
call CreateUnitAtLoc(E5D,'n00C',F4D,bj_UNIT_FACING)
endif
call PanCameraToTimedLocForPlayer(E5D,F4D,0)
endif
loop
exitwhen T8>U8
if O[T8]==false then
call SetPlayerTechMaxAllowed(E5D,KA4[T8],1)
endif
set T8=T8+1
endloop
call OF8(QA9)
set QA9=null
call RemoveLocation(N98)
set N98=null
call RemoveLocation(E_D)
set E_D=null
call RemoveLocation(F4D)
set F4D=null
return
endif
loop
set MV8=GetRandomInt(N78,N88)
if(O[MV8]==false)then
set O[MV8]=true
set Y7[GetPlayerId(E5D)]=CreateUnitAtLoc(E5D,KA4[MV8],N98,bj_UNIT_FACING)
call MJ8(KA4[MV8])
endif
exitwhen Y7[GetPlayerId(GetTriggerPlayer())]!=null
endloop
call OF8(QA9)
set QA9=null
call RemoveLocation(N98)
set N98=null
call RemoveLocation(E_D)
set E_D=null
call RemoveLocation(F4D)
set F4D=null
endfunction
function DHD takes nothing returns nothing
if ELD()then
call E0D()
endif
endfunction
function DID takes nothing returns nothing
local player j8=GetTriggerPlayer()
local string F7D="|c006699CC"
if O_4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"League Mode"+"|r:   "+(GetObjectName(('n075'))))
endif
if P44 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Extended League"+"|r:   "+(GetObjectName(('n07B'))))
call DisplayTimedTextToPlayer(j8,0,V9,20,"                 "+(GetObjectName(('n070'))))
endif
if T4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Death Match"+"|r:    "+(GetObjectName(('n06Z'))))
call DisplayTimedTextToPlayer(j8,0,V9,20,"               "+(GetObjectName(('n06Y')))+" "+I2S(PC8(K34,KL4-K64+1))+" "+(GetObjectName(('n07C'))))
endif
if D9 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Mirror Match"+"|r:    "+(GetObjectName(('n06W'))))
endif
if X4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"All Pick"+"|r:         "+(GetObjectName(('n06V'))))
endif
if OL4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Random Draft"+"|r:         "+(GetObjectName(('n072'))))
endif
if VT then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Single Draft"+"|r:         "+(GetObjectName(('n07G'))))
endif
if V4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"All Random"+"|r:     "+(GetObjectName(('n071'))))
endif
if O9 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Vote Random"+"|r:     "+(GetObjectName(('n074'))))
endif
if W4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Team Random"+"|r:   "+(GetObjectName(('n06M'))))
endif
if Y9 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Reverse"+"|r:         "+(GetObjectName(('n073'))))
endif
if ge then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Shuffle Players"+"|r:   "+(GetObjectName(('n07H'))))
endif
if Rx then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"All Agility"+"|r:       "+(GetObjectName(('n07L'))))
endif
if bx then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"All Strength"+"|r:     "+(GetObjectName(('n07K'))))
endif
if Nx then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"All Intelligence"+"|r:  "+(GetObjectName(('n07J'))))
endif
if Jj then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Range Only"+"|r:  "+(GetObjectName(('n0G4'))))
endif
if lj then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Melee Only"+"|r:  "+(GetObjectName(('n0G5'))))
endif
if E9 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Duplicate Mode"+"|r:  "+(GetObjectName(('n07I'))))
endif
if Y4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Item Drop"+"|r:       "+(GetObjectName(('n07F'))))
endif
if G7 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"No Powerups"+"|r:    "+(GetObjectName(('n07M'))))
endif
if M7 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Super Creeps"+"|r:    "+(GetObjectName(('n07N'))))
call DisplayTimedTextToPlayer(j8,0,V9,20,"               "+(GetObjectName(('n07O'))))
endif
if F7 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Easy Mode"+"|r:      "+(GetObjectName(('n07T'))))
endif
if HO4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Same Hero"+"|r:      "+(GetObjectName(('n07U')))+" "+(KW4[GetPlayerId((V8))])+"|r"+" "+(GetObjectName(('n07W'))))
endif
if P94 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Only Mid"+"|r:      "+(GetObjectName(('n080'))))
endif
if PD4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"No Bot"+"|r:      "+(GetObjectName(('n07V'))))
endif
if PE4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"No Mid"+"|r:      "+(GetObjectName(('n07S'))))
endif
if PF4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"No Top"+"|r:      "+(GetObjectName(('n07R'))))
endif
if PG4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"No Swap"+"|r:      "+(GetObjectName(('n07X'))))
endif
if PH4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"No Repick"+"|r:      "+(GetObjectName(('n07Q'))))
endif
if PI4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Pool Mode"+"|r:      "+(GetObjectName(('n07Y'))))
endif
if PJ4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Observer Info"+"|r:      "+(GetObjectName(('n07Z'))))
endif
if bN then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Mini Heroes"+"|r:      "+(GetObjectName(('n0EC'))))
endif
if BS then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Fast Respawn"+"|r:      "+(GetObjectName(('n0DP'))))
endif
if TT4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Captains Mode"+"|r:      "+(GetObjectName(('n0ED'))))
endif
if CS then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Experimental Runes"+"|r:      "+(GetObjectName(('n0G6'))))
endif
if O14 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Captains Draft"+"|r:      "+(GetObjectName(('n0GF'))))
endif
if F9 then
call DisplayTimedTextToPlayer(j8,0,V9,20,F7D+"Normal Mode"+"|r:    "+(GetObjectName(('n07P'))))
endif
if ZT then
call DisplayTimedTextToPlayer(j8,0,V9,20,HS7+"Super Tower|r:     Towers regenerates HP")
endif
if AT then
call DisplayTimedTextToPlayer(j8,0,V9,20,HS7+"Modified Super Creeps|r: An improved version of Super Creeps")
endif
if BT then
call DisplayTimedTextToPlayer(j8,0,V9,20,HS7+"High Exp AI|r:      The AI has increased experience gain.")
endif
if LT then
call DisplayTimedTextToPlayer(j8,0,V9,20,HS7+"Normal Exp AI|r:    The AI receives the default amount of experience.")
endif
if EU then
call DisplayTimedTextToPlayer(j8,0,V9,20,HS7+"Dynamic Exp AI|r:    AI gets bonus exp rate on death or on a period without death/kill/assist. Bonus exp is reduced on kill/assist.")
endif
if CT then
call DisplayTimedTextToPlayer(j8,0,V9,20,HS7+"High Gold AI|r:      The AI has increased gold gain.")
endif
if WT then
call DisplayTimedTextToPlayer(j8,0,V9,20,HS7+"Normal Gold AI|r:   The AI receives the default amount of gold.")
endif
if FU then
call DisplayTimedTextToPlayer(j8,0,V9,20,HS7+"Dynamic Gold AI|r:    AI gets bonus gold rate on death or on a period without death/kill/assist. Bonus gold rate reduced on kill/assist.")
endif
if FX7 then
call DisplayTimedTextToPlayer(j8,0,V9,20,HS7+"Xtreme AI|r:     Increases bonuses from Dynamic Exp and Gold.")
endif
if V94==false then
call DisplayTimedTextToPlayer(j8,0,V9,20,HS7+"Cool Names|r:     The AI receives their normal name.")
endif
if VD4 then
call DisplayTimedTextToPlayer(j8,0,V9,20,HS7+"All Dagon|r:     The AI receives random level Dagon at random times.")
endif
if XT then
call DisplayTimedTextToPlayer(j8,0,V9,20,HS7+"No Necronomicon|r:  The AI will not build Necronomicon.")
endif
endfunction
function P5 takes nothing returns nothing
if((GetUnitTypeId(GetEnumUnit())=='n004')or(GetUnitTypeId(GetEnumUnit())=='o003'))then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function F8D takes unit u1,unit u2 returns nothing
local player Me=GetOwningPlayer(u1)
local player F9D=GetOwningPlayer(u2)
local unit FDD=CreateUnit(Me,'e01F',0,0,0)
local group g
local item FED
local integer FFD
if D7[GetPlayerId(Me)]then
if GetPlayerState(Me,PLAYER_STATE_RESOURCE_GOLD)<'d' then
return
endif
endif
if D7[GetPlayerId(F9D)]then
if GetPlayerState(F9D,PLAYER_STATE_RESOURCE_GOLD)<'d' then
return
endif
endif
if D7[GetPlayerId(Me)]and B[GetPlayerId(Me)]==false and O34[GetPlayerId(Me)]==0 then
set O34[GetPlayerId(Me)]=1
call SetPlayerState(Me,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Me,PLAYER_STATE_RESOURCE_GOLD)-'d')
endif
if D7[GetPlayerId(F9D)]and B[GetPlayerId(F9D)]==false and O34[GetPlayerId(F9D)]==0 then
set O34[GetPlayerId(F9D)]=1
call SetPlayerState(F9D,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(F9D,PLAYER_STATE_RESOURCE_GOLD)-'d')
endif
set FFD=WQ4[GetPlayerId(Me)]
set WQ4[GetPlayerId(Me)]=WQ4[GetPlayerId(F9D)]
set WQ4[GetPlayerId(F9D)]=FFD
call DisableTrigger(GW4)
if GetUnitAbilityLevel(u1,'A03E')>0 then
set B2=u1
set C2=u2
call ExecuteFunc("FGD")
elseif GetUnitAbilityLevel(u2,'A03E')>0 then
set B2=u2
set C2=u1
call ExecuteFunc("FGD")
endif
if GetUnitAbilityLevel(u1,'A0CY')>0 then
set B2=u1
set C2=u2
call ExecuteFunc("FHD")
elseif GetUnitAbilityLevel(u2,'A0CY')>0 then
set B2=u2
set C2=u1
call ExecuteFunc("FHD")
endif
if GetUnitAbilityLevel(u1,'A13T')>0 then
set B2=u1
set C2=u2
call ExecuteFunc("FID")
elseif GetUnitAbilityLevel(u2,'A13T')>0 then
set B2=u2
set C2=u1
call ExecuteFunc("FID")
endif
call LT7(StringHash("SwapHero|"+I2S(GetPlayerId(GetOwningPlayer(u1)))))
call LT7(StringHash("SwapHero|"+I2S(GetPlayerId(GetOwningPlayer(u2)))))
set g=OG8()
set bj_groupEnumOwningPlayer=Me
call GroupEnumUnitsInRect(g,GetWorldBounds(),filterGetUnitsInRectOfPlayer)
call ForGroup(g,function P5)
call OF8(g)
set g=OG8()
set bj_groupEnumOwningPlayer=F9D
call GroupEnumUnitsInRect(g,GetWorldBounds(),filterGetUnitsInRectOfPlayer)
call ForGroup(g,function P5)
call OF8(g)
call SetUnitOwner(u2,Me,true)
call SetUnitOwner(u1,F9D,true)
set Y7[GetPlayerId(Me)]=u2
set Y7[GetPlayerId(F9D)]=u1
if KR8(Me)then
call SetPlayerName(Me,NM8(Me))
else
call SetPlayerName(Me,NM8(Me)+" ("+NC8(Y7[GetPlayerId(Me)])+")")
endif
if KR8(F9D)then
call SetPlayerName(F9D,NM8(F9D))
else
call SetPlayerName(F9D,NM8(F9D)+" ("+NC8(Y7[GetPlayerId(F9D)])+")")
endif
call UnitAddItem(FDD,UnitItemInSlot(u2,0))
call UnitAddItem(FDD,UnitItemInSlot(u2,1))
call UnitAddItem(FDD,UnitItemInSlot(u2,2))
call UnitAddItem(FDD,UnitItemInSlot(u2,3))
call UnitAddItem(FDD,UnitItemInSlot(u2,4))
call UnitAddItem(FDD,UnitItemInSlot(u2,5))
set FED=UnitItemInSlot(u1,0)
if FED!=null then
call SetItemPlayer(FED,Me,false)
call SetItemUserData(FED,1)
call UnitAddItem(u2,FED)
endif
set FED=UnitItemInSlot(u1,1)
if FED!=null then
call SetItemPlayer(FED,Me,false)
call SetItemUserData(FED,1)
call UnitAddItem(u2,FED)
endif
set FED=UnitItemInSlot(u1,2)
if FED!=null then
call SetItemPlayer(FED,Me,false)
call SetItemUserData(FED,1)
call UnitAddItem(u2,FED)
endif
set FED=UnitItemInSlot(u1,3)
if FED!=null then
call SetItemPlayer(FED,Me,false)
call SetItemUserData(FED,1)
call UnitAddItem(u2,FED)
endif
set FED=UnitItemInSlot(u1,4)
if FED!=null then
call SetItemPlayer(FED,Me,false)
call SetItemUserData(FED,1)
call UnitAddItem(u2,FED)
endif
set FED=UnitItemInSlot(u1,5)
if FED!=null then
call SetItemPlayer(FED,Me,false)
call SetItemUserData(FED,1)
call UnitAddItem(u2,FED)
endif
set FED=UnitItemInSlot(FDD,0)
if FED!=null then
call SetItemPlayer(FED,F9D,false)
call SetItemUserData(FED,1)
call UnitAddItem(u1,FED)
endif
set FED=UnitItemInSlot(FDD,1)
if FED!=null then
call SetItemPlayer(FED,F9D,false)
call SetItemUserData(FED,1)
call UnitAddItem(u1,FED)
endif
set FED=UnitItemInSlot(FDD,2)
if FED!=null then
call SetItemPlayer(FED,F9D,false)
call SetItemUserData(FED,1)
call UnitAddItem(u1,FED)
endif
set FED=UnitItemInSlot(FDD,3)
if FED!=null then
call SetItemPlayer(FED,F9D,false)
call SetItemUserData(FED,1)
call UnitAddItem(u1,FED)
endif
set FED=UnitItemInSlot(FDD,4)
if FED!=null then
call SetItemPlayer(FED,F9D,false)
call SetItemUserData(FED,1)
call UnitAddItem(u1,FED)
endif
set FED=UnitItemInSlot(FDD,5)
if FED!=null then
call SetItemPlayer(FED,F9D,false)
call SetItemUserData(FED,1)
call UnitAddItem(u1,FED)
endif
call RemoveUnit(FDD)
call EnableTrigger(GW4)
if(IsUnitType(u1,UNIT_TYPE_MELEE_ATTACKER)or GetUnitTypeId(u1)=='H06S')and AV7(u1,BU[yazhizhiren2])!=null then
call UnitRemoveItem(u1,AV7(u1,BU[yazhizhiren2]))
elseif(IsUnitType(u1,UNIT_TYPE_RANGED_ATTACKER)or GetUnitTypeId(u1)=='H06S')and AV7(u1,BU[yazhizhiren])!=null then
call UnitRemoveItem(u1,AV7(u1,BU[yazhizhiren]))
endif
if(IsUnitType(u2,UNIT_TYPE_MELEE_ATTACKER)or GetUnitTypeId(u1)=='H06S')and AV7(u2,BU[yazhizhiren2])!=null then
call UnitRemoveItem(u1,AV7(u2,BU[yazhizhiren2]))
elseif(IsUnitType(u2,UNIT_TYPE_RANGED_ATTACKER)or GetUnitTypeId(u1)=='H06S')and AV7(u2,BU[yazhizhiren])!=null then
call UnitRemoveItem(u1,AV7(u2,BU[yazhizhiren]))
endif
if GetUnitTypeId(u1)=='H06S' and AV7(u1,BU[yazhizhiren])!=null then
call UnitRemoveItem(u1,AV7(u1,BU[yazhizhiren]))
elseif GetUnitTypeId(u1)=='H06S' and AV7(u1,BU[yazhizhiren2])!=null then
call UnitRemoveItem(u1,AV7(u1,BU[yazhizhiren2]))
endif
if GetUnitTypeId(u2)=='H06S' and AV7(u2,BU[yazhizhiren])!=null then
call UnitRemoveItem(u2,AV7(u2,BU[yazhizhiren]))
elseif GetUnitTypeId(u2)=='H06S' and AV7(u2,BU[yazhizhiren2])!=null then
call UnitRemoveItem(u2,AV7(u2,BU[yazhizhiren2]))
endif
if(IsUnitType(u1,UNIT_TYPE_MELEE_ATTACKER))and AV7(u1,BU[qiongguidun2])!=null then
call UnitRemoveItem(u1,AV7(u1,BU[qiongguidun2]))
elseif(IsUnitType(u1,UNIT_TYPE_RANGED_ATTACKER))and AV7(u1,BU[qiongguidun])!=null then
call UnitRemoveItem(u1,AV7(u1,BU[qiongguidun]))
endif
if(IsUnitType(u2,UNIT_TYPE_MELEE_ATTACKER))and AV7(u2,BU[qiongguidun2])!=null then
call UnitRemoveItem(u1,AV7(u2,BU[qiongguidun2]))
elseif(IsUnitType(u2,UNIT_TYPE_RANGED_ATTACKER))and AV7(u2,BU[qiongguidun])!=null then
call UnitRemoveItem(u1,AV7(u2,BU[qiongguidun]))
endif
call ClearSelectionForPlayer(Me)
call SelectUnitAddForPlayer(u2,Me)
call ClearSelectionForPlayer(F9D)
call SelectUnitAddForPlayer(u1,F9D)
call LT7(StringHash("SwapHero|"+I2S(GetPlayerId(Me))))
call LT7(StringHash("SwapHero|"+I2S(GetPlayerId(F9D))))
set H04=u1
call ExecuteFunc("J39")
set H04=u2
call ExecuteFunc("J39")
call WV8(Me)
call WV8(F9D)
if(GetPlayerController(F9D)==MAP_CONTROL_COMPUTER)then
call SUnit(S44,"AIHSwap|U",u1)
call ExecuteFunc("Uf")
endif
set Me=null
set F9D=null
set g=null
set FDD=null
set FED=null
endfunction
function yM takes unit u1,unit u2 returns boolean
return LBool(StringHash("SwapHero|"+I2S(GetPlayerId(GetOwningPlayer(u2)))),I2S(GetUnitTypeId(u2))+"|"+I2S(GetUnitTypeId(u1)))
endfunction
function YL takes nothing returns nothing
call LT7(StringHash("SwapHero|"+I2S(GetPlayerId(GetTriggerPlayer()))))
endfunction
function qA takes player p returns integer
local integer i=1
loop
exitwhen i>5
if G8[i]==p or N8[i]==p then
return i
endif
set i=i+1
endloop
return-1
endfunction
function YT takes unit u1,unit u2 returns boolean
call SBool(StringHash("SwapHero|"+I2S(GetPlayerId(GetOwningPlayer(u1)))),I2S(GetUnitTypeId(u1))+"|"+I2S(GetUnitTypeId(u2)),true)
if yM(u1,u2)then
call F8D(u1,u2)
else
call DisplayTimedTextToPlayer(GetOwningPlayer(u1),0,V9,30," ")
call DisplayTimedTextToPlayer(GetOwningPlayer(u1),0,V9,30,"|cff99ccffYou have requested to swap with |r"+W[GetPlayerId(GetOwningPlayer(u2))]+GetUnitName(u2)+"|r")
call DisplayTimedTextToPlayer(GetOwningPlayer(u1),0,V9,30," ")
if(GetPlayerController(GetOwningPlayer(u2))==MAP_CONTROL_USER)then
call DisplayTimedTextToPlayer(GetOwningPlayer(u2),0,V9,30," ")
call DisplayTimedTextToPlayer(GetOwningPlayer(u2),0,V9,30,"             "+W[GetPlayerId(GetOwningPlayer(u1))]+GetUnitName(u1)+"|r |cff99ccffwants to swap with you. Type|r |c00ff0303-swap "+I2S(qA(GetOwningPlayer(u1)))+"|r |cff99ccffto accept|r")
call DisplayTimedTextToPlayer(GetOwningPlayer(u2),0,V9,30," ")
else
if(GetHeroSkillPoints(u1)!=GetHeroLevel(u1))then
call DisplayTimedTextToPlayer(GetOwningPlayer(u1),0,V9,10,"
				|cff99ccffRequest to swap with |r"+W[GetPlayerId(GetOwningPlayer(u2))]+GetUnitName(u2)+"|r rejected because you used a skill point")
elseif(Bz>RD4)then
call DisplayTimedTextToPlayer(GetOwningPlayer(u1),0,V9,10,"
				|cff99ccffRequest to swap with |r"+W[GetPlayerId(GetOwningPlayer(u2))]+GetUnitName(u2)+"|r rejected because it is too late")
elseif((hG[GetPlayerId(GetOwningPlayer(u2))]>0)or(not AT7(u2)))then
call DisplayTimedTextToPlayer(GetOwningPlayer(u1),0,V9,10,"
				|cff99ccffRequest to swap with |r"+W[GetPlayerId(GetOwningPlayer(u2))]+GetUnitName(u2)+"|r rejected because it already started its item build")
elseif(not AT7(u1))then
call DisplayTimedTextToPlayer(GetOwningPlayer(u1),0,V9,10,"
				|cff99ccffRequest to swap with |r"+W[GetPlayerId(GetOwningPlayer(u2))]+GetUnitName(u2)+"|r rejected because you have an item")
else
call F8D(u1,u2)
endif
endif
endif
return false
endfunction
function YV takes nothing returns nothing
local integer i=S2I(SubString(GetEventPlayerChatString(),6,StringLength(GetEventPlayerChatString())))
if GetEventPlayerChatString()=="-swapall" then
set i=1
set H54=Y7[GetPlayerId(GetTriggerPlayer())]
loop
exitwhen i>5
if IsJWPlayer(GetTriggerPlayer())then
set I44=G8[i]
else
set I44=N8[i]
endif
set H04=Y7[GetPlayerId(I44)]
if not(H54==null or GetOwningPlayer(H54)!=GetTriggerPlayer()or H04==null or GetOwningPlayer(H04)!=I44 or I44==GetTriggerPlayer())then
if YT(H54,H04)then
return
endif
endif
set i=i+1
endloop
return
elseif i<1 or i>5 then
call ShowWarningToPlayer(GetTriggerPlayer(),"Invalid swap selection")
return
endif
set H54=Y7[GetPlayerId(GetTriggerPlayer())]
if IsJWPlayer(GetTriggerPlayer())then
set I44=G8[i]
else
set I44=N8[i]
endif
set H04=Y7[GetPlayerId(I44)]
if H54==null or GetOwningPlayer(H54)!=GetTriggerPlayer()or H04==null or GetOwningPlayer(H04)!=I44 or I44==GetTriggerPlayer()then
call ShowWarningToPlayer(GetTriggerPlayer(),"Invalid swap selection")
return
endif
call YT(H54,H04)
endfunction
function Y2 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,V9,45,"|cff99ccffSwap Hero Options:|r")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,45," ")
set i=1
loop
exitwhen i>5
set p=G8[i]
set u=Y7[GetPlayerId(p)]
if IsPlayerAlly(GetTriggerPlayer(),p)and GetTriggerPlayer()!=p and u!=null and GetOwningPlayer(u)==p then
set s=" "
if yM(Y7[GetPlayerId(GetTriggerPlayer())],u)then
set s=" |c00ff0303(Requested Swap With You)|r"
endif
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,45,W[GetPlayerId(p)]+I2S(i)+"|r"+" - "+"|cff99ccff"+GetUnitName(u)+"|r"+s)
endif
set p=N8[i]
set u=Y7[GetPlayerId(p)]
if IsPlayerAlly(GetTriggerPlayer(),p)and GetTriggerPlayer()!=p and u!=null and GetOwningPlayer(u)==p then
set s=" "
if yM(Y7[GetPlayerId(GetTriggerPlayer())],u)then
set s=" |c00ff0303(Requested Swap With You)|r"
endif
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,45,W[GetPlayerId(p)]+I2S(i)+"|r"+" - "+"|cff99ccff"+GetUnitName(u)+"|r"+s)
endif
set i=i+1
endloop
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,45," ")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,45,"|cff99ccffType|r |c00ff0303-swap #|r |cff99ccffto make a choice or -swapcancel to cancel swap requests|r")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,45," ")
endfunction
function FJD takes player VR7 returns boolean
local integer FKD=1
local integer FMD=0
loop
exitwhen FKD>5
if IsJWPlayer(VR7)then
if Y7[GetPlayerId(G8[FKD])]!=null and G8[FKD]!=VR7 and GetHeroLevel(Y7[GetPlayerId(G8[FKD])])==1 then
set FMD=FMD+1
endif
else
if Y7[GetPlayerId(N8[FKD])]!=null and N8[FKD]!=VR7 and GetHeroLevel(Y7[GetPlayerId(N8[FKD])])==1 then
set FMD=FMD+1
endif
endif
set FKD=FKD+1
endloop
if FMD>0 then
return true
else
return false
endif
endfunction
function FND takes nothing returns boolean
if PG4 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,"-swaphero "+(GetObjectName(('n088'))))
return false
endif
if D7[GetPlayerId(GetTriggerPlayer())]then
if GetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD)<'d' then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,GetObjectName('N0MT'))
return false
endif
endif
if GetUnitState(Y7[GetPlayerId(GetTriggerPlayer())],UNIT_STATE_LIFE)<1 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n08F'))))
return false
endif
if NL4 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n08G')))+" -swaphero.")
return false
endif
if FJD(GetTriggerPlayer())==false then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n08H'))))
return false
endif
return true
endfunction
function DJD takes nothing returns nothing
if FND()then
if GetEventPlayerChatString()=="-swap"or GetEventPlayerChatString()=="-swaphero"then
call Y2()
elseif GetEventPlayerChatString()=="-swapcancel"then
call YL()
else
call YV()
endif
endif
endfunction
function FOD takes nothing returns boolean
return GetSpellAbilityId()=='A0FI'
endfunction
function FPD takes integer o6,unit FQD,unit FRD returns nothing
local integer T8=1
local integer U8=GetUnitAbilityLevel(FQD,o6)
loop
exitwhen T8>U8
call SelectHeroSkill(FRD,o6)
set T8=T8+1
endloop
endfunction
function FSD takes nothing returns nothing
local integer T8
local integer U8
local unit S4
local location YG9=GetUnitLoc(GetTriggerUnit())
set S4=CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),GetUnitTypeId(GetTriggerUnit()),YG9,bj_UNIT_FACING)
call SetHeroXP(S4,GetHeroXP(GetTriggerUnit()),false)
set T8=1
set U8=GetUnitAbilityLevel(GetTriggerUnit(),'Aamk')
loop
exitwhen T8>U8
call SelectHeroSkill(bj_lastCreatedUnit,'Aamk')
set T8=T8+1
endloop
set T8=0
set U8=5
loop
exitwhen T8>U8
call UnitAddItem(S4,UnitItemInSlot(GetTriggerUnit(),T8))
set T8=T8+1
endloop
if(GetUnitTypeId(GetTriggerUnit())=='Eevi')then
call FPD('A2KZ',GetTriggerUnit(),S4)
call FPD('A0H4',GetTriggerUnit(),S4)
call FPD('A1RI',GetTriggerUnit(),S4)
call FPD('A07Q',GetTriggerUnit(),S4)
endif
if(GetUnitTypeId(GetTriggerUnit())=='U008')then
call FPD('A03D',GetTriggerUnit(),S4)
call FPD('A02G',GetTriggerUnit(),S4)
call FPD('A03E',GetTriggerUnit(),S4)
call FPD('A093',GetTriggerUnit(),S4)
endif
if(GetUnitTypeId(GetTriggerUnit())=='U007')then
call FPD('A0F9',GetTriggerUnit(),S4)
call FPD('A06Y',GetTriggerUnit(),S4)
call FPD('A01E',GetTriggerUnit(),S4)
call FPD('A028',GetTriggerUnit(),S4)
endif
if(GetUnitTypeId(GetTriggerUnit())=='Hlgr')then
call FPD('A03G',GetTriggerUnit(),S4)
call FPD('A03F',GetTriggerUnit(),S4)
call FPD('A0O3',GetTriggerUnit(),S4)
call FPD('AEim',GetTriggerUnit(),S4)
endif
if(GetUnitTypeId(GetTriggerUnit())=='Ekee')then
call FPD('A035',GetTriggerUnit(),S4)
call FPD('A06W',GetTriggerUnit(),S4)
call FPD('A06V',GetTriggerUnit(),S4)
call FPD('A21F',GetTriggerUnit(),S4)
endif
call PA8(GetTriggerUnit())
call RemoveLocation(YG9)
set YG9=null
set Y7[GetPlayerId(GetOwningPlayer(S4))]=S4
endfunction
function FTD takes nothing returns boolean
local integer FUD=GetUnitTypeId(Y7[GetPlayerId(GetTriggerPlayer())])
return(FUD=='U008' or FUD=='U007' or FUD=='Hlgr' or FUD=='Eevi' or FUD=='Ekee')and(RectContainsUnit(BD,Y7[GetPlayerId(GetTriggerPlayer())])or RectContainsUnit(LD,Y7[GetPlayerId(GetTriggerPlayer())]))
endfunction
function FVD takes nothing returns nothing
local unit N28=Y7[GetPlayerId(GetTriggerPlayer())]
call UnitAddAbility(N28,'A0FI')
call IssueImmediateOrderById(N28,852663)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,120.,"|c00ff0303"+(GetObjectName(('n08I')))+" "+NC8(GetEnumUnit())+". "+(GetObjectName(('n08J')))+"|r")
endfunction
function DKD takes nothing returns nothing
if FTD()then
call FVD()
endif
endfunction
function FWD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local integer P89=GetTriggerEvalCount(t)
local real x
local real y
if GetTriggerEventId()==EVENT_UNIT_DEATH or P89>60 then
if LState(N28,"Frozen")==false then
if IsJWPlayer(GetOwningPlayer(N28))then
set x=GetRectCenterX(QD)
set y=GetRectCenterY(QD)
else
set x=GetRectCenterX(PD)
set y=GetRectCenterY(PD)
endif
call SetUnitPosition(N28,x,y)
call PauseUnit(N28,false)
endif
call LT7(EC8)
call EA8(t)
else
call PauseUnit(N28,true)
endif
set t=null
set N28=null
return false
endfunction
function FXD takes player p returns nothing
local unit N28=Y7[GetPlayerId(p)]
local trigger t
if O18(N28)==false then
set t=CreateTrigger()
call DisplayTimedTextToPlayer(p,0,V9,30.,(GetObjectName(('n08K'))))
call UnitRemoveBuffs(N28,true,false)
call UnitRemoveAbility(N28,'Bcyc')
call UnitRemoveAbility(N28,'Bcy2')
call UnitRemoveAbility(N28,'B02J')
call UnitRemoveAbility(N28,'BUsp')
call UnitRemoveAbility(N28,'Bust')
call UnitRemoveAbility(N28,'B02F')
call PauseUnit(N28,true)
call TriggerRegisterTimerEvent(t,1.,true)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function FWD))
call SUnit(GetHandleId(t),"Hero",N28)
endif
set p=null
set N28=null
set t=null
endfunction
function FYD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local player p=ED8(EC8,"p")
call LT7(EC8)
call EA8(t)
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
call FXD(p)
endif
set t=null
return false
endfunction
function DMD takes nothing returns nothing
local player p=GetTriggerPlayer()
local unit N28=Y7[GetPlayerId(p)]
local trigger t
if O18(N28)==false then
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,3.5,false)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function FYD))
call DA8(GetHandleId(t),"p",p)
endif
set p=null
set N28=null
set t=null
endfunction
function FZD takes player p returns nothing
local unit N28=Y7[GetPlayerId(p)]
local trigger t
if O18(N28)==false then
set t=CreateTrigger()
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,W[GetPlayerId(p)]+GetPlayerName(p)+"|r is being unstuck. It will be sent to its base in 60 seconds.")
call UnitRemoveBuffs(N28,true,false)
call UnitRemoveAbility(N28,'Bcyc')
call UnitRemoveAbility(N28,'Bcy2')
call UnitRemoveAbility(N28,'B02J')
call UnitRemoveAbility(N28,'BUsp')
call UnitRemoveAbility(N28,'Bust')
call UnitRemoveAbility(N28,'B02F')
call PauseUnit(N28,true)
call TriggerRegisterTimerEvent(t,1.,true)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function FWD))
call SUnit(GetHandleId(t),"Hero",N28)
endif
set p=null
set N28=null
set t=null
endfunction
function ERD takes nothing returns nothing
local string VH=GetEventPlayerChatString()
local player pl=Z17(S2I(SubString(VH,10,StringLength(VH))))
if((pl!=null)and(KS8(pl))and(IsPlayerInForce(pl,RX4)))then
if(Y7[GetPlayerId(pl)]==null)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,W[GetPlayerId(pl)]+GetPlayerName(pl)+"|r has no Hero")
else
call FZD(pl)
endif
endif
set pl=null
endfunction
function FAD takes player p returns string
local string s=OD[GetPlayerId(p)]
if OD[GetPlayerId(p)]!="Here" then
return" |c00ff0303("+(GetObjectName(('n089')))+" at "+SubString(s,10,StringLength(s))+"|c00ff0303)|r"
endif
return" "
endfunction
function DND takes nothing returns nothing
local integer T8=1
local integer U8=5
local integer D5
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,20," ")
if(IsTZPlayer(GetTriggerPlayer()))then
loop
exitwhen T8>U8
set D5=GetPlayerId(G8[T8])
if(Y7[D5]!=null)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,20,W[D5]+(KW4[GetPlayerId((G8[T8]))])+"|r "+(GetObjectName(('n08M')))+" "+GetUnitName(Y7[D5])+" ("+(GetObjectName(('n08L')))+" "+I2S(GetUnitLevel(Y7[D5]))+")"+FAD(G8[T8]))
endif
set T8=T8+1
endloop
else
loop
exitwhen T8>U8
set D5=GetPlayerId(N8[T8])
if(Y7[D5]!=null)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,20,W[D5]+(KW4[GetPlayerId((N8[T8]))])+"|r "+(GetObjectName(('n08M')))+" "+GetUnitName(Y7[D5])+" ("+(GetObjectName(('n08L')))+" "+I2S(GetUnitLevel(Y7[D5]))+")"+FAD(N8[T8]))
endif
set T8=T8+1
endloop
endif
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,20," ")
endfunction
function FBD takes unit u returns boolean
return GetUnitTypeId(u)=='N01O' or GetUnitTypeId(u)=='N013' or GetUnitTypeId(u)=='N014' or GetUnitTypeId(u)=='N015'
endfunction
function FCD takes unit u returns unit
local integer W57=GetHandleId(GetOwningPlayer(u))
return(LUnit(W57,"MyBear"))
endfunction
function DOD takes nothing returns nothing
local unit u
local integer i=0
if AJ4 then
return
endif
if(Y7[GetPlayerId(GetTriggerPlayer())]==null)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,(GetObjectName(('n08A'))))
else
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,GetUnitName(Y7[GetPlayerId(GetTriggerPlayer())])+" "+(GetObjectName(('n08N')))+" "+I2S(R2I(.5+GetUnitMoveSpeed(Y7[GetPlayerId(GetTriggerPlayer())])+LReal(GetHandleId(Y7[GetPlayerId(GetTriggerPlayer())]),"extraSpeed"))))
if FBD(Y7[GetPlayerId(GetTriggerPlayer())])then
set u=FCD(Y7[GetPlayerId(GetTriggerPlayer())])
if u!=null then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,GetUnitName(u)+" "+(GetObjectName(('n08N')))+" "+I2S(R2I(.5+GetUnitMoveSpeed(u)+LReal(GetHandleId(u),"extraSpeed"))))
endif
endif
endif
endfunction
function DPD takes nothing returns nothing
local unit u
local integer i=0
if AJ4 then
return
endif
if(Y7[GetPlayerId(GetTriggerPlayer())]==null)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,(GetObjectName(('n08A'))))
else
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,GetUnitName(Y7[GetPlayerId(GetTriggerPlayer())])+" "+(GetObjectName(('n08N')))+" "+I2S(R2I(.5+GetUnitMoveSpeed(Y7[GetPlayerId(GetTriggerPlayer())]))))
if FBD(Y7[GetPlayerId(GetTriggerPlayer())])then
set u=FCD(Y7[GetPlayerId(GetTriggerPlayer())])
if u!=null then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,GetUnitName(u)+" "+GetObjectName('n08N')+" "+I2S(R2I(.5+GetUnitMoveSpeed(u))))
endif
endif
endif
loop
exitwhen i>16
set u=Y7[i]
if u!=null and u!=Y7[GetPlayerId(GetTriggerPlayer())]and IsUnitAlly(u,GetTriggerPlayer())then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,GetUnitName(u)+" "+GetObjectName('n08N')+" "+I2S(R2I(.5+GetUnitMoveSpeed(u))))
endif
set i=i+1
endloop
endfunction
function DQD takes nothing returns nothing
call SBool(GetHandleId(GetTriggerPlayer()),"DisableHelp",true)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n08R'))))
endfunction
function DRD takes nothing returns nothing
call SBool(GetHandleId(GetTriggerPlayer()),"DisableHelp",false)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n08O'))))
endfunction
function DSD takes nothing returns nothing
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,"  "+(GetObjectName(('n08P')))+" "+I2S(C7[GetPlayerId(GetTriggerPlayer())])+" "+(GetObjectName(('n08Q')))+" "+I2S(L7[GetPlayerId(GetTriggerPlayer())])+" "+(GetObjectName(('n08S')))+" "+I2S(MU[GetPlayerId(GetTriggerPlayer())]))
endfunction
function DTD takes nothing returns nothing
local integer x=GetPlayerId(GetTriggerPlayer())
if(GetEventPlayerChatString()=="-cson")then
set AW[x]=true
set ob[x]=true
else
set AW[x]=false
set ob[x]=false
endif
call K79()
endfunction
function F3D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer i=(LoadInteger(R8,(EC8),(34)))
local real x
local real y
if Ob[i]==false then
call FlushChildHashtable(R8,(EC8))
call EA8(t)
elseif Y7[i]!=null and O18(Y7[i])==false then
set x=GetUnitX(Y7[i])
set y=GetUnitY(Y7[i])
call PanCameraToTimedForPlayer(Player(i),x,y,0)
endif
set t=null
return false
endfunction
function EHD takes nothing returns nothing
local integer x=GetPlayerId(GetTriggerPlayer())
local trigger t
local integer EC8
local integer i
if Ob[x]==false and(GetEventPlayerChatString()=="-center" or GetEventPlayerChatString()=="-c")then
set Ob[x]=true
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.01,true)
call TriggerAddCondition(t,Condition(function F3D))
call SaveInteger(R8,(EC8),(34),(x))
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,GetObjectName('n0JW'))
elseif GetEventPlayerChatString()=="-centeroff" or GetEventPlayerChatString()=="-co" then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,GetObjectName('n0JX'))
set Ob[x]=false
endif
endfunction
function Mode_FP_Func takes nothing returns nothing
local integer i=GetPlayerId(GetLocalPlayer())
local real x
local real y
if Y7[i]!=null and IsUnitType(Y7[i],UNIT_TYPE_DEAD)==false then
set x=GetUnitX(Y7[i])
set y=GetUnitY(Y7[i])
call PanCameraToTimedForPlayer(Player(i),x,y,0)
endif
endfunction
function FPMode_Start takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimer(t)
call TriggerAddCondition(t,Condition(function Mode_FP_Func))
set t=null
endfunction
function EID takes nothing returns nothing
set Ab[GetPlayerId(GetTriggerPlayer())]=false
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,5,GetObjectName('n0JZ'))
endfunction
function EJD takes nothing returns nothing
set Ab[GetPlayerId(GetTriggerPlayer())]=true
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,5,GetObjectName('n0K0'))
endfunction
function qL takes nothing returns nothing
local integer i=1
local integer RF8
local integer YC7
loop
exitwhen i>5
set YC7=GetPlayerId(G8[i])
set RF8=R2I(TimerGetRemaining(L[YC7]))
if RF8>0 and OC4[YC7]and P74==false and U9==false then
call PlayerSetLeaderboard(G8[i],gm[YC7])
call LeaderboardDisplay(gm[YC7],true)
call LeaderboardSetLabel(gm[YC7],"  Respawn in "+I2S(RF8)+" seconds")
else
call LeaderboardDisplay(gm[YC7],false)
endif
set YC7=GetPlayerId(N8[i])
set RF8=R2I(TimerGetRemaining(L[YC7]))
if RF8>0 and OC4[YC7]and P74==false and U9==false then
call PlayerSetLeaderboard(N8[i],gm[YC7])
call LeaderboardDisplay(gm[YC7],true)
call LeaderboardSetLabel(gm[YC7],"  Respawn in "+I2S(RF8)+" seconds")
else
call LeaderboardDisplay(gm[YC7],false)
endif
set i=i+1
endloop
endfunction
function qM takes nothing returns nothing
local integer x=0
set x=x+1
set gm[GetPlayerId(G8[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(G8[x],gm[GetPlayerId(G8[x])])
call LeaderboardDisplay(gm[GetPlayerId(G8[x])],false)
call LeaderboardSetLabel(gm[GetPlayerId(G8[x])],"Respawn: ")
set gm[GetPlayerId(N8[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(N8[x],gm[GetPlayerId(N8[x])])
call LeaderboardDisplay(gm[GetPlayerId(N8[x])],false)
call LeaderboardSetLabel(gm[GetPlayerId(N8[x])],"Respawn: ")
set x=x+1
set gm[GetPlayerId(G8[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(G8[x],gm[GetPlayerId(G8[x])])
call LeaderboardDisplay(gm[GetPlayerId(G8[x])],false)
call LeaderboardSetLabel(gm[GetPlayerId(G8[x])],"Respawn: ")
set gm[GetPlayerId(N8[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(N8[x],gm[GetPlayerId(N8[x])])
call LeaderboardDisplay(gm[GetPlayerId(N8[x])],false)
call LeaderboardSetLabel(gm[GetPlayerId(N8[x])],"Respawn: ")
set x=x+1
set gm[GetPlayerId(G8[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(G8[x],gm[GetPlayerId(G8[x])])
call LeaderboardDisplay(gm[GetPlayerId(G8[x])],false)
call LeaderboardSetLabel(gm[GetPlayerId(G8[x])],"Respawn: ")
set gm[GetPlayerId(N8[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(N8[x],gm[GetPlayerId(N8[x])])
call LeaderboardDisplay(gm[GetPlayerId(N8[x])],false)
call LeaderboardSetLabel(gm[GetPlayerId(N8[x])],"Respawn: ")
set x=x+1
set gm[GetPlayerId(G8[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(G8[x],gm[GetPlayerId(G8[x])])
call LeaderboardDisplay(gm[GetPlayerId(G8[x])],false)
call LeaderboardSetLabel(gm[GetPlayerId(G8[x])],"Respawn: ")
set gm[GetPlayerId(N8[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(N8[x],gm[GetPlayerId(N8[x])])
call LeaderboardDisplay(gm[GetPlayerId(N8[x])],false)
call LeaderboardSetLabel(gm[GetPlayerId(N8[x])],"Respawn: ")
set x=x+1
set gm[GetPlayerId(G8[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(G8[x],gm[GetPlayerId(G8[x])])
call LeaderboardDisplay(gm[GetPlayerId(G8[x])],false)
call LeaderboardSetLabel(gm[GetPlayerId(G8[x])],"Respawn: ")
set gm[GetPlayerId(N8[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(N8[x],gm[GetPlayerId(N8[x])])
call LeaderboardDisplay(gm[GetPlayerId(N8[x])],false)
call LeaderboardSetLabel(gm[GetPlayerId(N8[x])],"Respawn: ")
endfunction
function DZD takes nothing returns nothing
local integer x=GetPlayerId(GetTriggerPlayer())
if GetEventPlayerChatString()=="-don" or GetEventPlayerChatString()=="-deathon" then
set OC4[x]=true
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n08W'))))
else
set OC4[x]=false
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n08X'))))
endif
endfunction
function F6D takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerAddAction(t,function qM)
call TriggerRegisterTimerEvent(t,.5,false)
set t=CreateTrigger()
call TriggerAddAction(t,function qL)
call TriggerRegisterTimerEvent(t,1.,true)
endfunction
function DXD takes nothing returns nothing
if(GetEventPlayerChatString()=="-showdeny")then
set ob[GetPlayerId(GetTriggerPlayer())]=true
else
set ob[GetPlayerId(GetTriggerPlayer())]=false
endif
endfunction
function DYD takes nothing returns nothing
call ShowWarningToPlayer(GetTriggerPlayer(),(GetObjectName(('n0HG'))))
endfunction
function FLD takes nothing returns nothing
local integer i=0
loop
exitwhen i>16
set ob[i]=true
set AW[i]=true
set i=i+1
endloop
endfunction
function DUD takes nothing returns nothing
call ForceRemovePlayer(T9,GetTriggerPlayer())
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n08U'))))
endfunction
function DVD takes nothing returns nothing
call ForceAddPlayer(T9,GetTriggerPlayer())
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n08Z'))))
endfunction
function qN takes nothing returns boolean
local integer x=GetRandomInt(1,4)
if x==1 then
set BW=bo
elseif x==2 then
set BW=Bo
elseif x==3 then
set BW=fL
elseif x==4 then
set BW=FL
endif
if cW[GetPlayerId(GetLocalPlayer())]then
call EnableWeatherEffect(bo,false)
call EnableWeatherEffect(Bo,false)
call EnableWeatherEffect(fL,false)
call EnableWeatherEffect(FL,false)
call EnableWeatherEffect(BW,true)
endif
return false
endfunction
function qo takes nothing returns nothing
local integer x=GetRandomInt(1,4)
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,300.,true)
call TriggerAddCondition(t,Condition(function qN))
set cW[GetPlayerId(G8[1])]=false
set cW[GetPlayerId(G8[2])]=false
set cW[GetPlayerId(G8[3])]=false
set cW[GetPlayerId(G8[4])]=false
set cW[GetPlayerId(G8[5])]=false
set cW[GetPlayerId(N8[1])]=false
set cW[GetPlayerId(N8[2])]=false
set cW[GetPlayerId(N8[3])]=false
set cW[GetPlayerId(N8[4])]=false
set cW[GetPlayerId(N8[5])]=false
if L8 then
set cW[GetPlayerId(KU4)]=false
set cW[GetPlayerId(KV4)]=false
endif
if x==1 then
set BW=bo
elseif x==2 then
set BW=Bo
elseif x==3 then
set BW=fL
elseif x==4 then
set BW=FL
endif
set t=null
endfunction
function DWD takes nothing returns nothing
local string F1D=StringCase(GetEventPlayerChatString(),false)
if bW then
set bW=false
call qo()
endif
if F1D=="-weather snow" and GetLocalPlayer()==GetTriggerPlayer()then
set cW[GetPlayerId(GetTriggerPlayer())]=false
call EnableWeatherEffect(bo,true)
call EnableWeatherEffect(Bo,false)
call EnableWeatherEffect(fL,false)
call EnableWeatherEffect(FL,false)
endif
if F1D=="-weather rain" and GetLocalPlayer()==GetTriggerPlayer()then
set cW[GetPlayerId(GetTriggerPlayer())]=false
call EnableWeatherEffect(bo,false)
call EnableWeatherEffect(Bo,true)
call EnableWeatherEffect(fL,false)
call EnableWeatherEffect(FL,false)
endif
if F1D=="-weather moonlight" and GetLocalPlayer()==GetTriggerPlayer()then
set cW[GetPlayerId(GetTriggerPlayer())]=false
call EnableWeatherEffect(bo,false)
call EnableWeatherEffect(Bo,false)
call EnableWeatherEffect(fL,true)
call EnableWeatherEffect(FL,false)
endif
if F1D=="-weather wind" and GetLocalPlayer()==GetTriggerPlayer()then
set cW[GetPlayerId(GetTriggerPlayer())]=false
call EnableWeatherEffect(bo,false)
call EnableWeatherEffect(Bo,false)
call EnableWeatherEffect(fL,false)
call EnableWeatherEffect(FL,true)
endif
if F1D=="-weather off" and GetLocalPlayer()==GetTriggerPlayer()then
set cW[GetPlayerId(GetTriggerPlayer())]=false
call EnableWeatherEffect(bo,false)
call EnableWeatherEffect(Bo,false)
call EnableWeatherEffect(fL,false)
call EnableWeatherEffect(FL,false)
endif
if F1D=="-weather random" then
set cW[GetPlayerId(GetTriggerPlayer())]=true
if GetLocalPlayer()==GetTriggerPlayer()then
call EnableWeatherEffect(bo,false)
call EnableWeatherEffect(Bo,false)
call EnableWeatherEffect(fL,false)
call EnableWeatherEffect(FL,false)
call EnableWeatherEffect(BW,true)
endif
endif
endfunction
function DAD takes nothing returns nothing
local integer a=S2I(SubString(GetEventPlayerChatString(),6,StringLength(GetEventPlayerChatString())))
local integer D5=GetPlayerId(GetTriggerPlayer())
set vb[D5]=vb[D5]+1
if vb[D5]>20 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,(GetObjectName(('n0DQ'))))
return
endif
if GetEventPlayerChatString()=="-rollon" or GetEventPlayerChatString()=="-rolloff" then
return
endif
if a==0 then
set a='d'
endif
if a>0 and a<2001 then
call OD8(T9,5,W[GetPlayerId(GetTriggerPlayer())]+(KW4[GetPlayerId((GetTriggerPlayer()))])+"|r "+(GetObjectName(('n05I')))+" "+I2S(GetRandomInt(1,a))+" "+(GetObjectName(('n05M')))+" "+I2S(a))
else
call ShowWarningToPlayer(GetTriggerPlayer(),(GetObjectName(('n02Y'))))
endif
endfunction
function EDD takes nothing returns nothing
local integer a
if GetRandomInt(1,2)==1 then
set a=GetRandomInt(K64,KL4)
else
set a=GetRandomInt(KC4,K34)
endif
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,(GetObjectName(('n0GS')))+" "+N68(a))
endfunction
function E7D takes nothing returns nothing
local integer a=S2I(SubString(GetEventPlayerChatString(),4,StringLength(GetEventPlayerChatString())))
if GetTriggerPlayer()!=G8[1]or a>2 or a<1 or TT4==false or TimerGetElapsed(E4)>14 or L54 then
return
endif
set D87=a
set D97=a
set L04=true
if a==1 then
call NN8(bj_FORCE_ALL_PLAYERS,15.,W[GetPlayerId(G8[1])]+(KW4[GetPlayerId((G8[1]))])+"|r "+GetObjectName('n0DS'))
else
call NN8(bj_FORCE_ALL_PLAYERS,15.,W[GetPlayerId(N8[1])]+(KW4[GetPlayerId((N8[1]))])+"|r "+GetObjectName('n0DS'))
endif
if D87==1 then
set DD7=G8[1]
set DE7=N8[1]
else
set DD7=N8[1]
set DE7=G8[1]
endif
endfunction
function D0D takes nothing returns nothing
set MT[GetPlayerId(GetTriggerPlayer())]=false
endfunction
function D5D takes nothing returns nothing
set MT[GetPlayerId(GetTriggerPlayer())]=true
endfunction
function DBD takes nothing returns nothing
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n090'))))
set ib[GetPlayerId(GetTriggerPlayer())]=true
if GetLocalPlayer()==GetTriggerPlayer()then
call SetPlayerName(G8[1],(KW4[GetPlayerId((G8[1]))]))
call SetPlayerName(G8[2],(KW4[GetPlayerId((G8[2]))]))
call SetPlayerName(G8[3],(KW4[GetPlayerId((G8[3]))]))
call SetPlayerName(G8[4],(KW4[GetPlayerId((G8[4]))]))
call SetPlayerName(G8[5],(KW4[GetPlayerId((G8[5]))]))
call SetPlayerName(N8[1],(KW4[GetPlayerId((N8[1]))]))
call SetPlayerName(N8[2],(KW4[GetPlayerId((N8[2]))]))
call SetPlayerName(N8[3],(KW4[GetPlayerId((N8[3]))]))
call SetPlayerName(N8[4],(KW4[GetPlayerId((N8[4]))]))
call SetPlayerName(N8[5],(KW4[GetPlayerId((N8[5]))]))
endif
endfunction
function DCD takes nothing returns nothing
local integer id=GetPlayerId(GetTriggerPlayer())
if CW[id]then
set CW[id]=false
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,(GetObjectName(('n08T'))))
else
set CW[id]=true
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,(GetObjectName(('n091'))))
endif
endfunction
function EFD takes nothing returns nothing
local integer id=GetPlayerId(GetTriggerPlayer())
set ab[id]=true
endfunction
function D3D takes nothing returns nothing
local integer i=1
local player p
local real F0D
loop
exitwhen i>5
set p=G8[i]
if KS8(p)then
set F0D=OT[GetPlayerId(p)]/(TimerGetElapsed(E4))*60
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,15.,W[GetPlayerId(p)]+(KW4[GetPlayerId((p))])+"|r"+" "+(GetObjectName(('n084')))+" "+R2S(F0D))
endif
set p=N8[i]
if KS8(p)then
set F0D=OT[GetPlayerId(p)]/(TimerGetElapsed(E4))*60
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,15.,W[GetPlayerId(p)]+(KW4[GetPlayerId((p))])+"|r"+" "+(GetObjectName(('n084')))+" "+R2S(F0D))
endif
set i=i+1
endloop
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,15.," ")
set p=null
endfunction
function D6D takes nothing returns nothing
call TU8(GetTriggerPlayer())
endfunction
function F5D takes nothing returns boolean
return IsCourier(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 DLD takes nothing returns nothing
local group g=OG8()
call GroupEnumUnitsInRange(g,0,0,12000,Condition(function F5D))
call OF8(g)
set g=null
endfunction
function D1D takes nothing returns nothing
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n0CV')))+" [|cffff0000E|r|cffff0000E|r|cffff0000E|r] - [|cffffcc00T|r]")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n0CU')))+" [|cffff0000E|r|cffff0000E|r|cff00ffffW|r] - [|cffffcc00D|r]")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n0CT')))+" [|cffff0000E|r|cffff0000E|r|cff0000ffQ|r] - [|cffffcc00F|r]")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n0C6')))+" [|cff0000ffQ|r|cff0000ffQ|r|cff0000ffQ|r] - [|cffffcc00Y|r]")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n0CL')))+" [|cff0000ffQ|r|cff0000ffQ|r|cff00ffffW|r] - [|cffffcc00V|r]")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n0CN')))+" [|cff0000ffQ|r|cff0000ffQ|r|cffff0000E|r] - [|cffffcc00G|r]")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n0CS')))+" [|cff00ffffW|r|cff00ffffW|r|cffff0000E|r] - [|cffffcc00Z|r]")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n0CO')))+" [|cff00ffffW|r|cff00ffffW|r|cff0000ffQ|r] - [|cffffcc00X|r]")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n0CP')))+" [|cff00ffffW|r|cff00ffffW|r|cff00ffffW|r] - [|cffffcc00C|r]")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n0CQ')))+" [|cff0000ffQ|r|cff00ffffW|r|cffff0000E|r] - [|cffffcc00B|r]")
endfunction
function F2D takes string s returns nothing
call StopMusic(true)
call PlayMusic(s)
endfunction
function D2D takes nothing returns nothing
local string s=GetEventPlayerChatString()
local integer MV8=GetRandomInt(1,UT)
if GetLocalPlayer()==GetTriggerPlayer()then
if s=="-music off" then
call StopMusic(false)
elseif s=="-music random" then
call F2D(RT[MV8])
elseif s=="-music nightelf1" then
call F2D(ZP)
elseif s=="-music nightelf2" then
call F2D(BP)
elseif s=="-music nightelf3" then
call F2D(GQ)
elseif s=="-music human1" then
call F2D(IQ)
elseif s=="-music human2" then
call F2D(JQ)
elseif s=="-music human3" then
call F2D(YQ)
elseif s=="-music orc1" then
call F2D(VP)
elseif s=="-music orc2" then
call F2D(XP)
elseif s=="-music orc3" then
call F2D(YP)
elseif s=="-music undead1" then
call F2D(QP)
elseif s=="-music undead2" then
call F2D(RP)
elseif s=="-music undead3" then
call F2D(TP)
elseif s=="-music other1" then
call F2D(GR)
elseif s=="-music other2" then
call F2D(HR)
elseif s=="-music other3" then
call F2D(IR)
elseif s=="-music other4" then
call F2D(OR)
elseif s=="-music other5" then
call F2D(XR)
elseif s=="-music other6"then
call F2D(WV4)
elseif s=="-music other7"then
call F2D(WW4)
elseif s=="-music other8"then
call F2D(WX4)
elseif s=="-music other9"then
call F2D(WY4)
elseif s=="-music special" then
call F2D(YR)
else
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n0CW')))+" ")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,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 F_D takes nothing returns boolean
set UT=UT+1
set RT[UT]=ZP
set UT=UT+1
set RT[UT]=BP
set UT=UT+1
set RT[UT]=GQ
set UT=UT+1
set RT[UT]=IQ
set UT=UT+1
set RT[UT]=JQ
set UT=UT+1
set RT[UT]=YQ
set UT=UT+1
set RT[UT]=VP
set UT=UT+1
set RT[UT]=XP
set UT=UT+1
set RT[UT]=YP
set UT=UT+1
set RT[UT]=QP
set UT=UT+1
set RT[UT]=RP
set UT=UT+1
set RT[UT]=TP
set UT=UT+1
set RT[UT]=GR
set UT=UT+1
set RT[UT]=HR
set UT=UT+1
set RT[UT]=IR
set UT=UT+1
set RT[UT]=OR
set UT=UT+1
set RT[UT]=XR
set UT=UT+1
set RT[UT]=WV4
set UT=UT+1
set RT[UT]=WW4
set UT=UT+1
set RT[UT]=WX4
set UT=UT+1
set RT[UT]=WY4
set UT=UT+1
set RT[UT]=YR
return false
endfunction
function G4D takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.01,false)
call TriggerAddCondition(t,Condition(function F_D))
endfunction
function G7D 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 G8D takes string s returns nothing
local string G9D=""
local string GDD=""
local string GED=""
local integer i=0
local integer WG8=StringLength(s)
local integer GFD=1
loop
exitwhen i>WG8
if SubString(s,i,i+1)==" " then
set GFD=GFD+1
else
if GFD==1 then
set G9D=G9D+SubString(s,i,i+1)
elseif GFD==2 then
set GDD=GDD+SubString(s,i,i+1)
else
set GED=GED+SubString(s,i,i+1)
endif
endif
set i=i+1
endloop
set bb=S2I(G9D)
set Bb=S2I(GDD)
set cb=S2I(GED)
endfunction
function D_D takes nothing returns nothing
local string GGD=SubString(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString()))
local player p=GetTriggerPlayer()
local integer r
local integer g
local integer b
set Nb[GetPlayerId(p)]=true
if GGD=="red" then
call G7D(p,255,0,0,255)
elseif GGD=="blue" then
call G7D(p,0,0,255,255)
elseif GGD=="green" then
call G7D(p,0,255,0,255)
elseif GGD=="default" then
call G7D(p,0,0,255,255)
elseif GGD=="random" then
set r=GetRandomInt(0,255)
set g=GetRandomInt(0,255)
set b=GetRandomInt(0,255)
call G7D(p,r,g,b,255)
call DisplayTimedTextToPlayer(p,0,0,5,(GetObjectName(('n0HD')))+" r="+I2S(r)+" g="+I2S(g)+" b="+I2S(b))
else
call G8D(GGD)
set r=bb
set g=Bb
set b=cb
if r>=0 and r<=255 and g>=0 and g<=255 and b>=0 and b<=255 then
call G7D(p,r,g,b,255)
endif
endif
endfunction
function E8D takes nothing returns nothing
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,15.,"This command has been temporarily disabled")
endfunction
function E9D takes nothing returns boolean
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,"Total Bonus XP/Gold: "+I2S(NA4[GetPlayerId(GetTriggerPlayer())])+"/"+I2S(NB4[GetPlayerId(GetTriggerPlayer())]))
return false
endfunction
function EMD takes nothing returns boolean
if A84>0 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,GetObjectName('n0LO')+": "+I2S(A84))
endif
return false
endfunction
function GHD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer GID=LInt(EC8,"u1Index")
local integer GJD=LInt(EC8,"u2Index")
local unit u1=KH8(GID)
local unit u2=KH8(GJD)
local real TL8=LReal(EC8,"Duration")
local lightning GKD=EI8(EC8,"Lightning")
if I2R(GetTriggerEvalCount(t))*.025>TL8 then
call DestroyLightning(GKD)
call KG8(GID)
call KG8(GJD)
call LT7(EC8)
call EA8(t)
else
call MoveLightning(GKD,true,GetUnitX(u1),GetUnitY(u1),GetUnitX(u2),GetUnitY(u2))
endif
set t=null
set u1=null
set u2=null
set GKD=null
return false
endfunction
function GMD takes string GND,unit u1,unit u2,real r,real g,real b,real a,real TL8 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 EC8=GetHandleId(t)
local lightning GKD=AddLightning(GND,true,x1,y1,x2,y2)
call SetLightningColor(GKD,r,g,b,a)
call DX8(EC8,"Lightning",GKD)
call SInt(EC8,"u1Index",KJ8(u1))
call SInt(EC8,"u2Index",KJ8(u2))
call SReal(EC8,"Duration",TL8)
call TriggerRegisterTimerEvent(t,.025,true)
call TriggerAddCondition(t,Condition(function GHD))
set t=null
set GKD=null
endfunction
function GOD takes string GPD returns nothing
local sound SL8=CreateSound(GPD,false,false,false,10,10,"")
call SetSoundVolume(SL8,0)
call StartSound(SL8)
call KillSoundWhenDone(SL8)
set SL8=null
endfunction
function GQD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local ubersplat GRD=(LoadUbersplatHandle(R8,(W57),(131)))
call DestroyUbersplat(GRD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set GRD=null
return false
endfunction
function GSD takes ubersplat GRD,real d returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SaveUbersplatHandle(R8,(W57),(131),(GRD))
call TriggerRegisterTimerEvent(t,d,false)
call TriggerAddCondition(t,Condition(function GQD))
set t=null
endfunction
function GTD takes nothing returns nothing
local real d=Z87(GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),LS4,LT4)
if d<LR4 then
set LR4=d
set LQ4=GetEnumUnit()
endif
endfunction
function GUD takes group g,real x,real y returns unit
set LR4=999999
set LQ4=null
set LS4=x
set LT4=y
call ForGroup(g,function GTD)
return LQ4
endfunction
function GVD takes integer OL8 returns nothing
local integer i=0
loop
exitwhen i>5
call SetPlayerAbilityAvailable(G8[i],OL8,false)
call SetPlayerAbilityAvailable(N8[i],OL8,false)
set i=i+1
endloop
endfunction
function GWD 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 E4D 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>Fb then
set x=GetRandomInt(1,Fb)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10,(GetObjectName(('n0E5')))+" "+I2S(x))
endif
if gb then
loop
exitwhen i>Fb
call GOD(Cb[i])
set i=i+1
endloop
set gb=false
endif
if db[x]==false then
endif
call PM8(GetTriggerPlayer(),Cb[x])
endfunction
function ESD takes nothing returns nothing
if UC7[GetPlayerId(GetTriggerPlayer())]==false then
set UC7[GetPlayerId(GetTriggerPlayer())]=true
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,15.,"Override is now on for Formless")
else
set UC7[GetPlayerId(GetTriggerPlayer())]=false
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,15.,"Override is now off for Formless")
endif
endfunction
function GXD takes nothing returns nothing
local timer t=GetExpiredTimer()
local player p=ED8(GetHandleId(t),"FormlessPlayer")
if Y7[GetPlayerId(p)]!=null and GV4 then
call ShowWarningToPlayer(p,"Already have a hero.")
else
if IsJWPlayer(p)then
call CreateUnitAtLoc(p,'H500',GetRectCenter(QD),0)
else
call CreateUnitAtLoc(p,'H500',GetRectCenter(PD),0)
endif
endif
call LT7(GetHandleId(t))
call DestroyTimer(t)
set p=null
set t=null
endfunction
function ETD takes nothing returns nothing
local player p=GetTriggerPlayer()
local timer t
if(Y7[GetPlayerId(p)]==null or GV4==false)and V and V4==false and W4==false and O9==false and T4==false and SC4==false then
call MM8(p)
call DisplayTimedTextToPlayer(p,0,V9,10,"Formless will be created for you shortly.")
set t=CreateTimer()
call DA8(GetHandleId(t),"FormlessPlayer",p)
call TimerStart(t,6,false,function GXD)
endif
set p=null
set t=null
endfunction
function GYD takes nothing returns nothing
local timer t=GetExpiredTimer()
local player p=ED8(GetHandleId(t),"BastionPlayer")
if Y7[GetPlayerId(p)]!=null and GV4 then
call ShowWarningToPlayer(p,"Already have a hero.")
else
if IsJWPlayer(p)then
call CreateUnitAtLoc(p,'H600',GetRectCenter(QD),0)
else
call CreateUnitAtLoc(p,'H600',GetRectCenter(PD),0)
endif
endif
call LT7(GetHandleId(t))
call DestroyTimer(t)
set p=null
set t=null
endfunction
function EUD takes nothing returns nothing
local player p=GetTriggerPlayer()
local timer t
if(Y7[GetPlayerId(p)]==null or GV4==false)and V and V4==false and W4==false and O9==false and T4==false and SC4==false then
call MM8(p)
call DisplayTimedTextToPlayer(p,0,V9,10,"Bastion will be created for you shortly.")
set t=CreateTimer()
call DA8(GetHandleId(t),"BastionPlayer",p)
call TimerStart(t,6,false,function GYD)
endif
set p=null
set t=null
endfunction
function JC9 takes nothing returns nothing
local unit AM7=H04
local player E5D=GetOwningPlayer(H04)
local integer Y28=GetUnitPointValue(H04)
if Y28<500 then
set AM7=null
set E5D=null
return
elseif Y28==500 then
call DisplayTimedTextToPlayer(E5D,0,V9,30.," ")
call DisplayTimedTextToPlayer(E5D,0,V9,30.,"|cffffcc00Formless is here for test purposes.")
elseif Y28==705 then
call DisplayTimedTextToPlayer(E5D,0,V9,30.," ")
call DisplayTimedTextToPlayer(E5D,0,V9,30.,"|cffffcc00You can check Precision details by typing -agi.")
call DisplayTimedTextToPlayer(E5D,0,V9,30.,"Note: Ricky's attacks in his 650 range form behave as melee.")
elseif Y28==725 then
call DisplayTimedTextToPlayer(E5D,0,V9,30.," ")
call DisplayTimedTextToPlayer(E5D,0,V9,30.,"|cffffcc00Type -oil to see a list of all Old Invoker's skills.")
call ExecuteFunc("Fun_OldInvoker_Help")
elseif Y28==730 then
call ExecuteFunc("Fun_OldMorphling_Fix")
call DisplayTimedTextToPlayer(E5D,0,V9,30.," ")
call DisplayTimedTextToPlayer(E5D,0,V9,30.,"|cffffcc00Using a 'spellstolen' Metamorphosis-based skill (like Elder Dragon Form) can cause severe glitches. You have been warned.")
elseif Y28==747 then
call ExecuteFunc("Fun_Squire_Initialize")
call DisplayTimedTextToPlayer(E5D,0,V9,30.," ")
call DisplayTimedTextToPlayer(E5D,0,V9,30.,"|cffffcc00Type -jp during the game to see Ramza's job points|r")
endif
if LBool(StringHash("HeroInit:"+I2S(GetUnitPointValue(AM7))),"Initialized")==false then
call SBool(StringHash("HeroInit:"+I2S(GetUnitPointValue(AM7))),"Initialized",true)
if Y28==500 then
set KA4[500]='H500'
set ME4[500]="ReplaceableTextures\\CommandButtons\\BTNWisp.blp"
call PH8(KA4[500],"stand")
call PD8(KA4[500],1.5,0)
set MG4[500]="Formless can improve ultimate with Aghanim's Scepter."
set MH4[500]="You can gain wrong skills with wrong effects."
set MI4[500]=""
set MJ4[500]=""
set MK4[500]=""
call ExecuteFunc("GZD")
call ExecuteFunc("GAD")
call ExecuteFunc("GBD")
elseif Y28==600 then
set KA4[600]='H600'
set ME4[600]="ReplaceableTextures\\CommandButtons\\BTNSeaTurtleRed.blp"
call PH8(KA4[600],"stand")
call PD8(KA4[600],.8,0)
set MG4[600]="Use -flux to check your stat gains now and then."
set MH4[600]="One should favor a stat-based item build, as the more stats Bastion has, the more effective his abilities become."
set MI4[600]="Use Transference on heroes that greatly benefit from stats. Illusion heroes and Geomancer are prime examples."
set MJ4[600]="Power Flux ignores damage greater than 6000."
set MK4[600]="Aghanim's Scepter greatly enhances Bastion's potential."
set JV=JV+1
set AU[JV]='I503'
set BU[JV]='I505'
set CU[JV]=0
set LU[JV]='I504'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set UH7=JV
set G14[UH7]=4200
call ExecuteFunc("Fun_Bastion_PowerFlux")
call ExecuteFunc("Fun_Bastion_SpeedFlux")
call ExecuteFunc("Fun_Bastion_MindFlux")
call ExecuteFunc("Fun_Bastion_Transference")
call ExecuteFunc("Fun_Bastion_Info")
elseif Y28==700 then
set KA4[700]='H700'
set ME4[700]="ReplaceableTextures\\CommandButtons\\BTNFelGuard.blp"
call PH8(KA4[700],"spell")
call PD8(KA4[700],1,0)
set MG4[700]="Fireblade Strike works on allies and Roshan as well."
set MH4[700]="Felguard Wrath is a good initiating skill."
set MI4[700]="Not dying, along with getting kills and assists should be one's top priorities when playing Malragor, to make the most use out of Strength and Honor."
set MJ4[700]="Your ultimate greatly improves your hero's effectiveness but doesn't last too long, so use it wisely."
set MK4[700]="One might not want to opt for damage items early, as Strength and Honor provides that already if you play well."
call ExecuteFunc("Fun_Felguard_FirebladeStrike")
call ExecuteFunc("Fun_Felguard_Wrath")
call ExecuteFunc("Fun_Felguard_StrengthAndHonor")
call ExecuteFunc("Fun_Felguard_Overflow")
elseif Y28==704 then
set KA4[704]='H704'
set ME4[704]="ReplaceableTextures\\CommandButtons\\BTNCloud.blp"
call PH8(KA4[704],"stand ready")
call PD8(KA4[704],1,0)
set MG4[704]="Blade Beam is now quite a strong nuke."
set MH4[704]="Braver can also be used to evade damage, since it grants temporary invulnerability."
set MI4[704]="Meteorain can be abused with 'stop command spam'."
set MJ4[704]="Omnislash uses your hero's attack damage as well as any orb effects and buff placers Cloud may have."
set MK4[704]="In case you're wondering, no, there's no Sephiroth."
call ExecuteFunc("Fun_Cloud_Braver")
call ExecuteFunc("Fun_Cloud_BladeBeam")
call ExecuteFunc("Fun_Cloud_Meteorain")
call ExecuteFunc("Fun_Cloud_Omnislash")
elseif Y28==705 then
set KA4[705]='H705'
set ME4[705]="ReplaceableTextures\\CommandButtons\\BTNMarine.blp"
call PH8(KA4[705],"stand")
call PD8(KA4[705],1,0)
set MG4[705]="Stim Pack can be a double-edged sword due to its health cost and damage amplification on your hero."
set MH4[705]="Heavy Artillery guarantees perma-bash if Ricky has at least 100% IAS and evasion/miss chance doesn't come into play."
set MI4[705]="Do not let the big numbers of Precision trouble you. Ricky has the lowest BAT in game, gaining Agility is easier than you might think."
set MJ4[705]="Your ultimate increases your BAT from 1.0 to 1.9."
set MK4[705]="One might want to opt for damage items like Desolator and/or Blood Sword (if -fun is activated)."
call ExecuteFunc("Fun_Ricky_StimPack")
call ExecuteFunc("Fun_Ricky_HeavyArtillery")
call ExecuteFunc("Fun_Ricky_Precision")
call ExecuteFunc("Fun_Ricky_Info")
elseif Y28==709 then
set KA4[709]='H709'
set ME4[709]="ReplaceableTextures\\CommandButtons\\BTNTornado.blp"
call PH8(KA4[709],"stand")
call PD8(KA4[709],.7,1)
set MG4[709]="Use Tempest with care, it also hurts your allies."
set MH4[709]="Tempest stacks with itself, which can be abused if your hero has Economizer or if -wtf is activated."
set MI4[709]="Frash's skills can be combined with great effectiveness."
set MJ4[709]="A very effective skill sequence is Tempest + Blink + Whirlwind + Cyclone + Eye of the Storm."
set MK4[709]="One might want to opt for tanking items and Kelen's Dagger on him."
call ExecuteFunc("Fun_Frash_Tempest")
call ExecuteFunc("Fun_Frash_Cyclone")
call ExecuteFunc("Fun_Frash_Whirlwind")
call ExecuteFunc("Fun_Frash_EyeOfTheStorm")
elseif Y28==710 then
set KA4[710]='H710'
set ME4[710]="ReplaceableTextures\\CommandButtons\\BTNHeroAvatarOfFlame.blp"
call PH8(KA4[710],"stand")
call PD8(KA4[710],1.15,1)
set MG4[710]="Flamer can be used on allies to deny them or grant them extra movespeed."
set MH4[710]="Hax is very mana-intensive, so it is advisable to skip it in the early game."
set MI4[710]="Sarcasm is quite random. Note that the silence can be purged by your own attack if unlucky."
set MJ4[710]="The lifesteal from Sarcasm is completely triggered, but is overridden by buff placers."
set MK4[710]="The stun time of your ultimate can be more valuable than its damage."
call ExecuteFunc("Fun_Offender_Flamer")
call ExecuteFunc("Fun_Offender_Hax")
call ExecuteFunc("Fun_Offender_Sarcasm")
call ExecuteFunc("Fun_Offender_Ban")
elseif Y28==711 then
set KA4[711]='H711'
set ME4[711]="ReplaceableTextures\\CommandButtons\\BTNShandris.blp"
call PH8(KA4[711],"stand")
call PD8(KA4[711],1.2,1)
set MG4[711]="Summoning your pets again will kill previously summoned pets."
set MH4[711]="Fix Boo-boo works on any unit owned by the player controlling Rawrzi."
set MI4[711]="Mitten's Meow works on any unit owned by the player controlling Rawrzi."
set MJ4[711]="Because of the previous two tips, Necronomicon is an absolutely amazing item on her."
set MK4[711]="Your ultimate is not to be underestimated, especially with Aghanim's Scepter."
set JV=JV+1
set AU[JV]='I506'
set BU[JV]='I508'
set CU[JV]=0
set LU[JV]='I507'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set UI7=JV
set G14[UI7]=4200
call ExecuteFunc("Fun_Rawrzi_Pets")
call ExecuteFunc("Fun_Rawrzi_Critters")
elseif Y28==712 then
set KA4[712]='H712'
set ME4[712]="ReplaceableTextures\\CommandButtons\\BTNGreenDragon.blp"
call PH8(KA4[712],"stand")
call PD8(KA4[712],1,0)
set MG4[712]="Puff is very mana intensive, so one might want to cover his mana needs first."
set MH4[712]="Puff is very versatile. His 6 forms provide a very flexible gameplay."
set MI4[712]="I have no more tips for this hero."
set MJ4[712]="Okay, okay, here's a tip: Spam roar."
set MK4[712]="I feel sorry for Jackie Paper."
call ExecuteFunc("Fun_Puff_Roar")
call ExecuteFunc("Fun_Puff_Breath")
call ExecuteFunc("Fun_Puff_Magic")
elseif Y28==718 then
set KA4[718]='H718'
set ME4[718]="ReplaceableTextures\\CommandButtons\\BTNHeroArchMage.blp"
call PH8(KA4[718],"stand victory")
call PD8(KA4[718],1,0)
set MG4[718]="You are going to enjoy this hero if you like short games."
set MH4[718]="You should finish the game as soon as possible with the help of your summons."
set MI4[718]="Your phoenixes get better with Aghanim's Scepter."
set MJ4[718]="Your illusion skill is the only one that scales late game."
set MK4[718]="If you're seeing this tip, you didn't end the game fast enough. Woe is you."
set JV=JV+1
set AU[JV]='I509'
set BU[JV]='I511'
set CU[JV]=0
set LU[JV]='I510'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set UJ7=JV
set G14[UJ7]=4200
elseif Y28==719 then
set KA4[719]='H719'
set ME4[719]="ReplaceableTextures\\CommandButtons\\BTNBloodElfPeasant.blp"
call PH8(KA4[719],"stand")
call PD8(KA4[719],1.5,0)
set MG4[719]="If you enjoy playing Obsidian Destroyer, you just picked the right hero."
set MH4[719]="Salad Lunch is amazing. Make sure you keep your stacked intelligence up!"
set MI4[719]="With the stacked intelligence from Salad Lunch, Brainstorm and Malicious Tampering become quite scary."
set MJ4[719]="Malicious Tampering is hard to use properly, but getting a kill with it is very satisfying in my opinion."
set MK4[719]="Your ultimate is devastating versus AI, as bots don't know how to counter it."
call ExecuteFunc("Fun_Boomerwang_Brainstorm")
call ExecuteFunc("Fun_Boomerwang_Tampering")
call ExecuteFunc("Fun_Boomerwang_SaladLunch")
call ExecuteFunc("Fun_Boomerwang_Bowel")
elseif Y28==720 then
set KA4[720]='H720'
set ME4[720]="ReplaceableTextures\\CommandButtons\\BTNCorruptedTreeOfLife.blp"
call PH8(KA4[720],"stand birth alternate work upgrade first second")
call PD8(KA4[720],.8,0)
set MG4[720]="Glare and Grill make a scary combo."
set MH4[720]="Physical Activity makes the G&G combo that much more effective."
set MI4[720]="Level 4 Physical Activity means no more shoulder dislocating."
set MJ4[720]="Your ultimate means someone is going to die every 100 seconds."
set MK4[720]="I'm out of tips. Sorry?"
call ExecuteFunc("Fun_Petey_Glare")
call ExecuteFunc("Fun_Petey_Grill")
call ExecuteFunc("Fun_Petey_PhysicalActivity")
call ExecuteFunc("Fun_Petey_BeMyFriend")
elseif Y28==721 then
set KA4[721]='H721'
set ME4[721]="ReplaceableTextures\\CommandButtons\\BTNRaider.blp"
call PH8(KA4[721],"stand")
call PD8(KA4[721],1.15,0)
set MG4[721]="Backstab is triggered when you start on attack and it works on allies. You can use this to deny creeps very easily."
set MH4[721]="Bloodrage damage bonus is affected by your base damage and Agility. Combined with Backstab, focusing on agility items can be very effective."
set MI4[721]="Run Down is great and a lot of its utility is granted from its first level."
set MJ4[721]="Drag is useful for getting an enemy hero closer to your allies."
set MK4[721]="If all else fails, Drag and teleport to your fountain."
call ExecuteFunc("Fun_Rider_RunDown")
call ExecuteFunc("Fun_Rider_Backstab")
call ExecuteFunc("Fun_Rider_Drag")
elseif Y28==722 then
set KA4[722]='H722'
set ME4[722]="ReplaceableTextures\\CommandButtons\\BTNMedivh.blp"
call PH8(KA4[722],"stand")
call PD8(KA4[722],1,0)
set MG4[722]="Lucky Stars can be abused by 'stop command spam'."
set MH4[722]="Ante Up deals pure damage, Chip Stack deals magic damage, All In deals pure damage."
set MI4[722]="A risky playstyle involves rushing Hand of Midas to bolster All In."
set MJ4[722]="Chip Stack starts to shine at late game, when enemies start saving for big items."
set MK4[722]="Always open your combo with Ante Up. The gold one gets from it really adds up."
call ExecuteFunc("Fun_Gambler_AnteUp")
call ExecuteFunc("Fun_Gambler_ChipStack")
call ExecuteFunc("Fun_Gambler_LuckyStars")
call ExecuteFunc("Fun_Gambler_AllIn")
elseif Y28==723 then
set KA4[723]='H723'
set ME4[723]="ReplaceableTextures\\CommandButtons\\BTNGhoul.blp"
call PH8(KA4[723],"victory")
call PD8(KA4[723],1.35,0)
set MG4[723]="N'aix has very low strength for a Strength hero, but very high agility. Strength DPS items like Treads and Armlet should be your priority."
set MH4[723]="He is a 'right click' hero, having only one active ability."
set MI4[723]="I really don't have much to say. He's awesome if you can farm."
set MJ4[723]="What else should I say?... Activate Rage in team fights or when fighting a hero with disables and kick some ass!"
set MK4[723]="In case it's not clear, he's only got a buff placer, not an orb effect."
elseif Y28==724 then
set KA4[724]='H724'
set ME4[724]="ReplaceableTextures\\CommandButtons\\BTNNagaSeaWitch.blp"
call PH8(KA4[724],"stand ready")
call PD8(KA4[724],1,0)
set MG4[724]="Split Shot is amazing, but one might prefer going for a ganking build with Chain Lightning and Purge first."
set MH4[724]="Mana Shield makes Medusa extremely tanky if she focuses on mana items."
set MI4[724]="With Split Shot and Mana Shield, she can absorb and deal huge amounts of damage at the same time."
set MJ4[724]="Illusions keep Split Shot."
set MK4[724]="I'm out of tips. Let them have it!"
set JV=JV+1
set AU[JV]='I512'
set BU[JV]='I514'
set CU[JV]=0
set LU[JV]='I513'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set UK7=JV
set G14[UK7]=4200
elseif Y28==725 then
set KA4[725]='H725'
set ME4[725]="ReplaceableTextures\\CommandButtons\\BTNHeroBloodElfPrince.blp"
call PH8(KA4[725],"spell")
call PD8(KA4[725],1.2,0)
set MG4[725]="So you picked Old Invoker and you're thinking 'Oh shit, so many skills, I should use -tips!'. Tough luck, I got nothing."
set MH4[725]="Seriously, you picked a tough hero to handle. I refuse to help you out, you're too pro for me."
set MI4[725]="You're probably kicking ass right now, you don't need me."
set MJ4[725]="Here's a joke; What's a red elephant in the desert? It's a red elephant!"
set MK4[725]="And what's a black elephant in the desert? It's the red one's shadow!"
set JV=JV+1
set AU[JV]='I521'
set BU[JV]='I523'
set CU[JV]=0
set LU[JV]='I522'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set UM7=JV
set G14[UM7]=4200
call ExecuteFunc("Fun_OldInvoker_QuasWexExortInvoke")
call ExecuteFunc("Fun_OldInvoker_IcyPath")
call ExecuteFunc("Fun_OldInvoker_InvokePortal")
call ExecuteFunc("Fun_OldInvoker_InvokeFrostNova")
call ExecuteFunc("Fun_OldInvoker_InvokeBetrayal")
call ExecuteFunc("Fun_OldInvoker_InvokeLevitation")
call ExecuteFunc("Fun_OldInvoker_InvokePowerWord")
call ExecuteFunc("Fun_OldInvoker_InvisibilityAura")
call ExecuteFunc("Fun_OldInvoker_InvokeShroudofFlames")
call ExecuteFunc("Fun_OldInvoker_InvokeEMP")
call ExecuteFunc("Fun_OldInvoker_InvokeSoulBlast")
call ExecuteFunc("Fun_OldInvoker_InvokeTelelightning")
call ExecuteFunc("Fun_OldInvoker_InvokeShock")
call ExecuteFunc("Fun_OldInvoker_InvokeEnergyBall")
call ExecuteFunc("Fun_OldInvoker_InvokeChaosMeteor")
call ExecuteFunc("Fun_OldInvoker_InvokeChaosMeteorBlow")
call ExecuteFunc("Fun_OldInvoker_InvokeConfuse")
call ExecuteFunc("Fun_OldInvoker_SoulReaver")
call ExecuteFunc("Fun_OldInvoker_Fireball")
call ExecuteFunc("Fun_OldInvoker_InvokeIncinerate")
call ExecuteFunc("Fun_OldInvoker_InvokeInferno")
elseif Y28==726 then
set KA4[726]='H726'
set ME4[726]="ReplaceableTextures\\CommandButtons\\BTNvengeanceincarnate.blp"
call PH8(KA4[726],"stand ready")
call PD8(KA4[726],.9,0)
set MG4[726]="Haunt kicks ass but use it wisely, its cooldown is very long."
set MH4[726]="Should you find yourself in a situation you want to escape from, there's Phase."
set MI4[726]="Dispersion can be game breaking in case you haven't realized it."
set MJ4[726]="Vengeance is crazy good during the laning phase."
set MK4[726]="Play her like you'd play the modern Spectre; like a tank-carry."
call ExecuteFunc("Fun_OldMercurial_Phase")
call ExecuteFunc("Fun_OldMercurial_Haunt")
call ExecuteFunc("Fun_OldMercurial_Dispersion")
call ExecuteFunc("Fun_OldMercurial_Vengeance")
elseif Y28==727 then
set KA4[727]='H727'
set ME4[727]="ReplaceableTextures\\CommandButtons\\BTNTornado.blp"
call PH8(KA4[727],"stand")
call PD8(KA4[727],1,0)
set MG4[727]="I wonder how this guy's name is pronounced."
set MH4[727]="Tips are not one of my strengths, are they?"
set MI4[727]="Play him like you'd play a nuker/disabler... I guess."
set MJ4[727]="Here's a joke; A neutron walks into a bar and asks 'How much for a drink?'. The barkeeper says 'For you? No charge!'."
set MK4[727]="Big Bang Theory is one of my favorite shows in case you wondered."
call ExecuteFunc("Fun_GodofWind_TornadoBlast")
call ExecuteFunc("Fun_GodofWind_TornadoBarrier")
call ExecuteFunc("Fun_GodofWind_Displace")
elseif Y28==728 then
set KA4[728]='H728'
set ME4[728]="ReplaceableTextures\\CommandButtons\\BTNSludgeCreature.blp"
call PH8(KA4[728],"stand victory")
call PD8(KA4[728],1.5,0)
set MG4[728]="Use the Mark Unit - Throw combo to attack/last hit, save Catapult for heroes."
set MH4[728]="Your skills have some synergy and are quite fun really!"
set MI4[728]="Eh, enough of that. How are you? You expect to see another witty tip eh? I knew it."
set MJ4[728]="Aaand a joke, what do you know. What's the difference between a girlfriend and a wife? 45 lbs."
set MK4[728]="And what's the difference between a boyfriend and a husband? 45 minutes."
call ExecuteFunc("Fun_Inky_MarkTarget")
call ExecuteFunc("Fun_Inky_Throw")
elseif Y28==729 then
set KA4[729]='H729'
set ME4[729]="ReplaceableTextures\\CommandButtons\\BTNSpellBreaker.blp"
call PH8(KA4[729],"stand ready")
call PD8(KA4[729],1,0)
set MG4[729]="You have a nuke, a heal, a summoning ability and a passive that silences whoever you're attacking. Hmmm."
set MH4[729]="Old Silencer is a mixed bag, I don't know what to recommend."
set MI4[729]="Joke time (hooray!); What do your boss and a Slinky have in common?"
set MJ4[729]="They're both fun to watch tumble down the stairs!"
set MK4[729]="I hope you liked it. >_>"
set JV=JV+1
set AU[JV]='I524'
set BU[JV]='I526'
set CU[JV]=0
set LU[JV]='I525'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set UN7=JV
set G14[UN7]=4200
call ExecuteFunc("Fun_OldNortrom_StarStorm")
call ExecuteFunc("Fun_OldNortrom_RainofChaos")
call ExecuteFunc("Fun_OldNortrom_Silencer")
elseif Y28==730 then
set KA4[730]='H730'
set ME4[730]="ReplaceableTextures\\CommandButtons\\BTNSeaElemental.blp"
call PH8(KA4[730],"stand")
call PD8(KA4[730],1,0)
set MG4[730]="Tidal Wave is your nuke, so max it first."
set MH4[730]="Blink boosts you both offensively and defensively, give it a high priority."
set MI4[730]="Morphing strength can help you cheat death in certain situations."
set MJ4[730]="Spellsteal is good, but keep in mind it only works for enemy skills."
set MK4[730]="Remember to turn Spellsteal off when you want to keep a stolen skill."
call ExecuteFunc("Fun_OldMorphling_Morph")
call ExecuteFunc("Fun_OldMorphling_Spellsteal")
elseif Y28==731 then
set KA4[731]='H731'
set ME4[731]="ReplaceableTextures\\CommandButtons\\BTNSatyrTrickster.blp"
call PH8(KA4[731],"stand 4")
call PD8(KA4[731],1,0)
set MG4[731]="Permanent Invisibility has unusual level requirements, but make sure you learn it when available."
set MH4[731]="Blink is awesome and should be maxed ASAP."
set MI4[731]="Critical strike skills are not that useful early on, so get it in the mid game."
set MJ4[731]="Your ultimate is crazy good, since it's not channeling."
set MK4[731]="That's the end of some lousy tips."
call ExecuteFunc("Fun_OldRikimaru_PermanentInvisibility")
elseif Y28==732 then
set KA4[732]='H732'
set ME4[732]="ReplaceableTextures\\CommandButtons\\BTNFireBrewmaster.blp"
call PH8(KA4[732],"stand")
call PD8(KA4[732],1,0)
set MG4[732]="Your delivery boys are great at earning you gold!"
set MH4[732]="Do take a nap when you need to regenerate."
set MI4[732]="Injure Knees is your right-click-and-own skill."
set MJ4[732]="Your hamster is simply amazing, level it whenever you can!"
set MK4[732]="You've reached the end of yet another series of useless tips."
call ExecuteFunc("Fun_Hamsterlord_TakeNap")
call ExecuteFunc("Fun_Hamsterlord_InjureKnees")
call ExecuteFunc("Fun_Hamsterlord_Hamster")
elseif Y28==733 then
set KA4[733]='H733'
set ME4[733]="ReplaceableTextures\\CommandButtons\\BTNSpiritWalker.blp"
call PH8(KA4[733],"stand ready")
call PD8(KA4[733],1.2,0)
set MG4[733]="Really? Tips for this guy? Take a look at his skills mate. You can't figure things out?"
set MH4[733]="Ridiculously long ensnare? Check. Ridiculously long AoE stun with a cooldown equal to its duration? Check. How can you possibly not know what to do?"
set MI4[733]="Random tidbit; Pulverize does magic damage."
set MJ4[733]="Oh yeah, as if his ensnare and stomp were not enough, there's his ultimate as well."
set MK4[733]="Most boring hero ever IMO but I guess it's useful for new players!"
elseif Y28==734 then
set KA4[734]='H734'
set ME4[734]="ReplaceableTextures\\CommandButtons\\BTNHeroDreadlord.blp"
call PH8(KA4[734],"stand")
call PD8(KA4[734],1.2,0)
set MG4[734]="Oh boy, he's not that hard to figure out, is he?"
set MH4[734]="Let's see, a nuke-slow, a towerwrecking slow, a slow aura and a speed aura. Hmmm."
set MI4[734]="Errr... yeah, not much to say. I'm actually surprised you're not bored of playing this hero."
set MJ4[734]="Run Forest! Run!"
set MK4[734]="ZEEKY BOOGY DOOG!"
call ExecuteFunc("Fun_VoidDemon_TimeVoid")
call ExecuteFunc("Fun_VoidDemon_Quake")
elseif Y28==735 then
set KA4[735]='H735'
set ME4[735]="ReplaceableTextures\\CommandButtons\\BTNRevenant.blp"
call PH8(KA4[735],"spell")
call PD8(KA4[735],1,0)
set MG4[735]="Old Razor is weak at the start of the game, so try to play defensively, also remember that chain lightning do more damage to the first target."
set MH4[735]="Old Razor is a damage dealer, so items you should buy are The Butterfly and Radiance, which is the best item you can have since it stacks with Storm Seeker doing damage over time."
set MI4[735]="Frenzy is good for fast attack, but remember it makes you take extra damage."
set MJ4[735]="Boots of travel are better than Power Threads since Unholy Fervor gives you Movement Speed."
set MK4[735]="Storm Seeker affects invisible units, so you can chase invisible heroes while thery're escaping."
call ExecuteFunc("Fun_OldRazor_StormSeeker")
elseif Y28==736 then
set KA4[736]='H736'
set ME4[736]="ReplaceableTextures\\CommandButtons\\BTNDragonHawk.blp"
call PH8(KA4[736],"stand")
call PD8(KA4[736],1,0)
set MG4[736]="Disruptor's Reflect is probably its best ability, be sure to learn it first."
set MH4[736]="Blade Mail will make you untouchable without loosing a lot of life."
set MI4[736]="While using Mind Control, try to use enemies abilites, since when theyre free they will have cooldown and no mana."
set MJ4[736]="For Disruption Aura, be sure to be near allied creeps, since they can receive enemy heroes' abilities."
set MK4[736]="With disadvantage, you can choose to increase your Strength to deal more damage to int heroes and creeps, or not increasing it, dealing more damage to Strength Heroes and Agility Heroes."
call ExecuteFunc("Fun_Disruptor_Disadvantage")
call ExecuteFunc("Fun_Disruptor_Reflect")
call ExecuteFunc("Fun_Disruptor_Reflect_Fix")
call ExecuteFunc("Fun_Disruptor_DisruptionAura")
call ExecuteFunc("Fun_Disruptor_DisruptionAura_Store")
call ExecuteFunc("Fun_Disruptor_MindControl")
elseif Y28==737 then
set KA4[737]='H737'
set ME4[737]="ReplaceableTextures\\CommandButtons\\BTNChaosSpaceOrc.blp"
call PH8(KA4[737],"stand")
call PD8(KA4[737],1,0)
set MG4[737]="Use Kill Steal to deny your allies or to take the prize of others."
set MH4[737]="Trade your items with Swindle for getting better items in exchange of lower items."
set MI4[737]="Start the battle with Lag Monster, it will stack all damage the target takes and will then stun the target and deal damage to it depending on damage taken."
set MJ4[737]="Exchange items with your allies to improve them, or sell the items you change and don't need."
set MK4[737]="High Stakes deals a powerful critical that works on units (not buildings) but sharply reduces armor. Make sure to raise your defense..."
call ExecuteFunc("Fun_Persuasive_Lagmonster")
call ExecuteFunc("Fun_Persuasive_KillSteal")
call ExecuteFunc("Fun_Persuasive_Swindle")
call ExecuteFunc("Fun_Persuasive_HighStakes")
elseif Y28==738 then
set KA4[738]='H738'
set ME4[738]="ReplaceableTextures\\CommandButtons\\BTNWindSerpent.blp"
call PH8(KA4[738],"stand")
call PD8(KA4[738],.75,0)
set MG4[738]="Osmose and Mana Rift are used to make enemy lose mana, Equilibrium is used to deal damage while you have more mana than the target, use them at a correct order and you can make the enemy loose mana and life."
set MH4[738]="Osmose stacks with Orb Effects, Diffusal Blade can be used for more mana lose."
set MI4[738]="Abandon is the key of all your abilities, it restores mana, but also removes the limits of your abilities."
set MJ4[738]="More intelligence means more mana and damage, so try to buy items that give it."
set MK4[738]="Mana Fiend is difficult to play, so if you lose this game dont worry."
call ExecuteFunc("Fun_ManaFiend_Equilibrium")
call ExecuteFunc("Fun_ManaFiend_ManaRift")
call ExecuteFunc("Fun_ManaFiend_Osmose")
call ExecuteFunc("Fun_ManaFiend_Abandon")
elseif Y28==739 then
set KA4[739]='H739'
set ME4[739]="ReplaceableTextures\\CommandButtons\\BTNArthas.blp"
call PH8(KA4[739],"stand victory")
call PD8(KA4[739],1.1,0)
set MG4[739]="Drain is a useful ability, you should learn it first."
set MH4[739]="You will need to increase your HP, since Vengeance deals damage per HP point."
set MI4[739]="Try using Faith in both you and your enemy, since its duration doubles its cooldown but be careful, enemy's abilities will also deal more more damage to you."
set MJ4[739]="Chicken is good for escaping or to make enemies weaker."
set MK4[739]="Don't wait until having 1 HP to use Vengeance, use it when having 25% HP or more."
call ExecuteFunc("Fun_Templar_Drain")
call ExecuteFunc("Fun_Templar_Faith")
call ExecuteFunc("Fun_Templar_Chicken")
call ExecuteFunc("Fun_Templar_Vengeance")
elseif Y28==740 then
set KA4[740]='H740'
set ME4[740]="ReplaceableTextures\\CommandButtons\\BTNPriest.blp"
call PH8(KA4[740],"stand")
call PD8(KA4[740],1.2,0)
set MG4[740]="Meteor Shower is good for starting, it can be used to farm or to escape."
set MH4[740]="Berserker is a powerful, but dangerous ability, use it wisely."
set MI4[740]="Use Prayer to have more stats, but also during a battle, since it refresh cooldowns."
set MJ4[740]="Magic Mirror is very useful, but don't rely on it."
set MK4[740]="Cleric's Prayer can be used to refresh items, so try to buy active items like Dagon, Guinsoo and Boots of Travel."
call ExecuteFunc("Fun_Cleric_MeteorShower")
call ExecuteFunc("Fun_Cleric_Berserk")
call ExecuteFunc("Fun_Cleric_MagicMirror")
call ExecuteFunc("Fun_Cleric_Prayer")
elseif Y28==741 then
set KA4[741]='H741'
set ME4[741]="ReplaceableTextures\\CommandButtons\\BTNAbomination.blp"
call PH8(KA4[741],"stand 3")
call PD8(KA4[741],1,0)
set MG4[741]="Necrogenesis is a useful ability, but don't learn it in first level."
set MH4[741]="Try to revive max unit amount with Stich."
set MI4[741]="Don't rely on your creeps to kill heroes."
set MJ4[741]="Buy items that will support you army, buy Vladimir, Assault, Guinsoo and Shiva's Guard."
set MK4[741]="Having Aghanims Scepter will make your carrion flies stronger and spell inmune, you can generate a larger amounts of them since them will have more mana, but they will loose 26% evasion."
set JV=JV+1
set AU[JV]='I515'
set BU[JV]='I517'
set CU[JV]=0
set LU[JV]='I516'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set UO7=JV
set G14[UO7]=4200
elseif Y28==742 then
set KA4[742]='H742'
set ME4[742]="ReplaceableTextures\\CommandButtons\\BTNHeroFarseer.blp"
call PH8(KA4[742],"spell chain lightning")
call PD8(KA4[742],1,0)
set MG4[742]="First ability you should learn is Holy Light."
set MH4[742]="Purge is useful for hunting and escaping."
set MI4[742]="Holy Persuasion will give you an army instantly."
set MJ4[742]="Buy items that will give you damage to take advantage of your critical strike but still trying to power up your army, equipment like Shiva磗, Desolator, Guinsoo and Radiance would be useful."
set MK4[742]="Chen is usually considered a support, but it is a god damage dealer, attacking with critical strike and a army to a purged enemy should kill it."
call ExecuteFunc("Fun_OldHolyKnight_HolyLight")
call ExecuteFunc("Fun_OldHolyKnight_HolyPersuasion")
elseif Y28==743 then
set KA4[743]='H743'
set ME4[743]="ReplaceableTextures\\CommandButtons\\BTNGuldan.blp"
call PH8(KA4[743],"spell")
call PD8(KA4[743],1.2,0)
set MG4[743]="Learn Flameshot first."
set MH4[743]="Use Liquid Fire to farm easily."
set MI4[743]="Enflame is a useful ability, you can put it to the nearest unit to the enemies, it will make a lot of damage to all units except itself, you shouldn't be near the unit."
set MJ4[743]=""
set MK4[743]=""
set AU[JV]='I518'
set BU[JV]='I520'
set CU[JV]=0
set LU[JV]='I519'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set UP7=JV
set G14[UP7]=4200
elseif Y28==744 then
set KA4[744]='H744'
set ME4[744]="ReplaceableTextures\\CommandButtons\\BTNTrollBatRider.blp"
call PH8(KA4[744],"stand ready")
call PD8(KA4[744],1,0)
set MG4[744]="Fly is one of the most useful abilities of Old Bat Rider, use it to enter in the battlefield, it is also useful for scaping and travel long distances."
set MH4[744]="Buy items to increase your attack speed to use Wounding Spear, but don't learn it at low levels, since it would steal low stats."
set MI4[744]="FUNGWARB is the best ability of Bat Rider, it will heal you and you won't take any damage and has a short cooldown, but it's duration is really short"
set MJ4[744]=""
set MK4[744]=""
call ExecuteFunc("Fun_OldBatRider_Fly")
call ExecuteFunc("Fun_OldBatRider_WoundingSpear")
call ExecuteFunc("Fun_OldBatRider_FUNGWARB")
elseif Y28==746 then
set KA4[746]='H746'
set ME4[746]="ReplaceableTextures\\CommandButtons\\BTNStorm.blp"
call PH8(KA4[746],"spell")
call PD8(KA4[746],1,0)
set MG4[746]="Overload is the first ability you should learn, try to use it to last hit or to attack heroes."
set MH4[746]="Electrical Rave will make you attack faster, but it will drain mana, try buying intellinge and mana regeneration items as Guinsoo , Orchid and Eul."
set MI4[746]="Barrier is useful to protect you at the start of a combat, but don't rely on it."
set MJ4[746]="Use Lightning Grapple to escape or to make enemy heroes don't escape."
set MK4[746]="To take advantage of Electrical Rave's attack speed, buy items like Mjolnir, Skadi and Buriza."
call ExecuteFunc("Fun_OldRaijin_Overload")
call ExecuteFunc("Fun_OldRaijin_LightningGrapple")
call ExecuteFunc("Fun_OldRaijin_ElectricRave")
call ExecuteFunc("Fun_OldRaijin_Death")
elseif Y28==747 then
set KA4[747]='H747'
set ME4[747]="ReplaceableTextures\\CommandButtons\\BTNMilitia.blp"
call PH8(KA4[747],"spell")
call PD8(KA4[747],1.3,0)
set MG4[747]="You earn Job Points when killing a unit or using an ability."
set MH4[747]="Be Careful for changing to a new Job, it will start with 0 Job Points."
set MI4[747]="Changing to an advanced job sometimes won't make you stronger against your enemies, sometimes leveling up jobs you currently have would be better, it all depends on your needs."
set MJ4[747]=""
set MK4[747]=""
call ExecuteFunc("Fun_Squire_Rise_Learn")
call ExecuteFunc("Fun_Squire_JobPointsCount")
call ExecuteFunc("Fun_Squire_JobSelect")
call ExecuteFunc("Fun_Squire_SubJob_Selector")
call ExecuteFunc("Fun_Squire_NextPrevPage")
call ExecuteFunc("Fun_Squire_SquireJob")
call ExecuteFunc("Fun_Squire_ChemistJob")
call ExecuteFunc("Fun_Squire_KnightJob")
call ExecuteFunc("Fun_Squire_ArcherJob")
call ExecuteFunc("Fun_Squire_WhiteMageJob")
call ExecuteFunc("Fun_Squire_BlackMageJob")
call ExecuteFunc("Fun_Squire_MonkJob")
call ExecuteFunc("Fun_Squire_ThiefJob")
call ExecuteFunc("Fun_Squire_MysticJob")
call ExecuteFunc("Fun_Squire_TimeMageJob")
call ExecuteFunc("Fun_Squire_OratorJob")
call ExecuteFunc("Fun_Squire_SummonerJob")
call ExecuteFunc("Fun_Squire_GeomancerJob")
call ExecuteFunc("Fun_Squire_DragoonJob")
call ExecuteFunc("Fun_Squire_SamuraiJob")
call ExecuteFunc("Fun_Squire_NinjaJob")
call ExecuteFunc("Fun_Squire_ArithmeticianJob")
call ExecuteFunc("Fun_Squire_DarkKnightJob")
elseif Y28==748 then
set KA4[748]='H748'
set ME4[748]="ReplaceableTextures\\CommandButtons\\BTNZombie.blp"
call PH8(KA4[748],"stand")
call PD8(KA4[748],2,0)
set MG4[748]="Raise dead is the most useful ability of Dirge, learn it first, zombies will help you to attack and when dying they will heal you."
set MH4[748]="Use Soul Rip when having several units near you, a large amount of zombies would be useful, use it to heal or to damage enemy heroes."
set MI4[748]="Dirge is an Intelligence Hero with a good amount of Strenght, buying intelligence items as Shiva's Guard and Guinsoo, Assault and Necromicon would be useful to increase your Army's power."
set MJ4[748]="Use Plague to slow and attack enemies while hunting them."
set MK4[748]="HeartStopper Aura is not useful at the start of the game, using it at higher levels with a Radiance will make you to deal more than 50 damage per second to heroes."
call ExecuteFunc("Fun_OldUndying_HeartstopperAura")
call ExecuteFunc("Fun_OldUndying_Plague")
call ExecuteFunc("Fun_OldUndying_SoulRip")
call ExecuteFunc("Fun_OldUndying_RaiseDead")
elseif Y28==900 then
set KA4[900]='H900'
set ME4[900]="ReplaceableTextures\\CommandButtons\\BTNMurgalSlave.blp"
call PH8(KA4[900],"stand work")
call PD8(KA4[900],1.25,0)
set MG4[900]="Item Forge is the first ability you should learn, it will give you free items."
set MH4[900]=""
set MI4[900]=""
set MJ4[900]=""
set MK4[900]=""
set JV=JV+1
set AU[JV]='I700'
set BU[JV]='I702'
set CU[JV]=0
set LU[JV]='I701'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set UR7=JV
set G14[UR7]=4200
call ExecuteFunc("Fun_ElDorado_ItemsInit")
call ExecuteFunc("Fun_ElDorado_SkillUse")
elseif Y28==901 then
set KA4[901]='H901'
set ME4[901]="ReplaceableTextures\\CommandButtons\\BTNSpongebob.blp"
call PH8(KA4[901],"stand spell")
call PD8(KA4[901],1.25,0)
set MG4[901]="Spongify is the key of SpongeBob's power, learn it first, but don't rely on it too much."
set MH4[901]="Take advantage of Karate Chop little range to seek your enemies and kill them."
set MI4[901]="Krabby Food is also usable in allies, but purge will remove it, so be aware."
set MJ4[901]=""
set MK4[901]=""
set JV=JV+1
set AU[JV]='I703'
set BU[JV]='I705'
set CU[JV]=0
set LU[JV]='I704'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set UQ7=JV
set G14[UQ7]=4200
call ExecuteFunc("Fun_Spongebob_KarateChop")
call ExecuteFunc("Fun_Spongebob_Spongify")
call ExecuteFunc("Fun_Spongebob_JellyfishNet")
elseif Y28==902 then
set KA4[902]='H902'
set ME4[902]="ReplaceableTextures\\CommandButtons\\BTNMammoth.blp"
call PH8(KA4[902],"stand")
call PD8(KA4[902],1,0)
call PD8('N902',1.5,'H902')
set MG4[902]=""
set MH4[902]=""
set MI4[902]=""
set MJ4[902]=""
set MK4[902]=""
call ExecuteFunc("Fun_Mampherok_DrainingSpirit")
call ExecuteFunc("Fun_Mampherok_GravekeepersServant")
call ExecuteFunc("Fun_Mampherok_OathoftheRequiem")
elseif Y28==903 then
set KA4[903]='H903'
set ME4[903]="ReplaceableTextures\\CommandButtons\\BTNTuskaarGold.blp"
call PH8(KA4[903],"stand")
call PD8(KA4[903],1.25,0)
set MG4[903]=""
set MH4[903]=""
set MI4[903]=""
set MJ4[903]=""
set MK4[903]=""
set JV=JV+1
set AU[JV]='I706'
set BU[JV]='I708'
set CU[JV]=0
set LU[JV]='I707'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set US7=JV
set G14[US7]=4200
call ExecuteFunc("Fun_Morsfang_FreezingBomb")
call ExecuteFunc("Fun_Morsfang_InvernalFreeze")
call ExecuteFunc("Fun_Morsfang_FrostSpears")
elseif Y28==904 then
set KA4[904]='H904'
set ME4[904]="ReplaceableTextures\\CommandButtons\\BTNChaosWolfRider.blp"
call PH8(KA4[904],"stand victory")
call PD8(KA4[904],1.25,0)
set MG4[904]=""
set MH4[904]=""
set MI4[904]=""
set MJ4[904]=""
set MK4[904]=""
call ExecuteFunc("Fun_Benethor_SlayerSteal_GrandSword")
call ExecuteFunc("Fun_Benethor_HermitRoar_RabidPoison")
elseif Y28==905 then
set KA4[905]='H905'
set ME4[905]="ReplaceableTextures\\CommandButtons\\BTNRiderlessKodo.blp"
call PH8(KA4[905],"spell slam")
call PD8(KA4[905],1,0)
set MG4[905]="Type -eatb to see your extra points"
set MH4[905]="Use your abilities to deny your allies and not give the last hit to enemies."
set MI4[905]=""
set MJ4[905]=""
set MK4[905]=""
call ExecuteFunc("Fun_SoulEater_Spell")
call ExecuteFunc("Fun_SoulEater_Death")
call ExecuteFunc("Fun_SoulEater_Info")
call ExecuteFunc("Fun_SoulEater_Cast")
elseif Y28==906 then
set KA4[906]='H906'
set ME4[906]="ReplaceableTextures\\CommandButtons\\BTNPeon.blp"
call PH8(KA4[906],"stand lumber")
call PD8(KA4[906],1.5,0)
set MG4[906]="Build Tower is one of the most useful abilities to creep, towers have no enough range to hit ballistas or meat wagons, protect them from them, towers also will deal low damage to heroes and their splash damage will also hit allied units."
set MH4[906]="Field Factory is useful for healing allies and gyrocopters can be used to attack and explore, since they also can see invisible units."
set MI4[906]="You should try to buy Aghanims Scepter as fast as possible, it is the best support ability in the game."
set MJ4[906]=""
set MK4[906]=""
set JV=JV+1
set AU[JV]='I709'
set BU[JV]='I711'
set CU[JV]=0
set LU[JV]='I710'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set UT7=JV
set G14[UT7]=4200
call ExecuteFunc("Fun_OrcishEngineer")
elseif true then
call DisplayTimedTextToPlayer(E5D,0,V9,30.," ")
call DisplayTimedTextToPlayer(E5D,0,V9,30.,"|cffffcc00Hero does not work!|r")
endif
endif
set AM7=null
set E5D=null
endfunction
function GCD takes nothing returns nothing
set U47=Rect(7225-500,-7475-500,7225+500,-7475+500)
set T27=true
endfunction
function G3D takes nothing returns nothing
local real P08=PL8(GetEventDamage(),GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE))
if GetTriggerEventId()==EVENT_GAME_TIMER_EXPIRED then
call LT7(GetHandleId(GetTriggeringTrigger()))
call EA8(GetTriggeringTrigger())
elseif LUnit(GetHandleId(GetTriggeringTrigger()),"Source")==GetEventDamageSource()then
call SetUnitState(GetEventDamageSource(),UNIT_STATE_LIFE,GetUnitState(GetEventDamageSource(),UNIT_STATE_LIFE)+P08*.35)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",GetEventDamageSource(),"origin"))
call LT7(GetHandleId(GetTriggeringTrigger()))
call EA8(GetTriggeringTrigger())
endif
endfunction
function G6D takes nothing returns boolean
local trigger t
if AR7(GetAttacker(),BU[U37])and not IsUnitIllusion(GetAttacker())and not IsUnitIllusion(GetTriggerUnit())and not IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)then
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call SUnit(GetHandleId(t),"Source",GetAttacker())
call TriggerRegisterTimerEvent(t,2,false)
call TriggerAddAction(t,function G3D)
set t=null
endif
return false
endfunction
function GLD takes nothing returns nothing
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl",GetEnumUnit(),"origin"))
call UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE),true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endfunction
function G1D takes nothing returns nothing
local group g
set H04=GetTriggerUnit()
call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),500,Condition(function T28))
call ForGroup(g,function GLD)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",GetTriggerUnit(),"origin"))
call UnitDamageTarget(GetTriggerUnit(),GetTriggerUnit(),GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)*.4,true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call DestroyGroup(g)
set g=null
endfunction
function G0D takes nothing returns boolean
if GetSpellAbilityId()=='A9F7'then
call G1D()
endif
return false
endfunction
function G5D takes nothing returns nothing
if GetRandomInt(1,5)==1 then
call AddLife(GetTriggerUnit(),2*GetEventDamage())
endif
endfunction
function G2D takes nothing returns boolean
local trigger t
if(GetItemTypeId(GetManipulatedItem())!=BU[U67])then
elseif(GetTriggerEventId()==EVENT_PLAYER_UNIT_USE_ITEM)then
if GetUnitTypeId(GetTriggerUnit())=='H00I' then
call BG9(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,5.,false)
call TriggerAddCondition(t,Condition(function BF9))
call SUnit(GetHandleId(t),"Hero",GetTriggerUnit())
call AddTimedBoolBuff(GetTriggerUnit(),"JustUseAegis",5)
set t=null
elseif AU7(GetTriggerUnit(),BU[U67],GetManipulatedItem())!=null then
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM then
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerAddAction(t,function G5D)
call STrig(GetHandleId(GetTriggerUnit()),"Escutcheon",t)
set t=null
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_DROP_ITEM then
call EA8(LTrig(GetHandleId(GetTriggerUnit()),"Escutcheon"))
endif
return false
endfunction
function G_D takes nothing returns nothing
local real P08=PL8(75,GetUnitState(GetTriggerUnit(),UNIT_STATE_MANA))
if GetTriggerEventId()==EVENT_GAME_TIMER_EXPIRED then
call LT7(GetHandleId(GetTriggeringTrigger()))
call EA8(GetTriggeringTrigger())
elseif LUnit(GetHandleId(GetTriggeringTrigger()),"Source")==GetEventDamageSource()then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_MANA,GetUnitState(GetTriggerUnit(),UNIT_STATE_MANA)-P08)
call UnitDamageTarget(GetEventDamageSource(),GetTriggerUnit(),P08,true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_DIVINE,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Feedback\\SpellBreakerAttack.mdl",GetTriggerUnit(),"origin"))
call LT7(GetHandleId(GetTriggeringTrigger()))
call EA8(GetTriggeringTrigger())
endif
endfunction
function H4D takes nothing returns boolean
local trigger t
if AR7(GetAttacker(),BU[U17])and not IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)then
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call SUnit(GetHandleId(t),"Source",GetAttacker())
call TriggerRegisterTimerEvent(t,2,false)
call TriggerAddAction(t,function G_D)
set t=null
endif
return false
endfunction
function H7D takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit AM7=LUnit(GetHandleId(t),"EconomizerUnit")
call SetUnitState(AM7,UNIT_STATE_MANA,LReal(GetHandleId(t),"EconomizerMana"))
call UnitResetCooldown(AM7)
call LT7(GetHandleId(t))
call DestroyTimer(t)
set AM7=null
set t=null
endfunction
function H8D takes nothing returns boolean
local timer t
if AR7(GetTriggerUnit(),BU[U27])or AR7(GetTriggerUnit(),BU[V77])then
set t=CreateTimer()
call SUnit(GetHandleId(t),"EconomizerUnit",GetTriggerUnit())
call SReal(GetHandleId(t),"EconomizerMana",GetUnitState(GetTriggerUnit(),UNIT_STATE_MANA)-1)
call TimerStart(t,0,false,function H7D)
set t=null
endif
return false
endfunction
function H9D takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>.405
endfunction
function HDD takes nothing returns nothing
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",GetEnumUnit(),"origin"))
call PauseUnit(GetEnumUnit(),true)
call SetUnitTimeScale(GetEnumUnit(),0)
endfunction
function HED takes nothing returns nothing
call PauseUnit(GetEnumUnit(),false)
call SetUnitTimeScale(GetEnumUnit(),1)
endfunction
function HFD takes nothing returns boolean
local group g
if GetSpellAbilityId()=='A9G3'then
set g=CreateGroup()
call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),1000,Condition(function H9D))
call ForGroup(g,function HDD)
call TriggerSleepAction(5)
call ForGroup(g,function HED)
call DestroyGroup(g)
set g=null
endif
return false
endfunction
function HGD takes nothing returns boolean
if(GetIssuedOrderId()==851971 or GetIssuedOrderId()==851986)and AR7(GetTriggerUnit(),BU[V77])and Z87(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetOrderPointX(),GetOrderPointY())>522then
call UnitUseItemPoint(GetTriggerUnit(),bj_lastCreatedItem,GetOrderPointX(),GetOrderPointY())
endif
return false
endfunction
function HHD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local unit AM7=LUnit(GetHandleId(t),"FireBloodWielder")
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(AM7))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0
endfunction
function HID takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local unit AM7=LUnit(GetHandleId(t),"FireBloodWielder")
call UnitDamageTarget(AM7,GetEnumUnit(),40,false,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_DIVINE,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\FireBallMissile\\FireBallMissile.mdl",GetEnumUnit(),"overhead"))
endfunction
function HJD takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local unit AM7=LUnit(GetHandleId(t),"FireBloodWielder")
local group g=CreateGroup()
call GroupEnumUnitsInRange(g,GetUnitX(AM7),GetUnitY(AM7),500.,Condition(function HHD))
call ForGroup(g,function HID)
if CountUnitsInGroup(g)>0 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",AM7,"origin"))
call SetUnitState(AM7,UNIT_STATE_LIFE,GetUnitState(AM7,UNIT_STATE_LIFE)+20*CountUnitsInGroup(g))
endif
call DestroyGroup(g)
set g=null
endfunction
function HKD takes nothing returns boolean
local trigger t
if GetItemTypeId(GetManipulatedItem())==BU[V87]then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM then
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1.,true)
call TriggerAddAction(t,function HJD)
call SUnit(GetHandleId(t),"FireBloodWielder",GetTriggerUnit())
call STrig(GetHandleId(GetManipulatedItem()),"FireBloodReverse",t)
else
set t=LTrig(GetHandleId(GetManipulatedItem()),"FireBloodReverse")
if t!=null then
call DO8(GetHandleId(GetManipulatedItem()),"FireBloodReverse")
call EA8(t)
endif
endif
set t=null
endif
return false
endfunction
function HMD takes nothing returns boolean
if GetSpellAbilityId()=='A12W' and UnitHasItemOfTypeBJ(GetTriggerUnit(),BU[V97])then
call ExecuteFunc("HND")
endif
return false
endfunction
function HOD takes nothing returns nothing
if AR7(bj_lastCreatedUnit,BU[V77])then
set bj_lastCreatedItem=CreateItem(BU[V77],0,0)
elseif AR7(bj_lastCreatedUnit,BU[U07])then
set bj_lastCreatedItem=CreateItem(BU[U07],0,0)
endif
endfunction
function HPD takes nothing returns nothing
call RemoveItem(GetSoldItem())
call ShowWarningToPlayer(GetOwningPlayer(GetBuyingUnit()),GetObjectName('n02H'))
endfunction
function HQD takes nothing returns nothing
local trigger t
set UF7=CreateUnit(Player(15),'n200',7200,-7500,270)
call SetUnitColor(UF7,ConvertPlayerColor(12))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,UF7,EVENT_UNIT_SELL_ITEM)
call TriggerAddAction(t,function HPD)
set JV=JV+1
set AU[JV]='I122'
set BU[JV]='I100'
set CU[JV]=0
set LU[JV]='I133'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNArcaniteMelee.blp"
set EV[JV]=45
set G14[JV]=15500
set U37=JV
set E54=E54+1
set EC4[E54]=sadanzhixieli
set E34[E54]=dapao
set E64[E54]=shengzheyiwu
set E04[E54]=U37
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function G6D))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function G0D))
set JV=JV+1
set AU[JV]='I123'
set BU[JV]='I101'
set CU[JV]=0
set LU[JV]='I134'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNHumanArmorUpThree.blp"
set EV[JV]=90
set G14[JV]=12700
set U67=JV
set E54=E54+1
set EC4[E54]=xianfengdun2
set E34[E54]=tiaozhantoujin
set E64[E54]=zhenhunshi
set EL4[E54]=xuejingshi
set E04[E54]=U67
set E54=E54+1
set EC4[E54]=xianfengdun
set E34[E54]=tiaozhantoujin
set E64[E54]=zhenhunshi
set EL4[E54]=xuejingshi
set E04[E54]=U67
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(t,Condition(function G2D))
set JV=JV+1
set AU[JV]='I124'
set BU[JV]='I118'
set CU[JV]=0
set LU[JV]='I135'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNImprovedBows.blp"
set EV[JV]=40
set G14[JV]=13800
set UL7=JV
set E54=E54+1
set EC4[E54]=hudie
set E34[E54]=yingjiaogong
set E64[E54]=emodaofeng
set EL4[E54]=zhenfenbaoshi
set E04[E54]=UL7
set JV=JV+1
set AU[JV]='I125'
set BU[JV]='I120'
set CU[JV]=0
set LU[JV]='I136'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNOrcMeleeUpTwo.blp"
set EV[JV]=40
set G14[JV]=12050
set U17=JV
set E54=E54+1
set EC4[E54]=shenmifazhang
set E34[E54]=sanshizhiren2
set E64[E54]=shengzheyiwu
set EL4[E54]=dajian
set E04[E54]=U17
set E54=E54+1
set EC4[E54]=shenmifazhang
set E34[E54]=sanshizhiren4
set E64[E54]=shengzheyiwu
set EL4[E54]=dajian
set E04[E54]=U17
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function H4D))
set JV=JV+1
set AU[JV]='I126'
set BU[JV]='I104'
set CU[JV]=0
set LU[JV]='I137'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNStaffOfSanctuary.blp"
set EV[JV]=30
set G14[JV]=7200
set U07=JV
set E54=E54+1
set EC4[E54]=yuanxingxie
set E34[E54]=suduzhixue
set E64[E54]=keledebishou
set EL4[E54]=keledebishou
set E04[E54]=U07
set JV=JV+1
set AU[JV]='I128'
set BU[JV]='I108'
set CU[JV]=0
set LU[JV]='I139'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNThoriumRanged.blp"
set EV[JV]=0
set G14[JV]=10300
set U_7=JV
set E54=E54+1
set EC4[E54]=liliangshoutao
set E34[E54]=jurenliliangyaodai
set E64[E54]=shirenmozhifu
set EL4[E54]=ximeisitedelveduo
set E14[E54]=molongzhixin
set E04[E54]=U_7
set E54=E54+1
set EC4[E54]=liliangshoutao
set E34[E54]=jurenliliangyaodai
set E64[E54]=shirenmozhifu
set EL4[E54]=ximeisitedelveduo
set E14[E54]=molongzhixin2
set E04[E54]=U_7
set JV=JV+1
set AU[JV]='I130'
set BU[JV]='I112'
set CU[JV]=0
set LU[JV]='I141'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNAdvancedUnholyStrength.blp"
set EV[JV]=0
set G14[JV]=10900
set U57=JV
set E54=E54+1
set EC4[E54]=minjiebianxie
set E34[E54]=jinglingpixue
set E64[E54]=huanxinzhiren
set EL4[E54]=yingjiaogong
set E14[E54]=hudie
set E04[E54]=U57
set JV=JV+1
set AU[JV]='I131'
set BU[JV]='I114'
set CU[JV]=0
set LU[JV]='I142'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNStarWand.blp"
set EV[JV]=0
set G14[JV]=9975
set U27=JV
set E54=E54+1
set EC4[E54]=zhilidoupeng
set E34[E54]=fashichangpao
set E64[E54]=molifazhang
set EL4[E54]=shenmifazhang
set E14[E54]=xieeliandao
set E04[E54]=U27
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function H8D))
set JV=JV+1
set AU[JV]='I127'
set BU[JV]='I106'
set CU[JV]=0
set LU[JV]='I138'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNOrb.blp"
set EV[JV]=45
set G14[JV]=11300
set V47=JV
set E54=E54+1
set EC4[E54]=ximeisitedelveduo
set E34[E54]=yingjiaogong
set E64[E54]=shenmifazhang
set EL4[E54]=jixianfaqiu
set E04[E54]=V47
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function HFD))
set JV=JV+1
set AU[JV]='I132'
set BU[JV]='I116'
set CU[JV]=0
set LU[JV]='I143'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNImprovedStrengthOfTheMoon.blp"
set EV[JV]=0
set G14[JV]=38375
set V77=JV
set E54=E54+1
set EC4[E54]=U07
set E34[E54]=U_7
set E64[E54]=U57
set EL4[E54]=U27
set E04[E54]=V77
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerAddCondition(t,Condition(function HGD))
set JV=JV+1
set AU[JV]='I712'
set BU[JV]='I713'
set CU[JV]=0
set LU[JV]='I714'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNCriticalStrike.blp"
set EV[JV]=0
set G14[JV]=11650
set V87=JV
set E54=E54+1
set EC4[E54]=sadanzhixieli
set E34[E54]=huiyao
set E64[E54]=huifujiezhi
set E04[E54]=V87
set E54=E54+1
set EC4[E54]=sadanzhixieli
set E34[E54]=huiyao2
set E64[E54]=huifujiezhi
set E04[E54]=V87
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_PAWN_ITEM)
call TriggerAddCondition(t,Condition(function HKD))
set JV=JV+1
set AU[JV]='I716'
set BU[JV]='I717'
set CU[JV]=0
set LU[JV]='I718'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNWindWalkOff.blp"
set EV[JV]=0
set G14[JV]=4600
set V97=JV
set E54=E54+1
set EC4[E54]=zhenshibaoshi
set E34[E54]=xiangweixie
set E64[E54]=youhunquanzhang
set EL4[E54]=linghunzhijie
set E04[E54]=V97
set E54=E54+1
set EC4[E54]=OW
set E34[E54]=xiangweixie
set E64[E54]=youhunquanzhang
set EL4[E54]=linghunzhijie
set E04[E54]=V97
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function HMD))
set T_7=true
set t=null
endfunction
function HRD takes nothing returns nothing
local integer i=1
local string s=GetEventPlayerChatString()
if T57 or V then
return
elseif s=="-fun" then
set T57=true
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60," ")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,90,"You have activated the Fun Taverns and Fun Recipe Shop.")
call GCD()
call HQD()
elseif s=="-funh" then
set T57=true
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60," ")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,90,"You have activated the Fun Taverns.")
call GCD()
elseif s=="-funi" then
set T57=true
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60," ")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,90,"You have activated the Fun Recipe Shop.")
call PauseUnit(U77,true)
call PauseUnit(U87,true)
call PauseUnit(U97,true)
call PauseUnit(UD7,true)
call PauseUnit(UE7,true)
call HQD()
elseif s=="-funt" then
set T57=true
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60," ")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,90,"You have activated the Fun Taverns for Tournament.")
call GCD()
call MJ8('H600')
call MJ8('H712')
call MJ8('H721')
call MJ8('H728')
call MJ8('H733')
call MJ8('H737')
call MJ8('H747')
else
return
endif
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,90,"This is a FOR FUN ONLY mode.")
loop
exitwhen i==6
call FogModifierStart(CreateFogModifierRadius(G8[i],FOG_OF_WAR_VISIBLE,7225,-7475,200,true,true))
call FogModifierStart(CreateFogModifierRadius(N8[i],FOG_OF_WAR_VISIBLE,7225,-7475,200,true,true))
call CreateUnit(G8[i],'n996',7225,-7475,270)
call CreateUnit(N8[i],'n996',7225,-7475,270)
set i=i+1
endloop
if E then
call FogModifierStart(CreateFogModifierRadius(Player(0),FOG_OF_WAR_VISIBLE,7225,-7475,200,true,true))
call CreateUnit(Player(0),'n00C',7225,-7475,270)
call SetPlayerState(Player(0),PLAYER_STATE_RESOURCE_GOLD,1000)
endif
call SetCameraPosition(7200,-7400)
call EA8(GetTriggeringTrigger())
endfunction
function HSD takes nothing returns nothing
local trigger t=CreateTrigger()
set U77=CreateUnit(Player(15),'n102',7300,-7800,270)
call SetUnitColor(U77,ConvertPlayerColor(6))
set U87=CreateUnit(Player(15),'n100',7400,-7450,270)
call SetUnitColor(U87,ConvertPlayerColor(0))
set U97=CreateUnit(Player(15),'n997',6950,-7450,270)
call SetUnitColor(U97,ConvertPlayerColor(4))
set UD7=CreateUnit(Player(15),'n101',7050,-7800,270)
call SetUnitColor(UD7,ConvertPlayerColor(1))
set UE7=CreateUnit(Player(15),'n275',7200,-7300,270)
call SetUnitColor(UE7,ConvertPlayerColor(8))
call TriggerRegisterPlayerChatEvent(t,V8,"-fun",false)
call TriggerAddAction(t,function HRD)
set t=null
endfunction
function HTD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local real HUD=LReal(EC8,"T_CurrentX")
local real HVD=LReal(EC8,"T_CurrentY")
local real HWD=LReal(EC8,"T_MaxX")
local real HXD=128
local real x
local real y
loop
exitwhen HUD>HWD
loop
exitwhen HVD>8192
set dW=dW+1
set x=HUD
set y=HVD
if IsPointBlighted(x,y)==false then
set DW[dW]=GetTerrainType(x,y)
set LW[dW]=GetTerrainVariance(x,y)
endif
set x=-HUD
set y=HVD
if IsPointBlighted(x,y)==false then
set fW[dW]=GetTerrainType(x,y)
set mW[dW]=GetTerrainVariance(x,y)
endif
set x=-HUD
set y=-HVD
if IsPointBlighted(x,y)==false then
set FW[dW]=GetTerrainType(x,y)
set MW[dW]=GetTerrainVariance(x,y)
endif
set x=HUD
set y=-HVD
if IsPointBlighted(x,y)==false then
set hW[dW]=GetTerrainType(x,y)
set pW[dW]=GetTerrainVariance(x,y)
endif
set HVD=HVD+HXD
endloop
set HVD=0
set HUD=HUD+HXD
endloop
set HWD=HWD+256
call SReal(EC8,"T_CurrentX",HUD*1.)
call SReal(EC8,"T_CurrentY",HVD*1.)
call SReal(EC8,"T_MaxX",HWD*1.)
if HWD>8192 then
call LT7(EC8)
call EA8(t)
endif
set t=null
return false
endfunction
function HYD takes string HZD returns boolean
if HZD=="-ma" or HZD=="-ms" or HZD=="-cs" or HZD=="-cson" or HZD=="-disablehelp" or HZD=="-enablehelp" or HZD=="-unstuck" or HZD=="-recreate" then
return true
elseif HZD=="-swaphero" or HZD=="-showmsg" or HZD=="-hidemsg" or HZD=="-showdeny" or HZD=="-hidedeny" or HZD=="-weather rain" or HZD=="-weather snow" or HZD=="-weather moonlight" or HZD=="-weather wind" or HZD=="-weather random" or HZD=="-weather off" or HZD=="-denyinfo" or HZD=="-di" or HZD=="-deathon" or HZD=="-don" or HZD=="-deathoff" or HZD=="-doff" or HZD=="-roll" or HZD=="-hideheronames" or HZD=="-hhn" or HZD=="-test" or HZD=="-mute" or HZD=="-wtf" or HZD=="-fun" or HZD=="-fleshstr" or HZD=="-fs" or HZD=="-switchon" then
return true
elseif HZD=="-override" or HZD=="-formless" then
return true
endif
return false
endfunction
function HAD takes nothing returns boolean
return not V
endfunction
function HBD takes string qQ returns nothing
if cx==""then
set cx="|c006699CC"+qQ+"|r"
else
set cx=cx+"/|c006699CC"+qQ+"|r"
endif
endfunction
function HCD takes string qQ returns nothing
if cx==""then
set cx=HS7+qQ+"|r"
else
set cx=cx+"/"+HS7+qQ+"|r"
endif
endfunction
function H3D takes string F1D,integer qs,integer qS returns string
return SubString(F1D,0,qs)+SubString(F1D,qS,StringLength(F1D))
endfunction
function H6D takes string F1D returns string
local integer XH8=StringLength(F1D)
local string qT
local string M9=""
local integer i=0
loop
exitwhen(i==XH8)
set qT=StringCase(SubString(F1D,i,i+1),false)
if not(qT==StringCase(qT,true))then
set M9=M9+qT
endif
set i=i+1
endloop
return M9
endfunction
function HLD takes nothing returns boolean
local integer i=1
local boolean b1=false
local boolean b2=false
local integer YC7=0
local item it=null
loop
exitwhen i>5
if(not b1)and GetPlayerController(G8[i])==MAP_CONTROL_USER and GetPlayerSlotState(G8[i])==PLAYER_SLOT_STATE_PLAYING then
set b1=true
set YC7=i
elseif GetPlayerController(G8[i])!=MAP_CONTROL_USER and GetPlayerSlotState(G8[i])==PLAYER_SLOT_STATE_PLAYING then
set b2=true
endif
set i=i+1
endloop
if b1 and b2 then
set YC7=GetPlayerId(G8[YC7])
set it=CreateItem('I05B',GetUnitX(KR4[YC7]),GetUnitY(KR4[YC7]))
call SetItemPlayer(it,Player(YC7),true)
call SetItemUserData(it,1)
set it=null
set YC7=1
loop
exitwhen YC7>5
call F48(IN4,GetObjectName('Y092'),G8[YC7])
set YC7=YC7+1
endloop
endif
set i=1
set b1=false
set b2=false
set YC7=0
loop
exitwhen i>5
if(not b1)and GetPlayerController(N8[i])==MAP_CONTROL_USER and GetPlayerSlotState(N8[i])==PLAYER_SLOT_STATE_PLAYING then
set b1=true
set YC7=i
elseif GetPlayerController(N8[i])!=MAP_CONTROL_USER and GetPlayerSlotState(N8[i])==PLAYER_SLOT_STATE_PLAYING then
set b2=true
endif
set i=i+1
endloop
if b1 and b2 then
set YC7=GetPlayerId(N8[YC7])
call SetItemPawnable(CreateItem('I05B',GetUnitX(KR4[YC7]),GetUnitY(KR4[YC7])),false)
set YC7=1
loop
exitwhen YC7>5
call F48(JS4,GetObjectName('Y092'),N8[YC7])
set YC7=YC7+1
endloop
endif
call DestroyTrigger(GetTriggeringTrigger())
return false
endfunction
function H1D takes string H0D,integer H5D returns nothing
local string CA9=H6D(H0D)
local string array H2D
local string array H_D
local boolean array I7D
local integer I8D
local integer I9D
local integer XH8=StringLength(CA9)
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
local boolean ST
local boolean MC
local boolean HE
local boolean NE
local boolean HG
local boolean NG
local boolean DE
local boolean IDD
local boolean NN
local boolean FM
local boolean IED
local boolean IFD
local boolean IGD
local boolean IHD
local boolean IID
local boolean Mode_BH
local boolean Mode_AB
local boolean Mode_XP
local boolean Mode_OP
local boolean Mode_WD
local boolean Mode_VM
local trigger t
if CA9=="ts" then
set CA9="apnengvmddfn"
set XH8=StringLength(CA9)
elseif CA9=="one" then
set CA9="arnengfropddwd"
set XH8=StringLength(CA9)
endif
set H2D[1]="allpick"
set H_D[1]="ap"
set H2D[2]="allrandom"
set H_D[2]="ar"
set H2D[3]="leaguemode"
set H_D[3]="lm"
set H2D[4]="mirrormatch"
set H_D[4]="mm"
set H2D[5]="teamrandom"
set H_D[5]="tr"
set H2D[6]="deathmatch"
set H_D[6]="dm"
set H2D[7]="moderandom"
set H_D[7]="mr"
set H2D[8]="shuffleplayers"
set H_D[8]="sp"
set H2D[9]="allagility"
set H_D[9]="aa"
set H2D[10]="allintelligence"
set H_D[10]="ai"
set H2D[11]="allstrength"
set H_D[11]="as"
set H2D[12]="itemdrop"
set H_D[12]="id"
set H2D[13]="nopowerups"
set H_D[13]="np"
set H2D[14]="supercreeps"
set H_D[14]="sc"
set H2D[15]="easymode"
set H_D[15]="em"
set H2D[16]="duplicatemode"
set H_D[16]="du"
set H2D[17]="samehero"
set H_D[17]="sh"
set H2D[18]="voterandom"
set H_D[18]="vr"
set H2D[19]="reverse"
set H_D[19]="rv"
set H2D[20]="randomdraft"
set H_D[20]="rd"
set H2D[21]="onlymid"
set H_D[21]="om"
set H2D[22]="extendedleague"
set H_D[22]="xl"
set H2D[23]="nomid"
set H_D[23]="nm"
set H2D[24]="notop"
set H_D[24]="nt"
set H2D[25]="nobot"
set H_D[25]="nb"
set H2D[26]="noswap"
set H_D[26]="ns"
set H2D[27]="norepick"
set H_D[27]="nr"
set H2D[28]="captainsdraft"
set H_D[28]="cd"
set H2D[29]="singledraft"
set H_D[29]="sd"
set H2D[30]="poolingmode"
set H_D[30]="pm"
set H2D[31]="observerinfo"
set H_D[31]="oi"
set H2D[32]="miniheroes"
set H_D[32]="mi"
set H2D[33]="captainsmode"
set H_D[33]="cm"
set H2D[34]="fastrespawn"
set H_D[34]="fr"
set H2D[35]="meleeonly"
set H_D[35]="mo"
set H2D[36]="rangeonly"
set H_D[36]="ro"
set H2D[37]="experimentalrunes"
set H_D[37]="er"
set H2D[38]="randomside"
set H_D[38]="rs"
set H2D[39]="switchon"
set H_D[39]="so"
set H2D[40]="zoommode"
set H_D[40]="zm"
set H2D[41]="capturepoint"
set H_D[41]="cp"
set H2D[42]="unban"
set H_D[42]="ub"
set H2D[43]="tagteam"
set H_D[43]="tt"
set I8D=43
set I9D=I8D
set I8D=I8D+1
set H2D[I8D]="supertower"
set H_D[I8D]="st"
set I8D=I8D+1
set H2D[I8D]="msupercreeps"
set H_D[I8D]="mc"
set I8D=I8D+1
set H2D[I8D]="highexp"
set H_D[I8D]="he"
set I8D=I8D+1
set H2D[I8D]="normexp"
set H_D[I8D]="ne"
set I8D=I8D+1
set H2D[I8D]="dynaexp"
set H_D[I8D]="de"
set I8D=I8D+1
set H2D[I8D]="highgold"
set H_D[I8D]="hg"
set I8D=I8D+1
set H2D[I8D]="normgold"
set H_D[I8D]="ng"
set I8D=I8D+1
set H2D[I8D]="dynagold"
set H_D[I8D]="dg"
set I8D=I8D+1
set H2D[I8D]="nonecronomicon"
set H_D[I8D]="nn"
set I8D=I8D+1
set H2D[I8D]="formlessmode"
set H_D[I8D]="fm"
set I8D=I8D+1
set H2D[I8D]="coolnames"
set H_D[I8D]="cn"
set I8D=I8D+1
set H2D[I8D]="alldagons"
set H_D[I8D]="ad"
set I8D=I8D+1
set H2D[I8D]="beginnermode"
set H_D[I8D]="bm"
set I8D=I8D+1
set H2D[I8D]="advancedmode"
set H_D[I8D]="am"
set I8D=I8D+1
set H2D[I8D]="xtrememode"
set H_D[I8D]="xm"
set I8D=I8D+1
set H2D[I8D]="customgame"
set H_D[I8D]="cg"
set I8D=I8D+1
set H2D[I8D]="revealmap"
set H_D[I8D]="rm"
set I8D=I8D+1
set H2D[I8D]="nodeath"
set H_D[I8D]="nd"
set I8D=I8D+1
set H2D[I8D]="showachievements"
set H_D[I8D]="sa"
set I8D=I8D+1
set H2D[I8D]="bigheroes"
set H_D[I8D]="bh"
set I8D=I8D+1
set H2D[I8D]="achievebattle"
set H_D[I8D]="ab"
set I8D=I8D+1
set H2D[I8D]="extremefirstperson"
set H_D[I8D]="xp"
set I8D=I8D+1
set H2D[I8D]="firstperson"
set H_D[I8D]="fp"
set I8D=I8D+1
set H2D[I8D]="onepiece"
set H_D[I8D]="op"
set I8D=I8D+1
set H2D[I8D]="worlddrop"
set H_D[I8D]="wd"
set I8D=I8D+1
set H2D[I8D]="denybalance"
set H_D[I8D]="db"
set I8D=I8D+1
set H2D[I8D]="damagedisplay"
set H_D[I8D]="dd"
set I8D=I8D+1
set H2D[I8D]="viewmap"
set H_D[I8D]="vm"
set I8D=I8D+1
set H2D[I8D]="fastneutral"
set H_D[I8D]="fn"
set I8D=I8D+1
set H2D[I8D]="cheatcomputer"
set H_D[I8D]="cc"
set x=-1
loop
exitwhen x==XH8-1
set x=x+1
set y=x
loop
exitwhen y==XH8
set y=y+1
set z=1
loop
exitwhen z>I8D
if H2D[z]==SubString(CA9,x,y)then
set I7D[z]=true
set z=I8D+1
set CA9=H3D(CA9,x,y)
set x=-1
set XH8=StringLength(CA9)
set y=XH8
else
set z=z+1
endif
endloop
endloop
endloop
set x=-1
loop
exitwhen x==XH8-1
set x=x+1
set y=x
loop
exitwhen y==XH8
set y=y+1
set z=1
loop
exitwhen z>I8D
if H_D[z]==SubString(CA9,x,y)then
set I7D[z]=true
if(z<=I9D)then
set vY=false
endif
set z=I8D+1
set CA9=H3D(CA9,x,y)
set x=-1
set XH8=StringLength(CA9)
set y=XH8
else
set z=z+1
endif
endloop
endloop
endloop
set AP=I7D[1]
set AR=I7D[2]
set LM=I7D[3]
set MM=I7D[4]
set TR=I7D[5]
set DM=I7D[6]
set MR=I7D[7]
set SP=I7D[8]
set AA=I7D[9]
set AI=I7D[10]
set AS=I7D[11]
set ID=I7D[12]
set NP=I7D[13]
set SC=I7D[14]
set EM=I7D[15]
set DU=I7D[16]
set SH=I7D[17]
set VR=I7D[18]
set RV=I7D[19]
set RD=I7D[20]
set OM=I7D[21]
set XL=I7D[22]
set NM=I7D[23]
set NT=I7D[24]
set NB=I7D[25]
set NS=I7D[26]
set NR=I7D[27]
set CD=I7D[28]
set SD=I7D[29]
set PM=I7D[30]
set OI=I7D[31]
set MI=I7D[32]
set CM=I7D[33]
set FR=I7D[34]
set MO=I7D[35]
set RO=I7D[36]
set ER=I7D[37]
set RS=I7D[38]
set SO=I7D[39]
set ZM=I7D[40]
set CP=I7D[41]
set UB=I7D[42]
set TT=I7D[43]
set ST=I7D[I9D+1]
set MC=I7D[I9D+2]
set HE=I7D[I9D+3]
set NE=I7D[I9D+4]
set DE=I7D[I9D+5]
set HG=I7D[I9D+6]
set NG=I7D[I9D+7]
set IDD=I7D[I9D+8]
set NN=I7D[I9D+9]
set FM=I7D[I9D+10]
set IED=I7D[I9D+11]
set IFD=I7D[I9D+12]
set IHD=I7D[I9D+13]
set IGD=I7D[I9D+14]
set IID=I7D[I9D+15]
set Mode_CG=I7D[I9D+16]
set Mode_RM=I7D[I9D+17]
set Mode_ND=I7D[I9D+18]
set Mode_NA=I7D[I9D+19]
set Mode_BH=I7D[I9D+20]
set Mode_AB=I7D[I9D+21]
set Mode_XP=I7D[I9D+22]
set Mode_FP=I7D[I9D+23]
set Mode_OP=I7D[I9D+24]
set Mode_WD=I7D[I9D+25]
set Mode_DB=I7D[I9D+26]
set Mode_DD=I7D[I9D+27]
set Mode_VM=I7D[I9D+28]
set Mode_FN=I7D[I9D+29]
set Mode_CC=I7D[I9D+30]
if CA9!=""or HYD(GetEventPlayerChatString())then
return
elseif(LM or VR or RV or RD or XL or CD or SO)then
call ShowWarningToPlayer(V8,"The following modes are currently disabled for this AI release: -lm, -vr, -rv, -rd, -xl, -cd, -so")
return
elseif FM and(AP or AR or LM or MM or TR or DM or MR or SP or AA or AI or AS or DU or SH or VR or RV or RD or XL or SD or MO or RO)then
call ShowWarningToPlayer(V8,(GetObjectName(('n02U'))))
return
elseif(Mode_BH and Mode_AB)or(Mode_XP and Mode_FP)then
call ShowWarningToPlayer(V8,(GetObjectName(('n02U'))))
return
elseif(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 ShowWarningToPlayer(V8,(GetObjectName(('n02U'))))
return
elseif(AA and(AI or AS or DM))or(AS and(AI or DM))or(AI and DM)then
call ShowWarningToPlayer(V8,(GetObjectName(('n02U'))))
return
elseif(RO and(MO or DM))or(MO and DM)then
call ShowWarningToPlayer(V8,(GetObjectName(('n02U'))))
return
elseif RV and(CM or AR or TR or MR or LM or DM or SH or TT)then
call ShowWarningToPlayer(V8,(GetObjectName(('n02U'))))
return
elseif(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 ShowWarningToPlayer(V8,(GetObjectName(('n02T'))))
return
elseif 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 ShowWarningToPlayer(V8,(GetObjectName(('n031'))))
return
elseif 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 ShowWarningToPlayer(V8,(GetObjectName(('n032'))))
return
elseif 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 ShowWarningToPlayer(V8,(GetObjectName(('n032'))))
return
elseif 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 ShowWarningToPlayer(V8,(GetObjectName(('n02U'))))
return
elseif 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 ShowWarningToPlayer(V8,(GetObjectName(('n02U'))))
return
elseif 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 ShowWarningToPlayer(V8,(GetObjectName(('n02U'))))
return
elseif 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 ShowWarningToPlayer(V8,(GetObjectName(('n02U'))))
return
elseif 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 ShowWarningToPlayer(V8,(GetObjectName(('n02U'))))
return
elseif 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 ShowWarningToPlayer(V8,GetObjectName('n02U'))
return
elseif MM and MI8(E8)!=MI8(F8)then
call ShowWarningToPlayer(V8,(GetObjectName(('n034'))))
return
elseif VR and MI8(E8)!=MI8(F8)then
call ShowWarningToPlayer(V8,(GetObjectName(('n034'))))
return
elseif RV and MI8(E8)!=MI8(F8)then
call ShowWarningToPlayer(V8,(GetObjectName(('n034'))))
return
elseif(LM or XL)and(KR8(G8[1])or KR8(G8[2])or KR8(G8[3])or KR8(G8[4])or KR8(G8[5])or KR8(N8[1])or KR8(N8[2])or KR8(N8[3])or KR8(N8[4])or KR8(N8[5]))then
call ShowWarningToPlayer(V8,"AI players not allowed in League Modes")
return
elseif(IHD and IGD)or(IHD and IID)or(IGD and IID)or(NE and HE)or(HG and NG)or((IGD or IHD or IID)and(NE or HE or DE or HG or NG or IDD))then
call ShowWarningToPlayer(V8,"Invalid AI Game Mode Combination!")
return
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 or ST or MC or(HE or NE or HG or DE or NG or IDD)or NN or FM or(IGD or IHD or IID)then
call DisableTrigger(GetTriggeringTrigger())
else
return
endif
if CM==false then
call KD9()
call CU9()
endif
if LM==false and XL==false then
call F6D()
endif
set O64=H6D(GetEventPlayerChatString())
if(BF4)then
call X48("Mode"+O64,0)
else
call X48("Mode"+O64,GetPlayerId(V8))
endif
set F9=false
if LM then
set vo="Leaguemode"
elseif XL then
set vo="Extended League"
elseif RD then
set vo="Randomdraft"
elseif CD then
set vo="Captainsdraft"
elseif MM then
set vo="Mirrormatch"
elseif DM then
set vo="Deathmatch"
elseif RV then
set vo="Reverse"
elseif AP then
set vo="Allpick"
elseif AR then
set vo="Allrandom"
elseif TR then
set vo="Teamrandom"
elseif MR then
set vo="Moderandom"
elseif VR then
set vo="Voterandom"
elseif SD then
set vo="Singledraft"
elseif CM then
set vo="Captainsmode"
elseif TT then
set vo=GetObjectName('n0MP')
endif
if CM then
call HBD("Captains Mode")
endif
if TT then
call HBD(GetObjectName('n0MQ'))
endif
if LM then
call HBD("League Mode")
endif
if XL then
call HBD("Extended League")
endif
if RD then
call HBD("Random Draft")
endif
if CD then
call HBD("Captains Draft")
endif
if DM then
call HBD("Death Match")
endif
if MM then
call HBD("Mirror Match")
endif
if AP then
call HBD("All Pick")
endif
if AR then
call HBD("All Random")
endif
if VR then
call HBD("Vote Random")
endif
if MR then
call HBD("Mode Random")
endif
if TR then
call HBD("Team Random")
endif
if SP then
call HBD("Shuffle Players")
endif
if AA then
call HBD("All Agility")
endif
if AS then
call HBD("All Strength")
endif
if AI then
call HBD("All Intelligence")
endif
if RO then
call HBD("Range Only")
endif
if MO then
call HBD("Melee Only")
endif
if DU then
call HBD("Duplicate Mode")
endif
if ID then
call HBD("Item Drop")
endif
if NP then
call HBD("No Powerups")
endif
if SC then
call HBD("Super Creeps")
endif
if EM then
call HBD("Easy Mode")
endif
if SH then
call HBD("Same Hero")
endif
if RV then
call HBD("Reverse")
endif
if OM then
call HBD("Only Mid")
endif
if NM then
call HBD("No Mid")
endif
if NB then
call HBD("No Bot")
endif
if NT then
call HBD("No Top")
endif
if NS then
call HBD("No Swap")
endif
if NR then
call HBD("No Repick")
endif
if SD then
call HBD("Single Draft")
endif
if PM then
call HBD("Pooling Mode")
endif
if OI then
call HBD("Observer Info")
endif
if MI then
call HBD("Mini Heroes")
endif
if FR then
call HBD("Fast Respawn")
endif
if ER then
call HBD("Experimental Runes")
endif
if RS then
call HBD("Random Side")
endif
if SO then
call HBD("Switch On")
endif
if ZM then
call HBD(GetObjectName('n0KA'))
endif
if CP then
call HBD(GetObjectName('n0KC'))
endif
if UB then
call HBD(GetObjectName('n0L2'))
endif
if ST then
call HCD("Super Tower")
endif
if MC then
call HCD("Modified Super Creeps")
endif
if IHD then
call HCD("Beginner's Mode")
endif
if IGD then
call HCD("Advanced Mode")
endif
if IID then
call HCD("Xtreme Mode")
endif
if HE then
call HCD("High Exp AI")
endif
if NE then
call HCD("Normal Exp AI")
endif
if DE then
call HCD("Dynamic Exp AI")
endif
if HG then
call HCD("High Gold AI")
endif
if NG then
call HCD("Normal Gold AI")
endif
if IDD then
call HCD("Dynamic Gold AI")
endif
if NN then
call HCD("No Necronomicon")
endif
if FM then
call HCD("Formless Mode")
endif
if IED then
call HCD("Cool Names Off")
endif
if IFD then
call HCD("All Dagons")
endif
if Mode_RM then
call HCD("Reveal Map")
endif
if Mode_ND then
call HCD("No Death")
endif
if Mode_NA then
call HCD("Show Achievements")
call EnableTrigger(AchTrig)
endif
if Mode_BH then
call HCD("Big Heroes")
endif
if Mode_AB then
call HCD("Achieve Battle")
endif
if Mode_FP then
call HCD("First Person")
endif
if Mode_OP then
call HCD("One Piece")
endif
if Mode_WD then
call HCD("World Drop")
endif
if Mode_DD then
call HCD("Display Damage")
endif
if Mode_VM then
call HCD("View Map")
call FogEnable(false)
call FogMaskEnable(false)
endif
if Mode_FN then
call HCD("Fast Neutrals")
endif
if Mode_XP then
call HCD("Extreme First Person")
endif
if Mode_DB then
call HCD("Deny Balance")
endif
if Mode_CC then
endif
call NN8(bj_FORCE_ALL_PLAYERS,20.," ")
if H5D==1 then
call NN8(bj_FORCE_ALL_PLAYERS,20.,W[GetPlayerId(V8)]+(KW4[GetPlayerId(V8)])+"|r"+" "+GetObjectName('n061')+" "+cx)
else
call NN8(bj_FORCE_ALL_PLAYERS,20.,GetObjectName('n0HN')+" "+cx)
endif
call NN8(bj_FORCE_ALL_PLAYERS,20.,(GetObjectName(('n063')))+" -gameinfo.")
call NN8(bj_FORCE_ALL_PLAYERS,20.," ")
call PP8("IJD",SP)
call PP8("IKD",RS)
call PP8("IMD",DM)
call PP8("IND",MM)
call PP8("IOD",SH)
call PP8("IPD",AA)
call PP8("IQD",AI)
call PP8("IRD",AS)
call PP8("ISD",RO)
call PP8("ITD",MO)
call PP8("IUD",DU)
call PP8("IVD",AR)
call PP8("IWD",AP)
call PP8("IXD",TR)
call PP8("IYD",SD)
call PP8("IZD",MR)
call PP8("IAD",ID)
call PP8("IBD",NP)
call PP8("ICD",SC)
call PP8("I3D",EM)
call PP8("I6D",OM)
call PP8("ILD",NB)
call PP8("I1D",NT)
call PP8("I0D",NM)
call PP8("I5D",NS)
call PP8("StartSwitchOn",SO)
call PP8("I2D",NR)
call PP8("I_D",PM)
call PP8("J4D",OI)
call PP8("J7D",MI)
call PP8("J7D_EX",Mode_BH)
call PP8("J8D",FR)
call PP8("J9D",ER)
call PP8("JDD",ST)
call PP8("JED",MC)
call PP8("ABMode_Start",Mode_AB)
call PP8("FPMode_Start",Mode_FP)
call PP8("XPMode_Start",Mode_XP)
call PP8("OPMode_Start",Mode_OP)
call PP8("WDMode_Start",Mode_WD)
if IHD then
set NE=true
set NG=true
set DE=false
set IDD=false
endif
if IGD then
set HE=true
set HG=true
set DE=true
set IDD=true
endif
if IID then
set NE=true
set NG=true
set DE=true
set IDD=true
call ExecuteFunc("JFD")
call HCD("Xtreme AI")
endif
if Mode_CG then
set NE=true
set NG=true
set DE=true
set IDD=true
set FX7=true
set FI7=CG_Values[1]
set FJ7=CG_Values[2]
set FK7=CG_Values[3]
set FM7=CG_Values[4]
set FO7=R2I(CG_Values[5])
set FP7=CG_Values[6]
set FQ7=CG_Values[7]
set FR7=R2I(CG_Values[8])
set FV7=R2I(CG_Values[9])
set FW7=R2I(CG_Values[10])
set FN7=CG_Values[11]
set FT7=CG_Values[12]
set FU7=R2I(CG_Values[13])
call HCD("Custom Game")
endif
if Mode_RM then
call FogEnable(false)
call FogMaskEnable(false)
endif
call PP8("JGD",DE)
call PP8("JHD",IDD)
call PP8("JID",FM)
call PP8("JJD",IED)
call PP8("JKD",IFD)
call PP8("JMD",CM)
set BT=HE
set LT=NE
set CT=HG
set WT=NG
set XT=NN
set R94=true
call S09(0,0,false)
if TT4==false and O14==false then
call CX9()
endif
call K79()
endfunction
function JND takes nothing returns nothing
call H1D(GetEventPlayerChatString(),1)
endfunction
function JOD takes nothing returns boolean
if BE4!="" and R94==false then
set BF4=true
call H1D("-"+(BE4),2)
else
call TriggerRegisterPlayerChatEvent(BD4,V8,"-",false)
endif
return false
endfunction
function IWD takes nothing returns nothing
local location XX8=GetRectCenter(ZD)
local location XY8=GetRectCenter(qr)
local integer x=1
set X4=true
set RD4='x'
loop
exitwhen x>5
if KS8(G8[x])then
call CreateUnitAtLoc(G8[x],'n00C',XY8,bj_UNIT_FACING)
endif
if KS8(N8[x])then
call CreateUnitAtLoc(N8[x],'n00C',XX8,bj_UNIT_FACING)
endif
set x=x+1
endloop
call RemoveLocation(XX8)
call RemoveLocation(XY8)
set XX8=null
set XY8=null
endfunction
function JPD takes integer NX8,boolean JQD returns boolean
local boolean JRD=false
local integer i
local integer j=1
if(JQD)then
if(EX7==1)then
return false
endif
set i=EX7-1
loop
if(NX8==EZ7[j])then
return true
endif
set j=j+1
exitwhen(j>i)
endloop
else
if(EY7==1)then
return false
endif
set i=EY7-1
loop
if(NX8==EA7[j])then
return true
endif
set j=j+1
exitwhen(j>i)
endloop
endif
return JRD
endfunction
function JSD takes integer NX8,boolean JQD returns nothing
if(JQD)then
set EZ7[EX7]=NX8
set EX7=EX7+1
else
set EA7[EY7]=NX8
set EY7=EY7+1
endif
endfunction
function ABMode_Func takes nothing returns nothing
local integer i=0
set i=0
loop
exitwhen i>15
if LoadInteger(achieveHT,GetHandleId(Player(i)),'AchP')>=500 then
if IsJWPlayer(Player(i))then
call KillUnit(JV4)
elseif IsTZPlayer(Player(i))then
call KillUnit(IY4)
endif
endif
set i=i+1
endloop
endfunction
function ABMode_Start takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimer(t)
call TriggerAddCondition(t,Condition(function ABMode_Func))
set t=null
endfunction
function ExtremeFirstPersonTimerFunc takes nothing returns nothing
local unit s=Y7[GetPlayerId(GetLocalPlayer())]
if s!=null and IsUnitType(s,UNIT_TYPE_DEAD)==false then
call SetCameraTargetController(s,0,0,true)
call SetCameraField(CAMERA_FIELD_ROTATION,GetUnitFacing(s)+Mode_XP_CameraAngle,0)
call SetCameraField(CAMERA_FIELD_ZOFFSET,GetUnitFlyHeight(s)+150,0)
call SetCameraField(CAMERA_FIELD_FIELD_OF_VIEW,150,0)
call SetCameraField(CAMERA_FIELD_ANGLE_OF_ATTACK,350,0)
call SetCameraField(CAMERA_FIELD_TARGET_DISTANCE,200,0)
endif
set s=null
endfunction
function Mode_XP_PlayerCameraAngleFunc takes nothing returns nothing
if GetLocalPlayer()==GetTriggerPlayer()then
if GetTriggerEventId()==EVENT_PLAYER_ARROW_DOWN_DOWN then
set Mode_XP_DOWN=true
elseif GetTriggerEventId()==EVENT_PLAYER_ARROW_DOWN_UP then
set Mode_XP_DOWN=false
elseif GetTriggerEventId()==EVENT_PLAYER_ARROW_LEFT_DOWN then
set Mode_XP_LEFT=true
elseif GetTriggerEventId()==EVENT_PLAYER_ARROW_LEFT_UP then
set Mode_XP_LEFT=false
elseif GetTriggerEventId()==EVENT_PLAYER_ARROW_RIGHT_DOWN then
set Mode_XP_RIGHT=true
elseif GetTriggerEventId()==EVENT_PLAYER_ARROW_RIGHT_UP then
set Mode_XP_RIGHT=false
elseif GetTriggerEventId()==EVENT_PLAYER_ARROW_UP_DOWN then
set Mode_XP_UP=true
elseif GetTriggerEventId()==EVENT_PLAYER_ARROW_UP_UP then
set Mode_XP_UP=false
endif
if Mode_XP_UP and Mode_XP_LEFT then
set Mode_XP_CameraAngle=-45
elseif Mode_XP_UP and Mode_XP_RIGHT then
set Mode_XP_CameraAngle=45
elseif Mode_XP_LEFT and Mode_XP_DOWN then
set Mode_XP_CameraAngle=135
elseif Mode_XP_RIGHT and Mode_XP_DOWN then
set Mode_XP_CameraAngle=-135
elseif Mode_XP_LEFT then
set Mode_XP_CameraAngle=90
elseif Mode_XP_RIGHT then
set Mode_XP_CameraAngle=-90
elseif Mode_XP_DOWN then
set Mode_XP_CameraAngle=180
elseif Mode_XP_UP or(Mode_XP_UP==false and Mode_XP_DOWN==false and Mode_XP_LEFT==false and Mode_XP_RIGHT==false)then
set Mode_XP_CameraAngle=0
endif
endif
endfunction
function TriggerRegisterAllPlayersEventEx takes trigger t,playerevent e returns nothing
local integer i=0
loop
call TriggerRegisterPlayerEvent(t,Player(i),e)
set i=i+1
exitwhen i==16
endloop
endfunction
function RIFunc takes nothing returns nothing
local real x=GetRandomReal(GetRectMinX(bj_mapInitialPlayableArea)+50,GetRectMaxX(bj_mapInitialPlayableArea)-50)
local real y=GetRandomReal(GetRectMinY(bj_mapInitialPlayableArea)+50,GetRectMaxY(bj_mapInitialPlayableArea)-50)
local item it
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15,GetObjectName('OP01'))
loop
exitwhen IsTerrainPathable(x,y,PATHING_TYPE_WALKABILITY)
set x=GetRandomReal(GetRectMinX(bj_mapInitialPlayableArea)+50,GetRectMaxX(bj_mapInitialPlayableArea)-50)
set y=GetRandomReal(GetRectMinY(bj_mapInitialPlayableArea)+50,GetRectMaxY(bj_mapInitialPlayableArea)-50)
endloop
set it=CreateItem('IZ0K',x,y)
call SetItemUserData(it,1)
set it=null
endfunction
function OPMode_Start takes nothing returns nothing
local timer tm=CreateTimer()
call TimerStart(tm,240,true,function RIFunc)
set tm=null
endfunction
function WD_Drop takes nothing returns nothing
local unit s=GetKillingUnit()
if GetRandomInt(0,99)>2 or GetDyingUnit()==null then
set s=null
return
endif
set bj_lastCreatedItem=CreateItem(AU[GetRandomInt(1,EX4)],GetUnitX(GetDyingUnit()),GetUnitY(GetDyingUnit()))
call SetItemUserData(bj_lastCreatedItem,1)
call SetItemPlayer(bj_lastCreatedItem,GetOwningPlayer(GetKillingUnit()),true)
if GetItemTypeId(bj_lastCreatedItem)=='I0NE' or GetItemTypeId(bj_lastCreatedItem)=='I05F' or GetItemTypeId(bj_lastCreatedItem)=='I05D' or GetItemTypeId(bj_lastCreatedItem)=='I05C' then
call SetItemCharges(bj_lastCreatedItem,5)
elseif GetItemTypeId(bj_lastCreatedItem)=='I0AW' then
call SetItemCharges(bj_lastCreatedItem,1)
endif
set s=null
endfunction
function WDMode_Start takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(12),EVENT_PLAYER_UNIT_DEATH,null)
call TriggerAddCondition(t,Condition(function WD_Drop))
set t=null
endfunction
function XPMode_Start takes nothing returns nothing
local timer tm=CreateTimer()
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEventEx(t,EVENT_PLAYER_ARROW_UP_DOWN)
call TriggerRegisterAllPlayersEventEx(t,EVENT_PLAYER_ARROW_UP_UP)
call TriggerRegisterAllPlayersEventEx(t,EVENT_PLAYER_ARROW_DOWN_DOWN)
call TriggerRegisterAllPlayersEventEx(t,EVENT_PLAYER_ARROW_DOWN_UP)
call TriggerRegisterAllPlayersEventEx(t,EVENT_PLAYER_ARROW_LEFT_DOWN)
call TriggerRegisterAllPlayersEventEx(t,EVENT_PLAYER_ARROW_LEFT_UP)
call TriggerRegisterAllPlayersEventEx(t,EVENT_PLAYER_ARROW_RIGHT_DOWN)
call TriggerRegisterAllPlayersEventEx(t,EVENT_PLAYER_ARROW_RIGHT_UP)
call TriggerAddCondition(t,Condition(function Mode_XP_PlayerCameraAngleFunc))
call SetCameraField(CAMERA_FIELD_FARZ,3000,0)
call TimerStart(tm,.02,true,function ExtremeFirstPersonTimerFunc)
set tm=null
set t=null
endfunction
function JTD takes integer NX8 returns nothing
local integer i=1
local boolean JUD=false
loop
if(NX8==EW7[i])then
set EW7[i]=0
call JSD(NX8,false)
set JUD=true
endif
set i=i+1
exitwhen(i>EC7 or JUD)
endloop
endfunction
function JVD takes nothing returns integer
local integer V37=0
local integer NX8=0
loop
set V37=GetRandomInt(1,EC7)
exitwhen(EW7[V37]>0 and JPD(EW7[V37],false)==false)
endloop
set NX8=EW7[V37]
call JSD(NX8,false)
set EW7[V37]=0
return NX8
endfunction
function JWD takes nothing returns integer
local integer V37=0
local integer NX8=0
loop
set V37=GetRandomInt(1,EB7)
exitwhen(EV7[V37]>0 and JPD(EW7[V37],true)==false)
endloop
set NX8=EV7[V37]
call JSD(NX8,true)
set EV7[V37]=0
return NX8
endfunction
function JXD takes nothing returns boolean
local integer i=1
local integer JYD=0
local integer NX8=0
if not D17 then
call EA8(GetTriggeringTrigger())
return false
endif
if KR8(DL7)then
if GetPlayerState(DL7,PLAYER_STATE_RESOURCE_GOLD)>0 then
set E17=E17+1
if E17>E37 then
if E07 then
set NX8=JWD()
else
set NX8=JVD()
endif
loop
exitwhen(IssueNeutralImmediateOrderById(DL7,EU7[i],NX8)or GetPlayerState(DL7,PLAYER_STATE_RESOURCE_GOLD)==0)
set i=i+1
if(i>12)then
if E07 then
set NX8=JWD()
else
set NX8=JVD()
endif
set i=1
set JYD=JYD+1
if(JYD>5)then
exitwhen true
endif
endif
endloop
set E17=0
endif
endif
endif
return true
endfunction
function JZD takes nothing returns nothing
call MJ8('N00R')
call MJ8('N0M7')
call MJ8('N0MK')
call MJ8('N0MD')
call MJ8('N0MU')
call MJ8('U006')
endfunction
function JAD takes nothing returns nothing
set EW7[1]='H00U'
set EW7[2]='EC77'
set EW7[3]='H001'
set EW7[4]='HC49'
set EW7[5]='Huth'
set EW7[6]='Ucrl'
set EW7[7]='Usyl'
set EW7[8]='Npbm'
set EW7[9]='Hlgr'
set EW7[10]='Nbrn'
set EW7[11]='H00D'
set EW7[12]='UC18'
set EW7[13]='UC60'
set EW7[14]='U00A'
set EW7[15]='U006'
set EW7[16]='NC00'
set EW7[17]='UC42'
set EW7[18]='U000'
set EW7[19]='UC91'
set EW7[20]='E004'
set EW7[21]='EC45'
set EW7[22]='EC77'
set EW7[23]='E002'
set EW7[24]='U00C'
set EW7[25]='H00H'
set EW7[26]='U00E'
set EW7[27]='O00J'
set EW7[28]='Ubal'
set EW7[29]='Opgh'
set EW7[30]='U00P'
set EW7[31]='Naka'
set EW7[32]='H00U'
set EW7[33]='N0HP'
set EW7[34]='Edem'
endfunction
function JBD takes nothing returns nothing
set EV7[1]='H00U'
set EV7[2]='Hjai'
set EV7[3]='Huth'
set EV7[4]='N016'
set EV7[5]='Nbrn'
set EV7[6]='UC18'
set EV7[7]='EC77'
set EV7[8]='N0HP'
set EV7[9]='H071'
set EV7[10]='O016'
set EV7[11]='Opgh'
set EV7[12]='Ulic'
set EV7[13]='Usyl'
set EV7[14]='Otch'
set EV7[15]='O00P'
set EV7[16]='Hvwd'
set EV7[17]='H00V'
set EV7[18]='Ubal'
set EV7[19]='Nfir'
set EV7[20]='EC45'
endfunction
function JCD takes nothing returns boolean
local integer i=1
local integer J3D=0
loop
exitwhen i>5
if KR8(G8[i])then
if(IssueNeutralImmediateOrderById(G8[i],EL7[i],'h06N')==false)then
set J3D=1
loop
exitwhen(J3D>5)or IssueNeutralImmediateOrderById(G8[i],EL7[J3D],'h06N')
set J3D=J3D+1
endloop
endif
endif
if KR8(N8[i])then
if(IssueNeutralImmediateOrderById(N8[i],EL7[6+i],'h06N')==false)then
set J3D=1
loop
exitwhen(J3D>5)or IssueNeutralImmediateOrderById(N8[i],EL7[6+J3D],'h06N')
set J3D=J3D+1
endloop
endif
endif
set i=i+1
endloop
call EA8(GetTriggeringTrigger())
return false
endfunction
function J6D takes nothing returns integer
if D77==G8[1]then
return 1
endif
return 2
endfunction
function JLD takes string S,real J1D,real J0D,real J5D,real J2D,real J_D,boolean K4D,integer r,integer g,integer b returns image
set DA7=CreateImage(S,J1D,J0D,0,J5D-(J1D/ 2),J2D-(J0D/ 2),J_D,0,0,0,2)
call SetImageRenderAlways(DA7,true)
call ShowImage(DA7,K4D)
call SetImageColor(DA7,r,g,b,255)
return DA7
endfunction
function K7D takes image i returns nothing
call ShowImage(i,false)
call DestroyImage(i)
endfunction
function K8D takes integer K9D returns nothing
local real x=DB7+40
local real y=DC7-50
local integer KDD=255
local integer KED=0
local integer KFD=0
local integer KGD=0
local integer KHD=0
local integer KID=255
local integer r
local integer g
local integer b
if K9D==1 then
set r=KDD
set g=KED
set b=KFD
set DV7=JLD("Fonts\\B.blp",90,90,x-40,y,0,true,r,g,b)
set DW7=JLD("Fonts\\A.blp",90,90,x,y,0,true,r,g,b)
set DX7=JLD("Fonts\\N.blp",90,90,x+50,y,0,true,r,g,b)
elseif K9D==2 then
set r=KGD
set g=KHD
set b=KID
call K7D(DV7)
call K7D(DW7)
call K7D(DX7)
set DV7=JLD("Fonts\\P.blp",90,90,x-60,y,0,true,r,g,b)
set DW7=JLD("Fonts\\I.blp",90,90,x-20,y,0,true,r,g,b)
set DX7=JLD("Fonts\\C.blp",90,90,x,y,0,true,r,g,b)
set DY7=JLD("Fonts\\K.blp",90,90,x+45,y,0,true,r,g,b)
elseif K9D==3 then
set r=KDD
set g=KED
set b=KFD
call K7D(DV7)
call K7D(DW7)
call K7D(DX7)
call K7D(DY7)
set DV7=JLD("Fonts\\B.blp",90,90,x-40,y,0,true,r,g,b)
set DW7=JLD("Fonts\\A.blp",90,90,x,y,0,true,r,g,b)
set DX7=JLD("Fonts\\N.blp",90,90,x+50,y,0,true,r,g,b)
elseif K9D==4 then
set r=KGD
set g=KHD
set b=KID
call K7D(DV7)
call K7D(DW7)
call K7D(DX7)
set DV7=JLD("Fonts\\P.blp",90,90,x-60,y,0,true,r,g,b)
set DW7=JLD("Fonts\\I.blp",90,90,x-20,y,0,true,r,g,b)
set DX7=JLD("Fonts\\C.blp",90,90,x,y,0,true,r,g,b)
set DY7=JLD("Fonts\\K.blp",90,90,x+45,y,0,true,r,g,b)
elseif K9D==5 then
set r=KDD
set g=KED
set b=KFD
call K7D(DV7)
call K7D(DW7)
call K7D(DX7)
call K7D(DY7)
set DV7=JLD("Fonts\\B.blp",90,90,x-40,y,0,true,r,g,b)
set DW7=JLD("Fonts\\A.blp",90,90,x,y,0,true,r,g,b)
set DX7=JLD("Fonts\\N.blp",90,90,x+50,y,0,true,r,g,b)
elseif K9D==6 then
set r=KGD
set g=KHD
set b=KID
call K7D(DV7)
call K7D(DW7)
call K7D(DX7)
set DV7=JLD("Fonts\\P.blp",90,90,x-60,y,0,true,r,g,b)
set DW7=JLD("Fonts\\I.blp",90,90,x-20,y,0,true,r,g,b)
set DX7=JLD("Fonts\\C.blp",90,90,x,y,0,true,r,g,b)
set DY7=JLD("Fonts\\K.blp",90,90,x+45,y,0,true,r,g,b)
elseif K9D==7 then
call K7D(DV7)
call K7D(DW7)
call K7D(DX7)
call K7D(DY7)
endif
endfunction
function KJD takes integer i,integer KKD returns string
if i<0 then
set i=0
endif
if TimerGetElapsed(E4)<15 then
return DT7+I2S(i)
endif
if D97==3 then
return DT7+I2S(i)
endif
if D97==1 and KKD!=J6D()then
return DT7+I2S(i)
elseif D97==2 and KKD!=J6D()then
return DT7+I2S(i)
elseif i==0 then
return DT7+I2S(i)
elseif i<6 then
return DS7+I2S(i)
else
return I2S(i)
endif
endfunction
function KMD takes nothing returns boolean
local multiboarditem KND
local integer i
local integer KOD
local integer KPD
local integer KQD=7
local integer KRD=0
set KOD=1
set KPD=KRD
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
call MultiboardSetItemWidth(KND,.5)
call MultiboardSetItemValue(KND,W[GetPlayerId(G8[1])]+(KW4[GetPlayerId((G8[1]))])+"|r")
call MultiboardReleaseItem(KND)
set KOD=KOD+2
set KPD=KRD
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
call MultiboardSetItemValue(KND,DR7+GetObjectName('n0EV'))
call MultiboardSetItemWidth(KND,.035)
call MultiboardReleaseItem(KND)
set i=0
set KOD=KOD
set KPD=KRD+i+1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DH7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DH7[i]])
endif
call MultiboardReleaseItem(KND)
set i=1
set KPD=KRD+i+1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DH7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DH7[i]])
endif
call MultiboardReleaseItem(KND)
set i=2
set KPD=KRD+i+1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DH7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DH7[i]])
endif
call MultiboardReleaseItem(KND)
set i=3
set KPD=KRD+i+1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DH7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DH7[i]])
endif
call MultiboardReleaseItem(KND)
set i=4
set KPD=KRD+i+1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DH7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DH7[i]])
endif
call MultiboardReleaseItem(KND)
set KOD=KOD+2
set KPD=KRD
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
call MultiboardSetItemValue(KND,DR7+GetObjectName('n0EX'))
call MultiboardSetItemWidth(KND,.035)
call MultiboardReleaseItem(KND)
set i=0
set KOD=KOD
set KPD=KRD+i+1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DM7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DM7[i]])
endif
call MultiboardReleaseItem(KND)
set i=1
set KPD=KRD+i+1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DM7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DM7[i]])
endif
call MultiboardReleaseItem(KND)
set i=2
set KPD=KRD+i+1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DM7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DM7[i]])
endif
call MultiboardReleaseItem(KND)
set i=3
set KPD=KRD+i+1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DM7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DM7[i]])
endif
call MultiboardReleaseItem(KND)
set i=4
set KPD=KRD+i+1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DM7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DM7[i]])
endif
call MultiboardReleaseItem(KND)
set KOD=KOD+2
set KPD=KRD
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
call MultiboardSetItemValue(KND,DR7+GetObjectName('n0EU'))
call MultiboardSetItemWidth(KND,.035)
call MultiboardReleaseItem(KND)
set KPD=KRD+1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
if D77==G8[1]then
call MultiboardSetItemValue(KND,KJD(D47,1))
else
call MultiboardSetItemValue(KND," ")
endif
call MultiboardSetItemWidth(KND,.035)
call MultiboardReleaseItem(KND)
set KOD=KOD+1
set KPD=KRD
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
call MultiboardSetItemValue(KND,DR7+GetObjectName('n0ET'))
call MultiboardSetItemWidth(KND,.035)
call MultiboardReleaseItem(KND)
set KPD=KRD+1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
call MultiboardSetItemValue(KND,KJD(L_4[1],1))
call MultiboardSetItemWidth(KND,.035)
call MultiboardReleaseItem(KND)
set KOD=KOD+2
set KPD=KRD
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
call MultiboardSetItemValue(KND,DR7+GetObjectName('n0EY'))
call MultiboardSetItemWidth(KND,.035)
call MultiboardReleaseItem(KND)
set KPD=KRD+1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
if TimerGetElapsed(E4)<15 then
call MultiboardSetItemValue(KND,DT7+GetObjectName('n0F1'))
elseif D97==1 then
call MultiboardSetItemValue(KND,GetObjectName('n0F4'))
elseif D97==2 then
call MultiboardSetItemValue(KND,DT7+GetObjectName('n0F1'))
else
call MultiboardSetItemValue(KND,DT7+GetObjectName('n0F2'))
endif
call MultiboardSetItemWidth(KND,.035)
call MultiboardReleaseItem(KND)
set KOD=1
set KPD=KQD
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
call MultiboardSetItemWidth(KND,1.5)
call MultiboardSetItemValue(KND,"  "+W[GetPlayerId(N8[1])]+(KW4[GetPlayerId((N8[1]))])+"|r")
call MultiboardReleaseItem(KND)
set KOD=KOD+2
set KPD=KQD-1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
call MultiboardSetItemValue(KND,DR7+" "+GetObjectName('n0EV'))
call MultiboardSetItemWidth(KND,.035)
call MultiboardReleaseItem(KND)
set i=0
set KPD=KQD+i+1-1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DI7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DI7[i]])
endif
call MultiboardReleaseItem(KND)
set i=1
set KPD=KQD+i+1-1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DI7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DI7[i]])
endif
call MultiboardReleaseItem(KND)
set i=2
set KPD=KQD+i+1-1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DI7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DI7[i]])
endif
call MultiboardReleaseItem(KND)
set i=3
set KPD=KQD+i+1-1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DI7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DI7[i]])
endif
call MultiboardReleaseItem(KND)
set i=4
set KPD=KQD+i+1-1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DI7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DI7[i]])
endif
call MultiboardReleaseItem(KND)
set KOD=KOD+2
set KPD=KQD-1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
call MultiboardSetItemValue(KND,DR7+" "+GetObjectName('n0EX'))
call MultiboardSetItemWidth(KND,.035)
call MultiboardReleaseItem(KND)
set i=0
set KPD=KQD+i+1-1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DN7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DN7[i]])
endif
call MultiboardReleaseItem(KND)
set i=1
set KPD=KQD+i+1-1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DN7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DN7[i]])
endif
call MultiboardReleaseItem(KND)
set i=2
set KPD=KQD+i+1-1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DN7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DN7[i]])
endif
call MultiboardReleaseItem(KND)
set i=3
set KPD=KQD+i+1-1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DN7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DN7[i]])
endif
call MultiboardReleaseItem(KND)
set i=4
set KPD=KQD+i+1-1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemWidth(KND,.015)
if DN7[i]>0 then
call MultiboardSetItemStyle(KND,false,true)
call MultiboardSetItemIcon(KND,ME4[DN7[i]])
endif
call MultiboardReleaseItem(KND)
set KOD=KOD+2
set KPD=KQD-2
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
call MultiboardSetItemValue(KND,DR7+GetObjectName('n0EU'))
call MultiboardSetItemWidth(KND,.035)
call MultiboardReleaseItem(KND)
set KPD=KQD-1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
if D77==N8[1]then
call MultiboardSetItemValue(KND,KJD(D47,2))
else
call MultiboardSetItemValue(KND," ")
endif
call MultiboardSetItemWidth(KND,.035)
call MultiboardReleaseItem(KND)
set KOD=KOD+1
set KPD=KQD-2
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
call MultiboardSetItemValue(KND,DR7+GetObjectName('n0ET'))
call MultiboardSetItemWidth(KND,.035)
call MultiboardReleaseItem(KND)
set KPD=KQD-1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
call MultiboardSetItemValue(KND,KJD(L_4[2],2))
call MultiboardSetItemWidth(KND,.035)
call MultiboardReleaseItem(KND)
set KOD=KOD+2
set KPD=KQD-2
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
call MultiboardSetItemValue(KND,DR7+GetObjectName('n0EY'))
call MultiboardSetItemWidth(KND,.035)
call MultiboardReleaseItem(KND)
set KPD=KQD-1
set KND=MultiboardGetItem(DU7,KOD,KPD)
call MultiboardSetItemStyle(KND,true,false)
if TimerGetElapsed(E4)<15 then
call MultiboardSetItemValue(KND,DT7+GetObjectName('n0F1'))
elseif D97==2 then
call MultiboardSetItemValue(KND,GetObjectName('n0F4'))
elseif D97==1 then
call MultiboardSetItemValue(KND,DT7+GetObjectName('n0F1'))
else
call MultiboardSetItemValue(KND,DT7+GetObjectName('n0F2'))
endif
call MultiboardSetItemWidth(KND,.035)
call MultiboardReleaseItem(KND)
return false
endfunction
function KSD takes nothing returns nothing
local integer KTD=12
local integer KUD=14
local trigger t=CreateTrigger()
local integer i
local multiboarditem KND
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function KMD))
set DU7=CreateMultiboard()
call MultiboardSetItemsWidth(DU7,.015)
call MultiboardSetRowCount(DU7,KTD)
call MultiboardSetColumnCount(DU7,KUD)
call MultiboardSetTitleText(DU7,GetObjectName('n0K6'))
call MultiboardSetItemsStyle(DU7,false,false)
call MultiboardMinimize(DU7,false)
call MultiboardDisplay(DU7,true)
set i=0
loop
exitwhen i>KUD
set KND=MultiboardGetItem(DU7,0,i)
call MultiboardSetItemWidth(KND,.015)
call MultiboardReleaseItem(KND)
set i=i+1
endloop
set t=null
set KND=null
endfunction
function KVD takes nothing returns boolean
local unit KWD=GetSoldUnit()
local player p=GetOwningPlayer(KWD)
local integer i
local real x
local real y
local real a
if GetUnitTypeId(KWD)=='h06N' and IsPlayerAlly(GetOwningPlayer(KWD),GetOwningPlayer(GetSellingUnit()))then
if Y7[GetPlayerId(p)]!=null then
call ShowWarningToPlayer(p,GetObjectName('n0F3'))
call KillUnit(KWD)
set KWD=null
set p=null
return false
endif
set x=GetUnitX(GetSellingUnit())
set y=GetUnitY(GetSellingUnit())
set i=ZF7(GetUnitTypeId(GetSellingUnit()))
set a=GetUnitFacing(GetSellingUnit())
call RemoveUnit(GetSellingUnit())
call CreateUnit(p,i,x,y,a)
endif
if GetUnitTypeId(KWD)=='h06N' then
call KillUnit(KWD)
endif
if Y7[GetPlayerId(G8[1])]!=null and Y7[GetPlayerId(G8[2])]!=null and Y7[GetPlayerId(G8[3])]!=null and Y7[GetPlayerId(G8[4])]!=null and Y7[GetPlayerId(G8[5])]!=null and Y7[GetPlayerId(N8[1])]!=null and Y7[GetPlayerId(N8[2])]!=null and Y7[GetPlayerId(N8[3])]!=null and Y7[GetPlayerId(N8[4])]!=null and Y7[GetPlayerId(N8[5])]!=null then
call EA8(GetTriggeringTrigger())
endif
set KWD=null
set p=null
return false
endfunction
function KXD takes player pl,boolean J4 returns nothing
local integer O5=GetPlayerId(pl)
local integer T8
local integer U8
if not J4 then
set E57[64+O5]=(not E57[64+O5])
call DisplayTimedTextToPlayer(pl,0,0,10.,GetObjectName('Y094')+WF7(E57[64+O5],GetObjectName('Y1ON'),GetObjectName('YOOF')))
if not E57[48+O5]then
return
endif
else
set E57[48+O5]=true
endif
set E57[32+O5]=(E57[64+O5]and E57[48+O5])
set O5=GetPlayerId(GetLocalPlayer())
set T8=1
set U8=3+HN4+HM4
loop
exitwhen T8>U8
call x7(A4,15,T8,WI7(E57[32+O5],HZ7,.01))
set T8=T8+1
endloop
if(pl==GetLocalPlayer())then
set F17=IsMultiboardMinimized(A4)
call MultiboardMinimize(A4,true)
endif
call KT9()
if(pl==GetLocalPlayer())then
call MultiboardMinimize(A4,F17)
endif
endfunction
function EXD takes nothing returns nothing
call KXD(GetTriggerPlayer(),false)
endfunction
function KYD takes player pl,boolean J4 returns nothing
local integer O5=GetPlayerId(pl)
local integer T8
local integer U8
local real Y_7
if not(EU or FU)then
return
endif
if not J4 then
set E57['p'+O5]=(not E57['p'+O5])
call DisplayTimedTextToPlayer(pl,0,0,10.,GetObjectName('Y093')+WF7(E57['p'+O5],GetObjectName('Y1ON'),GetObjectName('YOOF')))
if not E57[96+O5]then
return
endif
else
set E57[96+O5]=true
endif
set E57[80+O5]=(E57['p'+O5]and E57[96+O5])
set O5=GetPlayerId(GetLocalPlayer())
set Y_7=0
if(EU)then
set Y_7=Y_7+HZ7/ 2
endif
if(FU)then
set Y_7=Y_7+HZ7/ 2
endif
set T8=1
set U8=3+HN4+HM4
loop
exitwhen T8>U8
call x7(A4,14,T8,WI7(E57[80+O5],Y_7,.01))
set T8=T8+1
endloop
if(pl==GetLocalPlayer())then
set F17=IsMultiboardMinimized(A4)
call MultiboardMinimize(A4,true)
endif
call KT9()
if(pl==GetLocalPlayer())then
call MultiboardMinimize(A4,F17)
endif
endfunction
function EZD takes nothing returns nothing
call KYD(GetTriggerPlayer(),false)
endfunction
function KZD takes nothing returns boolean
local integer O5=1
set L24=true
call EA8(GetTriggeringTrigger())
call DestroyMultiboard(DU7)
call KD9()
call CU9()
call K79()
loop
exitwhen O5>11
if GetPlayerController(Player(O5))==MAP_CONTROL_USER then
call KXD(Player(O5),true)
call KYD(Player(O5),true)
endif
set O5=O5+1
endloop
return false
endfunction
function ModeCM_SpawnSound takes nothing returns boolean
call EA8(GetTriggeringTrigger())
call PlaySoundBJ(LO)
return false
endfunction
function KAD takes nothing returns boolean
local trigger t=CreateTrigger()
local integer S29
local integer S59
local string PX9
local unit u
local real x
local real y
local integer i
local real d
local real KBD=GetRectCenterX(QD)
local real KCD=GetRectCenterY(QD)
local real K3D=GetRectCenterX(PD)
local real K6D=GetRectCenterY(PD)
set D97=3
set N54=true
call EA8(GetTriggeringTrigger())
set i=0
loop
exitwhen i==5
set x=KBD-300+i*150
set y=KCD
set u=CreateUnit(G8[0],MF4[DM7[i]],x,y,270)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_SELL)
call PanCameraToTimedForPlayer(G8[i+1],KBD,KCD,0)
call CreateUnit(G8[i+1],'n00C',KBD,KCD,bj_UNIT_FACING)
call SetPlayerState(G8[i+1],PLAYER_STATE_RESOURCE_GOLD,L14[GetPlayerId(G8[i+1])]-250)
set EL7[1+i]=u
set i=i+1
endloop
set i=0
loop
exitwhen i==5
set x=K3D-300+i*150
set y=K6D
set u=CreateUnit(N8[0],MF4[DN7[i]],x,y,270)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_SELL)
call PanCameraToTimedForPlayer(N8[i+1],K3D,K6D,0)
call CreateUnit(N8[i+1],'n00C',K3D,K6D,bj_UNIT_FACING)
call SetPlayerState(N8[i+1],PLAYER_STATE_RESOURCE_GOLD,L14[GetPlayerId(N8[i+1])]-250)
set EL7[7+i]=u
set i=i+1
endloop
call TriggerAddCondition(t,Condition(function KVD))
call SuspendTimeOfDay(false)
call EnableTrigger(M64)
call EnableTrigger(MC4)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,10,false)
call TriggerAddCondition(t,Condition(function KZD))
set RD4=90
call MN8()
set D17=false
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,E67,false)
call TriggerAddCondition(t,Condition(function JCD))
call ExecuteFunc("KLD")
call CX9()
set t=null
set u=null
return false
endfunction
function K1D takes integer K0D,integer i returns nothing
call MJ8(KA4[i])
if K0D==1 then
set DM7[DO7]=i
set DO7=DO7+1
else
set DN7[DP7]=i
set DP7=DP7+1
endif
endfunction
function K5D takes integer K0D returns nothing
local integer i=MU8()
loop
if O[i]==false then
set O[i]=true
call K1D(K0D,i)
return
endif
endloop
endfunction
function K2D takes integer K0D,integer i returns nothing
call X48("Ban"+I2S(GetPlayerId(GetOwningPlayer(GetSoldUnit()))),KA4[i])
call MJ8(KA4[i])
if K0D==1 then
set DH7[DJ7]=i
set DJ7=DJ7+1
else
set DI7[DK7]=i
set DK7=DK7+1
endif
endfunction
function K_D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DD7
local player M7D=DE7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and L_4[K0D]==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 K1D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
call JTD(GetUnitTypeId(GetSoldUnit()))
else
call K5D(K0D)
endif
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1,false)
call TriggerAddCondition(t,Condition(function KAD))
call K8D(7)
call MultiboardSetTitleText(DU7,GetObjectName('n0K6'))
call SetPlayerState(G8[1],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(N8[1],PLAYER_STATE_RESOURCE_GOLD,0)
else
if GetTriggerEvalCount(t)>40 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function M8D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DE7
local player M7D=DD7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and L_4[K0D]==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 K1D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K5D(K0D)
endif
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function K_D))
set D47=40
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call SetPlayerState(M4D,PLAYER_STATE_RESOURCE_GOLD,0)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=false
set DL7=M7D
else
if GetTriggerEvalCount(t)>40 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function M9D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DD7
local player M7D=DE7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and L_4[K0D]==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 K2D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K2D((K0D),-1)
endif
call K8D(6)
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function M8D))
set D47=40
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call SetPlayerState(M4D,PLAYER_STATE_RESOURCE_GOLD,0)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=false
set DL7=M7D
call MultiboardSetTitleText(DU7,GetObjectName('n0K6')+" - |c00ffffff"+GetObjectName('n0MY'))
call NN8(bj_FORCE_ALL_PLAYERS,15.,"|c006699CC"+GetObjectName('n0MZ')+"|r")
else
if GetTriggerEvalCount(t)>30 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MDD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DE7
local player M7D=DD7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and L_4[K0D]==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 K2D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K2D((K0D),-1)
endif
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function M9D))
set D47=30
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call SetPlayerState(M4D,PLAYER_STATE_RESOURCE_GOLD,0)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=true
set DL7=M7D
else
if GetTriggerEvalCount(t)>30 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MED takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local player p
local integer K0D=D97
local player M4D=DD7
local player M7D=DE7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and L_4[K0D]==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 K1D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K5D(K0D)
endif
call K8D(5)
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MDD))
set D47=30
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call SetPlayerState(M4D,PLAYER_STATE_RESOURCE_GOLD,0)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=true
set DL7=M7D
call MultiboardSetTitleText(DU7,GetObjectName('n0K6')+" - |c00ffffff"+GetObjectName('n0N0'))
call NN8(bj_FORCE_ALL_PLAYERS,15.,"|c006699CC"+GetObjectName('n0N1')+"|r")
else
if GetTriggerEvalCount(t)>40 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MFD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DE7
local player M7D=DD7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and L_4[K0D]==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 K1D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K5D(K0D)
endif
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MED))
set D47=40
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call SetPlayerState(M4D,PLAYER_STATE_RESOURCE_GOLD,0)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=false
set DL7=M7D
else
if GetTriggerEvalCount(t)>40 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MGD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DD7
local player M7D=DE7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and L_4[K0D]==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 K1D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K5D(K0D)
endif
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MFD))
set D47=40
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call SetPlayerState(M4D,PLAYER_STATE_RESOURCE_GOLD,0)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=false
set DL7=M7D
else
if GetTriggerEvalCount(t)>40 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MHD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DE7
local player M7D=DD7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and L_4[K0D]==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 K1D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K5D(K0D)
endif
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MGD))
set D47=40
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call SetPlayerState(M4D,PLAYER_STATE_RESOURCE_GOLD,0)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=false
set DL7=M7D
else
if GetTriggerEvalCount(t)>40 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MID takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DE7
local player M7D=DE7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and L_4[K0D]==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 K2D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K2D((K0D),-1)
endif
call K8D(4)
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MHD))
set D47=40
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=false
set DL7=M7D
call MultiboardSetTitleText(DU7,GetObjectName('n0K6')+" - |c00ffffff"+GetObjectName('n0L8'))
call NN8(bj_FORCE_ALL_PLAYERS,15.,"|c006699CC"+GetObjectName('n0L3')+"|r")
else
if GetTriggerEvalCount(t)>30 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MJD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DD7
local player M7D=DE7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and L_4[K0D]==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 K2D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K2D((K0D),-1)
endif
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MID))
set D47=30
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call SetPlayerState(M4D,PLAYER_STATE_RESOURCE_GOLD,0)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=true
set DL7=M7D
else
if GetTriggerEvalCount(t)>30 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MKD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DE7
local player M7D=DD7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and L_4[K0D]==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 K2D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K2D((K0D),-1)
endif
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MJD))
set D47=30
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call SetPlayerState(M4D,PLAYER_STATE_RESOURCE_GOLD,0)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=true
set DL7=M7D
else
if GetTriggerEvalCount(t)>30 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MMD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DD7
local player M7D=DE7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and L_4[K0D]==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 K2D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K2D((K0D),-1)
endif
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MKD))
set D47=30
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call SetPlayerState(M4D,PLAYER_STATE_RESOURCE_GOLD,0)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=true
set DL7=M7D
else
if GetTriggerEvalCount(t)>30 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MND takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DD7
local player M7D=DD7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and L_4[K0D]==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 K1D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K5D(K0D)
endif
call K8D(3)
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MMD))
set D47=30
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=true
set DL7=M7D
call MultiboardSetTitleText(DU7,GetObjectName('n0K6')+" - |c00ffffff"+GetObjectName('n0L7'))
call NN8(bj_FORCE_ALL_PLAYERS,15.,"|c006699CC"+GetObjectName('n0L4')+"|r")
else
if GetTriggerEvalCount(t)>40 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MOD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DE7
local player M7D=DD7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and L_4[K0D]==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 K1D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K5D(K0D)
endif
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MND))
set D47=40
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call SetPlayerState(M4D,PLAYER_STATE_RESOURCE_GOLD,0)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=false
set DL7=M7D
else
if GetTriggerEvalCount(t)>40 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MPD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DE7
local player M7D=DE7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and L_4[K0D]==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 K1D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K5D(K0D)
endif
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MOD))
set D47=40
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=false
set DL7=M7D
else
if GetTriggerEvalCount(t)>40 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MQD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DD7
local player M7D=DE7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and L_4[K0D]==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 K1D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K5D(K0D)
endif
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MPD))
set D47=40
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call SetPlayerState(M4D,PLAYER_STATE_RESOURCE_GOLD,0)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=false
set DL7=M7D
else
if GetTriggerEvalCount(t)>40 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MRD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DE7
local player M7D=DD7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and L_4[K0D]==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 K2D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K2D((K0D),-1)
endif
call K8D(2)
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MQD))
set D47=40
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call SetPlayerState(M4D,PLAYER_STATE_RESOURCE_GOLD,0)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=false
set DL7=M7D
call MultiboardSetTitleText(DU7,GetObjectName('n0K6')+" - |c00ffffff"+GetObjectName('n0L9'))
call NN8(bj_FORCE_ALL_PLAYERS,15.,"|c006699CC"+GetObjectName('n0L5')+"|r")
else
if GetTriggerEvalCount(t)>30 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MSD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DD7
local player M7D=DE7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and L_4[K0D]==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 K2D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K2D((K0D),-1)
endif
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MRD))
set D47=30
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call SetPlayerState(M4D,PLAYER_STATE_RESOURCE_GOLD,0)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=true
set DL7=M7D
else
if GetTriggerEvalCount(t)>30 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MTD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DE7
local player M7D=DD7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and L_4[K0D]==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 K2D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K2D((K0D),-1)
endif
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MSD))
set D47=30
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call SetPlayerState(M4D,PLAYER_STATE_RESOURCE_GOLD,0)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=true
set DL7=M7D
else
if GetTriggerEvalCount(t)>30 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MUD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer K0D=D97
local player M4D=DD7
local player M7D=DE7
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and L_4[K0D]==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 K2D(K0D,GetUnitPointValue(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
else
call K2D((K0D),-1)
endif
call EA8(t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MTD))
set D47=30
set D77=M7D
set D97=J6D()
call SetPlayerState(M7D,PLAYER_STATE_RESOURCE_GOLD,250)
call SetPlayerState(M4D,PLAYER_STATE_RESOURCE_GOLD,0)
call PM8(M7D,"Sound\\Interface\\Rescue.wav")
set E07=true
set DL7=M7D
else
if GetTriggerEvalCount(t)>30 then
if L_4[K0D]>0 then
set L_4[K0D]=L_4[K0D]-1
endif
else
set D47=D47-1
endif
endif
set t=null
set M7D=null
return false
endfunction
function MVD takes nothing returns boolean
local trigger t=CreateTrigger()
set L54=true
call EA8(GetTriggeringTrigger())
if L04==false then
call NN8(bj_FORCE_ALL_PLAYERS,15.,W[GetPlayerId(DD7)]+(KW4[GetPlayerId((DD7))])+"|r "+GetObjectName('n0EA'))
endif
set D77=DD7
set D47=30
call SetPlayerState(DD7,PLAYER_STATE_RESOURCE_GOLD,250)
call PM8(DD7,"Sound\\Interface\\Rescue.wav")
call K8D(1)
call NN8(GetPlayersAll(),15.,"|c006699CC"+GetObjectName('n0L6')+"|r")
call MultiboardSetTitleText(DU7,GetObjectName('n0K6')+" - |c00ffffff"+GetObjectName('n0LA'))
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function MUD))
set D17=true
set E07=true
set DL7=DD7
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function JXD))
set t=null
return false
endfunction
function JMD takes nothing returns nothing
local trigger t
local location E_D=GetRectCenter(ZD)
local location F4D=GetRectCenter(qr)
local integer x=1
local player p
call DisableTrigger(RA4)
loop
exitwhen x>5
if KQ8(G8[x])then
call CreateUnitAtLoc(G8[x],'n00C',F4D,bj_UNIT_FACING)
endif
if KQ8(N8[x])then
call CreateUnitAtLoc(N8[x],'n00C',E_D,bj_UNIT_FACING)
endif
set x=x+1
endloop
call RemoveLocation(E_D)
call RemoveLocation(F4D)
set TT4=true
set X9=false
set W9=false
set N54=false
call SuspendTimeOfDay(true)
call DisableTrigger(M64)
call DisableTrigger(MC4)
if DZ7==false then
call JZD()
endif
set L14[GetPlayerId(G8[1])]=GetPlayerState(G8[1],PLAYER_STATE_RESOURCE_GOLD)
set L14[GetPlayerId(G8[2])]=GetPlayerState(G8[2],PLAYER_STATE_RESOURCE_GOLD)
set L14[GetPlayerId(G8[3])]=GetPlayerState(G8[3],PLAYER_STATE_RESOURCE_GOLD)
set L14[GetPlayerId(G8[4])]=GetPlayerState(G8[4],PLAYER_STATE_RESOURCE_GOLD)
set L14[GetPlayerId(G8[5])]=GetPlayerState(G8[5],PLAYER_STATE_RESOURCE_GOLD)
set L14[GetPlayerId(N8[1])]=GetPlayerState(N8[1],PLAYER_STATE_RESOURCE_GOLD)
set L14[GetPlayerId(N8[2])]=GetPlayerState(N8[2],PLAYER_STATE_RESOURCE_GOLD)
set L14[GetPlayerId(N8[3])]=GetPlayerState(N8[3],PLAYER_STATE_RESOURCE_GOLD)
set L14[GetPlayerId(N8[4])]=GetPlayerState(N8[4],PLAYER_STATE_RESOURCE_GOLD)
set L14[GetPlayerId(N8[5])]=GetPlayerState(N8[5],PLAYER_STATE_RESOURCE_GOLD)
call SetPlayerState(G8[1],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(G8[2],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(G8[3],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(G8[4],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(G8[5],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(N8[1],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(N8[2],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(N8[3],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(N8[4],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(N8[5],PLAYER_STATE_RESOURCE_GOLD,0)
set D87=GetRandomInt(1,2)
set L04=false
set D97=D87
if D87==1 then
set DD7=G8[1]
set DE7=N8[1]
else
set DD7=N8[1]
set DE7=G8[1]
endif
set DF7=1
set DG7=2
set L_4[1]=DQ7
set L_4[2]=DQ7
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,15-TimerGetElapsed(E4),false)
call TriggerAddCondition(t,Condition(function MVD))
call KSD()
call NN8(GetPlayersAll(),4.,GetObjectName('n0ES'))
call NN8(GetPlayersAll(),4.,GetObjectName('n0ER'))
set t=null
set E_D=null
set F4D=null
set p=null
endfunction
function MWD takes player p,integer z8 returns nothing
local integer i=1
loop
exitwhen i>5
if p!=G8[i]then
call SetPlayerTechMaxAllowed(G8[i],z8,0)
endif
if p!=N8[i]then
call SetPlayerTechMaxAllowed(N8[i],z8,0)
endif
set i=i+1
endloop
endfunction
function MXD takes integer MYD returns integer
local integer MZD
if MYD==1 then
set MZD=GetUnitPointValueByType(K14[GetRandomInt(1,K04)])
elseif MYD==2 then
set MZD=GetUnitPointValueByType(K54[GetRandomInt(1,K24)])
elseif MYD==3 then
set MZD=GetUnitPointValueByType(K_4[GetRandomInt(1,M44)])
endif
return MZD
endfunction
function MAD takes integer MBD,integer MCD,integer MYD returns integer
local integer MZD
set MZD=MXD(MYD)
if E9 and MBD!=MZD and MCD!=MZD then
return MZD
endif
loop
exitwhen O[MZD]==false and MBD!=MZD and MCD!=MZD
set MZD=MXD(MYD)
endloop
set O[MZD]=true
return MZD
endfunction
function IYD takes nothing returns nothing
local player p
local integer i=1
local integer MBD
local integer MCD
local integer M3D
local trigger t
local integer EC8
set VT=true
set RD4='x'
set W9=false
set X9=false
call PauseUnit(MM4,true)
call PauseUnit(MN4,true)
call PauseUnit(MO4,true)
call PauseUnit(MP4,true)
call PauseUnit(MQ4,true)
call PauseUnit(MR4,true)
call PauseUnit(MS4,true)
call PauseUnit(MT4,true)
call PauseUnit(MU4,true)
call PauseUnit(MV4,true)
call PauseUnit(MW4,true)
call PauseUnit(MX4,true)
call DisableTrigger(RA4)
loop
exitwhen i>5
set p=G8[i]
set MBD=0
set MCD=0
set M3D=0
if KS8(p)then
call UnitAddAbility(KR4[GetPlayerId(p)],'A14F')
call UnitAddAbility(KR4[GetPlayerId(p)],'A14E')
call UnitAddAbility(KR4[GetPlayerId(p)],'A14H')
set MBD=MAD(MBD,MCD,1)
set MCD=MAD(MBD,MCD,2)
set M3D=MAD(MBD,MCD,3)
call AddUnitToStock(KR4[GetPlayerId(p)],KA4[MBD],1,1)
call MWD(p,KA4[MBD])
call AddUnitToStock(KR4[GetPlayerId(p)],KA4[MCD],1,1)
call MWD(p,KA4[MCD])
call AddUnitToStock(KR4[GetPlayerId(p)],KA4[M3D],1,1)
call MWD(p,KA4[M3D])
call ClearSelectionForPlayer(p)
call SelectUnitAddForPlayer(KR4[GetPlayerId(p)],p)
call PanCameraToTimedForPlayer(p,GetRectCenterX(QD),GetRectCenterY(QD),0)
call DisplayTimedTextToPlayer(p,0,V9,15," ")
call DisplayTimedTextToPlayer(p,0,V9,15," ")
call DisplayTimedTextToPlayer(p,0,V9,15," ")
call DisplayTimedTextToPlayer(p,0,V9,15,"|cff99ccff"+(GetObjectName(('n0E6')))+"|r")
call DisplayTimedTextToPlayer(p,0,V9,15," ")
endif
set p=N8[i]
set MBD=0
set MCD=0
set M3D=0
if KS8(p)then
call UnitAddAbility(KR4[GetPlayerId(p)],'A14F')
call UnitAddAbility(KR4[GetPlayerId(p)],'A14E')
call UnitAddAbility(KR4[GetPlayerId(p)],'A14H')
set MBD=MAD(MBD,MCD,1)
set MCD=MAD(MBD,MCD,2)
set M3D=MAD(MBD,MCD,3)
call AddUnitToStock(KR4[GetPlayerId(p)],KA4[MBD],1,1)
call MWD(p,KA4[MBD])
call AddUnitToStock(KR4[GetPlayerId(p)],KA4[MCD],1,1)
call MWD(p,KA4[MCD])
call AddUnitToStock(KR4[GetPlayerId(p)],KA4[M3D],1,1)
call MWD(p,KA4[M3D])
call ClearSelectionForPlayer(p)
call SelectUnitAddForPlayer(KR4[GetPlayerId(p)],p)
call PanCameraToTimedForPlayer(p,GetRectCenterX(PD),GetRectCenterY(PD),0)
call DisplayTimedTextToPlayer(p,0,V9,15," ")
call DisplayTimedTextToPlayer(p,0,V9,15," ")
call DisplayTimedTextToPlayer(p,0,V9,15," ")
call DisplayTimedTextToPlayer(p,0,V9,15,"|cff99ccff"+(GetObjectName(('n0E6')))+"|r")
call DisplayTimedTextToPlayer(p,0,V9,15," ")
endif
set i=i+1
endloop
set p=null
set t=null
endfunction
function M6D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer PH9=LInt(EC8,"Index")
local player p
local integer MV8
local location XX8=GetRectCenter(QD)
local location XY8=GetRectCenter(PD)
if PH9<6 then
set p=G8[PH9]
elseif PH9<11 then
set p=N8[PH9-5]
endif
if PH9>10 then
call LT7(EC8)
call EA8(t)
if T4==false and SC4==false then
set X9=true
endif
elseif PH9<6 then
call SInt(EC8,"Index",PH9+1)
set Y7[GetPlayerId(p)]=null
if KS8(p)then
loop
exitwhen Y7[GetPlayerId(p)]!=null
if GetPlayerController(p)==MAP_CONTROL_USER and SC4 then
set MV8=500
elseif SC4 then
set MV8=MT8()
else
set MV8=MU8()
endif
if O[MV8]==false then
if not E9 and not SC4 then
set O[MV8]=true
endif
set Y7[GetPlayerId(p)]=CreateUnitAtLoc(p,KA4[MV8],XX8,bj_UNIT_FACING)
endif
endloop
endif
elseif PH9<11 then
call SInt(EC8,"Index",PH9+1)
set Y7[GetPlayerId(p)]=null
if KS8(p)then
loop
exitwhen Y7[GetPlayerId(p)]!=null
if p==V8 and SC4 then
set MV8=500
elseif SC4 then
set MV8=MT8()
else
set MV8=MU8()
endif
if O[MV8]==false then
if not E9 then
set O[MV8]=true
endif
set Y7[GetPlayerId(p)]=CreateUnitAtLoc(p,KA4[MV8],XY8,bj_UNIT_FACING)
endif
endloop
endif
endif
call RemoveLocation(XX8)
call RemoveLocation(XY8)
set XX8=null
set XY8=null
set p=null
set t=null
return false
endfunction
function IVD takes nothing returns nothing
local location XX8=GetRectCenter(QD)
local location XY8=GetRectCenter(PD)
local location MLD=GetRectCenter(QD)
local location M1D=GetRectCenter(PD)
local integer T8=1
local integer U8=5
local integer MV8
local trigger t
set V4=true
set W9=false
if not E9 then
call MN8()
endif
call DisableTrigger(RA4)
set E7=400
call PanCameraToTimedLocForPlayer(G8[1],MLD,0)
call PanCameraToTimedLocForPlayer(G8[2],MLD,0)
call PanCameraToTimedLocForPlayer(G8[3],MLD,0)
call PanCameraToTimedLocForPlayer(G8[4],MLD,0)
call PanCameraToTimedLocForPlayer(G8[5],MLD,0)
call PanCameraToTimedLocForPlayer(N8[1],M1D,0)
call PanCameraToTimedLocForPlayer(N8[2],M1D,0)
call PanCameraToTimedLocForPlayer(N8[3],M1D,0)
call PanCameraToTimedLocForPlayer(N8[4],M1D,0)
call PanCameraToTimedLocForPlayer(N8[5],M1D,0)
if HO4 then
loop
set MV8=MU8()
exitwhen O[MV8]==false
endloop
if IsJWPlayer(V8)then
set Y7[GetPlayerId(V8)]=CreateUnit(V8,KA4[MV8],GetLocationX(XX8),GetLocationY(XX8),270)
else
set Y7[GetPlayerId(V8)]=CreateUnit(V8,KA4[MV8],GetLocationX(XY8),GetLocationY(XY8),270)
endif
call RemoveLocation(XX8)
call RemoveLocation(XY8)
call RemoveLocation(MLD)
call RemoveLocation(M1D)
set XX8=null
set XY8=null
set MLD=null
set M1D=null
set t=null
return
endif
set X9=false
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function M6D))
call SInt(GetHandleId(t),"Index",1)
call RemoveLocation(XX8)
call RemoveLocation(XY8)
call RemoveLocation(MLD)
call RemoveLocation(M1D)
set XX8=null
set XY8=null
set MLD=null
set M1D=null
set t=null
endfunction
function Q2 takes nothing returns nothing
call PA8(GetEnumUnit())
endfunction
function Q3 takes unit N28 returns nothing
local integer Q4=GetPlayerId(GetOwningPlayer(N28))
set se[Q4]=UnitItemInSlot(N28,0)
set Se[Q4]=UnitItemInSlot(N28,1)
set We[Q4]=UnitItemInSlot(N28,2)
set ze[Q4]=UnitItemInSlot(N28,3)
set Ze[Q4]=UnitItemInSlot(N28,4)
set vx[Q4]=UnitItemInSlot(N28,5)
endfunction
function Q5 takes player h5,player h6 returns integer
local unit Q6=Y7[GetPlayerId(h5)]
local unit Q7=Y7[GetPlayerId(h6)]
call UnitRemoveBuffs(Q6,true,true)
call UnitRemoveBuffs(Q7,true,true)
if Q6==null and Q7==null then
call NN8(bj_FORCE_ALL_PLAYERS,15,W[GetPlayerId(G8[0])]+NM8(h5)+" and "+NM8(h6)+" did not pick a hero so they have no hero to be assigned.|r")
elseif GetRandomInt(1,2)==1 then
if(Q6!=null)then
return GetUnitTypeId(Q6)
else
return GetUnitTypeId(Q7)
endif
else
if(Q7!=null)then
return GetUnitTypeId(Q7)
else
return GetUnitTypeId(Q6)
endif
endif
call NN8(bj_FORCE_ALL_PLAYERS,15,W[GetPlayerId(G8[0])]+NM8(h5)+" and "+NM8(h6)+" have not picked a hero. They will be given a random hero!")
return MU8()
endfunction
function Q8 takes nothing returns nothing
if(GetUnitTypeId(GetEnumUnit())=='n004')then
call RemoveUnit(GetEnumUnit())
endif
if(GetUnitTypeId(GetEnumUnit())=='o003')then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function Q9 takes nothing returns boolean
local integer T8
local group ra=OG8()
local unit rA
local location MLD=GetRectCenter(QD)
local location M1D=GetRectCenter(PD)
local integer rb=MI8(E8)
local player array rB
local player array rc
local integer x
local integer y
local real rC
local real rd
local real rD
local integer re
local group XS8=WO7(GetWorldBounds(),null)
call ForGroup(XS8,function Q8)
call OF8(XS8)
set T8=1
set x=1
set y=1
loop
exitwhen T8>5
if(KS8(G8[T8]))then
call Q3(Y7[GetPlayerId(G8[T8])])
call GroupAddUnit(ra,Y7[GetPlayerId(G8[T8])])
set rB[x]=G8[T8]
set x=x+1
endif
if(KS8(N8[T8]))then
call Q3(Y7[GetPlayerId(N8[T8])])
call GroupAddUnit(ra,Y7[GetPlayerId(N8[T8])])
set rc[y]=N8[T8]
set y=y+1
endif
set T8=T8+1
endloop
set x=1
loop
exitwhen x>rb
set re=Q5(rB[x],rc[x])
if(Y7[GetPlayerId(rB[x])]==null)then
set rC=GetLocationX(MLD)+GetRandomReal(1,40)
set rd=GetLocationY(MLD)+GetRandomReal(1,40)
set rD=270
else
set rC=GetUnitX(Y7[GetPlayerId(rB[x])])
set rd=GetUnitY(Y7[GetPlayerId(rB[x])])
set rD=GetUnitFacing(Y7[GetPlayerId(rB[x])])
call SetUnitPathing(Y7[GetPlayerId(rB[x])],false)
endif
set Y7[GetPlayerId(rB[x])]=CreateUnit(rB[x],re,rC,rd,rD)
call SetUnitPathing(Y7[GetPlayerId(rB[x])],false)
call SetUnitPosition(Y7[GetPlayerId(rB[x])],rC,rd)
call UnitAddItem(Y7[GetPlayerId(rB[x])],se[GetPlayerId(rB[x])])
call UnitAddItem(Y7[GetPlayerId(rB[x])],Se[GetPlayerId(rB[x])])
call UnitAddItem(Y7[GetPlayerId(rB[x])],We[GetPlayerId(rB[x])])
call UnitAddItem(Y7[GetPlayerId(rB[x])],ze[GetPlayerId(rB[x])])
call UnitAddItem(Y7[GetPlayerId(rB[x])],Ze[GetPlayerId(rB[x])])
call UnitAddItem(Y7[GetPlayerId(rB[x])],vx[GetPlayerId(rB[x])])
call ClearSelectionForPlayer(rB[x])
call SelectUnitAddForPlayer(Y7[GetPlayerId(rB[x])],rB[x])
call PanCameraToTimedForPlayer(rB[x],rC,rd,0)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Awaken\\Awaken.mdl",rC,rd))
if(Y7[GetPlayerId(rc[x])]==null)then
set rC=GetLocationX(M1D)
set rd=GetLocationY(M1D)
set rD=270
else
set rC=GetUnitX(Y7[GetPlayerId(rc[x])])
set rd=GetUnitY(Y7[GetPlayerId(rc[x])])
set rD=GetUnitFacing(Y7[GetPlayerId(rc[x])])
call SetUnitPathing(Y7[GetPlayerId(rc[x])],false)
endif
set Y7[GetPlayerId(rc[x])]=CreateUnit(rc[x],re,rC,rd,rD)
call SetUnitPathing(Y7[GetPlayerId(rc[x])],false)
call SetUnitPosition(Y7[GetPlayerId(rc[x])],rC,rd)
call UnitAddItem(Y7[GetPlayerId(rc[x])],se[GetPlayerId(rc[x])])
call UnitAddItem(Y7[GetPlayerId(rc[x])],Se[GetPlayerId(rc[x])])
call UnitAddItem(Y7[GetPlayerId(rc[x])],We[GetPlayerId(rc[x])])
call UnitAddItem(Y7[GetPlayerId(rc[x])],ze[GetPlayerId(rc[x])])
call UnitAddItem(Y7[GetPlayerId(rc[x])],Ze[GetPlayerId(rc[x])])
call UnitAddItem(Y7[GetPlayerId(rc[x])],vx[GetPlayerId(rc[x])])
call ClearSelectionForPlayer(rc[x])
call SelectUnitAddForPlayer(Y7[GetPlayerId(rc[x])],rc[x])
call PanCameraToTimedForPlayer(rc[x],rC,rd,0)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Awaken\\Awaken.mdl",rC,rd))
set x=x+1
endloop
call ForGroup(ra,function Q2)
call OF8(ra)
set x=1
loop
exitwhen x>rb
call SetUnitPathing(Y7[GetPlayerId(rB[x])],true)
call SetUnitPathing(Y7[GetPlayerId(rc[x])],true)
set x=x+1
endloop
call RemoveLocation(MLD)
call RemoveLocation(M1D)
set ra=null
set rA=null
set MLD=null
set M1D=null
set XS8=null
return false
endfunction
function rE takes nothing returns boolean
set AJ=true
return false
endfunction
function rf takes nothing returns boolean
set X9=false
set W9=false
call MN8()
return false
endfunction
function IND takes nothing returns nothing
local trigger t=CreateTrigger()
call NN8(T9,10,"Your hero might change at the 60 second mark.")
call NN8(T9,10,"It is recommended to not purchase items until then.")
set D9=true
call MJ8('H00I')
call TriggerRegisterTimerEvent(t,60-TimerGetElapsed(E4),false)
call TriggerAddCondition(t,Condition(function Q9))
set t=CreateTrigger()
call TriggerAddCondition(t,Condition(function rf))
call TriggerRegisterTimerEvent(t,57-TimerGetElapsed(E4),false)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,55+60-TimerGetElapsed(E4),false)
call TriggerAddCondition(t,Condition(function rE))
set t=null
endfunction
function IXD takes nothing returns nothing
local location XX8=GetRectCenter(XD)
local location XY8=GetRectCenter(WD)
local location MLD=GetRectCenter(QD)
local location M1D=GetRectCenter(PD)
local integer T8
local integer U8
local integer MV8
if not E9 then
call MN8()
endif
call DisableTrigger(RA4)
set W4=true
set E7=400
set W9=false
call PanCameraToTimedLocForPlayer(G8[1],MLD,0)
call PanCameraToTimedLocForPlayer(G8[2],MLD,0)
call PanCameraToTimedLocForPlayer(G8[3],MLD,0)
call PanCameraToTimedLocForPlayer(G8[4],MLD,0)
call PanCameraToTimedLocForPlayer(G8[5],MLD,0)
call PanCameraToTimedLocForPlayer(N8[1],M1D,0)
call PanCameraToTimedLocForPlayer(N8[2],M1D,0)
call PanCameraToTimedLocForPlayer(N8[3],M1D,0)
call PanCameraToTimedLocForPlayer(N8[4],M1D,0)
call PanCameraToTimedLocForPlayer(N8[5],M1D,0)
if HO4 then
if IsJWPlayer(V8)then
loop
set MV8=GetRandomInt(KC4,K34)
exitwhen O[MV8]==false
endloop
set Y7[GetPlayerId(V8)]=CreateUnit(V8,KA4[MV8],GetLocationX(XX8),GetLocationY(XX8),270)
else
loop
set MV8=GetRandomInt(K64,KL4)
exitwhen O[MV8]==false
endloop
set Y7[GetPlayerId(V8)]=CreateUnit(V8,KA4[MV8],GetLocationX(XY8),GetLocationY(XY8),270)
endif
call RemoveLocation(XX8)
call RemoveLocation(XY8)
call RemoveLocation(MLD)
call RemoveLocation(M1D)
return
endif
set X9=false
set T8=1
set U8=5
loop
exitwhen T8>U8
set Y7[GetPlayerId(G8[T8])]=null
if(KS8(G8[T8]))then
loop
set MV8=GetRandomInt(KC4,K34)
if(O[MV8]==false)then
if not E9 then
set O[MV8]=true
endif
set Y7[GetPlayerId(G8[T8])]=CreateUnitAtLoc(G8[T8],KA4[MV8],XX8,bj_UNIT_FACING)
endif
exitwhen(Y7[GetPlayerId(G8[T8])]!=null)
endloop
endif
set T8=T8+1
endloop
set T8=1
set U8=5
loop
exitwhen T8>U8
set Y7[GetPlayerId(N8[T8])]=null
if(KS8(N8[T8]))then
loop
set MV8=GetRandomInt(K64,KL4)
if(O[MV8]==false)then
if not E9 then
set O[MV8]=true
endif
set Y7[GetPlayerId(N8[T8])]=CreateUnitAtLoc(N8[T8],KA4[MV8],XY8,bj_UNIT_FACING)
endif
exitwhen(Y7[GetPlayerId(N8[T8])]!=null)
endloop
endif
set T8=T8+1
endloop
set X9=true
call RemoveLocation(XX8)
call RemoveLocation(XY8)
call RemoveLocation(MLD)
call RemoveLocation(M1D)
set XX8=null
set XY8=null
set MLD=null
set M1D=null
endfunction
function rF takes nothing returns nothing
set P74=true
call NN8(bj_FORCE_ALL_PLAYERS,10,"No Deaths has been enabled. You will have no respawn time.")
call DisableTrigger(GetTriggeringTrigger())
endfunction
function rg takes nothing returns nothing
local integer rG=S2I(SubString(GetEventPlayerChatString(),6,StringLength(GetEventPlayerChatString())))
if rG>P84 then
call ShowWarningToPlayer(V8,"Too many lives")
elseif rG<10 then
call ShowWarningToPlayer(V8,"Too few lives")
else
set P84=rG
call NN8(bj_FORCE_ALL_PLAYERS,10,"Each team has "+I2S(P84)+" lives before they lose the game.")
call DisableTrigger(GetTriggeringTrigger())
endif
endfunction
function rh takes nothing returns nothing
call DisableTrigger(LTrig(GetHandleId(GetTriggeringTrigger()),"nd"))
call DisableTrigger(LTrig(GetHandleId(GetTriggeringTrigger()),"lives"))
call DisableTrigger(GetTriggeringTrigger())
endfunction
function M0D takes nothing returns nothing
local trigger ri=CreateTrigger()
local trigger rI=CreateTrigger()
local trigger nd=CreateTrigger()
set P84=PC8(K34,KL4-K64+1)
call NN8(bj_FORCE_ALL_PLAYERS,10.," ")
call NN8(bj_FORCE_ALL_PLAYERS,10.,"Extra commands: -nd and -lives xx can be entered in the following 15 seconds. ")
call NN8(bj_FORCE_ALL_PLAYERS,10.,"Current DM lives are "+I2S(P84))
call TriggerRegisterTimerEvent(ri,15.,false)
call TriggerAddAction(ri,function rh)
call STrig(GetHandleId(ri),"nd",nd)
call STrig(GetHandleId(ri),"lives",rI)
call TriggerRegisterPlayerChatEvent(nd,V8,"-nd",true)
call TriggerAddAction(nd,function rF)
call TriggerRegisterPlayerChatEvent(rI,V8,"-lives",false)
call TriggerAddAction(rI,function rg)
endfunction
function M5D takes nothing returns nothing
local integer rJ=LInt(GetHandleId(GetTriggeringTrigger()),"PlayerId")
local integer T8
local integer U8
local integer MV8
local integer QM
local location XX8=GetRectCenter(ZD)
local location XY8=GetRectCenter(qr)
if U9 then
return
endif
if IsJWPlayer(Player(rJ))then
set T8=KC4
set U8=K34
set QM=0
else
set T8=K64
set U8=KL4
set QM=1
endif
if X4 then
set T8=KC4
set U8=KL4
if IsJWPlayer(Player(rJ))then
call CreateUnitAtLoc(Player(rJ),'n00C',XX8,bj_UNIT_FACING)
call CreateUnitAtLoc(Player(rJ),'n00C',XY8,bj_UNIT_FACING)
else
call CreateUnitAtLoc(Player(rJ),'n00C',XX8,bj_UNIT_FACING)
call CreateUnitAtLoc(Player(rJ),'n00C',XY8,bj_UNIT_FACING)
endif
endif
if((not V4)and(GetPlayerController(Player(rJ))==MAP_CONTROL_USER))then
loop
exitwhen T8>U8
if O[T8]==false then
call SetPlayerTechMaxAllowed(Player(rJ),KA4[T8],1)
endif
set T8=T8+1
endloop
if(GetPlayerState(Player(rJ),PLAYER_STATE_RESOURCE_GOLD)<250)then
call SetPlayerState(Player(rJ),PLAYER_STATE_RESOURCE_GOLD,250)
endif
elseif(B7[QM]<P84)then
set Y7[rJ]=null
if KS8(Player(rJ))then
loop
if(V4)then
set MV8=MU8()
elseif SC4 then
set MV8=MT8()
elseif(((not X4)and(IsJWPlayer(Player(rJ))))or((X4)and(GetRandomInt(1,2)==1)))then
set MV8=GetRandomInt(KC4,K34)
else
set MV8=GetRandomInt(K64,KL4)
endif
if O[MV8]==false then
if SC4==false then
set O[MV8]=true
endif
if IsJWPlayer(Player(rJ))then
set Y7[rJ]=CreateUnitAtLoc(Player(rJ),KA4[MV8],XX8,bj_UNIT_FACING)
else
set Y7[rJ]=CreateUnitAtLoc(Player(rJ),KA4[MV8],XY8,bj_UNIT_FACING)
endif
endif
exitwhen Y7[rJ]!=null
endloop
endif
endif
call RemoveLocation(XX8)
call RemoveLocation(XY8)
set XX8=null
set XY8=null
if not V4 then
endif
endfunction
function IMD takes nothing returns nothing
local location Mk
local real CPv
local trigger t
local integer rk
local integer x
set T4=true
call MJ8('H00I')
call MJ8('N01W')
set x=1
loop
exitwhen x>5
set rk=GetPlayerId(G8[x])
set t=CreateTrigger()
call TriggerRegisterTimerExpireEvent(t,L[rk])
call TriggerAddAction(t,function M5D)
call SInt(GetHandleId(t),"PlayerId",rk)
set rk=GetPlayerId(N8[x])
set t=CreateTrigger()
call TriggerRegisterTimerExpireEvent(t,L[rk])
call TriggerAddAction(t,function M5D)
call SInt(GetHandleId(t),"PlayerId",rk)
set x=x+1
endloop
call UnitRemoveAbility(KG4,'Aawa')
call UnitRemoveAbility(KH4,'Aawa')
call UnitRemoveAbility(KI4,'Aawa')
call UnitRemoveAbility(KJ4,'Aawa')
call UnitRemoveAbility(KK4,'Aawa')
call UnitRemoveAbility(KM4,'Aawa')
call UnitRemoveAbility(KN4,'Aawa')
call UnitRemoveAbility(KO4,'Aawa')
call UnitRemoveAbility(KP4,'Aawa')
call UnitRemoveAbility(KQ4,'Aawa')
call ExecuteFunc("M0D")
endfunction
function JID takes nothing returns nothing
local location P0=GetRectCenter(XD)
local location P3=GetRectCenter(WD)
local location Qn=GetRectCenter(QD)
local location QN=GetRectCenter(PD)
local integer hK=1
local integer hl=5
local trigger t
local integer rk
local integer x
set SC4=true
set P84=9999999
call MJ8('H00I')
call MJ8('N01W')
call MJ8('H00U')
call MJ8('Nfir')
set x=KC4
loop
exitwhen x>KL4
set A0[x]=false
set x=x+1
endloop
set x=1
loop
exitwhen x>5
if GetPlayerController(G8[x])==MAP_CONTROL_COMPUTER then
set rk=GetPlayerId(G8[x])
set t=CreateTrigger()
call TriggerRegisterTimerExpireEvent(t,L[rk])
call TriggerAddAction(t,function M5D)
call SInt(GetHandleId(t),"PlayerId",rk)
endif
if GetPlayerController(N8[x])==MAP_CONTROL_COMPUTER then
set rk=GetPlayerId(N8[x])
set t=CreateTrigger()
call TriggerRegisterTimerExpireEvent(t,L[rk])
call TriggerAddAction(t,function M5D)
call SInt(GetHandleId(t),"PlayerId",rk)
endif
set x=x+1
endloop
call DisableTrigger(RA4)
set W9=false
call MN8()
set E7=400
set X9=false
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function M6D))
call SInt(GetHandleId(t),"Index",1)
call RemoveLocation(P0)
call RemoveLocation(P3)
call RemoveLocation(Qn)
call RemoveLocation(QN)
set P0=null
set P3=null
set Qn=null
set QN=null
set t=null
endfunction
function IZD takes nothing returns nothing
local integer rK=GetRandomInt(1,4)
set Ox=true
if(rK==1)then
call NN8(bj_FORCE_ALL_PLAYERS,20.,"AP has been randomly selected as your mode!")
call NN8(bj_FORCE_ALL_PLAYERS,20.," ")
call ExecuteFunc("IWD")
elseif(rK==2)then
call NN8(bj_FORCE_ALL_PLAYERS,20.,"AR has been randomly selected as your mode!")
call NN8(bj_FORCE_ALL_PLAYERS,20.," ")
call ExecuteFunc("IVD")
elseif(rK==3)then
call NN8(bj_FORCE_ALL_PLAYERS,20.,"TR has been randomly selected as your mode!")
call NN8(bj_FORCE_ALL_PLAYERS,20.," ")
call ExecuteFunc("IXD")
elseif(rK==4)then
call NN8(bj_FORCE_ALL_PLAYERS,20.,"Normal has been randomly selected as your mode!")
call NN8(bj_FORCE_ALL_PLAYERS,20.," ")
endif
endfunction
function IUD takes nothing returns nothing
set E9=true
call MJ8('H00I')
call MJ8('N0MU')
endfunction
function IJD takes nothing returns nothing
local integer M2D=MI8(E8)
local integer XV8=MI8(F8)
local integer D5=M2D+XV8
local integer T8
local integer M_D
local integer x
local integer y
local integer z
local player array N4D
local player array N7D
local integer w
local integer N8D
local integer N9D
local location MLD=GetRectCenter(QD)
local location M1D=GetRectCenter(PD)
local location XX8=GetRectCenter(ZD)
local location XY8=GetRectCenter(qr)
set ge=true
call JE9(G8[1])
call JE9(G8[2])
call JE9(G8[3])
call JE9(G8[4])
call JE9(G8[5])
call JE9(N8[1])
call JE9(N8[2])
call JE9(N8[3])
call JE9(N8[4])
call JE9(N8[5])
set x=1
loop
exitwhen x>5
if KS8(G8[x])then
call CreateUnitAtLoc(G8[x],'n00C',XX8,bj_UNIT_FACING)
call CreateUnitAtLoc(G8[x],'n00C',XY8,bj_UNIT_FACING)
endif
if KS8(N8[x])then
call CreateUnitAtLoc(N8[x],'n00C',XX8,bj_UNIT_FACING)
call CreateUnitAtLoc(N8[x],'n00C',XY8,bj_UNIT_FACING)
endif
set x=x+1
endloop
call RemoveLocation(XX8)
call RemoveLocation(XY8)
set N8D=GetPlayerState(G8[1],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(G8[2],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(G8[3],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(G8[4],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(G8[5],PLAYER_STATE_RESOURCE_GOLD)
set N9D=GetPlayerState(N8[1],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(N8[2],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(N8[3],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(N8[4],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(N8[5],PLAYER_STATE_RESOURCE_GOLD)
set N4D[1]=null
set N4D[2]=null
set N4D[3]=null
set N4D[4]=null
set N4D[5]=null
set N4D[6]=null
set N4D[7]=null
set N4D[8]=null
set N4D[9]=null
set N4D[10]=null
set z=1
set w=1
set T8=1
loop
exitwhen T8>5
if(KS8(G8[T8]))then
set N4D[w]=G8[T8]
set w=w+1
else
set N7D[z]=G8[T8]
set z=z+1
endif
set T8=T8+1
endloop
set T8=1
loop
exitwhen T8>5
if(KS8(N8[T8]))then
set N4D[w]=N8[T8]
set w=w+1
else
set N7D[z]=N8[T8]
set z=z+1
endif
set T8=T8+1
endloop
set G8[1]=null
set G8[2]=null
set G8[3]=null
set G8[4]=null
set G8[5]=null
set N8[1]=null
set N8[2]=null
set N8[3]=null
set N8[4]=null
set N8[5]=null
set T8=1
loop
exitwhen T8>(D5/ 2)
set M_D=GetRandomInt(1,D5)
if(N4D[M_D]!=null)then
set G8[T8]=N4D[M_D]
set N4D[M_D]=null
set T8=T8+1
endif
endloop
set x=T8
set T8=1
loop
exitwhen T8>D5-x+1
set M_D=GetRandomInt(1,D5)
if(N4D[M_D]!=null)then
set N8[T8]=N4D[M_D]
set N4D[M_D]=null
set T8=T8+1
endif
endloop
set z=T8
set T8=x
set y=1
loop
exitwhen T8>5
set G8[T8]=N7D[y]
set y=y+1
set T8=T8+1
endloop
set T8=z
loop
exitwhen T8>5
set N8[T8]=N7D[y]
set y=y+1
set T8=T8+1
endloop
set T8=0
loop
exitwhen T8>5
set T8=T8+1
endloop
call SetPlayerTeam(G8[0],0)
call SetPlayerTeam(G8[1],0)
call SetPlayerTeam(G8[2],0)
call SetPlayerTeam(G8[3],0)
call SetPlayerTeam(G8[4],0)
call SetPlayerTeam(G8[5],0)
call SetPlayerTeam(N8[0],1)
call SetPlayerTeam(N8[1],1)
call SetPlayerTeam(N8[2],1)
call SetPlayerTeam(N8[3],1)
call SetPlayerTeam(N8[4],1)
call SetPlayerTeam(N8[5],1)
call W68()
set x=0
set y=0
loop
exitwhen x>5
loop
exitwhen y>5
call SetPlayerAllianceStateBJ(G8[x],G8[y],3)
call SetPlayerAllianceStateBJ(N8[x],N8[y],3)
call SetPlayerAllianceStateBJ(G8[x],N8[y],0)
call SetPlayerAllianceStateBJ(N8[x],G8[y],0)
set y=y+1
endloop
set y=0
set x=x+1
endloop
call ForceClear(E8)
call ForceClear(F8)
call ForceAddPlayer(E8,G8[0])
call ForceAddPlayer(E8,G8[1])
call ForceAddPlayer(E8,G8[2])
call ForceAddPlayer(E8,G8[3])
call ForceAddPlayer(E8,G8[4])
call ForceAddPlayer(E8,G8[5])
call ForceAddPlayer(F8,N8[0])
call ForceAddPlayer(F8,N8[1])
call ForceAddPlayer(F8,N8[2])
call ForceAddPlayer(F8,N8[3])
call ForceAddPlayer(F8,N8[4])
call ForceAddPlayer(F8,N8[5])
call ExecuteFunc("XP8")
call KD9()
set M2D=MI8(E8)
set XV8=MI8(F8)
set T8=1
loop
exitwhen T8>5
if(KS8(G8[T8]))then
call SetPlayerStateBJ(G8[T8],PLAYER_STATE_RESOURCE_GOLD,(4265/ M2D))
call SetPlayerStateBJ(G8[T8],PLAYER_STATE_RESOURCE_LUMBER,0)
endif
if(KS8(N8[T8]))then
call SetPlayerStateBJ(N8[T8],PLAYER_STATE_RESOURCE_GOLD,(4265/ XV8))
call SetPlayerStateBJ(N8[T8],PLAYER_STATE_RESOURCE_LUMBER,0)
endif
set T8=T8+1
endloop
if L8 then
set x=0
loop
exitwhen x>5
call SetPlayerAlliance(Player(0),G8[x],ConvertAllianceType(0),true)
call SetPlayerAlliance(Player(0),G8[x],ConvertAllianceType(4),true)
call SetPlayerAlliance(Player(0),N8[x],ConvertAllianceType(0),false)
call SetPlayerAlliance(Player(0),N8[x],ConvertAllianceType(4),false)
set x=x+1
endloop
endif
call W38()
set MLD=null
set M1D=null
set XX8=null
set XY8=null
endfunction
function IKD takes nothing returns nothing
local integer XW8=MI8(E8)
local integer XV8=MI8(F8)
local integer D5=XW8+XV8
local integer T8
local integer M_D
local integer x
local integer y
local integer z
local player array N4D
local player array N7D
local integer w
local integer N8D
local integer N9D
local location MLD
local location M1D
local location XX8
local location XY8
local integer NDD
set NDD=GetRandomInt(1,2)
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,(GetObjectName(('n0GY'))))
if NDD==1 then
return
endif
set jj=true
set MLD=GetRectCenter(QD)
set M1D=GetRectCenter(PD)
set XX8=GetRectCenter(ZD)
set XY8=GetRectCenter(qr)
call JE9(G8[1])
call JE9(G8[2])
call JE9(G8[3])
call JE9(G8[4])
call JE9(G8[5])
call JE9(N8[1])
call JE9(N8[2])
call JE9(N8[3])
call JE9(N8[4])
call JE9(N8[5])
set x=1
loop
exitwhen x>5
if KS8(G8[x])then
call CreateUnitAtLoc(G8[x],'n00C',XX8,bj_UNIT_FACING)
call CreateUnitAtLoc(G8[x],'n00C',XY8,bj_UNIT_FACING)
endif
if KS8(N8[x])then
call CreateUnitAtLoc(N8[x],'n00C',XX8,bj_UNIT_FACING)
call CreateUnitAtLoc(N8[x],'n00C',XY8,bj_UNIT_FACING)
endif
set x=x+1
endloop
call RemoveLocation(XX8)
call RemoveLocation(XY8)
set N8D=GetPlayerState(G8[1],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(G8[2],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(G8[3],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(G8[4],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(G8[5],PLAYER_STATE_RESOURCE_GOLD)
set N9D=GetPlayerState(N8[1],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(N8[2],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(N8[3],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(N8[4],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(N8[5],PLAYER_STATE_RESOURCE_GOLD)
set N4D[1]=G8[1]
set N4D[2]=G8[2]
set N4D[3]=G8[3]
set N4D[4]=G8[4]
set N4D[5]=G8[5]
set N4D[6]=N8[1]
set N4D[7]=N8[2]
set N4D[8]=N8[3]
set N4D[9]=N8[4]
set N4D[10]=N8[5]
set G8[1]=N4D[6]
set G8[2]=N4D[7]
set G8[3]=N4D[8]
set G8[4]=N4D[9]
set G8[5]=N4D[10]
set N8[1]=N4D[1]
set N8[2]=N4D[2]
set N8[3]=N4D[3]
set N8[4]=N4D[4]
set N8[5]=N4D[5]
call SetPlayerTeam(G8[0],0)
call SetPlayerTeam(G8[1],0)
call SetPlayerTeam(G8[2],0)
call SetPlayerTeam(G8[3],0)
call SetPlayerTeam(G8[4],0)
call SetPlayerTeam(G8[5],0)
call SetPlayerTeam(N8[0],1)
call SetPlayerTeam(N8[1],1)
call SetPlayerTeam(N8[2],1)
call SetPlayerTeam(N8[3],1)
call SetPlayerTeam(N8[4],1)
call SetPlayerTeam(N8[5],1)
call W68()
set x=0
set y=0
loop
exitwhen x>5
loop
exitwhen y>5
call SetPlayerAllianceStateBJ(G8[x],G8[y],3)
call SetPlayerAllianceStateBJ(N8[x],N8[y],3)
call SetPlayerAllianceStateBJ(G8[x],N8[y],0)
call SetPlayerAllianceStateBJ(N8[x],G8[y],0)
set y=y+1
endloop
set y=0
set x=x+1
endloop
call ForceClear(E8)
call ForceClear(F8)
call ForceAddPlayer(E8,G8[0])
call ForceAddPlayer(E8,G8[1])
call ForceAddPlayer(E8,G8[2])
call ForceAddPlayer(E8,G8[3])
call ForceAddPlayer(E8,G8[4])
call ForceAddPlayer(E8,G8[5])
call ForceAddPlayer(F8,N8[0])
call ForceAddPlayer(F8,N8[1])
call ForceAddPlayer(F8,N8[2])
call ForceAddPlayer(F8,N8[3])
call ForceAddPlayer(F8,N8[4])
call ForceAddPlayer(F8,N8[5])
call ExecuteFunc("XP8")
set XW8=MI8(E8)
set XV8=MI8(F8)
set T8=1
loop
exitwhen T8>5
if(KS8(G8[T8]))then
call SetPlayerStateBJ(G8[T8],PLAYER_STATE_RESOURCE_GOLD,(4265/ XW8))
call SetPlayerStateBJ(G8[T8],PLAYER_STATE_RESOURCE_LUMBER,0)
endif
if(KS8(N8[T8]))then
call SetPlayerStateBJ(N8[T8],PLAYER_STATE_RESOURCE_GOLD,(4265/ XV8))
call SetPlayerStateBJ(N8[T8],PLAYER_STATE_RESOURCE_LUMBER,0)
endif
set T8=T8+1
endloop
call PanCameraToTimedLocForPlayer(G8[1],MLD,0)
call PanCameraToTimedLocForPlayer(G8[2],MLD,0)
call PanCameraToTimedLocForPlayer(G8[3],MLD,0)
call PanCameraToTimedLocForPlayer(G8[4],MLD,0)
call PanCameraToTimedLocForPlayer(G8[5],MLD,0)
call PanCameraToTimedLocForPlayer(N8[1],M1D,0)
call PanCameraToTimedLocForPlayer(N8[2],M1D,0)
call PanCameraToTimedLocForPlayer(N8[3],M1D,0)
call PanCameraToTimedLocForPlayer(N8[4],M1D,0)
call PanCameraToTimedLocForPlayer(N8[5],M1D,0)
call DestroyFogModifier(CreateFogModifierRectBJ(true,G8[1],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,G8[2],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,G8[3],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,G8[4],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,G8[5],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,N8[1],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,N8[2],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,N8[3],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,N8[4],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,N8[5],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
if L8 then
set x=0
loop
exitwhen x>5
call SetPlayerAlliance(Player(0),G8[x],ConvertAllianceType(0),true)
call SetPlayerAlliance(Player(0),G8[x],ConvertAllianceType(4),true)
call SetPlayerAlliance(Player(0),N8[x],ConvertAllianceType(0),false)
call SetPlayerAlliance(Player(0),N8[x],ConvertAllianceType(4),false)
set x=x+1
endloop
endif
call W38()
call KD9()
set MLD=null
set M1D=null
set XX8=null
set XY8=null
endfunction
function rN takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer Hm=LInt(EC8,"HeroType")
local player j8
local integer x=1
loop
exitwhen x>5
set j8=G8[x]
if KS8(j8)and j8!=V8 then
set Y7[GetPlayerId(j8)]=CreateUnit(j8,Hm,GetRectCenterX(QD),GetRectCenterY(QD),270)
endif
set j8=N8[x]
if KS8(j8)and j8!=V8 then
set Y7[GetPlayerId(j8)]=CreateUnit(j8,Hm,GetRectCenterX(PD),GetRectCenterY(PD),270)
endif
set x=x+1
endloop
call LT7(EC8)
call EA8(t)
set t=null
set j8=null
return false
endfunction
function ro takes nothing returns nothing
local integer x=1
local player j8
local unit N28=GetTriggerUnit()
local integer Hm=GetUnitTypeId(N28)
local trigger t
local integer EC8
if(GetOwningPlayer(N28)==V8 and IsUnitType(N28,UNIT_TYPE_HERO))then
call DisableTrigger(GetTriggeringTrigger())
if D7[GetPlayerId(V8)]==false and V4==false and W4==false then
call SetPlayerState(V8,PLAYER_STATE_RESOURCE_GOLD,250+GetPlayerState(V8,PLAYER_STATE_RESOURCE_GOLD))
endif
set B[GetPlayerId(V8)]=true
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.01,false)
call TriggerAddCondition(t,Condition(function rN))
call SInt(EC8,"HeroType",Hm)
endif
set j8=null
set N28=null
set t=null
endfunction
function IOD takes nothing returns nothing
local integer x=1
local trigger t=CreateTrigger()
local region r=CreateRegion()
set HO4=true
call DisableTrigger(RA4)
call MJ8('H00I')
call MJ8('N0MU')
loop
exitwhen x>5
if(G8[x]!=V8)then
call MM8(G8[x])
set D7[GetPlayerId(G8[x])]=true
set B[GetPlayerId(G8[x])]=true
endif
if(N8[x]!=V8)then
call MM8(N8[x])
set D7[GetPlayerId(N8[x])]=true
set B[GetPlayerId(N8[x])]=true
endif
set x=x+1
endloop
call RegionAddRect(r,bj_mapInitialPlayableArea)
call TriggerRegisterEnterRegion(t,r,null)
call TriggerAddAction(t,function ro)
endfunction
function IPD takes nothing returns nothing
local integer T8
local integer U8
set Rx=true
set T8=1
set U8=M44
loop
exitwhen T8>U8
call MJ8(K_4[T8])
set T8=T8+1
endloop
set T8=1
set U8=K24
loop
exitwhen T8>U8
call MJ8(K54[T8])
set T8=T8+1
endloop
endfunction
function IRD takes nothing returns nothing
local integer T8
local integer U8
set bx=true
set T8=1
set U8=M44
loop
exitwhen T8>U8
call MJ8(K_4[T8])
set T8=T8+1
endloop
set T8=1
set U8=K04
loop
exitwhen T8>U8
call MJ8(K14[T8])
set T8=T8+1
endloop
endfunction
function IQD takes nothing returns nothing
local integer T8
local integer U8
set Nx=true
set T8=1
set U8=K04
loop
exitwhen T8>U8
call MJ8(K14[T8])
set T8=T8+1
endloop
set T8=1
set U8=K24
loop
exitwhen T8>U8
call MJ8(K54[T8])
set T8=T8+1
endloop
endfunction
function ITD takes nothing returns nothing
local integer T8
local integer U8
set lj=true
set T8=1
set U8=M84
loop
exitwhen T8>U8
call MJ8(M74[T8])
set T8=T8+1
endloop
endfunction
function ISD takes nothing returns nothing
local integer T8
local integer U8
set Jj=true
set T8=1
set U8=MD4
loop
exitwhen T8>U8
call MJ8(M94[T8])
set T8=T8+1
endloop
endfunction
function IAD takes nothing returns nothing
set Y4=true
endfunction
function I3D takes nothing returns nothing
set F7=true
call SetPlayerTechResearched(G8[0],'R004',1)
call SetPlayerTechResearched(N8[0],'R004',1)
call SetPlayerHandicapXP(G8[1],1.5)
call SetPlayerHandicapXP(G8[2],1.5)
call SetPlayerHandicapXP(G8[3],1.5)
call SetPlayerHandicapXP(G8[4],1.5)
call SetPlayerHandicapXP(G8[5],1.5)
call SetPlayerHandicapXP(N8[1],1.5)
call SetPlayerHandicapXP(N8[2],1.5)
call SetPlayerHandicapXP(N8[3],1.5)
call SetPlayerHandicapXP(N8[4],1.5)
call SetPlayerHandicapXP(N8[5],1.5)
endfunction
function IBD takes nothing returns nothing
set G7=true
call DisableTrigger(HS4)
endfunction
function ICD takes nothing returns nothing
set M7=true
endfunction
function NED takes nothing returns nothing
set oy=false
call NN8(bj_FORCE_ALL_PLAYERS,10,(GetObjectName(('n0HA'))))
call DisableTrigger(GetTriggeringTrigger())
endfunction
function NFD takes nothing returns nothing
call DisableTrigger(LTrig(GetHandleId(GetTriggeringTrigger()),"nn"))
call DisableTrigger(GetTriggeringTrigger())
endfunction
function NGD takes nothing returns nothing
local trigger NHD=CreateTrigger()
local trigger NID=CreateTrigger()
call NN8(bj_FORCE_ALL_PLAYERS,10.," ")
call NN8(bj_FORCE_ALL_PLAYERS,10.,"Extra commands: -noneutrals can be entered in the following 15 seconds. ")
call TriggerRegisterTimerEvent(NHD,15.,false)
call TriggerAddAction(NHD,function NFD)
call STrig(GetHandleId(NHD),"nn",NID)
call TriggerRegisterPlayerChatEvent(NID,V8,"-noneutrals",true)
call TriggerAddAction(NID,function NED)
endfunction
function I6D takes nothing returns nothing
set P94=true
call ExecuteFunc("NGD")
endfunction
function ILD takes nothing returns nothing
set PD4=true
endfunction
function I0D takes nothing returns nothing
set PE4=true
endfunction
function I1D takes nothing returns nothing
set PF4=true
endfunction
function I5D takes nothing returns nothing
set PG4=true
endfunction
function I2D takes nothing returns nothing
set PH4=true
endfunction
function I_D takes nothing returns nothing
set PI4=true
endfunction
function JJD takes nothing returns nothing
set V94=false
endfunction
function JKD takes nothing returns nothing
set VD4=true
endfunction
function NJD takes nothing returns nothing
local integer i=0
loop
exitwhen i>5
call SetPlayerName(G8[i],(KW4[GetPlayerId((G8[i]))])+" ("+I2S(C[GetPlayerId(G8[i])])+"/"+I2S(D4[GetPlayerId(G8[i])])+" | "+I2S(C7[GetPlayerId(G8[i])])+"-"+I2S(L7[GetPlayerId(G8[i])])+")")
call SetPlayerName(N8[i],(KW4[GetPlayerId((N8[i]))])+" ("+I2S(C[GetPlayerId(N8[i])])+"/"+I2S(D4[GetPlayerId(N8[i])])+" | "+I2S(C7[GetPlayerId(N8[i])])+"-"+I2S(L7[GetPlayerId(N8[i])])+")")
set i=i+1
endloop
endfunction
function NKD takes nothing returns boolean
if PJ4==false then
if GetLocalPlayer()==KU4 or GetLocalPlayer()==KV4 then
call NJD()
endif
endif
return false
endfunction
function NMD takes nothing returns boolean
local integer id=GetUnitTypeId(GetTriggerUnit())
local string NND
if GetLocalPlayer()==GetTriggerPlayer()then
if id=='hC95' then
call ResetUnitAnimation(GetTriggerUnit())
elseif id=='n01K' then
call ResetUnitAnimation(GetTriggerUnit())
elseif id=='nC38' then
call ResetUnitAnimation(GetTriggerUnit())
elseif id=='eden' then
elseif id=='n00V' then
call ResetUnitAnimation(GetTriggerUnit())
elseif id=='n00W' then
call ResetUnitAnimation(GetTriggerUnit())
elseif id=='n002' then
call ResetUnitAnimation(GetTriggerUnit())
elseif id=='n00X' then
call ResetUnitAnimation(GetTriggerUnit())
elseif id=='n009' then
call ResetUnitAnimation(GetTriggerUnit())
elseif id=='n0HE' then
call ResetUnitAnimation(GetTriggerUnit())
elseif id=='nC35' then
call ResetUnitAnimation(GetTriggerUnit())
elseif id=='u00Q' then
call ResetUnitAnimation(GetTriggerUnit())
elseif id=='uC74' then
call ResetUnitAnimation(GetTriggerUnit())
elseif id=='u010' then
call ResetUnitAnimation(GetTriggerUnit())
elseif id=='u00Z' then
call ResetUnitAnimation(GetTriggerUnit())
endif
endif
return false
endfunction
function NOD takes nothing returns boolean
local integer id=GetUnitTypeId(GetTriggerUnit())
local string NND
if GetLocalPlayer()==GetTriggerPlayer()then
if id=='hC95' then
set NND="stand work"
elseif id=='n01K' then
set NND="stand third"
elseif id=='nC38' then
call SetUnitAnimationByIndex(GetTriggerUnit(),3)
elseif id=='eden' then
elseif id=='n00V' then
set NND="spell attack"
elseif id=='n00W' then
set NND="spell"
elseif id=='n002' then
call SetUnitAnimationByIndex(GetTriggerUnit(),3)
elseif id=='n00X' then
set NND="stand work"
elseif id=='n009' then
set NND="stand work"
elseif id=='n0HE' then
set NND="stand victory"
elseif id=='nC35' then
set NND="stand work"
elseif id=='u00Q' then
set NND="stand work"
elseif id=='uC74' then
set NND="stand work gold"
elseif id=='u010' then
set NND="stand work"
elseif id=='u00Z' then
set NND="stand work"
endif
if NND!="" then
call SetUnitAnimation(GetTriggerUnit(),NND)
call QueueUnitAnimationBJ(GetTriggerUnit(),NND)
endif
endif
return false
endfunction
function J4D takes nothing returns nothing
set PJ4=true
endfunction
function NPD takes nothing returns nothing
local unit N28=GetTriggerUnit()
call SetUnitScale(N28,PG8(N28)*ZS,PG8(N28)*ZS,PG8(N28)*ZS)
set N28=null
endfunction
function NQD takes nothing returns boolean
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)then
call NPD()
endif
return false
endfunction
function J7D takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterEnterRectSimple(t,bj_mapInitialPlayableArea)
call TriggerAddCondition(t,Condition(function NQD))
set bN=true
set ZS=.5
endfunction
function J7D_EX takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterEnterRectSimple(t,bj_mapInitialPlayableArea)
call TriggerAddCondition(t,Condition(function NQD))
set bN=true
set ZS=2
endfunction
function J8D takes nothing returns nothing
set BS=true
endfunction
function J9D takes nothing returns nothing
set CS=true
endfunction
function NRD takes nothing returns nothing
set Q[1]=0
endfunction
function NSD takes nothing returns nothing
set Q[2]=0
endfunction
function NTD takes nothing returns nothing
set Q[3]=0
endfunction
function NUD takes nothing returns nothing
set Q[4]=0
endfunction
function NVD takes nothing returns nothing
set Q[5]=0
endfunction
function NWD takes nothing returns nothing
set Q[7]=0
endfunction
function NXD takes nothing returns nothing
set Q[8]=0
endfunction
function NYD takes nothing returns nothing
set Q[9]=0
endfunction
function NZD takes nothing returns nothing
set Q[10]=0
endfunction
function NAD takes nothing returns nothing
set Q[11]=0
endfunction
function NBD takes nothing returns nothing
local integer i=1
local string id
local player p
loop
exitwhen i>5
set p=G8[i]
set id=I2S(GetPlayerId(p))
call StoreInteger(IG4,id,"id",i)
set p=N8[i]
set id=I2S(GetPlayerId(p))
call StoreInteger(IG4,id,"id",i+5)
if GetLocalPlayer()==V8 then
call SyncStoredInteger(IG4,I2S(GetPlayerId(G8[i])),"id")
call SyncStoredInteger(IG4,I2S(GetPlayerId(N8[i])),"id")
endif
set i=i+1
endloop
endfunction
function NCD takes nothing returns boolean
local boolean N3D=F9
if(vY and(not N3D))then
set F9=true
endif
if N3D then
call MQ8()
call NN8(bj_FORCE_ALL_PLAYERS,20.,W[GetPlayerId(V8)]+(KW4[GetPlayerId((V8))])+"|r"+" "+(GetObjectName(('n0CM'))))
call NN8(bj_FORCE_ALL_PLAYERS,20.," ")
set R94=true
call CX9()
call F6D()
call KD9()
call CU9()
call K79()
elseif vY then
call NN8(bj_FORCE_ALL_PLAYERS,20.,"The selected mode/s are insignificant and is considered |c006699CCNormal Mode|r. You will get 175 gold refunded when you pick a hero.")
call NN8(bj_FORCE_ALL_PLAYERS,20.," ")
endif
call NBD()
call EA8(GetTriggeringTrigger())
return false
endfunction
function N6D takes nothing returns boolean
set V=true
call EA8(GetTriggeringTrigger())
return false
endfunction
function NLD takes nothing returns nothing
set U=true
endfunction
function N1D takes nothing returns nothing
set Z8=true
endfunction
function N0D takes nothing returns nothing
set B9=true
endfunction
function N5D takes nothing returns boolean
return GetUnitAbilityLevel(GetKillingUnit(),'A0O3')>0 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit()))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function N2D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit u=LUnit(EC8,"Unit")
call SInt(GetHandleId(u),"PreviousKills",LInt(GetHandleId(u),"PreviousKills")-1)
call LT7(EC8)
call EA8(t)
set u=null
set t=null
return false
endfunction
function N_D takes nothing returns nothing
local unit O4D=GetKillingUnit()
local unit O7D=GetTriggerUnit()
local integer W57=GetHandleId(O4D)
local integer O8D=LInt(W57,"PreviousKills")
local integer ML8=GetUnitAbilityLevel(O4D,'A0O3')
local integer O9D=O8D*ML8
local integer ODD=PC8(O9D+ML8*2+2,30)
local texttag tt=CreateTextTag()
local player p=GetOwningPlayer(O4D)
local trigger t=CreateTrigger()
set LS[GetPlayerId(p)]=LS[GetPlayerId(p)]+ODD
call TriggerRegisterTimerEvent(t,25.,false)
call TriggerAddCondition(t,Condition(function N2D))
call SUnit(GetHandleId(t),"Unit",O4D)
call SInt(W57,"PreviousKills",O8D+1)
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,ODD+GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD))
call SetTextTagText(tt,"+"+I2S(ODD),.025)
call SetTextTagPosUnit(tt,O7D,0)
call SetTextTagColor(tt,255,220,0,255)
call SetTextTagVelocity(tt,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
set O4D=null
set O7D=null
set p=null
endfunction
function OED takes nothing returns boolean
local integer OFD=LS[GetPlayerId(GetTriggerPlayer())]
if OFD>0 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,(GetObjectName(('n0GQ')))+" "+I2S(OFD))
endif
return false
endfunction
function D59 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function N5D))
call TriggerAddAction(t,function N_D)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[1],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-st",true)
call TriggerAddCondition(t,Condition(function OED))
set t=null
endfunction
function OGD takes nothing returns nothing
call Dmg(U74,GetEnumUnit(),HeroNormal,UD4)
call Stun(U74,GetEnumUnit(),U94)
endfunction
function OHD takes unit Z77,unit X77,real OID returns nothing
local group g
local integer TA8=GetUnitAbilityLevel(Z77,'A1NI')
local real x
local real y
set U74=Z77
set UD4=(80+70*TA8)*OID/ YF4
set U94=(1+.75*TA8)*OID/ YF4
set U84=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call AddPermanentAbility(U84,'A0X6')
call SetUnitAbilityLevel(U84,'A0X6',V68(U94))
set H04=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(X77),GetUnitY(X77),175+25,Condition(function UM8))
if GetUnitTypeId(X77)!='h0BD' then
call GroupAddUnit(g,X77)
endif
call ForGroup(g,function OGD)
call OF8(g)
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl",GetUnitX(X77),GetUnitY(X77)))
set g=null
endfunction
function OJD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
local unit VA8=LUnit(EC8,"Projectile")
local real OID=LReal(EC8,"Elapsed")
local real OKD=LReal(EC8,"OriginalTime")
local real l4=YI7(GetUnitX(VA8),GetUnitY(VA8),GetUnitX(m5),GetUnitY(m5))
local real x=GetUnitX(VA8)+18*Cos(l4*bj_DEGTORAD)
local real y=GetUnitY(VA8)+18*Sin(l4*bj_DEGTORAD)
call SetUnitX(VA8,x)
call SetUnitY(VA8,y)
if Z87(x,y,GetUnitX(m5),GetUnitY(m5))<=18 then
call KillUnit(VA8)
call OHD(Z77,m5,OID)
call LT7(EC8)
call EA8(t)
endif
set t=null
set Z77=null
set m5=null
set VA8=null
return false
endfunction
function OMD takes unit Z77,unit m5,real OID,real OKD returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit VA8=CreateUnit(GetOwningPlayer(Z77),'h0BD',GetUnitX(Z77),GetUnitY(Z77),GetUnitFacing(Z77))
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Target",m5)
call SUnit(EC8,"Projectile",VA8)
call SReal(EC8,"Elapsed",OID*1.)
call SReal(EC8,"OriginalTime",OKD*1.)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function OJD))
set t=null
set VA8=null
endfunction
function OND takes string OOD,unit m5,unit OPD returns nothing
local texttag tt=CreateTextTag()
call SetTextTagText(tt,OOD,.033)
call SetTextTagPosUnit(tt,m5,64)
call SetTextTagColor(tt,255,0,0,255)
call SetTextTagVelocity(tt,0,.0355)
call SetTextTagFadepoint(tt,.15)
call SetTextTagPermanent(tt,false)
call SetTextTagLifespan(tt,.65)
if IsUnitAlly(OPD,GetLocalPlayer())or N08(GetLocalPlayer())then
call SetTextTagVisibility(tt,true)
else
call SetTextTagVisibility(tt,false)
endif
set tt=null
endfunction
function OQD takes real ORD returns string
if ORD>4.5 then
return"5.0"
elseif ORD>4. then
return"4.5"
elseif ORD>3.5 then
return"4.0"
elseif ORD>3. then
return"3.5"
elseif ORD>2.5 then
return"3.0"
elseif ORD>2. then
return"2.5"
elseif ORD>1.5 then
return"2.0"
elseif ORD>1. then
return"1.5"
elseif ORD>.5 then
return"1.0"
elseif ORD>.0 then
return"0.5"
else
return"0.0"
endif
return" "
endfunction
function OSD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local real OKD=LReal(EC8,"OriginalTime")
local real WR8=(TimerGetElapsed(E4))
local real OTD=5.-(WR8-OKD)
local real KU9=PL8(WR8-OKD,5.)
local integer OUD=LInt(EC8,"Count")+1
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call OHD(Z77,Z77,YF4)
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A1NI' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1NI',true)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1NH',false)
call SetUnitVertexColor(Z77,255,255,255,255)
call DestroyEffect((LoadEffectHandle(R8,(EC8),(32))))
call LT7(EC8)
call EA8(t)
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A1NH' then
if HasLinkin(GetSpellTargetUnit())==false then
call OMD(Z77,GetSpellTargetUnit(),KU9,OKD)
endif
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A1NI' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1NI',true)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1NH',false)
call SetUnitVertexColor(Z77,255,255,255,255)
call DestroyEffect((LoadEffectHandle(R8,(EC8),(32))))
call LT7(EC8)
call EA8(t)
endif
else
call SaveInteger(R8,(EC8),StringHash("Count"),(OUD))
if OTD>=0 then
call OND(OQD(OTD),Z77,Z77)
if ModuloInteger(OUD,2)==0 then
call SetUnitVertexColor(Z77,255,'}','}',255)
else
call SetUnitVertexColor(Z77,255,175,175,255)
endif
else
call SetUnitVertexColor(Z77,255,0,0,255)
endif
if WR8-OKD>(YF4+.5)then
call OHD(Z77,Z77,YF4)
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A1NI' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1NI',true)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1NH',false)
call SetUnitVertexColor(Z77,255,255,255,255)
call DestroyEffect((LoadEffectHandle(R8,(EC8),(32))))
call LT7(EC8)
call EA8(t)
endif
endif
set t=null
set Z77=null
return false
endfunction
function OVD takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local string st="war3mapImported\\UnstableConcoctionRangeDisplay3.mdx"
if GetLocalPlayer()!=GetOwningPlayer(Z77)then
set st=""
endif
call SUnit(EC8,"Source",Z77)
call SReal(EC8,"OriginalTime",TimerGetElapsed(E4)*1.)
call SaveEffectHandle(R8,(EC8),(32),(AddSpecialEffectTarget(st,Z77,"origin")))
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function OSD))
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1NI',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1NH',true)
call AddPermanentAbility(Z77,'A1NH')
call UnitMakeAbilityPermanent(Z77,true,'A1NH')
call TriggerEvaluate(t)
set Z77=null
set t=null
endfunction
function OWD takes nothing returns boolean
if GetSpellAbilityId()=='A1NI' then
call OVD()
endif
return false
endfunction
function D29 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OWD))
call PU8('A0X6')
set t=null
endfunction
function ZV takes nothing returns boolean
return GetSpellAbilityId()=='A0IL'
endfunction
function OXD takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(W8))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitTypeId(GetFilterUnit())!='n0F5'
endfunction
function OYD takes nothing returns nothing
call UnitDamageTarget(W8,GetEnumUnit(),Y8,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endfunction
function RC takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local unit oA=LUnit(EC8,"Caster")
local integer Rd=LInt(EC8,"Counter")
local real x=GetUnitX(oA)
local real y=GetUnitY(oA)
local boolexpr hP
local group XS8
if Rd>12 then
call KillUnit(oA)
call PauseTimer(t)
call LT7(EC8)
call DestroyTimer(t)
else
set W8=N28
set Y8=8+GetUnitAbilityLevel(N28,'A0IL')*6
set hP=Condition(function OXD)
set XS8=OG8()
call GroupEnumUnitsInRange(XS8,x,y,650,hP)
call ForGroup(XS8,function OYD)
call OF8(XS8)
call DestroyBoolExpr(hP)
set Rd=Rd+1
call SInt(EC8,"Counter",Rd)
set XS8=null
set hP=null
endif
set t=null
set N28=null
set oA=null
endfunction
function OZD takes nothing returns nothing
local unit N28=GetTriggerUnit()
local location Mk=GetSpellTargetLoc()
local real x=GetLocationX(Mk)
local real y=GetLocationY(Mk)
local unit oA=CreateUnit(GetOwningPlayer(N28),'e01E',x,y,0)
local timer t=CreateTimer()
local integer EC8=GetHandleId(t)
call RemoveLocation(Mk)
call AddPermanentAbility(oA,'A0J4')
call SetUnitAbilityLevel(oA,'A0J4',GetUnitAbilityLevel(N28,'A0IL'))
call AddPermanentAbility(oA,'Aloc')
call SUnit(EC8,"Hero",N28)
call SUnit(EC8,"Caster",oA)
call SInt(EC8,"Counter",0)
call TimerStart(t,1,true,function RC)
set N28=null
set Mk=null
set oA=null
set t=null
endfunction
function D_9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(t,function OZD)
call TriggerAddCondition(t,Condition(function ZV))
call PU8('A0J4')
set t=null
endfunction
function OAD takes nothing returns nothing
call Dmg(DN,GetEnumUnit(),NormalFire,dN)
endfunction
function OBD takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local integer TA8=GetUnitAbilityLevel(N28,'A0E3')
local real P99=(.35+.25*TA8)*(GetUnitState(m5,UNIT_STATE_MAX_MANA)-GetUnitState(m5,UNIT_STATE_MANA))
local group g=OG8()
local unit f=CreateUnit(GetOwningPlayer(N28),'e00E',GetUnitX(m5),GetUnitY(m5),0)
call UnitAddAbility(f,'AZ0G')
call SetUnitAbilityLevel(f,'AZ0G',TA8)
call IssueTargetOrderById(f,852095,m5)
call UnitApplyTimedLife(f,'BTLF',1)
set f=null
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\DragonHawkMissile\\DragonHawkMissile.mdl",m5,"chest"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl",m5,"chest"))
call DestroyEffect(AddSpecialEffect("war3mapImported\\Enchantment.mdx",GetUnitX(m5),GetUnitY(m5)))
call GroupEnumUnitsInRange(g,GetUnitX(m5),GetUnitY(m5),525,Condition(function UB8))
set dN=P99
set DN=N28
call ForGroup(g,function OAD)
call PlaySoundOnUnitBJ(oO,'d',m5)
call OF8(g)
set N28=null
set m5=null
set g=null
endfunction
function OCD takes nothing returns boolean
if GetSpellAbilityId()=='A0E3' and HasLinkin(GetSpellTargetUnit())==false then
call OBD()
endif
return false
endfunction
function Z48 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OCD))
set t=null
endfunction
function O3D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit AC7=LUnit(EC8,"Caster")
local integer P89=GetTriggerEvalCount(t)
local integer O6D=R2I(((.9-.3)/ .5)/ .03)
local integer OLD=R2I((175/ O6D))
local integer O1D=R2I((255/ O6D)*1.75)
local unit N28=LUnit(EC8,"Hero")
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
if P89>O6D then
call SetUnitVertexColor(AC7,255,255,255,0)
call SetUnitVertexColor(N28,255,255,255,255)
call ShowUnit(AC7,false)
call LT7(EC8)
call EA8(t)
else
call SetUnitVertexColor(AC7,255,255,255,175-OLD*P89)
call SetUnitX(AC7,x)
call SetUnitY(AC7,y)
call SetUnitVertexColor(N28,255,255,255,O1D*P89)
endif
set t=null
set AC7=null
set N28=null
return false
endfunction
function O0D takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit AC7=LUnit(GetHandleId(N28),"BlinkAM_Caster")
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local real x=GetUnitX(N28)
local real y=GetUnitY(N28)
call SetUnitX(AC7,x)
call SetUnitY(AC7,y)
call SetUnitX(N28,x)
call SetUnitY(N28,y)
call SetUnitVertexColor(N28,255,255,255,0)
call SetUnitVertexColor(AC7,255,255,255,175)
call SetUnitTimeScale(AC7,.5)
call SUnit(EC8,"Caster",AC7)
call SUnit(EC8,"Hero",N28)
call SReal(EC8,"x",x*1.)
call SReal(EC8,"y",y*1.)
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerAddCondition(t,Condition(function O3D))
set N28=null
set AC7=null
set t=null
endfunction
function O5D takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit AC7
local integer EC8=GetHandleId(N28)
local real a=YI7(GetUnitX(N28),GetUnitY(N28),GetSpellTargetX(),GetSpellTargetY())
local real x=GetUnitX(N28)
local real y=GetUnitY(N28)
call SetUnitPathing(N28,false)
call AddPermanentAbility(N28,'Aeth')
set AC7=CreateUnit(GetOwningPlayer(N28),'h06K',GetUnitX(N28),GetUnitY(N28),a)
call O58(AC7,5)
call SetUnitPathing(AC7,false)
call AddPermanentAbility(AC7,'Aeth')
call AddPermanentAbility(AC7,'Aloc')
call AddPermanentAbility(AC7,'A04R')
call SetUnitVertexColor(AC7,255,255,255,0)
call SetUnitX(AC7,x)
call SetUnitY(AC7,y)
call SetUnitX(N28,x)
call SetUnitY(N28,y)
call SetUnitAnimation(AC7,"Spell Throw")
call SetUnitPathing(N28,true)
call UnitRemoveAbility(N28,'Aeth')
call SUnit(EC8,"BlinkAM_Caster",AC7)
set N28=null
set AC7=null
endfunction
function O2D takes nothing returns boolean
if GetSpellAbilityId()=='AEbl' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
call O0D()
else
call O5D()
endif
endif
return false
endfunction
function Z78 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O2D))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function O2D))
set t=null
call O28('h06K')
endfunction
function O_D takes unit Z77,unit X77 returns nothing
local integer ML8=GetUnitAbilityLevel(Z77,'A1V6')
local real P4D=16+12*ML8
local real P7D=GetUnitState(X77,UNIT_STATE_MANA)
local real P8D=RMinBJ(P4D,P7D)
if P8D>0 then
call SetUnitState(X77,UNIT_STATE_MANA,P7D-P8D)
call Dmg(Z77,X77,HeroNormal,P8D*.6)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Feedback\\SpellBreakerAttack.mdl",X77,"origin"))
endif
endfunction
function P9D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer V_8=(LoadInteger(R8,(W57),(30)))
local unit X77=KH8(V_8)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 then
call DisableTrigger(t)
call O_D(Z77,X77)
call KG8(V_8)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
else
call KG8(V_8)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function PDD takes nothing returns nothing
local trigger t=CreateTrigger()
local unit X77=GetTriggerUnit()
local unit Z77=GetAttacker()
local integer W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,.4,false)
call TriggerAddCondition(t,Condition(function P9D))
call SaveInteger(R8,(W57),(30),(KJ8(X77)))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set X77=null
set Z77=null
set t=null
endfunction
function PED takes nothing returns nothing
local unit Z77=GetAttacker()
if LState(Z77,"CooldownState")==false then
call AddTimedBoolBuff(Z77,"CooldownState",.4)
call PDD()
endif
set Z77=null
endfunction
function PFD takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),'A1V6')>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(R8,(GetHandleId(GetTriggeringTrigger())),(14)))and GetUnitTypeId(GetTriggerUnit())!='n00L' and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))and GU8(GetTriggerUnit())==false then
call PED()
endif
return false
endfunction
function PGD takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function PFD))
call SaveUnitHandle(R8,(GetHandleId(t)),(14),(GetTriggerUnit()))
set t=null
endfunction
function PHD takes nothing returns boolean
if GetLearnedSkill()=='A1V6' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A1V6')==1 then
call PGD()
endif
return false
endfunction
function Z88 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function PHD))
set t=null
endfunction
function PID takes nothing returns boolean
return GetSpellAbilityId()=='A0OO'
endfunction
function PJD takes nothing returns nothing
if(GetUnitTypeId(GetEnumUnit())=='n01Q' or GetUnitTypeId(GetEnumUnit())=='n01M' or GetUnitTypeId(GetEnumUnit())=='n01R' or GetUnitTypeId(GetEnumUnit())=='n01S')then
call KillUnit(GetEnumUnit())
endif
endfunction
function PKD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit PMD=(LoadUnitHandle(R8,(W57),(2)))
local real PND=(LoadReal(R8,(W57),(6)))
local real POD=(LoadReal(R8,(W57),(7)))
local real PPD=GetUnitX(PMD)
local real PQD=GetUnitY(PMD)
call SaveReal(R8,(W57),(6),((PPD)*1.))
call SaveReal(R8,(W57),(7),((PQD)*1.))
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
if PND==PPD and POD==PQD then
if GetUnitAbilityLevel(PMD,'A1WG')==0 then
call AddPermanentAbility(PMD,'A1WG')
endif
else
if GetUnitAbilityLevel(PMD,'A1WG')>0 then
call UnitRemoveAbility(PMD,'A1WG')
endif
endif
endif
set t=null
set PMD=null
return false
endfunction
function NewWildCallA takes nothing returns nothing
local unit u=GetTriggerUnit()
local player p=GetOwningPlayer(u)
local integer i=GetUnitAbilityLevel(u,'A0OO')
local real x=GetUnitX(u)
local real y=GetUnitY(u)
local trigger t
local unit s
if i<3 then
set s=CreateUnit(p,'n01Q',x,y,270)
else
set s=CreateUnit(p,'n01R',x,y,270)
set t=CreateTrigger()
set i=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_DEATH)
call SaveReal(R8,(i),(6),((GetUnitX(s))*1.))
call SaveReal(R8,(i),(7),((GetUnitY(s))*1.))
call SaveUnitHandle(R8,(i),(2),(s))
call TriggerAddCondition(t,Condition(function PKD))
endif
call UnitApplyTimedLife(s,'BTLF',60)
set s=null
set u=null
set p=null
set t=null
endfunction
function NewWildCallB takes nothing returns nothing
local unit u=GetTriggerUnit()
local player p=GetOwningPlayer(u)
local integer i=GetUnitAbilityLevel(u,'AZ00')
local real x=GetUnitX(u)
local real y=GetUnitY(u)
if i<4 then
call UnitApplyTimedLife(CreateUnit(p,'n01M',x,y,270),'BTLF',60)
else
call UnitApplyTimedLife(CreateUnit(p,'n01S',x,y,270),'BTLF',60)
endif
set u=null
set p=null
endfunction
function NewWildCallB_Cond takes nothing returns nothing
if GetSpellAbilityId()=='AZ00' then
call NewWildCallB()
endif
endfunction
function PRD takes nothing returns nothing
local unit N28=GetTriggerUnit()
local player j8=GetOwningPlayer(N28)
local integer TA8=GetUnitAbilityLevel(N28,'A0OO')
local real x=GetUnitX(N28)
local real y=GetUnitY(N28)
local unit PMD
local trigger t
local integer W57
if not(GetPlayerController(j8)==MAP_CONTROL_COMPUTER)then
call NewWildCallA()
set N28=null
set j8=null
set t=null
set PMD=null
return
endif
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl",x,y))
if TA8==1 then
set PMD=CreateUnit(j8,'n01Q',x,y,270)
call UnitApplyTimedLife(PMD,'BTLF',60)
elseif TA8==2 then
set PMD=CreateUnit(j8,'n01Q',x,y,270)
call UnitApplyTimedLife(PMD,'BTLF',60)
call UnitApplyTimedLife(CreateUnit(j8,'n01M',x,y,270),'BTLF',60)
elseif TA8==3 then
set PMD=CreateUnit(j8,'n01R',x,y,270)
call UnitApplyTimedLife(PMD,'BTLF',60)
call UnitApplyTimedLife(CreateUnit(j8,'n01M',x,y,270),'BTLF',60)
elseif TA8==4 then
set PMD=CreateUnit(j8,'n01R',x,y,270)
call UnitApplyTimedLife(PMD,'BTLF',60)
call UnitApplyTimedLife(CreateUnit(j8,'n01S',x,y,270),'BTLF',60)
endif
if TA8>2 then
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerRegisterUnitEvent(t,PMD,EVENT_UNIT_DEATH)
call SaveReal(R8,(W57),(6),((GetUnitX(PMD))*1.))
call SaveReal(R8,(W57),(7),((GetUnitY(PMD))*1.))
call SaveUnitHandle(R8,(W57),(2),(PMD))
call TriggerAddCondition(t,Condition(function PKD))
endif
set N28=null
set j8=null
set PMD=null
set t=null
endfunction
function WildCallRemove takes nothing returns nothing
local timer tm=GetExpiredTimer()
local unit s=LUnit(GetHandleId(tm),"unit")
if GetUnitAbilityLevel(s,'A0OO')==0 then
call UnitRemoveAbility(s,'AZ00')
call FlushChildHashtable(R8,GetHandleId(tm))
call PauseTimer(tm)
call DestroyTimer(tm)
endif
set s=null
set tm=null
endfunction
function WildCallAdd takes unit s,integer i returns nothing
call UnitAddAbility(s,'AZ00')
call SetUnitAbilityLevel(s,'AZ00',i)
call UnitMakeAbilityPermanent(s,true,'AZ00')
endfunction
function NewWildCallB_Learn takes nothing returns nothing
if GetLearnedSkill()=='A0OO' and GetUnitAbilityLevel(GetTriggerUnit(),'A0OO')>1 then
call WildCallAdd(GetTriggerUnit(),GetUnitAbilityLevel(GetTriggerUnit(),'A0OO'))
endif
endfunction
function ZE8 takes nothing returns nothing
set nJ=CreateTrigger()
call TriggerRegisterAllPlayersEvent(nJ,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(nJ,Condition(function PID))
call TriggerAddAction(nJ,function PRD)
set nJ=CreateTrigger()
call TriggerRegisterAllPlayersEvent(nJ,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(nJ,Condition(function NewWildCallB_Cond))
set nJ=CreateTrigger()
call TriggerRegisterAllPlayersEvent(nJ,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(nJ,Condition(function NewWildCallB_Learn))
endfunction
function PSD takes nothing returns nothing
local real x=GetUnitX(GetEnumUnit())
local real y=GetUnitY(GetEnumUnit())
local real a=bj_RADTODEG*Atan2(y-HL4,x-H64)
local real PTD
local real PUD
if Sin((a-H14)*bj_DEGTORAD)<0 then
set PTD=GetUnitX(GetEnumUnit())+15*Cos((H14-90)*bj_DEGTORAD)
set PUD=GetUnitY(GetEnumUnit())+15*Sin((H14-90)*bj_DEGTORAD)
call SetUnitPosition(GetEnumUnit(),PTD,PUD)
call SetUnitFacingTimed(GetEnumUnit(),H14+90,.3)
else
set PTD=GetUnitX(GetEnumUnit())+15*Cos((H14+90)*bj_DEGTORAD)
set PUD=GetUnitY(GetEnumUnit())+15*Sin((H14+90)*bj_DEGTORAD)
call SetUnitPosition(GetEnumUnit(),PTD,PUD)
call SetUnitFacingTimed(GetEnumUnit(),H14-90,.3)
endif
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",GetEnumUnit(),"origin"))
endfunction
function PVD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local real l4=LReal(EC8,"Angle")
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
local group g=LGroup(EC8,"g")
if GetTriggerEvalCount(t)>16 then
call OF8(g)
call LT7(EC8)
call EA8(t)
else
set H64=x
set HL4=y
set H14=l4
call ForGroup(g,function PSD)
endif
set t=null
set g=null
return false
endfunction
function PWD takes nothing returns nothing
call Dmg(H04,GetEnumUnit(),NormalFire,H64)
endfunction
function PXD takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit AM7=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(AM7,'A0O2')
local unit AC7
local real CV7=bj_RADTODEG*Atan2(GetUnitY(X77)-GetUnitY(AM7),GetUnitX(X77)-GetUnitX(AM7))
local real x
local real y
local group g=OG8()
local group g2=OG8()
if ML8==0 then
set ML8=GetUnitAbilityLevel(AM7,'A289')
endif
call SGroup(EC8,"g",g)
call SReal(EC8,"Angle",CV7*1.)
call SReal(EC8,"x",GetUnitX(AM7)*1.)
call SReal(EC8,"y",GetUnitY(AM7)*1.)
call TriggerRegisterTimerEvent(t,.025,true)
call TriggerAddCondition(t,Condition(function PVD))
set x=GetUnitX(AM7)+50*Cos(CV7*bj_DEGTORAD)
set y=GetUnitY(AM7)+50*Sin(CV7*bj_DEGTORAD)
call GroupEnumUnitsInRange(g2,x,y,250,Condition(function UB8))
call GroupAddGroup(g2,g)
call GroupClear(g2)
set AC7=CreateUnit(GetOwningPlayer(AM7),'o00Y',x,y,CV7)
call UnitApplyTimedLife(AC7,'BTLF',1)
call AddPermanentAbility(AC7,'A0NY')
call SetUnitAbilityLevel(AC7,'A0NY',ML8)
call IssueImmediateOrderById(AC7,852096)
set x=GetUnitX(AM7)+250*Cos(CV7*bj_DEGTORAD)
set y=GetUnitY(AM7)+250*Sin(CV7*bj_DEGTORAD)
call GroupEnumUnitsInRange(g2,x,y,250,Condition(function UB8))
call GroupAddGroup(g2,g)
call GroupClear(g2)
set AC7=CreateUnit(GetOwningPlayer(AM7),'o00Y',x,y,CV7)
call UnitApplyTimedLife(AC7,'BTLF',1)
call AddPermanentAbility(AC7,'A0NY')
call SetUnitAbilityLevel(AC7,'A0NY',ML8)
call IssueImmediateOrderById(AC7,852096)
set x=GetUnitX(AM7)+450*Cos(CV7*bj_DEGTORAD)
set y=GetUnitY(AM7)+450*Sin(CV7*bj_DEGTORAD)
call GroupEnumUnitsInRange(g2,x,y,250,Condition(function UB8))
call GroupAddGroup(g2,g)
call GroupClear(g2)
set AC7=CreateUnit(GetOwningPlayer(AM7),'o00Y',x,y,CV7)
call UnitApplyTimedLife(AC7,'BTLF',1)
call AddPermanentAbility(AC7,'A0NY')
call SetUnitAbilityLevel(AC7,'A0NY',ML8)
call IssueImmediateOrderById(AC7,852096)
if GetUnitAbilityLevel(AM7,'A0O2')==0 then
set x=GetUnitX(AM7)+650*Cos(CV7*bj_DEGTORAD)
set y=GetUnitY(AM7)+650*Sin(CV7*bj_DEGTORAD)
call GroupEnumUnitsInRange(g2,x,y,250,Condition(function UB8))
call GroupAddGroup(g2,g)
call GroupClear(g2)
set AC7=CreateUnit(GetOwningPlayer(AM7),'o00Y',x,y,CV7)
call UnitApplyTimedLife(AC7,'BTLF',1)
call AddPermanentAbility(AC7,'A0NY')
call SetUnitAbilityLevel(AC7,'A0NY',ML8)
call IssueImmediateOrderById(AC7,852096)
endif
call OF8(g2)
call GroupRemoveUnit(g,X77)
set H64='d'*ML8
set H04=AM7
call ForGroup(g,function PWD)
set t=null
set AM7=null
set X77=null
set AC7=null
set g=null
set g2=null
endfunction
function PYD takes nothing returns boolean
if(GetSpellAbilityId()=='A0O2' or GetSpellAbilityId()=='A289')and HasLinkin(GetSpellTargetUnit())==false then
call PXD()
endif
return false
endfunction
function Z98 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function PYD))
set t=null
endfunction
function PZD takes nothing returns boolean
return GetSpellAbilityId()=='A0O1'
endfunction
function PAD takes unit N28,real x,real y,group PBD returns nothing
local group XS8=OG8()
local unit Y_8
call KillTrees(x,y,150)
call GroupEnumUnitsInRange(XS8,x,y,150,Condition(function KF8))
loop
set Y_8=FirstOfGroup(XS8)
exitwhen Y_8==null
if IsUnitInGroup(Y_8,PBD)==false and IsUnitEnemy(Y_8,GetOwningPlayer(N28))then
if(GetUnitAbilityLevel(Y_8,'A04R')!=1 and GetUnitState(Y_8,UNIT_STATE_LIFE)>0 and IsUnitType(Y_8,UNIT_TYPE_STRUCTURE)==false)then
call GroupAddUnit(PBD,Y_8)
call UnitDamageTarget(N28,Y_8,60+GetUnitAbilityLevel(N28,'A0O1')*30,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_METAL_HEAVY_SLICE)
call AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",Y_8,"overhead")
endif
endif
call GroupRemoveUnit(XS8,Y_8)
endloop
call OF8(XS8)
set XS8=null
set Y_8=null
endfunction
function PCD takes nothing returns nothing
local integer W57=GetHandleId(GetExpiredTimer())
local unit P3D=LUnit(W57,"Axe")
local unit AM7=LUnit(W57,"Hero")
local real Ax=LReal(W57,"Ax")
local real Ay=LReal(W57,"Ay")
local real Cx=LReal(W57,"Cx")
local real Cy=LReal(W57,"Cy")
local real Bx=LReal(W57,"Bx")
local real By=LReal(W57,"By")
local real a=LReal(W57,"a")
local real b=1-a
local boolean P6D=LBool(W57,"FirstPass")
local group PLD=LGroup(W57,"AlreadyDamaged")
local real P1D=RMaxBJ(Z87(Ax,Ay,Cx,Cy)/ 1300,.4)
call SetUnitX(P3D,PQ8(Ax*a*a+Bx*2*a*b+Cx*b*b))
call SetUnitY(P3D,PS8(Ay*a*a+By*2*a*b+Cy*b*b))
call PAD(AM7,GetUnitX(P3D),GetUnitY(P3D),PLD)
if(P6D)then
call SReal(W57,"a",(a-.02/ P1D)*1.)
else
call SReal(W57,"a",(a+.02/ P1D)*1.)
call SReal(W57,"Ax",GetUnitX(AM7)*1.)
call SReal(W57,"Ay",GetUnitY(AM7)*1.)
endif
if(a<0 and P6D)then
call SBool(W57,"FirstPass",false)
call SReal(W57,"Bx",(Ax+300*Cos(Atan2(Cy-Ay,Cx-Ax)+(LReal(W57,"AngleOffset"))))*1.)
call SReal(W57,"By",(Ay+300*Sin(Atan2(Cy-Ay,Cx-Ax)+(LReal(W57,"AngleOffset"))))*1.)
endif
if(a>1 and P6D==false)then
call PauseTimer(GetExpiredTimer())
call OF8(PLD)
call LT7(W57)
call RemoveUnit(P3D)
call DestroyTimer(GetExpiredTimer())
endif
set P3D=null
set AM7=null
set PLD=null
endfunction
function P0D takes nothing returns nothing
local unit N28=GetTriggerUnit()
local real Ax=GetUnitX(N28)
local real Ay=GetUnitY(N28)
local real Cx=GetLocationX(GetSpellTargetLoc())
local real Cy=GetLocationY(GetSpellTargetLoc())
local unit P5D=CreateUnit(GetOwningPlayer(N28),'e01T',Ax,Ay,270.)
local unit P2D=CreateUnit(GetOwningPlayer(N28),'e01T',Ax,Ay,270.)
local integer P_D
local integer Q4D
local timer Q7D=CreateTimer()
local timer Q8D=CreateTimer()
if GetSpellTargetUnit()!=null then
set Cx=GetUnitX(GetSpellTargetUnit())
set Cy=GetUnitY(GetSpellTargetUnit())
endif
call AddPermanentAbility(P5D,'Amrf')
call UnitRemoveAbility(P5D,'Amrf')
call SetUnitFlyHeight(P5D,150,0)
call AddPermanentAbility(P2D,'Amrf')
call UnitRemoveAbility(P2D,'Amrf')
call SetUnitFlyHeight(P2D,150,0)
set P_D=GetHandleId(Q7D)
call SUnit(P_D,"Hero",N28)
call SUnit(P_D,"Axe",P5D)
call SGroup(P_D,"AlreadyDamaged",OG8())
call SReal(P_D,"Ax",(Ax)*1.)
call SReal(P_D,"Ay",(Ay)*1.)
call SReal(P_D,"Cx",(Cx)*1.)
call SReal(P_D,"Cy",(Cy)*1.)
call SReal(P_D,"Bx",(Ax+300*Cos(Atan2(Cy-Ay,Cx-Ax)+45))*1.)
call SReal(P_D,"By",(Ay+300*Sin(Atan2(Cy-Ay,Cx-Ax)+45))*1.)
call SReal(P_D,"a",(1)*1.)
call SReal(P_D,"AngleOffset",(-45)*1.)
call SBool(P_D,"FirstPass",true)
set Q4D=GetHandleId(Q8D)
call SUnit(Q4D,"Hero",N28)
call SUnit(Q4D,"Axe",P2D)
call SGroup(Q4D,"AlreadyDamaged",OG8())
call SReal(Q4D,"Ax",(Ax)*1.)
call SReal(Q4D,"Ay",(Ay)*1.)
call SReal(Q4D,"Cx",(Cx)*1.)
call SReal(Q4D,"Cy",(Cy)*1.)
call SReal(Q4D,"Bx",(Ax+300*Cos(Atan2(Cy-Ay,Cx-Ax)-45))*1.)
call SReal(Q4D,"By",(Ay+300*Sin(Atan2(Cy-Ay,Cx-Ax)-45))*1.)
call SReal(Q4D,"a",(1)*1.)
call SReal(Q4D,"AngleOffset",(45)*1.)
call SBool(Q4D,"FirstPass",true)
call TimerStart(Q7D,.025,true,function PCD)
call TimerStart(Q8D,.025,true,function PCD)
set N28=null
set P5D=null
set P2D=null
set Q7D=null
set Q8D=null
endfunction
function ZD8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function PZD))
call TriggerAddAction(t,function P0D)
set t=null
endfunction
function Q9D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
call UnitRemoveAbility(Z77,'A140')
call LT7(W57)
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function QDD takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
call AddPermanentAbility(Z77,'A140')
call TriggerRegisterTimerEvent(t,5.,false)
call TriggerAddCondition(t,Condition(function Q9D))
call SUnit(W57,"Source",Z77)
set t=null
set Z77=null
endfunction
function QED takes nothing returns boolean
if GetSpellAbilityId()=='A13Z' then
call QDD()
endif
return false
endfunction
function ZF8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function QED))
set t=null
endfunction
function QFD takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local integer EC8=GetHandleId(Z77)
local player p=ED8(EC8,"Track|SourcePlayer")
local integer ML8=LInt(EC8,"Track|Level")
local texttag tt=CreateTextTag()
local integer M38
local integer i=1
local unit QGD
local player QHD
if ML8==1 then
set M38=150
elseif ML8==2 then
set M38=200
else
set M38=250
endif
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)+M38)
call SetTextTagText(tt,"+"+I2S(M38),.025)
call SetTextTagPosUnit(tt,Y7[GetPlayerId(p)],'d')
call SetTextTagColor(tt,255,220,0,255)
call SetTextTagVelocity(tt,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 WQ4[GetPlayerId(p)]=WQ4[GetPlayerId(p)]+M38
set A84=A84+M38
if ML8==1 then
set M38=50
elseif ML8==2 then
set M38='d'
else
set M38=150
endif
loop
exitwhen i>5
if IsJWPlayer(p)then
set QHD=G8[i]
else
set QHD=N8[i]
endif
if QHD!=p then
set QGD=Y7[GetPlayerId(QHD)]
if Z47(QGD,Z77)<950 then
set tt=CreateTextTag()
call SetPlayerState(QHD,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(QHD,PLAYER_STATE_RESOURCE_GOLD)+M38)
call SetTextTagText(tt,"+"+I2S(M38),.025)
call SetTextTagPosUnit(tt,QGD,'d')
call SetTextTagColor(tt,255,220,0,255)
call SetTextTagVelocity(tt,0,.03)
call SetTextTagVisibility(tt,false)
if GetLocalPlayer()==QHD then
call SetTextTagVisibility(tt,true)
endif
call SetTextTagFadepoint(tt,2)
call SetTextTagLifespan(tt,3)
call SetTextTagPermanent(tt,false)
set WQ4[GetPlayerId(QHD)]=WQ4[GetPlayerId(QHD)]+M38
set A84=A84+M38
endif
endif
set i=i+1
endloop
set Z77=null
set p=null
set tt=null
set QGD=null
set QHD=null
endfunction
function QID takes nothing returns boolean
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and LReal(GetHandleId(GetTriggerUnit()),"Track|Time")>ZM7()then
call QFD()
endif
return false
endfunction
function QJD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local unit oA=LUnit(EC8,"Caster")
call SetUnitX(oA,GetUnitX(m5))
call SetUnitY(oA,GetUnitY(m5))
if GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEvalCount(t)>10 and GetUnitAbilityLevel(m5,'B00L')==0)then
call DestroyEffect(LEff(EC8,"FX"))
call KillUnit(oA)
call LT7(EC8)
call EA8(t)
endif
set t=null
set m5=null
set oA=null
return false
endfunction
function QKD takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit m5=GetSpellTargetUnit()
local unit Z77=GetTriggerUnit()
local unit oA=CreateUnit(GetOwningPlayer(m5),'e01V',GetUnitX(m5),GetUnitY(m5),0)
local string QMD="war3mapImported\\TrackBuff.mdx"
if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(m5))and N08(GetLocalPlayer())==false then
set QMD=""
endif
call AddPermanentAbility(oA,'A115')
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterUnitEvent(t,GetSpellTargetUnit(),EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function QJD))
call SUnit(EC8,"Target",m5)
call SUnit(EC8,"Caster",oA)
call SEff(EC8,"FX",AddSpecialEffectTarget(QMD,m5,"overhead"))
call SReal(GetHandleId(GetSpellTargetUnit()),"Track|Time",(((ZM7())+30)*1.))
call DA8(GetHandleId(GetSpellTargetUnit()),"Track|SourcePlayer",GetOwningPlayer(GetTriggerUnit()))
call SInt(GetHandleId(GetSpellTargetUnit()),"Track|Level",GetUnitAbilityLevel(GetTriggerUnit(),'A0B4'))
set t=null
set m5=null
set Z77=null
set oA=null
endfunction
function QND takes nothing returns boolean
if GetSpellAbilityId()=='A0B4' then
call QKD()
endif
return false
endfunction
function ZK8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function QND))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function QID))
set t=null
endfunction
function QOD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
call UnitRemoveAbility(m5,'A1IW')
call UnitRemoveAbility(m5,'B0CA')
call LT7(EC8)
call EA8(t)
set t=null
set m5=null
return false
endfunction
function QPD takes unit Z77,unit m5 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,3.,false)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function QOD))
call SUnit(EC8,"Target",m5)
call AddPermanentAbility(m5,'A1IW')
call UnitMakeAbilityPermanent(m5,true,'A1IW')
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A1IW',false)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\HumanBloodKnight.mdl",m5,"chest"))
set t=null
endfunction
function QQD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer QRD=LInt(EC8,"TargetIndex")
local unit m5=KH8(QRD)
local unit Z77=LUnit(EC8,"Source")
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 and(GetEventDamage()>40 or IsUnitType(m5,UNIT_TYPE_STRUCTURE)or GetUnitTypeId(m5)=='umtw' or GetUnitTypeId(m5)=='ebal')and LBool(GetHandleId(Z77),"JinadaActive")then
call QPD(Z77,m5)
call SBool(GetHandleId(Z77),"JinadaActive",false)
call SReal(GetHandleId(Z77),"LastUsed",TimerGetElapsed(E4)*1.)
call UnitRemoveAbility(Z77,'A1IS')
call UnitRemoveAbility(Z77,'A1J4')
call UnitRemoveAbility(Z77,'A1J3')
call UnitRemoveAbility(Z77,'A1J5')
call UnitRemoveAbility(Z77,'A1IU')
call KG8(QRD)
call LT7(EC8)
call EA8(t)
endif
else
call KG8(QRD)
call LT7(EC8)
call EA8(t)
endif
set t=null
set Z77=null
set m5=null
return false
endfunction
function QSD takes nothing returns boolean
local trigger t
local integer EC8
local unit m5
local unit Z77
local integer TA8
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call SBool(GetHandleId(GetTriggerUnit()),"JinadaActive",false)
call SReal(GetHandleId(GetTriggerUnit()),"LastUsed",TimerGetElapsed(E4)*1.)
call UnitRemoveAbility(GetTriggerUnit(),'A1IS')
call UnitRemoveAbility(GetTriggerUnit(),'A1J4')
call UnitRemoveAbility(GetTriggerUnit(),'A1J3')
call UnitRemoveAbility(GetTriggerUnit(),'A1J5')
call UnitRemoveAbility(GetTriggerUnit(),'A1IU')
elseif GetAttacker()==LUnit(GetHandleId(GetTriggeringTrigger()),"JinadaHero")then
if IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and LBool(GetHandleId(GetAttacker()),"JinadaActive")then
set t=CreateTrigger()
set EC8=GetHandleId(t)
set m5=GetTriggerUnit()
set Z77=GetAttacker()
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerAddCondition(t,Condition(function QQD))
call SInt(EC8,"TargetIndex",KJ8(m5))
call SUnit(EC8,"Source",Z77)
set TA8=GetUnitAbilityLevel(Z77,'A1IQ')
if TA8==0 then
call UnitRemoveAbility(Z77,'A1J4')
call UnitRemoveAbility(Z77,'A1J3')
call UnitRemoveAbility(Z77,'A1J5')
call UnitRemoveAbility(Z77,'A1IU')
elseif TA8==1 then
call UnitRemoveAbility(Z77,'A1J3')
call UnitRemoveAbility(Z77,'A1J5')
call UnitRemoveAbility(Z77,'A1IU')
elseif TA8==2 then
call UnitRemoveAbility(Z77,'A1J4')
call UnitRemoveAbility(Z77,'A1J5')
call UnitRemoveAbility(Z77,'A1IU')
elseif TA8==3 then
call UnitRemoveAbility(Z77,'A1J4')
call UnitRemoveAbility(Z77,'A1J3')
call UnitRemoveAbility(Z77,'A1IU')
elseif TA8==4 then
call UnitRemoveAbility(Z77,'A1J4')
call UnitRemoveAbility(Z77,'A1J3')
call UnitRemoveAbility(Z77,'A1J5')
endif
set m5=null
set Z77=null
set t=null
endif
endif
return false
endfunction
function QTD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local real QUD=TimerGetElapsed(E4)
local integer TA8=GetUnitAbilityLevel(N28,'A1IQ')
local real QVD=LReal(GetHandleId(N28),"LastUsed")
local boolean QWD=LBool(GetHandleId(N28),"JinadaActive")
if QUD-QVD>14-TA8*2 and QWD==false and O18(N28)==false then
call SBool(GetHandleId(N28),"JinadaActive",true)
call AddPermanentAbility(N28,'A1IS')
if GetUnitAbilityLevel(N28,'B068')==0 then
if TA8==1 then
call AddPermanentAbility(N28,'A1J4')
elseif TA8==2 then
call AddPermanentAbility(N28,'A1J3')
elseif TA8==3 then
call AddPermanentAbility(N28,'A1J5')
elseif TA8==4 then
call AddPermanentAbility(N28,'A1IU')
endif
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),'A1J4',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),'A1J3',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),'A1J5',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),'A1IU',false)
elseif QWD==false and GetUnitAbilityLevel(N28,'B068')==0 then
call UnitRemoveAbility(N28,'A1IS')
call UnitRemoveAbility(N28,'A1J4')
call UnitRemoveAbility(N28,'A1J3')
call UnitRemoveAbility(N28,'A1J5')
call UnitRemoveAbility(N28,'A1IU')
endif
set t=null
set N28=null
return false
endfunction
function QXD takes unit AM7,boolean SY8 returns nothing
local trigger t=CreateTrigger()
local trigger t2=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer QYD=GetHandleId(t2)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function QTD))
call TriggerRegisterAllPlayersEvent(t2,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t2,AM7,EVENT_UNIT_DEATH)
call TriggerAddCondition(t2,Condition(function QSD))
call SUnit(EC8,"Hero",AM7)
call SUnit(QYD,"JinadaHero",AM7)
if GetUnitPointValue(AM7)==500 then
set UV7[GetPlayerId(GetOwningPlayer(AM7))]=t
set UZ7[GetPlayerId(GetOwningPlayer(AM7))]=t2
endif
set AM7=null
set t=null
set t2=null
endfunction
function QZD takes nothing returns boolean
if GetLearnedSkill()=='A1IQ' and GetUnitAbilityLevel(GetTriggerUnit(),'A1IQ')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call QXD(GetTriggerUnit(),false)
endif
return false
endfunction
function ZM8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function QZD))
set t=null
endfunction
function QAD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local unit Z77=LUnit(EC8,"Source")
local integer TA8=GetUnitAbilityLevel(Z77,'A07A')
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 then
call LT7(EC8)
call EA8(t)
if LState(Z77,"WindWalk|CD")==false then
call AddTimedBoolBuff(Z77,"WindWalk|CD",.5)
if IsUnitType(m5,UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(m5,GetOwningPlayer(Z77))then
call Dmg(Z77,m5,HeroNormal,30*TA8)
call QM8(I2S(R2I(30*TA8)),1,Z77,.027,216,0,0,216)
call EY8(Z77,"WindWalkBH|Active")
set t=LTrig(GetHandleId(Z77),"ai|WWTrigger")
call LT7(GetHandleId(t))
call EA8(t)
endif
endif
endif
else
call LT7(EC8)
call EA8(t)
endif
set t=null
set Z77=null
set m5=null
return false
endfunction
function QBD takes nothing returns boolean
local trigger t=null
local unit m5=null
local unit Z77=null
local integer EC8
local integer TA8
if LState(GetAttacker(),"WindWalkBH|Active")then
set t=CreateTrigger()
set m5=GetTriggerUnit()
set Z77=GetAttacker()
set EC8=GetHandleId(t)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2.,false)
call TriggerAddCondition(t,Condition(function QAD))
call SUnit(EC8,"Target",m5)
call SUnit(EC8,"Source",Z77)
if LBool(GetHandleId(Z77),"JinadaActive")then
set TA8=GetUnitAbilityLevel(Z77,'A1IQ')
if TA8==0 then
call UnitRemoveAbility(Z77,'A1J4')
call UnitRemoveAbility(Z77,'A1J3')
call UnitRemoveAbility(Z77,'A1J5')
call UnitRemoveAbility(Z77,'A1IU')
elseif TA8==1 then
call UnitRemoveAbility(Z77,'A1J3')
call UnitRemoveAbility(Z77,'A1J5')
call UnitRemoveAbility(Z77,'A1IU')
elseif TA8==2 then
call UnitRemoveAbility(Z77,'A1J4')
call UnitRemoveAbility(Z77,'A1J5')
call UnitRemoveAbility(Z77,'A1IU')
elseif TA8==3 then
call UnitRemoveAbility(Z77,'A1J4')
call UnitRemoveAbility(Z77,'A1J3')
call UnitRemoveAbility(Z77,'A1IU')
elseif TA8==4 then
call UnitRemoveAbility(Z77,'A1J4')
call UnitRemoveAbility(Z77,'A1J3')
call UnitRemoveAbility(Z77,'A1J5')
endif
else
call UnitRemoveAbility(Z77,'A1J4')
call UnitRemoveAbility(Z77,'A1J3')
call UnitRemoveAbility(Z77,'A1J5')
call UnitRemoveAbility(Z77,'A1IU')
endif
set m5=null
set Z77=null
set t=null
endif
return false
endfunction
function QCD takes nothing returns boolean
local integer EC8=GetHandleId(GetTriggeringTrigger())
local unit Z77=LUnit(EC8,"Hero")
local integer TA8
call EY8(Z77,"WindWalkBH|Active")
if GetTriggerEventId()==EVENT_UNIT_SPELL_CAST or GetTriggerEventId()==EVENT_UNIT_DEATH then
if LBool(GetHandleId(Z77),"JinadaActive")then
set TA8=GetUnitAbilityLevel(Z77,'A1IQ')
if TA8==0 then
call UnitRemoveAbility(Z77,'A1J4')
call UnitRemoveAbility(Z77,'A1J3')
call UnitRemoveAbility(Z77,'A1J5')
call UnitRemoveAbility(Z77,'A1IU')
elseif TA8==1 then
call UnitRemoveAbility(Z77,'A1J3')
call UnitRemoveAbility(Z77,'A1J5')
call UnitRemoveAbility(Z77,'A1IU')
elseif TA8==2 then
call UnitRemoveAbility(Z77,'A1J4')
call UnitRemoveAbility(Z77,'A1J5')
call UnitRemoveAbility(Z77,'A1IU')
elseif TA8==3 then
call UnitRemoveAbility(Z77,'A1J4')
call UnitRemoveAbility(Z77,'A1J3')
call UnitRemoveAbility(Z77,'A1IU')
elseif TA8==4 then
call UnitRemoveAbility(Z77,'A1J4')
call UnitRemoveAbility(Z77,'A1J3')
call UnitRemoveAbility(Z77,'A1J5')
endif
else
call UnitRemoveAbility(Z77,'A1J4')
call UnitRemoveAbility(Z77,'A1J3')
call UnitRemoveAbility(Z77,'A1J5')
call UnitRemoveAbility(Z77,'A1IU')
endif
else
if not LBool(GetHandleId(Z77),"JinadaActive")then
call UnitRemoveAbility(Z77,'A1J4')
call UnitRemoveAbility(Z77,'A1J3')
call UnitRemoveAbility(Z77,'A1J5')
call UnitRemoveAbility(Z77,'A1IU')
endif
endif
call LT7(EC8)
call EA8(GetTriggeringTrigger())
set Z77=null
return false
endfunction
function Q3D takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Hero")
if IsTriggerEnabled(LTrig(EC8,"CancelTr"))then
call EW8(Z77,"WindWalkBH|Active")
endif
call LT7(EC8)
call EA8(t)
set Z77=null
set t=null
endfunction
function Q6D takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local integer TA8=GetUnitAbilityLevel(Z77,'A07A')
call TriggerRegisterTimerEvent(t,1.25-.25*TA8-.01,false)
call TriggerAddAction(t,function Q3D)
call SUnit(EC8,"Hero",Z77)
set t=CreateTrigger()
call STrig(EC8,"CancelTr",t)
set EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,10+5*TA8,false)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_CAST)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function QCD))
call SUnit(EC8,"Hero",Z77)
call STrig(GetHandleId(Z77),"ai|WWTrigger",t)
call AddPermanentAbility(Z77,'A1J4')
call AddPermanentAbility(Z77,'A1J3')
call AddPermanentAbility(Z77,'A1J5')
call AddPermanentAbility(Z77,'A1IU')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1J4',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1J3',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1J5',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1IU',false)
set t=null
set Z77=null
endfunction
function QLD takes nothing returns boolean
if GetSpellAbilityId()=='A07A' then
call Q6D()
endif
return false
endfunction
function ZN8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function QLD))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function QBD))
set t=null
endfunction
function Q1D takes nothing returns boolean
return GetSpellAbilityId()=='A0GP' or GetSpellAbilityId()=='A0FW'
endfunction
function Q0D takes integer TA8,integer a returns integer
if a==0 then
return 1
else
return(TA8-1)*5+1+a
endif
endfunction
function Ry takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='e00X'
endfunction
function RY takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Q5D takes player p returns nothing
local group g=OG8()
call GroupEnumUnitsOfPlayer(g,p,Condition(function Ry))
call ForGroup(g,function RY)
call OF8(g)
set g=null
endfunction
function GetWarpathAbility takes integer x,integer y returns integer
local integer i=(x+2)*y-2
set i=i/ 4
if i<0 then
set i=0
endif
if i>5 then
set i=5
endif
return'AZ2N'+i
endfunction
function GetWarpathLevel takes integer x,integer y returns integer
local integer i=(x+2)*y-1
if y==0 then
return 1
endif
return i-i/ 4*4
endfunction
function Q2D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local unit AM7=LUnit(GetHandleId(t),"Hero")
local integer W57=GetHandleId(AM7)
local integer ML8=GetUnitAbilityLevel(AM7,'A0FV')
local integer Q_D=(LInt(W57,"Warpath|Level")-1)
local integer R4D=P68(Q_D,0,5)
local unit AC7=LUnit(W57,"Warpath|Caster")
local integer R7D
if ML8==1 then
set R7D=R4D*20
elseif ML8==2 then
set R7D=R4D*25
elseif ML8==3 then
set R7D=R4D*30
endif
if Q_D==0 then
set R7D=0
endif
call W78(AM7,R7D)
if GetUnitTypeId(AC7)=='e00X' then
call UnitRemoveAbility(AC7,'AZ2N')
call UnitRemoveAbility(AC7,'AZ2O')
call UnitRemoveAbility(AC7,'AZ2P')
call UnitRemoveAbility(AC7,'AZ2Q')
call UnitRemoveAbility(AC7,'AZ2R')
call UnitRemoveAbility(AC7,'AZ2S')
call UnitAddAbility(AC7,GetWarpathAbility(ML8,R4D))
call SetUnitAbilityLevel(AC7,GetWarpathAbility(ML8,R4D),GetWarpathLevel(ML8,R4D))
call SInt(W57,"Warpath|Level",Q_D)
else
call Q5D(ED8(GetHandleId(t),"p"))
endif
call LT7(GetHandleId(t))
call EA8(t)
set t=null
set AM7=null
set AC7=null
return false
endfunction
function R8D takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local integer W57=GetHandleId(AM7)
local unit AC7=LUnit(W57,"Warpath|Caster")
local integer ML8=GetUnitAbilityLevel(AM7,'A0FV')
local integer Q_D=(LInt(W57,"Warpath|Level")+1)
local integer R4D=P68(Q_D,0,4+ML8)
local integer R9D=Q0D(ML8,R4D)
local trigger t=CreateTrigger()
local integer R7D
if ML8==1 then
set R7D=R4D*20
elseif ML8==2 then
set R7D=R4D*25
elseif ML8==3 then
set R7D=R4D*30
endif
call W78(AM7,R7D)
call UnitRemoveAbility(AC7,'AZ2N')
call UnitRemoveAbility(AC7,'AZ2O')
call UnitRemoveAbility(AC7,'AZ2P')
call UnitRemoveAbility(AC7,'AZ2Q')
call UnitRemoveAbility(AC7,'AZ2R')
call UnitRemoveAbility(AC7,'AZ2S')
call UnitAddAbility(AC7,GetWarpathAbility(ML8,R4D))
call SetUnitAbilityLevel(AC7,GetWarpathAbility(ML8,R4D),GetWarpathLevel(ML8,R4D))
call SInt(W57,"Warpath|Level",Q_D)
call SUnit(GetHandleId(t),"Hero",AM7)
call DA8(GetHandleId(t),"p",GetOwningPlayer(AM7))
call TriggerRegisterTimerEvent(t,14.,false)
call TriggerAddCondition(t,Condition(function Q2D))
set t=null
set AM7=null
set AC7=null
endfunction
function RDD takes unit AM7,boolean SY8 returns nothing
local integer ML8=GetUnitAbilityLevel(AM7,'A0FV')
local unit oA=CreateUnit(GetOwningPlayer(AM7),'e00X',0,0,0)
local trigger t=CreateTrigger()
call SUnit(GetHandleId(AM7),"Warpath|Caster",oA)
call SetUnitInvulnerable(oA,true)
call AddPermanentAbility(oA,'Aloc')
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Q1D))
call TriggerAddAction(t,function R8D)
if GetUnitPointValue(AM7)==500 then
set UX7[GetPlayerId(GetOwningPlayer(AM7))]=t
endif
set oA=null
set t=null
endfunction
function RED takes nothing returns boolean
if GetLearnedSkill()=='A0FV' and GetUnitAbilityLevel(GetTriggerUnit(),'A0FV')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call RDD(GetTriggerUnit(),false)
endif
return false
endfunction
function ZO8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function RED))
call PU8('A0EF')
set t=null
endfunction
function RFD takes nothing returns boolean
return(GetSpellAbilityId()=='A0FW')and HasLinkin(GetSpellTargetUnit())==false
endfunction
function R6 takes nothing returns nothing
call KillUnit(GetEnumUnit())
endfunction
function R7 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='e00E')
endfunction
function R9 takes nothing returns nothing
local location Mk=GetUnitLoc(GetTriggerUnit())
call SetUnitPositionLoc(GetEnumUnit(),Mk)
if GetUnitUserData(GetEnumUnit())==4 then
call IssueTargetOrderById(GetEnumUnit(),852662,GetSpellTargetUnit())
else
call IncUnitAbilityLevel(GetEnumUnit(),'A0FZ')
call IssueTargetOrderById(GetEnumUnit(),852662,GetSpellTargetUnit())
call SetUnitUserData(GetEnumUnit(),(GetUnitUserData(GetEnumUnit())+1))
endif
call RemoveLocation(Mk)
set Mk=null
endfunction
function RGD takes nothing returns nothing
local location Mk=GetUnitLoc(GetTriggerUnit())
local location sA=GetUnitLoc(GetSpellTargetUnit())
local group sb=OG8()
if(UnitHasBuffBJ(GetSpellTargetUnit(),'B02U'))then
call GroupEnumUnitsOfPlayer(sb,GetOwningPlayer(GetSpellTargetUnit()),Condition(function R7))
call ForGroupBJ(sb,function R9)
else
call GroupEnumUnitsOfPlayer(sb,GetOwningPlayer(GetSpellTargetUnit()),Condition(function R7))
call ForGroupBJ(sb,function R6)
call DisableTrigger(EA)
call CreateNUnitsAtLocFacingLocBJ(1,'e00E',GetOwningPlayer(GetSpellTargetUnit()),Mk,sA)
call EnableTrigger(EA)
call UnitAddAbility(bj_lastCreatedUnit,'A0FZ')
call SetUnitAbilityLevelSwapped('A0FZ',bj_lastCreatedUnit,((GetUnitAbilityLevelSwapped('A0FW',GetTriggerUnit())*4)-3))
call IssueTargetOrderById(bj_lastCreatedUnit,852662,GetSpellTargetUnit())
call SetUnitUserData(bj_lastCreatedUnit,1)
endif
call OF8(sb)
call RemoveLocation(Mk)
call RemoveLocation(sA)
set Mk=null
set sA=null
set sb=null
endfunction
function ZP8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function RFD))
call TriggerAddAction(t,function RGD)
set t=null
endfunction
function RHD takes nothing returns boolean
return IsUnitType(GetEventDamageSource(),UNIT_TYPE_STRUCTURE)==false
endfunction
function RID takes unit N28 returns nothing
local unit AC7=CreateUnit(GetOwningPlayer(N28),'e00E',GetUnitX(N28),GetUnitY(N28),0)
call AddPermanentAbility(AC7,'A0GP')
call SetUnitAbilityLevel(AC7,'A0GP',GetUnitAbilityLevel(N28,'A0GP'))
call IssueImmediateOrderById(AC7,852526)
set AC7=null
endfunction
function RJD takes unit N28,real P99 returns nothing
local integer EC8=GetHandleId(N28)
local real sD=LReal(EC8,"Bristleback_DamageStack")
if sD+P99>250 then
call SReal(EC8,"Bristleback_DamageStack",((0)*1.))
call RID(N28)
else
call SReal(EC8,"Bristleback_DamageStack",((sD+P99)*1.))
endif
endfunction
function RKD takes nothing returns nothing
local unit RMD=GetTriggerUnit()
local unit N99=GetEventDamageSource()
local real RND=YH7(N99,RMD)
local real ROD=GetUnitFacing(RMD)
local real RPD
local real P08=GetEventDamage()
local real RQD
local real CV7
if(P08>5)and GetUnitState(RMD,UNIT_STATE_LIFE)>1 and GetUnitAbilityLevel(RMD,'BNdo')==0 then
if((ROD-RND)<(-180.))then
set RPD=(ROD-RND+360)
else
if((ROD-RND)>180.)then
set RPD=(ROD-RND-360)
else
set RPD=(ROD-RND)
endif
endif
set CV7=RAbsBJ(RPD)
if CV7<=70 then
set RQD=(GetUnitAbilityLevel(RMD,'A0M3')*.08+.08)*P08
call RJD(RMD,P08-RQD)
call SetUnitState(RMD,UNIT_STATE_LIFE,GetUnitState(RMD,UNIT_STATE_LIFE)+RQD)
elseif CV7<='n' then
set RQD=(GetUnitAbilityLevel(RMD,'A0M3')*.04+.04)*P08
call SetUnitState(RMD,UNIT_STATE_LIFE,GetUnitState(RMD,UNIT_STATE_LIFE)+RQD)
endif
endif
set RMD=null
set N99=null
endfunction
function RRD takes unit AM7,boolean SY8 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function RHD))
call TriggerAddAction(t,function RKD)
if GetUnitPointValue(AM7)==500 then
set UW7[GetPlayerId(GetOwningPlayer(AM7))]=t
endif
set t=null
endfunction
function RSD takes nothing returns boolean
if GetLearnedSkill()=='A0M3' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A0M3')==1 then
call RRD(GetTriggerUnit(),false)
endif
return false
endfunction
function ZQ8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function RSD))
set t=null
endfunction
function RTD takes nothing returns boolean
return GetSpellAbilityId()=='A0GP'
endfunction
function RUD takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitAbilityLevel(GetFilterUnit(),'A04R')!=1
endfunction
function RVD takes nothing returns nothing
local integer RWD=GetHandleId(GetEnumUnit())
local integer RXD=LoadInteger(R8,G9,RWD)
local real P08=PL8(Y8+RXD*30,400)
call UnitDamageTarget(W8,GetEnumUnit(),P08,false,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call SaveInteger(R8,G9,RWD,RXD+1)
endfunction
function RYD takes nothing returns nothing
local integer RWD=GetHandleId(GetEnumUnit())
local integer RXD=LoadInteger(R8,G9,RWD)
call SaveInteger(R8,G9,RWD,RXD-1)
endfunction
function RZD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit N28=LUnit(W57,"UnitVar")
local group XS8=LGroup(W57,"GroupVar")
set G9=GetHandleId(N28)
call ForGroup(XS8,function RYD)
call OF8(XS8)
call LT7(W57)
call EA8(t)
set t=null
set N28=null
set XS8=null
return false
endfunction
function RAD takes nothing returns nothing
local unit O4D=GetTriggerUnit()
local group QA9=OG8()
local trigger t=CreateTrigger()
if IsUnitType(O4D,UNIT_TYPE_HERO)==false then
set O4D=Y7[GetPlayerId(GetOwningPlayer(O4D))]
endif
call GroupEnumUnitsInRange(QA9,GetUnitX(O4D),GetUnitY(O4D),650,Condition(function RUD))
set W8=CreateUnit(GetOwningPlayer(O4D),'e00E',GetUnitX(O4D),GetUnitY(O4D),0)
set Y8=GetUnitAbilityLevel(O4D,'A0GP')*20
set G9=GetHandleId(O4D)
call ForGroup(QA9,function RVD)
call SUnit(GetHandleId(t),"UnitVar",O4D)
call SGroup(GetHandleId(t),"GroupVar",QA9)
call TriggerRegisterTimerEvent(t,14.,false)
call TriggerAddCondition(t,Condition(function RZD))
set t=null
set O4D=null
set QA9=null
endfunction
function ZR8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function RTD))
call TriggerAddAction(t,function RAD)
set t=null
endfunction
function RBD takes nothing returns nothing
call Dmg(JX7,GetEnumUnit(),NormalFire,JY7)
endfunction
function RCD takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A2ON')
local real R3D
local group g=OG8()
set JY7='d'+ML8*75
set JX7=Z77
set H04=Z77
call GroupEnumUnitsInRange(g,GetUnitX(m5),GetUnitY(m5),190+25,Condition(function UW8))
call ForGroup(g,function RBD)
set R3D=JY7
if GetUnitState(Z77,UNIT_STATE_LIFE)<=R3D*.75 then
set R3D=GetUnitState(Z77,UNIT_STATE_LIFE)/ .75-10
endif
call Dmg(Z77,Z77,NormalFire,R3D)
call DestroyEffect(AddSpecialEffect("war3mapImported\\DoubleEdgeTarget.mdx",GetUnitX(m5),GetUnitY(m5)))
set Z77=null
set m5=null
endfunction
function R6D takes nothing returns boolean
if GetSpellAbilityId()=='A2ON'then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
call RCD()
else
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\DoubleEdgeCaster.mdx",GetTriggerUnit(),"hand, right"))
endif
endif
return false
endfunction
function ZS8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function R6D))
set t=null
endfunction
function RLD takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'A00V')>0 and GetUnitAbilityLevel(GetAttacker(),'A04R')!=1 and IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))==false and GetUnitTypeId(GetAttacker())!='n0F5'
endfunction
function R1D takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetAttacker()
local integer ML8=GetUnitAbilityLevel(Z77,'A00V')
local integer R0D=GetHeroStr(Z77,true)
local real P08=(14+2*ML8)+(.18+.08*ML8)*R0D
call Dmg(Z77,X77,HeroNormal,P08)
set Z77=null
set X77=null
endfunction
function ZT8 takes nothing returns nothing
local trigger t=CreateTrigger()
call ky(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function RLD))
call TriggerAddAction(t,function R1D)
set t=null
endfunction
function R5D takes nothing returns nothing
local integer R2D
local unit R_D=GetEnumUnit()
if GU8(R_D)==false and LState(R_D,"Stampede|4332")==false then
call AddTimedBoolBuff(R_D,"Stampede|4332",JC7)
set R2D=JB7
call Dmg(JA7,R_D,NormalFire,(R2D)*GetHeroStr(JZ7,true))
call SetPlayerAbilityAvailable(GetOwningPlayer(R_D),'A2OK',false)
call AddPermanentAbility(R_D,'A2OK')
call T68(R_D,'A2OK',1,1.5,'B0GF')
endif
set R_D=null
endfunction
function S4D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local group g
if GetTriggerEvalCount(t)>=R2I(20*JC7)or GetTriggerEventId()==EVENT_WIDGET_DEATH then
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SetUnitPathing(Z77,true)
call UnitRemoveAbility(Z77,'A2O4')
call UnitRemoveAbility(Z77,'B0GB')
else
set g=OG8()
set H04=Z77
set JZ7=AC7
set JA7=Z77
set JB7=ML8
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),'i'+25,Condition(function UM8))
call ForGroup(g,function R5D)
call OF8(g)
endif
set t=null
set Z77=null
set g=null
return false
endfunction
function S7D takes nothing returns nothing
local unit Z77=GetEnumUnit()
local integer ML8=GetUnitAbilityLevel(JZ7,'A2O6')
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SetUnitPathing(Z77,false)
call AddPermanentAbility(Z77,'A2O4')
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerAddCondition(t,Condition(function S4D))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(19),(JZ7))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveEffectHandle(R8,(W57),(175),(AddSpecialEffectTarget("war3mapImported\\SandBreathDamageSmall.mdx",Z77,"foot, left")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget("war3mapImported\\SandBreathDamageSmall.mdx",Z77,"foot, right")))
set Z77=null
set t=null
endfunction
function S8D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local group g=OG8()
call FlushChildHashtable(R8,(W57))
call EA8(t)
set JZ7=Z77
set H04=Z77
call GroupEnumUnitsInRange(g,0,0,99999,Condition(function VS8))
call ForGroup(g,function S7D)
call OF8(g)
set t=null
set Z77=null
set g=null
return false
endfunction
function S9D takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local sound SDD=CreateSound("abilities\\Spells\\Other\\Stampede\\StampedeCaster1.wav",false,false,false,10,10,"DefaultEAXON")
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call StartSound(SDD)
call KillSoundWhenDone(SDD)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function S8D))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set Z77=null
set SDD=null
endfunction
function SED takes nothing returns boolean
if GetSpellAbilityId()=='A2O6' then
call S9D()
endif
return false
endfunction
function ZU8 takes nothing returns nothing
local trigger t=CreateTrigger()
call PU8('A2O4')
call PU8('A0X6')
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function SED))
call CreateSound("abilities\\Spells\\Other\\Stampede\\StampedeCaster1.wav",false,false,false,10,10,"DefaultEAXON")
set t=null
endfunction
function SFD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=LInt(EC8,"Level")
local real so
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamage()>10 then
set so=GetEventDamage()*.08*TA8
call DisableTrigger(t)
call Dmg(GetEventDamageSource(),GetTriggerUnit(),HeroNormal,so)
call EnableTrigger(t)
endif
else
call LT7(EC8)
call EA8(t)
endif
set t=null
return false
endfunction
function SGD takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit m5=GetSpellTargetUnit()
local unit Z77=GetTriggerUnit()
local integer TA8=GetUnitAbilityLevel(Z77,'A0KM')
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",Z77,"chest"))
call SInt(EC8,"Level",TA8)
call TriggerRegisterTimerEvent(t,7.,false)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function SFD))
set t=null
set m5=null
set Z77=null
endfunction
function SHD takes nothing returns boolean
if GetSpellAbilityId()=='A0KM'then
call SGD()
endif
return false
endfunction
function ZV8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function SHD))
set t=null
endfunction
function SID takes nothing returns boolean
return GetSpellAbilityId()=='A0LT' or GetSpellAbilityId()=='A1CS'
endfunction
function sq takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1
endfunction
function SJD takes nothing returns nothing
local unit N28=GetTriggerUnit()
local integer sr=GetUnitAbilityLevel(N28,'A0LT')
local group XS8=WO7(bj_mapInitialPlayableArea,Condition(function sq))
local unit PZ
if sr==0 then
set sr=GetUnitAbilityLevel(N28,'A1CS')
endif
loop
set PZ=FirstOfGroup(XS8)
exitwhen PZ==null
if(IsUnitAlly(PZ,GetOwningPlayer(N28)))then
call SetWidgetLife(PZ,(GetUnitStateSwap(UNIT_STATE_LIFE,PZ)+'d'+('d'*sr)))
call DestroyEffect(AddSpecialEffectTargetUnitBJ("chest",PZ,"Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl"))
endif
call GroupRemoveUnit(XS8,PZ)
endloop
call DestroyGroup(XS8)
set XS8=WP7(bj_mapInitialPlayableArea,GetOwningPlayer(N28))
loop
set PZ=FirstOfGroup(XS8)
exitwhen PZ==null
if(IsUnitType(PZ,UNIT_TYPE_HERO)==false and GetUnitTypeId(PZ)!='n00C')then
call SetUnitLifePercentBJ(PZ,'d')
call DestroyEffect(AddSpecialEffectTargetUnitBJ("chest",PZ,"Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl"))
endif
call GroupRemoveUnit(XS8,PZ)
endloop
call DestroyGroup(XS8)
set N28=null
set XS8=null
set PZ=null
endfunction
function ZW8 takes nothing returns nothing
set do=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(do,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(do,Condition(function SID))
call TriggerAddAction(do,function SJD)
endfunction
function SKD takes nothing returns boolean
return GetSpellAbilityId()=='A0LV' or GetSpellAbilityId()=='A2MC'
endfunction
function SMD takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit st=LUnit(EC8,"Chen")
local unit u=LUnit(EC8,"Unit")
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
if IsPurgeId(GetSpellAbilityId())and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(st))then
call DestroyEffect(LEff(EC8,"FX"))
call TriggerOff()
endif
set st=null
set u=null
set t=null
return
endif
call DestroyEffect(LEff(EC8,"FX"))
if LBool(GetHandleId(u),"Grapple")==false and GetUnitAbilityLevel(u,'A04R')==0 then
call AddTimedBoolBuff(u,"4409",1)
call SetUnitPosition(u,x,y)
endif
if LBool(GetHandleId(u),"Grapple")then
call ShowWarningToPlayer(GetOwningPlayer(st),GetObjectName('n036'))
endif
call LT7(EC8)
call EA8(t)
set t=null
set st=null
set u=null
endfunction
function SND takes unit u,unit SOD,integer QL8,real x,real y returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
if IsUnitOwnedByPlayer(u,GetOwningPlayer(SOD))then
call TriggerRegisterTimerEvent(t,.1,false)
else
call TriggerRegisterTimerEvent(t,7-QL8,false)
endif
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function SMD))
call SEff(W57,"FX",AddSpecialEffectTarget("effects\\Test_of_Faith_FX.mdx",u,"overhead"))
call SUnit(W57,"Unit",u)
call SUnit(W57,"Chen",SOD)
call SReal(W57,"x",x)
call SReal(W57,"y",y)
set t=null
endfunction
function SPD takes nothing returns nothing
local unit m5=GetSpellTargetUnit()
local unit st=GetTriggerUnit()
local location Mk=GetUnitLoc(st)
local unit oA
local integer sr=GetUnitAbilityLevel(st,'A0LV')
local real sX
local location sy
local effect fx
if(IsJWPlayer(GetOwningPlayer(st)))then
set sy=GetRectCenter(QD)
else
set sy=GetRectCenter(PD)
endif
if(IsUnitAlly(m5,GetOwningPlayer(st))==false)then
if HasLinkin(GetSpellTargetUnit())==false then
set sX=GetRandomInt(50*sr,'d'*sr)
call QM8(I2S(R2I(sX)),1,m5,.023,255,255,0,216)
call UnitDamageTargetBJ(st,m5,sX,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)
set fx=AddSpecialEffectTargetUnitBJ("chest",m5,"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
call DestroyEffect(fx)
endif
else
if(IsUnitType(m5,UNIT_TYPE_HERO))then
if(LBool(GetHandleId(GetOwningPlayer(m5)),"DisableHelp")==false)then
call SND(m5,st,sr,GetLocationX(sy),GetLocationY(sy))
endif
elseif(IsUnitOwnedByPlayer(m5,GetOwningPlayer(st)))then
call SetUnitPositionLoc(m5,sy)
endif
endif
call RemoveLocation(Mk)
call RemoveLocation(sy)
set m5=null
set st=null
set Mk=null
set oA=null
set sy=null
set fx=null
endfunction
function SQD takes nothing returns boolean
if GetLearnedSkill()=='A0LV' and IsUnitIllusion(GetTriggerUnit())==false then
call AddPermanentAbility(GetTriggerUnit(),'A2MC')
call SetUnitAbilityLevel(GetTriggerUnit(),'A2MC',GetUnitAbilityLevel(GetTriggerUnit(),'A0LV'))
endif
return false
endfunction
function ZY8 takes nothing returns nothing
local trigger t
set VJ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(VJ,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(VJ,Condition(function SKD))
call TriggerAddAction(VJ,function SPD)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function SQD))
endfunction
function SRD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer ML8=GetUnitAbilityLevel(Z77,'AHab')
if O18(Z77)==false then
call SetUnitState(Z77,UNIT_STATE_MANA,GetUnitState(Z77,UNIT_STATE_MANA)+(.5+.5*ML8)*.25)
endif
set Z77=null
set t=null
return false
endfunction
function SSD takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerAddCondition(t,Condition(function SRD))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=null
set Z77=null
endfunction
function STD takes nothing returns boolean
if GetLearnedSkill()=='AHab' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'AHab')==1 then
call SSD()
endif
return false
endfunction
function ZZ8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function STD))
set t=null
endfunction
function SUD takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e038',x,y,0)
local integer ML8=GetUnitAbilityLevel(Z77,'A1E9')
call AddPermanentAbility(AC7,'A01D')
call SetUnitAbilityLevel(AC7,'A01D',ML8)
call IssueTargetOrderById(AC7,852226,AC7)
call RemoveLocation(l)
call AddPermanentAbility(AC7,'Aloc')
call UnitApplyTimedLife(AC7,'BTLF',2)
set Z77=null
set AC7=null
set l=null
endfunction
function SVD takes nothing returns boolean
if GetSpellAbilityId()=='A1E9' then
call SUD()
endif
return false
endfunction
function ZA8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function SVD))
set t=null
endfunction
function SWD takes nothing returns boolean
return(GetSpellAbilityId()=='A069')
endfunction
function SXD takes nothing returns boolean
return((not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAliveBJ(GetFilterUnit()))and(not IsCourier(GetFilterUnit()))and(GetUnitTypeId(GetFilterUnit())!='ncop')and(GetUnitAbilityLevel(GetFilterUnit(),'Aeth')==1)and((GetUnitAbilityLevel(GetFilterUnit(),'A0KO')==1)or(GetUnitAbilityLevel(GetFilterUnit(),'A0KQ')==1)or(GetUnitAbilityLevel(GetFilterUnit(),'A0KR')==1)or(GetUnitAbilityLevel(GetFilterUnit(),'A0KP')==1)))
endfunction
function sS takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit st=LUnit(EC8,"Chen")
local integer sT=LInt(EC8,"MaxUnits")
local group XS8=WQ7(GetOwningPlayer(st),Condition(function SXD))
local unit PZ
loop
exitwhen(CountUnitsInGroup(XS8)<=sT)
set PZ=GroupPickRandomUnit(XS8)
call GroupRemoveUnit(XS8,PZ)
call RemoveUnit(PZ)
endloop
call DestroyGroup(XS8)
call LT7(EC8)
call EA8(t)
set st=null
set t=null
set XS8=null
set PZ=null
return false
endfunction
function SYD takes nothing returns nothing
local unit sU=GetSpellTargetUnit()
local unit st=GetTriggerUnit()
local integer sr=GetUnitAbilityLevel(st,'A069')
local integer sT=1
local integer playerid=GetPlayerId(GetOwningPlayer(st))
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call P28(sU)
if(sr==1)then
call AddPermanentAbility(sU,'A0KO')
elseif(sr==2)then
call AddPermanentAbility(sU,'A0KQ')
elseif(sr==3)then
set sT=2
call AddPermanentAbility(sU,'A0KR')
elseif(sr==4)then
set sT=3
call AddPermanentAbility(sU,'A0KP')
endif
call AddPermanentAbility(sU,'Aeth')
call AddPermanentAbility(sU,'A12G')
call SUnit(EC8,"Chen",st)
call SInt(EC8,"MaxUnits",sT)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function sS))
set t=null
set sU=null
set st=null
endfunction
function SZD takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local unit AC7
local real x
local real y
if IsUnitEnemy(X77,GetOwningPlayer(Z77))then
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call UnitAddAbility(AC7,'A069')
call SetUnitAbilityLevel(AC7,'A069',GetUnitAbilityLevel(Z77,'A28T'))
call IssueTargetOrderById(AC7,852581,X77)
else
if IsJWPlayer(GetOwningPlayer(Z77))then
set x=GetRectCenterX(QD)
set y=GetRectCenterY(QD)
else
set x=GetRectCenterX(PD)
set y=GetRectCenterY(PD)
endif
if(LBool(GetHandleId(GetOwningPlayer(GetSpellTargetUnit())),"DisableHelp"))==false then
call SND(X77,Z77,GetUnitAbilityLevel(Z77,'A28T'),x,y)
endif
endif
set Z77=null
set X77=null
set AC7=null
endfunction
function SAD takes nothing returns boolean
if GetSpellAbilityId()=='A28T' and HasLinkin(GetSpellTargetUnit())==false then
call SZD()
endif
return false
endfunction
function SBD takes nothing returns boolean
if GetSpellAbilityId()=='A28T' then
if IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))then
if IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_HERO)or IsUnitIllusion(GetSpellTargetUnit())then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n0K9'))
endif
endif
endif
return false
endfunction
function ZX8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function SWD))
call TriggerAddAction(t,function SYD)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function SBD))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function SAD))
set t=null
endfunction
function SCD takes nothing returns nothing
call Dmg(QU,GetEnumUnit(),NormalFire,PU)
endfunction
function S3D takes unit Z77,real x,real y,integer ML8 returns nothing
local group g=OG8()
if ML8==1 then
set PU='i'
elseif ML8==2 then
set PU=170
elseif ML8==3 then
set PU=250
elseif ML8==4 then
set PU=310
endif
set QU=Z77
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,230+25,Condition(function UM8))
call ForGroup(g,function SCD)
call OF8(g)
set g=null
endfunction
function S6D takes nothing returns nothing
local unit AC7=CreateUnit(GetOwningPlayer(H04),'e00E',GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
if GetUnitAbilityLevel(H04,'A03R')>0 then
call AddPermanentAbility(AC7,'A10T')
else
call AddPermanentAbility(AC7,'A2S6')
endif
call IssueTargetOrderById(AC7,852075,GetEnumUnit())
set AC7=null
endfunction
function SLD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local integer TA8=LInt(EC8,"Level")
local integer S1D=ModuloInteger(GetTriggerEvalCount(t),4)+1
local real a
local real d
local real x
local real y
local group g=OG8()
set H04=N28
call GroupEnumUnitsInRange(g,GetUnitX(N28),GetUnitY(N28),710,Condition(function UM8))
call ForGroup(g,function S6D)
if S1D==1 then
set a=GetRandomReal(0,90)
elseif S1D==2 then
set a=GetRandomReal(90,180)
elseif S1D==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()=='A03R' or GetSpellAbilityId()=='A0AV')then
call LT7(EC8)
call EA8(t)
call StopSound(vX,false,true)
else
set x=GetUnitX(N28)+d*Cos(a*bj_DEGTORAD)
set y=GetUnitY(N28)+d*Sin(a*bj_DEGTORAD)
call DestroyEffect(AddSpecialEffect("effects\\SnowyBlizzardTarget.mdx",x,y))
call S3D(N28,x,y,TA8)
endif
call OF8(g)
set t=null
set g=null
set N28=null
return false
endfunction
function S0D takes nothing returns nothing
local unit N28=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TA8
call S68(vX,GetUnitX(N28),GetUnitY(N28))
if GetSpellAbilityId()=='A03R' then
set TA8=GetUnitAbilityLevel(N28,'A03R')
else
set TA8=GetUnitAbilityLevel(N28,'A0AV')+1
endif
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t,Condition(function SLD))
call SUnit(EC8,"Hero",N28)
call SInt(EC8,"Level",TA8)
set t=null
set N28=null
endfunction
function S5D takes nothing returns boolean
if GetSpellAbilityId()=='A03R' or GetSpellAbilityId()=='A0AV' then
call S0D()
endif
return false
endfunction
function ZB8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function S5D))
call PU8('A03X')
set t=null
endfunction
function S2D takes unit Z77 returns nothing
local integer ML8=GetUnitAbilityLevel(Z77,'A2AI')
if GetUnitTypeId(Z77)=='Hlgr' then
call SetUnitAbilityLevel(Z77,'A0AR',ML8)
else
call SetUnitAbilityLevel(Z77,'A0AR',ML8+4)
endif
endfunction
function S_D takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A2AI')
if ML8==1 then
call AddPermanentAbility(Z77,'A0AR')
endif
call S2D(Z77)
set Z77=null
endfunction
function T4D takes nothing returns boolean
if GetLearnedSkill()=='A2AI' and IsUnitIllusion(GetTriggerUnit())==false then
call S_D()
endif
return false
endfunction
function T7D takes nothing returns nothing
local unit u=GetTriggerUnit()
if GetUnitTypeId(u)=='H00G' or GetUnitTypeId(u)=='H00F' or GetUnitTypeId(u)=='H00E' then
call SetUnitAnimation(u,"stand")
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Defend\\DefendCaster.mdl",u,"head"))
elseif GetUnitTypeId(u)=='Hlgr' then
call SetUnitAnimation(u,"stand defend")
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Defend\\DefendCaster.mdl",u,"origin"))
endif
set u=null
endfunction
function T8D takes nothing returns boolean
if GetSpellAbilityId()=='A0AR' then
call T7D()
endif
return false
endfunction
function D19 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function T8D))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function T4D))
call PU8('A0AR')
set t=null
endfunction
function T9D takes nothing returns boolean
return GetLearnedSkill()=='A0CL'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function TDD takes nothing returns nothing
local unit AM7=GetTriggerUnit()
call SetPlayerTechResearched(GetOwningPlayer(AM7),'R006',GetPlayerTechCount(GetOwningPlayer(AM7),'R006',true)+1)
set AM7=null
endfunction
function DL9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function T9D))
call TriggerAddAction(t,function TDD)
set t=null
endfunction
function TED takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local real PX9=(LoadReal(R8,(GetHandleId(X77)),(805)))
local real R2D=.75
local real P08=20
if IsUnitType(X77,UNIT_TYPE_HERO)==false then
set R2D=1
endif
if GetUnitState(X77,UNIT_STATE_LIFE)<=P08*R2D then
set P08=GetUnitState(X77,UNIT_STATE_LIFE)/ R2D-2
endif
call Dmg(Z77,X77,1,P08)
if(TimerGetElapsed(E4))>=PX9 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function TFD takes unit Z77,unit X77 returns nothing
local trigger t
local integer W57
local real PX9=(LoadReal(R8,(GetHandleId(X77)),(805)))
if PX9>(TimerGetElapsed(E4))then
call SaveReal(R8,(GetHandleId(X77)),(805),(((TimerGetElapsed(E4))+5)*1.))
else
call SaveReal(R8,(GetHandleId(X77)),(805),(((TimerGetElapsed(E4))+5)*1.))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function TED))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
endif
set t=null
endfunction
function TGD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 then
call DisableTrigger(t)
call TFD(Z77,X77)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
else
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set X77=null
set Z77=null
return false
endfunction
function THD takes nothing returns nothing
local trigger t=CreateTrigger()
local unit X77=GetTriggerUnit()
local unit Z77=GetAttacker()
local integer W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerAddCondition(t,Condition(function TGD))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
set t=null
set X77=null
set Z77=null
endfunction
function TID takes nothing returns boolean
if GetAttacker()==(LoadUnitHandle(R8,(GetHandleId(GetTriggeringTrigger())),(2)))and IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false and GetUnitAbilityLevel(GetAttacker(),'A0O4')>0 then
call THD()
endif
return false
endfunction
function TJD takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function TID))
call SaveUnitHandle(R8,(GetHandleId(t)),(2),(Z77))
set Z77=null
set t=null
endfunction
function TKD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call S2D(Z77)
call EA8(t)
call FlushChildHashtable(R8,(W57))
set t=null
set Z77=null
return false
endfunction
function TMD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call S2D(Z77)
call EA8(t)
call FlushChildHashtable(R8,(W57))
set t=null
set Z77=null
return false
endfunction
function YQ8 takes nothing returns nothing
if GetUnitAbilityLevel(H04,'A0AR')>0 then
call S2D(H04)
endif
endfunction
function TND takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.01,false)
call TriggerAddCondition(t,Condition(function TKD))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerAddCondition(t,Condition(function TMD))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set Z77=null
set t=null
endfunction
function TOD takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A03G' then
call TND()
endif
else
if GetLearnedSkill()=='A03G' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A03G')==1 then
call TJD()
endif
endif
return false
endfunction
function D09 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function TOD))
set t=null
endfunction
function TPD takes nothing returns nothing
local real x=GetUnitX(GetEnumUnit())
local real y=GetUnitY(GetEnumUnit())
local integer id=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
call SetUnitX(SX4[id],x)
call SetUnitY(SX4[id],y)
if GetPlayerController(GetOwningPlayer(SX4[id]))==MAP_CONTROL_COMPUTER then
call UnitAddAbility(SX4[id],'A0DM')
call SetUnitAbilityLevel(SX4[id],'A0DM',ZZ)
endif
call IssueImmediateOrderById(SX4[id],852526)
endfunction
function TQD 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)or IsUnitIllusion(GetEnumUnit())then
call SetUnitX(SX4[id],x)
call SetUnitY(SX4[id],y)
if GetPlayerController(GetOwningPlayer(SX4[id]))==MAP_CONTROL_COMPUTER then
call UnitAddAbility(SX4[id],'A0DM')
call SetUnitAbilityLevel(SX4[id],'A0DM',ZZ)
endif
call IssueImmediateOrderById(SX4[id],852526)
endif
endfunction
function TRD takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and O18(GetFilterUnit())==false and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function TSD takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local group g=OG8()
local integer id=GetPlayerId(GetOwningPlayer(Z77))
local integer TA8=GetUnitAbilityLevel(Z77,'A0DH')
if TA8==0 then
set TA8=GetUnitAbilityLevel(Z77,'A1OB')
endif
set SX4[id]=CreateUnit(GetOwningPlayer(Z77),'e00E',x,y,0)
set zZ[id]=CreateUnit(GetOwningPlayer(Z77),'e00E',x,y,0)
set ZZ=TA8
call SetUnitScale(SX4[id],.25,.25,.25)
call AddPermanentAbility(SX4[id],'A0DM')
call AddPermanentAbility(zZ[id],'A1H0')
call SetUnitAbilityLevel(SX4[id],'A0DM',TA8)
call SetUnitAbilityLevel(zZ[id],'A1H0',TA8)
call GroupEnumUnitsInRange(g,x,y,600,Condition(function TRD))
call ForGroup(g,function TPD)
if GetUnitAbilityLevel(Z77,'A1OB')>0 then
call ForGroup(g,function TQD)
endif
call OF8(g)
set Z77=null
set g=null
endfunction
function TTD takes nothing returns boolean
if GetSpellAbilityId()=='A0DH' or GetSpellAbilityId()=='A1OB' then
call TSD()
endif
return false
endfunction
function ZC8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function TTD))
set t=null
call PU8('A0DM')
endfunction
function TUD takes nothing returns nothing
local unit oA=CreateUnit(GetOwningPlayer(GetEnumUnit()),'e00E',GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call AddPermanentAbility(oA,'A0SJ')
call SetUnitAbilityLevel(oA,'A0SJ',HB4)
call IssueTargetOrderById(oA,852095,GetEnumUnit())
call Dmg(GetTriggerUnit(),GetEnumUnit(),NormalFire,H64)
set oA=null
endfunction
function TVD takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local location l=GetSpellTargetLoc()
local integer i=1
local real BJ7=GetUnitX(AM7)
local real BK7=GetUnitY(AM7)
local real BM7
local real BN7
local real x
local real y
local real a
local group g=OG8()
local group g2=OG8()
if X77==null then
set BM7=GetLocationX(l)
set BN7=GetLocationY(l)
else
set BM7=GetUnitX(X77)
set BN7=GetUnitY(X77)
endif
set a=bj_DEGTORAD*YI7(BJ7,BK7,BM7,BN7)
call RemoveLocation(l)
loop
exitwhen i>24
set x=PQ8(BJ7+i*60*Cos(a))
set y=PS8(BK7+i*60*Sin(a))
call GroupEnumUnitsInRange(g2,x,y,250,Condition(function UB8))
call GroupAddGroup(g2,g)
call GroupClear(g2)
call TI8(CreateDestructable('B000',x,y,GetRandomReal(0,360),.5,GetRandomInt(0,2)),8)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",x,y))
set i=i+1
endloop
set HB4=GetUnitAbilityLevel(AM7,'A0SK')
set H64=HB4*50+75
call ForGroup(g,function TUD)
call OF8(g)
call OF8(g2)
set AM7=null
set l=null
set X77=null
set g=null
set g2=null
endfunction
function TWD takes nothing returns boolean
if GetSpellAbilityId()=='A0SK' then
call TVD()
endif
return false
endfunction
function Z38 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function TWD))
call PU8('A0SJ')
set t=null
endfunction
function TXD takes nothing returns boolean
return((GetUnitAbilityLevel(GetSpellAbilityUnit(),'A0DJ')>0)and(((GetSpellAbilityId()=='A0SK')or(GetSpellAbilityId()=='A0DL')or(GetSpellAbilityId()=='A0DH')or(GetSpellAbilityId()=='A1OB')))or(GetUnitPointValue(GetTriggerUnit())==500)and MY8(GetSpellAbilityId()))
endfunction
function TYD takes nothing returns nothing
local location sb=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),sb,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0DI')
call SetUnitAbilityLevelSwapped('A0DI',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0DJ',GetSpellAbilityUnit()))
call IssueImmediateOrderById(bj_lastCreatedUnit,852127)
call RemoveLocation(sb)
set sb=null
endfunction
function Z68 takes nothing returns nothing
set dq=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(dq,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(dq,Condition(function TXD))
call TriggerAddAction(dq,function TYD)
endfunction
function TZD takes nothing returns boolean
return((GetItemTypeId(GetManipulatedItem())=='I00K')and(GetUnitTypeId(GetTriggerUnit())=='Otch'))
endfunction
function TAD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local unit oA=CreateUnit(GetOwningPlayer(N28),'e00E',GetUnitX(N28),GetUnitY(N28),0)
call AddPermanentAbility(oA,'AIrr')
call IssueImmediateOrderById(oA,852164)
call LT7(EC8)
call EA8(t)
set t=null
set N28=null
set oA=null
return false
endfunction
function TBD takes nothing returns nothing
local unit N28=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call UnitRemoveAbility(N28,'B01P')
call SUnit(EC8,"Hero",N28)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function TAD))
set t=null
set N28=null
endfunction
function ZL8 takes nothing returns nothing
set HU4=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(HU4,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(HU4,Condition(function TZD))
call TriggerAddAction(HU4,function TBD)
endfunction
function TCD takes nothing returns boolean
return(UnitHasBuffBJ(GetAttacker(),'Broa'))
endfunction
function T3D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 then
call UnitRemoveAbility(Z77,'Broa')
endif
else
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function T6D takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit X77=GetTriggerUnit()
local unit Z77=GetAttacker()
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,1.5,false)
call TriggerAddCondition(t,Condition(function T3D))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
set t=null
set Z77=null
set X77=null
endfunction
function Z18 takes nothing returns nothing
set dr=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(dr,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(dr,Condition(function TCD))
call TriggerAddAction(dr,function T6D)
endfunction
function TLD takes unit u returns boolean
return IsUnitType(u,UNIT_TYPE_HERO)==false and IsUnitType(u,UNIT_TYPE_ANCIENT)==false and GetUnitTypeId(u)!='n01E' and GetUnitTypeId(u)!='n019'
endfunction
function T1D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
call UnitRemoveAbility(X77,'Bslo')
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set X77=null
return false
endfunction
function T0D takes nothing returns nothing
local unit m5=GetSpellTargetUnit()
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.01,false)
call TriggerAddCondition(t,Condition(function T1D))
call SaveUnitHandle(R8,(W57),(17),(m5))
call SetUnitOwner(m5,GetOwningPlayer(Z77),true)
call UnitApplyTimedLife(m5,'BTLF',80)
call AddPermanentAbility(m5,'Aeth')
call AddPermanentAbility(m5,'A12G')
call P28(m5)
set m5=null
set Z77=null
set t=null
endfunction
function T5D takes nothing returns boolean
if GetSpellAbilityId()=='A0DX' and TLD(GetSpellTargetUnit())then
call T0D()
endif
return false
endfunction
function Z08 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function T5D))
set t=null
endfunction
function T2D takes nothing returns boolean
return ji()and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)!=GetUnitState(GetFilterUnit(),UNIT_STATE_MAX_LIFE)
endfunction
function T_D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local integer Rd=LInt(EC8,"Counter")
local group g
local unit Y_8
if Rd>10 then
call LT7(EC8)
call EA8(t)
else
call SInt(EC8,"Counter",Rd+1)
set H04=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),300,Condition(function T2D))
set Y_8=GroupPickRandomUnit(g)
call OF8(g)
call SetUnitState(Y_8,UNIT_STATE_LIFE,GetUnitState(Y_8,UNIT_STATE_LIFE)+10)
endif
set t=null
set Z77=null
set g=null
set Y_8=null
return false
endfunction
function U4D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call AddUnitAnimationProperties(Z77,"alternate",false)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function U7D takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local integer i=1
local trigger t
local integer W57
loop
exitwhen i>(1+2*GetUnitAbilityLevel(Z77,'A01B'))
set t=CreateTrigger()
call SUnit(GetHandleId(t),"Source",Z77)
call SInt(GetHandleId(t),"Counter",0)
call TriggerRegisterTimerEvent(t,1.,true)
call TriggerAddCondition(t,Condition(function T_D))
set i=i+1
endloop
if GetUnitTypeId(Z77)=='E02X' then
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function U4D))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=null
endif
set t=null
set Z77=null
endfunction
function U8D takes nothing returns boolean
if GetSpellAbilityId()=='A01B' then
call U7D()
endif
return false
endfunction
function Z58 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function U8D))
set t=null
endfunction
function U9D takes real x1,real y1,real x2,real y2 returns real
return SquareRoot(((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)))
endfunction
function UDD takes unit u returns integer
local integer ML8=GetUnitAbilityLevel(u,'A0DY')
if ML8>0 then
return ML8
endif
set ML8=GetUnitAbilityLevel(u,'A1WB')
return ML8
endfunction
function UED takes nothing returns boolean
local real d
local real UFD
if GetUnitAbilityLevel(GetTriggerUnit(),'B03U')>0 and UDD(GetEventDamageSource())>0 and LUnit(GetHandleId(GetTriggeringTrigger()),"Source")==GetEventDamageSource()then
call UnitRemoveAbility(GetTriggerUnit(),'B03U')
set UFD=RMinBJ(U9D(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetUnitX(GetEventDamageSource()),GetUnitY(GetEventDamageSource())),2500)
set d=(.1+.05*I2R(UDD(GetEventDamageSource())))*UFD
call QM8("+"+I2S(R2I(d)),1,GetTriggerUnit(),.023,3,216,216,216)
call DisableTrigger(GetTriggeringTrigger())
call Dmg(GetEventDamageSource(),GetTriggerUnit(),HeroMagic,d)
call LT7(GetHandleId(GetTriggeringTrigger()))
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function UGD takes nothing returns nothing
local trigger t
local unit m5
local unit Z77
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
set m5=GetSpellTargetUnit()
set Z77=GetTriggerUnit()
else
set m5=GetTriggerUnit()
set Z77=GetAttacker()
endif
if IsUnitIllusion(Z77)==false then
set t=CreateTrigger()
call SUnit(GetHandleId(t),"Source",Z77)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function UED))
endif
set t=null
set m5=null
set Z77=null
endfunction
function Sn takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if UDD(GetAttacker())>0 and(LBool(GetHandleId(GetTriggeringTrigger()),"OrbOn")or(GZ[304+GetPlayerId(GetOwningPlayer(GetAttacker()))]))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==LUnit(GetHandleId(GetTriggeringTrigger()),"Hero")then
call UGD()
endif
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if(GetIssuedOrderId()==852255)then
call SBool(GetHandleId(GetTriggeringTrigger()),"OrbOn",true)
elseif(GetIssuedOrderId()==852256)then
call SBool(GetHandleId(GetTriggeringTrigger()),"OrbOn",false)
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and(GetSpellAbilityId()=='A0DY' or GetSpellAbilityId()=='A1WB')then
call UGD()
endif
return false
endfunction
function UHD takes unit AM7,boolean SY8 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function Sn))
call SUnit(GetHandleId(t),"Hero",AM7)
if GetUnitPointValue(AM7)==500 then
set UX7[GetPlayerId(GetOwningPlayer(AM7))]=t
endif
set t=null
endfunction
function UID takes nothing returns boolean
if(GetLearnedSkill()=='A0DY' or GetLearnedSkill()=='A1WB')and IsUnitIllusion(GetTriggerUnit())==false and UDD(GetTriggerUnit())==1 then
call UHD(GetTriggerUnit(),false)
endif
return false
endfunction
function Z28 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function UID))
set t=null
endfunction
function UJD takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
return GetUnitAbilityLevel(GetSpellTargetUnit(),'A0DW')>0
else
return GetUnitAbilityLevel(GetTriggerUnit(),'A0DW')>0
endif
endfunction
function UKD takes nothing returns nothing
local unit Z77
local unit m5
local unit oA
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
set Z77=GetSpellTargetUnit()
set m5=GetTriggerUnit()
else
set Z77=GetTriggerUnit()
set m5=GetAttacker()
endif
set oA=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(m5),GetUnitY(m5),0)
call AddPermanentAbility(oA,'A0B0')
call SetUnitAbilityLevel(oA,'A0B0',GetUnitAbilityLevel(Z77,'A0DW'))
call IssueTargetOrderById(oA,852662,m5)
set Z77=null
set m5=null
set oA=null
endfunction
function Z_8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function UJD))
call TriggerAddAction(t,function UKD)
set t=null
endfunction
function UMD takes real x returns real
local real H7=GetRectMinX(bj_mapInitialPlayableArea)+150
if(x<H7)then
return H7
endif
set H7=GetRectMaxX(bj_mapInitialPlayableArea)-150
if(x>H7)then
return H7
endif
return x
endfunction
function UND takes real y returns real
local real H7=GetRectMinY(bj_mapInitialPlayableArea)+150
if(y<H7)then
return H7
endif
set H7=GetRectMaxY(bj_mapInitialPlayableArea)-150
if(y>H7)then
return H7
endif
return y
endfunction
function UOD takes unit u returns boolean
local integer id=GetUnitTypeId(u)
return id=='npn3' or id=='npn6' or id=='n010' or id=='n0GZ' or id=='npn1' or id=='npn4' or id=='n011' or id=='n0H0' or id=='npn2' or id=='npn5' or id=='n012' or id=='n0H1'
endfunction
function UPD takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or UOD(GetFilterUnit())or T18(GetFilterUnit())or GetUnitTypeId(GetFilterUnit())=='n00U' or GetUnitTypeId(GetFilterUnit())=='n00Y' or GetUnitTypeId(GetFilterUnit())=='n00Z' or GetUnitTypeId(GetFilterUnit())=='n0KU' or GetUnitTypeId(GetFilterUnit())=='n0KV' or GetUnitTypeId(GetFilterUnit())=='n0KW' or NI8(GetUnitTypeId(GetFilterUnit())))and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(LUnit(GetHandleId(GetTriggeringTrigger()),"BlackHole")))
endfunction
function UQD takes nothing returns nothing
local location URD=GetUnitLoc(GetEnumUnit())
local location USD=GetUnitLoc(LUnit(GetHandleId(GetTriggeringTrigger()),"BlackHole"))
local location UTD=ZP7(USD,DistanceBetweenPoints(USD,URD)-2,AngleBetweenPoints(USD,URD))
call SetUnitPositionLoc(GetEnumUnit(),UTD)
call RemoveLocation(URD)
call RemoveLocation(USD)
call RemoveLocation(UTD)
set URD=null
set USD=null
set UTD=null
endfunction
function BlackHoleExtraDamage takes nothing returns nothing
call Dmg(BlackHoleSource,GetEnumUnit(),8,(GetUnitAbilityLevel(BlackHoleSource,'A0B1')*0.01+0.03)*GetUnitState(GetEnumUnit(),UNIT_STATE_MAX_LIFE)*0.02)
endfunction
function UUD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local group XS8
local integer EC8=GetHandleId(t)
local unit UVD=LUnit(EC8,"BlackHole")
local unit AC7
local real x
local real y
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST and(GetSpellAbilityId()=='A1BX' or GetSpellAbilityId()=='AZ0M')then
call KillUnit(UVD)
set AC7=LUnit(EC8,"Caster")
call UnitApplyTimedLife(LUnit(EC8,"Shadow1"),'BTLF',1)
call UnitApplyTimedLife(LUnit(EC8,"Shadow2"),'BTLF',1)
call UnitApplyTimedLife(LUnit(EC8,"Shadow3"),'BTLF',1)
call UnitApplyTimedLife(LUnit(EC8,"Shadow4"),'BTLF',1)
call LT7(EC8)
call EA8(t)
call KillUnit(AC7)
elseif GetTriggerEvalCount(t)>90 then
set AC7=LUnit(EC8,"Caster")
call UnitApplyTimedLife(LUnit(EC8,"Shadow1"),'BTLF',1)
call UnitApplyTimedLife(LUnit(EC8,"Shadow2"),'BTLF',1)
call UnitApplyTimedLife(LUnit(EC8,"Shadow3"),'BTLF',1)
call UnitApplyTimedLife(LUnit(EC8,"Shadow4"),'BTLF',1)
call LT7(EC8)
call EA8(t)
call KillUnit(UVD)
call KillUnit(AC7)
call ZN7(LUnit(EC8,"Source"))
else
set x=GetUnitX(UVD)
set y=GetUnitY(UVD)
set XS8=OG8()
call GroupEnumUnitsInRange(XS8,x,y,425,Condition(function UPD))
call ForGroup(XS8,function UQD)
set BlackHoleSource=LUnit(EC8,"Source")
if GetUnitAbilityLevel(BlackHoleSource,'AZ0M')*GetUnitAbilityLevel(BlackHoleSource,'A0B1')>0 then
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl",x+GetRandomReal(-200,200),y+GetRandomReal(-200,200)))
call ForGroup(XS8,function BlackHoleExtraDamage)
endif
call OF8(XS8)
endif
set AC7=null
set UVD=null
set t=null
set XS8=null
return false
endfunction
function UWD takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',x,y,0)
local unit UVD=CreateUnit(GetOwningPlayer(Z77),'u004',x,y,0)
call RemoveLocation(l)
call SetUnitAbilityLevel(UVD,'A0C0',GetUnitAbilityLevel(Z77,'A1BX')+GetUnitAbilityLevel(Z77,'AZ0M'))
if IsTZPlayer(GetOwningPlayer(Z77))then
call AddPermanentAbility(AC7,'A0X4')
else
call AddPermanentAbility(AC7,'A0X3')
endif
call IssuePointOrderById(AC7,852473,x,y)
call SUnit(EC8,"Caster",AC7)
call SUnit(EC8,"Shadow1",CreateUnit(GetOwningPlayer(Z77),'h06R',x,y,0))
call SUnit(EC8,"Shadow2",CreateUnit(GetOwningPlayer(Z77),'h06R',x,y,0))
call SUnit(EC8,"Shadow3",CreateUnit(GetOwningPlayer(Z77),'h06R',x,y,0))
call SUnit(EC8,"Shadow4",CreateUnit(GetOwningPlayer(Z77),'h06R',x,y,0))
call SUnit(EC8,"BlackHole",UVD)
call SUnit(EC8,"Source",Z77)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_ENDCAST)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function UUD))
set Z77=null
set UVD=null
set t=null
set l=null
set AC7=null
endfunction
function UXD takes nothing returns boolean
if GetSpellAbilityId()=='A1BX' or GetSpellAbilityId()=='AZ0M' then
call UWD()
endif
return false
endfunction
function UYD takes nothing returns boolean
local location l
local real x
local real y
if GetSpellAbilityId()=='A1BX' or GetSpellAbilityId()=='AZ0M' then
set l=GetSpellTargetLoc()
set x=GetLocationX(l)
set y=GetLocationY(l)
call RemoveLocation(l)
set l=null
if(x!=UMD(x)and y!=UND(y))or RectContainsCoords(eE,x,y)or RectContainsCoords(oE,x,y)or RectContainsCoords(aE,x,y)or RectContainsCoords(nE,x,y)or RectContainsCoords(VE,x,y)or RectContainsCoords(EE,x,y)then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),"Cannot cast Blackhole here")
endif
endif
return false
endfunction
function A48 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function UXD))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function UYD))
call PU8('A0C0')
set t=null
endfunction
function UZD takes nothing returns boolean
return(GetSpellAbilityId()=='A0B1')
endfunction
function UAD takes nothing returns nothing
local location UBD=GetUnitLoc(GetTriggerUnit())
local location UCD=GetSpellTargetLoc()
local integer kt=GetUnitAbilityLevel(GetTriggerUnit(),'A0B1')
local unit U3D
call CreateNUnitsAtLocFacingLocBJ(1,'e00E',GetOwningPlayer(GetTriggerUnit()),UCD,UCD)
call ShowUnitHide(bj_lastCreatedUnit)
call UnitApplyTimedLifeBJ(10.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A0B2')
call SetUnitAbilityLevelSwapped('A0B2',bj_lastCreatedUnit,kt)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,852221,UCD)
if(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))!=MAP_CONTROL_USER)then
set U3D=bj_lastCreatedUnit
loop
call Y07(.9)
exitwhen(IsUnitDeadBJ(U3D))
if(GetUnitCurrentOrder(U3D)!=852221)then
call UnitRemoveAbility(U3D,'A0B2')
call UnitAddAbility(U3D,'A0B2')
call SetUnitAbilityLevelSwapped('A0B2',U3D,kt)
call IssuePointOrderByIdLoc(U3D,852221,UCD)
endif
endloop
endif
call RemoveLocation(UBD)
call RemoveLocation(UCD)
set U3D=null
set UBD=null
set UCD=null
endfunction
function A88 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function UZD))
call TriggerAddAction(t,function UAD)
endfunction
function U6D takes unit Z77,unit X77,integer ML8 returns nothing
local real P08
local real ULD
if ML8==1 then
set P08=25
set ULD=.25
elseif ML8==2 then
set P08=40
set ULD=.5
elseif ML8==3 then
set P08=55
set ULD=.75
else
set P08=70
set ULD=1
endif
call Stun(X77,X77,ULD)
call Dmg(Z77,X77,NormalFire,P08)
endfunction
function U1D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local unit X77=LUnit(W57,"Target")
local integer ML8=LInt(W57,"Level")
call U6D(Z77,X77,ML8)
call LT7(W57)
call EA8(t)
set t=null
set Z77=null
set X77=null
return false
endfunction
function U0D takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t
local integer W57
local integer ML8=GetUnitAbilityLevel(Z77,'A0I7')
call U6D(Z77,X77,ML8)
set t=CreateTrigger()
set W57=GetHandleId(t)
call SUnit(W57,"Source",Z77)
call SUnit(W57,"Target",X77)
call SInt(W57,"Level",ML8)
call TriggerRegisterTimerEvent(t,2,false)
call TriggerAddCondition(t,Condition(function U1D))
set t=CreateTrigger()
set W57=GetHandleId(t)
call SUnit(W57,"Source",Z77)
call SUnit(W57,"Target",X77)
call SInt(W57,"Level",ML8)
call TriggerRegisterTimerEvent(t,4,false)
call TriggerAddCondition(t,Condition(function U1D))
set t=null
set Z77=null
set X77=null
endfunction
function U5D takes nothing returns boolean
if GetSpellAbilityId()=='A0I7' and HasLinkin(GetSpellTargetUnit())==false then
call U0D()
endif
return false
endfunction
function A78 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function U5D))
set t=null
endfunction
function U2D takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local real x=GetUnitX(m5)
local real y=GetUnitY(m5)
local integer TA8=GetUnitAbilityLevel(Z77,'A180')
local unit oA=CreateUnit(GetOwningPlayer(Z77),'e00E',x,y,0)
call SetUnitState(m5,UNIT_STATE_LIFE,1)
call Dmg(Z77,m5,HeroNormal,20)
call Dmg(Z77,m5,NormalFire,20)
call Dmg(Z77,m5,HeroMagic,20)
call AddPermanentAbility(oA,'A17Z')
call SetUnitAbilityLevel(oA,'A17Z',TA8)
call IssueImmediateOrderById(oA,852667)
set Z77=null
set m5=null
set oA=null
endfunction
function U_D takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local integer V4D=GetUnitLevel(m5)
if GetOwningPlayer(m5)!=G8[0]and GetOwningPlayer(m5)!=N8[0]and V4D>4 then
call ZN7(N28)
call ShowWarningToPlayer(GetOwningPlayer(N28),(GetObjectName(('n0CX'))))
endif
set N28=null
set m5=null
endfunction
function V7D takes nothing returns boolean
if GetSpellAbilityId()=='A180' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
call U2D()
else
call U_D()
endif
endif
return false
endfunction
function A98 takes nothing returns nothing
local trigger t=CreateTrigger()
local region regDemonicConversion=CreateRegion()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function V7D))
set t=null
endfunction
function SZ takes nothing returns nothing
local integer O5=0
if IsUnitInGroup(GetEnumUnit(),H24)==false then
call GroupAddUnit(H24,GetEnumUnit())
call Dmg(H04,GetEnumUnit(),NormalFire,H64)
if((IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO))and(IsUnitInForce(H04,RX4)))then
set O5=GetPlayerId(GetOwningPlayer(H04))
if((hq[240+O5]>Bz)and(h4[16+O5]==GetEnumUnit())and(Z_7(Y7[O5]))and(ZL7(Y7[O5]))and(GetUnitLifePercent(Y7[O5])>65.)and(G0[128+O5])and(not IsUnitInRange(Y7[O5],GetEnumUnit(),450.))and(kJ(GetUnitX(H04),GetUnitY(H04))))then
set PK4[16+O5]=GetEnumUnit()
endif
endif
endif
endfunction
function S0 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local group g=LGroup(EC8,"g")
local unit oA=LUnit(EC8,"Caster")
local integer TA8=LInt(EC8,"Level")
local real RK=LReal(EC8,"Angle")
local group S1
local real x
local real y
if GetTriggerEventId()==EVENT_UNIT_DEATH then
set H04=CreateUnit(GetOwningPlayer(oA),'h06O',GetUnitX(LUnit(EC8,"Hero")),GetUnitY(LUnit(EC8,"Hero")),0)
call SetUnitScale(H04,2.5,2.5,2.5)
call KillUnit(H04)
call SetUnitPosition(LUnit(EC8,"Hero"),GetUnitX(oA),GetUnitY(oA))
call ShowUnit((LUnit(EC8,"Hero")),false)
call ShowUnit((LUnit(EC8,"Hero")),true)
call SelectUnitAddForPlayer((LUnit(EC8,"Hero")),GetOwningPlayer((LUnit(EC8,"Hero"))))
set PK4[GetPlayerId(GetOwningPlayer(oA))]=null
call OF8(g)
call LT7(EC8)
call EA8(t)
elseif GetTriggerEvalCount(t)>'x' then
set PK4[GetPlayerId(GetOwningPlayer(oA))]=null
call OF8(g)
call LT7(EC8)
call EA8(t)
call SetUnitScale(oA,2.5,2.5,2.5)
call KillUnit(oA)
else
set x=GetUnitX(oA)
set y=GetUnitY(oA)
set S1=OG8()
set H24=g
set PK4[16+GetPlayerId(GetOwningPlayer(oA))]=null
set H04=oA
set H64=TA8*70
call GroupEnumUnitsInRange(S1,x,y,225+25,Condition(function jh))
call ForGroup(S1,function SZ)
call OF8(S1)
call SetUnitX(oA,PQ8(x+15*Cos(RK*bj_DEGTORAD)))
call SetUnitY(oA,PS8(y+15*Sin(RK*bj_DEGTORAD)))
if(IsUnitInForce(oA,RX4))then
if(PK4[16+GetPlayerId(GetOwningPlayer(oA))]!=null)then
call IssueImmediateOrderById(Y7[GetPlayerId(GetOwningPlayer(oA))],852185)
set hq[512+GetPlayerId(GetOwningPlayer(oA))]=Bz+1.
elseif((h4[16+GetPlayerId(GetOwningPlayer(oA))]==Y7[GetPlayerId(GetOwningPlayer(oA))])and(Z_7(Y7[GetPlayerId(GetOwningPlayer(oA))]))and(not IsUnitInRange(Y7[GetPlayerId(GetOwningPlayer(oA))],oA,550.))and(kJ(GetUnitX(oA),GetUnitY(oA)))and(ZL7(Y7[GetPlayerId(GetOwningPlayer(oA))])))then
call IssueImmediateOrderById(Y7[GetPlayerId(GetOwningPlayer(oA))],852185)
endif
endif
endif
set t=null
set g=null
set S1=null
set oA=null
return false
endfunction
function V8D takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local group g=OG8()
local unit N28=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x1=GetUnitX(N28)
local real y1=GetUnitY(N28)
local real x2=GetLocationX(l)
local real y2=GetLocationY(l)
local real RK=YI7(x1,y1,x2,y2)
local integer TA8=GetUnitAbilityLevel(N28,'A0S9')
local unit oA=CreateUnit(GetOwningPlayer(N28),'h06O',x1,y1,RK)
call S68(UX,x1,y1)
call AddPermanentAbility(GetTriggerUnit(),'A0SA')
set PK4[GetPlayerId(GetOwningPlayer(N28))]=oA
call SetUnitScale(oA,3.5,3.5,3.5)
call SUnit(EC8,"Caster",oA)
call SInt(EC8,"Level",TA8)
call SGroup(EC8,"g",g)
call SReal(EC8,"Angle",RK)
call SUnit(EC8,"Hero",N28)
call TriggerRegisterTimerEvent(t,.025,true)
call TriggerRegisterUnitEvent(t,oA,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function S0))
call RemoveLocation(l)
set t=null
set oA=null
set g=null
set N28=null
set l=null
endfunction
function S3 takes nothing returns nothing
local integer i=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
if PK4[i]==null then
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n037'))
else
call SetUnitScale(PK4[i],2.5,2.5,2.5)
call KillUnit(PK4[i])
endif
endfunction
function V9D takes nothing returns boolean
if GetSpellAbilityId()=='A0S9'then
call V8D()
endif
if GetSpellAbilityId()=='A0SA'then
call S3()
endif
return false
endfunction
function fwv takes nothing returns boolean
if GetLearnedSkill()=='A0S9'and GetUnitAbilityLevel(GetTriggerUnit(),'A0S9')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call AddPermanentAbility(GetTriggerUnit(),'A0SA')
endif
return false
endfunction
function FM9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function V9D))
set t=null
endfunction
function VDD takes nothing returns nothing
call Dmg(GetTriggerUnit(),GetEnumUnit(),NormalFire,H64)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\StaffOfPurification\\PurificationTarget.mdx",GetEnumUnit(),"chest"))
endfunction
function VED takes nothing returns nothing
local group g=OG8()
local unit N28=GetTriggerUnit()
local real x=GetUnitX(N28)
local real y=GetUnitY(N28)
local integer TA8=GetUnitAbilityLevel(N28,'A0SC')
local unit oA=CreateUnit(GetOwningPlayer(N28),'e00E',x,y,0)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\StaffOfPurification\\PurificationCaster.mdx",x,y))
call AddPermanentAbility(oA,'A0SD')
call SetUnitAbilityLevel(oA,'A0SD',TA8)
call IssuePointOrderById(oA,852592,x,y)
set H64=TA8*70
call GroupEnumUnitsInRange(g,x,y,425,Condition(function UC8))
call ForGroup(g,function VDD)
call OF8(g)
set oA=null
set g=null
set N28=null
endfunction
function VFD takes nothing returns boolean
if GetSpellAbilityId()=='A0SC'then
call VED()
endif
return false
endfunction
function FN9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function VFD))
set t=null
endfunction
function VGD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local integer ML8
local integer VHD
local integer VID
if(GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER and GetIssuedOrderId()!=852514)or GetTriggerEventId()==EVENT_UNIT_ISSUED_POINT_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER or GetTriggerEventId()==EVENT_UNIT_DEATH then
call SetUnitInvulnerable(N28,false)
call UnitRemoveAbility(N28,'A04R')
call LT7(EC8)
call EA8(t)
else
set ML8=(LInt(EC8,"Level"))
set VHD=(LInt(EC8,"Counter"))+1
call SInt(EC8,"Counter",(VHD))
set VID=3*ML8
if ML8==4 then
set VID=VID+1
endif
if VHD>VID or Z87(GetUnitX(N28),GetUnitY(N28),(LReal(EC8,"x")),(LReal(EC8,"y")))>'}' then
call SetUnitInvulnerable(N28,false)
call UnitRemoveAbility(N28,'A04R')
call LT7(EC8)
call EA8(t)
endif
endif
set t=null
set N28=null
return false
endfunction
function VJD takes nothing returns nothing
local unit N28=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call SetUnitInvulnerable(N28,true)
call AddPermanentAbility(N28,'A04R')
call SUnit(EC8,"Hero",N28)
call SInt(EC8,"Level",GetUnitAbilityLevel(N28,'A0SB'))
call SInt(EC8,"Counter",0)
call SReal(EC8,"x",((GetUnitX(N28))*1.))
call SReal(EC8,"y",((GetUnitY(N28))*1.))
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_ISSUED_ORDER)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function VGD))
call AddTimedBoolBuff(N28,"4266",5.9)
set t=null
set N28=null
endfunction
function VKD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7=(LoadUnitHandle(R8,(W57),(14)))
call IssueImmediateOrderById(AM7,852516)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set AM7=null
return false
endfunction
function VMD takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SaveUnitHandle(R8,(W57),(14),(AM7))
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function VKD))
set t=null
set AM7=null
endfunction
function VND takes nothing returns boolean
if GetIssuedOrderId()==852514and IsUnitIllusion(GetTriggerUnit())==false and LState(GetTriggerUnit(),"4266")==false then
call VJD()
elseif GetIssuedOrderId()==852515then
call VMD()
endif
return false
endfunction
function FO9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function VND))
set t=null
endfunction
function VOD takes unit Z77,unit m5,integer TA8,integer VPD returns nothing
call Stun(Z77,m5,.75+.75*TA8)
if VPD==1 then
call Dmg(Z77,m5,NormalFire,TA8*50+50)
else
call Dmg(Z77,m5,NormalFire,TA8*50+50+'d')
endif
endfunction
function VQD takes unit Z77,unit m5 returns nothing
local unit oA=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(m5),GetUnitY(m5),0)
call UnitAddAbility(oA,'A0SF')
call IssueTargetOrderById(oA,852095,m5)
set oA=null
endfunction
function VRD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=(LoadInteger(R8,(EC8),(5)))
local integer VPD=(LoadInteger(R8,(EC8),(152)))
local unit Z77=(LoadUnitHandle(R8,(EC8),(2)))
local integer VSD=(LoadInteger(R8,(EC8),(30)))
local unit m5=KH8(VSD)
local lightning i7=(LoadLightningHandle(R8,(EC8),(196)))
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call DestroyLightning(i7)
call KG8(VSD)
call LT7(EC8)
call EA8(t)
else
call MoveLightning(i7,false,GetUnitX(Z77),GetUnitY(Z77),GetUnitX(m5),GetUnitY(m5))
if Z87(GetUnitX(Z77),GetUnitY(Z77),GetUnitX(m5),GetUnitY(m5))>600 then
call DestroyLightning(i7)
call KG8(VSD)
call LT7(EC8)
call EA8(t)
call VOD(Z77,m5,TA8,VPD)
endif
endif
set t=null
set Z77=null
set m5=null
set i7=null
return false
endfunction
function VTD takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local lightning i7=AddLightning("HWPB",false,GetUnitX(EO7),GetUnitY(EO7),GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()))
call SetLightningColor(i7,0,.7,1,1)
call SaveLightningHandle(R8,(EC8),(196),(i7))
call SaveUnitHandle(R8,(EC8),(2),(EO7))
call SaveInteger(R8,(EC8),(30),(KJ8(GetEnumUnit())))
call SaveInteger(R8,(EC8),(5),(EJ7))
call SaveInteger(R8,(EC8),(152),(EK7))
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerRegisterUnitEvent(t,GetEnumUnit(),EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,EO7,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function VRD))
call Dmg(GetTriggerUnit(),GetEnumUnit(),NormalFire,EM7)
call VQD(GetTriggerUnit(),GetEnumUnit())
set t=null
set i7=null
endfunction
function VUD takes nothing returns nothing
local unit N28=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local unit oA=CreateUnit(GetOwningPlayer(N28),'e00U',x,y,0)
local group g=OG8()
local integer TA8=GetUnitAbilityLevel(N28,'A0S8')
local real VVD=6
local integer VWD=1
if TA8==0 then
set TA8=GetUnitAbilityLevel(N28,'A1QP')
set VVD=8
set VWD=2
endif
call RemoveLocation(l)
call SetUnitAnimation(oA,"channel")
call TN8(oA,VVD)
set EO7=oA
set EN7=VVD
set EM7=TA8*50+50
set EJ7=TA8
set EK7=VWD
set H04=N28
call GroupEnumUnitsInRange(g,x,y,400,Condition(function US8))
call ForGroup(g,function VTD)
call OF8(g)
set g=null
set oA=null
set N28=null
set l=null
endfunction
function VXD takes nothing returns boolean
if GetSpellAbilityId()=='A0S8' or GetSpellAbilityId()=='A1QP' then
call VUD()
endif
return false
endfunction
function FP9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function VXD))
set t=null
endfunction
function VYD takes nothing returns boolean
return GetSpellAbilityId()=='A21E'
endfunction
function VZD takes nothing returns nothing
call SetUnitX(GetEnumUnit(),XX4)
call SetUnitY(GetEnumUnit(),XY4)
endfunction
function VAD takes nothing returns nothing
local destructable array dx
local integer FKD
local integer VBD
local fogmodifier VCD
local unit AC7=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local location V3D
local real x
local real y
local group g=OG8()
if X77==null then
set V3D=GetSpellTargetLoc()
else
set V3D=GetUnitLoc(X77)
endif
set x=GetLocationX(V3D)
set y=GetLocationY(V3D)
set XX4=x
set XY4=y
if IsUnitAlly(AC7,GetOwningPlayer(X77))or HasLinkin(GetSpellTargetUnit())==false then
set H04=AC7
call GroupEnumUnitsInRange(g,x,y,150,Condition(function UM8))
call TF8(CreateFogModifierRadiusLocBJ(true,GetOwningPlayer(AC7),FOG_OF_WAR_VISIBLE,V3D,1000.),2.25+.75*GetUnitAbilityLevel(AC7,'A21E'))
set FKD=1
set VBD=8
loop
exitwhen FKD>VBD
call TI8(CreateDestructableLoc('B005',ZP7(V3D,150.,(I2R(FKD)*45.)),GetRandomReal(0,360),1,0),2.25+.75*GetUnitAbilityLevel(AC7,'A21E'))
call DZ8(GetHandleId(AC7),"AI|SproutTree"+I2S(FKD),bj_lastCreatedDestructable)
set FKD=FKD+1
endloop
endif
call RemoveLocation(V3D)
call ForGroup(g,function VZD)
call OF8(g)
set VCD=null
set AC7=null
set X77=null
set V3D=null
set g=null
endfunction
function V6D takes nothing returns nothing
if GetSpellAbilityId()=='A21E' and IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and(LBool(GetHandleId(GetOwningPlayer(GetSpellTargetUnit())),"DisableHelp"))then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n038'))
endif
endfunction
function AE8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function VYD))
call TriggerAddAction(t,function VAD)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddAction(t,function V6D)
set t=null
endfunction
function VLD takes nothing returns boolean
return GetSpellAbilityId()=='A01O'
endfunction
function V1D takes nothing returns nothing
local location Mk=GetSpellTargetLoc()
local real x=GetLocationX(Mk)
local real y=GetLocationY(Mk)
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(Mk)
set Mk=null
endfunction
function AF8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_CHANNEL)
call TriggerAddCondition(t,Condition(function VLD))
call TriggerAddAction(t,function V1D)
set t=null
endfunction
function V0D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer NZ8=GetHandleId(t)
local integer ZK7=(LoadInteger(R8,(NZ8),(5)))
local unit V5D=(LoadUnitHandle(R8,(NZ8),(17)))
local integer V2D=N_8(V5D)
local real Z77=GetUnitState(V5D,UNIT_STATE_LIFE)
local real V_D=GetUnitState(V5D,UNIT_STATE_MAX_LIFE)
local real W4D
if Z77/ V_D>.4 then
set W4D=I2R(ZK7)/ 4*.2*V2D+2*ZK7
else
set W4D=I2R(ZK7)/ 4*(.6*V2D+.6)+2*ZK7
endif
set W4D=W4D/ 8.
if GetTriggerEvalCount(t)>16*8. then
call DestroyEffect((LoadEffectHandle(R8,(NZ8),(31))))
call UnitRemoveAbility(V5D,'A0QO')
call FlushChildHashtable(R8,(NZ8))
call EA8(t)
else
call SetUnitState(V5D,UNIT_STATE_LIFE,Z77+W4D)
endif
set V5D=null
set t=null
return false
endfunction
function W7D takes nothing returns nothing
local unit V5D=GetSpellTargetUnit()
local unit W8D=GetTriggerUnit()
local integer ZK7=GetUnitAbilityLevel(W8D,'A0QP')
local trigger t=CreateTrigger()
local integer NZ8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1/ 8.,true)
call TriggerAddCondition(t,Condition(function V0D))
call SaveInteger(R8,(NZ8),(5),(ZK7))
call SaveUnitHandle(R8,(NZ8),(17),(V5D))
call SaveEffectHandle(R8,(NZ8),(31),(AddSpecialEffectTarget("InnerVitality.mdx",V5D,"chest")))
call AddPermanentAbility(V5D,'A0QO')
call SetUnitAbilityLevel(V5D,'A0QO',ZK7)
set V5D=null
set W8D=null
set t=null
endfunction
function W9D takes nothing returns boolean
if GetSpellAbilityId()=='A0QP'then
call W7D()
endif
return false
endfunction
function EW9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function W9D))
set t=null
endfunction
function WDD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer WED
local string Q08
local integer WFD
local integer V_8=LInt(W57,"TargetIndex")
local unit X77=KH8(V_8)
local unit Z77=LUnit(W57,"Source")
if GetTriggerEvalCount(t)>8 or O18(X77)then
call DestroyEffect(LEff(W57,"Effect"))
call LT7(W57)
set WED=GetHandleId(Z77)
set Q08=I2S(GetHandleId(X77))+"NumOfSpears"
set WFD=LInt(WED,Q08)
set WFD=WFD-1
if WFD==0 then
call SInt(WED,Q08,0)
else
call SInt(WED,Q08,WFD)
endif
call KG8(V_8)
call EA8(t)
else
call Dmg(Z77,X77,NormalFire,5*GetUnitAbilityLevel(Z77,'A0QN'))
endif
set t=null
set X77=null
set Z77=null
return false
endfunction
function WGD takes unit Z77,unit m5 returns nothing
local integer EC8=GetHandleId(Z77)
local integer QYD
local trigger t
local integer WHD=LInt(EC8,I2S(GetHandleId(m5))+"NumOfSpears")
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function WDD))
set QYD=GetHandleId(t)
call SUnit(QYD,"Source",Z77)
call SInt(QYD,"TargetIndex",KJ8(m5))
call SInt(EC8,I2S(GetHandleId(m5))+"NumOfSpears",WHD+1)
call SEff(QYD,"Effect",AddSpecialEffectTarget("Abilities\\Spells\\Other\\BreathOfFire\\BreathOfFireDamage.mdl",m5,"chest"))
set t=null
endfunction
function UseSkillWithProj takes player p,unit u,integer id,integer i,integer orderid,real r returns boolean
local unit s=CreateUnit(p,'e00E',GetUnitX(u),GetUnitY(u),0)
local boolean b=false
call UnitAddAbility(s,id)
call SetUnitAbilityLevel(s,id,i)
set b=IssueTargetOrderById(s,orderid,u)
call UnitApplyTimedLife(s,'BTLF',r)
if not b then
call KillUnit(s)
call RemoveUnit(s)
endif
set bj_lastCreatedUnit=s
set s=null
return b
endfunction
function ItemAttackEffects takes unit s,unit u,real d returns nothing
local integer id=0
local integer i=0
local real r=0
if HasItem(s,'I08P')+HasItem(s,'I0BE')>0 and GetRandomInt(0,99)<25 then
set id='A0FK'
set i=852119
elseif HasItem(s,'I0AB')>0 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",s,"origin"))
call AddLife(s,d*.25)
elseif HasItem(s,'I08Y')>0 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",s,"origin"))
call AddLife(s,d*.2)
elseif HasItem(s,'I04K')+HasItem(s,'I08T')>0 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",s,"origin"))
call AddLife(s,d*.15)
elseif HasItem(s,'I0AE')>0 then
if IsUnitType(u,UNIT_TYPE_MELEE_ATTACKER)then
set id='AZ2U'
else
set id='AZ2V'
endif
set i=852075
elseif HasItem(s,'I097')>0 then
set id='AZ2W'
set i=852662
elseif HasItem(s,'I0J9')+HasItem(s,'I0JA')>0 then
set r=RMinBJ(36,GetUnitState(u,UNIT_STATE_MANA))
call SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MANA)-r)
call Dmg(s,u,1,r)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Feedback\\SpellBreakerAttack.mdl",u,"origin"))
elseif HasItem(s,'I08R')+HasItem(s,'I0EV')>0 then
set r=RMinBJ(20,GetUnitState(u,UNIT_STATE_MANA))
call SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MANA)-r)
call Dmg(s,u,1,r)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Feedback\\SpellBreakerAttack.mdl",u,"origin"))
endif
if HasItem(s,'I0M9')+HasItem(s,'I0ME')>0 then
call UnitRemoveAbility(u,'B0DM')
if IsUnitType(s,UNIT_TYPE_RANGED_ATTACKER)then
call UseSkillWithProj(GetOwningPlayer(s),u,'AZ3Q',1,852662,4.5)
else
call UseSkillWithProj(GetOwningPlayer(s),u,'AZ3P',1,852662,4.5)
endif
endif
if HasItem(s,'B07K')>0 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",s,"origin"))
call AddLife(s,d*2)
endif
if HasItem(s,'I0AF')>0 and id==0 then
if IsUnitType(u,UNIT_TYPE_MELEE_ATTACKER)then
set id='AZ2U'
else
set id='AZ2V'
endif
set i=852075
endif
if id>0 then
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(s),'e00E',GetUnitX(s),GetUnitY(s),0)
call UnitAddAbility(bj_lastCreatedUnit,id)
call IssueTargetOrderById(bj_lastCreatedUnit,i,u)
endif
endfunction
function B2S takes boolean b returns string
if b then
return"true"
endif
return"false"
endfunction
function WID takes nothing returns boolean
local real d
local integer WJD=0
local unit u=GetTriggerUnit()
local integer MB8=GetHandleId(u)
local real R48
local real Q_8
if(GetUnitAbilityLevel(u,'B081')>0 or(LUnit(GetHandleId(GetEventDamageSource()),"A0QN_Target")==u and GetEventDamage()>40))and GetUnitAbilityLevel(GetEventDamageSource(),'A0QN')>0 and LUnit(GetHandleId(GetTriggeringTrigger()),"Source")==GetEventDamageSource()then
call SetUnitState(GetEventDamageSource(),UNIT_STATE_LIFE,P18(GetUnitState(GetEventDamageSource(),UNIT_STATE_LIFE)-15,1))
if GetUnitAbilityLevel(u,'B081')>0 then
call UnitRemoveAbility(u,'B081')
call ItemAttackEffects(GetEventDamageSource(),u,GetEventDamage())
endif
if not HaveSavedReal(S47,MB8,'B081')then
call RW8(u,'B081',1,8,GetEventDamageSource(),'A0QN',false)
else
set WJD=LoadInteger(S47,MB8,'B081')
set R48=QC8('B081','A0QN',GetUnitAbilityLevel(GetEventDamageSource(),'A0QN'),TP7)
set Q_8=QC8('B081','A0QN',GetUnitAbilityLevel(GetEventDamageSource(),'A0QN'),TO7)
if WJD>=0 and WJD<TJ7 then
call RZ8(u,'B081',R48)
set S_7[WJD]=(RY8(u,'B081')/ R48+1)*Q_8
endif
endif
call WGD(GetEventDamageSource(),u)
call DisableTrigger(GetTriggeringTrigger())
call LT7(GetHandleId(GetTriggeringTrigger()))
call EA8(GetTriggeringTrigger())
endif
set u=null
return false
endfunction
function WKD takes nothing returns nothing
local trigger t
local unit m5
local unit Z77
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
set m5=GetSpellTargetUnit()
set Z77=GetTriggerUnit()
call SUnit(GetHandleId(Z77),"A0QN_Target",m5)
else
set m5=GetTriggerUnit()
set Z77=GetAttacker()
endif
if IsUnitIllusion(Z77)==false then
set t=CreateTrigger()
call SUnit(GetHandleId(t),"Source",Z77)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function WID))
endif
set t=null
set m5=null
set Z77=null
endfunction
function WMD takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if GetUnitAbilityLevel(GetAttacker(),'A0QN')>0 and(LBool(GetHandleId(GetTriggeringTrigger()),"OrbOn")or(GZ[304+GetPlayerId(GetOwningPlayer(GetAttacker()))]))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==LUnit(GetHandleId(GetTriggeringTrigger()),"Hero")then
call WKD()
endif
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if(GetIssuedOrderId()==852255)then
call SBool(GetHandleId(GetTriggeringTrigger()),"OrbOn",true)
elseif(GetIssuedOrderId()==852256)then
call SBool(GetHandleId(GetTriggeringTrigger()),"OrbOn",false)
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='A0QN' then
call WKD()
endif
return false
endfunction
function WND takes unit AM7,boolean SY8 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function WMD))
call SUnit(GetHandleId(t),"Hero",AM7)
if GetUnitPointValue(AM7)==500 then
set UV7[GetPlayerId(GetOwningPlayer(AM7))]=t
endif
set t=null
endfunction
function WOD takes nothing returns boolean
if GetLearnedSkill()=='A0QN' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A0QN')==1 then
call WND(GetTriggerUnit(),false)
endif
return false
endfunction
function EX9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function WOD))
set t=null
endfunction
function WPD takes unit AM7,integer WQD returns nothing
local integer i=0
loop
exitwhen i>24
if i!=WQD/ 4 and GetUnitAbilityLevel(AM7,SY4[i])>0 then
call UnitRemoveAbility(AM7,SY4[i])
endif
set i=i+1
endloop
if GetUnitAbilityLevel(AM7,SY4[WQD/ 4])==0 then
call AddPermanentAbility(AM7,SY4[WQD/ 4])
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),SY4[WQD/ 4],false)
endif
endfunction
function WRD takes nothing returns boolean
local integer W57=GetHandleId(GetTriggeringTrigger())
local unit AM7=LUnit(W57,"Hero")
local real WSD=GetUnitState(AM7,UNIT_STATE_LIFE)
local real MaxHealth=GetUnitState(AM7,UNIT_STATE_MAX_LIFE)
local integer WTD
local integer WUD
local integer ML8=GetUnitAbilityLevel(AM7,'A0QQ')
local boolean WVD=LBool(W57,"HasFX")
if IsUnitType(AM7,UNIT_TYPE_HERO)and ML8>0 then
set WTD=R2I('d'*GetUnitState(AM7,UNIT_STATE_LIFE)/ GetUnitState(AM7,UNIT_STATE_MAX_LIFE))
set WUD=P38(PC8(R2I('d'-WTD)/ 7,14),1)
if GetUnitAbilityLevel(AM7,'BNdo')>0 then
set WUD=0
endif
if O18(AM7)==false then
call WE8(AM7,(4+ML8*4)*WUD)
call WPD(AM7,(3+ML8)*WUD)
if WTD<40 then
if WVD==false then
call SBool(W57,"HasFX",true)
call SEff(W57,"FX1",AddSpecialEffectTarget("Abilities\\Spells\\Orc\\TrollBerserk\\HeadhunterWEAPONSLeft.mdl",AM7,"left weapon"))
call SEff(W57,"FX2",AddSpecialEffectTarget("effects\\HeadhunterWEAPONSRight_NoSound.mdx",AM7,"right weapon"))
endif
else
if WVD then
call SBool(W57,"HasFX",false)
call DestroyEffect(LEff(W57,"FX1"))
call DestroyEffect(LEff(W57,"FX2"))
endif
endif
endif
endif
set AM7=null
return false
endfunction
function WWD takes unit AM7,boolean SY8 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function WRD))
call SUnit(GetHandleId(t),"Hero",AM7)
call SBool(GetHandleId(t),"HasFX",false)
if GetUnitPointValue(AM7)==500 then
set UW7[GetPlayerId(GetOwningPlayer(AM7))]=t
endif
set t=null
endfunction
function WXD takes nothing returns boolean
if GetLearnedSkill()=='A0QQ'and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A0QQ')==1 then
call WWD(GetTriggerUnit(),false)
endif
return false
endfunction
function EY9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function WXD))
set t=null
endfunction
function WYD takes nothing returns nothing
local unit Z77=GetEnumUnit()
local real l4=Z87(GetUnitX(Z77),GetUnitY(Z77),XU4,XV4)
if l4<XT4 and IsUnitVisibleEx(Z77,GetOwningPlayer(XW4))then
set XS4=GetEnumUnit()
set XT4=l4
endif
set Z77=null
endfunction
function WZD takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local integer EC8=GetUnitAbilityLevel(GetTriggerUnit(),'A1W8')
local integer OUD='A07X'
local group g
local unit q5
if EC8==0 then
set EC8=GetUnitAbilityLevel(GetTriggerUnit(),'A1W9')
set OUD='A0AL'
endif
if m5==null then
set XS4=null
set XW4=Z77
set XT4=999999
set XU4=GetSpellTargetX()
set XV4=GetSpellTargetY()
set H04=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,0,0,9999,Condition(function UM8))
call ForGroup(g,function WYD)
call OF8(g)
set m5=XS4
set g=null
endif
if m5!=null then
set q5=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
call AddPermanentAbility(q5,OUD)
call SetUnitAbilityLevel(q5,OUD,EC8)
call IssueTargetOrderById(q5,852119,m5)
set q5=null
endif
set Z77=null
set m5=null
endfunction
function WAD takes nothing returns boolean
if GetSpellAbilityId()=='A1W8' or GetSpellAbilityId()=='A1W9' then
call WZD()
endif
return false
endfunction
function AG8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WAD))
set t=null
endfunction
function WBD takes unit Z77,unit X77 returns nothing
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
local integer ML8=GetUnitAbilityLevel(Z77,'A0QR')
local real R2D
local real WCD=.5
if ML8==0 then
set ML8=GetUnitAbilityLevel(Z77,'A1B3')
set WCD=.65
endif
call AddPermanentAbility(AC7,'A0QU')
call SetUnitAbilityLevel(AC7,'A0QU',ML8)
call IssueTargetOrderById(AC7,852075,X77)
if ML8==1 then
set R2D=.4
elseif ML8==2 then
set R2D=.35
else
set R2D=.3
endif
call Dmg(Z77,Z77,NormalFire,GetUnitState(Z77,UNIT_STATE_LIFE)*R2D)
call Dmg(Z77,X77,NormalFire,GetUnitState(X77,UNIT_STATE_LIFE)*WCD)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",Z77,"chest"))
call DestroyEffect(AddSpecialEffectTarget("effects\\LifeBreak.mdx",X77,"chest"))
set Z77=null
set X77=null
set AC7=null
endfunction
function W3D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local real PND=(LoadReal(R8,(W57),(23)))
local real POD=(LoadReal(R8,(W57),(24)))
local real x
local real y
local real BJ7=GetUnitX(Z77)
local real BK7=GetUnitY(Z77)
local real BM7=GetUnitX(X77)
local real BN7=GetUnitY(X77)
local real CV7=Atan2(BN7-BK7,BM7-BJ7)
if GetUnitTypeId(Z77)=='E02X' then
call SetUnitAnimationByIndex(Z77,1)
else
call SetUnitAnimationByIndex(Z77,17)
endif
if GetTriggerEventId()==EVENT_WIDGET_DEATH or Z87(PND,POD,BM7,BN7)>1400 or S69(Z77)then
call SetUnitPathing(Z77,true)
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call UnitRemoveAbility(Z77,'A0ST')
call SetUnitTimeScale(Z77,1.)
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif Z87(BJ7,BK7,BM7,BN7)<'}' then
call SetUnitPathing(Z77,true)
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call UnitRemoveAbility(Z77,'A0ST')
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SetUnitTimeScale(Z77,1.)
if X77!=null and O18(X77)==false then
call IssueTargetOrderById(Z77,851983,X77)
call WBD(Z77,X77)
endif
else
call SetUnitPathing(Z77,false)
set PND=BM7
set POD=BN7
call SaveReal(R8,(W57),(23),((PND)*1.))
call SaveReal(R8,(W57),(24),((POD)*1.))
set x=BJ7+15*Cos(CV7)
set y=BK7+15*Sin(CV7)
call SetUnitPosition(Z77,x,y)
call SetUnitFacing(Z77,CV7*bj_RADTODEG)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function W6D takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.015,true)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerAddCondition(t,Condition(function W3D))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveReal(R8,(W57),(23),((GetUnitX(X77))*1.))
call SaveReal(R8,(W57),(24),((GetUnitY(X77))*1.))
call SaveEffectHandle(R8,(W57),(175),(AddSpecialEffectTarget("war3mapImported\\LifeBreakCharge.mdx",Z77,"hand right alternate")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget("war3mapImported\\LifeBreakCharge.mdx",Z77,"hand left alternate")))
call SetUnitPathing(Z77,false)
call AddPermanentAbility(Z77,'A0ST')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A0ST',false)
call SetUnitAnimationByIndex(Z77,17)
call SetUnitTimeScale(Z77,3.)
set Z77=null
set X77=null
set t=null
endfunction
function WLD takes nothing returns boolean
if(GetSpellAbilityId()=='A0QR' or GetSpellAbilityId()=='A1B3')and HasLinkin(GetSpellTargetUnit())==false then
call W6D()
endif
return false
endfunction
function EZ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WLD))
set t=null
call PU8('A0QU')
endfunction
function W1D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=LInt(EC8,"Level")
local unit Z77=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
if GetTriggerEvalCount(t)>10 or GetTriggerEventId()==EVENT_UNIT_DEATH then
call DestroyEffect(LEff(EC8,"FX"))
call UnitRemoveAbility(m5,'A1G5')
call UnitRemoveAbility(m5,'A1G3')
call UnitRemoveAbility(m5,'A1G6')
call UnitRemoveAbility(m5,'A1G4')
call LT7(EC8)
call EA8(t)
else
call Dmg(Z77,m5,NormalFire,(TA8*5+10)/ 2.)
endif
set t=null
set Z77=null
set m5=null
return false
endfunction
function W0D takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=FN
local unit Z77=fN
local unit m5=GetEnumUnit()
if TA8==1 then
call AddPermanentAbility(m5,'A1G5')
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A1G5',false)
elseif TA8==2 then
call AddPermanentAbility(m5,'A1G3')
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A1G3',false)
elseif TA8==3 then
call AddPermanentAbility(m5,'A1G6')
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A1G6',false)
elseif TA8==4 then
call AddPermanentAbility(m5,'A1G4')
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A1G4',false)
endif
call SEff(EC8,"FX",AddSpecialEffectTarget("Abilities\\Spells\\Other\\BreathOfFire\\BreathOfFireDamage.mdl",m5,"chest"))
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Target",m5)
call SInt(EC8,"Level",TA8)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function W1D))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",GetUnitX(m5),GetUnitY(m5)))
set t=null
set Z77=null
set m5=null
endfunction
function W5D takes unit Z77,unit m5 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=GetUnitAbilityLevel(Z77,'A0O8')
local real x=GetUnitX(m5)
local real y=GetUnitY(m5)
local group g=OG8()
local group g2=OG8()
set FN=TA8
set fN=Z77
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,300+25,Condition(function VP8))
call GroupEnumUnitsInRange(g2,x,y,300+25,Condition(function UY8))
call GroupAddGroup(g2,g)
call ForGroup(g,function W0D)
call OF8(g)
call OF8(g2)
set t=null
set g=null
set g2=null
endfunction
function W2D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local unit Z77=LUnit(EC8,"Source")
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 and GetUnitAbilityLevel(m5,'B0O8')>0 then
call UnitRemoveAbility(m5,'B0O8')
call W5D(Z77,m5)
endif
endif
set t=null
set Z77=null
set m5=null
return false
endfunction
function W_D takes nothing returns boolean
local trigger t
local integer EC8
local unit m5
local unit Z77
if GetAttacker()==LUnit(GetHandleId(GetTriggeringTrigger()),"LiquidAttacker")and IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false then
set t=CreateTrigger()
set EC8=GetHandleId(t)
set m5=GetTriggerUnit()
set Z77=GetAttacker()
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerAddCondition(t,Condition(function W2D))
call SUnit(EC8,"Target",m5)
call SUnit(EC8,"Source",Z77)
set m5=null
set Z77=null
set t=null
endif
set t=null
set m5=null
set Z77=null
return false
endfunction
function X4D takes nothing returns boolean
call SBool(GetHandleId(GetTriggerUnit()),"LiquidFire|Active",false)
call SReal(GetHandleId(GetTriggerUnit()),"LiquidFire|LastUsed",TimerGetElapsed(E4)*1.)
call UnitRemoveAbility(GetTriggerUnit(),'A1FC')
call LT7(GetHandleId(GetTriggeringTrigger()))
call EA8(GetTriggeringTrigger())
return false
endfunction
function X7D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local real NO8=(TimerGetElapsed(E4))
local integer TA8=GetUnitAbilityLevel(N28,'A0O8')
local real QVD=LReal(GetHandleId(N28),"LiquidFire|LastUsed")
local boolean UN9=LBool(GetHandleId(N28),"LiquidFire|Active")
if NO8-QVD>25-TA8*5 and UN9==false and O18(N28)==false then
call SBool(GetHandleId(N28),"LiquidFire|Active",true)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function X4D))
call AddPermanentAbility(N28,'A1FC')
elseif UN9==false then
call UnitRemoveAbility(N28,'A1FC')
endif
set t=null
set N28=null
return false
endfunction
function X8D takes unit AM7,boolean SY8 returns nothing
local trigger t=CreateTrigger()
local trigger t2=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer QYD=GetHandleId(t2)
call TriggerRegisterTimerEvent(t,.2,true)
call TriggerAddCondition(t,Condition(function X7D))
call SUnit(EC8,"Hero",AM7)
call SReal(EC8,"LiquidFire|LastUsed",0)
call TriggerRegisterAllPlayersEvent(t2,EVENT_PLAYER_UNIT_ATTACKED)
call SUnit(QYD,"LiquidAttacker",AM7)
call TriggerAddCondition(t2,Condition(function W_D))
if GetUnitPointValue(AM7)==500 then
set UW7[GetPlayerId(GetOwningPlayer(AM7))]=t
set UA7[GetPlayerId(GetOwningPlayer(AM7))]=t2
endif
set AM7=null
set t=null
set t2=null
endfunction
function X9D takes nothing returns boolean
if GetLearnedSkill()=='A0O8' and GetUnitAbilityLevel(GetTriggerUnit(),'A0O8')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call X8D(GetTriggerUnit(),false)
endif
return false
endfunction
function LiquidFireStopFuncTimer takes nothing returns nothing
local unit s=LUnit(GetHandleId(GetExpiredTimer()),"s")
call IssueImmediateOrderById(s,852256)
set s=null
endfunction
function LiquidFireStopFunc takes unit s returns nothing
local timer tm=CreateTimer()
call TimerStart(tm,0,false,function LiquidFireStopFuncTimer)
call SUnit(GetHandleId(tm),"s",s)
endfunction
function LiquidFireStop takes nothing returns nothing
if GetIssuedOrderId()==852255 and GetUnitAbilityLevel(GetTriggerUnit(),'A0O8')>0 then
call LiquidFireStopFunc(GetTriggerUnit())
endif
endfunction
function ZH8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerAddCondition(t,Condition(function LiquidFireStop))
endfunction
function XDD takes real x1,real y1,real x2,real y2,real x3,real y3,real x,real y returns boolean
local real XED=(y-y1)*(x2-x1)-(x-x1)*(y2-y1)
local real XFD=(y-y3)*(x1-x3)-(x-x3)*(y1-y3)
local real XGD=(y-y2)*(x3-x2)-(x-x2)*(y3-y2)
return(XED*XFD>0)and(XGD*XFD>0)
endfunction
function XHD takes nothing returns boolean
local real XID=H64
local real XJD=HL4
local real XKD=H14
local real XMD=Zl
local real XND=vL
local real XOD=eL
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and XDD(XID,XJD,XKD,XMD,XND,XOD,GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()))
endfunction
function XPD takes real XQD,real XED,real XFD returns nothing
local real XGD=550
local real XRD=200
local real XSD=250
local real XTD=Asin((XSD-XRD)/ XGD)
local real x=XRD/ Sin(XTD)
local real y=(XGD+XSD+x)*Tan(XTD)
local real XID=XED+x*Cos((XQD-180)*bj_DEGTORAD)
local real XJD=XFD+x*Sin((XQD-180)*bj_DEGTORAD)
local real XKD=(XED+(XGD+XSD)*Cos(XQD*bj_DEGTORAD))+y*Cos((XQD-90)*bj_DEGTORAD)
local real XMD=(XFD+(XGD+XSD)*Sin(XQD*bj_DEGTORAD))+y*Sin((XQD-90)*bj_DEGTORAD)
local real XND=(XED+(XGD+XSD)*Cos(XQD*bj_DEGTORAD))+y*Cos((XQD+90)*bj_DEGTORAD)
local real XOD=(XFD+(XGD+XSD)*Sin(XQD*bj_DEGTORAD))+y*Sin((XQD+90)*bj_DEGTORAD)
set H64=XID
set HL4=XJD
set H14=XKD
set Zl=XMD
set vL=XND
set eL=XOD
endfunction
function XUD takes nothing returns nothing
local unit AC7=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'e00E',GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call AddPermanentAbility(AC7,'A0OA')
call IssueTargetOrderById(AC7,852226,GetEnumUnit())
set AC7=null
endfunction
function XVD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local player p=ED8(EC8,"p")
local unit N28=LUnit(EC8,"Hero")
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
local real Y5=LReal(EC8,"TargetX")
local real Z5=LReal(EC8,"TargetY")
local integer TA8=LInt(EC8,"Level")
local unit AC7
if GetTriggerEvalCount(t)>1 then
call SetUnitAnimation(N28,"stand")
call LT7(EC8)
call EA8(t)
else
call SetUnitAnimation(N28,"spell")
set AC7=CreateUnit(p,'e00E',x,y,0)
call AddPermanentAbility(AC7,'A0OC')
call SetUnitAbilityLevel(AC7,'A0OC',TA8)
call IssuePointOrderById(AC7,852560,Y5,Z5)
endif
set t=null
set p=null
set N28=null
set AC7=null
return false
endfunction
function XWD takes unit u,player p,integer TA8,location l,real x,real y returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call DA8(EC8,"p",p)
call SReal(EC8,"x",(x)*1.)
call SReal(EC8,"y",(y)*1.)
call SReal(EC8,"TargetX",GetLocationX(l)*1.)
call SReal(EC8,"TargetY",GetLocationY(l)*1.)
call SInt(EC8,"Level",TA8)
call SUnit(EC8,"Hero",u)
call TriggerRegisterTimerEvent(t,.3,true)
call TriggerAddCondition(t,Condition(function XVD))
set t=null
endfunction
function XXD takes nothing returns nothing
local unit N28=GetTriggerUnit()
local integer TA8=GetUnitAbilityLevel(N28,'A0O7')
local real x=GetUnitX(N28)
local real y=GetUnitY(N28)
local location l
local unit AC7
local group g=OG8()
if GetSpellTargetUnit()==null then
set l=GetSpellTargetLoc()
else
set l=GetUnitLoc(GetSpellTargetUnit())
endif
call XPD(bj_RADTODEG*Atan2(GetLocationY(l)-y,GetLocationX(l)-x),x,y)
call GroupEnumUnitsInRange(g,x,y,2000,Condition(function XHD))
call ForGroup(g,function XUD)
call OF8(g)
set AC7=CreateUnit(GetOwningPlayer(N28),'e00E',x,y,0)
call AddPermanentAbility(AC7,'A0OB')
call SetUnitAbilityLevel(AC7,'A0OB',TA8)
call IssuePointOrderById(AC7,852580,GetLocationX(l),GetLocationY(l))
call XWD(N28,GetOwningPlayer(N28),TA8,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 N28=null
set l=null
set g=null
set AC7=null
endfunction
function XYD takes nothing returns boolean
if GetSpellAbilityId()=='A0O7' then
call XXD()
endif
return false
endfunction
function ZG8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function XYD))
call PU8('A0OB')
call PU8('A0OC')
call PU8('A0OA')
set t=null
endfunction
function XZD takes nothing returns nothing
local unit Z77=J07
local unit X77=GetEnumUnit()
local unit XAD
if IsUnitInGroup(X77,J17)==false then
call GroupAddUnit(J17,X77)
call Stun(Z77,X77,J57)
call Dmg(Z77,X77,NormalFire,50)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathMissile.mdl",GetUnitX(X77),GetUnitY(X77)))
endif
endfunction
function XBD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local real x0=(LoadReal(R8,(W57),(6)))
local real y0=(LoadReal(R8,(W57),(7)))
local real a=(LoadReal(R8,(W57),(137)))
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer C77=GetTriggerEvalCount(t)
local real x
local real y
local group g
local integer i
local group XCD=(LoadGroupHandle(R8,(W57),(187)))
local integer ML8=GetUnitAbilityLevel(Z77,'A0O6')
set i=0
loop
exitwhen i>10
set x=x0+'d'*i*Cos(a*bj_DEGTORAD)
set y=y0+'d'*i*Sin(a*bj_DEGTORAD)
if ModuloInteger(C77,10)==0 then
endif
set H04=Z77
set J07=Z77
set J17=XCD
set J57=(.6+.4*ML8)-(C77*.05)
set J27=ML8
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,150+25,Condition(function UM8))
call ForGroup(g,function XZD)
call OF8(g)
set i=i+1
endloop
if C77==20*(.6+.4*ML8)then
call OF8(XCD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set g=null
set XCD=null
return false
endfunction
function X3D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local real x0=(LoadReal(R8,(W57),(6)))
local real y0=(LoadReal(R8,(W57),(7)))
local real a=(LoadReal(R8,(W57),(137)))
local integer C77=GetTriggerEvalCount(t)
local real x=x0+'d'*C77*Cos(a*bj_DEGTORAD)
local real y=y0+'d'*C77*Sin(a*bj_DEGTORAD)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer ML8=GetUnitAbilityLevel(Z77,'A0O6')
local ubersplat GRD
local integer i
if C77<10 then
call SaveEffectHandle(R8,(W57),(609+C77),(AddSpecialEffect("effects\\IcePath.mdx",x,y)))
set GRD=CreateUbersplat(x,y,"IPTH",255,255,255,255,false,false)
call SetUbersplatRenderAlways(GRD,true)
call SaveUbersplatHandle(R8,(W57),(760+C77),(GRD))
endif
if C77==10 then
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function XBD))
call SaveReal(R8,(W57),(6),((x0)*1.))
call SaveReal(R8,(W57),(7),((y0)*1.))
call SaveReal(R8,(W57),(137),((a)*1.))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveGroupHandle(R8,(W57),(187),(OG8()))
call TriggerEvaluate(t)
elseif C77>=(.4+.6+.4*ML8)/ .05 then
set i=0
loop
exitwhen i==10
call DestroyEffect((LoadEffectHandle(R8,(W57),(609+i))))
call DestroyUbersplat((LoadUbersplatHandle(R8,(W57),(760+i))))
set i=i+1
endloop
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
return false
endfunction
function X6D takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local real a=YI7(x,y,GetSpellTargetX(),GetSpellTargetY())
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function X3D))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
call SaveReal(R8,(W57),(137),((a)*1.))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call TriggerEvaluate(t)
set t=null
set Z77=null
endfunction
function XLD takes nothing returns boolean
if GetSpellAbilityId()=='A0O6' then
call X6D()
endif
return false
endfunction
function ZI8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function XLD))
set t=null
endfunction
function X1D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local integer TA8=LInt(EC8,"Level")
local real a=LReal(EC8,"a")
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
local integer id=GetPlayerId(GetOwningPlayer(Z77))
local integer P89=GetTriggerEvalCount(t)
local real X0D=x+150*P89*Cos(a)
local real X5D=y+150*P89*Sin(a)
local integer X2D=6
if GetUnitAbilityLevel(Z77,'A0O5')==0 then
set X2D=12
endif
if GetPlayerController(GetOwningPlayer(SZ4[id]))==MAP_CONTROL_COMPUTER then
call UnitAddAbility(SZ4[GetPlayerId(GetOwningPlayer(Z77))],'A0OE')
call SetUnitAbilityLevel(SZ4[GetPlayerId(GetOwningPlayer(Z77))],'A0OE',TA8)
endif
call IssuePointOrderById(SZ4[id],852488,X0D,X5D)
if P89==(X2D)then
call LT7(EC8)
call EA8(t)
call SetUnitAnimation(Z77,"stand")
endif
set t=null
set Z77=null
return false
endfunction
function X_D takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local real a=Atan2(y-GetUnitY(Z77),x-GetUnitX(Z77))
local integer TA8=GetUnitAbilityLevel(Z77,'A0O5')
local integer o6='A0OE'
if TA8==0 then
set TA8=GetUnitAbilityLevel(Z77,'A1B1')
set o6='A1B2'
endif
call RemoveLocation(l)
call SetUnitAnimation(Z77,"spell")
set SZ4[GetPlayerId(GetOwningPlayer(Z77))]=CreateUnit(GetOwningPlayer(Z77),'e00E',x,y,0)
call AddPermanentAbility(SZ4[GetPlayerId(GetOwningPlayer(Z77))],o6)
call SetUnitAbilityLevel(SZ4[GetPlayerId(GetOwningPlayer(Z77))],o6,TA8)
call SInt(EC8,"Level",TA8)
call SReal(EC8,"x",(GetUnitX(Z77))*1.)
call SReal(EC8,"y",(GetUnitY(Z77))*1.)
call SReal(EC8,"a",(a)*1.)
call SUnit(EC8,"Source",Z77)
if o6=='A0OE' then
call TriggerRegisterTimerEvent(t,.1,true)
else
call TriggerRegisterTimerEvent(t,.05,true)
endif
call TriggerAddCondition(t,Condition(function X1D))
set t=null
set Z77=null
set l=null
endfunction
function Y4D takes nothing returns boolean
if GetSpellAbilityId()=='A0O5' or GetSpellAbilityId()=='A1B1' then
call X_D()
endif
return false
endfunction
function ZJ8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Y4D))
call PU8('A0OE')
set t=null
endfunction
function Y7D takes nothing returns boolean
return GetUnitTypeId(GetSummonedUnit())=='o00C' or GetUnitTypeId(GetSummonedUnit())=='o01G' or GetUnitTypeId(GetSummonedUnit())=='o01H' or GetUnitTypeId(GetSummonedUnit())=='o01I'
endfunction
function Y8D takes nothing returns nothing
call SetUnitAbilityLevelSwapped('A058',GetSummonedUnit(),GetUnitAbilityLevelSwapped('A047',GetSummoningUnit()))
endfunction
function AH8 takes nothing returns nothing
set dT=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(dT,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(dT,Condition(function Y7D))
call TriggerAddAction(dT,function Y8D)
endfunction
function Y9D takes unit N28,unit m5 returns nothing
local real a=GetRandomReal(0,360)
local real x=GetUnitX(m5)+50*Cos(a*bj_DEGTORAD)
local real y=GetUnitY(m5)+50*Sin(a*bj_DEGTORAD)
local real Q_8=GetRandomReal(200,225)
call SetUnitPosition(N28,x,y)
call SetUnitFacing(N28,bj_RADTODEG*Atan2(GetUnitY(m5)-GetUnitY(N28),GetUnitX(m5)-GetUnitX(N28)))
call SetUnitAnimation(N28,"Attack")
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",N28,"chest"))
if IsPlayer(GetOwningPlayer(m5))==false and IsUnitType(m5,UNIT_TYPE_ANCIENT)==false then
set Q_8=99999
endif
call Dmg(N28,m5,HeroNormal,Q_8)
call IssueTargetOrderById(N28,851983,m5)
endfunction
function YDD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local unit m5=LUnit(EC8,"Target")
call Y9D(N28,m5)
call LT7(EC8)
call EA8(t)
set t=null
set N28=null
set m5=null
return false
endfunction
function YED takes unit AM7 returns nothing
local group g=OG8()
set H04=AM7
call GroupEnumUnitsInRange(g,GetUnitX(AM7),GetUnitY(AM7),450,Condition(function UU8))
set H04=GroupPickRandomUnit(g)
if H04!=null then
call Y9D(AM7,H04)
endif
call OF8(g)
set g=null
endfunction
function YFD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local unit AC7=LUnit(EC8,"Caster")
local integer Tq=LInt(EC8,"Limit")
local integer TQ=LInt(EC8,"BFLevel")
local integer Rd=LInt(EC8,"Counter")
local unit Tr
call SetUnitPosition(AC7,GetUnitX(N28),GetUnitY(N28))
if Rd>Tq then
call KillUnit(AC7)
call DestroyEffect(LEff(EC8,"FX"))
call LT7(EC8)
call EA8(t)
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),'A05G',true)
call SetUnitPathing(N28,true)
call SetUnitInvulnerable(N28,false)
call EY8(N28,"Omnislashing")
call SetUnitVertexColor(N28,255,255,255,255)
else
call SInt(EC8,"Counter",Rd+1)
call YED(N28)
if H04==null then
call KillUnit(AC7)
call DestroyEffect(LEff(EC8,"FX"))
call LT7(EC8)
call EA8(t)
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),'A05G',true)
call SetUnitPathing(N28,true)
call SetUnitInvulnerable(N28,false)
call EY8(N28,"Omnislashing")
call SetUnitVertexColor(N28,255,255,255,255)
endif
endif
set t=null
set N28=null
set Tr=null
set AC7=null
return false
endfunction
function YGD takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local integer TA8=GetUnitAbilityLevel(N28,'A0M1')
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TQ=GetUnitAbilityLevel(N28,'A05G')
local player p=GetOwningPlayer(N28)
local integer H28=3
local unit AC7=CreateUnit(GetOwningPlayer(N28),'o00D',GetUnitX(N28),GetUnitY(N28),0)
if TA8==0 then
set TA8=GetUnitAbilityLevel(N28,'A1AX')
if TA8==1 then
set H28=6
elseif TA8==2 then
set H28=9
elseif TA8==3 then
set H28=12
endif
elseif TA8==2 then
set H28=6
elseif TA8==3 then
set H28=9
endif
call SetPlayerAbilityAvailable(p,'A05G',false)
call SetUnitVertexColor(N28,255,255,255,'}')
call SetUnitPathing(N28,false)
call SetUnitInvulnerable(N28,true)
call EW8(N28,"Omnislashing")
call SUnit(EC8,"Hero",N28)
call SUnit(EC8,"Target",m5)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function YDD))
set t=CreateTrigger()
set EC8=GetHandleId(t)
call SUnit(EC8,"Hero",N28)
call SUnit(EC8,"Caster",AC7)
call SInt(EC8,"Limit",H28)
call SInt(EC8,"BFLevel",TQ)
call SInt(EC8,"Counter",2)
call SEff(EC8,"FX",AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl",N28,"weapon"))
call TriggerRegisterTimerEvent(t,.4,true)
call TriggerAddCondition(t,Condition(function YFD))
set N28=null
set m5=null
set t=null
set p=null
endfunction
function YHD takes nothing returns boolean
if GetSpellAbilityId()=='A0M1' or GetSpellAbilityId()=='A1AX' then
call YGD()
endif
return false
endfunction
function YID takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SetUnitAnimationByIndex(Z77,4)
set t=null
set Z77=null
return false
endfunction
function YJD takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.01,false)
call TriggerAddCondition(t,Condition(function YID))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=null
set Z77=null
endfunction
function YKD takes nothing returns boolean
if GetSpellAbilityId()=='A0M1' or GetSpellAbilityId()=='A1AX' then
call YJD()
endif
return false
endfunction
function AI8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function YHD))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function YKD))
set t=null
endfunction
function YMD takes integer TA8 returns integer
if TA8==1 then
return'A10Z'
elseif TA8==2 then
return'A111'
elseif TA8==3 then
return'A10Y'
elseif TA8==4 then
return'A110'
endif
return 0
endfunction
function YND takes integer TA8 returns integer
if TA8==1 then
return'B09M'
elseif TA8==2 then
return'B09N'
elseif TA8==3 then
return'B09O'
elseif TA8==4 then
return'B09L'
endif
return 0
endfunction
function YOD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local integer TA8=LInt(EC8,"Level")
local real xN=LReal(EC8,"LastX")
local real xo=LReal(EC8,"LastY")
local real x=GetUnitX(m5)
local real y=GetUnitY(m5)
local real d=SquareRoot((xN-x)*(xN-x)+(xo-y)*(xo-y))
local real vB=(.0003+TA8*.00005)*d*GetUnitState(m5,UNIT_STATE_MAX_MANA)
local integer QI=GetTriggerEvalCount(t)
local unit AC7
if GU8(m5)then
set vB=0
endif
if d>300 then
set vB=0
endif
if vB>1 and ModuloInteger(GetTriggerEvalCount(t),3)==0 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",m5,"chest"))
endif
if vB>0 then
call SetUnitState(m5,UNIT_STATE_MANA,GetUnitState(m5,UNIT_STATE_MANA)-vB)
endif
call SReal(EC8,"LastX",x)
call SReal(EC8,"LastY",y)
if GetTriggerEventId()==EVENT_UNIT_DEATH or QI==(TA8+3)*10 then
call UnitRemoveAbility(m5,YMD(TA8))
call UnitRemoveAbility(m5,YND(TA8))
call DestroyEffect(LEff(EC8,"FX"))
call LT7(EC8)
call EA8(t)
elseif GetUnitState(m5,UNIT_STATE_MANA)<1 then
call Stun(LUnit(EC8,"Source"),m5,1+.5*TA8)
set AC7=null
call UnitRemoveAbility(m5,YMD(TA8))
call UnitRemoveAbility(m5,YND(TA8))
call DestroyEffect(LEff(EC8,"FX"))
call LT7(EC8)
call EA8(t)
endif
set t=null
set m5=null
return false
endfunction
function YPD takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=GetUnitAbilityLevel(Z77,'A10X')
call AddPermanentAbility(m5,YMD(TA8))
call SUnit(EC8,"Target",m5)
call SUnit(EC8,"Source",Z77)
call SInt(EC8,"Level",TA8)
call SReal(EC8,"LastX",GetUnitX(m5))
call SReal(EC8,"LastY",GetUnitY(m5))
call SEff(EC8,"FX",AddSpecialEffectTarget("effects\\BasicWaterFlash.mdx",m5,"chest"))
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function YOD))
set Z77=null
set m5=null
set t=null
endfunction
function YQD takes nothing returns boolean
if GetSpellAbilityId()=='A10X' and HasLinkin(GetSpellTargetUnit())==false then
call YPD()
endif
return false
endfunction
function AK8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function YQD))
set t=null
endfunction
function YRD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local real Tw=LReal(EC8,"Mana")
call SetUnitState(m5,UNIT_STATE_MANA,GetUnitState(m5,UNIT_STATE_MANA)+Tw)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIim\\AIimTarget.mdl",m5,"origin"))
call LT7(EC8)
call EA8(t)
set m5=null
set t=null
return false
endfunction
function YSD takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call SUnit(EC8,"Target",m5)
call SReal(EC8,"Mana",75*GetUnitAbilityLevel(N28,'A112'))
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function YRD))
set t=null
set N28=null
set m5=null
endfunction
function YTD takes nothing returns boolean
if GetSpellAbilityId()=='A112' then
call YSD()
endif
return false
endfunction
function AM8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function YTD))
set t=null
endfunction
function YUD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit YVD=(LoadUnitHandle(R8,(W57),(19)))
local real CV7=(LoadReal(R8,(W57),(13)))
local integer YWD=(LoadInteger(R8,(W57),(34)))
local real YXD=GetUnitX(YVD)-50*Cos(CV7)
local real YYD=GetUnitY(YVD)-50*Sin(CV7)
local unit AC7=CreateUnit(GetOwningPlayer(YVD),'e00E',YXD,YYD,0)
local real x=GetUnitX(AC7)+50*Cos(CV7)
local real y=GetUnitY(AC7)+50*Sin(CV7)
local real x2=x+(300+50*YWD)*Cos(CV7)
local real y2=y+(300+50*YWD)*Sin(CV7)
call AddPermanentAbility(AC7,'A087')
call SetUnitAbilityLevel(AC7,'A087',YWD)
call IssuePointOrderById(AC7,852580,x,y)
call KillUnit(YVD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set AC7=null
set t=null
return false
endfunction
function YZD takes unit YVD,integer YWD,real CV7 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function YUD))
call SaveUnitHandle(R8,(W57),(19),(YVD))
call SaveReal(R8,(W57),(13),((CV7)*1.))
call SaveInteger(R8,(W57),(34),(YWD))
set t=null
endfunction
function Hblm_ShockwaveHealFunc takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
local unit u=LUnit(h,"u")
local unit f=GetTriggerUnit()
local real d=LReal(h,"d")
local real a=LReal(h,"a")
if GetTriggerEventId()==EVENT_UNIT_TARGET_IN_RANGE then
if IsUnitAlly(f,GetOwningPlayer(s))and IsUnitType(f,UNIT_TYPE_DEAD)==false then
call AddLife(f,d)
endif
else
call SetXY(u,GetUnitX(u)+Cos(a)*10.5,GetUnitY(u)+Sin(a)*10.5)
if SAReal(h,"dist",10.5)>1400 then
call DestroyEffect(LEff(h,"fx"))
call KillUnit(u)
call TriggerOff()
endif
endif
set s=null
set u=null
set f=null
endfunction
function Hblm_ShockwaveHeal takes unit s,integer i,real a returns nothing
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
local unit u=CreateUnit(GetOwningPlayer(s),'e0MJ',GetUnitX(s)+50*Cos(a),GetUnitY(s)+50*Sin(a),a*bj_RADTODEG)
call TriggerRegisterTimer(t)
call TriggerRegisterUnitInRange(t,u,350,null)
call TriggerAddCondition(t,Condition(function Hblm_ShockwaveHealFunc))
call SUnit(h,"s",s)
call SUnit(h,"u",u)
call SReal(h,"d",i*50*0.75)
call SReal(h,"a",a)
call SEff(h,"fx",AddSpecialEffectTarget("Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl",u,"origin"))
call SetUnitScale(u,4,4,4)
set t=null
set u=null
endfunction
function YAD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer iX=LInt(EC8,"Count")
local integer YBD=iX-1
local real RK=LReal(EC8,"Angle")
local unit oA=LUnit(EC8,"Caster")
local unit N28=LUnit(EC8,"Hero")
local integer TA8=LInt(EC8,"Level")
local integer YCD=2+TA8*2
local boolean Y3D=LBool(EC8,"SpiritCast")
local unit Y6D
if GetTriggerEventId()!=EVENT_UNIT_SPELL_ENDCAST then
call SInt(EC8,"Count",iX+1)
endif
call SetUnitScale(oA,I2R('d'+20*YBD)/'d',I2R('d'+20*YBD)/'d',I2R('d'+20*YBD)/'d')
if(GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST and Y3D==false)or(GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST and GetSpellAbilityId()=='A121')or YBD==YCD then
if Y3D then
set Y6D=LUnit(EC8,"Dummy")
call ShowUnit(Y6D,false)
call UnitApplyTimedLife(Y6D,'BTLF',1)
endif
call LT7(EC8)
call EA8(t)
if(LoadInteger(R8,(GetHandleId(N28)),(704)))==0 or(LoadInteger(R8,(GetHandleId(N28)),(704)))=='A085' then
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),'A085',true)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),'A121',false)
call UnitRemoveAbility(N28,'A121')
call YZD(oA,YBD,RK)
if HasItem(N28,'I00D')>0 then
call Hblm_ShockwaveHeal(oA,YBD,RK)
endif
endif
set oA=CreateUnit(GetOwningPlayer(oA),'h06M',GetUnitX(oA)+150*(YBD)*Cos(RK),GetUnitY(oA)+150*(YBD)*Sin(RK),0)
call UnitApplyTimedLife(oA,'BTLF',7)
set t=null
set oA=null
set N28=null
set Y6D=null
return false
endfunction
function YLD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
call IssueImmediateOrderById(N28,851972)
call LT7(EC8)
call EA8(t)
set t=null
set N28=null
return false
endfunction
function Y1D takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit N28=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real RK=Atan2(GetLocationY(l)-GetUnitY(N28),GetLocationX(l)-GetUnitX(N28))
local real x
local real y
local unit oA
local unit Y6D
local boolean Y3D=false
if GetLocationY(l)==GetUnitY(N28)and GetLocationX(l)==GetUnitX(N28)then
set RK=GetUnitFacing(N28)*bj_DEGTORAD
endif
set x=GetUnitX(N28)+150*Cos(RK)
set y=GetUnitY(N28)+150*Sin(RK)
set oA=CreateUnit(GetOwningPlayer(N28),'u00J',x,y,RK*bj_RADTODEG)
call RemoveLocation(l)
if GetUnitTypeId(N28)=='H06X' or GetUnitTypeId(N28)=='H06Y' or GetUnitTypeId(N28)=='H06W' then
set Y3D=true
endif
call SBool(EC8,"SpiritCast",Y3D)
call SUnit(EC8,"Hero",N28)
call SUnit(EC8,"Caster",oA)
call SInt(EC8,"Count",1)
call SInt(EC8,"Level",GetUnitAbilityLevel(N28,'A085'))
call SReal(EC8,"Angle",RK)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t,Condition(function YAD))
if Y3D then
set Y6D=CreateUnit(GetOwningPlayer(N28),'h06Z',GetUnitX(N28),GetUnitY(N28),RK*bj_RADTODEG)
call SetUnitX(Y6D,GetUnitX(N28))
call SetUnitY(Y6D,GetUnitY(N28))
call SetUnitAnimation(Y6D,"spell")
call QueueUnitAnimation(Y6D,"spell")
call QueueUnitAnimation(Y6D,"spell")
call SetUnitVertexColor(Y6D,255,255,255,75)
call SUnit(EC8,"Dummy",Y6D)
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function YLD))
call SUnit(EC8,"Hero",N28)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),'A085',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),'A121',true)
call TZ8(N28,'A121',1,6)
set t=null
set N28=null
set oA=null
set Y6D=null
set l=null
endfunction
function Y0D takes nothing returns boolean
if GetSpellAbilityId()=='A085' then
call Y1D()
endif
return false
endfunction
function AN8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Y0D))
set t=null
endfunction
function Y5D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
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 IsPlayer(GetOwningPlayer(GetEventDamageSource())))then
call DestroyEffect(LEff(EC8,"FX1"))
call DestroyEffect(LEff(EC8,"FX2"))
call LT7(EC8)
call EA8(t)
elseif GetTriggerEventId()!=EVENT_UNIT_DAMAGED and GetTriggerEventId()!=EVENT_UNIT_DEATH then
set x1=GetUnitX(Z77)
set y1=GetUnitY(Z77)
set x2=GetUnitX(m5)
set y2=GetUnitY(m5)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl",x1,y1))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl",x2,y2))
call AddTimedBoolBuff(m5,"4410",1)
call SetUnitPosition(m5,GetUnitX(Z77),GetUnitY(Z77))
call DestroyEffect(LEff(EC8,"FX1"))
call DestroyEffect(LEff(EC8,"FX2"))
call LT7(EC8)
call EA8(t)
call MH8(m5)
endif
set t=null
set Z77=null
set m5=null
return false
endfunction
function Y2D takes nothing returns nothing
local unit Z77=GetEnumUnit()
local real l4=Z87(GetUnitX(Z77),GetUnitY(Z77),XB4,XC4)
if l4<XA4 then
set XZ4=GetEnumUnit()
set XA4=l4
endif
set Z77=null
endfunction
function Y_D takes nothing returns nothing
local unit m5=GetSpellTargetUnit()
local unit Z77=GetTriggerUnit()
local trigger t
local integer EC8
local real Hk
local group g
if m5==null then
set XZ4=null
set XA4=999999
set XB4=GetSpellTargetX()
set XC4=GetSpellTargetY()
set H04=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,0,0,9999,Condition(function VH8))
call GroupRemoveUnit(g,Z77)
call ForGroup(g,function Y2D)
call OF8(g)
set m5=XZ4
set g=null
endif
if GetSpellAbilityId()=='A10U' then
set Hk=5
elseif GetSpellAbilityId()=='A11Y' then
set Hk=4
elseif GetSpellAbilityId()=='A11Z' then
set Hk=3
elseif GetSpellAbilityId()=='A1N1' then
set Hk=3
endif
if m5!=null then
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,Hk,false)
call TriggerAddCondition(t,Condition(function Y5D))
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Target",m5)
call SEff(EC8,"FX1",AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdl",Z77,"origin"))
call SEff(EC8,"FX2",AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdl",m5,"origin"))
endif
set m5=null
set Z77=null
set t=null
endfunction
function Z4D takes nothing returns boolean
if GetSpellAbilityId()=='A10U' or GetSpellAbilityId()=='A11Y' or GetSpellAbilityId()=='A11Z' then
call Y_D()
endif
return false
endfunction
function Z7D takes nothing returns boolean
if GetSpellAbilityId()=='A10U' or GetSpellAbilityId()=='A11Y' or GetSpellAbilityId()=='A11Z' then
if GetSpellTargetUnit()!=null and LBool(GetHandleId(GetOwningPlayer(GetSpellTargetUnit())),"DisableHelp")then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n038'))
endif
endif
return false
endfunction
function AO8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Z4D))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function Z7D))
set t=null
endfunction
function Z8D takes nothing returns nothing
local unit m5=GetEnumUnit()
local real x=GetUnitX(m5)
local real y=GetUnitY(m5)
local real a=Atan2(y-tN,x-SN)
set x=PQ8(x+25*Cos(a))
set y=PS8(y+25*Sin(a))
call KillTrees(x,y,150)
call SetUnitX(m5,x)
call SetUnitY(m5,y)
set m5=null
endfunction
function Z9D takes nothing returns nothing
local unit m5=GetEnumUnit()
local unit AC7=CreateUnit(I44,'e00E',GetUnitX(m5),GetUnitY(m5),0)
call AddPermanentAbility(AC7,'A10W')
call SetUnitAbilityLevel(AC7,'A10W',pN)
call IssueTargetOrderById(AC7,852585,m5)
set m5=null
set AC7=null
endfunction
function ZDD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local player p=ED8(EC8,"p")
local real t5=LReal(EC8,"SourceX")
local real w5=LReal(EC8,"SourceY")
local integer o6=LInt(EC8,"AbilityID")
local group g=LGroup(EC8,"g")
local integer P89=GetTriggerEvalCount(t)
set SN=t5
set tN=w5
call ForGroup(g,function Z8D)
if P89==10 then
if o6=='A11X' then
set pN=1
elseif o6=='A11V' then
set pN=2
else
set pN=3
endif
set I44=p
call ForGroup(g,function Z9D)
call OF8(g)
call LT7(EC8)
call EA8(t)
endif
set t=null
set p=null
set g=null
return false
endfunction
function ZED takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local player p=ED8(EC8,"p")
local real t5=LReal(EC8,"SourceX")
local real w5=LReal(EC8,"SourceY")
local integer o6=LInt(EC8,"AbilityID")
local group g=LGroup(EC8,"g")
call EA8(t)
call LT7(EC8)
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.04,true)
call TriggerAddCondition(t,Condition(function ZDD))
call DA8(EC8,"p",p)
call SReal(EC8,"SourceX",t5*1.)
call SReal(EC8,"SourceY",w5*1.)
call SGroup(EC8,"g",g)
call SInt(EC8,"AbilityID",o6)
set t=null
set p=null
set g=null
return false
endfunction
function ZFD takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local group g=OG8()
local unit Z77=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
call KillUnit(CreateUnit(GetOwningPlayer(Z77),'h06P',x,y,0))
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,700,Condition(function U68))
call TriggerRegisterTimerEvent(t,.4,false)
call TriggerAddCondition(t,Condition(function ZED))
call DA8(EC8,"p",GetOwningPlayer(GetTriggerUnit()))
call SReal(EC8,"SourceX",(x)*1.)
call SReal(EC8,"SourceY",(y)*1.)
call SGroup(EC8,"g",g)
call SInt(EC8,"AbilityID",GetSpellAbilityId())
call RemoveLocation(l)
set l=null
set t=null
set g=null
set Z77=null
endfunction
function ZGD takes nothing returns boolean
if GetSpellAbilityId()=='A11X' or GetSpellAbilityId()=='A11V' or GetSpellAbilityId()=='A11W' then
call ZFD()
endif
return false
endfunction
function AP8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function ZGD))
set t=null
endfunction
function ZHD takes unit u returns boolean
return GetUnitTypeId(u)=='u009'
endfunction
function ZID takes nothing returns boolean
if ZHD(GetFilterUnit())or V48()then
if LoadInteger(R8,HC4,GetHandleId(GetFilterUnit()))<HB4 then
return true
endif
endif
return false
endfunction
function ZJD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local integer ZKD=LInt(EC8,"LucentLevel")
local integer Tq=LInt(EC8,"Limit")
local integer ZMD=LInt(EC8,"TargetLimit")
local group g=OG8()
local real x=GetUnitX(N28)
local real y=GetUnitY(N28)
local unit X77
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 H04=N28
set HB4=ZMD
set HC4=GetHandleId(t)
call GroupEnumUnitsInRange(g,x,y,700,Condition(function ZID))
set X77=GroupPickRandomUnit(g)
call OF8(g)
if O18(N28)==false and X77!=null and ZHD(X77)==false then
call SaveInteger(R8,HC4,GetHandleId(X77),LoadInteger(R8,HC4,GetHandleId(X77))+1)
call QG8("effects\\Eclipse.mdx",X77,"origin",3)
call Dmg(N28,X77,NormalFire,ZKD*75)
elseif O18(N28)==false then
set x=x+GetRandomInt(-350,350)
set y=y+GetRandomInt(-350,350)
call QH8("effects\\Eclipse.mdx",x,y,1.5)
endif
if(GetTriggerEvalCount(t)+1)==Tq then
call LT7(EC8)
call EA8(t)
endif
set t=null
set N28=null
set g=null
set X77=null
return false
endfunction
function ZND takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer Tq
local integer ZKD=GetUnitAbilityLevel(AM7,'A042')
local integer ZMD
local unit AC7=CreateUnit(GetOwningPlayer(AM7),'e00E',GetUnitX(AM7),GetUnitY(AM7),0)
if ZKD==0 and GetUnitTypeId(AM7)!='E005' then
set ZKD=4
endif
call AddPermanentAbility(AC7,'A1T6')
if GetSpellAbilityId()=='A054' then
set Tq=1+3*GetUnitAbilityLevel(AM7,'A054')
set ZMD=4
else
set Tq=4*GetUnitAbilityLevel(AM7,'A00U')
set ZMD=99999
endif
call SInt(EC8,"LucentLevel",ZKD)
call SInt(EC8,"Limit",Tq)
call SInt(EC8,"TargetLimit",ZMD)
call SUnit(EC8,"Hero",AM7)
call TriggerRegisterTimerEvent(t,.6,true)
call TriggerAddCondition(t,Condition(function ZJD))
call TriggerEvaluate(t)
call IssueImmediateOrderById(AC7,852621)
set t=null
set AM7=null
set AC7=null
endfunction
function ZOD takes nothing returns boolean
if GetSpellAbilityId()=='A054' or GetSpellAbilityId()=='A00U' then
call ZND()
endif
return false
endfunction
function AQ8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function ZOD))
set t=null
endfunction
function ZPD takes nothing returns boolean
if GetLearnedSkill()=='A041' then
elseif GetLearnedSkill()=='A062' then
call SetPlayerTechResearched(GetOwningPlayer(GetTriggerUnit()),'R00I',1)
endif
return false
endfunction
function AR8 takes nothing returns nothing
set du=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(du,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(du,Condition(function ZPD))
endfunction
function ZQD takes nothing returns boolean
return GetSpellAbilityId()=='A0KU'
endfunction
function ZRD takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function ZSD takes nothing returns nothing
call AddPermanentAbility(GetEnumUnit(),'A0KT')
call SetUnitAbilityLevel(GetEnumUnit(),'A0KT',X8)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Invisibility\\InvisibilityTarget.mdl",GetEnumUnit(),"chest"))
endfunction
function ZTD takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'A0KT')
endfunction
function ZUD takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer EC8=GetHandleId(t)
local group XS8=LGroup(EC8,"Group")
call ForGroup(XS8,function ZTD)
call OF8(XS8)
call QI8(t)
set t=null
set XS8=null
endfunction
function ZVD takes nothing returns nothing
local unit N28=GetTriggerUnit()
local boolexpr hP=Condition(function ZRD)
local group XS8=OG8()
local timer t=CreateTimer()
local integer EC8=GetHandleId(t)
local integer TA8=GetUnitAbilityLevel(N28,'A0KU')
local real VVD=15
set X8=TA8
call GroupEnumUnitsInRange(XS8,0,0,9999,hP)
call ForGroup(XS8,function ZSD)
call DestroyBoolExpr(hP)
call SGroup(EC8,"Group",XS8)
call TimerStart(t,VVD,false,function ZUD)
set N28=null
set hP=null
set XS8=null
set t=null
endfunction
function ED9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function ZQD))
call TriggerAddAction(t,function ZVD)
set t=null
endfunction
function ZWD takes nothing returns nothing
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Starfall\\StarfallTarget.mdl",GetEnumUnit(),"origin"))
endfunction
function ZXD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7=LUnit(W57,"Hero")
local unit X77=LUnit(W57,"Target")
call Dmg(AM7,X77,NormalFire,.75*GetUnitAbilityLevel(AM7,'A0KV')*75)
call LT7(W57)
call EA8(t)
set t=null
set AM7=null
set X77=null
return false
endfunction
function ZYD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7=LUnit(W57,"Hero")
local group g
local unit X77=LUnit(W57,"Target")
if O18(X77)then
set g=OG8()
set H04=AM7
call GroupEnumUnitsInRange(g,GetUnitX(AM7),GetUnitY(AM7),175+25,Condition(function U38))
set X77=GroupPickRandomUnit(g)
call OF8(g)
set g=null
endif
call DestroyEffect(LEff(W57,"FX"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Starfall\\StarfallTarget.mdl",X77,"origin"))
call LT7(W57)
call EA8(t)
set t=CreateTrigger()
set W57=GetHandleId(t)
call SUnit(W57,"Hero",AM7)
call SUnit(W57,"Target",X77)
call TriggerRegisterTimerEvent(t,.5,false)
call TriggerAddCondition(t,Condition(function ZXD))
set t=null
set AM7=null
set g=null
set X77=null
return false
endfunction
function ZZD takes nothing returns nothing
call Dmg(TV4,GetEnumUnit(),NormalFire,TU4)
endfunction
function ZAD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7=LUnit(W57,"Hero")
local group g=LGroup(W57,"g")
set TU4=GetUnitAbilityLevel(AM7,'A0KV')*75
set TV4=AM7
call ForGroup(g,function ZZD)
call OF8(g)
call LT7(W57)
call EA8(t)
set t=null
set AM7=null
set g=null
return false
endfunction
function uh takes nothing returns nothing
local real in=BS7(GetTriggerUnit(),GetEnumUnit())
if in>650 then
else
call GroupAddUnit(H24,GetEnumUnit())
endif
endfunction
function ZBD takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AM7=GetTriggerUnit()
local group g=OG8()
local unit X77
set H04=AM7
set H24=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(AM7),GetUnitY(AM7),900,Condition(function U38))
call ForGroup(g,function uh)
call OF8(g)
set g=H24
call ForGroup(g,function ZWD)
call SGroup(W57,"g",g)
call SUnit(W57,"Hero",AM7)
call TriggerRegisterTimerEvent(t,.5,false)
call TriggerAddCondition(t,Condition(function ZAD))
set H04=AM7
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(AM7),GetUnitY(AM7),175+25,Condition(function U38))
set X77=GroupPickRandomUnit(g)
call OF8(g)
set t=CreateTrigger()
set W57=GetHandleId(t)
call SUnit(W57,"Hero",AM7)
call SUnit(W57,"Target",X77)
call SEff(W57,"FX",AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Starfall\\StarfallCaster.mdl",AM7,"origin"))
call TriggerRegisterTimerEvent(t,1,false)
call TriggerAddCondition(t,Condition(function ZYD))
set t=null
set g=null
set AM7=null
set X77=null
endfunction
function ZCD takes nothing returns boolean
if GetSpellAbilityId()=='A0KV'then
call ZBD()
endif
return false
endfunction
function EE9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function ZCD))
set t=null
endfunction
function Z3D takes nothing returns boolean
return GetSpellAbilityId()=='A0L8'
endfunction
function uj takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(W8))and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false
endfunction
function Z6D takes real uk,real uK,real iN,real io returns integer
local real in=SquareRoot((iN-uk)*(iN-uk)+(io-uK)*(io-uK))
return PC8(R2I(in/ 150),10)
endfunction
function ul takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer W57=GetHandleId(t)
local unit AM7=LUnit(W57,"Hero")
local unit S08=LUnit(W57,"Projectile")
local real BM7=LReal(W57,"TargetX")
local real BN7=LReal(W57,"TargetY")
local real RK=LReal(W57,"Angle")
local real BJ7=GetUnitX(S08)
local real BK7=GetUnitY(S08)
local real S_8=PQ8(GetUnitX(S08)+30*Cos(RK))
local real T48=PS8(GetUnitY(S08)+30*Sin(RK))
local boolexpr hP=Condition(function uj)
local group QA9=OG8()
local unit AC7
local unit X77
local real ZLD
local real Z1D
call SetUnitX(S08,S_8)
call SetUnitY(S08,T48)
set W8=AM7
call GroupEnumUnitsInRange(QA9,S_8,T48,140,hP)
set X77=FirstOfGroup(QA9)
call OF8(QA9)
call DestroyBoolExpr(hP)
if X77!=null then
if IsUnitType(X77,UNIT_TYPE_HERO)then
set TW4[GetPlayerId(GetOwningPlayer(AM7))]=TW4[GetPlayerId(GetOwningPlayer(AM7))]+1
call X48("AA_Hits"+I2S(GetPlayerId(GetOwningPlayer(AM7))),TW4[GetPlayerId(GetOwningPlayer(AM7))])
endif
set ZLD=LReal(W57,"OriginalX")
set Z1D=LReal(W57,"OriginalY")
set AC7=CreateUnit(GetOwningPlayer(X77),'e00E',BJ7,BK7,0)
call AddPermanentAbility(AC7,'A0L7')
call SetUnitAbilityLevel(AC7,'A0L7',Z6D(ZLD,Z1D,BJ7,BK7))
call IssueTargetOrderById(AC7,852095,X77)
call UnitDamageTarget(AM7,X77,90*GetUnitAbilityLevel(AM7,'A0L8')+Z6D(ZLD,Z1D,BJ7,BK7)/2500*140-40,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call KillUnit(S08)
call QI8(t)
set AC7=null
elseif(S_8-BM7)*(S_8-BM7)+(T48-BN7)*(T48-BN7)<1600 then
call KillUnit(S08)
call QI8(t)
endif
set AM7=null
set S08=null
set t=null
set hP=null
set QA9=null
set X77=null
endfunction
function Z0D takes nothing returns nothing
local unit N28=GetTriggerUnit()
local real iN=PQ8(GetUnitX(N28))
local real io=PS8(GetUnitY(N28))
local location sy=GetSpellTargetLoc()
local real hN=GetLocationX(sy)
local real ho=GetLocationY(sy)
local real RK=Atan2(ho-io,hN-iN)
local timer t=CreateTimer()
local integer EC8=GetHandleId(t)
local unit IJ=CreateUnit(GetOwningPlayer(N28),'h005',iN,io,RK*bj_RADTODEG)
set TX4[GetPlayerId(GetOwningPlayer(N28))]=TX4[GetPlayerId(GetOwningPlayer(N28))]+1
call X48("AA_Total"+I2S(GetPlayerId(GetOwningPlayer(N28))),TX4[GetPlayerId(GetOwningPlayer(N28))])
call RemoveLocation(sy)
call SetUnitFacing(IJ,RK*bj_RADTODEG)
call SetUnitPathing(IJ,false)
set hN=PQ8(iN+3000*Cos(RK))
set ho=PS8(io+3000*Sin(RK))
call SReal(EC8,"OriginalX",iN)
call SReal(EC8,"OriginalY",io)
call SReal(EC8,"TargetX",hN)
call SReal(EC8,"TargetY",ho)
call SReal(EC8,"Angle",RK)
call SUnit(EC8,"Hero",N28)
call SUnit(EC8,"Projectile",IJ)
call TimerStart(t,.035,true,function ul)
set N28=null
set sy=null
set t=null
set IJ=null
endfunction
function Z5D takes nothing returns boolean
local integer Z2D=TW4[GetPlayerId(GetTriggerPlayer())]
local integer D5=TX4[GetPlayerId(GetTriggerPlayer())]
if GetUnitTypeId(Y7[GetPlayerId(GetTriggerPlayer())])=='N01V' and D5>0 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,(GetObjectName(('n0GM')))+" "+R2S(I2R(Z2D)/ I2R(D5)*'d')+"% ("+I2S(Z2D)+"/"+I2S(D5)+")")
endif
return false
endfunction
function EF9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Z3D))
call TriggerAddAction(t,function Z0D)
call PU8('A0L7')
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[1],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-st",true)
call TriggerAddCondition(t,Condition(function Z5D))
set t=null
endfunction
function Z_D takes nothing returns boolean
return GetSpellAbilityId()=='A0LN'
endfunction
function uM takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(W8))
endfunction
function un takes nothing returns nothing
local unit N28=GetEnumUnit()
local unit oA=CreateUnit(GetOwningPlayer(N28),'e01R',0,0,0)
call AddPermanentAbility(oA,'A0LO')
call SetUnitAbilityLevel(oA,'A0LO',GetUnitAbilityLevel(W8,'A0LN'))
call UnitApplyTimedLife(oA,'BTLF',10)
set N28=null
set oA=null
endfunction
function uN takes unit N28 returns nothing
local group XS8=OG8()
local boolexpr hP=Condition(function uM)
set W8=N28
call GroupEnumUnitsInRange(XS8,GetUnitX(N28),GetUnitY(N28),800,hP)
call ForGroup(XS8,function un)
call DestroyBoolExpr(hP)
call OF8(XS8)
set XS8=null
set hP=null
endfunction
function uo takes unit N28 returns nothing
local integer EC8=GetHandleId(N28)
local string uO=EQ8(EC8,"OrderType")
local string up=OrderId2String(LInt(EC8,"OrderId"))
local real hN
local real ho
local unit m5
local trigger t=LTrig(EC8,"Trigger_TrackOrder")
local boolean uP=not LBool(EC8,"Idle")
local boolean uq=LBool(EC8,"SuperOrder")
call DisableTrigger(t)
call IssueImmediateOrderById(N28,851972)
if uO=="Target"and(uP or uq)then
set m5=LUnit(EC8,"OrderTarget")
call IssueTargetOrder(N28,up,m5)
elseif uO=="Point"and(uP or uq)then
set hN=LReal(EC8,"OrderPointX")
set ho=LReal(EC8,"OrderPointY")
call IssuePointOrder(N28,up,hN,ho)
elseif(uP or uq)then
call IssueImmediateOrder(N28,"OrderString")
endif
call SBool(EC8,"SuperOrder",false)
call EnableTrigger(t)
set m5=null
set t=null
endfunction
function uQ takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local real ur=LReal(EC8,"DistanceRemaining")
local real uR=LReal(EC8,"OriginalDistance")
local real RK=LReal(EC8,"Angle")
local real Il=GetUnitX(N28)+30*Cos(RK*bj_DEGTORAD)
local real IL=GetUnitY(N28)+30*Sin(RK*bj_DEGTORAD)
local real us=200
local real uS=(1-ur/ uR)*us*2
if uS>us then
set uS=us*2-uS
endif
call SetUnitFlyHeight(N28,P18(uS,0),0)
call SetUnitX(N28,PQ8(Il))
call SetUnitY(N28,PS8(IL))
call SetUnitFacing(N28,RK)
call SReal(EC8,"DistanceRemaining",ur-20)
if uS<1 and ur-uR!=0 then
call SBool(GetHandleId(N28),"InAir",false)
call SetUnitFacing(N28,RK)
call SetUnitAnimation(N28,"stand")
call SetUnitPathing(N28,true)
call uo(N28)
call PauseTimer(t)
call LT7(EC8)
call DestroyTimer(t)
endif
set t=null
set N28=null
endfunction
function A4D takes nothing returns nothing
local unit N28=GetTriggerUnit()
local integer TA8=GetUnitAbilityLevel(N28,'A0LN')
local real in=350+50*TA8
local real RK=GetUnitFacing(N28)
local real iN=GetUnitX(N28)
local real io=GetUnitY(N28)
local real hN=PQ8(iN+in*Cos(RK*bj_DEGTORAD))
local real ho=PS8(io+in*Sin(RK*bj_DEGTORAD))
local timer t=CreateTimer()
local integer EC8=GetHandleId(t)
local trigger uT=LTrig(GetHandleId(N28),"Trigger_TrackOrder")
call uN(N28)
set in=SquareRoot((iN-hN)*(iN-hN)+(io-ho)*(io-ho))
if in>'d'then
call AddPermanentAbility(N28,'Amrf')
call UnitRemoveAbility(N28,'Amrf')
call SetUnitPathing(N28,false)
call SetUnitAnimationByIndex(N28,6)
call DisableTrigger(uT)
call IssueImmediateOrderById(N28,851972)
call EnableTrigger(uT)
call SReal(EC8,"DistanceRemaining",in)
call SReal(EC8,"OriginalDistance",in)
call SReal(EC8,"Angle",RK)
call SUnit(EC8,"Hero",N28)
call TimerStart(t,.025,true,function uQ)
call SBool(GetHandleId(N28),"Leap_InAir",true)
call SBool(GetHandleId(N28),"SuperOrder",false)
endif
set N28=null
set t=null
set uT=null
endfunction
function uu takes nothing returns boolean
return OrderId2String(GetIssuedOrderId())!="windwalk"
endfunction
function uU takes nothing returns nothing
local unit N28=GetTriggerUnit()
local integer EC8=GetHandleId(N28)
local boolean uv=LBool(EC8,"Leap_InAir")
call SInt(EC8,"OrderId",GetIssuedOrderId())
call SBool(EC8,"Idle",false)
if GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER then
call DS8(EC8,"OrderType","Target")
call D68(EC8,"OrderTarget",GetOrderTarget())
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_POINT_ORDER then
if uv or Z87(GetUnitX(N28),GetUnitY(N28),GetOrderPointX(),GetOrderPointY())>800 then
call DS8(EC8,"OrderType","Point")
call SReal(EC8,"OrderPointX",GetOrderPointX())
call SReal(EC8,"OrderPointY",GetOrderPointY())
else
call SBool(EC8,"Idle",true)
endif
else
call DS8(EC8,"OrderType","Instant")
endif
if uv then
call SBool(EC8,"SuperOrder",true)
endif
set N28=null
endfunction
function uV takes nothing returns nothing
local unit N28=LUnit(GetHandleId(GetExpiredTimer()),"Hero")
local integer EC8=GetHandleId(N28)
local real x=GetUnitX(N28)
local real y=GetUnitY(N28)
local string uO=EQ8(EC8,"OrderType")
if uO=="Point"and Z87(GetUnitX(N28),GetUnitY(N28),LReal(EC8,"OrderPointX"),LReal(EC8,"OrderPointY"))<'d'then
call SBool(EC8,"Idle",true)
endif
set N28=null
endfunction
function uw takes nothing returns nothing
local unit N28=GetTriggerUnit()
local trigger t=CreateTrigger()
local timer t2
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddAction(t,function uU)
call TriggerAddCondition(t,Condition(function uu))
call STrig(GetHandleId(N28),"Trigger_TrackOrder",t)
set t2=CreateTimer()
call SUnit(GetHandleId(t2),"Hero",N28)
call TimerStart(t2,.3,true,function uV)
call STimer(GetHandleId(N28),"Timer_CheckIdle",t2)
set N28=null
set t=null
set t2=null
endfunction
function uW takes nothing returns nothing
if GetUnitAbilityLevel(GetTriggerUnit(),'A0LN')==1 then
call uw()
endif
endfunction
function EG9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Z_D))
call TriggerAddAction(t,function A4D)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddAction(t,function uW)
set t=null
endfunction
function ux takes nothing returns nothing
local unit N28=LUnit(GetHandleId(GetTriggeringTrigger()),"Morphling")
local real r
local real g
local real b
local integer A7D
local integer A8D
local real A9D
local real rStr2Agi
if GetUnitTypeId(N28)!='O00P' then
call DisableTrigger(GetTriggeringTrigger())
elseif O18(N28)==false and LBool(GetHandleId(N28),"Waveforming")==false then
set A7D=GetHeroAgi(N28,true)
set A8D=GetHeroStr(N28,true)
set A9D=RMaxBJ(75+2*(A7D-A8D),35)
set r=A9D
set g=A9D
set b=A9D
call SetUnitVertexColorBJ(N28,r,g,b,GetRandomReal(.0,10.))
endif
set N28=null
endfunction
function ADD takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit())=='O00P'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function AED takes nothing returns nothing
local trigger t
if(LBool(GetHandleId(GetTriggerUnit()),"HasMorphling")==false)then
set t=CreateTrigger()
call SUnit(GetHandleId(t),"Morphling",GetTriggerUnit())
call STrig(GetHandleId(GetTriggerUnit()),"ColorTrigger",t)
call TriggerAddAction(t,function ux)
call TriggerRegisterTimerEvent(t,1.,true)
call SBool(GetHandleId(GetTriggerUnit()),"HasMorphling",true)
call UnitAddItem(GetTriggerUnit(),CreateItem('I00E',GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))
endif
set t=null
endfunction
function AS8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterEnterRectSimple(t,bj_mapInitialPlayableArea)
call TriggerAddCondition(t,Condition(function ADD))
call TriggerAddAction(t,function AED)
set t=null
endfunction
function AFD takes nothing returns boolean
return GetSpellAbilityId()=='A0FN'
endfunction
function AGD takes nothing returns boolean
local unit T3=GetFilterUnit()
if IsUnitInGroup(T3,C8)then
set T3=null
return false
endif
if IsUnitEnemy(T3,GetOwningPlayer(W8))and GetUnitAbilityLevel(T3,'A04R')!=1 and GetUnitState(T3,UNIT_STATE_LIFE)>0 and IsUnitType(T3,UNIT_TYPE_STRUCTURE)==false then
set T3=null
return true
endif
set T3=null
return false
endfunction
function uZ takes nothing returns nothing
call UnitDamageTarget(W8,GetEnumUnit(),Y8,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endfunction
function AHD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"UnitVar")
local real RK=LReal(EC8,"Angle")
local integer u3=LInt(EC8,"Remaining")
local group Ro=LGroup(EC8,"AlreadyDamaged")
local real u4=GetUnitX(N28)
local real u5=GetUnitY(N28)
local real PND=(LoadReal(R8,(EC8),(23)))
local real POD=(LoadReal(R8,(EC8),(24)))
local real S_8=PND+1000*.05*Cos(RK)
local real T48=POD+1000*.05*Sin(RK)
local group XS8=OG8()
local unit XAD=LUnit(EC8,"Dummy")
call SaveReal(R8,(EC8),(23),((S_8)*1.))
call SaveReal(R8,(EC8),(24),((T48)*1.))
set W8=N28
set Y8=GetUnitAbilityLevel(N28,'A0FN')*75+25
set C8=Ro
call GroupEnumUnitsInRange(XS8,u4,u5,200+25,Condition(function AGD))
call ForGroup(XS8,function uZ)
call GroupAddGroup(XS8,Ro)
call OF8(XS8)
set u3=u3-1
call SInt(EC8,"Remaining",u3)
call SetUnitX(N28,PQ8(S_8))
call SetUnitY(N28,PS8(T48))
call SetUnitX(XAD,GetUnitX(N28))
call SetUnitY(XAD,GetUnitY(N28))
call IssueTargetOrderById(XAD,852095,N28)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",u4,u5))
if u3==0 then
call RemoveUnit(XAD)
call SetUnitVertexColor(N28,255,255,255,255)
call SBool(GetHandleId(N28),"Waveforming",false)
call SetUnitInvulnerable(N28,false)
call SetUnitPathing(N28,true)
call LT7(EC8)
call EA8(t)
endif
set N28=null
set Ro=null
set XS8=null
set t=null
return false
endfunction
function AID takes nothing returns nothing
local unit N28=GetTriggerUnit()
local real iN=GetUnitX(N28)
local real io=GetUnitY(N28)
local location sy=GetSpellTargetLoc()
local real hN=GetLocationX(sy)
local real ho=GetLocationY(sy)
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local group Ro=OG8()
local integer YC7=GetPlayerId(GetOwningPlayer(N28))
local unit XAD=CreateUnit(GetOwningPlayer(N28),'e00E',iN,io,0)
call UnitAddAbility(XAD,'A2N4')
call RemoveLocation(sy)
if GetSpellTargetUnit()!=null then
set hN=GetUnitX(GetSpellTargetUnit())
set ho=GetUnitY(GetSpellTargetUnit())
endif
call SetUnitVertexColor(N28,255,255,255,0)
call SBool(GetHandleId(N28),"Waveforming",true)
call SetUnitInvulnerable(N28,true)
call SetUnitPathing(N28,false)
call SUnit(EC8,"UnitVar",N28)
call SaveReal(R8,(EC8),(23),((iN)*1.))
call SaveReal(R8,(EC8),(24),((io)*1.))
call SGroup(EC8,"AlreadyDamaged",Ro)
call SReal(EC8,"Angle",Atan2(ho-io,hN-iN))
call SInt(EC8,"Remaining",P38(R2I(SquareRoot((hN-iN)*(hN-iN)+(ho-io)*(ho-io))/ 50),1))
call SUnit(EC8,"Dummy",XAD)
call TriggerRegisterTimerEvent(t,.04,true)
call TriggerAddCondition(t,Condition(function AHD))
call SelectUnitAddForPlayer(N28,GetOwningPlayer(N28))
set t=null
set N28=null
set sy=null
set Ro=null
endfunction
function AT8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function AFD))
call TriggerAddAction(t,function AID)
set t=null
endfunction
function u7 takes nothing returns nothing
local unit u8=LUnit(GetHandleId(GetTriggeringTrigger()),"Morphling")
local integer i=GetUnitAbilityLevel(u8,'A0KX')
if i<4 then
set i=i*2
else
set i=10
endif
if GetHeroStatBJ(1,u8,false)>i and GetUnitState(u8,UNIT_STATE_MANA)>=20. and GetUnitState(u8,UNIT_STATE_LIFE)>1. then
call SetUnitManaBJ(u8,GetUnitState(u8,UNIT_STATE_MANA)-20)
call ModifyHeroStat(1,u8,1,i)
call ModifyHeroStat(0,u8,0,i)
endif
set u8=null
endfunction
function u9 takes nothing returns nothing
local unit u8=LUnit(GetHandleId(GetTriggeringTrigger()),"Morphling")
local integer i=GetUnitAbilityLevel(u8,'A0KX')
if i<4 then
set i=i*2
else
set i=10
endif
if GetHeroStatBJ(0,u8,false)>i and GetUnitState(u8,UNIT_STATE_MANA)>=20. and GetUnitState(u8,UNIT_STATE_LIFE)>1. then
call SetUnitManaBJ(u8,GetUnitState(u8,UNIT_STATE_MANA)-20)
call ModifyHeroStat(0,u8,1,i)
call ModifyHeroStat(1,u8,0,i)
endif
set u8=null
endfunction
function AJD takes nothing returns boolean
return(((GetIssuedOrderId()==852550)or(GetIssuedOrderId()==852547))and(GetTriggerUnit()==LUnit(GetHandleId(GetTriggeringTrigger()),"Morphling")))
endfunction
function UA takes nothing returns nothing
local integer EC8=GetHandleId(GetTriggeringTrigger())
local trigger Ub=LTrig(EC8,"MorphStr")
local trigger AKD=LTrig(EC8,"MorphAgi")
if(GetIssuedOrderId()==852547)then
call DisableTrigger(Ub)
elseif(GetIssuedOrderId()==852550)then
call DisableTrigger(AKD)
endif
set Ub=null
set AKD=null
endfunction
function AMD takes nothing returns boolean
return(((GetIssuedOrderId()==852549)or(GetIssuedOrderId()==852546))and(GetTriggerUnit()==LUnit(GetHandleId(GetTriggeringTrigger()),"Morphling")))
endfunction
function UC takes nothing returns nothing
local integer EC8=GetHandleId(GetTriggeringTrigger())
local trigger Ub=LTrig(EC8,"MorphStr")
local trigger AKD=LTrig(EC8,"MorphAgi")
if(GetIssuedOrderId()==852546)then
call EnableTrigger(Ub)
call DisableTrigger(AKD)
elseif(GetIssuedOrderId()==852549)then
call DisableTrigger(Ub)
call EnableTrigger(AKD)
endif
set Ub=null
set AKD=null
endfunction
function AND takes nothing returns boolean
return GetLearnedSkill()=='A0KX'and IsUnitIllusion(GetTriggerUnit())==false and GetPlayerController(GetOwningPlayer(GetTriggerUnit()))!=MAP_CONTROL_COMPUTER
endfunction
function AOD takes unit AM7,integer APD,real AQD returns nothing
local integer ARD=GetHeroAgi(AM7,false)
local integer ASD=GetHeroStr(AM7,false)
local real ATD=GetUnitState(AM7,UNIT_STATE_MANA)
if APD==0 then
if ATD>=AQD and ARD>2 and O18(AM7)==false then
call SetUnitState(AM7,UNIT_STATE_MANA,ATD-AQD)
call SetHeroAgi(AM7,ARD-2,true)
call SetHeroStr(AM7,ASD+2,true)
endif
elseif APD==1 then
if ATD>=AQD and ASD>2 and O18(AM7)==false then
call SetUnitState(AM7,UNIT_STATE_MANA,ATD-AQD)
call SetHeroAgi(AM7,ARD+2,true)
call SetHeroStr(AM7,ASD-2,true)
endif
endif
endfunction
function AUD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local integer AVD=GetUnitAbilityLevel(N28,'A0KX')
call AOD(N28,1,30./ AVD)
set t=null
set N28=null
return false
endfunction
function AWD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local integer AVD=GetUnitAbilityLevel(N28,'A0KX')
call AOD(N28,0,30./ AVD)
set t=null
set N28=null
return false
endfunction
function AXD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=GetTriggerUnit()
local trigger AYD=LTrig(EC8,"Iterate")
local integer AVD=GetUnitAbilityLevel(N28,'A0KX')
local integer AZD=LInt(EC8,"LastOrder")
local real AAD=1./ AVD
if AVD==4 then
set AAD=0.2
endif
if GetIssuedOrderId()==852549 then
if AYD!=null then
call LT7(GetHandleId(AYD))
call EA8(AYD)
endif
set AYD=CreateTrigger()
call TriggerRegisterTimerEvent(AYD,AAD,true)
call TriggerAddCondition(AYD,Condition(function AUD))
call SUnit(GetHandleId(AYD),"Hero",N28)
call STrig(EC8,"Iterate",AYD)
call SInt(EC8,"LastOrder",GetIssuedOrderId())
call UnitAddAbility(N28,'A22L')
call UnitRemoveAbility(N28,'A22T')
elseif GetIssuedOrderId()==852546 then
if AYD!=null then
call LT7(GetHandleId(AYD))
call EA8(AYD)
endif
set AYD=CreateTrigger()
call TriggerRegisterTimerEvent(AYD,AAD,true)
call TriggerAddCondition(AYD,Condition(function AWD))
call SUnit(GetHandleId(AYD),"Hero",N28)
call STrig(EC8,"Iterate",AYD)
call SInt(EC8,"LastOrder",GetIssuedOrderId())
call UnitAddAbility(N28,'A22T')
call UnitRemoveAbility(N28,'A22L')
elseif GetIssuedOrderId()==852550 then
if AYD!=null then
call LT7(GetHandleId(AYD))
call EA8(AYD)
endif
call SUnit(EC8,"Iterate",null)
call SInt(EC8,"LastOrder",GetIssuedOrderId())
call UnitRemoveAbility(N28,'A22L')
call UnitRemoveAbility(N28,'A22T')
elseif GetIssuedOrderId()==852547 then
if AYD!=null then
call LT7(GetHandleId(AYD))
call EA8(AYD)
endif
call SUnit(EC8,"Iterate",null)
call SInt(EC8,"LastOrder",GetIssuedOrderId())
call UnitRemoveAbility(N28,'A22L')
call UnitRemoveAbility(N28,'A22T')
elseif GetIssuedOrderId()==852548 and AZD!=852546 and AZD!=852546 then
call AOD(N28,1,30./ AVD)
elseif GetIssuedOrderId()==852545 and AZD!=852546 and AZD!=852546 then
call AOD(N28,0,30./ AVD)
endif
set t=null
set N28=null
set AYD=null
return false
endfunction
function ABD takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local trigger t
local integer W57
local integer ML8=GetUnitAbilityLevel(GetTriggerUnit(),'A0KX')
if ML8==1 then
call SetHeroAgi(AM7,GetHeroAgi(AM7,false)+3,true)
call SetHeroStr(AM7,GetHeroStr(AM7,false)+3,true)
else
call SetHeroAgi(AM7,GetHeroAgi(AM7,false)+1,true)
call SetHeroStr(AM7,GetHeroStr(AM7,false)+1,true)
endif
if ML8==1 then
set t=CreateTrigger()
set W57=GetHandleId(t)
call AddPermanentAbility(AM7,'A0KW')
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function AXD))
call SUnit(W57,"Iterate",null)
else
call SetUnitAbilityLevel(AM7,'A0KW',ML8)
endif
set t=null
set AM7=null
endfunction
function ACD takes nothing returns boolean
return GetLearnedSkill()=='A0KX'and IsUnitIllusion(GetTriggerUnit())==false and GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER
endfunction
function A3D takes nothing returns nothing
local unit u8=GetTriggerUnit()
local trigger Ue
local trigger UE
local trigger Ub
local trigger AKD
if(GetUnitAbilityLevel(u8,'A0KX')==1)then
call AddPermanentAbility(u8,'A0KW')
set AKD=CreateTrigger()
call DisableTrigger(AKD)
call TriggerRegisterTimerEventPeriodic(AKD,1.)
call TriggerAddAction(AKD,function u9)
call SUnit(GetHandleId(AKD),"Morphling",u8)
set Ub=CreateTrigger()
call DisableTrigger(Ub)
call TriggerRegisterTimerEventPeriodic(Ub,1.)
call TriggerAddAction(Ub,function u7)
call SUnit(GetHandleId(Ub),"Morphling",u8)
set Ue=CreateTrigger()
call ky(Ue,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(Ue,Condition(function AMD))
call TriggerAddAction(Ue,function UC)
call STrig(GetHandleId(Ue),"MorphAgi",AKD)
call STrig(GetHandleId(Ue),"MorphStr",Ub)
call SUnit(GetHandleId(Ue),"Morphling",u8)
set UE=CreateTrigger()
call ky(UE,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(UE,Condition(function AJD))
call TriggerAddAction(UE,function UA)
call STrig(GetHandleId(UE),"MorphAgi",AKD)
call STrig(GetHandleId(UE),"MorphStr",Ub)
call SUnit(GetHandleId(UE),"Morphling",u8)
if(GetPlayerController(GetOwningPlayer(u8))!=MAP_CONTROL_USER)then
call STrig(GetHandleId(GetOwningPlayer(u8)),"MorphAgi",AKD)
call STrig(GetHandleId(GetOwningPlayer(u8)),"MorphStr",Ub)
endif
else
call SetUnitAbilityLevel(u8,'A0KW',GetUnitAbilityLevel(u8,'A0KX'))
endif
set u8=null
set Ue=null
set UE=null
set Ub=null
set AKD=null
endfunction
function pZ takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function AND))
call TriggerAddAction(t,function ABD)
set t=null
endfunction
function AW8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function ACD))
call TriggerAddAction(t,function A3D)
set t=null
endfunction
function A6D takes nothing returns boolean
return GetSpellAbilityId()=='A0G6' and GetUnitTypeId(GetSpellTargetUnit())!='n00L' and HasLinkin(GetSpellTargetUnit())==false
endfunction
function ALD takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local integer TA8=GetUnitAbilityLevel(N28,'A0G6')
local unit AC7
local location YG9
local real l4
local integer A7D=GetHeroAgi(N28,true)
local integer A8D=GetHeroStr(N28,true)
local real A1D=I2R(A7D)/ I2R(A8D)
local real A0D=I2R(A8D)/ I2R(A7D)
local real A5D
local real A2D
local real A_D
local real B4D
local real P99
local real B7D
local integer B8D
local integer B9D
local integer BDD
local string BED
local string BFD
local string BGD
if A1D<.5 then
set A5D=.25
set A2D=20*TA8
elseif A1D>1.5 then
set A5D=.5*TA8
set A2D=20*TA8
else
set A5D=.25+(A1D-.5)*(.5*TA8-.25)
set A2D=20*TA8
endif
if A0D<.5 then
set A_D=.25
set B4D='d'
elseif A0D>1.5 then
set A_D=.75*TA8
set B4D=300
else
set B4D='d'+(A0D-.5)*200
set A_D=.25+(A0D-.5)*(.75*TA8-.25)
endif
set P99=A2D+A5D*A7D
set B7D=A_D
set B8D=R2I(B7D)
set B9D=R2I(10*B7D-B8D*10)
set BDD=R2I('d'*B7D-B9D*10-B8D*'d')
set BED=I2S(B8D)
set BFD=I2S(B9D)
set BGD=I2S(BDD)
set l4=Atan2(GetUnitY(m5)-GetUnitY(N28),GetUnitX(m5)-GetUnitX(N28))
set YG9=Location(GetUnitX(m5)+B4D*Cos(l4),GetUnitY(m5)+B4D*Sin(l4))
call SetUnitPositionLoc(m5,YG9)
call KillTrees(GetLocationX(YG9),GetLocationY(YG9),200)
call RemoveLocation(YG9)
call QM8("|c001ce6b9+"+I2S(R2I(P99))+"|r |c00ff0303+"+BED+"."+BFD+BGD+"|r",1,m5,.023,255,255,255,216)
call Dmg(N28,m5,NormalFire,P99)
call Stun(N28,m5,B7D)
set N28=null
set m5=null
set AC7=null
set YG9=null
endfunction
function AU8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function A6D))
call TriggerAddAction(t,function ALD)
set t=null
call PU8('A0X6')
endfunction
function BHD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer C77=(LoadInteger(R8,(W57),(34)))-1
local texttag tt
call SaveInteger(R8,(W57),(34),(C77))
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set tt=CreateTextTag()
call SetTextTagText(tt,I2S(C77),.03)
call SetTextTagPosUnit(tt,Z77,0)
call SetTextTagColorBJ(tt,0,29,255,15)
call SetTextTagVelocity(tt,0,.035)
call SetTextTagFadepoint(tt,3)
call SetTextTagLifespan(tt,.9)
call SetTextTagPermanent(tt,false)
call SetTextTagVisibility(tt,false)
if GetOwningPlayer(Z77)==GetLocalPlayer()then
call SetTextTagVisibility(tt,true)
endif
set tt=CreateTextTag()
call SetTextTagText(tt,I2S(C77),.03)
call SetTextTagPosUnit(tt,X77,0)
call SetTextTagColorBJ(tt,0,29,255,15)
call SetTextTagVelocity(tt,0,.035)
call SetTextTagFadepoint(tt,3)
call SetTextTagLifespan(tt,.9)
call SetTextTagPermanent(tt,false)
call SetTextTagVisibility(tt,false)
if GetOwningPlayer(Z77)==GetLocalPlayer()then
call SetTextTagVisibility(tt,true)
endif
endif
set t=null
set tt=null
set Z77=null
set X77=null
return false
endfunction
function BID takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local unit AM7=(LoadUnitHandle(R8,(GetHandleId(t)),(14)))
local unit BJD=(LoadUnitHandle(R8,(GetHandleId(AM7)),(229)))
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",GetUnitX(BJD),GetUnitY(BJD)))
call RemoveUnit(BJD)
call UnitRemoveAbility(AM7,('A0GC'))
if(LoadInteger(R8,(GetHandleId(AM7)),(704)))==0 or(LoadInteger(R8,(GetHandleId(AM7)),(704)))==('A0G8')then
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),('A0G8'),true)
endif
call FlushChildHashtable(R8,(GetHandleId(t)))
call EA8((t))
set AM7=null
set BJD=null
set t=null
endfunction
function BKD takes nothing returns boolean
return(GetSpellAbilityId()==('A0GC'))
endfunction
function BMD takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local integer W57=GetHandleId(AM7)
local unit BJD=(LoadUnitHandle(R8,(W57),(229)))
local real x=GetUnitX(BJD)
local real y=GetUnitY(BJD)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",GetUnitX(AM7),GetUnitY(AM7)))
call KillUnit(BJD)
call SetUnitX(AM7,x)
call SetUnitY(AM7,y)
call PanCameraToTimedForPlayer(GetOwningPlayer(AM7),x,y,0)
call IssueImmediateOrderById(AM7,851972)
set AM7=null
set BJD=null
endfunction
function BND takes nothing returns boolean
return GetUnitAbilityLevel(GetSummonedUnit(),('B030'))>0 and GetUnitState(GetSummonedUnit(),UNIT_STATE_LIFE)>0
endfunction
function BOD takes nothing returns nothing
local unit AM7=GetSummoningUnit()
local integer W57=GetHandleId(AM7)
local unit X77=(LoadUnitHandle(R8,(W57),(228)))
local unit BJD=GetSummonedUnit()
local trigger t
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),('A0G8'),false)
call AddPermanentAbility(AM7,('A0GC'))
call SetUnitColor(BJD,GetPlayerColor(GetOwningPlayer(X77)))
call SaveUnitHandle(R8,(W57),(229),(BJD))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,BJD,EVENT_UNIT_DEATH)
call TriggerAddAction(t,function BID)
call SaveUnitHandle(R8,(GetHandleId(t)),(14),(AM7))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,BJD,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function BHD))
call SaveUnitHandle(R8,(GetHandleId(t)),(2),(AM7))
call SaveUnitHandle(R8,(GetHandleId(t)),(17),(BJD))
call SaveInteger(R8,(GetHandleId(t)),(34),(GetUnitAbilityLevel(AM7,('A0G8'))*15+15-1))
set AM7=null
set X77=null
set BJD=null
set t=null
endfunction
function BPD takes nothing returns boolean
return GetSpellAbilityId()==('A0G8')
endfunction
function BQD takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
call SaveUnitHandle(R8,(GetHandleId(AM7)),(228),(X77))
set AM7=null
set X77=null
endfunction
function BRD takes nothing returns boolean
if GetSpellAbilityId()==('A0G8')then
if GetOwningPlayer(GetSpellTargetUnit())==GetOwningPlayer(GetTriggerUnit())then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n0LF'))
endif
endif
return false
endfunction
function AV8 takes nothing returns nothing
local trigger t
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function BPD))
call TriggerAddAction(t,function BQD)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function BND))
call TriggerAddAction(t,function BOD)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function BKD))
call TriggerAddAction(t,function BMD)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function BRD))
set t=null
endfunction
function BSD takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),BK4)==false then
call GroupAddUnit(BM4,GetEnumUnit())
call UnitRemoveAbility(GetEnumUnit(),'B02J')
call UnitRemoveAbility(GetEnumUnit(),'BUsp')
call UnitRemoveAbility(GetEnumUnit(),'Bust')
endif
endfunction
function BTD takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'B02J')
call UnitRemoveAbility(GetEnumUnit(),'BUsp')
call UnitRemoveAbility(GetEnumUnit(),'Bust')
endfunction
function BUD takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),BJ4)==false then
call GroupAddUnit(BJ4,GetEnumUnit())
call SetUnitOwner(BI4,GetOwningPlayer(GetEnumUnit()),false)
call IssueTargetOrderById(BI4,852227,GetEnumUnit())
endif
endfunction
function BVD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local group g
local group XCD=(LoadGroupHandle(R8,(W57),(187)))
if GetTriggerEvalCount(t)==10 then
call AddPermanentAbility(Z77,'A24E')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A07U',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A24E',true)
endif
if GetTriggerEventId()==EVENT_WIDGET_DEATH or GetTriggerEvalCount(t)>140 or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='A24E')then
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A07U' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A07U',true)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A24E',false)
call ForGroup(XCD,function BTD)
call OF8(XCD)
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set g=OG8()
set H04=Z77
set BH4=Z77
set BI4=AC7
set BJ4=XCD
call GroupEnumUnitsInRange(g,x,y,1250+25,Condition(function T58))
call ForGroup(g,function BUD)
set BK4=g
set BM4=OG8()
call ForGroup(XCD,function BSD)
call GroupRemoveGroup(BM4,XCD)
call OF8(g)
call OF8(BM4)
endif
set t=null
set g=null
set Z77=null
set XCD=null
set AC7=null
return false
endfunction
function BWD takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',x,y,0)
call UnitAddAbility(AC7,'A07T')
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function BVD))
call SaveGroupHandle(R8,(W57),(187),(OG8()))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("war3mapImported\\SongOfTheSiren_2.mdx",Z77,"origin")))
set t=null
set Z77=null
endfunction
function BXD takes nothing returns boolean
if GetSpellAbilityId()=='A07U' then
call BWD()
endif
return false
endfunction
function AX8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function BXD))
set t=null
endfunction
function BYD takes unit Z77,unit X77 returns nothing
local integer ML8=GetUnitAbilityLevel(Z77,'A2KU')
local integer id='A244'
call Dmg(Z77,X77,NormalFire,'d'+30*ML8)
if ML8==2 then
set id='A245'
elseif ML8==3 then
set id='A246'
elseif ML8==4 then
set id='A247'
endif
if S_9(X77)==false and IsUnitType(X77,UNIT_TYPE_MAGIC_IMMUNE)==false then
call TZ8(X77,id,1,8)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),id,false)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\CrushingWave\\CrushingWaveDamage.mdl",X77,"chest"))
set Z77=null
set X77=null
endfunction
function BZD takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),JR7)==false then
call GroupAddUnit(JR7,GetEnumUnit())
call BYD(JQ7,GetEnumUnit())
endif
endfunction
function BAD takes nothing returns nothing
local unit Z77=GetEnumUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local group g=OG8()
call DestroyEffect(AddSpecialEffect("war3mapImported\\RipTide09.mdx",x,y))
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,320+25,Condition(function UM8))
call ForGroup(g,function BZD)
call OF8(g)
set t=null
set g=null
endfunction
function BBD takes nothing returns boolean
return IsUnitIllusion(GetFilterUnit())and O18(GetFilterUnit())==false
endfunction
function BCD takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local group g=OG8()
local integer i=0
set JR7=OG8()
set JQ7=Z77
call GroupEnumUnitsOfPlayer(g,GetOwningPlayer(Z77),Condition(function BBD))
call GroupAddUnit(g,Z77)
call ForGroup(g,function BAD)
call OF8(g)
call OF8(JR7)
set Z77=null
set g=null
endfunction
function B3D takes nothing returns boolean
if GetSpellAbilityId()=='A2KU' then
call BCD()
endif
return false
endfunction
function AY8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function B3D))
set t=null
endfunction
function B6D takes unit Z77,unit X77,integer ML8 returns nothing
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
call UnitAddAbility(AC7,'A0BA')
call SetUnitAbilityLevel(AC7,'A0BA',ML8)
call IssueTargetOrderById(AC7,852106,X77)
set AC7=null
endfunction
function BLD takes nothing returns boolean
if IsUnitIllusion(GetFilterUnit())and GetUnitTypeId(GetFilterUnit())=='HC49' and GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())then
call B6D(GetFilterUnit(),BO4,GetUnitAbilityLevel(GetTriggerUnit(),'A24D'))
endif
return false
endfunction
function B1D takes nothing returns boolean
if IsUnitIllusion(GetFilterUnit())and GetUnitTypeId(GetFilterUnit())=='HC49' and GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())then
call SetUnitFacing(GetFilterUnit(),H64)
call SetUnitAnimation(GetFilterUnit(),"spell")
endif
return false
endfunction
function B0D takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local group g=OG8()
set H64=YI7(GetUnitX(AM7),GetUnitY(AM7),GetUnitX(BO4),GetUnitY(BO4))
call GroupEnumUnitsInRange(g,GetUnitX(AM7),GetUnitY(AM7),700,Condition(function B1D))
call OF8(g)
set AM7=null
set g=null
endfunction
function B5D takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local unit X77=BO4
local group g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(AM7),GetUnitY(AM7),700,Condition(function BLD))
call OF8(g)
set AM7=null
set g=null
endfunction
function B2D takes nothing returns boolean
if GetSpellAbilityId()=='A24D' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
if HasLinkin(GetSpellTargetUnit())==false then
set BN4=0
set BO4=GetSpellTargetUnit()
call B6D(GetTriggerUnit(),BO4,GetUnitAbilityLevel(GetTriggerUnit(),'A24D'))
call B5D()
endif
else
call B0D()
endif
endif
return false
endfunction
function AZ8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function B2D))
set t=null
endfunction
function B_D takes unit C4D returns integer
local real r=GetRandomReal(0,'d')
local integer TA8=GetUnitAbilityLevel(C4D,'A088')
local boolean C7D=AV7(C4D,BU[FH4])!=null
local integer C8D=0
local integer id=GetPlayerId(GetOwningPlayer(C4D))
set C7D=false
if TA8==1 then
set US4[id]=US4[id]+1
if C7D then
if r<30 then
set UQ4[id]=UQ4[id]+1
set C8D=3
elseif r<60 then
set UP4[id]=UP4[id]+1
set C8D=2
endif
else
if r<25 then
set C8D=2
set UP4[id]=UP4[id]+1
endif
endif
elseif TA8==2 then
set US4[id]=US4[id]+1
if C7D then
if r<17.5 then
set C8D=4
set UR4[id]=UR4[id]+1
elseif r<35 then
set C8D=3
set UQ4[id]=UQ4[id]+1
elseif r<70 then
set C8D=2
set UP4[id]=UP4[id]+1
endif
else
if r<20 then
set C8D=3
set UQ4[id]=UQ4[id]+1
elseif r<40 then
set C8D=2
set UP4[id]=UP4[id]+1
endif
endif
elseif TA8==3 then
set US4[id]=US4[id]+1
if C7D then
if r<10 then
set C8D=5
set N4[id]=N4[id]+1
elseif r<20 then
set C8D=4
set UR4[id]=UR4[id]+1
elseif r<40 then
set C8D=3
set UQ4[id]=UQ4[id]+1
elseif r<80 then
set C8D=2
set UP4[id]=UP4[id]+1
endif
else
if r<12.5 then
set C8D=4
set UR4[id]=UR4[id]+1
elseif r<25 then
set C8D=3
set UQ4[id]=UQ4[id]+1
elseif r<50 then
set C8D=2
set UP4[id]=UP4[id]+1
endif
endif
endif
return C8D
endfunction
function C9D takes nothing returns boolean
local unit m5=GetFilterUnit()
local unit N28=GetTriggerUnit()
if IsUnitAlly(m5,GetOwningPlayer(N28))and GetUnitState(m5,UNIT_STATE_LIFE)>0 and GetUnitAbilityLevel(m5,'Bblo')==0 then
if(GetOwningPlayer(m5)==G8[0]or GetOwningPlayer(m5)==N8[0])then
if(GetUnitTypeId(m5)=='ugho' or GetUnitTypeId(m5)=='u001' or GetUnitTypeId(m5)=='unec' or GetUnitTypeId(m5)=='u002')then
set m5=null
set N28=null
return true
endif
if(GetUnitTypeId(m5)=='esen' or GetUnitTypeId(m5)=='e00V' or GetUnitTypeId(m5)=='edry' or GetUnitTypeId(m5)=='e00W')then
set m5=null
set N28=null
return true
endif
return false
elseif IsUnitType(m5,UNIT_TYPE_HERO)then
set m5=null
set N28=null
return true
elseif GetOwningPlayer(m5)==GetOwningPlayer(N28)then
set m5=null
set N28=null
return true
endif
endif
set m5=null
set N28=null
return false
endfunction
function CDD takes integer r returns nothing
local unit N28=GetTriggerUnit()
local integer TA8=r
local group XS8=OG8()
local unit AC7
local unit Y_8
local integer CED=GetSpellAbilityId()
local integer T8=1
if r==2 then
call QM8(GetObjectName('n0K7'),5,GetTriggerUnit(),.03,255,0,0,255)
elseif r==3 then
call QM8(GetObjectName('n0JT'),5,GetTriggerUnit(),.03,255,0,0,255)
elseif r==4 then
call QM8(GetObjectName('n0K8'),5,GetTriggerUnit(),.03,255,0,0,255)
elseif r==5 then
call QM8(GetObjectName('n0JO'),5,GetTriggerUnit(),.03,255,0,0,255)
endif
set r=r-1
call GroupEnumUnitsInRange(XS8,GetUnitX(N28),GetUnitY(N28),600,Condition(function C9D))
if N28!=GetSpellTargetUnit()then
call GroupAddUnit(XS8,N28)
endif
loop
exitwhen T8>TA8
set T8=T8+1
set AC7=CreateUnit(GetOwningPlayer(N28),'e00C',GetUnitX(N28),GetUnitY(N28),270)
call DF8(AC7)
call AddPermanentAbility(AC7,CED)
call SetUnitAbilityLevel(AC7,CED,GetUnitAbilityLevel(N28,CED))
call UnitApplyTimedLife(AC7,'BTLF',1.)
set Y_8=GroupPickRandomUnit(XS8)
call DD8(AC7,"bloodlust",Y_8)
call SetUnitPathing(AC7,false)
call SetUnitInvulnerable(AC7,true)
call AddPermanentAbility(AC7,'Aloc')
call GroupRemoveUnit(XS8,Y_8)
endloop
call OF8(XS8)
set N28=null
set XS8=null
set AC7=null
set Y_8=null
endfunction
function MultiCast_Ig_Filter takes nothing returns boolean
local unit s=GetTriggerUnit()
local unit u=GetFilterUnit()
local boolean b=IsUnitEnemy(u,GetOwningPlayer(s))and IsUnitType(u,UNIT_TYPE_MECHANICAL)==false and IsUnitType(u,UNIT_TYPE_MAGIC_IMMUNE)==false and IsUnitType(u,UNIT_TYPE_DEAD)==false and IsUnitType(u,UNIT_TYPE_STRUCTURE)==false and IsUnitVisibleEx(u,GetOwningPlayer(s))and GetUnitAbilityLevel(u,'Aloc')+GetUnitAbilityLevel(u,'Avul')+GetUnitAbilityLevel(u,'A04R')==0
set s=null
set u=null
return b
endfunction
function MultiCast_Ig takes integer i returns nothing
local unit s=GetTriggerUnit()
local player p=GetOwningPlayer(s)
local real x=GetUnitX(s)
local real y=GetUnitY(s)
local group g=CreateGroup()
local unit u=null
if i==2 then
call QM8(GetObjectName('n0K7'),5,GetTriggerUnit(),.03,255,0,0,255)
elseif i==3 then
call QM8(GetObjectName('n0JT'),5,GetTriggerUnit(),.03,255,0,0,255)
elseif i==4 then
call QM8(GetObjectName('n0K8'),5,GetTriggerUnit(),.03,255,0,0,255)
elseif i==5 then
call QM8(GetObjectName('n0JO'),5,GetTriggerUnit(),.03,255,0,0,255)
endif
set i=i-1
call GroupEnumUnitsInRange(g,x,y,550+150*GetUnitAbilityLevel(s,'A088'),Condition(function MultiCast_Ig_Filter))
call GroupRemoveUnit(g,GetSpellTargetUnit())
loop
set u=GroupPickRandomUnit(g)
exitwhen i<0 or u==null
call GroupRemoveUnit(g,u)
if UseSkillWithProj(p,u,GetSpellAbilityId(),GetUnitAbilityLevel(s,GetSpellAbilityId()),852662,10)then
set i=i-1
endif
endloop
call DestroyGroup(g)
set s=null
set p=null
set u=null
endfunction
function CFD takes nothing returns boolean
local integer r
if GetUnitAbilityLevel(GetTriggerUnit(),'A088')>0 and(GetSpellAbilityId()=='AZ4R' or GetSpellAbilityId()=='AZ4S' or GetSpellAbilityId()=='AZ4T' or GetSpellAbilityId()=='AZ4U')then
set r=B_D(GetTriggerUnit())
if r>1 then
call CDD(r)
endif
elseif GetUnitAbilityLevel(GetTriggerUnit(),'A088')>0 and(GetSpellAbilityId()=='AZ4K' or GetSpellAbilityId()=='AZ4L' or GetSpellAbilityId()=='AZ4M' or GetSpellAbilityId()=='AZ4N')then
set r=B_D(GetTriggerUnit())
if r>1 then
call MultiCast_Ig(r)
endif
elseif GetSpellAbilityId()=='A2KQ' then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_MANA,GetUnitState(GetTriggerUnit(),UNIT_STATE_MANA)*.4)
endif
return false
endfunction
function AB8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function CFD))
set t=null
endfunction
function CGD takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call AddPermanentAbility(AC7,'A2KR')
call IssueTargetOrderById(AC7,852095,X77)
set Z77=null
set X77=null
set AC7=null
endfunction
function CHD takes nothing returns nothing
local unit Z77=H04
call AddPermanentAbility(Z77,'A2KQ')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2KQ',true)
call SBool(GetHandleId(Z77),"AI|Magi2Blast",true)
set Z77=null
endfunction
function CID takes nothing returns nothing
local unit Z77=H04
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2KQ',false)
set Z77=null
endfunction
function CJD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local unit Z77=LUnit(EC8,"Source")
local integer CKD=LInt(EC8,"Iterations")
local integer TA8=LInt(EC8,"Level")
local integer CMD=LInt(EC8,"Spell")
local unit AC7
if GetTriggerEvalCount(t)>CKD then
call LT7(EC8)
call EA8(t)
else
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(m5),GetUnitY(m5),0)
if CMD=='A2KQ' then
set CMD='A2KR'
endif
call AddPermanentAbility(AC7,CMD)
call SetUnitAbilityLevel(AC7,CMD,TA8)
call IssueTargetOrderById(AC7,852095,m5)
endif
set t=null
set m5=null
set Z77=null
set AC7=null
return false
endfunction
function CND takes integer r returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local integer CMD=GetSpellAbilityId()
local integer TA8=GetUnitAbilityLevel(Z77,CMD)
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
if r==2 then
call QM8(GetObjectName('n0K7'),5,GetTriggerUnit(),.03,255,0,0,255)
elseif r==3 then
call QM8(GetObjectName('n0JT'),5,GetTriggerUnit(),.03,255,0,0,255)
elseif r==4 then
call QM8(GetObjectName('n0K8'),5,GetTriggerUnit(),.03,255,0,0,255)
elseif r==5 then
call QM8(GetObjectName('n0JO'),5,GetTriggerUnit(),.03,255,0,0,255)
endif
set r=r-1
call SUnit(EC8,"Target",m5)
call SUnit(EC8,"Source",Z77)
call SInt(EC8,"Iterations",r)
call SInt(EC8,"Level",TA8)
call SInt(EC8,"Spell",CMD)
call TriggerRegisterTimerEvent(t,.3,true)
call TriggerAddCondition(t,Condition(function CJD))
set t=null
set m5=null
set Z77=null
endfunction
function COD takes nothing returns boolean
local integer r
if GetUnitAbilityLevel(GetTriggerUnit(),'A088')>0 and HasLinkin(GetSpellTargetUnit())==false and(GetSpellAbilityId()=='A04W' or GetSpellAbilityId()=='A08D' or GetSpellAbilityId()=='A08A' or GetSpellAbilityId()=='A089' or GetSpellAbilityId()=='A2KQ')then
set r=B_D(GetTriggerUnit())
if r>1 and((LoadInteger(R8,(GetHandleId((GetSpellTargetUnit()))),((4322))))==1)==false then
call CND(r)
endif
endif
if HasLinkin(GetSpellTargetUnit())==false and GetSpellAbilityId()=='A2KQ' then
call CGD()
endif
return false
endfunction
function CPD takes nothing returns boolean
local integer id=GetPlayerId(GetTriggerPlayer())
local string BED
local string BFD
local string BGD
local string CQD
local string CRD
local string str6
if US4[id]>0 then
set BED=GetObjectName('n0JH')+" "+I2S(US4[id])
set BFD=GetObjectName('n0JM')+" "+I2S(UP4[id]+UQ4[id]+UR4[id]+N4[id])+" ("+I2S((UP4[id]+UQ4[id]+UR4[id]+N4[id])*'d'/ US4[id])+"%)"
set BGD=GetObjectName('n0JL')+" "+I2S(UP4[id])+" ("+I2S('d'*UP4[id]/ US4[id])+"%)"
set CQD=GetObjectName('n0JK')+" "+I2S(UQ4[id])+" ("+I2S('d'*UQ4[id]/ US4[id])+"%)"
set CRD=GetObjectName('n0JJ')+" "+I2S(UR4[id])+" ("+I2S('d'*UR4[id]/ US4[id])+"%)"
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,BED)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,BFD)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,BGD)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,CQD)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,CRD)
endif
return false
endfunction
function AA8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function COD))
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[1],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-st",true)
call TriggerAddCondition(t,Condition(function CPD))
set t=null
endfunction
function CSD takes nothing returns boolean
return GetSpellAbilityId()=='A08N'
endfunction
function Uu takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')!=1 and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function UU takes nothing returns nothing
call Dmg(GetTriggerUnit(),GetEnumUnit(),HeroMagic,Y8)
endfunction
function CTD takes nothing returns nothing
local boolexpr hP=Condition(function Uu)
local group XS8=OG8()
local real x=GetUnitX(GetSpellTargetUnit())
local real y=GetUnitY(GetSpellTargetUnit())
set Y8=90*GetUnitAbilityLevel(GetTriggerUnit(),'A08N')
call GroupEnumUnitsInRange(XS8,x,y,265,hP)
call ForGroup(XS8,function UU)
if GetUnitState(GetSpellTargetUnit(),UNIT_STATE_LIFE)>1 then
call SetUnitState(GetSpellTargetUnit(),UNIT_STATE_LIFE,GetUnitState(GetSpellTargetUnit(),UNIT_STATE_LIFE)+Y8)
endif
call OF8(XS8)
call DestroyBoolExpr(hP)
set XS8=null
set hP=null
endfunction
function SlowAuraSingle takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
if GetUnitAbilityLevel(s,'B01B')==0 then
if time>LReal(h,"r")then
call UnitRemoveAbility(s,'AZ1F')
call UnitRemoveAbility(s,'BZ1F')
call SBool(GetHandleId(s),"B01B_Trig",false)
call TriggerOff()
endif
else
call SReal(h,"r",time+2.5)
endif
endfunction
function NewSlowAuraTimer takes nothing returns nothing
local unit s=LUnit(GetT(),"s")
local group g=CreateGroup()
local trigger t=null
local unit f=null
if GetUnitAbilityLevel(s,'A06A')==0 or s==null then
call SBool(GetHandleId(f),"B01B_Trig",false)
call TriggerOff()
call DestroyGroup(g)
set s=null
set g=null
return
endif
call GroupEnumUnitsInRange(g,GetUnitX(s),GetUnitY(s),375,null)
loop
set f=FirstOfGroup(g)
exitwhen f==null
if GetUnitAbilityLevel(f,'B01B')>0 and LBool(GetHandleId(f),"B01B_Trig")==false then
call SBool(GetHandleId(f),"B01B_Trig",true)
set t=CreateTrigger()
call TriggerRegisterTimer(t)
call SUnit(GetHandleId(t),"s",f)
call TriggerAddCondition(t,Condition(function SlowAuraSingle))
call AddPermanentAbility(f,'AZ1F')
call SetUnitAbilityLevel(f,'AZ1F',GetUnitAbilityLevel(s,'A06A'))
set t=null
endif
call GroupRemoveUnit(g,f)
endloop
call DestroyGroup(g)
set s=null
set g=null
endfunction
function NewSlowAura takes unit s returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function NewSlowAuraTimer))
call SUnit(GetHandleId(t),"s",s)
call SGroup(GetHandleId(t),"g",CreateGroup())
set t=null
endfunction
function NewSlowAuraCond takes nothing returns nothing
if GetLearnedSkill()=='A06A' and LBool(GetHandleId(GetTriggerUnit()),"A06A_Trig")==false then
call SBool(GetHandleId(GetTriggerUnit()),"A06A_Trig",true)
call NewSlowAura(GetTriggerUnit())
endif
endfunction
function PN takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function CSD))
call TriggerAddAction(t,function CTD)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function NewSlowAuraCond))
set t=null
endfunction
function CUD takes nothing returns boolean
if GetUnitTypeId(GetFilterUnit())==KA4[21]and GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())and IsUnitIllusion(GetFilterUnit())==false then
set H04=GetFilterUnit()
endif
return false
endfunction
function CVD takes nothing returns nothing
local unit CWD=GetTriggerUnit()
local unit Z77
local group g=OG8()
local real x
local real y
set H04=null
call GroupEnumUnitsInRange(g,GetUnitX(CWD),GetUnitY(CWD),1000,Condition(function CUD))
call OF8(g)
set Z77=H04
if Z77!=null then
set x=GetUnitX(Z77)
set y=GetUnitY(Z77)
call SetUnitPosition(CWD,x,y)
endif
set x=GetUnitX(CWD)+600*Cos(GetUnitFacing(CWD)*bj_DEGTORAD)
set y=GetUnitY(CWD)+600*Sin(GetUnitFacing(CWD)*bj_DEGTORAD)
call IssuePointOrderById(CWD,851986,x,y)
set CWD=null
set Z77=null
set g=null
endfunction
function CXD takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),'B03A')>0 then
call CVD()
endif
return false
endfunction
function Po takes nothing returns nothing
local trigger t=CreateTrigger()
local region r=CreateRegion()
call RegionAddRect(r,bj_mapInitialPlayableArea)
call TriggerRegisterEnterRegion(t,r,null)
call TriggerAddCondition(t,Condition(function CXD))
set t=null
set r=null
endfunction
function CYD takes nothing returns boolean
if GetUnitAbilityLevel(GetFilterUnit(),'B03B')>0 then
set HB4=HB4+1
endif
return false
endfunction
function CZD takes nothing returns nothing
local unit CAD=GetAttacker()
local group g=OG8()
local integer CBD=GetRandomInt(1,'d')
local integer CCD=GetUnitAbilityLevel(CAD,'A0DB')
local integer C3D=GetUnitAbilityLevel(CAD,'A0YK')
local unit AC7
local integer C6D=2*CCD
local integer CLD=12
set HB4=0
call GroupEnumUnitsOfPlayer(g,GetOwningPlayer(CAD),Condition(function CYD))
call OF8(g)
if HB4<C6D and GetUnitAbilityLevel(CAD,'BNdo')==0 then
if IsUnitIllusion(CAD)==false and CBD<=(CLD+2*C3D)then
set AC7=CreateUnit(GetOwningPlayer(CAD),'e00E',GetUnitX(CAD),GetUnitY(CAD),0)
call AddPermanentAbility(AC7,'A0DD')
call IssueTargetOrderById(AC7,852274,CAD)
endif
if IsUnitIllusion(CAD)and CBD<=(1+2*C3D)and C3D>0 then
set AC7=CreateUnit(GetOwningPlayer(CAD),'e00E',GetUnitX(CAD),GetUnitY(CAD),0)
call AddPermanentAbility(AC7,'A0DD')
call IssueTargetOrderById(AC7,852274,CAD)
endif
endif
set CAD=null
set g=null
set AC7=null
endfunction
function C1D takes nothing returns boolean
if(GetUnitAbilityLevel(GetAttacker(),'B03B')>0 or GetUnitAbilityLevel(GetAttacker(),'B03A')>0)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))then
call CZD()
endif
return false
endfunction
function AC8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function C1D))
set t=null
endfunction
function C0D takes nothing returns boolean
local unit C5D=GetSummonedUnit()
local unit oA
local unit m5
if GetUnitAbilityLevel(C5D,'B098')>0 then
set oA=GetSummoningUnit()
set m5=LUnit(GetHandleId(oA),"SpiritTarget")
call SetUnitX(C5D,GetUnitX(m5))
call SetUnitY(C5D,GetUnitY(m5))
call IssueTargetOrderById(C5D,851983,m5)
endif
set C5D=null
set oA=null
set m5=null
return false
endfunction
function C2D takes player p,unit m5,integer TA8 returns nothing
local unit oA=CreateUnit(p,'e00E',GetUnitX(m5),GetUnitX(m5),0)
local integer C_D
call SUnit(GetHandleId(oA),"SpiritTarget",m5)
if TA8==1 then
set C_D='A10H'
elseif TA8==2 then
set C_D='A10G'
elseif TA8==3 then
set C_D='A10I'
else
set C_D='A10F'
endif
call AddPermanentAbility(oA,C_D)
call IssueTargetOrderById(oA,852274,Y7[GetPlayerId(p)])
set oA=null
endfunction
function L4D takes player p,unit X77,integer TA8,boolean L7D,boolean L8D returns nothing
local real P08=50+50*TA8
local unit AC7
if L8D then
set AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call AddPermanentAbility(AC7,'A10C')
call SetUnitAbilityLevel(AC7,'A10C',TA8)
call IssueTargetOrderById(AC7,852189,X77)
call Dmg(Y7[GetPlayerId(p)],X77,NormalFire,P08)
if L7D then
call C2D(p,X77,TA8)
endif
endif
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\IllidanMissile\\IllidanMissile.mdl",X77,"origin"))
set AC7=null
endfunction
function L9D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local player p=ED8(EC8,"SourcePlayer")
local unit m5=LUnit(EC8,"Target")
local integer TA8=LInt(EC8,"Level")
local boolean L8D=LBool(EC8,"damage")
local unit IJ=LUnit(EC8,"Projectile")
local real x=GetUnitX(IJ)
local real y=GetUnitY(IJ)
local real hN=GetUnitX(m5)
local real ho=GetUnitY(m5)
local real Ik=1000*.035
local real IK=YI7(x,y,hN,ho)
local real Il=x+Ik*Cos(IK*bj_DEGTORAD)
local real IL=y+Ik*Sin(IK*bj_DEGTORAD)
call SetUnitX(IJ,Il)
call SetUnitY(IJ,IL)
call SetUnitFacing(IJ,IK)
if Z87(hN,ho,Il,IL)<=Ik then
call L4D(p,m5,TA8,true,L8D)
call KillUnit(IJ)
call LT7(EC8)
call EA8(t)
endif
set t=null
set m5=null
set IJ=null
return false
endfunction
function LDD takes unit Z77,integer TA8,unit m5,boolean L8D returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit IJ=CreateUnit(GetOwningPlayer(Z77),'h06L',GetUnitX(Z77),GetUnitY(Z77),YI7(GetUnitX(Z77),GetUnitY(Z77),GetUnitX(m5),GetUnitY(m5)))
call DA8(EC8,"SourcePlayer",GetOwningPlayer(Z77))
call SUnit(EC8,"Target",m5)
call SBool(EC8,"damage",L8D)
call SUnit(EC8,"Projectile",IJ)
call SInt(EC8,"Level",TA8)
call TriggerRegisterTimerEvent(t,.035,true)
call TriggerAddCondition(t,Condition(function L9D))
set t=null
set IJ=null
endfunction
function LED takes nothing returns boolean
if IsUnitIllusion(GetFilterUnit())and GetUnitTypeId(GetFilterUnit())=='Ogrh' and GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())then
call LDD(GetFilterUnit(),GetUnitAbilityLevel(GetTriggerUnit(),'A10D'),GetSpellTargetUnit(),false)
endif
return false
endfunction
function LFD takes nothing returns nothing
local unit N28=GetTriggerUnit()
local integer TA8=GetUnitAbilityLevel(N28,'A10D')
local unit m5=GetSpellTargetUnit()
local group g=OG8()
local boolean LGD=HasLinkin(GetSpellTargetUnit())
call GroupEnumUnitsInRange(g,GetUnitX(N28),GetUnitY(N28),700,Condition(function LED))
if LGD then
call LDD(N28,TA8,m5,false)
else
call LDD(N28,TA8,m5,true)
endif
call OF8(g)
set N28=null
set m5=null
set g=null
endfunction
function LHD takes nothing returns boolean
if IsUnitIllusion(GetFilterUnit())and GetUnitTypeId(GetFilterUnit())=='Ogrh' and GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())then
call SetUnitFacing(GetFilterUnit(),H64)
call SetUnitAnimation(GetFilterUnit(),"spell")
endif
return false
endfunction
function LID takes nothing returns nothing
local unit N28=GetTriggerUnit()
local group g=OG8()
set H64=YI7(GetUnitX(N28),GetUnitY(N28),GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()))
call GroupEnumUnitsInRange(g,GetUnitX(N28),GetUnitY(N28),700,Condition(function LHD))
call OF8(g)
set N28=null
set g=null
endfunction
function LJD takes nothing returns boolean
if GetSpellAbilityId()=='A10D' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
call LFD()
else
call LID()
endif
endif
return false
endfunction
function A38 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function LJD))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function LJD))
call PU8('A10C')
call PU8('A10H')
call PU8('A10G')
call PU8('A10I')
call PU8('A10F')
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function C0D))
set t=null
endfunction
function LKD takes nothing returns nothing
local unit u=GetTriggerUnit()
local unit oA=CreateUnit(GetOwningPlayer(u),'e00E',GetUnitX(u),GetUnitY(u),0)
call AddPermanentAbility(oA,'A0DC')
call IssueTargetOrderById(oA,852274,u)
set u=null
set oA=null
endfunction
function LMD takes nothing returns boolean
if GetSpellAbilityId()=='A0D7' then
call LKD()
endif
return false
endfunction
function A68 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function LMD))
set t=null
endfunction
function LND takes nothing returns boolean
return GetSpellAbilityId()=='A07Z'
endfunction
function U4 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 U5 takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit oA=CreateUnit(GetOwningPlayer(N28),'e022',GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),270)
call AddPermanentAbility(oA,'A06T')
call SetUnitAbilityLevel(oA,'A06T',GetUnitAbilityLevel(N28,'A07Z'))
call IssueTargetOrderById(oA,852171,GetEnumUnit())
set N28=null
set oA=null
endfunction
function LOD takes nothing returns nothing
local unit N28=GetTriggerUnit()
local group XS8=OG8()
local boolexpr hP=Condition(function U4)
call GroupEnumUnitsInRange(XS8,GetUnitX(N28),GetUnitY(N28),650,hP)
call ForGroup(XS8,function U5)
call DestroyBoolExpr(hP)
call OF8(XS8)
set N28=null
set XS8=null
endfunction
function AL8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function LND))
call TriggerAddAction(t,function LOD)
set t=null
endfunction
function LPD takes unit Z77,integer TA8 returns nothing
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
call AddPermanentAbility(AC7,'A1GB')
call SetUnitAbilityLevel(AC7,'A1GB',TA8)
call IssueTargetOrderById(AC7,852069,Z77)
call AddPermanentAbility(Z77,'A23O')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A23O',false)
set AC7=null
endfunction
function LQD takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='h0BT'
endfunction
function LRD takes unit LSD returns boolean
local group g=OG8()
local boolean LTD=false
call GroupEnumUnitsInRange(g,GetUnitX(LSD),GetUnitY(LSD),375,Condition(function LQD))
if FirstOfGroup(g)!=null then
set LTD=true
endif
call OF8(g)
set g=null
return LTD
endfunction
function LUD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer QRD=LInt(EC8,"TargetIndex")
local unit KV8=KH8(QRD)
local integer OUD=LInt(EC8,"Count")
local integer TA8=LInt(EC8,"Level")
local real U89=(LoadReal(R8,(EC8),(442)))
if GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED and GetTriggerEventId()!=EVENT_PLAYER_UNIT_SPELL_EFFECT then
set OUD=OUD+1
call SInt(EC8,"Count",OUD)
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='A01Z' and GetTriggerUnit()==KV8 then
call SaveReal(R8,(EC8),(442),(((TimerGetElapsed(E4))+1.)*1.))
call DisableTrigger(GetTriggeringTrigger())
call LPD(KV8,TA8)
call EnableTrigger(GetTriggeringTrigger())
call SInt(EC8,"Count",0)
endif
if nA(GetUnitX(KV8),GetUnitY(KV8),375)==false and LRD(KV8)==false then
if U89<(TimerGetElapsed(E4))or GetTriggerEvalCount(t)==1 then
call UnitRemoveAbility(KV8,'B021')
call UnitRemoveAbility(KV8,'A1GA')
call UnitRemoveAbility(KV8,'A23O')
call UnitRemoveAbility(KV8,'B0E9')
call LT7(EC8)
call EA8(t)
endif
elseif(LBool(EC8,"NaturesGuise|Special")and OUD>(150*TA8))then
call UnitRemoveAbility(KV8,'B021')
call UnitRemoveAbility(KV8,'A1GA')
call UnitRemoveAbility(KV8,'A23O')
call UnitRemoveAbility(KV8,'B0E9')
call LT7(EC8)
call EA8(t)
elseif LBool(EC8,"NaturesGuise|Special")and GetUnitAbilityLevel(KV8,'B021')==0 and GetUnitAbilityLevel(KV8,'A1GA')>0 then
call SaveReal(R8,(EC8),(442),(((TimerGetElapsed(E4))+1.)*1.))
call DisableTrigger(GetTriggeringTrigger())
call LPD(KV8,TA8)
call EnableTrigger(GetTriggeringTrigger())
elseif GetUnitAbilityLevel(KV8,'B021')==0 then
call UnitRemoveAbility(KV8,'B021')
call UnitRemoveAbility(KV8,'A1GA')
call UnitRemoveAbility(KV8,'A23O')
call UnitRemoveAbility(KV8,'B0E9')
call LT7(EC8)
call EA8(t)
else
call SaveReal(R8,(EC8),(442),(((TimerGetElapsed(E4))+1.)*1.))
endif
set t=null
set KV8=null
return false
endfunction
function LVD takes nothing returns nothing
local unit KV8=GetAttacker()
local integer KC8=GetHandleId(KV8)
local trigger t=LTrig(KC8,"Nature|Trg")
local integer NR8=GetHandleId(t)
call XK7("uHero: |c00ffff00"+GetUnitName(KV8)+"|r")
call XK7("GetAttacker(): |c00ffff00"+GetUnitName(GetAttacker())+"|r")
if LBool(NR8,"NaturesGuise|Special")and GetAttacker()==KV8 then
call XK7("Remove invis from: |c00ffff00"+GetUnitName(GetAttacker())+"|r")
call UnitRemoveAbility(KV8,'B021')
call UnitRemoveAbility(KV8,'A1GA')
call LT7(NR8)
call EA8(t)
endif
set KV8=null
set t=null
endfunction
function LWD takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),'B021')>0 or GetUnitAbilityLevel(GetAttacker(),'A1GA')>0 then
call LVD()
endif
return false
endfunction
function LXD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if GetTriggerEventId()!=EVENT_WIDGET_DEATH then
if GetUnitAbilityLevel(Z77,'B021')>0 then
call AddPermanentAbility(Z77,'A1GA')
endif
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function LYD takes nothing returns nothing
local trigger t
local integer EC8
set t=CreateTrigger()
set EC8=GetHandleId(t)
call SInt(EC8,"TargetIndex",KJ8(GetSpellTargetUnit()))
call SInt(EC8,"Level",GetUnitAbilityLevel(GetTriggerUnit(),'A01Z'))
call SInt(EC8,"Count",0)
call SaveReal(R8,(EC8),(442),(((TimerGetElapsed(E4))+1.)*1.))
call TriggerAddCondition(t,Condition(function LUD))
call TriggerRegisterTimerEvent(t,.1,true)
call AddPermanentAbility(GetSpellTargetUnit(),'A23O')
call SetPlayerAbilityAvailable(GetOwningPlayer(GetSpellTargetUnit()),'A23O',false)
if GetTriggerUnit()==GetSpellTargetUnit()then
call SBool(EC8,"NaturesGuise|Special",true)
call STrig(GetHandleId(GetSpellTargetUnit()),"Nature|Trg",t)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
set t=CreateTrigger()
call SaveUnitHandle(R8,(GetHandleId(t)),(2),(GetTriggerUnit()))
call TriggerAddCondition(t,Condition(function LXD))
call TriggerRegisterTimerEvent(t,2,false)
call TriggerRegisterDeathEvent(t,GetTriggerUnit())
endif
set t=null
endfunction
function LZD takes nothing returns boolean
if GetSpellAbilityId()=='A01Z' then
call LYD()
endif
return false
endfunction
function A18 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function LZD))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function LWD))
set t=null
endfunction
function LAD takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local real LBD=(LoadReal(R8,(GetHandleId(X77)),(686)))
if GetTriggerEventId()==EVENT_WIDGET_DEATH or LBD<(TimerGetElapsed(E4))or GU8(X77)then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SaveReal(R8,(GetHandleId(X77)),(686),((0)*1.))
call UnitRemoveAbility(X77,'A24P')
call UnitRemoveAbility(X77,'A24P')
call UnitRemoveAbility(X77,'A24P')
call UnitRemoveAbility(X77,'A24P')
call UnitRemoveAbility(X77,'B0EG')
else
call Dmg(Z77,X77,NormalFire,15+15*ML8)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function LCD takes unit Z77,unit X77 returns nothing
local trigger t
local integer W57
local real LBD=(LoadReal(R8,(GetHandleId(X77)),(686)))
local integer ML8=GetUnitAbilityLevel(Z77,'A1G7')
if LBD>(TimerGetElapsed(E4))then
call SaveReal(R8,(GetHandleId(X77)),(686),(((TimerGetElapsed(E4))+4)*1.))
else
set t=CreateTrigger()
set W57=GetHandleId(t)
call SaveReal(R8,(GetHandleId(X77)),(686),(((TimerGetElapsed(E4))+4)*1.))
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function LAD))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Other\\AcidBomb\\BottleImpact.mdl",X77,"overhead")))
if ML8==1 then
call AddPermanentAbility(X77,'A24P')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A24P',false)
elseif ML8==2 then
call AddPermanentAbility(X77,'A24P')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A24P',false)
elseif ML8==3 then
call AddPermanentAbility(X77,'A24P')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A24P',false)
elseif ML8==4 then
call AddPermanentAbility(X77,'A24P')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A24P',false)
endif
endif
set t=null
endfunction
function Sentinel_FindClosest takes nothing returns boolean
if GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(UB4)and(GetUnitTypeId(GetFilterUnit())=='h0BT' or GetUnitTypeId(GetFilterUnit())=='h0BU')then
if Z87(GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()),UC4,U34)<U64 then
set UA4=GetFilterUnit()
set U64=Z87(GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()),UC4,U34)
endif
endif
return false
endfunction
function L3D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77
local group g
local real PX9=(LoadReal(R8,(W57),(442)))
local real x
local real y
local integer MB8
local real hp
local integer C77=(LoadInteger(R8,(W57),(34)))
if GetTriggerEventId()!=EVENT_PLAYER_UNIT_DEATH then
set C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
endif
if GetTriggerEventId()==EVENT_PLAYER_UNIT_DEATH then
if GetTriggerUnit()==AC7 then
call UnitRemoveAbility(AC7,'Apiv')
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
elseif GetUnitTypeId(AC7)=='h0BT' then
set H04=AC7
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(AC7),GetUnitY(AC7),'n',Condition(function UM8))
set X77=GUD(g,GetUnitX(AC7),GetUnitY(AC7))
call OF8(g)
if X77!=null then
call LCD(Z77,X77)
set x=GetUnitX(AC7)
set y=GetUnitY(AC7)
set hp=GetUnitState(AC7,UNIT_STATE_LIFE)
call ShowUnit(AC7,false)
call DisableTrigger(t)
call KillUnit(AC7)
call EnableTrigger(t)
set AC7=CreateUnit(GetOwningPlayer(Z77),'h0BU',x,y,0)
call SetUnitState(AC7,UNIT_STATE_LIFE,hp)
call UnitApplyTimedLife(AC7,'BTLF',480-((TimerGetElapsed(E4))-PX9))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveReal(R8,(W57),(411),(((TimerGetElapsed(E4))+4)*1.))
endif
elseif GetUnitTypeId(AC7)=='h0BU' and(LoadReal(R8,(W57),(411)))<(TimerGetElapsed(E4))then
set x=GetUnitX(AC7)
set y=GetUnitY(AC7)
set hp=GetUnitState(AC7,UNIT_STATE_LIFE)
call ShowUnit(AC7,false)
call DisableTrigger(t)
call KillUnit(AC7)
call EnableTrigger(t)
set AC7=CreateUnit(GetOwningPlayer(Z77),'h0BT',x,y,0)
call SetUnitState(AC7,UNIT_STATE_LIFE,hp)
call UnitApplyTimedLife(AC7,'BTLF',480-((TimerGetElapsed(E4))-PX9))
call SaveUnitHandle(R8,(W57),(19),(AC7))
endif
set t=null
set Z77=null
set X77=null
set AC7=null
set g=null
return false
endfunction
function L6D takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A1G7')
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'h0BT',x,y,0)
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call UnitApplyTimedLife(AC7,'BTLF',480)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function L3D))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(442),(((TimerGetElapsed(E4)))*1.))
call SaveInteger(R8,(W57),(34),(0))
set t=null
set Z77=null
set AC7=null
endfunction
function LLD takes nothing returns boolean
if GetSpellAbilityId()=='A1G7' then
call L6D()
endif
return false
endfunction
function A58 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function LLD))
set t=null
endfunction
function gg_ForestSentinelHack takes nothing returns nothing
local unit W8D=GetTriggerUnit()
local integer ZK7=GetUnitAbilityLevel(W8D,'A1G7')
local real x=.0
local real y=.0
local unit L1D=null
local trigger t=null
local integer NZ8=0
local unit W17=null
local unit u=null
local group g=null
local boolexpr b=Condition(function H88)
if((KR8(GetOwningPlayer(W8D))))then
set t=CreateTrigger()
set NZ8=GetHandleId(t)
set g=CreateGroup()
call GroupClear(g)
call GroupEnumUnitsInRangeOfLoc(g,GetUnitLoc(W8D),800,Condition(function H88))
if(not YA7(g))then
loop
set u=FirstOfGroup(g)
call GroupRemoveUnit(g,u)
exitwhen IsUnitEnemy(u,GetOwningPlayer(W8D))
endloop
set W17=u
endif
call DestroyGroup(g)
if(W17!=null)then
set x=GetUnitX(W17)+GetRandomReal(-10.,10.)
set y=GetUnitY(W17)+GetRandomReal(-10.,10.)
else
set x=GetUnitX(W8D)+GetRandomReal(-10.,10.)
set y=GetUnitY(W8D)+GetRandomReal(-10.,10.)
endif
set L1D=CreateUnit(GetOwningPlayer(W8D),'h0BT',x,y,0)
call UnitApplyTimedLife(L1D,'BTLF',480)
call TriggerRegisterUnitEvent(t,L1D,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,W8D,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterTimerEvent(t,.2,true)
call TriggerAddCondition(t,Condition(function L3D))
call SaveUnitHandle(R8,(NZ8),(19),(L1D))
call SaveUnitHandle(R8,(NZ8),(2),(W8D))
call SaveReal(R8,(NZ8),(442),(((TimerGetElapsed(E4)))*1.))
call UnitAddAbility(W8D,'A1QV')
call NU8(W8D,L1D)
endif
set t=null
set W8D=null
set L1D=null
call DestroyBoolExpr(b)
set W17=null
set g=null
set u=null
endfunction
function L0D takes nothing returns nothing
local unit X77=GetEnumUnit()
local real d=Z87(GetUnitX(X77),GetUnitY(X77),K77,K87)
if d<K47 and IsUnitVisibleEx(X77,GetOwningPlayer(K97))and(IsUnitType(X77,UNIT_TYPE_HERO)or(IsUnitType(X77,UNIT_TYPE_STRUCTURE)and UJ8(X77)))then
set J_7=GetEnumUnit()
set K47=d
endif
set X77=null
endfunction
function L5D takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer C77=(LoadInteger(R8,(W57),(34)))
local integer ML8=GetUnitAbilityLevel(Z77,'A2ML')
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamage()>5 then
set C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
call AddLife(X77,RMinBJ(GetEventDamage(),20*GetUnitAbilityLevel(Z77,'A2ML')))
endif
endif
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED or C77>(ML8+3-1)then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(X77,'A2MX')
call UnitRemoveAbility(X77,'A2MY')
call UnitRemoveAbility(X77,'A2MW')
call UnitRemoveAbility(X77,'A2MV')
call UnitRemoveAbility(X77,'B0G5')
endif
set t=null
set X77=null
set Z77=null
return false
endfunction
function L2D takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer L47='A2MX'
local integer ML8=GetUnitAbilityLevel(Z77,'A2ML')
local group g
if X77==null then
set J_7=null
set K97=Z77
set K47=999999
set K77=GetSpellTargetX()
set K87=GetSpellTargetY()
set H04=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,0,0,9999,Condition(function VQ8))
call ForGroup(g,function L0D)
call OF8(g)
set X77=J_7
set g=null
endif
if ML8==2 then
set L47='A2MY'
elseif ML8==3 then
set L47='A2MW'
elseif ML8==4 then
set L47='A2MV'
endif
call AddPermanentAbility(X77,L47)
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),L47,false)
call TriggerRegisterTimerEvent(t,15,false)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function L5D))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(34),(0))
set t=null
set X77=null
set Z77=null
endfunction
function L_D takes nothing returns boolean
if GetSpellAbilityId()=='A2ML' then
call L2D()
endif
return false
endfunction
function A08 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function L_D))
set t=null
endfunction
function D4E takes nothing returns nothing
local integer W57=GetHandleId(GetTriggeringTrigger())
local unit Z77=H04
local unit X77=H54
local real D7E=(LoadReal(R8,(W57),(21)))
call SetUnitState(X77,UNIT_STATE_LIFE,GetUnitState(X77,UNIT_STATE_LIFE)+D7E)
set Z77=null
set X77=null
endfunction
function D8E takes nothing returns nothing
local trigger t=T88(LU4,GetEnumUnit(),'h0D8',"D4E",400)
local integer W57=GetHandleId(t)
call SaveReal(R8,(W57),(21),((LV4)*1.))
set t=null
endfunction
function D9E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local group g
local integer C77=(LoadInteger(R8,(W57),(34)))
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(X77,'A273')
call UnitRemoveAbility(X77,'B0EL')
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
else
set C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
if C77>5 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(X77,'A273')
call UnitRemoveAbility(X77,'B0EL')
endif
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\NightElf\\EntBirthTarget\\EntBirthTarget.mdl",X77,"origin"))
set H04=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(X77),GetUnitY(X77),525,Condition(function U08))
set LU4=X77
set LV4=15*ML8
call ForGroup(g,function D8E)
call OF8(g)
call Dmg(Z77,X77,NormalFire,LV4)
endif
set t=null
set Z77=null
set X77=null
set g=null
return false
endfunction
function DDE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A26N')
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call AddPermanentAbility(X77,'A273')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A273',false)
call TriggerRegisterTimerEvent(t,.9,true)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function D9E))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(442),(((TimerGetElapsed(E4)))*1.))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveInteger(R8,(W57),(34),(0))
set t=null
set Z77=null
endfunction
function LeechSeed takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
call T88(Z77,X77,'h0D9',"DDE",600)
set Z77=null
set X77=null
endfunction
function DEE takes nothing returns boolean
if GetSpellAbilityId()=='A26N' and HasLinkin(GetSpellTargetUnit())==false then
call DDE()
endif
return false
endfunction
function A28 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function DEE))
set t=null
endfunction
function DFE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,'A2NT')
call FlushChildHashtable(R8,(W57))
call EA8(t)
call Dmg(Z77,X77,NormalFire,'d'+50*ML8)
set t=null
set Z77=null
set X77=null
return false
endfunction
function DGE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
local integer ML8=GetUnitAbilityLevel(Z77,'A2NT')
local boolean DHE=(LoadBoolean(R8,(W57),(95)))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call AddPermanentAbility(AC7,'A0LS')
call SetUnitAbilityLevel(AC7,'A0LS',ML8)
call IssueTargetOrderById(AC7,852668,X77)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerAddCondition(t,Condition(function DFE))
call TriggerRegisterTimerEvent(t,.01,false)
call SaveUnitHandle(R8,(GetHandleId(t)),(2),(Z77))
call SaveUnitHandle(R8,(GetHandleId(t)),(17),(X77))
call SaveInteger(R8,(GetHandleId(t)),(5),(ML8))
if DHE then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\LastWordDamageSpell.mdx",X77,"overhead"))
endif
set t=null
set Z77=null
set X77=null
set AC7=null
return false
endfunction
function DIE takes integer id returns boolean
return id=='A0DY' or id=='A1WB' or id=='A026' or id=='A09V' or id=='AHfa' or id=='A0LZ' or id=='A0QN' or id=='A0OI' or id=='AZ2G'
endfunction
function DJE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit AC7
local integer ML8=GetUnitAbilityLevel(Z77,'A2NT')
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call UnitRemoveAbility(X77,'A2NU')
call UnitRemoveAbility(X77,'B05V')
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call UnitRemoveAbility(X77,'A2NU')
call UnitRemoveAbility(X77,'B05V')
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerAddCondition(t,Condition(function DGE))
call TriggerRegisterTimerEvent(t,.01,false)
call SaveUnitHandle(R8,(GetHandleId(t)),(2),(Z77))
call SaveUnitHandle(R8,(GetHandleId(t)),(17),(X77))
call SaveInteger(R8,(GetHandleId(t)),(5),(ML8))
call SaveBoolean(R8,(W57),(95),(false))
set AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call AddPermanentAbility(AC7,'A2NW')
call SetUnitAbilityLevel(AC7,'A2NW',ML8)
call IssueTargetOrderById(AC7,852585,X77)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\LastWordDamageDuration.mdx",X77,"overhead"))
set AC7=null
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and X38(GetSpellAbilityId())==false and XL8(GetSpellAbilityId())==false and GetSpellAbilityId()!='AIbk' and GetSpellAbilityId()!='A05Z' and GetSpellAbilityId()!='A0FP' and GetSpellAbilityId()!='A0QY' and GetSpellAbilityId()!='A06X' and GetSpellAbilityId()!='A0AQ' and GetSpellAbilityId()!='A21X' and GetSpellAbilityId()!='A21W' and GetSpellAbilityId()!='A21V' and GetSpellAbilityId()!='A12W' and GetSpellAbilityId()!='A06K' and GetSpellAbilityId()!='Aeat' and GetSpellAbilityId()!='A0JY' and GetSpellAbilityId()!='A0FO' and GetSpellAbilityId()!='A1NI' and GetSpellAbilityId()!='A1MI' and GetSpellAbilityId()!='A2QE' and GetSpellAbilityId()!='A1Q8' and GetSpellAbilityId()!='A1RA' and GetSpellAbilityId()!='A1QV' and GetSpellAbilityId()!='A21Y' and GetSpellAbilityId()!='A1GU' and GetSpellAbilityId()!='A1YY' and DIE(GetSpellAbilityId())==false then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call UnitRemoveAbility(X77,'A2NU')
call UnitRemoveAbility(X77,'B05V')
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=CreateTrigger()
set W57=GetHandleId(t)
if GetSpellAbilityId()=='A0RV' or GetSpellAbilityId()=='A0LN' then
call TriggerRegisterTimerEvent(t,.01,false)
else
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_SPELL_ENDCAST)
endif
call TriggerAddCondition(t,Condition(function DGE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveBoolean(R8,(W57),(95),(true))
endif
set X77=null
set Z77=null
set t=null
return false
endfunction
function DKE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
if GetUnitAbilityLevel(X77,'A2NU')==0 or GetTriggerEvalCount(t)>250 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call KillUnit(AC7)
else
call SetUnitX(AC7,GetUnitX(X77))
call SetUnitY(AC7,GetUnitY(X77))
endif
set t=null
set AC7=null
set X77=null
return false
endfunction
function RD8 takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'o019',GetUnitX(X77),GetUnitY(X77),0)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterTimerEvent(t,5,false)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function DJE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call AddPermanentAbility(X77,'A2NU')
call UnitMakeAbilityPermanent(X77,true,'A2NV')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A2NU',false)
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("war3mapImported\\LastWordDebuff_6.mdx",X77,"overhead")))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function DKE))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveUnitHandle(R8,(W57),(17),(X77))
call RW8(X77,StringHash("RD8"),1,5,Z77,'A2NT',false)
set Z77=null
set X77=null
set t=null
endfunction
function DME takes nothing returns boolean
if GetSpellAbilityId()=='A2NT' and HasLinkin(GetSpellTargetUnit())==false then
call RD8()
endif
return false
endfunction
function LastWord_Process takes nothing returns nothing
local integer W57=GetHandleId(GetTriggeringTrigger())
local unit Z77=H54
local real P08=(LoadReal(R8,(W57),(20)))
call SetHeroInt(Z77,GetHeroInt(Z77,false)+1,true)
call QM8("+1 "+GetObjectName('n0JP'),3,Z77,.023,0,255,0,230)
set Z77=null
endfunction
function DNE takes nothing returns nothing
local integer W57=GetHandleId(GetTriggeringTrigger())
local unit Z77=H54
local real P08=(LoadReal(R8,(W57),(20)))
call SetHeroInt(Z77,GetHeroInt(Z77,false)+2,true)
call QM8("+2 "+GetObjectName('n0JP'),3,Z77,.023,0,255,0,230)
set Z77=null
endfunction
function DOE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit PL9=GetTriggerUnit()
if IsUnitType(PL9,UNIT_TYPE_HERO)and XC8(GetUnitTypeId(PL9))==false and IsUnitIllusion(PL9)==false and(IsUnitInRange(Z77,PL9,900)or GetOwningPlayer(Z77)==GetOwningPlayer(GetKillingUnit()))and O18(Z77)==false and IsUnitAlly(Z77,GetOwningPlayer(PL9))==false then
set TZ4[GetPlayerId(GetOwningPlayer(Z77))]=TZ4[GetPlayerId(GetOwningPlayer(Z77))]+2
call QM8("-2 "+GetObjectName('n0JP'),3,PL9,.023,255,0,0,230)
call SetHeroInt(PL9,GetHeroInt(PL9,false)-2,true)
call T88(PL9,Z77,'h0CP',"DNE",450)
endif
set t=null
set Z77=null
set PL9=null
return false
endfunction
function DPE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function DOE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set Z77=null
set t=null
endfunction
function DQE takes nothing returns boolean
if GetUnitTypeId(GetTriggerUnit())=='N01A' and IsUnitIllusion(GetTriggerUnit())==false and LBool(GetHandleId(GetTriggerUnit()),"IntSteal")==false then
call SBool(GetHandleId(GetTriggerUnit()),"IntSteal",true)
call DPE()
endif
return false
endfunction
function DRE takes nothing returns boolean
local integer DSE=TZ4[GetPlayerId(GetTriggerPlayer())]
if GetUnitTypeId(Y7[GetPlayerId(GetTriggerPlayer())])=='N01A' and DSE>0 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,GetObjectName('n0HM')+" "+I2S(DSE))
endif
return false
endfunction
function B88 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function DME))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function DQE))
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[1],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-st",true)
call TriggerAddCondition(t,Condition(function DRE))
set t=null
endfunction
function DTE takes nothing returns boolean
local real d
if GetUnitAbilityLevel(GetTriggerUnit(),'B05X')>0 and GetUnitAbilityLevel(GetEventDamageSource(),'A0LZ')>0 and LUnit(GetHandleId(GetTriggeringTrigger()),"Source")==GetEventDamageSource()then
call UnitRemoveAbility(GetTriggerUnit(),'B05X')
set d=(.15+.15*I2R(GetUnitAbilityLevel(GetEventDamageSource(),'A0LZ')))*GetHeroInt(GetEventDamageSource(),true)
call QM8("+"+I2S(R2I(d)),1,GetTriggerUnit(),.023,3,216,216,216)
call DisableTrigger(GetTriggeringTrigger())
call Dmg(GetEventDamageSource(),GetTriggerUnit(),HeroMagic,d)
call LT7(GetHandleId(GetTriggeringTrigger()))
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function DUE takes nothing returns nothing
local trigger t
local unit X77
local unit Z77
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
set X77=GetSpellTargetUnit()
set Z77=GetTriggerUnit()
else
set X77=GetTriggerUnit()
set Z77=GetAttacker()
endif
if IsUnitIllusion(Z77)==false then
set t=CreateTrigger()
call SUnit(GetHandleId(t),"Source",Z77)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function DTE))
endif
set t=null
set X77=null
set Z77=null
endfunction
function ve takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if GetUnitAbilityLevel(GetAttacker(),'A0LZ')>0 and(LBool(GetHandleId(GetTriggeringTrigger()),"OrbOn")or(GZ[304+GetPlayerId(GetOwningPlayer(GetAttacker()))]))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==LUnit(GetHandleId(GetTriggeringTrigger()),"Hero")then
call DUE()
endif
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if(GetIssuedOrderId()==852255)then
call SBool(GetHandleId(GetTriggeringTrigger()),"OrbOn",true)
elseif(GetIssuedOrderId()==852256)then
call SBool(GetHandleId(GetTriggeringTrigger()),"OrbOn",false)
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='A0LZ'then
call DUE()
endif
return false
endfunction
function DVE takes unit AM7,boolean SY8 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function ve))
call SUnit(GetHandleId(t),"Hero",AM7)
if GetUnitPointValue(AM7)==500 then
set UV7[GetPlayerId(GetOwningPlayer(AM7))]=t
endif
set t=null
endfunction
function DWE takes nothing returns boolean
if GetLearnedSkill()=='A0LZ'and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A0LZ')==1 then
call DVE(GetTriggerUnit(),false)
endif
return false
endfunction
function B48 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function DWE))
set t=null
endfunction
function DXE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local unit X77=LUnit(W57,"Target")
local integer ML8=LInt(W57,"Level")
local integer C77=LInt(W57,"Count")
if GetTriggerEventId()!=EVENT_UNIT_DEATH and GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT and C77<(6)then
set C77=C77+1
call SInt(W57,"Count",C77)
call SetUnitState(X77,UNIT_STATE_MANA,GetUnitState(X77,UNIT_STATE_MANA)-8*ML8)
call Dmg(Z77,X77,NormalFire,5+15*ML8)
elseif C77>=(6)or GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()!='A12W' and GetSpellAbilityId()!='A0FO' and GetSpellAbilityId()!='A1MO' and GetSpellAbilityId()!='A1C0' and GetSpellAbilityId()!='A1ZI' and GetSpellAbilityId()!='A28Y' and XL8(GetSpellAbilityId())==false and(MY8(GetSpellAbilityId())or GetSpellAbilityId()=='A06K'))then
call DestroyEffect(LEff(W57,"FX"))
call UnitRemoveAbility(X77,'A1PS')
call UnitRemoveAbility(X77,'B0CQ')
call LT7(W57)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function DYE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetEnumUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A14L')
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call AddPermanentAbility(X77,'A1PS')
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function DXE))
call SUnit(W57,"Source",Z77)
call SUnit(W57,"Target",X77)
call SEff(W57,"FX",AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareTarget.mdl",X77,"overhead"))
call SInt(W57,"Level",ML8)
call SInt(W57,"Count",0)
call RW8(X77,StringHash("CurseOfTheSilent"),1,6,Z77,'A14L',false)
set Z77=null
set X77=null
set t=null
endfunction
function DZE takes nothing returns nothing
local group g
local integer ML8=GetUnitAbilityLevel(GetTriggerUnit(),'A14L')
if ML8>0 then
set g=OG8()
set H04=GetTriggerUnit()
set SD4=GetTriggerUnit()
call GroupEnumUnitsInRange(g,0,0,9999,Condition(function VO8))
call ForGroup(g,function DYE)
call OF8(g)
endif
set g=null
endfunction
function DAE takes nothing returns nothing
local group g=OG8()
local location l=GetSpellTargetLoc()
set H04=GetTriggerUnit()
set SD4=GetTriggerUnit()
call GroupEnumUnitsInRange(g,GetLocationX(l),GetLocationY(l),375,Condition(function VO8))
call ForGroup(g,function DYE)
call QH8("war3mapImported\\CotS.mdx",GetLocationX(l),GetLocationY(l),5)
call OF8(g)
call RemoveLocation(l)
set g=null
set l=null
endfunction
function DBE takes nothing returns boolean
if GetSpellAbilityId()=='A14L' then
call DAE()
endif
return false
endfunction
function A_8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function DBE))
set t=null
endfunction
function DCE takes nothing returns boolean
return GetSpellAbilityId()=='A0L3' or GetSpellAbilityId()=='A2QC'
endfunction
function D3E takes nothing returns boolean
call EA8(GetTriggeringTrigger())
call VolumeGroupReset()
return false
endfunction
function D6E takes nothing returns nothing
local location SD9=GetUnitLoc(GetTriggerUnit())
local trigger t=CreateTrigger()
local integer ML8=GetUnitAbilityLevel(GetTriggerUnit(),'A0L3')
if ML8==0 then
set ML8=1+GetUnitAbilityLevel(GetTriggerUnit(),'A2QC')
call DZE()
endif
call TriggerRegisterTimerEvent(t,ML8+2,false)
call TriggerAddCondition(t,Condition(function D3E))
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),SD9,bj_UNIT_FACING)
call ShowUnitHide(bj_lastCreatedUnit)
call UnitApplyTimedLifeBJ(5.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A0L2')
call SetUnitAbilityLevelSwapped('A0L2',bj_lastCreatedUnit,ML8)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,852592,SD9)
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(SD9)
set t=null
set SD9=null
endfunction
function B78 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function DCE))
call TriggerAddAction(t,function D6E)
set t=null
endfunction
function DLE takes nothing returns boolean
return GetLearnedSkill()=='A03U'
endfunction
function D1E takes nothing returns nothing
call SetPlayerTechResearchedSwap('R005',GetUnitAbilityLevelSwapped('A03U',GetTriggerUnit()),GetOwningPlayer(GetLearningUnit()))
call SetUnitAcquireRange(GetLearningUnit(),550+GetUnitAbilityLevel(GetLearningUnit(),'A03U')*100)
endfunction
function Pv takes nothing returns nothing
set dX=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(dX,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(dX,Condition(function DLE))
call TriggerAddAction(dX,function D1E)
endfunction
function D0E takes nothing returns nothing
if IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)==false then
call Dmg(FT,GetEnumUnit(),NormalFire,JT)
call IssueTargetOrderById(IT,852075,GetEnumUnit())
else
call Dmg(FT,GetEnumUnit(),NormalFire,JT/ 3)
call IssueTargetOrderById(IT,852075,GetEnumUnit())
endif
endfunction
function D5E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local unit AC7=LUnit(W57,"Caster")
local integer ML8=LInt(W57,"Level")
local real x=LReal(W57,"x")
local real y=LReal(W57,"y")
local group g=OG8()
local real d
local real a
local real x2
local real y2
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,400+25,Condition(function VP8))
set FT=Z77
set JT=ML8*12
set IT=AC7
call ForGroup(g,function D0E)
call OF8(g)
call DestroyEffect(LEff(W57,"FX0"))
call DestroyEffect(LEff(W57,"FX1"))
call DestroyEffect(LEff(W57,"FX2"))
call DestroyEffect(LEff(W57,"FX3"))
call DestroyEffect(LEff(W57,"FX4"))
call DestroyEffect(LEff(W57,"FX5"))
call DestroyEffect(LEff(W57,"FX6"))
call DestroyEffect(LEff(W57,"FX7"))
call DestroyEffect(LEff(W57,"FX8"))
if GetTriggerEvalCount(t)==9 then
call LT7(W57)
call EA8(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 SEff(W57,"FX0",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 SEff(W57,"FX1",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 SEff(W57,"FX2",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 SEff(W57,"FX3",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 SEff(W57,"FX4",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 SEff(W57,"FX5",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 SEff(W57,"FX6",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 SEff(W57,"FX7",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 SEff(W57,"FX8",AddSpecialEffect("Abilities\\Weapons\\FlyingMachine\\FlyingMachineImpact.mdl",x2,y2))
endif
set t=null
set Z77=null
set AC7=null
set g=null
return false
endfunction
function D2E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local integer TA8=GetUnitAbilityLevel(Z77,'A064')
local real x1=LReal(EC8,"x")
local real y1=LReal(EC8,"y")
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',x1,y1,0)
local real x2
local real y2
local real d
local real a
local integer i
call AddPermanentAbility(AC7,'A19F')
call SetUnitAbilityLevel(AC7,'A19F',TA8)
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 AC7=CreateUnit(GetOwningPlayer(Z77),'e00J',GetUnitX(Z77),GetUnitY(Z77),90)
call IssuePointOrderById(AC7,851984,x2,y2)
call UnitApplyTimedLife(AC7,'BTLF',.5)
set i=i+1
endloop
else
call LT7(EC8)
call EA8(t)
set t=CreateTrigger()
set EC8=GetHandleId(t)
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Caster",AC7)
call SReal(EC8,"x",(x1)*1.)
call SReal(EC8,"y",(y1)*1.)
call SInt(EC8,"Level",TA8)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function D5E))
call TriggerEvaluate(t)
endif
set Z77=null
set AC7=null
set t=null
return false
endfunction
function D_E takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
call S18(GetOwningPlayer(Z77),9.4,x,y,360)
call TriggerRegisterTimerEvent(t,.4,true)
call TriggerAddCondition(t,Condition(function D2E))
call SUnit(EC8,"Source",Z77)
call SReal(EC8,"x",(x)*1.)
call SReal(EC8,"y",(y)*1.)
call RemoveLocation(l)
set t=null
set Z77=null
set l=null
endfunction
function E4E takes nothing returns boolean
if GetSpellAbilityId()=='A064' then
call D_E()
endif
return false
endfunction
function B98 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function E4E))
call PU8('A19F')
set t=null
endfunction
function E7E takes nothing returns boolean
return GetLearnedSkill()=='A0MB'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function A00J_LoseEffect takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
if s==null then
call TriggerOff()
return
endif
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED and GetAttacker()==s then
call SReal(h,"r",time+4-GetUnitAbilityLevel(s,'A0MB'))
call UnitRemoveAbility(s,'A00J')
endif
if GetUnitAbilityLevel(s,'A00J')==0 and time>LReal(h,"r")then
call AddPermanentAbility(s,'A00J')
endif
set s=null
endfunction
function A00J_Reg takes unit s returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimer(t)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function A00J_LoseEffect))
call SUnit(GetHandleId(t),"s",s)
set t=null
endfunction
function E8E takes nothing returns nothing
if LBool(GetHandleId(GetTriggerUnit()),"A00J_Reg")==false then
call AddPermanentAbility(GetTriggerUnit(),'A00J')
call SBool(GetHandleId(GetTriggerUnit()),"A00J_Reg",true)
call A00J_Reg(GetTriggerUnit())
endif
endfunction
function Pw takes nothing returns nothing
set dY=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(dY,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(dY,Condition(function E7E))
call TriggerAddAction(dY,function E8E)
endfunction
function E9E takes nothing returns nothing
local unit Z77=GetAttacker()
local unit X77=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A0DZ')
local boolean EDE=LBool(GetHandleId(Z77),"Backstab|Free")
local real d=RAbsBJ(GetUnitFacing(X77)-GetUnitFacing(Z77))
if d>180 then
set d=360-d
endif
if d<='i' or EDE then
call SBool(GetHandleId(Z77),"Backstab|Free",false)
if GetUnitAbilityLevel(X77,'A04R')==0 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",X77,"chest"))
call Dmg(Z77,X77,HeroNormal,GetHeroAgi(Z77,true)*(.25*ML8+.25))
endif
endif
set Z77=null
set X77=null
endfunction
function EEE takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),'A0DZ')>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))==false or(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==false and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false))then
call E9E()
endif
return false
endfunction
function BE8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function EEE))
set t=null
endfunction
function EFE takes nothing returns nothing
local unit N28=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local unit oA=CreateUnit(GetOwningPlayer(N28),'e003',x,y,0)
local integer TA8=GetUnitAbilityLevel(N28,'A0RG')
local real vr=(83+17*TA8)*.01
call SetUnitVertexColor(oA,255,255,255,150)
call UnitApplyTimedLife(oA,'BTLF',6)
call SetUnitScale(oA,vr,vr,vr)
if IsTZPlayer(GetOwningPlayer(N28))then
call AddPermanentAbility(oA,'A019')
call SetUnitAbilityLevel(oA,'A019',TA8)
else
call AddPermanentAbility(oA,'A0E7')
call SetUnitAbilityLevel(oA,'A0E7',TA8)
endif
call IssuePointOrderById(oA,852473,x,y)
call RemoveLocation(l)
set N28=null
set l=null
set oA=null
endfunction
function EGE takes nothing returns boolean
if GetSpellAbilityId()=='A0RG' then
call EFE()
endif
return false
endfunction
function BF8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function EGE))
set t=null
endfunction
function EHE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer V37=GetHandleId(t)
if A87(LoadUnitHandle(R8,V37,'attk'))or GetTriggerEvalCount(t)>=11 then
call FlushChildHashtable(R8,V37)
call DestroyTrigger(t)
else
call IssueTargetOrderById(LoadUnitHandle(R8,V37,'attk'),851983,LoadUnitHandle(R8,V37,'targ'))
endif
set t=null
return false
endfunction
function EIE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local real P99=30*GetUnitAbilityLevel(Z77,'A0K9')
local trigger t
local integer EC8
local real x=GetUnitX(m5)-75*Cos(GetUnitFacing(m5)*bj_DEGTORAD)
local real y=GetUnitY(m5)-75*Sin(GetUnitFacing(m5)*bj_DEGTORAD)
local trigger EJE
local integer EKE
call SetUnitX(Z77,x)
call SetUnitY(Z77,y)
call SetUnitFacing(Z77,GetUnitFacing(m5))
call DestroyEffect(AddSpecialEffect("war3mapImported\\BlinkStrike.mdx",x,y))
if IsUnitEnemy(m5,GetOwningPlayer(Z77))then
call Dmg(Z77,m5,NormalFire,P99)
call SBool(GetHandleId(Z77),"Backstab|Free",true)
call IssueTargetOrderById(Z77,851983,m5)
if(GetPlayerController(GetOwningPlayer(Z77))!=MAP_CONTROL_USER)then
if AO7(700,Z77,Condition(function k6))<1 then
set EJE=CreateTrigger()
set EKE=GetHandleId(EJE)
call SaveUnitHandle(R8,EKE,'targ',m5)
call SaveUnitHandle(R8,EKE,'attk',Z77)
call TriggerAddCondition(EJE,Condition(function EHE))
call TriggerRegisterTimerEvent(EJE,.4,true)
set EJE=null
endif
call Y07(.3)
call IssueTargetOrderById(Z77,851983,m5)
endif
endif
set Z77=null
set m5=null
set t=null
endfunction
function EME takes nothing returns boolean
if GetSpellAbilityId()=='A0K9' then
call EIE()
endif
return false
endfunction
function ENE takes nothing returns boolean
if GetSpellAbilityId()=='A0K9' then
call DestroyEffect(AddSpecialEffect("war3mapImported\\BlinkStrike.mdx",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))
endif
return false
endfunction
function BG8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function EME))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function ENE))
set t=null
endfunction
function EOE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call SetUnitAnimationByIndex(Z77,8)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function EPE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SetUnitAnimationByIndex(Z77,7)
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerAddCondition(t,Condition(function EOE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=null
set Z77=null
endfunction
function EQE takes nothing returns boolean
if GetUnitTypeId(GetTriggerUnit())=='N0M0' then
call EPE()
endif
return false
endfunction
function H29 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function EQE))
set t=null
endfunction
function ERE takes nothing returns nothing
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\ChimaeraLightningMissile\\ChimaeraLightningMissile.mdl",GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit())))
call Dmg(SU4,GetEnumUnit(),NormalFire,SV4)
endfunction
function ESE takes nothing returns boolean
local trigger t2=GetTriggeringTrigger()
local integer WED=GetHandleId(t2)
local trigger t1=LTrig(WED,"t1")
local integer RM8=GetHandleId(t1)
local unit ETE=LUnit(WED,"Remnant")
local group g
local integer ML8=LInt(WED,"Level")
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call ShowUnit(ETE,false)
call KillUnit(ETE)
call LT7(RM8)
call EA8(t1)
call LT7(WED)
call EA8(t2)
elseif IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(ETE))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetTriggerUnit(),'A04R')==0 then
set g=OG8()
set H04=ETE
set SU4=ETE
set SV4='d'+40*ML8
call GroupEnumUnitsInRange(g,GetUnitX(ETE),GetUnitY(ETE),285,Condition(function UM8))
call ForGroup(g,function ERE)
call OF8(g)
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",GetUnitX(ETE),GetUnitY(ETE)))
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",GetUnitX(ETE),GetUnitY(ETE)))
call ShowUnit(ETE,false)
call KillUnit(ETE)
call LT7(RM8)
call EA8(t1)
call LT7(WED)
call EA8(t2)
endif
set t1=null
set t2=null
set ETE=null
set g=null
return false
endfunction
function EUE takes nothing returns boolean
local trigger t1=GetTriggeringTrigger()
local integer EVE=GetHandleId(t1)
local trigger t2
local integer QYD
local unit EWE
local integer TA8
local real x=LReal(EVE,"x")
local real y=LReal(EVE,"y")
local real EXE
local integer P89=GetTriggerEvalCount(t1)
if P89==1 then
call DestroyEffect(LEff(EVE,"FX1"))
elseif P89==2 then
call DestroyEffect(LEff(EVE,"FX2"))
set t2=CreateTrigger()
set QYD=GetHandleId(t2)
set TA8=LInt(EVE,"Level")
set EXE=LReal(EVE,"Facing")
set EWE=CreateUnit(GetOwningPlayer(LUnit(EVE,"Source")),'h07F',x,y,EXE)
call SetUnitVertexColor(EWE,255,255,255,'d')
call UnitApplyTimedLife(EWE,'BTLF',12)
call SUnit(EVE,"Remnant",EWE)
call SUnit(QYD,"Remnant",EWE)
call STrig(QYD,"t1",t1)
call SInt(QYD,"Level",TA8)
call TriggerRegisterUnitInRange(t2,EWE,235,Condition(function KF8))
call TriggerRegisterUnitEvent(t2,EWE,EVENT_UNIT_DEATH)
call TriggerAddCondition(t2,Condition(function ESE))
call DestroyEffect(AddSpecialEffectTarget("effects\\ManaFlareBoltImpact_NoSound.mdx",EWE,"origin"))
elseif P89>2 then
set EWE=LUnit(EVE,"Remnant")
call DestroyEffect(AddSpecialEffectTarget("effects\\ManaFlareBoltImpact_NoSound.mdx",EWE,"origin"))
endif
set t1=null
set t2=null
set EWE=null
return false
endfunction
function EYE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t1=CreateTrigger()
local integer EVE=GetHandleId(t1)
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
call TriggerRegisterTimerEvent(t1,.5,true)
call TriggerAddCondition(t1,Condition(function EUE))
call SReal(EVE,"x",(x)*1.)
call SReal(EVE,"y",(y)*1.)
call SInt(EVE,"Level",GetUnitAbilityLevel(Z77,'A14P'))
call SUnit(EVE,"Source",Z77)
call SReal(EVE,"Facing",GetUnitFacing(Z77)*1.)
call SEff(EVE,"FX1",AddSpecialEffect("Abilities\\Spells\\Orc\\LightningShield\\LightningShieldTarget.mdl",x,y))
call SEff(EVE,"FX2",AddSpecialEffect("effects\\Static_Remnant_FX.mdx",x,y))
set Z77=null
set t1=null
endfunction
function EZE takes nothing returns boolean
if GetSpellAbilityId()=='A14P' then
call EYE()
endif
return false
endfunction
function F79 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function EZE))
set t=null
endfunction
function EAE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local real RK=LReal(EC8,"Angle")
local real x=GetUnitX(m5)-5*Cos(RK)
local real y=GetUnitY(m5)-5*Sin(RK)
local integer TA8=LInt(EC8,"Level")
local real EBE=LReal(EC8,"x")
local real ECE=LReal(EC8,"y")
if((EBE-x)*(EBE-x))+((ECE-y)*(ECE-y))<'d' then
set x=EBE
set y=ECE
endif
call SetUnitX(m5,x)
call SetUnitY(m5,y)
if GetTriggerEvalCount(t)==(10+10*TA8)then
call LT7(EC8)
call EA8(t)
endif
set t=null
set m5=null
return false
endfunction
function E3E takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local unit oA=CreateUnit(GetOwningPlayer(Z77),'u00X',GetUnitX(Z77),GetUnitY(Z77),GetUnitFacing(Z77))
local integer TA8=GetUnitAbilityLevel(Z77,'A14R')
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function EAE))
call SUnit(EC8,"Target",m5)
call SReal(EC8,"Angle",Atan2(GetUnitY(m5)-GetUnitY(Z77),GetUnitX(m5)-GetUnitX(Z77)))
call SInt(EC8,"Level",TA8)
call SReal(EC8,"x",GetUnitX(Z77))
call SReal(EC8,"y",GetUnitY(Z77))
call AddPermanentAbility(oA,'A14Q')
call SetUnitAbilityLevel(oA,'A14Q',TA8)
call IssueTargetOrderById(oA,852480,m5)
if not KR8(GetOwningPlayer(Z77))then
call UnitApplyTimedLife(oA,'BTLF',.5+.5*TA8)
endif
set oA=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),GetUnitFacing(Z77))
call AddPermanentAbility(oA,'A14S')
call IssueTargetOrderById(oA,852075,Z77)
set Z77=null
set m5=null
set oA=null
set t=null
endfunction
function E6E takes nothing returns boolean
if GetSpellAbilityId()=='A14R' and GetUnitTypeId(GetSpellTargetUnit())!='n00L' and HasLinkin(GetSpellTargetUnit())==false then
call E3E()
endif
return false
endfunction
function F89 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function E6E))
set t=null
endfunction
function ELE takes nothing returns nothing
local unit oA=CreateUnit(GetOwningPlayer(FZ),'e00E',GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call AddPermanentAbility(oA,'A0S5')
call IssueTargetOrderById(oA,852075,GetEnumUnit())
call Dmg(FZ,GetEnumUnit(),NormalFire,gZ)
set oA=null
endfunction
function E1E takes unit Z77,unit m5 returns nothing
local integer EC8=GetHandleId(Z77)
local group g=OG8()
call DestroyEffect(LEff(EC8,"OverloadFX1"))
call DestroyEffect(LEff(EC8,"OverloadFX2"))
call EY8(Z77,"OverloadActive")
set H04=Z77
set FZ=Z77
set gZ=GetUnitAbilityLevel(Z77,'A0QW')*20+10
call GroupEnumUnitsInRange(g,GetUnitX(m5),GetUnitY(m5),300,Condition(function UM8))
call ForGroup(g,function ELE)
call OF8(g)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",GetUnitX(m5),GetUnitY(m5)))
set g=null
endfunction
function E0E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local unit Z77=LUnit(EC8,"Source")
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 and LState(Z77,"OverloadActive")then
call DisableTrigger(t)
call E1E(Z77,m5)
call LT7(EC8)
call EA8(t)
endif
else
call LT7(EC8)
call EA8(t)
endif
set t=null
set m5=null
set Z77=null
return false
endfunction
function E5E takes nothing returns nothing
local trigger t=CreateTrigger()
local unit m5=GetTriggerUnit()
local unit Z77=GetAttacker()
local integer EC8=GetHandleId(t)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerAddCondition(t,Condition(function E0E))
call SUnit(EC8,"Target",m5)
call SUnit(EC8,"Source",Z77)
set t=null
set m5=null
set Z77=null
endfunction
function E2E takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),'A0QW')>0 and LState(GetAttacker(),"OverloadActive")and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false then
call E5E()
endif
return false
endfunction
function E_E takes nothing returns nothing
local trigger t=CreateTrigger()
local unit Z77=GetTriggerUnit()
local integer EC8=GetHandleId(Z77)
local string fx=""
if IsUnitAlly(Z77,GetLocalPlayer())or N08(GetLocalPlayer())then
set fx="Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl"
endif
call SEff(EC8,"OverloadFX1",AddSpecialEffectTarget(fx,Z77,"right hand"))
call SEff(EC8,"OverloadFX2",AddSpecialEffectTarget(fx,Z77,"left hand"))
set t=null
set Z77=null
endfunction
function F4E takes nothing returns boolean
if((GetSpellAbilityId()=='A14O' or GetSpellAbilityId()=='A14P' or GetSpellAbilityId()=='A14R')or(GetUnitPointValue(GetTriggerUnit())==500)and MY8(GetSpellAbilityId()))and LState(GetTriggerUnit(),"OverloadActive")==false then
call EW8(GetTriggerUnit(),"OverloadActive")
call E_E()
endif
return false
endfunction
function F7E takes unit Z77,boolean SY8 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function F4E))
if GetUnitPointValue(Z77)==500 then
set UW7[GetPlayerId(GetOwningPlayer(Z77))]=t
endif
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function E2E))
if GetUnitPointValue(Z77)==500 then
set UA7[GetPlayerId(GetOwningPlayer(Z77))]=t
endif
set Z77=null
set t=null
endfunction
function F8E takes nothing returns boolean
if GetLearnedSkill()=='A0QW' and GetUnitAbilityLevel(GetTriggerUnit(),'A0QW')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call F7E(GetTriggerUnit(),false)
endif
return false
endfunction
function F99 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function F8E))
set t=null
endfunction
function F9E takes nothing returns nothing
if(LoadBoolean(R8,jZ,GetHandleId(GetEnumUnit()))==false)then
call SaveBoolean(R8,jZ,GetHandleId(GetEnumUnit()),true)
call Dmg(LZ,GetEnumUnit(),NormalFire,mZ*(JZ*4+4)/'d')
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl",GetEnumUnit(),"origin"))
endif
endfunction
function FDE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=LInt(EC8,"Level")
local unit oA=LUnit(EC8,"Caster")
local unit Z77=LUnit(EC8,"Source")
local unit FEE=LUnit(EC8,"Fake")
local integer u3=LInt(EC8,"Remaining")
local real hN=LReal(EC8,"x")
local real ho=LReal(EC8,"y")
local real u4=GetUnitX(Z77)
local real u5=GetUnitY(Z77)
local real RK=Atan2(ho-u5,hN-u4)
local real Il=u4+(25+25*TA8)*Cos(RK)
local real IL=u5+(25+25*TA8)*Sin(RK)
local lightning GKD=EI8(EC8,"Light")
local real FFE=LReal(EC8,"lx")
local real FGE=LReal(EC8,"ly")
local real NN9=GetUnitState(Z77,UNIT_STATE_MANA)
local real FHE=(25+25*TA8)*(10+.01*GetUnitState(Z77,UNIT_STATE_MAX_MANA))/'d'
local group g=OG8()
local real FIE=LReal(EC8,"Traveled")
set FIE=FIE+25+25*TA8
call SReal(EC8,"Traveled",FIE)
if GetTriggerEvalCount(t)>25 then
set FFE=FFE+(25+25*TA8)*Cos(RK)
set FGE=FGE+(25+25*TA8)*Sin(RK)
call SReal(EC8,"lx",FFE)
call SReal(EC8,"ly",FGE)
endif
call SetUnitState(Z77,UNIT_STATE_MANA,RMaxBJ(NN9-FHE,0))
call MoveLightning(GKD,true,FFE,FGE,Il,IL)
call SetUnitX(Z77,Il)
call SetUnitY(Z77,IL)
call SetUnitPosition(oA,Il,IL)
call SetUnitPosition(FEE,Il,IL)
set H04=Z77
set LZ=Z77
set jZ=EC8
set JZ=TA8
set mZ=FIE
call GroupEnumUnitsInRange(g,Il,IL,75+75*TA8,Condition(function UM8))
call ForGroup(g,function F9E)
call OF8(g)
set u3=u3-1
call SInt(EC8,"Remaining",u3)
call SetUnitVertexColor(Z77,255,255,255,0)
if u3==0 or GetUnitState(Z77,UNIT_STATE_MANA)<1 then
call DestroyLightning(GKD)
call KillTrees(Il,IL,75)
call DestroyEffect(LEff(EC8,"FX"))
call RemoveUnit(oA)
call RemoveUnit(FEE)
call SetUnitVertexColor(Z77,255,255,255,255)
call SetUnitPathing(Z77,true)
call SetUnitInvulnerable(Z77,false)
call LT7(EC8)
call EA8(t)
else
call KillTrees(Il,IL,75)
endif
set t=null
set oA=null
set Z77=null
set GKD=null
set g=null
set FEE=null
return false
endfunction
function FJE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real iN=GetUnitX(Z77)
local real io=GetUnitY(Z77)
local unit oA
local unit FEE
local location l
local real x
local real y
local trigger t
local integer EC8
local lightning GKD
local integer TA8=GetUnitAbilityLevel(Z77,'A14O')
local real NN9=GetUnitState(Z77,UNIT_STATE_MANA)
local real FHE=15+.07*GetUnitState(Z77,UNIT_STATE_MAX_MANA)
call SetUnitState(Z77,UNIT_STATE_MANA,RMaxBJ(NN9-FHE,0))
if GetUnitState(Z77,UNIT_STATE_MANA)>10 then
set t=CreateTrigger()
set EC8=GetHandleId(t)
set oA=CreateUnit(GetOwningPlayer(Z77),'o010',iN,io,0)
set FEE=CreateUnit(GetOwningPlayer(Z77),'H07G',iN,io,0)
set GKD=AddLightning("FORK",true,iN,io,iN,io)
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(Z77,255,255,255,0)
call SetUnitVertexColor(FEE,255,255,255,0)
call SetUnitPathing(Z77,false)
call SetUnitPathing(oA,false)
call SetUnitInvulnerable(Z77,true)
call SUnit(EC8,"Caster",oA)
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Fake",FEE)
call DX8(EC8,"Light",GKD)
call SInt(EC8,"Level",TA8)
call SReal(EC8,"x",x)
call SReal(EC8,"y",y)
call SReal(EC8,"lx",iN)
call SReal(EC8,"ly",io)
call SReal(EC8,"Traveled",0)
call SInt(EC8,"Remaining",P38(R2I(SquareRoot((x-iN)*(x-iN)+(y-io)*(y-io))/(25+25*TA8)),1))
call SEff(EC8,"FX",AddSpecialEffectTarget("effects\\Lightning_Ball_Tail_FX.mdx",FEE,"origin"))
call TriggerRegisterTimerEvent(t,.04,true)
call TriggerAddCondition(t,Condition(function FDE))
call ShowUnit(Z77,false)
call ShowUnit(Z77,true)
call SelectUnitAddForPlayer(Z77,GetOwningPlayer(Z77))
endif
set Z77=null
set oA=null
set FEE=null
set l=null
set t=null
set GKD=null
endfunction
function FKE takes nothing returns boolean
if GetSpellAbilityId()=='A14O' then
call FJE()
endif
return false
endfunction
function FME takes nothing returns boolean
if GetSpellAbilityId()=='A14O' then
if GetUnitState(GetTriggerUnit(),UNIT_STATE_MANA)<(15+.07*GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_MANA))then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n0G8'))
endif
endif
return false
endfunction
function FD9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function FKE))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function FME))
set t=null
endfunction
function FNE 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 FOE takes nothing returns boolean
if GetUnitTypeId(GetTriggerUnit())=='H00S' then
call FNE()
endif
return false
endfunction
function FE9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function FOE))
set t=null
endfunction
function FPE takes nothing returns nothing
local integer EC8=GetHandleId(GetOwningPlayer(GetTriggerUnit()))
local unit FQE=LUnit(EC8,"BearItemHolder")
local unit FRE=LUnit(EC8,"MyBear")
if FQE!=null and T4==false and SC4==false then
call UnitAddItem(FRE,UnitRemoveItemFromSlot(FQE,0))
call UnitAddItem(FRE,UnitRemoveItemFromSlot(FQE,1))
call UnitAddItem(FRE,UnitRemoveItemFromSlot(FQE,2))
call UnitAddItem(FRE,UnitRemoveItemFromSlot(FQE,3))
call UnitAddItem(FRE,UnitRemoveItemFromSlot(FQE,4))
call UnitAddItem(FRE,UnitRemoveItemFromSlot(FQE,5))
endif
set FQE=null
set FRE=null
endfunction
function FSE takes nothing returns boolean
return GetSpellAbilityId()=='A0A5'
endfunction
function FTE takes nothing returns boolean
if O18(GetFilterUnit())then
return false
endif
if((GetUnitTypeId(GetFilterUnit())=='n01G'))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())=='n01C'))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())=='n018'))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())=='n004'))then
return true
endif
return false
endfunction
function FUE takes nothing returns nothing
local unit O4D=GetTriggerUnit()
local player E5D=GetOwningPlayer(O4D)
local location SD9=GetUnitLoc(O4D)
local boolexpr QZ9=Condition(function FTE)
local group QA9=OG8()
local integer ML8=GetUnitAbilityLevel(O4D,'A0A5')
local integer W57=GetHandleId(E5D)
local boolean FVE
local unit T59
call GroupEnumUnitsOfPlayer(QA9,GetOwningPlayer(O4D),QZ9)
if CountUnitsInGroup(QA9)!=0 then
set T59=FirstOfGroup(QA9)
if T59!=null and LState(T59,"4327")then
call ZN7(O4D)
call ShowWarningToPlayer(E5D,GetObjectName('n0MN'))
endif
endif
call OF8(QA9)
call RemoveLocation(SD9)
call DestroyBoolExpr(QZ9)
set O4D=null
set E5D=null
set QA9=null
set QZ9=null
set SD9=null
endfunction
function FWE takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='n01G')or(GetUnitTypeId(GetFilterUnit())=='n01C')or(GetUnitTypeId(GetFilterUnit())=='n018')or(GetUnitTypeId(GetFilterUnit())=='n004')
endfunction
function FXE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit FRE
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
local integer TA8=GetUnitAbilityLevel(Z77,GetSpellAbilityId())
local group g=OG8()
call GroupEnumUnitsOfPlayer(g,GetOwningPlayer(Z77),Condition(function FWE))
set FRE=FirstOfGroup(g)
call OF8(g)
if GetSpellAbilityId()=='A1EF' then
call AddPermanentAbility(AC7,'A0AA')
call SetUnitAbilityLevel(AC7,'A0AA',TA8)
elseif GetSpellAbilityId()=='A1EE' then
call AddPermanentAbility(AC7,'A0AB')
call SetUnitAbilityLevel(AC7,'A0AB',TA8)
elseif GetSpellAbilityId()=='A1EH' then
call AddPermanentAbility(AC7,'A0AC')
call SetUnitAbilityLevel(AC7,'A0AC',TA8)
elseif GetSpellAbilityId()=='A1EI' then
call AddPermanentAbility(AC7,'A0AD')
call SetUnitAbilityLevel(AC7,'A0AD',TA8)
elseif GetSpellAbilityId()=='A1EG' then
call AddPermanentAbility(AC7,'A0AE')
call SetUnitAbilityLevel(AC7,'A0AE',TA8)
endif
call IssueTargetOrderById(AC7,852101,Z77)
if FRE!=null and O18(FRE)==false then
call IssueTargetOrderById(AC7,852101,FRE)
endif
call KillUnit(AC7)
set g=null
set Z77=null
set FRE=null
set AC7=null
endfunction
function FYE takes nothing returns boolean
if GetSpellAbilityId()=='A1EF' or GetSpellAbilityId()=='A1EE' or GetSpellAbilityId()=='A1EH' or GetSpellAbilityId()=='A1EI' or GetSpellAbilityId()=='A1EG' then
call FXE()
endif
return false
endfunction
function BH8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function FYE))
set t=null
endfunction
function FZE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit T59=(LoadUnitHandle(R8,(W57),(2)))
local real FAE
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamage()>2 and GetEventDamageSource()!=GetTriggerUnit()and IsPlayer(GetOwningPlayer(GetEventDamageSource()))then
call SaveReal(R8,(W57),(714),(((TimerGetElapsed(E4)))*1.))
endif
endif
set FAE=(LoadReal(R8,(W57),(714)))
if FAE+3<(TimerGetElapsed(E4))then
if(LoadInteger(R8,(W57),(34)))==2 then
call SaveInteger(R8,(W57),(34),(1))
call EY8(T59,"4327")
call SetPlayerAbilityAvailable(GetOwningPlayer(T59),'A0A7',true)
endif
else
if(LoadInteger(R8,(W57),(34)))==1 then
call SaveInteger(R8,(W57),(34),(2))
call EW8(T59,"4327")
call SetPlayerAbilityAvailable(GetOwningPlayer(T59),'A0A7',false)
endif
endif
set t=null
set T59=null
return false
endfunction
function FBE takes unit T59 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.2,true)
call TriggerRegisterUnitEvent(t,T59,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,T59,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function FZE))
call SaveUnitHandle(R8,(W57),(2),(T59))
call SaveReal(R8,(W57),(714),((0)*1.))
call SaveInteger(R8,(W57),(34),(1))
call SetPlayerAbilityAvailable(GetOwningPlayer(T59),'A0A7',true)
set t=null
endfunction
function FCE takes nothing returns nothing
local unit O4D=GetTriggerUnit()
local player E5D=GetOwningPlayer(O4D)
local location SD9=GetUnitLoc(O4D)
local boolexpr QZ9=Condition(function FTE)
local group QA9=OG8()
local integer ML8=GetUnitAbilityLevel(O4D,'A0A5')
local integer W57=GetHandleId(E5D)
local boolean FVE
local unit T59
call GroupEnumUnitsOfPlayer(QA9,GetOwningPlayer(O4D),QZ9)
set FVE=CountUnitsInGroup(QA9)==0
if(ML8==1 and FVE)then
call CreateNUnitsAtLoc(1,'n004',GetOwningPlayer(GetTriggerUnit()),SD9,bj_UNIT_FACING)
call SUnit(W57,"MyBear",bj_lastCreatedUnit)
call FPE()
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
call FBE(bj_lastCreatedUnit)
elseif(ML8==2 and FVE)then
call CreateNUnitsAtLoc(1,'n018',GetOwningPlayer(GetTriggerUnit()),SD9,bj_UNIT_FACING)
call SUnit(W57,"MyBear",bj_lastCreatedUnit)
call FPE()
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
call FBE(bj_lastCreatedUnit)
elseif(ML8==3 and FVE)then
call CreateNUnitsAtLoc(1,'n01C',GetOwningPlayer(GetTriggerUnit()),SD9,bj_UNIT_FACING)
call SUnit(W57,"MyBear",bj_lastCreatedUnit)
call FPE()
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
call FBE(bj_lastCreatedUnit)
elseif(ML8==4 and FVE)then
call CreateNUnitsAtLoc(1,'n01G',GetOwningPlayer(GetTriggerUnit()),SD9,bj_UNIT_FACING)
call SUnit(W57,"MyBear",bj_lastCreatedUnit)
call FPE()
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
call FBE(bj_lastCreatedUnit)
elseif FVE==false then
set T59=FirstOfGroup(QA9)
call AddSpecialEffectTargetUnitBJ("chest",T59,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
call SetUnitState(T59,UNIT_STATE_LIFE,GetUnitState(T59,UNIT_STATE_MAX_LIFE))
call SetUnitPosition(T59,GetUnitX(O4D),GetUnitY(O4D))
set T59=null
endif
call SetUnitAbilityLevel(bj_lastCreatedUnit,'A09Y',ML8)
call OF8(QA9)
call RemoveLocation(SD9)
call DestroyBoolExpr(QZ9)
set QZ9=null
set O4D=null
set E5D=null
set SD9=null
set QA9=null
set T59=null
endfunction
function BJ8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function FSE))
call TriggerAddAction(t,function FCE)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function FSE))
call TriggerAddAction(t,function FUE)
set t=null
endfunction
function F3E takes nothing returns boolean
return(IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and GetUnitAbilityLevel(GetFilterUnit(),'B0C1')>0
endfunction
function F6E takes nothing returns nothing
call Dmg(D2,GetEnumUnit(),HeroNormal,30)
endfunction
function FLE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit F1E=LUnit(EC8,"Bear")
local group g=OG8()
set H04=F1E
set D2=F1E
call GroupEnumUnitsInRange(g,GetUnitX(F1E),GetUnitY(F1E),2000,Condition(function F3E))
call ForGroup(g,function F6E)
call OF8(g)
set t=null
set g=null
set F1E=null
return false
endfunction
function F0E takes nothing returns nothing
local unit F1E=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function FLE))
call SUnit(EC8,"Bear",F1E)
set F1E=null
set t=null
endfunction
function VF takes nothing returns boolean
return GetLearnedSkill()=='A0A5'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Vg takes nothing returns boolean
if O18(GetFilterUnit())then
return false
endif
if((GetUnitTypeId(GetFilterUnit())=='n01C'))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())=='n018'))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())=='n004'))then
return true
endif
return false
endfunction
function F5E takes nothing returns nothing
local unit N28=GetTriggerUnit()
local player j8=GetOwningPlayer(N28)
local location SD9=GetUnitLoc(N28)
local boolexpr hP=Condition(function Vg)
local group XS8=OG8()
local integer ML8=GetUnitAbilityLevel(N28,'A0A5')
local integer W57=GetHandleId(j8)
local integer Vh
local unit T59
local real WTD
call GroupEnumUnitsOfPlayer(XS8,GetOwningPlayer(N28),hP)
call DestroyBoolExpr(hP)
if(ML8==1)then
call F0E()
endif
set Vh=CountUnitsInGroup(XS8)
if(Vh==1)then
set T59=FirstOfGroup(XS8)
set WTD=GetUnitLifePercent(T59)
set SD9=GetUnitLoc(T59)
call ShowUnit(T59,false)
call KillUnit(T59)
if(ML8==2)then
call CreateNUnitsAtLoc(1,'n018',GetOwningPlayer(GetTriggerUnit()),SD9,bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
call FBE(bj_lastCreatedUnit)
elseif(ML8==3)then
call CreateNUnitsAtLoc(1,'n01C',GetOwningPlayer(GetTriggerUnit()),SD9,bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
call FBE(bj_lastCreatedUnit)
elseif(ML8==4)then
call CreateNUnitsAtLoc(1,'n01G',GetOwningPlayer(GetTriggerUnit()),SD9,bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
call FBE(bj_lastCreatedUnit)
endif
call SetUnitLifePercentBJ(bj_lastCreatedUnit,WTD)
call SUnit(W57,"MyBear",bj_lastCreatedUnit)
call FPE()
endif
call OF8(XS8)
set N28=null
set j8=null
set SD9=null
set hP=null
set XS8=null
set T59=null
endfunction
function BM8 takes nothing returns nothing
set dZ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(dZ,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(dZ,Condition(function VF))
call TriggerAddAction(dZ,function F5E)
endfunction
function F2E takes nothing returns boolean
return GetUnitTypeId(GetAttacker())=='n01G'or GetUnitTypeId(GetAttacker())=='n01C'or GetUnitTypeId(GetAttacker())=='n018'or GetUnitTypeId(GetAttacker())=='n004'
endfunction
function F_E takes nothing returns nothing
local unit VD=GetAttacker()
local unit VI=Y7[GetPlayerId(GetOwningPlayer(VD))]
if((GetUnitX(VI)-GetUnitX(VD))*(GetUnitX(VI)-GetUnitX(VD))+(GetUnitY(VI)-GetUnitY(VD))*(GetUnitY(VI)-GetUnitY(VD))>=(1210000))then
call IssueImmediateOrderById(VD,851972)
elseif(GetPlayerController(GetOwningPlayer(GetAttacker()))==MAP_CONTROL_COMPUTER)then
if((GetHeroLevel(VI)<12)and(not IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(not IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)>150.)and((GetOwningPlayer(GetTriggerUnit())==G8[0])or(GetOwningPlayer(GetTriggerUnit())==N8[0]))and(eY[GetPlayerId(GetOwningPlayer(GetAttacker()))]==1)and(Bz>hq[240+GetPlayerId(GetOwningPlayer(GetAttacker()))]))then
call TriggerSleepAction(.1)
call D48(GetAttacker(),851986,h9[GetPlayerId(GetOwningPlayer(GetAttacker()))])
endif
endif
set VD=null
set VI=null
endfunction
function BI8 takes nothing returns nothing
set d0=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(d0,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(d0,Condition(function F2E))
call TriggerAddAction(d0,function F_E)
endfunction
function G4E takes nothing returns boolean
return GetSpellAbilityId()=='A0A7'
endfunction
function G7E takes nothing returns nothing
local unit VD=GetTriggerUnit()
local unit VI=Y7[GetPlayerId(GetOwningPlayer(VD))]
call SetUnitX(VD,GetUnitX(VI)+GetRandomReal(25,50)*Cos(GetRandomReal(0,360)))
call SetUnitY(VD,GetUnitY(VI)+GetRandomReal(25,50)*Sin(GetRandomReal(0,360)))
set VD=null
set VI=null
endfunction
function BK8 takes nothing returns nothing
set HV4=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(HV4,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(HV4,Condition(function G4E))
call TriggerAddAction(HV4,function G7E)
endfunction
function G8E takes nothing returns boolean
return GetLearnedSkill()=='A0A8'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function G9E takes nothing returns nothing
call SetPlayerTechResearched(GetOwningPlayer(GetTriggerUnit()),'R000',GetPlayerTechCount(GetOwningPlayer(GetTriggerUnit()),'R000',true)+1)
call SetPlayerTechResearched(GetOwningPlayer(GetTriggerUnit()),'R001',GetPlayerTechCount(GetOwningPlayer(GetTriggerUnit()),'R001',true)+1)
endfunction
function qb takes nothing returns nothing
set HW4=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(HW4,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(HW4,Condition(function G8E))
call TriggerAddAction(HW4,function G9E)
endfunction
function GDE takes item ZV7 returns boolean
return ZU7(ZV7)==J0 or ZU7(ZV7)==N0 or ZU7(ZV7)==zhenshibaoshi or ZU7(ZV7)==OW
endfunction
function GEE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='n01G' or GetUnitTypeId(GetTriggerUnit())=='n01C' or GetUnitTypeId(GetTriggerUnit())=='n018' or GetUnitTypeId(GetTriggerUnit())=='n004')and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function GFE takes nothing returns nothing
local location GGE
if IsJWPlayer(GetOwningPlayer(GetTriggerUnit()))then
set GGE=GetRectCenter(QD)
else
set GGE=GetRectCenter(PD)
endif
if GDE(GetEnumItem())==false then
call SetItemPositionLoc(GetEnumItem(),GGE)
endif
call RemoveLocation(GGE)
set GGE=null
endfunction
function GHE takes nothing returns nothing
local integer EC8=GetHandleId(GetOwningPlayer(GetTriggerUnit()))
local unit m7=LUnit(EC8,"BearItemHolder")
local unit VD=LUnit(EC8,"MyBear")
local integer x
local integer y
if m7==null then
if IsJWPlayer(GetOwningPlayer(VD))then
set x=-6390
set y=-5615
else
set x=5875
set y=5000
endif
set m7=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'e01F',x,y,0)
call SUnit(EC8,"BearItemHolder",m7)
endif
if GDE(GetEnumItem())==false then
call UnitAddItem(m7,GetEnumItem())
endif
call ShowUnit(m7,true)
set m7=null
set VD=null
endfunction
function VL takes nothing returns nothing
local integer TS9=ZU7(GetEnumItem())
if GetWidgetLife(GetEnumItem())>0 and TS9!=F1 then
if T4 or SC4 then
call GFE()
else
call GHE()
endif
endif
endfunction
function GIE takes nothing returns nothing
local location Mk=GetUnitLoc(GetTriggerUnit())
local rect GJE=RectFromCenterSizeBJ(Mk,400.,400.)
local unit VI=Y7[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]
call SetHeroXP(VI,(GetHeroXP(VI)-(GetHeroXP(VI)/('}'-(25*GetUnitAbilityLevel(VI,'A0A5'))))),false)
call UnitDamageTargetBJ(GetKillingUnit(),VI,(100.*I2R(GetUnitAbilityLevel(VI,'A0A5'))),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
call EnumItemsInRectBJ(GJE,function VL)
call RemoveLocation(Mk)
call RemoveRect(GJE)
set Mk=null
set VI=null
set GJE=null
endfunction
function qB takes nothing returns nothing
set d3=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(d3,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(d3,Condition(function GEE))
call TriggerAddAction(d3,function GIE)
endfunction
function GKE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='N013'or GetUnitTypeId(GetTriggerUnit())=='N01O'or GetUnitTypeId(GetTriggerUnit())=='N015'or GetUnitTypeId(GetTriggerUnit())=='N014')and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function GME takes nothing returns nothing
local unit VD=LUnit(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"MyBear")
call KillUnit(VD)
set VD=null
endfunction
function qc takes nothing returns nothing
set d4=CreateTrigger()
call ky(d4,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(d4,Condition(function GKE))
call TriggerAddAction(d4,function GME)
endfunction
function GNE takes nothing returns boolean
return(GetLearnedSkill()=='A0AK' or GetLearnedSkill()=='A1FY')and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function GOE takes nothing returns nothing
if(GetUnitAbilityLevel(GetTriggerUnit(),'A0AK')==1 or GetUnitAbilityLevel(GetTriggerUnit(),'A1FY')==1)then
call AddPermanentAbility(GetTriggerUnit(),'A1WF')
endif
endfunction
function qC takes nothing returns nothing
set d5=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(d5,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(d5,Condition(function GNE))
call TriggerAddAction(d5,function GOE)
endfunction
function GPE takes nothing returns boolean
if(GetSpellAbilityId()=='A0AM' or GetSpellAbilityId()=='A0A3' or GetSpellAbilityId()=='A0A4' or GetSpellAbilityId()=='A02T' or GetSpellAbilityId()=='A1FZ' or GetSpellAbilityId()=='A1WF')then
return true
elseif GetSpellAbilityId()=='A0AK' or GetSpellAbilityId()=='A1FY' then
if GetUnitAbilityLevel(GetTriggerUnit(),'A1WF')==0 then
call AddPermanentAbility(GetTriggerUnit(),'A1WF')
endif
endif
return false
endfunction
function GQE takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0))
endfunction
function GRE takes nothing returns nothing
call IssueImmediateOrderById(GetEnumUnit(),852556)
endfunction
function Vq takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),300.,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)
endfunction
function VQ takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),450.,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)
endfunction
function Vr takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),600.,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)
endfunction
function GSE takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),750.,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)
endfunction
function GTE takes nothing returns boolean
return GetOwningPlayer(GetFilterUnit())==YN4 and GetUnitTypeId(GetFilterUnit())==YM4 and O18(GetFilterUnit())==false
endfunction
function GUE takes player p,integer MB8,real x,real y returns nothing
local group g=OG8()
set YN4=p
set YM4=MB8
call GroupEnumUnitsInRange(g,x,y,716,Condition(function GTE))
call ForGroup(g,function GRE)
call OF8(g)
set g=null
endfunction
function GVE takes nothing returns nothing
local real x=GetUnitX(GetTriggerUnit())
local real y=GetUnitY(GetTriggerUnit())
local group XS8
call DisableTrigger(HX4)
set V0=true
if(GetSpellAbilityId()=='A0AM')then
call QH8("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)
call S18(GetOwningPlayer(GetTriggerUnit()),3,x,y,500)
set XS8=OG8()
call GroupEnumUnitsInRange(XS8,x,y,425,Condition(function GQE))
call ForGroup(XS8,function Vq)
call RemoveUnit(GetTriggerUnit())
call OF8(XS8)
elseif(GetSpellAbilityId()=='A0A3')then
call QH8("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)
call S18(GetOwningPlayer(GetTriggerUnit()),3,x,y,500)
set XS8=OG8()
call GroupEnumUnitsInRange(XS8,x,y,435,Condition(function GQE))
call ForGroup(XS8,function VQ)
call RemoveUnit(GetTriggerUnit())
call OF8(XS8)
elseif(GetSpellAbilityId()=='A0A4')then
call QH8("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)
call S18(GetOwningPlayer(GetTriggerUnit()),3,x,y,500)
set XS8=OG8()
call GroupEnumUnitsInRange(XS8,x,y,450,Condition(function GQE))
call ForGroup(XS8,function Vr)
call RemoveUnit(GetTriggerUnit())
call OF8(XS8)
elseif(GetSpellAbilityId()=='A1FZ')then
call QH8("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)
call S18(GetOwningPlayer(GetTriggerUnit()),3,x,y,500)
set XS8=OG8()
call GroupEnumUnitsInRange(XS8,x,y,450,Condition(function GQE))
call ForGroup(XS8,function GSE)
call RemoveUnit(GetTriggerUnit())
call OF8(XS8)
elseif(GetSpellAbilityId()=='A02T')then
set XS8=WR7(GetOwningPlayer(GetTriggerUnit()),'o018')
call ForGroup(XS8,function GRE)
call DestroyGroup(XS8)
set XS8=WR7(GetOwningPlayer(GetTriggerUnit()),'o002')
call ForGroup(XS8,function GRE)
call DestroyGroup(XS8)
set XS8=WR7(GetOwningPlayer(GetTriggerUnit()),'o00B')
call ForGroup(XS8,function GRE)
call DestroyGroup(XS8)
set XS8=WR7(GetOwningPlayer(GetTriggerUnit()),'o01B')
call ForGroup(XS8,function GRE)
call DestroyGroup(XS8)
endif
if(GetSpellAbilityId()=='A1WF')then
set x=GetSpellTargetX()
set y=GetSpellTargetY()
call GUE(GetOwningPlayer(GetTriggerUnit()),'o018',x,y)
call GUE(GetOwningPlayer(GetTriggerUnit()),'o002',x,y)
call GUE(GetOwningPlayer(GetTriggerUnit()),'o00B',x,y)
call GUE(GetOwningPlayer(GetTriggerUnit()),'o01B',x,y)
endif
set V0=false
call EnableTrigger(HX4)
set XS8=null
endfunction
function GWE takes nothing returns nothing
local integer id=GetUnitTypeId(GetTriggerUnit())
local real x=GetUnitX(GetTriggerUnit())
local real y=GetUnitY(GetTriggerUnit())
local group XS8
if id=='o018' then
call QH8("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)
set XS8=OG8()
call GroupEnumUnitsInRange(XS8,x,y,425,Condition(function GQE))
call ForGroup(XS8,function Vq)
call OF8(XS8)
endif
if id=='o002' then
call QH8("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)
set XS8=OG8()
call GroupEnumUnitsInRange(XS8,x,y,435,Condition(function GQE))
call ForGroup(XS8,function VQ)
call OF8(XS8)
endif
if id=='o00B' then
call QH8("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)
set XS8=OG8()
call GroupEnumUnitsInRange(XS8,x,y,450,Condition(function GQE))
call ForGroup(XS8,function Vr)
call OF8(XS8)
endif
if id=='o01B' then
call QH8("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)
set XS8=OG8()
call GroupEnumUnitsInRange(XS8,x,y,450,Condition(function GQE))
call ForGroup(XS8,function GSE)
call OF8(XS8)
endif
set XS8=null
endfunction
function GXE takes nothing returns boolean
local integer id=GetUnitTypeId(GetTriggerUnit())
if id=='o018' or id=='o002' or id=='o00B' or id=='o01B' then
call GWE()
endif
return false
endfunction
function qD takes nothing returns nothing
local trigger t=CreateTrigger()
call GOD("Units\\Creeps\\GoblinSapper\\GoblinSapperYesAttack1.wav")
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddAction(t,function GVE)
call TriggerAddCondition(t,Condition(function GPE))
set HX4=CreateTrigger()
call TriggerRegisterAllPlayersEvent(HX4,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(HX4,Condition(function GXE))
set t=null
endfunction
function GYE takes nothing returns boolean
if((GetUnitTypeId(GetTriggerUnit())=='n00O'))then
return true
endif
if((GetUnitTypeId(GetTriggerUnit())=='n00P'))then
return true
endif
if((GetUnitTypeId(GetTriggerUnit())=='n00Q'))then
return true
endif
if((GetUnitTypeId(GetTriggerUnit())=='n00N'))then
return true
endif
if GetUnitTypeId(GetTriggerUnit())=='o018' or GetUnitTypeId(GetTriggerUnit())=='o002' or GetUnitTypeId(GetTriggerUnit())=='o00B' or GetUnitTypeId(GetTriggerUnit())=='o01B' then
if Ab[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]then
endif
endif
return false
endfunction
function GZE takes nothing returns boolean
return((GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit()))and((GetUnitTypeId(GetFilterUnit())=='n00O')or(GetUnitTypeId(GetFilterUnit())=='n00P')or(GetUnitTypeId(GetFilterUnit())=='n00Q')or(GetUnitTypeId(GetFilterUnit())=='n00N')))
endfunction
function GAE takes rect r,boolexpr GBE returns group
set CB=OG8()
call GroupEnumUnitsInRect(CB,r,GBE)
call DestroyBoolExpr(GBE)
return CB
endfunction
function GCE takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='H00E' or GetUnitTypeId(GetFilterUnit())=='H00G' or GetUnitTypeId(GetFilterUnit())=='H00F' or GetUnitTypeId(GetFilterUnit())=='E00P' or GetUnitTypeId(GetFilterUnit())=='N00B' or GetUnitTypeId(GetFilterUnit())=='UC60' or GetUnitTypeId(GetFilterUnit())=='EC77' or GetUnitTypeId(GetFilterUnit())=='U00P' or GetUnitTypeId(GetFilterUnit())=='E02N' or GetUnitTypeId(GetFilterUnit())=='E02O' or GetUnitTypeId(GetFilterUnit())=='O016' or GetUnitTypeId(GetFilterUnit())=='O017' or GetUnitTypeId(GetFilterUnit())=='E02F' or GetUnitTypeId(GetFilterUnit())=='H0DO' or GetUnitTypeId(GetFilterUnit())=='N0M7' or GetUnitTypeId(GetFilterUnit())=='N0MB' or GetUnitTypeId(GetFilterUnit())=='N0MC' or GetUnitTypeId(GetFilterUnit())=='N0MO' or GetUnitTypeId(GetFilterUnit())=='N0MA' or GetUnitTypeId(GetFilterUnit())=='N0MW')and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(H04))
endfunction
function G3E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit G6E=LUnit(W57,"Mine")
local group g
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call DestroyEffect(AddSpecialEffect("war3mapImported\\NewGroundEX.mdx",GetUnitX(G6E),GetUnitY(G6E)))
call LT7(W57)
call EA8(t)
else
set g=OG8()
set H04=G6E
call GroupEnumUnitsInRange(g,GetUnitX(G6E),GetUnitY(G6E),200,Condition(function GCE))
if FirstOfGroup(g)!=null then
call LT7(W57)
call EA8(t)
call SetUnitExploded(G6E,true)
call KillUnit(G6E)
endif
call OF8(g)
endif
set t=null
set G6E=null
set g=null
return false
endfunction
function GLE takes nothing returns nothing
local integer W57=GetHandleId(GetOwningPlayer(GetTriggerUnit()))
local group XS8=GAE(bj_mapInitialPlayableArea,Condition(function GZE))
local integer Vu=LInt(W57,"GMCount")
local integer VU=0
local unit Vv
local integer VV
local unit Y_8
local integer Vw
local integer T8
local integer U8
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.4,true)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function G3E))
call SUnit(GetHandleId(t),"Mine",GetTriggerUnit())
set Vu=(Vu+1)
call StartTimerBJ(LTimer(W57,"MineTimer"+I2S(Vu)),false,15000.)
call SUnit(W57,"GMUnit"+I2S(Vu),GetTriggerUnit())
set VU=CountUnitsInGroup(XS8)
if(VU>20)then
set VV=99999
set T8=1
set U8=Vu
loop
exitwhen T8>U8
set Y_8=LUnit(W57,"GMUnit"+I2S(T8))
set Vw=R2I(TimerGetRemaining(LTimer(W57,"MineTimer"+I2S(T8))))
if(GetUnitState(Y_8,UNIT_STATE_LIFE)>0 and Vw<VV)then
set Vv=Y_8
set VV=Vw
endif
set T8=T8+1
endloop
call ExplodeUnitBJ(Vv)
else
call QM8(I2S(VU),1,GetTriggerUnit(),.027,130,130,130,216)
endif
call SInt(W57,"GMCount",Vu)
call OF8(XS8)
set t=null
set XS8=null
set Vv=null
set Y_8=null
endfunction
function G1E takes nothing returns boolean
if GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>.5 and(GetUnitTypeId(GetFilterUnit())=='n00O' or GetUnitTypeId(GetFilterUnit())=='n00P' or GetUnitTypeId(GetFilterUnit())=='n00Q' or GetUnitTypeId(GetFilterUnit())=='n00N')then
set n0=n0+1
endif
return false
endfunction
function G0E takes nothing returns boolean
local group g=OG8()
set n0=0
call GroupEnumUnitsOfPlayer(g,GetTriggerPlayer(),Condition(function G1E))
if n0>0 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,(GetObjectName(('n0FC')))+": "+I2S(n0))
endif
call OF8(g)
set g=null
return false
endfunction
function qe takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[1],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-st",true)
call TriggerAddCondition(t,Condition(function G0E))
set t=CreateTrigger()
call TriggerRegisterEnterRectSimple(t,GetWorldBounds())
call TriggerAddCondition(t,Condition(function GYE))
call TriggerAddAction(t,function GLE)
set t=null
endfunction
function G5E takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local unit AC7=CreateUnit(GetOwningPlayer(AM7),'e00E',GetUnitX(AM7),GetUnitY(AM7),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 ML8=GetUnitAbilityLevel(AM7,'A0BQ')
call AddPermanentAbility(AC7,'A05F')
call SetUnitAbilityLevel(AC7,'A05F',ML8)
loop
exitwhen i>40
exitwhen IssuePointOrderById(AC7,852593,x+r*Cos(a),y+r*Sin(a))
set i=i+1
set a=a+.4
set r=r+10
endloop
call RemoveLocation(l)
set AM7=null
set AC7=null
set l=null
endfunction
function G2E takes nothing returns boolean
if GetSpellAbilityId()=='A0BQ' then
call G5E()
endif
return false
endfunction
function BN8 takes nothing returns nothing
set d8=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(d8,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(d8,Condition(function G2E))
endfunction
function MoveLightningToUnit takes lightning l,unit u1,unit u2 returns lightning
call MoveLightningEx(l,true,GetUnitX(u1),GetUnitY(u1),$80*(GetTerrainCliffLevel(GetUnitX(u1),GetUnitY(u1))-2)+GetUnitFlyHeight(u1)+30,GetUnitX(u2),GetUnitY(u2),$80*(GetTerrainCliffLevel(GetUnitX(u2),GetUnitY(u2))-2)+GetUnitFlyHeight(u2)+30)
return l
endfunction
function AddTimedLightningToUnit_Move takes nothing returns nothing
local integer t=GetHandleId(GetTriggeringTrigger())
local unit s=LUnit(t,"s")
local unit u=LUnit(t,"u")
local real r=LReal(t,"r")
call MoveLightningToUnit(LoadLightningHandle(R8,t,'l'),s,u)
if time>r or(LBool(t,"b")and(IsUnitType(s,UNIT_TYPE_DEAD)or IsUnitType(u,UNIT_TYPE_DEAD)))then
call DestroyLightning(LoadLightningHandle(R8,t,'l'))
call TriggerOff()
endif
set s=null
set u=null
endfunction
function AddTimedLightningToUnit takes unit u1,unit u2,real r,string s,boolean b returns nothing
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
local lightning l=MoveLightningToUnit(AddLightning(s,false,0,0,1,1),u1,u2)
call TriggerRegisterVariableEvent(t,"time",GREATER_THAN,0)
call TriggerAddCondition(t,Condition(function AddTimedLightningToUnit_Move))
call SReal(h,"r",time+r)
call SaveLightningHandle(R8,h,'l',l)
call SUnit(h,"s",u1)
call SUnit(h,"u",u2)
call SBool(h,"b",b)
set t=null
endfunction
function AddTimedLightningToUnitEx_Move takes nothing returns nothing
local integer t=GetHandleId(GetTriggeringTrigger())
local unit s=LUnit(t,"s")
local unit u=LUnit(t,"u")
local real r=LReal(t,"r")
local real x=LReal(t,"OrigTime")
local lightning l=LoadLightningHandle(R8,t,'l')
local real p=(time-x)/(r-x)
call MoveLightningToUnit(l,s,u)
if p<0.33 then
call SetLightningColor(l,1,1,1,(p*3))
elseif p>0.67 then
call SetLightningColor(l,1,1,1,(1-p)*3)
else
call SetLightningColor(l,1,1,1,1)
endif
if time>r or(LBool(t,"b")and(IsUnitType(s,UNIT_TYPE_DEAD)or IsUnitType(u,UNIT_TYPE_DEAD)))then
call DestroyLightning(l)
call TriggerOff()
endif
set s=null
set u=null
endfunction
function AddTimedLightningToUnitEx takes unit u1,unit u2,real r,string s,boolean b returns nothing
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
local lightning l=MoveLightningToUnit(AddLightning(s,false,0,0,1,1),u1,u2)
call SetLightningColor(l,1,1,1,0)
call TriggerRegisterVariableEvent(t,"time",GREATER_THAN,0)
call TriggerAddCondition(t,Condition(function AddTimedLightningToUnitEx_Move))
call SReal(h,"OrigTime",time)
call SReal(h,"r",time+r)
call SaveLightningHandle(R8,h,'l',l)
call SUnit(h,"s",u1)
call SUnit(h,"u",u2)
call SBool(h,"b",b)
set t=null
endfunction
function Laser_New takes nothing returns nothing
local unit s=GetTriggerUnit()
local unit u=GetSpellTargetUnit()
call Dmg(s,u,HeroMagic,80*(GetUnitAbilityLevel(s,'A049')+GetUnitAbilityLevel(s,'AZ0S')))
call AddTimedLightningToUnitEx(s,u,0.5,"LLTN",false)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",u,"chest"))
set s=null
set u=null
endfunction
function G_E takes nothing returns nothing
if GetSpellAbilityId()=='A049' or GetSpellAbilityId()=='AZ0S' and HasLinkin(GetSpellTargetUnit())==false then
call Laser_New()
endif
endfunction
function BO8 takes nothing returns nothing
set d9=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(d9,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(d9,Condition(function G_E))
endfunction
function H7E takes unit u returns boolean
return GetUnitTypeId(u)=='H00F' or GetUnitTypeId(u)=='H00E' or GetUnitTypeId(u)=='H00G' or GetUnitTypeId(u)=='O017'
endfunction
function H8E takes nothing returns nothing
if IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)then
call Dmg(RU,GetEnumUnit(),NormalFire,SU/ 3)
else
call Dmg(RU,GetEnumUnit(),NormalFire,SU)
endif
endfunction
function H9E takes unit Z77,real x,real y,real r,real d returns nothing
local group g=OG8()
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,r,Condition(function VP8))
set RU=Z77
set SU=d
call ForGroup(g,function H8E)
call OF8(g)
set g=null
endfunction
function HDE takes nothing returns boolean
return(UA8()and IsCourier(GetFilterUnit())==false and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))
endfunction
function HEE takes unit N28 returns unit
local unit Z77=null
local group g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(N28),GetUnitY(N28),275,Condition(function HDE))
call GroupRemoveUnit(g,N28)
set Z77=GroupPickRandomUnit(g)
call OF8(g)
set H04=Z77
set Z77=null
set g=null
return H04
endfunction
function HFE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer C77=GetTriggerEvalCount(t)
local unit AM7=LUnit(W57,"Hero")
local unit Z77=LUnit(W57,"Source")
local unit X77=LUnit(W57,"Target")
local real x0=LReal(W57,"Tossx0")
local real y0=LReal(W57,"Tossy0")
local real x1=GetUnitX(Z77)
local real y1=GetUnitY(Z77)
local real x2=0
local real y2=0
local real CV7
local real HGE
local real HHE
local real HIE
local real S_8
local real T48
local location l
if X77!=null then
set x2=GetUnitX(X77)
set y2=GetUnitY(X77)
endif
if X77==null or Z87(x0,y0,x2,y2)>1000 then
set x2=x0
set y2=y0
endif
set CV7=YI7(x1,y1,x2,y2)
set HGE=Z87(x1,y1,x2,y2)
set HHE=HGE/(51-C77)
set HIE=(C77-25)*(C77-25)
set S_8=x1+HHE*Cos(CV7*bj_DEGTORAD)
set T48=y1+HHE*Sin(CV7*bj_DEGTORAD)
if C77<51 then
if H7E(Z77)==false then
call SetUnitFlyHeight(Z77,775-HIE,0)
endif
call SetUnitPosition(Z77,S_8,T48)
else
if H7E(Z77)==false then
call SetUnitFlyHeight(Z77,GetUnitDefaultFlyHeight(Z77),0)
endif
call PauseUnit(Z77,false)
call SetUnitPathing(Z77,true)
call SetUnitPosition(Z77,x2,y2)
call EY8(Z77,"Tossed")
set l=Location(x2,y2)
call TerrainDeformationRippleBJ(.2,true,l,1.,300.,96.,1,64.)
call RemoveLocation(l)
call DestroyEffect(LEff(W57,"FX"))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",GetUnitX(Z77),GetUnitY(Z77)))
if IsUnitAlly(Z77,GetOwningPlayer(AM7))then
else
if(AV7((AM7),BU[GG4])!=null)then
call Dmg(AM7,Z77,NormalFire,(.2+.15*(GetUnitAbilityLevel(AM7,'A0CY')+1))*75*GetUnitAbilityLevel(AM7,'A0BZ'))
else
call Dmg(AM7,Z77,NormalFire,(.2+.15*GetUnitAbilityLevel(AM7,'A0CY'))*75*GetUnitAbilityLevel(AM7,'A0BZ'))
endif
endif
call KillTrees(x2,y2,300)
call H9E(AM7,x2,y2,300,75*GetUnitAbilityLevel(AM7,'A0BZ'))
call LT7(W57)
call EA8(t)
endif
set t=null
set AM7=null
set Z77=null
set X77=null
set l=null
return false
endfunction
function HJE takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local unit Z77=WS4
local unit X77
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local real x
local real y
call SetUnitAnimationByIndex(AM7,4)
call PauseUnit(Z77,true)
call SetUnitPathing(Z77,false)
if H7E(Z77)==false then
call AddPermanentAbility(Z77,'Amrf')
call UnitRemoveAbility(Z77,'Amrf')
endif
call EW8(Z77,"Tossed")
if GetSpellTargetItem()==null then
set X77=GetSpellTargetUnit()
set x=GetUnitX(X77)
set y=GetUnitY(X77)
else
set x=GetItemX(GetSpellTargetItem())
set y=GetItemY(GetSpellTargetItem())
set X77=null
endif
call SUnit(W57,"Hero",AM7)
call SUnit(W57,"Source",Z77)
call SUnit(W57,"Target",X77)
call SEff(W57,"FX",AddSpecialEffectTarget("Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl",Z77,"origin"))
call SReal(W57,"Tossx0",x)
call SReal(W57,"Tossy0",y)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function HFE))
set AM7=null
set Z77=null
set X77=null
set t=null
endfunction
function HKE takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local unit Z77=HEE(AM7)
local unit X77=GetSpellTargetUnit()
if GetSpellTargetItem()!=null and ZV9(GetItemTypeId(GetSpellTargetItem()))==false then
call ZN7(AM7)
call ShowWarningToPlayer(GetOwningPlayer(AM7),GetObjectName('n0N3'))
endif
set WS4=Z77
if Z77==null then
call ZN7(AM7)
call ShowWarningToPlayer(GetOwningPlayer(AM7),GetObjectName('n0DA'))
elseif GetOwningPlayer(X77)==GetOwningPlayer(AM7)then
call ZN7(AM7)
call ShowWarningToPlayer(GetOwningPlayer(AM7),GetObjectName('n0CY'))
endif
set AM7=null
set Z77=null
set X77=null
endfunction
function HME takes nothing returns boolean
if GetSpellAbilityId()=='A0BZ' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST then
call HKE()
else
call HJE()
endif
endif
return false
endfunction
function BS8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function HME))
set t=null
endfunction
function HNE takes nothing returns nothing
call GWD('A2KK')
endfunction
function HOE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local integer C77
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 and GetEventDamage()>20. then
set C77=LInt(GetHandleId(Z77),"WarClub_Count")
if LState(Z77,"WarClubState")==false then
call AddTimedBoolBuff(Z77,"WarClubState",.1)
call SInt(GetHandleId(Z77),"WarClub_Count",(C77+1))
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
else
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set Z77=null
set t=null
return false
endfunction
function HPE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer KC8=GetHandleId(t)
local unit WX8=LUnit(KC8,"Source")
local integer HQE=LInt(GetHandleId(WX8),"WarClub_Count")
call SInt(KC8,"WarClub_Cooldown",1)
call UnitRemoveAbility(WX8,'A1VG')
if(AV7(WX8,BU[GG4])!=null)then
call AddPermanentAbility(WX8,'A1VH')
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(WX8),'A1VH',true)
if HQE>5 then
call FlushChildHashtable(R8,KC8)
call EA8(t)
endif
set WX8=null
set t=null
return false
endfunction
function HRE takes nothing returns nothing
local trigger t
local unit WX8=GetAttacker()
local integer KC8=GetHandleId(WX8)
local integer HQE=LInt(KC8,"WarClub_Count")
if HQE<6 then
if not LState(WX8,"WarClubState")then
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,1.,false)
call TriggerAddCondition(t,Condition(function HOE))
call SUnit(GetHandleId(t),"Source",WX8)
endif
else
call SInt(KC8,"WarClub_Count",(0))
call UnitRemoveAbility(WX8,'A1W1')
if(LInt(KC8,"WarClub_Cooldown"))==1 then
set t=LTrig(KC8,"WarClub_EndTrig")
call FlushChildHashtable(R8,GetHandleId(t))
call EA8(t)
endif
endif
set WX8=null
set t=null
endfunction
function WarClub_Attack takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),'A1W1')>0 then
call HRE()
endif
return false
endfunction
function WarClub_Animation takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if GetTriggerEvalCount(t)==1 then
call SetUnitTimeScalePercent(Z77,250)
else
call SetUnitTimeScalePercent(Z77,'d')
call SetUnitAnimationByIndex(Z77,12)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
return false
endfunction
function HSE takes nothing returns boolean
local trigger t
if GetSpellAbilityId()=='A1VH' then
call AddTimedBoolBuff(GetTriggerUnit(),"WarClubCastState",29.9)
call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),'A1VH',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),'A1VG',true)
call AddPermanentAbility(GetTriggerUnit(),'A1VG')
call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),'A1W1',false)
call AddPermanentAbility(GetTriggerUnit(),'A1W1')
call IssueTargetOrderById(GetTriggerUnit(),852511,GetSpellTargetDestructable())
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,30,false)
call TriggerAddCondition(t,Condition(function HPE))
call SUnit(GetHandleId(t),"Source",GetTriggerUnit())
call STrig(GetHandleId(GetTriggerUnit()),"WarClub_EndTrig",t)
call SInt(GetHandleId(GetTriggerUnit()),"WarClub_Cooldown",(0))
call SInt(GetHandleId(GetTriggerUnit()),"WarClub_Count",(0))
set t=null
elseif GetSpellAbilityId()=='A2KA' then
call RemoveDestructable(GetSpellTargetDestructable())
call ShowUnit(GetTriggerUnit(),false)
call ShowUnit(GetTriggerUnit(),true)
call UnitRemoveAbility(GetTriggerUnit(),'Aloc')
call UnitAddAbility(GetTriggerUnit(),'A2KB')
call UnitRemoveAbility(GetTriggerUnit(),'A2KB')
call UnitAddAbility(GetTriggerUnit(),'A2KC')
call UnitRemoveAbility(GetTriggerUnit(),'A2KC')
call AddUnitAnimationProperties(GetTriggerUnit(),"upgrade",false)
endif
return false
endfunction
function WarClub_Scan takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if(AV7((Z77),BU[GG4])!=null)then
if LState(Z77,"WarClubCastState")==false then
if GetUnitAbilityLevel(Z77,'A1VH')==0 and GetUnitAbilityLevel(Z77,'A1VG')==0 then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1VH',true)
call AddPermanentAbility(Z77,'A1VH')
endif
endif
else
call UnitRemoveAbility(Z77,'A1VH')
call UnitRemoveAbility(Z77,'A1VG')
endif
set t=null
set Z77=null
return false
endfunction
function FHD takes nothing returns nothing
local unit Z77=B2
local unit m5=C2
local unit AC7=LUnit(GetHandleId(Z77),"GrowCaster")
call SUnit(GetHandleId(m5),"GrowCaster",AC7)
call SetUnitOwner(AC7,GetOwningPlayer(m5),true)
set Z77=null
set m5=null
set AC7=null
endfunction
function RZ9 takes nothing returns nothing
local unit N28=IE4
local unit AC7=LUnit(GetHandleId(N28),"GrowCaster")
if AC7!=null and GetUnitTypeId(AC7)=='e01V' then
call RemoveUnit(AC7)
endif
set N28=null
set AC7=null
endfunction
function HTE takes nothing returns boolean
return GetLearnedSkill()=='A0CY' and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function HUE takes nothing returns nothing
local unit HVE=LUnit(GetHandleId(GetTriggeringTrigger()),"Tiny")
local integer TA8=GetUnitAbilityLevel(HVE,'A0CY')
if GetUnitState(HVE,UNIT_STATE_LIFE)>1 then
call SetUnitScale(HVE,.5+.25*TA8,.5+.25*TA8,.5+.25*TA8)
endif
set HVE=null
endfunction
function HWE takes nothing returns boolean
local integer TA8
if IsUnitIllusion(GetTriggerUnit())and(GetUnitTypeId(GetTriggerUnit())=='Ucrl' or GetUnitTypeId(GetTriggerUnit())=='U01X')then
set TA8=GetUnitAbilityLevel(LUnit(GetHandleId(GetTriggeringTrigger()),"Tiny"),'A0CY')
call SetUnitScale(GetTriggerUnit(),.5+.25*TA8,.5+.25*TA8,.5+.25*TA8)
endif
return false
endfunction
function HXE takes nothing returns nothing
local trigger t
local unit HYE=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(HYE,'A0CY')
local unit AC7
local unit AM7=GetTriggerUnit()
local region HZE
if ML8==1 then
set AC7=CreateUnit(GetOwningPlayer(AM7),'e01V',0,0,0)
call AddPermanentAbility(AC7,'A10B')
call SUnit(GetHandleId(AM7),"GrowCaster",AC7)
else
set AC7=LUnit(GetHandleId(AM7),"GrowCaster")
endif
if ML8==2 then
call UnitRemoveAbility(AC7,'A10B')
call AddPermanentAbility(AC7,'A10A')
elseif ML8==3 then
call UnitRemoveAbility(AC7,'A10B')
call UnitRemoveAbility(AC7,'A10A')
call AddPermanentAbility(AC7,'A0ZS')
endif
call SetPlayerTechResearched(GetOwningPlayer(HYE),'R00E',ML8)
if ML8==1 then
set t=CreateTrigger()
call TriggerAddAction(t,function HUE)
call TriggerRegisterTimerEvent(t,2.,true)
call SUnit(GetHandleId(t),"Tiny",HYE)
call SetUnitScale(HYE,.5+.25*ML8,.5+.25*ML8,.5+.25*ML8)
set t=CreateTrigger()
set HZE=CreateRegion()
call RegionAddRect(HZE,GetWorldBounds())
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
call TriggerAddCondition(t,Condition(function HWE))
call SUnit(GetHandleId(t),"Tiny",HYE)
set t=null
set HZE=null
endif
set HYE=null
set AM7=null
set AC7=null
endfunction
function BQ8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function HTE))
call TriggerAddAction(t,function HXE)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function HSE))
call HNE()
set t=null
endfunction
function HAE takes nothing returns boolean
if LState(GetFilterUnit(),"Tossed")then
call Dmg(gB,GetFilterUnit(),NormalFire,lB)
endif
return false
endfunction
function HBE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
local unit oA=CreateUnit(GetOwningPlayer(N28),'e00E',x,y,0)
local integer TA8=GetUnitAbilityLevel(N28,'A0LL')
local group g=OG8()
call AddPermanentAbility(oA,'A10J')
call SetUnitAbilityLevel(oA,'A10J',TA8)
set gB=N28
if TA8==1 then
set lB=25
elseif TA8==2 then
set lB=45
elseif TA8==3 then
set lB=65
elseif TA8==4 then
set lB=75
endif
call GroupEnumUnitsInRange(g,x,y,275+24,Condition(function HAE))
call OF8(g)
if GetTriggerEvalCount(t)>6 then
call LT7(EC8)
call EA8(t)
endif
set t=null
set N28=null
set oA=null
set g=null
return false
endfunction
function HCE takes nothing returns nothing
local unit N28=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local location l=GetSpellTargetLoc()
local unit oA=CreateUnit(GetOwningPlayer(N28),'e00E',GetUnitX(N28),GetUnitY(N28),0)
local integer TA8=GetUnitAbilityLevel(N28,'A0LL')
call AddPermanentAbility(oA,'A10M')
call SetUnitAbilityLevel(oA,'A10M',TA8)
call IssuePointOrderById(oA,852652,GetLocationX(l),GetLocationY(l))
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerAddCondition(t,Condition(function HBE))
call SUnit(EC8,"Hero",N28)
call SReal(EC8,"x",GetLocationX(l))
call SReal(EC8,"y",GetLocationY(l))
call TriggerEvaluate(t)
call RemoveLocation(l)
set N28=null
set l=null
set t=null
set oA=null
endfunction
function H3E takes nothing returns boolean
if GetSpellAbilityId()=='A0LL' then
call HCE()
endif
return false
endfunction
function BR8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function H3E))
set t=null
endfunction
function H6E takes nothing returns boolean
local unit Z77=GetTriggerUnit()
local unit X77=GetAttacker()
local integer ML8=GetUnitAbilityLevel(Z77,'A19Q')
local unit AC7
if GetRandomInt(1,'d')<=ML8*5+5 and Z47(Z77,X77)<325 then
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call AddPermanentAbility(AC7,'A0BV')
call SetUnitAbilityLevel(AC7,'A0BV',ML8)
call IssueTargetOrderById(AC7,852095,X77)
set AC7=null
endif
set Z77=null
set X77=null
return false
endfunction
function HLE takes unit AM7,boolean SY8 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function H6E))
if GetUnitPointValue(AM7)==500 then
set UW7[GetPlayerId(GetOwningPlayer(AM7))]=t
endif
set t=null
set AM7=null
endfunction
function H1E takes nothing returns boolean
if GetLearnedSkill()=='A19Q' and GetUnitAbilityLevel(GetTriggerUnit(),'A19Q')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call HLE(GetTriggerUnit(),false)
endif
return false
endfunction
function BT8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function H1E))
set t=null
endfunction
function H0E takes nothing returns boolean
return GetUnitAbilityLevel(GetAttacker(),'A0O0')>0 and LState(GetAttacker(),"BeastRageTrigger")==false
endfunction
function H5E takes nothing returns nothing
local unit X47=GetAttacker()
local unit X77=GetTriggerUnit()
local integer W57=GetHandleId(X47)
local unit H2E=LUnit(W57,"BeastRage|PreviousTarget")
local integer VHD=P38(LInt(W57,"BeastRage|Counter"),0)
local integer ML8=GetUnitAbilityLevel(X47,'A0O0')
if H2E!=X77 then
set VHD=1
else
set VHD=PC8(VHD+1,2+ML8)
endif
call UnitRemoveAbility(X47,'AZ13')
call UnitRemoveAbility(X47,'AZ14')
call UnitRemoveAbility(X47,'AZ15')
call UnitRemoveAbility(X47,'AZ16')
call PB8(X47,'AZ12'+ML8,VHD)
call SInt(W57,"BeastRage|Counter",VHD)
call SUnit(W57,"BeastRage|PreviousTarget",X77)
call AddTimedBoolBuff(X47,"BeastRageTrigger",.4)
set X47=null
set X77=null
set H2E=null
endfunction
function BL8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function H0E))
call TriggerAddAction(t,function H5E)
call PU8('A0NZ')
set t=null
endfunction
function H_E takes unit Z77,unit X77,unit AC7,integer ML8 returns nothing
call SetUnitOwner(AC7,GetOwningPlayer(X77),false)
call SetUnitAbilityLevel(AC7,'A21O',ML8)
call IssueTargetOrderById(AC7,852190,X77)
call Dmg(Z77,X77,NormalFire,25+50*ML8)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",X77,"overhead"))
endfunction
function I4E takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),CL4)==false then
call GroupAddUnit(CL4,GetEnumUnit())
call H_E(CR4,GetEnumUnit(),CS4,C_4)
endif
endfunction
function I7E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local unit I8E=(LoadUnitHandle(R8,(W57),(675)))
local unit I9E=(LoadUnitHandle(R8,(W57),(676)))
local real a=(LoadReal(R8,(W57),(13)))
local real d=(LoadReal(R8,(W57),(433)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local group XCD=(LoadGroupHandle(R8,(W57),(187)))
local group g=OG8()
if GetTriggerEvalCount(t)<=50 then
set a=a+20
set d=d+7
call SaveReal(R8,(W57),(13),((a)*1.))
call SaveReal(R8,(W57),(433),((d)*1.))
elseif GetTriggerEvalCount(t)<='d' then
set a=a+20
set d=d-7
call SaveReal(R8,(W57),(13),((a)*1.))
call SaveReal(R8,(W57),(433),((d)*1.))
endif
call SetUnitX(I8E,PQ8(x+d*Cos(a*bj_DEGTORAD)))
call SetUnitY(I8E,PS8(y+d*Sin(a*bj_DEGTORAD)))
set a=a+180
call SetUnitX(I9E,PQ8(x+d*Cos(a*bj_DEGTORAD)))
call SetUnitY(I9E,PS8(y+d*Sin(a*bj_DEGTORAD)))
set H04=Z77
set CR4=Z77
set CS4=AC7
set CL4=XCD
set C_4=ML8
call GroupEnumUnitsInRange(g,GetUnitX(I8E),GetUnitY(I8E),'}',Condition(function UM8))
call ForGroup(g,function I4E)
set H04=Z77
call GroupEnumUnitsInRange(g,GetUnitX(I9E),GetUnitY(I9E),'}',Condition(function UM8))
call ForGroup(g,function I4E)
call OF8(g)
if GetTriggerEvalCount(t)>'d' then
call KillUnit(I8E)
call KillUnit(I9E)
call KillUnit(AC7)
call OF8(XCD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set I8E=null
set I9E=null
set AC7=null
return false
endfunction
function IDE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local unit I8E=CreateUnit(GetOwningPlayer(Z77),'e02Y',x,y,0)
local unit I9E=CreateUnit(GetOwningPlayer(Z77),'e02Y',x,y,0)
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',x,y,0)
call UnitAddAbility(AC7,'A21O')
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveUnitHandle(R8,(W57),(675),(I8E))
call SaveUnitHandle(R8,(W57),(676),(I9E))
call SaveReal(R8,(W57),(13),((0)*1.))
call SaveReal(R8,(W57),(433),((0)*1.))
call SaveInteger(R8,(W57),(5),(GetUnitAbilityLevel(Z77,'A21N')))
call SaveGroupHandle(R8,(W57),(187),(OG8()))
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerAddCondition(t,Condition(function I7E))
set Z77=null
set I8E=null
set I9E=null
set t=null
set AC7=null
endfunction
function IEE takes unit Z77,unit X77,unit AC7,integer ML8 returns nothing
call SetUnitOwner(AC7,GetOwningPlayer(X77),false)
call SetUnitAbilityLevel(AC7,'A21P',ML8)
call IssueTargetOrderById(AC7,852075,X77)
call Dmg(Z77,X77,NormalFire,75)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",X77,"overhead"))
endfunction
function IFE takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),CL4)==false and CU4!=null and O18(CU4)==false then
call GroupAddUnit(CL4,GetEnumUnit())
call IEE(CR4,GetEnumUnit(),CS4,C_4)
endif
endfunction
function IGE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local unit I8E=(LoadUnitHandle(R8,(W57),(393)))
local unit I9E=(LoadUnitHandle(R8,(W57),(394)))
local unit IHE=(LoadUnitHandle(R8,(W57),(395)))
local unit IIE=(LoadUnitHandle(R8,(W57),(396)))
local unit IJE=(LoadUnitHandle(R8,(W57),(397)))
local real a=(LoadReal(R8,(W57),(13)))-12.5
local real d=(LoadReal(R8,(W57),(433)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local unit P3D
local group g
local group XCD=(LoadGroupHandle(R8,(W57),(187)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
set d=d+900/ 20.
call SaveReal(R8,(W57),(433),((d)*1.))
call SetUnitX(I8E,PQ8(x+d*Cos(a*bj_DEGTORAD)))
call SetUnitY(I8E,PS8(y+d*Sin(a*bj_DEGTORAD)))
set a=a+6.25
call SetUnitX(I9E,PQ8(x+d*Cos(a*bj_DEGTORAD)))
call SetUnitY(I9E,PS8(y+d*Sin(a*bj_DEGTORAD)))
set a=a+6.25
call SetUnitX(IHE,PQ8(x+d*Cos(a*bj_DEGTORAD)))
call SetUnitY(IHE,PS8(y+d*Sin(a*bj_DEGTORAD)))
set a=a+6.25
call SetUnitX(IIE,PQ8(x+d*Cos(a*bj_DEGTORAD)))
call SetUnitY(IIE,PS8(y+d*Sin(a*bj_DEGTORAD)))
set a=a+6.25
call SetUnitX(IJE,PQ8(x+d*Cos(a*bj_DEGTORAD)))
call SetUnitY(IJE,PS8(y+d*Sin(a*bj_DEGTORAD)))
set CR4=Z77
set CS4=AC7
set CL4=XCD
set C_4=ML8
set P3D=I8E
if P3D!=null and O18(P3D)==false then
set x=GetUnitX(P3D)
set y=GetUnitY(P3D)
set CU4=P3D
set H04=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,'}',Condition(function UM8))
call ForGroup(g,function IFE)
call OF8(g)
endif
set P3D=I9E
if P3D!=null and O18(P3D)==false then
set x=GetUnitX(P3D)
set y=GetUnitY(P3D)
set CU4=P3D
set H04=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,'}',Condition(function UM8))
call ForGroup(g,function IFE)
call OF8(g)
endif
set P3D=IHE
if P3D!=null and O18(P3D)==false then
set x=GetUnitX(P3D)
set y=GetUnitY(P3D)
set CU4=P3D
set H04=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,'}',Condition(function UM8))
call ForGroup(g,function IFE)
call OF8(g)
endif
set P3D=IIE
if P3D!=null and O18(P3D)==false then
set x=GetUnitX(P3D)
set y=GetUnitY(P3D)
set CU4=P3D
set H04=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,'}',Condition(function UM8))
call ForGroup(g,function IFE)
call OF8(g)
endif
set P3D=IJE
if P3D!=null and O18(P3D)==false then
set x=GetUnitX(P3D)
set y=GetUnitY(P3D)
set CU4=P3D
set H04=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,'}',Condition(function UM8))
call ForGroup(g,function IFE)
call OF8(g)
endif
if GetTriggerEvalCount(t)>20 then
call KillUnit(I8E)
call KillUnit(I9E)
call KillUnit(IHE)
call KillUnit(IIE)
call KillUnit(IJE)
call KillUnit(AC7)
call OF8(XCD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set I8E=null
set I9E=null
set IHE=null
set IIE=null
set IJE=null
set AC7=null
return false
endfunction
function IKE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real x0=GetUnitX(Z77)
local real y0=GetUnitY(Z77)
local real x1=GetSpellTargetX()
local real y1=GetSpellTargetY()
local real a=YI7(x0,y0,x1,y1)
local unit I8E=CreateUnit(GetOwningPlayer(Z77),'e02Z',x0,y0,a-12.5)
local unit I9E=CreateUnit(GetOwningPlayer(Z77),'e02Z',x0,y0,a-6.25)
local unit IHE=CreateUnit(GetOwningPlayer(Z77),'e02Z',x0,y0,a)
local unit IIE=CreateUnit(GetOwningPlayer(Z77),'e02Z',x0,y0,a+6.25)
local unit IJE=CreateUnit(GetOwningPlayer(Z77),'e02Z',x0,y0,a+12.5)
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',x0,y0,0)
call UnitAddAbility(AC7,'A21P')
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveUnitHandle(R8,(W57),(393),(I8E))
call SaveUnitHandle(R8,(W57),(394),(I9E))
call SaveUnitHandle(R8,(W57),(395),(IHE))
call SaveUnitHandle(R8,(W57),(396),(IIE))
call SaveUnitHandle(R8,(W57),(397),(IJE))
call SaveReal(R8,(W57),(6),((x0)*1.))
call SaveReal(R8,(W57),(7),((y0)*1.))
call SaveReal(R8,(W57),(433),((0)*1.))
call SaveReal(R8,(W57),(13),((a)*1.))
call SaveGroupHandle(R8,(W57),(187),(OG8()))
call SaveInteger(R8,(W57),(5),(GetUnitAbilityLevel(Z77,'A21M')))
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerAddCondition(t,Condition(function IGE))
set Z77=null
set I8E=null
set I9E=null
set IHE=null
set IIE=null
set IJE=null
set t=null
set AC7=null
endfunction
function IME takes nothing returns boolean
if GetSpellAbilityId()=='A21M' then
call IKE()
elseif GetSpellAbilityId()=='A21N' then
call IDE()
endif
return false
endfunction
function INE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer ML8=GetUnitAbilityLevel(Z77,'A21L')
local player p=(LoadPlayerHandle(R8,(W57),(54)))
if GetUnitTypeId(Z77)=='N017' or GetUnitTypeId(Z77)=='N02B' then
if((LoadInteger(R8,(GetHandleId((Z77))),((4416))))==1)==false or p!=GetOwningPlayer(Z77)then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A21N',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A21M',false)
call SaveInteger(R8,(GetHandleId((Z77))),((4416)),(1))
call SaveInteger(R8,(GetHandleId((Z77))),((4417)),(2))
if p!=GetOwningPlayer(Z77)then
call SavePlayerHandle(R8,(W57),(54),(GetOwningPlayer(Z77)))
endif
endif
if GetUnitAbilityLevel(Z77,'A21N')!=ML8 then
call SetUnitAbilityLevel(Z77,'A21N',ML8)
endif
elseif GetUnitTypeId(Z77)=='N016' then
if((LoadInteger(R8,(GetHandleId((Z77))),((4417))))==1)==false or p!=GetOwningPlayer(Z77)then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A21N',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A21M',true)
call SaveInteger(R8,(GetHandleId((Z77))),((4417)),(1))
call SaveInteger(R8,(GetHandleId((Z77))),((4416)),(2))
if p!=GetOwningPlayer(Z77)then
call SavePlayerHandle(R8,(W57),(54),(GetOwningPlayer(Z77)))
endif
endif
if GetUnitAbilityLevel(Z77,'A21M')!=ML8 then
call SetUnitAbilityLevel(Z77,'A21M',ML8)
endif
endif
set t=null
set Z77=null
return false
endfunction
function IOE takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
call AddPermanentAbility(Z77,'A21N')
call AddPermanentAbility(Z77,'A21M')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A21N',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A21M',false)
call SaveInteger(R8,(GetHandleId((Z77))),((4416)),(2))
call SaveInteger(R8,(GetHandleId((Z77))),((4417)),(2))
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function INE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SavePlayerHandle(R8,(W57),(54),(GetOwningPlayer(Z77)))
set t=null
set Z77=null
endfunction
function IPE takes nothing returns boolean
if GetLearnedSkill()=='A21L' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A21L')==1 then
call IOE()
endif
return false
endfunction
function BerserkRageSetSpeed takes nothing returns nothing
local unit s=LUnit(GetT(),"Unit")
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='A0BE' then
call TriggerRegisterTimerEvent(GetTriggeringTrigger(),.01,false)
else
if GetUnitTypeId(s)=='N016' then
call SetUnitMoveSpeed(s,300)
else
call SetUnitMoveSpeed(s,300+10*GetUnitAbilityLevel(s,'A0BE'))
endif
endif
set s=null
endfunction
function BerserkRageSetSpeedReg takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function BerserkRageSetSpeed))
call SUnit(GetHandleId(t),"Unit",GetTriggerUnit())
set t=null
endfunction
function N016SetSpeed takes nothing returns nothing
if GetLearnedSkill()=='A0BE' and GetUnitAbilityLevel(GetTriggerUnit(),'A0BE')==1 then
call BerserkRageSetSpeedReg()
endif
endfunction
function B18 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function IPE))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IME))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function N016SetSpeed))
set t=null
endfunction
function IQE takes nothing returns nothing
if GetEnumUnit()==GetTriggerUnit()then
call T68(GetEnumUnit(),'A0XE',S04,S14,'B00B')
else
call T68(GetEnumUnit(),'A0XE',S04,S14,'B00B')
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),'A0XE',false)
endfunction
function IRE takes nothing returns nothing
local group g=OG8()
set S04=GetUnitAbilityLevel(GetTriggerUnit(),'A1EJ')
set S14=7
call GroupEnumUnitsInRange(g,0,0,9999,Condition(function VU8))
call ForGroup(g,function IQE)
call OF8(g)
set g=null
endfunction
function ISE takes nothing returns boolean
if GetSpellAbilityId()=='A1EJ' then
call IRE()
endif
return false
endfunction
function B08 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function ISE))
set t=null
endfunction
function ITE takes nothing returns boolean
return GetSpellAbilityId()=='A0BE'
endfunction
function IUE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SetUnitAbilityLevel(Z77,'A09E',GetUnitAbilityLevel(Z77,'A0BE'))
call UnitRemoveAbility(Z77,'B09Y')
set t=null
set Z77=null
return false
endfunction
function IVE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function IUE))
set t=null
set Z77=null
endfunction
function B38 takes nothing returns nothing
set Dc=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(Dc,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerRegisterAnyUnitEventBJ(Dc,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(Dc,Condition(function ITE))
call TriggerAddAction(Dc,function IVE)
endfunction
function IWE takes nothing returns boolean
return GetLearnedSkill()=='A0BE'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function IXE takes nothing returns nothing
call SetUnitAbilityLevel(GetTriggerUnit(),'A09E',GetUnitAbilityLevel(GetTriggerUnit(),'A0BE'))
endfunction
function B68 takes nothing returns nothing
set DC=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(DC,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(DC,Condition(function IWE))
call TriggerAddAction(DC,function IXE)
endfunction
function IYE takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit IZE=LUnit(GetHandleId(t),"MeldTarget")
call UnitRemoveAbility(IZE,'A0RC')
call LT7(GetHandleId(t))
call DestroyTimer(t)
set IZE=null
set t=null
endfunction
function IAE takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local timer t2=null
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local unit IZE=GetTriggerUnit()
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==N28 then
call DestroyTrigger(t)
call Dmg(N28,IZE,HeroNormal,50*GetUnitAbilityLevel(N28,'A0RV'))
call QM8(I2S(50*GetUnitAbilityLevel(N28,'A0RV')),1.,IZE,.03,255,0,0,255)
set t2=CreateTimer()
call AddPermanentAbility(IZE,'A0RC')
call SetUnitAbilityLevel(IZE,'A0RC',GetUnitAbilityLevel(N28,'A0RV'))
call SUnit(GetHandleId(t2),"MeldTarget",IZE)
call TimerStart(t2,10,false,function IYE)
endif
else
call DestroyTrigger(t)
endif
set IZE=null
set N28=null
set t2=null
set t=null
endfunction
function IBE takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local trigger t2=null
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
local unit ICE=null
local real jUv=9999
local unit IZE=GetOrderTargetUnit()
if GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER and IsUnitEnemy(GetOrderTargetUnit(),GetOwningPlayer(N28))and(GetIssuedOrderId()==851983or GetIssuedOrderId()==851971)then
if Z87(x,y,GetUnitX(IZE),GetUnitY(IZE))<(145+50*GetUnitAbilityLevel(N28,'A0RO'))then
call UnitRemoveAbility(N28,'B08K')
call NP8(t)
if IsUnitType(GetOrderTargetUnit(),UNIT_TYPE_STRUCTURE)==false then
set t2=CreateTrigger()
call TriggerRegisterUnitEvent(t2,IZE,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t2,2,false)
set EC8=GetHandleId(t2)
call SUnit(EC8,"Hero",N28)
call TriggerAddAction(t2,function IAE)
endif
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_CAST or GetTriggerEventId()==EVENT_UNIT_DEATH then
call UnitRemoveAbility(N28,'B08K')
call NP8(t)
else
if x!=GetUnitX(N28)or y!=GetUnitY(N28)then
call UnitRemoveAbility(N28,'B08K')
call NP8(t)
endif
endif
set ICE=null
set N28=null
set t2=null
set t=null
set IZE=null
endfunction
function I3E takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call DestroyEffect(AddSpecialEffectTarget("effects\\PurpleAura.mdx",AM7,"origin"))
call S68(aO,GetUnitX(AM7),GetUnitY(AM7))
call TriggerRegisterTimerEvent(t,.2,true)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_SPELL_CAST)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddAction(t,function IBE)
call SUnit(EC8,"Hero",AM7)
call SReal(EC8,"x",GetUnitX(AM7))
call SReal(EC8,"y",GetUnitY(AM7))
call IssueImmediateOrderById(AM7,851993)
set t=null
set AM7=null
endfunction
function I6E takes nothing returns boolean
if GetSpellAbilityId()=='A0RV' then
call I3E()
endif
return false
endfunction
function FF9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I6E))
set t=null
endfunction
function ILE takes nothing returns boolean
local unit N28=GetTriggerUnit()
local integer EC8=GetHandleId(N28)
local integer I1E=LInt(EC8,"RefractionPrevent_Remaining")
if I1E>0 and GetTriggerEventId()!=EVENT_UNIT_DEATH then
if GetEventDamage()>5 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\PriestMissile\\PriestMissile.mdl",N28,"right hand"))
call AddLife(N28,GetEventDamage())
call SInt(EC8,"RefractionPrevent_Remaining",I1E-1)
endif
else
call UnitRemoveAbility(N28,'A0RN')
call UnitRemoveAbility(N28,'B08J')
call SInt(EC8,"RefractionPrevent_Remaining",0)
endif
set N28=null
return false
endfunction
function I0E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local unit AM7=LUnit(GetHandleId(t),"Hero")
local integer W57=GetHandleId(AM7)
local integer ST9=LInt(W57,"RefractionDamage_Remaining")
if GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED and GetAttacker()==AM7 and IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false)then
if GetTriggerEventId()!=EVENT_UNIT_DEATH and ST9>0 and GetEventDamage()>0 then
call SInt(W57,"RefractionDamage_Remaining",ST9-1)
else
call UnitRemoveAbility(AM7,'A0RF')
call UnitRemoveAbility(AM7,'A0RM')
call UnitRemoveAbility(AM7,'B08I')
call SInt(W57,"RefractionDamage_Remaining",0)
endif
endif
set t=null
set AM7=null
return false
endfunction
function I5E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local unit AM7=LUnit(GetHandleId(t),"Hero")
local integer W57=GetHandleId(AM7)
call SInt(W57,"RefractionPrevent_Remaining",0)
call SInt(W57,"RefractionDamage_Remaining",0)
call UnitRemoveAbility(AM7,'A0RF')
call UnitRemoveAbility(AM7,'A0RM')
call UnitRemoveAbility(AM7,'A0RN')
call LT7(GetHandleId(t))
call EA8(t)
set t=null
set AM7=null
return false
endfunction
function I2E takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local integer W57=GetHandleId(AM7)
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,17,false)
call TriggerAddCondition(t,Condition(function I5E))
call SUnit(GetHandleId(t),"Hero",AM7)
call S68(EP,GetUnitX(AM7),GetUnitY(AM7))
call AddPermanentAbility(AM7,'A0RN')
call SInt(W57,"RefractionPrevent_Remaining",GetUnitAbilityLevel(AM7,'A1EA')+2)
call AddPermanentAbility(AM7,'A0RF')
call SetUnitAbilityLevel(AM7,'A0RF',GetUnitAbilityLevel(AM7,'A1EA'))
call AddPermanentAbility(AM7,'A0RM')
call SInt(W57,"RefractionDamage_Remaining",GetUnitAbilityLevel(AM7,'A1EA')+2)
set AM7=null
set t=null
endfunction
function I_E takes unit AM7,boolean SY8 returns nothing
local trigger t
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function ILE))
call SInt(GetHandleId(AM7),"RefractionPrevent_Remaining",0)
if GetUnitPointValue(AM7)==500 then
set UU7[GetPlayerId(GetOwningPlayer(AM7))]=t
endif
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function I0E))
call SUnit(GetHandleId(t),"Hero",AM7)
call SInt(GetHandleId(AM7),"RefractionDamage_Remaining",0)
if GetUnitPointValue(AM7)==500 then
set UY7[GetPlayerId(GetOwningPlayer(AM7))]=t
endif
set t=null
endfunction
function J4E takes nothing returns boolean
if GetLearnedSkill()=='A1EA' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A1EA')==1 then
call I_E(GetTriggerUnit(),false)
endif
return false
endfunction
function J7E takes nothing returns boolean
if GetSpellAbilityId()=='A1EA' then
call I2E()
endif
return false
endfunction
function FG9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function J7E))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function J4E))
set t=null
endfunction
function J8E takes unit u,real wP,real wq,real wQ,real wr,real wR returns boolean
local real ws=wQ-wP
local real wS=wr-wq
local real wt=GetUnitX(u)-wP
local real wT=GetUnitY(u)-wq
return wR>=RAbsBJ(ws*wT-wS*wt)/ RAbsBJ(Pow(Pow(ws,2)+Pow(wS,2),.5))
endfunction
function J9E takes unit Z77,unit m5,real P99,real wU,real wv returns nothing
local integer ML8=GetUnitAbilityLevel(Z77,'A0RO')
local real wV=(300+20*ML8)*2
local real ww=80+25
local unit wW
local real dx
local real dy
local real wx
local real x
local real y
local group g=OG8()
local boolean wX
local boolean wy
set dx=GetUnitX(m5)-GetUnitX(Z77)
set dy=GetUnitY(m5)-GetUnitY(Z77)
set wx=Pow(Pow(dx,2)+Pow(dy,2),.5)
set x=GetUnitX(m5)+(wV/ 2-25)*(dx/ wx)
set y=GetUnitY(m5)+(wV/ 2-25)*(dy/ wx)
set H04=Z77
set H64=P99
call GroupEnumUnitsInRange(g,x,y,Pow(Pow(wV/ 2,2)+Pow(ww/ 2,2),.5),Condition(function UM8))
call GroupRemoveUnit(g,m5)
set wW=FirstOfGroup(g)
loop
exitwhen wW==null
set wX=J8E(wW,GetUnitX(Z77),GetUnitY(Z77),GetUnitX(m5),GetUnitY(m5),ww/ 2)
set wy=J8E(wW,x,y,x-'d',y+'d'*x*Pow(y,-1),.01+wV/ 2)
if wX and wy then
call Dmg(Z77,wW,HeroMagic,P99)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\PriestMissile\\PriestMissile.mdl",wW,"chest"))
endif
call GroupRemoveUnit(g,wW)
set wW=FirstOfGroup(g)
endloop
call OF8(g)
set wW=null
set g=null
endfunction
function JDE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local unit Z77=LUnit(EC8,"Source")
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 and GetEventDamage()>1 and IsUnitIllusion(m5)==false then
call DisableTrigger(t)
call J9E(Z77,m5,GetEventDamage(),LReal(EC8,"InitX"),LReal(EC8,"InitY"))
call LT7(EC8)
call EA8(t)
endif
else
call LT7(EC8)
call EA8(t)
endif
set t=null
set Z77=null
set m5=null
return false
endfunction
function JEE takes nothing returns nothing
local trigger t=CreateTrigger()
local unit m5=GetTriggerUnit()
local unit Z77=GetAttacker()
local integer EC8=GetHandleId(t)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2.,false)
call TriggerAddCondition(t,Condition(function JDE))
call SUnit(EC8,"Target",m5)
call SUnit(EC8,"Source",Z77)
call SReal(EC8,"InitX",GetUnitX(Z77))
call SReal(EC8,"InitY",GetUnitY(Z77))
set m5=null
set Z77=null
set t=null
endfunction
function JFE takes nothing returns nothing
local unit Z77=GetAttacker()
if LState(Z77,"VorpalCooldown")==false then
call AddTimedBoolBuff(Z77,"VorpalCooldown",.4)
call JEE()
endif
set Z77=null
endfunction
function JGE takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),'A0RO')>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==LUnit(GetHandleId(GetTriggeringTrigger()),"Hero")then
call JFE()
endif
return false
endfunction
function JHE takes nothing returns nothing
local trigger t
if GetUnitAbilityLevel(GetTriggerUnit(),'A0RO')==1 then
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function JGE))
call SUnit(GetHandleId(t),"Hero",GetTriggerUnit())
endif
call SetPlayerTechResearched(GetOwningPlayer(GetTriggerUnit()),'Repb',GetUnitAbilityLevel(GetTriggerUnit(),'A0RO'))
set t=null
endfunction
function JIE takes nothing returns boolean
if GetLearnedSkill()=='A0RO' and IsUnitIllusion(GetTriggerUnit())==false then
call JHE()
endif
return false
endfunction
function FH9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function JIE))
set t=null
endfunction
function JJE takes unit u returns nothing
local unit N28=Y7[GetPlayerId(GetOwningPlayer(u))]
local integer EC8=GetHandleId(N28)
local integer w3
local integer i
local integer x
local unit w4
if GetUnitTypeId(N28)!='E01Y' then
return
endif
set w3=LInt(EC8,"TrapMax")
set i=1
loop
exitwhen i>w3
set w4=LUnit(EC8,"Trap"+I2S(i))
if w4==u then
set x=i
loop
exitwhen x==w3
call SUnit(EC8,"Trap"+I2S(x),LUnit(EC8,"Trap"+I2S(x+1)))
set x=x+1
endloop
set i=w3
endif
set i=i+1
endloop
call SInt(EC8,"TrapMax",w3-1)
set w4=null
set N28=null
endfunction
function JKE takes unit u returns nothing
local unit N28=Y7[GetPlayerId(GetOwningPlayer(u))]
local integer EC8=GetHandleId(N28)
local integer w3=LInt(EC8,"TrapMax")
call SaveReal(R8,(GetHandleId(u)),(786),(((TimerGetElapsed(E4)))*1.))
set w3=w3+1
call SUnit(EC8,"Trap"+I2S(w3),u)
call SInt(EC8,"TrapMax",w3)
if Ab[GetPlayerId(GetOwningPlayer(N28))]then
call SelectUnitAddForPlayer(u,GetOwningPlayer(N28))
endif
set N28=null
endfunction
function JME takes nothing returns nothing
call JJE(GetTriggerUnit())
endfunction
function JNE takes unit u returns nothing
local integer w8=GetUnitAbilityLevel(u,'A0RP')*3+2
local integer EC8=GetHandleId(u)
local integer w3=LInt(EC8,"TrapMax")
local unit w4=LUnit(EC8,"Trap1")
if w3==w8 then
call JJE(w4)
call RemoveUnit(w4)
endif
set w4=null
endfunction
function JOE takes nothing returns nothing
local unit oA=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'e00E',GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call AddPermanentAbility(oA,'A0RU')
call SetUnitAbilityLevel(oA,'A0RU',KE7)
call IssueTargetOrderById(oA,852075,GetEnumUnit())
set oA=null
endfunction
function JPE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local group g=OG8()
local real PX9=(LoadReal(R8,(GetHandleId(Z77)),(786)))
local real JQE=(TimerGetElapsed(E4))-PX9
local integer ML8=1
if JQE>4 then
set ML8=5
elseif JQE>3 then
set ML8=4
elseif JQE>2 then
set ML8=3
elseif JQE>1 then
set ML8=2
endif
set KE7=ML8
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl",x,y))
call GroupEnumUnitsInRange(g,x,y,400,Condition(function UB8))
call ForGroup(g,function JOE)
call OF8(g)
call JJE(Z77)
call RemoveUnit(Z77)
set g=null
set Z77=null
endfunction
function JRE takes unit u returns nothing
call IssueImmediateOrderById(u,852556)
endfunction
function JSE takes nothing returns boolean
return GetOwningPlayer(GetFilterUnit())==I44 and GetUnitTypeId(GetFilterUnit())=='e020'
endfunction
function JTE takes nothing returns nothing
local real JUE=Z87(GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),H64,HL4)
local real JVE=Z87(GetUnitX(H04),GetUnitY(H04),H64,HL4)
if JUE<JVE then
set H04=GetEnumUnit()
endif
endfunction
function JWE takes nothing returns nothing
local group g=OG8()
call UnitRemoveAbility(GetTriggerUnit(),'B0BZ')
call UnitRemoveAbility(GetTriggerUnit(),'BEia')
set I44=GetOwningPlayer(GetTriggerUnit())
call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),9000,Condition(function JSE))
set H04=FirstOfGroup(g)
set H64=GetUnitX(GetTriggerUnit())
set HL4=GetUnitY(GetTriggerUnit())
call ForGroup(g,function JTE)
call JRE(H04)
call OF8(g)
set g=null
endfunction
function JXE takes nothing returns nothing
call AddPermanentAbility(GetTriggerUnit(),'A0RT')
endfunction
function JYE takes nothing returns nothing
local location l=GetSpellTargetLoc()
call AddPermanentAbility(GetTriggerUnit(),'A0RT')
call JNE(GetTriggerUnit())
call JKE(CreateUnit(GetOwningPlayer(GetTriggerUnit()),'e020',GetLocationX(l),GetLocationY(l),0))
call RemoveLocation(l)
set l=null
endfunction
function UnitRemoveAbilityDelayFunc takes nothing returns nothing
local integer h=GetHandleId(GetExpiredTimer())
call UnitRemoveAbility(LUnit(h,"s"),LInt(h,"id"))
call TimerOff()
endfunction
function UnitRemoveAbilityDelay takes unit u,integer id returns nothing
local timer tm=CreateTimer()
local integer h=GetHandleId(tm)
call TimerStart(tm,0,false,function UnitRemoveAbilityDelayFunc)
call SUnit(h,"s",u)
call SInt(h,"id",id)
set tm=null
endfunction
function JZE takes nothing returns boolean
if GetSpellAbilityId()=='A0RP' then
call JYE()
endif
if GetSpellAbilityId()=='A0RT' then
call UnitRemoveAbilityDelay(GetTriggerUnit(),'B0BZ')
call JWE()
endif
return false
endfunction
function JAE takes nothing returns boolean
if GetSpellAbilityId()=='A0RQ' then
call JPE()
endif
return false
endfunction
function JBE takes nothing returns boolean
if GetLearnedSkill()=='A0RP' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A0RP')==1 then
call JXE()
endif
return false
endfunction
function JCE takes nothing returns boolean
if GetUnitTypeId(GetDyingUnit())=='e020' then
call JME()
endif
return false
endfunction
function FI9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function JZE))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function JCE))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function JAE))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function JBE))
set t=null
endfunction
function J3E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call UnitRemoveAbility(Z77,'A1N3')
call UnitRemoveAbility(Z77,'A1N6')
call UnitRemoveAbility(Z77,'A1N7')
call UnitRemoveAbility(Z77,'B0CH')
call LT7(EC8)
call EA8(t)
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
if GetTriggerUnit()==Z77 and GetSpellAbilityId()=='A1P9' and TimerGetElapsed(E4)>LReal(EC8,"OriginalTime")then
call LT7(EC8)
call EA8(t)
elseif IsPurgeId(GetSpellAbilityId())and Z77==GetSpellTargetUnit()then
call UnitRemoveAbility(Z77,'A1N3')
call UnitRemoveAbility(Z77,'A1N6')
call UnitRemoveAbility(Z77,'A1N7')
call UnitRemoveAbility(Z77,'B0CH')
call LT7(EC8)
call EA8(t)
endif
else
call UnitRemoveAbility(Z77,'A1N3')
call UnitRemoveAbility(Z77,'A1N6')
call UnitRemoveAbility(Z77,'A1N7')
call UnitRemoveAbility(Z77,'B0CH')
call LT7(EC8)
call EA8(t)
endif
set t=null
set Z77=null
return false
endfunction
function J6E takes nothing returns nothing
local unit Z77=GetAttacker()
local integer EC8=GetHandleId(Z77)
local integer TA8=GetUnitAbilityLevel(Z77,'A1P9')
local integer OUD=LInt(EC8,"Count")
local integer JLE=2+TA8
local trigger t=null
set OUD=OUD+1
call SInt(EC8,"Count",OUD)
if OUD>=JLE then
call UnitRemoveAbility(Z77,'A1N3')
call UnitRemoveAbility(Z77,'A1N6')
call UnitRemoveAbility(Z77,'A1N7')
call UnitRemoveAbility(Z77,'B0CH')
set t=LTrig(EC8,"OverpowerEndTrig")
call LT7(GetHandleId(t))
call EA8(t)
set t=null
endif
set Z77=null
endfunction
function J1E takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),'B0CH')>0 then
call J6E()
endif
return false
endfunction
function J0E takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local integer TA8=GetUnitAbilityLevel(Z77,'A1P9')
call AddPermanentAbility(Z77,'A1N3')
call AddPermanentAbility(Z77,'A1N6')
call AddPermanentAbility(Z77,'A1N7')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1N6',false)
call TriggerRegisterTimerEvent(t,15,false)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function J3E))
call STrig(GetHandleId(Z77),"OverpowerEndTrig",t)
call SInt(GetHandleId(Z77),"Count",0)
call SUnit(EC8,"Source",Z77)
call SReal(EC8,"OriginalTime",(TimerGetElapsed(E4)+1)*1.)
set t=null
set Z77=null
endfunction
function J5E takes nothing returns boolean
if GetSpellAbilityId()=='A1P9' then
call J0E()
endif
return false
endfunction
function BU8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function J5E))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function J1E))
call PU8('A1N3')
set t=null
endfunction
function J2E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local integer ML8=GetUnitAbilityLevel(Z77,'A0LC')
local integer LX9
local integer J_E
if GetTriggerEventId()==EVENT_UNIT_DEATH or(GetUnitAbilityLevel(Z77,'B02H')+GetUnitAbilityLevel(Z77,'B07S'))==0 or time>LReal(W57,"LastTime")or(GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT and Z77==GetSpellTargetUnit()and IsPurgeId(GetSpellAbilityId()))then
call LT7(W57)
call EA8(t)
call UnitRemoveAbility(Z77,'B02H')
call W78(Z77,0)
else
set LX9=R2I(GetUnitState(Z77,UNIT_STATE_LIFE)*(.04+.01*ML8))
set J_E=LInt(W57,"LastBonus")
if LX9!=J_E then
call SInt(W57,"LastBonus",LX9)
call W78(Z77,LX9)
endif
endif
set t=null
set Z77=null
return false
endfunction
function K4E takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DEATH)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function J2E))
call SUnit(EC8,"Source",GetTriggerUnit())
call SInt(EC8,"LastBonus",0)
call SReal(EC8,"LastTime",time+15)
set t=null
endfunction
function K7E takes nothing returns boolean
if GetSpellAbilityId()=='A0LC' then
call K4E()
endif
return false
endfunction
function K8E takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),'B02H')>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))==false and GetUnitAbilityLevel(GetTriggerUnit(),'A04R')==0 then
endif
return false
endfunction
function BV8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function K7E))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function K8E))
set t=null
endfunction
function PathingFalse5SecFunc takes nothing returns nothing
call SetUnitPathing(LUnit(GetT(),"s"),true)
call TriggerOff()
endfunction
function PathingFalse5Sec takes unit s returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterVariableEvent(t,"time",GREATER_THAN,time+5)
call TriggerAddCondition(t,Condition(function PathingFalse5SecFunc))
call SUnit(GetHandleId(t),"s",s)
call SetUnitPathing(s,false)
set t=null
endfunction
function K9E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
local real KDE=LReal(EC8,"rRealX1")
local real x2=LReal(EC8,"x2")
local real KEE=LReal(EC8,"rRealY1")
local real y2=LReal(EC8,"y2")
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl",Z77,"origin"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl",m5,"origin"))
call SetUnitPosition(Z77,x2,y2)
call AddTimedBoolBuff(m5,"4407",1)
call SetUnitPosition(m5,KDE,KEE)
if IsUnitInRegion(IF4,m5)then
call PathingFalse5Sec(m5)
endif
call LT7(EC8)
call EA8(t)
set t=null
set Z77=null
set m5=null
return false
endfunction
function KFE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local real KDE=GetUnitX(Z77)
local real KEE=GetUnitY(Z77)
local real x2=GetUnitX(m5)
local real y2=GetUnitY(m5)
local trigger t
local integer EC8
if IsUnitAlly(Z77,GetOwningPlayer(m5))or HasLinkin(GetSpellTargetUnit())==false then
set t=CreateTrigger()
set EC8=GetHandleId(t)
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Target",m5)
call SReal(EC8,"rRealX1",(KDE)*1.)
call SReal(EC8,"x2",(x2)*1.)
call SReal(EC8,"rRealY1",(KEE)*1.)
call SReal(EC8,"y2",(y2)*1.)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function K9E))
call QK8("SPLK",KDE,KEE,x2,y2,.5,0,1,1,.3)
call KillTrees(KDE,KEE,300)
call KillTrees(x2,y2,300)
endif
set Z77=null
set m5=null
set t=null
endfunction
function KGE takes nothing returns boolean
if GetSpellAbilityId()=='A0IN' or GetSpellAbilityId()=='A1AW' then
call KFE()
endif
return false
endfunction
function KHE takes nothing returns nothing
if(IsTerrainPathable(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),PATHING_TYPE_WALKABILITY))then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),(GetObjectName(('n03B'))))
endif
endfunction
function KIE takes nothing returns boolean
if GetSpellAbilityId()=='A0IN' or GetSpellAbilityId()=='A1AW' then
call KHE()
endif
return false
endfunction
function BW8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function KGE))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function KIE))
set t=null
endfunction
function KJE takes unit AC7,real x,real y,integer TA8 returns nothing
call SetUnitPosition(AC7,x,y)
if GetPlayerController(GetOwningPlayer(AC7))==MAP_CONTROL_COMPUTER then
call UnitAddAbility(AC7,'A0AP')
call SetUnitAbilityLevel(AC7,'A0AP',TA8)
endif
call IssueImmediateOrderById(AC7,852588)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\HowlOfTerror\\HowlCaster.mdl",x,y))
set AC7=null
endfunction
function KKE takes nothing returns boolean
if(IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false and(GetUnitAbilityLevel((GetFilterUnit()),'Bcyc')>0)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and IsUnitInGroup(GetFilterUnit(),p0)==false then
call GroupAddUnit(p0,GetFilterUnit())
if GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>S_4 then
call SetUnitState(GetFilterUnit(),UNIT_STATE_LIFE,GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)-(S_4))
else
call Dmg(Q0,GetFilterUnit(),NormalFire,S_4*1.33)
endif
endif
return false
endfunction
function KME takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit AC7=LUnit(EC8,"Caster")
local real l4=LReal(EC8,"Angle")
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
local integer TA8=LInt(EC8,"Level")
local group PBD=LGroup(EC8,"AlreadyDamaged")
local group g
if GetTriggerEvalCount(t)>10 then
call OF8(PBD)
call LT7(EC8)
call EA8(t)
else
set p0=PBD
set Q0=Z77
set S_4=TA8*20+10
set H04=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,325,Condition(function KKE))
call OF8(g)
set g=null
call KJE(AC7,x,y,TA8)
if ModuloInteger(GetTriggerEvalCount(t),2)==0 then
call KillUnit(CreateUnit(GetOwningPlayer(Z77),'e02A',x,y,0))
endif
set x=PQ8(x+200*Cos(l4*bj_DEGTORAD))
set y=PS8(y+200*Sin(l4*bj_DEGTORAD))
call SReal(EC8,"x",x*1.)
call SReal(EC8,"y",y*1.)
endif
set t=null
set Z77=null
set AC7=null
set PBD=null
return false
endfunction
function KNE takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x1=GetUnitX(Z77)
local real y1=GetUnitY(Z77)
local real x2=GetLocationX(l)
local real y2=GetLocationY(l)
local real l4=YI7(x1,y1,x2,y2)
local integer TA8=GetUnitAbilityLevel(Z77,'A17O')
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',x1,y1,0)
call AddPermanentAbility(AC7,'A0AP')
call SetUnitAbilityLevel(AC7,'A0AP',TA8)
call RemoveLocation(l)
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Caster",AC7)
call SInt(EC8,"Level",TA8)
call SReal(EC8,"x",x1*1.)
call SReal(EC8,"y",y1*1.)
call SReal(EC8,"Angle",l4*1.)
call SGroup(EC8,"AlreadyDamaged",OG8())
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function KME))
set t=null
set Z77=null
set l=null
set AC7=null
endfunction
function KOE takes nothing returns boolean
if GetSpellAbilityId()=='A17O' then
call KNE()
endif
return false
endfunction
function BX8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function KOE))
set t=null
endfunction
function KPE takes nothing returns nothing
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareMissile.mdl",GetTriggerUnit(),"weapon"))
endfunction
function KQE takes nothing returns boolean
if GetSpellAbilityId()=='A02A' then
call KPE()
endif
return false
endfunction
function BY8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerAddCondition(t,Condition(function KQE))
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
set t=null
endfunction
function KRE takes nothing returns boolean
return(GetSpellAbilityId()==('A0JC')or GetSpellAbilityId()==('A020')or GetSpellAbilityId()==('A29G')or GetSpellAbilityId()==('A29H')or(GetUnitPointValue(GetTriggerUnit())==500))and GetUnitAbilityLevel(GetTriggerUnit(),('A0N5'))>0
endfunction
function KSE takes nothing returns nothing
local real KTE=GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)
local real KUE=.03+.02*GetUnitAbilityLevel(GetTriggerUnit(),'A0N5')
local real P08=KTE*KUE
call UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),P08,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\ForkedLightning\\ForkedLightningTarget.mdl",GetEnumUnit(),"overhead"))
endfunction
function KVE takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false
endfunction
function KWE takes nothing returns nothing
local location SD9=GetUnitLoc(GetTriggerUnit())
local group QA9=OG8()
local real x=GetLocationX(SD9)
local real y=GetLocationY(SD9)
local boolexpr QZ9=Condition(function KVE)
call GroupEnumUnitsInRange(QA9,x,y,1025,QZ9)
call ForGroup(QA9,function KSE)
call RemoveLocation(SD9)
call OF8(QA9)
call DestroyBoolExpr(QZ9)
set SD9=null
set QA9=null
set QZ9=null
endfunction
function BZ8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function KRE))
call TriggerAddAction(t,function KWE)
set t=null
endfunction
function KXE takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and XC8(GetUnitTypeId(GetFilterUnit()))==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(H37))
endfunction
function KYE takes nothing returns nothing
local real x=GetUnitX(GetEnumUnit())
local real y=GetUnitY(GetEnumUnit())
local unit L07=CreateUnit(GetOwningPlayer(H37),'e000',x,y,0)
call UnitAddAbility(L07,'A05S')
call SetUnitAbilityLevel(L07,'A05S',H67)
call IssueTargetOrderById(L07,852119,GetEnumUnit())
call UnitApplyTimedLife(L07,'BTLF',3)
call UnitAddAbility(L07,'Aloc')
if(GetPlayerController(GetOwningPlayer(L07))==MAP_CONTROL_COMPUTER)then
call IssueTargetOrderById(L07,852119,GetEnumUnit())
endif
set L07=null
endfunction
function KZE takes nothing returns nothing
local group g=OG8()
set H37=GetTriggerUnit()
if GetSpellAbilityId()=='A29G' then
set H67=GetUnitAbilityLevel(GetTriggerUnit(),'A29G')+4
else
set H67=GetUnitAbilityLevel(GetTriggerUnit(),'A29H')+7
endif
call GroupEnumUnitsInRect(g,bj_mapInitialPlayableArea,Condition(function KXE))
call ForGroup(g,function KYE)
call OF8(g)
set g=null
endfunction
function KAE takes nothing returns boolean
if GetSpellAbilityId()=='A29G' or GetSpellAbilityId()=='A29H' then
call KZE()
endif
return false
endfunction
function BA8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function KAE))
set t=null
endfunction
function KBE takes nothing returns boolean
return GetSpellAbilityId()=='A0JC' and(GetSpellTargetUnit()==null or HasLinkin(GetSpellTargetUnit())==false)
endfunction
function A0JC_TargetCond takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitType(GetFilterUnit(),UNIT_TYPE_DEAD)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false and(GetUnitAbilityLevel(GetFilterUnit(),'Aloc')+GetUnitAbilityLevel(GetFilterUnit(),'A04R')+GetUnitAbilityLevel(GetFilterUnit(),'Avul'))==0
endfunction
function Dist_Uxy takes unit s,real x2,real y2 returns real
local real x1=GetUnitX(s)
local real y1=GetUnitY(s)
return SquareRoot((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
endfunction
function Dist_U takes unit s,unit u returns real
local real x1=GetUnitX(s)
local real y1=GetUnitY(s)
local real x2=GetUnitX(u)
local real y2=GetUnitY(u)
return SquareRoot((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
endfunction
function FindNearestUnit takes nothing returns nothing
local real r=Dist_Uxy(GetEnumUnit(),globalX,globalY)
if r<globalR then
set globalR=r
set globalS=GetEnumUnit()
endif
endfunction
function GetA0JCTarget takes unit s,real x,real y returns unit
local group g=CreateGroup()
call GroupEnumUnitsInRange(g,x,y,350,Condition(function A0JC_TargetCond))
set globalS=null
set globalX=x
set globalY=y
set globalR=9999
call ForGroup(g,function FindNearestUnit)
return globalS
endfunction
function KCE takes nothing returns nothing
local unit N28=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local unit m5=GetSpellTargetUnit()
local unit oA
call RemoveLocation(l)
set l=null
if m5==null then
set m5=GetA0JCTarget(N28,x,y)
endif
if m5!=null then
set oA=CreateUnit(GetOwningPlayer(N28),'e000',GetUnitX(m5),GetUnitY(m5),0)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",m5,"origin"))
call UnitShareVision(m5,GetOwningPlayer(N28),true)
call AddPermanentAbility(oA,'A05S')
call SetUnitAbilityLevel(oA,'A05S',GetUnitAbilityLevel(N28,'A0JC'))
call IssueTargetOrderById(oA,852119,m5)
call UnitApplyTimedLife(oA,'BTLF',4.5)
call SetUnitPathing(oA,false)
if(GetPlayerController(GetOwningPlayer(oA))==MAP_CONTROL_COMPUTER)then
call Y07(.01)
call IssueTargetOrderById(oA,852119,m5)
endif
set oA=CreateUnit(GetOwningPlayer(N28),'e00E',GetUnitX(m5),GetUnitY(m5),0)
call AddPermanentAbility(oA,'AZ3F')
call IssueTargetOrderById(oA,852095,m5)
call UnitApplyTimedLife(oA,'BTLF',1)
call UnitShareVision(m5,GetOwningPlayer(N28),false)
else
set oA=CreateUnit(GetOwningPlayer(N28),'e000',x,y,0)
call UnitApplyTimedLife(oA,'BTLF',3)
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(N28),'e00E',x,y,0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call AddTimedLightningToUnit(bj_lastCreatedUnit,oA,0.3,"CLSB",false)
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",x,y))
endif
set N28=null
set m5=null
set oA=null
endfunction
function BB8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function KBE))
call TriggerAddAction(t,function KCE)
set t=null
endfunction
function K3E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit AC7=LUnit(EC8,"Caster")
call SetUnitX(AC7,GetUnitX(Z77))
call SetUnitY(AC7,GetUnitY(Z77))
if GetTriggerEvalCount(t)>80 then
call LT7(EC8)
call EA8(t)
endif
set t=null
set Z77=null
set AC7=null
return false
endfunction
function K6E takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e02C',GetUnitX(Z77),GetUnitY(Z77),0)
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call AddPermanentAbility(AC7,'A1FM')
call SetUnitAbilityLevel(AC7,'A1FM',GetUnitAbilityLevel(Z77,'A020'))
call IssueTargetOrderById(AC7,852119,m5)
call UnitApplyTimedLife(AC7,'BTLF',10)
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Caster",AC7)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function K3E))
set Z77=null
set m5=null
set AC7=null
set t=null
endfunction
function KLE takes nothing returns boolean
if GetSpellAbilityId()=='A020' and HasLinkin(GetSpellTargetUnit())==false then
call K6E()
endif
return false
endfunction
function BC8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerAddCondition(t,Condition(function KLE))
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
set t=null
endfunction
function K1E takes nothing returns boolean
return GetSpellAbilityId()==('A0I3')and(IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))or HasLinkin(GetSpellTargetUnit())==false)
endfunction
function WU takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local real P99=LReal(EC8,"Damage")+25
call UnitDamageTarget(N28,N28,P99,false,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call LT7(EC8)
call PauseTimer(t)
call DestroyTimer(t)
set t=null
set N28=null
endfunction
function K0E takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local real P99=25+25*GetUnitAbilityLevel(N28,'A0I3')
local timer t=CreateTimer()
local integer EC8=GetHandleId(t)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",m5,"origin"))
if IsUnitAlly(m5,GetOwningPlayer(N28))and GetUnitState(m5,UNIT_STATE_LIFE)>1. then
call SetUnitState(m5,UNIT_STATE_LIFE,GetUnitState(m5,UNIT_STATE_LIFE)+2*P99)
else
call UnitDamageTarget(N28,m5,2*P99,false,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endif
call SUnit(EC8,"Hero",N28)
call SReal(EC8,"Damage",P99)
call TimerStart(t,0,false,function WU)
set N28=null
set m5=null
set t=null
endfunction
function DP9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function K1E))
call TriggerAddAction(t,function K0E)
set t=null
endfunction
function WV takes nothing returns nothing
local unit oA=CreateUnit(GetOwningPlayer(MB),'e00E',GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call AddPermanentAbility(oA,'A0MJ')
call SetUnitAbilityLevel(oA,'A0MJ',HB4)
call IssueTargetOrderById(oA,852587,GetEnumUnit())
set oA=null
endfunction
function K5E takes unit Z77,unit m5,integer TA8 returns nothing
local group g=OG8()
set H04=Z77
set HB4=TA8
set MB=Z77
call GroupEnumUnitsInRange(g,GetUnitX(m5),GetUnitY(m5),700,Condition(function U38))
call ForGroup(g,function WV)
call OF8(g)
set g=null
endfunction
function WW takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local real K2E=LReal(W57,"Life")
local unit Z77
local unit X77=LUnit(W57,"Target")
local integer ML8
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if LState(GetTriggerUnit(),"BorrowedTime|Active")==false then
if K2E<GetEventDamage()then
set Z77=LUnit(W57,"Source")
set ML8=LInt(W57,"Level")
call DestroyEffect(LEff(W57,"FX"))
call SBool(GetHandleId(X77),"AphoticShield|Active",false)
call LT7(W57)
call EA8(t)
call AddLife(GetTriggerUnit(),K2E)
call K5E(Z77,GetTriggerUnit(),ML8)
set GZ[256+GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]=false
elseif GetEventDamage()>0 then
call AddLife(GetTriggerUnit(),GetEventDamage())
call SReal(W57,"Life",K2E-GetEventDamage())
endif
endif
else
set Z77=LUnit(W57,"Source")
set ML8=LInt(W57,"Level")
call SBool(GetHandleId(X77),"AphoticShield|Active",false)
set GZ[256+GetPlayerId(GetOwningPlayer(LUnit(W57,"AphTarg")))]=false
call DestroyEffect(LEff(W57,"FX"))
call LT7(W57)
call EA8(t)
call K5E(Z77,X77,ML8)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function K_E takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit X77=GetSpellTargetUnit()
local unit Z77=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A0MF')
local integer WED=GetHandleId(X77)
local real K2E
if LBool(WED,"AphoticShield|Active")then
call TriggerEvaluate(LTrig(WED,"AphoticShield|Trigger"))
endif
call UnitRemoveBuffs(X77,false,true)
call T99(X77,0,0)
if ML8==1 then
set K2E='n'
elseif ML8==2 then
set K2E=140
elseif ML8==3 then
set K2E=170
else
set K2E=200
endif
call SReal(W57,"Life",K2E)
call SEff(W57,"FX",AddSpecialEffectTarget("war3mapImported\\Defensive Barrier big.mdx",X77,"chest"))
call SUnit(W57,"Source",Z77)
call SInt(W57,"Level",ML8)
call SUnit(W57,"Target",X77)
set GZ[256+GetPlayerId(GetOwningPlayer(GetSpellTargetUnit()))]=true
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,15,false)
call TriggerAddCondition(t,Condition(function WW))
call STrig(WED,"AphoticShield|Trigger",t)
call SBool(WED,"AphoticShield|Active",true)
set t=null
set X77=null
set Z77=null
endfunction
function M4E takes nothing returns boolean
if GetSpellAbilityId()=='A0MF' then
call K_E()
endif
return false
endfunction
function WY takes nothing returns nothing
if GetUnitAbilityLevel(GetSpellTargetUnit(),'BNdo')>0 then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n03I'))
endif
endfunction
function M7E takes nothing returns boolean
if GetSpellAbilityId()=='A0MF' then
call WY()
endif
return false
endfunction
function s7 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function M7E))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function M4E))
set t=null
endfunction
function M8E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
if GetTriggerEventId()==EVENT_UNIT_DEATH or IssueImmediateOrderById(N28,852129)then
call LT7(EC8)
call EA8(t)
endif
set t=null
set N28=null
return false
endfunction
function M9E takes unit N28 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function M8E))
call SUnit(EC8,"Hero",N28)
set t=null
endfunction
function MDE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit AM7=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(AM7,'A0NS')
local integer VL8=2+ML8
local real NN9
if ML8==0 then
set ML8=GetUnitAbilityLevel(AM7,'A1DA')
set VL8=4+1*ML8
endif
if GetTriggerEventId()==EVENT_UNIT_DAMAGED and LState(AM7,"BorrowedTime|Active")then
call AddLife(AM7,GetEventDamage())
call AddLife(AM7,GetEventDamage())
elseif(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and(GetSpellAbilityId()=='A0NS' or GetSpellAbilityId()=='A1DA'))or(GetTriggerEventId()==EVENT_UNIT_DAMAGED and LState(AM7,"BorrowedTime|CD")==false and GetUnitState(AM7,UNIT_STATE_LIFE)<400 and GetUnitAbilityLevel(AM7,'BNdo')==0)then
call TimerStart(M_4[GetPlayerId(GetOwningPlayer(AM7))],70-10*ML8,false,null)
call AddTimedBoolBuff(AM7,"BorrowedTime|Active",VL8)
call AddTimedBoolBuff(AM7,"BorrowedTime|CD",70-10*ML8)
call UnitRemoveBuffs(AM7,false,true)
call T99(AM7,0,0)
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
call DisableTrigger(t)
set HL7=true
if IssueImmediateOrderById(AM7,852129)==false then
call M9E(AM7)
endif
set HL7=false
call EnableTrigger(t)
endif
call QG8("Abilities\\Spells\\Undead\\Unsummon\\UnsummonTarget.mdl",AM7,"origin",VL8)
endif
set t=null
set AM7=null
return false
endfunction
function MEE takes unit N28,boolean SY8 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function MDE))
if SY8 then
set UX7[GetPlayerId(GetOwningPlayer(N28))]=t
endif
set t=null
endfunction
function MFE takes nothing returns boolean
if(GetLearnedSkill()=='A0NS' or GetLearnedSkill()=='A1DA')and IsUnitIllusion(GetTriggerUnit())==false and(GetUnitAbilityLevel(GetTriggerUnit(),'A0NS')==1 or GetUnitAbilityLevel(GetTriggerUnit(),'A1DA')==1)then
call MEE(GetTriggerUnit(),false)
endif
return false
endfunction
function DR9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function MFE))
set t=null
endfunction
function MGE takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),('B066'))>0 or GetUnitAbilityLevel(GetAttacker(),('A0MG'))>0
endfunction
function MHE takes nothing returns nothing
local unit N99=GetAttacker()
local unit m5=GetTriggerUnit()
local unit MIE
local integer TA8=GetUnitAbilityLevel(N99,('A0MG'))
local unit AC7=CreateUnit(GetOwningPlayer(N99),'e00E',GetUnitX(N99),GetUnitY(N99),0)
if TA8>0 then
call SInt(GetHandleId(m5),"MarkOfTheAbyss|Level",TA8)
else
set TA8=LInt(GetHandleId(m5),"MarkOfTheAbyss|Level")
endif
if IsUnitEnemy(m5,GetOwningPlayer(N99))then
call AddPermanentAbility(AC7,('A0MH'))
call SetUnitAbilityLevel(AC7,('A0MH'),TA8)
call IssueTargetOrderById(AC7,852101,N99)
endif
set N99=null
set m5=null
set MIE=null
set AC7=null
endfunction
function DQ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function MGE))
call TriggerAddAction(t,function MHE)
set t=null
endfunction
function MJE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local integer C77=(LoadInteger(R8,(W57),(34)))
local real P08
local integer VL8
local unit Q49
if ML8==1 then
set P08=15
set VL8=10
elseif ML8==2 then
set P08=20
set VL8=12
elseif ML8==3 then
set P08=25
set VL8=14
elseif ML8==4 then
set P08=30
set VL8=16
endif
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetTriggerEvalCount(t)>1 and(GetSpellAbilityId()=='A0S1' or IsPurgeId(GetSpellAbilityId()))and HasLinkin(GetSpellTargetUnit())==false and X77==GetSpellTargetUnit()then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_DEATH then
set Q49=GetKillingUnit()
if WL8(Q49)then
set Q49=(Y7[GetPlayerId(GetOwningPlayer((Q49)))])
endif
if GetTriggerUnit()==X77 or Q49==X77 then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(X77,'A1W3')
call UnitRemoveAbility(X77,'B0DO')
endif
else
set C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
if C77==VL8 then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(X77,'A1W3')
call UnitRemoveAbility(X77,'B0DO')
endif
call Dmg(Z77,X77,NormalFire,P08)
endif
set t=null
set Z77=null
set X77=null
set Q49=null
return false
endfunction
function MKE takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A0S1')
local real MME
local real JNI
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\ReviveDemon\\ReviveDemon.mdl",X77,"overhead"))
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A1W3',false)
call AddPermanentAbility(X77,'A1W3')
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function MJE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveInteger(R8,(W57),(34),(0))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Other\\SoulBurn\\SoulBurnbuff.mdl",X77,"overhead")))
set Z77=null
set X77=null
set t=null
endfunction
function MNE takes nothing returns nothing
if GetUnitAbilityLevel(GetEnumUnit(),'B0DO')>0 then
set JH7=JH7+1
endif
endfunction
function MOE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local group g=OG8()
set H04=Z77
set JH7=0
call GroupEnumUnitsInRange(g,0,0,9999,Condition(function UM8))
call ForGroup(g,function MNE)
call OF8(g)
if JH7==0 then
if GetUnitAbilityLevel(Z77,'B0EZ')>0 then
call UnitRemoveAbility(Z77,'A2AR')
call UnitRemoveAbility(Z77,'A2AS')
call UnitRemoveAbility(Z77,'A2AU')
call UnitRemoveAbility(Z77,'A2AT')
call UnitRemoveAbility(Z77,'A2AQ')
call UnitRemoveAbility(Z77,'A2AP')
call UnitRemoveAbility(Z77,'B0EZ')
endif
elseif JH7==1 then
if GetUnitAbilityLevel(Z77,'A2AR')==0 then
call UnitRemoveAbility(Z77,'A2AR')
call UnitRemoveAbility(Z77,'A2AS')
call UnitRemoveAbility(Z77,'A2AU')
call UnitRemoveAbility(Z77,'A2AT')
call UnitRemoveAbility(Z77,'A2AQ')
call UnitRemoveAbility(Z77,'A2AP')
call UnitRemoveAbility(Z77,'B0EZ')
call UnitAddAbility(Z77,'A2AR')
endif
elseif JH7==2 then
if GetUnitAbilityLevel(Z77,'A2AS')==0 then
call UnitRemoveAbility(Z77,'A2AR')
call UnitRemoveAbility(Z77,'A2AS')
call UnitRemoveAbility(Z77,'A2AU')
call UnitRemoveAbility(Z77,'A2AT')
call UnitRemoveAbility(Z77,'A2AQ')
call UnitRemoveAbility(Z77,'A2AP')
call UnitRemoveAbility(Z77,'B0EZ')
call UnitAddAbility(Z77,'A2AS')
endif
elseif JH7==3 then
if GetUnitAbilityLevel(Z77,'A2AU')==0 then
call UnitRemoveAbility(Z77,'A2AR')
call UnitRemoveAbility(Z77,'A2AS')
call UnitRemoveAbility(Z77,'A2AU')
call UnitRemoveAbility(Z77,'A2AT')
call UnitRemoveAbility(Z77,'A2AQ')
call UnitRemoveAbility(Z77,'A2AP')
call UnitRemoveAbility(Z77,'B0EZ')
call UnitAddAbility(Z77,'A2AU')
endif
elseif JH7==4 then
if GetUnitAbilityLevel(Z77,'A2AT')==0 then
call UnitRemoveAbility(Z77,'A2AR')
call UnitRemoveAbility(Z77,'A2AS')
call UnitRemoveAbility(Z77,'A2AU')
call UnitRemoveAbility(Z77,'A2AT')
call UnitRemoveAbility(Z77,'A2AQ')
call UnitRemoveAbility(Z77,'A2AP')
call UnitRemoveAbility(Z77,'B0EZ')
call UnitAddAbility(Z77,'A2AT')
endif
elseif JH7==5 then
if GetUnitAbilityLevel(Z77,'A2AQ')==0 then
call UnitRemoveAbility(Z77,'A2AR')
call UnitRemoveAbility(Z77,'A2AS')
call UnitRemoveAbility(Z77,'A2AU')
call UnitRemoveAbility(Z77,'A2AT')
call UnitRemoveAbility(Z77,'A2AQ')
call UnitRemoveAbility(Z77,'A2AP')
call UnitRemoveAbility(Z77,'B0EZ')
call UnitAddAbility(Z77,'A2AQ')
endif
elseif JH7>=6 then
if GetUnitAbilityLevel(Z77,'A2AP')==0 then
call UnitRemoveAbility(Z77,'A2AR')
call UnitRemoveAbility(Z77,'A2AS')
call UnitRemoveAbility(Z77,'A2AU')
call UnitRemoveAbility(Z77,'A2AT')
call UnitRemoveAbility(Z77,'A2AQ')
call UnitRemoveAbility(Z77,'A2AP')
call UnitRemoveAbility(Z77,'B0EZ')
call UnitAddAbility(Z77,'A2AP')
endif
endif
set t=null
set Z77=null
return false
endfunction
function MPE takes nothing returns boolean
if GetSpellAbilityId()=='A0S1' and HasLinkin(GetSpellTargetUnit())==false then
call MKE()
call RW8(GetSpellTargetUnit(),'A1W3',1,7+3*GetUnitAbilityLevel(GetTriggerUnit(),'A0S1'),GetTriggerUnit(),'A0S1',false)
endif
return false
endfunction
function MQE takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function MOE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2AR',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2AS',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2AU',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2AT',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2AQ',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2AP',false)
set t=null
endfunction
function MRE takes nothing returns boolean
if GetLearnedSkill()=='A0S1' and GetUnitAbilityLevel(GetTriggerUnit(),'A0S1')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call MQE()
endif
return false
endfunction
function B58 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function MPE))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function MRE))
set t=null
endfunction
function MSE takes nothing returns nothing
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",GetEnumUnit(),"origin"))
call Dmg(GetTriggerUnit(),GetEnumUnit(),HeroNormal,GetUnitAbilityLevel(GetTriggerUnit(),'A0C6')*35+65)
endfunction
function SpinFilter takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and((GetUnitTypeId(GetFilterUnit())=='ebal' or GetUnitTypeId(GetFilterUnit())=='umtw')or(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false and NH8(GetFilterUnit())==false))
endfunction
function MTE takes nothing returns nothing
local group g=OG8()
local unit AM7=GetTriggerUnit()
call GroupEnumUnitsInRange(g,GetUnitX(AM7),GetUnitY(AM7),300,Condition(function SpinFilter))
call ForGroup(g,function MSE)
call SetUnitAnimation(AM7,"spin")
call TK8(AM7,.6)
call AddTimedBoolBuff(AM7,"MTE",.5-.05*GetUnitAbilityLevel(GetTriggerUnit(),'A0C6'))
call OF8(g)
set g=null
set AM7=null
endfunction
function MUE takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),'B03P')>0 and IsUnitType(GetAttacker(),UNIT_TYPE_STRUCTURE)==false and IsUnitType(GetAttacker(),UNIT_TYPE_MECHANICAL)==false and GetUnitAbilityLevel(GetAttacker(),'A04R')==0 and IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false and Ran()<17 and LState(GetTriggerUnit(),"MTE")==false then
call MTE()
endif
return false
endfunction
function B28 takes nothing returns nothing
local trigger t=CreateTrigger()
call ky(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function MUE))
set t=null
endfunction
function xC takes nothing returns boolean
return UB8()and GetUnitAbilityLevel(GetFilterUnit(),'B008')==0 and GetUnitAbilityLevel(GetFilterUnit(),'Bcyc')==0
endfunction
function xd takes integer W57,integer MVE returns nothing
local integer i=1
loop
exitwhen i>MVE
call DestroyEffect((LoadEffectHandle(R8,(W57),(2700+i))))
set i=i+1
endloop
endfunction
function MWE takes nothing returns nothing
if((IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetEnumUnit()))!=MAP_CONTROL_USER))then
set hq[640+GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=Bz+1+(.5*GetUnitAbilityLevel(GetTriggerUnit(),'A0I6'))
set hq[832+GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=Bz+1+(.5*GetUnitAbilityLevel(GetTriggerUnit(),'A0I6'))
call IssueTargetOrderById(GetEnumUnit(),851971,H07)
else
call IssueTargetOrderById(GetEnumUnit(),851983,H07)
endif
endfunction
function xE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local group g=LoadGroupHandle(R8,(W57),(220))
local unit AM7=LoadUnitHandle(R8,(W57),(14))
local integer MVE=LoadInteger(R8,(W57),(365))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local integer C77=(LoadInteger(R8,(W57),(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 C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
if C77==(16+4*ML8)then
call UnitRemoveAbility(AM7,'A0I5')
call OF8(g)
call xd(W57,MVE)
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
call DisableTrigger(t)
set H07=AM7
call ForGroup(g,function MWE)
call EnableTrigger(t)
endif
else
if IsUnitInGroup(GetTriggerUnit(),g)and UnitIsSleeping(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'B008')==0 and GetIssuedOrderId()!=851973 and HL7==false then
call DisableTrigger(t)
if((IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER))then
call DisableTrigger(R04[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))])
call IssueTargetOrderById(GetTriggerUnit(),851971,AM7)
call EnableTrigger(R04[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))])
else
call IssueTargetOrderById(GetTriggerUnit(),851983,AM7)
endif
call EnableTrigger(t)
endif
endif
set t=null
set g=null
set AM7=null
return false
endfunction
function xf takes nothing returns nothing
set HB4=HB4+1
call SaveEffectHandle(R8,(HC4),(2700+HB4),(AddSpecialEffectTarget("Abilities\\Weapons\\LavaSpawnMissile\\LavaSpawnBirthMissile.mdl",GetEnumUnit(),"chest")))
endfunction
function xF takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AM7=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(AM7,'A0I6')
local group g=OG8()
call AddPermanentAbility(AM7,'A0I5')
call SetUnitAbilityLevel(AM7,'A0I5',ML8)
set H04=AM7
set H07=AM7
set HB4=0
set HC4=W57
call GroupEnumUnitsInRange(g,GetUnitX(AM7),GetUnitY(AM7),300+25,Condition(function xC))
call ForGroup(g,function xf)
call ForGroup(g,function MWE)
call SaveInteger(R8,(W57),(365),HB4)
call SaveUnitHandle(R8,(W57),(14),AM7)
call SaveGroupHandle(R8,(W57),(220),g)
call SaveInteger(R8,(W57),(5),(ML8))
call SaveInteger(R8,(W57),(34),(0))
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function xE))
set t=null
set g=null
set AM7=null
endfunction
function MXE takes nothing returns boolean
if GetSpellAbilityId()=='A0I6'then
call xF()
endif
return false
endfunction
function B_8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function MXE))
set t=null
endfunction
function MYE takes nothing returns nothing
call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),'A2IC',false)
call T68(GetEnumUnit(),'A2IC',1,6,'B0FV')
endfunction
function MYE_Agha takes nothing returns nothing
call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),'A2IC',false)
call T68(GetEnumUnit(),'A2IC',1,10,'B0FV')
endfunction
function MZE takes nothing returns boolean
return GetSpellAbilityId()=='A0E2' or GetSpellAbilityId()=='A1MR'
endfunction
function RefreshCullingBladeTimer takes nothing returns nothing
local timer tm=GetExpiredTimer()
local integer id=GetHandleId(tm)
local unit s=LUnit(id,"unit")
local integer i=0
set id=LInt(id,"spellid")
set i=GetUnitAbilityLevel(s,id)
call UnitRemoveAbility(s,id)
call UnitAddAbility(s,id)
call SetUnitAbilityLevel(s,id,i)
set tm=null
set s=null
endfunction
function RefreshCullingBlade takes unit s,integer i returns nothing
local timer tm=CreateTimer()
local integer id=GetHandleId(tm)
call TimerStart(tm,0,false,function RefreshCullingBladeTimer)
call SUnit(id,"unit",s)
call SInt(id,"spellid",i)
set tm=null
endfunction
function MAE takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local real K2E=GetUnitState(X77,UNIT_STATE_LIFE)
local integer ML8=GetUnitAbilityLevel(N28,'A0E2')
local unit AC7
local boolean MBE=false
local group g
if ML8==0 then
set ML8=GetUnitAbilityLevel(N28,'A1MR')
set MBE=true
endif
if(MBE and((K2E<300 and ML8==1)or(K2E<450 and ML8==2)or(K2E<625 and ML8==3)))or(K2E<ML8*100+150)then
call PlaySoundOnUnitBJ(BN,'d',X77)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl",X77,"overhead"))
if IsUnitType(X77,UNIT_TYPE_HERO)then
call RefreshCullingBlade(GetTriggerUnit(),GetSpellAbilityId())
endif
set AC7=CreateUnit(GetOwningPlayer(N28),'e00E',0,0,0)
call UnitRemoveBuffs(X77,true,true)
call UnitRemoveAbility(X77,'Aetl')
call UnitDamageTarget(AC7,X77,100000000.,true,false,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\AxeUltiMSFX_01.mdx",N28,"origin"))
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(N28),GetUnitY(N28),925,Condition(function VI8))
if MBE then
call ForGroup(g,function MYE_Agha)
else
call ForGroup(g,function MYE)
endif
call OF8(g)
set g=null
endif
set N28=null
set X77=null
set AC7=null
endfunction
function C48 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function MZE))
call TriggerAddAction(t,function MAE)
set t=null
endfunction
function MCE takes nothing returns boolean
return GetSpellAbilityId()=='A0GK' and HasLinkin(GetSpellTargetUnit())==false
endfunction
function M3E takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetSpellTargetUnit(),20+70*GetUnitAbilityLevel(GetTriggerUnit(),'A0GK'),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(),'A0GK'))
endif
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl",GetSpellTargetUnit(),"origin"))
endfunction
function M6E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local unit Z77=LUnit(EC8,"Source")
local player p=ED8(EC8,"p")
local integer TA8=LInt(EC8,"Level")
local unit oA
if GetUnitAbilityLevel(m5,'B02F')==0 then
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A04Y',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A2O9',false)
call LT7(EC8)
call EA8(t)
elseif GetTriggerEventId()==EVENT_UNIT_ATTACKED and GetTriggerUnit()==m5 then
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A04Y',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A2O9',false)
if((IsUnitType(GetAttacker(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetAttacker()))==MAP_CONTROL_COMPUTER))then
call IssuePointOrderById(GetAttacker(),851986,GetUnitX(GetAttacker())+GetRandomReal(0,150.)-75.,GetUnitY(GetAttacker())+GetRandomReal(0,150.)-75.)
else
call UnitRemoveAbility(m5,'B02F')
set oA=CreateUnit(p,'e00E',GetUnitX(m5),GetUnitY(m5),0)
call AddPermanentAbility(oA,'A04Y')
call SetUnitAbilityLevel(oA,'A04Y',TA8)
call IssueTargetOrderById(oA,852227,GetAttacker())
call LT7(EC8)
call EA8(t)
endif
elseif GetTriggerEventId()!=EVENT_UNIT_ATTACKED then
if GetUnitState(m5,UNIT_STATE_LIFE)>21 then
call SetUnitState(m5,UNIT_STATE_LIFE,GetUnitState(m5,UNIT_STATE_LIFE)-20)
else
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A04Y',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A2O9',false)
call UnitRemoveAbility(m5,'B02F')
call Dmg(Z77,m5,NormalFire,50)
call LT7(EC8)
call EA8(t)
endif
endif
set t=null
set p=null
set oA=null
set m5=null
set Z77=null
return false
endfunction
function MLE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
set EC8=GetHandleId(t)
call SUnit(EC8,"Target",m5)
call SUnit(EC8,"Source",Z77)
call DA8(EC8,"p",GetOwningPlayer(Z77))
call SInt(EC8,"Level",GetUnitAbilityLevel(Z77,'A04Y'))
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_ATTACKED)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function M6E))
if GetUnitAbilityLevel(m5,'A04Y')>0 then
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A04Y',false)
call AddPermanentAbility(m5,'A2O9')
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A2O9',true)
endif
set X34=true
call Dmg(Z77,m5,HeroNormal,0)
set X34=false
set Z77=null
set m5=null
set t=null
endfunction
function M1E takes nothing returns boolean
if GetSpellAbilityId()=='A04Y'and IsCourier(GetSpellTargetUnit())==false then
call MLE()
endif
return false
endfunction
function M0E takes nothing returns boolean
if GetSpellAbilityId()=='A04Y' and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)then
if GetOwningPlayer(GetTriggerUnit())!=GetOwningPlayer(GetSpellTargetUnit())and IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and(LBool(GetHandleId(GetOwningPlayer(GetSpellTargetUnit())),"DisableHelp"))then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n038'))
endif
endif
return false
endfunction
function M5E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(Z77,'B02F')
call UnitRemoveAbility(Z77,'A2O9')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A04Y',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2O9',false)
set t=null
set Z77=null
return false
endfunction
function M2E takes nothing returns boolean
local trigger t
if GetIssuedOrderId()==852589and GetUnitAbilityLevel(GetTriggerUnit(),'A2O9')>0 then
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function M5E))
call SaveUnitHandle(R8,(GetHandleId(t)),(2),(GetTriggerUnit()))
endif
return false
endfunction
function C78 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function M1E))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function M0E))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function M2E))
set t=null
endfunction
function M_E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local unit m5=LUnit(W57,"Target")
local real NN9
local integer C77=6
local fogmodifier N4E=(LoadFogModifierHandle(R8,(W57),(42)))
if GetUnitAbilityLevel(Z77,'A1D9')>0 then
set C77=8
endif
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST then
call FogModifierStop(N4E)
call DestroyFogModifier(N4E)
call LT7(W57)
call EA8(t)
elseif GetTriggerEvalCount(t)>C77 then
call FogModifierStop(N4E)
call DestroyFogModifier(N4E)
call LT7(W57)
call EA8(t)
call ZN7(Z77)
else
set NN9=RMinBJ(.05*GetUnitState(m5,UNIT_STATE_MAX_MANA),GetUnitState(m5,UNIT_STATE_MANA))
if GetUnitAbilityLevel(Z77,'A1D9')>0 then
set NN9=RMinBJ(.1*GetUnitState(m5,UNIT_STATE_MAX_MANA),GetUnitState(m5,UNIT_STATE_MANA))
endif
if NN9>0 then
call SetUnitState(Z77,UNIT_STATE_MANA,GetUnitState(Z77,UNIT_STATE_MANA)+NN9)
call SetUnitState(m5,UNIT_STATE_MANA,GetUnitState(m5,UNIT_STATE_MANA)-NN9)
endif
endif
set t=null
set Z77=null
set m5=null
set N4E=null
return false
endfunction
function N7E takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local fogmodifier N4E=CreateFogModifierRadius(GetOwningPlayer(Z77),FOG_OF_WAR_VISIBLE,GetUnitX(m5),GetUnitY(m5),350,true,true)
call FogModifierStart(N4E)
call UnitRemoveAbility(m5,'B02F')
call UnitRemoveAbility(m5,'BUsp')
call UnitRemoveAbility(m5,'Bust')
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t,Condition(function M_E))
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Target",m5)
call SaveFogModifierHandle(R8,(EC8),(42),(N4E))
set Z77=null
set m5=null
set t=null
set N4E=null
endfunction
function N8E takes nothing returns boolean
if GetSpellAbilityId()=='A02Q' or GetSpellAbilityId()=='A1D9' then
call N7E()
endif
return false
endfunction
function C88 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function N8E))
set t=null
endfunction
function N9E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local real LBD=(LoadReal(R8,(GetHandleId(X77)),(789)))
call FlushChildHashtable(R8,(W57))
call EA8(t)
if GetTriggerEventId()==EVENT_WIDGET_DEATH or LBD<(TimerGetElapsed(E4))then
call UnitRemoveAbility(X77,'A2OG')
call UnitRemoveAbility(X77,'A2OA')
call UnitRemoveAbility(X77,'A2OF')
call UnitRemoveAbility(X77,'A2OH')
call UnitRemoveAbility(X77,'B0GE')
endif
set t=null
set X77=null
return false
endfunction
function NDE takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A2OI')
if ML8==1 then
call UnitRemoveAbility(X77,'B0GE')
call UnitRemoveAbility(X77,'A2OA')
call UnitRemoveAbility(X77,'A2OF')
call UnitRemoveAbility(X77,'A2OH')
call AddPermanentAbility(X77,'A2OG')
call UnitMakeAbilityPermanent(X77,true,'A2OD')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A2OG',false)
elseif ML8==2 then
call UnitRemoveAbility(X77,'B0GE')
call UnitRemoveAbility(X77,'A2OG')
call UnitRemoveAbility(X77,'A2OF')
call UnitRemoveAbility(X77,'A2OH')
call AddPermanentAbility(X77,'A2OA')
call UnitMakeAbilityPermanent(X77,true,'A2OE')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A2OA',false)
elseif ML8==3 then
call UnitRemoveAbility(X77,'B0GE')
call UnitRemoveAbility(X77,'A2OG')
call UnitRemoveAbility(X77,'A2OA')
call UnitRemoveAbility(X77,'A2OH')
call AddPermanentAbility(X77,'A2OF')
call UnitMakeAbilityPermanent(X77,true,'A2OC')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A2OF',false)
elseif ML8==4 then
call UnitRemoveAbility(X77,'B0GE')
call UnitRemoveAbility(X77,'A2OG')
call UnitRemoveAbility(X77,'A2OA')
call UnitRemoveAbility(X77,'A2OF')
call AddPermanentAbility(X77,'A2OH')
call UnitMakeAbilityPermanent(X77,true,'A2OB')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A2OH',false)
endif
call TriggerRegisterTimerEvent(t,20,false)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function N9E))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveReal(R8,(GetHandleId(X77)),(789),((19.9+(TimerGetElapsed(E4)))*1.))
set t=null
set Z77=null
set X77=null
endfunction
function NEE takes nothing returns boolean
if GetSpellAbilityId()=='A2OI' and HasLinkin(GetSpellTargetUnit())==false then
call NDE()
endif
return false
endfunction
function CD8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function NEE))
set t=null
endfunction
function NFE takes unit Z77,unit X77,real HHE returns nothing
call SetUnitState(Z77,UNIT_STATE_LIFE,GetUnitState(Z77,UNIT_STATE_LIFE)+GetUnitState(X77,UNIT_STATE_MAX_LIFE)*HHE)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\HeroBloodElfBlood.mdl",Z77,"overhead"))
endfunction
function NGE takes nothing returns boolean
if O18(GetFilterUnit())==false and GetUnitAbilityLevel(GetFilterUnit(),'A0LE')>0 and IsUnitEnemy(AR4,GetOwningPlayer(GetFilterUnit()))then
call NFE(GetFilterUnit(),AR4,GetUnitAbilityLevel(GetFilterUnit(),'A0LE')*.1)
endif
return false
endfunction
function NHE takes unit Z77,unit X77,integer ML8 returns nothing
local group g=OG8()
set AR4=X77
call GroupEnumUnitsInRange(g,GetUnitX(X77),GetUnitY(X77),350,Condition(function NGE))
call OF8(g)
set AR4=null
set g=null
endfunction
function NIE takes nothing returns boolean
local unit Z77=GetKillingUnit()
local unit X77=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A0LE')
if IsUnitIllusion(X77)==false and IsUnitType(X77,UNIT_TYPE_STRUCTURE)==false and GetUnitTypeId(X77)!='n00L' and GetUnitAbilityLevel(Z77,'BNdo')==0 then
if IsUnitType(X77,UNIT_TYPE_HERO)==false then
if ML8>0 then
call NFE(Z77,X77,ML8*.05+.05)
endif
else
if ML8>0 then
call NFE(Z77,X77,ML8*.1)
else
call NHE(Z77,X77,ML8)
endif
endif
endif
set Z77=null
set X77=null
return false
endfunction
function CE8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function NIE))
set t=null
endfunction
function NJE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local unit X77=LUnit(W57,"Target")
local integer ML8=LInt(W57,"Level")
local real PND=LReal(W57,"LastX")
local real POD=LReal(W57,"LastY")
local real x=GetUnitX(X77)
local real y=GetUnitY(X77)
local real d=SquareRoot((PND-x)*(PND-x)+(POD-y)*(POD-y))
local real Q_8=.2*ML8*d
local integer NKE=LInt(W57,"Iteration")
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call UnitRemoveAbility(X77,'A0IH')
call UnitRemoveAbility(X77,'B08L')
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
set X77=null
return false
endif
if d>1300 then
set Q_8=0
endif
if Q_8>5 then
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",X77,"origin"))
endif
if LState(X77,"ShallowGrave|Active")and Q_8>=GetUnitState(X77,UNIT_STATE_LIFE)-2 then
set Q_8=GetUnitState(X77,UNIT_STATE_LIFE)-2
endif
if IsCourier(X77)then
set Q_8=0
endif
if Q_8>0 and O18(X77)==false then
call Dmg(Z77,X77,LifeDrain,Q_8)
endif
call SReal(W57,"LastX",x)
call SReal(W57,"LastY",y)
call SInt(W57,"Iteration",NKE+1)
if O18(X77)then
call LT7(W57)
call EA8(t)
elseif NKE>4*(6+ML8)then
call UnitRemoveAbility(X77,'A0IH')
call UnitRemoveAbility(X77,'B08L')
call LT7(W57)
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function NME takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer ML8=GetUnitAbilityLevel(Z77,'A0LH')
local real P08=50+'d'*ML8
call AddPermanentAbility(X77,'A0IH')
call SetUnitAbilityLevel(X77,'A0IH',ML8)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",X77,"chest"))
call SUnit(W57,"Source",Z77)
call SUnit(W57,"Target",X77)
call SInt(W57,"Level",ML8)
call SReal(W57,"LastX",GetUnitX(X77))
call SReal(W57,"LastY",GetUnitY(X77))
call SInt(W57,"Iteration",0)
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerAddCondition(t,Condition(function NJE))
call TriggerRegisterDeathEvent(t,X77)
if LState(X77,"ShallowGrave|Active")and P08>=GetUnitState(X77,UNIT_STATE_LIFE)-2 then
set P08=GetUnitState(X77,UNIT_STATE_LIFE)-2
endif
if IsCourier(X77)then
set P08=0
endif
call Dmg(Z77,X77,LifeDrain,P08)
set Z77=null
set X77=null
set t=null
endfunction
function NNE takes nothing returns boolean
if GetSpellAbilityId()=='A0LH' and HasLinkin(GetSpellTargetUnit())==false then
call NME()
endif
return false
endfunction
function CF8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function NNE))
set t=null
endfunction
function NOE takes nothing returns nothing
local unit AC7
if UN8(GetEnumUnit())==false then
call UnitRemoveAbility(GetEnumUnit(),'B0EY')
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(B84),true)
else
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(B84),true)
if GetUnitAbilityLevel(GetEnumUnit(),'B0EY')==0 and GetUnitAbilityLevel(GetEnumUnit(),'B00T')==0 and GetUnitAbilityLevel(GetEnumUnit(),'B00L')==0 then
set AC7=CreateUnit(GetOwningPlayer(B84),'e00E',GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call UnitAddAbility(AC7,'A2AH')
call IssueTargetOrderById(AC7,852149,GetEnumUnit())
set AC7=null
endif
endif
endfunction
function NPE takes nothing returns nothing
local real AQD=B94*.1+.1
if O18(B84)or IsUnitInGroup(GetEnumUnit(),B74)==false or GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)/ GetUnitState(GetEnumUnit(),UNIT_STATE_MAX_LIFE)>AQD or(GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)/ GetUnitState(GetEnumUnit(),UNIT_STATE_MAX_LIFE)>AQD/ 2 and UN8(GetEnumUnit()))then
call GroupRemoveUnit(B44,GetEnumUnit())
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(B84),false)
call UnitRemoveAbility(GetEnumUnit(),'B0EY')
endif
endfunction
function NQE takes nothing returns nothing
local real AQD
if O18(B84)==false and IsUnitInGroup(GetEnumUnit(),B44)==false and IsUnitIllusion(GetEnumUnit())==false then
set AQD=B94*.1+.1
if GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)/ GetUnitState(GetEnumUnit(),UNIT_STATE_MAX_LIFE)<AQD and UN8(GetEnumUnit())==false then
call GroupAddUnit(B44,GetEnumUnit())
elseif GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)/ GetUnitState(GetEnumUnit(),UNIT_STATE_MAX_LIFE)<AQD/ 2 then
call GroupAddUnit(B44,GetEnumUnit())
endif
endif
endfunction
function NRE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local group NSE=(LoadGroupHandle(R8,(W57),(22)))
local group g=OG8()
local integer ML8=GetUnitAbilityLevel(Z77,'A0I8')
set H04=Z77
set B84=Z77
set B44=NSE
set B94=ML8
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),25+6000,Condition(function VE8))
call ForGroup(g,function NQE)
set B74=g
call ForGroup(B44,function NPE)
call ForGroup(B44,function NOE)
if FirstOfGroup(B44)==null then
call UnitRemoveAbility(Z77,A_4[1])
call UnitRemoveAbility(Z77,A_4[2])
call UnitRemoveAbility(Z77,A_4[3])
call UnitRemoveAbility(Z77,A_4[4])
call UnitRemoveAbility(Z77,'A214')
else
if ML8==1 then
call UnitRemoveAbility(Z77,A_4[2])
call UnitRemoveAbility(Z77,A_4[3])
call UnitRemoveAbility(Z77,A_4[4])
call UnitRemoveAbility(Z77,'B0E5')
call UnitRemoveAbility(Z77,'B0E4')
call UnitRemoveAbility(Z77,'B0E6')
elseif ML8==2 then
call UnitRemoveAbility(Z77,A_4[1])
call UnitRemoveAbility(Z77,A_4[3])
call UnitRemoveAbility(Z77,A_4[4])
call UnitRemoveAbility(Z77,'B05R')
call UnitRemoveAbility(Z77,'B0E4')
call UnitRemoveAbility(Z77,'B0E6')
elseif ML8==3 then
call UnitRemoveAbility(Z77,A_4[1])
call UnitRemoveAbility(Z77,A_4[2])
call UnitRemoveAbility(Z77,A_4[4])
call UnitRemoveAbility(Z77,'B05R')
call UnitRemoveAbility(Z77,'B0E5')
call UnitRemoveAbility(Z77,'B0E6')
elseif ML8==4 then
call UnitRemoveAbility(Z77,A_4[1])
call UnitRemoveAbility(Z77,A_4[2])
call UnitRemoveAbility(Z77,A_4[3])
call UnitRemoveAbility(Z77,'B05R')
call UnitRemoveAbility(Z77,'B0E5')
call UnitRemoveAbility(Z77,'B0E4')
endif
call AddPermanentAbility(Z77,A_4[ML8])
call AddPermanentAbility(Z77,'A214')
call UnitMakeAbilityPermanent(Z77,true,A_4[ML8])
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),A_4[ML8],false)
endif
call OF8(g)
set t=null
set Z77=null
set g=null
set NSE=null
return false
endfunction
function NTE takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerAddCondition(t,Condition(function NRE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveGroupHandle(R8,(W57),(22),(OG8()))
set t=null
set Z77=null
endfunction
function GetHeroSightRange takes unit s returns integer
local boolean b=(GetFloatGameState(GAME_STATE_TIME_OF_DAY)>6. and GetFloatGameState(GAME_STATE_TIME_OF_DAY)<18)
local integer i=1800
if not b then
set i=800
endif
if GetUnitTypeId(s)=='O016' or GetUnitTypeId(s)=='O017' then
if b then
set i=1200
else
set i=800
endif
elseif GetUnitTypeId(s)=='Udre' then
if b then
set i=1200
else
set i=1800
endif
elseif GetUnitAbilityLevel(s,'A062')>0 then
set i=1800
endif
if GetUnitAbilityLevel(s,'AZ0Z')>0 then
set i=i-200
endif
return i
endfunction
function BloodLustTrack takes nothing returns nothing
local integer h=GetHandleId(GetTriggeringTrigger())
local unit s=LUnit(h,"unit")
local unit f=LUnit(h,"eye")
local integer sight=GetHeroSightRange(s)
local integer x
local integer y
if GetTriggerEventId()==EVENT_WIDGET_DEATH or((UN8(s)and GetUnitLifePercent(s)>50)or GetUnitLifePercent(s)>50)then
call UnitApplyTimedLife(f,'BTLF',1)
call UnitShareVision(s,GetOwningPlayer(LUnit(h,"FromWhom")),false)
call UnitRemoveAbility(s,LInt(h,"DecreaseSightAbility"))
call SBool(GetHandleId(s),"BloodlustTracking",false)
call TriggerOff()
elseif GetTriggerUnit()==null then
if GetUnitTypeId(s)=='O017' and GetUnitTypeId(f)=='e0M2' then
call KillUnit(f)
set f=CreateUnit(GetOwningPlayer(s),'e0MJ',GetUnitX(s),GetUnitY(s),0)
call SUnit(h,"eye",f)
call SInt(h,"SavedSight",0)
elseif GetUnitTypeId(f)=='e0MJ' then
call KillUnit(f)
set f=CreateUnit(GetOwningPlayer(s),'e0M2',GetUnitX(s),GetUnitY(s),0)
call SUnit(h,"eye",f)
call SInt(h,"SavedSight",0)
endif
if LInt(h,"SavedSight")!=sight then
if sight>=1800 then
set x='AZ3S'
set y='AZ3U'
elseif sight>=1200 then
set x='AZ3T'
set y='AZ3V'
elseif sight>=800 then
set x='AZ3W'
set y='AZ3X'
elseif sight>=600 then
set x='AZ3Y'
set y='AZ3Z'
elseif sight>=200 then
set x='AZ4A'
set y='AZ4B'
endif
call UnitRemoveAbility(s,LInt(h,"DecreaseSightAbility"))
call UnitRemoveAbility(f,LInt(h,"IncreaseSightAbility"))
call AddPermanentAbility(f,y)
call SInt(h,"DecreaseSightAbility",x)
call SInt(h,"IncreaseSightAbility",y)
endif
call SetXY(f,GetUnitX(s),GetUnitY(s))
if SAInt(h,"Delay",1)==220 then
call UnitShareVision(s,GetOwningPlayer(LUnit(h,"FromWhom")),true)
call AddPermanentAbility(s,LInt(h,"DecreaseSightAbility"))
endif
endif
set s=null
set f=null
endfunction
function BloodLust_Filter takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function BloodLustCheck takes nothing returns nothing
local trigger t=null
local unit s=GetEnumUnit()
local unit f
local integer h
local integer sight
local integer x
local integer y
if IsUnitType(s,UNIT_TYPE_DEAD)==false and((UN8(s)==false and GetUnitLifePercent(s)<50)or GetUnitLifePercent(s)<25)then
set Bloodlust_Check=Bloodlust_Check+1
if LBool(GetHandleId(s),"BloodlustTracking")==false then
call SBool(GetHandleId(s),"BloodlustTracking",true)
set t=CreateTrigger()
set h=GetHandleId(t)
set sight=GetHeroSightRange(s)
call TriggerRegisterTimer(t)
call TriggerRegisterDeathEvent(t,Bloodluster)
call TriggerAddCondition(t,Condition(function BloodLustTrack))
if GetUnitTypeId(s)=='O017' then
set f=CreateUnit(GetOwningPlayer(s),'e0MJ',GetUnitX(s),GetUnitY(s),0)
else
set f=CreateUnit(GetOwningPlayer(s),'e0M2',GetUnitX(s),GetUnitY(s),0)
endif
if sight>=1800 then
set x='AZ3S'
set y='AZ3U'
elseif sight>=1200 then
set x='AZ3T'
set y='AZ3V'
elseif sight>=800 then
set x='AZ3W'
set y='AZ3X'
elseif sight>=600 then
set x='AZ3Y'
set y='AZ3Z'
elseif sight>=200 then
set x='AZ4A'
set y='AZ4B'
endif
call TestMsg("sight:"+I2S(sight))
call AddPermanentAbility(s,x)
call AddPermanentAbility(f,y)
call SInt(h,"DecreaseSightAbility",x)
call SInt(h,"IncreaseSightAbility",y)
call SInt(h,"SavedSight",sight)
call SUnit(h,"unit",s)
call SUnit(h,"FromWhom",Bloodluster)
call SetUnitPathing(f,false)
call PauseUnit(f,true)
call SUnit(h,"eye",f)
set t=null
endif
endif
set s=null
endfunction
function Angle takes real x1,real y1,real x2,real y2 returns real
return Atan2(y2-y1,x2-x1)
endfunction
function Dist takes real x1,real y1,real x2,real y2 returns real
return SquareRoot(((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)))
endfunction
function BloodlustRefreshAttack takes unit s,integer i returns nothing
local integer x=i
local integer y=0
local integer n=0
if x>1000 then
set x=1000
set i=1000
endif
set y=0
loop
exitwhen y>9
set n=x
if n-n/ 2*2==1 then
call UnitAddAbility(s,BloodlusterAttackArray[y])
call UnitMakeAbilityPermanent(s,true,BloodlusterAttackArray[y])
else
call UnitRemoveAbility(s,BloodlusterAttackArray[y])
endif
set x=x/ 2
set y=y+1
endloop
endfunction
function BloodLust_TriggerFunc takes nothing returns nothing
local integer h=GetHandleId(GetTriggeringTrigger())
local unit s=LUnit(h,"unit")
local group g=LGroup(h,"group")
local integer i=LInt(h,"enemyNum")
local integer l=GetUnitAbilityLevel(s,'A0I8')
local real x
local real y
local real a
local real d
if s==null then
loop
set s=FirstOfGroup(g)
exitwhen s==null
call SBool(GetHandleId(s),"BloodlustTracking",false)
call GroupRemoveUnit(g,s)
endloop
call DestroyGroup(g)
call TriggerOff()
set s=null
set g=null
return
endif
if GetTriggerEventId()==EVENT_GAME_ENTER_REGION and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(s))then
call GroupAddUnit(g,GetTriggerUnit())
elseif GetTriggerEventId()==EVENT_GAME_VARIABLE_LIMIT and IsUnitType(s,UNIT_TYPE_DEAD)==false then
if SAInt(h,"Check",1)>=30 then
call SInt(h,"Check",0)
set Bloodlust_Check=0
set Bloodluster=s
call ForGroup(g,function BloodLustCheck)
if Bloodlust_Check!=i then
set i=Bloodlust_Check
call SInt(h,"enemyNum",i)
endif
if i>0 then
call AddPermanentAbility(s,'A20W')
call SReal(GetHandleId(s),"extraSpeed",(l*0.1-0.05)*i*300)
call BloodlustRefreshAttack(s,(l*10-5)*i)
else
call UnitRemoveAbility(s,'A20W')
call UnitRemoveAbility(s,'B05R')
call SReal(GetHandleId(s),"extraSpeed",0)
call BloodlustRefreshAttack(s,0)
endif
endif
set h=GetHandleId(s)
if i>0 then
set x=LReal(h,"extraSpeed_lastX")
set y=LReal(h,"extraSpeed_lastY")
set a=Angle(x,y,GetUnitX(s),GetUnitY(s))
set d=Dist(x,y,GetUnitX(s),GetUnitY(s))
if d>0.1 and d<6 then
set d=3*(l*0.1-0.05)*i
set x=GetUnitX(s)+Cos(a)*d
set y=GetUnitY(s)+Sin(a)*d
if not IsPointInRegion(IF4,x,y)then
call SetXY(s,x,y)
endif
endif
endif
call SReal(h,"extraSpeed_lastX",GetUnitX(s))
call SReal(h,"extraSpeed_lastY",GetUnitY(s))
endif
set s=null
set g=null
endfunction
function BloodLust_New takes nothing returns nothing
local unit s=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer i=GetHandleId(t)
local group g=CreateGroup()
call TriggerRegisterVariableEvent(t,"time",GREATER_THAN,0)
call TriggerRegisterEnterRectSimple(t,bj_mapInitialPlayableArea)
call TriggerAddCondition(t,Condition(function BloodLust_TriggerFunc))
call GroupEnumUnitsInRect(g,bj_mapInitialPlayableArea,Condition(function BloodLust_Filter))
call SGroup(i,"group",g)
call SUnit(i,"unit",s)
set i=GetHandleId(s)
call SReal(i,"extraSpeed_lastX",GetUnitX(s))
call SReal(i,"extraSpeed_lastY",GetUnitY(s))
set s=null
set t=null
set g=null
endfunction
function NUE takes nothing returns boolean
if GetLearnedSkill()=='A0I8' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A0I8')==1 then
call BloodLust_New()
endif
return false
endfunction
function CH8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function NUE))
set A_4[1]='A210'
set A_4[2]='A211'
set A_4[3]='A212'
set A_4[4]='A213'
set BloodlusterAttackArray[0]='AZ02'
set BloodlusterAttackArray[1]='AZ03'
set BloodlusterAttackArray[2]='AZ04'
set BloodlusterAttackArray[3]='AZ05'
set BloodlusterAttackArray[4]='AZ06'
set BloodlusterAttackArray[5]='AZ07'
set BloodlusterAttackArray[6]='AZ08'
set BloodlusterAttackArray[7]='AZ09'
set BloodlusterAttackArray[8]='AZ0A'
set BloodlusterAttackArray[9]='AZ0B'
set t=null
endfunction
function NVE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local unit AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call UnitAddAbility(AC7,'A2TN')
call IssueTargetOrderById(AC7,852275,X77)
if IsUnitAlly(Z77,GetOwningPlayer(X77))==false then
call UnitRemoveAbility(X77,'Aetl')
endif
set Z77=null
set X77=null
set AC7=null
endfunction
function NWE takes nothing returns boolean
if GetSpellAbilityId()=='A0EC' and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)then
if IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==false or HasLinkin(GetSpellTargetUnit())==false then
call NVE()
endif
endif
return false
endfunction
function NXE takes nothing returns boolean
if GetSpellAbilityId()=='A0EC' and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and GetSpellTargetUnit()!=GetTriggerUnit()and IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and(LBool(GetHandleId(GetOwningPlayer(GetSpellTargetUnit())),"DisableHelp"))then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n038'))
endif
return false
endfunction
function CG8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function NXE))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function NWE))
set t=null
endfunction
function NYE takes nothing returns boolean
return GetUnitTypeId(GetSummonedUnit())=='o003'
endfunction
function NZE takes nothing returns nothing
local unit xU=GetSummonedUnit()
local unit xv=GetSummoningUnit()
local integer EC8=GetHandleId(xv)
local integer TA8=GetUnitAbilityLevel(xv,'A0BG')
local integer xV=LInt(EC8,"TotalWebs")
local unit xw=LUnit(EC8,"Web1")
local integer x=1
set xV=xV+1
call SetUnitVertexColorBJ(xU,'d','d','d',80)
call AddPermanentAbility(xU,'Aloc')
call ShowUnit(xU,false)
call UnitRemoveAbility(xU,'Aloc')
call ShowUnit(xU,true)
call SUnit(EC8,"Web"+I2S(xV),xU)
if(xV>TA8*2)then
call KillUnit(xw)
loop
exitwhen x==xV
call SUnit(EC8,"Web"+I2S(x),LUnit(EC8,"Web"+I2S(x+1)))
set x=x+1
endloop
set xV=xV-1
endif
call SInt(EC8,"TotalWebs",xV)
call UnitRemoveAbility(xU,'A0BF')
set xU=null
set xv=null
set xw=null
endfunction
function WebTriggerCheck takes nothing returns nothing
set Web_IsInRange=Web_IsInRange or IsUnitInRange(GetEnumUnit(),Webber,900)
endfunction
function WebTrigger takes nothing returns nothing
local integer h=GetHandleId(GetTriggeringTrigger())
local unit s=LUnit(h,"unit")
local integer l=GetUnitAbilityLevel(s,'A0BG')
local group g=LGroup(GetHandleId(s),"o003_webs")
if IsUnitType(s,UNIT_TYPE_DEAD)then
set s=null
set g=null
return
endif
set Web_IsInRange=false
set Webber=s
call ForGroup(g,function WebTriggerCheck)
if Web_IsInRange and time>LReal(GetHandleId(s),"LastAttacked")+3 then
call AddPermanentAbility(s,'A021')
call AddPermanentAbility(s,'AZ0C')
call AddPermanentAbility(s,'AZ0D')
call SetUnitAbilityLevel(s,'AZ0C',l)
call SetUnitAbilityLevel(s,'AZ0D',l)
if(IsUnitEnemy(s,GetOwningPlayer(IY4))and IsUnitVisibleEx(s,GetOwningPlayer(IY4))==false)or(IsUnitEnemy(s,GetOwningPlayer(JV4))and IsUnitVisibleEx(s,GetOwningPlayer(JV4))==false)then
call SetUnitPathing(s,false)
else
call SetUnitPathing(s,true)
endif
else
call SetUnitPathing(s,true)
call UnitRemoveAbility(s,'A021')
call UnitRemoveAbility(s,'AZ0C')
call UnitRemoveAbility(s,'BZ0C')
call UnitRemoveAbility(s,'AZ0D')
endif
set s=null
set g=null
endfunction
function RegWebTrigger takes unit s returns nothing
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function WebTrigger))
call SUnit(h,"unit",s)
call SBool(GetHandleId(s),"WebTriggerRegistered",true)
set t=null
endfunction
function Web_New takes nothing returns nothing
local unit s=GetTriggerUnit()
local unit f=CreateUnit(GetOwningPlayer(s),'o003',GetSpellTargetX(),GetSpellTargetY(),270)
local integer i=GetHandleId(s)
local group g=LGroup(i,"o003_webs")
local integer l=1
local integer x=GetUnitAbilityLevel(s,'A0BG')*2
call SetUnitVertexColor(f,100,100,100,100)
call SetUnitScale(f,12,12,12)
call UnitAddAbility(f,'Amrf')
call UnitRemoveAbility(f,'Amrf')
call SetUnitFlyHeight(f,120,0)
call ShowUnit(f,false)
call UnitRemoveAbility(f,'Aloc')
call ShowUnit(f,true)
call SetUnitInvulnerable(f,true)
if g==null then
set g=CreateGroup()
call SGroup(i,"o003_webs",g)
endif
call GroupAddUnit(g,f)
if CountUnitsInGroup(g)>x then
call KillUnit(LUnit(i,"Web1"))
endif
loop
exitwhen l>=x
call SUnit(i,"Web"+I2S(l),LUnit(i,"Web"+I2S(l+1)))
set l=l+1
endloop
call SUnit(i,"Web"+I2S(l),f)
if LBool(i,"WebTriggerRegistered")==false then
call RegWebTrigger(s)
endif
set s=null
set f=null
set g=null
endfunction
function Web_New_Cond takes nothing returns nothing
if GetSpellAbilityId()=='A0BG' then
call Web_New()
endif
endfunction
function CI8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Web_New_Cond))
set t=null
endfunction
function NAE takes unit xv returns nothing
local integer EC8=GetHandleId(xv)
local integer TA8=GetUnitAbilityLevel(xv,'A0BG')
local integer xV=LInt(EC8,"TotalWebs")
local integer x=1
local unit VX
loop
exitwhen x>xV
set VX=LUnit(EC8,"Web"+I2S(x))
call SetUnitAbilityLevel(VX,'A0BF',TA8)
set x=x+1
endloop
set VX=null
endfunction
function NBE takes nothing returns nothing
local unit NCE=LUnit(GetHandleId(GetTriggeringTrigger()),"Spider")
if NCE==null then
call FlushChildHashtable(R8,(GetHandleId(GetTriggeringTrigger())))
call EA8(GetTriggeringTrigger())
else
call UnitAddAbility(NCE,'A04R')
call UnitRemoveAbility(NCE,'A04R')
if IsUnitType(NCE,UNIT_TYPE_HERO)then
if GetUnitAbilityLevel(NCE,'B01C')>0 then
call AddPermanentAbility(NCE,'A021')
if(IsUnitEnemy(NCE,GetOwningPlayer(IY4))and IsUnitVisibleEx(NCE,GetOwningPlayer(IY4))==false)or(IsUnitEnemy(NCE,GetOwningPlayer(JV4))and IsUnitVisibleEx(NCE,GetOwningPlayer(JV4))==false)then
call SetUnitPathing(NCE,false)
else
call SetUnitPathing(NCE,true)
endif
else
call UnitRemoveAbility(NCE,'A021')
endif
else
if GetUnitAbilityLevel(NCE,'B01C')>0 then
call AddPermanentAbility(NCE,'A29C')
else
call UnitRemoveAbility(NCE,'A29C')
endif
endif
endif
set NCE=null
endfunction
function N3E takes unit Z77 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(t,0.02)
call TriggerAddAction(t,function NBE)
call SUnit(GetHandleId(t),"Spider",Z77)
set t=null
endfunction
function N6E takes nothing returns boolean
if GetUnitTypeId(GetSummonedUnit())=='n01E' or GetUnitTypeId(GetSummonedUnit())=='n019' then
call RegWebTrigger(GetSummonedUnit())
endif
return false
endfunction
function NLE takes unit AM7,boolean SY8 returns nothing
local trigger t
if(GetUnitAbilityLevel(AM7,'A0BG')==1 or GetUnitPointValue(AM7)==500)then
call N3E(AM7)
else
call NAE(AM7)
endif
if GetUnitPointValue(AM7)==500 then
set UV7[GetPlayerId(GetOwningPlayer(AM7))]=t
endif
set t=null
endfunction
function N1E takes nothing returns boolean
if GetLearnedSkill()=='A0BG' and IsUnitIllusion(GetTriggerUnit())==false then
call NLE(GetTriggerUnit(),false)
endif
return false
endfunction
function CJ8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function N6E))
set t=null
endfunction
function N0E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
if GetTriggerEventId()!=EVENT_PLAYER_UNIT_SPELL_EFFECT or(GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT and IsPurgeId(GetSpellAbilityId())and GetSpellTargetUnit()==N28)then
if O18(N28)==false then
call UnitRemoveAbility(N28,'A0WR')
call UnitRemoveAbility(N28,'B01E')
endif
call DestroyEffect(LEff(EC8,"FX"))
call LT7(EC8)
call EA8(t)
endif
set t=null
set N28=null
return false
endfunction
function N5E takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit N28=GetTriggerUnit()
call TriggerRegisterTimerEvent(t,14,false)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function N0E))
call SUnit(EC8,"Hero",N28)
call SEff(EC8,"FX",AddSpecialEffectTarget("Abilities\\Spells\\Items\\VampiricPotion\\VampPotionCaster.mdl",N28,"origin"))
call AddPermanentAbility(N28,'A0WR')
call SetUnitAbilityLevel(N28,'A0WR',GetUnitAbilityLevel(N28,'A0WQ'))
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),'A0WR',false)
set t=null
set N28=null
endfunction
function N2E takes nothing returns boolean
if GetSpellAbilityId()=='A0WQ' then
call N5E()
endif
return false
endfunction
function CK8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function N2E))
set t=null
endfunction
function N_E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
if GetTriggerEvalCount(t)>300 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetUnitAbilityLevel(X77,'B0E7')>0 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call Dmg(Z77,X77,NormalFire,GetUnitAbilityLevel(Z77,'A0BH')*75)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function O4E takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
call TriggerRegisterTimerEvent(t,.01,true)
call TriggerAddCondition(t,Condition(function N_E))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
set t=null
set Z77=null
set X77=null
endfunction
function O7E takes nothing returns boolean
if GetSpellAbilityId()=='A0BH' then
call O4E()
endif
return false
endfunction
function CM8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O7E))
set t=null
endfunction
function O8E takes nothing returns boolean
return GetSpellAbilityId()=='A055'
endfunction
function O9E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local real P08=(LoadReal(R8,(W57),(20)))
local integer VL8=(LoadInteger(R8,(W57),(188)))
local texttag tt
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetEventDamageSource()==AC7 then
set tt=CreateTextTag()
call QM8(I2S(VL8),VL8,X77,.03,127,127,255,255)
call SetTextTagText(tt,"+"+I2S(R2I(P08)),.025)
call SetTextTagPosUnit(tt,X77,10)
call SetTextTagColor(tt,255,0,0,255)
call SetTextTagVelocity(tt,0,.0355)
call SetTextTagFadepoint(tt,2)
call SetTextTagPermanent(tt,false)
call SetTextTagLifespan(tt,2)
if IsUnitVisibleEx(X77,GetLocalPlayer())or N08(GetLocalPlayer())then
call SetTextTagVisibility(tt,true)
else
call SetTextTagVisibility(tt,false)
endif
call Dmg(Z77,X77,NormalFire,P08)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
set tt=null
return false
endfunction
function ODE takes nothing returns nothing
local integer ML8=GetUnitAbilityLevel(GetTriggerUnit(),'A055')
local unit O4D=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local location SD9=GetUnitLoc(O4D)
local real P08=GetRandomReal(1,200)
local integer OEE=R2I(((200-P08)/ 200.)*(ML8))+1
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AC7=CreateUnit(GetOwningPlayer(O4D),'e00E',GetUnitX(O4D),GetUnitY(O4D),0)
if ML8==2 then
set P08=GetRandomReal(50,225)
elseif ML8==3 then
set P08=GetRandomReal(75,250)
elseif ML8==4 then
set P08=GetRandomReal('d',275)
endif
call TriggerRegisterTimerEvent(t,10,false)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function O9E))
call SaveUnitHandle(R8,(W57),(2),(O4D))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveReal(R8,(W57),(20),((P08)*1.))
if(ML8==4)then
set OEE=R2I(((200-P08)/ 200.)*3)+2
endif
call SaveInteger(R8,(W57),(188),(OEE))
call AddPermanentAbility(AC7,'A04U')
call SetUnitAbilityLevel(AC7,'A04U',OEE)
call IssueTargetOrderById(AC7,852095,X77)
set t=null
endfunction
function CO8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O8E))
call TriggerAddAction(t,function ODE)
endfunction
function OFE takes nothing returns boolean
return GetLearnedSkill()=='AHfa'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function OGE takes nothing returns nothing
if(UnitHasBuffBJ(GetTriggerUnit(),'BOwk'))then
call UnitRemoveAbility(GetTriggerUnit(),'BOwk')
endif
call DisableTrigger(DF)
endfunction
function DN9 takes nothing returns nothing
set DF=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(DF,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(DF,Condition(function OFE))
call TriggerAddAction(DF,function OGE)
endfunction
function OHE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer NZ8=GetHandleId(t)
local unit W8D=(LoadUnitHandle(R8,(NZ8),(2)))
local real OIE=GetUnitState(W8D,UNIT_STATE_LIFE)
call UnitRemoveAbility(W8D,'A1R0')
call UnitRemoveAbility(W8D,'B0D5')
call W78(W8D,0)
call W98(W8D,0)
call SetUnitState(W8D,UNIT_STATE_LIFE,OIE)
call FlushChildHashtable(R8,(NZ8))
call EA8(t)
set t=null
set W8D=null
return false
endfunction
function OJE takes nothing returns nothing
local unit W8D=GetTriggerUnit()
local unit V5D=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer NZ8=GetHandleId(t)
local integer ZK7=GetUnitAbilityLevel(W8D,'A04Q')
local real OKE=GetUnitState(V5D,UNIT_STATE_LIFE)
local real OIE=GetUnitState(W8D,UNIT_STATE_LIFE)
local integer OME=R2I((.035+.015*ZK7)*OKE)
local integer ONE=R2I((.35+.15*ZK7)*OKE)
call W78(W8D,OME)
call W98(W8D,ONE)
call AddPermanentAbility(W8D,'A1R0')
call SetUnitState(V5D,UNIT_STATE_LIFE,1)
call Dmg(W8D,V5D,HeroNormal,20)
call Dmg(W8D,V5D,NormalFire,20)
call Dmg(W8D,V5D,HeroMagic,20)
call SetUnitState(W8D,UNIT_STATE_LIFE,OIE+ONE)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",V5D,"chest"))
call SaveUnitHandle(R8,(NZ8),(2),(W8D))
call TriggerRegisterUnitEvent(t,W8D,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,35,false)
call TriggerAddCondition(t,Condition(function OHE))
set W8D=null
set V5D=null
set t=null
endfunction
function OOE takes nothing returns boolean
if GetSpellAbilityId()=='A04Q' and GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)>.5 and IsCourier(GetSpellTargetUnit())==false then
call OJE()
endif
return false
endfunction
function NewAHfa takes nothing returns nothing
if GetLearnedSkill()=='AHfa' then
call AddPermanentAbility(GetTriggerUnit(),'AZ2G')
call SetUnitAbilityLevel(GetTriggerUnit(),'AZ2G',GetUnitAbilityLevel(GetTriggerUnit(),'AHfa'))
endif
endfunction
function DO9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OOE))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function NewAHfa))
set t=null
endfunction
function OPE takes integer x returns boolean
return x=='A21F' or x=='A21G' or x=='A14O' or x=='A0NE' or x=='A14O' or x=='A1C0' or x=='A0SB'
endfunction
function OQE takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'B06X')>0 and(MY8(GetSpellAbilityId())or GetSpellAbilityId()=='A0OI')and OPE(GetSpellAbilityId())==false and XL8(GetSpellAbilityId())==false
endfunction
function TUH takes integer id returns boolean
local integer i=0
loop
exitwhen i==LF4
if id==LE4[i]then
return true
endif
set i=i+1
endloop
return false
endfunction
function NotItemSkill takes integer id returns boolean
local integer i=0
loop
exitwhen i==JN7
if id==JM7[i]then
return true
endif
set i=i+1
endloop
return false
endfunction
function TTH takes integer id returns nothing
set LE4[LF4]=id
set LF4=LF4+1
endfunction
function T2H takes nothing returns nothing
call TTH('A1WH')
call TTH('ANcr')
call TTH('A03G')
call TTH('A093')
call TTH('A15J')
call TTH('A0AG')
call TTH('A0BE')
call TTH('A1TX')
call TTH('A229')
call TTH('A1RI')
call TTH('A1C0')
call TTH('A11T')
call TTH('A19Z')
call TTH('A2NE')
call TTH('A13D')
call TTH('A2NI')
call TTH('A1QV')
call TTH('A1TU')
call TTH('A24A')
call TTH('A24B')
call TTH('A1NH')
call TTH('A20N')
call TTH('A1Z2')
call TTH('A1Z3')
call TTH('A205')
call TTH('A1VU')
call TTH('A0GC')
call TTH('A24E')
call TTH('A0RT')
call TTH('A1RA')
call TTH('A0HA')
call TTH('A0SA')
call TTH('A121')
call TTH('A1WF')
call TTH('A02T')
call TTH('A1S9')
call TTH('A21H')
call TTH('A1MN')
call TTH('A0KX')
call TTH('A0KW')
call TTH('A0A5')
call TTH('A0BG')
call TTH('A21W')
call TTH('A21X')
call TTH('A21V')
call TTH('A21Y')
call TTH('A1GU')
call TTH('A1VH')
call TTH('A1VG')
call TTH('A2M0')
call TTH('A2MB')
call TTH('A029')
call TTH('A2O9')
call TTH('A0QN')
call TTH('A026')
call TTH('AHfa')
call TTH('A09V')
call TTH('A0DY')
call TTH('A1WB')
call TTH('A0LZ')
call TTH('A0OI')
call TTH('A1NA')
call TTH('A1EA')
call TTH('A0NS')
call TTH('A1DA')
call TTH('A28Q')
call TTH('A0WQ')
call TTH('A1T8')
call TTH('A10R')
call TTH('A11N')
call TTH('A0EY')
call TTH('A0FH')
call TTH('A0VK')
call TTH('A0VQ')
call TTH('A073')
call TTH('A03J')
call TTH('A04J')
call TTH('A04M')
call TTH('A04N')
call TTH('A27F')
call TTH('A27X')
call TTH('A27G')
call TTH('A27H')
call TTH('AZ1H')
call TTH('A0Q5')
call TTH('A0TK')
call TTH('AIbk')
call TTH('A0JY')
call TTH('A1AC')
call TTH('AIpl')
call TTH('AIpr')
call TTH('Aeat')
call TTH('A0K0')
call TTH('A0H7')
call TTH('A0H6')
call TTH('A0FO')
call TTH('A02X')
call TTH('AIsw')
call TTH('AItb')
call TTH('A0B6')
call TTH('A1R5')
call TTH('A206')
call TTH('A1FD')
call TTH('A1FO')
call TTH('A1FQ')
call TTH('A1IO')
call TTH('A0B8')
call TTH('A1WE')
call TTH('A0T8')
call TTH('A0T7')
call TTH('A017')
call TTH('A1QD')
call TTH('A1FP')
call TTH('A0JL')
call TTH('ACch')
call TTH('AIxk')
call TTH('AIpg')
call TTH('A11F')
call TTH('A11E')
call TTH('A0S3')
call TTH('A11D')
call TTH('A11G')
call TTH('A11H')
call TTH('A0T9')
call TTH('A15W')
call TTH('AChx')
call TTH('A0FD')
call TTH('A0TE')
call TTH('A1T7')
call TTH('A19M')
call TTH('A02O')
call TTH('A08Y')
call TTH('A08Z')
call TTH('A090')
call TTH('A092')
call TTH('A0HB')
call TTH('A0D3')
call TTH('A0DF')
call TTH('A02W')
call TTH('A0CK')
call TTH('A0K7')
call TTH('A0JT')
call TTH('AIda')
call TTH('A269')
call TTH('A1WO')
call TTH('A1EW')
call TTH('A1MO')
call TTH('A1ZI')
call TTH('A1ZH')
call TTH('A1ZW')
call TTH('A231')
call TTH('A12W')
call TTH('A14A')
call TTH('A1Q8')
call TTH('A28Y')
call TTH('A28D')
call TTH('A28F')
call TTH('AZ2F')
call TTH('A2JO')
call TTH('A2JQ')
call TTH('A2JP')
call TTH('A2JR')
call TTH('A2JL')
call TTH('A2FX')
call TTH('A2K1')
call TTH('A2K4')
call TTH('A2K7')
call TTH('A2KG')
call TTH('A2KE')
call TTH('A2KH')
call TTH('A2K9')
call TTH('A2EA')
call TTH('A2TH')
call TTH('A2TJ')
call TTH('A2TK')
call TTH('A2LI')
call TTH('A1R5')
call TTH('A137')
call TTH('AZ2G')
endfunction
function ORE takes nothing returns nothing
local integer EC8=GetHandleId(GetTriggeringTrigger())
local unit N28=GetTriggerUnit()
local unit x9=LUnit(EC8,"Destroyer")
local integer sr=GetUnitAbilityLevel(x9,'A0IF')
if NotItemSkill(GetSpellAbilityId())==false and GetRandomInt(1,'d')<=sr*10 and m9(N28,x9,1400)then
call SetUnitState(N28,UNIT_STATE_MANA,GetUnitState(N28,UNIT_STATE_MANA)+.25*GetUnitState(N28,UNIT_STATE_MAX_MANA))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCasterOverhead.mdl",N28,"overhead"))
endif
set N28=null
set x9=null
endfunction
function OSE takes unit N28,boolean SY8 returns nothing
local integer sr=GetUnitAbilityLevel(N28,'A0IF')
local trigger t
if(sr==1 or SY8)then
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OQE))
call TriggerAddAction(t,function ORE)
call SUnit(GetHandleId(t),"Destroyer",N28)
if SY8 then
set UW7[GetPlayerId(GetOwningPlayer(N28))]=t
endif
endif
if SY8 then
call UnitAddAbility(N28,'A0OL')
if sr>1 then
call UnitAddAbility(N28,'A0OM')
endif
if sr>2 then
call UnitAddAbility(N28,'A0ON')
endif
if sr>3 then
call UnitAddAbility(N28,'A0OH')
endif
else
if(sr==1)then
call AddPermanentAbility(N28,'A0OL')
elseif(sr==2)then
call AddPermanentAbility(N28,'A0OM')
elseif(sr==3)then
call AddPermanentAbility(N28,'A0ON')
elseif(sr==4)then
call AddPermanentAbility(N28,'A0OH')
endif
endif
set t=null
endfunction
function OTE takes nothing returns boolean
if GetLearnedSkill()=='A0IF' and IsUnitIllusion(GetTriggerUnit())==false then
call OSE(GetTriggerUnit(),false)
endif
return false
endfunction
function DB9 takes nothing returns nothing
set RJ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(RJ,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(RJ,Condition(function OTE))
endfunction
function XA takes nothing returns boolean
local real d
if GetUnitAbilityLevel(GetTriggerUnit(),'B06Y')>0 and GetUnitAbilityLevel(GetEventDamageSource(),'A0OI')>0 and LUnit(GetHandleId(GetTriggeringTrigger()),"Source")==GetEventDamageSource()then
call UnitRemoveAbility(GetTriggerUnit(),'B06Y')
set d=.01*(5+GetUnitAbilityLevel(GetEventDamageSource(),'A0OI'))*(GetUnitState(GetEventDamageSource(),UNIT_STATE_MANA)+'d')
if(IsUnitType(GetTriggerUnit(),UNIT_TYPE_SUMMONED)or IsUnitIllusion(GetTriggerUnit()))and GetUnitTypeId(GetTriggerUnit())!='n004'and GetUnitTypeId(GetTriggerUnit())!='n018'and GetUnitTypeId(GetTriggerUnit())!='n01C'and GetUnitTypeId(GetTriggerUnit())!='n01G'and GetUnitTypeId(GetTriggerUnit())!='n00U'and GetUnitTypeId(GetTriggerUnit())!='n00Y'and GetUnitTypeId(GetTriggerUnit())!='n00Z'then
set d=d+'d'*GetUnitAbilityLevel(GetEventDamageSource(),'A0OI')
endif
call QM8("+"+I2S(R2I(d)),1,GetTriggerUnit(),.023,191,64,255,216)
if(GetRandomInt(1,'d')<=GetUnitAbilityLevel(GetEventDamageSource(),'A0IF')*10)and(LBool(GetHandleId(GetTriggeringTrigger()),"DoneViaSpell")==false)then
call SetUnitState(GetEventDamageSource(),UNIT_STATE_MANA,GetUnitState(GetEventDamageSource(),UNIT_STATE_MANA)+.25*GetUnitState(GetEventDamageSource(),UNIT_STATE_MAX_MANA))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCasterOverhead.mdl",GetEventDamageSource(),"overhead"))
endif
call DisableTrigger(GetTriggeringTrigger())
call Dmg(GetEventDamageSource(),GetTriggerUnit(),HeroMagic,d)
call LT7(GetHandleId(GetTriggeringTrigger()))
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function Xb takes nothing returns nothing
local trigger t
local unit m5
local unit Z77
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
set m5=GetSpellTargetUnit()
set Z77=GetTriggerUnit()
else
set m5=GetTriggerUnit()
set Z77=GetAttacker()
endif
if IsUnitIllusion(Z77)==false then
set t=CreateTrigger()
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
call SBool(GetHandleId(t),"DoneViaSpell",true)
else
call SBool(GetHandleId(t),"DoneViaSpell",false)
endif
call SUnit(GetHandleId(t),"Source",Z77)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function XA))
endif
set t=null
set m5=null
set Z77=null
endfunction
function XB takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if GetUnitAbilityLevel(GetAttacker(),'A0OI')>0 and(LBool(GetHandleId(GetTriggeringTrigger()),"OrbOn")or(GZ[304+GetPlayerId(GetOwningPlayer(GetAttacker()))]))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==LUnit(GetHandleId(GetTriggeringTrigger()),"Hero")then
call Xb()
endif
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if(GetIssuedOrderId()==852255)then
call SBool(GetHandleId(GetTriggeringTrigger()),"OrbOn",true)
elseif(GetIssuedOrderId()==852256)then
call SBool(GetHandleId(GetTriggeringTrigger()),"OrbOn",false)
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='A0OI'then
call Xb()
endif
return false
endfunction
function OUE takes unit N28,boolean SY8 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function XB))
call SUnit(GetHandleId(t),"Hero",N28)
if SY8 then
set UU7[GetPlayerId(GetOwningPlayer(N28))]=t
endif
set t=null
endfunction
function OVE takes nothing returns boolean
if GetLearnedSkill()=='A0OI'and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A0OI')==1 then
call OUE(GetTriggerUnit(),false)
endif
return false
endfunction
function DC9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function OVE))
set t=null
endfunction
function OWE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
local integer OXE=LInt(EC8,"StolenInt")
call SetHeroInt(m5,GetHeroInt(m5,false)+OXE,true)
call SetHeroInt(Z77,GetHeroInt(Z77,false)-OXE,true)
call LT7(EC8)
call EA8(t)
set t=null
set Z77=null
set m5=null
return false
endfunction
function OYE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
call EY8(m5,"AstralImprisonmentState")
call DestroyEffect(LEff(EC8,"FX"))
call SetUnitInvulnerable(m5,false)
call PauseUnit(m5,false)
call ShowUnit(m5,true)
call ClearSelectionForPlayer(GetOwningPlayer(m5))
call SelectUnitAddForPlayer(m5,GetOwningPlayer(m5))
call DO8(GetHandleId(Z77),"748")
call LT7(EC8)
call EA8(t)
set t=null
set Z77=null
set m5=null
return false
endfunction
function OZE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A0OJ')
local integer OAE=PC8(GetHeroInt(X77,false),2+ML8*2)
local trigger t
local integer W57
local unit AC7=CreateUnit(GetOwningPlayer(X77),'o019',GetUnitX(X77),GetUnitY(X77),0)
call UnitApplyTimedLife(AC7,'BTLF',ML8+1)
if(IsUnitEnemy(X77,GetOwningPlayer(Z77)))==false or HasLinkin(GetSpellTargetUnit())==false then
call EW8(X77,"AstralImprisonmentState")
set t=CreateTrigger()
set W57=GetHandleId(t)
call SelectUnitRemoveForPlayer(X77,GetOwningPlayer(X77))
call SetUnitInvulnerable(X77,true)
call PauseUnit(X77,true)
call ShowUnit(X77,false)
call SEff(W57,"FX",AddSpecialEffect("Abilities\\Spells\\Demon\\DarkConversion\\ZombifyTarget.mdl",GetUnitX(X77),GetUnitY(X77)))
call SUnit(W57,"Source",Z77)
call SUnit(W57,"Target",X77)
call TriggerRegisterTimerEvent(t,ML8,false)
call TriggerAddCondition(t,Condition(function OYE))
if(IsUnitEnemy(X77,GetOwningPlayer(Z77)))then
call SUnit(GetHandleId(Z77),"748",X77)
call SetHeroInt(X77,GetHeroInt(X77,false)-OAE,true)
call SetHeroInt(Z77,GetHeroInt(Z77,false)+OAE,true)
set t=CreateTrigger()
set W57=GetHandleId(t)
call SUnit(W57,"Source",Z77)
call SUnit(W57,"Target",X77)
call SInt(W57,"StolenInt",OAE)
call TriggerRegisterTimerEvent(t,60,false)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function OWE))
endif
endif
set AC7=null
set Z77=null
set X77=null
set t=null
endfunction
function OBE takes nothing returns boolean
if GetSpellAbilityId()=='A0OJ' then
call OZE()
endif
return false
endfunction
function OCE takes nothing returns nothing
if IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and LBool(GetHandleId(GetOwningPlayer(GetSpellTargetUnit())),"DisableHelp")and GetSpellTargetUnit()!=GetTriggerUnit()then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),(GetObjectName(('n038'))))
endif
endfunction
function O3E takes nothing returns boolean
if GetSpellAbilityId()=='A0OJ' then
call OCE()
endif
return false
endfunction
function D39 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OBE))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function O3E))
set t=null
endfunction
function O6E takes nothing returns boolean
return GetSpellAbilityId()=='A0OK' or GetSpellAbilityId()=='A1VW'
endfunction
function OLE takes nothing returns nothing
local unit X77=GetEnumUnit()
local unit O1E=GetTriggerUnit()
local integer O0E=GetHeroInt(O1E,true)-GetHeroInt(X77,true)
local integer array O5E
local integer ML8=GetUnitAbilityLevel(O1E,'A0OK')
local integer O2E=7+1*ML8
if ML8==0 then
set ML8=GetUnitAbilityLevel(O1E,'A1VW')
set O2E=7+1*ML8+1
endif
set O5E[1]=10
set O5E[2]=30
set O5E[3]=50
if(O0E>0)then
call UnitDamageTarget(O1E,X77,O0E*O2E,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call QM8(I2S(R2I(O0E*O2E)),3,X77,.023,216,30,30,216)
if(O0E<O5E[ML8])then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Feedback\\SpellBreakerAttack.mdl",X77,"overhead"))
call SetUnitState(X77,UNIT_STATE_MANA,GetUnitState(X77,UNIT_STATE_MANA)*.25)
endif
endif
set X77=null
set O1E=null
endfunction
function O_E takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))then
if(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))then
return true
endif
endif
return false
endfunction
function P4E takes nothing returns nothing
local unit O4D=GetTriggerUnit()
local integer QL8=GetUnitAbilityLevel(O4D,'A0OK')
local real x=GetLocationX(GetSpellTargetLoc())
local real y=GetLocationY(GetSpellTargetLoc())
local group QA9=OG8()
local integer KQD=0
local unit P7E=(LUnit(GetHandleId(O4D),"748"))
if QL8==0 then
set QL8=GetUnitAbilityLevel(O4D,'A1VW')
endif
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",x,y))
loop
exitwhen KQD>=360
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",x+(200+QL8*50)*Cos(KQD*bj_DEGTORAD),y+(200+QL8*50)*Sin(KQD*bj_DEGTORAD)))
set KQD=KQD+45
endloop
call GroupEnumUnitsInRange(QA9,x,y,300+QL8*'d',Condition(function O_E))
if P7E!=null and Z87(x,y,GetUnitX(P7E),GetUnitY(P7E))<(300+QL8*'d')then
call SetUnitInvulnerable(P7E,false)
call GroupAddUnit(QA9,P7E)
endif
call ForGroup(QA9,function OLE)
if P7E!=null and O18(P7E)==false then
call SetUnitInvulnerable(P7E,true)
endif
call OF8(QA9)
set O4D=null
set QA9=null
endfunction
function D69 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O6E))
call TriggerAddAction(t,function P4E)
set t=null
endfunction
function P8E takes nothing returns nothing
call Dmg(S54,GetEnumUnit(),NormalFire,S24)
endfunction
function P9E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=LUnit(W57,"Target")
local unit Z77=LUnit(W57,"Source")
local group g
local integer C77=LInt(W57,"Count")
if GetTriggerEvalCount(t)>200 or GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEvalCount(t)>1 and GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='A0QG' and GetSpellTargetUnit()==X77)then
call DestroyEffect(LEff(W57,"Effect"))
call LT7(W57)
call EA8(t)
else
set C77=C77+1
call SInt(W57,"Count",C77)
set g=OG8()
set H04=Z77
set S54=Z77
set S24=1.+2.*GetUnitAbilityLevel(Z77,'A0QG')
call GroupEnumUnitsInRange(g,GetUnitX(X77),GetUnitY(X77),275,Condition(function UM8))
call GroupRemoveUnit(g,X77)
call ForGroup(g,function P8E)
call OF8(g)
endif
set X77=null
set t=null
set Z77=null
set g=null
return false
endfunction
function PDE takes nothing returns nothing
local trigger t=CreateTrigger()
local effect fx=AddSpecialEffectTarget("war3mapImported\\NewSoulArmor.mdx",GetSpellTargetUnit(),"chest")
local integer W57=GetHandleId(t)
call S68(TO,GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()))
call SUnit(W57,"Source",GetTriggerUnit())
call SUnit(W57,"Target",GetSpellTargetUnit())
call SEff(W57,"Effect",fx)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterUnitEvent(t,GetSpellTargetUnit(),EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function P9E))
set t=null
set fx=null
endfunction
function PEE takes nothing returns boolean
if GetSpellAbilityId()=='A0QG' then
call PDE()
endif
return false
endfunction
function ET9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function PEE))
set t=null
endfunction
function PFE takes unit u returns boolean
return GetUnitAbilityLevel(u,'B02J')>0 or GetUnitAbilityLevel(u,'BUsp')>0 or GetUnitAbilityLevel(u,'Bust')>0 or NH8(u)
endfunction
function PGE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
local integer TA8
local unit Z77
local unit m5
local real x1
local real y1
local real d
local real a
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call LT7(EC8)
call EA8(t)
else
set m5=LUnit(EC8,"Target")
set d=LReal(EC8,"d")
set x=LReal(EC8,"x")
set y=LReal(EC8,"y")
set a=LReal(EC8,"a")
set x1=GetUnitX(m5)+d/ 15*Cos(a)
set y1=GetUnitY(m5)+d/ 15*Sin(a)
if IsUnitType(m5,UNIT_TYPE_HERO)then
call SetUnitPosition(m5,x1,y1)
else
call SetUnitX(m5,x1)
call SetUnitY(m5,y1)
endif
if GetTriggerEvalCount(t)>15 then
set Z77=LUnit(EC8,"Source")
set TA8=LInt(EC8,"Level")
call LT7(EC8)
call EA8(t)
call Dmg(Z77,m5,NormalFire,TA8*40)
set Z77=null
endif
set m5=null
endif
set t=null
return false
endfunction
function PHE takes nothing returns nothing
local trigger t
local integer EC8
local unit Z77=GetTriggerUnit()
local unit m5=GetEnumUnit()
if PFE(m5)==false then
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,.025,true)
call TriggerAddCondition(t,Condition(function PGE))
call SReal(EC8,"x",(j0)*1.)
call SReal(EC8,"y",(K0)*1.)
call SReal(EC8,"d",(Z87(j0,K0,GetUnitX(m5),GetUnitY(m5)))*1.)
call SReal(EC8,"a",(Atan2(K0-GetUnitY(m5),j0-GetUnitX(m5)))*1.)
call SInt(EC8,"Level",l0)
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Target",m5)
endif
set t=null
set Z77=null
set m5=null
endfunction
function PIE takes nothing returns nothing
local group g=OG8()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local integer TA8=GetUnitAbilityLevel(GetTriggerUnit(),'A0QE')
local real r=150+'d'*TA8+25
set H04=GetTriggerUnit()
call S68(EP,x,y)
call DestroyEffect(AddSpecialEffect("war3mapImported\\Star Aura.mdx",x,y))
call GroupEnumUnitsInRange(g,x,y,r,Condition(function U68))
set j0=x
set K0=y
set l0=TA8
call ForGroup(g,function PHE)
call KillTrees(x,y,200)
call RemoveLocation(l)
call OF8(g)
set l=null
set g=null
endfunction
function PJE takes nothing returns boolean
if GetSpellAbilityId()=='A0QE' then
call PIE()
endif
return false
endfunction
function PKE takes nothing returns nothing
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
if S38(x,y)==false or(IsPointInRegion(IF4,((x)*1.),((y)*1.)))then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),(GetObjectName(('n03K'))))
endif
call RemoveLocation(l)
set l=null
endfunction
function PME takes nothing returns boolean
if GetSpellAbilityId()=='A0QE' then
call PKE()
endif
return false
endfunction
function ES9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function PJE))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function PME))
set t=null
endfunction
function Xq takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
call UnitRemoveAbility(m5,'B07W')
call UnitRemoveAbility(m5,'Bblo')
call UnitRemoveAbility(m5,'B062')
call UnitRemoveAbility(m5,'B065')
call UnitRemoveAbility(m5,'Bcrs')
call UnitRemoveAbility(m5,'B016')
call UnitRemoveAbility(m5,'B05R')
set t=null
set m5=null
return false
endfunction
function XQ takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,GetUnitAbilityLevel(GetTriggerUnit(),'A0R7')*1.5+.5,false)
call TriggerAddCondition(t,Condition(function Xq))
call SUnit(GetHandleId(t),"Target",GetSpellTargetUnit())
call S68(bR,GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()))
call DestroyEffect(AddSpecialEffectTarget("effects\\Surge.mdx",GetSpellTargetUnit(),"origin"))
set t=null
endfunction
function PNE takes nothing returns boolean
if GetSpellAbilityId()=='A0R7'then
call XQ()
endif
return false
endfunction
function EU9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function PNE))
set t=null
endfunction
function POE takes boolean PPE returns boolean
local integer EC8=GetHandleId(GetTriggeringTrigger())
local unit PQE=LUnit(EC8,"Wall")
local unit m5=GetTriggerUnit()
local unit XS=CreateUnit(GetOwningPlayer(PQE),'e01S',GetUnitX(m5),GetUnitY(m5),0)
local unit AM7=Y7[GetPlayerId(GetOwningPlayer(PQE))]
local integer ML8=GetUnitAbilityLevel(AM7,'A0QK')
if ML8==0 then
set ML8=GetUnitAbilityLevel(AM7,'A21Q')
endif
call SetUnitAbilityLevel(PQE,'A0QL',ML8)
set PM4=GetUnitX(m5)
set PN4=GetUnitY(m5)
set PO4=m5
if PPE then
call SetUnitAbilityLevel(PQE,'A0QL',3+ML8)
call IssueTargetOrderById(PQE,852274,m5)
call Dmg(PQE,m5,NormalFire,150)
else
call IssueTargetOrderById(PQE,852274,m5)
call Dmg(PQE,m5,NormalFire,150)
endif
call UnitApplyTimedLife(XS,'BTLF',.5)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl",GetUnitX(m5),GetUnitY(m5)))
set PQE=null
set m5=null
set XS=null
return false
endfunction
function PRE takes nothing returns boolean
local group g
if IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(LUnit(GetHandleId(GetTriggeringTrigger()),"Wall")))and XC8(GetUnitTypeId(GetFilterUnit()))==false then
set g=LGroup(GetHandleId(GetTriggeringTrigger()),"g1")
if IsUnitInGroup(GetFilterUnit(),g)==false then
call GroupAddUnit(g,GetFilterUnit())
call POE(false)
endif
endif
set g=null
return false
endfunction
function PSE takes nothing returns boolean
local group g
if IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(LUnit(GetHandleId(GetTriggeringTrigger()),"Wall")))and XC8(GetUnitTypeId(GetFilterUnit()))==false then
set g=LGroup(GetHandleId(GetTriggeringTrigger()),"g1")
if IsUnitInGroup(GetFilterUnit(),g)==false then
call GroupAddUnit(g,GetFilterUnit())
call POE(true)
endif
endif
set g=null
return false
endfunction
function WallOfReplica_FindSource takes nothing returns nothing
if GetPlayerId(GetOwningPlayer(GetEnumUnit()))==HB4 then
call GroupAddUnit(H24,GetEnumUnit())
endif
endfunction
function PTE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
call GroupRemoveUnit(LGroup(W57,"g1"),LUnit(W57,"imagesource"))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))
call LT7(W57)
call DisableTrigger(t)
set t=null
return false
endfunction
function PUE takes nothing returns boolean
local unit PQE=GetSummoningUnit()
local unit Q89=GetSummonedUnit()
local integer W57=GetHandleId(PQE)
local integer PVE=LInt(W57,"NumOfImages")
local trigger t=CreateTrigger()
call SetUnitVertexColor(Q89,255,255,255,'d')
call TriggerRegisterUnitEvent(t,Q89,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function PTE))
call SGroup(GetHandleId(t),"g1",LGroup(W57,"g1"))
call SUnit(GetHandleId(t),"imagesource",PO4)
set PVE=PVE+1
call SInt(W57,"NumOfImages",PVE)
call SUnit(W57,"Illusion"+I2S(PVE),Q89)
call STrig(W57,"IllusionTrig"+I2S(PVE),t)
call SetUnitX(Q89,PM4)
call SetUnitY(Q89,PN4)
set PQE=null
set Q89=null
set t=null
return false
endfunction
function PWE takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Xw takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer v5=GetHandleId(t)
local trigger XW=LTrig(v5,"mastert")
local integer tK=GetHandleId(XW)
local trigger v7=LTrig(tK,"DetectTrig")
local group Xx=LGroup(tK,"g1")
local group XX=LGroup(tK,"g2")
local unit PXE=LUnit(tK,"Wall")
local integer Xy=GetHandleId(PXE)
local integer Xv=LInt(Xy,"NumOfImages")
local integer i
local unit u
call ForGroup(XX,function PWE)
set i=1
loop
exitwhen i>Xv
set u=LUnit(Xy,"Illusion"+I2S(i))
call LT7(GetHandleId(LTrig(Xy,"IllusionTrig"+I2S(i))))
call EA8(LTrig(Xy,"IllusionTrig"+I2S(i)))
if IsUnitIllusion(u)then
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl",GetUnitX(u),GetUnitY(u)))
call RemoveUnit(u)
endif
set i=i+1
endloop
call LT7(v5)
call LT7(tK)
call LT7(Xy)
call RemoveUnit(PXE)
call OF8(Xx)
call OF8(XX)
call EA8(XW)
call EA8(v7)
call EA8(t)
set t=null
set XW=null
set v7=null
set Xx=null
set XX=null
set PXE=null
set u=null
return false
endfunction
function PYE takes nothing returns nothing
local unit N28=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local real PZE=GetUnitFacing(N28)-45
local unit PXE=CreateUnit(GetOwningPlayer(N28),'h00O',x,y,PZE)
local unit u
local real PTD
local real PUD
local integer i
local real Xk
local trigger t=CreateTrigger()
local group g1=OG8()
local integer EC8=GetHandleId(t)
local group g2=OG8()
local trigger XW=t
local integer ML8=GetUnitAbilityLevel(N28,'A0QK')
local boolean PPE=false
if ML8==0 then
set PPE=true
set ML8=GetUnitAbilityLevel(N28,'A21Q')
endif
call SetUnitAbilityLevel(PXE,'A0QL',ML8)
call S68(hR,x,y)
call SGroup(EC8,"g1",g1)
call SGroup(GetHandleId(PXE),"g1",g1)
call SGroup(EC8,"g2",g2)
call SUnit(EC8,"Wall",PXE)
call SInt(GetHandleId(PXE),"NumOfImages",0)
set i=0
loop
exitwhen i>39
set PTD=x+(500-25*i)*Cos((PZE-45)*bj_DEGTORAD)
set PUD=y+(500-25*i)*Sin((PZE-45)*bj_DEGTORAD)
set u=CreateUnit(GetOwningPlayer(N28),'h00P',PTD,PUD,PZE)
call SetUnitPathing(u,false)
call SetUnitX(u,PTD)
call SetUnitY(u,PUD)
call GroupAddUnit(g2,u)
call TriggerRegisterUnitInRange(t,u,17,Condition(function KF8))
set i=i+1
endloop
if PPE then
call TriggerAddCondition(t,Condition(function PSE))
else
call TriggerAddCondition(t,Condition(function PRE))
endif
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,PXE,EVENT_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function PUE))
call STrig(EC8,"DetectTrig",t)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,15*ML8,false)
call TriggerAddCondition(t,Condition(function Xw))
call STrig(GetHandleId(t),"mastert",XW)
call RemoveLocation(l)
set N28=null
set l=null
set u=null
set t=null
set XW=null
set g1=null
set g2=null
set PXE=null
endfunction
function PAE takes nothing returns boolean
if GetSpellAbilityId()=='A0QK' or GetSpellAbilityId()=='A21Q' then
call PYE()
endif
return false
endfunction
function EV9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function PAE))
set t=null
endfunction
function PBE takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),CP4)==false and GU8(GetEnumUnit())==false then
call GroupAddUnit(CP4,GetEnumUnit())
call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),CQ4,false)
call T68(GetEnumUnit(),CQ4,1,3,'B05Q')
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\SpellShieldAmulet\\SpellShieldCaster.mdl",GetEnumUnit(),"overhead"))
endif
endfunction
function PCE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7=(LoadUnitHandle(R8,(W57),(14)))
local real x2=(LoadReal(R8,(W57),(66)))
local real y2=(LoadReal(R8,(W57),(67)))
local real a=(LoadReal(R8,(W57),(137)))
local integer C77=GetTriggerEvalCount(t)
local real x=GetUnitX(AM7)
local real y=GetUnitY(AM7)
local real PND=(LoadReal(R8,(W57),(23)))
local real POD=(LoadReal(R8,(W57),(24)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local group g=OG8()
local group XCD=(LoadGroupHandle(R8,(W57),(187)))
local integer ML8=GetUnitAbilityLevel(AM7,'A0LK')
if Z87(x,y,x2,y2)<=OU then
set x=x2
set y=y2
else
set x=PQ8(PND+65*Cos(a*bj_DEGTORAD))
set y=PS8(POD+65*Sin(a*bj_DEGTORAD))
endif
if ML8==1 then
set CQ4='A29A'
elseif ML8==2 then
set CQ4='A299'
elseif ML8==3 then
set CQ4='A29B'
elseif ML8==4 then
set CQ4='A298'
endif
set H04=AM7
set CP4=XCD
call GroupEnumUnitsInRange(g,x,y,325,Condition(function UM8))
call ForGroup(g,function PBE)
call OF8(g)
call SaveReal(R8,(W57),(23),((x)*1.))
call SaveReal(R8,(W57),(24),((y)*1.))
call SetUnitPosition(AM7,x,y)
if(x==x2 and y==y2)or C77>40 then
call SetUnitX(AC7,x)
call SetUnitY(AC7,y)
call IssueImmediateOrderById(AC7,852096)
call OF8(XCD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SetUnitAnimation(AM7,"stand")
call SetUnitPathing(AM7,true)
call SetUnitInvulnerable(AM7,false)
if GetUnitTypeId(AM7)=='E02X' then
call SetUnitVertexColor(AM7,255,255,255,255)
else
call SetUnitVertexColor(AM7,0,255,150,255)
endif
call EY8(AM7,"TimeWalk|Active")
endif
set t=null
set AM7=null
set AC7=null
return false
endfunction
function P3E takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local location l
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local real x1=GetUnitX(AM7)
local real y1=GetUnitY(AM7)
local real x2
local real y2
local real a
local unit AC7=CreateUnit(GetOwningPlayer(AM7),'e00E',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=YI7(x1,y1,x2,y2)
call RemoveLocation(l)
call SetUnitAnimationByIndex(AM7,0)
call SetUnitPathing(AM7,false)
call SetUnitInvulnerable(AM7,true)
call SetUnitVertexColor(AM7,0,0,0,255)
call EW8(AM7,"TimeWalk|Active")
call SaveReal(R8,(W57),(66),((PQ8(x2))*1.))
call SaveReal(R8,(W57),(67),((PS8(y2))*1.))
call SaveReal(R8,(W57),(23),((x1)*1.))
call SaveReal(R8,(W57),(24),((y1)*1.))
call SaveReal(R8,(W57),(137),((a)*1.))
call SaveUnitHandle(R8,(W57),(14),(AM7))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveGroupHandle(R8,(W57),(187),(OG8()))
call AddPermanentAbility(AC7,'A0LA')
call SetUnitAbilityLevel(AC7,'A0LA',GetUnitAbilityLevel(AM7,'A0LK'))
call TriggerRegisterTimerEvent(t,XO4,true)
call TriggerAddCondition(t,Condition(function PCE))
set AM7=null
set l=null
set t=null
set AC7=null
endfunction
function P6E takes nothing returns boolean
if GetSpellAbilityId()=='A0LK' then
call P3E()
endif
return false
endfunction
function CP8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function P6E))
set t=null
endfunction
function PLE takes nothing returns nothing
local unit O4D=GetTriggerUnit()
local real P08=GetEventDamage()
if(P08>0)and GetUnitState(O4D,UNIT_STATE_LIFE)>1 and GetUnitAbilityLevel(O4D,'BNdo')==0 then
if(GetRandomInt(1,'d')<=(5+(5*GetUnitAbilityLevel(O4D,'A0CZ'))))then
call SetUnitState(O4D,UNIT_STATE_LIFE,GetUnitState(O4D,UNIT_STATE_LIFE)+P08)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",O4D,"hand,left"))
endif
endif
set O4D=null
endfunction
function P1E takes unit N28,boolean SY8 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_DAMAGED)
call TriggerAddAction(t,function PLE)
if SY8 then
set UV7[GetPlayerId(GetOwningPlayer(N28))]=t
endif
set t=null
endfunction
function P0E takes nothing returns boolean
if GetLearnedSkill()=='A0CZ' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A0CZ')==1 then
call P1E(GetTriggerUnit(),false)
endif
return false
endfunction
function CR8 takes nothing returns nothing
set HY4=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(HY4,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(HY4,Condition(function P0E))
endfunction
function P5E takes nothing returns boolean
return GetSpellAbilityId()=='A0J1' or GetSpellAbilityId()=='A1D7'
endfunction
function P2E takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer EC8=GetHandleId(t)
local unit ya=LUnit(EC8,"Caster")
call SetUnitTimeScale(ya,0)
call PauseTimer(t)
call LT7(EC8)
call DestroyTimer(t)
set t=null
set ya=null
endfunction
function P_E takes unit S4 returns boolean
local integer ID=GetUnitTypeId(S4)
return ID=='osp4' or ID=='o008' or ID=='o009' or ID=='ebal' or ID=='e026' or ID=='umtw' or ID=='u00R' or ID=='EC45'
endfunction
function Q4E takes nothing returns boolean
return GetOwningPlayer(GetFilterUnit())!=GetOwningPlayer(W8)and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 or P_E(GetFilterUnit()))
endfunction
function Q7E takes nothing returns nothing
local unit Q8E=GetEnumUnit()
if GetUnitTypeId(GetEnumUnit())!='EC45' then
call PauseUnit(Q8E,true)
call SetUnitTimeScale(Q8E,0)
call UnitRemoveAbility(Q8E,'BUsl')
call UnitRemoveAbility(Q8E,'BUsp')
call UnitRemoveAbility(Q8E,'BUst')
call EW8(Q8E,"4306")
endif
set Q8E=null
endfunction
function Q9E takes nothing returns nothing
local unit QDE=GetEnumUnit()
if GetUnitTypeId(GetEnumUnit())!='EC45' then
call EY8(QDE,"4306")
call PauseUnit(QDE,false)
call SetUnitTimeScale(QDE,1)
endif
set QDE=null
endfunction
function QEE takes nothing returns nothing
local unit M88=GetEnumUnit()
if(IsUnitType(M88,UNIT_TYPE_STRUCTURE)and(IsUnitEnemy(M88,GetOwningPlayer(hx)))and(IsUnitVisibleEx(M88,GetOwningPlayer(hx)))and(hS==null))then
set hS=M88
elseif(IsUnitType(M88,UNIT_TYPE_HERO)and(IsUnitEnemy(M88,GetOwningPlayer(hx)))and(IsUnitVisibleEx(M88,GetOwningPlayer(hx)))and((hS==null)or(IsUnitType(hS,UNIT_TYPE_STRUCTURE))or(GetUnitLifePercent(hS)>GetUnitLifePercent(M88))))then
set hS=M88
endif
set M88=null
endfunction
function QFE takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer EC8=GetHandleId(t)
local unit QGE=LUnit(EC8,"Caster")
local unit N28=LUnit(EC8,"Hero")
local integer TA8=LInt(EC8,"Level")
local group QHE=LGroup(EC8,"Group")
local integer T8=LInt(EC8,"Counter")
local real Y5=GetUnitX(QGE)
local real Z5=GetUnitY(QGE)
local boolexpr QIE=Condition(function Q4E)
local group XS8=OG8()
local integer O5=GetPlayerId(GetOwningPlayer(N28))
local integer VL8=35+TA8*5
if GetUnitAbilityLevel(N28,'A1D7')>0 then
set VL8=30+TA8*10
endif
call ForGroup(QHE,function Q9E)
set W8=N28
call GroupEnumUnitsInRange(XS8,Y5,Z5,425,QIE)
call GroupClear(QHE)
call GroupAddGroup(XS8,QHE)
call ForGroup(XS8,function Q7E)
if(GetPlayerController(GetOwningPlayer(N28))==MAP_CONTROL_COMPUTER)then
if(h4[16+O5]==null)then
set hS=null
set hx=N28
call ForGroup(XS8,function QEE)
set h4[16+O5]=hS
endif
if(h4[16+O5]!=null)then
if((IsUnitAliveBJ(h4[16+O5]))and(GetUnitAbilityLevel(h4[16+O5],'B02F')==0))then
if((not IsUnitInRange(N28,h4[16+O5],300.))and(IsUnitType(h4[16+O5],UNIT_TYPE_HERO)))then
if(not IssueTargetOrderById(N28,852218,h4[16+O5]))then
call IssueTargetOrderById(N28,851983,h4[16+O5])
endif
elseif(not LL7(N28,BU[fengkuangmianju]))then
call IssueTargetOrderById(N28,851983,h4[16+O5])
endif
else
set h4[16+O5]=null
endif
endif
endif
call OF8(XS8)
set T8=T8+1
call SInt(EC8,"Counter",T8)
if T8>VL8 then
set GZ[384+O5]=false
set h4[16+O5]=null
if U9==false then
call ForGroup(QHE,function Q9E)
endif
call RemoveUnit(QGE)
call OF8(QHE)
call PauseTimer(t)
call LT7(EC8)
call DestroyTimer(t)
endif
set t=null
set QGE=null
set N28=null
set QHE=null
call DestroyBoolExpr(QIE)
set QIE=null
set XS8=null
endfunction
function Chronosphere_ExtraMoveFunc takes nothing returns nothing
local integer h=GetHandleId(GetTriggeringTrigger())
local unit s=LUnit(h,"unit")
local real x=LReal(h,"x")
local real y=LReal(h,"y")
local real lastX=LReal(GetHandleId(s),"extraSpeed_lastX")
local real lastY=LReal(GetHandleId(s),"extraSpeed_lastY")
local real nowX=GetUnitX(s)
local real nowY=GetUnitY(s)
local real a=Angle(lastX,lastY,nowX,nowY)
local real d=10-Dist(lastX,lastY,nowX,nowY)
if time>LReal(h,"limit")then
call SetUnitPathing(s,true)
call SBool(GetHandleId(s),"ChronosphereExtraMove",false)
call SReal(GetHandleId(s),"extraSpeed",0)
call TriggerOff()
elseif Dist(nowX,nowY,x,y)<450 then
call SBool(GetHandleId(s),"ChronosphereExtraMove",true)
call SReal(GetHandleId(s),"extraSpeed",1000-GetUnitMoveSpeed(s))
call SetUnitPathing(s,false)
call SetUnitTimeScale(s,1000/ GetUnitDefaultMoveSpeed(s))
set x=nowX+Cos(a)*d
set y=nowY+Sin(a)*d
if IsPointInRegion(IF4,x,y)==false and d>0.09 and d<10 then
call SetXY(s,x,y)
endif
else
call SetUnitPathing(s,true)
call SBool(GetHandleId(s),"ChronosphereExtraMove",false)
call SReal(GetHandleId(s),"extraSpeed",0)
call SetUnitTimeScale(s,1)
endif
call SReal(GetHandleId(s),"extraSpeed_lastX",GetUnitX(s))
call SReal(GetHandleId(s),"extraSpeed_lastY",GetUnitY(s))
set s=null
endfunction
function Chronosphere_ExtraMove takes unit s,real x,real y,real r returns nothing
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
call TriggerRegisterVariableEvent(t,"time",GREATER_THAN,0)
call TriggerAddCondition(t,Condition(function Chronosphere_ExtraMoveFunc))
call SUnit(h,"unit",s)
call SReal(h,"x",x)
call SReal(h,"y",y)
call SReal(h,"limit",time+r)
call SBool(GetHandleId(s),"ChronosphereExtraMove",true)
call SReal(GetHandleId(s),"extraSpeed",1000-GetUnitMoveSpeed(s))
call SReal(GetHandleId(s),"extraSpeed_lastX",GetUnitX(s))
call SReal(GetHandleId(s),"extraSpeed_lastY",GetUnitY(s))
set t=null
endfunction
function QJE takes nothing returns nothing
local unit N28=GetTriggerUnit()
local integer TA8=GetUnitAbilityLevel(N28,('A0J1'))
local location m5=GetSpellTargetLoc()
local real Y5=GetLocationX(m5)
local real Z5=GetLocationY(m5)
local unit QGE=CreateUnit(GetOwningPlayer(N28),('u00L'),Y5,Z5,0)
local timer t=CreateTimer()
local integer EC8=GetHandleId(t)
local group QHE=OG8()
local real tlimit=TA8*0.5+3.5
local integer O5=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
if TA8==0 then
set TA8=GetUnitAbilityLevel(N28,'A1D7')
set tlimit=3+TA8
endif
call Chronosphere_ExtraMove(N28,Y5,Z5,tlimit)
call GroupEnumUnitsOfType(QHE,GetObjectName('EC45'),null)
call GroupRemoveUnit(QHE,N28)
loop
exitwhen FirstOfGroup(QHE)==null
call Chronosphere_ExtraMove(FirstOfGroup(QHE),Y5,Z5,tlimit)
call GroupRemoveUnit(QHE,FirstOfGroup(QHE))
endloop
set GZ[384+O5]=true
set h4[16+O5]=null
set hq[512+O5]=Bz+2.+(TA8)
call SUnit(GetHandleId(t),"Caster",QGE)
call TimerStart(t,.8,false,function P2E)
set t=CreateTimer()
set EC8=GetHandleId(t)
call SUnit(EC8,"Caster",QGE)
call SUnit(EC8,"Hero",N28)
call SGroup(EC8,"Group",QHE)
call SInt(EC8,"Counter",0)
call SInt(EC8,"Level",TA8)
call TimerStart(t,.1,true,function QFE)
call RemoveLocation(m5)
set N28=null
set m5=null
set QGE=null
set t=null
set QHE=null
endfunction
function CS8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function P5E))
call TriggerAddAction(t,function QJE)
set t=null
endfunction
function QKE takes unit u,real QME returns nothing
local integer d=R2I(QME)
local integer array b
local integer a=d
local integer c=1
local integer i=0
local integer QNE
local real difference
set EP7[0]='A23H'
set EP7[1]='A23K'
set EP7[2]='A23L'
set EP7[3]='A23J'
set EP7[4]='A23I'
set EP7[5]='A23M'
if d<1 then
call UnitRemoveAbility(u,EP7[0])
call UnitRemoveAbility(u,EP7[1])
call UnitRemoveAbility(u,EP7[2])
call UnitRemoveAbility(u,EP7[3])
call UnitRemoveAbility(u,EP7[4])
call UnitRemoveAbility(u,EP7[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 QNE=5
set i=0
loop
exitwhen i>QNE
if b[i]==1 then
call AddPermanentAbility(u,EP7[i])
call SetPlayerAbilityAvailable(GetOwningPlayer(u),EP7[i],false)
else
call UnitRemoveAbility(u,EP7[i])
endif
set i=i+1
endloop
endfunction
function QOE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,'A23G')
local real U89=(LoadReal(R8,(GetHandleId(X77)),(682)))
local integer C77=(LoadInteger(R8,(GetHandleId(X77)),(683)))-1
call QKE(X77,C77*ML8)
call SaveInteger(R8,(GetHandleId(X77)),(683),(C77))
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
set X77=null
return false
endfunction
function QPE takes unit Z77,unit X77 returns nothing
local integer ML8=GetUnitAbilityLevel(Z77,'A23G')
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer C77=(LoadInteger(R8,(GetHandleId(X77)),(683)))+1
call QKE(X77,C77*ML8)
call SaveInteger(R8,(GetHandleId(X77)),(683),(C77))
call SaveReal(R8,(GetHandleId(X77)),(682),(((TimerGetElapsed(E4))+EQ7-.01)*1.))
call TriggerRegisterTimerEvent(t,EQ7,false)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function QOE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",X77,"origin"))
set t=null
endfunction
function QQE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer V_8=(LoadInteger(R8,(W57),(30)))
local unit X77=KH8(V_8)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 then
call DisableTrigger(t)
if GetUnitAbilityLevel(X77,'A04R')==0 then
call QPE(Z77,X77)
endif
call KG8(V_8)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
else
call KG8(V_8)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function QRE takes nothing returns nothing
local trigger t=CreateTrigger()
local unit X77=GetTriggerUnit()
local unit Z77=GetAttacker()
local integer W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,1,false)
call TriggerAddCondition(t,Condition(function QQE))
call SaveInteger(R8,(W57),(30),(KJ8(X77)))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set X77=null
set Z77=null
set t=null
endfunction
function QSE takes nothing returns nothing
local unit Z77=GetAttacker()
if((LoadInteger(R8,(GetHandleId((Z77))),((4307))))==1)==false then
call AddTimedBoolBuff(Z77,"4307",.3)
call QRE()
endif
endfunction
function QTE takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),'A23G')>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(R8,(GetHandleId(GetTriggeringTrigger())),(14)))and GetUnitTypeId(GetTriggerUnit())!='n00L' and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))then
call QSE()
endif
return false
endfunction
function QUE takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function QTE))
call SaveUnitHandle(R8,(GetHandleId(t)),(14),(GetTriggerUnit()))
set t=null
endfunction
function QVE takes nothing returns boolean
if GetLearnedSkill()=='A23G' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A23G')==1 then
call QUE()
endif
return false
endfunction
function CT8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function QVE))
set t=null
endfunction
function QWE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
if GetTriggerEventId()==EVENT_UNIT_DEATH or GetUnitAbilityLevel(Z77,'B0C2')==0 then
call LT7(EC8)
call EA8(t)
call SetUnitTimeScale(Z77,1)
call SInt(GetHandleId(Z77),"TimeLocked",2)
else
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",Z77,"origin"))
endif
set t=null
set Z77=null
return false
endfunction
function QXE takes unit Z77 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call SetUnitTimeScale(Z77,0)
call SInt(GetHandleId(Z77),"TimeLocked",1)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function QWE))
call SUnit(EC8,"Source",Z77)
if(LState(Z77,"4306"))then
call Dmg(TC4,Z77,NormalFire,30+10*GetUnitAbilityLevel(TC4,'A081'))
endif
set t=null
endfunction
function QYE takes nothing returns boolean
if GetUnitAbilityLevel(GetFilterUnit(),'B0C2')>0 and(LInt(GetHandleId(GetFilterUnit()),"TimeLocked")==1)==false then
call QXE(GetFilterUnit())
endif
return false
endfunction
function QZE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local group g=OG8()
set TC4=Z77
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),450,Condition(function QYE))
call OF8(g)
set t=null
set Z77=null
set g=null
return false
endfunction
function QAE takes unit Z77,boolean SY8 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function QZE))
call SUnit(EC8,"Source",Z77)
if SY8 then
set UW7[GetPlayerId(GetOwningPlayer(Z77))]=t
endif
set t=null
set Z77=null
endfunction
function QBE takes nothing returns boolean
if GetLearnedSkill()=='A081' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A081')==1 then
call QAE(GetTriggerUnit(),false)
endif
return false
endfunction
function CQ8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function QBE))
set t=null
endfunction
function QCE takes unit Y47 returns boolean
return(GetUnitTypeId(Y47)=='H00I'or GetUnitTypeId(Y47)=='H00J' or GetUnitTypeId(Y47)==GetUnitTypeId(GetTriggerUnit()))and GetUnitState(Y47,UNIT_STATE_LIFE)>.5 and GetOwningPlayer(Y47)==GetOwningPlayer(GetTriggerUnit())
endfunction
function Q3E takes nothing returns boolean
return GetSpellAbilityId()=='A0N8'
endfunction
function Q6E takes nothing returns boolean
return QCE(GetFilterUnit())
endfunction
function QLE takes nothing returns nothing
local unit Q1E=GetEnumUnit()
local real yg=BI7(Q1E,HD)
if yg<Y8 then
set Y8=yg
set W8=Q1E
endif
set Q1E=null
endfunction
function Q0E takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0
endfunction
function Q5E takes nothing returns nothing
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Feedback\\ArcaneTowerAttack.mdl",GetEnumUnit(),"origin"))
call UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),Y8,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE,WEAPON_TYPE_WHOKNOWS)
endfunction
function Q2E takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local location V3D
local real x
local real y
local real BJ7=GetUnitX(Z77)
local real BK7=GetUnitY(Z77)
local group QA9
local boolexpr QZ9
local boolean Q_E=false
if X77!=null and QCE(X77)then
set x=GetUnitX(X77)
set y=GetUnitY(X77)
set Q_E=true
else
set QZ9=Condition(function Q6E)
set QA9=OG8()
call GroupEnumUnitsInRange(QA9,0,0,999999,QZ9)
if X77!=null then
set V3D=GetUnitLoc(X77)
else
set V3D=GetSpellTargetLoc()
endif
set W8=FirstOfGroup(QA9)
if W8!=null then
set Q_E=true
call GroupRemoveUnit(QA9,W8)
set Y8=BI7(W8,V3D)
set HD=V3D
call ForGroup(QA9,function QLE)
set X77=W8
set x=GetUnitX(X77)
set y=GetUnitY(X77)
endif
call OF8(QA9)
call DestroyBoolExpr(QZ9)
call RemoveLocation(V3D)
endif
if Q_E then
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\ToonBoom\\ToonBoom.mdl",BJ7,BK7))
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\ToonBoom\\ToonBoom.mdl",x,y))
call SetUnitX(Z77,x)
call SetUnitY(Z77,y)
set Y8=60+GetUnitAbilityLevel(GetTriggerUnit(),('A0N8'))*20
set QZ9=Condition(function Q0E)
set QA9=OG8()
call GroupEnumUnitsInRange(QA9,BJ7,BK7,400,QZ9)
call ForGroup(QA9,function Q5E)
call OF8(QA9)
set QA9=OG8()
call GroupEnumUnitsInRange(QA9,x,y,400,QZ9)
call ForGroup(QA9,function Q5E)
call OF8(QA9)
call DestroyBoolExpr(QZ9)
endif
call DestroyBoolExpr(QZ9)
set Z77=null
set X77=null
set V3D=null
set QA9=null
set QZ9=null
endfunction
function R4E takes nothing returns boolean
return GetSpellAbilityId()==('A0N8')
endfunction
function R7E takes nothing returns nothing
call SetUnitAnimationByIndex(LUnit(GetHandleId(GetExpiredTimer()),"UnitVar"),2)
endfunction
function R8E takes nothing returns nothing
local timer t=CreateTimer()
call SetUnitAnimationByIndex(GetTriggerUnit(),2)
call SUnit(GetHandleId(t),"UnitVar",GetTriggerUnit())
call TimerStart(t,1,false,function R7E)
set t=null
endfunction
function EH9 takes nothing returns nothing
local trigger t=CreateTrigger()
local integer i=1
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_CHANNEL)
call TriggerAddCondition(t,Condition(function R4E))
call TriggerAddAction(t,function R8E)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Q3E))
call TriggerAddAction(t,function Q2E)
loop
exitwhen i>5
call SetPlayerAbilityAvailable(G8[i],'A2QA',false)
call SetPlayerAbilityAvailable(N8[i],'A2QA',false)
set i=i+1
endloop
set t=null
endfunction
function R9E takes nothing returns boolean
return GetSpellAbilityId()=='A0NB'
endfunction
function RDE takes nothing returns boolean
return GU8(GetFilterUnit())==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(W8))and(UN8(GetFilterUnit())==false or IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(W8)))and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>.5 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitTypeId(GetFilterUnit())!='n00L'
endfunction
function REE takes nothing returns nothing
local unit oA=CreateUnit(GetOwningPlayer(GetEnumUnit()),'e00E',Y8,MD,0)
call AddPermanentAbility(oA,'A0NC')
call IssueTargetOrderById(oA,852106,GetEnumUnit())
set oA=null
endfunction
function RFE takes unit IJ,real x,real y returns nothing
local boolexpr hP=Condition(function RDE)
local group XS8=OG8()
set W8=IJ
call GroupEnumUnitsInRange(XS8,x,y,245,hP)
set Y8=x
set MD=y
call ForGroup(XS8,function REE)
call OF8(XS8)
call DestroyBoolExpr(hP)
set hP=null
set XS8=null
endfunction
function RGE takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer EC8=GetHandleId(t)
local unit IJ=LUnit(EC8,"Projectile")
local real hN=LReal(EC8,"TargetX")
local real ho=LReal(EC8,"TargetY")
local real RK=LReal(EC8,"Angle")
local real iN=GetUnitX(IJ)
local real io=GetUnitY(IJ)
local real Il=GetUnitX(IJ)+30*Cos(RK)
local real IL=GetUnitY(IJ)+30*Sin(RK)
if(Il-hN)*(Il-hN)+(IL-ho)*(IL-ho)<1200 then
call SetUnitX(IJ,hN)
call SetUnitY(IJ,ho)
call RFE(IJ,hN,ho)
call PauseTimer(t)
call LT7(EC8)
call KillUnit(IJ)
call DestroyTimer(t)
else
call SetUnitX(IJ,Il)
call SetUnitY(IJ,IL)
endif
set t=null
set IJ=null
endfunction
function RHE takes nothing returns nothing
local unit N28=GetTriggerUnit()
local location sy=GetSpellTargetLoc()
local real hN=PQ8(GetLocationX(sy))
local real ho=PS8(GetLocationY(sy))
local real iN=PQ8(GetUnitX(N28))
local real io=PS8(GetUnitY(N28))
local unit IJ=CreateUnit(GetOwningPlayer(N28),'h00C',iN,io,0)
local real RK=Atan2(ho-io,hN-iN)
local timer t=CreateTimer()
local integer EC8=GetHandleId(t)
call SetUnitScale(IJ,2,2,2)
call SUnit(EC8,"Projectile",IJ)
call SReal(EC8,"TargetX",hN)
call SReal(EC8,"TargetY",ho)
call SReal(EC8,"Angle",RK)
call TimerStart(t,.035,true,function RGE)
call RemoveLocation(sy)
set sy=null
set IJ=null
set N28=null
set t=null
endfunction
function EI9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function R9E))
call TriggerAddAction(t,function RHE)
set t=null
endfunction
function RIE takes unit Y47 returns boolean
return GetUnitTypeId(Y47)=='H00I'or GetUnitTypeId(Y47)=='H00J'
endfunction
function DoubleTrouble_IsKoboldCondition takes nothing returns boolean
return GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(W8)and GetFilterUnit()!=W8 and(GetUnitTypeId(GetFilterUnit())=='H00I'or GetUnitTypeId(GetFilterUnit())=='H00J')
endfunction
function DoubleTrouble_UnshareXPCondition takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(W8))and RIE(GetFilterUnit())==false
endfunction
function DoubleTrouble_UnshareXPGive takes nothing returns nothing
call AddHeroXP(GetEnumUnit(),X8,true)
endfunction
function RJE takes nothing returns nothing
local integer yp=GetHandleId(GetTriggeringTrigger())
local player j8=ED8(yp,"PlayerVar")
local integer yP=GetHandleId(j8)
local unit YZ8=LUnit(yP,"Kobold0")
local unit YA8=LUnit(yP,"Kobold1")
local unit YB8=LUnit(yP,"Kobold2")
local unit YC8=LUnit(yP,"Kobold3")
local unit Y38=LUnit(yP,"Kobold4")
local integer RKE=GetUnitAbilityLevel(YZ8,'Aamk')*2
local integer RME=GetHeroAgi(YZ8,false)
local integer RNE=GetHeroAgi(YZ8,true)-RME-RKE
local integer ROE=GetHeroStr(YZ8,false)
local integer RPE=GetHeroStr(YZ8,true)-ROE-RKE
local integer RQE=GetHeroInt(YZ8,false)
local integer RRE=GetHeroInt(YZ8,true)-RQE-RKE
local real RSE=0
local integer RTE
local integer RUE
local integer RVE
if LL4 then
set RSE=1.
endif
set RTE=R2I(RME+RNE*RSE)
set RUE=R2I(ROE+RPE*RSE)
set RVE=R2I(RQE+RRE*RSE)
if GetUnitState(YZ8,UNIT_STATE_LIFE)>1 then
if YA8!=null then
call SetHeroAgi(YA8,RTE,false)
call SetHeroStr(YA8,RUE,false)
call SetHeroInt(YA8,RVE,false)
endif
if YB8!=null then
call SetHeroAgi(YB8,RTE,false)
call SetHeroStr(YB8,RUE,false)
call SetHeroInt(YB8,RVE,false)
endif
if YC8!=null then
call SetHeroAgi(YC8,RTE,false)
call SetHeroStr(YC8,RUE,false)
call SetHeroInt(YC8,RVE,false)
endif
if Y38!=null then
call SetHeroAgi(Y38,RTE,false)
call SetHeroStr(Y38,RUE,false)
call SetHeroInt(Y38,RVE,false)
endif
endif
set j8=null
set YZ8=null
set YA8=null
set YB8=null
set YC8=null
endfunction
function RWE takes nothing returns nothing
local integer RXE=GetHandleId(GetTriggeringTrigger())
local player E5D=ED8(RXE,"PlayerVar")
local integer RYE=GetHandleId(E5D)
local unit YZ8=LUnit(RYE,"Kobold0")
local unit YA8=LUnit(RYE,"Kobold1")
local unit YB8=LUnit(RYE,"Kobold2")
local unit YC8=LUnit(RYE,"Kobold3")
local unit Y38=LUnit(RYE,"Kobold4")
local integer RZE=GetHandleId(YZ8)
local integer RAE=GetHandleId(YA8)
local integer RBE=GetHandleId(YB8)
local integer RCE=GetHandleId(YC8)
local integer R3E=GetHandleId(Y38)
local integer R6E=LInt(RZE,"XPEarned")
local integer RLE=LInt(RZE,"XPGiven")
local integer R1E=LInt(RAE,"XPEarned")
local integer R0E=LInt(RAE,"XPGiven")
local integer R5E=LInt(RBE,"XPEarned")
local integer R2E=LInt(RBE,"XPGiven")
local integer R_E=LInt(RCE,"XPEarned")
local integer S4E=LInt(RCE,"XPGiven")
local integer S7E=LInt(R3E,"XPEarned")
local integer S8E=LInt(R3E,"XPGiven")
local integer S9E=GetHeroXP(YZ8)
local integer SDE=GetHeroXP(YA8)
local integer SEE=GetHeroXP(YB8)
local integer SFE=GetHeroXP(YC8)
local integer SGE=GetHeroXP(Y38)
local integer SHE=S9E-R6E-RLE
local integer SIE=SDE-R1E-R0E
local integer SJE=SEE-R5E-R2E
local integer SKE=SFE-R_E-S4E
local integer SME=SGE-S7E-S8E
if GetUnitState(YZ8,UNIT_STATE_LIFE)>1 then
set R6E=R6E+SHE
set R1E=R1E+SIE
set R5E=R5E+SJE
set R_E=R_E+SKE
set S7E=S7E+SME
if YZ8!=null then
call AddHeroXP(YA8,SHE,false)
if GetHeroXP(YA8)!=SDE then
set R0E=R0E+SHE
endif
call AddHeroXP(YB8,SHE,false)
if GetHeroXP(YB8)!=SEE then
set R2E=R2E+SHE
endif
call AddHeroXP(YC8,SHE,false)
if GetHeroXP(YC8)!=SFE then
set S4E=S4E+SHE
endif
call AddHeroXP(Y38,SHE,false)
if GetHeroXP(Y38)!=SGE then
set S8E=S8E+SHE
endif
endif
if YA8!=null then
call AddHeroXP(YZ8,SIE,false)
if GetHeroXP(YZ8)!=S9E then
set RLE=RLE+SIE
endif
call AddHeroXP(YB8,SIE,false)
if GetHeroXP(YB8)!=SEE then
set R2E=R2E+SIE
endif
call AddHeroXP(YC8,SIE,false)
if GetHeroXP(YC8)!=SFE then
set S4E=S4E+SIE
endif
call AddHeroXP(Y38,SIE,false)
if GetHeroXP(Y38)!=SGE then
set S8E=S8E+SIE
endif
endif
if YB8!=null then
call AddHeroXP(YA8,SJE,false)
if GetHeroXP(YA8)!=SDE then
set R0E=R0E+SJE
endif
call AddHeroXP(YZ8,SJE,false)
if GetHeroXP(YZ8)!=S9E then
set RLE=RLE+SJE
endif
call AddHeroXP(YC8,SJE,false)
if GetHeroXP(YC8)!=SFE then
set S4E=S4E+SJE
endif
call AddHeroXP(Y38,SJE,false)
if GetHeroXP(Y38)!=SGE then
set S8E=S8E+SJE
endif
endif
if YC8!=null then
call AddHeroXP(YA8,SKE,false)
if GetHeroXP(YA8)!=SDE then
set R0E=R0E+SKE
endif
call AddHeroXP(YB8,SKE,false)
if GetHeroXP(YB8)!=SEE then
set R2E=R2E+SKE
endif
call AddHeroXP(YZ8,SKE,false)
if GetHeroXP(YZ8)!=S9E then
set RLE=RLE+SKE
endif
call AddHeroXP(Y38,SKE,false)
if GetHeroXP(Y38)!=SGE then
set S8E=S8E+SKE
endif
endif
if Y38!=null then
call AddHeroXP(YA8,SME,false)
if GetHeroXP(YA8)!=SDE then
set R0E=R0E+SME
endif
call AddHeroXP(YB8,SME,false)
if GetHeroXP(YB8)!=SEE then
set R2E=R2E+SME
endif
call AddHeroXP(YZ8,SME,false)
if GetHeroXP(YZ8)!=S9E then
set RLE=RLE+SME
endif
call AddHeroXP(YC8,SME,false)
if GetHeroXP(YC8)!=SFE then
set S4E=S4E+SME
endif
endif
call SInt(RZE,"XPEarned",R6E)
call SInt(RZE,"XPGiven",RLE)
call SInt(RAE,"XPEarned",R1E)
call SInt(RAE,"XPGiven",R0E)
call SInt(RBE,"XPEarned",R5E)
call SInt(RBE,"XPGiven",R2E)
call SInt(RCE,"XPEarned",R_E)
call SInt(RCE,"XPGiven",S4E)
call SInt(R3E,"XPEarned",S7E)
call SInt(R3E,"XPGiven",S8E)
endif
set E5D=null
set YZ8=null
set YA8=null
set YB8=null
set YC8=null
endfunction
function SNE takes nothing returns boolean
return RIE(GetTriggerUnit())and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function SOE takes nothing returns nothing
local unit PQ9=GetTriggerUnit()
local integer EC8=GetHandleId(GetOwningPlayer(PQ9))
local unit YZ8=LUnit(EC8,"Kobold0")
local unit YA8=LUnit(EC8,"Kobold1")
local unit YB8=LUnit(EC8,"Kobold2")
local unit YC8=LUnit(EC8,"Kobold3")
local unit Y38=LUnit(EC8,"Kobold4")
local boolean XFv=false
call DisableTrigger(ES)
if YZ8!=null and YZ8!=PQ9 then
call KillUnit(YZ8)
endif
if YA8!=null and YA8!=PQ9 then
call KillUnit(YA8)
endif
if YB8!=null and YB8!=PQ9 then
call KillUnit(YB8)
endif
if YC8!=null and YC8!=PQ9 then
call KillUnit(YC8)
endif
if Y38!=null and Y38!=PQ9 then
call KillUnit(Y38)
endif
call EnableTrigger(ES)
set PQ9=null
set YZ8=null
set YA8=null
set YB8=null
set YC8=null
set Y38=null
endfunction
function SPE takes nothing returns boolean
return RIE(GetTriggerUnit())and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function SQE takes unit H68,unit AM7 returns nothing
local trigger t=LTrig(GetHandleId(GetOwningPlayer(AM7)),"Kobold|ItemTrigger")
local integer i=0
local boolean SRE=false
local boolean SSE=false
local boolean STE=false
local boolean SUE=false
local boolean SVE=false
local boolean SWE=false
local boolean SXE=false
local boolean SYE=false
local boolean SZE=false
call DisableTrigger(t)
call DisableTrigger(GW4)
loop
exitwhen i>5
if GetItemTypeId(UnitItemInSlot(AM7,i))==BU[suduzhixue]then
set SRE=true
endif
if GetItemTypeId(UnitItemInSlot(AM7,i))==BU[jingmizhixie]then
set SSE=true
endif
if GetItemTypeId(UnitItemInSlot(AM7,i))==BU[donglixie3]then
set STE=true
endif
if GetItemTypeId(UnitItemInSlot(AM7,i))==BU[donglixie2]then
set SUE=true
endif
if GetItemTypeId(UnitItemInSlot(AM7,i))==BU[donglixie1]then
set SVE=true
endif
if GetItemTypeId(UnitItemInSlot(AM7,i))==BU[xiangweixie]then
set SWE=true
endif
if GetItemTypeId(UnitItemInSlot(AM7,i))==BU[mifaxie]then
set SXE=true
endif
if GetItemTypeId(UnitItemInSlot(AM7,i))==(BU[yuanxingxie])then
set SYE=true
endif
if GetItemTypeId(UnitItemInSlot(AM7,i))==(BU[jingmizhixie2])then
set SZE=true
endif
set i=i+1
endloop
set bj_lastCreatedItem=null
set bj_lastCreatedUnit=AM7
call PP8("HOD",T_7)
if bj_lastCreatedItem!=null then
call UnitAddItem(H68,bj_lastCreatedItem)
elseif SZE then
call UnitAddItem(H68,CreateItem((BU[jingmizhixie2]),0,0))
elseif SYE then
call UnitAddItem(H68,CreateItem((BU[yuanxingxie]),0,0))
elseif SXE then
call UnitAddItem(H68,CreateItem(BU[mifaxie],0,0))
elseif SWE then
call UnitAddItem(H68,CreateItem(BU[xiangweixie],0,0))
elseif SVE then
call UnitAddItem(H68,CreateItem(BU[donglixie1],0,0))
elseif SUE then
call UnitAddItem(H68,CreateItem(BU[donglixie2],0,0))
elseif STE then
call UnitAddItem(H68,CreateItem(BU[donglixie3],0,0))
elseif SSE then
call UnitAddItem(H68,CreateItem(BU[jingmizhixie],0,0))
elseif SRE then
call UnitAddItem(H68,CreateItem(BU[suduzhixue],0,0))
endif
call EnableTrigger(t)
call EnableTrigger(GW4)
set t=null
endfunction
function SAE takes nothing returns nothing
local unit Y68=GetTriggerUnit()
local integer i=0
local boolean SRE=false
local boolean SSE=false
local boolean STE=false
local boolean SUE=false
local boolean SVE=false
local boolean SWE=false
local boolean SXE=false
local boolean SYE=false
local boolean SZE=false
local integer RYE=GetHandleId(GetOwningPlayer(Y68))
local unit YZ8=LUnit(RYE,"Kobold0")
local unit YA8=LUnit(RYE,"Kobold1")
local unit YB8=LUnit(RYE,"Kobold2")
local unit YC8=LUnit(RYE,"Kobold3")
local unit Y38=LUnit(RYE,"Kobold4")
local integer SBE
local boolean SCE=false
local integer S3E=0
local integer S6E=0
local integer SLE=0
local integer S1E=0
local integer S0E=0
local integer S5E=0
local integer S2E=0
local integer S_E=0
local integer T4E=0
call DisableTrigger(GetTriggeringTrigger())
if GetUnitTypeId(Y68)=='H00J'then
call UnitRemoveItemFromSlot(Y68,0)
call EnableTrigger(GetTriggeringTrigger())
return
endif
if not(GetItemTypeId(GetManipulatedItem())==BU[suduzhixue]or GetItemTypeId(GetManipulatedItem())==BU[jingmizhixie]or GetItemTypeId(GetManipulatedItem())==BU[donglixie3]or GetItemTypeId(GetManipulatedItem())==BU[donglixie2]or GetItemTypeId(GetManipulatedItem())==BU[donglixie1]or GetItemTypeId(GetManipulatedItem())==BU[xiangweixie]or GetItemTypeId(GetManipulatedItem())==BU[mifaxie]or GetItemTypeId(GetManipulatedItem())==(BU[yuanxingxie])or GetItemTypeId(GetManipulatedItem())==(BU[jingmizhixie2]))and not(T_7 and(GetItemTypeId(GetManipulatedItem())==BU[U07]or GetItemTypeId(GetManipulatedItem())==BU[V77]))then
call EnableTrigger(GetTriggeringTrigger())
return
endif
if GetTriggerEventId()==EVENT_PLAYER_UNIT_DROP_ITEM then
set SCE=true
endif
loop
exitwhen i>5
set SBE=GetItemTypeId(UnitItemInSlot(Y68,i))
if SBE==BU[suduzhixue]then
set S3E=S3E+1
if(not(SCE and SBE==GetItemTypeId(GetManipulatedItem())))or(S3E>1 and SBE==GetItemTypeId(GetManipulatedItem()))then
set SRE=true
endif
endif
if SBE==BU[jingmizhixie]then
set S6E=S6E+1
if(not(SCE and SBE==GetItemTypeId(GetManipulatedItem())))or(S6E>1 and SBE==GetItemTypeId(GetManipulatedItem()))then
set SSE=true
endif
endif
if SBE==BU[donglixie3]then
set SLE=SLE+1
if(not(SCE and SBE==GetItemTypeId(GetManipulatedItem())))or(SLE>1 and SBE==GetItemTypeId(GetManipulatedItem()))then
set STE=true
endif
endif
if SBE==BU[donglixie2]then
set S1E=S1E+1
if(not(SCE and SBE==GetItemTypeId(GetManipulatedItem())))or(S1E>1 and SBE==GetItemTypeId(GetManipulatedItem()))then
set SUE=true
endif
endif
if SBE==BU[donglixie1]then
set S0E=S0E+1
if(not(SCE and SBE==GetItemTypeId(GetManipulatedItem())))or(S0E>1 and SBE==GetItemTypeId(GetManipulatedItem()))then
set SVE=true
endif
endif
if SBE==BU[xiangweixie]then
set S5E=S5E+1
if(not(SCE and SBE==GetItemTypeId(GetManipulatedItem())))or(S5E>1 and SBE==GetItemTypeId(GetManipulatedItem()))then
set SWE=true
endif
endif
if SBE==(BU[mifaxie])then
set S2E=S2E+1
if(not(SCE and SBE==GetItemTypeId(GetManipulatedItem())))or(S2E>1 and SBE==GetItemTypeId(GetManipulatedItem()))then
set SXE=true
endif
endif
if SBE==(BU[yuanxingxie])then
set S_E=S_E+1
if(not(SCE and SBE==GetItemTypeId(GetManipulatedItem())))or(S_E>1 and SBE==GetItemTypeId(GetManipulatedItem()))then
set SYE=true
endif
endif
if SBE==(BU[jingmizhixie2])then
set T4E=T4E+1
if(not(SCE and SBE==GetItemTypeId(GetManipulatedItem())))or(T4E>1 and SBE==GetItemTypeId(GetManipulatedItem()))then
set SZE=true
endif
endif
set i=i+1
endloop
call RemoveItem(UnitRemoveItemFromSlot(YA8,0))
if YB8!=null then
call RemoveItem(UnitRemoveItemFromSlot(YB8,0))
endif
if YC8!=null then
call RemoveItem(UnitRemoveItemFromSlot(YC8,0))
endif
if Y38!=null then
call RemoveItem(UnitRemoveItemFromSlot(Y38,0))
endif
set bj_lastCreatedItem=null
set bj_lastCreatedUnit=YZ8
call PP8("HOD",T_7)
if bj_lastCreatedItem!=null then
call UnitAddItem(YA8,bj_lastCreatedItem)
if YB8!=null then
call UnitAddItem(YB8,CreateItem(GetItemTypeId(bj_lastCreatedItem),0,0))
endif
if YC8!=null then
call UnitAddItem(YC8,CreateItem(GetItemTypeId(bj_lastCreatedItem),0,0))
endif
if Y38!=null then
call UnitAddItem(Y38,CreateItem(GetItemTypeId(bj_lastCreatedItem),0,0))
endif
elseif SZE then
call UnitAddItem(YA8,CreateItem((BU[jingmizhixie2]),0,0))
if YB8!=null then
call UnitAddItem(YB8,CreateItem((BU[jingmizhixie2]),0,0))
endif
if YC8!=null then
call UnitAddItem(YC8,CreateItem((BU[jingmizhixie2]),0,0))
endif
if Y38!=null then
call UnitAddItem(Y38,CreateItem((BU[jingmizhixie2]),0,0))
endif
elseif SYE then
call UnitAddItem(YA8,CreateItem((BU[yuanxingxie]),0,0))
if YB8!=null then
call UnitAddItem(YB8,CreateItem((BU[yuanxingxie]),0,0))
endif
if YC8!=null then
call UnitAddItem(YC8,CreateItem((BU[yuanxingxie]),0,0))
endif
if Y38!=null then
call UnitAddItem(Y38,CreateItem((BU[yuanxingxie]),0,0))
endif
elseif SXE then
call UnitAddItem(YA8,CreateItem((BU[mifaxie]),0,0))
if YB8!=null then
call UnitAddItem(YB8,CreateItem((BU[mifaxie]),0,0))
endif
if YC8!=null then
call UnitAddItem(YC8,CreateItem((BU[mifaxie]),0,0))
endif
if Y38!=null then
call UnitAddItem(Y38,CreateItem((BU[mifaxie]),0,0))
endif
elseif SWE then
call UnitAddItem(YA8,CreateItem(BU[xiangweixie],0,0))
if YB8!=null then
call UnitAddItem(YB8,CreateItem(BU[xiangweixie],0,0))
endif
if YC8!=null then
call UnitAddItem(YC8,CreateItem(BU[xiangweixie],0,0))
endif
if Y38!=null then
call UnitAddItem(Y38,CreateItem((BU[xiangweixie]),0,0))
endif
elseif SVE then
call UnitAddItem(YA8,CreateItem(BU[donglixie1],0,0))
if YB8!=null then
call UnitAddItem(YB8,CreateItem(BU[donglixie1],0,0))
endif
if YC8!=null then
call UnitAddItem(YC8,CreateItem(BU[donglixie1],0,0))
endif
if Y38!=null then
call UnitAddItem(Y38,CreateItem((BU[donglixie1]),0,0))
endif
elseif SUE then
call UnitAddItem(YA8,CreateItem(BU[donglixie2],0,0))
if YB8!=null then
call UnitAddItem(YB8,CreateItem(BU[donglixie2],0,0))
endif
if YC8!=null then
call UnitAddItem(YC8,CreateItem(BU[donglixie2],0,0))
endif
if Y38!=null then
call UnitAddItem(Y38,CreateItem((BU[donglixie2]),0,0))
endif
elseif STE then
call UnitAddItem(YA8,CreateItem(BU[donglixie3],0,0))
if YB8!=null then
call UnitAddItem(YB8,CreateItem(BU[donglixie3],0,0))
endif
if YC8!=null then
call UnitAddItem(YC8,CreateItem(BU[donglixie3],0,0))
endif
if Y38!=null then
call UnitAddItem(Y38,CreateItem((BU[donglixie3]),0,0))
endif
elseif SSE then
call UnitAddItem(YA8,CreateItem(BU[jingmizhixie],0,0))
if YB8!=null then
call UnitAddItem(YB8,CreateItem(BU[jingmizhixie],0,0))
endif
if YC8!=null then
call UnitAddItem(YC8,CreateItem(BU[jingmizhixie],0,0))
endif
if Y38!=null then
call UnitAddItem(Y38,CreateItem((BU[jingmizhixie]),0,0))
endif
elseif SRE then
call UnitAddItem(YA8,CreateItem(BU[suduzhixue],0,0))
if YB8!=null then
call UnitAddItem(YB8,CreateItem(BU[suduzhixue],0,0))
endif
if YC8!=null then
call UnitAddItem(YC8,CreateItem(BU[suduzhixue],0,0))
endif
if Y38!=null then
call UnitAddItem(Y38,CreateItem((BU[suduzhixue]),0,0))
endif
endif
call EnableTrigger(GetTriggeringTrigger())
set Y68=null
set YZ8=null
set YA8=null
set YB8=null
set YC8=null
endfunction
function T7E takes unit T8E,integer T9E returns nothing
local integer yP=GetHandleId(GetOwningPlayer(T8E))
local unit YZ8=LUnit(yP,"Kobold0")
local unit YA8=LUnit(yP,"Kobold1")
local unit YB8=LUnit(yP,"Kobold2")
local unit YC8=LUnit(yP,"Kobold3")
local unit Y38=LUnit(yP,"Kobold4")
if YZ8!=null and YZ8!=T8E then
call SelectHeroSkill(YZ8,T9E)
endif
if YA8!=null and YA8!=T8E then
call SelectHeroSkill(YA8,T9E)
endif
if YB8!=null and YB8!=T8E then
call SelectHeroSkill(YB8,T9E)
endif
if YC8!=null and YC8!=T8E then
call SelectHeroSkill(YC8,T9E)
endif
if Y38!=null and Y38!=T8E then
call SelectHeroSkill(Y38,T9E)
endif
set YZ8=null
set YA8=null
set YB8=null
set YC8=null
set Y38=null
endfunction
function TDE takes integer N7,unit qf,unit qF returns nothing
local integer T8=1
local integer U8=GetUnitAbilityLevel(qf,N7)
loop
exitwhen T8>U8
call SelectHeroSkill(qF,N7)
set T8=T8+1
endloop
endfunction
function TEE takes unit H68,unit TFE returns nothing
call AddHeroXP(H68,GetHeroXP(TFE),false)
call SInt(GetHandleId(H68),"XPGiven",GetHeroXP(TFE))
call SInt(GetHandleId(H68),"XPEarned",0)
call TDE('A0N8',TFE,H68)
call TDE('A0NB',TFE,H68)
call TDE('A0N7',TFE,H68)
call TDE('Aamk',TFE,H68)
call TDE('A0MW',TFE,H68)
call TDE('A27C',TFE,H68)
endfunction
function TGE takes unit YA8,unit YB8,integer YJ,integer Yg,integer YG returns nothing
if Yg>YG then
call SelectHeroSkill(YB8,YJ)
elseif YG>Yg then
call SelectHeroSkill(YA8,YJ)
endif
endfunction
function THE takes unit YA8,unit YB8 returns nothing
local integer y8=GetHeroXP(YA8)
local integer y9=GetHeroXP(YB8)
local integer yW=GetHandleId(YA8)
local integer yx=GetHandleId(YB8)
local integer yZ=LInt(yW,"XPGiven")
local integer y4=LInt(yx,"XPGiven")
local integer VX
if y8>y9 then
set VX=y8-y9
call AddHeroXP(YB8,VX,true)
if y9!=GetHeroXP(YB8)then
call SInt(yx,"XPGiven",y4+VX)
endif
elseif y8<y9 then
set VX=y9-y8
call AddHeroXP(YA8,VX,true)
if y8!=GetHeroXP(YA8)then
call SInt(yW,"XPGiven",yZ+VX)
endif
endif
endfunction
function TIE takes unit YA8,unit YB8 returns nothing
local integer TJE=GetUnitAbilityLevel(YA8,'A0N8')
local integer TKE=GetUnitAbilityLevel(YA8,'A0NB')
local integer TME=GetUnitAbilityLevel(YA8,'A0N7')
local integer TNE=GetUnitAbilityLevel(YA8,'A0MW')
local integer TOE=GetUnitAbilityLevel(YA8,'Aamk')
local integer TPE=GetUnitAbilityLevel(YA8,'A27C')
local integer TQE=GetUnitAbilityLevel(YB8,'A0N8')
local integer TRE=GetUnitAbilityLevel(YB8,'A0NB')
local integer TSE=GetUnitAbilityLevel(YB8,'A0N7')
local integer TTE=GetUnitAbilityLevel(YB8,'A0MW')
local integer TUE=GetUnitAbilityLevel(YB8,'Aamk')
local integer TVE=GetUnitAbilityLevel(YB8,'A27C')
call THE(YA8,YB8)
call TGE(YA8,YB8,'A0N8',TJE,TQE)
call TGE(YA8,YB8,'A0NB',TKE,TRE)
call TGE(YA8,YB8,'A0N7',TME,TSE)
call TGE(YA8,YB8,'A0MW',TNE,TTE)
call TGE(YA8,YB8,'A27C',TPE,TVE)
call TGE(YA8,YB8,'Aamk',TOE,TUE)
endfunction
function TWE takes unit YA8,unit YB8 returns nothing
if YA8!=null and YB8!=null then
call TIE(YA8,YB8)
endif
endfunction
function TXE takes nothing returns nothing
local integer RYE=GetHandleId(ED8(GetHandleId(GetTriggeringTrigger()),"PlayerVar"))
local unit YZ8=LUnit(RYE,"Kobold0")
local unit YA8=LUnit(RYE,"Kobold1")
local unit YB8=LUnit(RYE,"Kobold2")
local unit YC8=LUnit(RYE,"Kobold3")
local unit Y38=LUnit(RYE,"Kobold4")
call DisableTrigger(PP4)
call TWE(YZ8,YA8)
call TWE(YZ8,YB8)
call TWE(YZ8,YC8)
call TWE(YZ8,Y38)
call TWE(YA8,YB8)
call TWE(YA8,YC8)
call TWE(YA8,Y38)
call TWE(YB8,YC8)
call TWE(YB8,Y38)
call TWE(YC8,Y38)
call EnableTrigger(PP4)
set YZ8=null
set YA8=null
set YB8=null
set YC8=null
set Y38=null
endfunction
function TYE takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.2,true)
call TriggerAddAction(t,function TXE)
call DA8(GetHandleId(t),"PlayerVar",GetOwningPlayer(GetTriggerUnit()))
set t=null
endfunction
function TZE takes unit Z77 returns nothing
local trigger t
call SUnit(GetHandleId(GetOwningPlayer(Z77)),"Kobold0",Z77)
call SInt(GetHandleId(Z77),"XPEarned",GetHeroXP(Z77))
call SInt(GetHandleId(Z77),"XPGiven",0)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddAction(t,function RWE)
call DA8(GetHandleId(t),"PlayerVar",GetOwningPlayer(Z77))
call STrig(GetHandleId(GetOwningPlayer(Z77)),"Kobold|XPTrigger",t)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.3,true)
call TriggerAddAction(t,function RJE)
call DA8(GetHandleId(t),"PlayerVar",GetOwningPlayer(Z77))
call STrig(GetHandleId(GetOwningPlayer(Z77)),"Kobold|AttributesTrigger",t)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(t,function SOE)
call TriggerAddCondition(t,Condition(function SNE))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddAction(t,function SAE)
call TriggerAddCondition(t,Condition(function SPE))
call STrig(GetHandleId(GetOwningPlayer(Z77)),"Kobold|ItemTrigger",t)
call ExecuteFunc("TYE")
set t=null
endfunction
function TAE takes unit Z77,boolean TBE returns nothing
local player E5D=GetOwningPlayer(Z77)
local integer W57=GetHandleId(E5D)
local unit H68
set L64=L64+1
if L64==1 then
call TZE(Z77)
endif
call TriggerExecute(LTrig(GetHandleId(GetOwningPlayer(Z77)),"Kobold|XPTrigger"))
call TriggerExecute(LTrig(GetHandleId(GetOwningPlayer(Z77)),"Kobold|AttributesTrigger"))
if TBE==false then
call T7E(Z77,'A0MW')
call T7E(Z77,'A27C')
endif
set H68=CreateUnit(GetOwningPlayer(Z77),'H00J',GetUnitX(Z77),GetUnitY(Z77),0)
call TEE(H68,Z77)
call SQE(H68,Z77)
call SUnit(W57,"Kobold"+I2S(L64),H68)
set H68=null
endfunction
function TCE takes nothing returns nothing
if LL4==false then
set LL4=true
call DisableTrigger(PP4)
call TAE(H04,true)
call EnableTrigger(PP4)
endif
endfunction
function T3E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if IsUnitIllusion(GetTriggerUnit())==false and GetOwningPlayer(GetTriggerUnit())==GetOwningPlayer(Z77)and RIE(GetTriggerUnit())then
if GetLearnedSkill()=='A0MW' or GetLearnedSkill()=='A27C' then
call DisableTrigger(GetTriggeringTrigger())
call TAE(GetTriggerUnit(),false)
call EnableTrigger(GetTriggeringTrigger())
elseif GetLearnedSkill()=='Aamk' or GetLearnedSkill()=='A0N8' or GetLearnedSkill()=='A0NB' or GetLearnedSkill()=='A0N7' then
call TriggerExecute(LTrig(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"Kobold|XPTrigger"))
call TriggerExecute(LTrig(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"Kobold|AttributesTrigger"))
call DisableTrigger(GetTriggeringTrigger())
call T7E(GetTriggerUnit(),GetLearnedSkill())
call EnableTrigger(GetTriggeringTrigger())
endif
endif
set Z77=null
return false
endfunction
function T6E takes nothing returns nothing
local unit Z77=H04
local integer W57
set L34=CreateTrigger()
set PP4=L34
set W57=GetHandleId(L34)
call TriggerRegisterAllPlayersEvent(L34,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(L34,Condition(function T3E))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set Z77=null
endfunction
function Yu takes nothing returns boolean
return IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and O18(GetFilterUnit())==false and T79(GetFilterUnit())==false)
endfunction
function YU takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local integer TA8=LInt(EC8,"Level")
local group g
local unit u
local real d
local real a
local real TLE
local real T1E
local unit AC7=LUnit(EC8,"Caster")
if GetTriggerEvalCount(t)>32 then
call LT7(EC8)
call EA8(t)
else
set g=OG8()
set H04=N28
call GroupEnumUnitsInRange(g,GetUnitX(N28),GetUnitY(N28),500,Condition(function Yu))
set u=GroupPickRandomUnit(g)
if u==null then
set d=GetRandomReal(175,400)
set a=GetRandomReal(0,6)
set TLE=GetUnitX(N28)+d*Cos(a)
set T1E=GetUnitY(N28)+d*Sin(a)
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\SteamTank\\SteamTankImpact.mdl",TLE,T1E))
else
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\SteamTank\\SteamTankImpact.mdl",u,"origin"))
call Dmg(AC7,u,NormalNormal,12.5*TA8)
endif
call OF8(g)
endif
set u=null
set g=null
set t=null
set N28=null
return false
endfunction
function Yv takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit N28=GetTriggerUnit()
local unit AC7=CreateUnit(GetOwningPlayer(N28),'e00E',GetUnitX(N28),GetUnitY(N28),0)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\RocketMissile\\RocketMissile.mdl",N28,"hand right"))
call SUnit(EC8,"Hero",N28)
call SUnit(EC8,"Caster",AC7)
call SInt(EC8,"Level",GetUnitAbilityLevel(N28,'A035'))
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerAddCondition(t,Condition(function YU))
set t=null
set N28=null
endfunction
function T0E takes nothing returns boolean
if GetSpellAbilityId()=='A035'then
call Yv()
endif
return false
endfunction
function CU8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function T0E))
set t=null
endfunction
function T5E takes nothing returns nothing
local unit Z77=A54
local unit X77=GetEnumUnit()
call Dmg(Z77,X77,NormalFire,A24)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",X77,"origin"))
set Z77=null
set X77=null
endfunction
function T2E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local integer ML8=GetUnitAbilityLevel(Z77,'A21F')
local group g
if ML8!=0 then
set A24=ML8*40+40
else
set ML8=GetUnitAbilityLevel(Z77,'A21G')
set A24=ML8*50+50
endif
if GetTriggerEventId()==EVENT_WIDGET_DEATH or GetUnitState(Z77,UNIT_STATE_MANA)<20*ML8 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))==-1 or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and(GetSpellAbilityId()=='A21H' or(GetSpellAbilityId()=='A27H' or GetSpellAbilityId()=='AZ1H')))then
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A21F' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A21F',true)
endif
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A21G' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A21G',true)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A21H',false)
call LT7(EC8)
call EA8(t)
call EY8(Z77,"AI|PulseNova")
elseif GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT then
call SetUnitState(Z77,UNIT_STATE_MANA,GetUnitState(Z77,UNIT_STATE_MANA)-20*ML8)
set H04=Z77
set A54=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),475,Condition(function UM8))
call ForGroup(g,function T5E)
call OF8(g)
set g=null
endif
set t=null
return false
endfunction
function T_E takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",Z77,"origin"))
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A21F',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A21G',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A21H',true)
call UnitAddAbility(Z77,'A21H')
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function T2E))
call SUnit(EC8,"Source",Z77)
call TriggerEvaluate(t)
call EW8(Z77,"AI|PulseNova")
set Z77=null
set t=null
endfunction
function Yy takes nothing returns boolean
if GetSpellAbilityId()=='A21F'or GetSpellAbilityId()=='A21G'then
call T_E()
endif
return false
endfunction
function CV8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Yy))
set t=null
endfunction
function U4E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit YVD=(LoadUnitHandle(R8,(W57),(374)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local integer U7E=(LoadInteger(R8,(W57),(233)))
local integer VID=(LoadInteger(R8,(W57),(12)))
local unit AC7
local group g
local real a
local real x
local real y
local integer U8E=(LoadInteger(R8,(W57),(720)))
if U8E>0 then
set U8E=U8E-1
call SaveInteger(R8,(W57),(720),(U8E))
return false
endif
if Z87(GetUnitX(YVD),GetUnitY(YVD),GetUnitX(X77),GetUnitY(X77))>20 then
set a=YI7(GetUnitX(YVD),GetUnitY(YVD),GetUnitX(X77),GetUnitY(X77))
call SetUnitFacing(YVD,a)
set x=GetUnitX(YVD)+13.5*Cos(a*bj_DEGTORAD)
set y=GetUnitY(YVD)+13.5*Sin(a*bj_DEGTORAD)
call SetUnitX(YVD,x)
call SetUnitY(YVD,y)
else
if O18(X77)==false then
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call AddPermanentAbility(AC7,'A091')
call SetUnitAbilityLevel(AC7,'A091',ML8)
call IssueTargetOrderById(AC7,852226,X77)
endif
if U7E>VID then
call RemoveUnit(YVD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set g=OG8()
set H04=Z77
call GroupEnumUnitsInRange(g,GetUnitX(X77),GetUnitY(X77),600,Condition(function U38))
call GroupRemoveUnit(g,X77)
set X77=GroupPickRandomUnit(g)
call OF8(g)
if X77==null then
call RemoveUnit(YVD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
call SaveInteger(R8,(W57),(720),(10))
call SaveInteger(R8,(W57),(233),(U7E+1))
call SaveUnitHandle(R8,(W57),(17),(X77))
endif
endif
endif
set t=null
set Z77=null
set X77=null
set YVD=null
set AC7=null
set g=null
return false
endfunction
function U9E takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A05T')
local integer VID=10
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit YVD
if GetSpellAbilityId()=='A08H' then
set ML8=GetUnitAbilityLevel(Z77,'A08H')+1
set VID=100000
endif
set YVD=CreateUnit(GetOwningPlayer(Z77),'e009',GetUnitX(Z77),GetUnitY(Z77),0)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(374),(YVD))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveInteger(R8,(W57),(233),(1))
call SaveInteger(R8,(W57),(12),(VID))
call SaveInteger(R8,(W57),(720),(0))
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function U4E))
set Z77=null
set X77=null
set YVD=null
set t=null
endfunction
function UDE takes nothing returns boolean
if GetSpellAbilityId()=='A05T' or GetSpellAbilityId()=='A08H' then
call U9E()
endif
return false
endfunction
function CX8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function UDE))
set t=null
endfunction
function UEE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local integer TA8=GetUnitAbilityLevel(Z77,'A094')
local integer UFE=GetHeroLevel(m5)
local real P08=GetUnitState(m5,UNIT_STATE_MAX_LIFE)*.2
if ModuloInteger(UFE,7-TA8)==0 or UFE==25 then
call Dmg(Z77,m5,NormalFire,P08)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl",m5,"chest"))
endif
set Z77=null
set m5=null
endfunction
function UGE takes nothing returns boolean
if GetSpellAbilityId()=='A094' then
call UEE()
endif
return false
endfunction
function CY8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function UGE))
set t=null
endfunction
function UHE takes unit Z77 returns nothing
call UnitRemoveAbility(Z77,'A1OQ')
call UnitRemoveAbility(Z77,'A1OR')
call UnitRemoveAbility(Z77,'A1OS')
call UnitRemoveAbility(Z77,'A1OT')
call UnitRemoveAbility(Z77,'A1OU')
call UnitRemoveAbility(Z77,'A1OV')
call UnitRemoveAbility(Z77,'A1OW')
call UnitRemoveAbility(Z77,'A1OX')
call UnitRemoveAbility(Z77,'A1OY')
call UnitRemoveAbility(Z77,'S00M')
call UnitRemoveAbility(Z77,'A1OZ')
call UnitRemoveAbility(Z77,'S00N')
call UnitRemoveAbility(Z77,'A1P0')
call UnitRemoveAbility(Z77,'A1P1')
call UnitRemoveAbility(Z77,'A1P7')
call UnitRemoveAbility(Z77,'A1PA')
call UnitRemoveAbility(Z77,'A1P3')
call UnitRemoveAbility(Z77,'A1P4')
call UnitRemoveAbility(Z77,'A1P5')
call UnitRemoveAbility(Z77,'A1P6')
call UnitRemoveAbility(Z77,'A2AG')
endfunction
function UIE takes unit Z77,unit X77 returns nothing
local integer UJE=GetUnitTypeId(X77)
local integer UKE=0
local integer UME=0
if UJE=='n0HX' then
set UKE='A1OQ'
elseif UJE=='nomg' then
set UKE='A1OR'
elseif UJE=='nfpu' then
set UKE='A1OS'
elseif UJE=='nstl' then
set UKE='A1OT'
elseif UJE=='nsat' then
set UKE='A1OU'
elseif UJE=='nsth' then
set UKE='A1OV'
set UME='A1OW'
elseif UJE=='n00S' then
set UKE='A1OX'
set UME='A1OY'
elseif UJE=='nkol' then
set UKE='S00M'
elseif UJE=='nfsh' then
set UKE='A1OZ'
set UME='A2AG'
elseif UJE=='ncnk' then
set UKE='S00N'
set UME='A1P0'
elseif UJE=='ngns' then
set UKE='A1P1'
elseif UJE=='ngh1' then
set UKE='A1P7'
set UME='A1PA'
elseif UJE=='nowe' then
set UKE='A1P3'
set UME='A1P4'
elseif UJE=='ndtw' then
set UKE='A1P5'
set UME='A1P6'
elseif UJE=='nwlg' then
set UKE='A1OY'
endif
if UKE!=0 then
call UHE(Z77)
call AddPermanentAbility(Z77,UKE)
endif
if UME!=0 then
call AddPermanentAbility(Z77,UME)
endif
endfunction
function UNE takes real UOE returns string
local string c1="|c00ff0303"
local string c="||"
local string p=" "
local string s=c1+c+"|r"
local string UPE
if UOE>85 then
set UPE=s+p+s+p+s+p+s+p+s+p+s+p+s
elseif UOE>70 then
set UPE=s+p+s+p+s+p+s+p+s+p+s+p+c
elseif UOE>55 then
set UPE=s+p+s+p+s+p+s+p+s+p+c+p+c
elseif UOE>40 then
set UPE=s+p+s+p+s+p+s+p+c+p+c+p+c
elseif UOE>25 then
set UPE=s+p+s+p+s+p+c+p+c+p+c+p+c
elseif UOE>10 then
set UPE=s+p+s+p+c+p+c+p+c+p+c+p+c
elseif UOE>0 then
set UPE=s+p+c+p+c+p+c+p+c+p+c+p+c
else
set UPE=c+p+c+p+c+p+c+p+c+p+c+p+c
endif
return UPE
endfunction
function UQE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local integer TA8=LInt(EC8,"Level")
local integer URE=LInt(EC8,"TypeID")
local real HP=LReal(EC8,"HP")
local texttag tt=LTTag(EC8,"tt")
local integer iX=GetTriggerEvalCount(t)
local real USE=P18(HP-iX,0)
local boolean UTE=true
call SetTextTagText(tt,UNE('d'*USE/ HP),.018)
call SetTextTagPosUnit(tt,N28,0)
if IsUnitVisibleEx(N28,GetLocalPlayer())==false and N08(GetLocalPlayer())==false then
set UTE=false
endif
call SetTextTagVisibility(tt,UTE)
if USE==0 then
call TM8(GetOwningPlayer(N28),N28,25*TA8)
endif
if USE==0 or GetTriggerEventId()==EVENT_UNIT_DEATH then
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),'A10R',true)
call UnitRemoveAbility(N28,'A10S')
call LT7(EC8)
call EA8(t)
call DestroyTextTag(tt)
endif
set t=null
set N28=null
return false
endfunction
function UUE takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer TA8=GetUnitAbilityLevel(AM7,'A10R')
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local real HP=GetUnitState(X77,UNIT_STATE_LIFE)
local integer UVE=GetUnitLevel(X77)
local integer URE=GetUnitTypeId(X77)
local texttag tt=CreateTextTag()
local boolean UTE=true
local unit AC7=CreateUnit(GetOwningPlayer(AM7),'e00E',0,0,0)
call QK8("SPLK",GetUnitX(AM7),GetUnitY(AM7),GetUnitX(X77),GetUnitY(X77),.1,.1,.2,.9,.5)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\Devour\\DevourEffectArt.mdl",GetUnitX(X77),GetUnitY(X77)))
if IsUnitVisibleEx(AM7,GetLocalPlayer())==false then
set UTE=false
endif
call UIE(AM7,X77)
call SetTextTagText(tt,UNE('d'),.018)
call SetTextTagPosUnit(tt,AM7,0)
call SetTextTagVisibility(tt,UTE)
call SetTextTagPermanent(tt,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),'A10R',false)
call AddPermanentAbility(AM7,'A10S')
call SUnit(EC8,"Hero",AM7)
call STTag(EC8,"tt",tt)
call SInt(EC8,"TypeID",URE)
call SInt(EC8,"Level",TA8)
call SReal(EC8,"HP",HP)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function UQE))
call ShowUnit(X77,false)
call UnitRemoveBuffs(X77,true,true)
call UnitRemoveAbility(X77,'Aetl')
call UnitDamageTarget(AC7,X77,100000000.,true,false,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
set t=null
set AM7=null
set X77=null
set AC7=null
endfunction
function UWE takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local integer TA8=GetUnitAbilityLevel(N28,'A10R')
local integer UVE=GetUnitLevel(m5)
if(GetOwningPlayer(m5)!=G8[0]and GetOwningPlayer(m5)!=N8[0])and((TA8==1 and UVE>2)or(TA8==2 and UVE>4)or(TA8==3 and UVE>5)or(TA8==4 and UVE>6))then
endif
set N28=null
set m5=null
endfunction
function UXE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local integer id=LInt(EC8,"Count")
call LT7(EC8)
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function UYE takes nothing returns nothing
local integer id=GetSpellAbilityId()
local trigger t
local integer EC8
if id=='A1OQ' or id=='A1OR' or id=='A1OS' or id=='A1OT' or id=='A1OU' or id=='A1OV' or id=='A1OW' or id=='A1OX' or id=='A1OY' or id=='S00M' or id=='A1OZ' or id=='S00N' or id=='A1P0' or id=='A1P1' or id=='A1P2' or id=='A1P3' or id=='A1P4' or id=='A1P5' or id=='A1P6' then
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,1,false)
call TriggerAddCondition(t,Condition(function UXE))
call SUnit(EC8,"Source",GetTriggerUnit())
call SInt(EC8,"Count",id)
set t=null
endif
endfunction
function UZE takes nothing returns boolean
if GetSpellAbilityId()=='A10R' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST then
call UWE()
else
call UUE()
endif
elseif GetUnitTypeId(GetTriggerUnit())=='UC42' then
call UYE()
endif
return false
endfunction
function CZ8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function UZE))
set t=null
endfunction
function UAE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
call UnitRemoveAbility(Z77,'A1OL')
call UnitRemoveAbility(Z77,'A1ON')
call UnitRemoveAbility(Z77,'A1OO')
call UnitRemoveAbility(Z77,'A1OM')
call UnitRemoveAbility(Z77,'B04J')
call LT7(EC8)
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function UBE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer ML8=GetUnitAbilityLevel(Z77,'A1OP')
if ML8==1 then
call AddPermanentAbility(Z77,'A1OL')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1OL',false)
elseif ML8==2 then
call AddPermanentAbility(Z77,'A1ON')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1ON',false)
elseif ML8==3 then
call AddPermanentAbility(Z77,'A1OO')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1OO',false)
elseif ML8==4 then
call AddPermanentAbility(Z77,'A1OM')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1OM',false)
endif
call TriggerRegisterTimerEvent(t,8+2*ML8,false)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function UAE))
call SUnit(W57,"Source",Z77)
set Z77=null
set t=null
endfunction
function UCE takes nothing returns boolean
if GetSpellAbilityId()=='A1OP' then
call UBE()
endif
return false
endfunction
function CA8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function UCE))
set t=null
endfunction
function U3E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer C77=(LoadInteger(R8,(W57),(34)))
if BS7(Z77,X77)>900 or O18(Z77)then
set C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
endif
if C77>16*10 then
call UnitRemoveAbility(X77,'BNdo')
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetUnitAbilityLevel(X77,'BNdo')==0 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function U6E takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function U3E))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(34),(0))
set Z77=null
set X77=null
set t=null
endfunction
function ULE takes nothing returns boolean
local unit u=GetSpellTargetUnit()
call UnitRemoveBuffs(u,true,false)
if GetSpellAbilityId()=='A0A2' then
call U6E()
endif
if(GetSpellAbilityId()=='A0A2' or GetSpellAbilityId()=='A0MU')and HasLinkin(u)==false then
call RW8(u,'BNdo',1,WI7(GetSpellAbilityId()=='A0MU',15,16),GetTriggerUnit(),GetSpellAbilityId(),false)
endif
set u=null
return false
endfunction
function CB8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function ULE))
set t=null
endfunction
function U1E takes nothing returns boolean
local real x
local real y
if(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false and(GetUnitAbilityLevel((GetFilterUnit()),'Bcyc')>0)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))then
set x=A2+GetRandomReal(20,70)*Cos(GetUnitFacing(GetTriggerUnit())*bj_DEGTORAD)
set y=N2+GetRandomReal(20,70)*Sin(GetUnitFacing(GetTriggerUnit())*bj_DEGTORAD)
call SetUnitPosition(GetFilterUnit(),x,y)
endif
return false
endfunction
function U0E takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local group g=OG8()
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',x,y,0)
local integer ML8=GetUnitAbilityLevel(Z77,'A29L')
set A2=GetUnitX(Z77)+'d'*Cos(GetUnitFacing(Z77)*bj_DEGTORAD)
set N2=GetUnitY(Z77)+'d'*Sin(GetUnitFacing(Z77)*bj_DEGTORAD)
call GroupEnumUnitsInRange(g,x,y,410+24,Condition(function U1E))
call OF8(g)
call AddPermanentAbility(AC7,'A06F')
call SetUnitAbilityLevel(AC7,'A06F',ML8)
call IssueImmediateOrderById(AC7,852127)
set Z77=null
set g=null
endfunction
function U5E takes nothing returns boolean
if GetSpellAbilityId()=='A29L' then
call U0E()
endif
return false
endfunction
function CC8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function U5E))
set t=null
endfunction
function U2E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer NZ8=GetHandleId(t)
local unit V5D=(LoadUnitHandle(R8,(NZ8),(17)))
if GetUnitAbilityLevel(V5D,'B00U')==0 or GetTriggerEventId()==EVENT_UNIT_DEATH then
call UnitRemoveAbility(V5D,'A1Q0')
call UnitRemoveAbility(V5D,'A1Q1')
call UnitRemoveAbility(V5D,'A1Q2')
call UnitRemoveAbility(V5D,'A1Q3')
call FlushChildHashtable(R8,(NZ8))
call EA8(t)
endif
set t=null
set V5D=null
return false
endfunction
function U_E takes nothing returns nothing
local trigger t=CreateTrigger()
local integer NZ8=GetHandleId(t)
local unit W8D=GetTriggerUnit()
local unit V5D=GetSpellTargetUnit()
local integer ZK7=GetUnitAbilityLevel(W8D,'A037')
local integer V4E
if ZK7==1 then
set V4E='A1Q0'
elseif ZK7==2 then
set V4E='A1Q1'
elseif ZK7==3 then
set V4E='A1Q2'
elseif ZK7==4 then
set V4E='A1Q3'
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(V5D),V4E,false)
call AddPermanentAbility(V5D,V4E)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,V5D,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function U2E))
call SaveUnitHandle(R8,(NZ8),(17),(V5D))
set t=null
set W8D=null
set V5D=null
endfunction
function V7E takes nothing returns boolean
if GetSpellAbilityId()=='A037' then
call U_E()
endif
return false
endfunction
function C38 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function V7E))
set t=null
endfunction
function V8E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer NZ8=GetHandleId(t)
local unit V5D=(LoadUnitHandle(R8,(NZ8),(17)))
call UnitRemoveAbility(V5D,'A1Q6')
call UnitRemoveAbility(V5D,'B0CX')
call FlushChildHashtable(R8,(NZ8))
call EA8(t)
set t=null
set V5D=null
return false
endfunction
function V9E takes unit W8D,unit V5D,integer ZK7 returns nothing
local trigger t=CreateTrigger()
local integer NZ8=GetHandleId(t)
call SetUnitPathing(V5D,true)
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerRegisterUnitEvent(t,V5D,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function V8E))
call SaveUnitHandle(R8,(NZ8),(17),(V5D))
call AddPermanentAbility(V5D,'A1Q6')
call UnitMakeAbilityPermanent(V5D,true,'A1Q6')
call SetPlayerAbilityAvailable(GetOwningPlayer(V5D),'A1Q6',false)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\HumanBloodKnight.mdl",V5D,"chest"))
call Dmg(W8D,V5D,NormalFire,70*ZK7)
set t=null
endfunction
function VDE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer NZ8=GetHandleId(t)
local unit W8D=(LoadUnitHandle(R8,(NZ8),(2)))
local unit VEE=(LoadUnitHandle(R8,(NZ8),(393)))
local unit VFE=(LoadUnitHandle(R8,(NZ8),(394)))
local unit VGE=(LoadUnitHandle(R8,(NZ8),(395)))
local unit VHE=(LoadUnitHandle(R8,(NZ8),(396)))
local unit UNIT5=(LoadUnitHandle(R8,(NZ8),(397)))
local unit UNIT6=(LoadUnitHandle(R8,(NZ8),(398)))
local unit UNIT7=(LoadUnitHandle(R8,(NZ8),(399)))
local unit UNIT8=(LoadUnitHandle(R8,(NZ8),(400)))
local unit UNIT9=(LoadUnitHandle(R8,(NZ8),(401)))
local unit UNIT10=(LoadUnitHandle(R8,(NZ8),(402)))
local integer ZK7=(LoadInteger(R8,(NZ8),(5)))
local real VIE=(LoadReal(R8,(NZ8),(47)))
local real VJE=(LoadReal(R8,(NZ8),(48)))
local real VKE=(LoadReal(R8,(NZ8),(13)))
local real VME=(LoadReal(R8,(NZ8),(6)))
local real VNE=(LoadReal(R8,(NZ8),(7)))
local real VOE=PR8(VME+19*Cos(VKE))
local real VPE=PT8(VNE+19*Sin(VKE))
local group g
local integer VQE=(LoadInteger(R8,(NZ8),(12)))
local location l
call SetUnitPosition(W8D,VOE,VPE)
call SetUnitFacing(W8D,VKE*bj_RADTODEG)
call SaveReal(R8,(NZ8),(6),((VOE)*1.))
call SaveReal(R8,(NZ8),(7),((VPE)*1.))
if ModuloInteger(GetTriggerEvalCount(t),4)==0 then
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",VOE,VPE))
endif
if GetTriggerEvalCount(t)==2 then
call SetUnitAnimationByIndex(W8D,3)
endif
if VEE==null or VFE==null or VGE==null or VHE==null or UNIT5==null or UNIT6==null or UNIT7==null or UNIT8==null or UNIT9==null or UNIT10==null then
set H04=W8D
set g=OG8()
call GroupEnumUnitsInRange(g,VOE,VPE,'}'+25,Condition(function U28))
if FirstOfGroup(g)!=null then
if VEE!=null then
call GroupRemoveUnit(g,VEE)
endif
if VFE!=null then
call GroupRemoveUnit(g,VFE)
endif
if VGE!=null then
call GroupRemoveUnit(g,VGE)
endif
if VHE!=null then
call GroupRemoveUnit(g,VHE)
endif
if UNIT5!=null then
call GroupRemoveUnit(g,UNIT5)
endif
if UNIT6!=null then
call GroupRemoveUnit(g,UNIT6)
endif
if UNIT7!=null then
call GroupRemoveUnit(g,UNIT7)
endif
if UNIT8!=null then
call GroupRemoveUnit(g,UNIT8)
endif
if UNIT9!=null then
call GroupRemoveUnit(g,UNIT9)
endif
if UNIT10!=null then
call GroupRemoveUnit(g,UNIT10)
endif
if FirstOfGroup(g)!=null then
if VEE==null then
set VEE=FirstOfGroup(g)
call SetUnitPathing(VEE,false)
call AddTimedBoolBuff(VEE,"4404",5)
elseif VFE==null then
set VFE=FirstOfGroup(g)
call SetUnitPathing(VFE,false)
call AddTimedBoolBuff(VFE,"4404",5)
elseif VGE==null then
set VGE=FirstOfGroup(g)
call SetUnitPathing(VGE,false)
call AddTimedBoolBuff(VGE,"4404",5)
elseif VHE==null then
set VHE=FirstOfGroup(g)
call SetUnitPathing(VHE,false)
call AddTimedBoolBuff(VHE,"4404",5)
elseif UNIT5==null then
set UNIT5=FirstOfGroup(g)
call SetUnitPathing(UNIT5,false)
call AddTimedBoolBuff(UNIT5,"4404",5)
elseif UNIT6==null then
set UNIT6=FirstOfGroup(g)
call SetUnitPathing(UNIT6,false)
call AddTimedBoolBuff(UNIT6,"4404",5)
elseif UNIT7==null then
set UNIT7=FirstOfGroup(g)
call SetUnitPathing(UNIT7,false)
call AddTimedBoolBuff(UNIT7,"4404",5)
elseif UNIT8==null then
set UNIT8=FirstOfGroup(g)
call SetUnitPathing(UNIT8,false)
call AddTimedBoolBuff(UNIT8,"4404",5)
elseif UNIT9==null then
set UNIT9=FirstOfGroup(g)
call SetUnitPathing(UNIT9,false)
call AddTimedBoolBuff(UNIT9,"4404",5)
elseif UNIT10==null then
set UNIT10=FirstOfGroup(g)
call SetUnitPathing(UNIT10,false)
call AddTimedBoolBuff(UNIT10,"4404",5)
endif
endif
endif
call OF8(g)
set g=null
endif
call SaveUnitHandle(R8,(NZ8),(393),(VEE))
call SaveUnitHandle(R8,(NZ8),(394),(VFE))
call SaveUnitHandle(R8,(NZ8),(395),(VGE))
call SaveUnitHandle(R8,(NZ8),(396),(VHE))
call SaveUnitHandle(R8,(NZ8),(397),(UNIT5))
call SaveUnitHandle(R8,(NZ8),(398),(UNIT6))
call SaveUnitHandle(R8,(NZ8),(399),(UNIT7))
call SaveUnitHandle(R8,(NZ8),(400),(UNIT8))
call SaveUnitHandle(R8,(NZ8),(401),(UNIT9))
call SaveUnitHandle(R8,(NZ8),(402),(UNIT10))
if VEE!=null then
call SetUnitPosition(VEE,VOE,VPE)
endif
if VFE!=null then
call SetUnitPosition(VFE,VOE,VPE)
endif
if VGE!=null then
call SetUnitPosition(VGE,VOE,VPE)
endif
if VHE!=null then
call SetUnitPosition(VHE,VOE,VPE)
endif
if UNIT5!=null then
call SetUnitPosition(UNIT5,VOE,VPE)
endif
if UNIT6!=null then
call SetUnitPosition(UNIT6,VOE,VPE)
endif
if UNIT7!=null then
call SetUnitPosition(UNIT7,VOE,VPE)
endif
if UNIT8!=null then
call SetUnitPosition(UNIT8,VOE,VPE)
endif
if UNIT9!=null then
call SetUnitPosition(UNIT9,VOE,VPE)
endif
if UNIT10!=null then
call SetUnitPosition(UNIT10,VOE,VPE)
endif
if ModuloInteger(GetTriggerEvalCount(t),3)==0 then
call KillTrees(VOE,VPE,200)
endif
if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>VQE then
call DestroyEffect((LoadEffectHandle(R8,(NZ8),(175))))
call SetUnitAnimationByIndex(W8D,0)
call SetUnitTimeScale(W8D,1.)
call SetUnitPathing(W8D,true)
call FlushChildHashtable(R8,(NZ8))
call EA8(t)
if VEE!=null then
if IsPointInRegion(IF4,GetUnitX(VEE),GetUnitY(VEE))then
set l=T89(GetUnitX(VEE),GetUnitY(VEE))
call SetUnitX(VEE,PR8(GetLocationX(l)))
call SetUnitY(VEE,PT8(GetLocationY(l)))
call RemoveLocation(l)
set l=null
endif
call V9E(W8D,VEE,ZK7)
call KillTrees(GetUnitX(VEE),GetUnitY(VEE),300)
endif
if VFE!=null then
if IsPointInRegion(IF4,GetUnitX(VFE),GetUnitY(VFE))then
set l=T89(GetUnitX(VFE),GetUnitY(VFE))
call SetUnitX(VFE,PR8(GetLocationX(l)))
call SetUnitY(VFE,PT8(GetLocationY(l)))
call RemoveLocation(l)
set l=null
endif
call V9E(W8D,VFE,ZK7)
call KillTrees(GetUnitX(VFE),GetUnitY(VFE),300)
endif
if VGE!=null then
if IsPointInRegion(IF4,GetUnitX(VGE),GetUnitY(VGE))then
set l=T89(GetUnitX(VGE),GetUnitY(VGE))
call SetUnitX(VGE,PR8(GetLocationX(l)))
call SetUnitY(VGE,PT8(GetLocationY(l)))
call RemoveLocation(l)
set l=null
endif
call V9E(W8D,VGE,ZK7)
call KillTrees(GetUnitX(VGE),GetUnitY(VGE),300)
endif
if VHE!=null then
if IsPointInRegion(IF4,GetUnitX(VHE),GetUnitY(VHE))then
set l=T89(GetUnitX(VHE),GetUnitY(VHE))
call SetUnitX(VHE,PR8(GetLocationX(l)))
call SetUnitY(VHE,PT8(GetLocationY(l)))
call RemoveLocation(l)
set l=null
endif
call V9E(W8D,VHE,ZK7)
call KillTrees(GetUnitX(VHE),GetUnitY(VHE),300)
endif
if UNIT5!=null then
if IsPointInRegion(IF4,GetUnitX(UNIT5),GetUnitY(UNIT5))then
set l=T89(GetUnitX(UNIT5),GetUnitY(UNIT5))
call SetUnitX(UNIT5,PR8(GetLocationX(l)))
call SetUnitY(UNIT5,PT8(GetLocationY(l)))
call RemoveLocation(l)
set l=null
endif
call V9E(W8D,UNIT5,ZK7)
call KillTrees(GetUnitX(UNIT5),GetUnitY(UNIT5),300)
endif
if UNIT6!=null then
if IsPointInRegion(IF4,GetUnitX(UNIT6),GetUnitY(UNIT6))then
set l=T89(GetUnitX(UNIT6),GetUnitY(UNIT6))
call SetUnitX(UNIT6,PR8(GetLocationX(l)))
call SetUnitY(UNIT6,PT8(GetLocationY(l)))
call RemoveLocation(l)
set l=null
endif
call V9E(W8D,UNIT6,ZK7)
call KillTrees(GetUnitX(UNIT6),GetUnitY(UNIT6),300)
endif
if UNIT7!=null then
if IsPointInRegion(IF4,GetUnitX(UNIT7),GetUnitY(UNIT7))then
set l=T89(GetUnitX(UNIT7),GetUnitY(UNIT7))
call SetUnitX(UNIT7,PR8(GetLocationX(l)))
call SetUnitY(UNIT7,PT8(GetLocationY(l)))
call RemoveLocation(l)
set l=null
endif
call V9E(W8D,UNIT7,ZK7)
call KillTrees(GetUnitX(UNIT7),GetUnitY(UNIT7),300)
endif
if UNIT8!=null then
if IsPointInRegion(IF4,GetUnitX(UNIT8),GetUnitY(UNIT8))then
set l=T89(GetUnitX(UNIT8),GetUnitY(UNIT8))
call SetUnitX(UNIT8,PR8(GetLocationX(l)))
call SetUnitY(UNIT8,PT8(GetLocationY(l)))
call RemoveLocation(l)
set l=null
endif
call V9E(W8D,UNIT8,ZK7)
call KillTrees(GetUnitX(UNIT8),GetUnitY(UNIT8),300)
endif
if UNIT9!=null then
if IsPointInRegion(IF4,GetUnitX(UNIT9),GetUnitY(UNIT9))then
set l=T89(GetUnitX(UNIT9),GetUnitY(UNIT9))
call SetUnitX(UNIT9,PR8(GetLocationX(l)))
call SetUnitY(UNIT9,PT8(GetLocationY(l)))
call RemoveLocation(l)
set l=null
endif
call V9E(W8D,UNIT9,ZK7)
call KillTrees(GetUnitX(UNIT9),GetUnitY(UNIT9),300)
endif
if UNIT10!=null then
if IsPointInRegion(IF4,GetUnitX(UNIT10),GetUnitY(UNIT10))then
set l=T89(GetUnitX(UNIT10),GetUnitY(UNIT10))
call SetUnitX(UNIT10,PR8(GetLocationX(l)))
call SetUnitY(UNIT10,PT8(GetLocationY(l)))
call RemoveLocation(l)
set l=null
endif
call V9E(W8D,UNIT10,ZK7)
call KillTrees(GetUnitX(UNIT10),GetUnitY(UNIT10),300)
endif
if VEE!=null and O18(VEE)==false then
call IssueTargetOrderById(W8D,851983,VEE)
elseif VFE!=null and O18(VFE)==false then
call IssueTargetOrderById(W8D,851983,VFE)
elseif VGE!=null and O18(VGE)==false then
call IssueTargetOrderById(W8D,851983,VGE)
elseif VHE!=null and O18(VHE)==false then
call IssueTargetOrderById(W8D,851983,VHE)
elseif UNIT5!=null and O18(UNIT5)==false then
call IssueTargetOrderById(W8D,851983,UNIT5)
elseif UNIT6!=null and O18(UNIT6)==false then
call IssueTargetOrderById(W8D,851983,UNIT6)
elseif UNIT7!=null and O18(UNIT7)==false then
call IssueTargetOrderById(W8D,851983,UNIT7)
elseif UNIT8!=null and O18(UNIT8)==false then
call IssueTargetOrderById(W8D,851983,UNIT8)
elseif UNIT9!=null and O18(UNIT9)==false then
call IssueTargetOrderById(W8D,851983,UNIT9)
elseif UNIT10!=null and O18(UNIT10)==false then
call IssueTargetOrderById(W8D,851983,UNIT10)
endif
call KillTrees(VOE,VPE,375)
if IsPointInRegion(IF4,GetUnitX(W8D),GetUnitY(W8D))then
set l=T89(GetUnitX(W8D),GetUnitY(W8D))
call SetUnitX(W8D,PR8(GetLocationX(l)))
call SetUnitY(W8D,PT8(GetLocationY(l)))
call RemoveLocation(l)
set l=null
endif
endif
set t=null
set W8D=null
set VEE=null
set VFE=null
set VGE=null
set VHE=null
return false
endfunction
function VRE takes nothing returns nothing
local trigger t=CreateTrigger()
local integer NZ8=GetHandleId(t)
local real VIE=PR8(GetSpellTargetX())
local real VJE=PT8(GetSpellTargetY())
local unit W8D=GetTriggerUnit()
local real MME=GetUnitX(W8D)
local real VSE=GetUnitY(W8D)
local integer ZK7=GetUnitAbilityLevel(W8D,'A1RD')
local real a=YI7(MME,VSE,VIE,VJE)*bj_DEGTORAD
local real LW7=550+200*ZK7+25
if Z87(MME,VSE,VIE,VJE)>LW7 then
set VIE=PR8(MME+LW7*Cos(a))
set VJE=PT8(VSE+LW7*Sin(a))
endif
call SetUnitPathing(W8D,false)
call SetUnitAnimationByIndex(W8D,3)
call SetUnitTimeScale(W8D,1.5)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterUnitEvent(t,W8D,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function VDE))
call SaveUnitHandle(R8,(NZ8),(2),(W8D))
call SaveInteger(R8,(NZ8),(5),(ZK7))
call SaveUnitHandle(R8,(NZ8),(393),(null))
call SaveUnitHandle(R8,(NZ8),(394),(null))
call SaveUnitHandle(R8,(NZ8),(395),(null))
call SaveUnitHandle(R8,(NZ8),(396),(null))
call SaveReal(R8,(NZ8),(47),((VIE)*1.))
call SaveReal(R8,(NZ8),(48),((VJE)*1.))
call SaveReal(R8,(NZ8),(6),((MME)*1.))
call SaveReal(R8,(NZ8),(7),((VSE)*1.))
call SaveReal(R8,(NZ8),(13),((Atan2(VJE-VSE,VIE-MME))*1.))
call SaveInteger(R8,(NZ8),(12),(R2I(Z87(MME,VSE,VIE,VJE)/ 19.)))
call SaveEffectHandle(R8,(NZ8),(175),(AddSpecialEffectTarget("war3mapImported\\SkewerTuskGlow_1.mdx",W8D,"head")))
set t=null
set W8D=null
endfunction
function VTE takes nothing returns boolean
if GetSpellAbilityId()=='A1RD' then
call VRE()
endif
return false
endfunction
function VUE takes nothing returns boolean
if GetSpellAbilityId()=='A1RD' then
call SetUnitAnimationByIndex(GetTriggerUnit(),7)
endif
return false
endfunction
function C68 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function VTE))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function VUE))
set t=null
endfunction
function VVE takes nothing returns boolean
if GetSpellAbilityId()=='A1C0' then
call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),'A1ET',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),'A1ES',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),'A1EQ',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),'A1ER',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),'A23F',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),'AZ34',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),'AZ35',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),'AZ36',false)
endif
return false
endfunction
function CL8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function VVE))
set t=null
endfunction
function VWE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,KC7)
call SetUnitState(X77,UNIT_STATE_LIFE,GetUnitState(X77,UNIT_STATE_LIFE)+.1*(20+GetUnitState(X77,UNIT_STATE_MAX_LIFE)*(.02+.01*ML8)))
if GetTriggerEvalCount(t)>39 or(GetTriggerEvalCount(t)==1 and IsUnitHidden(X77))then
call UnitRemoveAbility(X77,K37)
call DestroyEffect((LoadEffectHandle(R8,(W57),(609))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(610))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(611))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(612))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(613))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(614))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(615))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(616))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(617))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function VXE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t
local integer W57
local unit AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call UnitAddAbility(AC7,'A2LG')
if IssueTargetOrderById(AC7,852095,X77)then
set t=CreateTrigger()
set W57=GetHandleId(t)
call AddPermanentAbility(X77,K37)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function VWE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveEffectHandle(R8,(W57),(609),(AddSpecialEffectTarget(K67,X77,"hand right")))
call SaveEffectHandle(R8,(W57),(610),(AddSpecialEffectTarget(K67,X77,"hand left")))
call SaveEffectHandle(R8,(W57),(611),(AddSpecialEffectTarget(K67,X77,"foot right")))
call SaveEffectHandle(R8,(W57),(612),(AddSpecialEffectTarget(K67,X77,"foot left")))
call SaveEffectHandle(R8,(W57),(613),(AddSpecialEffectTarget(K67,X77,"foot right mount rear")))
call SaveEffectHandle(R8,(W57),(614),(AddSpecialEffectTarget(K67,X77,"foot left mount rear")))
call SaveEffectHandle(R8,(W57),(615),(AddSpecialEffectTarget(K67,X77,"head")))
call SaveEffectHandle(R8,(W57),(616),(AddSpecialEffectTarget(K67,X77,"chest")))
call SaveEffectHandle(R8,(W57),(617),(AddSpecialEffectTarget(K67,X77,"weapon")))
endif
set Z77=null
set X77=null
set t=null
endfunction
function VYE takes nothing returns boolean
if GetSpellAbilityId()==KC7 then
call VXE()
endif
return false
endfunction
function IK9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function VYE))
set t=null
endfunction
function VZE takes nothing returns nothing
local unit X77=GetEnumUnit()
call DisableTrigger(K07)
call UnitWakeUp(X77)
call IssueTargetOrderById(X77,851983,K57)
call EnableTrigger(K07)
set X77=null
endfunction
function VAE takes nothing returns nothing
call AddTimedBoolBuff(GetEnumUnit(),"4328",.75)
endfunction
function VBE takes nothing returns nothing
local unit X77=GetEnumUnit()
if IsUnitInGroup(X77,K17)==false then
call GroupAddUnit(K17,X77)
call TriggerRegisterUnitEvent(K07,X77,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterUnitEvent(K07,X77,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(K07,X77,EVENT_UNIT_ISSUED_TARGET_ORDER)
call EW8(X77,"4328")
endif
set X77=null
endfunction
function VCE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local integer C77=(LoadInteger(R8,(W57),(34)))
local group XCD=(LoadGroupHandle(R8,(W57),(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 C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
set K17=XCD
set K07=t
set g=OG8()
set H04=Z77
call GroupEnumUnitsInRange(g,GetUnitX(X77),GetUnitY(X77),350+25,Condition(function UW8))
call GroupRemoveUnit(g,X77)
call ForGroup(g,function VBE)
call OF8(g)
if C77==(2.25+.25*ML8)*20 or O18(X77)then
call ForGroup(XCD,function VAE)
call OF8(XCD)
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set K07=t
set K57=X77
call ForGroup(XCD,function VZE)
if ModuloInteger(C77,20)==0 or C77==0 then
endif
endif
else
if UnitIsSleeping(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'B008')==0 and GetIssuedOrderId()!=851973 and HL7==false then
call DisableTrigger(t)
call ClearSelectionForPlayer(GetOwningPlayer(GetTriggerUnit()))
call IssueTargetOrderById(GetTriggerUnit(),851983,X77)
call EnableTrigger(t)
endif
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function V3E takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer ML8=GetUnitAbilityLevel(Z77,KL7)
local unit X77=GetSpellTargetUnit()
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call UnitAddAbility(AC7,'A2NJ')
call SetUnitAbilityLevel(AC7,'A2NJ',ML8)
call IssueTargetOrderById(AC7,852095,X77)
set K27=Z77
call TriggerRegisterTimerEvent(t,.05,true)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveGroupHandle(R8,(W57),(22),(OG8()))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget(K_7,X77,"overhead")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffect(M47,GetUnitX(X77),GetUnitY(X77))))
call TriggerAddCondition(t,Condition(function VCE))
set Z77=null
set X77=null
set t=null
endfunction
function V6E takes nothing returns boolean
if GetSpellAbilityId()==KL7 and HasLinkin(GetSpellTargetUnit())==false then
call V3E()
endif
return false
endfunction
function IM9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function V6E))
set t=null
endfunction
function VLE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,M77)
call Dmg(Z77,X77,HeroMagic,(.032+.002*ML8)*GetUnitState(X77,UNIT_STATE_MAX_LIFE))
if(TimerGetElapsed(E4))>=(LoadReal(R8,(GetHandleId(Z77)),(782)))then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function V1E takes unit Z77,unit X77 returns nothing
local trigger t
local integer W57
call SetUnitState(Z77,UNIT_STATE_MANA,GetUnitState(Z77,UNIT_STATE_MANA)*.8)
if(LoadReal(R8,(GetHandleId(Z77)),(782)))>(TimerGetElapsed(E4))then
call SaveReal(R8,(GetHandleId(Z77)),(782),(((TimerGetElapsed(E4))+MD7)*1.))
else
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function VLE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget(M97,X77,"chest")))
call SaveReal(R8,(GetHandleId(Z77)),(782),(((TimerGetElapsed(E4))+MD7)*1.))
endif
set t=null
endfunction
function V0E takes nothing returns boolean
local real d
local real U89
local integer C77
local unit Z77
local unit X77
if GetUnitAbilityLevel(GetTriggerUnit(),M87)>0 and GetUnitAbilityLevel(GetEventDamageSource(),M77)>0 and(LoadUnitHandle(R8,(GetHandleId(GetTriggeringTrigger())),(2)))==GetEventDamageSource()then
set Z77=GetEventDamageSource()
set X77=GetTriggerUnit()
set C77=(LoadInteger(R8,(GetHandleId(Z77)),(780)))
set U89=(LoadReal(R8,(GetHandleId(Z77)),(781)))
if U89+MD7<(TimerGetElapsed(E4))then
set C77=1
set U89=(TimerGetElapsed(E4))
call SaveInteger(R8,(GetHandleId(Z77)),(780),(C77))
call SaveReal(R8,(GetHandleId(Z77)),(781),((U89)*1.))
else
set C77=C77+1
set U89=(TimerGetElapsed(E4))
call SaveInteger(R8,(GetHandleId(Z77)),(780),(C77))
call SaveReal(R8,(GetHandleId(Z77)),(781),((U89)*1.))
endif
if C77==4 then
set C77=0
call SaveInteger(R8,(GetHandleId(Z77)),(780),(C77))
call V1E(Z77,X77)
endif
call FlushChildHashtable(R8,(GetHandleId(GetTriggeringTrigger())))
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function V5E takes nothing returns nothing
local trigger t
local unit X77
local unit Z77
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
set X77=GetSpellTargetUnit()
set Z77=GetTriggerUnit()
else
set X77=GetTriggerUnit()
set Z77=GetAttacker()
endif
if IsUnitIllusion(Z77)==false then
set t=CreateTrigger()
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
call SaveBoolean(R8,(GetHandleId(t)),(264),(true))
else
call SaveBoolean(R8,(GetHandleId(t)),(264),(false))
endif
call SaveUnitHandle(R8,(GetHandleId(t)),(2),(Z77))
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function V0E))
endif
set t=null
set X77=null
set Z77=null
endfunction
function V2E takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if GetUnitAbilityLevel(GetAttacker(),M77)>0 and(LoadBoolean(R8,(GetHandleId(GetTriggeringTrigger())),(263)))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(R8,(GetHandleId(GetTriggeringTrigger())),(14)))then
call V5E()
endif
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if(GetIssuedOrderId()==852255)then
call SaveBoolean(R8,(GetHandleId(GetTriggeringTrigger())),(263),(true))
elseif(GetIssuedOrderId()==852256)then
call SaveBoolean(R8,(GetHandleId(GetTriggeringTrigger())),(263),(false))
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==M77 then
call V5E()
endif
return false
endfunction
function V_E takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(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 V2E))
call SaveUnitHandle(R8,(GetHandleId(t)),(14),(GetTriggerUnit()))
set t=null
endfunction
function W4E takes nothing returns boolean
if GetLearnedSkill()==M77 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),M77)==1 then
call V_E()
endif
return false
endfunction
function IP9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function W4E))
set t=null
endfunction
function W7E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call KillUnit(AC7)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
set AC7=null
return false
endif
if O18(Z77)==false then
call SetUnitX(AC7,GetUnitX(Z77))
call SetUnitY(AC7,GetUnitY(Z77))
else
if IsUnitAlly(AC7,G8[0])then
call SetUnitX(AC7,IK4)
call SetUnitY(AC7,IM4)
else
call SetUnitX(AC7,JQ4)
call SetUnitY(AC7,JR4)
endif
endif
set t=null
set Z77=null
set AC7=null
return false
endfunction
function W8E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
if O18(X77)==false then
call SetUnitState(X77,UNIT_STATE_LIFE,GetUnitState(X77,UNIT_STATE_LIFE)*.94)
endif
if GetTriggerEvalCount(t)==5 then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function W9E takes unit Z77,unit X77 returns nothing
local trigger t
local integer W57
local integer ML8
local integer WDE
local integer WEE
if((LState(X77,"4329")==false))and GU8(X77)==false and GetUnitTypeId(X77)!='n00L' then
call AddTimedBoolBuff(X77,"4329",MP7)
set ML8=GetUnitAbilityLevel(Z77,ME7)
if ML8==1 then
set WDE=MF7
set WEE=MG7
elseif ML8==2 then
set WDE=MH7
set WEE=MI7
elseif ML8==3 then
set WDE=MJ7
set WEE=MK7
elseif ML8==4 then
set WDE=MM7
set WEE=MN7
endif
call T68(X77,WDE,1,4,MO7)
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),WDE,false)
call UnitMakeAbilityPermanent(X77,true,WEE)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function W8E))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostDamage\\FrostDamage.mdl",X77,"chest")))
endif
endfunction
function WFE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 then
call DisableTrigger(t)
call W9E(Z77,X77)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
else
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set X77=null
set Z77=null
return false
endfunction
function WGE takes nothing returns nothing
local trigger t=CreateTrigger()
local unit X77=GetTriggerUnit()
local unit Z77=GetAttacker()
local integer W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerAddCondition(t,Condition(function WFE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
set t=null
set X77=null
set Z77=null
endfunction
function WHE takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if GetAttacker()==(LoadUnitHandle(R8,(GetHandleId(GetTriggeringTrigger())),(2)))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false then
if GetUnitTypeId(GetAttacker())=='N0MB' or GetUnitTypeId(GetAttacker())=='N0MC' or GetUnitTypeId(GetAttacker())=='N0MO' or GetUnitTypeId(GetAttacker())=='N0MA' then
call WGE()
endif
endif
else
call W7E()
endif
return false
endfunction
function WIE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'o01Y',GetUnitX(Z77),GetUnitY(Z77),0)
if IsUnitIllusion(Z77)==false then
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
else
call TriggerRegisterDeathEvent(t,Z77)
endif
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function WHE))
call SaveUnitHandle(R8,(GetHandleId(t)),(2),(Z77))
call SaveUnitHandle(R8,(GetHandleId(t)),(19),(AC7))
set Z77=null
set AC7=null
set t=null
endfunction
function WJE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
call SetTerrainPathable(x,y,PATHING_TYPE_WALKABILITY,false)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
return false
endfunction
function WKE takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
call SetTerrainPathable(x,y,PATHING_TYPE_WALKABILITY,true)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function WJE))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
set Z77=null
set t=null
endfunction
function WME takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_HERO_SKILL then
if GetLearnedSkill()==ME7 and GetUnitAbilityLevel(GetTriggerUnit(),ME7)==1 then
call WIE()
endif
else
if GetSpellAbilityId()==ME7 then
if GetUnitTypeId(GetTriggerUnit())!='N0M7' then
call KillTrees(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),150)
if IsTerrainPathable(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),PATHING_TYPE_WALKABILITY)then
call WKE()
endif
endif
endif
endif
return false
endfunction
function IQ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WME))
set t=null
endfunction
function WNE takes nothing returns nothing
call Q88("war3mapImported\\FortunesEndTarget.mdx",GetEnumUnit(),"origin",3)
call IssueTargetOrderById(M17,852111,GetEnumUnit())
if M57!=null and GetUnitAbilityLevel(GetEnumUnit(),'A2T4')>0 then
call TriggerEvaluate(M57)
endif
call Dmg(ML7,GetEnumUnit(),NormalFire,75*M07)
endfunction
function WOE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=(LoadUnitHandle(R8,(GetHandleId(Z77)),(796)))
local real WPE=PL8((TimerGetElapsed(E4))-(LoadReal(R8,(GetHandleId(Z77)),(358))),3)
local integer ML8=GetUnitAbilityLevel(Z77,'A2QT')
local integer WQE=R2I(2.*WPE)
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),GetUnitFacing(Z77))
local unit WRE
local group g
if X77!=null then
set WRE=CreateUnit(GetOwningPlayer(Z77),'o00Z',GetUnitX(X77),GetUnitY(X77),0)
call UnitApplyTimedLife(WRE,'BTLF',.5)
call UnitAddAbility(AC7,'A2T2')
call SetUnitAbilityLevel(AC7,'A2T2',WQE)
set H04=Z77
set ML7=Z77
set M17=AC7
set M07=ML8
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(X77),GetUnitY(X77),215+25,Condition(function UM8))
call ForGroup(g,function WNE)
call OF8(g)
endif
set Z77=null
set X77=null
set AC7=null
set WRE=null
set g=null
endfunction
function WSE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7=(LoadUnitHandle(R8,(W57),(14)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call SaveReal(R8,(GetHandleId(AM7)),(356),((GetUnitX(X77))*1.))
call SaveReal(R8,(GetHandleId(AM7)),(357),((GetUnitY(X77))*1.))
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set AM7=null
return false
endfunction
function WTE takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AM7=GetTriggerUnit()
call SaveReal(R8,(GetHandleId(AM7)),(358),(((TimerGetElapsed(E4)))*1.))
call SaveUnitHandle(R8,(GetHandleId(AM7)),(796),(GetSpellTargetUnit()))
call DestroyEffect(AddSpecialEffect("war3mapImported\\CleanseTargetArea.mdx",GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit())))
call SaveUnitHandle(R8,(W57),(14),(AM7))
call SaveUnitHandle(R8,(W57),(17),(GetSpellTargetUnit()))
call TriggerRegisterTimerEvent(t,10,false)
call TriggerRegisterDeathEvent(t,GetSpellTargetUnit())
call TriggerAddCondition(t,Condition(function WSE))
set t=null
set AM7=null
endfunction
function WUE takes nothing returns boolean
if GetSpellAbilityId()=='A2QT' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST then
call SaveBoolean(R8,(GetHandleId(GetTriggerUnit())),(360),(false))
call WTE()
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
if HasLinkin(GetSpellTargetUnit())==false then
call SaveBoolean(R8,(GetHandleId(GetTriggerUnit())),(360),(true))
endif
elseif(LoadBoolean(R8,(GetHandleId(GetTriggerUnit())),(360)))then
call WOE()
endif
endif
return false
endfunction
function IL9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_ENDCAST)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WUE))
set t=null
endfunction
function WVE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
call DisableTrigger(t)
call Dmg(GetEventDamageSource(),X77,HeroMagic,.5*GetEventDamage())
call EnableTrigger(t)
endif
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED or O18(X77)then
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UI8(X77)
call UnitRemoveAbility(X77,'A2T4')
set M57=null
endif
set t=null
set X77=null
return false
endfunction
function WWE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A2T5')
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
set M57=t
call UG8(X77)
call AddPermanentAbility(X77,'A2T4')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A2T4',false)
call TriggerRegisterTimerEvent(t,2+ML8,false)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function WVE))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveEffectHandle(R8,(W57),(175),(AddSpecialEffectTarget("war3mapImported\\Pacify.mdx",X77,"origin")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget("Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl",X77,"overhead")))
set Z77=null
set X77=null
set t=null
endfunction
function WXE takes nothing returns boolean
if GetSpellAbilityId()=='A2T5' then
if IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==false or HasLinkin(GetSpellTargetUnit())==false then
call WWE()
endif
endif
return false
endfunction
function I69 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WXE))
set t=null
endfunction
function WYE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,'A2SG')
local integer C77=(LoadInteger(R8,(W57),(34)))
if GetTriggerEventId()==EVENT_WIDGET_DEATH or C77>9 then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A2T2' and GetSpellTargetUnit()==X77 then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
else
set C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
call SetUnitState(X77,UNIT_STATE_LIFE,GetUnitState(X77,UNIT_STATE_LIFE)+11*ML8)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function WZE takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A2SG')
local real P08=ML8*90
local real WAE=.75
call TriggerRegisterDeathEvent(t,X77)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WYE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("war3mapImported\\DarkMending.mdx",X77,"origin")))
if IsUnitType(X77,UNIT_TYPE_HERO)==false then
set WAE=1.
endif
if GetUnitState(X77,UNIT_STATE_LIFE)<=P08*WAE and IsUnitAlly(X77,GetOwningPlayer(Z77))then
set P08=GetUnitState(X77,UNIT_STATE_LIFE)/ .75-10
endif
call Dmg(Z77,X77,1,P08)
set t=null
set Z77=null
set X77=null
endfunction
function WBE takes nothing returns boolean
if GetSpellAbilityId()=='A2SG' then
if IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==false or HasLinkin(GetSpellTargetUnit())==false then
call WZE()
endif
endif
return false
endfunction
function I19 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WBE))
set t=null
endfunction
function WCE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer C77=(LoadInteger(R8,(W57),(34)))
local integer NKE=(LoadInteger(R8,(W57),(25)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local integer i=0
local real W3E=(LoadReal(R8,(W57),(697)))
local real W6E=(LoadReal(R8,(W57),(811)))
local real WLE=GetUnitState(X77,UNIT_STATE_LIFE)
local real W1E=GetUnitState(X77,UNIT_STATE_MAX_LIFE)
local real W0E=(LoadReal(R8,(W57),(808)))
local real W5E
local real P08
if NKE>(ML8+6)*50 or GetTriggerEventId()==EVENT_WIDGET_DEATH then
call DisableTrigger(t)
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call UnitRemoveAbility(X77,'A2T0')
call UnitRemoveAbility(X77,'A2SZ')
if GetTriggerEventId()!=EVENT_WIDGET_DEATH then
set W0E=W0E*2
loop
exitwhen i>C77
set i=i+1
set WLE=GetUnitState(X77,UNIT_STATE_LIFE)
set W5E=RMinBJ(W1E-WLE,W0E)
call SetUnitState(X77,UNIT_STATE_LIFE,WLE+W5E)
set W0E=W0E-W5E
set P08=(LoadReal(R8,(W57),(20000+i)))
if(LoadUnitHandle(R8,(W57),(22000+i)))==Z77 or LState(X77,"ShallowGrave|Active")then
if GetUnitState(X77,UNIT_STATE_LIFE)<=P08+2 then
set P08=GetUnitState(X77,UNIT_STATE_LIFE)-2
endif
endif
call Dmg((LoadUnitHandle(R8,(W57),(22000+i))),X77,LifeDrain,P08)
endloop
set WLE=GetUnitState(X77,UNIT_STATE_LIFE)
set W5E=RMinBJ(W1E-WLE,W0E)
call SetUnitState(X77,UNIT_STATE_LIFE,WLE+W5E)
set W0E=W0E-W5E
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED and W18(GetEventDamage())then
set C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
call SaveUnitHandle(R8,(W57),(22000+C77),(GetEventDamageSource()))
call SaveReal(R8,(W57),(20000+C77),((GetEventDamage())*1.))
call AddLife(X77,GetEventDamage())
elseif GetTriggerEventId()!=EVENT_UNIT_DAMAGED and GetTriggerEventId()!=EVENT_WIDGET_DEATH then
set NKE=NKE+1
call SaveInteger(R8,(W57),(25),(NKE))
if W1E!=W6E then
set W6E=W1E
set W3E=WLE
call SaveReal(R8,(W57),(697),((W3E)*1.))
call SaveReal(R8,(W57),(811),((W6E)*1.))
endif
if WLE>W3E then
if((LoadInteger(R8,(GetHandleId((X77))),((4298))))==1)==false then
set W0E=W0E+WLE-W3E
call SaveReal(R8,(W57),(808),((W0E)*1.))
else
call SetUnitState(X77,UNIT_STATE_LIFE,WLE)
endif
endif
call SetUnitState(X77,UNIT_STATE_LIFE,W3E)
endif
set t=null
set X77=null
set Z77=null
return false
endfunction
function W2E takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer ML8=GetUnitAbilityLevel(Z77,'A2TF')
call UnitRemoveAbility(X77,'B09Y')
call AddPermanentAbility(X77,'A2T0')
call AddPermanentAbility(X77,'A2SZ')
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterDeathEvent(t,X77)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function WCE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(34),(0))
call SaveInteger(R8,(W57),(25),(0))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveReal(R8,(W57),(808),((0)*1.))
call SaveReal(R8,(W57),(697),((GetUnitState(X77,UNIT_STATE_LIFE))*1.))
call SaveReal(R8,(W57),(811),((GetUnitState(X77,UNIT_STATE_MAX_LIFE))*1.))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("war3mapImported\\DivineIntervention.mdx",X77,"chest")))
call TF9(X77)
call T99(X77,0,0)
set Z77=null
set X77=null
set t=null
endfunction
function W_E takes nothing returns boolean
if GetSpellAbilityId()=='A2TF' then
call W2E()
endif
return false
endfunction
function I09 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function W_E))
set t=null
endfunction
function X4E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit S08=(LoadUnitHandle(R8,(W57),(45)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local real x
local real y
local real a
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call KillUnit(S08)
else
set a=YI7(GetUnitX(S08),GetUnitY(S08),GetUnitX(X77),GetUnitY(X77))
set x=GetUnitX(S08)+20*Cos(a*bj_DEGTORAD)
set y=GetUnitY(S08)+20*Sin(a*bj_DEGTORAD)
call SetUnitX(S08,x)
call SetUnitY(S08,y)
call SetUnitFacing(S08,a)
if Z47(S08,X77)<30 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call Dmg(S08,X77,NormalFire,'d'+50*ML8)
call KillUnit(S08)
call SetUnitAnimationByIndex(S08,3)
endif
endif
set t=null
set X77=null
set S08=null
return false
endfunction
function X7E takes integer ML8,unit S08,unit X77 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SetUnitAnimationByIndex(S08,2)
call SetUnitVertexColor(S08,255,255,255,150)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function X4E))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(45),(S08))
call SetUnitAnimationByIndex(S08,2)
set t=null
endfunction
function X8E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer ML8=(LoadInteger(R8,(W57),(5)))
local unit S08=(LoadUnitHandle(R8,(W57),(45)))
local group g
local unit X77
if GetTriggerEvalCount(t)>MS7/ .05 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call KillUnit(S08)
else
set H04=S08
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(S08),GetUnitY(S08),375+25,Condition(function UW8))
set X77=GUD(g,GetUnitX(S08),GetUnitY(S08))
call OF8(g)
if X77!=null then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call X7E(ML8,S08,X77)
endif
set g=null
set X77=null
endif
set t=null
set S08=null
return false
endfunction
function X9E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer ML8=(LoadInteger(R8,(W57),(5)))
local unit S08=(LoadUnitHandle(R8,(W57),(45)))
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function X8E))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveUnitHandle(R8,(W57),(45),(S08))
call SetUnitAnimationByIndex(S08,1)
set t=null
set S08=null
return false
endfunction
function XDE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local unit S08=CreateUnit(GetOwningPlayer(Z77),MR7,x,y,270)
local integer ML8=GetUnitAbilityLevel(Z77,MQ7)
call SetUnitAnimationByIndex(S08,0)
call TriggerRegisterTimerEvent(t,3,false)
call TriggerAddCondition(t,Condition(function X9E))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveUnitHandle(R8,(W57),(45),(S08))
set Z77=null
set S08=null
set t=null
endfunction
function XEE takes nothing returns boolean
if GetSpellAbilityId()==MQ7 then
call XDE()
endif
return false
endfunction
function IR9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function XEE))
set t=null
endfunction
function XFE takes nothing returns nothing
if S_9(GetEnumUnit())then
return
endif
if GetUnitAbilityLevel(GetEnumUnit(),MU7)>0 then
call UnitRemoveAbility(GetEnumUnit(),MU7)
endif
if GetUnitAbilityLevel(GetEnumUnit(),MV7)>0 then
call UnitRemoveAbility(GetEnumUnit(),MV7)
endif
if GetUnitAbilityLevel(GetEnumUnit(),MW7)>0 then
call UnitRemoveAbility(GetEnumUnit(),MW7)
endif
if GetUnitAbilityLevel(GetEnumUnit(),MX7)>0 then
call UnitRemoveAbility(GetEnumUnit(),MX7)
endif
if GetUnitAbilityLevel(GetEnumUnit(),MY7)>0 then
call UnitRemoveAbility(GetEnumUnit(),MY7)
endif
if GetUnitAbilityLevel(GetEnumUnit(),MZ7)>0 then
call UnitRemoveAbility(GetEnumUnit(),MZ7)
endif
if GetUnitAbilityLevel(GetEnumUnit(),MA7)>0 then
call UnitRemoveAbility(GetEnumUnit(),MA7)
endif
if GetUnitAbilityLevel(GetEnumUnit(),MB7)>0 then
call UnitRemoveAbility(GetEnumUnit(),MB7)
endif
endfunction
function XGE takes nothing returns nothing
if S_9(GetEnumUnit())then
return
endif
if M37==1 then
set M67=MU7
elseif M37==2 then
set M67=MV7
elseif M37==3 then
set M67=MW7
elseif M37==4 then
set M67=MX7
endif
if GetUnitAbilityLevel(GetEnumUnit(),M67)==0 then
call AddPermanentAbility(GetEnumUnit(),M67)
call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),M67,false)
call UnitMakeAbilityPermanent(GetEnumUnit(),true,'ACes')
if M67==MU7 then
call UnitMakeAbilityPermanent(GetEnumUnit(),true,'A2M4')
elseif M67==MV7 then
call UnitMakeAbilityPermanent(GetEnumUnit(),true,'A2M5')
elseif M67==MW7 then
call UnitMakeAbilityPermanent(GetEnumUnit(),true,'A2M6')
elseif M67==MX7 then
call UnitMakeAbilityPermanent(GetEnumUnit(),true,'A2M7')
elseif M67==MY7 then
call UnitMakeAbilityPermanent(GetEnumUnit(),true,'A2NM')
elseif M67==MZ7 then
call UnitMakeAbilityPermanent(GetEnumUnit(),true,'A2NL')
elseif M67==MA7 then
call UnitMakeAbilityPermanent(GetEnumUnit(),true,'A2NN')
elseif M67==MB7 then
call UnitMakeAbilityPermanent(GetEnumUnit(),true,'A2NO')
endif
endif
endfunction
function XHE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local real LBD=(LoadReal(R8,(W57),(442)))
local integer ML8=GetUnitAbilityLevel(Z77,MT7)
local group XIE=(LoadGroupHandle(R8,(W57),(340)))
local group g=OG8()
local group g1=OG8()
local group g2=OG8()
set M37=ML8
if(TimerGetElapsed(E4))>LBD then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call ForGroup(XIE,function XFE)
call OF8(XIE)
call OF8(g)
call OF8(g1)
call OF8(g2)
return false
endif
set H04=Z77
call GroupEnumUnitsInRange(g1,x,y,275+25,Condition(function VH8))
call GroupEnumUnitsInRange(g2,x,y,275+144,Condition(function VR8))
call GroupAddGroup(g1,g)
call GroupAddGroup(g2,g)
call OF8(g1)
call OF8(g2)
call GroupRemoveGroup(g,XIE)
call ForGroup(XIE,function XFE)
call ForGroup(g,function XGE)
call SaveGroupHandle(R8,(W57),(340),(g))
call OF8(XIE)
set t=null
set Z77=null
set XIE=null
set g=null
return false
endfunction
function XJE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local real BM7=GetSpellTargetX()
local real BN7=GetSpellTargetY()
local integer i
local integer ML8=GetUnitAbilityLevel(Z77,MT7)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function XHE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveGroupHandle(R8,(W57),(340),(OG8()))
call SaveReal(R8,(W57),(6),((BM7)*1.))
call SaveReal(R8,(W57),(7),((BN7)*1.))
call SaveReal(R8,(W57),(442),(((TimerGetElapsed(E4))+3+.5*ML8)*1.))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffect(MC7,BM7,BN7)))
set i=0
loop
exitwhen i>5
call SetPlayerAbilityAvailable(G8[i],MU7,false)
call SetPlayerAbilityAvailable(N8[i],MU7,false)
call SetPlayerAbilityAvailable(G8[i],MV7,false)
call SetPlayerAbilityAvailable(N8[i],MV7,false)
call SetPlayerAbilityAvailable(G8[i],MV7,false)
call SetPlayerAbilityAvailable(N8[i],MW7,false)
call SetPlayerAbilityAvailable(G8[i],MX7,false)
call SetPlayerAbilityAvailable(N8[i],MX7,false)
set i=i+1
endloop
set Z77=null
set t=null
endfunction
function XKE takes nothing returns boolean
if GetSpellAbilityId()==MT7 then
call XJE()
endif
return false
endfunction
function IS9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function XKE))
set t=null
endfunction
function XME takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,NB7)
local integer L47=(LoadInteger(R8,(W57),(758)))
local integer C77=(LoadInteger(R8,(W57),(34)))
local group g
if GetTriggerEventId()==EVENT_WIDGET_DEATH or C77>'x' or GU8(X77)then
call UnitRemoveAbility(X77,NC7)
call UnitRemoveAbility(X77,N37)
call UnitRemoveAbility(X77,N67)
call UnitRemoveAbility(X77,NL7)
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
set H04=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(X77),GetUnitY(X77),225+25,Condition(function UM8))
call GroupRemoveUnit(g,X77)
if FirstOfGroup(g)==null then
if L47==NC7 then
if GetUnitAbilityLevel(X77,NC7)==0 then
call AddPermanentAbility(X77,NC7)
call UnitMakeAbilityPermanent(X77,true,'A2LU')
call UnitMakeAbilityPermanent(X77,true,'A2ME')
endif
else
if GetUnitAbilityLevel(X77,N37)==0 then
call AddPermanentAbility(X77,N37)
call UnitMakeAbilityPermanent(X77,true,'A2LT')
call UnitMakeAbilityPermanent(X77,true,'A2ME')
endif
endif
if ModuloInteger(C77,10)==0 then
call Dmg(Z77,X77,NormalFire,ML8*15*.5)
endif
else
if L47==NC7 then
if GetUnitAbilityLevel(X77,NC7)>0 then
call UnitRemoveAbility(X77,NC7)
call UnitRemoveAbility(X77,N67)
endif
else
if GetUnitAbilityLevel(X77,N37)>0 then
call UnitRemoveAbility(X77,N37)
call UnitRemoveAbility(X77,NL7)
endif
endif
endif
call OF8(g)
set g=null
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function XNE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer L47=NC7
if GetUnitTypeId(Z77)=='N0MM' then
set L47=N37
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),NC7,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),N37,false)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function XME))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(758),(L47))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget(N17,X77,"origin")))
call TriggerEvaluate(t)
set Z77=null
set X77=null
set t=null
endfunction
function XOE takes nothing returns boolean
if GetSpellAbilityId()==NB7 and HasLinkin(GetSpellTargetUnit())==false then
call XNE()
endif
return false
endfunction
function IT9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function XOE))
set t=null
endfunction
function XPE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit XQE=(LoadUnitHandle(R8,(W57),(17)))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call FlushChildHashtable(R8,(GetHandleId(XQE)))
call RemoveUnit(XQE)
set t=null
set XQE=null
return false
endfunction
function XRE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit XQE=(LoadUnitHandle(R8,(W57),(2)))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call FlushChildHashtable(R8,(GetHandleId(XQE)))
call ShowUnit(XQE,false)
set t=null
set XQE=null
return false
endfunction
function XSE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit XQE=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,N07)
if GetTriggerEvalCount(t)==200 or GetTriggerEventId()==EVENT_WIDGET_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call KillUnit(XQE)
call DestroyEffect(AddSpecialEffect(N27,GetUnitX(XQE),GetUnitX(XQE)))
set t=CreateTrigger()
set W57=GetHandleId(t)
call SaveUnitHandle(R8,(W57),(2),(XQE))
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function XRE))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,3,false)
call TriggerAddCondition(t,Condition(function XPE))
call SaveUnitHandle(R8,(W57),(17),(XQE))
else
call SuspendHeroXP(XQE,true)
call UnitModifySkillPoints(XQE,-25)
endif
set t=null
set Z77=null
set XQE=null
return false
endfunction
function XTE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit XQE=CreateUnit(GetOwningPlayer(Z77),N57,GetUnitX(Z77),GetUnitY(Z77),0)
local integer ML8=GetUnitAbilityLevel(Z77,N07)
local integer i=0
local item Y98
local integer XUE='I02M'
call DestroyEffect(AddSpecialEffectTarget(N27,XQE,"chest"))
if IsJWPlayer(GetOwningPlayer(XQE))==false then
set XUE='I0PC'
endif
call SelectUnitAddForPlayer(XQE,GetOwningPlayer(Z77))
call DisableTrigger(GW4)
loop
exitwhen i>5
if UnitItemInSlot(Z77,i)!=null and GetItemTypeId(UnitItemInSlot(Z77,i))!=BU[F1]and GetItemTypeId(UnitItemInSlot(Z77,i))!=BU[shuaxinqiu]and GetItemTypeId(UnitItemInSlot(Z77,i))!=BU[FB]and GetItemTypeId(UnitItemInSlot(Z77,i))!=BU[GB]and GetItemTypeId(UnitItemInSlot(Z77,i))!=BU[EC]then
set Y98=CreateItem(GetItemTypeId(UnitItemInSlot(Z77,i)),0,0)
if GetItemCharges(UnitItemInSlot(Z77,i))>0 then
call SetItemCharges(Y98,GetItemCharges(UnitItemInSlot(Z77,i)))
endif
call UnitAddItem(XQE,Y98)
call SetItemPlayer(Y98,GetOwningPlayer(XQE),false)
if GetItemTypeId(Y98)==BU[J0]or GetItemTypeId(Y98)==BU[N0]or GetItemTypeId(Y98)==BU[zhenshibaoshi]then
call SetItemDropOnDeath(Y98,false)
endif
else
call UnitAddItem(XQE,CreateItem(XUE,0,0))
endif
set i=i+1
endloop
call EnableTrigger(GW4)
call SetHeroLevel(XQE,GetHeroLevel(Z77),false)
set i=1
loop
exitwhen i>GetUnitAbilityLevel(Z77,'Aamk')
call SelectHeroSkill(XQE,'Aamk')
set i=i+1
endloop
set i=1
loop
exitwhen i>GetUnitAbilityLevel(Z77,MQ7)
call SelectHeroSkill(XQE,MQ7)
set i=i+1
endloop
set i=1
loop
exitwhen i>GetUnitAbilityLevel(Z77,MT7)
call SelectHeroSkill(XQE,MT7)
set i=i+1
endloop
set i=1
loop
exitwhen i>GetUnitAbilityLevel(Z77,NB7)
call SelectHeroSkill(XQE,NB7)
set i=i+1
endloop
set i=1
loop
exitwhen i>GetUnitAbilityLevel(Z77,KM7)
call SelectHeroSkill(XQE,KM7)
set i=i+1
endloop
set i=1
loop
exitwhen i>GetUnitAbilityLevel(Z77,N07)
call SelectHeroSkill(XQE,N07)
set i=i+1
endloop
call UnitRemoveAbility(XQE,N07)
call UnitModifySkillPoints(XQE,-25)
call SuspendHeroXP(XQE,true)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterDeathEvent(t,XQE)
call TriggerAddCondition(t,Condition(function XSE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(XQE))
call SetUnitState(Z77,UNIT_STATE_LIFE,GetUnitState(Z77,UNIT_STATE_LIFE)*(1-(.45-.15*ML8)))
call SetUnitState(Z77,UNIT_STATE_MANA,GetUnitState(Z77,UNIT_STATE_MANA)*(1-(.45-.15*ML8)))
call SetUnitState(XQE,UNIT_STATE_LIFE,GetUnitState(Z77,UNIT_STATE_LIFE))
call SetUnitState(XQE,UNIT_STATE_MANA,GetUnitState(Z77,UNIT_STATE_MANA))
set Z77=null
set XQE=null
set t=null
endfunction
function XVE takes nothing returns boolean
if GetSpellAbilityId()==N07 then
call XTE()
endif
return false
endfunction
function IU9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function XVE))
set t=null
endfunction
function XWE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local group g=OG8()
local integer ML8=GetUnitAbilityLevel(Z77,N_7)
set H04=Z77
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),400+25,Condition(function VE8))
if FirstOfGroup(g)==null then
if GetUnitAbilityLevel(Z77,O47)!=ML8 then
call AddPermanentAbility(Z77,O47)
call SetUnitAbilityLevel(Z77,O47,ML8)
endif
else
if GetUnitAbilityLevel(Z77,O47)>0 then
call UnitRemoveAbility(Z77,O47)
endif
endif
call OF8(g)
set Z77=null
set t=null
set g=null
return false
endfunction
function XXE takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function XWE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=null
set Z77=null
endfunction
function XYE takes nothing returns boolean
if GetLearnedSkill()==N_7 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),N_7)==1 then
call XXE()
endif
return false
endfunction
function NewSilence_BounceFunc takes nothing returns nothing
local integer h=GetHandleId(GetTriggeringTrigger())
local unit s=LUnit(h,"unit")
local real a=LReal(h,"angle")
local real d=LReal(h,"dist")
if GetTriggerEventId()==EVENT_WIDGET_DEATH or s==null then
call TriggerOff()
else
call SetUnitPosition(s,GetUnitX(s)+Cos(a)*d,GetUnitY(s)+Sin(a)*d)
if SAInt(h,"limit",1)>=50+LInt(h,"i")*10 then
call TriggerOff()
endif
endif
set s=null
endfunction
function NewSilence_Bounce takes unit s,real a,real d,integer i returns nothing
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
call TriggerRegisterVariableEvent(t,"time",GREATER_THAN,0)
call TriggerRegisterDeathEvent(t,s)
call TriggerAddCondition(t,Condition(function NewSilence_BounceFunc))
call SUnit(h,"unit",s)
call SReal(h,"angle",a)
call SReal(h,"dist",d)
call SInt(h,"i",i)
set t=null
endfunction
function NewSilenceTrigger takes nothing returns nothing
local integer h=GetHandleId(GetTriggeringTrigger())
local unit s=LUnit(h,"caster")
local real a=LReal(h,"angle")
local unit u=GetTriggerUnit()
if GetTriggerEventId()==EVENT_UNIT_TARGET_IN_RANGE then
if IsUnitEnemy(u,GetOwningPlayer(s))and GetUnitAbilityLevel(u,'Aloc')+GetUnitAbilityLevel(u,'A04R')+GetUnitAbilityLevel(u,'Avul')==0 and(IsUnitType(u,UNIT_TYPE_MAGIC_IMMUNE)or IsUnitType(u,UNIT_TYPE_STRUCTURE)or IsUnitType(u,UNIT_TYPE_MECHANICAL)or IsUnitType(u,UNIT_TYPE_ANCIENT))==false then
call NewSilence_Bounce(u,a,RMaxBJ(0,900-Dist(GetUnitX(u),GetUnitY(u),GetUnitX(s),GetUnitY(s)))/ 900*350/(50+GetUnitAbilityLevel(s,'A0QB')*10),GetUnitAbilityLevel(s,'A0QB'))
set s=CreateUnit(GetOwningPlayer(u),'e00E',GetUnitX(u),GetUnitY(u),0)
call UnitApplyTimedLife(s,'BTLF',10)
call UnitAddAbility(s,'AZ0K')
call SetUnitAbilityLevel(s,'AZ0K',LInt(h,"SkillLVL"))
call IssueTargetOrderById(s,852668,u)
endif
else
set s=LUnit(h,"projectile")
call SetXY(s,GetUnitX(s)+Cos(a)*20,GetUnitY(s)+Sin(a)*20)
set a=LReal(h,"dist")
set a=a+20
if a>=900 then
call KillUnit(s)
call TriggerOff()
else
call SReal(h,"dist",a)
endif
endif
set s=null
set u=null
endfunction
function NewSilence takes nothing returns nothing
local unit s=GetTriggerUnit()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local real a=Angle(GetUnitX(s),GetUnitY(s),x,y)
local unit f=CreateUnit(GetOwningPlayer(s),'n01X',GetUnitX(s),GetUnitY(s),a*bj_RADTODEG)
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
call SetUnitVertexColor(f,100,100,100,255)
call TriggerRegisterVariableEvent(t,"time",GREATER_THAN,0)
call TriggerRegisterUnitInRange(t,f,250,null)
call TriggerAddCondition(t,Condition(function NewSilenceTrigger))
call SUnit(h,"caster",s)
call SReal(h,"angle",a)
call SUnit(h,"projectile",f)
call SInt(h,"SkillLVL",GetUnitAbilityLevel(s,'A0QB'))
set s=null
set f=null
set t=null
endfunction
function NewSilenceCheck takes nothing returns nothing
if GetSpellAbilityId()=='A0QB' then
call NewSilence()
endif
endfunction
function IX9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function XYE))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function NewSilenceCheck))
set t=null
endfunction
function XZE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local integer ML8=GetUnitAbilityLevel(Z77,O77)
local integer RME=GetHeroAgi(Z77,true)
local real XAE=RME*(.12+.06*ML8)
local integer R9D=R2I(XAE/ 2.+.5)
local integer XBE=(LoadInteger(R8,(W57),(34)))
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==O77 then
if XBE==OD7 then
set XBE=OE7
else
set XBE=OD7
endif
call SaveInteger(R8,(W57),(34),(XBE))
call UnitRemoveAbility(AC7,A029Aura_Hero)
call UnitRemoveAbility(AC7,A029Aura_All)
endif
if O18(Z77)then
call UnitRemoveAbility(AC7,A029Aura_Hero)
call UnitRemoveAbility(AC7,A029Aura_All)
else
if GetUnitAbilityLevel(AC7,A029Aura_Hero)==0 then
call AddPermanentAbility(AC7,A029Aura_Hero)
if XBE==OD7 then
call AddPermanentAbility(AC7,A029Aura_All)
endif
endif
call SetUnitAbilityLevel(AC7,A029Aura_Hero,R9D)
call SetUnitAbilityLevel(AC7,A029Aura_All,R9D)
call SetUnitX(AC7,GetUnitX(Z77))
call SetUnitY(AC7,GetUnitY(Z77))
endif
set Z77=null
set t=null
return false
endfunction
function A029_NewAura takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local integer h=GetHandleId(t)
local unit s=(LoadUnitHandle(R8,(h),(2)))
local unit f=(LoadUnitHandle(R8,(h),(19)))
local integer i=GetUnitAbilityLevel(s,O77)
local integer l=R2I(GetHeroAgi(s,true)*(.12+.06*i)/ 2.+.5)
local boolean Mode=(LoadReal(R8,(h),(34)))>time
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==O77 then
call SaveReal(R8,h,34,time+30)
endif
if O18(s)then
call UnitRemoveAbility(f,A029Aura_Hero)
call UnitRemoveAbility(f,A029Aura_All)
else
if GetUnitAbilityLevel(f,A029Aura_Hero)==0 then
call AddPermanentAbility(f,A029Aura_Hero)
endif
if Mode then
call AddPermanentAbility(f,A029Aura_All)
else
call UnitRemoveAbility(f,A029Aura_All)
endif
call SetUnitAbilityLevel(f,A029Aura_Hero,l)
call SetUnitAbilityLevel(f,A029Aura_All,l)
call SetUnitX(f,GetUnitX(s))
call SetUnitY(f,GetUnitY(s))
endif
set s=null
set f=null
set t=null
endfunction
function XCE takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e01V',0,0,0)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function A029_NewAura))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveReal(R8,(W57),(34),0)
call AddPermanentAbility(AC7,A029Aura_Hero)
set t=null
set Z77=null
endfunction
function X3E takes nothing returns boolean
if GetLearnedSkill()==O77 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),O77)==1 then
call XCE()
endif
return false
endfunction
function IW9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function X3E))
call PU8(A029Aura_Hero)
call PU8(A029Aura_All)
set t=null
endfunction
function X6E takes nothing returns nothing
local unit X77=GetEnumUnit()
if GetUnitTypeId(X77)!='o01X' then
call SetUnitPathing(X77,true)
endif
call SaveInteger(R8,(GetHandleId((X77))),((4336)),(2))
set X77=null
endfunction
function Z9E takes nothing returns boolean
return O18(GetFilterUnit())==false and IsUnitEnemy(NS7,GetOwningPlayer(GetFilterUnit()))and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and((LoadInteger(R8,(GetHandleId((GetFilterUnit()))),((809))))==1)
endfunction
function ZDE takes unit X77 returns nothing
local unit AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call UnitAddAbility(AC7,'A2TG')
call SetUnitAbilityLevel(AC7,'A2TG',globalI)
call IssueTargetOrderById(AC7,852668,X77)
set AC7=null
endfunction
function ZEE takes nothing returns nothing
call ZDE(GetEnumUnit())
endfunction
function ZFE takes unit X77 returns nothing
local group g=OG8()
if((LoadInteger(R8,(GetHandleId((X77))),((809))))==1)then
call GroupEnumUnitsInRange(g,0,0,99999,Condition(function Z9E))
endif
call GroupAddUnit(g,X77)
call ForGroup(g,function ZEE)
call OF8(g)
set g=null
endfunction
function XLE takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),M_7)==false then
call GroupAddUnit(M_7,GetEnumUnit())
call ZFE(GetEnumUnit())
if ND7==1 then
call Dmg(N47,GetEnumUnit(),1,50+50*globalI)
endif
endif
if(GetPlayerController(GetOwningPlayer(GetEnumUnit()))==MAP_CONTROL_COMPUTER)then
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)then
set T67=T67+1
if GetUnitLifePercent(GetEnumUnit())<=35. or ZL7(GetEnumUnit())==false then
set TL7=true
endif
endif
endif
endfunction
function X1E takes nothing returns nothing
local unit X77=GetEnumUnit()
local real a=(LoadReal(R8,(GetHandleId(X77)),(801)))
local real d=(LoadReal(R8,(GetHandleId(X77)),(802)))
local real x=N87+d*Cos(a)
local real y=N97+d*Sin(a)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl",x,y))
if GetUnitTypeId(X77)=='o01X' or GetUnitTypeId(X77)=='o020' then
set ND7=1
call SetUnitPosition(X77,x,y)
call SetUnitX(X77,x)
call SetUnitY(X77,y)
else
call SetUnitX(X77,x)
call SetUnitY(X77,y)
call KillTrees(x,y,125)
endif
set X77=null
endfunction
function X0E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AX7=LoadUnitHandle(R8,W57,'KAOL')
local unit X77=LoadUnitHandle(R8,W57,'TARG')
if RAbsBJ(YH7(X77,AX7)-LoadReal(R8,W57,'KAOL'))<=12 and BS7(AX7,X77)<=275. then
call IssueTargetOrderById(AX7,852189,X77)
endif
call DestroyTrigger(t)
call FlushChildHashtable(R8,W57)
set t=null
set X77=null
set AX7=null
return false
endfunction
function X5E takes nothing returns nothing
local unit X77=GetEnumUnit()
if O18(X77)or((LoadInteger(R8,(GetHandleId((X77))),((4306))))==1)or GetUnitAbilityLevel(X77,'B08V')>0 or((LoadInteger(R8,(GetHandleId((X77))),((4335))))==1)then
call GroupRemoveUnit(M_7,X77)
call SaveInteger(R8,(GetHandleId((X77))),((4336)),(2))
if GetUnitTypeId(X77)!='o01X' then
call SetUnitPathing(X77,true)
endif
endif
set X77=null
endfunction
function X2E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local group X_E=(LoadGroupHandle(R8,(W57),(803)))
local real BM7=(LoadReal(R8,(W57),(6)))
local real BN7=(LoadReal(R8,(W57),(7)))
local real PND=(LoadReal(R8,(W57),(23)))
local real POD=(LoadReal(R8,(W57),(24)))
local integer i=LoadInteger(R8,W57,'i')
local real a=bj_DEGTORAD*YI7(PND,POD,BM7,BN7)
local real x
local real y
local boolean Y4E=false
local group XCD=(LoadGroupHandle(R8,(W57),(187)))
local group g
local trigger Y7E
local integer Y8E
set ND7=0
set M_7=X_E
call ForGroup(X_E,function X5E)
if GetTriggerEvalCount(t)>200 or FirstOfGroup(X_E)==null then
set Y4E=true
else
set x=PND+M27*.03*Cos(a)
set y=POD+M27*.03*Sin(a)
if Z87(x,y,BM7,BN7)<30 then
set x=BM7
set y=BN7
set Y4E=true
endif
set x=PQ8(x)
set y=PS8(y)
set M_7=X_E
set N87=x
set N97=y
call ForGroup(X_E,function X1E)
call SaveReal(R8,(W57),(23),((x)*1.))
call SaveReal(R8,(W57),(24),((y)*1.))
set g=OG8()
set H04=Z77
set M_7=XCD
set N47=Z77
set N77=GetUnitAbilityLevel(Z77,'A2QI')
call GroupEnumUnitsInRange(g,x,y,180+25,Condition(function UM8))
set globalI=i
call ForGroup(g,function XLE)
call OF8(g)
set g=null
endif
if Y4E then
if GetPlayerController(GetOwningPlayer(Z77))==MAP_CONTROL_COMPUTER then
set T37=V_7(T67==.0,null,T37)
if T37!=null and not(IsUnitType(T37,UNIT_TYPE_HERO)and GetUnitLifePercent(T37)<=60.)then
set Y7E=CreateTrigger()
set Y8E=GetHandleId(Y7E)
call SaveUnitHandle(R8,Y8E,'KAOL',Z77)
call SaveUnitHandle(R8,Y8E,'TARG',T37)
call SaveReal(R8,Y8E,'KAOL',(LoadReal(R8,(GetHandleId(T37)),(801)))*bj_RADTODEG)
call TriggerRegisterTimerEvent(Y7E,0,false)
call TriggerAddCondition(Y7E,Condition(function X0E))
set Y7E=null
endif
endif
call ForGroup(X_E,function X6E)
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call OF8(XCD)
call OF8(X_E)
endif
set Z77=null
set t=null
set XCD=null
set X_E=null
return false
endfunction
function MagneticGrip_PullableTargetsFilter takes nothing returns boolean
return((GetUnitTypeId(GetFilterUnit())=='o01X' or GetUnitTypeId(GetFilterUnit())=='o020')or(IsUnitEnemy(N47,GetOwningPlayer(GetFilterUnit()))==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0))and O18(GetFilterUnit())==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and((LoadInteger(R8,(GetHandleId((GetFilterUnit()))),((4336))))==1)==false
endfunction
function Y9E takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='o01X'
endfunction
function YDE takes nothing returns nothing
local unit X77=GetEnumUnit()
call SetUnitPathing(X77,false)
call SaveInteger(R8,(GetHandleId((X77))),((4336)),(1))
call SaveReal(R8,(GetHandleId(X77)),(801),((bj_DEGTORAD*YI7(N87,N97,GetUnitX(X77),GetUnitY(X77)))*1.))
call SaveReal(R8,(GetHandleId(X77)),(802),((Z87(N87,N97,GetUnitX(X77),GetUnitY(X77)))*1.))
set X77=null
endfunction
function YEE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t
local integer W57
local real BM7=GetUnitX(GetSpellTargetUnit())
local real BN7=GetUnitY(GetSpellTargetUnit())
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local real a=YI7(x,y,BM7,BN7)
local unit X77=GetSpellTargetUnit()
local group g
if X77==null then
set g=OG8()
call GroupEnumUnitsInRange(g,GetSpellTargetX(),GetSpellTargetY(),240+25,Condition(function Y9E))
if FirstOfGroup(g)==null then
call OF8(g)
set Z77=null
set g=null
return
endif
set X77=FirstOfGroup(g)
call OF8(g)
endif
set g=OG8()
call GroupAddUnit(g,X77)
set BM7=GetUnitX(X77)
set BN7=GetUnitY(X77)
set a=YI7(x,y,BM7,BN7)
set t=CreateTrigger()
set W57=GetHandleId(t)
set N87=BM7
set N97=BN7
call ForGroup(g,function YDE)
set x=x+'d'*Cos(a*bj_DEGTORAD)
set y=y+'d'*Sin(a*bj_DEGTORAD)
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerAddCondition(t,Condition(function X2E))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveInteger(R8,W57,'i',GetUnitAbilityLevel(Z77,GetSpellAbilityId()))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
call SaveReal(R8,(W57),(23),((BM7)*1.))
call SaveReal(R8,(W57),(24),((BN7)*1.))
call SaveGroupHandle(R8,(W57),(187),(OG8()))
call SaveGroupHandle(R8,(W57),(803),(g))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("war3mapImported\\MagneticGripTarget.mdx",X77,"chest")))
if(GetPlayerController(GetOwningPlayer(Z77))==MAP_CONTROL_COMPUTER)then
set T37=X77
set T67=.0
set TL7=false
endif
set Z77=null
set t=null
set g=null
endfunction
function YFE takes nothing returns nothing
local unit X77=GetSpellTargetUnit()
local group g
if X77==null then
set g=OG8()
call GroupEnumUnitsInRange(g,GetSpellTargetX(),GetSpellTargetY(),240+25,Condition(function Y9E))
if FirstOfGroup(g)==null then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n0N5'))
endif
call OF8(g)
endif
set g=null
set X77=null
endfunction
function YGE takes nothing returns boolean
if GetSpellAbilityId()=='A2QI' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST then
call YFE()
else
call YEE()
endif
endif
return false
endfunction
function IA9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function YGE))
set t=null
endfunction
function YHE takes nothing returns boolean
return O18(GetFilterUnit())==false and IsUnitEnemy(NG7,GetOwningPlayer(GetFilterUnit()))and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and((LoadInteger(R8,(GetHandleId((GetFilterUnit()))),((809))))==1)
endfunction
function YIE takes nothing returns nothing
call T68((GetEnumUnit()),'A2QN',1,2,'B0GK')
endfunction
function YJE takes unit X77 returns nothing
local group g=OG8()
if((LoadInteger(R8,(GetHandleId((X77))),((809))))==1)then
call GroupEnumUnitsInRange(g,0,0,99999,Condition(function YHE))
endif
call GroupAddUnit(g,X77)
call ForGroup(g,function YIE)
call OF8(g)
set g=null
endfunction
function RollingBoulder_FindClosestMagnetizedTarget takes nothing returns nothing
local real d=BS7(GetEnumUnit(),NP7)
if d<H64 then
set H64=d
set NH7=GetEnumUnit()
endif
endfunction
function YKE takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),NI7)==false then
call GroupAddUnit(NI7,GetEnumUnit())
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)then
set NM7=true
set NH7=GetEnumUnit()
if((LoadInteger(R8,(GetHandleId((GetEnumUnit()))),((809))))==1)then
set NP7=GetEnumUnit()
endif
if NO7==1 then
call Dmg(NG7,GetEnumUnit(),1,NN7*1.5)
call YJE(GetEnumUnit())
else
call Dmg(NG7,GetEnumUnit(),1,NN7)
endif
else
if NO7==1 then
call Dmg(NG7,GetEnumUnit(),1,NN7*1.5)
else
call Dmg(NG7,GetEnumUnit(),1,NN7)
endif
endif
endif
endfunction
function YME takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='o01X'
endfunction
function YNE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local group XCD=(LoadGroupHandle(R8,(W57),(187)))
local group g
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local real YOE=(LoadReal(R8,(W57),(6)))
local real YPE=(LoadReal(R8,(W57),(7)))
local real PPD=GetUnitX(Z77)
local real PQD=GetUnitY(Z77)
local real d=Z87(YOE,YPE,PPD,PQD)
local real x
local real y
local real a=(LoadReal(R8,(W57),(137)))
local real r=NF7
local integer YQE=(LoadInteger(R8,(W57),(34)))
local real YRE=(LoadReal(R8,(W57),(138)))
local boolean YSE=false
local unit YTE=(LoadUnitHandle(R8,(W57),(810)))
local unit YUE=null
local unit YVE=null
local boolean YWE=false
local real YXE=.0
local real YYE=.0
local real YZE=.0
local real YAE=.0
set NM7=false
call SetUnitTimeScale(Z77,3)
call SetUnitFacing(Z77,a)
call SetUnitAnimationByIndex(Z77,0)
if GetTriggerEvalCount(t)>30 then
if YQE==0 then
set g=OG8()
call GroupEnumUnitsInRange(g,PPD,PQD,150+25,Condition(function YME))
if FirstOfGroup(g)!=null then
call KillUnit(FirstOfGroup(g))
set YQE=1
call SaveInteger(R8,(W57),(34),(YQE))
endif
call OF8(g)
endif
if YQE==1 then
set r=r*2
endif
if YTE!=null then
set a=YH7(Z77,YTE)
call SaveReal(R8,(W57),(137),((a)*1.))
endif
set x=YOE+.02*r*Cos(a*bj_DEGTORAD)
set y=YPE+.02*r*Sin(a*bj_DEGTORAD)
call SetUnitX(Z77,PQ8(x))
call SetUnitY(Z77,PS8(y))
call SaveReal(R8,(W57),(6),((GetUnitX(Z77))*1.))
call SaveReal(R8,(W57),(7),((GetUnitY(Z77))*1.))
call SetUnitX(AC7,GetUnitX(Z77))
call SetUnitY(AC7,GetUnitY(Z77))
call KillTrees(GetUnitX(Z77),GetUnitY(Z77),'d')
set d=Z87(YOE,YPE,GetUnitX(Z77),GetUnitY(Z77))
set YRE=YRE+d
call SaveReal(R8,(W57),(138),((YRE)*1.))
set g=OG8()
set H04=Z77
set NG7=Z77
set NI7=XCD
set NJ7=GetUnitAbilityLevel(Z77,'A2TH')
set NH7=null
set NN7=60+30*NJ7
set NO7=YQE
set NP7=null
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),150+25,Condition(function UM8))
call ForGroup(g,function YKE)
call OF8(g)
if NP7!=null then
set g=OG8()
set NH7=null
set H64=9999
call GroupEnumUnitsInRange(g,GetUnitX(NP7),GetUnitY(NP7),600+25,Condition(function YHE))
call OF8(g)
if NH7==null then
set YSE=true
set NH7=NP7
else
set YTE=NH7
call SaveUnitHandle(R8,(W57),(810),(YTE))
endif
endif
else
call SetUnitX(Z77,YOE)
call SetUnitY(Z77,YPE)
endif
if S69(Z77)or GetTriggerEventId()==EVENT_WIDGET_DEATH or YSE or(YTE==null and(GetTriggerEvalCount(t)>130 or NM7 or(YQE==0 and YRE>800)or(YQE==1 and YRE>1600)))then
call KillUnit(AC7)
call OF8(XCD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitAddAbility(Z77,'A2QR')
call UnitRemoveAbility(Z77,'A2QR')
call SetUnitTimeScale(Z77,1)
if NM7 then
set x=GetUnitX(NH7)+50*Cos(a*bj_DEGTORAD)
set y=GetUnitY(NH7)+50*Sin(a*bj_DEGTORAD)
call SetUnitX(Z77,PQ8(x))
call SetUnitY(Z77,PS8(y))
call IssueTargetOrderById(Z77,851983,NH7)
endif
if GetPlayerController(GetOwningPlayer(Z77))==MAP_CONTROL_COMPUTER and(((S69(Z77)==false and GetTriggerEventId()!=EVENT_WIDGET_DEATH))and(YSE or(GetTriggerEvalCount(t)>130 or NM7 or(YQE==0 and YRE>800)or(YQE==1 and YRE>1600))))then
set bj_lastLoadedUnit=Z77
set TI7=Z77
if LoadBoolean(R8,GetHandleId(Z77),StringHash("Roll|State"))==false or LoadBoolean(R8,GetHandleId(Z77),StringHash("Roll|State"))==null then
set YXE=GetUnitX(Z77)
set YYE=GetUnitY(Z77)
if IsUnit(NH7,null)==false then
set YZE=Atan2(GetUnitY(NH7)-YYE,GetUnitX(NH7)-YXE)
set YXE=YXE+600*Cos(YZE)
set YYE=YYE+600*Sin(YZE)
set YAE=AP7(600,YXE,YYE,Condition(function I18))
if YAE>=2 or(GetWidgetLife(NH7)>1000 or GetWidgetLife(NH7)<=.75*(50+50*GetUnitAbilityLevel(Z77,'A2QM'))or GetWidgetLife(NH7)>=500.)or(GetUnitLifePercent(Z77)<=50. or GetWidgetLife(Z77)<500+10*GetHeroLevel(Z77))then
set YWE=(not YWE)and IsUnitInRange(Z77,NH7,300)and C_7(Z77,852189,'A2QM',NH7)
endif
if ZL7(NH7)==false then
set YAE=AO7(600,Z77,Condition(function I18))
set YWE=(not YWE)and(GetWidgetLife(NH7)<=1200. or GetUnitLifePercent(NH7)<=70. or YAE>=2)and LE7(Z77,GetUnitX(NH7),GetUnitY(NH7),null,'A2TI')
endif
endif
if not YWE then
set YUE=J38(300,Z77)
if YUE!=null then
set YVE=B97(600,Z77,Condition(function I18))
endif
set TI7=Z77
set YAE=AO7(650,Z77,Condition(function I18))
set YWE=(((YVE!=null and GetWidgetLife(YVE)<=400*AA7(Z77)+200)or YAE>=2)and LE7(Z77,.5*(GetUnitX(YUE)+GetUnitX(YVE)),.5*(GetUnitY(YUE)+GetUnitY(YVE)),null,'A2TI'))or((YUE!=null and O18(YUE)==false)and((GetUnitLifePercent(YUE)<=80. or GetWidgetLife(YUE)<=1000))and IssueImmediateOrderById(Z77,852551))
if not YWE then
set YUE=B97(600,Z77,Condition(function BY7))
set YWE=(YUE!=null)and(GetWidgetLife(YUE)<=500+600*AA7(Z77)or GetUnitLifePercent(YUE)<=75)and IsUnitInRange(Z77,YUE,300)and IssueImmediateOrderById(Z77,852551)
set YWE=(not YWE)and LE7(Z77,.5*(GetUnitX(Z77)+GetUnitX(YUE)),.5*(GetUnitY(Z77)+GetUnitY(YUE)),null,'A2TI')
endif
if not YWE then
set YUE=J38(800,Z77)
set YWE=(YUE!=null)and LE7(Z77,GetUnitX(YUE)-155*CosBJ(YH7(Z77,YUE)),GetUnitY(YUE)-155*SinBJ(YH7(Z77,YUE)),null,'A2QI')
endif
if not YWE then
set YUE=CT7(0,Z77)
set YWE=(YUE!=null)and C_7(Z77,852189,'A2QM',YUE)
endif
if not YWE then
set YUE=V_7(YUE==null,J38(1200,Z77),YUE)
set YWE=(YUE!=null)and LE7(Z77,GetUnitX(YUE)+55*CosBJ(YH7(Z77,YUE)),GetUnitY(YUE)+55*SinBJ(YH7(Z77,YUE)),YUE,'A2QI')
endif
endif
endif
if YWE then
call TriggerSleepAction(.2)
endif
set YWE=IssueTargetOrderById(Z77,851983,NH7)
endif
endif
set Z77=null
set t=null
set g=null
set XCD=null
set YVE=null
set YUE=null
return false
endfunction
function YBE takes unit Z77,unit YCE returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'o01P',GetUnitX(Z77),GetUnitY(Z77),0)
local real a=YI7(GetUnitX(Z77),GetUnitY(Z77),GetSpellTargetX(),GetSpellTargetY())
call UnitAddAbility(Z77,'A2QQ')
call UnitRemoveAbility(Z77,'A2QQ')
call SetUnitTimeScale(Z77,3)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function YNE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveGroupHandle(R8,(W57),(187),(OG8()))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveReal(R8,(W57),(6),((GetUnitX(Z77))*1.))
call SaveReal(R8,(W57),(7),((GetUnitY(Z77))*1.))
call SaveReal(R8,(W57),(137),((a)*1.))
call SaveInteger(R8,(W57),(34),(0))
call SaveReal(R8,(W57),(138),((0)*1.))
call SaveUnitHandle(R8,(W57),(810),(null))
if YCE!=null and GetUnitTypeId(YCE)=='o01X' then
call KillUnit(YCE)
endif
set t=null
set AC7=null
endfunction
function Y3E takes nothing returns boolean
return((GetUnitTypeId(GetFilterUnit())=='o01X' and GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(NG7))or(0==1 and(GetUnitTypeId((GetFilterUnit()))=='o020')and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(NG7))))and O18(GetFilterUnit())==false
endfunction
function RollingBoulder_Loop takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local group g
if GetUnitTypeId(Z77)=='N0MU' and O18(Z77)==false then
set g=OG8()
set NG7=Z77
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),150+25,Condition(function Y3E))
if FirstOfGroup(g)!=null then
endif
call OF8(g)
set g=null
endif
set Z77=null
set t=null
return false
endfunction
function Y6E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real PX9=(LoadReal(R8,(W57),(442)))
local integer YLE=(LoadInteger(R8,(GetHandleId(Z77)),(800)))
local group g
if GetTriggerEventId()==EVENT_UNIT_SPELL_CAST then
if(GetSpellAbilityId()=='A2TH')and YLE<=0 then
call ZN7(Z77)
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A2TH' or GetSpellAbilityId()=='A2TJ' then
if GetSpellAbilityId()=='A2TJ' then
call YBE(Z77,null)
endif
endif
elseif YLE<6 then
set PX9=PX9-.2
call SaveReal(R8,(W57),(442),((PX9)*1.))
if PX9<=0.then
call UnitRemoveAbility(Z77,NK7[YLE])
set YLE=YLE+1
call AddPermanentAbility(Z77,NK7[YLE])
call SaveInteger(R8,(GetHandleId(Z77)),(800),(YLE))
call SaveReal(R8,(W57),(442),((NE7)*1.))
endif
endif
set Z77=null
set t=null
return false
endfunction
function Y1E takes unit Z77 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.2,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_CAST)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Y6E))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(442),((NE7)*1.))
call SaveInteger(R8,(GetHandleId(Z77)),(800),(6))
call AddPermanentAbility(Z77,NK7[6])
set t=null
endfunction
function I39 takes nothing returns nothing
call Y1E(H04)
endfunction
function Y0E takes unit Y5E returns nothing
local unit Z77=Y7[GetPlayerId(GetOwningPlayer(Y5E))]
local integer W57=GetHandleId(Z77)
local integer ML8=GetUnitAbilityLevel(Z77,'A2TH')
local integer Y2E=(LoadInteger(R8,(W57),(279)))
local integer i=1
local integer x=1
local unit YCE
loop
exitwhen i>Y2E
set YCE=(LoadUnitHandle(R8,(W57),(1400+i)))
if O18(YCE)==false then
call SaveUnitHandle(R8,(W57),(1400+x),(YCE))
set x=x+1
endif
set i=i+1
endloop
set Y2E=Y2E-1
call SaveInteger(R8,(W57),(279),(Y2E))
set YCE=null
set Z77=null
endfunction
function Y_E takes nothing returns boolean
if GetUnitTypeId(GetTriggerUnit())=='o01X' then
call Y0E(GetTriggerUnit())
endif
return false
endfunction
function Z4E takes nothing returns nothing
local unit YCE
local unit Z77=GetTriggerUnit()
local integer W57=GetHandleId(Z77)
local integer ML8=GetUnitAbilityLevel(Z77,'A2TH')
local integer Y2E=(LoadInteger(R8,(W57),(279)))
local unit Z7E=(LoadUnitHandle(R8,(W57),(1400+1)))
local real x
local real y
local unit X77=GetSpellTargetUnit()
local integer YLE=(LoadInteger(R8,(GetHandleId(Z77)),(800)))
if YLE>0 then
call UnitRemoveAbility(Z77,NK7[YLE])
set YLE=IMaxBJ(0,YLE-1)
call AddPermanentAbility(Z77,NK7[YLE])
call SaveInteger(R8,(GetHandleId(Z77)),(800),(YLE))
if X77==null then
set x=GetSpellTargetX()
set y=GetSpellTargetY()
else
set x=GetUnitX(X77)
set y=GetUnitY(X77)
endif
set YCE=CreateUnit(GetOwningPlayer(Z77),'o01X',x,y,0)
if(GetPlayerController(GetOwningPlayer(Z77))==MAP_CONTROL_COMPUTER)then
set TD7=YCE
endif
call UnitApplyTimedLife(YCE,'BTLF','x')
call SetUnitPathing(YCE,false)
set Y2E=Y2E+1
call SaveUnitHandle(R8,(W57),(1400+Y2E),(YCE))
call SaveInteger(R8,(W57),(279),(Y2E))
if(Y2E>6)then
call KillUnit(Z7E)
endif
endif
set YCE=null
set Z77=null
set Z7E=null
set X77=null
endfunction
function Z8E takes nothing returns boolean
if GetSpellAbilityId()=='A2TH' then
call Z4E()
endif
return false
endfunction
function IB9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Z8E))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function Y_E))
set NK7[0]='A2SF'
set NK7[1]='A2SB'
set NK7[2]='A2SA'
set NK7[3]='A2SD'
set NK7[4]='A2SC'
set NK7[5]='A2SE'
set NK7[6]='A2TE'
set t=null
endfunction
function BoulderSmash_FindClosestMagnetizedTarget takes nothing returns nothing
local real d=BS7(GetEnumUnit(),NY7)
if d<H64 then
set H64=d
set NT7=GetEnumUnit()
endif
endfunction
function BoulderSmash_FindRock takes nothing returns boolean
if IsUnitInGroup(GetFilterUnit(),NR7)==false and(GetUnitTypeId(GetFilterUnit())=='o01X' or GetUnitTypeId(GetFilterUnit())=='o020')and GetFilterUnit()!=NT7 then
call GroupAddUnit(NR7,GetFilterUnit())
set NW7=NW7+1
if GetUnitTypeId(GetFilterUnit())=='o01X' then
call KillUnit(GetFilterUnit())
endif
endif
return false
endfunction
function ZGE takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),NR7)==false then
call GroupAddUnit(NR7,GetEnumUnit())
call Dmg(NS7,GetEnumUnit(),1,NV7)
if NX7==1 then
call Stun(NS7,GetEnumUnit(),0.5+0.25*globalI)
endif
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)and((LoadInteger(R8,(GetHandleId((GetEnumUnit()))),((809))))==1)then
set NY7=GetEnumUnit()
endif
endif
endfunction
function ZHE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local real BM7=(LoadReal(R8,(W57),(6)))
local real BN7=(LoadReal(R8,(W57),(7)))
local real a
local real PND=(LoadReal(R8,(W57),(23)))
local real POD=(LoadReal(R8,(W57),(24)))
local real x
local real y
local boolean Y4E=false
local group XCD=(LoadGroupHandle(R8,(W57),(187)))
local group g
local integer RockBonusCount=(LoadInteger(R8,(W57),(34)))
local integer HeroSTR=GetHeroStr(Z77,true)
local unit YTE=(LoadUnitHandle(R8,(W57),(810)))
if YTE!=null then
set BM7=GetUnitX(YTE)
set BN7=GetUnitY(YTE)
endif
set a=bj_DEGTORAD*YI7(GetUnitX(X77),GetUnitY(X77),BM7,BN7)
set x=PND+(NQ7)*.03*Cos(a)
set y=POD+(NQ7)*.03*Sin(a)
if Z87(x,y,BM7,BN7)<(5+(NQ7)*.03)then
set x=BM7
set y=BN7
set Y4E=true
endif
set x=PQ8(x)
set y=PS8(y)
set NR7=XCD
set NS7=Z77
set NU7=GetUnitAbilityLevel(Z77,'A2QM')
set NV7=125
set NY7=null
if((LoadInteger(R8,(GetHandleId((X77))),((4306))))==1)or GetTriggerEventId()==EVENT_UNIT_DEATH or GetUnitAbilityLevel(X77,'B08V')>0 or((LoadInteger(R8,(GetHandleId((X77))),((4336))))==1)or(YTE==null and GetTriggerEvalCount(t)>200)then
set Y4E=true
else
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl",x,y))
if GetUnitTypeId(X77)=='o01X' or GetUnitTypeId(X77)=='o020' then
set NX7=1
call SetUnitPosition(X77,x,y)
call SetUnitX(X77,PQ8(x))
call SetUnitY(X77,PS8(y))
else
set NX7=0
call SetUnitX(X77,PQ8(x))
call SetUnitY(X77,PS8(y))
endif
call KillTrees(x,y,150)
call SaveReal(R8,(W57),(23),((x)*1.))
call SaveReal(R8,(W57),(24),((y)*1.))
set g=OG8()
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,200+25,Condition(function UM8))
call GroupRemoveUnit(g,X77)
set globalI=NU7
call ForGroup(g,function ZGE)
call OF8(g)
if NY7!=null and NX7==1 then
set g=OG8()
set NT7=null
set H64=9999
call GroupEnumUnitsInRange(g,GetUnitX(NY7),GetUnitY(NY7),600+25,Condition(function Z9E))
call OF8(g)
if NT7!=null then
set YTE=NT7
call SaveUnitHandle(R8,(W57),(810),(YTE))
set Y4E=false
endif
endif
set g=null
endif
if Y4E then
if GetUnitTypeId(X77)!='o01X' then
call SetUnitPathing(X77,true)
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
call OF8(XCD)
call SaveInteger(R8,(GetHandleId((X77))),((4335)),(2))
if GetTriggerEventId()!=EVENT_UNIT_DEATH then
if IsPlayerAlly(GetOwningPlayer(Z77),GetOwningPlayer(X77))==false then
call Dmg(NS7,X77,1,NV7)
endif
endif
endif
set X77=null
set t=null
set XCD=null
set Z77=null
return false
endfunction
function ZIE takes nothing returns nothing
local unit X77=GetSpellTargetUnit()
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local real a=YH7(Z77,X77)
local real x
local real y
local integer i=-1
local boolean ZJE=false
local real d=400+100*GetUnitAbilityLevel(Z77,GetSpellAbilityId())
if Z77==X77 then
set a=GetUnitFacing(Z77)
endif
if GetUnitTypeId(X77)=='o01X' then
set d=2000
endif
loop
exitwhen ZJE or(d-i*25)<=0
set i=i+1
set x=PQ8(GetUnitX(X77)+(d-i*25)*Cos(a*bj_DEGTORAD))
set y=PS8(GetUnitY(X77)+(d-i*25)*Sin(a*bj_DEGTORAD))
if(IsPointInRegion(IF4,((x)*1.),((y)*1.)))==false then
set ZJE=true
endif
endloop
call SetUnitPathing(X77,false)
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function ZHE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
call SaveReal(R8,(W57),(23),((GetUnitX(X77))*1.))
call SaveReal(R8,(W57),(24),((GetUnitY(X77))*1.))
call SaveInteger(R8,(W57),(34),(0))
call SaveGroupHandle(R8,(W57),(187),(OG8()))
call SaveUnitHandle(R8,(W57),(810),(null))
call SaveInteger(R8,(GetHandleId((X77))),((4335)),(1))
set X77=null
set Z77=null
set t=null
endfunction
function GetA2QMTarget takes unit s,real x,real y returns unit
local group g=CreateGroup()
call GroupEnumUnitsInRange(g,x,y,205,null)
loop
set s=FirstOfGroup(g)
exitwhen s==null or GetUnitTypeId(s)=='o01X'
call GroupRemoveUnit(g,s)
endloop
call DestroyGroup(g)
set g=null
return s
endfunction
function A2QM_Cast takes nothing returns nothing
local unit s=GetTriggerUnit()
local unit u=GetSpellTargetUnit()
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST then
if GetUnitTypeId(GetSpellTargetUnit())=='n00L' then
call IssueImmediateOrderById(s,851972)
elseif GetSpellTargetUnit()==null then
call IssueImmediateOrderById(s,851972)
set u=GetA2QMTarget(s,GetSpellTargetX(),GetSpellTargetY())
call IssueTargetOrderById(s,852189,u)
endif
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
if IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==false or HasLinkin(GetSpellTargetUnit())==false then
call ZIE()
endif
endif
set s=null
set u=null
endfunction
function ZKE takes nothing returns boolean
if GetSpellAbilityId()=='A2QM' then
call A2QM_Cast()
endif
return false
endfunction
function IC9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function ZKE))
set t=null
endfunction
function ZME takes nothing returns nothing
set NA7=GetEnumUnit()
call ExecuteFunc("ZNE")
endfunction
function ZOE takes nothing returns boolean
return O18(GetFilterUnit())==false and GetUnitTypeId(GetFilterUnit())=='o01X' and((LoadInteger(R8,(GetHandleId((GetFilterUnit()))),((4335))))==1)==false and((LoadInteger(R8,(GetHandleId((GetFilterUnit()))),((4340))))==1)==false
endfunction
function ZPE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local real x=GetUnitX(X77)
local real y=GetUnitY(X77)
local group g=OG8()
local integer C77=GetTriggerEvalCount(t)
local integer ML8=GetUnitAbilityLevel(Z77,'A2TI')
local real LBD=(LoadReal(R8,(GetHandleId(X77)),(807)))
if ModuloInteger(C77,5)==0 then
call Dmg(Z77,X77,1,(25+25*ML8)/ 2)
endif
set NZ7=Z77
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,300+25,Condition(function ZOE))
call ForGroup(g,function ZME)
call OF8(g)
if(TimerGetElapsed(E4))>LBD or O18(X77)then
call SaveInteger(R8,(GetHandleId((X77))),((809)),(2))
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function ZQE takes unit Z77,unit X77 returns nothing
local trigger t
local integer W57
local real LBD=(LoadReal(R8,(GetHandleId(X77)),(807)))
call SaveReal(R8,(GetHandleId(X77)),(807),(((TimerGetElapsed(E4))+6)*1.))
if LBD<(TimerGetElapsed(E4))then
call SaveInteger(R8,(GetHandleId((X77))),((809)),(1))
set t=CreateTrigger()
set W57=GetHandleId(t)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("war3mapImported\\MagnetizeTargetOverhead.mdx",X77,"origin")))
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function ZPE))
endif
set t=null
endfunction
function ZRE takes nothing returns nothing
call ZQE(NZ7,GetEnumUnit())
endfunction
function ZSE takes unit Z77,unit X77 returns nothing
local group g=OG8()
local real x=GetUnitX(X77)
local real y=GetUnitY(X77)
local real HS8=300
if GetUnitTypeId(X77)=='o01X' then
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\DemolisherMissile\\DemolisherMissile.mdx",GetUnitX(X77),GetUnitY(X77)))
call UnitApplyTimedLife(X77,'BTLF',5)
call SaveInteger(R8,(GetHandleId((X77))),((4340)),(1))
call SetUnitVertexColor(X77,0,0,0,'d')
set HS8=600
else
call DestroyEffect(AddSpecialEffect("war3mapImported\\MagnetizeCastAoE.mdx",GetUnitX(X77),GetUnitY(X77)))
endif
set H04=Z77
set NZ7=Z77
set NA7=X77
call GroupEnumUnitsInRange(g,x,y,HS8+25,Condition(function UM8))
call ForGroup(g,function ZRE)
call OF8(g)
set Z77=null
set g=null
endfunction
function ZNE takes nothing returns nothing
call ZSE(NZ7,NA7)
endfunction
function ZTE takes nothing returns boolean
if GetSpellAbilityId()=='A2TI' then
call ZSE(GetTriggerUnit(),GetTriggerUnit())
endif
return false
endfunction
function IZ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function ZTE))
set t=null
endfunction
function ZUE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call SetUnitAnimationByIndex(Z77,8)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function ZVE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SetUnitAnimationByIndex(Z77,7)
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerAddCondition(t,Condition(function ZUE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=null
set Z77=null
endfunction
function ZWE takes nothing returns boolean
if GetUnitTypeId(GetTriggerUnit())=='N0MU' or GetUnitTypeId(GetTriggerUnit())=='N0MW' then
call ZVE()
endif
return false
endfunction
function IY9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function ZWE))
set t=null
endfunction
function ZXE takes nothing returns boolean
local real d
if IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(SF4))and IsUnitInGroup(GetFilterUnit(),SH4)==false then
set d=Z87(GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()),GetUnitX(SF4),GetUnitY(SF4))
if d<VZ then
set SE4=GetFilterUnit()
set VZ=d
endif
endif
return false
endfunction
function ZYE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit AC7=LUnit(EC8,"Caster")
local integer TA8=LInt(EC8,"Level")
local integer QRD=LInt(EC8,"TargetIndex")
local unit m5=KH8(QRD)
local group ZZE=LGroup(EC8,"AlreadyHit")
local real ZAE=LReal(EC8,"StolenMana")
local real ZBE=LReal(EC8,"ManaCounter")
local real ZCE=LReal(EC8,"DmgCounter")
local real NN9
local group g
local real a
local real x
local real y
set a=Atan2(GetUnitY(m5)-GetUnitY(AC7),GetUnitX(m5)-GetUnitX(AC7))
if Z77==m5 then
set x=GetUnitX(AC7)+25*Cos(a)
set y=GetUnitY(AC7)+25*Sin(a)
else
set x=GetUnitX(AC7)+15*Cos(a)
set y=GetUnitY(AC7)+15*Sin(a)
endif
call SetUnitX(AC7,x)
call SetUnitY(AC7,y)
if Z87(x,y,GetUnitX(m5),GetUnitY(m5))<60 then
call SetUnitX(AC7,GetUnitX(m5))
call SetUnitY(AC7,GetUnitY(m5))
if Z77==m5 then
call SetUnitState(Z77,UNIT_STATE_MANA,GetUnitState(Z77,UNIT_STATE_MANA)+ZAE)
call KillUnit(AC7)
call OF8(ZZE)
call LT7(EC8)
call EA8(t)
else
if UN8(m5)==false or IsUnitVisibleEx(m5,GetOwningPlayer(AC7))then
if GetUnitAbilityLevel(m5,'A2S1')==0 then
call Dmg(Z77,m5,NormalFire,(40+40*TA8)+.25*ZCE*(40+40*TA8))
else
call Dmg(Z77,m5,HeroMagic,(40+40*TA8)+.25*ZCE*(40+40*TA8))
endif
set ZCE=ZCE+1
if GetUnitState(m5,UNIT_STATE_MANA)>0 then
set NN9=RMinBJ(GetUnitState(m5,UNIT_STATE_MANA),(10+10*TA8)+.25*ZBE*(10+10*TA8))
call SetUnitState(m5,UNIT_STATE_MANA,GetUnitState(m5,UNIT_STATE_MANA)-NN9)
call S68(oI,GetUnitX(m5),GetUnitY(m5))
set ZAE=ZAE+NN9
set ZBE=ZBE+1
endif
endif
call SReal(EC8,"StolenMana",(ZAE)*1.)
call SReal(EC8,"DmgCounter",(ZCE)*1.)
call SReal(EC8,"ManaCounter",(ZBE)*1.)
set g=OG8()
set SE4=null
set SF4=m5
set SH4=ZZE
set VZ=99999
set SG4=Z77
call GroupEnumUnitsInRange(g,GetUnitX(m5),GetUnitY(m5),500,Condition(function ZXE))
call OF8(g)
if SE4==null or ZCE==(2+TA8)then
call SInt(EC8,"TargetIndex",KJ8(Z77))
else
call SInt(EC8,"TargetIndex",KJ8(SE4))
call GroupAddUnit(ZZE,SE4)
endif
endif
call KG8(QRD)
endif
set t=null
set Z77=null
set m5=null
set g=null
set AC7=null
set ZZE=null
return false
endfunction
function Z3E takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local integer TA8=GetUnitAbilityLevel(Z77,'A0G2')
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local group g=OG8()
local real ZCE=0
local real ZBE=0
local real NN9=0
local real ZAE=0
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'h090',GetUnitX(Z77),GetUnitY(Z77),GetUnitFacing(Z77))
call S68(eI,GetUnitX(Z77),GetUnitY(Z77))
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerAddCondition(t,Condition(function ZYE))
call SGroup(EC8,"AlreadyHit",g)
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Caster",AC7)
call SInt(EC8,"Level",TA8)
call SInt(EC8,"TargetIndex",KJ8(m5))
call SInt(EC8,"Count",0)
call SReal(EC8,"StolenMana",(ZAE)*1.)
call SReal(EC8,"DmgCounter",(ZCE)*1.)
call SReal(EC8,"ManaCounter",(ZBE)*1.)
call GroupAddUnit(g,m5)
set Z77=null
set m5=null
set t=null
set g=null
set AC7=null
endfunction
function Z6E takes nothing returns boolean
if GetSpellAbilityId()=='A0G2' then
call Z3E()
endif
return false
endfunction
function C18 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Z6E))
set t=null
endfunction
function ZLE takes nothing returns nothing
local unit X77=GetEnumUnit()
call SaveReal(R8,(GetHandleId(X77)),(799),((0)*1.))
set X77=null
endfunction
function Z1E takes nothing returns nothing
local unit X77=GetEnumUnit()
call UnitRemoveAbility(X77,'A2S3')
call UnitRemoveAbility(X77,'A2TM')
call UnitRemoveAbility(X77,'B0BQ')
call SetUnitTurnSpeed(X77,GetUnitDefaultTurnSpeed(X77))
set X77=null
endfunction
function Z0E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,'A1AT')
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
call DisableTrigger(t)
call Dmg(GetEventDamageSource(),X77,7,GetEventDamage()*(.2+.1*ML8))
call EnableTrigger(t)
if O18(X77)then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(X77,'A2S1')
call UnitRemoveAbility(X77,'A2TL')
endif
else
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(X77,'A2S1')
call UnitRemoveAbility(X77,'A2TL')
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function Z5E takes unit Z77,unit X77 returns nothing
local trigger t
local integer W57
local unit AC7
if IsUnitIllusion(X77)then
call KillUnit(X77)
return
endif
set t=CreateTrigger()
set W57=GetHandleId(t)
set AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call UnitAddAbility(AC7,'A2S4')
call IssueTargetOrderById(AC7,852095,X77)
call TriggerRegisterDeathEvent(t,X77)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,3,false)
call TriggerAddCondition(t,Condition(function Z0E))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\EtherealForm\\SpiritWalkerChange.mdl",X77,"chest")))
call AddPermanentAbility(X77,'A2S1')
call AddPermanentAbility(X77,'A2TL')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A2S1',false)
set t=null
endfunction
function Z2E takes nothing returns nothing
local unit X77=GetEnumUnit()
call SaveReal(R8,(GetHandleId(X77)),(799),(((LoadReal(R8,(GetHandleId(X77)),(799)))+.02)*1.))
if GetUnitAbilityLevel(X77,'A2S3')==0 then
call AddPermanentAbility(X77,'A2S3')
call AddPermanentAbility(X77,'A2TM')
call SetUnitTurnSpeed(X77,GetUnitDefaultTurnSpeed(X77)*.5)
endif
if(LoadReal(R8,(GetHandleId(X77)),(799)))==2. then
call Z5E(SI4,X77)
endif
set X77=null
endfunction
function Z_E takes unit Z77,unit X77 returns boolean
local real a=YH7(X77,Z77)
local real A4E=GetUnitFacing(X77)
local real c1
local real c2
local real d1=-1.
local real d2=-1.
local real e1
local real e2
local real f1=-1.
local real f2=-1.
set c1=RMaxBJ(A4E-85,0)
set c2=A4E
if A4E-85<=0 then
set d1=360-(85-(c2-c1))
set d2=360
endif
set e1=A4E
set e2=RMinBJ(A4E+85,360)
if A4E+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 A7E takes nothing returns boolean
return(IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and Z_E(H04,GetFilterUnit())
endfunction
function A8E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local integer ML8=GetUnitAbilityLevel(Z77,'A1AT')
local group g1=OG8()
local group g2=OG8()
local group XCD=LGroup(W57,"AlreadyHit")
set SJ4=XCD
set SI4=Z77
set H04=Z77
call GroupEnumUnitsInRange(g1,GetUnitX(Z77),GetUnitY(Z77),1025,Condition(function A7E))
call ForGroup(g1,function Z2E)
call GroupAddGroup(g1,XCD)
call GroupAddGroup(XCD,g2)
call GroupRemoveGroup(g1,g2)
call OF8(g1)
call OF8(g2)
call DestroyEffect(LEff(W57,"FX"))
if GetTriggerEvalCount(t)>R2I(SK4/ .02)then
call EA8(t)
call LT7(W57)
call ForGroup(XCD,function Z1E)
call ForGroup(XCD,function ZLE)
call OF8(XCD)
else
call SEff(W57,"FX",AddSpecialEffectTarget("Abilities\\Spells\\Orc\\EtherealForm\\SpiritWalkerChange.mdl",Z77,"chest"))
endif
set Z77=null
set g1=null
set g2=null
set XCD=null
set t=null
return false
endfunction
function A9E takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AC7=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'e00E',GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),0)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function A8E))
call SUnit(W57,"Source",GetTriggerUnit())
call SEff(W57,"FX",AddSpecialEffectTarget("Abilities\\Spells\\Orc\\EtherealForm\\SpiritWalkerChange.mdl",GetTriggerUnit(),"chest"))
call SGroup(W57,"AlreadyHit",OG8())
call TriggerEvaluate(t)
set t=null
endfunction
function ADE takes nothing returns boolean
if GetSpellAbilityId()=='A1AT' then
call A9E()
endif
return false
endfunction
function C08 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function ADE))
set t=null
endfunction
function zS takes nothing returns nothing
if HB4<=HC4 then
set HB4=HB4+1
call GroupAddUnit(H24,GetEnumUnit())
endif
endfunction
function zt takes unit Z77,unit m5 returns nothing
call QK8("SPLK",GetUnitX(Z77),GetUnitY(Z77),GetUnitX(m5),GetUnitY(m5),.1,.6,.44,.9,.6)
endfunction
function zT takes nothing returns nothing
call SetUnitState(H04,UNIT_STATE_LIFE,GetUnitState(H04,UNIT_STATE_LIFE)+25)
if GetUnitTypeId(GetEnumUnit())!='n0F5' then
call TV8(GetEnumUnit(),25)
endif
call zt(GetEnumUnit(),H04)
endfunction
function zu takes nothing returns nothing
call Dmg(H54,H04,NormalFire,25)
if GetUnitTypeId(GetEnumUnit())!='n0F5' then
call TV8(GetEnumUnit(),25)
endif
call zt(GetEnumUnit(),H04)
endfunction
function zU takes nothing returns nothing
local unit N28=GetTriggerUnit()
local group g=OG8()
local integer zv=GetUnitAbilityLevel(N28,'A0R5')*5
set H24=OG8()
set HB4=0
set HC4=zv
set H04=N28
call GroupEnumUnitsInRange(g,GetUnitX(N28),GetUnitY(N28),1325,Condition(function ny))
call GroupRemoveUnit(g,N28)
call GroupRemoveUnit(g,GetSpellTargetUnit())
call ForGroup(g,function zS)
call OF8(g)
set g=H24
set H04=GetSpellTargetUnit()
set H54=N28
if IsUnitAlly(H04,GetOwningPlayer(N28))then
call ForGroup(g,function zT)
else
call ForGroup(g,function zu)
endif
call OF8(g)
set N28=null
set g=null
endfunction
function AEE takes nothing returns boolean
if GetSpellAbilityId()=='A0R5' and(IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_STRUCTURE)==false or GetOwningPlayer(GetSpellTargetUnit())==GetOwningPlayer(GetTriggerUnit()))then
call zU()
endif
return false
endfunction
function E_9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function AEE))
set t=null
endfunction
function AFE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer AGE=LInt(EC8,"Last")
if GetTriggerEventId()==EVENT_UNIT_DEATH then
if(LBool(EC8,"SourceDone")==false and GetTriggerUnit()==LUnit(EC8,"Source"))then
call SBool(EC8,"SourceDone",true)
call SetHeroStr(LUnit(EC8,"Source"),GetHeroStr(LUnit(EC8,"Source"),false)-AGE,true)
elseif(LBool(EC8,"TargetDone")==false and GetTriggerUnit()==LUnit(EC8,"Target"))then
call SBool(EC8,"TargetDone",true)
call SetHeroStr(LUnit(EC8,"Target"),GetHeroStr(LUnit(EC8,"Target"),false)+AGE,true)
endif
else
if(LBool(EC8,"SourceDone")==false)then
call SBool(EC8,"SourceDone",true)
call SetHeroStr(LUnit(EC8,"Source"),GetHeroStr(LUnit(EC8,"Source"),false)-AGE,true)
endif
if(LBool(EC8,"TargetDone")==false)then
call SBool(EC8,"TargetDone",true)
call SetHeroStr(LUnit(EC8,"Target"),GetHeroStr(LUnit(EC8,"Target"),false)+AGE,true)
endif
call LT7(EC8)
call EA8(t)
endif
set t=null
return false
endfunction
function AHE takes nothing returns nothing
local unit Z77=sZ
local unit m5=GetEnumUnit()
local integer AGE
local integer TA8=tZ
local trigger t
local integer EC8
if IsUnitType(m5,UNIT_TYPE_HERO)and XC8(GetUnitTypeId(m5))==false then
set AGE=IMinBJ(GetHeroStr(m5,false)-1,4)
set t=CreateTrigger()
set EC8=GetHandleId(t)
call SetHeroStr(Z77,GetHeroStr(Z77,false)+AGE,true)
call SetHeroStr(m5,GetHeroStr(m5,false)-AGE,true)
call TriggerRegisterTimerEvent(t,40,false)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function AFE))
call SBool(EC8,"SourceDone",false)
call SBool(EC8,"TargetDone",false)
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Target",m5)
call SInt(EC8,"Last",AGE)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",Z77,"origin"))
endif
call Dmg(Z77,m5,NormalFire,40*TA8-20)
set Z77=null
set m5=null
set t=null
endfunction
function AIE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local group g=OG8()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=GetUnitAbilityLevel(Z77,'A15S')
local unit oA=CreateUnit(GetOwningPlayer(Z77),'h07J',x,y,0)
call DestroyEffect(AddSpecialEffect("effects\\DecayGreen_Groundonly_1.mdx",x,y))
call RemoveLocation(l)
set H04=Z77
set sZ=Z77
set tZ=TA8
call GroupEnumUnitsInRange(g,x,y,325+25,Condition(function UW8))
call ForGroup(g,function AHE)
call OF8(g)
call KillUnit(oA)
set Z77=null
set l=null
set g=null
set t=null
set oA=null
endfunction
function AJE takes nothing returns boolean
if GetSpellAbilityId()=='A15S' then
call AIE()
endif
return false
endfunction
function E59 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function AJE))
set t=null
endfunction
function AKE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer QRD=LInt(EC8,"TargetIndex")
local unit m5=KH8(QRD)
local unit AME=LUnit(EC8,"Zombie")
local real KTE=GetUnitState(m5,UNIT_STATE_LIFE)
local real ANE=GetUnitState(m5,UNIT_STATE_MAX_LIFE)
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call KG8(QRD)
call LT7(EC8)
call EA8(t)
if GetTriggerUnit()==m5 then
call KillUnit(AME)
endif
elseif U9 then
call KG8(QRD)
call LT7(EC8)
call EA8(t)
call PauseUnit(AME,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 IssueTargetOrderById(AME,851983,m5)
call EnableTrigger(t)
elseif(KTE<('d'*SW4)or KTE/ ANE<(.05*SW4+0.15))and GetUnitAbilityLevel(AME,'B0AN')==0 then
call SetPlayerAbilityAvailable(GetOwningPlayer(AME),'A176',true)
call IssueTargetOrderById(wZ[GetPlayerId(GetOwningPlayer(AME))],852101,AME)
call SetPlayerAbilityAvailable(GetOwningPlayer(AME),'A176',false)
elseif IsUnitVisibleEx(m5,GetOwningPlayer(AME))==false then
if(LBool(EC8,"VisionBuffer1"))then
if(LBool(EC8,"VisionBuffer2"))then
if(LBool(EC8,"VisionBuffer3"))then
call LT7(EC8)
call EA8(t)
call KillUnit(AME)
else
call SBool(EC8,"VisionBuffer3",true)
endif
else
call SBool(EC8,"VisionBuffer2",true)
endif
else
call SBool(EC8,"VisionBuffer1",true)
endif
else
call SBool(EC8,"VisionBuffer1",false)
call SBool(EC8,"VisionBuffer2",false)
call SBool(EC8,"VisionBuffer3",false)
endif
set t=null
set m5=null
set AME=null
return false
endfunction
function APE takes nothing returns boolean
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit m5=GetEnumUnit()
local unit AME=CreateUnit(TZ,'n0F5',GetUnitX(m5),GetUnitY(m5),0)
call IssueTargetOrderById(AME,851983,m5)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,AME,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,AME,EVENT_UNIT_ISSUED_ORDER)
call TriggerRegisterUnitEvent(t,AME,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(t,AME,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function AKE))
call SInt(EC8,"TargetIndex",KJ8(m5))
call SUnit(EC8,"Zombie",AME)
call SInt(EC8,"Level",SW4)
set t=null
set m5=null
set AME=null
return false
endfunction
function AQE takes nothing returns boolean
if GetUnitTypeId(GetFilterUnit())=='n0F5' and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 then
call KillUnit(GetFilterUnit())
endif
return false
endfunction
function ARE takes player p returns nothing
local group g=OG8()
call GroupEnumUnitsOfPlayer(g,p,Condition(function AQE))
call OF8(g)
set g=null
endfunction
function ASE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit ATE=LUnit(EC8,"Acolyte1")
local unit AUE=LUnit(EC8,"Acolyte2")
local unit AVE=LUnit(EC8,"Acolyte3")
local integer TA8=LInt(EC8,"Level")
local group g
local player AWE
if IsJWPlayer(GetOwningPlayer(Z77))then
set AWE=N8[0]
else
set AWE=G8[0]
endif
if GetTriggerEventId()==EVENT_UNIT_DEATH then
if(LBool(EC8,"NeedsFix"))then
call S18(AWE,.4,GetUnitX(Z77),GetUnitY(Z77),600)
endif
call LT7(EC8)
call EA8(t)
call ShowUnit(Z77,false)
call RemoveUnit(ATE)
call RemoveUnit(AUE)
call RemoveUnit(AVE)
call ARE(GetOwningPlayer(Z77))
else
if IsUnitVisibleEx(Z77,AWE)then
call SBool(EC8,"NeedsFix",true)
endif
set g=OG8()
set H04=Z77
set TZ=GetOwningPlayer(Z77)
set SW4=TA8
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),25+200+200*TA8,Condition(function U38))
if U9==false then
call ForGroup(g,function APE)
endif
call OF8(g)
set g=null
endif
set t=null
set Z77=null
set ATE=null
set AUE=null
set AVE=null
set AWE=null
return false
endfunction
function AXE takes nothing returns nothing
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local unit Z77
local real PTD
local real PUD
local real AYE
local unit ATE
local unit AUE
local unit AVE
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=GetUnitAbilityLevel(GetTriggerUnit(),'A15V')
local integer id
if TA8==1 then
set Z77=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'n0FJ',x,y,0)
elseif TA8==2 then
set Z77=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'n0FI',x,y,0)
elseif TA8==3 then
set Z77=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'n0F6',x,y,0)
else
set Z77=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'n0FH',x,y,0)
endif
call S68(B54,x,y)
set id=GetPlayerId(GetOwningPlayer(Z77))
if wZ[id]==null then
set wZ[id]=CreateUnit(GetOwningPlayer(Z77),'e01V',x,y,0)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A176',false)
call AddPermanentAbility(wZ[id],'A176')
endif
call SetUnitPosition(Z77,PQ8(x),PS8(y))
call UnitApplyTimedLife(Z77,'BTLF',10+5*TA8)
call RemoveLocation(l)
call KillTrees(x,y,300)
set PTD=x+200*Cos(0*bj_DEGTORAD)
set PUD=y+200*Sin(0*bj_DEGTORAD)
set AYE=YI7(PTD,PUD,x,y)
set ATE=CreateUnit(GetOwningPlayer(Z77),'h07H',PTD,PUD,AYE)
call SetUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
call QueueUnitAnimation(ATE,"Stand Work Gold")
set PTD=x+200*Cos('x'*bj_DEGTORAD)
set PUD=y+200*Sin('x'*bj_DEGTORAD)
set AYE=YI7(PTD,PUD,x,y)
set AUE=CreateUnit(GetOwningPlayer(Z77),'h07H',PTD,PUD,AYE)
call SetUnitAnimation(AUE,"Stand Work Gold")
call QueueUnitAnimation(AUE,"Stand Work Gold")
call QueueUnitAnimation(AUE,"Stand Work Gold")
call QueueUnitAnimation(AUE,"Stand Work Gold")
call QueueUnitAnimation(AUE,"Stand Work Gold")
call QueueUnitAnimation(AUE,"Stand Work Gold")
call QueueUnitAnimation(AUE,"Stand Work Gold")
call QueueUnitAnimation(AUE,"Stand Work Gold")
call QueueUnitAnimation(AUE,"Stand Work Gold")
call QueueUnitAnimation(AUE,"Stand Work Gold")
call QueueUnitAnimation(AUE,"Stand Work Gold")
call QueueUnitAnimation(AUE,"Stand Work Gold")
call QueueUnitAnimation(AUE,"Stand Work Gold")
call QueueUnitAnimation(AUE,"Stand Work Gold")
call QueueUnitAnimation(AUE,"Stand Work Gold")
call QueueUnitAnimation(AUE,"Stand Work Gold")
call QueueUnitAnimation(AUE,"Stand Work Gold")
set PTD=x+200*Cos(240*bj_DEGTORAD)
set PUD=y+200*Sin(240*bj_DEGTORAD)
set AYE=YI7(PTD,PUD,x,y)
set AVE=CreateUnit(GetOwningPlayer(Z77),'h07H',PTD,PUD,AYE)
call SetUnitAnimation(AVE,"Stand Work Gold")
call QueueUnitAnimation(AVE,"Stand Work Gold")
call QueueUnitAnimation(AVE,"Stand Work Gold")
call QueueUnitAnimation(AVE,"Stand Work Gold")
call QueueUnitAnimation(AVE,"Stand Work Gold")
call QueueUnitAnimation(AVE,"Stand Work Gold")
call QueueUnitAnimation(AVE,"Stand Work Gold")
call QueueUnitAnimation(AVE,"Stand Work Gold")
call QueueUnitAnimation(AVE,"Stand Work Gold")
call QueueUnitAnimation(AVE,"Stand Work Gold")
call QueueUnitAnimation(AVE,"Stand Work Gold")
call QueueUnitAnimation(AVE,"Stand Work Gold")
call QueueUnitAnimation(AVE,"Stand Work Gold")
call QueueUnitAnimation(AVE,"Stand Work Gold")
call QueueUnitAnimation(AVE,"Stand Work Gold")
call QueueUnitAnimation(AVE,"Stand Work Gold")
call SetUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call QueueUnitAnimation(Z77,"Stand Work")
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,3,true)
call TriggerAddCondition(t,Condition(function ASE))
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Acolyte1",ATE)
call SUnit(EC8,"Acolyte2",AUE)
call SUnit(EC8,"Acolyte3",AVE)
call SInt(EC8,"Level",TA8)
call SBool(EC8,"NeedsFix",false)
call TriggerEvaluate(t)
set Z77=null
set ATE=null
set AUE=null
set AVE=null
set l=null
set t=null
endfunction
function AZE takes nothing returns boolean
if GetSpellAbilityId()=='A15V' then
call AXE()
endif
return false
endfunction
function E29 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function AZE))
set t=null
endfunction
function AAE takes unit C4D returns boolean
return(AV7(C4D,BU[FI4])!=null)
endfunction
function ABE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local integer TA8=GetUnitAbilityLevel(Z77,'A15J')
call SetUnitAbilityLevel(Z77,'A15K',TA8)
call LT7(EC8)
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function ACE takes nothing returns nothing
if IsUnitType(H04,UNIT_TYPE_HERO)then
if AAE(H54)then
call SetUnitState(H54,UNIT_STATE_LIFE,GetUnitState(H54,UNIT_STATE_LIFE)+GetUnitState(H54,UNIT_STATE_MAX_LIFE)*.1)
else
call SetUnitState(H54,UNIT_STATE_LIFE,GetUnitState(H54,UNIT_STATE_LIFE)+GetUnitState(H54,UNIT_STATE_MAX_LIFE)*.06)
endif
else
if AAE(H54)then
call SetUnitState(H54,UNIT_STATE_LIFE,GetUnitState(H54,UNIT_STATE_LIFE)+GetUnitState(H54,UNIT_STATE_MAX_LIFE)*.03)
else
call SetUnitState(H54,UNIT_STATE_LIFE,GetUnitState(H54,UNIT_STATE_LIFE)+GetUnitState(H54,UNIT_STATE_MAX_LIFE)*.02)
endif
endif
endfunction
function A3E takes nothing returns boolean
local trigger t2=GetTriggeringTrigger()
local integer QYD=GetHandleId(t2)
local trigger t1=LTrig(QYD,"t1")
local integer EVE=GetHandleId(t1)
local unit Z77=LUnit(QYD,"Source")
local unit m5
local real d
local real a
local boolean A6E=LBool(QYD,"IgnorePlague")
if(GetTriggerEventId()==EVENT_UNIT_DEATH and GetTriggerUnit()==Z77)or(GetTriggerEventId()!=EVENT_UNIT_DAMAGED and GetTriggerEventId()!=EVENT_UNIT_DEATH)then
call LT7(EVE)
call LT7(QYD)
call EA8(t1)
call EA8(t2)
elseif GetTriggerEventId()==EVENT_UNIT_DEATH then
if IsUnitIllusion(GetDyingUnit())==false then
call T88(GetDyingUnit(),Z77,'h07Y',"ACE",600)
endif
elseif A6E==false then
set m5=GetTriggerUnit()
set d=Z47(Z77,m5)
if d<775 and GetEventDamage()>4 then
if AAE(Z77)then
set a=20+5*WZ
else
set a=15+5*WZ
endif
if d>200 then
set a=a-15*((d-150)/(775-150))
endif
call SBool(QYD,"IgnorePlague",true)
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_MAGIC_IMMUNE)then
call Dmg(GetEventDamageSource(),GetTriggerUnit(),9,GetEventDamage()*a/'d')
else
call Dmg(GetEventDamageSource(),GetTriggerUnit(),HeroMagic,GetEventDamage()*a/'d')
endif
call SBool(QYD,"IgnorePlague",false)
endif
endif
set t2=null
set t1=null
set Z77=null
set m5=null
return false
endfunction
function ALE takes nothing returns boolean
local trigger t1=GetTriggeringTrigger()
local integer EVE=GetHandleId(t1)
local trigger t2=LTrig(EVE,"t2")
local integer QYD=GetHandleId(t2)
local unit m5=GetTriggerUnit()
local unit Z77=LUnit(EVE,"Source")
if IsUnitEnemy(Z77,GetOwningPlayer(m5))and IsUnitType(m5,UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(m5,'A04R')==0 then
if LBool(QYD,"Registered"+I2S(GetHandleId(m5)))==false then
call TriggerRegisterUnitEvent(t2,m5,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t2,m5,EVENT_UNIT_DEATH)
call SBool(QYD,"Registered"+I2S(GetHandleId(m5)),true)
endif
endif
set t1=null
set t2=null
set m5=null
set Z77=null
return false
endfunction
function A1E takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t1=CreateTrigger()
local integer EVE=GetHandleId(t1)
local trigger t2=CreateTrigger()
local integer QYD=GetHandleId(t2)
local trigger t3=CreateTrigger()
local integer A0E=GetHandleId(t3)
local integer TA8=GetUnitAbilityLevel(Z77,'A15J')
set WZ=TA8
call TriggerRegisterUnitInRange(t1,Z77,750,Condition(function KF8))
call TriggerAddCondition(t1,Condition(function ALE))
call STrig(EVE,"t2",t2)
call SUnit(EVE,"Source",Z77)
call TriggerRegisterTimerEvent(t2,30,false)
call TriggerRegisterUnitEvent(t2,Z77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t2,Condition(function A3E))
call STrig(QYD,"t1",t1)
call SUnit(QYD,"Source",Z77)
call SBool(QYD,"IgnorePlague",false)
call TriggerRegisterTimerEvent(t3,.01,false)
call TriggerAddCondition(t3,Condition(function ABE))
call SUnit(A0E,"Source",Z77)
set Z77=null
set t1=null
set t2=null
set t3=null
endfunction
function A5E takes nothing returns boolean
if GetSpellAbilityId()=='A15J' and GetUnitTypeId(GetTriggerUnit())=='H00R' then
call A1E()
endif
return false
endfunction
function F49 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function A5E))
call PU8('A15K')
set t=null
endfunction
function A2E takes nothing returns nothing
local unit X77=GetEnumUnit()
local unit Z77=SA4
local real WLE=GetUnitState(X77,UNIT_STATE_LIFE)
local real A_E=GetUnitState(X77,UNIT_STATE_MAX_LIFE)
local real B4E=((.003+.003*SB4)*A_E)/ 2
if WLE<B4E then
call SetUnitState(X77,UNIT_STATE_LIFE,1)
call Dmg(Z77,X77,HeroMagic,'d')
call Dmg(Z77,X77,NormalFire,'d')
call Dmg(Z77,X77,HeroNormal,'d')
else
call SetUnitState(X77,UNIT_STATE_LIFE,P18(GetUnitState(X77,UNIT_STATE_LIFE)-B4E,1))
endif
set X77=null
set Z77=null
endfunction
function B7E takes nothing returns boolean
return(IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false and(GetUnitAbilityLevel((GetFilterUnit()),'Bcyc')>0)==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and GetUnitAbilityLevel(GetFilterUnit(),'B084')>0
endfunction
function B8E takes nothing returns boolean
local integer EC8=GetHandleId(GetTriggeringTrigger())
local unit Z77=LUnit(EC8,"Source")
local group g
if O18(Z77)==false then
set g=OG8()
set H04=Z77
set SA4=Z77
set SB4=GetUnitAbilityLevel(Z77,'A01N')
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),1225,Condition(function B7E))
call ForGroup(g,function A2E)
call OF8(g)
endif
set g=null
set Z77=null
return false
endfunction
function B9E takes unit N28,boolean SY8 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function B8E))
call SUnit(GetHandleId(t),"Source",N28)
if SY8 then
set UV7[GetPlayerId(GetOwningPlayer(N28))]=t
endif
set t=null
endfunction
function BDE takes nothing returns boolean
if GetLearnedSkill()=='A01N' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A01N')==1 then
call B9E(GetTriggerUnit(),false)
endif
return false
endfunction
function L48 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function BDE))
set t=null
endfunction
function BEE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer ML8=GetUnitAbilityLevel(Z77,'A060')
local real BFE=2*ML8
local real BGE=ML8
local integer R2D=(LoadInteger(R8,(W57),(34)))
if ML8==4 then
set BFE=10
endif
set BGE=BGE*R2D
set BFE=BFE*R2D
call SetUnitState(Z77,UNIT_STATE_MANA,GetUnitState(Z77,UNIT_STATE_MANA)+BFE)
call SetUnitState(Z77,UNIT_STATE_LIFE,GetUnitState(Z77,UNIT_STATE_LIFE)+BGE)
if GetTriggerEvalCount(t)>5 or GetTriggerEventId()==EVENT_WIDGET_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
return false
endfunction
function BHE takes unit Z77 returns nothing
local integer ML8=GetUnitAbilityLevel(Z77,'A060')
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl",Z77,"origin"))
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerAddCondition(t,Condition(function BEE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)then
call SaveInteger(R8,(W57),(34),(10))
else
call SaveInteger(R8,(W57),(34),(1))
endif
set t=null
endfunction
function BIE takes nothing returns boolean
if GetUnitAbilityLevel(GetKillingUnit(),'B02R')>0 then
call BHE(GetKillingUnit())
elseif LState(GetTriggerUnit(),"4333")then
call BHE(PR4)
endif
return false
endfunction
function C58 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function BIE))
set t=null
endfunction
function BJE takes nothing returns nothing
local integer W57=GetHandleId(GetTriggeringTrigger())
local unit Z77=H04
local unit X77=H54
local real P08=LReal(W57,"Damage")
local real D7E=LReal(W57,"Heal")
if IsUnitAlly(X77,GetOwningPlayer(Z77))then
call SetUnitState(X77,UNIT_STATE_LIFE,GetUnitState(X77,UNIT_STATE_LIFE)+D7E)
else
call Dmg(Z77,X77,NormalFire,P08)
endif
set Z77=null
set X77=null
endfunction
function BKE takes nothing returns nothing
local trigger t=T88(H04,GetEnumUnit(),'h00W',"BJE",400)
local integer EC8=GetHandleId(t)
call SReal(EC8,"Damage",H64)
call SReal(EC8,"Heal",HL4)
set t=null
endfunction
function BME takes nothing returns nothing
if true or IsUnitVisibleEx(GetEnumUnit(),GetOwningPlayer(H04))then
call BKE()
endif
endfunction
function BNE takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local group g=OG8()
local integer ML8=GetUnitAbilityLevel(AM7,PQ4)
local real r
local real P08
local real D7E
if ML8==1 then
set P08=75
set D7E=70
set r=500
elseif ML8==2 then
set P08='}'
set D7E=90
set r=500
elseif ML8==3 then
set P08=200
set D7E='n'
set r=500
elseif ML8==4 then
set P08=275
set D7E=130
set r=500
endif
set H04=AM7
set H64=P08
set HL4=D7E
call GroupEnumUnitsInRange(g,GetUnitX(AM7),GetUnitY(AM7),r,Condition(function VG8))
call GroupRemoveUnit(g,AM7)
call ForGroup(g,function BME)
call OF8(g)
call SetUnitState(AM7,UNIT_STATE_LIFE,GetUnitState(AM7,UNIT_STATE_LIFE)+D7E)
set AM7=null
set g=null
endfunction
function BOE takes nothing returns boolean
if GetSpellAbilityId()==PQ4 then
call BNE()
endif
return false
endfunction
function C28 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function BOE))
set t=null
endfunction
function BPE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local real R2D=(LoadReal(R8,(W57),(680)))
local integer BQE=GetUnitAbilityLevel(Z77,'A08P')
call FlushChildHashtable(R8,(W57))
call EA8(t)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",X77,"origin"))
set LongRevive=true
if BQE>0 then
set KF7=true
call Dmg(Z77,X77,NormalFire,R2D*(GetUnitState(X77,UNIT_STATE_MAX_LIFE)-GetUnitState(X77,UNIT_STATE_LIFE)))
set KF7=false
else
call Dmg(Z77,X77,NormalFire,R2D*(GetUnitState(X77,UNIT_STATE_MAX_LIFE)-GetUnitState(X77,UNIT_STATE_LIFE)))
endif
set LongRevive=false
set t=null
set Z77=null
set X77=null
return false
endfunction
function BRE takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer BSE=GetUnitAbilityLevel(Z77,'A067')
local integer BTE=GetUnitAbilityLevel(Z77,'A08P')
local real R2D
if BSE==1 then
set R2D=.4
elseif BSE==2 or BTE==1 then
set R2D=.6
elseif BSE==3 or BTE==2 then
set R2D=.9
elseif BTE==3 then
set R2D=1.2
endif
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveReal(R8,(W57),(680),((R2D)*1.))
call TriggerRegisterTimerEvent(t,1.5,false)
call TriggerAddCondition(t,Condition(function BPE))
call AddTimedBoolBuff(X77,"4333",1.5)
set T87[RP8(RW8(X77,StringHash("4333"),.1,1.5,Z77,'A067',false))]=GetUnitLifePercent(X77)
if BTE>0 then
call AddTimedBoolBuff(X77,"4418",1.51)
set T87[RP8(RW8(X77,StringHash("4418"),.1,1.5,Z77,'A08P',false))]=GetUnitLifePercent(X77)
endif
set PR4=Z77
set t=null
set Z77=null
set X77=null
endfunction
function BUE takes nothing returns boolean
if(GetSpellAbilityId()=='A067' or GetSpellAbilityId()=='A08P')and HasLinkin(GetSpellTargetUnit())==false then
call BRE()
endif
return false
endfunction
function C_8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function BUE))
set t=null
endfunction
function BVE takes nothing returns boolean
return GetSpellAbilityId()=='A0EY'or GetSpellAbilityId()=='A0FH'or GetSpellAbilityId()=='A0F0'
endfunction
function BWE takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitAbilityLevel(GetFilterUnit(),'A04R')!=1
endfunction
function BXE 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 BYE takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local unit AC7
local group QA9=OG8()
local boolexpr QZ9=Condition(function BWE)
local real OV8=GetUnitFacing(AM7)
local real x
local real y
if GetSpellAbilityId()=='A0EY'then
set x=GetUnitX(AM7)+200*Cos(OV8*bj_DEGTORAD)
set y=GetUnitY(AM7)+200*Sin(OV8*bj_DEGTORAD)
set AC7=CreateUnit(GetOwningPlayer(AM7),'e006',x,y,0)
call UnitApplyTimedLife(AC7,'BTLF',2.)
call GroupEnumUnitsInRange(QA9,x,y,275.,QZ9)
call ForGroup(QA9,function BXE)
call GroupClear(QA9)
elseif GetSpellAbilityId()=='A0FH'then
set x=GetUnitX(AM7)+450*Cos(OV8*bj_DEGTORAD)
set y=GetUnitY(AM7)+450*Sin(OV8*bj_DEGTORAD)
set AC7=CreateUnit(GetOwningPlayer(AM7),'e006',x,y,0)
call UnitApplyTimedLife(AC7,'BTLF',2.)
call GroupEnumUnitsInRange(QA9,x,y,275.,QZ9)
call ForGroup(QA9,function BXE)
call GroupClear(QA9)
elseif GetSpellAbilityId()=='A0F0'then
set x=GetUnitX(AM7)+700*Cos(OV8*bj_DEGTORAD)
set y=GetUnitY(AM7)+700*Sin(OV8*bj_DEGTORAD)
set AC7=CreateUnit(GetOwningPlayer(AM7),'e006',x,y,0)
call UnitApplyTimedLife(AC7,'BTLF',2.)
call GroupEnumUnitsInRange(QA9,x,y,275.,QZ9)
call ForGroup(QA9,function BXE)
call GroupClear(QA9)
endif
call OF8(QA9)
call DestroyBoolExpr(QZ9)
set AM7=null
set AC7=null
set QA9=null
set QZ9=null
endfunction
function L88 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(t,function BYE)
call TriggerAddCondition(t,Condition(function BVE))
set t=null
endfunction
function BZE takes nothing returns nothing
if(GetLearnedSkill()=='A0EY')then
if(GetUnitAbilityLevelSwapped('A0EY',GetTriggerUnit())==1)then
call UnitAddAbility(GetTriggerUnit(),'A0F0')
call UnitAddAbility(GetTriggerUnit(),'A0FH')
else
call SetUnitAbilityLevelSwapped('A0F0',GetTriggerUnit(),GetUnitAbilityLevelSwapped('A0EY',GetTriggerUnit()))
call SetUnitAbilityLevelSwapped('A0FH',GetTriggerUnit(),GetUnitAbilityLevelSwapped('A0EY',GetTriggerUnit()))
endif
endif
if(GetLearnedSkill()=='A0BR')then
if(GetUnitAbilityLevelSwapped('A0BR',GetTriggerUnit())==1)then
call UnitAddAbility(GetTriggerUnit(),'A0CQ')
endif
endif
endfunction
function RM takes nothing returns nothing
set DK=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(DK,EVENT_PLAYER_HERO_SKILL)
call TriggerAddAction(DK,function BZE)
endfunction
function BAE takes nothing returns boolean
return GetSpellAbilityId()=='A29J' or GetSpellAbilityId()=='A1MP'
endfunction
function BBE takes unit N28,integer BCE returns nothing
local integer B3E=BCE
local integer Zd
local integer U8
local location Mk=GetUnitLoc(GetTriggerUnit())
local location sA
local integer TA8=GetUnitAbilityLevelSwapped('A29J',GetTriggerUnit())
if TA8==0 then
return
endif
set B3E=B3E/ 2
set Zd=1
set U8=B3E
call XM7(GetPlayerId(GetOwningPlayer(N28)),"REQUIEM "+I2S(B3E))
loop
exitwhen Zd>U8
set sA=ZP7(Mk,50.,(I2R(Zd)*(360/ B3E)))
call CreateNUnitsAtLoc(1,'e00C',GetOwningPlayer(N28),Mk,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0HG')
call SetUnitAbilityLevelSwapped('A0HG',bj_lastCreatedUnit,TA8)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,852218,sA)
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
call RemoveLocation(sA)
set Zd=Zd+1
endloop
call RemoveLocation(Mk)
set Mk=null
set N28=null
set sA=null
endfunction
function B6E takes nothing returns nothing
local integer B3E=(LoadInteger(R8,(GetHandleId(GetTriggerUnit())),(710)))
local unit O4D=GetTriggerUnit()
call BBE(O4D,B3E)
set O4D=null
endfunction
function L98 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function BAE))
call TriggerAddAction(t,function B6E)
set t=null
endfunction
function BLE takes nothing returns nothing
local integer W57=GetHandleId(GetTriggeringTrigger())
local unit Z77=H54
local unit X77=H04
local integer B3E=GetUnitAbilityLevel(Z77,'A0CQ')
local integer B1E
local integer ML8=GetUnitAbilityLevel(Z77,'A0BR')
if ML8==1 then
set B1E=12
elseif ML8==2 then
set B1E=20
elseif ML8==3 then
set B1E=28
else
set B1E=36
endif
set B1E=B1E+1
if IsUnitType(X77,UNIT_TYPE_HERO)==false then
set B3E=B3E+1
else
set B3E=B3E+12
endif
set B3E=IMinBJ(B1E,B3E)
call SetUnitAbilityLevel(Z77,'A0CQ',B3E)
call SaveInteger(R8,(GetHandleId(Z77)),(710),(B3E))
set Z77=null
endfunction
function B0E takes nothing returns nothing
local integer B3E
local integer ML8
local integer B1E
local trigger t
local integer W57
local unit Z77=GetKillingUnit()
if GetUnitTypeId(Z77)=='e00C' then
set Z77=Y7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]
endif
set B3E=GetUnitAbilityLevel(Z77,'A0CQ')
set ML8=GetUnitAbilityLevel(Z77,'A0BR')
if ML8==1 then
set B1E=12
elseif ML8==2 then
set B1E=20
elseif ML8==3 then
set B1E=28
else
set B1E=36
endif
if B3E<=B1E then
set t=T88(GetTriggerUnit(),Z77,'h0CR',"BLE",500)
set W57=GetHandleId(t)
set t=null
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\ZigguratMissile\\ZigguratMissile.mdl",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))
endif
set Z77=null
endfunction
function B5E takes nothing returns nothing
local integer B2E=(LoadInteger(R8,(GetHandleId(GetTriggerUnit())),(710)))
call SaveInteger(R8,(GetHandleId(GetTriggerUnit())),(710),(R2I(GetUnitAbilityLevel(GetTriggerUnit(),'A0CQ')*.5)+1))
call SetUnitAbilityLevel(GetTriggerUnit(),'A0CQ',R2I(GetUnitAbilityLevel(GetTriggerUnit(),'A0CQ')*.5)+1)
call BBE(GetTriggerUnit(),B2E-(LoadInteger(R8,(GetHandleId(GetTriggerUnit())),(710))))
endfunction
function B_E takes nothing returns boolean
if GetUnitAbilityLevel(GetKillingUnit(),'A0BR')>0 and IsUnitIllusion(GetTriggerUnit())==false then
call B0E()
elseif GetUnitAbilityLevel(Y7[GetPlayerId(GetOwningPlayer(GetKillingUnit()))],'A0BR')>0 and GetUnitTypeId(GetKillingUnit())=='e00C' then
call B0E()
endif
if GetUnitAbilityLevel(GetTriggerUnit(),'A0BR')>0 and IsUnitIllusion(GetTriggerUnit())==false then
call B5E()
endif
return false
endfunction
function C4E takes nothing returns boolean
local unit AM7=Y7[GetPlayerId(GetTriggerPlayer())]
local integer C7E=GetUnitAbilityLevel(AM7,'A0CQ')-1
local integer C8E=0
local integer ML8=GetUnitAbilityLevel(AM7,'A0BR')
if ML8==1 then
set C8E=12
elseif ML8==2 then
set C8E=20
elseif ML8==3 then
set C8E=28
elseif ML8==4 then
set C8E=36
endif
set C7E=IMaxBJ(IMinBJ(C7E,C8E),0)
if GetUnitTypeId(AM7)=='Nfir' then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,GetObjectName('n0KE')+" "+I2S(C7E)+"/"+I2S(C8E))
endif
set AM7=null
return false
endfunction
function L78 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function B_E))
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[1],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-st",true)
call TriggerAddCondition(t,Condition(function C4E))
set t=null
endfunction
function C9E takes nothing returns boolean
return(not(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)))and(not(GetUnitAbilityLevelSwapped('A04R',GetFilterUnit())==1))and(not(IsUnitAliveBJ(GetFilterUnit())==false))and(not(GetUnitTypeId(GetFilterUnit())=='o003'))and(not(IsUnitEnemy(GetFilterUnit(),GetTriggerPlayer())==false))and(not(GetTriggerUnit()==GetFilterUnit()))and(not(IsUnitVisibleEx(GetFilterUnit(),GetTriggerPlayer())==false))
endfunction
function CDE takes nothing returns nothing
local unit N28=GetTriggerUnit()
local location Mk=GetUnitLoc(N28)
local integer TA8=GetUnitAbilityLevelSwapped('A29J',GetTriggerUnit())
if TA8==0 then
set TA8=GetUnitAbilityLevelSwapped('A1MP',GetTriggerUnit())
endif
call CreateNUnitsAtLoc(1,'e00C',GetOwningPlayer(GetEnumUnit()),Mk,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0HH')
call SetUnitAbilityLevelSwapped('A0HH',bj_lastCreatedUnit,TA8)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,852189,GetEnumUnit())
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
call RemoveLocation(Mk)
set Mk=null
set N28=null
endfunction
function CEE takes nothing returns nothing
local unit N28=GetTriggerUnit()
local location Mk=GetUnitLoc(N28)
local integer TA8=GetUnitAbilityLevelSwapped('A29J',GetTriggerUnit())
if TA8==0 then
set TA8=GetUnitAbilityLevelSwapped('A1MP',GetTriggerUnit())
endif
call CreateNUnitsAtLoc(1,'e00C',GetOwningPlayer(GetEnumUnit()),Mk,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0HH')
call SetUnitAbilityLevelSwapped('A0HH',bj_lastCreatedUnit,TA8)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,852189,GetEnumUnit())
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
call RemoveLocation(Mk)
set Mk=null
set N28=null
endfunction
function CFE takes nothing returns nothing
local unit N28=GetTriggerUnit()
local location Mk=GetUnitLoc(N28)
local integer TA8=GetUnitAbilityLevelSwapped('A29J',GetTriggerUnit())
if TA8==0 then
set TA8=GetUnitAbilityLevelSwapped('A1MP',GetTriggerUnit())
endif
call CreateNUnitsAtLoc(1,'e00C',GetOwningPlayer(GetEnumUnit()),Mk,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0HH')
call SetUnitAbilityLevelSwapped('A0HH',bj_lastCreatedUnit,TA8)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,852189,GetEnumUnit())
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
call RemoveLocation(Mk)
set Mk=null
set N28=null
endfunction
function CGE takes nothing returns nothing
local location Mk=GetUnitLoc(GetTriggerUnit())
local unit N28=GetTriggerUnit()
local group XS8
set XS8=OG8()
call GroupEnumUnitsInRangeOfLoc(XS8,Mk,700,Condition(function C9E))
call ForGroup(XS8,function CDE)
call OF8(XS8)
set XS8=OG8()
call GroupEnumUnitsInRangeOfLoc(XS8,Mk,400,Condition(function C9E))
call ForGroup(XS8,function CEE)
call OF8(XS8)
set XS8=OG8()
call GroupEnumUnitsInRangeOfLoc(XS8,Mk,200,Condition(function C9E))
call ForGroup(XS8,function CFE)
call OF8(XS8)
call RemoveLocation(Mk)
set Mk=null
set N28=null
set XS8=null
endfunction
function LD8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function BAE))
call TriggerAddAction(t,function CGE)
set t=null
endfunction
function CHE takes nothing returns boolean
return GetSpellAbilityId()=='A02H'
endfunction
function CIE takes nothing returns nothing
local unit oA
if(PO8()==false)then
set oA=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'e00E',GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()),bj_UNIT_FACING)
call AddPermanentAbility(oA,'A02R')
call IssueTargetOrderById(oA,852075,GetSpellTargetUnit())
else
set oA=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'e00E',GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()),bj_UNIT_FACING)
call AddPermanentAbility(oA,'A1H1')
call IssueTargetOrderById(oA,852075,GetSpellTargetUnit())
endif
set oA=null
endfunction
function LF8 takes nothing returns nothing
set Dm=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(Dm,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(Dm,Condition(function CHE))
call TriggerAddAction(Dm,function CIE)
endfunction
function CJE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer NZ8=GetHandleId(t)
local unit W8D=(LoadUnitHandle(R8,(NZ8),(2)))
local unit CKE=(LoadUnitHandle(R8,(NZ8),(19)))
call ResetUnitAnimation(W8D)
call RemoveUnit(CKE)
call FlushChildHashtable(R8,(NZ8))
call EA8(t)
set W8D=null
set CKE=null
set t=null
return false
endfunction
function CME takes nothing returns nothing
local unit W8D=GetTriggerUnit()
local unit CKE=CreateUnit(GetOwningPlayer(W8D),'u01I',GetUnitX(W8D),GetUnitY(W8D),GetUnitFacing(W8D))
local trigger t=CreateTrigger()
local integer NZ8=GetHandleId(t)
call TriggerRegisterUnitEvent(t,W8D,EVENT_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t,Condition(function CJE))
call SaveUnitHandle(R8,(NZ8),(2),(W8D))
call SaveUnitHandle(R8,(NZ8),(19),(CKE))
call SetUnitVertexColorBJ(CKE,0,0,0,75)
call SetUnitAnimation(CKE,"spell third")
set W8D=null
set CKE=null
set t=null
endfunction
function CNE takes nothing returns boolean
if GetSpellAbilityId()=='A08C' and GetUnitAbilityLevel(GetTriggerUnit(),'A08C')<5 then
call CME()
endif
return false
endfunction
function LG8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function CNE))
set t=null
endfunction
function COE takes nothing returns boolean
local integer W57=GetHandleId(GetTriggeringTrigger())
local unit CPE=LUnit(W57,"NightStalker")
local unit CQE=LUnit(W57,"VisionUnit")
if CPE==null or O18(CPE)or PO8()or(AV7(CPE,BU[FX4])==null and AV7(CPE,BU[UG7])==null)then
call ShowUnit(CQE,false)
else
call ShowUnit(CQE,true)
call SetUnitX(CQE,GetUnitX(CPE))
call SetUnitY(CQE,GetUnitY(CPE))
endif
if GetOwningPlayer(CQE)!=GetOwningPlayer(CPE)then
call SetUnitOwner(CQE,GetOwningPlayer(CPE),true)
endif
set CPE=null
set CQE=null
return false
endfunction
function CRE takes nothing returns nothing
local integer EC8=GetHandleId(GetTriggeringTrigger())
local unit CPE=LUnit(EC8,"NightStalker")
if CPE!=null and PO8()and O18(CPE)==false then
call UnitRemoveAbility(CPE,'A116')
call UnitRemoveAbility(CPE,'A117')
call SetUnitAbilityLevel(CPE,'S00A',5)
call SetUnitAbilityLevel(CPE,'A08C',5)
elseif CPE!=null and PO8()==false and O18(CPE)==false then
call AddPermanentAbility(CPE,'A116')
call AddPermanentAbility(CPE,'A117')
call SetUnitAbilityLevel(CPE,'S00A',GetUnitAbilityLevel(CPE,'A086'))
call SetUnitAbilityLevel(CPE,'A08C',GetUnitAbilityLevel(CPE,'A08E'))
endif
set CPE=null
endfunction
function CSE takes unit CPE,boolean SY8,integer CTE returns nothing
local integer W57=GetHandleId(CPE)
local trigger t
if LBool(W57,"NightStalkerAlreadyLearned")==false or SY8 then
call SBool(W57,"NightStalkerAlreadyLearned",true)
set t=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(t,2.)
call TriggerRegisterGameStateEventTimeOfDay(t,LESS_THAN,6.)
call TriggerRegisterGameStateEventTimeOfDay(t,GREATER_THAN,18.)
call TriggerAddAction(t,function CRE)
call SUnit(GetHandleId(t),"NightStalker",CPE)
if SY8 then
if CTE=='A08E' then
set UV7[GetPlayerId(GetOwningPlayer(CPE))]=t
elseif CTE=='A086' then
set UW7[GetPlayerId(GetOwningPlayer(CPE))]=t
endif
endif
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function COE))
call SUnit(W57,"NightStalker",CPE)
call SUnit(W57,"VisionUnit",CreateUnit(GetOwningPlayer(CPE),'o01A',GetUnitX(CPE),GetUnitY(CPE),0))
if SY8 then
if CTE=='A08E' then
set UZ7[GetPlayerId(GetOwningPlayer(CPE))]=t
elseif CTE=='A086' then
set UA7[GetPlayerId(GetOwningPlayer(CPE))]=t
endif
endif
endif
if(CTE=='A086')then
call AddPermanentAbility(CPE,'S00A')
if(PO8())then
call SetUnitAbilityLevel(CPE,'S00A',5)
else
call SetUnitAbilityLevel(CPE,'S00A',GetUnitAbilityLevel(CPE,'A086'))
endif
endif
if(CTE=='A08E')then
call UnitAddAbility(CPE,'A08C')
if(PO8())then
call SetUnitAbilityLevel(CPE,'A08C',5)
else
call SetUnitAbilityLevel(CPE,'A08C',GetUnitAbilityLevel(CPE,'A08E'))
endif
endif
set t=null
endfunction
function CUE takes nothing returns boolean
if(GetLearnedSkill()=='A086' or GetLearnedSkill()=='A08E')and IsUnitIllusion(GetTriggerUnit())==false then
call CSE(GetTriggerUnit(),false,GetLearnedSkill())
endif
return false
endfunction
function LE8 takes nothing returns nothing
set NJ=CreateTrigger()
call TriggerRegisterAllPlayersEvent(NJ,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(NJ,Condition(function CUE))
endfunction
function CVE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local integer QRD=LInt(EC8,"TargetIndex")
local unit m5=KH8(QRD)
call UnitRemoveAbility(Z77,'A1CO')
call LT7(EC8)
call EA8(t)
set t=null
set Z77=null
set m5=null
return false
endfunction
function CWE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local integer TA8=GetUnitAbilityLevel(Z77,'A0PL')
local trigger t
local integer EC8
call DestroyEffect(AddSpecialEffect("war3mapImported\\PhantomStrike.mdx",GetUnitX(Z77),GetUnitY(Z77)))
call SetUnitX(Z77,GetUnitX(m5))
call SetUnitY(Z77,GetUnitY(m5))
if IsUnitAlly(Z77,GetOwningPlayer(m5))==false then
set t=CreateTrigger()
set EC8=GetHandleId(t)
call AddPermanentAbility(Z77,'A1CO')
call SInt(GetHandleId(Z77),"Count",0)
call SUnit(GetHandleId(Z77),"Target",m5)
call IssueTargetOrderById(Z77,851983,m5)
if(GetPlayerController(GetOwningPlayer(Z77))!=MAP_CONTROL_USER)then
call Y07(.01)
call IssueTargetOrderById(Z77,851983,m5)
endif
call TriggerRegisterTimerEvent(t,3,false)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function CVE))
call SUnit(EC8,"Source",Z77)
call SInt(EC8,"TargetIndex",KJ8(m5))
endif
set Z77=null
set m5=null
set t=null
endfunction
function CXE takes nothing returns boolean
if GetSpellAbilityId()=='A0PL' then
call CWE()
endif
return false
endfunction
function CYE takes unit Z77 returns nothing
local integer EC8=GetHandleId(Z77)
local unit m5=LUnit(EC8,"Target")
local integer OUD=LInt(EC8,"Count")
if GetTriggerUnit()!=m5 or OUD>=4 then
call UnitRemoveAbility(Z77,'A1CO')
call LT7(EC8)
else
set OUD=OUD+1
call SInt(EC8,"Count",OUD)
endif
set m5=null
endfunction
function CZE takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),'A1CO')>0 then
call CYE(GetAttacker())
endif
return false
endfunction
function LJ8 takes nothing returns nothing
local trigger t=CreateTrigger()
local trigger t2=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function CXE))
call TriggerRegisterAllPlayersEvent(t2,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t2,Condition(function CZE))
set t=null
set t2=null
endfunction
function CAE takes unit Z77,boolean CBE returns nothing
local integer ML8=GetUnitAbilityLevel(Z77,'A03P')
if CBE==false then
call UnitRemoveAbility(Z77,'A13F')
call UnitRemoveAbility(Z77,'B0A2')
else
call AddPermanentAbility(Z77,'A13F')
endif
endfunction
function CCE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local group g
local integer C77=(LoadInteger(R8,(W57),(34)))
local boolean C3E=(LoadBoolean(R8,(W57),(674)))
set C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
if Z77!=null and O18(Z77)==false and GetUnitAbilityLevel(Z77,'A03P')>0 then
set H04=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),1625,Condition(function GenericCondition_EnemyUnitsExHeroesNoDotaInvis))
if FirstOfGroup(g)==null then
if C3E and C77>7 then
set C3E=false
call SaveBoolean(R8,(W57),(674),(C3E))
set C77=0
call SaveInteger(R8,(W57),(34),(C77))
endif
if C3E==false then
set C77=0
call SaveInteger(R8,(W57),(34),(C77))
call SaveInteger(R8,(GetHandleId((Z77))),((4302)),(2))
call CAE(Z77,false)
call SetUnitVertexColorBJ(Z77,'d','d','d',0)
if GetUnitAbilityLevel(Z77,'A20S')==0 then
call UnitSetUsesAltIcon(Z77,false)
endif
endif
else
if C3E==false and C77>7 then
set C3E=true
set C77=0
call SaveBoolean(R8,(W57),(674),(C3E))
call SaveInteger(R8,(W57),(34),(C77))
endif
if C3E then
set C77=0
call SaveInteger(R8,(W57),(34),(C77))
call SaveInteger(R8,(GetHandleId((Z77))),((4302)),(1))
call CAE(Z77,true)
call SetUnitVertexColorBJ(Z77,'d','d','d',75)
if IsPlayerEnemy(GetOwningPlayer(Z77),GetLocalPlayer())and N08(GetLocalPlayer())==false then
call UnitSetUsesAltIcon(Z77,true)
else
call UnitSetUsesAltIcon(Z77,false)
endif
endif
endif
call OF8(g)
set g=null
endif
set t=null
set Z77=null
return false
endfunction
function C6E takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function CCE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveInteger(R8,(W57),(34),(0))
call SaveBoolean(R8,(W57),(674),(false))
set t=null
set Z77=null
endfunction
function CLE takes nothing returns boolean
if GetLearnedSkill()=='A03P' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A03P')==1 then
call C6E()
endif
return false
endfunction
function LH8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function CLE))
set t=null
endfunction
function C1E takes nothing returns nothing
local unit AC7
if IsUnitInGroup(GetEnumUnit(),H24)==false then
call GroupAddUnit(H24,GetEnumUnit())
set AC7=CreateUnit(GetOwningPlayer(GetEnumUnit()),'e00E',GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call AddPermanentAbility(AC7,'A0RI')
call SetUnitAbilityLevel(AC7,'A0RI',GetUnitAbilityLevel(LK4,'A0RA'))
call IssueTargetOrderById(AC7,852106,GetEnumUnit())
call Dmg(LK4,GetEnumUnit(),NormalFire,'d')
endif
set AC7=null
endfunction
function C0E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer i
local group g=LGroup(EC8,"g")
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
local group C5E=OG8()
local unit O4D=LUnit(EC8,"UnitVar")
set H04=O4D
set LK4=O4D
call GroupEnumUnitsInRange(C5E,x,y,300,Condition(function UM8))
set H24=g
call ForGroup(C5E,function C1E)
call OF8(C5E)
if GetTriggerEvalCount(t)>LI4*10 then
set i=1
loop
exitwhen i>16
call DestroyEffect(LEff(EC8,"Effect"+I2S(i)))
set i=i+1
endloop
call OF8(g)
call LT7(EC8)
call EA8(t)
endif
set t=null
set g=null
set C5E=null
set O4D=null
return false
endfunction
function C2E takes nothing returns nothing
local integer i=1
local location l=GetSpellTargetLoc()
local real C_E=GetLocationX(l)
local real L4E=GetLocationY(l)
local real x
local real y
local integer L7E=16
local string fx="Abilities\\Spells\\Undead\\Graveyard\\GraveMarker.mdl"
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local group g=OG8()
call S68(AN,C_E,L4E)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function C0E))
call SGroup(W57,"g",g)
call SUnit(W57,"UnitVar",GetTriggerUnit())
call SReal(W57,"x",C_E)
call SReal(W57,"y",L4E)
loop
exitwhen i>L7E
set x=C_E+LJ4*Cos(i*360/ L7E*bj_DEGTORAD)
set y=L4E+LJ4*Sin(i*360/ L7E*bj_DEGTORAD)
call SEff(W57,"Effect"+I2S(i),AddSpecialEffect(fx,x,y))
if i==1 or i==5 or i==9 or i==13 then
set x=C_E+275*Cos(i*360/ L7E*bj_DEGTORAD)
set y=L4E+275*Sin(i*360/ L7E*bj_DEGTORAD)
endif
set i=i+1
endloop
call RemoveLocation(l)
set l=null
set t=null
set g=null
endfunction
function L8E takes nothing returns boolean
if GetSpellAbilityId()=='A0RA'then
call C2E()
endif
return false
endfunction
function EC9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function L8E))
set t=null
endfunction
function L9E takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local unit AC7=LUnit(W57,"DarkRiftFXUnit")
local integer TA8=LInt(W57,"Level")
local integer LDE=90
local integer C77=LInt(W57,"Count")
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='A2MB' then
call KillUnit(AC7)
call EA8(t)
call FlushChildHashtable(R8,(W57))
else
set C77=C77+1
call SInt(W57,"Count",C77)
endif
if TA8==1 then
set LDE=160
elseif TA8==2 then
set LDE='x'
endif
call SetUnitX(AC7,GetUnitX(Z77))
call SetUnitY(AC7,GetUnitY(Z77))
if C77>LDE then
call KillUnit(AC7)
call EA8(t)
call LT7(W57)
elseif C77>30 then
call UnitRemoveAbility(AC7,'Aloc')
call ShowUnit(AC7,true)
call AddPermanentAbility(AC7,'Aloc')
endif
set t=null
set AC7=null
set Z77=null
return false
endfunction
function LEE takes nothing returns nothing
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl",GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit())))
call AddTimedBoolBuff(GetEnumUnit(),"4406",1)
call SetUnitPosition(GetEnumUnit(),H64,HL4)
call PanCameraToTimedForPlayer(GetOwningPlayer(GetEnumUnit()),H64,HL4,0)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl",GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit())))
call MH8(GetEnumUnit())
endfunction
function LFE takes unit Z77,unit m5 returns nothing
local group g=OG8()
call DestroyEffect(AddSpecialEffect("Doodads\\Cinematic\\ShimmeringPortal\\ShimmeringPortal.mdl",GetUnitX(Z77),GetUnitY(Z77)))
call DestroyEffect(AddSpecialEffect("Doodads\\Cinematic\\ShimmeringPortal\\ShimmeringPortal.mdl",GetUnitX(m5),GetUnitY(m5)))
set H64=GetUnitX(m5)
set HL4=GetUnitY(m5)
set H04=Z77
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),475,Condition(function VH8))
call ForGroup(g,function LEE)
call OF8(g)
set g=null
endfunction
function LGE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local unit m5=LUnit(W57,"Target")
call DestroyEffect(LEff(W57,"FX"))
if GetTriggerEventId()==EVENT_UNIT_DEATH or m5==null or O18(m5)then
call EA8(t)
call FlushChildHashtable(R8,(W57))
call UnitRemoveType(m5,UNIT_TYPE_PEON)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A0R0',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2MB',false)
call ShowWarningToPlayer(GetOwningPlayer(Z77),GetObjectName('n03F'))
call XK7("Portal_Main called")
elseif Z77==null or O18(Z77)then
call EA8(t)
call FlushChildHashtable(R8,(W57))
call UnitRemoveType(m5,UNIT_TYPE_PEON)
call ShowWarningToPlayer(GetOwningPlayer(Z77),GetObjectName('n03G'))
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A0R0',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2MB',false)
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A2MB' then
call EA8(t)
call FlushChildHashtable(R8,(W57))
call UnitRemoveType(m5,UNIT_TYPE_PEON)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A0R0',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2MB',false)
endif
else
call EA8(t)
call FlushChildHashtable(R8,(W57))
call UnitRemoveType(m5,UNIT_TYPE_PEON)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A0R0',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2MB',false)
call LFE(Z77,m5)
endif
set t=null
set Z77=null
set m5=null
return false
endfunction
function LHE takes nothing returns boolean
local real d
if IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==false or GetUnitAbilityLevel(GetFilterUnit(),'A04R')>0 or GetOwningPlayer(GetFilterUnit())==Player(15)then
return false
endif
if IsUnitType(GetFilterUnit(),UNIT_TYPE_DEAD)==false and(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)or(HB4>0 and BX9(GetFilterUnit())))then
set d=Z87(HL4,H14,GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()))
if d<H64 then
set H64=d
set H04=GetFilterUnit()
endif
endif
return false
endfunction
function LIE takes unit Z77 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=OG8()
set HB4=GetUnitAbilityLevel(Z77,'A0R0')
set H04=null
set H64=9999
set HL4=x
set H14=y
call GroupEnumUnitsInRange(g,x,y,4000,Condition(function LHE))
call OF8(g)
call RemoveLocation(l)
set l=null
set g=null
return H04
endfunction
function LJE takes unit Z77 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit m5=GetSpellTargetUnit()
local unit u
if m5==null then
set m5=LIE(Z77)
endif
if m5==null then
call ShowWarningToPlayer(GetOwningPlayer(Z77),GetObjectName('n03H'))
return
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A0R0',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2MB',true)
call AddPermanentAbility(Z77,'A2MB')
call TriggerRegisterTimerEvent(t,6-GetUnitAbilityLevel(Z77,'A0R0'),false)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function LGE))
call SEff(W57,"FX",AddSpecialEffectTarget("war3mapImported\\DarkHands.mdl",m5,"overhead"))
call SUnit(W57,"Source",Z77)
call SUnit(W57,"Target",m5)
call UnitAddType(m5,UNIT_TYPE_PEON)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function L9E))
call SInt(W57,"Level",GetUnitAbilityLevel(Z77,'A0R0'))
call SUnit(W57,"Source",Z77)
set u=CreateUnit(GetOwningPlayer(Z77),'h098',GetUnitX(Z77),GetUnitY(Z77),0)
call SUnit(W57,"DarkRiftFXUnit",u)
call ShowUnit(u,false)
set t=null
set m5=null
set u=null
endfunction
function LKE takes nothing returns nothing
local unit X77=GetSpellTargetUnit()
local unit AM7=GetTriggerUnit()
if X77!=null then
if IsUnitAlly(X77,GetOwningPlayer(AM7))==false then
call ZN7(AM7)
call ShowWarningToPlayer(GetOwningPlayer(AM7),GetObjectName('n041'))
elseif GetUnitAbilityLevel(AM7,'A0R0')>0 and BX9(X77)==false then
call ZN7(AM7)
call ShowWarningToPlayer(GetOwningPlayer(AM7),GetObjectName('n041'))
endif
endif
if X77==null then
set X77=LIE(AM7)
endif
if X77==null then
call ZN7(AM7)
call ShowWarningToPlayer(GetOwningPlayer(AM7),GetObjectName('n040'))
endif
set X77=null
set AM7=null
endfunction
function LME takes nothing returns boolean
if GetSpellAbilityId()=='A0R0' then
call LKE()
endif
return false
endfunction
function LNE takes nothing returns boolean
if GetSpellAbilityId()=='A0R0' then
call LJE(GetTriggerUnit())
endif
return false
endfunction
function EA9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function LME))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function LNE))
set t=null
call O28('h094')
call O28('h095')
call O28('h096')
endfunction
function LOE takes nothing returns nothing
call Dmg(LN4,GetEnumUnit(),NormalFire,LM4)
endfunction
function LPE takes nothing returns nothing
call SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)+LM4*.5)
endfunction
function LQE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7=LUnit(W57,"Hero")
local real x=LReal(W57,"x")
local real y=LReal(W57,"y")
local group g=OG8()
local real r1=600
local real r2=600
local unit LRE
set x=GetUnitX(AM7)
set y=GetUnitY(AM7)
call GroupEnumUnitsInRange(g,x,y,r1,Condition(function VK8))
set LRE=FirstOfGroup(g)
call OF8(g)
if LRE==null then
if LBool(W57,"NoCorpse1")and LBool(W57,"NoCorpse2")then
call UnitRemoveAbility(AM7,'A283')
call LT7(W57)
call EA8(t)
else
if LBool(W57,"NoCorpse1")==false then
call SBool(W57,"NoCorpse1",true)
else
call SBool(W57,"NoCorpse2",true)
endif
endif
else
set x=GetUnitX(LRE)
set y=GetUnitY(LRE)
call SBool(W57,"NoCorpse1",false)
call SBool(W57,"NoCorpse2",false)
call LT7(GetHandleId(LRE))
call DestroyEffect(AddSpecialEffect("war3mapImported\\CorpseExplosion.mdx",x,y))
call RemoveUnit(LRE)
set g=OG8()
set H04=AM7
set LN4=AM7
set LM4=20*GetUnitAbilityLevel(AM7,'A288')
call GroupEnumUnitsInRange(g,x,y,r2,Condition(function UM8))
call ForGroup(g,function LOE)
set H04=AM7
call GroupEnumUnitsInRange(g,x,y,r2,Condition(function U08))
call ForGroup(g,function LPE)
call OF8(g)
endif
set g=null
set AM7=null
set LRE=null
set t=null
return false
endfunction
function LSE takes nothing returns nothing
local real x=GetUnitX(GetTriggerUnit())
local real y=GetUnitY(GetTriggerUnit())
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call S68(CK4,x,y)
call TriggerRegisterTimerEvent(t,1.5,true)
call TriggerAddCondition(t,Condition(function LQE))
call AddPermanentAbility(GetTriggerUnit(),'A283')
call SUnit(W57,"Hero",GetTriggerUnit())
call SReal(W57,"x",x)
call SReal(W57,"y",y)
call SBool(W57,"NoCorpse1",false)
call SBool(W57,"NoCorpse2",false)
set t=null
endfunction
function LTE takes nothing returns boolean
if GetSpellAbilityId()=='A288'then
call LSE()
endif
return false
endfunction
function EB9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function LTE))
set t=null
endfunction
function LUE takes nothing returns nothing
endfunction
function LVE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LUnit(W57,"Source"))
local unit AC7=(LUnit(W57,"Caster"))
local group g=OG8()
set H04=Z77
set KG7=GetUnitAbilityLevel(Z77,'A01I')*10+10
call GroupEnumUnitsInRange(g,GetUnitX(AC7),GetUnitY(AC7),475,Condition(function U08))
call ForGroup(g,function LUE)
call OF8(g)
if GetTriggerEvalCount(t)==5 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set AC7=null
return false
endfunction
function LWE takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local integer ML8=GetUnitAbilityLevel(Z77,'A01I')
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',x,y,0)
call TriggerAddCondition(t,Condition(function LVE))
call TriggerRegisterTimerEvent(t,1,true)
call SUnit(W57,"Source",Z77)
call SUnit(W57,"Caster",AC7)
call AddPermanentAbility(AC7,'A262')
call SetUnitAbilityLevel(AC7,'A262',ML8)
call IssuePointOrderById(AC7,852238,x,y)
set Z77=null
set AC7=null
endfunction
function LXE takes nothing returns boolean
if GetSpellAbilityId()=='A01I'then
call LWE()
endif
return false
endfunction
function E39 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function LXE))
set t=null
endfunction
function LYE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,'A24Q')
local integer LZE
local real WAE
local real LAE=3+ML8
if GetTriggerEventId()==EVENT_WIDGET_DEATH or GetTriggerEvalCount(t)>4*LAE then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(X77,'A24Z')
call UnitRemoveAbility(X77,'A250')
call UnitRemoveAbility(X77,'A24X')
call UnitRemoveAbility(X77,'A251')
call UnitRemoveAbility(X77,'A24Y')
call UnitRemoveAbility(X77,'B0EH')
else
set WAE='d'*GetUnitState(X77,UNIT_STATE_LIFE)/ GetUnitState(X77,UNIT_STATE_MAX_LIFE)
if WAE<20 then
set LZE=5
elseif WAE<40 then
set LZE=4
elseif WAE<60 then
set LZE=3
elseif WAE<80 then
set LZE=2
else
set LZE=1
endif
if LZE==1 then
if GetUnitAbilityLevel(X77,'A24Z')==0 then
call UnitRemoveAbility(X77,'A250')
call UnitRemoveAbility(X77,'A24X')
call UnitRemoveAbility(X77,'A251')
call UnitRemoveAbility(X77,'A24Y')
call UnitRemoveAbility(X77,'B0EH')
call UnitAddAbility(X77,'A24Z')
endif
elseif LZE==2 then
if GetUnitAbilityLevel(X77,'A250')==0 then
call UnitRemoveAbility(X77,'A24Z')
call UnitRemoveAbility(X77,'A24X')
call UnitRemoveAbility(X77,'A251')
call UnitRemoveAbility(X77,'A24Y')
call UnitRemoveAbility(X77,'B0EH')
call UnitAddAbility(X77,'A250')
endif
elseif LZE==3 then
if GetUnitAbilityLevel(X77,'A24X')==0 then
call UnitRemoveAbility(X77,'A24Z')
call UnitRemoveAbility(X77,'A250')
call UnitRemoveAbility(X77,'A251')
call UnitRemoveAbility(X77,'A24Y')
call UnitRemoveAbility(X77,'B0EH')
call UnitAddAbility(X77,'A24X')
endif
elseif LZE==4 then
if GetUnitAbilityLevel(X77,'A251')==0 then
call UnitRemoveAbility(X77,'A24Z')
call UnitRemoveAbility(X77,'A250')
call UnitRemoveAbility(X77,'A24X')
call UnitRemoveAbility(X77,'A24Y')
call UnitRemoveAbility(X77,'B0EH')
call UnitAddAbility(X77,'A251')
endif
elseif LZE==5 then
if GetUnitAbilityLevel(X77,'A24Y')==0 then
call UnitRemoveAbility(X77,'A24Z')
call UnitRemoveAbility(X77,'A250')
call UnitRemoveAbility(X77,'A24X')
call UnitRemoveAbility(X77,'A251')
call UnitRemoveAbility(X77,'B0EH')
call UnitAddAbility(X77,'A24Y')
endif
endif
call Dmg(Z77,X77,NormalFire,.01*4*.25*GetUnitState(X77,UNIT_STATE_MAX_LIFE))
if ModuloInteger(GetTriggerEvalCount(t),4)==0 then
call CreateCorpse(GetOwningPlayer(Z77),'ugho',GetUnitX(X77),GetUnitY(X77),0)
endif
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function LBE takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A24Q')
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("effects\\EntanglingBonesTarget.mdx",X77,"chest")))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function LYE))
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A24Z',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A250',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A24X',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A251',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A24Y',false)
set Z77=null
set X77=null
set t=null
endfunction
function LCE takes nothing returns boolean
if GetSpellAbilityId()=='A24Q' and HasLinkin(GetSpellTargetUnit())==false then
call LBE()
endif
return false
endfunction
function E69 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function LCE))
set t=null
endfunction
function L3E takes unit Z77,integer L6E returns nothing
call SaveInteger(R8,(GetHandleId(Z77)),(687),(L6E))
call UnitRemoveAbility(Z77,'A25X')
call UnitRemoveAbility(Z77,'A25Y')
call UnitRemoveAbility(Z77,'A25Z')
call UnitRemoveAbility(Z77,'A25T')
call UnitRemoveAbility(Z77,'A25V')
call UnitRemoveAbility(Z77,'A25U')
call UnitRemoveAbility(Z77,'A25S')
call UnitRemoveAbility(Z77,'A25R')
call UnitRemoveAbility(Z77,'A25W')
call UnitRemoveAbility(Z77,'A260')
call UnitRemoveAbility(Z77,'A26M')
call UnitRemoveAbility(Z77,'A26L')
call UnitRemoveAbility(Z77,'A26G')
call UnitRemoveAbility(Z77,'A26H')
call UnitRemoveAbility(Z77,'A26F')
call UnitRemoveAbility(Z77,'A26E')
call UnitRemoveAbility(Z77,'A256')
call UnitRemoveAbility(Z77,'A26I')
call UnitRemoveAbility(Z77,'A26J')
call UnitRemoveAbility(Z77,'A26K')
call UnitRemoveAbility(Z77,'A26D')
if L6E==0 then
call UnitAddAbility(Z77,'A26M')
endif
if L6E==1 then
call AddPermanentAbility(Z77,'A25X')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A25X',false)
call UnitAddAbility(Z77,'A26L')
elseif L6E==2 then
call AddPermanentAbility(Z77,'A25Y')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A25Y',false)
call UnitAddAbility(Z77,'A26G')
elseif L6E==3 then
call AddPermanentAbility(Z77,'A25Z')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A25Z',false)
call UnitAddAbility(Z77,'A26H')
elseif L6E==4 then
call AddPermanentAbility(Z77,'A25T')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A25T',false)
call UnitAddAbility(Z77,'A26F')
elseif L6E==5 then
call AddPermanentAbility(Z77,'A25V')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A25V',false)
call UnitAddAbility(Z77,'A26E')
elseif L6E==6 then
call AddPermanentAbility(Z77,'A25U')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A25U',false)
call UnitAddAbility(Z77,'A256')
elseif L6E==7 then
call AddPermanentAbility(Z77,'A25S')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A25S',false)
call UnitAddAbility(Z77,'A26I')
elseif L6E==8 then
call AddPermanentAbility(Z77,'A25R')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A25R',false)
call UnitAddAbility(Z77,'A26J')
elseif L6E==9 then
call AddPermanentAbility(Z77,'A25W')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A25W',false)
call UnitAddAbility(Z77,'A26K')
elseif L6E==10 then
call AddPermanentAbility(Z77,'A260')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A260',false)
call UnitAddAbility(Z77,'A26D')
endif
endfunction
function LLE takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer L6E=(LoadInteger(R8,(GetHandleId(Z77)),(687)))
local group g
local unit LRE
local integer ML8=GetUnitAbilityLevel(Z77,'A261')
local integer L1E=2+2*ML8
if L6E<L1E and O18(Z77)==false then
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),925,Condition(function VK8))
set LRE=FirstOfGroup(g)
call OF8(g)
if LRE!=null then
set L6E=L6E+1
call L3E(Z77,L6E)
call T88((LRE),(Z77),'h0D6',"CorpseCollector_FX_Nothing",400)
call RemoveUnit(LRE)
endif
endif
set t=null
set Z77=null
set LRE=null
return false
endfunction
function L0E takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
call TriggerRegisterTimerEvent(t,4,true)
call TriggerAddCondition(t,Condition(function LLE))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=null
set Z77=null
endfunction
function L5E takes nothing returns nothing
call Dmg(LO4,GetEnumUnit(),NormalFire,LP4)
endfunction
function L2E takes unit Z77,integer ML8,real BM7,real BN7,integer L6E,boolean LX9 returns nothing
local group g=OG8()
set LO4=Z77
set LP4=30*L6E
if LX9 then
set LP4=LP4+10*L6E
endif
set H04=Z77
call GroupEnumUnitsInRange(g,BM7,BN7,350,Condition(function UM8))
call ForGroup(g,function L5E)
call OF8(g)
endfunction
function L_E takes unit Z77,real PPD,real PQD returns boolean
local real BM7=(LoadReal(R8,(GetHandleId(Z77)),(690)))
local real BN7=(LoadReal(R8,(GetHandleId(Z77)),(691)))
if BM7==0 and BN7==0 then
return false
endif
if Z87(PPD,PQD,BM7,BN7)<425 then
return true
endif
return false
endfunction
function D4F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer L6E=(LoadInteger(R8,(W57),(34)))
local integer ML8=GetUnitAbilityLevel(Z77,'A261')
local integer i=1
local unit AC7
local real BM7=(LoadReal(R8,(W57),(47)))
local real BN7=(LoadReal(R8,(W57),(48)))
local real x
local real y
local real a=(LoadReal(R8,(W57),(137)))
local boolean LX9=(LoadBoolean(R8,(W57),(688)))
local boolean D7F=(LoadBoolean(R8,(W57),(689)))
local real D8F=(LoadReal(R8,(W57),(549)))
local real D9F=(LoadReal(R8,(W57),(567)))
set D8F=PQ8(D8F+10*Cos(a))
set D9F=PS8(D9F+10*Sin(a))
call SaveReal(R8,(W57),(549),((D8F)*1.))
call SaveReal(R8,(W57),(567),((D9F)*1.))
if LX9==false then
set LX9=L_E(Z77,D8F,D9F)
if LX9 then
call SaveBoolean(R8,(W57),(688),(LX9))
endif
endif
if LX9 and D7F==false then
set D7F=true
call SaveBoolean(R8,(W57),(689),(D7F))
loop
exitwhen i>L6E
set AC7=(LoadUnitHandle(R8,(W57),(393+i)))
call SaveEffectHandle(R8,(W57),(609+i),(AddSpecialEffectTarget("war3mapImported\\CorpseFire.mdx",AC7,"origin")))
set i=i+1
endloop
endif
set i=1
if Z87(D8F,D9F,BM7,BN7)<15 then
loop
exitwhen i>L6E
if LX9 then
call DestroyEffect((LoadEffectHandle(R8,(W57),(609+i))))
endif
call KillUnit((LoadUnitHandle(R8,(W57),(393+i))))
set i=i+1
endloop
call FlushChildHashtable(R8,(W57))
call EA8(t)
call L2E(Z77,ML8,BM7,BN7,L6E,LX9)
else
loop
exitwhen i>L6E
set AC7=(LoadUnitHandle(R8,(W57),(393+i)))
set x=(LoadReal(R8,(W57),(549+i)))
set y=(LoadReal(R8,(W57),(567+i)))
set x=PQ8(x+10*Cos(a))
set y=PS8(y+10*Sin(a))
call SaveReal(R8,(W57),(549+i),((x)*1.))
call SaveReal(R8,(W57),(567+i),((y)*1.))
call SetUnitX(AC7,x)
call SetUnitY(AC7,y)
set i=i+1
endloop
endif
set t=null
set AC7=null
set Z77=null
return false
endfunction
function DDF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real BM7=GetSpellTargetX()
local real BN7=GetSpellTargetY()
local integer ML8=GetUnitAbilityLevel(Z77,'A261')
local integer L6E=(LoadInteger(R8,(GetHandleId(Z77)),(687)))
local integer i=1
local unit AC7
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local real a=YI7(GetUnitX(Z77),GetUnitY(Z77),BM7,BN7)*bj_DEGTORAD
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveInteger(R8,(W57),(34),(L6E))
call SaveReal(R8,(W57),(47),((BM7)*1.))
call SaveReal(R8,(W57),(48),((BN7)*1.))
call SaveReal(R8,(W57),(137),((a)*1.))
call SaveReal(R8,(W57),(549),((x)*1.))
call SaveReal(R8,(W57),(567),((y)*1.))
call SaveBoolean(R8,(W57),(688),(false))
call SaveBoolean(R8,(W57),(689),(false))
loop
exitwhen i>L6E
set AC7=CreateUnit(GetOwningPlayer(Z77),'h0D7',x+GetRandomInt(-200,200),y+GetRandomInt(-200,200),0)
call SaveUnitHandle(R8,(W57),(393+i),(AC7))
call SaveReal(R8,(W57),(549+i),((GetUnitX(AC7))*1.))
call SaveReal(R8,(W57),(567+i),((GetUnitY(AC7))*1.))
set i=i+1
endloop
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function D4F))
call L3E(Z77,0)
set Z77=null
set t=null
set AC7=null
endfunction
function DEF takes nothing returns boolean
if GetSpellAbilityId()=='A261' then
call DDF()
endif
return false
endfunction
function DFF takes nothing returns boolean
if GetLearnedSkill()=='A261' and GetUnitAbilityLevel(GetTriggerUnit(),'A261')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call L0E()
endif
return false
endfunction
function EL9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function DEF))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function DFF))
set t=null
endfunction
function DGF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local unit DHF
if GetTriggerEventId()==EVENT_UNIT_SPELL_FINISH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call KillUnit(AC7)
call UnitApplyTimedLife(AC7,'BTLF',.1)
elseif O18(AC7)then
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
call SaveReal(R8,(W57),(6),((GetUnitX(AC7))*1.))
call SaveReal(R8,(W57),(7),((GetUnitY(AC7))*1.))
if x!=GetUnitX(AC7)or y!=GetUnitY(AC7)then
call UnitRemoveAbility(AC7,'A2L4')
else
call UnitAddAbility(AC7,'A2L4')
endif
endif
return false
endfunction
function DIF takes nothing returns boolean
return GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(KH7)and GetUnitTypeId(GetFilterUnit())=='u01Y'
endfunction
function DJF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'u01Y',GetUnitX(Z77)+'d',GetUnitY(Z77)+'d',0)
local group g
local integer ML8=GetUnitAbilityLevel(Z77,'A2L6')
local real PX9
local unit DKF
local unit DMF
call TriggerRegisterUnitEvent(t,AC7,EVENT_UNIT_SPELL_FINISH)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function DGF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveReal(R8,(W57),(6),((GetUnitX(AC7))*1.))
call SaveReal(R8,(W57),(7),((GetUnitY(AC7))*1.))
call UnitAddAbility(AC7,'A2L4')
call SetUnitAbilityLevel(AC7,'A2L5',GetUnitAbilityLevel(Z77,'A2L6'))
call SaveReal(R8,(GetHandleId(AC7)),(34),(((TimerGetElapsed(E4)))*1.))
set KH7=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,0,0,99999,Condition(function DIF))
if CountUnitsInGroup(g)>ML8+1 then
set DMF=FirstOfGroup(g)
set PX9=(LoadReal(R8,(GetHandleId(DMF)),(34)))
set DKF=DMF
call GroupRemoveUnit(g,DMF)
loop
exitwhen DMF==null
if PX9>(LoadReal(R8,(GetHandleId(DMF)),(34)))then
set PX9=(LoadReal(R8,(GetHandleId(DMF)),(34)))
set DKF=DMF
endif
set DMF=FirstOfGroup(g)
call GroupRemoveUnit(g,DMF)
endloop
call KillUnit(DKF)
endif
call OF8(g)
set g=null
set AC7=null
set Z77=null
set t=null
endfunction
function DNF takes nothing returns boolean
if GetSpellAbilityId()=='A2L6' then
call DJF()
endif
return false
endfunction
function E19 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function DNF))
endfunction
function DOF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer LX9=(LoadInteger(R8,(W57),(34)))
call SaveInteger(R8,(GetHandleId(Z77)),(783),((LoadInteger(R8,(GetHandleId(Z77)),(783)))-LX9))
call FlushChildHashtable(R8,(W57))
call EA8(t)
set Z77=null
set t=null
return false
endfunction
function DPF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit PL9=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'AIcd')
local integer LX9
local integer TD9
if IsUnitInRange(Z77,PL9,900+25)and O18(Z77)==false and IsUnitAlly(Z77,GetOwningPlayer(PL9))==false and GetUnitTypeId(PL9)!='n0F5' and IsUnitIllusion(PL9)==false and XC8(GetUnitTypeId(PL9))==false and GetUnitAbilityLevel(PL9,'A04R')==0 then
set TD9=(LoadInteger(R8,(GetHandleId(Z77)),(783)))
if IsUnitType(PL9,UNIT_TYPE_HERO)then
set LX9=30
else
set LX9=5
endif
set TD9=TD9+LX9
call SaveInteger(R8,(GetHandleId(Z77)),(783),(TD9))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,25+ML8*5,false)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerAddCondition(t,Condition(function DOF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveInteger(R8,(W57),(34),(LX9))
endif
set t=null
set Z77=null
set PL9=null
return false
endfunction
function DQF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer TD9=(LoadInteger(R8,(GetHandleId(Z77)),(783)))
local integer J_E=(LoadInteger(R8,(W57),(238)))
if J_E!=TD9 then
call W78(Z77,TD9)
call SaveInteger(R8,(W57),(238),(TD9))
endif
set t=null
set Z77=null
return false
endfunction
function DRF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function DPF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerAddCondition(t,Condition(function DQF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set Z77=null
set t=null
endfunction
function DSF takes nothing returns boolean
if GetLearnedSkill()=='AIcd' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'AIcd')==1 then
call DRF()
endif
return false
endfunction
function E09 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function DSF))
set t=null
endfunction
function DTF takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'A06K')>0
endfunction
function DUF takes nothing returns nothing
if(GetIssuedOrderId()==852177)then
if(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_USER)then
call AddPermanentAbility(GetTriggerUnit(),'A0AZ')
else
call Y07(.1)
if(GetUnitAbilityLevel(GetTriggerUnit(),'B02T')>0)then
call UnitAddAbility(GetTriggerUnit(),'A0AZ')
endif
endif
elseif(GetIssuedOrderId()==852178)then
if(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_USER)then
call UnitRemoveAbility(GetTriggerUnit(),'A0AZ')
else
call Y07(.1)
if(GetUnitAbilityLevel(GetTriggerUnit(),'B02T')==0)then
call UnitRemoveAbility(GetTriggerUnit(),'A0AZ')
endif
endif
endif
endfunction
function LK8 takes nothing returns nothing
local trigger t=CreateTrigger()
call ky(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function DTF))
call TriggerAddAction(t,function DUF)
set t=null
endfunction
function DVF takes nothing returns nothing
local integer W57=GetHandleId(GetEnumUnit())
if GetTriggerUnit()!=GetEnumUnit()then
call SaveInteger(R8,(W57),(672),((LoadInteger(R8,(W57),(672)))+1))
endif
endfunction
function DWF takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='U00F' and IsUnitIllusion(GetFilterUnit())==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function DXF takes nothing returns boolean
local group g
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and XC8(GetUnitTypeId(GetTriggerUnit()))==false and IsUnitIllusion(GetTriggerUnit())==false then
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),475,Condition(function DWF))
if GetUnitTypeId(GetKillingUnit())=='U00F' then
call GroupAddUnit(g,GetKillingUnit())
endif
call ForGroup(g,function DVF)
call OF8(g)
set g=null
endif
return false
endfunction
function DYF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if GetTriggerEvalCount(t)==1 then
call ShowUnit(Z77,false)
elseif GetTriggerEvalCount(t)>80 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
return false
endfunction
function DZF takes nothing returns boolean
local unit AC7
local unit Z77
local unit PL9
local trigger t
local integer W57
if GetUnitTypeId(GetTriggerUnit())=='U00F' then
set Z77=GetTriggerUnit()
set PL9=GetKillingUnit()
if Z77==PL9 then
set AC7=CreateUnit(GetOwningPlayer(Z77),'h0BB',GetUnitX(Z77),GetUnitY(Z77),GetUnitFacing(Z77))
call SetUnitTimeScale(AC7,.75)
call UnitApplyTimedLife(AC7,'BTLF',1.)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UndeadBlood\\UndeadBloodAbomination.mdl",AC7,"origin"))
set AC7=null
call SetSoundPosition(KP,GetUnitX(Z77),GetUnitY(Z77),50)
call SetSoundVolumeBJ(KP,'d')
call PlaySoundBJ(KP)
call SetSoundPosition(OP,GetUnitX(Z77),GetUnitY(Z77),50)
call SetSoundVolumeBJ(OP,'d')
call PlaySoundBJ(OP)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function DYF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=null
endif
set Z77=null
set PL9=null
endif
return false
endfunction
function DAF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local unit Z77=(LoadUnitHandle(R8,(GetHandleId(t)),(2)))
local integer W57=GetHandleId(Z77)
local integer DBF=(LoadInteger(R8,(W57),(672)))
local integer DCF=(LoadInteger(R8,(W57),(673)))
local integer ML8=GetUnitAbilityLevel(Z77,'A06D')
local integer D3F=R2I(I2R(DBF)*(.5+.5*ML8))
if D3F>DCF then
call ModifyHeroStat(0,Z77,bj_MODIFYMETHOD_ADD,D3F-DCF)
call SaveInteger(R8,(W57),(673),(D3F))
call QM8("+"+I2S(D3F-DCF)+" "+GetObjectName('n0MJ'),3,Z77,.023,0,255,0,230)
endif
set t=null
set Z77=null
return false
endfunction
function D6F takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function DAF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set Z77=null
set t=null
endfunction
function DLF takes nothing returns boolean
if GetLearnedSkill()=='A06D' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A06D')==1 then
call D6F()
endif
return false
endfunction
function D1F takes nothing returns boolean
if GetUnitTypeId(Y7[GetPlayerId(GetTriggerPlayer())])=='U00F' then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,GetObjectName('n09R')+" "+I2S((LoadInteger(R8,(GetHandleId(Y7[GetPlayerId(GetTriggerPlayer())])),(673))))+" "+GetObjectName('n09S'))
endif
return false
endfunction
function LM8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function DLF))
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[1],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-st",true)
call TriggerAddCondition(t,Condition(function D1F))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function DZF))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function DXF))
set t=null
endfunction
function D0F takes unit Z77,unit X77 returns nothing
local unit AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
local unit DHF=CreateUnit(GetOwningPlayer(Z77),'e02A',GetUnitX(X77),GetUnitY(X77),0)
call AddPermanentAbility(AC7,'A0PZ')
call IssueTargetOrderById(AC7,852095,X77)
call UnitApplyTimedLife(AC7,'BTLF',1)
call UnitApplyTimedLife(DHF,'BTLF',1)
set AC7=null
set DHF=null
endfunction
function D5F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer D2F=LInt(EC8,"LinkNumber")
local boolean D_F=LBool(EC8,"FoundTarget")
local unit m5
local unit E4F=LUnit(EC8,"Link"+I2S(D2F))
if D_F then
set m5=LUnit(EC8,"Target")
call SetUnitX(m5,GetUnitX(E4F))
call SetUnitY(m5,GetUnitY(E4F))
endif
call RemoveUnit(E4F)
set D2F=D2F-1
call SInt(EC8,"LinkNumber",D2F)
if D2F==0 then
if D_F and IsUnitInRegion(IF4,m5)then
call PathingFalse5Sec(m5)
endif
call LT7(EC8)
call EA8(t)
endif
set t=null
set m5=null
set E4F=null
return false
endfunction
function E7F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer D2F=LInt(EC8,"LinkNumber")
local integer TA8=LInt(EC8,"Level")
local real l4=LReal(EC8,"Angle")
local unit N28=LUnit(EC8,"Hero")
local trigger E8F=LTrig(EC8,"RetractTrigger")
local integer E9F=GetHandleId(E8F)
local group g
local unit u
local real x
local real y
if D2F<225 then
set D2F=D2F+1
call SInt(EC8,"LinkNumber",D2F)
set x=GetUnitX(N28)+D2F*40*Cos(l4*bj_DEGTORAD)
set y=GetUnitY(N28)+D2F*40*Sin(l4*bj_DEGTORAD)
call SUnit(E9F,"Link"+I2S(D2F),CreateUnit(GetOwningPlayer(N28),'u00H',x,y,l4))
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,'}',Condition(function VF8))
call GroupRemoveUnit(g,N28)
set u=GroupPickRandomUnit(g)
call OF8(g)
if u!=null then
call LT7(EC8)
call EA8(t)
call TriggerRegisterTimerEvent(E8F,.03,true)
call TriggerAddCondition(E8F,Condition(function D5F))
call SInt(E9F,"LinkNumber",D2F)
call SBool(E9F,"FoundTarget",true)
call SUnit(E9F,"Target",u)
if IsUnitEnemy(u,GetOwningPlayer(N28))then
if IsUnitType(u,UNIT_TYPE_HERO)then
call X48("HA_Hits"+I2S(GetPlayerId(GetOwningPlayer(N28))),S74[GetPlayerId(GetOwningPlayer(N28))])
set S74[GetPlayerId(GetOwningPlayer(N28))]=S74[GetPlayerId(GetOwningPlayer(N28))]+1
call AddTimedBoolBuff(N28,"4400",1.5)
endif
set S84[GetPlayerId(GetOwningPlayer(N28))]=S84[GetPlayerId(GetOwningPlayer(N28))]+1
call X48("HA_Total"+I2S(GetPlayerId(GetOwningPlayer(N28))),S84[GetPlayerId(GetOwningPlayer(N28))])
call D0F(N28,u)
call Dmg(N28,u,HeroMagic,200*TA8)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",u,"origin"))
endif
endif
else
call LT7(EC8)
call EA8(t)
set S84[GetPlayerId(GetOwningPlayer(N28))]=S84[GetPlayerId(GetOwningPlayer(N28))]+1
call TriggerRegisterTimerEvent(E8F,.03,true)
call TriggerAddCondition(E8F,Condition(function D5F))
call SInt(E9F,"LinkNumber",D2F)
call SBool(E9F,"FoundTarget",false)
endif
set t=null
set N28=null
set E8F=null
set g=null
set u=null
return false
endfunction
function EDF takes nothing returns nothing
local unit N28=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real l4=YI7(GetUnitX(N28),GetUnitY(N28),GetLocationX(l),GetLocationY(l))
local integer TA8=GetUnitAbilityLevel(N28,'A06I')
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call SUnit(EC8,"Hero",N28)
call SInt(EC8,"Level",TA8)
call SReal(EC8,"Angle",l4*1.)
call SInt(EC8,"LinkNumber",0)
call STrig(EC8,"RetractTrigger",CreateTrigger())
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerAddCondition(t,Condition(function E7F))
call RemoveLocation(l)
set N28=null
set l=null
set t=null
endfunction
function EEF takes nothing returns boolean
if GetSpellAbilityId()=='A06I' then
call EDF()
endif
return false
endfunction
function EFF takes nothing returns boolean
local integer Z2D=S74[GetPlayerId(GetTriggerPlayer())]
local integer D5=S84[GetPlayerId(GetTriggerPlayer())]
if GetUnitTypeId(Y7[GetPlayerId(GetTriggerPlayer())])=='U00F' and D5>0 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,V9,10.,(GetObjectName(('n0EL')))+" "+R2S(I2R(Z2D)/ I2R(D5)*'d')+"% ("+I2S(Z2D)+"/"+I2S(D5)+")")
endif
return false
endfunction
function LN8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function EEF))
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-stats",true)
call TriggerRegisterPlayerChatEvent(t,G8[1],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-st",true)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-st",true)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-st",true)
call TriggerAddCondition(t,Condition(function EFF))
set t=null
endfunction
function EGF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
local integer TA8=LInt(EC8,"Level")
local real P99=(25+50*TA8)+(.75)*GetHeroStr(Z77,true)
local integer P89=LInt(EC8,"Count")
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()=='A1CX')then
call LT7(EC8)
call EA8(t)
endif
elseif GetTriggerEvalCount(t)>4 then
call LT7(EC8)
call EA8(t)
call ZN7(Z77)
else
if TA8>0 then
set P89=P89+1
if(P89<4 and IsUnitType(m5,UNIT_TYPE_HERO))or(P89<8 and IsUnitType(m5,UNIT_TYPE_HERO)==false)then
call SetUnitState(Z77,UNIT_STATE_LIFE,GetUnitState(Z77,UNIT_STATE_LIFE)+P99)
call Dmg(Z77,m5,NormalFire,P99)
endif
call SInt(EC8,"Count",P89)
endif
endif
set t=null
set Z77=null
set m5=null
return false
endfunction
function EHF takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local integer TA8=GetUnitAbilityLevel(Z77,'A1CX')
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_ENDCAST)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function EGF))
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Target",m5)
call SInt(EC8,"Level",TA8)
call SInt(EC8,"Count",0)
call TriggerEvaluate(t)
set t=null
set Z77=null
set m5=null
endfunction
function EIF takes nothing returns boolean
if GetSpellAbilityId()=='A1CX' and HasLinkin(GetSpellTargetUnit())==false then
call EHF()
endif
return false
endfunction
function LO8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function EIF))
set t=null
endfunction
function EJF takes nothing returns boolean
return((GetUnitTypeId(GetSummonedUnit())=='o00L')or(GetUnitTypeId(GetSummonedUnit())=='o00M')or(GetUnitTypeId(GetSummonedUnit())=='o00N')or(GetUnitTypeId(GetSummonedUnit())=='o00O'))
endfunction
function EKF takes nothing returns nothing
endfunction
function EMF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local group g
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set g=OG8()
set H04=AC7
call GroupEnumUnitsInRange(g,GetUnitX(AC7),GetUnitY(AC7),400+300*4+25,Condition(function UM8))
call ForGroup(g,function EKF)
call OF8(g)
set g=null
endif
set t=null
set AC7=null
return false
endfunction
function ENF takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AC7=GetSummonedUnit()
call TriggerRegisterDeathEvent(t,AC7)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function EMF))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveInteger(R8,(W57),(5),(GetUnitAbilityLevel(GetSummoningUnit(),'A09D')))
call SetUnitAbilityLevelSwapped('A08T',GetSummonedUnit(),GetUnitAbilityLevelSwapped('A09D',GetSummoningUnit()))
call SetUnitAbilityLevelSwapped('A0CF',GetSummonedUnit(),GetUnitAbilityLevelSwapped('A09D',GetSummoningUnit()))
call IssueImmediateOrderById(GetSummonedUnit(),852512)
endfunction
function LQ8 takes nothing returns nothing
set Do=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(Do,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(Do,Condition(function EJF))
call TriggerAddAction(Do,function ENF)
endfunction
function EOF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
call SetUnitVertexColor(X77,255,255,255,255)
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set X77=null
return false
endfunction
function A2TD_Extra takes nothing returns nothing
local unit u=LUnit(GetT(),"u")
local integer id=LInt(GetT(),"i")
if not IsUnitType(u,UNIT_TYPE_ETHEREAL)then
call UnitRemoveAbility(u,id)
call TriggerOff()
endif
set u=null
endfunction
function EPF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
local integer ML8=GetUnitAbilityLevel(Z77,'A2TD')
local trigger t
local integer W57
call UnitAddAbility(AC7,'A0CE')
call SetUnitAbilityLevel(AC7,'A0CE',ML8)
call IssueTargetOrderById(AC7,852486,X77)
if GetUnitTypeId(X77)=='n0FJ' or GetUnitTypeId(X77)=='n0FI' or GetUnitTypeId(X77)=='n0F6' or GetUnitTypeId(X77)=='n0FH' then
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1.5+.5*ML8,false)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function EOF))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SetUnitVertexColor(X77,50,255,50,150)
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffect("Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl",GetUnitX(X77),GetUnitY(X77))))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimer(t)
call TriggerAddCondition(t,Condition(function A2TD_Extra))
call SUnit(W57,"u",X77)
if IsUnitEnemy(X77,GetOwningPlayer(Z77))then
call AddPermanentAbility(X77,'AZ1D')
call SInt(W57,"i",'AZ1D')
else
call AddPermanentAbility(X77,'AZ1E')
call SInt(W57,"i",'AZ1E')
endif
set t=null
endif
set Z77=null
set X77=null
set AC7=null
endfunction
function LifeDrainFunc takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST then
call TriggerOff()
elseif GetUnitState(s,UNIT_STATE_MAX_LIFE)-GetUnitState(s,UNIT_STATE_LIFE)<1 then
call SetUnitState(s,UNIT_STATE_MANA,GetUnitState(s,UNIT_STATE_MANA)+LReal(h,"r"))
endif
set s=null
endfunction
function LifeDrainEx takes nothing returns nothing
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
call TriggerRegisterTimer(t)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t,Condition(function LifeDrainFunc))
call SUnit(h,"s",GetTriggerUnit())
if GetSpellAbilityId()=='A02Z' then
call SReal(h,"r",.01*(GetUnitAbilityLevel(GetTriggerUnit(),'A02Z')*60+120))
else
call SReal(h,"r",.01*(GetUnitAbilityLevel(GetTriggerUnit(),'A0CC')*60+60))
endif
set t=null
endfunction
function EQF takes nothing returns boolean
if GetSpellAbilityId()=='A2TD' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST then
if(IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_STRUCTURE)==false and GU8(GetSpellTargetUnit())==false)or GetUnitTypeId(GetSpellTargetUnit())=='n0FJ' or GetUnitTypeId(GetSpellTargetUnit())=='n0FI' or GetUnitTypeId(GetSpellTargetUnit())=='n0F6' or GetUnitTypeId(GetSpellTargetUnit())=='n0FH' then
else
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n0K9'))
endif
else
call EPF()
endif
elseif(GetSpellAbilityId()=='A0CC' or GetSpellAbilityId()=='A02Z')and IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_HERO)and HasLinkin(GetSpellTargetUnit())==false then
call LifeDrainEx()
endif
return false
endfunction
function LR8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function EQF))
set t=null
endfunction
function ERF takes unit Z77,unit X77 returns nothing
local real ESF=20+40*T44
local real ETF=70+30*T44
local real EUF=(ESF+ETF*T74/ 700)*.5
call Dmg(Z77,X77,NormalFire,EUF)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\ChimaeraLightningMissile\\ChimaeraLightningMissile.mdl",X77,"chest"))
endfunction
function EVF takes nothing returns nothing
local unit m5=GetEnumUnit()
local group PBD=t0
local unit Z77=U0
if IsUnitInGroup(m5,PBD)==false then
call GroupAddUnit(PBD,m5)
call ERF(Z77,m5)
endif
set m5=null
set PBD=null
set Z77=null
endfunction
function EWF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit AC7=LUnit(EC8,"Caster")
local group PBD=LGroup(EC8,"AlreadyDamaged")
local effect fx
local integer OUD=GetTriggerEvalCount(t)
local real x
local real x0=GetUnitX(Z77)
local real y
local real y0=GetUnitY(Z77)
local integer i
local integer d
local group g=OG8()
call SetUnitX(AC7,GetUnitX(Z77))
call SetUnitY(AC7,GetUnitY(Z77))
set t0=PBD
set U0=Z77
set T44=GetUnitAbilityLevel(Z77,'A1E7')
if OUD>20 then
set d=21*36+(20-OUD)*36
set T74=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 H04=Z77
call GroupEnumUnitsInRange(g,x,y,'d',Condition(function UV8))
call ForGroup(g,function EVF)
set i=i+1
endloop
else
set d=OUD*36
set T74=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 H04=Z77
call GroupEnumUnitsInRange(g,x,y,'d',Condition(function UV8))
call ForGroup(g,function EVF)
set i=i+1
endloop
endif
call OF8(g)
if OUD==40 then
call KillUnit(AC7)
call OF8(PBD)
call DestroyEffect(LEff(EC8,"FX"))
call LT7(EC8)
call EA8(t)
elseif OUD==20 then
call GroupClear(PBD)
set fx=null
endif
set t=null
set AC7=null
set PBD=null
set Z77=null
set g=null
return false
endfunction
function EXF takes nothing returns nothing
local unit N28=GetTriggerUnit()
local real x=GetUnitX(N28)
local real y=GetUnitY(N28)
local unit AC7=CreateUnit(GetOwningPlayer(N28),'h092',x,y,0)
local integer i=0
local group PBD=OG8()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call SEff(EC8,"FX",AddSpecialEffectTarget("effects\\Lightning_Ball_Tail_FX.mdx",N28,"origin"))
call SGroup(EC8,"AlreadyDamaged",PBD)
call SUnit(EC8,"Source",N28)
call SUnit(EC8,"Caster",AC7)
call TriggerRegisterTimerEvent(t,.06,true)
call TriggerAddCondition(t,Condition(function EWF))
set t=null
set AC7=null
set N28=null
set PBD=null
endfunction
function EYF takes nothing returns boolean
if GetSpellAbilityId()=='A1E7' then
call EXF()
endif
return false
endfunction
function EO9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function EYF))
set t=null
endfunction
function EZF takes integer EAF returns boolean
return EAF!='A09V' and EAF!='A026' and EAF!='A0LZ' and EAF!='A0QN' and EAF!='A0OI' and EAF!='A0DY' and EAF!='A1WB' and EAF!='AHfa' and EAF!='AZ2G'
endfunction
function EBF takes unit ECF,unit Z77,unit m5,integer TA8 returns nothing
local unit AC7=CreateUnit(GetOwningPlayer(ECF),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
call AddPermanentAbility(AC7,'A1AK')
call SetUnitAbilityLevel(AC7,'A1AK',TA8)
call IssueTargetOrderById(AC7,852119,m5)
call AddPermanentAbility(AC7,'A18D')
call SetUnitAbilityLevel(AC7,'A18D',TA8)
call IssueTargetOrderById(AC7,852111,m5)
set AC7=null
endfunction
function E3F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local integer TA8
if GetSpellTargetUnit()==Z77 and EZF(GetSpellAbilityId())and IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(Z77))==false and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)then
set TA8=GetUnitAbilityLevel(Z77,'A1E6')
call EBF(Z77,Z77,GetTriggerUnit(),TA8)
endif
set t=null
set Z77=null
return false
endfunction
function E6F takes unit Z77,boolean SY8 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function E3F))
call SUnit(EC8,"Source",Z77)
if SY8 then
set UW7[GetPlayerId(GetOwningPlayer(Z77))]=t
endif
set Z77=null
set t=null
endfunction
function ELF takes nothing returns boolean
if GetLearnedSkill()=='A1E6' and GetUnitAbilityLevel(GetTriggerUnit(),'A1E6')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call E6F(GetTriggerUnit(),false)
endif
return false
endfunction
function EP9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function ELF))
set t=null
endfunction
function E1F 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 WG8
if d<1 then
call UnitRemoveAbility(u,W0[0])
call UnitRemoveAbility(u,W0[1])
call UnitRemoveAbility(u,W0[2])
call UnitRemoveAbility(u,W0[3])
call UnitRemoveAbility(u,W0[4])
call UnitRemoveAbility(u,W0[5])
call UnitRemoveAbility(u,W0[6])
call UnitRemoveAbility(u,W0[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 WG8=i
set i=0
loop
exitwhen i>WG8
if b[i]==1 then
call AddPermanentAbility(u,W0[i])
else
call UnitRemoveAbility(u,W0[i])
endif
set i=i+1
endloop
endfunction
function E0F 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 WG8
if d<1 then
call UnitRemoveAbility(u,z0[0])
call UnitRemoveAbility(u,z0[1])
call UnitRemoveAbility(u,z0[2])
call UnitRemoveAbility(u,z0[3])
call UnitRemoveAbility(u,z0[4])
call UnitRemoveAbility(u,z0[5])
call UnitRemoveAbility(u,z0[6])
call UnitRemoveAbility(u,z0[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 WG8=i
set i=0
loop
exitwhen i>WG8
if b[i]==1 then
call AddPermanentAbility(u,z0[i])
else
call UnitRemoveAbility(u,z0[i])
endif
set i=i+1
endloop
endfunction
function E5F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
if GetTriggerEventId()==EVENT_UNIT_DEATH then
if GetTriggerUnit()==Z77 then
call E1F(Z77,0)
call SUnit(EC8,"Source",null)
else
call E0F(m5,0)
call SUnit(EC8,"Target",null)
endif
else
if Z77!=null then
call E1F(Z77,0)
endif
if m5!=null then
call E0F(m5,0)
endif
call LT7(EC8)
call EA8(t)
endif
set t=null
set Z77=null
set m5=null
return false
endfunction
function E2F takes unit Z77,unit X77,unit O7D returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
if O7D==null then
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call SUnit(W57,"Source",Z77)
call SUnit(W57,"Target",X77)
elseif O7D==X77 then
call E0F(X77,0)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call SUnit(W57,"Source",Z77)
call SUnit(W57,"Target",null)
else
call E1F(Z77,0)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call SUnit(W57,"Source",null)
call SUnit(W57,"Target",X77)
endif
call TriggerRegisterTimerEvent(t,18,false)
call TriggerAddCondition(t,Condition(function E5F))
set t=null
endfunction
function E_F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local unit X77=LUnit(W57,"Target")
local lightning F4F=EI8(W57,"Light")
local integer ML8=LInt(W57,"Level")
local integer C77=GetTriggerEvalCount(t)
local unit AC7=LUnit(W57,"Caster")
call MoveLightning(F4F,true,GetUnitX(Z77),GetUnitY(Z77),GetUnitX(X77),GetUnitY(X77))
call SetUnitX(AC7,GetUnitX(X77))
call SetUnitY(AC7,GetUnitY(X77))
if Z87(GetUnitX(Z77),GetUnitY(Z77),GetUnitX(X77),GetUnitY(X77))>700 or GetTriggerEventId()==EVENT_UNIT_DEATH then
call DestroyLightning(F4F)
call KillUnit(AC7)
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call E2F(Z77,X77,GetTriggerUnit())
else
call E2F(Z77,X77,null)
endif
call LT7(W57)
call EA8(t)
elseif C77>160 then
call DestroyLightning(F4F)
call KillUnit(AC7)
call E2F(Z77,X77,null)
call LT7(W57)
call EA8(t)
elseif ModuloInteger(C77,20)==0 or C77==1 then
call E1F(Z77,(ML8*7)*R2I(C77/ 20))
call E0F(X77,(ML8*7)*R2I(C77/ 20))
endif
set t=null
set Z77=null
set X77=null
set F4F=null
set AC7=null
return false
endfunction
function F7F takes unit Z77,unit m5,lightning F8F,unit AC7 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=GetUnitAbilityLevel(Z77,'A1DP')
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function E_F))
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Target",m5)
call SInt(EC8,"Level",TA8)
call DX8(EC8,"Light",F8F)
call SUnit(EC8,"Caster",AC7)
set t=null
endfunction
function F9F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local lightning F8F=EI8(EC8,"Light")
local unit AC7=LUnit(EC8,"Caster")
local real FDF=GetUnitX(Z77)
local real FEF=GetUnitY(Z77)
local real KDE=LReal(EC8,"rRealX1")
local real KEE=LReal(EC8,"rRealY1")
local real a=LReal(EC8,"a")
local unit m5=null
local group g=OG8()
set KDE=PQ8(KDE+25*Cos(a))
set KEE=PS8(KEE+25*Sin(a))
call SReal(EC8,"rRealX1",KDE*1.)
call SReal(EC8,"rRealY1",KEE*1.)
call MoveLightning(F8F,true,FDF,FEF,KDE,KEE)
call SetUnitX(AC7,KDE)
call SetUnitY(AC7,KEE)
set H04=Z77
call GroupEnumUnitsInRange(g,KDE,KEE,225,Condition(function VV8))
set m5=FirstOfGroup(g)
call OF8(g)
if m5!=null then
call F7F(Z77,m5,F8F,AC7)
call LT7(EC8)
call EA8(t)
elseif GetTriggerEvalCount(t)>25 or GetTriggerEventId()==EVENT_UNIT_DEATH then
call DestroyLightning(F8F)
call KillUnit(AC7)
call LT7(EC8)
call EA8(t)
endif
set t=null
set Z77=null
set F8F=null
set m5=null
set g=null
set AC7=null
return false
endfunction
function FFF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local trigger t
local integer EC8
local location l
local lightning F8F=AddLightning("CLSB",true,GetUnitX(Z77),GetUnitY(Z77),GetUnitX(Z77),GetUnitY(Z77))
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'h088',GetUnitX(Z77),GetUnitY(Z77),0)
call SetLightningColor(F8F,.3,.5,1,1)
if m5==null then
set l=GetSpellTargetLoc()
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function F9F))
call SUnit(EC8,"Source",Z77)
call DX8(EC8,"Light",F8F)
call SUnit(EC8,"Caster",AC7)
call SReal(EC8,"a",(Atan2(GetLocationY(l)-GetUnitY(Z77),GetLocationX(l)-GetUnitX(Z77)))*1.)
call SReal(EC8,"rRealX1",(GetUnitX(Z77))*1.)
call SReal(EC8,"rRealY1",(GetUnitY(Z77))*1.)
call RemoveLocation(l)
set l=null
set t=null
else
call F7F(Z77,m5,F8F,AC7)
endif
set m5=null
set Z77=null
set l=null
set t=null
set AC7=null
endfunction
function FGF takes nothing returns boolean
if GetSpellAbilityId()=='A1DP' then
call FFF()
endif
return false
endfunction
function EQ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function FGF))
set t=null
set W0[0]='A1DV'
set W0[1]='A1DQ'
set W0[2]='A1DR'
set W0[3]='A1DS'
set W0[4]='A1DT'
set W0[5]='A1DU'
set W0[6]='A1DW'
set W0[7]='A1DX'
set z0[0]='A1E4'
set z0[1]='A1E3'
set z0[2]='A1E2'
set z0[3]='A1E1'
set z0[4]='A1E0'
set z0[5]='A1E5'
set z0[6]='A1DZ'
set z0[7]='A1DY'
endfunction
function FHF takes integer EC8 returns nothing
local integer i=1
local integer FIF=LInt(EC8,"MaxIndex")
local unit m5
local integer QRD
if FIF==0 then
return
endif
loop
exitwhen i>FIF
set QRD=LInt(EC8,"Target_"+I2S(i))
set m5=KH8(QRD)
call KG8(QRD)
call UnitRemoveAbility(m5,n1[0])
call UnitRemoveAbility(m5,n1[1])
call UnitRemoveAbility(m5,n1[2])
call UnitRemoveAbility(m5,n1[3])
call UnitRemoveAbility(m5,n1[4])
call UnitRemoveAbility(m5,n1[5])
set i=i+1
endloop
set m5=null
endfunction
function FJF takes unit m5,integer EC8 returns nothing
local integer QRD=KJ8(m5)
local integer FIF=LInt(EC8,"MaxIndex")
set FIF=FIF+1
call SInt(EC8,"MaxIndex",FIF)
call SInt(EC8,"Target_"+I2S(FIF),QRD)
endfunction
function FKF takes unit u returns integer
return GetUnitAbilityLevel(u,n1[0])*1+GetUnitAbilityLevel(u,n1[1])*2+GetUnitAbilityLevel(u,n1[2])*4+GetUnitAbilityLevel(u,n1[3])*8+GetUnitAbilityLevel(u,n1[4])*16
endfunction
function FMF 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 WG8
if d<1 then
call UnitRemoveAbility(u,n1[0])
call UnitRemoveAbility(u,n1[1])
call UnitRemoveAbility(u,n1[2])
call UnitRemoveAbility(u,n1[3])
call UnitRemoveAbility(u,n1[4])
call UnitRemoveAbility(u,n1[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 WG8=i
set i=0
loop
exitwhen i>WG8
if b[i]==1 then
call AddPermanentAbility(u,n1[i])
else
call UnitRemoveAbility(u,n1[i])
endif
set i=i+1
endloop
endfunction
function FNF takes unit u,integer d returns nothing
if IsUnitType(u,UNIT_TYPE_STRUCTURE)==false then
call FMF(u,d+FKF(u))
call FJF(u,TD4)
endif
endfunction
function FOF takes unit Z77,unit AC7,unit X77,integer ML8 returns nothing
call IssueTargetOrderById(AC7,852119,X77)
call W48(Z77,X77,HeroNormal,(50+25*ML8)/ 2.,.3)
call FNF(X77,1)
endfunction
function FPF takes nothing returns boolean
if(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04))and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false))and GetUnitTypeId(GetFilterUnit())!='n00L' then
if GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)<T94 then
set T94=GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)
set T84=GetFilterUnit()
endif
endif
return false
endfunction
function FQF takes nothing returns boolean
if(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04))and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and O18(GetFilterUnit())==false))and GetUnitTypeId(GetFilterUnit())!='emow' and GetUnitTypeId(GetFilterUnit())!='uzig' and GetUnitTypeId(GetFilterUnit())!='n00L' then
if GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)<T94 then
set T94=GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)
set T84=GetFilterUnit()
endif
endif
return false
endfunction
function FRF takes unit Z77,unit AC7,integer TA8 returns nothing
local group g=OG8()
set T84=null
set T94=999999
set Z0=30+30*TA8
set v1=Z77
set H04=Z77
if GetUnitAbilityLevel(Z77,'A1UV')>0 then
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),525,Condition(function FQF))
else
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),525,Condition(function FPF))
endif
call OF8(g)
if T84!=null then
call FOF(Z77,AC7,T84,TA8)
endif
set g=null
endfunction
function FSF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local unit AC7=LUnit(W57,"Caster")
local integer ML8=LInt(W57,"Level")
local integer C77=GetTriggerEvalCount(t)
local real LZE
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call FHF(W57)
call LT7(W57)
call EA8(t)
if GetTriggerUnit()==Z77 then
call KillUnit(AC7)
endif
else
if GetUnitAbilityLevel(Z77,'A1UV')>0 then
if ML8==1 then
set LZE=.55
elseif ML8==2 then
set LZE=.45
else
set LZE=.35
endif
else
if ML8==1 then
set LZE=.7
elseif ML8==2 then
set LZE=.6
else
set LZE=.5
endif
endif
set LZE=LZE/ KI7
if ModuloInteger(C77,R2I(LZE))==0 or C77==1 then
set TD4=W57
call FRF(Z77,AC7,ML8)
endif
call SetUnitX(AC7,GetUnitX(Z77))
call SetUnitY(AC7,GetUnitY(Z77))
endif
set t=null
set Z77=null
set AC7=null
return false
endfunction
function FTF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A1AO')
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'h081',GetUnitX(Z77),GetUnitY(Z77),0)
if ML8==0 then
set ML8=GetUnitAbilityLevel(Z77,'A1UV')
endif
call UnitApplyTimedLife(AC7,'BTLF',30)
call SetUnitAbilityLevel(AC7,'A1DJ',ML8)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,AC7,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,KI7,true)
call TriggerAddCondition(t,Condition(function FSF))
call SUnit(W57,"Caster",AC7)
call SUnit(W57,"Source",Z77)
call SInt(W57,"Level",ML8)
set Z77=null
set t=null
set AC7=null
endfunction
function FUF takes nothing returns boolean
if GetSpellAbilityId()=='A1AO' or GetSpellAbilityId()=='A1UV' then
call FTF()
endif
return false
endfunction
function ER9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function FUF))
set t=null
set n1[0]='A1DK'
set n1[1]='A1DL'
set n1[2]='A1DN'
set n1[3]='A1DM'
set n1[4]='A1DO'
endfunction
function FVF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local integer FWF=GetTriggerEvalCount(t)
local real y=(FWF-13)*(FWF-13)
if FWF<26 then
if H7E(N28)==false then
call SetUnitFlyHeight(N28,375-y,0)
endif
else
call PauseUnit(N28,false)
if H7E(N28)==false then
call SetUnitFlyHeight(N28,GetUnitDefaultFlyHeight(N28),0)
endif
call Dmg(LUnit(EC8,"Source"),N28,NormalFire,LReal(EC8,"Damage"))
call Stun(LUnit(EC8,"Source"),N28,LReal(EC8,"Duration"))
call LT7(EC8)
call EA8(t)
endif
set t=null
set N28=null
return false
endfunction
function FXF takes unit N28,unit Z77,real Hk,real FYF,real FZF returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call PauseUnit(N28,true)
if H7E(N28)==false then
call UnitAddAbility(N28,'Amrf')
call UnitRemoveAbility(N28,'Amrf')
endif
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl",GetUnitX(N28),GetUnitY(N28)))
call SUnit(EC8,"Hero",N28)
call SUnit(EC8,"Source",Z77)
call SReal(EC8,"Damage",FYF)
call SReal(EC8,"Duration",Hk)
call TriggerRegisterTimerEvent(t,.02/ .52*FZF,true)
call TriggerAddCondition(t,Condition(function FVF))
set t=null
endfunction
function FAF takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),H24)==false and GU8(GetEnumUnit())==false and LState(GetEnumUnit(),"Omnislashing")==false then
call GroupAddUnit(H24,GetEnumUnit())
call FXF(GetEnumUnit(),H04,HL4,H64,H14)
endif
endfunction
function FBF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local real FYF=LReal(EC8,"damage")
local real Hk=LReal(EC8,"duration")
local real x1=LReal(EC8,"x1")
local real y1=LReal(EC8,"y1")
local real x2=LReal(EC8,"x2")
local real y2=LReal(EC8,"y2")
local real w=LReal(EC8,"w")
local real FCF=LReal(EC8,"TempReal")
local real a=Atan2(y2-y1,x2-x1)
local group g=LGroup(EC8,"g")
local group F3F=OG8()
local real FZF=FCF*.0625
local real F6F=LReal(EC8,"LastFX_x")
local real FLF=LReal(EC8,"LastFX_y")
local real F1F=LReal(EC8,"FX_Interval")
local real F0F=LReal(EC8,"airtime")
if FZF>Z87(x1,y1,x2,y2)then
set x1=x2
set y1=y2
else
set x1=x1+FZF*Cos(a)
set y1=y1+FZF*Sin(a)
endif
set H04=Z77
set H64=FYF
set HL4=Hk
set H14=F0F
set H24=g
call GroupEnumUnitsInRange(F3F,x1,y1,w,Condition(function UM8))
call ForGroup(F3F,function FAF)
call OF8(F3F)
if Z87(x1,y1,F6F,FLF)>=F1F then
call SReal(EC8,"LastFX_x",x1)
call SReal(EC8,"LastFX_y",y1)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\Impale\\ImpaleMissTarget.mdl",x1,y1))
endif
call SReal(EC8,"x1",x1)
call SReal(EC8,"y1",y1)
if x1==x2 and y1==y2 then
if LBool(EC8,"destroyGroup")then
call OF8(g)
endif
call LT7(EC8)
call EA8(t)
endif
set g=null
set F3F=null
set Z77=null
set t=null
return false
endfunction
function F5F takes real F2F,real F_F returns integer
if F2F/ F_F-R2I(F2F/ F_F)>=.5 then
return R2I(F2F/ F_F)+1
endif
return R2I(F2F/ F_F)
endfunction
function G4F takes unit Z77,unit m5,real FYF,real Hk,real F0F,real x1,real y1,real x2,real y2,real w,group G7F,boolean G8F,real FCF returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local real G9F=Z87(x1,y1,x2,y2)
local integer GDF=F5F(G9F,ON)
local real F1F=G9F/ GDF
local group g
call SUnit(EC8,"Source",Z77)
call SReal(EC8,"damage",FYF)
call SReal(EC8,"duration",Hk)
call SReal(EC8,"airtime",F0F)
call SReal(EC8,"x1",x1)
call SReal(EC8,"y1",y1)
call SReal(EC8,"x2",x2)
call SReal(EC8,"y2",y2)
call SReal(EC8,"w",w)
call SReal(EC8,"TempReal",FCF)
if G7F==null then
set g=OG8()
if m5!=null and IsUnitIllusion(m5)==false then
call GroupAddUnit(g,m5)
endif
call SGroup(EC8,"g",g)
call SBool(EC8,"destroyGroup",G8F)
else
call SGroup(EC8,"g",G7F)
call SBool(EC8,"destroyGroup",G8F)
endif
call SReal(EC8,"FX_Interval",F1F)
call SReal(EC8,"LastFX_x",x1)
call SReal(EC8,"LastFX_y",y1)
call TriggerRegisterTimerEvent(t,.0625,true)
call TriggerAddCondition(t,Condition(function FBF))
set t=null
set g=null
endfunction
function GEF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
call SetUnitPosition(N28,x,y)
call SetUnitAnimation(N28,"morph ALTERNATE")
call LT7(EC8)
call EA8(t)
set t=null
set N28=null
return false
endfunction
function GFF takes nothing returns nothing
local unit N28=GetTriggerUnit()
local integer TA8=GetUnitAbilityLevel(N28,'A06O')
local location l
local real GGF
local real x=GetUnitX(N28)
local real y=GetUnitY(N28)
local real GHF
local real GIF
local real GJF
local real GKF
local real CasterX
local real CasterY
local integer BurrowstrikeTempInt
local unit oA
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local real P99
local real Hk=1.65
local unit m5=null
if TA8==1 then
set P99='d'
elseif TA8==2 then
set P99=160
elseif TA8==3 then
set P99=220
elseif TA8==4 then
set P99=280
endif
if GetSpellTargetUnit()!=null then
set l=GetUnitLoc(GetSpellTargetUnit())
else
set l=GetSpellTargetLoc()
endif
set GHF=GetLocationX(l)
set GIF=GetLocationY(l)
call RemoveLocation(l)
set GGF=YI7(x,y,GHF,GIF)
call SUnit(EC8,"Hero",N28)
call SReal(EC8,"x",GHF)
call SReal(EC8,"y",GIF)
call TriggerRegisterTimerEvent(t,Z87(x,y,GHF,GIF)/ 2000,false)
call TriggerAddCondition(t,Condition(function GEF))
if Z87(x,y,GHF,GIF)<150 then
set GHF=x+150*Cos(GGF*bj_DEGTORAD)
set GIF=y+150*Sin(GGF*bj_DEGTORAD)
endif
if GetSpellTargetUnit()!=null and HasLinkin(GetSpellTargetUnit())then
set m5=GetSpellTargetUnit()
endif
call G4F(N28,m5,P99,Hk,.52,x,y,GHF,GIF,175,null,true,1600)
set oA=null
set l=null
set N28=null
set t=null
set m5=null
endfunction
function GMF takes nothing returns boolean
if GetSpellAbilityId()=='A06O'then
call GFF()
endif
return false
endfunction
function LS8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function GMF))
set t=null
endfunction
function GNF takes nothing returns nothing
call Dmg(e0,GetEnumUnit(),NormalFire,'n')
if GetPlayerController(GetOwningPlayer(o0))==MAP_CONTROL_COMPUTER then
call UnitAddAbility(o0,'A17B')
endif
call IssueTargetOrderById(o0,852075,GetEnumUnit())
endfunction
function GOF takes unit Z77,real x,real y,integer TA8,integer GPF returns nothing
local group g=OG8()
local real r
local string fx
if GPF==8 then
set r=675
elseif GPF==9 then
set r=700
elseif GPF==10 then
set r=725
else
set r=250+50*GPF
endif
if GPF<4 then
set fx=ER7
elseif GPF<8 then
set fx=ES7
else
set fx=ET7
endif
call DestroyEffect(AddSpecialEffect(fx,x,y))
set H04=Z77
set e0=Z77
set o0=v0[GetPlayerId(GetOwningPlayer(Z77))]
call GroupEnumUnitsInRange(g,x,y,r,Condition(function UM8))
call ForGroup(g,function GNF)
call OF8(g)
call nm(.03,false,x,y,150+'d'*GPF,150+'d'*GPF,72,.03,512)
set g=null
endfunction
function GQF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local player p=ED8(EC8,"p")
local unit N28=LUnit(EC8,"Hero")
local real GRF=LReal(EC8,"LastX")
local real GSF=LReal(EC8,"LastY")
local boolean C7D=LBool(EC8,"Scepter")
local integer TA8=LInt(EC8,"Level")
local integer GPF=LInt(EC8,"Iteration")
local integer GTF=4+TA8*2
local real x=GRF
local real y=GSF
if C7D then
set GTF=GTF+2
endif
if GPF>GTF then
call LT7(EC8)
call EA8(t)
else
if N28!=null and O18(N28)==false then
set x=GetUnitX(N28)
set y=GetUnitY(N28)
endif
call GOF(N28,x,y,TA8,GPF)
call SInt(EC8,"Iteration",GPF+1)
call SReal(EC8,"LastX",(x)*1.)
call SReal(EC8,"LastY",(y)*1.)
endif
set t=null
set p=null
set N28=null
return false
endfunction
function GUF takes nothing returns nothing
local unit N28=GetTriggerUnit()
local player p=GetOwningPlayer(N28)
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=GetUnitAbilityLevel(N28,'A06R')
local boolean C7D=false
if TA8==0 then
set C7D=true
set TA8=GetUnitAbilityLevel(N28,'A1B4')
endif
if IsJWPlayer(p)then
set v0[GetPlayerId(p)]=CreateUnit(N8[0],'e00E',GetUnitX(N28),GetUnitY(N28),0)
else
set v0[GetPlayerId(p)]=CreateUnit(G8[0],'e00E',GetUnitX(N28),GetUnitY(N28),0)
endif
call AddPermanentAbility(v0[GetPlayerId(p)],'A17B')
call SUnit(EC8,"Hero",N28)
call DA8(EC8,"p",GetOwningPlayer(N28))
call SReal(EC8,"LastX",(GetUnitX(N28))*1.)
call SReal(EC8,"LastY",(GetUnitY(N28))*1.)
call SInt(EC8,"Level",TA8)
call SInt(EC8,"Iteration",2)
call SBool(EC8,"Scepter",C7D)
call TriggerRegisterTimerEvent(t,.35,true)
call TriggerAddCondition(t,Condition(function GQF))
call GOF(N28,GetUnitX(N28),GetUnitY(N28),TA8,1)
set N28=null
set p=null
set t=null
endfunction
function GVF takes nothing returns boolean
if GetSpellAbilityId()=='A06R' or GetSpellAbilityId()=='A1B4' then
call GUF()
endif
return false
endfunction
function LT8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(t,Condition(function GVF))
call PU8('A17B')
set t=null
endfunction
function GWF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7=(LoadUnitHandle(R8,(W57),(14)))
if((LoadInteger(R8,(GetHandleId((AM7))),((4299))))==1)==false then
call UnitRemoveAbility(AM7,'B04R')
endif
call RemoveUnit((LoadUnitHandle(R8,(W57),(379))))
call RemoveUnit((LoadUnitHandle(R8,(W57),(380))))
call RemoveUnit((LoadUnitHandle(R8,(W57),(381))))
call RemoveUnit((LoadUnitHandle(R8,(W57),(382))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set AM7=null
return false
endfunction
function GXF takes unit AM7,integer ML8,unit GYF,unit GZF,unit GAF,unit GBF returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local real VL8
set VL8=1.5
call SaveInteger(R8,(GetHandleId((AM7))),((4299)),(2))
call TriggerRegisterTimerEvent(t,VL8,false)
call TriggerAddCondition(t,Condition(function GWF))
call SaveUnitHandle(R8,(W57),(14),(AM7))
call SaveUnitHandle(R8,(W57),(379),(GYF))
call SaveUnitHandle(R8,(W57),(380),(GZF))
call SaveUnitHandle(R8,(W57),(381),(GAF))
call SaveUnitHandle(R8,(W57),(382),(GBF))
set t=null
endfunction
function GCF takes nothing returns boolean
if(IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))then
call Dmg(SZ7,GetFilterUnit(),NormalFire,SY7)
endif
return false
endfunction
function G3F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7=(LoadUnitHandle(R8,(W57),(14)))
local unit GYF=(LoadUnitHandle(R8,(W57),(379)))
local unit GZF=(LoadUnitHandle(R8,(W57),(380)))
local unit GAF=(LoadUnitHandle(R8,(W57),(381)))
local unit GBF=(LoadUnitHandle(R8,(W57),(382)))
local integer ML8=GetUnitAbilityLevel(AM7,'A0H0')
local integer C77=GetTriggerEvalCount(t)
local group g
local integer CW7=550
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST or C77>ML8*20/ .5 then
call GXF(AM7,ML8,GYF,GZF,GAF,GBF)
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set g=OG8()
set H04=AM7
set SZ7=AM7
set SY7=ML8*25*.5
call GroupEnumUnitsInRange(g,GetUnitX(AM7),GetUnitY(AM7),CW7,Condition(function GCF))
call OF8(g)
endif
set t=null
set AM7=null
set GYF=null
set GZF=null
set GAF=null
set GBF=null
set g=null
return false
endfunction
function G6F takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit GYF=CreateUnit(GetOwningPlayer(AM7),'e00Q',GetUnitX(AM7)+150,GetUnitY(AM7)+150,0)
local unit GZF=CreateUnit(GetOwningPlayer(AM7),'e00Q',GetUnitX(AM7)+150,GetUnitY(AM7)-150,0)
local unit GAF=CreateUnit(GetOwningPlayer(AM7),'e00Q',GetUnitX(AM7)-150,GetUnitY(AM7)+150,0)
local unit GBF=CreateUnit(GetOwningPlayer(AM7),'e00Q',GetUnitX(AM7)-150,GetUnitY(AM7)-150,0)
local integer ML8=GetUnitAbilityLevel(AM7,'A0H0')
local unit AC7=CreateUnit(GetOwningPlayer(AM7),'e00E',GetUnitX(AM7),GetUnitY(AM7),0)
call SaveInteger(R8,(GetHandleId((AM7))),((4299)),(1))
call AddPermanentAbility(AC7,'A0HO')
call SetUnitAbilityLevel(AC7,'A0HO',ML8)
call IssueTargetOrderById(AC7,852069,AM7)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t,Condition(function G3F))
call SaveUnitHandle(R8,(W57),(14),(AM7))
call SaveUnitHandle(R8,(W57),(379),(GYF))
call SaveUnitHandle(R8,(W57),(380),(GZF))
call SaveUnitHandle(R8,(W57),(381),(GAF))
call SaveUnitHandle(R8,(W57),(382),(GBF))
call SetUnitTimeScale(GYF,0)
call SetUnitTimeScale(GZF,0)
call SetUnitTimeScale(GAF,0)
call SetUnitTimeScale(GBF,0)
set t=null
set AM7=null
set AC7=null
set GYF=null
set GZF=null
set GAF=null
set GBF=null
endfunction
function GLF takes nothing returns boolean
if GetSpellAbilityId()=='A0H0' then
call G6F()
endif
return false
endfunction
function LU8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function GLF))
set t=null
endfunction
function G1F takes nothing returns nothing
call Dmg(m0,GetEnumUnit(),HeroNormal,50*M0)
endfunction
function G0F takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',x,y,0)
local group g=OG8()
local integer TA8=GetUnitAbilityLevel(Z77,'A29K')
call AddPermanentAbility(AC7,'A0M9')
call SetUnitAbilityLevel(AC7,'A0M9',TA8)
call IssueImmediateOrderById(AC7,852096)
call AddPermanentAbility(AC7,'A01W')
call SetUnitAbilityLevel(AC7,'A01W',TA8)
call IssueImmediateOrderById(AC7,852127)
set m0=Z77
set M0=TA8
call GroupEnumUnitsInRange(g,x,y,350+25,Condition(function UB8))
call ForGroup(g,function G1F)
call OF8(g)
set Z77=null
set AC7=null
set g=null
endfunction
function G5F takes nothing returns boolean
if GetSpellAbilityId()=='A29K' then
call G0F()
endif
return false
endfunction
function LV8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function G5F))
set t=null
endfunction
function G2F takes unit Z77,unit X77 returns nothing
local integer ML8=GetUnitAbilityLevel(Z77,'A0JJ')
local real P08=40+20*ML8
if GetUnitAbilityLevel(X77,'A04R')==0 then
call Dmg(Z77,X77,HeroNormal,P08)
endif
endfunction
function G_F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer V_8=(LoadInteger(R8,(W57),(30)))
local unit X77=KH8(V_8)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 and GetEventDamage()>0 and GetEventDamage()<=.02 and GetUnitAbilityLevel(X77,'B0GG')>0 then
call DisableTrigger(t)
call G2F(Z77,X77)
call KG8(V_8)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
else
call KG8(V_8)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function H4F takes nothing returns nothing
local trigger t=CreateTrigger()
local unit X77=GetTriggerUnit()
local unit Z77=GetAttacker()
local integer W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,1,false)
call TriggerAddCondition(t,Condition(function G_F))
call SaveInteger(R8,(W57),(30),(KJ8(X77)))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set X77=null
set Z77=null
set t=null
endfunction
function H7F takes nothing returns nothing
local unit Z77=GetAttacker()
if((LoadInteger(R8,(GetHandleId((Z77))),((4274))))==1)==false then
call AddTimedBoolBuff(Z77,"4274",.1)
call H4F()
endif
endfunction
function H8F takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),'A0JJ')>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(R8,(GetHandleId(GetTriggeringTrigger())),(14)))and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))then
call H7F()
endif
return false
endfunction
function H9F takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function H8F))
call SaveUnitHandle(R8,(GetHandleId(t)),(14),(GetTriggerUnit()))
set t=null
endfunction
function HDF takes nothing returns boolean
if GetLearnedSkill()=='A0JJ' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A0JJ')==1 then
call H9F()
endif
return false
endfunction
function LW8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function HDF))
set t=null
endfunction
function HEF takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"UnitVar")
local unit HFF=LUnit(EC8,"Owner")
local unit AC7
local real TL8=LReal(EC8,"Duration")
local integer TA8=GetUnitAbilityLevel(HFF,('A0HW'))
local real HGF=LReal(EC8,"x")
local real HHF=LReal(EC8,"y")
local real X0D=GetUnitX(N28)
local real X5D=GetUnitY(N28)
if(X0D-HGF)*(X0D-HGF)+(X5D-HHF)*(X5D-HHF)>900 then
set AC7=CreateUnit(GetOwningPlayer(HFF),('h002'),GetUnitX(N28),GetUnitY(N28),0)
call SetUnitAbilityLevel(AC7,('A0I2'),TA8)
call SetUnitAbilityLevel(AC7,('A0HY'),TA8)
call UnitApplyTimedLife(AC7,'BTLF',7)
call SReal(EC8,"x",(X0D)*1.)
call SReal(EC8,"y",(X5D)*1.)
endif
set TL8=TL8+.2
call SReal(EC8,"Duration",(TL8)*1.)
if TL8>7 or GetUnitState(N28,UNIT_STATE_LIFE)<1 then
call PauseTimer(t)
call LT7(EC8)
endif
set t=null
set N28=null
set HFF=null
set AC7=null
endfunction
function HIF takes nothing returns nothing
local unit m5=GetEnumUnit()
local sound SL8
local timer t
local integer EC8
call UnitDamageTarget(W8,m5,Y8,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call GroupAddUnit(C8,m5)
if IsUnitType(m5,UNIT_TYPE_HERO)then
set t=CreateTimer()
set EC8=GetHandleId(t)
set SL8=CreateSound("Sounds\\Spectral Dagger.mp3",false,true,true,10,10,"DefaultEAXON")
call SetSoundPosition(SL8,GetUnitX(m5),GetUnitY(m5),0)
call SetSoundDistanceCutoff(SL8,700)
call StartSound(SL8)
call KillSoundWhenDone(SL8)
call SUnit(EC8,"UnitVar",m5)
call SUnit(EC8,"Owner",W8)
call SReal(EC8,"x",(GetUnitX(m5))*1.)
call SReal(EC8,"y",(GetUnitY(m5))*1.)
call TimerStart(t,.2,true,function HEF)
endif
set m5=null
set t=null
set SL8=null
endfunction
function HJF takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(W8))and IsUnitInGroup(GetFilterUnit(),C8)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false
endfunction
function HKF takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer EC8=GetHandleId(t)
local group PBD=LGroup(EC8,"AlreadyDamaged")
local group XS8=OG8()
local boolexpr QIE=Condition(function HJF)
local unit N28=LUnit(EC8,"Hero")
local unit VA8=LUnit(EC8,"Projectile")
local integer QRD=LInt(EC8,"TargetIndex")
local unit m5=KH8(QRD)
local real Y5=GetUnitX(m5)
local real Z5=GetUnitY(m5)
local real t5=GetUnitX(VA8)
local real w5=GetUnitY(VA8)
local real l4=Atan2(Z5-w5,Y5-t5)
local real X0D=PQ8(GetUnitX(VA8)+30*Cos(l4))
local real X5D=PS8(GetUnitY(VA8)+30*Sin(l4))
local unit AC7
local integer TA8=GetUnitAbilityLevel(N28,('A0HW'))
if LBool(EC8,"TrailNext")then
call SBool(EC8,"TrailNext",false)
set AC7=CreateUnit(GetOwningPlayer(N28),('h002'),t5,w5,0)
call SetUnitAbilityLevel(AC7,('A0I2'),TA8)
call SetUnitAbilityLevel(AC7,('A0HY'),TA8)
call UnitApplyTimedLife(AC7,'BTLF',12)
else
call SBool(EC8,"TrailNext",true)
endif
call SetUnitX(VA8,X0D)
call SetUnitY(VA8,X5D)
call SetUnitFacing(VA8,l4*bj_RADTODEG)
set C8=PBD
set W8=N28
set Y8=50*GetUnitAbilityLevel(N28,('A0HW'))
call GroupEnumUnitsInRange(XS8,X0D,X5D,150,QIE)
call ForGroup(XS8,function HIF)
call OF8(XS8)
if(X0D-Y5)*(X0D-Y5)+(X5D-Z5)*(X5D-Z5)<1600 then
call PauseTimer(t)
call KG8(QRD)
call LT7(EC8)
call KillUnit(VA8)
call OF8(PBD)
endif
set t=null
set PBD=null
set XS8=null
call DestroyBoolExpr(QIE)
set QIE=null
set N28=null
set VA8=null
set m5=null
set AC7=null
endfunction
function HMF takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer EC8=GetHandleId(t)
local group PBD=LGroup(EC8,"AlreadyDamaged")
local group XS8=OG8()
local boolexpr QIE=Condition(function HJF)
local unit N28=LUnit(EC8,"Hero")
local unit VA8=LUnit(EC8,"Projectile")
local real Y5=LReal(EC8,"TargetX")
local real Z5=LReal(EC8,"TargetY")
local real t5=GetUnitX(VA8)
local real w5=GetUnitY(VA8)
local real l4=LReal(EC8,"Angle")
local real X0D=PQ8(GetUnitX(VA8)+30*Cos(l4))
local real X5D=PS8(GetUnitY(VA8)+30*Sin(l4))
local unit AC7
local integer TA8=GetUnitAbilityLevel(N28,('A0HW'))
if LBool(EC8,"TrailNext")then
call SBool(EC8,"TrailNext",false)
set AC7=CreateUnit(GetOwningPlayer(N28),('h002'),t5,w5,0)
call SetUnitAbilityLevel(AC7,('A0I2'),TA8)
call SetUnitAbilityLevel(AC7,('A0HY'),TA8)
call UnitApplyTimedLife(AC7,'BTLF',12)
else
call SBool(EC8,"TrailNext",true)
endif
call SetUnitX(VA8,X0D)
call SetUnitY(VA8,X5D)
set C8=PBD
set W8=N28
set Y8=50*GetUnitAbilityLevel(N28,('A0HW'))
call GroupEnumUnitsInRange(XS8,X0D,X5D,150,QIE)
call ForGroup(XS8,function HIF)
call OF8(XS8)
if(X0D-Y5)*(X0D-Y5)+(X5D-Z5)*(X5D-Z5)<1600 then
call PauseTimer(t)
call LT7(EC8)
call KillUnit(VA8)
call OF8(PBD)
endif
set t=null
set PBD=null
set XS8=null
call DestroyBoolExpr(QIE)
set QIE=null
set N28=null
set VA8=null
set AC7=null
endfunction
function HNF takes unit N28,integer D5 returns boolean
return(GetItemTypeId(UnitItemInSlot(N28,D5))=='pspd')or(GetItemTypeId(UnitItemInSlot(N28,D5))=='oflg')
endfunction
function HOF takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local real TL8=LReal(EC8,"Duration")
local integer T8=0
loop
exitwhen T8>5
if HNF(N28,T8)then
if GetUnitAbilityLevel(N28,('B047'))==0 then
call SetItemDropOnDeath(UnitItemInSlot(N28,T8),true)
if GetItemTypeId(UnitItemInSlot(N28,T8))=='oflg' then
call SetItemDroppable(UnitItemInSlot(N28,T8),true)
endif
else
call SetItemDropOnDeath(UnitItemInSlot(N28,T8),false)
if GetItemTypeId(UnitItemInSlot(N28,T8))=='oflg' then
call SetItemDroppable(UnitItemInSlot(N28,T8),false)
endif
endif
endif
set T8=T8+1
endloop
set TL8=TL8+.2
call SReal(EC8,"Duration",(TL8)*1.)
if GetUnitAbilityLevel(N28,('B047'))==0 then
call SetUnitPathing(N28,true)
else
call SetUnitPathing(N28,false)
endif
if TL8>30 then
call PauseTimer(t)
call LT7(EC8)
call SetUnitPathing(N28,true)
set T8=0
loop
exitwhen T8>5
if HNF(N28,T8)then
call SetItemDropOnDeath(UnitItemInSlot(N28,T8),true)
if GetItemTypeId(UnitItemInSlot(N28,T8))=='oflg' then
call SetItemDroppable(UnitItemInSlot(N28,T8),true)
endif
endif
set T8=T8+1
endloop
endif
set t=null
set N28=null
endfunction
function HPF takes nothing returns boolean
return GetSpellAbilityId()==('A0HW')
endfunction
function HQF takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local real t5=PQ8(GetUnitX(N28))
local real w5=PS8(GetUnitY(N28))
local unit VA8=CreateUnit(GetOwningPlayer(N28),('h003'),t5,w5,0)
local timer t=CreateTimer()
local integer EC8=GetHandleId(t)
local group PBD=OG8()
local location HRF
local real l4
local real Y5
local real Z5
call SetUnitPathing(VA8,false)
call SGroup(EC8,"AlreadyDamaged",PBD)
call SUnit(EC8,"Hero",N28)
call SUnit(EC8,"Projectile",VA8)
if m5!=null then
call SInt(EC8,"TargetIndex",KJ8(m5))
call TimerStart(t,.035,true,function HKF)
else
set HRF=GetSpellTargetLoc()
set Y5=GetLocationX(HRF)
set Z5=GetLocationY(HRF)
set l4=Atan2(Z5-w5,Y5-t5)
call SetUnitFacing(VA8,l4*bj_RADTODEG)
set Y5=PQ8(t5+2100*Cos(l4))
set Z5=PS8(w5+2100*Sin(l4))
call SReal(EC8,"TargetX",(Y5)*1.)
call SReal(EC8,"TargetY",(Z5)*1.)
call SReal(EC8,"Angle",l4*1.)
call TimerStart(t,.035,true,function HMF)
endif
set t=CreateTimer()
set EC8=GetHandleId(t)
call SetUnitPathing(N28,false)
call SUnit(EC8,"Hero",N28)
call TimerStart(t,.2,true,function HOF)
set N28=null
set m5=null
set VA8=null
set t=null
set PBD=null
call RemoveLocation(HRF)
set HRF=null
endfunction
function DS9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function HPF))
call TriggerAddAction(t,function HQF)
call CreateSound("Sounds\\Spectral Dagger.mp3",false,false,false,10,10,"DefaultEAXON")
call PU8('A0I2')
call PU8('A0HY')
set t=null
endfunction
function HSF takes nothing returns boolean
return IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and GetUnitAbilityLevel(GetAttacker(),'A0FX')>0
endfunction
function HTF takes nothing returns boolean
return IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false
endfunction
function HUF takes nothing returns nothing
local unit N99=GetAttacker()
local unit sE=GetTriggerUnit()
local group XS8=OG8()
local boolexpr hP=Condition(function HTF)
local integer EC8
call GroupEnumUnitsInRange(XS8,GetUnitX(sE),GetUnitY(sE),325+25,hP)
call GroupRemoveUnit(XS8,sE)
if FirstOfGroup(XS8)==null then
set EC8=GetHandleId(N99)
if LState(N99,"Desolate")==false then
call UnitDamageTarget(N99,sE,5+15*GetUnitAbilityLevel(N99,'A0FX'),true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_DIVINE,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl",sE,"overhead"))
call AddTimedBoolBuff(N99,"Desolate",.3)
endif
endif
call OF8(XS8)
call DestroyBoolExpr(hP)
set N99=null
set sE=null
set XS8=null
set hP=null
endfunction
function DT9 takes nothing returns nothing
local trigger t=CreateTrigger()
call ky(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function HSF))
call TriggerAddAction(t,function HUF)
set t=null
endfunction
function aDx takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function aDX takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit m5=GetEnumUnit()
local unit oA=CreateUnit(GetOwningPlayer(N28),'e00E',GetUnitX(N28),GetUnitY(N28),0)
local real P99=Y8
call UnitAddAbility(oA,'A0NN')
call IssueTargetOrderById(oA,852095,m5)
call UnitDamageTarget(N28,m5,P99,true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
set N28=null
set m5=null
set oA=null
endfunction
function HVF takes nothing returns nothing
local real d=Z47(GetTriggerUnit(),GetEnumUnit())-25
local real HWF=0
if d<300 then
set HWF=1
elseif d<1000 then
set HWF=(1000-d)/ 700
endif
if HWF>0 then
set X64[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=true
call Dmg(GetTriggerUnit(),GetEnumUnit(),HeroMagic,WS*HWF)
set X64[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=false
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayDamage.mdl",GetEnumUnit(),"chest"))
endif
endfunction
function HXF takes nothing returns boolean
local unit AM7=GetTriggerUnit()
local real P08=GetEventDamage()
local integer ML8=GetUnitAbilityLevel(AM7,'A0NA')
local group g
if W18(P08)and GetUnitAbilityLevel(AM7,'BNdo')==0 then
set g=OG8()
set WS=P08*(.06+.04*ML8)
call AddLife(AM7,WS)
call GroupEnumUnitsInRange(g,GetUnitX(AM7),GetUnitY(AM7),1025,Condition(function UB8))
call ForGroup(g,function HVF)
call OF8(g)
endif
set AM7=null
set g=null
return false
endfunction
function HYF takes unit N28,boolean SY8 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function HXF))
if SY8 then
set UW7[GetPlayerId(GetOwningPlayer(N28))]=t
endif
set t=null
endfunction
function HZF takes nothing returns boolean
if GetLearnedSkill()=='A0NA' and GetUnitAbilityLevel(GetTriggerUnit(),'A0NA')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call HYF(GetTriggerUnit(),false)
endif
return false
endfunction
function DU9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function HZF))
set t=null
endfunction
function HAF takes nothing returns boolean
return GetSpellAbilityId()=='A0H9'
endfunction
function HBF takes nothing returns nothing
local unit m5=GetEnumUnit()
local unit N28=GetTriggerUnit()
local unit oA=CreateUnit(GetOwningPlayer(N28),'e00E',GetUnitX(m5),GetUnitY(m5),0)
call SUnit(GetHandleId(oA),"HauntTarget",m5)
call AddPermanentAbility(oA,'A0N9')
call SetUnitAbilityLevel(oA,'A0N9',GetUnitAbilityLevel(N28,'A0H9'))
call IssueTargetOrderById(oA,852274,N28)
set m5=null
set N28=null
set oA=null
endfunction
function HCF takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function H3F takes nothing returns nothing
local integer EC8=GetHandleId(GetTriggeringTrigger())
local unit XU=LUnit(EC8,"HauntImage")
local unit m5=LUnit(EC8,"HauntTarget")
local integer H6F=LInt(EC8,"HauntPhase")
if GetTriggerEventId()!=EVENT_UNIT_DEATH and GetTriggerEventId()!=EVENT_UNIT_ISSUED_TARGET_ORDER and GetTriggerEventId()!=EVENT_UNIT_ISSUED_POINT_ORDER then
set H6F=H6F+1
call SInt(EC8,"HauntPhase",H6F)
endif
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call DisableTrigger(GetTriggeringTrigger())
call LT7(GetHandleId(GetTriggeringTrigger()))
call SInt(EC8,"HauntPhase",H6F)
if m5==GetTriggerUnit()then
call KillUnit(XU)
endif
elseif IsUnitPaused(XU)==false then
if H6F==2 then
call SetUnitVertexColor(XU,255,255,255,255)
endif
if H6F>1 then
call DisableTrigger(GetTriggeringTrigger())
call IssueTargetOrderById(XU,851983,m5)
call EnableTrigger(GetTriggeringTrigger())
else
call DisableTrigger(GetTriggeringTrigger())
call IssueTargetOrderById(XU,851986,m5)
call EnableTrigger(GetTriggeringTrigger())
endif
endif
set XU=null
set m5=null
endfunction
function HLF takes nothing returns boolean
return GetUnitAbilityLevel(GetSummonedUnit(),'B06L')>0
endfunction
function H1F takes nothing returns nothing
local unit oA=GetSummoningUnit()
local unit XU=GetSummonedUnit()
local unit m5=LUnit(GetHandleId(oA),"HauntTarget")
local trigger t=CreateTrigger()
call SaveUnitHandle(R8,GetHandleId(Y7[GetPlayerId(GetOwningPlayer(oA))]),StringHash("HauntTarget")+GetHandleId(XU),m5)
call SetUnitPathing(XU,false)
call SetUnitMoveSpeed(XU,400)
call SetUnitX(XU,GetUnitX(m5))
call SetUnitY(XU,GetUnitY(m5))
call IssueTargetOrderById(XU,851986,m5)
call SetUnitVertexColor(XU,255,255,255,50)
call TriggerRegisterUnitEvent(t,XU,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterUnitEvent(t,XU,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(t,XU,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddAction(t,function H3F)
call DestroyEffect(AddSpecialEffect("units\\nightelf\\SpiritOfVengeance\\SpiritOfVengeance.mdl",GetUnitX(XU),GetUnitY(XU)))
call SUnit(GetHandleId(t),"HauntTarget",m5)
call SUnit(GetHandleId(t),"HauntImage",XU)
call SInt(GetHandleId(t),"HauntPhase",0)
if(LGroup(GetHandleId(GetOwningPlayer(GetSummoningUnit())),"MGrp")!=null)then
call GroupAddUnit(LGroup(GetHandleId(GetOwningPlayer(GetSummoningUnit())),"MGrp"),GetSummonedUnit())
call SetUnitUserData(GetSummonedUnit(),GetPlayerId(GetOwningPlayer(LUnit(GetHandleId(oA),"HauntTarget"))))
endif
call LT7(GetHandleId(oA))
set t=null
set m5=null
set XU=null
set oA=null
endfunction
function H0F takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local group XS8=OG8()
local boolexpr hP=Condition(function HCF)
local sound HT
call AddPermanentAbility(GetTriggerUnit(),('A0HA'))
if(LGroup(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"MGrp")!=null)then
call GroupClear(LGroup(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"MGrp"))
endif
call SetUnitPathing(AM7,false)
call GroupEnumUnitsInRect(XS8,bj_mapInitialPlayableArea,hP)
call ForGroup(XS8,function HBF)
call SetUnitPathing(AM7,true)
if FirstOfGroup(XS8)!=null then
set HT=CreateSound("Abilities\\Spells\\Other\\ANsa\\SacrificeUnit.wav",false,false,false,10,10,"DefaultEAXON")
call StartSound(HT)
call KillSoundWhenDone(HT)
endif
call DestroyBoolExpr(hP)
call OF8(XS8)
set AM7=null
set XS8=null
set hP=null
endfunction
function H5F takes nothing returns boolean
return GetLearnedSkill()=='A0H9'and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A0H9')==1
endfunction
function H2F takes nothing returns nothing
call AddPermanentAbility(GetTriggerUnit(),'A0HA')
endfunction
function DV9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function HAF))
call TriggerAddAction(t,function H0F)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function HLF))
call TriggerAddAction(t,function H1F)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function H5F))
call TriggerAddAction(t,function H2F)
call CreateSound("Abilities\\Spells\\Other\\ANsa\\SacrificeUnit.wav",false,false,false,10,10,"DefaultEAXON")
call PU8('A0N9')
set t=null
endfunction
function H_F takes nothing returns boolean
return GetSpellAbilityId()=='A0HA'
endfunction
function I4F takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),'B06L')>0
endfunction
function I7F takes nothing returns nothing
local unit N28
local real in=BI7(GetEnumUnit(),GetSpellTargetLoc())
if in<Y8 then
set W8=GetEnumUnit()
set Y8=in
endif
set N28=null
endfunction
function I8F takes nothing returns unit
local group XS8=OG8()
local boolexpr hP=Condition(function I4F)
set W8=null
set Y8=9999999
call GroupEnumUnitsOfPlayer(XS8,GetOwningPlayer(GetTriggerUnit()),hP)
call ForGroup(XS8,function I7F)
set Zz=XS8
call DestroyBoolExpr(hP)
set XS8=null
set hP=null
return W8
endfunction
function Reality_KillOtherImages takes nothing returns nothing
call KillUnit(GetEnumUnit())
endfunction
function I9F takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit m5=I8F()
local unit IDF=LoadUnitHandle(R8,GetHandleId(N28),StringHash("HauntTarget")+GetHandleId(m5))
local real hN
local real ho
if m5==null then
call ShowWarningToPlayer(GetOwningPlayer(N28),"Cannot find any of your Haunting illusions")
else
set hN=GetUnitX(m5)
set ho=GetUnitY(m5)
call KillUnit(m5)
call OF8(Zz)
set Zz=null
call SetUnitX(N28,hN)
call SetUnitY(N28,ho)
if Z87(GetCameraEyePositionX(),GetCameraEyePositionY(),GetUnitX(m5),GetUnitY(m5))>1400 then
call PanCameraToTimedForPlayer(GetOwningPlayer(N28),hN,ho,0)
endif
call IssueTargetOrderById(N28,851983,IDF)
endif
set N28=null
set m5=null
set IDF=null
endfunction
function Reality_CheckValid takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit m5=I8F()
if m5==null then
call ZN7(N28)
call ShowWarningToPlayer(GetOwningPlayer(N28),"Cannot find any of your Haunting illusions")
endif
set N28=null
set m5=null
endfunction
function DW9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function H_F))
call TriggerAddAction(t,function I9F)
set t=null
endfunction
function IEF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local integer TA8=GetUnitAbilityLevel(Z77,'A0ES')
local integer OFD
local integer IFF
if TA8>0 and O18(Z77)==false then
set OFD=R2I(GetUnitMoveSpeed(Z77)*.04*TA8)
set IFF=LInt(EC8,"LastBonus")
if OFD!=IFF then
call SInt(EC8,"LastBonus",OFD)
endif
endif
set t=null
set Z77=null
return false
endfunction
function IGF takes unit N28,boolean SY8 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function IEF))
call SUnit(EC8,"Source",N28)
call SInt(EC8,"LastBonus",0)
if SY8 then
set UV7[GetPlayerId(GetOwningPlayer(N28))]=t
endif
set t=null
endfunction
function IHF takes nothing returns boolean
if GetLearnedSkill()=='A0ES' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A0ES')==1 then
call IGF(GetTriggerUnit(),false)
endif
return false
endfunction
function LY8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function IHF))
set t=null
endfunction
function IIF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real LBD=(LoadReal(R8,(GetHandleId(Z77)),(685)))
call FlushChildHashtable(R8,(W57))
call EA8(t)
if LBD<(TimerGetElapsed(E4))or GetTriggerEventId()==EVENT_WIDGET_DEATH then
call SaveReal(R8,(GetHandleId(Z77)),(685),((0)*1.))
call UnitRemoveAbility(Z77,'A24H')
call UnitRemoveAbility(Z77,'B0EC')
endif
set t=null
set Z77=null
return false
endfunction
function IJF takes unit Z77 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call AddPermanentAbility(Z77,'A24H')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A24H',false)
call SaveReal(R8,(GetHandleId(Z77)),(685),(((TimerGetElapsed(E4))+BV4-.01)*1.))
call TriggerRegisterTimerEvent(t,BV4,false)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerAddCondition(t,Condition(function IIF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=null
endfunction
function IKF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real CV7=(LoadReal(R8,(W57),(13)))
local real x=GetUnitX(X77)
local real y=GetUnitY(X77)
local integer C77=GetTriggerEvalCount(t)
local real HHE=(LoadReal(R8,(W57),(193)))
local integer VID=(LoadInteger(R8,(W57),(12)))
if C77>35 then
call SaveReal(R8,(W57),(193),((HHE*.98)*1.))
endif
if GetTriggerEventId()==EVENT_UNIT_DEATH or C77>VID then
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl",x,y))
call KillTrees(x,y,150)
set x=PQ8(x+HHE*Cos(CV7))
set y=PS8(y+HHE*Sin(CV7))
if(IsPointInRegion(IF4,((x)*1.),((y)*1.)))==false then
call SetUnitX(X77,x)
call SetUnitY(X77,y)
endif
if C77==1 and(LoadBoolean(R8,(W57),(698)))==false then
call IssueTargetOrderById(Z77,851983,X77)
endif
endif
set t=null
set X77=null
set Z77=null
return false
endfunction
function IMF takes unit Z77,unit X77,boolean INF,boolean IOF returns nothing
local trigger t
local integer W57
local real CV7=Atan2(GetUnitY(X77)-GetUnitY(Z77),GetUnitX(X77)-GetUnitX(Z77))
local integer ML8=GetUnitAbilityLevel(Z77,'A0G5')
local unit AC7
if GetUnitAbilityLevel(GetAttacker(),'BNdo')>0 then
set t=null
set AC7=null
return
endif
if INF then
endif
if ML8>0 then
set AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call AddPermanentAbility(AC7,'A1WQ')
call SetUnitAbilityLevel(AC7,'A1WQ',ML8)
if IssueTargetOrderById(AC7,852095,X77)then
set t=CreateTrigger()
set W57=GetHandleId(t)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl",Z77,"weapon"))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveReal(R8,(W57),(13),((CV7)*1.))
call SaveReal(R8,(W57),(193),((2)*1.))
call SaveBoolean(R8,(W57),(698),(IOF))
call SaveInteger(R8,(W57),(12),(80+20*ML8))
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,.01,true)
call TriggerAddCondition(t,Condition(function IKF))
call Dmg(Z77,X77,NormalFire,GetUnitMoveSpeed(Z77)*.1*ML8)
call IJF(Z77)
endif
if IOF==false then
call AddTimedBoolBuff(Z77,"pIv",1.5)
endif
endif
set t=null
set Z77=null
set X77=null
set AC7=null
endfunction
function IPF takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),'A0G5')>0 and IsUnitIllusion(GetAttacker())==false and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitTypeId(GetTriggerUnit())!='n00L'and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))and GetRandomInt(1,'d')<=17 and LState(GetAttacker(),"pIv")==false then
call IMF(GetAttacker(),GetTriggerUnit(),false,false)
endif
return false
endfunction
function LZ8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function IPF))
set t=null
endfunction
function IQF takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),BC4)==false then
call GroupAddUnit(BC4,GetEnumUnit())
call IMF(BZ4,GetEnumUnit(),false,true)
endif
endfunction
function IRF takes integer id returns boolean
return(id=='A1P8' or id=='A0ES' or id=='A0G4' or id=='A1D8' or id=='A0G5' or id=='Aamk')or(id==852002 or id==852003 or id==852004 or id==852005 or id==852006 or id==852007)or(id>0xF4240)
endfunction
function ISF takes nothing returns boolean
if(IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(BZ4))then
if Z47(BA4,GetFilterUnit())<BB4 then
set BB4=Z47(BA4,GetFilterUnit())
set BW4=GetFilterUnit()
endif
endif
return false
endfunction
function ITF takes unit Z77,unit X77 returns unit
local group g=OG8()
set H04=Z77
set BZ4=Z77
set BW4=null
set BB4=999999
set BA4=X77
call GroupEnumUnitsInRange(g,GetUnitX(X77),GetUnitY(X77),4000,Condition(function ISF))
call OF8(g)
set g=null
return BW4
endfunction
function IUF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local real AQD=(550+50*ML8)*.02
local real PND=(LoadReal(R8,(W57),(23)))
local real POD=(LoadReal(R8,(W57),(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()==Z77)or GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_POINT_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER or SL9(Z77)or(LoadReal(R8,(W57),(442)))<(TimerGetElapsed(E4))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 IRF(GetIssuedOrderId())==false)then
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(177))))
call UnitRemoveAbility(X77,'A24L')
call UnitRemoveAbility(X77,'B0ED')
call OF8((LoadGroupHandle(R8,(W57),(187))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SetUnitTimeScale(Z77,1)
call KillUnit(AC7)
call SetUnitPathing(Z77,true)
call SetUnitVertexColor(Z77,255,255,255,255)
call KillTrees(GetUnitX(Z77),GetUnitY(Z77),200)
if GetTriggerEventId()!=EVENT_WIDGET_DEATH then
call ResetUnitAnimation(Z77)
endif
call SaveBoolean(R8,GetHandleId(Z77),'DARK',false)
call RemoveSavedHandle(R8,GetHandleId(Z77),'DARK')
endif
elseif GetTriggerEventId()==EVENT_WIDGET_DEATH and GetTriggerUnit()==X77 then
set fx=""
if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(Z77))or N08(GetLocalPlayer())then
set fx="Abilities\\Spells\\Other\\HowlOfTerror\\HowlTarget.mdl"
endif
call UnitRemoveAbility(X77,'A24L')
call UnitRemoveAbility(X77,'B0ED')
set X77=ITF(Z77,X77)
if X77!=null then
call SaveUnitHandle(R8,(W57),(17),(X77))
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call SaveEffectHandle(R8,(W57),(175),(AddSpecialEffectTarget(fx,X77,"overhead")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget(fx,X77,"overhead")))
call SaveReal(R8,(W57),(442),(((TimerGetElapsed(E4))+50)*1.))
call TriggerRegisterDeathEvent(t,X77)
call SaveUnitHandle(R8,GetHandleId(Z77),'DARK',X77)
else
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(177))))
call UnitRemoveAbility(X77,'A24L')
call UnitRemoveAbility(X77,'B0ED')
call OF8((LoadGroupHandle(R8,(W57),(187))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SetUnitTimeScale(Z77,1)
call KillUnit(AC7)
call SetUnitPathing(Z77,true)
call ResetUnitAnimation(Z77)
call SetUnitVertexColor(Z77,255,255,255,255)
call SetUnitPosition(Z77,GetUnitX(Z77),GetUnitY(Z77))
call KillTrees(GetUnitX(Z77),GetUnitY(Z77),500)
call SaveBoolean(R8,GetHandleId(Z77),'DARK',false)
call RemoveSavedHandle(R8,GetHandleId(Z77),'DARK')
endif
else
set d=Z87(GetUnitX(Z77),GetUnitY(Z77),GetUnitX(X77),GetUnitY(X77))
if d<'d' then
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(177))))
call UnitRemoveAbility(X77,'A24L')
call UnitRemoveAbility(X77,'B0ED')
call OF8((LoadGroupHandle(R8,(W57),(187))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SetUnitTimeScale(Z77,1)
call KillUnit(AC7)
set AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call UnitAddAbility(AC7,'A0GS')
call SetUnitAbilityLevel(AC7,'A0GS',ML8)
call IssueTargetOrderById(AC7,852095,X77)
call SetUnitPathing(Z77,true)
call SetUnitVertexColor(Z77,255,255,255,255)
call SetUnitPosition(Z77,GetUnitX(Z77),GetUnitY(Z77))
call KillTrees(GetUnitX(Z77),GetUnitY(Z77),200)
call SaveBoolean(R8,GetHandleId(Z77),'DARK',false)
call RemoveSavedHandle(R8,GetHandleId(Z77),'DARK')
set B34=ML8
call IssueTargetOrderById(Z77,851983,X77)
if KR8(GetOwningPlayer(Z77))then
set hq[832+GetPlayerId(GetOwningPlayer(Z77))]=0
endif
else
if GetTriggerEvalCount(t)==1 then
call DisableTrigger(t)
call IssueImmediateOrderById(Z77,851993)
call EnableTrigger(t)
endif
if ModuloInteger(GetTriggerEvalCount(t),65)==0 then
if GetUnitTypeId(Z77)=='E02X' then
call SetUnitAnimationByIndex(Z77,1)
else
call SetUnitAnimationByIndex(Z77,2)
endif
endif
if GetPlayerController(GetOwningPlayer(Z77))==MAP_CONTROL_COMPUTER then
if GetUnitAbilityLevel(Z77,'A0IH')<1 or(d<350 and LoadReal(R8,W57,'MARK'-1)>-50)then
call SaveReal(R8,W57,'MARK'-1,LoadReal(R8,W57,'MARK'-1)-1)
else
call IssueImmediateOrderById(Z77,851993)
endif
endif
set a=YH7(Z77,X77)*bj_DEGTORAD
call SetUnitFacing(Z77,a*bj_RADTODEG)
set x=PND+AQD*Cos(a)
set y=POD+AQD*Sin(a)
call SetUnitX(Z77,x)
call SetUnitY(Z77,y)
call SetUnitX(AC7,GetUnitX(X77))
call SetUnitY(AC7,GetUnitY(X77))
call SaveReal(R8,(W57),(23),((x)*1.))
call SaveReal(R8,(W57),(24),((y)*1.))
set BC4=(LoadGroupHandle(R8,(W57),(187)))
set g=OG8()
set H04=Z77
set BZ4=Z77
call GroupEnumUnitsInRange(g,x,y,325,Condition(function UM8))
set B34=ML8
call ForGroup(g,function IQF)
call OF8(g)
set g=null
if d<3000 and GetUnitAbilityLevel(X77,'A24L')==0 then
endif
if KR8(GetOwningPlayer(Z77))then
set hq[832+GetPlayerId(GetOwningPlayer(Z77))]=Bz+1
endif
endif
endif
set t=null
set Z77=null
set X77=null
set AC7=null
return false
endfunction
function IVF takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'o00Q',GetUnitX(X77),GetUnitY(X77),0)
local integer ML8=GetUnitAbilityLevel(Z77,'A1P8')
local string fx=""
call SaveBoolean(R8,GetHandleId(Z77),'DARK',true)
call SaveUnitHandle(R8,GetHandleId(Z77),'DARK',X77)
if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(Z77))or N08(GetLocalPlayer())then
set fx="Abilities\\Spells\\Other\\HowlOfTerror\\HowlTarget.mdl"
call PingMinimapEx(GetUnitX(X77),GetUnitY(X77),2,255,255,255,false)
endif
call IssueTargetOrderById(Z77,851986,X77)
call SetUnitPathing(Z77,false)
if GetUnitTypeId(Z77)=='E02X' then
call SetUnitAnimationByIndex(Z77,1)
else
call SetUnitAnimationByIndex(Z77,2)
endif
call SetUnitTimeScale(Z77,2.5)
call SetUnitVertexColor(Z77,255,255,255,'d')
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveReal(R8,(W57),(442),(((TimerGetElapsed(E4))+50)*1.))
call SaveReal(R8,(W57),(23),((GetUnitX(Z77))*1.))
call SaveReal(R8,(W57),(24),((GetUnitY(Z77))*1.))
call SaveEffectHandle(R8,(W57),(175),(AddSpecialEffectTarget(fx,X77,"overhead")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget(fx,X77,"overhead")))
call SaveEffectHandle(R8,(W57),(177),(AddSpecialEffectTarget("war3mapImported\\ShockwaveMissilePurple.mdx",Z77,"origin")))
call SaveGroupHandle(R8,(W57),(187),(OG8()))
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerRegisterDeathEvent(t,X77)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_ISSUED_ORDER)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(t,Condition(function IUF))
set t=null
set Z77=null
set X77=null
set AC7=null
endfunction
function IWF takes nothing returns boolean
if GetSpellAbilityId()=='A1P8' and HasLinkin(GetSpellTargetUnit())==false then
call IVF()
endif
return false
endfunction
function LX8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IWF))
set t=null
call PU8('A0X6')
endfunction
function IXF takes unit Z77,unit X77 returns nothing
local trigger t
local integer W57
local real l4=Atan2(GetUnitY(X77)-GetUnitY(Z77),GetUnitX(X77)-GetUnitX(Z77))
local integer ML8=4
call IMF(Z77,X77,true,true)
set t=null
endfunction
function IYF takes nothing returns nothing
call IXF(YE4,GetEnumUnit())
endfunction
function IZF takes unit Z77,unit X77 returns nothing
local group g=OG8()
set H04=Z77
set YE4=Z77
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),275,Condition(function UM8))
call ForGroup(g,function IYF)
call OF8(g)
set g=null
endfunction
function IAF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer C77=GetTriggerEvalCount(t)
local integer IBF
local integer ML8
local real CV7
local real PND=(LoadReal(R8,(W57),(23)))
local real POD=(LoadReal(R8,(W57),(24)))
local real x=GetUnitX(X77)
local real y=GetUnitY(X77)
local real d=Z87(x,y,PND,POD)
call SaveReal(R8,(W57),(23),((x)*1.))
call SaveReal(R8,(W57),(24),((y)*1.))
if GetTriggerEventId()==EVENT_UNIT_DEATH or C77==200 or d>1800 then
call SetUnitVertexColor(Z77,255,255,255,255)
call UnitShareVision(X77,GetOwningPlayer(Z77),false)
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
if C77==1 then
set ML8=(LoadInteger(R8,(W57),(5)))
set CV7=Atan2(GetUnitY(X77)-GetUnitY(Z77),GetUnitX(X77)-GetUnitX(Z77))
call SetUnitPosition(Z77,GetUnitX(X77)+80*Cos(CV7),GetUnitY(X77)+80*Sin(CV7))
call SetUnitAnimation(Z77,"attack")
call IssueTargetOrderById(Z77,851983,X77)
if GetUnitAbilityLevel(Z77,'A0G4')>0 then
call IXF(Z77,X77)
else
call IZF(Z77,X77)
endif
call Dmg(Z77,X77,NormalFire,50+'d'*ML8)
endif
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function ICF takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A0G4')
if ML8==0 then
set ML8=GetUnitAbilityLevel(Z77,'A1D8')
endif
call UnitShareVision(X77,GetOwningPlayer(Z77),true)
call IssueImmediateOrder(Z77,"halt")
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveReal(R8,(W57),(23),((GetUnitX(X77))*1.))
call SaveReal(R8,(W57),(24),((GetUnitY(X77))*1.))
call TriggerRegisterTimerEvent(t,.01,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function IAF))
set t=null
set Z77=null
set X77=null
endfunction
function I3F takes nothing returns boolean
if(GetSpellAbilityId()=='A0G4' or GetSpellAbilityId()=='A1D8')and HasLinkin(GetSpellTargetUnit())==false then
call ICF()
endif
return false
endfunction
function A0G4_Vision takes nothing returns nothing
if(GetSpellAbilityId()=='A0G4' or GetSpellAbilityId()=='A1D8')then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CHANNEL then
call UnitShareVision(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()),true)
call SetUnitAnimationByIndex(GetTriggerUnit(),6)
else
call UnitShareVision(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()),false)
endif
endif
endfunction
function LA8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I3F))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CHANNEL)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t,Condition(function A0G4_Vision))
set t=null
endfunction
function I6F takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A275')
if ML8==1 then
call AddPermanentAbility(Z77,'A276')
elseif ML8==2 then
call UnitRemoveAbility(Z77,'A276')
call AddPermanentAbility(Z77,'A279')
elseif ML8==3 then
call UnitRemoveAbility(Z77,'A276')
call UnitRemoveAbility(Z77,'A279')
call AddPermanentAbility(Z77,'A277')
elseif ML8==4 then
call UnitRemoveAbility(Z77,'A276')
call UnitRemoveAbility(Z77,'A279')
call UnitRemoveAbility(Z77,'A277')
call AddPermanentAbility(Z77,'A278')
endif
set Z77=null
endfunction
function ILF takes nothing returns boolean
if GetLearnedSkill()=='A275' and IsUnitIllusion(GetTriggerUnit())==false then
call I6F()
endif
return false
endfunction
function L38 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function ILF))
set t=null
endfunction
function I1F takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local unit X77=LUnit(W57,"Target")
local real I0F=LReal(W57,"SourceLifePercent")
local real I5F=LReal(W57,"TargetLifePercent")
local integer ML8=GetUnitAbilityLevel(Z77,'A07Q')
local real I2F=.33
if ML8==2 then
set I2F=.28
elseif ML8==3 then
set I2F=.23
endif
if GetSpellTargetUnit()==Z77 then
call SetUnitState(Z77,UNIT_STATE_LIFE,RMaxBJ(GetUnitState(Z77,UNIT_STATE_MAX_LIFE)*I5F*.01,GetUnitState(Z77,UNIT_STATE_MAX_LIFE)*I2F))
endif
if GetSpellTargetUnit()==X77 then
call SetUnitLifePercentBJ(X77,I0F)
if GetUnitLifePercent(X77)<25. and ML8==1 and GetUnitState(X77,UNIT_STATE_LIFE)>1 then
call SetUnitLifePercentBJ(X77,25.)
endif
if GetUnitLifePercent(X77)<20. and ML8==2 and GetUnitState(X77,UNIT_STATE_LIFE)>1 then
call SetUnitLifePercentBJ(X77,20.)
endif
if GetUnitLifePercent(X77)<15. and ML8==3 and GetUnitState(X77,UNIT_STATE_LIFE)>1 then
call SetUnitLifePercentBJ(X77,15.)
endif
endif
if GetTriggerEvalCount(t)==2 then
call LT7(W57)
call EA8(t)
endif
set Z77=null
set X77=null
set t=null
endfunction
function I_F takes nothing returns boolean
if GetSpellAbilityId()=='A07R' then
call I1F()
endif
return false
endfunction
function J4F takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local unit AC7
call SUnit(W57,"Source",Z77)
call SUnit(W57,"Target",X77)
call SReal(W57,"SourceLifePercent",(GetUnitLifePercent(Z77))*1.)
call SReal(W57,"TargetLifePercent",(GetUnitLifePercent(X77))*1.)
call TriggerAddCondition(t,Condition(function I_F))
set AC7=CreateUnit(GetOwningPlayer(X77),'e00Y',GetUnitX(X77),GetUnitY(X77),0)
call TriggerRegisterUnitEvent(t,AC7,EVENT_UNIT_SPELL_EFFECT)
call AddPermanentAbility(AC7,'A07R')
call IssueTargetOrderById(AC7,852095,Z77)
call ShowUnit(AC7,false)
call SetUnitPathing(AC7,false)
call SetUnitInvulnerable(AC7,true)
call UnitApplyTimedLife(AC7,'BTLF',.2)
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00Y',GetUnitX(Z77),GetUnitY(Z77),0)
call TriggerRegisterUnitEvent(t,AC7,EVENT_UNIT_SPELL_EFFECT)
call AddPermanentAbility(AC7,'A07R')
call IssueTargetOrderById(AC7,852095,X77)
call ShowUnit(AC7,false)
call SetUnitPathing(AC7,false)
call SetUnitInvulnerable(AC7,true)
call UnitApplyTimedLife(AC7,'BTLF',.2)
set t=null
set Z77=null
set X77=null
set AC7=null
endfunction
function J7F takes nothing returns boolean
if GetSpellAbilityId()=='A07Q' then
call J4F()
endif
return false
endfunction
function LB8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function J7F))
set t=null
endfunction
function J8F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Q89=(LoadUnitHandle(R8,(W57),(335)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
if GetTriggerUnit()!=Q89 then
call KillUnit(Q89)
endif
else
call IssueTargetOrderById(Q89,851983,X77)
if IsUnitType(X77,UNIT_TYPE_MAGIC_IMMUNE)then
call UnitRemoveAbility(X77,'A26W')
call UnitRemoveAbility(X77,'B0EJ')
endif
endif
set t=null
set Q89=null
set X77=null
return false
endfunction
function J9F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local unit Q89
if GetSummoningUnit()==AC7 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
set Q89=GetSummonedUnit()
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterDeathEvent(t,Q89)
call TriggerRegisterDeathEvent(t,X77)
call TriggerRegisterTimerEvent(t,.2,true)
call TriggerAddCondition(t,Condition(function J8F))
call SaveUnitHandle(R8,(W57),(335),(Q89))
call SaveUnitHandle(R8,(W57),(17),(X77))
call UnitAddAbility(Q89,'Aloc')
call SetUnitPosition(Q89,GetUnitX(X77)+'d',GetUnitY(X77)+'d')
call IssueTargetOrderById(Q89,851983,X77)
call SetUnitMoveSpeed(Q89,522)
call SetUnitVertexColorBJ(Q89,'d','d','d',60)
endif
set t=null
set X77=null
set Z77=null
set AC7=null
return false
endfunction
function JDF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A2KZ')
local integer id
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
local trigger t
local integer W57
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A26W',false)
if S_9(X77)==false then
call T68(X77,'A26W',1,5,'B0EJ')
endif
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function J9F))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call AddPermanentAbility(AC7,'A24K')
call SetUnitAbilityLevel(AC7,'A24K',ML8)
call IssueTargetOrderById(AC7,852274,X77)
call S68(BL4,GetUnitX(X77),GetUnitY(X77))
set Z77=null
set X77=null
set AC7=null
set t=null
endfunction
function JEF takes nothing returns boolean
if GetSpellAbilityId()=='A2KZ' then
call JDF()
endif
return false
endfunction
function LC8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function JEF))
set t=null
endfunction
function JFF takes nothing returns nothing
local unit Z77=GetSummoningUnit()
local unit Q89=GetSummonedUnit()
call SelectUnitAddForPlayer(Q89,GetOwningPlayer(Z77))
call UnitAddAbility(Q89,'A2KY')
call UnitRemoveAbility(Q89,'A2KY')
call SetUnitState(Q89,UNIT_STATE_LIFE,GetUnitState(Q89,UNIT_STATE_MAX_LIFE))
call SetUnitPosition(Q89,GetUnitX(Q89),GetUnitY(Q89))
set Z77=null
set Q89=null
endfunction
function JGF takes nothing returns boolean
if GetUnitAbilityLevel(GetSummonedUnit(),'B0EI')>0 then
call JFF()
endif
return false
endfunction
function JHF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit AC7
local integer ML8=GetUnitAbilityLevel(Z77,'A2KX')
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
call AddPermanentAbility(AC7,'A08Q')
call SetUnitAbilityLevel(AC7,'A08Q',ML8)
call IssueTargetOrderById(AC7,852274,Z77)
set Z77=null
set AC7=null
endfunction
function JIF takes nothing returns boolean
if GetSpellAbilityId()=='A2KX' and GetUnitTypeId(GetTriggerUnit())=='Eevi' then
call JHF()
endif
return false
endfunction
function L18 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function JIF))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function JGF))
set t=null
endfunction
function JJF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>(4*(4+ML8))or GU8(X77)or Z47(Z77,X77)>700 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call KillUnit(AC7)
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetTriggerEvalCount(t)>1 and GetSpellAbilityId()=='A1RA' then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(Z77,'A1RA')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1PH',true)
call KillUnit(AC7)
endif
elseif IsUnitVisibleEx(X77,GetOwningPlayer(Z77))==false then
if(LoadInteger(R8,(W57),(34)))==1 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call KillUnit(AC7)
else
call SaveInteger(R8,(W57),(34),(1))
endif
else
call SaveInteger(R8,(W57),(34),(0))
if IsUnitAlly(Z77,GetOwningPlayer(X77))==false then
call SetUnitState(Z77,UNIT_STATE_LIFE,GetUnitState(Z77,UNIT_STATE_LIFE)+ML8*25./ 4.)
else
call SetUnitState(X77,UNIT_STATE_LIFE,GetUnitState(X77,UNIT_STATE_LIFE)+ML8*50./ 4.)
endif
endif
set t=null
set Z77=null
set X77=null
set AC7=null
return false
endfunction
function JKF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call UnitRemoveAbility(Z77,'A1RA')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1PH',true)
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
if GetTriggerEvalCount(t)==1 then
call IssueImmediateOrderById(Z77,851993)
endif
if IsUnitAlly(Z77,GetOwningPlayer(X77))==false then
call SetUnitX(AC7,GetUnitX(Z77))
call SetUnitY(AC7,GetUnitY(Z77))
else
call SetUnitX(AC7,GetUnitX(X77))
call SetUnitY(AC7,GetUnitY(X77))
endif
endif
set t=null
set Z77=null
set X77=null
set AC7=null
return false
endfunction
function JMF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A1PH')
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AC7
if IsUnitAlly(Z77,GetOwningPlayer(X77))==false then
set AC7=CreateUnit(GetOwningPlayer(Z77),'u01G',0,0,0)
call AddPermanentAbility(AC7,'A04L')
call SetUnitAbilityLevel(AC7,'A04L',ML8)
call SetUnitX(AC7,GetUnitX(Z77))
call SetUnitY(AC7,GetUnitY(Z77))
call IssueTargetOrderById(AC7,852487,X77)
else
call AddPermanentAbility(Z77,'A1RA')
call UnitMakeAbilityPermanent(Z77,true,'A1RA')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1PH',false)
set AC7=CreateUnit(O8,'u01G',0,0,0)
call AddPermanentAbility(AC7,'A04L')
call SetUnitAbilityLevel(AC7,'A04L',ML8)
call SetUnitX(AC7,GetUnitX(X77))
call SetUnitY(AC7,GetUnitY(X77))
call IssueTargetOrderById(AC7,852487,Z77)
endif
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function JJF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveInteger(R8,(W57),(34),(0))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.01,true)
call TriggerRegisterUnitEvent(t,AC7,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function JKF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(19),(AC7))
set Z77=null
set X77=null
set t=null
endfunction
function JNF takes nothing returns boolean
if GetSpellAbilityId()=='A1PH' and GetUnitTypeId(GetSpellTargetUnit())!='n00L' and(IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))or HasLinkin(GetSpellTargetUnit())==false)then
call JMF()
endif
return false
endfunction
function LL8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function JNF))
endfunction
function JOF takes nothing returns boolean
return GetSpellAbilityId()=='A0H4'
endfunction
function JPF takes nothing returns nothing
local unit O4D=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(O4D,'A0H4')
local unit AC7=CreateUnit(GetOwningPlayer(O4D),'e00E',GetUnitX(O4D),GetUnitY(O4D),0)
call UnitAddAbility(AC7,'A2JN')
call SetUnitAbilityLevel(AC7,'A2JN',ML8)
call IssueTargetOrderById(AC7,852274,O4D)
endfunction
function L68 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function JOF))
call TriggerAddAction(t,function JPF)
endfunction
function JQF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit m5=GetEventDamageSource()
local real d=GetEventDamage()
local real KU9=LReal(EC8,"KrakenShell|Damage")
local real JRF=LReal(EC8,"KrakenShell|LastTime")
if IsPlayer(GetOwningPlayer(m5))then
if(JRF+M2)<(ZM7())then
set KU9=0
endif
set JRF=(ZM7())
set KU9=KU9+d
if KU9>p2 and GetUnitAbilityLevel(Z77,'BNdo')==0 then
set KU9=0
call TF9(Z77)
call T99(Z77,0,0)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",Z77,"origin"))
endif
call SReal(EC8,"KrakenShell|Damage",KU9)
call SReal(EC8,"KrakenShell|LastTime",JRF)
endif
set t=null
set Z77=null
set m5=null
return false
endfunction
function JSF takes unit Z77,boolean SY8 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function JQF))
call SUnit(EC8,"Source",Z77)
call SReal(EC8,"KrakenShell|Damage",0)
call SReal(EC8,"KrakenShell|LastTime",ZM7())
if SY8 then
set UV7[GetPlayerId(GetOwningPlayer(Z77))]=t
endif
set t=null
endfunction
function JTF takes nothing returns boolean
if GetLearnedSkill()=='A04E' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A04E')==1 then
call JSF(GetTriggerUnit(),false)
endif
return false
endfunction
function L08 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function JTF))
set t=null
endfunction
function JUF takes nothing returns boolean
return GetSpellAbilityId()=='A046' and HasLinkin(GetSpellTargetUnit())==false
endfunction
function JVF takes nothing returns nothing
local unit t=GetSpellTargetUnit()
local real JWF=(60.+(50.*I2R(GetUnitAbilityLevelSwapped('A046',GetTriggerUnit()))))
call UnitDamageTargetBJ(GetTriggerUnit(),t,JWF,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_COLD)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",t,"chest"))
set t=null
endfunction
function L58 takes nothing returns nothing
set DQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(DQ,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(DQ,Condition(function JUF))
call TriggerAddAction(DQ,function JVF)
endfunction
function JXF takes nothing returns boolean
return GetSpellAbilityId()=='A0OR'
endfunction
function JYF takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(W8))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0
endfunction
function JZF takes nothing returns nothing
call Dmg(W8,GetEnumUnit(),HeroNormal,Y8)
endfunction
function JAF takes unit Z77,unit X77,real P08 returns nothing
local group QA9=OG8()
local boolexpr QZ9=Condition(function JYF)
set W8=Z77
set Y8=P08
call GroupEnumUnitsInRange(QA9,GetUnitX(X77),GetUnitY(X77),185+25,QZ9)
call ForGroup(QA9,function JZF)
call DestroyBoolExpr(QZ9)
call OF8(QA9)
set QA9=null
set QZ9=null
endfunction
function JBF takes nothing returns boolean
return IsUnitInGroup(GetFilterUnit(),C8)==false and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and O18(GetFilterUnit())==false and GetFilterUnit()!=H17
endfunction
function JCF takes group J3F,unit J6F,unit Z77,unit pzv returns unit
local group QA9=OG8()
local boolexpr QZ9=Condition(function JBF)
local unit JLF=null
local unit J1F
set C8=J3F
set W8=Z77
call GroupEnumUnitsInRange(QA9,GetUnitX(J6F),GetUnitY(J6F),500,QZ9)
set J1F=FirstOfGroup(QA9)
set JLF=J1F
loop
exitwhen J1F==null
if GetUnitState(J1F,UNIT_STATE_LIFE)!=GetUnitState(J1F,UNIT_STATE_MAX_LIFE)then
if J1F!=Z77 and IsUnitType(J1F,UNIT_TYPE_HERO)and IsUnitType(JLF,UNIT_TYPE_HERO)==false then
set JLF=J1F
elseif J1F!=Z77 and GetUnitState(J1F,UNIT_STATE_LIFE)<GetUnitState(JLF,UNIT_STATE_LIFE)and IsUnitType(J1F,UNIT_TYPE_HERO)and IsUnitType(JLF,UNIT_TYPE_HERO)then
set JLF=J1F
elseif J1F!=Z77 and IsUnitType(JLF,UNIT_TYPE_HERO)==false and GetUnitState(J1F,UNIT_STATE_LIFE)<GetUnitState(JLF,UNIT_STATE_LIFE)then
set JLF=J1F
elseif J1F==Z77 then
set JLF=J1F
endif
endif
call GroupRemoveUnit(QA9,J1F)
set J1F=FirstOfGroup(QA9)
endloop
call OF8(QA9)
call DestroyBoolExpr(QZ9)
set QA9=null
set QZ9=null
set J1F=null
set H27=JLF
return H27
endfunction
function J0F takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local string J5F="Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCaster.mdl"
local string J2F="origin"
local unit array J_F
local integer x
local integer i=1
local integer ML8=GetUnitAbilityLevel(AM7,'A0OR')
local real P08=60+ML8*20
local group J3F=OG8()
local integer K4F
local boolean K7F=false
set H17=AM7
if ML8==1 then
set K4F=3
elseif ML8==2 then
set K4F=4
elseif ML8==3 then
set K4F=5
elseif ML8==4 then
set K4F=6
endif
call SetUnitState(AM7,UNIT_STATE_LIFE,GetUnitState(AM7,UNIT_STATE_LIFE)+P08)
call JAF(AM7,AM7,P08)
call GroupAddUnit(J3F,AM7)
call QG8(J5F,AM7,J2F,2)
if X77==AM7 then
set J_F[i]=JCF(J3F,AM7,AM7,X77)
else
set J_F[i]=X77
endif
if J_F[i]==null then
call OF8(J3F)
return
endif
call SetUnitState(J_F[i],UNIT_STATE_LIFE,GetUnitState(J_F[i],UNIT_STATE_LIFE)+P08)
call JAF(AM7,J_F[i],P08)
call GroupAddUnit(J3F,J_F[i])
call QG8(J5F,J_F[i],J2F,2)
call QK8("SPLK",GetUnitX(AM7),GetUnitY(AM7),GetUnitX(J_F[i]),GetUnitY(J_F[i]),.3,.5,.9,1.,.7)
set i=2
loop
exitwhen i>K4F or K7F
set J_F[i]=JCF(J3F,J_F[i-1],AM7,X77)
if J_F[i]==null then
set K7F=true
else
call GroupAddUnit(J3F,J_F[i])
call QG8(J5F,J_F[i],J2F,2)
call SetUnitState(J_F[i],UNIT_STATE_LIFE,GetUnitState(J_F[i],UNIT_STATE_LIFE)+P08)
call JAF(AM7,J_F[i],P08)
call QK8("SPLK",GetUnitX(J_F[i-1]),GetUnitY(J_F[i-1]),GetUnitX(J_F[i]),GetUnitY(J_F[i]),.3,.5,.9,1.,.7)
set i=i+1
endif
endloop
loop
set i=i-1
set J_F[i]=null
exitwhen i<2
endloop
call OF8(J3F)
set AM7=null
set X77=null
set J3F=null
endfunction
function EJ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function JXF))
call TriggerAddAction(t,function J0F)
set t=null
endfunction
function K8F takes nothing returns boolean
return GetSpellAbilityId()==('A0NQ')and HasLinkin(GetSpellTargetUnit())==false
endfunction
function K9F takes unit Z77,unit m5,integer TA8 returns nothing
local unit oA=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(m5),GetUnitY(m5),0)
call AddPermanentAbility(oA,'A0NJ')
call SetUnitAbilityLevel(oA,'A0NJ',TA8)
call IssueTargetOrderById(oA,852075,m5)
set oA=null
endfunction
function KDF takes unit Z77,unit m5 returns nothing
local unit oA=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(m5),GetUnitY(m5),0)
call AddPermanentAbility(oA,'A0NK')
call IssueTargetOrderById(oA,852095,m5)
set oA=null
endfunction
function KEF takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local unit X77=LUnit(W57,"Target")
local integer ML8=GetUnitAbilityLevel(Z77,'A0NQ')
local integer NKE=GetTriggerExecCount(t)
local real P08=8+6*ML8
local unit AC7=LUnit(W57,"Caster")
if ML8>2 then
call AddPermanentAbility(X77,'A0OW')
call Dmg(AC7,X77,HeroNormal,P08)
if NKE==9 then
call UnitRemoveAbility(X77,'A0OW')
call LT7(W57)
call EA8(t)
endif
endif
if ML8==2 then
if NKE==2 then
call K9F(Z77,X77,2)
endif
if NKE>2 then
call AddPermanentAbility(X77,'A0OW')
call Dmg(AC7,X77,HeroNormal,P08)
endif
if NKE==9 then
call UnitRemoveAbility(X77,'A0OW')
call LT7(W57)
call EA8(t)
endif
endif
if ML8==3 then
if NKE==1 then
call K9F(Z77,X77,2)
endif
if NKE==2 then
call K9F(Z77,X77,3)
endif
if NKE>2 then
call AddPermanentAbility(X77,'A0OW')
call Dmg(AC7,X77,HeroNormal,P08)
endif
if NKE==10 then
call UnitRemoveAbility(X77,'A0OW')
call LT7(W57)
call EA8(t)
endif
endif
if ML8==4 then
if NKE==1 then
call K9F(Z77,X77,2)
endif
if NKE==2 then
call KDF(Z77,X77)
endif
if NKE>2 then
call AddPermanentAbility(X77,'A0OW')
call Dmg(AC7,X77,HeroNormal,P08)
endif
if NKE==10 then
call UnitRemoveAbility(X77,'A0OW')
call LT7(W57)
call EA8(t)
endif
endif
set t=null
set AC7=null
set Z77=null
set X77=null
endfunction
function KFF takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit AC7=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'e00E',GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()),0)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddAction(t,function KEF)
call SUnit(EC8,"Source",GetTriggerUnit())
call SUnit(EC8,"Target",GetSpellTargetUnit())
call SUnit(EC8,"Caster",(AC7))
call K9F(GetTriggerUnit(),GetSpellTargetUnit(),1)
set t=null
set AC7=null
endfunction
function EK9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function K8F))
call TriggerAddAction(t,function KFF)
call PU8('A0NJ')
call PU8('A0NK')
set t=null
endfunction
function KGF takes string QO8,unit X77,unit AM7 returns nothing
local texttag tt=CreateTextTag()
call SetTextTagText(tt,QO8,.033)
call SetTextTagPosUnit(tt,X77,64)
call SetTextTagColor(tt,160,0,255,255)
call SetTextTagVelocity(tt,0,.0355)
call SetTextTagFadepoint(tt,.15)
call SetTextTagPermanent(tt,false)
call SetTextTagLifespan(tt,.65)
if IsUnitAlly(AM7,GetLocalPlayer())or N08(GetLocalPlayer())then
call SetTextTagVisibility(tt,true)
else
call SetTextTagVisibility(tt,false)
endif
set tt=null
endfunction
function KHF takes real VL8 returns string
if VL8>4.5 then
return"5.0"
elseif VL8>4. then
return"4.5"
elseif VL8>3.5 then
return"4.0"
elseif VL8>3. then
return"3.5"
elseif VL8>2.5 then
return"3.0"
elseif VL8>2. then
return"2.5"
elseif VL8>1.5 then
return"2.0"
elseif VL8>1. then
return"1.5"
elseif VL8>.5 then
return"1.0"
elseif VL8>.0 then
return"0.5"
else
return"0.0"
endif
return" "
endfunction
function KIF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=LUnit(W57,"Target")
local integer C77=GetTriggerEvalCount(t)
if C77>11 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
call KGF(KHF(5.5-.5*C77),X77,X77)
endif
set t=null
set X77=null
return false
endfunction
function KJF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local real KKF=LReal(EC8,"Damage")
local real KMF=P18(GetUnitState(m5,UNIT_STATE_LIFE)-KKF,1)
local real KNF=LReal(GetHandleId(m5),"ShallowGrave|FakeLife")
call SetUnitState(m5,UNIT_STATE_LIFE,KMF)
call SReal(GetHandleId(m5),"ShallowGrave|FakeLife",KNF-KKF)
call LT7(EC8)
call EA8(t)
set t=null
set m5=null
return false
endfunction
function KOF takes unit m5,real KKF returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local real KNF=LReal(GetHandleId(m5),"ShallowGrave|FakeLife")
call SUnit(EC8,"Target",m5)
call SReal(EC8,"Damage",KKF)
call SReal(GetHandleId(m5),"ShallowGrave|FakeLife",KNF+KKF)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function KJF))
set t=null
endfunction
function KPF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5
local real Wx
local real KKF
local integer iX=GetTriggerEvalCount(t)
local real KNF
local real KQF=LReal(EC8,"LastFrame")
local real KRF=LReal(EC8,"FrameDamage")
if KQF!=ZM7()then
set KQF=ZM7()
set KRF=0
call SReal(EC8,"LastFrame",KQF)
call SReal(EC8,"FrameDamage",KRF)
endif
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
set m5=GetTriggerUnit()
set KNF=LReal(GetHandleId(m5),"ShallowGrave|FakeLife")
set Wx=GetUnitState(m5,UNIT_STATE_LIFE)
set KKF=GetEventDamage()
if((Wx-KNF-KRF)-KKF)<1 then
call SetUnitState(m5,UNIT_STATE_LIFE,Wx+KKF+KRF)
call KOF(m5,KKF)
else
set KRF=KRF+KKF
call SReal(EC8,"FrameDamage",KRF)
endif
else
call EY8(LUnit(EC8,"Target"),"ShallowGrave|Active")
call DestroyEffect(LEff(EC8,"FX"))
call UnitRemoveAbility((LUnit(EC8,"Target")),'A21I')
call UnitRemoveAbility((LUnit(EC8,"Target")),'B07D')
call LT7(EC8)
call EA8(t)
endif
set m5=null
set t=null
return false
endfunction
function KSF takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
call AddPermanentAbility(X77,'A21I')
call TriggerRegisterTimerEvent(t,5,false)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function KPF))
call SEff(W57,"FX",AddSpecialEffectTarget("war3mapImported\\DarkHands.mdx",X77,"overhead"))
call SReal(GetHandleId(X77),"ShallowGrave|FakeLife",0)
call SReal(W57,"LastFrame",ZM7())
call SReal(W57,"FrameDamage",0)
call SUnit(W57,"Target",X77)
call EW8(X77,"ShallowGrave|Active")
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function KIF))
call SUnit(W57,"Target",X77)
set t=null
set Z77=null
set X77=null
endfunction
function KTF takes nothing returns boolean
if GetSpellAbilityId()=='A10L' then
call KSF()
endif
return false
endfunction
function EM9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function KTF))
set t=null
endfunction
function KUF takes nothing returns nothing
local unit m5=GetEnumUnit()
if O18(m5)==false then
call UnitRemoveAbility(m5,'A0NU')
call UnitRemoveAbility(m5,'A0NW')
elseif IsUnitType(m5,UNIT_TYPE_HERO)then
call TD8(m5,'A0NU',5.1)
call TD8(m5,'A0NW',5.1)
endif
set m5=null
endfunction
function KVF takes nothing returns nothing
local unit m5=GetEnumUnit()
if O18(m5)==false then
if IsUnitAlly(m5,I44)==false then
if HB4==0 then
call AddPermanentAbility(m5,'A0NU')
else
call SetUnitAbilityLevel(m5,'A0NU',HB4+1)
endif
else
if HB4==0 then
call AddPermanentAbility(m5,'A0NW')
else
call SetUnitAbilityLevel(m5,'A0NW',HB4+1)
endif
endif
endif
set m5=null
endfunction
function KWF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local group g=LGroup(EC8,"g")
local player p=ED8(EC8,"p")
local integer P89=GetTriggerEvalCount(t)
local real TL8=LReal(EC8,"Duration")
set I44=p
set HB4=P89
if time>TL8 then
call ForGroup(g,function KUF)
call OF8(g)
call LT7(EC8)
call EA8(t)
else
call ForGroup(g,function KVF)
endif
set t=null
set g=null
set p=null
return false
endfunction
function KXF takes nothing returns nothing
call QG8(I74,GetEnumUnit(),"chest",3)
call QG8(I74,GetEnumUnit(),"chest",3)
call QG8(I74,GetEnumUnit(),"right hand",3)
call QG8(I74,GetEnumUnit(),"left hand",3)
endfunction
function KYF takes nothing returns nothing
local unit N28=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local group g=OG8()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=GetUnitAbilityLevel(N28,'A10Q')
local integer TL8=20
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local unit AC7=CreateUnit(GetOwningPlayer(N28),'h007',x,y,0)
local boolean C7D=false
local real r=TA8*0.25+0.5
if TA8==0 then
set TA8=GetUnitAbilityLevel(N28,'A1DB')
set TL8=20
set C7D=true
set r=TA8*0.25+0.75
else
endif
call RemoveLocation(l)
set I74="Abilities\\Weapons\\AvengerMissile\\AvengerMissile.mdl"
call SetUnitVertexColor(AC7,255,255,255,255)
call UnitApplyTimedLife(AC7,'BTLF',5)
if C7D then
call GroupEnumUnitsInRange(g,x,y,800,Condition(function VJ8))
else
call GroupEnumUnitsInRange(g,x,y,600,Condition(function VJ8))
endif
call ForGroup(g,function KXF)
call SGroup(EC8,"g",g)
call DA8(EC8,"p",GetOwningPlayer(N28))
call SReal(EC8,"Duration",time+24)
call TriggerRegisterTimerEvent(t,KJ7/ r,true)
call TriggerAddCondition(t,Condition(function KWF))
call TriggerEvaluate(t)
set N28=null
set l=null
set g=null
set t=null
set AC7=null
endfunction
function KZF takes nothing returns boolean
if GetSpellAbilityId()=='A10Q' or GetSpellAbilityId()=='A1DB' then
call KYF()
endif
return false
endfunction
function EN9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function KZF))
call PU8('A0NU')
call PU8('A0NW')
set t=null
endfunction
function KAF takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),H24)==false then
set vZ=CreateUnit(GetOwningPlayer(H04),'e00E',GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(vZ),true)
call AddPermanentAbility(vZ,'A17N')
call SetUnitAbilityLevel(vZ,'A17N',S94)
call IssueTargetOrderById(vZ,852527,GetEnumUnit())
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(vZ),false)
call GroupAddUnit(H24,GetEnumUnit())
if HasLinkin(GetEnumUnit())==false and IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)and GU8(GetEnumUnit())==false then
call RW8(GetEnumUnit(),'B0AQ',1,15,LUnit(GetHandleId(GetTriggeringTrigger()),"Caster"),'A173',false)
endif
endif
endfunction
function KBF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local group g=LGroup(EC8,"g")
local unit oA=LUnit(EC8,"Caster")
local integer TA8=LInt(EC8,"Level")
local real RK=LReal(EC8,"Angle")
local group XS8
local real x
local real y
local real KCF
local real K3F
local real K6F=30
local unit KLF
set S94=TA8
if GetTriggerEvalCount(t)>28 then
call OF8(g)
call LT7(EC8)
call EA8(t)
call ShowUnit(oA,false)
call KillUnit(oA)
else
set x=GetUnitX(oA)
set y=GetUnitY(oA)
set XS8=OG8()
set H24=g
set H04=oA
set H64=TA8*70
call GroupEnumUnitsInRange(XS8,x,y,150,Condition(function VN8))
call ForGroup(XS8,function KAF)
call OF8(XS8)
set KCF=PQ8(x+K6F*Cos(RK*bj_DEGTORAD))
set K3F=PS8(y+K6F*Sin(RK*bj_DEGTORAD))
call SetUnitX(oA,KCF)
call SetUnitY(oA,K3F)
if ModuloInteger(GetTriggerEvalCount(t),3)==0 then
set KLF=CreateUnit(GetOwningPlayer(oA),'o01W',KCF,K3F,0)
call KillUnit(KLF)
endif
endif
set t=null
set g=null
set XS8=null
set oA=null
return false
endfunction
function K1F takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local group g=OG8()
local unit N28=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x1=GetUnitX(N28)
local real y1=GetUnitY(N28)
local real x2=GetLocationX(l)
local real y2=GetLocationY(l)
local real RK=YI7(x1,y1,x2,y2)
local integer TA8=GetUnitAbilityLevel(N28,'A173')
local unit oA=CreateUnit(GetOwningPlayer(N28),'h07K',x1,y1,RK)
call S68(QR,x1,y1)
call SUnit(EC8,"Caster",oA)
call SInt(EC8,"Level",TA8)
call SGroup(EC8,"g",g)
call SReal(EC8,"Angle",RK)
call SUnit(EC8,"Hero",N28)
call TriggerRegisterTimerEvent(t,.025,true)
call TriggerAddCondition(t,Condition(function KBF))
call RemoveLocation(l)
set t=null
set oA=null
set g=null
set N28=null
set l=null
endfunction
function K0F takes nothing returns boolean
if GetSpellAbilityId()=='A173' then
call K1F()
endif
return false
endfunction
function D49 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function K0F))
set t=null
endfunction
function K5F takes nothing returns nothing
local unit oA=CreateUnit(GetOwningPlayer(H04),'o00I',GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call UnitApplyTimedLife(oA,'BTLF',2)
set oA=null
endfunction
function K2F takes nothing returns boolean
return UM8()and GetUnitAbilityLevel(GetFilterUnit(),'B028')==0
endfunction
function PoisonNova_Iterate takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local integer K_F=LInt(EC8,"NovaLevel")
local real r=LReal(EC8,"r")
local group g
if GetTriggerEvalCount(t)>13 then
call LT7(EC8)
call EA8(t)
else
set r=r+53
call SReal(EC8,"r",r)
set g=OG8()
set H04=N28
set HB4=K_F
call GroupEnumUnitsInRange(g,GetUnitX(N28),GetUnitY(N28),r,Condition(function K2F))
call ForGroup(g,function K5F)
call OF8(g)
endif
set t=null
set N28=null
set g=null
return false
endfunction
function M4F takes nothing returns nothing
local unit N28=GetTriggerUnit()
local integer K_F
local integer i=1
local real x=GetUnitX(N28)
local real y=GetUnitY(N28)
local unit oA
if GetSpellAbilityId()=='A013'then
set K_F=GetUnitAbilityLevel(N28,'A013')
else
set K_F=GetUnitAbilityLevel(N28,'A0A6')+1
endif
loop
exitwhen i>18
set oA=CreateUnit(GetOwningPlayer(N28),'e017',x,y,0)
if(GetPlayerController(GetOwningPlayer(N28))==MAP_CONTROL_COMPUTER)then
call RemoveGuardPosition(oA)
endif
call AddPermanentAbility(oA,'A057')
call SetUnitAbilityLevel(oA,'A057',K_F)
call IssuePointOrderById(oA,851986,x+675*Cos(i*20*bj_DEGTORAD),y+675*Sin(i*20*bj_DEGTORAD))
call UnitApplyTimedLife(oA,'BTLF',1.15)
set i=i+1
endloop
set N28=null
set oA=null
endfunction
function M7F takes nothing returns boolean
if GetSpellAbilityId()=='A013'or GetSpellAbilityId()=='A0A6'then
call M4F()
endif
return false
endfunction
function D79 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function M7F))
set t=null
endfunction
function M8F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
call W78(Z77,0)
call EY8(Z77,"4277")
set t=null
set Z77=null
return false
endfunction
function M9F takes unit N99,unit m5 returns nothing
local real MDF='d'*GetUnitState(m5,UNIT_STATE_LIFE)/ GetUnitState(m5,UNIT_STATE_MAX_LIFE)
local real MEF=2.5*GetUnitAbilityLevel(N99,'A1A3')
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer FinalBonus
call EW8(N99,"4277")
call TriggerRegisterTimerEvent(t,.35,false)
call TriggerAddCondition(t,Condition(function M8F))
call SUnit(EC8,"Source",N99)
if IsUnitType(m5,UNIT_TYPE_HERO)==false then
set MEF=MEF/ 2
endif
if MDF>80 then
call W78(N99,R2I(MEF))
elseif MDF>60 then
call W78(N99,R2I(MEF*2))
elseif MDF>40 then
call W78(N99,R2I(MEF*2*2))
elseif MDF>20 then
call W78(N99,R2I(MEF*2*2*2))
else
call W78(N99,R2I(MEF*2*2*2*2))
endif
set t=null
endfunction
function MFF takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST then
if GetSpellAbilityId()=='A09V' and GetUnitAbilityLevel(GetTriggerUnit(),'A1A3')>0 then
call M9F(GetTriggerUnit(),GetSpellTargetUnit())
endif
else
if GetUnitAbilityLevel(GetAttacker(),'A1A3')>0 and IsUnitIllusion(GetAttacker())==false and IsUnitEnemy(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))and LState(GetAttacker(),"4277")==false then
call M9F(GetAttacker(),GetTriggerUnit())
endif
endif
return false
endfunction
function D89 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function MFF))
set t=null
endfunction
function MGF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local real LBD=(LoadReal(R8,(GetHandleId(X77)),(684)))
if GetTriggerEventId()==EVENT_WIDGET_DEATH or LBD<(TimerGetElapsed(E4))or GU8(X77)then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SaveReal(R8,(GetHandleId(X77)),(684),((0)*1.))
call UnitRemoveAbility(X77,'A23W')
call UnitRemoveAbility(X77,'A23U')
call UnitRemoveAbility(X77,'A23V')
call UnitRemoveAbility(X77,'A23X')
call UnitRemoveAbility(X77,'B0EA')
else
call Dmg(Z77,X77,NormalFire,5+5*ML8)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function MHF takes unit Z77,unit X77 returns nothing
local trigger t
local integer W57
local real LBD=(LoadReal(R8,(GetHandleId(X77)),(684)))
local integer ML8=GetUnitAbilityLevel(Z77,'A0MM')
if LBD>(TimerGetElapsed(E4))then
call SaveReal(R8,(GetHandleId(X77)),(684),(((TimerGetElapsed(E4))+KK7)*1.))
else
set t=CreateTrigger()
set W57=GetHandleId(t)
call SaveReal(R8,(GetHandleId(X77)),(684),(((TimerGetElapsed(E4))+KK7)*1.))
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function MGF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(5),(ML8))
if S_9(X77)==false then
if ML8==1 then
call AddPermanentAbility(X77,'A23W')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A23W',false)
elseif ML8==2 then
call AddPermanentAbility(X77,'A23U')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A23U',false)
elseif ML8==3 then
call AddPermanentAbility(X77,'A23V')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A23V',false)
elseif ML8==4 then
call AddPermanentAbility(X77,'A23X')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A23X',false)
endif
endif
endif
set t=null
set Z77=null
set X77=null
endfunction
function MIF takes nothing returns boolean
local unit Z77=GetTriggerUnit()
local unit X77=GetEventDamageSource()
if WL8(X77)then
set X77=(Y7[GetPlayerId(GetOwningPlayer((X77)))])
endif
if IsUnitType(X77,UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(Z77,'BNdo')==0 and IsUnitEnemy(Z77,GetOwningPlayer(X77))and GU8(X77)==false then
call MHF(Z77,X77)
endif
if HasLinkin(X77)==false then
call RW8(X77,'A23W',1,4,Z77,'A0MM',false)
endif
return false
endfunction
function MJF takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function MIF))
call SaveUnitHandle(R8,(GetHandleId(t)),(14),(GetTriggerUnit()))
set t=null
endfunction
function MKF takes nothing returns boolean
if GetLearnedSkill()=='A0MM' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A0MM')==1 then
call MJF()
endif
return false
endfunction
function D99 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function MKF))
set t=null
endfunction
function MMF takes nothing returns nothing
local unit X77=GetSpellTargetUnit()
call UnitRemoveAbility(X77,'BEsh')
call UnitRemoveAbility(X77,'B0AQ')
if HasLinkin(X77)==false then
call RW8(X77,'B001',1,5,GetTriggerUnit(),GetSpellAbilityId(),false)
endif
set X77=null
endfunction
function MNF takes nothing returns boolean
if GetSpellAbilityId()=='A080' or GetSpellAbilityId()=='A1UZ' then
call MMF()
endif
return false
endfunction
function DD9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function MNF))
set t=null
endfunction
function MOF takes nothing returns boolean
return GetSpellAbilityId()=='A08X'
endfunction
function MPF takes nothing returns nothing
local location YG9=GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLocFacingLocBJ(1,'e00E',GetOwningPlayer(GetSpellAbilityUnit()),YG9,YG9)
call RemoveLocation(YG9)
call UnitAddAbility(bj_lastCreatedUnit,'A09C')
call SetUnitAbilityLevelSwapped('A09C',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A08X',GetSpellAbilityUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852101,GetSpellAbilityUnit())
endfunction
function DF9 takes nothing returns nothing
local trigger t=CreateTrigger()
local integer i=1
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function MOF))
call TriggerAddAction(t,function MPF)
set t=null
loop
exitwhen i>5
call SetPlayerAbilityAvailable(G8[i],'AZ1C',false)
call SetPlayerAbilityAvailable(N8[i],'AZ1C',false)
set i=i+1
endloop
endfunction
function MQF takes unit Z77,integer TA8,integer MRF returns nothing
call UnitRemoveAbility(Z77,'A1KR')
call UnitRemoveAbility(Z77,'A1KS')
call UnitRemoveAbility(Z77,'A1KQ')
call UnitRemoveAbility(Z77,'A1KP')
call UnitRemoveAbility(Z77,'A1K1')
call UnitRemoveAbility(Z77,'A1KW')
call UnitRemoveAbility(Z77,'A1KX')
call UnitRemoveAbility(Z77,'A1KY')
call UnitRemoveAbility(Z77,'A1L4')
call UnitRemoveAbility(Z77,'A1L3')
call UnitRemoveAbility(Z77,'A1L2')
call UnitRemoveAbility(Z77,'A1L1')
call UnitRemoveAbility(Z77,'A1L8')
call UnitRemoveAbility(Z77,'A1L7')
call UnitRemoveAbility(Z77,'A1L9')
call UnitRemoveAbility(Z77,'A1LB')
if TA8==1 then
if MRF==1 then
call AddPermanentAbility(Z77,'A1KR')
elseif MRF==2 then
call AddPermanentAbility(Z77,'A1KS')
elseif MRF==3 then
call AddPermanentAbility(Z77,'A1KQ')
elseif MRF==4 then
call AddPermanentAbility(Z77,'A1KP')
endif
elseif TA8==2 then
if MRF==1 then
call AddPermanentAbility(Z77,'A1K1')
elseif MRF==2 then
call AddPermanentAbility(Z77,'A1KW')
elseif MRF==3 then
call AddPermanentAbility(Z77,'A1KX')
elseif MRF==4 then
call AddPermanentAbility(Z77,'A1KY')
endif
elseif TA8==3 then
if MRF==1 then
call AddPermanentAbility(Z77,'A1L4')
elseif MRF==2 then
call AddPermanentAbility(Z77,'A1L3')
elseif MRF==3 then
call AddPermanentAbility(Z77,'A1L2')
elseif MRF==4 then
call AddPermanentAbility(Z77,'A1L1')
endif
elseif TA8==4 then
if MRF==1 then
call AddPermanentAbility(Z77,'A1L8')
elseif MRF==2 then
call AddPermanentAbility(Z77,'A1L7')
elseif MRF==3 then
call AddPermanentAbility(Z77,'A1L9')
elseif MRF==4 then
call AddPermanentAbility(Z77,'A1LB')
endif
endif
endfunction
function MSF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer MTF=LInt(EC8,"ShellCache")
local unit Z77=LUnit(MTF,"Source")
local integer MRF=LInt(MTF,"ShellCounter")
local integer TA8=GetUnitAbilityLevel(Z77,'A0VX')
set MRF=PC8(MRF+1,4)
call SInt(MTF,"ShellCounter",MRF)
call MQF(Z77,TA8,MRF)
call LT7(EC8)
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function MUF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local integer MRF=LInt(EC8,"ShellCounter")
local integer TA8=GetUnitAbilityLevel(GetTriggerUnit(),'A0VX')
if GetEventDamage()>2 and GetEventDamageSource()!=GetTriggerUnit()and IsPlayer(GetOwningPlayer(GetEventDamageSource()))then
if MRF>0 then
endif
set MRF=P38(MRF-1,0)
call SInt(EC8,"ShellCounter",MRF)
call MQF(Z77,TA8,MRF)
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,14-TA8,false)
call TriggerAddCondition(t,Condition(function MSF))
call SInt(EC8,"ShellCache",GetHandleId(GetTriggeringTrigger()))
endif
set t=null
set Z77=null
return false
endfunction
function MVF takes nothing returns nothing
local trigger t
local integer EC8
local unit Z77=GetTriggerUnit()
local integer TA8=GetUnitAbilityLevel(GetTriggerUnit(),'A0VX')
if TA8==1 then
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function MUF))
call SUnit(EC8,"Source",Z77)
call SInt(EC8,"ShellCounter",4)
endif
call MQF(Z77,TA8,4)
set t=null
set Z77=null
endfunction
function MWF takes nothing returns boolean
if GetLearnedSkill()=='A0VX' and IsUnitIllusion(GetTriggerUnit())==false then
call MVF()
endif
return false
endfunction
function MXF takes player p returns nothing
call SetPlayerAbilityAvailable(p,'A1KR',false)
call SetPlayerAbilityAvailable(p,'A1KS',false)
call SetPlayerAbilityAvailable(p,'A1KQ',false)
call SetPlayerAbilityAvailable(p,'A1KP',false)
call SetPlayerAbilityAvailable(p,'A1KU',false)
call SetPlayerAbilityAvailable(p,'A1KV',false)
call SetPlayerAbilityAvailable(p,'A1K1',false)
call SetPlayerAbilityAvailable(p,'A1KW',false)
call SetPlayerAbilityAvailable(p,'A1KX',false)
call SetPlayerAbilityAvailable(p,'A1KY',false)
call SetPlayerAbilityAvailable(p,'A1KZ',false)
call SetPlayerAbilityAvailable(p,'A1KT',false)
call SetPlayerAbilityAvailable(p,'A1L4',false)
call SetPlayerAbilityAvailable(p,'A1L3',false)
call SetPlayerAbilityAvailable(p,'A1L2',false)
call SetPlayerAbilityAvailable(p,'A1L1',false)
call SetPlayerAbilityAvailable(p,'A1L0',false)
call SetPlayerAbilityAvailable(p,'A1L5',false)
call SetPlayerAbilityAvailable(p,'A1L8',false)
call SetPlayerAbilityAvailable(p,'A1L7',false)
call SetPlayerAbilityAvailable(p,'A1L9',false)
call SetPlayerAbilityAvailable(p,'A1LB',false)
call SetPlayerAbilityAvailable(p,'A1LA',false)
call SetPlayerAbilityAvailable(p,'A1L6',false)
call SetPlayerAbilityAvailable(p,'A1LH',false)
call SetPlayerAbilityAvailable(p,'A1M3',false)
call SetPlayerAbilityAvailable(p,'A1M4',false)
call SetPlayerAbilityAvailable(p,'A1MC',false)
call SetPlayerAbilityAvailable(p,'A1M7',false)
call SetPlayerAbilityAvailable(p,'A1M8',false)
call SetPlayerAbilityAvailable(p,'A1M9',false)
call SetPlayerAbilityAvailable(p,'A1MA',false)
call SetPlayerAbilityAvailable(p,'A1M5',false)
call SetPlayerAbilityAvailable(p,'A1MB',false)
call SetPlayerAbilityAvailable(p,'A1M6',false)
endfunction
function DH9 takes nothing returns nothing
local trigger t=CreateTrigger()
local integer i=0
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function MWF))
loop
exitwhen i>5
call MXF(G8[i])
call MXF(N8[i])
set i=i+1
endloop
set t=null
endfunction
function MYF takes nothing returns nothing
local integer ML8
local unit Z77=GetTriggerUnit()
local unit AC7
if GetUnitTypeId(Z77)=='u017' or GetUnitTypeId(Z77)=='u019' or GetUnitTypeId(Z77)=='u018' or GetUnitTypeId(Z77)=='u01A' or GetUnitTypeId(Z77)=='u01B' or GetUnitTypeId(Z77)=='u01C' or GetUnitTypeId(Z77)=='u01U' or GetUnitTypeId(Z77)=='u01V' or GetUnitTypeId(Z77)=='u01W' then
return
endif
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
if GetUnitTypeId(Z77)=='u014' or GetUnitTypeId(Z77)=='u01D' or GetUnitTypeId(Z77)=='u01R' then
set ML8=1
elseif GetUnitTypeId(Z77)=='u015' or GetUnitTypeId(Z77)=='u01E' or GetUnitTypeId(Z77)=='u01S' then
set ML8=2
else
set ML8=3
endif
call AddPermanentAbility(AC7,'A1NF')
call SetUnitAbilityLevel(AC7,'A1NF',ML8)
call IssueImmediateOrderById(AC7,852127)
set Z77=null
set AC7=null
endfunction
function MZF takes unit MAF,integer ST9,integer ML8 returns nothing
local integer MBF
if ML8==1 then
set MBF=8
elseif ML8==2 then
set MBF=14
elseif ML8==3 then
set MBF=22
endif
call W78(MAF,ST9*MBF)
endfunction
function MCF takes nothing returns boolean
local integer ST9
local integer KC8
local integer ML8
local unit MAF=GetAttacker()
local integer id=GetUnitTypeId(MAF)
if id=='u014' or id=='u015' or id=='u016' or id=='u01D' or id=='u01E' or id=='u01F' or id=='u01R' or id=='u01S' or id=='u01T' then
set KC8=GetHandleId(MAF)
set ML8=LInt(KC8,"Level")
set ST9=LInt(KC8,"Remaining")
set ST9=IMaxBJ(ST9-1,0)
call SInt(KC8,"Remaining",ST9)
call MZF(MAF,ST9,ML8)
endif
set MAF=null
return false
endfunction
function M3F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit MAF=LUnit(W57,"Source")
local unit Z77=MAF
local integer ML8=LInt(W57,"Level")
local integer VHD=LInt(W57,"Counter")
local integer ST9=LInt(GetHandleId(MAF),"Remaining")
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call LT7(W57)
call EA8(t)
else
set VHD=VHD+1
call SInt(W57,"Counter",VHD)
if ModuloInteger(VHD,15)==0 then
set ST9=IMinBJ(ST9+1,7)
call SInt(GetHandleId(MAF),"Remaining",ST9)
endif
if GetUnitTypeId(Z77)=='u017' or GetUnitTypeId(Z77)=='u019' or GetUnitTypeId(Z77)=='u018' or GetUnitTypeId(Z77)=='u01A' or GetUnitTypeId(Z77)=='u01B' or GetUnitTypeId(Z77)=='u01C' or GetUnitTypeId(Z77)=='u01U' or GetUnitTypeId(Z77)=='u01V' or GetUnitTypeId(Z77)=='u01W' then
set ST9=7
call SInt(GetHandleId(MAF),"Remaining",ST9)
endif
call MZF(MAF,ST9,ML8)
if GetUnitTypeId(MAF)=='u017' or GetUnitTypeId(MAF)=='u019' or GetUnitTypeId(MAF)=='u018' or GetUnitTypeId(MAF)=='u01A' or GetUnitTypeId(MAF)=='u01B' or GetUnitTypeId(MAF)=='u01C' or GetUnitTypeId(MAF)=='u01U' or GetUnitTypeId(MAF)=='u01V' or GetUnitTypeId(MAF)=='u01W' then
call SetUnitState(MAF,UNIT_STATE_LIFE,GetUnitState(MAF,UNIT_STATE_LIFE)+31.25+18.75*ML8)
endif
endif
set t=null
set MAF=null
return false
endfunction
function M6F takes nothing returns boolean
if GetUnitTypeId(GetFilterUnit())=='u014' or GetUnitTypeId(GetFilterUnit())=='u015' or GetUnitTypeId(GetFilterUnit())=='u016' or GetUnitTypeId(GetFilterUnit())=='u01D' or GetUnitTypeId(GetFilterUnit())=='u01E' or GetUnitTypeId(GetFilterUnit())=='u01F' or GetUnitTypeId(GetFilterUnit())=='u01R' or GetUnitTypeId(GetFilterUnit())=='u01S' or GetUnitTypeId(GetFilterUnit())=='u01T' or GetUnitTypeId(GetFilterUnit())=='u017' or GetUnitTypeId(GetFilterUnit())=='u019' or GetUnitTypeId(GetFilterUnit())=='u018' or GetUnitTypeId(GetFilterUnit())=='u01A' or GetUnitTypeId(GetFilterUnit())=='u01B' or GetUnitTypeId(GetFilterUnit())=='u01C' or GetUnitTypeId(GetFilterUnit())=='u01U' or GetUnitTypeId(GetFilterUnit())=='u01V' or GetUnitTypeId(GetFilterUnit())=='u01W' then
call KillUnit(GetFilterUnit())
endif
return false
endfunction
function MLF takes nothing returns nothing
local group g=OG8()
local unit Z77=GetTriggerUnit()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local integer ML8=GetUnitAbilityLevel(Z77,'A1NE')
local unit M1F
local unit M0F
local unit M5F
local trigger t
local integer W57
local boolean MBE=false
call GroupEnumUnitsOfPlayer(g,GetOwningPlayer(Z77),Condition(function M6F))
call OF8(g)
if ML8==0 then
set ML8=GetUnitAbilityLevel(Z77,'A2IG')
set MBE=true
endif
if ML8==1 then
set M1F=CreateUnit(GetOwningPlayer(Z77),'u014',x+75,y+75,GetUnitFacing(Z77))
set M0F=CreateUnit(GetOwningPlayer(Z77),'u01D',x-75,y-75,GetUnitFacing(Z77))
elseif ML8==2 then
set M1F=CreateUnit(GetOwningPlayer(Z77),'u015',x+75,y+75,GetUnitFacing(Z77))
set M0F=CreateUnit(GetOwningPlayer(Z77),'u01E',x-75,y-75,GetUnitFacing(Z77))
elseif ML8==3 then
set M1F=CreateUnit(GetOwningPlayer(Z77),'u016',x+75,y+75,GetUnitFacing(Z77))
set M0F=CreateUnit(GetOwningPlayer(Z77),'u01F',x-75,y-75,GetUnitFacing(Z77))
endif
call SelectUnitAddForPlayer(M1F,GetOwningPlayer(Z77))
call SelectUnitAddForPlayer(M0F,GetOwningPlayer(Z77))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",M1F,"origin"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",M0F,"origin"))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,M1F,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function M3F))
call SUnit(W57,"Source",M1F)
call SInt(W57,"Level",ML8)
call SInt(W57,"Counter",0)
call SInt(GetHandleId(M1F),"Remaining",7)
call SInt(GetHandleId(M1F),"Level",ML8)
call MZF(M1F,7,ML8)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,M0F,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function M3F))
call SUnit(W57,"Source",M0F)
call SInt(W57,"Level",ML8)
call SInt(W57,"Counter",0)
call SInt(GetHandleId(M0F),"Remaining",7)
call SInt(GetHandleId(M0F),"Level",ML8)
call MZF(M0F,7,ML8)
if MBE then
if ML8==1 then
set M5F=CreateUnit(GetOwningPlayer(Z77),'u01R',x+75,y,GetUnitFacing(Z77))
elseif ML8==2 then
set M5F=CreateUnit(GetOwningPlayer(Z77),'u01S',x+75,y,GetUnitFacing(Z77))
elseif ML8==3 then
set M5F=CreateUnit(GetOwningPlayer(Z77),'u01T',x+75,y,GetUnitFacing(Z77))
endif
call SelectUnitAddForPlayer(M5F,GetOwningPlayer(Z77))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",M5F,"origin"))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,M5F,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function M3F))
call SUnit(W57,"Source",M5F)
call SInt(W57,"Level",ML8)
call SInt(W57,"Counter",0)
call SInt(GetHandleId(M5F),"Remaining",7)
call SInt(GetHandleId(M5F),"Level",ML8)
call MZF(M5F,7,ML8)
endif
set g=null
set Z77=null
set M1F=null
set M0F=null
set M5F=null
endfunction
function M2F takes nothing returns boolean
if GetSpellAbilityId()=='A1NE' or GetSpellAbilityId()=='A2IG' then
call MLF()
elseif GetSpellAbilityId()=='A1NB' or GetSpellAbilityId()=='A1NC' or GetSpellAbilityId()=='A1ND' or GetSpellAbilityId()=='A1NL' or GetSpellAbilityId()=='A1NM' or GetSpellAbilityId()=='A1NN' or GetSpellAbilityId()=='A2IZ' or GetSpellAbilityId()=='A2J0' or GetSpellAbilityId()=='A2J1' then
call MYF()
endif
return false
endfunction
function DE9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function M2F))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function MCF))
set t=null
endfunction
function M_F takes unit Z77,integer YLE,integer N4F returns nothing
local string c1="|c0000cc00"
local string c="||"
local string p=" "
local string s=c1+"|||r"
local string N7F
local boolean N8F=false
local texttag tt=LTTag(GetHandleId(Z77),"SoulAssumption|Text")
if YLE==0 then
set N7F=" "
elseif N4F==1 then
if YLE==0 then
set N7F=c+p+c+p+c
elseif YLE==1 then
set N7F=s+p+c+p+c
elseif YLE==2 then
set N7F=s+p+s+p+c
elseif YLE==3 then
set N7F=s+p+s+p+s
endif
elseif N4F==2 then
if YLE==0 then
set N7F=c+p+c+p+c+p+c
elseif YLE==1 then
set N7F=s+p+c+p+c+p+c
elseif YLE==2 then
set N7F=s+p+s+p+c+p+c
elseif YLE==3 then
set N7F=s+p+s+p+s+p+c
elseif YLE==4 then
set N7F=s+p+s+p+s+p+s
endif
elseif N4F==3 then
if YLE==0 then
set N7F=c+p+c+p+c+p+c+p+c
elseif YLE==1 then
set N7F=s+p+c+p+c+p+c+p+c
elseif YLE==2 then
set N7F=s+p+s+p+c+p+c+p+c
elseif YLE==3 then
set N7F=s+p+s+p+s+p+c+p+c
elseif YLE==4 then
set N7F=s+p+s+p+s+p+s+p+c
elseif YLE==5 then
set N7F=s+p+s+p+s+p+s+p+s
endif
elseif N4F==4 then
if YLE==0 then
set N7F=c+p+c+p+c+p+c+p+c+p+c
elseif YLE==1 then
set N7F=s+p+c+p+c+p+c+p+c+p+c
elseif YLE==2 then
set N7F=s+p+s+p+c+p+c+p+c+p+c
elseif YLE==3 then
set N7F=s+p+s+p+s+p+c+p+c+p+c
elseif YLE==4 then
set N7F=s+p+s+p+s+p+s+p+c+p+c
elseif YLE==5 then
set N7F=s+p+s+p+s+p+s+p+s+p+c
elseif YLE==6 then
set N7F=s+p+s+p+s+p+s+p+s+p+s
endif
endif
call SetTextTagText(tt,N7F,.023)
if GetOwningPlayer(Z77)==GetLocalPlayer()then
set N8F=true
endif
if O18(Z77)then
set N8F=false
endif
call SetTextTagPosUnit(tt,Z77,0)
call SetTextTagVisibility(tt,N8F)
call SetTextTagPermanent(tt,true)
endfunction
function N9F takes unit N28,integer TA8 returns nothing
local integer NDF=GetUnitAbilityLevel(N28,'A1NA')
call M_F(N28,TA8,NDF)
if TA8==0 or LState(N28,"SoulAssumptionState")then
call UnitRemoveAbility(N28,'A1O7')
call UnitRemoveAbility(N28,'A1O8')
call UnitRemoveAbility(N28,'A1O9')
call AddPermanentAbility(N28,'A1O1')
call UnitRemoveAbility(N28,'A1O2')
call UnitRemoveAbility(N28,'A1NZ')
call UnitRemoveAbility(N28,'A1N9')
call UnitRemoveAbility(N28,'A1NY')
call UnitRemoveAbility(N28,'A1O0')
call UnitRemoveAbility(N28,'A1O3')
call UnitRemoveAbility(N28,'A0LR')
call UnitRemoveAbility(N28,'A0YP')
call UnitRemoveAbility(N28,'A0OG')
call UnitRemoveAbility(N28,'A0YO')
call UnitRemoveAbility(N28,'A0NF')
call UnitRemoveAbility(N28,'A0MD')
elseif TA8==1 then
call UnitRemoveAbility(N28,'A1O7')
call UnitRemoveAbility(N28,'A1O8')
call UnitRemoveAbility(N28,'A1O9')
call UnitRemoveAbility(N28,'A1O1')
call AddPermanentAbility(N28,'A1O2')
call UnitRemoveAbility(N28,'A1NZ')
call UnitRemoveAbility(N28,'A1N9')
call UnitRemoveAbility(N28,'A1NY')
call UnitRemoveAbility(N28,'A1O0')
call UnitRemoveAbility(N28,'A1O3')
call AddPermanentAbility(N28,'A0LR')
call UnitRemoveAbility(N28,'A0YP')
call UnitRemoveAbility(N28,'A0OG')
call UnitRemoveAbility(N28,'A0YO')
call UnitRemoveAbility(N28,'A0NF')
call UnitRemoveAbility(N28,'A0MD')
elseif TA8==2 then
call UnitRemoveAbility(N28,'A1O7')
call UnitRemoveAbility(N28,'A1O8')
call UnitRemoveAbility(N28,'A1O9')
call UnitRemoveAbility(N28,'A1O1')
call UnitRemoveAbility(N28,'A1O2')
call AddPermanentAbility(N28,'A1NZ')
call UnitRemoveAbility(N28,'A1N9')
call UnitRemoveAbility(N28,'A1NY')
call UnitRemoveAbility(N28,'A1O0')
call UnitRemoveAbility(N28,'A1O3')
call UnitRemoveAbility(N28,'A0LR')
call AddPermanentAbility(N28,'A0YP')
call UnitRemoveAbility(N28,'A0OG')
call UnitRemoveAbility(N28,'A0YO')
call UnitRemoveAbility(N28,'A0NF')
call UnitRemoveAbility(N28,'A0MD')
elseif TA8==3 then
call UnitRemoveAbility(N28,'A1O7')
call UnitRemoveAbility(N28,'A1O8')
call UnitRemoveAbility(N28,'A1O9')
call UnitRemoveAbility(N28,'A0LR')
call UnitRemoveAbility(N28,'A0YP')
call AddPermanentAbility(N28,'A0OG')
call UnitRemoveAbility(N28,'A0YO')
call UnitRemoveAbility(N28,'A0NF')
call UnitRemoveAbility(N28,'A0MD')
call UnitRemoveAbility(N28,'A1O1')
call UnitRemoveAbility(N28,'A1O2')
call UnitRemoveAbility(N28,'A1NZ')
call UnitRemoveAbility(N28,'A1N9')
call UnitRemoveAbility(N28,'A1NY')
call UnitRemoveAbility(N28,'A1O0')
call UnitRemoveAbility(N28,'A1O3')
if NDF==1 then
call AddPermanentAbility(N28,'A1O7')
else
call AddPermanentAbility(N28,'A1N9')
endif
elseif TA8==4 then
call UnitRemoveAbility(N28,'A1O7')
call UnitRemoveAbility(N28,'A1O8')
call UnitRemoveAbility(N28,'A1O9')
call UnitRemoveAbility(N28,'A0LR')
call UnitRemoveAbility(N28,'A0YP')
call UnitRemoveAbility(N28,'A0OG')
call AddPermanentAbility(N28,'A0YO')
call UnitRemoveAbility(N28,'A0NF')
call UnitRemoveAbility(N28,'A0MD')
call UnitRemoveAbility(N28,'A1O1')
call UnitRemoveAbility(N28,'A1O2')
call UnitRemoveAbility(N28,'A1NZ')
call UnitRemoveAbility(N28,'A1N9')
call UnitRemoveAbility(N28,'A1NY')
call UnitRemoveAbility(N28,'A1O0')
call UnitRemoveAbility(N28,'A1O3')
if NDF==2 then
call AddPermanentAbility(N28,'A1O8')
else
call AddPermanentAbility(N28,'A1NY')
endif
elseif TA8==5 then
call UnitRemoveAbility(N28,'A1O7')
call UnitRemoveAbility(N28,'A1O8')
call UnitRemoveAbility(N28,'A1O9')
call UnitRemoveAbility(N28,'A1O1')
call UnitRemoveAbility(N28,'A1O2')
call UnitRemoveAbility(N28,'A1NZ')
call UnitRemoveAbility(N28,'A1N9')
call UnitRemoveAbility(N28,'A1NY')
call AddPermanentAbility(N28,'A1O0')
call UnitRemoveAbility(N28,'A1O3')
call UnitRemoveAbility(N28,'A0LR')
call UnitRemoveAbility(N28,'A0YP')
call UnitRemoveAbility(N28,'A0OG')
call UnitRemoveAbility(N28,'A0YO')
call AddPermanentAbility(N28,'A0NF')
call UnitRemoveAbility(N28,'A0MD')
call UnitRemoveAbility(N28,'A1O1')
call UnitRemoveAbility(N28,'A1O2')
call UnitRemoveAbility(N28,'A1NZ')
call UnitRemoveAbility(N28,'A1N9')
call UnitRemoveAbility(N28,'A1NY')
call UnitRemoveAbility(N28,'A1O0')
call UnitRemoveAbility(N28,'A1O3')
if NDF==3 then
call AddPermanentAbility(N28,'A1O9')
else
call AddPermanentAbility(N28,'A1O0')
endif
elseif TA8==6 then
call UnitRemoveAbility(N28,'A1O7')
call UnitRemoveAbility(N28,'A1O8')
call UnitRemoveAbility(N28,'A1O9')
call UnitRemoveAbility(N28,'A1O1')
call UnitRemoveAbility(N28,'A1O2')
call UnitRemoveAbility(N28,'A1NZ')
call UnitRemoveAbility(N28,'A1N9')
call UnitRemoveAbility(N28,'A1NY')
call UnitRemoveAbility(N28,'A1O0')
call AddPermanentAbility(N28,'A1O3')
call UnitRemoveAbility(N28,'A0LR')
call UnitRemoveAbility(N28,'A0YP')
call UnitRemoveAbility(N28,'A0OG')
call UnitRemoveAbility(N28,'A0YO')
call UnitRemoveAbility(N28,'A0NF')
call AddPermanentAbility(N28,'A0MD')
endif
if(GetUnitAbilityLevel(N28,'A1NA')+2)==TA8 then
call AddPermanentAbility(N28,'A1NJ')
else
call UnitRemoveAbility(N28,'A1NJ')
endif
endfunction
function NEF takes unit Z77,real P99 returns nothing
local integer TA8=0
local real NFF='n'
if P99>NFF*6 then
set TA8=6
elseif P99>NFF*5 then
set TA8=5
elseif P99>NFF*4 then
set TA8=4
elseif P99>NFF*3 then
set TA8=3
elseif P99>NFF*2 then
set TA8=2
elseif P99>NFF*1 then
set TA8=1
endif
set TA8=PC8(TA8,2+GetUnitAbilityLevel(Z77,'A1NA'))
call SInt(GetHandleId(Z77),"Level",TA8)
call N9F(Z77,TA8)
endfunction
function NGF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local integer TA8=GetUnitAbilityLevel(Z77,'A1NA')
call M_F(Z77,LInt(GetHandleId(Z77),"Level"),TA8)
call NEF(Z77,LReal(GetHandleId(Z77),"RecentDamage"))
set t=null
set Z77=null
return false
endfunction
function NHF takes nothing returns nothing
local integer EC8=GetHandleId(GetTriggeringTrigger())
local unit Z77=H04
local unit m5=H54
local real P99=LReal(EC8,"Damage")
if IsUnitAlly(m5,GetOwningPlayer(Z77))==false then
set f3=true
call Dmg(Z77,m5,NormalFire,P99)
set f3=false
else
call SetUnitState(m5,UNIT_STATE_LIFE,GetUnitState(m5,UNIT_STATE_LIFE)+P99)
endif
set Z77=null
set m5=null
endfunction
function NIF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
call NEF(Z77,LReal(GetHandleId(Z77),"RecentDamage"))
call LT7(EC8)
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function NJF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local integer TA8=LInt(GetHandleId(Z77),"Level")
local trigger t=T88(Z77,m5,'h0BE',"NHF",1000)
local integer EC8=GetHandleId(t)
call SReal(EC8,"Damage",(20+TA8*65)*1.)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AntiMagicShell\\AntiMagicShell.mdl",Z77,"chest"))
call SReal(GetHandleId(Z77),"RecentDamage",0*1.)
call NEF(Z77,0)
call AddTimedBoolBuff(Z77,"SoulAssumptionState",4)
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerAddCondition(t,Condition(function NIF))
call TriggerRegisterTimerEvent(t,4,false)
call SUnit(EC8,"Source",Z77)
set Z77=null
set m5=null
set t=null
endfunction
function NKF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local real P99=LReal(EC8,"Damage")
if GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='A1NA')then
if GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT then
call SReal(GetHandleId(Z77),"RecentDamage",(LReal(GetHandleId(Z77),"RecentDamage")-P99)*1.)
endif
call NEF(Z77,LReal(GetHandleId(Z77),"RecentDamage"))
call LT7(EC8)
call EA8(t)
endif
set t=null
set Z77=null
return false
endfunction
function NMF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local integer EC8=GetHandleId(Z77)
local texttag tt=CreateTextTag()
local boolean N8F=false
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function NGF))
call SUnit(GetHandleId(t),"Source",Z77)
if GetOwningPlayer(Z77)==GetLocalPlayer()then
set N8F=true
endif
call SetTextTagText(tt," ",.023)
call SetTextTagPosUnit(tt,Z77,0)
call SetTextTagVisibility(tt,N8F)
call SetTextTagPermanent(tt,true)
set D3[GetPlayerId(GetOwningPlayer(Z77))]=Z77
call SReal(EC8,"RecentDamage",0*1.)
call NEF(Z77,0)
call STTag(EC8,"SoulAssumption|Text",tt)
set Z77=null
set t=null
set tt=null
endfunction
function NNF takes unit NOF,unit NPF returns nothing
local real P99=GetEventDamage()
local integer TA8=GetUnitAbilityLevel(NOF,'A1NA')
local real NQF=LReal(GetHandleId(NOF),"RecentDamage")
local trigger t
local integer EC8
if Z47(NOF,NPF)<1400 and f3==false then
if W18(P99)and GetEventDamage()>2 and GetEventDamageSource()!=GetTriggerUnit()and(IsPlayer(GetOwningPlayer(GetEventDamageSource()))or GetUnitTypeId(GetEventDamageSource())=='n00L')then
set NQF=NQF+P99
call SReal(GetHandleId(NOF),"RecentDamage",NQF*1.)
set t=CreateTrigger()
set EC8=GetHandleId(t)
call SUnit(EC8,"Source",NOF)
call SReal(EC8,"Damage",P99*1.)
call TriggerRegisterTimerEvent(t,6,false)
call TriggerRegisterUnitEvent(t,NOF,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,NOF,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function NKF))
call NEF(NOF,NQF)
endif
endif
set t=null
endfunction
function NRF takes nothing returns nothing
local integer i=0
loop
exitwhen i>12
if D3[i]!=null then
call NNF(D3[i],GetTriggerUnit())
endif
set i=i+1
endloop
endfunction
function NSF takes nothing returns boolean
if GetLearnedSkill()=='A1NA' and GetUnitAbilityLevel(GetTriggerUnit(),'A1NA')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call NMF()
endif
return false
endfunction
function NTF takes nothing returns boolean
if GetSpellAbilityId()=='A1NA' then
call NJF()
endif
return false
endfunction
function DG9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function NSF))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function NTF))
set t=null
call NF9("NRF")
endfunction
function NUF takes nothing returns boolean
return GetSpellAbilityId()=='A06P'
endfunction
function NVF takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(W8))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1
endfunction
function NWF takes nothing returns nothing
local unit m5=GetEnumUnit()
local unit oA=CreateUnit(GetOwningPlayer(W8),'e00C',GetUnitX(m5),GetUnitY(m5),0)
call AddPermanentAbility(oA,'A0JE')
call SetUnitAbilityLevel(oA,'A0JE',X8)
call IssueTargetOrderById(oA,852075,m5)
call UnitApplyTimedLifeBJ(2.,'BTLF',oA)
call UnitAddAbility(oA,'Aloc')
set oA=null
set m5=null
endfunction
function NXF takes unit AC7,unit N28 returns nothing
local group XS8=OG8()
local boolexpr hP=Condition(function NVF)
set W8=N28
call GroupEnumUnitsInRange(XS8,GetUnitX(AC7),GetUnitY(AC7),675,hP)
call ForGroup(XS8,function NWF)
call OF8(XS8)
call DestroyBoolExpr(hP)
set XS8=null
set hP=null
endfunction
function NYF takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28
local unit oA=LUnit(EC8,"Caster")
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST then
call KillUnit(oA)
call LT7(EC8)
call EA8(t)
elseif GetTriggerEvalCount(t)>34 then
call KillUnit(oA)
call LT7(EC8)
call EA8((t))
call ZN7(LUnit(EC8,"Hero"))
else
call SetUnitAnimation(oA,"birth")
set N28=LUnit(EC8,"Hero")
set X8=GetTriggerExecCount(t)*GetUnitAbilityLevel(N28,'A06P')/ 2
call NXF(oA,N28)
endif
set t=null
set oA=null
set N28=null
endfunction
function NZF takes nothing returns nothing
local unit N28=GetTriggerUnit()
local location Mk=GetSpellTargetLoc()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local real x=GetLocationX(Mk)
local real y=GetLocationY(Mk)
local unit oA=CreateUnit(GetOwningPlayer(N28),'e01G',x,y,0)
call RemoveLocation(Mk)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_SPELL_ENDCAST)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddAction(t,function NYF)
call SUnit(EC8,"Hero",N28)
call SUnit(EC8,"Caster",oA)
set N28=null
set Mk=null
set t=null
set oA=null
endfunction
function E49 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(t,function NZF)
call TriggerAddCondition(t,Condition(function NUF))
call PU8('A0JE')
set t=null
endfunction
function NAF takes nothing returns boolean
return GetSpellAbilityId()=='A0J5'
endfunction
function NBF takes nothing returns nothing
call AddPermanentAbility(GetEnumUnit(),'A0P2')
endfunction
function NCF takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'A0P2')
endfunction
function N3F takes unit N6F,unit NLF returns nothing
if N6F!=null and NLF!=null then
call QK8("CLPB",GetUnitX(N6F),GetUnitY(N6F),GetUnitX(NLF),GetUnitY(NLF),.7,.1,.9,1,.3)
endif
endfunction
function N1F takes nothing returns nothing
local unit N28=LUnit(GetHandleId(GetTriggeringTrigger()),"Hero")
local real P99=.2*GetEventDamage()
set P99=PL8(P99,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE))
if GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)>1 and GetEnumUnit()!=GetTriggerUnit()then
if GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)<P99 then
call Dmg(N28,GetEnumUnit(),HeroMagic,P99)
else
call TV8(GetEnumUnit(),P99)
endif
endif
set N28=null
endfunction
function N0F takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local group XS8=LGroup(EC8,"Group")
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
call ForGroup(XS8,function NCF)
call LT7(EC8)
call OF8(XS8)
call EA8(t)
elseif GetEventDamage()>10 and GetEventDamage()<6000 then
call DisableTrigger(t)
call ForGroup(XS8,function N1F)
call EnableTrigger(t)
endif
set t=null
set XS8=null
endfunction
function N5F takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1
endfunction
function CritChainChooseTargetEnum takes nothing returns nothing
local real r=Dist_Uxy(GetEnumUnit(),globalX,globalY)
if r<globalR then
set globalR=r
set globalU=GetEnumUnit()
endif
endfunction
function CriticalLinkChooseTarget takes group a,group b,trigger t,integer l,unit s returns integer
local integer i=0
local string str="Abilities\\Spells\\Undead\\Curse\\CurseTarget.mdl"
set globalX=GetUnitX(s)
set globalY=GetUnitY(s)
loop
exitwhen i>l or FirstOfGroup(a)==null
set globalR=99999
set globalU=null
call ForGroup(a,function CritChainChooseTargetEnum)
if globalU!=null then
call GroupRemoveUnit(a,globalU)
call GroupAddUnit(b,globalU)
call TriggerRegisterUnitEvent(t,globalU,EVENT_UNIT_DAMAGED)
call N3F(globalS,globalU)
call QG8(str,globalU,"overhead",25)
set globalS=globalU
else
exitwhen true
endif
set i=i+1
endloop
return i
endfunction
function N2F takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local group XS8=OG8()
local integer TA8=GetUnitAbilityLevel(N28,'A0J5')
local boolexpr hP=Condition(function N5F)
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer i
local group N_F=OG8()
local string O7F="Abilities\\Spells\\Undead\\Curse\\CurseTarget.mdl"
call SUnit(EC8,"Hero",N28)
call N3F(N28,m5)
call QG8(O7F,m5,"overhead",25)
call SUnit(EC8,"Unit1",m5)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call GroupEnumUnitsInRange(XS8,GetUnitX(m5),GetUnitY(m5),600,hP)
call GroupRemoveUnit(XS8,m5)
call GroupAddUnit(N_F,m5)
call SGroup(EC8,"Group",N_F)
set globalS=m5
set i=CriticalLinkChooseTarget(XS8,N_F,t,TA8,m5)
call SInt(EC8,"FXCount",i-1)
set X8=GetUnitAbilityLevel(N28,'A0J5')
call ForGroup(N_F,function NBF)
call TriggerRegisterTimerEvent(t,25,false)
call TriggerAddAction(t,function N0F)
call DestroyBoolExpr(hP)
set N28=null
set m5=null
call OF8(XS8)
set XS8=null
set hP=null
set t=null
set N_F=null
endfunction
function E79 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function NAF))
call TriggerAddAction(t,function N2F)
call PU8('A0J9')
set t=null
endfunction
function O8F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
local integer ML8=GetUnitAbilityLevel(Z77,'A0AS')
if GetTriggerEvalCount(t)>11 or GetTriggerEventId()==EVENT_UNIT_DEATH then
call DestroyEffect(LEff(EC8,"FX"))
call UnitRemoveAbility(m5,'A17K')
call UnitRemoveAbility(m5,'B0AP')
call LT7(EC8)
call EA8(t)
else
call Dmg(Z77,m5,NormalFire,ML8*10+5)
endif
set Z77=null
set m5=null
set t=null
return false
endfunction
function O9F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
local integer TA8=GetUnitAbilityLevel(Z77,'A0AS')
if GetTriggerEvalCount(t)>9 or GetTriggerEventId()==EVENT_UNIT_DEATH then
call DestroyEffect(LEff(EC8,"FX"))
call UnitRemoveAbility(m5,'A0P0')
call UnitRemoveAbility(m5,'B073')
call LT7(EC8)
call EA8(t)
else
call P_8(m5,TA8*10+5)
endif
set Z77=null
set m5=null
set t=null
return false
endfunction
function ODF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call SUnit(EC8,"Target",m5)
call SUnit(EC8,"Source",Z77)
if IsUnitAlly(m5,GetOwningPlayer(Z77))then
call TriggerAddCondition(t,Condition(function O9F))
call SEff(EC8,"FX",AddSpecialEffectTarget("Abilities\\Spells\\Items\\StaffOfSanctuary\\Staff_Sanctuary_Target.mdl",m5,"chest"))
call AddPermanentAbility(m5,'A0P0')
elseif HasLinkin(GetSpellTargetUnit())==false then
call TriggerAddCondition(t,Condition(function O8F))
call SEff(EC8,"FX",AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Voodoo\\VoodooAuraTarget.mdl",m5,"overhead"))
call AddPermanentAbility(m5,'A17K')
call RW8(m5,'B07K',1,9,Z77,'A0AS',false)
endif
set Z77=null
set m5=null
set t=null
endfunction
function OEF takes nothing returns boolean
if GetSpellAbilityId()=='A0AS' then
call ODF()
endif
return false
endfunction
function E89 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OEF))
call PU8('A0P0')
call PU8('A17K')
set t=null
endfunction
function OFF takes nothing returns nothing
call Dmg(Y94,GetEnumUnit(),NormalFire,20+10*YD4)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Immolation\\ImmolationDamage.mdl",GetEnumUnit(),"head"))
endfunction
function OGF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer ML8
local integer MB8=GetUnitTypeId(Z77)
local group g
if MB8=='n00U' or MB8=='n0KU' then
set ML8=1
elseif MB8=='n00Y' or MB8=='n0KV' then
set ML8=2
elseif MB8=='n00Z' or MB8=='n0KW' then
set ML8=3
endif
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set H04=Z77
set Y94=Z77
set YD4=ML8
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),275,Condition(function UM8))
call ForGroup(g,function OFF)
call OF8(g)
set g=null
endif
set t=null
set Z77=null
return false
endfunction
function OHF takes unit u returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function OGF))
call SaveUnitHandle(R8,(W57),(2),(u))
set t=null
endfunction
function OIF takes nothing returns boolean
local integer MB8=GetUnitTypeId(GetTriggerUnit())
if MB8=='n00U' or MB8=='n0KU' or MB8=='n00Y' or MB8=='n0KV' or MB8=='n00Z' or MB8=='n0KW' then
call OHF(GetTriggerUnit())
endif
return false
endfunction
function OJF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local real ZLD=(LoadReal(R8,(W57),(191)))
local real Z1D=(LoadReal(R8,(W57),(192)))
local integer ML8=GetUnitAbilityLevel(Z77,'S00U')
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',ZLD,Z1D,0)
call AddPermanentAbility(AC7,'S00U')
call SetUnitAbilityLevel(AC7,'S00U',ML8)
call IssuePointOrderById(AC7,852224,x,y)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set Z77=null
set AC7=null
set t=null
return false
endfunction
function OKF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.3,false)
call TriggerAddCondition(t,Condition(function OJF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(6),((GetSpellTargetX())*1.))
call SaveReal(R8,(W57),(7),((GetSpellTargetY())*1.))
call SaveReal(R8,(W57),(191),((GetUnitX(Z77))*1.))
call SaveReal(R8,(W57),(192),((GetUnitY(Z77))*1.))
set Z77=null
set t=null
endfunction
function OMF takes nothing returns boolean
if GetSpellAbilityId()=='S00U' and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)then
call OKF()
endif
return false
endfunction
function E99 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OMF))
set t=CreateTrigger()
call TriggerRegisterEnterRectSimple(t,GetEntireMapRect())
call TriggerAddCondition(t,Condition(function OIF))
set t=null
endfunction
function ONF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
if GetUnitAbilityLevel(N28,'BHfs')==0 then
call UnitRemoveAbility(N28,'A0C9')
call LT7(EC8)
call EA8(t)
endif
set t=null
set N28=null
return false
endfunction
function OOF takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit N28=GetTriggerUnit()
call AddPermanentAbility(N28,'A0C9')
call SetUnitAbilityLevel(N28,'A0C9',GetUnitAbilityLevel(N28,'A0CA'))
call SUnit(EC8,"Hero",N28)
call TriggerRegisterTimerEvent(t,.2,true)
call TriggerAddCondition(t,Condition(function ONF))
set N28=null
set t=null
endfunction
function OPF takes nothing returns boolean
if GetSpellAbilityId()=='A0CA'then
call OOF()
endif
return false
endfunction
function DI9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OPF))
set t=null
endfunction
function OQF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
call SetUnitState(LUnit(EC8,"Unit"),UNIT_STATE_MANA,LReal(EC8,"Mana"))
call LT7(EC8)
call EA8(t)
set t=null
return false
endfunction
function ORF takes unit u,real OSF returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function OQF))
call SUnit(EC8,"Unit",u)
call SReal(EC8,"Mana",OSF)
set t=null
endfunction
function OTF takes nothing returns boolean
return GetSpellAbilityId()=='A0CT'
endfunction
function OUF takes nothing returns nothing
local integer EC8=GetHandleId(GetTriggerUnit())
local real Wx=P18(LReal(EC8,"TLLife1"),1)
local real Tw=P18(LReal(EC8,"TLMana1"),1)
local real x=LReal(EC8,"TLX1")
local real y=LReal(EC8,"TLY1")
local unit N28=GetTriggerUnit()
if LReal(EC8,"TLLife1")>1 and GetUnitState(N28,UNIT_STATE_LIFE)>1 then
call AddSpecialEffect("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl",GetUnitX(N28),GetUnitY(N28))
call SetUnitX(N28,x)
call SetUnitY(N28,y)
call SetUnitState(N28,UNIT_STATE_LIFE,Wx)
call SetUnitState(N28,UNIT_STATE_MANA,Tw)
call UnitRemoveBuffs(N28,false,true)
call TF9(N28)
call ORF(N28,Tw)
endif
set N28=null
endfunction
function DJ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OTF))
call TriggerAddAction(t,function OUF)
set t=null
endfunction
function OVF takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local unit N28=LUnit(GetHandleId(t),"UnitVar")
local integer EC8=GetHandleId(N28)
local integer T8=1
local integer U8=10
loop
exitwhen T8>U8
call SReal(EC8,"TLX"+I2S(T8-1),LReal(EC8,"TLX"+I2S(T8)))
call SReal(EC8,"TLY"+I2S(T8-1),LReal(EC8,"TLY"+I2S(T8)))
call SReal(EC8,"TLLife"+I2S(T8-1),LReal(EC8,"TLLife"+I2S(T8)))
call SReal(EC8,"TLMana"+I2S(T8-1),LReal(EC8,"TLMana"+I2S(T8)))
set T8=T8+1
endloop
call SReal(EC8,"TLX10",GetUnitX(N28))
call SReal(EC8,"TLY10",GetUnitY(N28))
call SReal(EC8,"TLLife10",GetUnitState(N28,UNIT_STATE_LIFE))
call SReal(EC8,"TLMana10",GetUnitState(N28,UNIT_STATE_MANA))
set t=null
set N28=null
endfunction
function OWF takes nothing returns nothing
local unit O4D=H04
local trigger t
set t=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(t,.5)
call TriggerAddAction(t,function OVF)
call SUnit(GetHandleId(t),"UnitVar",O4D)
set t=null
endfunction
function DK9 takes nothing returns nothing
endfunction
function OXF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer NZ8=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(NZ8),(2)))
local unit X77=(LoadUnitHandle(R8,(NZ8),(17)))
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call UnitRemoveAbility(X77,'A1QZ')
call SaveInteger(R8,(GetHandleId((X77))),((4290)),(2))
call FlushChildHashtable(R8,(NZ8))
call EA8(t)
if GetTriggerUnit()==X77 then
call KillUnit(Z77)
endif
elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 then
call SetUnitAbilityLevel(X77,'A1QZ',GetUnitAbilityLevel(X77,'A1QZ')+1)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\SkeletalMageMissile\\SkeletalMageMissile.mdl",X77,"chest"))
endif
else
call SetUnitX(Z77,GetUnitX(X77)-40)
call SetUnitY(Z77,GetUnitY(X77)-40)
if UN8(X77)and IsUnitVisibleEx(X77,GetOwningPlayer(Z77))==false then
call KillUnit(Z77)
elseif ModuloInteger(GetTriggerEvalCount(t),5)==0 then
call IssueTargetOrderById(Z77,851983,X77)
endif
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function OYF takes unit OZF,unit X77,integer ML8 returns nothing
local trigger t=CreateTrigger()
local integer NZ8=GetHandleId(t)
call UnitRemoveAbility(OZF,'Avul')
call SaveUnitHandle(R8,(NZ8),(2),(OZF))
call SaveUnitHandle(R8,(NZ8),(17),(X77))
call AddPermanentAbility(X77,'A1QZ')
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerRegisterUnitEvent(t,OZF,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function OXF))
call TriggerEvaluate(t)
call UnitApplyTimedLife(OZF,'BTLF',4+4*ML8)
set t=null
endfunction
function OAF takes nothing returns boolean
return(IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and((LoadInteger(R8,(GetHandleId((GetFilterUnit()))),((4290))))==1)==false and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04))or UN8(GetFilterUnit())==false)
endfunction
function OBF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local group g
local integer i=1
local unit W8D=(LoadUnitHandle(R8,(W57),(2)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local real a=(LoadReal(R8,(W57),(137)))
local unit OCF
local unit V5D
local real VIE=(LoadReal(R8,(W57),(47)))
local real VJE=(LoadReal(R8,(W57),(48)))
set x=PQ8(x+18*Cos(a))
set y=PS8(y+18*Sin(a))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
if GetTriggerEvalCount(t)>166 then
loop
exitwhen i>12
if(LoadBoolean(R8,(W57),(511+i-1)))==false then
call KillUnit((LoadUnitHandle(R8,(W57),(393+i-1))))
endif
set i=i+1
endloop
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set g=OG8()
set H04=W8D
call GroupEnumUnitsInRange(g,x,y,400,Condition(function OAF))
loop
exitwhen i>12
if(LoadBoolean(R8,(W57),(511+i-1)))==false then
set OCF=(LoadUnitHandle(R8,(W57),(393+i-1)))
set x=(LoadReal(R8,(W57),(549+i-1)))
set y=(LoadReal(R8,(W57),(567+i-1)))
set x=PQ8(x+18*Cos(a))
set y=PS8(y+18*Sin(a))
call SaveReal(R8,(W57),(549+i-1),((x)*1.))
call SaveReal(R8,(W57),(567+i-1),((y)*1.))
call SetUnitX(OCF,x)
call SetUnitY(OCF,y)
set V5D=FirstOfGroup(g)
if V5D!=null then
call GroupRemoveUnit(g,V5D)
call SaveInteger(R8,(GetHandleId((V5D))),((4290)),(1))
call SaveBoolean(R8,(W57),(511+i-1),(true))
call OYF(OCF,V5D,GetUnitAbilityLevel(W8D,'A1QW'))
endif
endif
set i=i+1
endloop
call OF8(g)
set g=null
set OCF=null
set V5D=null
endif
set t=null
set W8D=null
return false
endfunction
function O3F takes nothing returns nothing
local location l=GetSpellTargetLoc()
local real O6F=GetLocationX(l)
local real OLF=GetLocationY(l)
local unit W8D=GetTriggerUnit()
local real x=GetUnitX(W8D)
local real y=GetUnitY(W8D)
local real a=YI7(x,y,O6F,OLF)*bj_DEGTORAD
local unit L1D
local real VOE=PQ8(x+3000*Cos(a))
local real VPE=PS8(y+3000*Sin(a))
local integer i=1
local trigger t=CreateTrigger()
local integer NZ8=GetHandleId(t)
local real DSE
local integer ZK7=GetUnitAbilityLevel(W8D,'A1QW')
local integer O1F
call RemoveLocation(l)
if ZK7==1 then
set O1F='u01K'
elseif ZK7==2 then
set O1F='u01H'
elseif ZK7==3 then
set O1F='u01J'
elseif ZK7==4 then
set O1F='u01L'
endif
loop
exitwhen i>12
set L1D=CreateUnit(GetOwningPlayer(W8D),O1F,x+GetRandomInt(-300,300),y+GetRandomInt(-300,300),a*bj_RADTODEG)
call SaveUnitHandle(R8,(NZ8),(393+i-1),(L1D))
call SaveBoolean(R8,(NZ8),(511+i-1),(false))
call SaveReal(R8,(NZ8),(549+i-1),((GetUnitX(L1D))*1.))
call SaveReal(R8,(NZ8),(567+i-1),((GetUnitY(L1D))*1.))
set i=i+1
endloop
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerAddCondition(t,Condition(function OBF))
call SaveUnitHandle(R8,(NZ8),(2),(W8D))
call SaveReal(R8,(NZ8),(6),((x)*1.))
call SaveReal(R8,(NZ8),(7),((y)*1.))
call SaveReal(R8,(NZ8),(137),((a)*1.))
call SaveReal(R8,(NZ8),(47),((VOE)*1.))
call SaveReal(R8,(NZ8),(48),((VPE)*1.))
set W8D=null
set L1D=null
set l=null
set t=null
endfunction
function O0F takes nothing returns boolean
if GetSpellAbilityId()=='A1QW' then
call O3F()
endif
return false
endfunction
function DM9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O0F))
call O28('u01K')
call O28('u01H')
call O28('u01J')
call O28('u01L')
call PU8('A1QZ')
set t=null
endfunction
function PotionCond takes nothing returns boolean
return IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and UZ8()
endfunction
function O5F takes unit Z77,unit NY,unit O2F,integer TA8,boolean O_F returns real
local unit oA=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(NY),GetUnitY(NY),0)
if IsUnitType(O2F,UNIT_TYPE_HERO)then
call AddPermanentAbility(oA,'A0WY')
else
call AddPermanentAbility(oA,'A0NL')
endif
call IssueTargetOrderById(oA,852095,O2F)
if IsUnitType(O2F,UNIT_TYPE_HERO)==false then
call W48(Z77,O2F,1,50+25*TA8,.4)
else
call W48(Z77,O2F,1,50,.4)
endif
if O_F then
return((GetUnitX(O2F)-GetUnitX(NY))*(GetUnitX(O2F)-GetUnitX(NY))+(GetUnitY(O2F)-GetUnitY(NY))*(GetUnitY(O2F)-GetUnitY(NY)))/ 0xF4240
endif
set oA=null
return((GetUnitX(O2F)-GetUnitX(NY))*(GetUnitX(O2F)-GetUnitX(NY))+(GetUnitY(O2F)-GetUnitY(NY))*(GetUnitY(O2F)-GetUnitY(NY)))/ 360000
endfunction
function P4F takes unit Z77,unit NY returns unit
local group g=OG8()
set H04=Z77
call GroupEnumUnitsInRange(g,GetUnitX(NY),GetUnitY(NY),600,Condition(function PotionCond))
call GroupRemoveUnit(g,NY)
set H04=GroupPickRandomUnit(g)
call OF8(g)
set g=null
return H04
endfunction
function P7F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local integer TA8=LInt(EC8,"Level")
local unit NY=LUnit(EC8,"Old")
local integer iX=LInt(EC8,"Count")
local unit O2F
local real Hk
call LT7(EC8)
call EA8(t)
if iX<(TA8*2+1)then
set O2F=P4F(Z77,NY)
if O2F!=null then
set Hk=O5F(Z77,NY,O2F,TA8,false)
set t=CreateTrigger()
set EC8=GetHandleId(t)
call SUnit(EC8,"Source",Z77)
call SInt(EC8,"Level",TA8)
call SUnit(EC8,"Old",O2F)
call SInt(EC8,"Count",iX+1)
call TriggerRegisterTimerEvent(t,Hk+.4,false)
call TriggerAddCondition(t,Condition(function P7F))
endif
endif
set t=null
set Z77=null
set NY=null
set O2F=null
return false
endfunction
function P8F takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit P9F=GetSpellTargetUnit()
local integer TA8=GetUnitAbilityLevel(N28,'A0NM')
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local real Hk=O5F(N28,N28,P9F,TA8,true)
call SUnit(EC8,"Source",N28)
call SInt(EC8,"Level",TA8)
call SUnit(EC8,"Old",P9F)
call SInt(EC8,"Count",1)
call TriggerRegisterTimerEvent(t,Hk,false)
call TriggerAddCondition(t,Condition(function P7F))
set N28=null
set P9F=null
set t=null
endfunction
function PDF takes nothing returns boolean
if GetSpellAbilityId()=='A0NM' and HasLinkin(GetSpellTargetUnit())==false then
call P8F()
endif
return false
endfunction
function DX9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function PDF))
set t=null
endfunction
function PEF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local integer TA8=GetUnitAbilityLevel(N28,'A0NE')
call UnitRemoveAbility(N28,'A0NE')
call AddPermanentAbility(N28,'A0NE')
call SetUnitAbilityLevel(N28,'A0NE',TA8)
call LT7(EC8)
call EA8(t)
set t=null
set N28=null
return false
endfunction
function PFF takes unit m5,integer TA8 returns nothing
local real PGF=(8+TA8*8)/ 3
call SetUnitState(m5,UNIT_STATE_LIFE,GetUnitState(m5,UNIT_STATE_LIFE)+PGF)
endfunction
function PHF takes nothing returns boolean
if ji()then
call PFF(GetFilterUnit(),HB4)
endif
return false
endfunction
function PIF takes unit N28 returns nothing
local integer TA8=GetUnitAbilityLevel(N28,'A0NE')
local group g=OG8()
set H04=N28
set HB4=TA8
call GroupEnumUnitsInRange(g,GetUnitX(N28),GetUnitY(N28),525,Condition(function PHF))
call OF8(g)
set g=null
endfunction
function PJF takes unit N28 returns nothing
local integer ML8=GetUnitAbilityLevel(N28,'A0NE')
local real PKF=4+4*ML8
call SetUnitState(N28,UNIT_STATE_MANA,GetUnitState(N28,UNIT_STATE_MANA)-(PKF/ 3))
if GetUnitState(N28,UNIT_STATE_MANA)<PKF then
if LState(N28,"DeathWardOn")==false then
call IssueImmediateOrderById(N28,852178)
endif
endif
endfunction
function PMF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
if GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if GetIssuedOrderId()==852178 then
call LT7(EC8)
call EA8(t)
set t=CreateTrigger()
set EC8=GetHandleId(t)
call SUnit(EC8,"Hero",N28)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function PEF))
endif
else
call PIF(N28)
call PJF(N28)
endif
set t=null
set N28=null
return false
endfunction
function PNF takes nothing returns nothing
local unit N28=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call SUnit(EC8,"Hero",N28)
call TriggerRegisterTimerEvent(t,.33,true)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function PMF))
set N28=null
set t=null
endfunction
function POF takes nothing returns boolean
if GetSpellAbilityId()=='A0NE' then
call PNF()
endif
return false
endfunction
function DZ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function POF))
set t=null
endfunction
function PPF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
local integer TA8=GetUnitAbilityLevel(Z77,'A0NO')
local integer iX=GetTriggerEvalCount(t)
local real PQF=LReal(EC8,"StartingHP")
local real PRF=0
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call DestroyEffect(LEff(EC8,"FX"))
call LT7(EC8)
call EA8(t)
else
if iX==4 or iX==8 or iX==12 then
call DestroyEffect(LEff(EC8,"FX"))
if iX==12 then
call LT7(EC8)
call EA8(t)
elseif iX==4 or iX==8 then
call SEff(EC8,"FX",AddSpecialEffectTarget("effects\\NetherInferno.mdx",m5,"origin"))
endif
set PRF=(.08+TA8*.08)*P18(PQF-GetUnitState(m5,UNIT_STATE_LIFE),0)
if PRF>0 then
call QM8("+"+I2S(R2I(PRF)),2,m5,.023,68,0,187,216)
endif
endif
call Dmg(Z77,m5,NormalFire,5*TA8+PRF)
endif
set t=null
set Z77=null
set m5=null
return false
endfunction
function PSF takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit m5=GetEnumUnit()
call DestroyEffect(AddSpecialEffectTarget("effects\\NetherInferno.mdx",m5,"origin"))
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function PPF))
call SUnit(EC8,"Target",m5)
call SUnit(EC8,"Source",Z77)
call SReal(EC8,"StartingHP",GetUnitState(m5,UNIT_STATE_LIFE))
call SEff(EC8,"FX",AddSpecialEffectTarget("effects\\NetherInferno.mdx",m5,"origin"))
set T87[RP8(RW8(m5,StringHash("Maledict"),1,12,Z77,'A0NO',false))]=GetWidgetLife(m5)
set t=null
set Z77=null
set m5=null
endfunction
function PTF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local group g=OG8()
local integer TA8=GetUnitAbilityLevel(Z77,'A0NO')
call GroupEnumUnitsInRange(g,x,y,190,Condition(function V98))
call ForGroup(g,function PSF)
call OF8(g)
call RemoveLocation(l)
set l=null
set g=null
set Z77=null
endfunction
function PUF takes nothing returns boolean
if GetSpellAbilityId()=='A0NO' then
call PTF()
endif
return false
endfunction
function DY9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function PUF))
set t=null
endfunction
function PVF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
call LT7(EC8)
call EA8(t)
if GetTriggerEventId()!=EVENT_UNIT_SPELL_ENDCAST then
call ZN7(Z77)
endif
set Z77=null
set t=null
return false
endfunction
function PWF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call SUnit(EC8,"Source",Z77)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_ENDCAST)
call TriggerRegisterTimerEvent(t,10,false)
call TriggerAddCondition(t,Condition(function PVF))
set t=null
set Z77=null
endfunction
function PXF takes nothing returns boolean
if GetSpellAbilityId()=='A0NT' or GetSpellAbilityId()=='A0NX' then
call PWF()
endif
return false
endfunction
function PYF takes nothing returns boolean
if GetUnitTypeId(GetSummonedUnit())=='o000' or GetUnitTypeId(GetSummonedUnit())=='o001' or GetUnitTypeId(GetSummonedUnit())=='o00A' or GetUnitTypeId(GetSummonedUnit())=='o00X' then
call AddTimedBoolBuff(GetSummoningUnit(),"DeathWardOn",8)
endif
return false
endfunction
function DA9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function PYF))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function PXF))
set t=null
endfunction
function PZF takes nothing returns boolean
local integer id=0
local unit m5
local real WR8=(TimerGetElapsed(E4))
local real mp
local real hp
loop
exitwhen id>12
set m5=Y7[id]
if m5!=null and GetUnitAbilityLevel(m5,'B0CD')==0 and T64[id]>WR8 then
set T64[id]=0
endif
if m5!=null and GetUnitAbilityLevel(m5,'B0CD')>0 then
if T64[id]>WR8 and O18(m5)==false then
set hp=GetUnitState(m5,UNIT_STATE_LIFE)
set mp=GetUnitState(m5,UNIT_STATE_MANA)
if hp<TL4[id]then
set TL4[id]=hp
endif
if mp<T14[id]then
set T14[id]=mp
endif
call SetUnitState(m5,UNIT_STATE_LIFE,TL4[id])
set T54[id]=T54[id]+1
if T54[id]==10 then
set T54[id]=0
if T24[id]==1 then
call Dmg(T04[id],m5,NormalFire,12.5)
elseif T24[id]==2 then
call Dmg(T04[id],m5,NormalFire,20)
elseif T24[id]==3 then
call Dmg(T04[id],m5,NormalFire,32)
endif
endif
elseif T64[id]>WR8 and O18(m5)then
set T64[id]=0
set TL4[id]=9999
set T14[id]=9999
endif
if GetUnitAbilityLevel(m5,'B0CD')>0 and T64[id]<WR8 then
call UnitRemoveAbility(m5,'A1JA')
call UnitRemoveAbility(m5,'B0CD')
call UnitRemoveAbility(m5,'A1LD')
endif
endif
set id=id+1
endloop
set m5=null
return false
endfunction
function PAF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit X77=LUnit(EC8,"Target")
local integer TA8=LInt(EC8,"Level")
local unit AC7
if GetUnitAbilityLevel(X77,'B0CD')==0 then
call LT7(EC8)
call EA8(t)
elseif GetOwningPlayer(X77)!=GetOwningPlayer(GetEventDamageSource())and GetUnitState(X77,UNIT_STATE_MAX_LIFE)*(.09+.01*TA8)>GetUnitState(X77,UNIT_STATE_LIFE)and LState(X77,"ShallowGrave|Active")==false then
call LT7(EC8)
call EA8(t)
call UnitRemoveAbility(X77,'A1JA')
call UnitRemoveAbility(X77,'B0CD')
call UnitRemoveAbility(X77,'A1LD')
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",X77,"overhead"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",X77,"chest"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",X77,"origin"))
set AC7=CreateUnit(GetOwningPlayer(GetEventDamageSource()),'e00E',0,0,0)
call UnitRemoveBuffs(X77,true,true)
call UnitRemoveAbility(X77,'Aetl')
call UnitDamageTarget(AC7,X77,100000000.,true,false,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
set AC7=null
endif
set t=null
set X77=null
return false
endfunction
function PBF takes unit Z77,unit X77 returns nothing
local integer ML8=GetUnitAbilityLevel(Z77,'A1MI')
local integer id=GetPlayerId(GetOwningPlayer(X77))
local trigger t
local integer W57
if ML8==0 then
set ML8=GetUnitAbilityLevel(Z77,'A2QE')
endif
if ML8>0 and IsUnitType(X77,UNIT_TYPE_HERO)and IsUnitIllusion(X77)==false and XC8(GetUnitTypeId(X77))==false then
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function PAF))
call SUnit(W57,"Target",X77)
call SInt(W57,"Level",ML8)
call AddPermanentAbility(X77,'A1JA')
call AddPermanentAbility(X77,'A1LD')
if GetUnitAbilityLevel(Z77,'A2QE')>0 then
set T64[id]=(TimerGetElapsed(E4))+T_4
else
set T64[id]=(TimerGetElapsed(E4))+7+ML8
endif
set TL4[id]=GetUnitState(X77,UNIT_STATE_LIFE)
set T14[id]=GetUnitState(X77,UNIT_STATE_MANA)
set T04[id]=Z77
set T24[id]=ML8
endif
set t=null
endfunction
function GY9 takes nothing returns nothing
local trigger t=CreateTrigger()
local integer id=0
local integer i=0
local player p
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function PZF))
loop
exitwhen id>12
set TL4[id]=9999
set T14[id]=9999
set id=id+1
endloop
loop
exitwhen i>5
set p=G8[i]
call SetPlayerAbilityAvailable(p,'A1LD',false)
set p=N8[i]
call SetPlayerAbilityAvailable(p,'A1LD',false)
set i=i+1
endloop
set t=null
set p=null
endfunction
function PCF takes nothing returns nothing
if S_9(GetEnumUnit())then
return
endif
if GetUnitAbilityLevel(GetEnumUnit(),'A1HZ')>0 then
call UnitRemoveAbility(GetEnumUnit(),'A1HZ')
call UnitRemoveAbility(GetEnumUnit(),'B0C5')
endif
if GetUnitAbilityLevel(GetEnumUnit(),'A1I4')>0 then
call UnitRemoveAbility(GetEnumUnit(),'A1I4')
call UnitRemoveAbility(GetEnumUnit(),'B0C5')
endif
if GetUnitAbilityLevel(GetEnumUnit(),'A1I3')>0 then
call UnitRemoveAbility(GetEnumUnit(),'A1I3')
call UnitRemoveAbility(GetEnumUnit(),'B0C5')
endif
if GetUnitAbilityLevel(GetEnumUnit(),'A1I6')>0 then
call UnitRemoveAbility(GetEnumUnit(),'A1I6')
call UnitRemoveAbility(GetEnumUnit(),'B0C5')
endif
endfunction
function P3F takes nothing returns nothing
if S_9(GetEnumUnit())then
return
endif
if GU8(GetEnumUnit())==false then
if a3==1 then
if GetUnitAbilityLevel(GetEnumUnit(),'A1HZ')==0 then
call UnitRemoveAbility(GetEnumUnit(),'B0C5')
call AddPermanentAbility(GetEnumUnit(),'A1HZ')
endif
elseif a3==2 then
if GetUnitAbilityLevel(GetEnumUnit(),'A1I4')==0 then
call UnitRemoveAbility(GetEnumUnit(),'B0C5')
call AddPermanentAbility(GetEnumUnit(),'A1I4')
endif
elseif a3==3 then
if GetUnitAbilityLevel(GetEnumUnit(),'A1I3')==0 then
call UnitRemoveAbility(GetEnumUnit(),'B0C5')
call AddPermanentAbility(GetEnumUnit(),'A1I3')
endif
elseif a3==4 then
if GetUnitAbilityLevel(GetEnumUnit(),'A1I6')==0 then
call UnitRemoveAbility(GetEnumUnit(),'B0C5')
call AddPermanentAbility(GetEnumUnit(),'A1I6')
endif
endif
endif
endfunction
function P6F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit AC7=LUnit(EC8,"Caster")
local group PLF=LGroup(EC8,"ActiveGroup")
local real x=GetUnitX(AC7)
local real y=GetUnitY(AC7)
local group g=OG8()
local group g2
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call ForGroup(PLF,function PCF)
call OF8(g)
call OF8(PLF)
call LT7(EC8)
call EA8(t)
call ShowUnit(AC7,false)
set t=null
set Z77=null
set AC7=null
set PLF=null
return false
endif
set n3=Z77
set a3=GetUnitAbilityLevel(Z77,'A1HS')
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,300,Condition(function UM8))
call GroupRemoveGroup(g,PLF)
call ForGroup(PLF,function PCF)
call ForGroup(g,function P3F)
call SGroup(EC8,"ActiveGroup",g)
call OF8(PLF)
set t=null
set Z77=null
set AC7=null
set PLF=null
set g=null
return false
endfunction
function P1F takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local integer TA8=GetUnitAbilityLevel(Z77,'A1HS')
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'n0HQ',x,y,0)
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call UnitApplyTimedLife(AC7,'BTLF',16)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerRegisterUnitEvent(t,AC7,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function P6F))
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Caster",AC7)
call SGroup(EC8,"ActiveGroup",OG8())
set Z77=null
call RemoveLocation(l)
set l=null
set AC7=null
set t=null
endfunction
function P0F takes nothing returns boolean
if GetSpellAbilityId()=='A1HS' then
call P1F()
endif
return false
endfunction
function GV9 takes nothing returns nothing
local trigger t=CreateTrigger()
local integer i=0
local player p
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function P0F))
set t=null
loop
exitwhen i>5
set p=G8[i]
call SetPlayerAbilityAvailable(p,'A1HZ',false)
call SetPlayerAbilityAvailable(p,'A1I4',false)
call SetPlayerAbilityAvailable(p,'A1I3',false)
call SetPlayerAbilityAvailable(p,'A1I6',false)
set p=N8[i]
call SetPlayerAbilityAvailable(p,'A1HZ',false)
call SetPlayerAbilityAvailable(p,'A1I4',false)
call SetPlayerAbilityAvailable(p,'A1I3',false)
call SetPlayerAbilityAvailable(p,'A1I6',false)
set i=i+1
endloop
set p=null
endfunction
function P5F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
local integer TA8=LInt(EC8,"Level")
local unit AC7
local real P99=('d'+50*TA8)/ 4
if GetTriggerEventId()==EVENT_UNIT_DEATH or Z87(x,y,GetUnitX(m5),GetUnitY(m5))>765 or GetUnitAbilityLevel(m5,'B0CC')==0 then
call DestroyEffect(LEff(EC8,"FX"))
call DestroyEffect(LEff(EC8,"fx2"))
call UnitRemoveAbility(m5,'A1J9')
call UnitRemoveAbility(m5,'B0CC')
call LT7(EC8)
call EA8(t)
elseif GetTriggerEvalCount(t)==(10*.8)then
call DestroyEffect(LEff(EC8,"FX"))
call SEff(EC8,"FX",AddSpecialEffectTarget("war3mapImported\\ShivasEnchantment.mdx",m5,"overhead"))
call Dmg(Z77,m5,NormalFire,P99)
elseif GetTriggerEvalCount(t)==(10*1.6)then
call DestroyEffect(LEff(EC8,"FX"))
call SEff(EC8,"FX",AddSpecialEffectTarget("war3mapImported\\ShivasEnchantment.mdx",m5,"overhead"))
call Dmg(Z77,m5,NormalFire,P99)
elseif GetTriggerEvalCount(t)==(10*2.5)then
call DestroyEffect(LEff(EC8,"FX"))
call SEff(EC8,"FX",AddSpecialEffectTarget("war3mapImported\\ShivasEnchantment.mdx",m5,"overhead"))
call Dmg(Z77,m5,NormalFire,P99)
elseif GetTriggerEvalCount(t)==(10*3.4)then
call DestroyEffect(LEff(EC8,"FX"))
call Dmg(Z77,m5,NormalFire,P99)
elseif GetTriggerEvalCount(t)>(10*3.9)then
call DestroyEffect(LEff(EC8,"fx2"))
call UnitRemoveAbility(m5,'A1J9')
call UnitRemoveAbility(m5,'B0CC')
call LT7(EC8)
call EA8(t)
set AC7=CreateUnit(GetOwningPlayer(m5),'e00E',GetUnitX(m5),GetUnitY(m5),0)
call AddPermanentAbility(AC7,'A1MJ')
call SetUnitAbilityLevel(AC7,'A1MJ',TA8)
call IssueTargetOrderById(AC7,852095,m5)
set AC7=null
endif
set t=null
set Z77=null
set m5=null
return false
endfunction
function P2F takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=GetUnitAbilityLevel(Z77,'A1MG')
local string s="Doodads\\Cinematic\\GlowingRunes\\GlowingRunes4.mdl"
if GetLocalPlayer()==GetOwningPlayer(m5)then
endif
call AddPermanentAbility(m5,'A1J9')
call SUnit(EC8,"Source",Z77)
call SUnit(EC8,"Target",m5)
call SReal(EC8,"x",GetUnitX(m5)*1.)
call SReal(EC8,"y",GetUnitY(m5)*1.)
call SInt(EC8,"Level",TA8)
call SEff(EC8,"FX",AddSpecialEffectTarget("war3mapImported\\ShivasEnchantment.mdx",m5,"overhead"))
call SEff(EC8,"fx2",AddSpecialEffect(s,GetUnitX(m5),GetUnitY(m5)))
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function P5F))
set Z77=null
set m5=null
set t=null
endfunction
function P_F takes nothing returns boolean
if GetSpellAbilityId()=='A1MG' and HasLinkin(GetSpellTargetUnit())==false then
call P2F()
endif
return false
endfunction
function GW9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function P_F))
set t=null
endfunction
function Q4F takes nothing returns nothing
local unit Z77=E3
local unit X77=GetEnumUnit()
local integer ML8=V3
call PBF(Z77,X77)
call Dmg(Z77,X77,NormalFire,150+'d'*ML8)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\PlasmaShot.mdl",X77,"chest"))
set Z77=null
set X77=null
endfunction
function Q7F takes nothing returns nothing
local unit Z77=E3
local unit X77=GetEnumUnit()
local integer ML8=V3
call PBF(Z77,X77)
set Z77=null
set X77=null
endfunction
function Q8F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit VA8=LUnit(EC8,"Projectile")
local real Y5=LReal(EC8,"TargetX")
local real Z5=LReal(EC8,"TargetY")
local real l4=LReal(EC8,"Angle")
local real Q9F=LReal(EC8,"AOE")
local unit Z77=LUnit(EC8,"Source")
local integer TA8=LInt(EC8,"Level")
local real x=GetUnitX(VA8)+30*Cos(l4)
local real y=GetUnitY(VA8)+30*Sin(l4)
local group g
local fogmodifier QDF
if Z87(x,y,Y5,Z5)<35 or x!=PQ8(x)or y!=PS8(y)then
set x=Y5
set y=Z5
call SetUnitX(VA8,x)
call SetUnitY(VA8,y)
call DestroyEffect(LEff(EC8,"FX"))
set QDF=E48(EC8,"Fog")
call FogModifierStop(QDF)
call DestroyFogModifier(QDF)
set QDF=null
if GI7 then
set bj_forLoopAIndex=0
set bj_forLoopAIndexEnd=LInt(EC8,"FUN|EffNum")
loop
exitwhen bj_forLoopAIndex>=bj_forLoopAIndexEnd
call DestroyEffect(LEff(EC8,"FUN|Eff"+I2S(bj_forLoopAIndex)))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
call LT7(EC8)
call EA8(t)
call KillUnit(VA8)
set H04=Z77
set E3=Z77
set V3=TA8
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,Q9F+25,Condition(function UM8))
call ForGroup(g,function Q4F)
call OF8(g)
set g=null
else
call SetUnitX(VA8,x)
call SetUnitY(VA8,y)
set H04=Z77
set E3=Z77
set V3=TA8
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,300,Condition(function UM8))
call ForGroup(g,function Q7F)
call OF8(g)
set g=null
endif
set t=null
set VA8=null
set Z77=null
return false
endfunction
function QEF takes unit Z77,real x,real y,real WPE,effect FX,fogmodifier N4E returns nothing
local real CV7=Atan2(y-GetUnitY(Z77),x-GetUnitX(Z77))
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit S08=CreateUnit(GetOwningPlayer(Z77),'h0B6',GetUnitX(Z77),GetUnitY(Z77),CV7*bj_RADTODEG)
local integer ML8=GetUnitAbilityLevel(Z77,'A1MI')
local real QFF=PL8(25+250+25*WPE*2,1000)
local real LW7=Z87(GetUnitX(Z77),GetUnitY(Z77),x,y)
if ML8==0 then
set ML8=GetUnitAbilityLevel(Z77,'A2QE')
endif
if IsUnitEnemy(S08,GetLocalPlayer())and N08(GetLocalPlayer())==false then
call UnitSetUsesAltIcon(S08,true)
endif
call TriggerRegisterTimerEvent(t,PL8(2./(LW7/ 30),.04),true)
call TriggerAddCondition(t,Condition(function Q8F))
call SUnit(W57,"Projectile",S08)
call SReal(W57,"TargetX",x*1.)
call SReal(W57,"TargetY",y*1.)
call SReal(W57,"Angle",CV7*1.)
call SReal(W57,"AOE",QFF*1.)
call SInt(W57,"Level",ML8)
call SUnit(W57,"Source",Z77)
call DY8(W57,"Fog",N4E)
call SEff(W57,"FX",FX)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1MI',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2QE',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1MN',false)
if GI7 then
set FC7=""
if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(Z77))then
set FC7=GK7
endif
set bj_forLoopAIndex=0
set bj_forLoopAIndexEnd=R2I(QFF/'d')+10
loop
exitwhen bj_forLoopAIndex>=bj_forLoopAIndexEnd
set F37=I2R(bj_forLoopAIndex)*(6.2831853/ I2R(bj_forLoopAIndexEnd))
call SEff(W57,"FUN|Eff"+I2S(bj_forLoopAIndex),AddSpecialEffect(FC7,x+Cos(F37)*QFF,y+Sin(F37)*QFF))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call SInt(W57,"FUN|EffNum",bj_forLoopAIndexEnd)
endif
set t=null
set S08=null
endfunction
function QGF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit S08=LUnit(W57,"Projectile")
local unit Z77=LUnit(W57,"Source")
local real l4=LReal(W57,"Angle")
local real x
local real y
local real WPE=TimerGetElapsed(E4)-LReal(W57,"CastTime")
local string s
local fogmodifier QDF
local effect FX
local real QHF=GetUnitX(S08)+30*Cos(l4)
local real QIF=GetUnitY(S08)+30*Sin(l4)
local boolean J4
local integer i
set x=PQ8(QHF)
set y=PS8(QIF)
call SetUnitX(S08,x)
call SetUnitY(S08,y)
if GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='A1MN')or x!=QHF or y!=QIF then
call LT7(W57)
call EA8(t)
call RemoveUnit(S08)
set s=""
if IsPlayerAlly(GetOwningPlayer(Z77),GetLocalPlayer())or N08(GetLocalPlayer())then
set s="war3mapImported\\IceWindGroundFX.mdl"
endif
set QDF=CreateFogModifierRadius(GetOwningPlayer(Z77),FOG_OF_WAR_VISIBLE,x,y,500,true,true)
call FogModifierStart(QDF)
set FX=AddSpecialEffect(s,x,y)
call QEF(Z77,x,y,WPE,FX,QDF)
set QDF=null
set FX=null
elseif KR8(GetOwningPlayer(Z77))then
set F37=Z87(x,y,LReal(W57,"AI|TgtX"),LReal(W57,"AI|TgtY"))
if F37>LReal(W57,"AI|MaxDist")or LBool(W57,"AI|Blast")then
if ZL7(Z77)then
call DE8(Z77,852526,'A1MN')
call XM7(GetPlayerId(GetOwningPlayer(Z77)),"IB BLAST! "+R2S(F37))
else
call SBool(W57,"AI|Blast",true)
endif
else
call SReal(W57,"AI|MaxDist",F37)
if Bz>LReal(W57,"AI|NextUp")then
call SReal(W57,"AI|NextUp",Bz+1)
set J4=false
set i=LInt(GetHandleId(Z77),"AI|IBClose")
if(i==1)then
set J4=(OM8(Z77,LUnit(GetHandleId(Z77),"AI|IBTgt"),500.,.02,1500.)!=null)
elseif(i==0)then
set J4=(OM8(Z77,LUnit(GetHandleId(Z77),"AI|IBTgt"),1500.,2.02,99999.)!=null)
elseif(i==2)then
call L_7(LUnit(GetHandleId(Z77),"AI|IBTgt"))
call MoveLocation(H57,GetLocationX(HA),GetLocationY(HA))
endif
if J4 then
call SReal(W57,"AI|TgtX",GetLocationX(H57))
call SReal(W57,"AI|TgtY",GetLocationY(H57))
call SReal(W57,"AI|MaxDist",99999.)
endif
endif
endif
endif
set t=null
set S08=null
set Z77=null
return false
endfunction
function QJF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local real a=Atan2(y-GetUnitY(Z77),x-GetUnitX(Z77))
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit S08=CreateUnit(GetOwningPlayer(Z77),'H0B8',GetUnitX(Z77),GetUnitY(Z77),a*bj_RADTODEG)
if IsUnitEnemy(S08,GetLocalPlayer())and N08(GetLocalPlayer())==false then
call UnitSetUsesAltIcon(S08,true)
endif
call SUnit(W57,"Projectile",S08)
call SUnit(W57,"Source",Z77)
call SReal(W57,"Angle",a*1.)
call SReal(W57,"CastTime",TimerGetElapsed(E4)*1.)
if KR8(GetOwningPlayer(Z77))then
call SReal(W57,"AI|TgtX",x)
call SReal(W57,"AI|TgtY",y)
call SReal(W57,"AI|MaxDist",99999.)
call SReal(W57,"AI|NextUp",Bz+1)
endif
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function QGF))
call SetUnitColor(S08,GetPlayerColor(Player(14)))
call RemoveLocation(l)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1MI',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2QE',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1MN',true)
call AddPermanentAbility(Z77,'A1MN')
if KR8(GetOwningPlayer(Z77))then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1MN',false)
endif
set Z77=null
set l=null
set t=null
set S08=null
endfunction
function QKF takes nothing returns boolean
if GetSpellAbilityId()=='A1MI' or GetSpellAbilityId()=='A2QE' then
call QJF()
endif
return false
endfunction
function GX9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function QKF))
set t=null
endfunction
function QMF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=LUnit(W57,"Target")
local unit Z77=LUnit(W57,"Source")
local integer ML8=LInt(W57,"Level")
local integer QNF=LInt(GetHandleId(Z77),"ChillingCounter")
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 and GetEventDamage()>1 then
call DisableTrigger(t)
if QNF>0 then
call SInt(GetHandleId(Z77),"ChillingCounter",QNF-1)
call QM8("+"+I2S(40+10*ML8),1,Z77,.024,'d',200,255,255)
call Dmg(Z77,X77,NormalFire,40+10*ML8)
endif
call LT7(W57)
call EA8(t)
endif
else
call LT7(W57)
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function QOF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local integer ML8=LInt(W57,"Level")
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
set Z77=GetAttacker()
endif
if GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED or(LInt(GetHandleId(Z77),"ChillingCounter")==0 and GetUnitAbilityLevel(Z77,'A1HN')>0)then
call DestroyEffect(LEff(GetHandleId(Z77),"fx1"))
call DestroyEffect(LEff(GetHandleId(Z77),"fx2"))
call SInt(GetHandleId(Z77),"ChillingCounter",0)
call LT7(W57)
if GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED then
call EA8(t)
endif
call UnitRemoveAbility(Z77,'A1HN')
call UnitRemoveAbility(Z77,'B0CJ')
call UnitRemoveAbility(Z77,'A1IP')
elseif GetUnitAbilityLevel(Z77,'A1HN')>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and LState(Z77,"ChillingTouchState")==false then
call AddTimedBoolBuff(Z77,"ChillingTouchState",.4)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2.,false)
call TriggerAddCondition(t,Condition(function QMF))
call SUnit(W57,"Target",GetTriggerUnit())
call SUnit(W57,"Source",Z77)
call SInt(W57,"Level",ML8)
endif
set t=null
set Z77=null
return false
endfunction
function QPF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetEnumUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer ML8=GetUnitAbilityLevel(Z77,'A1HQ')
call AddPermanentAbility(X77,'A1HN')
call AddPermanentAbility(X77,'A1IP')
call SInt(GetHandleId(X77),"ChillingCounter",2+ML8)
call SUnit(W57,"Source",X77)
call SInt(W57,"Level",ML8)
call SEff(GetHandleId(X77),"fx1",AddSpecialEffectTarget("war3mapImported\\FrostHands.mdx",X77,"right,hand"))
call SEff(GetHandleId(X77),"fx2",AddSpecialEffectTarget("war3mapImported\\FrostHands.mdx",X77,"left,hand"))
call TriggerRegisterTimerEvent(t,30,false)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function QOF))
set Z77=null
set X77=null
set t=null
endfunction
function QQF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local group g=OG8()
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 VI8))
call GroupAddUnit(g,Z77)
call ForGroup(g,function QPF)
call OF8(g)
set Z77=null
set g=null
set l=null
endfunction
function QRF takes nothing returns boolean
if GetSpellAbilityId()=='A1HQ' then
call QQF()
endif
return false
endfunction
function GZ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function QRF))
set t=CreateTrigger()
endfunction
function QSF takes nothing returns nothing
call Dmg(A3,GetEnumUnit(),NormalFire,(GetUnitAbilityLevel(A3,'A1IM')*75)/ 10)
endfunction
function QTF takes unit Z77 returns nothing
local real EUF=(GetUnitAbilityLevel(Z77,'A1IM')*75)/ 2
set EUF=EUF/ 10.
if GetUnitState(Z77,UNIT_STATE_LIFE)<=EUF*.75 then
set EUF=GetUnitState(Z77,UNIT_STATE_LIFE)/ .75-10
endif
call Dmg(Z77,Z77,NormalFire,EUF)
endfunction
function QUF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local group g
local real P99
local unit AC7
local integer TA8=0
local integer C77=GetTriggerEvalCount(t)
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call LT7(EC8)
call EA8(t)
return false
else
if GetTriggerEvalCount(t)==1 then
set AC7=CreateUnit(GetOwningPlayer(Z77),'h0B2',x,y,0)
call UnitApplyTimedLife(AC7,'BTLF',1)
set AC7=null
call TriggerRegisterTimerEvent(t,.1,true)
set g=OG8()
set A3=Z77
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,350,Condition(function UM8))
call ForGroup(g,function QSF)
call QTF(Z77)
call OF8(g)
else
if C77==10 then
call LT7(EC8)
call EA8(t)
endif
set g=OG8()
set A3=Z77
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,350,Condition(function UM8))
call ForGroup(g,function QSF)
call QTF(Z77)
call OF8(g)
call TF9(Z77)
call T99(Z77,0,0)
endif
endif
set t=null
set g=null
set Z77=null
return false
endfunction
function QVF takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real P99=(GetUnitAbilityLevel(Z77,'A1IM')*75)/ 2
call TriggerRegisterTimerEvent(t,1.5,false)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function QUF))
call SUnit(EC8,"Source",Z77)
set t=null
set Z77=null
endfunction
function QWF takes nothing returns boolean
if GetSpellAbilityId()=='A1IM' then
call QVF()
endif
return false
endfunction
function G39 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function QWF))
set t=null
endfunction
function QXF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit Z77=LUnit(EC8,"Source")
local player QYF
local integer TA8=GetUnitAbilityLevel(Z77,'A1IN')
local integer MainLevel=GetUnitAbilityLevel(Z77,'A1IN')
local real WR8=TimerGetElapsed(E4)
local real QZF=LReal(EC8,"Buffer1")
local real QAF=LReal(EC8,"Buffer2")
if O18(Z77)then
set t=null
set Z77=null
return false
endif
if IsJWPlayer(GetOwningPlayer(Z77))then
set QYF=N8[1]
else
set QYF=G8[1]
endif
if GetTriggerEventId()==EVENT_UNIT_DAMAGED and GetOwningPlayer(GetEventDamageSource())==O8 then
if GetUnitAbilityLevel(Z77,'A1IE')>0 then
call UnitRemoveAbility(Z77,'A1IE')
call UnitRemoveAbility(Z77,'B0C9')
endif
if GetUnitAbilityLevel(Z77,'A1IF')>0 then
call UnitRemoveAbility(Z77,'A1IF')
call UnitRemoveAbility(Z77,'B0C9')
endif
if GetUnitAbilityLevel(Z77,'A1IG')>0 then
call UnitRemoveAbility(Z77,'A1IG')
call UnitRemoveAbility(Z77,'B0C9')
endif
call SReal(EC8,"NightcrawlerTime",(WR8+2)*1.)
set t=null
set Z77=null
return false
endif
if LReal(EC8,"NightcrawlerTime")>WR8 then
set t=null
set Z77=null
return false
endif
if IsUnitVisibleEx(Z77,QYF)or GetUnitAbilityLevel(Z77,'BNdo')>0 then
set QAF=0
if GetUnitAbilityLevel(Z77,'A1IE')>0 or GetUnitAbilityLevel(Z77,'A1IF')>0 or GetUnitAbilityLevel(Z77,'A1IG')>0 then
set QZF=QZF+.1
if QZF>.4 then
set QZF=0
if GetUnitAbilityLevel(Z77,'A1IE')>0 then
call UnitRemoveAbility(Z77,'A1IE')
call UnitRemoveAbility(Z77,'B0C9')
endif
if GetUnitAbilityLevel(Z77,'A1IF')>0 then
call UnitRemoveAbility(Z77,'A1IF')
call UnitRemoveAbility(Z77,'B0C9')
endif
if GetUnitAbilityLevel(Z77,'A1IG')>0 then
call UnitRemoveAbility(Z77,'A1IG')
call UnitRemoveAbility(Z77,'B0C9')
endif
endif
endif
call SReal(EC8,"Buffer1",QZF*1.)
call SReal(EC8,"Buffer2",QAF*1.)
elseif IsUnitVisibleEx(Z77,QYF)==false then
set QZF=0
if(TA8==1 and GetUnitAbilityLevel(Z77,'A1IE')==0)or(TA8==2 and GetUnitAbilityLevel(Z77,'A1IF')==0)or(TA8==3 and GetUnitAbilityLevel(Z77,'A1IG')==0)then
set QAF=QAF+.1
if QAF>.6 then
set QAF=0
if TA8==1 then
if GetUnitAbilityLevel(Z77,'A1IE')==0 then
call AddPermanentAbility(Z77,'A1IE')
endif
endif
if TA8==2 then
if GetUnitAbilityLevel(Z77,'A1IE')>0 then
call UnitRemoveAbility(Z77,'A1IE')
call UnitRemoveAbility(Z77,'B0C9')
endif
if GetUnitAbilityLevel(Z77,'A1IF')==0 then
call AddPermanentAbility(Z77,'A1IF')
endif
endif
if TA8==3 then
if GetUnitAbilityLevel(Z77,'A1IE')>0 then
call UnitRemoveAbility(Z77,'A1IE')
call UnitRemoveAbility(Z77,'B0C9')
endif
if GetUnitAbilityLevel(Z77,'A1IF')>0 then
call UnitRemoveAbility(Z77,'A1IF')
call UnitRemoveAbility(Z77,'B0C9')
endif
if GetUnitAbilityLevel(Z77,'A1IG')==0 then
call AddPermanentAbility(Z77,'A1IG')
endif
endif
endif
endif
call SReal(EC8,"Buffer1",QZF*1.)
call SReal(EC8,"Buffer2",QAF*1.)
endif
set t=null
set Z77=null
set QYF=null
return false
endfunction
function QBF takes unit N28,boolean SY8 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call SReal(EC8,"Buffer1",0*1.)
call SReal(EC8,"Buffer2",0*1.)
call SReal(EC8,"NightcrawlerTime",TimerGetElapsed(E4)*1.)
call SUnit(EC8,"Source",N28)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function QXF))
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),'A1IE',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),'A1IF',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),'A1IG',false)
set t=null
endfunction
function QCF takes nothing returns boolean
if GetLearnedSkill()=='A1IN' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A1IN')==1 then
call QBF(GetTriggerUnit(),false)
endif
return false
endfunction
function GC9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function QCF))
set t=null
endfunction
function Q3F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=GetDyingUnit()
if GetOwningPlayer(GetKillingUnit())==GetOwningPlayer(Z77)and IsUnitType(X77,UNIT_TYPE_HERO)and IsUnitIllusion(X77)==false then
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function Q6F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer QLF=(LoadInteger(R8,(W57),(422)))
local integer Q1F=(LoadInteger(R8,(W57),(423)))
local integer OAE=(LoadInteger(R8,(W57),(424)))
if GetTriggerEventId()==EVENT_UNIT_DEATH then
if(LoadBoolean(R8,(W57),(276)))==false and GetTriggerUnit()==Z77 then
call SaveBoolean(R8,(W57),(276),(true))
call SetHeroAgi(Z77,GetHeroAgi(Z77,false)-QLF-Q1F-OAE,true)
elseif(LoadBoolean(R8,(W57),(277)))==false and GetTriggerUnit()==X77 then
call SaveBoolean(R8,(W57),(277),(true))
call SetHeroAgi(X77,GetHeroAgi(X77,false)+QLF,true)
call SetHeroStr(X77,GetHeroStr(X77,false)+Q1F,true)
call SetHeroInt(X77,GetHeroInt(X77,false)+OAE,true)
endif
else
if(LoadBoolean(R8,(W57),(276)))==false then
call SaveBoolean(R8,(W57),(276),(true))
call SetHeroAgi(Z77,GetHeroAgi(Z77,false)-QLF-Q1F-OAE,true)
endif
if(LoadBoolean(R8,(W57),(277)))==false then
call SaveBoolean(R8,(W57),(277),(true))
call SetHeroAgi(X77,GetHeroAgi(X77,false)+QLF,true)
call SetHeroStr(X77,GetHeroStr(X77,false)+Q1F,true)
call SetHeroInt(X77,GetHeroInt(X77,false)+OAE,true)
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function Q0F takes unit Z77,unit X77 returns nothing
local integer ML8=GetUnitAbilityLevel(Z77,'A1HR')
local integer VWD=N58(X77)
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer QLF
local integer Q1F
local integer OAE
local real VL8
if VWD==2 then
set QLF=IMinBJ(GetHeroAgi(X77,false)-1,1)
set Q1F=IMinBJ(GetHeroStr(X77,false)-1,1)
set OAE=IMinBJ(GetHeroInt(X77,false)-1,1)
elseif VWD==3 then
set QLF=IMinBJ(GetHeroAgi(X77,false)-1,1)
set Q1F=IMinBJ(GetHeroStr(X77,false)-1,1)
set OAE=IMinBJ(GetHeroInt(X77,false)-1,1)
elseif VWD==1 then
set QLF=IMinBJ(GetHeroAgi(X77,false)-1,1)
set Q1F=IMinBJ(GetHeroStr(X77,false)-1,1)
set OAE=IMinBJ(GetHeroInt(X77,false)-1,1)
endif
call SetHeroAgi(Z77,GetHeroAgi(Z77,false)+QLF+OAE+Q1F,true)
call SetHeroAgi(X77,GetHeroAgi(X77,false)-QLF,true)
call SetHeroStr(X77,GetHeroStr(X77,false)-Q1F,true)
call SetHeroInt(X77,GetHeroInt(X77,false)-OAE,true)
call SaveInteger(R8,(W57),(422),(QLF))
call SaveInteger(R8,(W57),(424),(OAE))
call SaveInteger(R8,(W57),(423),(Q1F))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveBoolean(R8,(W57),(276),(false))
call SaveBoolean(R8,(W57),(277),(false))
if ML8==1 then
set VL8=15
elseif ML8==2 then
set VL8=30
elseif ML8==3 then
set VL8=60
elseif ML8==4 then
set VL8='x'
endif
call TriggerRegisterTimerEvent(t,VL8,false)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function Q6F))
set t=null
endfunction
function Q5F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
if GetTriggerEventId()!=EVENT_UNIT_DEATH then
call Q0F(Z77,X77)
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
set X77=null
return false
endfunction
function Q2F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer V_8=(LoadInteger(R8,(W57),(30)))
local unit X77=KH8(V_8)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 then
call DisableTrigger(t)
call KG8(V_8)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.01,false)
call TriggerAddCondition(t,Condition(function Q5F))
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
endif
else
call KG8(V_8)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function Q_F takes nothing returns nothing
local trigger t=CreateTrigger()
local unit X77=GetTriggerUnit()
local unit Z77=GetAttacker()
local integer W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,1,false)
call TriggerAddCondition(t,Condition(function Q2F))
call SaveInteger(R8,(W57),(30),(KJ8(X77)))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set X77=null
set Z77=null
set t=null
endfunction
function R4F takes nothing returns nothing
local unit Z77=GetAttacker()
if LState(Z77,"CooldownState")==false then
call AddTimedBoolBuff(Z77,"CooldownState",.45-GetUnitAbilityLevel(GetAttacker(),'A1HR')*.05)
call Q_F()
endif
endfunction
function R7F takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),'A1HR')>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(R8,(GetHandleId(GetTriggeringTrigger())),(14)))and GetUnitTypeId(GetTriggerUnit())!='n00L' and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))then
call R4F()
endif
return false
endfunction
function R8F takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function R7F))
call SaveUnitHandle(R8,(GetHandleId(t)),(14),(GetTriggerUnit()))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function Q3F))
call SaveUnitHandle(R8,(W57),(2),(GetTriggerUnit()))
set t=null
endfunction
function R9F takes nothing returns boolean
if GetLearnedSkill()=='A1HR' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A1HR')==1 then
call R8F()
endif
return false
endfunction
function GA9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function R9F))
set t=null
endfunction
function NewShadowDanceTrig takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer h=GetHandleId(t)
local unit s=LUnit(h,"s")
local unit f=LUnit(h,"f")
local integer i=LInt(h,"i")
local integer l=LInt(h,"l")
if l>200 or GetTriggerEventId()==EVENT_WIDGET_DEATH then
if GetUnitAbilityLevel(s,'B0E2')==0 and GetTriggerEventId()!=EVENT_WIDGET_DEATH then
call UnitSetUsesAltIcon(s,false)
endif
call SBool(GetHandleId(s),"ShadowDance",false)
call SetUnitFlyHeight(s,GetUnitDefaultFlyHeight(s),0)
call UnitRemoveAbility(s,'A1IE')
call UnitRemoveAbility(s,'A1IF')
call UnitRemoveAbility(s,'A1IG')
call UnitAddAbility(s,'A2VV')
call UnitRemoveAbility(s,'A2VV')
call KillUnit(f)
call TriggerOff()
elseif GetTriggerEventId()==EVENT_UNIT_ATTACKED then
call IssueImmediateOrderById(GetAttacker(),$D0004)
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER and GetOrderTarget()==s and IsUnitEnemy(s,GetOwningPlayer(GetTriggerUnit()))then
call IssueImmediateOrderById(GetTriggerUnit(),$D0004)
else
set l=l+1
call SetUnitFlyHeight(s,10000,0)
call SInt(h,"l",l)
call SetUnitX(f,GetUnitX(s))
call SetUnitY(f,GetUnitY(s))
endif
set t=null
set s=null
set f=null
return false
endfunction
function NewShadowDance takes nothing returns nothing
local unit s=GetTriggerUnit()
local integer i=GetUnitAbilityLevel(s,'A1IN')
local real d=4.
local unit f=CreateUnit(GetOwningPlayer(s),'h0B1',GetUnitX(s),GetUnitY(s),0)
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(s))==false then
call UnitSetUsesAltIcon(s,true)
endif
call SBool(GetHandleId(s),"ShadowDance",true)
call TZ8(s,'A1HW',1,d)
call TZ8(s,'A1HX',1,d)
call UnitAddAbility(s,'A2VU')
call UnitRemoveAbility(s,'A2VU')
call UnitRemoveAbility(s,'A1IE')
call UnitRemoveAbility(s,'A1IF')
call UnitRemoveAbility(s,'A1IG')
call UnitAddAbility(s,'Amrf')
call UnitRemoveAbility(s,'Amrf')
call SetUnitFlyHeight(s,10000,0)
if GetUnitTypeId(s)!='E02X' then
call UnitAddAbility(s,'Aloc')
call UnitRemoveAbility(s,'Aloc')
endif
call ShowUnit(s,false)
call ShowUnit(s,true)
call SelectUnitAddForPlayer(s,GetOwningPlayer(s))
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterDeathEvent(t,s)
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_ATTACKED)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(t,Condition(function NewShadowDanceTrig))
call SUnit(h,"s",s)
call SUnit(h,"f",f)
call SInt(h,"i",i)
call SInt(h,"l",0)
set s=null
endfunction
function RFF takes nothing returns boolean
if GetSpellAbilityId()=='A1IN' then
call NewShadowDance()
endif
return false
endfunction
function GB9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function RFF))
set t=null
endfunction
function RGF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer OUD=GetTriggerEvalCount(t)
local unit Z77=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
local lightning RHF=EI8(EC8,"Lightning")
local integer TA8=LInt(EC8,"Level")
local real t5=LReal(EC8,"SourceX")
local real w5=LReal(EC8,"SourceY")
local real Y5=GetUnitX(m5)
local real Z5=GetUnitY(m5)
local real RIF
local real RJF
local real GRF=LReal(EC8,"LastX")
local real GSF=LReal(EC8,"LastY")
local real l4
local real AYE=Z87(GRF,GSF,Y5,Z5)
call SReal(EC8,"LastX",Y5)
call SReal(EC8,"LastY",Z5)
if AYE>'d' or OUD>(3.5/ .03)or GU8(m5)then
call DestroyLightning(RHF)
call LT7(EC8)
call EA8(t)
else
call MoveLightning(RHF,true,t5,w5,Y5,Z5)
if Z87(t5,w5,Y5,Z5)>325 then
set l4=Atan2(Z5-w5,Y5-t5)
set RIF=t5+(325)*Cos(l4)
set RJF=w5+(325)*Sin(l4)
call SetUnitX(m5,RIF)
call SetUnitY(m5,RJF)
endif
endif
set t=null
set Z77=null
set m5=null
set RHF=null
return false
endfunction
function RKF takes unit Z77,unit X77,integer ML8 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local lightning F4F=AddLightning("PONC",true,GetUnitX(Z77),GetUnitY(Z77),GetUnitX(X77),GetUnitY(X77))
call SetLightningColor(F4F,1,1,1,1)
call SaveLightningHandle(R8,(W57),StringHash("Lightning"),(F4F))
call SUnit(W57,"Source",Z77)
call SUnit(W57,"Target",X77)
call SInt(W57,"Level",ML8)
call SReal(W57,"SourceX",GetUnitX(Z77)*1.)
call SReal(W57,"SourceY",GetUnitY(Z77)*1.)
call SReal(W57,"LastX",GetUnitX(X77)*1.)
call SReal(W57,"LastY",GetUnitY(X77)*1.)
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function RGF))
call Dmg(Z77,X77,NormalFire,60*ML8)
call IssueTargetOrderById(Z77,851983,X77)
set t=null
set F4F=null
endfunction
function RMF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer C77=GetTriggerEvalCount(t)
local integer ML8=LInt(W57,"Level")
local unit Z77=LUnit(W57,"Source")
local real CV7=LReal(W57,"Angle")
local real ZLD=LReal(W57,"SourceX")
local real Z1D=LReal(W57,"SourceY")
local real BM7=LReal(W57,"TargetX")
local real BN7=LReal(W57,"TargetY")
local real S_8=ZLD+(30*(20+4*2)/ 30)*C77*Cos(CV7*bj_DEGTORAD)
local real T48=Z1D+(30*(20+4*2)/ 30)*C77*Sin(CV7*bj_DEGTORAD)
local real RNF=SquareRoot((S_8-BM7)*(S_8-BM7)+(T48-BN7)*(T48-BN7))
local real ROF=700
local real RPF=175
local real RQF=(1-RNF/ ROF)*RPF*2
local group g=OG8()
local unit X77
if C77==1 then
call SetUnitAnimationByIndex(Z77,5)
call SetUnitTimeScale(Z77,1.5)
endif
if RQF>RPF then
call SetUnitAnimationByIndex(Z77,5)
set RQF=RPF*2-RQF
endif
call SetUnitFlyHeight(Z77,P18(RQF,0),0)
call SetUnitX(Z77,PQ8(S_8))
call SetUnitY(Z77,PS8(T48))
call SetUnitFacing(Z77,CV7)
set H04=Z77
call GroupEnumUnitsInRange(g,S_8,T48,'x',Condition(function U28))
set X77=FirstOfGroup(g)
call OF8(g)
if RNF<30 or X77!=null or GetTriggerEvalCount(t)>75 then
call SetUnitFlyHeight(Z77,0,0)
call SetUnitFacing(Z77,CV7)
call SetUnitTimeScale(Z77,1)
call SetUnitAnimation(Z77,"stand")
call SetUnitPathing(Z77,true)
call UnitRemoveAbility(Z77,'A1J6')
call KillTrees(GetUnitX(Z77),GetUnitY(Z77),'d')
if X77!=null and GU8(X77)==false then
call AddTimedBoolBuff(X77,"4408",5)
call RKF(Z77,X77,ML8)
endif
call LT7(W57)
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
set g=null
return false
endfunction
function RRF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A1J7')
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local real LW7=700
local real CV7=GetUnitFacing(Z77)
local real BJ7=GetUnitX(Z77)
local real BK7=GetUnitY(Z77)
local real BM7=PQ8(BJ7+LW7*Cos(CV7*bj_DEGTORAD))
local real BN7=PS8(BK7+LW7*Sin(CV7*bj_DEGTORAD))
call AddPermanentAbility(Z77,'Amrf')
call UnitRemoveAbility(Z77,'Amrf')
call SetUnitPathing(Z77,false)
call AddPermanentAbility(Z77,'A1J6')
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerAddCondition(t,Condition(function RMF))
call SUnit(W57,"Source",Z77)
call SInt(W57,"Level",ML8)
call SReal(W57,"Angle",CV7*1.)
call SReal(W57,"SourceX",BJ7*1.)
call SReal(W57,"SourceY",BK7*1.)
call SReal(W57,"TargetX",BM7*1.)
call SReal(W57,"TargetY",BN7*1.)
set Z77=null
set t=null
endfunction
function RSF takes nothing returns boolean
if GetSpellAbilityId()=='A1J7' then
call RRF()
endif
return false
endfunction
function G69 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function RSF))
set t=null
endfunction
function RTF takes nothing returns nothing
local integer EC8=GetHandleId(GetTriggeringTrigger())
local unit Z77=H04
local unit m5=H54
local real P99=LReal(EC8,"Damage")
call Dmg(Z77,m5,NormalFire,P99)
set Z77=null
set m5=null
endfunction
function RUF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit m5=GetEnumUnit()
local trigger t=T88(Z77,m5,'h0BP',"RTF",700)
local integer W57=GetHandleId(t)
local integer ML8=GetUnitAbilityLevel(Z77,'A04A')
local real P08
if ML8==1 then
set P08=85
elseif ML8==2 then
set P08=165
elseif ML8==3 then
set P08=225
elseif ML8==4 then
set P08=300
endif
call SReal(W57,"Damage",P08)
set Z77=null
set m5=null
set t=null
endfunction
function RVF takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local group g=OG8()
local integer ML8=GetUnitAbilityLevel(Z77,'A04A')
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),500,Condition(function UB8))
call ForGroup(g,function RUF)
call OF8(g)
call PlaySoundOnUnitBJ(PP,'d',Z77)
set Z77=null
set g=null
endfunction
function RWF takes nothing returns boolean
if GetSpellAbilityId()=='A04A' then
call RVF()
endif
return false
endfunction
function GL9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function RWF))
set t=null
endfunction
function RXF takes nothing returns boolean
local unit X77=GetSpellTargetUnit()
local unit Z77
if HasLinkin(X77)or IsUnitType(X77,UNIT_TYPE_HERO)==false then
set X77=null
return false
endif
set Z77=GetTriggerUnit()
call RW8(X77,'BEsh',3,15,Z77,'A0Q7',false)
set X77=null
set Z77=null
return false
endfunction
function G19 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function RXF))
set t=null
endfunction
function RYF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=LUnit(EC8,"Source")
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST then
call LT7(EC8)
call EA8(t)
else
call LT7(EC8)
call EA8(t)
call ZN7(p5)
endif
set t=null
set p5=null
return false
endfunction
function RZF takes nothing returns nothing
local unit p5=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=GetUnitAbilityLevel(p5,'A00P')
call TriggerRegisterTimerEvent(t,1+2+.75*TA8,false)
call TriggerRegisterUnitEvent(t,p5,EVENT_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t,Condition(function RYF))
call SUnit(EC8,"Source",p5)
set p5=null
set t=null
endfunction
function NewWardOfSnake takes nothing returns nothing
local unit s=GetTriggerUnit()
local integer i=GetUnitAbilityLevel(s,'A00H')
local integer id
local real x1=GetSpellTargetX()
local real y1=GetSpellTargetY()
local real x
local real y
local real d
local real h
local real t=40
local unit u
if i==0 then
set t=45
set i=GetUnitAbilityLevel(s,'A0A1')
if i==1 then
set id='o01C'
elseif i==2 then
set id='o01D'
elseif i==3 then
set id='o01E'
endif
else
if i==1 then
set id='osp4'
elseif i==2 then
set id='o008'
elseif i==3 then
set id='o009'
endif
endif
set d=65
set h=65
set x=x1+0*d
set y=y1+1*h
set u=CreateUnit(GetOwningPlayer(s),id,x,y,0)
call UnitApplyTimedLife(u,'BTLF',t)
set x=x1+1*d
set y=y1+1*h
set u=CreateUnit(GetOwningPlayer(s),id,x,y,0)
call UnitApplyTimedLife(u,'BTLF',t)
set x=x1+2*d
set y=y1+1*h
set u=CreateUnit(GetOwningPlayer(s),id,x,y,0)
call UnitApplyTimedLife(u,'BTLF',t)
set x=x1-1*d
set y=y1+1*h
set u=CreateUnit(GetOwningPlayer(s),id,x,y,0)
call UnitApplyTimedLife(u,'BTLF',t)
set x=x1-2*d
set y=y1+1*h
set u=CreateUnit(GetOwningPlayer(s),id,x,y,0)
call UnitApplyTimedLife(u,'BTLF',t)
set x=x1-1*d
set y=y1+0*h
set u=CreateUnit(GetOwningPlayer(s),id,x,y,0)
call UnitApplyTimedLife(u,'BTLF',t)
set x=x1+1*d
set y=y1+0*h
set u=CreateUnit(GetOwningPlayer(s),id,x,y,0)
call UnitApplyTimedLife(u,'BTLF',t)
set x=x1-1*d
set y=y1-1*h
set u=CreateUnit(GetOwningPlayer(s),id,x,y,0)
call UnitApplyTimedLife(u,'BTLF',t)
set x=x1+0*d
set y=y1-1*h
set u=CreateUnit(GetOwningPlayer(s),id,x,y,0)
call UnitApplyTimedLife(u,'BTLF',t)
set x=x1+1*d
set y=y1-1*h
set u=CreateUnit(GetOwningPlayer(s),id,x,y,0)
call UnitApplyTimedLife(u,'BTLF',t)
set s=null
endfunction
function RAF takes nothing returns boolean
if GetSpellAbilityId()=='A00P' then
call RZF()
elseif GetSpellAbilityId()=='A00H' or GetSpellAbilityId()=='A0A1' then
call NewWardOfSnake()
endif
return false
endfunction
function G09 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function RAF))
set t=null
endfunction
function RBF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
if GetTriggerEventId()==EVENT_WIDGET_DEATH or GetTriggerEvalCount(t)==4 or GU8(X77)then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call UnitRemoveAbility(X77,YL4)
call UnitRemoveAbility(X77,Y14)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
if GetTriggerEventId()!=EVENT_WIDGET_DEATH then
call Dmg(Z77,X77,NormalFire,20*ML8-10)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function RCF takes unit Z77,unit X77,integer ML8 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call AddPermanentAbility(X77,YL4)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function RBF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget(ZS4,X77,"chest")))
set t=null
endfunction
function R3F takes nothing returns boolean
if IsUnitInGroup(GetEnumUnit(),Y04)==false and GU8(GetEnumUnit())==false then
call GroupAddUnit(Y04,GetEnumUnit())
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\FireBlast.mdx",GetEnumUnit(),"chest"))
call RCF(Y24,GetEnumUnit(),Y54)
endif
return false
endfunction
function R6F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer C77=(LoadInteger(R8,(W57),(34)))
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real BJ7=(LoadReal(R8,(W57),(189)))
local real BK7=(LoadReal(R8,(W57),(190)))
local real BM7=(LoadReal(R8,(W57),(47)))
local real BN7=(LoadReal(R8,(W57),(48)))
local real a=(LoadReal(R8,(W57),(13)))
local real RLF=(1-I2R(C77)/ 50)*bj_PI
local real R1F=Z44/ 2*Cos(RLF)
local real R0F=Y_4/ 2*Sin(RLF)
local real x=PQ8(BM7+R1F*Cos(a)-R0F*Sin(a))
local real y=PS8(BN7+R1F*Sin(a)+R0F*Cos(a))
local group PLD=(LoadGroupHandle(R8,(W57),(133)))
local group g
local integer ML8=GetUnitAbilityLevel(Z77,'A1RJ')
if GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and C77>0 and(GetSpellAbilityId()=='A20N' or GetSpellAbilityId()=='A1RK'))or C77>'d' then
call KillTrees(x,y,300)
call SetUnitVertexColor(Z77,255,255,255,255)
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A1RJ' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1RJ',true)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A20N',false)
call SetUnitPathing(Z77,true)
call OF8(PLD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
if ModuloInteger(C77,10)==0 then
call KillTrees(x,y,200)
endif
call SaveInteger(R8,(W57),(34),(C77+1))
call SetUnitX(Z77,x)
call SetUnitY(Z77,y)
call SetUnitFacing(Z77,(a+RLF-bj_PI/ 2)*bj_RADTODEG)
set g=OG8()
set Y04=PLD
set H04=Z77
set Y24=Z77
set Y54=GetUnitAbilityLevel(Z77,'A1RJ')
call GroupEnumUnitsInRange(g,x,y,200+25,Condition(function UW8))
call ForGroup(g,function R3F)
call OF8(g)
endif
set t=null
set Z77=null
set g=null
set PLD=null
return false
endfunction
function R5F takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real BJ7=GetUnitX(Z77)
local real BK7=GetUnitY(Z77)
local real a=YI7(BJ7,BK7,GetSpellTargetX(),GetSpellTargetY())*bj_DEGTORAD
local real BM7=BJ7+1400/ 2*Cos(a)
local real BN7=BK7+1400/ 2*Sin(a)
call SetUnitState(Z77,UNIT_STATE_LIFE,GetUnitState(Z77,UNIT_STATE_LIFE)-GetUnitState(Z77,UNIT_STATE_LIFE)*.15)
call AddTimedBoolBuff(Z77,"DashState1",2)
call AddTimedBoolBuff(Z77,"DashState2",2)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function R6F))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(189),((BJ7)*1.))
call SaveReal(R8,(W57),(190),((BK7)*1.))
call SaveReal(R8,(W57),(47),((BM7)*1.))
call SaveReal(R8,(W57),(48),((BN7)*1.))
call SaveReal(R8,(W57),(13),((a)*1.))
call SaveGroupHandle(R8,(W57),(133),(OG8()))
call SetUnitPathing(Z77,false)
call SetUnitVertexColor(Z77,255,255,255,50)
call AddPermanentAbility(Z77,'A20N')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1RJ',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A20N',true)
set t=null
set Z77=null
endfunction
function R2F takes nothing returns boolean
if GetSpellAbilityId()=='A1RJ' then
call R5F()
endif
return false
endfunction
function G59 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function R2F))
set t=null
endfunction
function R_F takes nothing returns nothing
local unit Z77=ZM4
local unit X77=GetEnumUnit()
call Dmg(Z77,X77,NormalFire,40+20*ZN4)
call QG8("Doodads\\Cinematic\\FireTrapUp\\FireTrapUp.mdl",X77,"origin",1)
set Z77=null
set X77=null
endfunction
function S4F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer ML8=GetUnitAbilityLevel(Z77,'A1RK')
local group g
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set H04=Z77
set ZM4=Z77
set ZN4=ML8
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),1000+25,Condition(function UM8))
call ForGroup(g,function R_F)
call OF8(g)
set g=null
endif
set t=null
set Z77=null
return false
endfunction
function S7F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit S8F=(LoadUnitHandle(R8,(W57),(589)))
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if IsUnitIllusion(GetEventDamageSource())then
call AddLife(S8F,GetEventDamage())
endif
else
if GetUnitX(S8F)!=x or GetUnitY(S8F)!=y then
call SetUnitPosition(S8F,x,y)
endif
if GetUnitY(Z77)!=x or GetUnitY(Z77)!=y then
call SetUnitPosition(Z77,x,y)
endif
call SetUnitX(AC7,GetUnitX(Z77))
call SetUnitY(AC7,GetUnitY(Z77))
endif
if GetTriggerEvalCount(t)==1 then
call PauseUnit(Z77,true)
endif
set t=null
set S8F=null
set Z77=null
set AC7=null
return false
endfunction
function S9F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit SDF=(LoadUnitHandle(R8,(W57),(588)))
local unit S8F=(LoadUnitHandle(R8,(W57),(589)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local unit XAD=(LoadUnitHandle(R8,(W57),(239)))
local integer ML8=GetUnitAbilityLevel(Z77,'A1RK')
local group g
local unit AC7
local integer SEF
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call StopSound(WJ4,false,false)
call ShowUnit(SDF,false)
call ShowUnit(XAD,false)
call FlushChildHashtable(R8,(W57))
call EA8(t)
call ShowUnit(Z77,true)
call EY8(Z77,"4326")
call UnitRemoveAbility(Z77,'A04R')
call SetUnitInvulnerable(Z77,false)
call PauseUnit(Z77,false)
if GetLocalPlayer()==GetOwningPlayer(Z77)then
call ClearSelection()
call SelectUnit(Z77,true)
endif
call SetUnitState(Z77,UNIT_STATE_LIFE,1)
set AC7=CreateUnit(GetOwningPlayer(GetKillingUnit()),'e00E',0,0,0)
call UnitRemoveBuffs(Z77,true,true)
call UnitRemoveAbility(Z77,'Aetl')
call UnitDamageTarget(AC7,Z77,100000000.,true,false,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
set AC7=null
else
if GetTriggerEvalCount(t)==1 then
call SetUnitFlyHeight(S8F,0,200)
elseif GetTriggerEvalCount(t)==2 then
call PauseUnit(S8F,false)
call UnitApplyTimedLife(S8F,'BTLF',.1)
call StopSound(WJ4,false,false)
call StartSound(WK4)
call DestroyEffect(AddSpecialEffect("war3mapImported\\FireNova2.mdx",GetUnitX(SDF),GetUnitY(SDF)))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call ShowUnit(Z77,true)
call EY8(Z77,"4326")
call UnitRemoveAbility(Z77,'A04R')
call SetUnitInvulnerable(Z77,false)
call SetUnitAnimationByIndex(Z77,8)
call QueueUnitAnimation(Z77,"idle")
call PauseUnit(Z77,false)
if GetLocalPlayer()==GetOwningPlayer(Z77)then
call ClearSelection()
call SelectUnit(Z77,true)
endif
call ShowUnit(SDF,false)
call ShowUnit(XAD,false)
call SetUnitState(Z77,UNIT_STATE_LIFE,GetUnitState(Z77,UNIT_STATE_MAX_LIFE))
call SetUnitState(Z77,UNIT_STATE_MANA,GetUnitState(Z77,UNIT_STATE_MAX_MANA))
set SEF=GetUnitAbilityLevel(Z77,'A1RJ')
if SEF>0 then
call UnitRemoveAbility(Z77,'A1RJ')
call UnitAddAbility(Z77,'A1RJ')
call SetUnitAbilityLevel(Z77,'A1RJ',SEF)
endif
set SEF=GetUnitAbilityLevel(Z77,'A1YX')
if SEF>0 then
call UnitRemoveAbility(Z77,'A1YX')
call UnitAddAbility(Z77,'A1YX')
call SetUnitAbilityLevel(Z77,'A1YX',SEF)
endif
set SEF=GetUnitAbilityLevel(Z77,'A1YY')
if SEF>0 then
call UnitRemoveAbility(Z77,'A1YY')
call UnitAddAbility(Z77,'A1YY')
call SetUnitAbilityLevel(Z77,'A1YY',SEF)
endif
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
call AddPermanentAbility(AC7,'A1ZT')
call SetUnitAbilityLevel(AC7,'A1ZT',ML8)
call IssueImmediateOrderById(AC7,852127)
set AC7=null
endif
endif
set t=null
set Z77=null
set SDF=null
set XAD=null
set S8F=null
return false
endfunction
function SFF takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local unit SDF
local unit S8F
local unit XAD=CreateUnit(GetOwningPlayer(Z77),'h0CL',GetUnitX(Z77),GetUnitY(Z77),0)
local integer ML8=GetUnitAbilityLevel(Z77,'A1RK')
local unit AC7
local unit SGF=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
set SDF=CreateUnit(GetOwningPlayer(Z77),'h0BX',x,y,0)
if ML8==1 then
set S8F=CreateUnit(GetOwningPlayer(Z77),'h0CV',x,y,0)
elseif ML8==2 then
set S8F=CreateUnit(GetOwningPlayer(Z77),'h0CX',x,y,0)
elseif ML8==3 then
set S8F=CreateUnit(GetOwningPlayer(Z77),'h0CW',x,y,0)
endif
call AddSpecialEffectTarget("war3mapImported\\PhoenixDown_2.mdl",SDF,"origin")
if GetLocalPlayer()==GetOwningPlayer(Z77)then
call ClearSelection()
call SelectUnit(S8F,true)
endif
call KillTrees(x,y,400)
call ShowUnit(Z77,false)
call EW8(Z77,"4326")
call AddPermanentAbility(Z77,'A04R')
call T99(Z77,0,0)
call SetUnitInvulnerable(Z77,true)
call UnitRemoveBuffs(Z77,true,true)
call StartSound(WJ4)
call UnitRemoveAbility(S8F,'Arav')
call UnitApplyTimedLife(SDF,'BTLF',6.1)
call UnitApplyTimedLife(XAD,'BTLF',6.1)
call UnitApplyTimedLife(S8F,'BTLF',6.1)
call TriggerRegisterTimerEvent(t,5.2,false)
call TriggerRegisterTimerEvent(t,6,false)
call TriggerAddCondition(t,Condition(function S9F))
call TriggerRegisterUnitEvent(t,S8F,EVENT_UNIT_DEATH)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(588),(SDF))
call SaveUnitHandle(R8,(W57),(589),(S8F))
call SaveUnitHandle(R8,(W57),(239),(XAD))
call SaveReal(R8,(W57),(6),((GetUnitX(Z77))*1.))
call SaveReal(R8,(W57),(7),((GetUnitY(Z77))*1.))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,S8F,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function S4F))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterUnitEvent(t,S8F,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,S8F,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function S7F))
call SaveUnitHandle(R8,(W57),(589),(S8F))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(6),((GetUnitX(Z77))*1.))
call SaveReal(R8,(W57),(7),((GetUnitY(Z77))*1.))
call SaveUnitHandle(R8,(W57),(19),(SGF))
if AR7(Z77,'I0A8')then
call UnitAddAbility(SGF,'A04I')
endif
set t=null
set Z77=null
set SDF=null
set S8F=null
endfunction
function SHF takes nothing returns boolean
if GetSpellAbilityId()=='A1RK' then
call SFF()
endif
return false
endfunction
function H99 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function SHF))
call PU8('A0X6')
call PU8('A1ZT')
set t=null
endfunction
function SIF takes nothing returns nothing
call SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)+LW4)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\BirdShitTarget_1.mdx",GetEnumUnit(),"origin"))
endfunction
function SJF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local group g
local integer ML8=GetUnitAbilityLevel(Z77,'A27B')
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call DestroyEffect(AddSpecialEffect("war3mapImported\\Firaga_2.mdx",x,y))
call FlushChildHashtable(R8,(W57))
call EA8(t)
set g=OG8()
set LW4=50+75*ML8
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,425,Condition(function U08))
call ForGroup(g,function SIF)
call OF8(g)
set t=null
set Z77=null
set g=null
return false
endfunction
function SKF takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
call TriggerRegisterTimerEvent(t,3,false)
call TriggerAddCondition(t,Condition(function SJF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
if IsPlayerAlly(GetOwningPlayer(Z77),GetLocalPlayer())or N08(GetLocalPlayer())then
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffect("war3mapImported\\BirdShit_1.mdx",x,y)))
else
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffect("",x,y)))
endif
if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(Z77))or N08(GetLocalPlayer())then
call PingMinimapEx(x,y,3,255,0,0,false)
call S68(YB4,x,y)
endif
call S18(GetOwningPlayer(Z77),4,x,y,500)
call SetUnitState(Z77,UNIT_STATE_LIFE,GetUnitState(Z77,UNIT_STATE_LIFE)*.9)
set t=null
set Z77=null
endfunction
function SMF takes nothing returns boolean
if GetSpellAbilityId()=='A27B' then
call SKF()
endif
return false
endfunction
function G_9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function SMF))
set t=null
endfunction
function SNF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call UnitRemoveAbility(X77,'A270')
call UnitRemoveAbility(X77,'B0EK')
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetTriggerEvalCount(t)>4 then
call UnitRemoveAbility(X77,'A270')
call UnitRemoveAbility(X77,'B0EK')
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call Dmg(Z77,X77,NormalFire,16+12*ML8)
else
call Dmg(Z77,X77,NormalFire,16+12*ML8)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function SOF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local real PND=(LoadReal(R8,(W57),(23)))
local real POD=(LoadReal(R8,(W57),(24)))
local real a=(LoadReal(R8,(W57),(137)))
local real x=PND+12*Cos(a)
local real y=POD+12*Sin(a)
call SetUnitX(X77,x)
call SetUnitY(X77,y)
call SaveReal(R8,(W57),(23),((x)*1.))
call SaveReal(R8,(W57),(24),((y)*1.))
if GetTriggerEvalCount(t)>25 then
call KillTrees(x,y,'d')
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function SPF takes unit Z77,unit X77,real x,real y,real a returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer ML8=GetUnitAbilityLevel(Z77,'A271')
call SetUnitPosition(X77,GetUnitX(X77),GetUnitY(X77))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveReal(R8,(W57),(137),((a*bj_DEGTORAD)*1.))
call SaveReal(R8,(W57),(23),((GetUnitX(X77))*1.))
call SaveReal(R8,(W57),(24),((GetUnitY(X77))*1.))
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function SOF))
set t=CreateTrigger()
set W57=GetHandleId(t)
call SaveInteger(R8,(W57),(5),(ML8))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("Environment\\LargeBuildingFire\\LargeBuildingFire1.mdl",X77,"chest")))
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function SNF))
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A270',false)
call AddPermanentAbility(X77,'A270')
set t=null
endfunction
function SQF takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),LX4)==false then
if Z47(LZ4,GetEnumUnit())<24 or RAbsBJ(Cos(YH7(LZ4,GetEnumUnit())-LC4))<.26 then
call GroupAddUnit(LX4,GetEnumUnit())
if Sin((YH7(LZ4,GetEnumUnit())-LC4)*bj_DEGTORAD)<0 then
call SPF(LY4,GetEnumUnit(),LA4,LB4,LC4-90)
else
call SPF(LY4,GetEnumUnit(),LA4,LB4,LC4+90)
endif
endif
endif
endfunction
function SRF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit S08=(LoadUnitHandle(R8,(W57),(45)))
local real a=(LoadReal(R8,(W57),(137)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local group XCD=(LoadGroupHandle(R8,(W57),(187)))
local group g
if GetTriggerEvalCount(t)>'}' then
call KillUnit(S08)
call OF8(XCD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set x=x+8*Cos(a)
set y=y+8*Sin(a)
call SetUnitX(S08,x)
call SetUnitY(S08,y)
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
set H04=Z77
set LA4=x
set LB4=y
set LC4=a*bj_RADTODEG
set LX4=XCD
set LY4=Z77
set LZ4=S08
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,225,Condition(function UM8))
call ForGroup(g,function SQF)
call OF8(g)
endif
set t=null
set Z77=null
return false
endfunction
function SSF takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real BM7=GetSpellTargetX()
local real BN7=GetSpellTargetY()
local real CV7=Atan2(BN7-GetUnitY(Z77),BM7-GetUnitX(Z77))
local integer ML8=GetUnitAbilityLevel(Z77,'A271')
local unit S08=CreateUnit(GetOwningPlayer(Z77),'h0DA',GetUnitX(Z77),GetUnitY(Z77),CV7*bj_RADTODEG)
call TriggerRegisterTimerEvent(t,.01,true)
call TriggerAddCondition(t,Condition(function SRF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(45),(S08))
call SaveReal(R8,(W57),(137),((CV7)*1.))
call SaveReal(R8,(W57),(6),((GetUnitX(Z77))*1.))
call SaveReal(R8,(W57),(7),((GetUnitY(Z77))*1.))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveGroupHandle(R8,(W57),(187),(OG8()))
set t=null
set Z77=null
endfunction
function STF takes nothing returns boolean
if GetSpellAbilityId()=='A271' then
call SSF()
endif
return false
endfunction
function H89 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function STF))
set t=null
endfunction
function SUF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer TG8=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(TG8),(2)))
local real SVF=(LoadReal(R8,(GetHandleId(Z77)),(681)))
call FlushChildHashtable(R8,(TG8))
call EA8(t)
if((TimerGetElapsed(E4))-SVF<.49)==false or GetTriggerEventId()==EVENT_UNIT_DEATH then
call UnitRemoveAbility(Z77,'A1Z4')
call UnitRemoveAbility(Z77,'A1ZA')
call UnitRemoveAbility(Z77,'A1ZB')
call UnitRemoveAbility(Z77,'A1Z9')
call UnitRemoveAbility(Z77,'B0DV')
endif
set t=null
set Z77=null
return false
endfunction
function SWF takes unit Z77 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer SXF
call TriggerRegisterTimerEvent(t,.5,false)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function SUF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(GetHandleId(Z77)),(681),(((TimerGetElapsed(E4)))*1.))
if ZF4==1 then
set SXF='A1Z4'
call UnitRemoveAbility(Z77,'A1ZA')
call UnitRemoveAbility(Z77,'A1ZB')
call UnitRemoveAbility(Z77,'A1Z9')
elseif ZF4==2 then
set SXF='A1ZA'
call UnitRemoveAbility(Z77,'A1Z4')
call UnitRemoveAbility(Z77,'A1ZB')
call UnitRemoveAbility(Z77,'A1Z9')
elseif ZF4==3 then
set SXF='A1ZB'
call UnitRemoveAbility(Z77,'A1Z4')
call UnitRemoveAbility(Z77,'A1ZA')
call UnitRemoveAbility(Z77,'A1Z9')
elseif ZF4==4 then
set SXF='A1Z9'
call UnitRemoveAbility(Z77,'A1Z4')
call UnitRemoveAbility(Z77,'A1ZA')
call UnitRemoveAbility(Z77,'A1ZB')
endif
call AddPermanentAbility(Z77,SXF)
call UnitMakeAbilityPermanent(Z77,true,SXF)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),SXF,false)
set t=null
endfunction
function SYF takes nothing returns nothing
local unit X77=GetEnumUnit()
local real SZF=ZI4
local real SAF=ZJ4
local real P08=SZF+SAF*GetUnitState(X77,UNIT_STATE_MAX_LIFE)
set P08=P08/ 5
if IsUnitEnemy(X77,GetOwningPlayer(ZG4))then
call Dmg(ZG4,X77,HeroMagic,P08)
if GU8(X77)==false then
call SWF(X77)
endif
else
call SetUnitState(X77,UNIT_STATE_LIFE,GetUnitState(X77,UNIT_STATE_LIFE)+P08*.5)
endif
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\FireRayTarget.mdx",X77,"origin"))
call S18(GetOwningPlayer(X77),2,GetUnitX(ZG4),GetUnitY(ZG4),500)
set X77=null
endfunction
function SBF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer C77=(LoadInteger(R8,(W57),(34)))
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real SCF=GetUnitFacing(Z77)
local real a=SCF*bj_DEGTORAD
local location l1=GetUnitLoc(Z77)
local real S3F=GetLocationZ(l1)
local location l2=Location(GetUnitX(Z77)+Z74*Cos(a),GetUnitY(Z77)+Z74*Sin(a))
local real S6F=GetLocationZ(l2)
local lightning SLF=(LoadLightningHandle(R8,(W57),(676)))
local lightning S1F=(LoadLightningHandle(R8,(W57),(677)))
local lightning S0F=(LoadLightningHandle(R8,(W57),(678)))
local lightning S5F=(LoadLightningHandle(R8,(W57),(679)))
local lightning S2F=(LoadLightningHandle(R8,(W57),(680)))
local real S_F=1
local real BJ7
local real BK7
local real T4F
local real T7F
local real T8F
local real T9F
local real TDF
local real TEF
local real TFF
local real TGF
local real THF
local real TIF
local real TJF
local real TKF
local real TMF
local real TNF
local real TOF
local real TPF
local real TQF
local real TRF
local real TSF
local real TTF
local real TUF
local real TVF
local real TWF
local real TXF
local real TYF
local real TZF
local real TAF
local real TBF
local real TCF
local real T3F
local real T6F
local group g
local real x
local real y
local integer i
local real TLF
local real T1F
local real T0F
local boolean T5F=FALSE
local boolean T2F=false
local unit T_F=(LoadUnitHandle(R8,(W57),(17)))
local unit CT4=null
local unit DriftTarget=null
local real U4F
local real U7F
local real U8F
local real U9F=(LoadReal(R8,(W57),(688)))
local boolean UDF=(LoadBoolean(R8,(W57),(689)))
local boolean UEF=(LoadBoolean(R8,(W57),(672)))
local real UFF
local ubersplat UGF
local real O32=(LoadReal(R8,(W57),(23)))
local real O42=(LoadReal(R8,(W57),(24)))
local real SZF
local real SAF
local real UHF
local real UIF=5
if GetUnitCurrentOrder(Z77)==852001 then
call DisableTrigger(t)
call ZN7(Z77)
call EnableTrigger(t)
endif
call RemoveLocation(l1)
call RemoveLocation(l2)
if IsUnitPaused(Z77)==false and(GetTriggerEventId()==EVENT_UNIT_ISSUED_POINT_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER)then
set BJ7=GetUnitX(Z77)
set BK7=GetUnitY(Z77)
if GetIssuedOrderId()!=852490 and GetIssuedOrderId()!=852185 and GetIssuedOrderId()!=852600 then
call DisableTrigger(t)
call ZN7(Z77)
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 TLF=YI7(x,y,BJ7,BK7)
if TLF<0 then
set TLF=TLF+360
endif
set T0F=SCF-TLF
if T0F<0 then
set T0F=T0F+360
endif
if T0F<180 then
set T5F=true
set T1F=SCF+6
else
set T2F=true
set T1F=SCF-6
endif
set U9F=YI7(x,y,BJ7,BK7)+180
call SaveReal(R8,(W57),(688),((U9F)*1.))
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT or GetTriggerEventId()==EVENT_WIDGET_DEATH or(LoadInteger(R8,(GetHandleId(Z77)),(704)))==-1 or C77>=ZE4/ .02 or S69(Z77)or CI7(Z77)then
if GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and(GetSpellAbilityId()=='A1Z3' or GetSpellAbilityId()=='A1RK' or(GetSpellAbilityId()=='A27H' or GetSpellAbilityId()=='AZ1H')))then
call EY8(Z77,"SunRay|Disarmed")
call UI8(Z77)
call SetUnitPathing(Z77,true)
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(Z77,'A205')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1Z3',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A205',false)
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A1YY' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1YY',true)
endif
call DestroyLightning(SLF)
call DestroyLightning(S1F)
call DestroyLightning(S0F)
call DestroyLightning(S5F)
call DestroyLightning(S2F)
call StopSound(YA4,false,true)
endif
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if GetIssuedOrderId()==852177then
set UDF=true
endif
if GetIssuedOrderId()==852178then
set UDF=false
endif
call SaveBoolean(R8,(W57),(689),(UDF))
else
set TLF=SCF-U9F
if TLF<-180 then
set TLF=TLF+360
elseif TLF>180 then
set TLF=TLF-360
endif
set UFF=1
if C77<35 and UEF then
set UFF=7
endif
if TLF<(-1*UFF)then
set SCF=SCF+UFF
elseif TLF>UFF then
set SCF=SCF-UFF
else
set UEF=false
call SaveBoolean(R8,(W57),(672),(UEF))
set SCF=U9F
endif
if LState(Z77,"DashState1")==false then
call SetUnitFacing(Z77,SCF)
endif
set a=SCF*bj_DEGTORAD
set C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
set T4F=Z74
set BJ7=GetUnitX(Z77)+50*Cos(a)
set BK7=GetUnitY(Z77)+50*Sin(a)
if UDF and UD8(Z77)==false and S69(Z77)==false then
if((LoadInteger(R8,(GetHandleId((Z77))),((4331))))==J)then
set UIF=UIF*2
endif
set U8F=a
set U4F=PQ8(GetUnitX(Z77)+UIF*Cos(U8F))
set U7F=PS8(GetUnitY(Z77)+UIF*Sin(U8F))
call KillTrees(U4F,U7F,200)
call SetUnitX(Z77,U4F)
call SetUnitY(Z77,U7F)
endif
call SetUnitState(Z77,UNIT_STATE_LIFE,GetUnitState(Z77,UNIT_STATE_LIFE)-GetUnitState(Z77,UNIT_STATE_LIFE)*.06*.02)
call KillTrees(BJ7,BK7,200)
if ModuloInteger(C77,10)==0 then
set ZH4=OG8()
set H04=Z77
set i=0
loop
exitwhen i*50>Z74
set x=BJ7+i*50*Cos(a)
set y=BK7+i*50*Sin(a)
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,130+25,Condition(function UM8))
call GroupAddGroup(g,ZH4)
call GroupEnumUnitsInRange(g,x,y,'d',Condition(function U08))
call GroupAddGroup(g,ZH4)
call OF8(g)
if ModuloInteger(i,3)==0 then
call S18(GetOwningPlayer(Z77),2,x,y,225)
endif
set i=i+1
endloop
set ZG4=Z77
set ZF4=GetUnitAbilityLevel(Z77,'A1YY')
set UHF=(I2R(C77)/ 50.)/ 6
set ZI4=(5*ZF4+10)+(5*ZF4+10)*UHF
set ZJ4=(ZF4+UHF*(ZF4))/'d'
call GroupRemoveUnit(ZH4,Z77)
call ForGroup(ZH4,function SYF)
call OF8(ZH4)
set g=null
set ZH4=null
endif
if O18(Z77)==false then
if T_F!=null then
set T4F=Z47(Z77,T_F)
endif
set T7F=BJ7
set T8F=BK7
set T9F=S3F+200
set TDF=T7F+T4F*Cos(a)
set TEF=T8F+T4F*Sin(a)
set TFF=S6F
set TGF=BJ7+Z84*Cos((SCF-90)*bj_DEGTORAD)
set THF=BK7+Z94*Cos((SCF-90)*bj_DEGTORAD)
set TIF=S3F+200
set TJF=TGF+T4F*Cos(a)
set TKF=THF+T4F*Sin(a)
set TMF=S6F
set TNF=BJ7+Z84*Cos((SCF+90)*bj_DEGTORAD)
set TOF=BK7+Z94*Cos((SCF+90)*bj_DEGTORAD)
set TPF=S3F+200
set TQF=TNF+T4F*Cos(a)
set TRF=TOF+T4F*Sin(a)
set TSF=S6F
set TTF=BJ7
set TUF=BK7
set TVF=S3F+200+ZD4
set TWF=TTF+T4F*Cos(a)
set TXF=TUF+T4F*Sin(a)
set TYF=S6F
set TZF=BJ7
set TAF=BK7
set TBF=S3F+200-ZD4
set TCF=TZF+T4F*Cos(a)
set T3F=TAF+T4F*Sin(a)
set T6F=S6F
if ModuloInteger(C77,10)==0 and T4F==Z74 then
set x=GetUnitX(Z77)+(Z74)*Cos(a)
set y=GetUnitY(Z77)+(Z74)*Sin(a)
call DestroyEffect(AddSpecialEffect("war3mapImported\\FireRayTarget.mdx",x,y))
endif
if ModuloInteger(C77,10)==0 then
call SetSoundPosition(YA4,GetUnitX(Z77),GetUnitY(Z77),'d')
set x=GetUnitX(Z77)+(T4F)*Cos(a)
set y=GetUnitY(Z77)+(T4F)*Sin(a)
set UGF=CreateUbersplat(x,y,"SRAY",255,255,255,255,false,false)
call SetUbersplatRenderAlways(UGF,true)
call GSD(UGF,10)
set UGF=null
endif
call MoveLightningEx(SLF,false,T7F,T8F,T9F,TDF,TEF,TFF)
call MoveLightningEx(S1F,false,TGF,THF,TIF,TJF,TKF,TMF)
call MoveLightningEx(S0F,false,TNF,TOF,TPF,TQF,TRF,TSF)
call MoveLightningEx(S5F,false,TTF,TUF,TVF,TWF,TXF,TYF)
call MoveLightningEx(S2F,false,TZF,TAF,TBF,TCF,T3F,T6F)
if N08(GetLocalPlayer())then
set S_F=1
endif
call SetLightningColor(SLF,1.,1.,1.,S_F)
call SetLightningColor(S1F,1.,1.,1.,S_F)
call SetLightningColor(S0F,1.,1.,1.,S_F)
call SetLightningColor(S5F,1.,1.,1.,S_F)
call SetLightningColor(S2F,1.,1.,1.,S_F)
endif
endif
set t=null
set Z77=null
set SLF=null
set S1F=null
set S0F=null
set S5F=null
set S2F=null
set l1=null
set l2=null
return false
endfunction
function UJF takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real a=YI7(GetUnitX(Z77),GetUnitY(Z77),GetSpellTargetX(),GetSpellTargetY())*bj_DEGTORAD
local real BM7=PQ8(GetUnitX(Z77)+Z74*Cos(a))
local real BN7=PS8(GetUnitY(Z77)+Z74*Sin(a))
local lightning SLF=AddLightning("SRAY",false,GetUnitX(Z77),GetUnitY(Z77),BM7,BN7)
local lightning S1F=AddLightning("SRAY",false,GetUnitX(Z77),GetUnitY(Z77),BM7,BN7)
local lightning S0F=AddLightning("SRAY",false,GetUnitX(Z77),GetUnitY(Z77),BM7,BN7)
local lightning S5F=AddLightning("SRAY",false,GetUnitX(Z77),GetUnitY(Z77),BM7,BN7)
local lightning S2F=AddLightning("SRAY",false,GetUnitX(Z77),GetUnitY(Z77),BM7,BN7)
call SetUnitFacing(Z77,a*bj_RADTODEG)
call StartSound(YA4)
call SetSoundPosition(YA4,GetUnitX(Z77),GetUnitY(Z77),'d')
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_ISSUED_ORDER)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function SBF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(13),((a)*1.))
call SaveReal(R8,(W57),(688),((a*bj_RADTODEG)*1.))
call SaveLightningHandle(R8,(W57),(676),(SLF))
call SaveLightningHandle(R8,(W57),(677),(S1F))
call SaveLightningHandle(R8,(W57),(678),(S0F))
call SaveLightningHandle(R8,(W57),(679),(S5F))
call SaveLightningHandle(R8,(W57),(680),(S2F))
call SaveBoolean(R8,(W57),(689),(false))
call SaveBoolean(R8,(W57),(672),(true))
call SaveReal(R8,(W57),(688),((a*bj_RADTODEG)*1.))
call SaveReal(R8,(W57),(23),((GetUnitX(Z77))*1.))
call SaveReal(R8,(W57),(24),((GetUnitY(Z77))*1.))
call UG8(Z77)
call EW8(Z77,"SunRay|Disarmed")
call SetUnitPathing(Z77,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1Z3',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A205',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1YY',false)
call AddPermanentAbility(Z77,'A1Z3')
call UnitMakeAbilityPermanent(Z77,true,'A1Z3')
call AddPermanentAbility(Z77,'A205')
call UnitMakeAbilityPermanent(Z77,true,'A205')
call TriggerEvaluate(t)
set t=null
set Z77=null
set Z77=null
set SLF=null
set S1F=null
set S0F=null
set S5F=null
set S2F=null
endfunction
function UKF takes nothing returns boolean
if GetSpellAbilityId()=='A1YY' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST then
else
call UJF()
endif
endif
return false
endfunction
function H79 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function UKF))
call GVD('A1Z4')
call GVD('A1ZA')
call GVD('A1ZB')
call GVD('A1Z9')
set t=null
endfunction
function UMF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,ZK4)
if GetTriggerEventId()==EVENT_UNIT_DEATH or(TimerGetElapsed(E4))>=(LoadReal(R8,(GetHandleId(X77)),(757)))or GU8(X77)then
call UnitRemoveAbility(X77,ZP4)
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
if ModuloInteger(GetTriggerEvalCount(t),4)==0 then
call Dmg(Z77,X77,NormalFire,20*ML8-10)
endif
set t=null
set Z77=null
return false
endfunction
function UNF takes nothing returns nothing
local unit Z77=ZO4
local unit X77=GetEnumUnit()
local trigger t
local integer W57
call SaveReal(R8,(GetHandleId(X77)),(757),(((TimerGetElapsed(E4))+4)*1.))
if GetUnitAbilityLevel(X77,ZP4)==0 then
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerAddCondition(t,Condition(function UMF))
call TriggerRegisterDeathEvent(t,X77)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget(ZS4,X77,"chest")))
if S_9(X77)==false then
call UnitAddAbility(X77,ZP4)
call SetUnitAbilityLevel(X77,'A2L7',GetUnitAbilityLevel(Z77,ZK4))
call UnitMakeAbilityPermanent(X77,true,ZP4)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),ZT4,false)
endif
set Z77=null
set X77=null
set t=null
endfunction
function UOF takes unit Z77,unit S08,real WAE,unit AC7,unit X77 returns nothing
local real x=GetUnitX(S08)
local real y=GetUnitY(S08)
local group g=OG8()
set H04=Z77
set ZO4=Z77
call GroupEnumUnitsInRange(g,x,y,175+25,Condition(function UW8))
call ForGroup(g,function UNF)
call OF8(g)
call DestroyEffect(AddSpecialEffect("war3mapImported\\Firaga_2.mdx",x,y))
call KillUnit(S08)
call ShowUnit(S08,false)
set g=null
endfunction
function UPF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer C77=(LoadInteger(R8,(W57),(34)))
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local unit UQF=(LoadUnitHandle(R8,(W57),(393)))
local real WAE=(LoadReal(R8,(W57),(685)))
local real BM7
local real BN7
local real x
local real y
local real a
local real r=18
local integer ML8=GetUnitAbilityLevel(Z77,'A1YX')
if GetTriggerEventId()==EVENT_UNIT_DEATH then
set BM7=GetUnitX(X77)
set BN7=GetUnitY(X77)
call SaveReal(R8,(W57),(47),((BM7)*1.))
call SaveReal(R8,(W57),(48),((BN7)*1.))
call RemoveSavedHandle(R8,(W57),(17))
call SaveUnitHandle(R8,(W57),(17),(null))
elseif X77==null then
set BM7=(LoadReal(R8,(W57),(47)))
set BN7=(LoadReal(R8,(W57),(48)))
else
set BM7=GetUnitX(X77)
set BN7=GetUnitY(X77)
endif
set a=YI7(GetUnitX(UQF),GetUnitY(UQF),BM7,BN7)
call SetUnitFacing(UQF,a)
set x=GetUnitX(UQF)+r*Cos(a*bj_DEGTORAD)
set y=GetUnitY(UQF)+r*Sin(a*bj_DEGTORAD)
call SetUnitX(UQF,x)
call SetUnitY(UQF,y)
if Z87(x,y,BM7,BN7)<r*2 then
call UOF(Z77,UQF,WAE,AC7,X77)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
set UQF=null
set AC7=null
return false
endfunction
function URF takes unit Z77,unit UQF,unit X77,real WAE,unit AC7 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local group g
local unit NewTarget
if Z77==X77 then
call KillUnit(UQF)
call ShowUnit(UQF,false)
else
call SetUnitVertexColor(UQF,255,255,255,255)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function UPF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(393),(UQF))
call SaveReal(R8,(W57),(47),((GetSpellTargetX())*1.))
call SaveReal(R8,(W57),(48),((GetSpellTargetY())*1.))
call SaveReal(R8,(W57),(685),((WAE)*1.))
call SaveUnitHandle(R8,(W57),(19),(AC7))
endif
set t=null
endfunction
function USF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer C77=(LoadInteger(R8,(W57),(34)))
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real BJ7=GetUnitX(Z77)
local real BK7=GetUnitY(Z77)
local unit UTF=(LoadUnitHandle(R8,(W57),(393)))
local unit UUF=(LoadUnitHandle(R8,(W57),(394)))
local unit UVF=(LoadUnitHandle(R8,(W57),(395)))
local unit UWF=(LoadUnitHandle(R8,(W57),(396)))
local integer ML8=GetUnitAbilityLevel(Z77,'A1YX')
local real a=GetUnitFacing(Z77)
local real x
local real y
local group g
local group g2
local real AQD=-1*360*.02/ 4
local real a2
local real KQD
local real WAE=(LoadReal(R8,(W57),(685)))
local real UXF
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local integer UYF=GetHandleId(Z77)
local player pl=GetOwningPlayer(Z77)
local integer UZF=800
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A1Z2' then
if O18(UTF)==false then
call URF(Z77,UTF,GetSpellTargetUnit(),WAE,AC7)
call RemoveSavedHandle(R8,(W57),(393))
elseif O18(UUF)==false then
call URF(Z77,UUF,GetSpellTargetUnit(),WAE,AC7)
call RemoveSavedHandle(R8,(W57),(394))
elseif O18(UVF)==false then
call URF(Z77,UVF,GetSpellTargetUnit(),WAE,AC7)
call RemoveSavedHandle(R8,(W57),(395))
elseif O18(UWF)==false then
call URF(Z77,UWF,GetSpellTargetUnit(),WAE,AC7)
call RemoveSavedHandle(R8,(W57),(396))
if(KR8(pl))then
call DO8(UYF,"Bird4")
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1Z2',false)
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A1YX' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1YX',true)
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
elseif GetSpellAbilityId()=='A1RK' then
if UTF!=null and O18(UTF)==false then
call URF(Z77,UTF,Z77,WAE,AC7)
endif
if UUF!=null and O18(UUF)==false then
call URF(Z77,UUF,Z77,WAE,AC7)
endif
if UVF!=null and O18(UVF)==false then
call URF(Z77,UVF,Z77,WAE,AC7)
endif
if UWF!=null and O18(UWF)==false then
call URF(Z77,UWF,Z77,WAE,AC7)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1Z2',false)
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A1YX' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1YX',true)
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
if(KR8(pl))then
call DO8(UYF,"Bird4")
call SInt(UYF,"BirdsCounter",0)
endif
endif
else
set C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
if(KR8(pl))then
call SInt(UYF,"BirdsCounter",C77)
endif
if UTF!=null and O18(UTF)==false then
set KQD=360*4/ 4.
set a2=KQD+AQD*C77
set x=PQ8(BJ7+200*Cos(a2*bj_DEGTORAD))
set y=PS8(BK7+200*Sin(a2*bj_DEGTORAD))
call SetUnitFacing(UTF,a2-90)
call SetUnitX(UTF,x)
call SetUnitY(UTF,y)
endif
if UUF!=null and O18(UUF)==false then
set KQD=360*3/ 4.
set a2=KQD+AQD*C77
set x=PQ8(BJ7+200*Cos(a2*bj_DEGTORAD))
set y=PS8(BK7+200*Sin(a2*bj_DEGTORAD))
call SetUnitFacing(UUF,a2-90)
call SetUnitX(UUF,x)
call SetUnitY(UUF,y)
endif
if UVF!=null and O18(UVF)==false then
set KQD=360*2/ 4.
set a2=KQD+AQD*C77
set x=PQ8(BJ7+200*Cos(a2*bj_DEGTORAD))
set y=PS8(BK7+200*Sin(a2*bj_DEGTORAD))
call SetUnitFacing(UVF,a2-90)
call SetUnitX(UVF,x)
call SetUnitY(UVF,y)
endif
if UWF!=null and O18(UWF)==false then
set KQD=360*1/ 4.
set a2=KQD+AQD*C77
set x=PQ8(BJ7+200*Cos(a2*bj_DEGTORAD))
set y=PS8(BK7+200*Sin(a2*bj_DEGTORAD))
call SetUnitFacing(UWF,a2-90)
call SetUnitX(UWF,x)
call SetUnitY(UWF,y)
endif
if C77>UZF or GetTriggerEventId()==EVENT_UNIT_DEATH then
if UTF!=null and O18(UTF)==false then
call URF(Z77,UTF,Z77,WAE,AC7)
endif
if UUF!=null and O18(UUF)==false then
call URF(Z77,UUF,Z77,WAE,AC7)
endif
if UVF!=null and O18(UVF)==false then
call URF(Z77,UVF,Z77,WAE,AC7)
endif
if UWF!=null and O18(UWF)==false then
call URF(Z77,UWF,Z77,WAE,AC7)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1Z2',false)
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A1YX' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1YX',true)
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
if(KR8(pl))then
call DO8(UYF,"Bird4")
call SInt(UYF,"BirdsCounter",0)
endif
else
set WAE=RMinBJ(.25+.75*(I2R(C77)/ 500.),1)
call SaveReal(R8,(W57),(685),((WAE)*1.))
set UXF=.25+(1-.2)*2.5
call SetUnitScale(UTF,UXF,UXF,UXF)
call SetUnitScale(UUF,UXF,UXF,UXF)
call SetUnitScale(UVF,UXF,UXF,UXF)
call SetUnitScale(UWF,UXF,UXF,UXF)
if C77==(UZF-175)then
call TP8(YB4,GetOwningPlayer(Z77))
endif
if C77>(UZF-200)then
if ModuloInteger(C77,10)==0 or ModuloInteger(C77,10)==1 or ModuloInteger(C77,10)==2 or ModuloInteger(C77,10)==3 or ModuloInteger(C77,10)==4 then
call SetUnitVertexColor(UTF,255,0,0,255)
call SetUnitVertexColor(UUF,255,0,0,255)
call SetUnitVertexColor(UVF,255,0,0,255)
call SetUnitVertexColor(UWF,255,0,0,255)
else
call SetUnitVertexColor(UTF,255,255,255,255)
call SetUnitVertexColor(UUF,255,255,255,255)
call SetUnitVertexColor(UVF,255,255,255,255)
call SetUnitVertexColor(UWF,255,255,255,255)
endif
endif
endif
endif
set t=null
set Z77=null
set UTF=null
set UUF=null
set UVF=null
set UWF=null
set AC7=null
return false
endfunction
function UAF takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real BJ7=GetUnitX(Z77)
local real BK7=GetUnitY(Z77)
local real x
local real y
local unit UTF
local unit UUF
local unit UVF
local unit UWF
local real a=GetUnitFacing(Z77)
local unit AC7=null
local integer UYF=GetHandleId(Z77)
local player pl=GetOwningPlayer(Z77)
call DF8(AC7)
call UnitAddAbility(AC7,ZQ4)
call SetUnitState(Z77,UNIT_STATE_LIFE,GetUnitState(Z77,UNIT_STATE_LIFE)-GetUnitState(Z77,UNIT_STATE_LIFE)*.2)
call AddPermanentAbility(Z77,'A1Z2')
call UnitMakeAbilityPermanent(Z77,true,'A1Z2')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1Z2',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1YX',false)
set x=GetUnitX(Z77)+200*Cos(bj_DEGTORAD*360*4/ 4.*-1.)
set y=GetUnitY(Z77)+200*Sin(bj_DEGTORAD*360*4/ 4.*-1.)
set UTF=CreateUnit(GetOwningPlayer(Z77),'h0CU',x,y,360*4/ 4.*-1.)
set x=GetUnitX(Z77)+200*Cos(bj_DEGTORAD*360*3/ 4.*-1.)
set y=GetUnitY(Z77)+200*Sin(bj_DEGTORAD*360*3/ 4.*-1.)
set UUF=CreateUnit(GetOwningPlayer(Z77),'h0CU',x,y,360*3/ 4.*-1.)
set x=GetUnitX(Z77)+200*Cos(bj_DEGTORAD*360*2/ 4.*-1.)
set y=GetUnitY(Z77)+200*Sin(bj_DEGTORAD*360*2/ 4.*-1.)
set UVF=CreateUnit(GetOwningPlayer(Z77),'h0CU',x,y,360*2/ 4.*-1.)
set x=GetUnitX(Z77)+200*Cos(bj_DEGTORAD*360*1/ 4.*-1.)
set y=GetUnitY(Z77)+200*Sin(bj_DEGTORAD*360*1/ 4.*-1.)
set UWF=CreateUnit(GetOwningPlayer(Z77),'h0CU',x,y,360*1/ 4.*-1.)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function USF))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(393),(UTF))
call SaveUnitHandle(R8,(W57),(394),(UUF))
call SaveUnitHandle(R8,(W57),(395),(UVF))
call SaveUnitHandle(R8,(W57),(396),(UWF))
call SaveUnitHandle(R8,(W57),(19),(AC7))
if(KR8(pl))then
call SUnit(UYF,"Bird4",UWF)
endif
set Z77=null
set UTF=null
set UUF=null
set UVF=null
set UWF=null
set AC7=null
endfunction
function UBF takes nothing returns boolean
if GetSpellAbilityId()=='A1YX' then
call UAF()
endif
return false
endfunction
function H49 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function UBF))
set t=null
endfunction
function UCF takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,ZR4)
if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>4 then
call UnitRemoveAbility(X77,ZT4)
call EY8(X77,"IcarusDive|Disarmed")
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
call Dmg(Z77,X77,NormalFire,20*ML8)
set t=null
set Z77=null
return false
endfunction
function U3F takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetEnumUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function UCF))
call TriggerRegisterDeathEvent(t,X77)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget(ZS4,X77,"chest")))
call UnitAddAbility(X77,ZT4)
call UnitMakeAbilityPermanent(X77,true,ZT4)
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),ZT4,false)
call EW8(X77,"IcarusDive|Disarmed")
set Z77=null
set X77=null
set t=null
endfunction
function U6F takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local group g=OG8()
call DestroyEffect(AddSpecialEffect(ZS4,x,y))
call GroupEnumUnitsInRange(g,x,y,275+25,Condition(function UB8))
call ForGroup(g,function U3F)
call OF8(g)
set g=null
set Z77=null
endfunction
function ULF takes nothing returns boolean
if GetSpellAbilityId()==ZR4 then
call U6F()
endif
return false
endfunction
function G29 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function ULF))
set t=null
endfunction
function U1F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit hn=LUnit(EC8,"Hero")
local unit AC7=LUnit(EC8,"Caster")
call LT7(EC8)
call EA8(t)
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call KillUnit(AC7)
endif
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",hn,"origin"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl",hn,"origin"))
call UnitRemoveAbility(hn,'A0ZC')
call UnitRemoveAbility(hn,'B00V')
set t=null
set hn=null
set AC7=null
return false
endfunction
function U0F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit hn=LUnit(EC8,"Hero")
local unit AC7=LUnit(EC8,"Caster")
call LT7(EC8)
call EA8(t)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",hn,"origin"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl",hn,"origin"))
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,18-.1,false)
call TriggerRegisterDeathEvent(t,hn)
call TriggerAddCondition(t,Condition(function U1F))
call SUnit(EC8,"Hero",hn)
call SUnit(EC8,"Caster",AC7)
set t=null
set hn=null
set AC7=null
return false
endfunction
function U5F takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit hn=GetTriggerUnit()
local unit U2F=CreateUnit(GetOwningPlayer(hn),'e01V',0,0,0)
local real U_F=18
call AddPermanentAbility(U2F,'A0ZC')
call UnitApplyTimedLife(U2F,'BTLF',U_F)
call P98(hn,U_F,175)
call TriggerRegisterTimerEvent(t,.1,false)
call TriggerAddCondition(t,Condition(function U0F))
call SUnit(EC8,"Hero",hn)
call SUnit(EC8,"Caster",U2F)
set t=null
set U2F=null
set hn=null
endfunction
function V4F takes nothing returns boolean
if GetSpellAbilityId()=='A093' and GetUnitTypeId(GetTriggerUnit())=='U008' then
call U5F()
endif
return false
endfunction
function F69 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function V4F))
set t=null
endfunction
function FGD takes nothing returns nothing
local unit p5=B2
local unit m5=C2
local unit AC7=LUnit(GetHandleId(p5),"FeralHeartCaster")
call SUnit(GetHandleId(m5),"FeralHeartCaster",AC7)
call SetUnitOwner(AC7,GetOwningPlayer(m5),true)
set p5=null
set m5=null
set AC7=null
endfunction
function RY9 takes nothing returns nothing
local unit AM7=IE4
local unit AC7=LUnit(GetHandleId(AM7),"FeralHeartCaster")
if AC7!=null and GetUnitTypeId(AC7)=='e01V' then
call RemoveUnit(AC7)
endif
set AM7=null
set AC7=null
endfunction
function V7F takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if AC7!=null and GetUnitTypeId(AC7)=='e01V' then
if O18(Z77)==false then
call SetUnitX(AC7,GetUnitX(Z77))
call SetUnitY(AC7,GetUnitY(Z77))
endif
endif
set t=null
set AC7=null
set Z77=null
return false
endfunction
function V8F takes unit AM7,boolean SY8 returns nothing
local integer ML8=GetUnitAbilityLevel(AM7,'A03E')
local unit AC7
local trigger t
local integer W57
if ML8==1 or GetUnitPointValue(AM7)==500 then
set AC7=CreateUnit(GetOwningPlayer(AM7),'e01V',0,0,0)
call AddPermanentAbility(AC7,'A0ZJ')
call SUnit(GetHandleId(AM7),"FeralHeartCaster",AC7)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerAddCondition(t,Condition(function V7F))
call TriggerRegisterTimerEvent(t,.2,true)
call SaveUnitHandle(R8,(W57),(2),(AM7))
call SaveUnitHandle(R8,(W57),(19),(AC7))
else
set AC7=LUnit(GetHandleId(AM7),"FeralHeartCaster")
endif
if ML8==2 then
call UnitRemoveAbility(AC7,'A0ZJ')
call AddPermanentAbility(AC7,'A0ZI')
elseif ML8==3 then
call UnitRemoveAbility(AC7,'A0ZJ')
call UnitRemoveAbility(AC7,'A0ZI')
call AddPermanentAbility(AC7,'A0ZH')
elseif ML8==4 then
call UnitRemoveAbility(AC7,'A0ZJ')
call UnitRemoveAbility(AC7,'A0ZI')
call UnitRemoveAbility(AC7,'A0ZH')
call AddPermanentAbility(AC7,'A0ZG')
endif
set AC7=null
endfunction
function V9F takes nothing returns boolean
if GetLearnedSkill()=='A03E' and IsUnitIllusion(GetTriggerUnit())==false then
call V8F(GetTriggerUnit(),false)
endif
return false
endfunction
function FL9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function V9F))
set t=null
endfunction
function VDF takes nothing returns nothing
local unit hn=GetTriggerUnit()
local unit U2F
local integer i=1
local boolean VEF=IsJWPlayer(GetOwningPlayer(hn))
local player p
local integer VFF
local integer VGF
local integer VHF=GetUnitAbilityLevel(hn,'A0ZF')
if VHF==1 then
set VFF='A104'
set VGF='A107'
elseif VHF==2 then
set VFF='A101'
set VGF='A106'
elseif VHF==3 then
set VFF='A102'
set VGF='A105'
elseif VHF==4 then
set VFF='A103'
set VGF='A108'
endif
loop
exitwhen i>5
if VEF then
set p=G8[i]
else
set p=N8[i]
endif
set U2F=CreateUnit(p,'e01V',0,0,0)
call AddPermanentAbility(U2F,VFF)
call AddPermanentAbility(U2F,VGF)
call UnitApplyTimedLife(U2F,'BTLF',10)
set i=i+1
endloop
set hn=null
set U2F=null
set p=null
endfunction
function VIF takes nothing returns boolean
if GetSpellAbilityId()=='A0ZF' then
call VDF()
endif
return false
endfunction
function F19 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function VIF))
set t=null
endfunction
function VJF takes nothing returns nothing
call SY9()
call SA9()
endfunction
function EOD takes nothing returns nothing
local string VH=GetEventPlayerChatString()
local player pl=Z17(S2I(SubString(VH,3,StringLength(VH))))
if((pl!=null)and(KS8(pl))and(IsPlayerInForce(pl,RX4)))then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,W[GetPlayerId(pl)]+GetPlayerName(pl)+"|r creepstats:  K: "+I2S(C7[GetPlayerId(pl)])+"  D: "+I2S(L7[GetPlayerId(pl)]))
endif
set pl=null
endfunction
function EPD takes nothing returns nothing
local string VH=GetEventPlayerChatString()
local player pl=Z17(S2I(SubString(VH,3,StringLength(VH))))
if((pl!=null)and(KS8(pl))and(IsPlayerInForce(pl,RX4)))then
if(Y7[GetPlayerId(pl)]==null)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,W[GetPlayerId(pl)]+GetPlayerName(pl)+"|r has no Hero")
else
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,W[GetPlayerId(pl)]+GetPlayerName(pl)+"|r movespeed is "+I2S(R2I(GetUnitMoveSpeed(Y7[GetPlayerId(pl)]))))
endif
endif
set pl=null
endfunction
function VKF takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetTriggerPlayer()))and(not IsUnitIllusion(GetFilterUnit()))and(GetPlayerController(GetOwningPlayer(GetFilterUnit()))==MAP_CONTROL_COMPUTER)and(not A87(GetFilterUnit()))and(ZL7(GetFilterUnit())))
endfunction
function VMF takes unit j5,unit m5 returns boolean
if((GetUnitAbilityLevel(j5,'A06I')!=0)and(Bz>hq[16+GetPlayerId(GetOwningPlayer(j5))]))then
set F37=800+(200*GetUnitAbilityLevel(j5,'A06I'))
return((OM8(j5,m5,40/ .03,0,F37)!=null)and(OK8(j5,m5,GetLocationX(H57),GetLocationY(H57),'}',Condition(function VF8)))and(IssuePointOrderByIdLoc(j5,852600,H57)))
endif
return false
endfunction
function VNF takes unit j5,unit m5 returns boolean
if((GetUnitAbilityLevel(j5,'A0L8')!=0)and(Bz>hq[32+GetPlayerId(GetOwningPlayer(j5))]))then
return((OM8(j5,m5,30/ .035,0,3000.)!=null)and(OK8(j5,m5,GetLocationX(H57),GetLocationY(H57),140,Condition(function uj)))and(IssuePointOrderByIdLoc(j5,852662,H57)))
endif
return false
endfunction
function VOF takes unit it,unit m5,boolean VPF returns boolean
local integer i1=GetUnitTypeId(it)
local boolean J4=false
local integer O5=GetPlayerId(GetOwningPlayer(it))
if not(GetPlayerController(GetOwningPlayer(it))==MAP_CONTROL_COMPUTER)then
return false
endif
if G0[288+O5]then
set G0[288+O5]=false
set i1=eY[400+O5]
endif
if(i1=='H00U')then
set J4=(((GetUnitState(it,UNIT_STATE_MANA))>290)and(KA8(it,'A0VM')or(Bz>V74[O5]))and(K_8(it,D07,D57,D27,'A0VM')and IssuePointOrderById(it,852215,GetUnitX(m5),GetUnitY(m5))))or(((GetUnitState(it,UNIT_STATE_MANA))>350)and(KA8(it,'A0VK')or(Bz>V74[O5]))and(Bz>V74[96+O5])and K_8(it,D57,D57,D07,'A0VK')and IssuePointOrderById(it,852491,GetUnitX(m5),GetUnitY(m5)))
elseif(i1=='E02I')then
set J4=(IssueTargetOrderById(it,852185,m5))
elseif(i1=='U000')then
set J4=C_7(it,852555,'A0X7',m5)
elseif(i1=='Udre')then
set J4=((i2(m5))or(VPF))and(C_7(it,852095,'A02H',m5))
elseif(i1=='UC91')then
set J4=(IsUnitInRange(it,m5,200.))and(DE8(it,852127,'A29K'))
elseif(i1=='UC42')then
set J4=((i2(m5))or(VPF))and(C_7(it,852231,'A094',m5))
elseif(i1=='NC00')then
set J4=C_7(it,852095,'AHtb',m5)
elseif(i1=='H001')then
set J4=C_7(it,852662,'A190',m5)
elseif(i1=='UC18')then
set J4=(C_7(it,852555,'A0X5',m5))or((not VPF)and(C_7(it,852502,'A0MN',m5)))
elseif(i1=='Ekee')then
set J4=C_7(it,852224,'A06W',m5)
elseif(i1=='UC11')then
set J4=(IsUnitInRange(it,m5,300.))and(DE8(it,852127,'A29L'))
elseif(i1=='U00A')then
set J4=C_7(it,852231,'A055',m5)
elseif(i1=='Opgh')then
set J4=(not VPF)and(i2(m5))and(IsUnitInRange(it,m5,500.))and(IssueImmediateOrderById(it,852600))
elseif(i1=='U00K')then
set J4=IssueTargetOrderById(it,852218,m5)
elseif(i1=='U00F')then
set J4=((IsUnitInRange(it,m5,300.))and(D78(it,852480,'A0FL','A1CX',m5)))or(((i2(m5))or(VPF))and(VMF(it,m5)))
elseif(i1=='U00E')then
set J4=(GetUnitLifePercent(m5)<60.)and(D78(it,852095,'A067','A08P',m5))
elseif(i1=='E01A')then
set J4=C_7(it,852218,'A0NM',m5)
elseif(i1=='U00P')then
set J4=(i2(m5))and(C_7(it,852119,'A0OJ',m5))
elseif(i1=='UC76')then
set J4=(not VPF)and(i2(m5))and(C_7(it,852592,kS(it),m5))
elseif(i1=='N00R')then
set J4=C_7(it,852488,'A0RA',m5)
elseif(i1=='H00N')then
set J4=(i2(m5))and(C_7(it,852238,'A0QE',m5))
elseif(i1=='E005')then
set J4=((i2(m5))or(VPF))and(C_7(it,852231,'A042',m5))
elseif(i1=='Oshd')then
set J4=((not VPF)and(GetUnitLifePercent(m5)>30 or GetWidgetLife(m5)<50)and(C_7(it,852227,'A04Y',m5)))or((GetUnitState(it,UNIT_STATE_MANA)>hq[272+GetPlayerId(GetOwningPlayer(it))])and(C_7(it,852480,'A02Q',m5)))
elseif(i1=='Ofar')then
set J4=(IsUnitInRange(it,m5,500.))and(DE8(it,852588,'A29I'))
elseif(i1=='Npbm')then
set J4=(IsUnitInRange(it,m5,200.))and(DE8(it,852096,'A06M'))
elseif(i1=='H000')then
set J4=((IsUnitInRange(it,m5,200.))and(DE8(it,852127,'A00S')))or((i2(m5))and(C_7(it,852231,'A00L',m5)))
elseif(i1=='Nbrn')then
set J4=(not VPF)and(i2(m5))and(C_7(it,852592,'A0QB',m5))
elseif(i1=='Hlgr')then
set J4=(IsUnitInRange(it,m5,300.))and(C_7(it,852095,'A0AR',m5))
elseif(i1=='Naka')then
set J4=((i2(m5))or(VPF))and(C_7(it,852095,'A004',m5))
elseif(i1=='Orkn')then
set J4=(C_7(it,852502,'A0RX',m5))or((IsUnitInRange(it,m5,400)or S19(m5))and(C_7(it,852480,'A00P',m5)))
elseif(i1=='Hmbr')then
set J4=(i2(m5))and(C_7(it,852095,'A0JC',m5))
elseif(i1=='Hvwd')then
set J4=C_7(it,852095,'A02A',m5)
elseif(i1=='Uktl')then
set J4=IssueTargetOrderById(it,852662,m5)
elseif(i1=='HC49')then
set J4=(not VPF)and(((i2(m5))and(IssueImmediateOrderById(it,852600)))or(C_7(it,852095,'A24D',m5)))
elseif(i1=='Hjai')then
set J4=C_7(it,852171,'A04C',m5)
elseif(i1=='N0HP')then
set J4=C_7(it,852600,'A1MG',m5)
elseif(i1=='HC92')then
set J4=(i2(m5))and(C_7(it,852089,'A0RG',m5))
elseif(i1=='H004')then
set J4=L77(it,852232,'A027',OO8(it,m5,.95,600.))
elseif(i1=='Otch')then
set J4=C_7(it,852600,'A0SK',m5)
elseif(i1=='Ogrh')then
set J4=((i2(m5))or(VPF))and(C_7(it,852662,'A10D',m5))
elseif(i1=='Ucrl')or(i1=='U01X')then
set J4=C_7(it,852089,'A0LL',m5)
elseif(i1=='Hmkg')then
set J4=C_7(it,852095,GM8(it),m5)or(LBool(GetHandleId(it),"AI|Magi2Blast")and C_7(it,852600,'A2KQ',m5))
elseif(i1=='E00P')then
set J4=L77(it,852580,'A0O6',OM8(it,m5,2000.,.65,1100.))
elseif(i1=='N01V')then
set J4=VNF(it,m5)
elseif(i1=='N00B')then
set J4=(i2(m5))and((IsUnitInRange(it,m5,350.))and(IssueImmediateOrderById(it,852600)))
elseif(i1=='H06S')then
set J4=C_7(it,852089,'A136',m5)
elseif((i1=='N01I')or(i1=='N01H')or(i1=='N01T')or(i1=='N01J'))then
set J4=(LState(it,"AlcheBrew"))and(IssueTargetOrderById(it,852600,m5))
elseif(i1=='H00S')then
set J4=(C_7(it,852119,'A14R',m5))
elseif(i1=='N0EG')then
set J4=(not ZL7(m5))and(C_7(it,852119,'A12J',m5))
elseif(i1=='O016')then
set J4=(C_7(it,852119,'A19O',m5))or(C_7(it,852218,'A19V',m5))
elseif(i1=='E02H')then
set J4=(IsUnitInRange(it,m5,400))==false and GetUnitCurrentOrder(m5)!=851973 and GetUnitCurrentOrder(m5)!=851975 and C_7(it,852119,'A1S8',m5)
elseif(i1=='E02X')then
set J4=C_7(it,852214,'A27F',m5)
elseif(i1=='E02K')then
set J4=(not VPF)and(IssueTargetOrderById(it,852095,m5))
endif
if(not J4)then
if(not J4)and(AR7(it,BU[euldeshenshengfazhang]))then
set J4=(not VPF)and((i2(m5))or(A87(it)))and(UnitUseItemTarget(it,bj_lastCreatedItem,m5))
endif
if(not J4)and(AR7(it,BU[xieeliandao]))then
set J4=(not VPF)and(UnitUseItemTarget(it,bj_lastCreatedItem,m5))
endif
if(not J4)and(AR7(it,BU[shenyuanzhiren]))then
set J4=(not VPF)and(UnitUseItemTarget(it,bj_lastCreatedItem,m5))
endif
if(not J4)and(AR7(it,BU[ziyuan])and(S69(m5)==false)and(CI7(m5)==false))then
set J4=(not VPF)and(UnitUseItemTarget(it,bj_lastCreatedItem,m5))
endif
if(not J4)and(AR7(it,BU[xiwadeshouhu]))then
set J4=(not VPF)and(UnitUseItem(it,bj_lastCreatedItem))
endif
endif
if(i1=='E02X')and(not J4)and(hq[816+O5]>Bz)then
set G0[288+O5]=true
set J4=VOF(it,m5,VPF)
endif
return J4
endfunction
function VQF takes unit it,boolean VRF returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(it))
set GZ[512+O5]=VRF
if(R04[64+O5]!=null)then
call TriggerExecute(R04[64+O5])
endif
endfunction
function VSF takes nothing returns boolean
return((GetFilterUnit()!=bj_lastLoadedUnit)and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))and(((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(Z_7(GetFilterUnit()))and(not A87(GetFilterUnit())))or((GetWidgetLife(GetFilterUnit())>0)and(GF8(GetFilterUnit())))))
endfunction
function VTF takes integer O5,unit m5,boolean VUF,boolean VVF returns nothing
local unit Y47=null
local integer E_8=0
local boolean J4=false
if not(G0[128+O5]or GZ[208+O5]or VUF)then
call XM7(O5,"aiEngageFail 1 -> "+GetUnitName(m5)+" "+XQ7(G0[144+O5])+XQ7(GZ[208+O5])+XQ7(VUF))
if(h4[O5]==null)then
call VQF(Y7[O5],false)
endif
return
elseif h4[O5]==m5 and(Bz<hq[928+O5])then
call XM7(O5,"aiEngageFail 2-> "+GetUnitName(m5))
return
endif
set h4[O5]=m5
set hq[928+O5]=Bz+1
call GroupClear(H8)
set bj_lastLoadedUnit=Y7[O5]
if VVF then
call GroupEnumUnitsInRange(H8,GetUnitX(m5),GetUnitY(m5),2400,Condition(function VSF))
else
call GroupEnumUnitsInRange(H8,GetUnitX(m5),GetUnitY(m5),1200,Condition(function VSF))
endif
set J4=(RY4[O5]and VOF(Y7[O5],m5,false))
loop
set Y47=FirstOfGroup(H8)
exitwhen Y47==null
call GroupRemoveUnit(H8,Y47)
set E_8=GetPlayerId(GetOwningPlayer(Y47))
if E_8!=0 and E_8!=6 and E_8<12 and(h4[E_8]==null or Z_7(h4[E_8])==false)and RY4[O5]then
if(IsUnitType(Y47,UNIT_TYPE_HERO))then
if(not GZ[160+O5])then
call XM7(O5,"aiEngageA "+GetUnitName(Y47)+" -> "+GetUnitName(m5))
set h4[E_8]=m5
set hq[928+E_8]=Bz+1
if is(Y47)then
call IssueTargetOrderById(Y47,851983,m5)
set J4=(J4 or(VOF(Y47,m5,false)))
endif
endif
elseif is(Y47)then
call XM7(O5,"aiEngageB "+GetUnitName(Y47)+" -> "+GetUnitName(m5))
call IssueTargetOrderById(Y47,851983,m5)
else
call XM7(O5,"aiEngageFail 3 "+GetUnitName(Y47)+" "+XQ7(GZ[160+O5]))
endif
endif
endloop
if(is(Y7[O5]))then
call IssueTargetOrderById(Y7[O5],851983,m5)
endif
set Y47=null
endfunction
function VWF takes integer O5,boolean VXF returns boolean
local integer i=0
local integer j=0
set h4[O5]=null
set hq[928+O5]=0
set hq[480+O5]=0
if VXF and(G0[144+O5])and(not A87(Y7[O5]))then
call XM7(O5,"Greenpa: aiCancelKill -respond "+GetUnitName(Y7[O5])+" "+XQ7(VXF)+" "+XQ7(G0[144+O5])+" "+XQ7(not A87(Y7[O5])))
set i=1
set j=-1
set F37=999999
loop
exitwhen i>11
if IsPlayerAlly(Player(i),Player(O5))and h4[i]!=null and IsUnitInRange(Y7[O5],h4[i],1100.)then
set F67=GetWidgetLife(h4[i])
if j==-1 or F67<F37 then
set j=i
set F37=F67
endif
endif
set i=i+1
endloop
if(j==-1)then
set bj_lastLoadedUnit=Y7[O5]
set bj_lastReplacedUnit=JT8(800.,Y7[O5])
if(bj_lastReplacedUnit!=null)then
set h4[O5]=bj_lastReplacedUnit
endif
elseif(IsUnitEnemy(h4[j],Player(O5)))then
set h4[O5]=h4[j]
endif
endif
if h4[O5]!=null then
call VTF(O5,h4[O5],false,false)
endif
return false
endfunction
function VYF takes nothing returns nothing
local unit it=GetEnumUnit()
local unit m5=Y7[GetPlayerId(GetTriggerPlayer())]
local integer i1=GetUnitTypeId(it)
local integer O5=GetPlayerId(GetOwningPlayer(GetEnumUnit()))
local boolean J4
set GZ[64+O5]=true
if(i1=='UC01')then
set J4=(IsUnitInRange(it,m5,300.))and(DE8(it,852526,'A04A'))
elseif(i1=='UC42')then
set J4=(AO7(500.,m5,Condition(function k8))>0)and(DE8(it,852526,'A1OP'))
elseif(i1=='H00U')then
set J4=(IsUnitInRange(it,m5,650.))and K_8(it,D57,D57,D27,'A0VQ')and C_7(it,852490,'A0VQ',m5)
elseif(i1=='E02I')then
set J4=(IsUnitInRange(it,m5,560.))and(IssueImmediateOrderById(it,852594))
elseif(i1=='Ekee')then
set J4=(IsUnitInRange(it,m5,500.))and(AO7(500.,m5,Condition(function k8))>0)and(DE8(it,852594,'A035'))
elseif((i1=='Eevi')or(i1=='Eevm')or(i1=='E02V')or(i1=='E02W')or(i1=='E02U'))then
set J4=((GetUnitLifePercent(it)-30.)>GetUnitLifePercent(m5))and(C_7(it,852189,'A07Q',m5))
elseif(i1=='Ulic')then
set J4=C_7(it,852225,'A08R',m5)
elseif(i1=='UC11')then
set J4=C_7(it,852066,'A037',m5)
elseif(i1=='U008')then
set J4=(IsUnitInRange(it,m5,500.))and(DE8(it,852600,'A0ZF'))
elseif(i1=='Udea')then
set J4=(IssueTargetOrderById(it,852119,m5))or(IssueTargetOrderById(it,852662,m5))
elseif(i1=='Opgh')then
set J4=(IsUnitInRange(it,m5,400.))and(AO7(400.,m5,Condition(function k8))>0)and(IssueImmediateOrderById(it,852096))
elseif(i1=='U00E')then
set J4=(IsUnitInRange(it,m5,500.))and(DE8(it,852526,'A05V'))
elseif(i1=='H001')then
set J4=(IsUnitInRange(it,m5,430.))and(DE8(it,852526,'A2IS'))
elseif(i1=='N0HP')then
set J4=(IsUnitInRange(it,m5,760.))and(C_7(it,852100,'A1HQ',m5))
elseif(i1=='H00H')then
set J4=(IsUnitInRange(it,m5,400.))and(AO7(400.,m5,Condition(function k8))>0)and(IssuePointOrderById(it,852089,GetUnitX(m5),GetUnitY(m5)))
elseif(i1=='E01A')then
if((GetUnitManaPercent(it)>50.)and(IsUnitInRange(it,m5,300.)))then
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'A0NE',true)
set J4=(GetUnitAbilityLevel(it,'B06J')==0)and(IssueImmediateOrderById(it,852177))
endif
elseif(i1=='E01C')then
set J4=IssueTargetOrderById(it,852248,m5)
elseif(i1=='N01W')then
set J4=((GetUnitLifePercent(it)<40.)and(IssueTargetOrderById(it,852536,m5)))or(IssueTargetOrderById(it,852229,m5))
elseif((i1=='H00R')or(i1=='H07I'))then
set H04=it
set J4=(AO7(1000.,it,Condition(function ny))>2)and(IssueTargetOrderById(it,852699,m5))
elseif(i1=='H00N')then
set J4=(C_7(it,852101,'A0R7',m5))or((AO7(350.,m5,Condition(function k8))>0)and(IssueTargetOrderById(it,852095,m5)))
elseif(i1=='H008')then
set J4=(IsUnitInRange(it,m5,500.))and(AO7(500.,m5,Condition(function k8))>0)and(DE8(it,852526,'A0GP'))
elseif(i1=='Usyl')then
set J4=(AO7(500.,m5,Condition(function k8))>0)and(C_7(it,852089,'A064',m5))
elseif(i1=='Harf')then
set J4=C_7(it,852225,'A08N',m5)
elseif(i1=='Hvwd')then
set J4=(IsUnitInRange(it,m5,500.))and(AO7(500.,m5,Condition(function k8))>0)and(C_7(it,852669,'A17O',m5))
elseif(i1=='Emoo')then
set J4=(IsUnitInRange(it,m5,500.))and(DE8(it,852556,'A01B'))
elseif(i1=='Uktl')then
set J4=(AO7(500.,m5,Condition(function k8))>0)and(IssueTargetOrderById(it,852600,m5))
elseif((i1=='Hblm')or(i1=='H06X')or(i1=='H06Y')or(i1=='H06W'))then
set J4=C_7(it,852185,'A112',m5)
elseif(i1=='HC49')then
set J4=(IsUnitInRange(it,m5,500.))and(AO7(500.,m5,Condition(function k8))>0)and(DE8(it,852123,'A063'))
elseif(i1=='HC92')then
set J4=(AO7(500.,m5,Condition(function k8))>0)and(C_7(it,852089,'A0RG',m5))
elseif(i1=='H00A')then
set J4=(GetUnitLifePercent(m5)<50.)and(IssueImmediateOrderById(it,852600))
elseif(i1=='H004')then
set J4=(AO7(150.,m5,Condition(function k6))>0)and(L77(it,852232,'A027',OO8(it,m5,.95,600.)))
elseif(i1=='Ucrl')or(i1=='U01X')then
set J4=(AO7(400.,m5,Condition(function k8))>0)and(C_7(it,852089,'A0LL',m5))
elseif(i1=='Hamg')then
set J4=((K6(m5))and(IssueTargetOrderById(it,852069,m5)))
if not J4 then
set J4=IssueTargetOrderById(it,852248,m5)
endif
elseif((i1=='N01I')or(i1=='N01H')or(i1=='N01T')or(i1=='N01J'))then
set J4=(AO7(400.,m5,Condition(function k8))>0)and(C_7(it,852089,'A0IL',m5))
elseif(i1=='H00Q')then
set J4=(GetUnitLifePercent(m5)<95.)and(IssueTargetOrderById(it,852095,m5))
endif
if(not J4)then
if(AR7(it,BU[meikensimu]))then
set J4=(IsUnitInRange(it,m5,300.))and(UnitUseItem(it,AV7(it,BU[meikensimu])))
elseif(AR7(it,BU[mifaxie]))then
set J4=(IsUnitInRange(it,m5,590.))and(UnitUseItem(it,AV7(it,BU[mifaxie])))
elseif(AR7(it,BU[W5]))then
set J4=(IsUnitInRange(it,m5,590.))and(UnitUseItem(it,AV7(it,BU[W5])))
elseif(AR7(it,BU[xuanmingdunpai]))then
set J4=(IsUnitInRange(it,m5,500.))and(UnitUseItem(it,AV7(it,BU[xuanmingdunpai])))
endif
endif
if((not J4)and(GetHeroLevel(it)>5))then
set m5=AJ7(800.,L_7(m5),Condition(function k6))
if(m5!=null)then
if(i1=='E02J')and(IsUnitInRange(it,m5,895.))then
if(QJ8(it,m5))or(not IsUnitInRange(m5,it,800))then
call OO8(it,m5,1.2,900)
else
call MoveLocation(H57,GetUnitX(m5),GetUnitY(m5))
endif
set J4=(Y17(O5)and(J8(O5,IssuePointOrderByIdLoc(it,852089,H57))))
endif
if(not J4)then
call IssueTargetOrderById(it,851983,m5)
endif
if(h4[O5]==null)then
call VTF(O5,m5,false,false)
endif
endif
endif
set GZ[64+GetPlayerId(GetOwningPlayer(it))]=false
set m5=null
set it=null
endfunction
function EQD takes nothing returns nothing
if((Y7[GetPlayerId(GetTriggerPlayer())]!=null)and(Z_7(Y7[GetPlayerId(GetTriggerPlayer())])))then
call ju(WJ7(1100.,L_7(Y7[GetPlayerId(GetTriggerPlayer())]),Condition(function VKF)),function VYF)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,8.,"AI Allies nearby will assist you")
set hq[464+GetPlayerId(GetTriggerPlayer())]=Bz+5.
endif
endfunction
function VZF takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and((GetOwningPlayer(GetFilterUnit())==G8[0])or(GetOwningPlayer(GetFilterUnit())==N8[0]))and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function VAF takes nothing returns nothing
if(GetWidgetLife(GetEnumUnit())>.405)then
call SetWidgetLife(GetEnumUnit(),GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)+8.)
else
call GroupRemoveUnit(ij,GetEnumUnit())
endif
endfunction
function VBF takes nothing returns nothing
call ForGroup(ij,function VAF)
call SetWidgetLife(IY4,GetUnitState(IY4,UNIT_STATE_LIFE)+12.)
call SetWidgetLife(JV4,GetUnitState(JV4,UNIT_STATE_LIFE)+12.)
endfunction
function JDD takes nothing returns nothing
local trigger t=CreateTrigger()
local boolexpr Ig=Condition(function VZF)
set ij=OG8()
call GroupEnumUnitsInRect(ij,bj_mapInitialPlayableArea,Ig)
call TriggerRegisterTimerEventPeriodic(t,1.)
call TriggerAddAction(t,function VBF)
set ZT=true
call DestroyBoolExpr(Ig)
set Ig=null
endfunction
function JED takes nothing returns nothing
set AT=true
call EnableTrigger(RC4)
endfunction
function VCF takes unit PQ9,unit QS9 returns integer
local integer i=1
local integer C77=0
call PM9(PQ9,QS9)
loop
exitwhen i>5
if JU[i]!=null then
set C77=C77+1
endif
set i=i+1
endloop
return C77
endfunction
function JFD takes nothing returns nothing
set FX7=true
set FI7=.5
set FJ7=.3
set FK7=.05
set FM7=10.
set FO7=5
set FP7=.3
set FQ7=.1
set FR7='d'
set FV7=60
set FW7=60
set FN7=.05
set FT7=.25
set FU7=2
endfunction
function V3F takes nothing returns boolean
return GetDyingUnit()==Y7[GetPlayerId(GetTriggerPlayer())]
endfunction
function V6F takes nothing returns nothing
local integer O5=1
local integer i
local integer a
loop
exitwhen O5>11
if KR8(Player(O5))then
set a=IU[O5]-AV4[64+O5]
if a>0 then
set i=1
loop
exitwhen i>a
set AV4[96+O5]=R2I(Bz+FW7)
if EU then
call SetPlayerHandicapXPBJ(Player(O5),AV4[16+O5]+(GetPlayerHandicapXPBJ(Player(O5))-AV4[16+O5])*(1-FK7))
endif
if FU then
set AV4[48+O5]=AV4[32+O5]+R2I((AV4[48+O5]-AV4[32+O5])*(1-FQ7))
endif
set i=i+1
endloop
set AV4[64+O5]=IU[O5]
endif
endif
set O5=O5+1
endloop
endfunction
function VLF takes nothing returns nothing
local unit PQ9=GetDyingUnit()
local unit QS9=GetKillingUnit()
local player p=GetOwningPlayer(PQ9)
local player pl=GetOwningPlayer(QS9)
if IsUnitInForce(GetDyingUnit(),RX4)and GetDyingUnit()!=GetKillingUnit()then
set AV4[96+GetPlayerId(p)]=R2I(Bz+FW7)
if EU then
if GetHeroLevel(PQ9)==25 then
call SetPlayerHandicapXP(p,1.)
set AV4[48+GetPlayerId(p)]=AV4[48+GetPlayerId(p)]+FO7
elseif GetPlayerHandicapXP(p)*'d'<AV4[16+GetPlayerId(p)]then
call SetPlayerHandicapXP(p,AV4[16+GetPlayerId(p)]*.01)
else
call SetPlayerHandicapXP(p,GetPlayerHandicapXP(p)+FI7+VCF(PQ9,QS9)*FN7)
if GetPlayerHandicapXP(p)*'d'>(AV4[16+GetPlayerId(p)]+FM7*'d')then
call SetPlayerHandicapXP(p,(AV4[16+GetPlayerId(p)])*.01+FM7)
endif
endif
endif
if FU then
if AV4[48+GetPlayerId(p)]<AV4[32+GetPlayerId(p)]then
set AV4[48+GetPlayerId(p)]=AV4[32+GetPlayerId(p)]
else
set AV4[48+GetPlayerId(p)]=AV4[48+GetPlayerId(p)]+FO7
if GetHeroLevel(PQ9)<25 or(not EU)then
if AV4[48+GetPlayerId(p)]>FR7 then
set AV4[48+GetPlayerId(p)]=FR7
endif
else
if AV4[48+GetPlayerId(p)]>FS7 then
set AV4[48+GetPlayerId(p)]=FS7
endif
endif
endif
endif
endif
if GetKillingUnit()!=null and IsUnitInForce(GetKillingUnit(),RX4)and GetDyingUnit()!=GetKillingUnit()then
set AV4[96+GetPlayerId(pl)]=R2I(Bz+FW7)
if EU then
call SetPlayerHandicapXPBJ(pl,AV4[16+GetPlayerId(pl)]+(GetPlayerHandicapXPBJ(pl)-AV4[16+GetPlayerId(pl)])*(1-FJ7))
endif
if FU then
set AV4[48+GetPlayerId(pl)]=AV4[32+GetPlayerId(pl)]+R2I((AV4[48+GetPlayerId(pl)]-AV4[32+GetPlayerId(pl)])*(1-FP7))
endif
endif
call TimerStart(FE7,.5,false,function V6F)
set p=null
set pl=null
set PQ9=null
set QS9=null
endfunction
function V1F takes nothing returns nothing
local integer O5=1
local player p
if Bz<FV7+FW7+RD4 then
return
endif
loop
exitwhen O5>11
if O5==6 then
set O5=7
endif
if IsPlayerInForce(Player(O5),RX4)then
if(Bz>AV4[96+O5])then
set p=Player(O5)
if EU then
if GetPlayerHandicapXP(p)*'d'<AV4[16+GetPlayerId(p)]then
call SetPlayerHandicapXP(p,AV4[16+GetPlayerId(p)]*.01)
else
call SetPlayerHandicapXP(p,GetPlayerHandicapXP(p)+FT7)
if GetPlayerHandicapXP(p)*'d'>(AV4[16+GetPlayerId(p)]+FM7*'d')then
call SetPlayerHandicapXP(p,(AV4[16+GetPlayerId(p)])/'d'+FM7)
endif
endif
endif
if FU then
if AV4[48+GetPlayerId(p)]<AV4[32+GetPlayerId(p)]then
set AV4[48+GetPlayerId(p)]=AV4[32+GetPlayerId(p)]
else
set AV4[48+GetPlayerId(p)]=AV4[48+GetPlayerId(p)]+FU7
if AV4[48+GetPlayerId(p)]>FR7 then
set AV4[48+GetPlayerId(p)]=FR7
endif
endif
endif
set AV4[96+O5]=R2I(Bz+FW7)
endif
endif
set O5=O5+1
endloop
endfunction
function V0F takes nothing returns nothing
local integer i
local integer m
local integer n
local trigger t=null
set FD7=CreateTrigger()
call ky(FD7,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(FD7,Condition(function V3F))
call TriggerAddAction(FD7,function VLF)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1.,true)
call TriggerAddAction(t,function V1F)
set t=null
set FE7=CreateTimer()
endfunction
function JGD takes nothing returns nothing
if FD7==null then
call V0F()
endif
set EU=true
endfunction
function JHD takes nothing returns nothing
if FD7==null then
call V0F()
endif
set FU=true
endfunction
function V5F takes integer V2F,integer V_F,integer W4F,integer W7F,integer W8F,integer W9F,integer WDF,integer WEF,integer WFF,integer WGF,integer WHF,integer WIF,integer WJF,integer WKF,integer WMF,integer WNF,integer WOF returns nothing
call SaveInteger(FY7,V2F,0,V_F)
call SaveInteger(FY7,V2F,1,W4F)
call SaveInteger(FY7,V2F,2,W7F)
call SaveInteger(FY7,V2F,3,W8F)
call SaveInteger(FY7,V2F,4,W9F)
call SaveInteger(FY7,V2F,5,WDF)
call SaveInteger(FY7,V2F,6,WEF)
call SaveInteger(FY7,V2F,7,WFF)
call SaveInteger(FY7,V2F,8,WGF)
call SaveInteger(FY7,V2F,9,WHF)
call SaveInteger(FY7,V2F,10,WIF)
call SaveInteger(FY7,V2F,11,WJF)
call SaveInteger(FY7,V2F,12,WKF)
call SaveInteger(FY7,V2F,13,WMF)
call SaveInteger(FY7,V2F,14,WNF)
call SaveInteger(FY7,V2F,15,WOF)
if(bj_forLoopBIndex<=2)then
set eY[336+16*bj_forLoopBIndex+bj_forLoopAIndex]=V2F
endif
set bj_forLoopBIndex=bj_forLoopBIndex+1
endfunction
function WPF takes unit Y47,integer V2F,integer WQF returns integer
set bj_forLoopBIndex=GetUnitAbilityLevel(Y47,V2F)
if bj_forLoopBIndex==0 then
return 0
endif
return LoadInteger(FY7,V2F,WQF+bj_forLoopBIndex-1)
endfunction
function WRF takes integer WSF returns nothing
set bj_forLoopBIndex=0
if WSF=='Hvwd' then
call V5F('A02A',10,10,10,10,'n','x',130,140,500,500,500,500,0,0,0,0)
call V5F('A17O',15,15,15,15,40,40,40,40,1700,1700,1700,1700,0,0,0,0)
call V5F('ACac',0,0,0,0,0,0,0,0,0,0,0,0,900,900,900,900)
call V5F('A0IN',45,45,45,11,'d',150,200,'n',650,925,1200,600,'}','}','}','}')
elseif WSF=='Hmbr' then
call V5F('A020',2,2,2,2,65,70,75,80,850,850,850,850,500,500,500,500)
call V5F('A0JC',6,6,6,6,75,95,'s',135,700,700,700,700,0,0,0,0)
call V5F('A0N5',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A29G',90,90,90,0,225,325,450,0,0,0,0,0,0,0,0,0)
elseif WSF=='Emoo' then
call V5F('A0DW',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0DX',30,25,20,15,65,65,65,65,700,700,700,700,0,0,0,0)
call V5F('A01B',45,45,45,45,'}',140,155,170,0,0,0,0,300,300,300,300)
call V5F('A0DY',0,0,0,0,55,60,65,0,550,550,550,0,0,0,0,0)
elseif WSF=='O00P' then
call V5F('A0FN',11,11,11,11,140,155,160,165,1000,1000,1000,1000,0,0,0,0)
call V5F('A0G6',10,10,10,10,'d','d','d','d',600,700,800,900,0,0,0,0)
call V5F('A0KX',1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0G8',80,80,80,0,25,25,25,0,700,1100,1500,0,200,200,200,0)
elseif WSF=='Hjai' then
call V5F('A1E9',15,15,15,15,'d','x',140,160,700,700,700,700,400,400,400,400)
call V5F('A04C',10,10,10,10,'s','}',140,150,500,500,500,500,0,0,0,0)
call V5F('AHab',0,0,0,0,0,0,0,0,0,0,0,0,99999,99999,99999,99999)
call V5F('A03R',150,'x',90,0,200,400,600,0,500,500,500,500,0,0,0,0)
elseif WSF=='H001' then
call V5F('A190',13,13,13,13,140,140,140,140,600,600,600,600,255,255,255,255)
call V5F('A01K',0,0,0,0,0,0,0,0,0,0,0,0,300,300,300,300)
call V5F('A2IS',32,26,20,14,25,25,25,25,0,0,0,0,0,0,0,0)
call V5F('A1WH',80,80,80,30,'d',150,200,25,0,0,0,0,0,0,0,0)
elseif WSF=='HC49' then
call V5F('A063',40,40,40,40,70,80,90,'d',128,128,128,128,400,400,400,400)
call V5F('A24D',14,14,14,14,90,100,110,120,650,650,650,650,0,0,0,0)
call V5F('A2KU',10,10,10,10,80,90,'d','n',0,0,0,0,0,0,0,0)
call V5F('A07U',180,'x',60,0,'d','d','d',0,500,500,500,500,0,0,0,0)
elseif WSF=='Otch' then
call V5F('A0SK',15,15,15,15,'}',140,155,170,1300,1300,1300,1300,0,0,0,0)
call V5F('A0DL',5,5,5,5,50,50,50,50,0,0,0,0,0,0,0,0)
call V5F('A0DJ',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0DH',150,130,'n',9,145,205,265,'d',0,0,0,0,500,500,500,475)
elseif WSF=='HC92' then
call V5F('A0RG',11,11,11,11,75,80,85,90,550,550,550,550,250,275,300,325)
call V5F('A0K9',20,15,10,5,50,50,50,50,700,700,700,700,0,0,0,0)
call V5F('A0DZ',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A00J',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
elseif WSF=='N01O' then
call V5F('A0A5',180,160,140,'x',75,75,75,75,0,0,0,0,200,200,200,200)
call V5F('A1EF',30,30,30,30,50,50,50,50,0,0,0,0,400,450,475,500)
call V5F('A0A8',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0AG',0,0,0,0,25,25,25,0,0,0,0,0,0,0,0,0)
elseif WSF=='H004' then
call V5F('A01F',9,9,9,9,90,'i','}',140,800,800,800,800,275,275,275,275)
call V5F('A027',7,7,7,7,90,'d','n','}',600,600,600,600,225,225,225,225)
call V5F('A18X',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A01P',70,60,50,9,280,420,680,'x',600,600,600,700,0,0,0,500)
elseif WSF=='Nbbc' then
call V5F('A05G',30,28,26,24,'n','n','n','n',0,0,0,0,250,250,250,250)
call V5F('A047',60,60,60,60,80,'d','x',140,350,350,350,350,0,0,0,0)
call V5F('A00K',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0M1',130,'x','n',9,200,275,350,75,450,450,450,600,0,0,0,0)
elseif WSF=='N01A' then
call V5F('A14L',20,16,12,8,75,95,'s',135,800,800,800,800,350,350,350,350)
call V5F('A0LZ',0,0,0,0,15,15,15,15,600,600,600,600,0,0,0,0)
call V5F('A2NT',36,28,20,12,'s','s','s','s',900,900,900,900,0,0,0,0)
call V5F('A0L3',130,130,130,0,250,350,450,0,500,500,500,500,0,0,0,0)
elseif WSF=='Hamg' then
call V5F('A01Z',10,8,6,4,90,80,70,60,300,300,300,300,0,0,0,0)
call V5F('A26N',16,14,12,10,140,140,140,140,350,350,350,350,0,0,0,0)
call V5F('A2ML',32,26,20,14,50,50,50,50,99999,99999,99999,99999,0,0,0,0)
call V5F('A07Z',70,70,70,0,150,175,200,0,500,500,500,500,0,0,0,0)
elseif WSF=='O015' then
call V5F('A1AA',15,15,15,15,'d',100,100,100,500,500,500,500,0,0,0,0)
call V5F('A1A8',16,16,16,16,'n','n','n','n',1200,1200,1200,1200,0,0,0,0)
call V5F('A1CD',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A1A1','d','d','d',0,175,175,175,0,2400,2400,2400,500,0,0,0,0)
elseif WSF=='Hblm' then
call V5F('A085',10,10,10,10,150,160,170,180,2000,2000,2000,2000,0,0,0,0)
call V5F('A10X',16,16,16,16,75,75,75,75,550,700,850,1000,0,0,0,0)
call V5F('A112',19,18,17,16,25,45,65,85,900,900,900,900,0,0,0,0)
call V5F('A11T',80,70,60,'x','d','d','d',150,0,0,0,0,0,0,0,0)
elseif WSF=='Huth' then
call V5F('A03Y',6,6,6,6,75,75,75,75,0,0,0,0,385,385,385,385)
call V5F('A1P9',10,10,10,10,45,55,65,75,500,500,500,500,0,0,0,0)
call V5F('ANic',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0LC',25,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0)
elseif WSF=='Hmkg' then
call V5F('A04W',12,12,12,12,75,85,95,'i',600,600,600,600,0,0,0,0)
call V5F('A011',15,15,15,15,95,'i','s','}',700,700,700,700,0,0,0,0)
call V5F('A083',20,20,20,20,75,75,75,75,600,600,600,600,0,0,0,0)
call V5F('A088',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
elseif WSF=='Ntin' then
call V5F('A049',14,14,14,14,95,'x',145,170,550,550,550,550,0,0,0,0)
call V5F('A05E',25,25,25,25,'x',140,160,180,0,0,0,0,2500,2500,2500,2500)
call V5F('A0BQ',35,35,35,35,145,150,165,190,300,300,300,300,300,300,300,300)
call V5F('A065',0,0,0,0,150,250,350,0,500,500,500,500,0,0,0,0)
elseif WSF=='Emns' then
call V5F('A21E',11,10,9,8,'d','x',140,160,600,600,600,600,'n','n','n','n')
call V5F('A01O',50,40,30,20,50,50,50,50,99999,99999,99999,99999,0,0,0,0)
call V5F('AEfn',37,37,37,37,160,160,160,160,750,750,750,750,150,225,300,375)
call V5F('A1W8',90,75,60,0,175,225,275,0,99999,99999,99999,500,0,0,0,0)
elseif WSF=='Ogrh' then
call V5F('A10D',7,7,7,7,'}',130,135,140,750,750,750,750,0,0,0,0)
call V5F('A0D7',30,25,20,15,150,'x',90,60,0,0,0,0,0,0,0,0)
call V5F('A0DB',0,0,0,0,0,0,0,0,0,0,0,0,900,900,900,900)
call V5F('A0YK',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
elseif WSF=='Ucrl' then
call V5F('A0LL',17,17,17,17,'x','x','x','x',600,600,600,600,275,275,275,275)
call V5F('A0BZ',9,9,9,9,'x','x','x','x',1300,1300,1300,1300,300,300,300,300)
call V5F('A19Q',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0CY',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,900)
elseif WSF=='H00K' then
call V5F('A05J',25,20,15,10,'}',150,175,205,'d','d','d','d',200,200,200,200)
call V5F('A06H',20,16,13,10,80,'n',140,160,150,150,150,150,0,0,0,0)
call V5F('A06B',180,170,160,150,'d','}',150,175,0,0,0,0,0,0,0,0)
call V5F('A0AK',10,10,10,7,200,240,300,30,500,500,500,500,0,0,0,0)
elseif WSF=='H00A' then
call V5F('A0KM',14,13,12,11,'d','d','d','d',600,600,600,600,0,0,0,0)
call V5F('A0LV',24,24,24,24,175,175,175,175,600,600,600,600,0,0,0,0)
call V5F('A28T',30,26,22,18,'d','d','d','d',900,900,900,900,0,0,0,0)
call V5F('A0LT',140,130,'x',0,200,300,400,0,500,500,500,500,0,0,0,0)
elseif WSF=='E005' then
call V5F('A042',6,6,6,6,90,'d','n','x',800,800,800,800,0,0,0,0)
call V5F('A041',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A062',0,0,0,0,0,0,0,0,0,0,0,0,900,900,900,900)
call V5F('A054',160,150,140,0,150,200,250,0,500,500,500,500,0,0,0,0)
elseif WSF=='Usyl' then
call V5F('A064',15,15,15,15,'x','x','x','x',1800,1800,1800,1800,400,400,400,400)
call V5F('A03S',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A03U',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A04P',20,15,10,9,175,275,375,75,2000,2500,3000,600,0,0,0,0)
elseif WSF=='N016' then
call V5F('A0BE',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A21L',0,0,0,0,0,0,0,0,500,500,500,500,0,0,0,0)
call V5F('A0O0',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A1EJ',30,30,30,9,75,75,75,'d',0,0,0,0,400,450,475,475)
elseif WSF=='Orkn' then
call V5F('A010',8,8,8,8,95,'i',135,160,600,600,600,600,200,200,200,200)
call V5F('A0RX',13,13,13,13,'n',140,170,200,500,500,500,500,0,0,0,0)
call V5F('A00P',16,16,16,16,'n',130,155,185,400,400,400,400,0,0,0,0)
call V5F('A00H','n','n','n',7,200,350,600,30,550,550,550,500,0,0,0,0)
elseif WSF=='O01F' then
call V5F('A1TA',12,12,12,12,40,40,40,40,1800,1800,1800,1800,1,1,1,1)
call V5F('A1T8',20,18,16,14,'x',130,140,150,0,0,0,0,0,0,0,0)
call V5F('A28Q',2,2,2,2,0,0,0,0,128,128,128,128,0,0,0,0)
call V5F('A1TB',90,75,60,0,'d','d','d',0,99999,99999,99999,500,0,0,0,0)
elseif WSF=='Npbm' then
call V5F('A06M',12,12,12,12,90,'i',130,150,0,0,0,0,400,400,400,400)
call V5F('Acdh',8,8,8,8,50,50,50,50,850,850,850,850,10,10,10,10)
call V5F('A0MX',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0MQ',180,160,140,180,'}',150,175,150,0,0,0,0,128,128,128,128)
elseif WSF=='H000' then
call V5F('A00S',13,13,13,13,130,130,130,130,0,0,0,0,315,315,315,315)
call V5F('A2ON',8,8,8,8,0,0,0,0,150,150,150,150,0,0,0,0)
call V5F('A00V',0,0,0,0,0,0,0,0,0,0,0,0,1000,1000,1000,1000)
call V5F('A2O6',90,75,60,9,80,80,80,'d',0,0,0,0,0,0,0,475)
elseif WSF=='Naka' then
call V5F('A004',10,10,10,10,90,'s',135,155,650,650,650,650,0,0,0,0)
call V5F('A1IQ',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A07A',15,15,15,15,50,50,50,50,0,0,0,0,0,0,0,0)
call V5F('A0B4',10,7,5,0,50,50,50,0,1200,1200,1200,0,0,0,0,0)
elseif WSF=='Hlgr' then
call V5F('A03F',12,12,12,12,'d','n','x',130,500,500,500,500,150,150,150,150)
call V5F('A2AI',0,0,0,0,0,0,0,0,500,500,500,500,0,0,0,0)
call V5F('A0CL',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A03G','s','s','s',180,50,50,50,150,0,0,0,0,0,0,0,0)
elseif WSF=='Edem' then
call V5F('A022',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('AEbl',12,9,7,5,60,60,60,60,99999,99999,99999,99999,0,0,0,0)
call V5F('A0KY',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0E3',70,70,70,9,'}',200,275,75,600,600,600,600,0,0,0,0)
elseif WSF=='Nbrn' then
call V5F('A026',0,0,0,0,12,12,12,12,625,625,625,625,0,0,0,0)
call V5F('A0QB',13,13,13,13,90,90,90,90,900,900,900,900,300,300,300,300)
call V5F('A029',0,0,0,0,0,0,0,0,0,0,0,0,99999,99999,99999,99999)
call V5F('A0VC',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
elseif WSF=='Harf' then
call V5F('A08N',10,10,10,10,'d','x',140,160,700,700,700,700,0,0,0,0)
call V5F('A08V',14,14,14,14,50,50,50,50,500,500,500,500,0,0,0,0)
call V5F('A06A',0,0,0,0,0,0,0,0,0,0,0,0,315,315,315,315)
call V5F('A0ER',150,150,150,25,'}',175,250,50,0,0,0,0,600,600,600,650)
elseif WSF=='H00D' then
call V5F('A0O1',13,13,13,13,'x','x','x','x',1300,1300,1300,1300,'d','d','d','d')
call V5F('A0OO',40,40,40,40,15,15,15,15,0,0,0,0,200,200,200,200)
call V5F('A0BD',0,0,0,0,0,0,0,0,0,0,0,0,1000,1000,1000,1000)
call V5F('A0O2',80,75,70,9,150,175,200,75,600,600,600,600,0,0,0,0)
elseif WSF=='E00P' then
call V5F('A0O7',10,10,10,10,135,140,155,170,500,500,500,500,0,0,0,0)
call V5F('A0O6',12,11,10,9,90,90,90,90,1100,1100,1100,1100,0,0,0,0)
call V5F('A0O8',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0O5',60,60,60,8,220,330,440,'d',850,850,850,700,0,0,0,'}')
elseif WSF=='N01I' then
call V5F('A0IL',22,22,22,22,130,140,150,160,900,900,900,900,625,625,625,625)
call V5F('A1NI',16,16,16,16,'x','x','x','x',0,0,0,0,0,0,0,0)
call V5F('A0O3',0,0,0,0,0,0,0,0,0,0,0,0,900,900,900,900)
call V5F('ANcr',45,45,45,30,50,'d',150,25,0,0,0,0,0,0,0,0)
elseif WSF=='N01V' then
call V5F('A0KV',12,12,12,12,'d','x',140,160,500,500,500,500,0,0,0,0)
call V5F('A0L8',17,17,17,17,'d','d','d','d',3000,3000,3000,3000,0,0,0,0)
call V5F('A0LN',30,26,22,18,40,35,30,20,0,0,0,0,0,0,0,0)
call V5F('A0KU',140,'x','d',0,75,75,75,0,500,500,500,500,0,0,0,0)
elseif WSF=='H00S' then
call V5F('A14P',4,4,4,4,70,80,90,'d',0,0,0,0,400,450,475,500)
call V5F('A14R',21,20,19,18,'d','n','x',130,300,300,300,300,500,500,500,500)
call V5F('A0QW',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A14O',0,0,0,0,0,0,0,0,99999,99999,99999,0,0,0,0,0)
elseif WSF=='H00Q' then
call V5F('A0QP',25,25,25,25,170,170,170,170,400,400,400,400,0,0,0,0)
call V5F('A0QN',0,0,0,0,0,0,0,0,450,450,450,450,0,0,0,0)
call V5F('A0QQ',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0QR',45,30,15,0,0,0,0,0,550,550,550,500,0,0,0,0)
elseif WSF=='E01Y' then
call V5F('A1EA',17,17,17,17,'d','d','d','d',0,0,0,0,0,0,0,0)
call V5F('A0RV',7,7,7,7,50,50,50,50,0,0,0,0,0,0,0,0)
call V5F('A0RO',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0RP',11,9,7,0,15,15,15,0,2000,2000,2000,500,300,300,300,0)
elseif WSF=='N00B' then
call V5F('A0S9',12,12,12,12,150,150,150,150,3000,3000,3000,3000,0,0,0,0)
call V5F('A0SC',16,16,16,16,'d','n','x',130,500,500,500,500,0,0,0,0)
call V5F('A0SB',6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0S8',85,85,85,6,'d',150,200,75,750,750,750,800,375,375,375,200)
elseif WSF=='H00T' then
call V5F('A0Z4',32,28,24,20,75,75,75,75,500,500,500,500,0,0,0,0)
call V5F('A0Z5',15,15,15,15,50,60,70,80,500,500,500,500,0,0,0,0)
call V5F('A0Z6',20,18,16,14,50,50,50,50,99999,99999,99999,99999,575,575,575,575)
call V5F('A0Z8',70,55,40,0,150,150,150,0,2000,2500,3000,500,0,0,0,0)
elseif WSF=='H06S' then
call V5F('A136',12,12,12,12,'x','x','x','x',1500,1500,1500,1500,215,215,215,215)
call V5F('A13T',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A11N',16,16,16,16,80,80,80,80,500,650,800,950,0,0,0,0)
call V5F('A11K',60,50,40,0,150,200,250,0,1000,1000,1000,500,0,0,0,0)
elseif WSF=='N0EG' then
call V5F('A12J',12,12,12,12,90,'d','n','x',800,800,800,800,500,500,500,500)
call V5F('A12K',9,9,9,9,90,'d','n','x',1700,1700,1700,1700,0,0,0,0)
call V5F('A14I',15,15,15,15,'d','d','d','d',0,0,0,0,400,450,475,500)
call V5F('A12P',60,60,60,0,200,300,400,0,600,600,600,500,0,0,0,0)
elseif WSF=='E02N' then
call V5F('A1SO',7,7,6,6,90,90,90,90,500,500,500,500,0,0,0,0)
call V5F('A1SQ',20,17,14,11,'x',130,140,150,1050,1050,1050,1050,500,500,500,500)
call V5F('A229',30,30,30,30,50,50,50,50,0,0,0,0,0,0,0,0)
call V5F('A1T5',55,50,45,6,'}','}','}',75,1000,1000,1000,800,450,450,450,200)
elseif WSF=='E02J' then
call V5F('A1TV',16,16,16,16,130,130,130,130,800,800,800,800,0,0,0,0)
call V5F('A1SW',65,50,35,20,160,130,'d',70,600,1000,1400,1800,500,500,500,500)
call V5F('A1SU',14,13,12,11,70,70,70,70,900,900,900,900,325,325,325,325)
call V5F('A1U6',85,85,85,0,'}',175,225,0,800,800,800,500,450,450,450,0)
elseif WSF=='E02I' then
call V5F('A1YO',18,16,14,12,'x','x','x','x',1500,1500,1500,1500,0,0,0,0)
call V5F('A1S7',21,20,19,18,75,75,75,75,1250,1250,1250,1250,0,0,0,0)
call V5F('A1YR',50,50,50,50,75,75,75,75,0,0,0,0,'d','d','d','d')
call V5F('A1YQ',25,20,15,9,50,75,'d','d',0,0,0,0,0,0,0,475)
elseif WSF=='E02F' then
call V5F('A1RJ',36,36,36,36,0,0,0,0,99999,99999,99999,99999,0,0,0,0)
call V5F('A1YX',45,40,35,30,80,90,'d','n',1200,1200,1200,1200,0,0,0,0)
call V5F('A1YY',20,20,20,20,'d','d','d','d',1300,1300,1300,1300,0,0,0,0)
call V5F('A1RK','n','n','n',0,200,200,200,0,700,700,700,500,0,0,0,0)
elseif WSF=='H008' then
call V5F('A0FW',2,2,2,2,30,30,30,30,600,600,600,600,0,0,0,0)
call V5F('A0GP',3,3,3,3,35,35,35,35,0,0,0,0,700,700,700,700)
call V5F('A0M3',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0FV',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
elseif WSF=='E02X' then
call V5F('A27F',18,18,18,18,'x','x','x','x',550,575,600,625,0,0,0,0)
call V5F('A27G',16,14,12,10,150,150,150,150,800,800,800,800,0,0,0,0)
call V5F('A27V',0,0,0,0,0,0,0,0,0,0,0,0,900,900,900,900)
call V5F('A27H',20,18,16,0,25,25,25,0,1000,1000,1000,500,0,0,0,0)
elseif WSF=='N0M0' then
call V5F('A2H3',14,12,10,8,'n','n','n','n',0,0,0,0,0,0,0,0)
call V5F('A2H0',30,22,14,6,50,50,50,50,700,700,700,700,250,350,450,550)
call V5F('A2HS',35,35,35,35,80,90,'d','n',1200,1200,1200,1200,0,0,0,0)
call V5F('A2JK',0,0,0,0,0,0,0,0,1500,1500,1500,500,0,0,0,0)
elseif WSF=='E02K' then
call V5F('A2JB',18,18,18,18,'d','d','d','d',1000,1000,1000,1000,315,315,315,315)
call V5F('A2J2',16,15,14,13,80,90,'d','n',800,800,800,800,0,0,0,0)
call V5F('A2EY',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A2CI',50,50,50,0,75,75,75,0,'d','d','d',500,0,0,0,0)
elseif WSF=='H0DO' then
call V5F('A2BE',5,4,3,2,70,70,70,70,800,800,800,800,500,500,500,500)
call V5F('A2IT',20,18,16,14,'n','n','n','n',0,0,0,0,0,0,0,0)
call V5F('A2HN',11,11,11,11,80,90,'d','n',700,700,700,700,0,0,0,0)
call V5F('A2BG',60,40,20,0,350,575,800,0,1200,1200,1200,500,170,170,170,0)
elseif WSF=='E032' then
call V5F('A2FK',8,8,8,8,70,80,90,'d',0,0,0,0,0,0,0,0)
call V5F('A2E3',4,4,4,4,60,70,80,90,800,1000,1200,1400,0,0,0,0)
call V5F('A2E4',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A2E5',8,8,8,0,75,'}',175,0,1200,1200,1200,500,200,200,200,0)
elseif WSF=='N0MU' then
call V5F('A2QM',22,20,18,16,'d','d','d','d',150,150,150,150,0,0,0,0)
call V5F('A2TJ',16,12,8,4,50,50,50,50,3000,3000,3000,3000,0,0,0,0)
call V5F('A2QI',13,13,13,13,75,75,75,75,1400,1400,1400,1400,0,0,0,0)
call V5F('A2TI',80,80,80,0,'d','d','d',0,0,0,0,500,180,180,180,0)
elseif WSF=='N0MD' then
call V5F('A2QT',12,12,12,12,130,130,130,130,650,650,650,650,0,0,0,0)
call V5F('A2T5',12,12,12,12,50,50,50,50,700,700,700,700,500,500,500,500)
call V5F('A2SG',3,3,3,3,55,70,85,100,750,750,750,750,0,0,0,0)
call V5F('A2TF',20,20,20,0,200,200,200,0,1000,1000,1000,500,300,300,300,0)
elseif WSF=='Ewar' then
call V5F('A0YM',6,6,6,6,30,25,20,15,1200,1200,1200,1200,0,0,0,0)
call V5F('A0PL',14,11,8,5,50,50,50,50,1000,1000,1000,1000,0,0,0,0)
call V5F('A03P',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A03Q',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
elseif WSF=='H00V' then
call V5F('A1C0',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0G2',11,11,11,11,140,150,160,170,800,800,800,800,500,500,500,500)
call V5F('A0MP',0,0,0,0,0,0,0,0,128,128,128,128,0,0,0,0)
call V5F('A1AT',90,90,90,0,200,200,200,0,500,500,500,500,0,0,0,0)
elseif WSF=='Udre' then
call V5F('A02H',8,8,8,8,80,90,'d','n',525,525,525,525,0,0,0,0)
call V5F('A08E',0,0,0,0,0,0,0,0,500,500,500,500,0,0,0,0)
call V5F('A086',0,0,0,0,0,0,0,0,500,500,500,500,0,0,0,0)
call V5F('A03K',180,150,'x',0,0,0,0,0,0,0,0,0,0,0,0,0)
elseif WSF=='NC00' then
call V5F('AHtb',8,8,8,8,140,140,140,140,525,525,525,525,0,0,0,0)
call V5F('AUav',0,0,0,0,0,0,0,0,0,0,0,0,900,900,900,900)
call V5F('A2S0',0,0,0,0,0,0,0,0,550,550,550,550,0,0,0,0)
call V5F('A01Y',260,160,60,240,140,140,140,0,0,0,0,0,0,0,0,0)
elseif WSF=='UC42' then
call V5F('A10R',60,60,60,60,60,50,40,30,300,300,300,300,0,0,0,0)
call V5F('A1OP',60,55,50,45,60,65,70,75,0,0,0,0,0,0,0,0)
call V5F('A094',8,8,8,8,'n','n','n','n',600,600,600,600,0,0,0,0)
call V5F('A0MU',100,100,100,'x',150,200,250,'}',550,550,550,400,0,0,0,0)
elseif WSF=='U000' then
call V5F('A0X7',11,11,11,11,95,'s',135,155,600,600,600,600,0,0,0,0)
call V5F('A1H5',28,20,12,4,'d','d','d','d',600,600,600,600,0,0,0,0)
call V5F('A2KO',23,20,17,14,40,40,40,40,0,0,0,0,0,0,0,0)
call V5F('A09U',70,60,50,5,160,210,260,75,0,0,0,0,0,0,0,0)
elseif WSF=='UC91' then
call V5F('A05C',28,28,28,28,50,50,50,50,0,0,0,0,0,0,0,0)
call V5F('A29K',8,8,8,8,80,95,'i','s',0,0,0,0,0,0,0,0)
call V5F('A0JJ',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A034',10,10,10,0,25,25,25,0,700,700,700,0,0,0,0,0)
elseif WSF=='UC01' then
call V5F('A0Q7',16,12,8,4,110,110,110,110,450,475,500,525,0,0,0,0)
call V5F('A0ME',12,10,8,6,60,60,60,60,99999,99999,99999,99999,0,0,0,0)
call V5F('A04A',7,7,7,7,'n','x',130,140,0,0,0,0,500,500,500,500)
call V5F('A28R',135,135,135,8,250,360,500,'d',700,700,700,700,'d','d','d','}')
elseif WSF=='E004' then
call V5F('A030',45,40,35,30,90,90,90,90,0,0,0,0,0,0,0,0)
call V5F('AHfa',0,0,0,0,10,10,10,10,600,600,600,600,0,0,0,0)
call V5F('A025',20,20,20,20,75,75,75,75,0,0,0,0,0,0,0,0)
call V5F('A04Q',45,40,35,0,'d','d','d',0,400,400,400,0,0,0,0,0)
elseif WSF=='EC45' then
call V5F('A0LK',19,17,15,13,'x','x','x','x',700,900,1100,1300,0,0,0,0)
call V5F('A0CZ',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A081',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0J1','x','n','d',6,150,175,200,70,600,600,600,800,400,400,400,200)
elseif WSF=='EC77' then
call V5F('A09V',0,0,0,0,20,20,20,20,600,600,600,600,0,0,0,0)
call V5F('A1A3',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0MM',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A080',80,50,30,8,'}',175,250,65,500,500,500,300,0,0,0,0)
elseif WSF=='E002' then
call V5F('A1E7',14,14,14,14,'}','}','}','}',0,0,0,0,0,0,0,0)
call V5F('A1DP',25,25,25,25,20,30,40,50,600,600,600,600,0,0,0,0)
call V5F('A1E6',0,0,0,0,0,0,0,0,0,0,0,0,900,900,900,900)
call V5F('A1AO',80,70,60,0,'d',150,200,0,600,600,600,500,0,0,0,0)
elseif WSF=='U00C' then
call V5F('A0T2',19,19,19,19,75,75,75,75,0,0,0,0,0,0,0,0)
call V5F('A0SS',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A194',24,20,16,12,'n','n','n','n',200,300,400,500,500,500,500,500)
call V5F('A0SW','d','d','d',0,50,50,50,0,150,150,150,500,0,0,0,0)
elseif WSF=='H00H' then
call V5F('A0MT',6,6,6,6,85,'i','}',145,400,400,400,400,400,400,400,400)
call V5F('A2TD',12,10,8,6,60,60,60,60,700,700,700,700,0,0,0,0)
call V5F('A09D',35,35,35,35,80,80,80,80,0,0,0,0,'d','d','d','d')
call V5F('A0CC',22,22,22,8,'}',175,225,75,950,950,950,500,1100,1100,1100,800)
elseif WSF=='Ofar' then
call V5F('A046',12,12,12,12,'x','x','x','x',700,700,700,700,0,0,0,0)
call V5F('A04E',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A226',7,6,5,4,30,40,50,60,0,0,0,0,0,0,0,0)
call V5F('A29I',150,150,150,12,150,225,325,75,0,0,0,0,0,0,0,500)
elseif WSF=='Oshd' then
call V5F('A2OI',10,10,10,10,95,'i','s','}',1000,1000,1000,1000,0,0,0,0)
call V5F('A0GK',14,14,14,14,'}',150,175,200,600,600,600,600,500,500,500,500)
call V5F('A04Y',15,15,15,15,165,165,165,165,500,550,600,650,0,0,0,0)
call V5F('A02Q','d','d','d',0,200,300,400,0,625,625,625,0,0,0,0,0)
elseif WSF=='U00E' then
call V5F('A05V',8,7,6,5,'}',145,165,185,0,0,0,0,400,450,475,500)
call V5F('A01N',0,0,0,0,0,0,0,0,0,0,0,0,1000,1000,1000,1000)
call V5F('A060',0,0,0,0,0,0,0,0,0,0,0,0,900,900,900,900)
call V5F('A067','d',85,70,9,175,340,500,75,600,600,600,600,0,0,0,0)
elseif WSF=='U00F' then
call V5F('A06I',8,8,8,8,'n','x',50,50,1000,1200,1400,1600,0,0,0,0)
call V5F('A06K',0,0,0,0,0,0,0,0,0,0,0,0,250,250,250,250)
call V5F('A06D',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0FL',30,30,30,0,'d',130,170,0,160,160,160,0,0,0,0,0)
elseif WSF=='O00J' then
call V5F('A1P8',35,35,35,35,'d','d','d','d',99999,99999,99999,99999,0,0,0,0)
call V5F('A0ES',0,0,0,0,0,0,0,0,0,0,0,0,900,900,900,900)
call V5F('A0G5',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0G4',80,70,60,0,'}',150,175,0,700,700,700,500,0,0,0,0)
elseif WSF=='Ubal' then
call V5F('A1QW',36,33,30,27,'d','d','d','d',3000,3000,3000,3000,0,0,0,0)
call V5F('A0CA',12,10,8,6,60,60,60,60,0,0,0,0,0,0,0,0)
call V5F('A0CG',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0CT',60,50,40,0,150,75,0,0,0,0,0,500,0,0,0,0)
elseif WSF=='Nfir' then
call V5F('A0EY',10,10,10,10,75,75,75,75,0,0,0,0,0,0,0,0)
call V5F('A0BR',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0FU',0,0,0,0,0,0,0,0,0,0,0,0,900,900,900,900)
call V5F('A29J','x','n','d',0,150,175,200,0,0,0,0,0,0,0,0,0)
elseif WSF=='U00K' then
call V5F('A06O',11,11,11,11,'n','x',130,140,350,450,550,650,0,0,0,0)
call V5F('A0H0',40,30,20,10,60,50,40,30,500,500,500,500,0,0,0,0)
call V5F('A0FA',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A06R',140,'x','d',0,175,250,325,0,500,500,500,500,0,0,0,0)
elseif WSF=='Opgh' then
call V5F('A0I6',10,10,10,10,80,90,'d','n',500,500,500,500,0,0,0,0)
call V5F('A0S1',20,15,10,5,75,85,95,'i',900,900,900,900,0,0,0,0)
call V5F('A0C6',0,0,0,0,0,0,0,0,0,0,0,0,900,900,900,900)
call V5F('A0E2',75,65,55,9,'x',160,200,'x',150,150,150,700,150,150,150,500)
elseif WSF=='Hvsh' then
call V5F('A0EC',12,10,8,6,80,80,80,80,800,800,800,800,0,0,0,0)
call V5F('A0LE',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0I8',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0LH',70,60,50,0,150,200,250,0,1000,1000,1000,500,0,0,0,0)
elseif WSF=='Udea' then
call V5F('A0I3',5,5,5,5,75,75,75,75,800,800,800,800,0,0,0,0)
call V5F('A0MF',12,10,8,6,'d','i','n','s',500,500,500,500,1,1,1,1)
call V5F('A0MG',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0NS',60,50,40,5,0,0,0,75,0,0,0,0,0,0,0,0)
elseif WSF=='E01B' then
call V5F('A0HW',16,16,16,16,130,140,150,160,2000,2000,2000,2000,0,0,0,0)
call V5F('A0FX',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0NA',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0H9','x','x','x',0,150,150,150,0,0,0,0,500,0,0,0,0)
elseif WSF=='E01A' then
call V5F('A0NM',20,18,16,14,'n','x',130,140,700,700,700,700,500,500,500,500)
call V5F('A0NE',0,0,0,0,15,40,65,90,0,0,0,0,340,340,340,340)
call V5F('A0NO',20,20,20,20,'x','x','x','x',525,525,525,525,150,150,150,150)
call V5F('A0NT',80,80,80,'x',200,200,200,150,600,600,600,700,0,0,0,0)
elseif WSF=='U00P' then
call V5F('A0OI',0,0,0,0,'d','d','d','d',450,450,450,450,0,0,0,0)
call V5F('A0OJ',18,16,14,12,'x',140,160,180,500,500,500,500,500,500,500,500)
call V5F('A0IF',0,0,0,0,0,0,0,0,0,0,0,0,1000,1000,1000,1000)
call V5F('A0OK',160,160,160,0,175,250,325,0,600,650,700,0,375,475,575,0)
elseif WSF=='E01C' then
call V5F('A0J5',25,25,25,25,'x','x','x','x',800,800,800,800,0,0,0,0)
call V5F('A0AS',16,16,16,16,90,'n',130,150,500,500,500,500,0,0,0,0)
call V5F('A06P',50,46,42,38,'d','n','x',130,1200,1200,1200,1200,650,650,650,650)
call V5F('S008',165,165,165,30,200,250,300,'d',1200,1200,1200,900,600,600,600,250)
elseif WSF=='H00I' then
call V5F('A0NB',20,16,12,8,'d','d','d','d',500,750,1000,1250,220,220,220,220)
call V5F('A0N8',12,10,8,6,80,80,80,80,99999,99999,99999,99999,0,0,0,0)
call V5F('A0N7',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0MW',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
elseif WSF=='N01W' then
call V5F('A0NQ',15,13,11,7,'d','s',130,145,600,600,600,600,0,0,0,0)
call V5F('A10L',60,45,30,15,140,130,'x','n',550,700,850,1000,0,0,0,0)
call V5F('A0OR',12,10,8,6,80,90,'d','n',900,900,900,900,0,0,0,0)
call V5F('A10Q',40,40,40,0,'d','d','d',0,2000,2000,2000,0,575,575,575,0)
elseif WSF=='N00R' then
call V5F('A01I',14,14,14,14,'d','n','x',130,750,750,750,750,400,400,400,400)
call V5F('A0RA',24,21,18,15,'d','s',130,145,750,750,750,750,275,275,275,275)
call V5F('AIcd',0,0,0,0,0,0,0,0,0,0,0,0,900,900,900,900)
call V5F('A0R0',130,130,130,0,75,150,225,0,99999,99999,99999,500,0,0,0,0)
elseif WSF=='H00R' then
call V5F('A15S',10,8,6,4,70,90,'n',130,625,625,625,625,325,325,325,325)
call V5F('A0R5',24,18,12,6,50,75,'d','}',750,750,750,750,0,0,0,0)
call V5F('A15V',60,60,60,60,'x',130,140,150,600,600,600,600,0,0,0,0)
call V5F('A15J',75,75,75,180,'d','d','d',150,0,0,0,0,0,0,0,0)
elseif WSF=='H00N' then
call V5F('A0QE',28,28,28,28,'d',130,160,190,500,500,500,500,250,350,450,550)
call V5F('A0QG',9,9,9,9,70,90,'n',130,600,600,600,600,0,0,0,0)
call V5F('A0R7',12,11,10,9,20,30,40,50,600,600,600,600,0,0,0,0)
call V5F('A0QK','d','d','d',0,200,300,400,0,500,900,1300,500,300,300,300,0)
elseif WSF=='H00U' then
call V5F('A21W',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A21X',0,0,0,9,0,0,0,'d',0,0,0,0,0,0,0,475)
call V5F('A21V',0,0,0,25,0,0,0,50,0,0,0,0,0,0,0,650)
call V5F('A21Y',22,17,12,5,20,40,60,80,0,0,0,0,0,0,0,0)
elseif WSF=='Uktl' then
call V5F('A0I7',15,15,15,15,'n',130,150,160,600,600,600,600,0,0,0,0)
call V5F('A180',35,35,35,35,170,170,170,170,700,700,700,700,0,0,0,0)
call V5F('A0B1',25,25,25,25,95,'n','}',140,700,700,700,700,400,400,400,400)
call V5F('A1BX',200,190,180,0,250,350,450,0,250,250,250,500,400,400,400,0)
elseif WSF=='O016' then
call V5F('A1EL',3,3,3,3,20,20,20,20,700,700,700,700,375,375,375,375)
call V5F('A19V',14,14,14,14,140,140,140,140,1500,1500,1500,1500,375,375,375,375)
call V5F('A19Z',40,40,40,40,'d','d','d','d',0,0,0,0,-1,-1,-1,-1)
call V5F('A19O',90,70,50,9,150,150,150,'x',175,175,175,700,500,500,500,500)
elseif WSF=='N0HP' then
call V5F('A1MG',15,13,11,9,150,150,150,150,700,700,700,700,0,0,0,0)
call V5F('A1HS',4,4,4,4,80,90,'d','n',1500,1500,1500,1500,250,250,250,250)
call V5F('A1HQ',50,42,34,26,'n','x',130,140,800,800,800,800,525,525,525,525)
call V5F('A1MI',40,40,40,0,'d','}',150,0,99999,99999,99999,500,0,0,0,0)
elseif WSF=='H071' then
call V5F('A1IM',9,8,7,6,55,50,45,40,0,0,0,0,0,0,0,0)
call V5F('A1J7',20,16,12,8,75,75,75,75,500,500,500,500,0,0,0,0)
call V5F('A1HR',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A1IN',60,60,60,5,'x','x','x',75,0,0,0,0,0,0,0,0)
elseif WSF=='Eevi' then
call V5F('A2KZ',22,18,14,10,50,50,50,50,250,250,250,250,500,500,500,500)
call V5F('A0H4',16,16,16,16,80,80,80,80,500,500,500,500,0,0,0,0)
call V5F('A1RI',140,140,140,140,50,50,50,50,0,0,0,0,0,0,0,0)
call V5F('A07Q',160,'n',60,0,200,'d',0,0,250,250,250,0,0,0,0,0)
elseif WSF=='Ekee' then
call V5F('A06W',9,9,9,9,'d','}',140,160,750,750,750,750,150,175,200,225)
call V5F('A035',22,22,22,22,95,'x',135,155,0,0,0,0,200,200,200,200)
call V5F('A06V',4,4,4,4,90,100,110,120,700,700,700,700,650,650,650,650)
call V5F('A21F',1,1,1,0,'n','n','n',0,0,0,0,0,0,0,0,0)
elseif WSF=='E02H' then
call V5F('A1S8',25,22,19,16,'x','x','x','x',600,600,600,600,500,500,500,500)
call V5F('A1SB',13,13,13,13,50,60,70,80,600,600,600,600,500,500,500,500)
call V5F('A1S4',3,3,3,3,50,50,50,50,1500,1500,1500,1500,0,0,0,0)
call V5F('A1SA',50,50,50,0,200,200,200,0,800,800,800,0,0,0,0,0)
elseif WSF=='Ulic' then
call V5F('A07F',8,8,8,8,'}',150,170,190,600,600,600,600,200,200,200,200)
call V5F('A08R',5,5,5,5,50,50,50,50,800,800,800,800,0,0,0,0)
call V5F('A053',35,30,25,20,25,25,25,25,400,400,400,400,0,0,0,0)
call V5F('A05T',145,'s',60,6,200,325,500,50,750,750,750,800,0,0,0,0)
elseif WSF=='UC76' then
call V5F('A02M',8,8,8,8,'i','x',140,165,600,600,600,600,'n','n','n','n')
call V5F('A0P6',15,15,15,15,80,80,80,80,900,900,900,900,350,350,350,350)
call V5F('A02C',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A073','d','d','d',180,200,300,400,150,0,0,0,0,700,700,700,800)
elseif WSF=='UC18' then
call V5F('A0X5',12,12,12,12,'d','x',145,170,500,500,500,500,0,0,0,0)
call V5F('A0MN',30,24,18,12,'}',150,175,200,500,500,500,500,0,0,0,0)
call V5F('A02N',20,15,10,5,10,10,10,10,850,850,850,850,1200,1200,1200,1200)
call V5F('A095',160,'d',40,9,200,420,650,'x',900,900,900,700,500,500,500,500)
elseif WSF=='EC57' then
call V5F('A173',22,22,22,22,'}','}','}','}',800,800,800,800,0,0,0,0)
call V5F('A0MY',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0MS',5,5,5,5,20,20,20,20,850,850,850,850,0,0,0,0)
call V5F('A013',140,'x','d',40,200,300,400,'}',0,0,0,0,200,200,200,200)
elseif WSF=='UC11' then
call V5F('A02S',10,9,8,7,90,90,90,90,1000,1000,1000,1000,150,150,150,150)
call V5F('A037',12,12,12,10,40,40,40,40,800,800,800,800,0,0,0,0)
call V5F('A1RD',30,30,30,30,80,80,80,80,99999,99999,99999,99999,'d','d','d','d')
call V5F('A29L','x','n','d',0,200,250,300,0,0,0,0,0,0,0,0,0)
elseif WSF=='UC60' then
call V5F('A08X',16,14,12,10,70,80,90,'d',700,700,700,700,0,0,0,0)
call V5F('A1NA',4,4,4,4,170,160,150,140,1000,1000,1000,1000,0,0,0,0)
call V5F('A0VX',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A1NE',180,160,140,9,150,150,150,'d',0,0,0,0,0,0,0,475)
elseif WSF=='U00A' then
call V5F('A055',10,10,10,10,140,140,140,140,500,500,500,500,0,0,0,0)
call V5F('A0RW',24,18,12,6,70,70,70,70,550,600,650,700,0,0,0,0)
call V5F('A03N',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A03O',140,140,140,3,'}',200,275,150,128,128,128,128,400,400,400,1000)
elseif WSF=='N0M7' then
call V5F('A2NE',50,40,30,20,'x','n','d',90,0,0,0,0,-1,-1,-1,-1)
call V5F('A2LA',7,7,7,7,'x',130,140,150,1200,1200,1200,1200,500,500,500,500)
call V5F('A2LB',17,16,15,14,75,75,75,75,1000,1000,1000,1000,0,0,0,0)
call V5F('A0Z0',90,80,70,0,250,250,250,0,800,800,800,500,0,0,0,0)
elseif WSF=='N0MK' then
call V5F('A2M1',20,20,20,20,75,75,75,75,600,700,800,900,0,0,0,0)
call V5F('A2LM',50,50,50,50,'n','n','n','n',900,900,900,900,275,275,275,275)
call V5F('A2LL',4,4,4,4,50,50,50,50,2000,2000,2000,2000,0,0,0,0)
call V5F('A2M0',65,60,55,40,0,0,0,'}',0,0,0,0,200,200,200,200)
elseif WSF=='U008' then
call V5F('A03D',30,30,30,30,145,145,145,145,800,800,800,800,200,200,200,200)
call V5F('A0ZF',50,45,40,35,15,20,25,30,500,500,500,500,0,0,0,0)
call V5F('A03E',0,0,0,0,0,0,0,0,0,0,0,0,900,900,900,900)
call V5F('A093','d',70,40,180,'d','d','d',150,0,0,0,0,0,0,0,0)
elseif WSF=='U006' then
call V5F('A0BH',10,10,10,10,'x','x','x','x',700,700,700,700,0,0,0,0)
call V5F('A0BG',30,30,30,30,50,50,50,50,600,600,600,600,650,650,650,650)
call V5F('A0BK',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
call V5F('A0WQ',45,45,45,0,'d','d','d',0,500,500,500,500,0,0,0,0)
endif
endfunction
function WTF takes integer O5,integer o6,integer n6,integer WUF,integer WVF,integer WWF,integer WXF,integer WYF returns nothing
set eY[128+O5]=o6
set eY[144+O5]=n6
set eY[160+O5]=WUF
set eY[172+O5]=WVF
set eY[188+O5]=WWF
set hG[144+O5]=WXF
set hG[160+O5]=WYF
endfunction
function WZF takes unit it returns boolean
local integer i1=GetUnitTypeId(it)
return((i1=='H00D')or(i1=='Otch')or(i1=='N0HP')or(i1=='H00U')or(i1=='Npbm')or(i1=='H001')or(i1=='Ucrl')or(i1=='Hamg')or(i1=='Hlgr')or(i1=='U00K')or(i1=='O00J')or(i1=='Ofar')or(i1=='Opgh')or(i1=='U00A')or(i1=='U00C')or(i1=='Udea')or(i1=='NC00')or(i1=='UC91')or(i1=='E002')or(i1=='Huth')or(i1=='U006')or(i1=='U000')or(i1=='EC57')or(i1=='EC77')or(i1=='N00B')or(i1=='H004')or(i1=='UC60')or(i1=='Hmkg')or(i1=='E00P')or(i1=='H00N')or(i1=='UC76')or(i1=='UC18')or(i1=='Uktl')or(i1=='Ulic')or(i1=='U00E')or(i1=='E01C'))
endfunction
function WAF takes integer O5,unit it,integer i1 returns nothing
if(i1=='H00V')then
call WTF(O5,'A0MP','A0G2','A1C0','A1AT',0,12,13)
elseif(i1=='U00C')then
call WTF(O5,'A0T2','A0SS','A194','A0SW',0,'e','e')
elseif(i1=='EC77')then
call WTF(O5,'A0MM','A09V','A1A3','A080','A1UZ',7,3)
elseif(i1=='EC45')then
call WTF(O5,'A0CZ','A081','A0LK','A0J1','A1D7',9,9)
elseif(i1=='U000')then
call WTF(O5,'A0X7','A1H5','A2KO','A09U',0,21,17)
elseif(i1=='E004')then
call WTF(O5,'AHfa','A030','A025','A04Q',0,9,11)
elseif(i1=='Udre')then
call WTF(O5,'A086','A02H','A08E','A03K','A1B0',1,11)
elseif(i1=='UC01')then
call WTF(O5,'A04A','A0Q7','A0ME','A28R','A28S',13,20)
elseif(i1=='UC91')then
call WTF(O5,'A05C','A29K','A0JJ','A034',0,8,1)
elseif(i1=='UC42')then
call WTF(O5,'A10R','A094','A1OP','A0MU','A0A2',15,16)
elseif(i1=='NC00')then
call WTF(O5,'AHtb','AUav','A2S0','A01Y',0,11,6)
elseif((i1=='Eevi')or(i1=='Eevm')or(i1=='E02V')or(i1=='E02W')or(i1=='E02U'))then
call WTF(O5,'A2KZ','A0H4','A1RI','A07Q',0,10,13)
elseif(i1=='Ekee')then
call WTF(O5,'A06W','A035','A06V','A21F','A21G','f',23)
elseif(i1=='Ulic')then
call WTF(O5,'A07F','A053','A08R','A05T','A08H',25,25)
elseif(i1=='U006')then
call WTF(O5,'A0BH','A0BG','A0BK','A0WQ',0,14,16)
elseif(i1=='UC18')then
call WTF(O5,'A0X5','A0MN','A02N','A095','A09W',23,17)
elseif(i1=='EC57')then
call WTF(O5,'A173','A0MY','A0MS','A013','A0A6',8,8)
elseif(i1=='UC11')then
call WTF(O5,'A02S','A037','A1RD','A29L',0,8,11)
elseif(i1=='UC60')then
call WTF(O5,'A08X','A1NA','A0VX','A1NE','A2IG','k','k')
elseif(i1=='U008')then
call WTF(O5,'A03E','A03D','A0ZF','A093',0,1,6)
elseif(i1=='U00A')then
call WTF(O5,'A055','A0RW','A03N','A03O',0,10,1)
elseif(i1=='Ewar')then
call WTF(O5,'A0YM','A0PL','A03P','A03Q',0,3,11)
elseif(i1=='Udea')then
call WTF(O5,'A0MF','A0I3','A0MG','A0NS','A1DA',4,4)
elseif(i1=='Hvsh')then
call WTF(O5,'A0LE','A0I8','A0EC','A0LH',0,1,11)
elseif(i1=='Ubal')then
call WTF(O5,'A1QW','A0CA','A0CG','A0CT',0,6,6)
elseif(i1=='Opgh')then
call WTF(O5,'A0C6','A0S1','A0I6','A0E2','A1MR','h',4)
elseif(i1=='U00K')then
call WTF(O5,'A06O','A0FA','A0H0','A06R','A1B4',8,11)
elseif(i1=='Nfir')then
call WTF(O5,'A0BR','A0EY','A0FU','A29J',0,7,8)
elseif(i1=='O00J')then
call WTF(O5,'A1P8','A0ES','A0G5','A0G4','A1D8',1,1)
elseif(i1=='U00F')then
call WTF(O5,'A06I','A06K','A06D','A0FL','A1CX','g',4)
elseif(i1=='U00E')then
call WTF(O5,'A05V','A060','A01N','A067','A08P',21,25)
elseif(i1=='Oshd')then
call WTF(O5,'A0GK','A04Y','A2OI','A02Q','A1D9',18,17)
elseif(i1=='Ofar')then
call WTF(O5,'A046','A04E','A226','A29I',0,11,15)
elseif(i1=='H00H')then
call WTF(O5,'A0MT','A2TD','A09D','A0CC','A02Z',21,21)
elseif(i1=='UC76')then
call WTF(O5,0,'A02C',0,0,0,25,25)
elseif(i1=='E01B')then
call WTF(O5,'A0HW','A0FX','A0NA','A0H9',0,10,6)
elseif(i1=='E01A')then
call WTF(O5,'A0NM','A0NO','A0NE','A0NT','A0NX','i',23)
elseif(i1=='U00P')then
call WTF(O5,'A0IF','A0OI','A0OJ','A0OK','A1VW',23,22)
elseif(i1=='E01C')then
if(DI8(not IsPlayerAlly(Player(O5),G8[0]))>2)then
call WTF(O5,'A0AS','A06P','A0J5','S008','S00U',17,20)
else
call WTF(O5,'A0AS','A0J5','A06P','S008','S00U',17,20)
endif
elseif(i1=='H00I')then
call WTF(O5,'A0N7','A0N8','A0NB','A0MW','A27C','j','j')
elseif(i1=='N01W')then
call WTF(O5,'A0OR','A10L','A0NQ','A10Q','A1DB',17,18)
elseif(i1=='N00R')then
call WTF(O5,'A01I','A0RA','AIcd','A0R0',0,15,16)
elseif(i1=='H00R')then
call WTF(O5,'A15S','A0R5','A15V','A15J',0,5,5)
elseif(i1=='H00N')then
call WTF(O5,'A0QG','A0QE','A0R7','A0QK','A21Q',5,5)
elseif(i1=='H008')then
call WTF(O5,'A0FW','A0GP','A0M3','A0FV',0,4,4)
elseif(i1=='E005')then
call WTF(O5,'A062','A041','A042','A054','A00U',154,154)
elseif(i1=='Npbm')then
call WTF(O5,'A06M','A0MX','Acdh','A0MQ','A1B6',6,10)
elseif(i1=='H000')then
call WTF(O5,'A00S','A2ON','A00V','A2O6',0,6,10)
elseif(i1=='Nbrn')then
call WTF(O5,'A026','A029','A0QB','A0VC',0,9,7)
elseif(i1=='Hlgr')then
call WTF(O5,'A03F','A2AI','A0CL','A03G',0,15,6)
elseif(i1=='Edem')then
call WTF(O5,'A022','A0KY','AEbl','A0E3',0,9,3)
elseif(i1=='Usyl')then
call WTF(O5,'A03S','A03U','A064','A04P',0,3,13)
elseif(i1=='Harf')then
call WTF(O5,'A08N','A08V','A06A','A0ER',0,18,5)
elseif((i1=='N016')or(i1=='N017')or(i1=='N02B'))then
call WTF(O5,'A0BE','A21L','A0O0','A1EJ',0,12,9)
elseif(i1=='Naka')then
call WTF(O5,'A004','A1IQ','A07A','A0B4',0,1,3)
elseif(i1=='Orkn')then
call WTF(O5,'A00P','A010','A0RX','A00H','A0A1',17,23)
elseif(i1=='Hvwd')then
call WTF(O5,'A02A','ACac','A17O','A0IN','A1AW',14,4)
elseif(i1=='Hmbr')then
call WTF(O5,'A0JC','A020','A0N5','A29G','A29H',16,20)
elseif(i1=='Emoo')then
call WTF(O5,'A0DW','A0DX','A01B','A0DY','A1WB',26,22)
elseif(i1=='Uktl')then
call WTF(O5,'A0I7','A180','A0B1','A1BX',0,18,25)
elseif(i1=='Hblm')then
call WTF(O5,'A085','A112','A10X','A11T',0,19,19)
elseif(i1=='Ntin')then
call WTF(O5,'A05E','A049','A0BQ','A065',0,157,19)
elseif(i1=='Emns')then
call WTF(O5,'A21E','AEfn','A01O','A1W8','A1W9',18,19)
elseif(i1=='O00P')then
call WTF(O5,'A0FN','A0G6','A0KX','A0G8',0,1,12)
elseif(i1=='HC49')then
call WTF(O5,'A063','A24D','A2KU','A07U',0,10,9)
elseif(i1=='Nbbc')then
call WTF(O5,'A05G','A00K','A047','A0M1','A1AX',1,11)
elseif(i1=='Hjai')then
call WTF(O5,'A1E9','A04C','AHab','A03R','A0AV',8,17)
elseif(i1=='HC92')then
call WTF(O5,'A0DZ','A0K9','A0RG','A0MB',0,1,10)
elseif(i1=='H001')then
call WTF(O5,'A190','A01K','A2IS','A1WH',0,11,4)
elseif(i1=='H00A')then
call WTF(O5,'A28T','A0KM','A0LV','A0LT','A1CS',153,153)
elseif(i1=='H004')then
call WTF(O5,'A01F','A027','A18X','A01P','A09Z',16,23)
elseif(i1=='Ucrl')then
call WTF(O5,'A0BZ','A0LL','A19Q','A0CY',0,15,16)
elseif(i1=='Otch')then
call WTF(O5,'A0SK','A0DJ','A0DL','A0DH','A1OB',15,16)
if IsPlayerAlly(Player(O5),G8[0])then
set I47=true
else
set I77=true
endif
elseif(i1=='N01A')then
call WTF(O5,'A14L','A0LZ','A2NT','A0L3',0,26,22)
elseif(i1=='N0M7')then
call WTF(O5,'A2NE','A2LA','A2LB','A0Z0',0,25,22)
elseif(i1=='N0MK')then
call WTF(O5,'A2M1','A2LL','A2LM','A2M0',0,25,22)
elseif(i1=='H00K')then
call WTF(O5,'A05J','A06B','A06H','A0AK','A1FY',151,151)
elseif(i1=='Huth')then
call WTF(O5,'ANic','A1P9','A03Y','A0LC',0,156,156)
elseif(i1=='Ogrh')then
call WTF(O5,'A0DB','A10D','A0D7','A0YK',0,10,9)
elseif(i1=='Hamg')then
call WTF(O5,'A01Z','A26N','A2ML','A07Z',0,152,20)
elseif((i1=='N01O')or(i1=='N013')or(i1=='N014')or(i1=='N015'))then
call WTF(O5,'A0A5','A0A8',0,'A0AG',0,3,11)
elseif(i1=='Hmkg')then
call WTF(O5,0,0,0,'A088',0,16,23)
elseif(i1=='H00D')then
call WTF(O5,'A0O1','A0OO','A0BD','A0O2','A289',155,16)
elseif(i1=='E00P')then
call WTF(O5,'A0O6','A0O7','A0O8','A0O5','A1B1',19,25)
elseif(i1=='N01I')then
call WTF(O5,'A0O3','A1NI','A0IL','ANcr',0,6,11)
elseif(i1=='N01V')then
call WTF(O5,'A0KV','A0L8','A0LN','A0KU',0,14,12)
elseif(i1=='H00Q')then
call WTF(O5,'A0QP','A0QN','A0QQ','A0QR','A1B3',11,11)
elseif(i1=='E01Y')then
call WTF(O5,'A0RO','A1EA','A0RV','A0RP',0,9,10)
elseif(i1=='N00B')then
call WTF(O5,'A0S9','A0SC','A0SB','A0S8','A1QP',13,18)
elseif(i1=='N0HP')then
call WTF(O5,'A1MG','A1HS','A1HQ','A1MI','0',1,1)
elseif(i1=='H071')then
call WTF(O5,'A1IM','A1J7','A1HR','A1IN','0',1,1)
elseif(i1=='E002')then
call WTF(O5,'A1E7','A1DP','A1E6','A1AO','A1UV',1,1)
elseif(i1=='E02J')then
call WTF(O5,'A1TV','A1SW','A1SU','A1U6','0',1,1)
elseif(i1=='E02I')then
call WTF(O5,'A1YO','A1S7','A1YR','A1YQ','0',1,1)
elseif(i1=='E02F')then
call WTF(O5,'A1RJ','A1YX','A1YY','A1RK','0',1,1)
elseif(i1=='E02X')then
call WTF(O5,'A27F','A27G','A27V','A27H','0',1,1)
if KR8(Player(O5))then
set H_7=true
endif
elseif(i1=='H00T')then
call WTF(O5,'A0Z4','A0Z5','A0Z6','A0Z8','A1CV',1,1)
elseif(i1=='H00U')then
call WTF(O5,'A21W','A21X','A21V','A21Y','A1GU',1,1)
elseif(i1=='N0EG')then
call WTF(O5,'A12J','A12K','A14I','A12P','A1D6',1,1)
elseif(i1=='E02N')then
call WTF(O5,'A1SO','A1SQ','A229','A1T5','A235',1,1)
elseif(i1=='O01F')then
call WTF(O5,'A1TA','A1T8','A28Q','A1TB',0,1,1)
elseif(i1=='H00S')then
call WTF(O5,'A14P','A14R','A0QW','A14O',0,1,1)
elseif(i1=='O016')then
call WTF(O5,'A1EL','A19V','A19Z','A19O',0,1,1)
elseif(i1=='E02H')then
call WTF(O5,'A1S8','A1SB','A1S4','A1SA',0,1,1)
elseif(i1=='N0M0')then
call WTF(O5,'A2H3','A2H0','A2HS','A2JK',0,1,1)
elseif(i1=='E02K')then
call WTF(O5,'A2JB','A2J2','A2EY','A2CI',0,1,1)
elseif(i1=='H0DO')then
call WTF(O5,'A2BE','A2IT','A2HN','A2BG',0,1,1)
elseif(i1=='E032')then
call WTF(O5,'A2FK','A2E3','A2E4','A2E5',0,1,1)
else
call WTF(O5,G04[GetUnitPointValue(it)],G54[GetUnitPointValue(it)],G24[GetUnitPointValue(it)],G_4[GetUnitPointValue(it)],H44[GetUnitPointValue(it)],1,1)
endif
set bj_forLoopAIndex=O5
call WRF(i1)
endfunction
function WBF takes nothing returns nothing
call C79(GetTriggerUnit())
if(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER)then
if(GetUnitTypeId(GetTriggerUnit())!='H00J')then
call ExecuteFunc("UD")
else
call ExecuteFunc("xh")
endif
elseif(GetUnitTypeId(GetTriggerUnit())!='H00J')then
if not(((RA4!=null)and(IsTriggerEnabled(RA4)))and(((GetOwningPlayer(GetTriggerUnit())==RT4)and(RV4!=null))or((GetOwningPlayer(GetTriggerUnit())==RU4)and(RW4!=null))))then
set bj_lastLoadedUnit=GetTriggerUnit()
call WAF(GetPlayerId(GetOwningPlayer(bj_lastLoadedUnit)),bj_lastLoadedUnit,GetUnitTypeId(bj_lastLoadedUnit))
call ExecuteFunc("WCF")
endif
endif
endfunction
function W3F takes integer O5,integer YP7 returns nothing
local integer W6F=0
local real x
local real y
local integer WLF=KC4
local integer W1F=KL4
local integer kg=0
local player pl=Player(O5)
local integer i=0
if(KS8(pl)and(GetPlayerController(pl)==MAP_CONTROL_COMPUTER)and(Y7[GetPlayerId(pl)]==null))then
if(((IsJWPlayer(pl))and(not X4))or((X4)and(GetRandomInt(1,2)==1)))then
set WLF=KC4
set W1F=K34
else
set WLF=K64
set W1F=KL4
endif
if(IsJWPlayer(pl))then
set x=GetRandomReal(GetRectMinX(QD),GetRectMaxX(QD))
set y=GetRandomReal(GetRectMinY(QD),GetRectMaxY(QD))
else
set x=GetRandomReal(GetRectMinX(PD),GetRectMaxX(PD))
set y=GetRandomReal(GetRectMinY(PD),GetRectMaxY(PD))
endif
set eY[GetPlayerId(pl)]=0
loop
set W6F=GetRandomInt(WLF,W1F)
if((not O[W6F])and(YO7(KA4[W6F],YP7)or i>20))then
if D then
if GetPlayerId(pl)==1 then
set W6F=59
endif
endif
set Y7[GetPlayerId(pl)]=CreateUnit(pl,KA4[W6F],x,y,bj_UNIT_FACING)
endif
set i=i+1
exitwhen(Y7[GetPlayerId(pl)]!=null)
endloop
if(not(V4 or W4 or O9 or HO4))then
call AdjustPlayerStateBJ(-250,pl,PLAYER_STATE_RESOURCE_GOLD)
endif
endif
set pl=null
endfunction
function SEv takes nothing returns nothing
if(IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO))then
if(GetUnitTypeId(GetEnumUnit())=='U006')then
call ExecuteFunc("QY9")
endif
elseif((GetUnitTypeId(GetEnumUnit())=='n004')or(GetUnitTypeId(GetEnumUnit())=='n018')or(GetUnitTypeId(GetEnumUnit())=='n01C')or(GetUnitTypeId(GetEnumUnit())=='n01G'))then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function W0F takes player pl,boolean W5F returns nothing
local integer WLF
local integer W1F
local integer W6F
local integer O5=GetPlayerId(pl)
local integer YP7=LInt(GetHandleId(pl),"AI|Class")
local integer i=0
if(((IsJWPlayer(pl))and(not X4))or((X4)and(GetRandomInt(1,2)==1)))then
set WLF=KC4
set W1F=K34
else
set WLF=K64
set W1F=KL4
endif
if(W5F)then
if X4 or F9 then
set E7='d'
endif
call AdjustPlayerStateBJ(-1*E7,pl,PLAYER_STATE_RESOURCE_GOLD)
endif
call GroupClear(H8)
set bj_groupEnumOwningPlayer=pl
call GroupEnumUnitsInRect(H8,GetWorldBounds(),filterGetUnitsInRectOfPlayer)
call ForGroup(H8,function E1D)
call PA8(Y7[O5])
set Y7[O5]=null
set B[O5]=true
loop
set W6F=GetRandomInt(WLF,W1F)
if(O[W6F]==false and(YO7(KA4[W6F],YP7)or i>20))then
set O[W6F]=true
if(IsJWPlayer(pl))then
set Y7[O5]=CreateUnit(pl,KA4[W6F],GetRectCenterX(XD),GetRectCenterY(XD),bj_UNIT_FACING)
else
set Y7[O5]=CreateUnit(pl,KA4[W6F],GetRectCenterX(WD),GetRectCenterY(WD),bj_UNIT_FACING)
endif
call MJ8(KA4[W6F])
endif
set i=i+1
exitwhen Y7[O5]!=null
endloop
endfunction
function W2F takes nothing returns nothing
local string VH=GetEventPlayerChatString()
local player pl=Z17(S2I(SubString(VH,9,StringLength(VH))))
if((pl!=null)and(KS8(pl))and(IsPlayerInForce(pl,RX4)))then
if((IsPlayerAlly(GetTriggerPlayer(),pl))or(DM8(not IsPlayerAlly(GetTriggerPlayer(),G8[0]))==null))then
if((B[GetPlayerId(pl)])or(Y7[GetPlayerId(pl)]==null))then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,"Cannot repick")
elseif(Bz>60.)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,"Too late to repick")
else
call W0F(pl,false)
endif
else
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,"Cannot force repick on enemies with human ally")
endif
endif
set pl=null
endfunction
function W_F takes nothing returns nothing
local string VH=GetEventPlayerChatString()
local integer X4F=1
local boolean O6=IsPlayerAlly(GetTriggerPlayer(),G8[0])
local boolean X7F
if((V)and((VH=="-pa")or(VH=="-pe"))and oo[GetPlayerId(GetTriggerPlayer())]==false)then
set Gs=true
if(VH=="-pa")then
set X7F=O6
else
set X7F=not O6
endif
loop
if(KR8(DK8(X4F,X7F))and Y7[GetPlayerId(DK8(X4F,X7F))]==null)then
exitwhen true
endif
set X4F=X4F+1
exitwhen(X4F>5)
endloop
if((X4F<=5)and(DN8(O6)==null))then
if((Y7[GetPlayerId(DM8(O6))]==null)and(not oo[GetPlayerId(DM8(O6))]))then
if(O6)then
set RV4=DK8(X4F,X7F)
else
set RW4=DK8(X4F,X7F)
endif
if(not X4)then
call SetUnitOwner(h4[512+GetPlayerId(DM8(O6))],DN8(O6),false)
call SetUnitOwner(h4[512+GetPlayerId(DN8(O6))],DM8(O6),false)
if VH=="-pe" then
set nc=CreateUnitAtLoc(DM8(O6),'n00C',GetRectCenter(ZD),0)
set Vc=CreateUnitAtLoc(DM8(O6),'n00C',GetRectCenter(qr),0)
if not X4 then
call MO8(GetTriggerPlayer())
endif
endif
endif
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,"Pick a hero for "+W[GetPlayerId(DN8(O6))]+GetPlayerName(DN8(O6))+"|r. Type "+HS7+"-px|r to cancel.")
else
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,5.,"You should pick heroes for the AI before choosing your own hero. Randomized instead.")
call W3F(GetPlayerId(DK8(X4F,X7F)),0)
endif
elseif(DN8(O6)!=null)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,5.,"Already picking for "+W[GetPlayerId(DN8(O6))]+GetPlayerName(DN8(O6))+"|r")
endif
elseif(VH=="-px")then
if not X4 then
call MP8(GetTriggerPlayer())
endif
if(DN8(O6)!=null)then
call SetUnitOwner(h4[512+GetPlayerId(DM8(O6))],DM8(O6),false)
call SetUnitOwner(h4[512+GetPlayerId(DN8(O6))],DN8(O6),false)
call RemoveUnit(nc)
call RemoveUnit(Vc)
set nc=null
set Vc=null
if(O6)then
set RV4=null
else
set RW4=null
endif
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,5.,"Picking cancelled")
endif
elseif((not V)and((VH=="-pa")or(VH=="-pe")))then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,5.,"|c00888888Too early to pick a hero.|r")
endif
endfunction
function X8F takes nothing returns boolean
local integer O5=1
loop
exitwhen O5>5
if(KQ8(G8[O5])and(Y7[GetPlayerId(G8[O5])]==null))then
return true
elseif(KQ8(N8[O5])and(Y7[GetPlayerId(N8[O5])]==null))then
return true
endif
set O5=O5+1
endloop
return false
endfunction
function X9F takes nothing returns nothing
local integer O5=1
local boolean array XDF
local integer i
local integer j
if(Bz<68.)then
if(((D9)or(not Gs))and(Bz>43.))then
elseif(X8F()or Bz<30.)then
return
else
call Y07(1.)
endif
endif
call DestroyTrigger(GetTriggeringTrigger())
call DisableTrigger(RA4)
if(RV4!=null)then
call DisplayTimedTextToPlayer(RT4,0,0,5.,"Picking for AI has ended.")
call SetUnitOwner(h4[512+GetPlayerId(RT4)],RT4,false)
call SetUnitOwner(h4[512+GetPlayerId(RV4)],RV4,false)
call RemoveUnit(nc)
call RemoveUnit(Vc)
set nc=null
set Vc=null
set RV4=null
endif
if(RW4!=null)then
call DisplayTimedTextToPlayer(RU4,0,0,5.,"Picking for AI has ended.")
call SetUnitOwner(h4[512+GetPlayerId(RU4)],RU4,false)
call SetUnitOwner(h4[512+GetPlayerId(RW4)],RW4,false)
call RemoveUnit(nc)
call RemoveUnit(Vc)
set nc=null
set Vc=null
set RW4=null
endif
if((V4)or(O9)or(W4)or(HO4)or(OL4)or(Y9)or(SC4)or(TT4))then
return
endif
set O5=1
loop
exitwhen O5>5
if Y7[GetPlayerId(G8[O5])]!=null then
set XDF[YM7(GetUnitTypeId(Y7[GetPlayerId(G8[O5])]))]=true
endif
if Y7[GetPlayerId(N8[O5])]!=null then
set XDF[6+YM7(GetUnitTypeId(Y7[GetPlayerId(N8[O5])]))]=true
endif
set O5=O5+1
endloop
if HM4<=4 then
set XDF[GV7]=true
endif
if HM4<=3 then
if GetRandomInt(0,2)==0 then
set XDF[GW7]=true
else
set XDF[GX7]=true
endif
endif
if HM4<=2 then
if XDF[GW7]then
set XDF[GX7]=true
else
set XDF[GW7]=true
endif
endif
if HN4<=4 then
set XDF[6+GV7]=true
endif
if HN4<=3 then
if GetRandomInt(0,2)==0 then
set XDF[6+GW7]=true
else
set XDF[6+GX7]=true
endif
endif
if HN4<=2 then
if XDF[GW7]then
set XDF[6+GX7]=true
else
set XDF[6+GW7]=true
endif
endif
set O5=1
loop
exitwhen O5>5
if(KR8(G8[O5])and(Y7[GetPlayerId(G8[O5])]==null))then
set j=0
loop
exitwhen j>5
set i=GetRandomInt(1,5)
if XDF[i]then
set i=0
else
exitwhen true
endif
set j=j+1
endloop
if i==0 then
set i=5
loop
exitwhen(not XDF[i])or i==0
set i=i-1
endloop
endif
call W3F(GetPlayerId(G8[O5]),i)
if not(i==0 or YO7(GetUnitTypeId(Y7[GetPlayerId(G8[O5])]),i))then
set i=YM7(GetUnitTypeId(Y7[GetPlayerId(G8[O5])]))
endif
set XDF[i]=true
call SInt(GetHandleId(G8[O5]),"AI|Class",i)
call Y07(1.)
endif
if(KR8(N8[O5])and(Y7[GetPlayerId(N8[O5])]==null))then
set j=0
loop
exitwhen j>5
set i=GetRandomInt(1,5)
if XDF[6+i]then
set i=0
else
exitwhen true
endif
set j=j+1
endloop
if i==0 then
set i=5
loop
exitwhen(not XDF[6+i])or i==0
set i=i-1
endloop
endif
call W3F(GetPlayerId(N8[O5]),i)
if not(i==0 or YO7(GetUnitTypeId(Y7[GetPlayerId(N8[O5])]),i))then
set i=YM7(GetUnitTypeId(Y7[GetPlayerId(N8[O5])]))
endif
set XDF[6+i]=true
call SInt(GetHandleId(N8[O5]),"AI|Class",i)
call Y07(1.)
endif
set O5=O5+1
endloop
endfunction
function XEF takes unit it,integer XFF returns nothing
call SetPlayerAbilityAvailable(GetOwningPlayer(it),XFF,true)
call SelectHeroSkill(it,XFF)
endfunction
function XGF takes integer i1 returns boolean
return(((i1=='N016')or(i1=='N017')or(i1=='N02B')))
endfunction
function XHF takes integer i1 returns boolean
return((i1=='UC76')or(i1=='Ntin')or(i1=='U00P')or(i1=='Udre')or((i1=='Hblm')or(i1=='H06X')or(i1=='H06Y')or(i1=='H06W'))or(i1=='Huth')or(i1=='N01W')or(i1=='N00R')or(i1=='Nbrn')or(i1=='Ekee')or(i1=='U00A'))
endfunction
function XIF takes nothing returns nothing
local unit it=GetEnumUnit()
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer i1=GetUnitTypeId(it)
local integer XJF=0
local integer XKF=0
local integer XMF=0
local integer XNF=0
local integer kt=0
local integer UP
local player XOF=GetOwningPlayer(it)
local integer XPF=0
if(AV4[GetPlayerId(XOF)]==AX4)then
set XPF=1
elseif(AV4[GetPlayerId(XOF)]==AY4)then
set XPF=2
elseif(AV4[GetPlayerId(XOF)]==AZ4)then
set XPF=3
endif
loop
call TriggerSleepAction(.1)
set XMF=GetHeroSkillPoints(it)
exitwhen((XJF>10)or(XMF==0)or(XKF>25)or(not Z_7(it)))
set kt=GetHeroLevel(it)+1-XMF
if((kt<=14)and(XJF<7))then
set XNF=GetRandomInt(0,2)
else
set XNF=GetRandomInt(0,4)
endif
if(XJF==0)then
set XNF=0
if((kt==6)or(kt==11)or(kt==16))then
set XNF=3
elseif(kt>=15)then
set XNF=4
endif
endif
if(XNF==3)then
if((XHF(i1))and(kt<10))then
set XNF=GetRandomInt(0,1)
elseif((i1=='N01O')and(kt<14))then
set XNF=GetRandomInt(0,2)
endif
elseif(XJF==0)then
if((XHF(i1))and(kt==10))then
set XNF=3
elseif((i1=='N01O')and((kt==14)or(kt==15)))then
set XNF=3
endif
endif
if((XNF==2)and(kt<10))then
set XNF=GetRandomInt(0,1)
endif
if(((i1=='Hvsh')or(i1=='N01W'))and(XJF<2))then
if((kt==2)or(kt==5))then
set XNF=2
elseif(((kt==10)or(kt==12))and(XNF==2))then
set XNF=GetRandomInt(0,1)
endif
elseif(((i1=='UC01')or(i1=='Edem')or(i1=='EC45')or(i1=='U00P')or(i1=='Emns')or(i1=='HC92')or(i1=='N01V')or(i1=='N00B'))and(XJF<2))then
if(kt==1)then
set XNF=2
elseif((kt==10)and(XNF==2))then
set XNF=GetRandomInt(0,1)
endif
elseif((i1=='Udea')and(kt==2)and(XJF<3))then
set XNF=2
endif
if((i1=='E01A')and(XJF<3))then
if((kt<=16)and(XNF==2))then
set XNF=4
elseif(((kt==17)or(kt==18)or(kt==19)or(kt==20))and(XNF==4))then
set XNF=2
endif
elseif((i1=='Ubal')and(XJF<3))then
if((kt==1)or(kt==4)or(kt==8)or(kt==12))then
set XNF=0
elseif((kt==2)or(kt==5)or(kt==9)or(kt==13))then
set XNF=1
elseif((kt==3)or(kt==7)or(kt==10)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Ogrh')and(XJF<3))then
if((kt==1)or(kt==4)or(kt==6)or(kt==17))then
set XNF=2
elseif((kt==9)or(kt==11)or(kt==16))then
set XNF=3
elseif((kt==2)or(kt==3)or(kt==5)or(kt==7))then
set XNF=1
elseif((kt==10)or(kt==12)or(kt==13)or(kt==14))then
set XNF=0
else
set XNF=4
endif
elseif((i1=='U006')and(XJF<3))then
if((kt==2)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==1)or(kt==10)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==4)or(kt==8)or(kt==9)or(kt==12))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='H00I')and(XJF<3))then
if((kt==1)or(kt==6)or(kt==8)or(kt==12))then
set XNF=0
elseif((kt==2)or(kt==9)or(kt==11)or(kt==13))then
set XNF=2
elseif((kt==4)or(kt==5)or(kt==7)or(kt==14))then
set XNF=1
elseif kt==3 or kt==10 or kt==17 then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Hamg')and(XJF<3))then
if((kt==3)or(kt==12)or(kt==13)or(kt==14))then
set XNF=0
elseif((kt==1)or(kt==5)or(kt==8)or(kt==10))then
set XNF=1
elseif((kt==2)or(kt==4)or(kt==7)or(kt==9))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Ewar')and(XJF<3))then
if((kt==1)or(kt==5)or(kt==8)or(kt==10))then
set XNF=0
elseif((kt==2)or(kt==4)or(kt==7)or(kt==9))then
set XNF=1
elseif((kt==3)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='E004')and(XJF<3))then
if((kt==4)or(kt==12)or(kt==13)or(kt==14))then
set XNF=0
elseif((kt==2)or(kt==3)or(kt==5)or(kt==7))then
set XNF=1
elseif((kt==1)or(kt==8)or(kt==9)or(kt==10))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='NC00')and(XJF<3))then
if((kt==12)or(kt==13)or(kt==14)or(kt==15))then
set XNF=1
elseif((kt==17)or(kt==18)or(kt==19)or(kt==20))then
set XNF=2
elseif((kt<=12)and(XNF!=3)and(XNF!=0))then
set XNF=4
endif
elseif((i1=='UC91')and(XJF<3))then
if((kt==10)or(kt==11)or(kt==12)or(kt==13))then
set XNF=0
elseif((kt==2)or(kt==3)or(kt==5)or(kt==7))then
set XNF=1
elseif((kt==1)or(kt==4)or(kt==8)or(kt==9))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Huth')and(XJF<3))then
if kt==3 or kt==12 or kt==13 or kt==14 then
set XNF=0
elseif((kt==2)or(kt==4)or(kt==9)or(kt==10))then
set XNF=1
elseif((kt==1)or(kt==5)or(kt==7)or(kt==8))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='E005')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==10)or(kt==12)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==2)or(kt==4)or(kt==8)or(kt==9))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Opgh')and(XJF<3))then
if((kt==2)or(kt==12)or(kt==13)or(kt==14))then
set XNF=0
elseif((kt==4)or(kt==5)or(kt==7)or(kt==8))then
set XNF=1
elseif((kt==1)or(kt==3)or(kt==9)or(kt==10))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='O00P')and(XJF<3))then
if((kt==1)or(kt==4)or(kt==6)or(kt==8))then
set XNF=0
elseif((kt==10)or(kt==16)or(kt==17)or(kt==18))then
set XNF=1
elseif((kt==12)or(kt==23)or(kt==24)or(kt==25))then
set XNF=2
elseif((kt==11)or(kt==19)or(kt==20))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Hjai')and(XJF<3))then
if((kt==3)or(kt==5)or(kt==7)or(kt==9))then
set XNF=0
elseif((kt==2)or(kt==12)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==1)or(kt==4)or(kt==6)or(kt==8))then
set XNF=2
elseif((kt==10)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='EC57')and(XJF<3))then
if((kt==1)or(kt==12)or(kt==13)or(kt==14))then
set XNF=0
elseif((kt==2)or(kt==4)or(kt==6)or(kt==8))then
set XNF=1
elseif((kt==3)or(kt==5)or(kt==7)or(kt==9))then
set XNF=2
elseif((kt==10)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='N01A')and(XJF<3))then
if((kt==2)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==1)or(kt==12)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==4)or(kt==8)or(kt==9)or(kt==10))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='EC45')and(XJF<3))then
if((kt==3)or(kt==5)or(kt==7)or(kt==9))then
set XNF=0
elseif((kt==12)or(kt==13)or(kt==14)or(kt==15))then
set XNF=1
elseif((kt==1)or(kt==17)or(kt==18)or(kt==19))then
set XNF=2
elseif((kt==10)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif(((i1=='N01O')or(i1=='N013'))or((i1=='N014')or(i1=='N015'))and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==2)or(kt==4)or(kt==8)or(kt==10))then
set XNF=1
elseif((kt==17)or(kt==18)or(kt==19)or(kt==20))then
set XNF=2
elseif((kt==11)or(kt==12)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Hmbr')and(XJF<3))then
if((kt==3)or(kt==4)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==1)or(kt==12)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==2)or(kt==8)or(kt==9)or(kt==10))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Hlgr')or(i1=='H00F')or(i1=='H00E')or(i1=='H00G'))and(XJF<3)then
if((kt==2)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==1)or(kt==4)or(kt==7)or(kt==11))then
set XNF=1
elseif((kt==4)or(kt==8)or(kt==12)or(kt==13))then
set XNF=2
elseif((kt==6)or(kt==15)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif(((i1=='H00V')or(i1=='H08D')or(i1=='H08C')or(i1=='H084')or(i1=='H08B'))and(XJF<3))then
if((kt==4)or(kt==5)or(kt==12)or(kt==13))then
set XNF=0
elseif((kt==1)or(kt==3)or(kt==7)or(kt==9))then
set XNF=1
elseif((kt==17)or(kt==18)or(kt==19)or(kt==20))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='U00F')and(XJF<3))then
if((kt==2)or(kt==4)or(kt==7)or(kt==13))then
set XNF=0
elseif((kt==1)or(kt==3)or(kt==5)or(kt==12))then
set XNF=1
elseif((kt==8)or(kt==9)or(kt==10)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='H00K')and(XJF<3))then
if((kt==1)or(kt==4)or(kt==7)or(kt==9))then
set XNF=0
elseif((kt==3)or(kt==13)or(kt==15)or(kt==17))then
set XNF=1
elseif((kt==2)or(kt==18)or(kt==20)or(kt==22))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='N0HP')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==2)or(kt==4)or(kt==8)or(kt==9))then
set XNF=1
elseif((kt==12)or(kt==17)or(kt==18)or(kt==19))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='H00U')and(XJF<3))then
if((kt==4)or(kt==14)or(kt==15)or(kt==16)or(kt==18)or(kt==20)or(kt==21))then
set XNF=0
elseif((kt==6)or(kt==10)or(kt==19)or(kt==22)or(kt==23)or(kt==24)or(kt==25))then
set XNF=1
elseif((kt==1)or(kt==3)or(kt==5)or(kt==8)or(kt==9)or(kt==11)or(kt==13))then
set XNF=2
elseif((kt==2)or(kt==7)or(kt==12)or(kt==17))then
set XNF=3
endif
elseif(((i1=='H004')or(i1=='E02I'))and(XJF<3))then
if((kt==2)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==1)or(kt==4)or(kt==8)or(kt==9))then
set XNF=1
elseif((kt==10)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='H071')and(XJF<3))then
if((kt==3)or(kt==4)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==1)or(kt==8)or(kt==9)or(kt==10))then
set XNF=1
elseif((kt==2)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='E02F')and(XJF<3))then
if((kt==1)or(kt==12)or(kt==13)or(kt==14))then
set XNF=0
elseif((kt==2)or(kt==3)or(kt==5)or(kt==7))then
set XNF=1
elseif((kt==4)or(kt==8)or(kt==9)or(kt==10))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif(((i1=='H06S')or(i1=='H00D'))and(XJF<3))then
if((kt==2)or(kt==4)or(kt==8)or(kt==9))then
set XNF=0
elseif((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=1
elseif((kt==10)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Uktl')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==2)or(kt==4)or(kt==8)or(kt==9))then
set XNF=1
elseif((kt==10)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='H000')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==8)or(kt==9)or(kt==12)or(kt==14))then
set XNF=1
elseif((kt==2)or(kt==4)or(kt==10)or(kt==13))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Otch')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==4)or(kt==12)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==2)or(kt==8)or(kt==9)or(kt==10))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Harf')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==4)or(kt==8)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==2)or(kt==9)or(kt==10)or(kt==12))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Npbm')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==8)or(kt==9)or(kt==10)or(kt==12))then
set XNF=1
elseif((kt==13)or(kt==14)or(kt==15)or(kt==17))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='H001')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==8)or(kt==9)or(kt==10)or(kt==12))then
set XNF=1
elseif((kt==2)or(kt==13)or(kt==14)or(kt==15))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Ucrl')and(XJF<3))then
if((kt==2)or(kt==4)or(kt==6)or(kt==7))then
set XNF=0
elseif((kt==1)or(kt==3)or(kt==5)or(kt==8))then
set XNF=1
elseif((kt==10)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='O015')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==2)or(kt==4)or(kt==8)or(kt==9))then
set XNF=1
elseif((kt==10)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='EC77')and(XJF<3))then
if((kt==2)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==1)or(kt==4)or(kt==8)or(kt==9))then
set XNF=1
elseif((kt==10)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='H00Q')and(XJF<3))then
if((kt==9)or(kt==11)or(kt==12)or(kt==13))then
set XNF=0
elseif((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=1
elseif((kt==2)or(kt==4)or(kt==8)or(kt==10))then
set XNF=2
elseif((kt==6)or(kt==15)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='U00E')and(XJF<3))then
if((kt==2)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==1)or(kt==9)or(kt==10)or(kt==12))then
set XNF=1
elseif((kt==4)or(kt==8)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Nbrn')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==8)or(kt==10))then
set XNF=0
elseif((kt==5)or(kt==12)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==2)or(kt==4)or(kt==7)or(kt==9))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Naka')and(XJF<3))then
if((kt==2)or(kt==4)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==3)or(kt==8)or(kt==9)or(kt==10))then
set XNF=1
elseif((kt==1)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Usyl')and(XJF<3))then
if((kt==10)or(kt==12)or(kt==13)or(kt==14))then
set XNF=0
elseif((kt==2)or(kt==4)or(kt==7)or(kt==9))then
set XNF=1
elseif((kt==1)or(kt==3)or(kt==5)or(kt==8))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='N00R')and(XJF<3))then
if((kt==2)or(kt==4)or(kt==8)or(kt==10))then
set XNF=0
elseif((kt==1)or(kt==3)or(kt==7)or(kt==9))then
set XNF=1
elseif((kt==5)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='U00A')and(XJF<3))then
if((kt==1)or(kt==4)or(kt==6)or(kt==8))then
set XNF=0
elseif((kt==2)or(kt==3)or(kt==5)or(kt==7))then
set XNF=1
elseif((kt==12)or(kt==13)or(kt==14)or(kt==15))then
set XNF=2
elseif((kt==10)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Nbbc')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==10)or(kt==13)or(kt==15)or(kt==17))then
set XNF=1
elseif((kt==8)or(kt==9)or(kt==12)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='U00K')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==2)or(kt==8)or(kt==9)or(kt==10))then
set XNF=1
elseif((kt==4)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Oshd')and(XJF<3))then
if((kt==4)or(kt==8)or(kt==10)or(kt==13))then
set XNF=0
elseif((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=1
elseif((kt==2)or(kt==9)or(kt==12)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='H00N')and(XJF<3))then
if((kt==2)or(kt==6)or(kt==8)or(kt==10))then
set XNF=0
elseif((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=1
elseif((kt==4)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='UC76')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==10)or(kt==12)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==2)or(kt==4)or(kt==6)or(kt==8))then
set XNF=2
elseif((kt==9)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='U000')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==4)or(kt==8)or(kt==9)or(kt==10))then
set XNF=1
elseif((kt==2)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Hvwd')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==2)or(kt==4)or(kt==8)or(kt==9))then
set XNF=1
elseif((kt==10)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='E01B')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==4)or(kt==9)or(kt==12)or(kt==14))then
set XNF=1
elseif((kt==2)or(kt==8)or(kt==10)or(kt==13))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='UC11')and(XJF<3))then
if((kt==2)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==1)or(kt==8)or(kt==9)or(kt==10))then
set XNF=1
elseif((kt==4)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='UC60')and(XJF<3))then
if((kt==2)or(kt==8)or(kt==9)or(kt==10))then
set XNF=0
elseif((kt==1)or(kt==3)or(kt==4)or(kt==7))then
set XNF=1
elseif((kt==5)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif(((i1=='H00R')or(i1=='H07I'))and(XJF<3))then
if((kt==10)or(kt==12)or(kt==13)or(kt==14))then
set XNF=0
elseif((kt==1)or(kt==4)or(kt==8)or(kt==9))then
set XNF=1
elseif((kt==2)or(kt==3)or(kt==5)or(kt==7))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((((i1=='N016')or(i1=='N017')or(i1=='N02B')))and(XJF<3))then
if((kt==2)or(kt==4)or(kt==8)or(kt==12))then
set XNF=0
elseif((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=1
elseif((kt==9)or(kt==10)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='E02J')and(XJF<3))then
if((kt==3)or(kt==4)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==1)or(kt==12)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==2)or(kt==8)or(kt==9)or(kt==10))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='E002')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==10)or(kt==12)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==2)or(kt==4)or(kt==8)or(kt==9))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='U00C')and(XJF<3))then
if((kt==2)or(kt==12)or(kt==13)or(kt==14))then
set XNF=0
elseif((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=1
elseif((kt==4)or(kt==8)or(kt==9)or(kt==10))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='O00J')and(XJF<3))then
if((kt==4)or(kt==8)or(kt==9)or(kt==10))then
set XNF=0
elseif((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=1
elseif((kt==2)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Emoo')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==9)or(kt==12)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==2)or(kt==4)or(kt==8)or(kt==10))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='UC42')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==8)or(kt==9))then
set XNF=0
elseif((kt==10)or(kt==12)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==2)or(kt==4)or(kt==5)or(kt==7))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='E02X')and(XJF<3))then
if((kt==1)or(kt==4)or(kt==8)or(kt==9))then
set XNF=0
elseif((kt==2)or(kt==3)or(kt==5)or(kt==7))then
set XNF=1
elseif((kt==10)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif(((i1=='Eevi')or(i1=='Eevm')or(i1=='E02V')or(i1=='E02W')or(i1=='E02U'))and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=2
elseif((kt==4)or(kt==12)or(kt==13)or(kt==14))then
set XNF=0
elseif((kt==2)or(kt==8)or(kt==9)or(kt==10))then
set XNF=1
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='HC49')and(XJF<3))then
if((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=1
elseif((kt==2)or(kt==11)or(kt==12)or(kt==13))then
set XNF=0
elseif((kt==4)or(kt==8)or(kt==9)or(kt==10))then
set XNF=2
elseif((kt==6)or(kt==14)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='H00T')and(XJF<3))then
if((kt==2)or(kt==4)or(kt==8)or(kt==9))then
set XNF=0
elseif((kt==10)or(kt==12)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='H00S')and(XJF<3))then
if((kt==3)or(kt==12)or(kt==13)or(kt==14))then
set XNF=0
elseif((kt==1)or(kt==8)or(kt==9)or(kt==10))then
set XNF=1
elseif((kt==2)or(kt==4)or(kt==5)or(kt==7))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='O016')and(XJF<3))then
if((kt==2)or(kt==5)or(kt==8)or(kt==10))then
set XNF=0
elseif((kt==1)or(kt==4)or(kt==7)or(kt==9))then
set XNF=1
elseif((kt==3)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='E02H')and(XJF<3))then
if((kt==2)or(kt==12)or(kt==13)or(kt==14))then
set XNF=0
elseif((kt==3)or(kt==5)or(kt==8)or(kt==10))then
set XNF=1
elseif((kt==1)or(kt==4)or(kt==7)or(kt==9))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='E02N')and(XJF<3))then
if((kt==2)or(kt==5)or(kt==8)or(kt==10))then
set XNF=0
elseif((kt==1)or(kt==12)or(kt==14)or(kt==17))then
set XNF=1
elseif((kt==3)or(kt==4)or(kt==7)or(kt==9))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='O01F')and(XJF<3))then
if((kt==1)or(kt==19)or(kt==21)or(kt==23))then
set XNF=0
elseif((kt==2)or(kt==3)or(kt==5)or(kt==7))then
set XNF=1
elseif((kt==9)or(kt==11)or(kt==13)or(kt==16))then
set XNF=2
elseif((kt==6)or(kt==14)or(kt==17))then
set XNF=3
else
set XNF=4
endif
elseif(((i1=='N01I')or(i1=='N01H')or(i1=='N01T')or(i1=='N01J'))and(XJF<3))then
if((kt==4)or(kt==8)or(kt==9)or(kt==10))then
set XNF=0
elseif((kt==2)or(kt==3)or(kt==5)or(kt==7))then
set XNF=1
elseif((kt==1)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='E02K')and(XJF<3))then
if((kt==2)or(kt==5)or(kt==8)or(kt==12))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
elseif((kt==1)or(kt==4)or(kt==7)or(kt==10))then
set XNF=1
elseif((kt==3)or(kt==9)or(kt==13)or(kt==14))then
set XNF=0
else
set XNF=4
endif
elseif((i1=='H0DO')and(XJF<3))then
if((kt==3)or(kt==5)or(kt==9)or(kt==10))then
set XNF=2
elseif((kt==6)or(kt==14)or(kt==20))then
set XNF=3
elseif((kt==2)or(kt==11)or(kt==12)or(kt==13))then
set XNF=1
elseif((kt==1)or(kt==4)or(kt==7)or(kt==8))then
set XNF=0
else
set XNF=4
endif
elseif((i1=='E032')and(XJF<3))then
if((kt==2)or(kt==4)or(kt==8)or(kt==10))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
elseif((kt==3)or(kt==12)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==1)or(kt==5)or(kt==7)or(kt==9))then
set XNF=0
else
set XNF=4
endif
elseif((i1=='H008')and(XJF<3))then
if((kt==2)or(kt==9)or(kt==10)or(kt==12))then
set XNF=0
elseif((kt==1)or(kt==4)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==3)or(kt==5)or(kt==7)or(kt==8))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='Ekee')and(XJF<3))then
if((kt==2)or(kt==4)or(kt==8)or(kt==9))then
set XNF=0
elseif((kt==10)or(kt==11)or(kt==12)or(kt==13))then
set XNF=1
elseif((kt==1)or(kt==3)or(kt==5)or(kt==7))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif i1<'Nzzz' then
if(i1=='N0MD')and(XJF<3)then
if((kt==3)or(kt==8)or(kt==9)or(kt==10))then
set XNF=0
elseif((kt==1)or(kt==12)or(kt==13)or(kt==14))then
set XNF=1
elseif((kt==2)or(kt==4)or(kt==5)or(kt==7))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
elseif((i1=='N0M0')and(XJF<3))then
if((kt==2)or(kt==5)or(kt==8)or(kt==12))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
elseif((kt==1)or(kt==4)or(kt==7)or(kt==10))then
set XNF=1
elseif((kt==3)or(kt==9)or(kt==13)or(kt==14))then
set XNF=0
else
set XNF=4
endif
elseif(i1=='N0MU' or i1=='N0MW')and(XJF<3)then
if((kt==3)or(kt==4)or(kt==5)or(kt==7))then
set XNF=0
elseif((kt==2)or(kt==8)or(kt==9)or(kt==10))then
set XNF=1
elseif((kt==1)or(kt==12)or(kt==13)or(kt==14))then
set XNF=2
elseif((kt==6)or(kt==11)or(kt==16))then
set XNF=3
else
set XNF=4
endif
endif
endif
if(i1=='UC76')then
if(XNF==0)then
call XEF(it,kT(it))
elseif(XNF==1)then
call SelectHeroSkill(it,'A02C')
elseif(XNF==2)then
call XEF(it,kS(it))
elseif(XNF==3)then
call XEF(it,GK8(it))
endif
elseif(i1=='Hmkg')then
if(XNF==0)then
call XEF(it,GM8(it))
elseif(XNF==1)then
call XEF(it,GN8(it))
elseif(XNF==2)then
call XEF(it,GO8(it))
elseif(XNF==3)then
call SelectHeroSkill(it,'A088')
endif
else
if(XNF==0)then
call XEF(it,eY[128+O5])
if(i1=='Naka')then
set UP=GetUnitAbilityLevel(it,'A004')
if(UP<=2)then
set hq[272+O5]=I2R(75*UP)
else
set hq[272+O5]=I2R(15+(57*UP))
endif
endif
elseif(XNF==1)then
if(i1=='Nfir')then
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'A0FH',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'A0F0',true)
endif
call XEF(it,eY[144+O5])
if(i1=='Hamg')then
set UP=GetUnitAbilityLevel(it,'A1G7')
if(UP==1)then
set hq[272+O5]=85.
elseif(UP==2)then
set hq[272+O5]=70.
elseif(UP==3)then
set hq[272+O5]=55.
else
set hq[272+O5]=40.
endif
endif
elseif(XNF==2)then
if((i1=='N01O')or(i1=='N013'))or((i1=='N014')or(i1=='N015'))then
call SelectHeroSkill(it,'A1EG')
call SelectHeroSkill(it,'A1EI')
call SelectHeroSkill(it,'A1EH')
call SelectHeroSkill(it,'A1EE')
call SelectHeroSkill(it,'A1EF')
elseif(XGF(i1))then
call SelectHeroSkill(it,'Aamk')
else
call XEF(it,eY[160+O5])
endif
elseif(XNF==3)then
call XEF(it,eY[172+O5])
if(eY[188+O5]!=0)then
call XEF(it,eY[188+O5])
endif
if(i1=='Hjai')then
set UP=GetUnitAbilityLevel(it,'A03R')
if(UP==0)then
set UP=GetUnitAbilityLevel(it,'A0AV')
endif
if(UP<=2)then
set hq[272+O5]=I2R(200+('d'*UP))
else
set hq[272+O5]=600.
endif
elseif(i1=='Oshd')then
set hq[272+O5]=I2R(85+(GetUnitAbilityLevel(it,'A02Q')*135))
elseif(i1=='Orkn')then
set UP=GetUnitAbilityLevel(it,'A00H')
if(UP==0)then
set UP=GetUnitAbilityLevel(it,'A0A1')
endif
if(UP<=2)then
set hq[272+O5]=I2R(50+(150*UP))
else
set hq[272+O5]=610.
endif
elseif(i1=='EC77')then
set UP=GetUnitAbilityLevel(it,'A080')
if(UP==0)then
set UP=GetUnitAbilityLevel(it,'A1UZ')
set hq[272+O5]=125.
else
if(UP<=2)then
set hq[272+O5]=I2R('i'+(30*UP))
else
set hq[272+O5]=250.
endif
endif
elseif(i1=='O00J')then
set UP=GetUnitAbilityLevel(it,'A0G4')
if(UP>0)then
if(UP==1)then
set V74[64+O5]=400.
elseif(UP==2)then
set V74[64+O5]=550.
else
set V74[64+O5]=700.
endif
else
set UP=GetUnitAbilityLevel(it,'A1D8')
if(UP>0)then
if(UP==1)then
set V74[64+O5]=550.
elseif(UP==2)then
set V74[64+O5]=700.
else
set V74[64+O5]=850.
endif
endif
endif
endif
endif
endif
if(XNF==4)then
if((i1=='Nfir')or(i1=='O00P')or(i1=='N01O')or(i1=='N013')or(i1=='N014')or(i1=='N015')or((i1=='Hblm')or(i1=='H06X')or(i1=='H06Y')or(i1=='H06W'))or(i1=='H00K')or(i1=='E02F')or(i1=='O01F')or(i1=='E02X')or(i1=='H0BC')or(i1=='H06W')or(i1=='H06X')or(i1=='H06Y')or(i1=='O016')or(i1=='O017')or(i1=='UC60')or(i1=='UC42')or(i1=='O00P')or(i1=='H00R')or(i1=='H07I')or(i1=='N0MU')or(i1=='N0MW'))then
call SelectHeroSkill(it,'A0NR')
elseif((XGF(i1))and(kt>21))then
call XEF(it,eY[160+O5])
call SelectHeroSkill(it,'Aamk')
else
call SelectHeroSkill(it,'Aamk')
endif
endif
set XJF=XJF+1
set XKF=XKF+1
if(XMF!=GetHeroSkillPoints(it))then
set XJF=0
endif
endloop
if(i1=='UC76')then
set eY[336+O5]=kT(it)
set eY[368+O5]=kS(it)
set eY[172+O5]=GK8(it)
elseif(i1=='Hmkg')then
set eY[336+O5]=GM8(it)
set eY[352+O5]=GN8(it)
set eY[368+O5]=GO8(it)
endif
set it=null
set XOF=null
endfunction
function XQF takes unit it returns integer
local integer i1=GetUnitTypeId(it)
if((i1=='Hamg')or(i1=='U006')or(AR7(it,'tgrh'))or(AR7(it,'I001'))or(AR7(it,'oflg')))then
return 2
elseif((i1=='Hvsh')or(i1=='Naka')or(i1=='UC91')or(i1=='N01A'))then
return 1
endif
return 0
endfunction
function XRF takes unit it returns boolean
local integer O5=1
local integer UP
local integer XSF=0
local boolean J4=false
local boolean XTF=false
local integer Iz
loop
if(IsUnitAlly(it,G8[0]))then
set UP=GetPlayerId(G8[O5])
else
set UP=GetPlayerId(N8[O5])
endif
if((IsPlayerInForce(Player(UP),RX4))and(Y7[UP]!=null))then
set Iz=XQF(Y7[UP])
if(Iz==2)then
set XSF=XSF+1
set J4=true
elseif(Iz==1)then
set XSF=XSF+1
endif
set XTF=(XTF)or((Iz==0)and(AR7(Y7[UP],'tlum'))and(not AS7(Y7[UP])))
endif
set O5=O5+1
exitwhen O5>5
endloop
if((XTF)and(not AR7(Y7[UP],'tlum')))then
return false
endif
if(DI8(IsUnitAlly(it,G8[0]))==1)then
return((XSF==0)and(LBool(S44,G48(it)+"|G")))
else
return(((not J4)and(LBool(S44,G48(it)+"|G")))or(XSF<R2I(DI8(IsUnitAlly(it,G8[0]))/ 2)))
endif
endfunction
function XUF takes unit u returns boolean
local integer id=GetUnitTypeId(u)
return id=='Eevi' or id=='Eevm' or id=='E02V' or id=='E02W' or id=='E02U'
endfunction
function XVF takes unit AM7,item Y98 returns nothing
local unit u=AM7
local integer WP8=GetUnitTypeId(u)
local integer TS9=ZX7(Y98)
if IsUnitType(u,UNIT_TYPE_MELEE_ATTACKER)or IsUnitType(u,UNIT_TYPE_HERO)==false then
if TS9==sijiadizhiyan2 then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[sijiadizhiyan])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==yazhizhiren2 then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[yazhizhiren])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==yuandun2 then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[yuandun])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==qiongguidun2 then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[qiongguidun])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==xianfengdun2 then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[xianfengdun])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==ES4 then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[zuduzhiqiu])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==huanyingfu2 then
if XUF(u)==false then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[huanyingfu])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
elseif TS9==huanyingfu then
if XUF(u)then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[huanyingfu2])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
elseif TS9==XZ then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[UZ])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
else
if TS9==sijiadizhiyan then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[sijiadizhiyan2])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==yazhizhiren then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[yazhizhiren2])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==yuandun then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[yuandun2])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==qiongguidun then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[qiongguidun2])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==xianfengdun then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[xianfengdun2])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==zuduzhiqiu then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[ES4])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==huanyingfu then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[huanyingfu2])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==UZ then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[XZ])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
endif
set u=null
endfunction
function XWF takes unit AM7,item Y98 returns nothing
local unit u=AM7
local integer WP8=GetUnitTypeId(u)
local integer TS9=ZX7(Y98)
if IsUnitType(u,UNIT_TYPE_MELEE_ATTACKER)==false or IsUnitType(u,UNIT_TYPE_HERO)==false then
if TS9==sijiadizhiyan2 then
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=UnitAddItemById(u,BU[sijiadizhiyan])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==yazhizhiren2 then
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=UnitAddItemById(u,BU[yazhizhiren])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==yuandun2 then
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=UnitAddItemById(u,BU[yuandun])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==qiongguidun2 then
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=UnitAddItemById(u,BU[qiongguidun])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==xianfengdun2 then
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=UnitAddItemById(u,BU[xianfengdun])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==ES4 then
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=UnitAddItemById(u,BU[zuduzhiqiu])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==huanyingfu2 then
if XUF(u)==false then
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=UnitAddItemById(u,BU[huanyingfu])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
elseif TS9==XZ then
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=UnitAddItemById(u,BU[UZ])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
else
if TS9==sijiadizhiyan then
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=UnitAddItemById(u,BU[sijiadizhiyan2])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==yazhizhiren then
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=UnitAddItemById(u,BU[yazhizhiren2])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==yuandun then
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=UnitAddItemById(u,BU[yuandun2])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==qiongguidun then
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=UnitAddItemById(u,BU[qiongguidun2])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==xianfengdun then
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=UnitAddItemById(u,BU[xianfengdun2])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==zuduzhiqiu then
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=UnitAddItemById(u,BU[ES4])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==huanyingfu then
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=UnitAddItemById(u,BU[huanyingfu2])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TS9==UZ then
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=UnitAddItemById(u,BU[XZ])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
endif
set u=null
endfunction
function XXF takes unit AM7 returns nothing
local integer i=0
local item Y98
call DisableTrigger(GW4)
loop
exitwhen i>5
set Y98=UnitItemInSlot(AM7,i)
if Y98!=null then
call XWF(AM7,Y98)
endif
set i=i+1
endloop
call EnableTrigger(GW4)
set Y98=null
endfunction
function XYF takes unit S4 returns integer
local integer i=0
local integer n=0
local integer WG8=UnitInventorySize(S4)-1
loop
exitwhen i>WG8
if UnitItemInSlot(S4,i)==null then
set n=n+1
endif
set i=i+1
endloop
return n
endfunction
function XZF takes integer i1 returns boolean
return((i1==zhenshibaoshi or i1==OW)or i1==huifujiezhi or i1==yirenmianzhao or i1==zhiliaozhihuan or i1==xuwubaoshi or i1==jianrenqiu or(i1>=UY and i1<=EZ)or(i1==J0 or i1==N0))
endfunction
function XAF takes integer TS9 returns boolean
return TS9==ZA or TS9==BA or TS9==GB or TS9==QB
endfunction
function XBF takes integer i1 returns boolean
return((i1==minjiebianxie)or(i1==jinglingpixue)or(i1==jurenliliangyaodai)or(i1==fashichangpao)or(i1==yazhizhiren)or(i1==jiasushoutao)or(i1==gongjizhizhao)or(i1==duangun)or(i1==shanbihufu)or(i1==keledebishou)or(i1==jixianfaqiu)or(i1==suozijia))or((i1==JB or i1==QB)or(i1==mobang)or(i1==yirenmianzhao)or(i1==yuandun or i1==yuandun2)or(i1==huifujiezhi)or(i1==zhiliaozhihuan)or(i1==liulangfashidoupeng)or(i1==tieyitoukui)or(i1==siwangmianju)or(i1==nengliangzhiqiu)or(i1==suduzhixue)or(i1==zuduzhiqiu))
endfunction
function XCF takes integer O5,unit it returns boolean
local integer i=0
local integer i1=0
loop
exitwhen i>5
set i1=GetItemTypeId(UnitItemInSlot(it,i))
if i1==0 then
elseif(i1==BU[YB])or(i1==BU[GB])or(i1==BU[zhenshibaoshi])or(i1==BU[OW])then
return true
elseif(i1==LU[YB])or(i1==LU[GB])or(i1==LU[zhenshibaoshi])or(i1==LU[OW])then
return true
endif
set i1=GetItemTypeId(UnitItemInSlot(KR4[32+O5],i))
if i1==0 then
elseif(i1==BU[YB])or(i1==BU[GB])or(i1==BU[zhenshibaoshi])or(i1==BU[OW])then
return true
elseif(i1==LU[YB])or(i1==LU[GB])or(i1==LU[zhenshibaoshi])or(i1==LU[OW])then
return true
endif
set i=i+1
endloop
return false
endfunction
function X3F takes integer O5,unit it,item ZV7,integer i1,boolean X6F returns integer
set bj_forLoopAIndex=LInt('CItm',"Prio|"+I2S(GetHandleId(Y7[O5]))+I2S(i1))
if bj_forLoopAIndex!=0 then
return bj_forLoopAIndex
endif
if(i1==F1)or(i1==J0 or i1==N0 or i1==zhenshibaoshi or i1==OW)or(DV[i1]==DV[Agha])then
return'e'
elseif(ZV7!=null)and(GetItemPlayer(ZV7)!=Player(O5))and(i1!=OJ7[O5]and i1!=OJ7[16+O5])and(X6F or(TT9(i1)==false and XZF(i1)==false))then
return-1
elseif(not X6F)and(i1==OJ7[O5]or i1==OJ7[16+O5])and(IsUnitType(it,UNIT_TYPE_HERO))then
if(i1==WA)and(GetUnitState(it,UNIT_STATE_MAX_MANA)>500)then
return-1
elseif((i1==ZA)or(i1==BA))and(GetUnitState(it,UNIT_STATE_MAX_LIFE)>1000)then
return-1
endif
return 97
elseif(i1==fenzhengmiansha)or(i1==suiguchui or i1==suiguchui2)or(i1==renjia)or(i1==xuanwo or i1==leishenzhichui)or(i1>=sanshizhiren and i1<=sanshizhiren4)or(i1==fengkuangmianju)or(i1==sadanzhixieli)or(i1==euldeshenshengfazhang)or(i1==zhenhunshi)or(i1==sanyeduijian)or(i1==anmie)or(i1==kuangzhanfu)or(i1>=heihuangzhang and i1<=D1)or(i1==E1)or(i1==huanyingfu or i1==huanyingfu2)or(i1==luosazhifeng)or(i1>=dagongzhishenli and i1<=dagongzhishenli5)or(i1==silingshu or i1==silingshu2 or i1==silingshu3)or(i1==linkenfaqiu or i1==linkenfaqiu2)or(i1==dapao)or(i1==jingubang or i1==jingubang2)or(i1==huiyao or i1==huiyao2)or(i1==molongzhixin or i1==molongzhixin2)or(i1==sijiadizhiyan or i1==sijiadizhiyan2)or(i1==hudie)or(i1==shuaxinqiu)or(i1==xieeliandao)or(i1==jipin)or(i1==qiangxizhuangjia)or(i1==xuejingshi)or(i1==tiaozhantoujin)or(i1==bizhang or i1==bizhang2 or i1==bizhang3 or i1==bizhang4)or(i1==xiwadeshouhu or i1==xiwadshouhu2)or(i1==ziyuan)or(i1==yuanlifazhang)or(i1==dongchayandou)or(i1==youhunquanzhang)or(i1==xulingzhiren)or(i1==atuosizhigun)or(i1==tiantangzhiji)or(i1==shenyuanzhiren)then
return'd'
elseif(i1==keledebishou or i1==keledebishou2)or(i1==shuijingjian)or(i1==zhipeitoukui or i1==zhipeitoukui2)then
return 99
elseif(i1==jingmizhixie or i1==donglixie1 or i1==donglixie2 or i1==donglixie3 or i1==xiangweixie or i1==yuanxingxie or i1==jingmizhixie2 or i1==mifaxie)then
if OI7[304+O5]!=null and GetWidgetLife(OI7[304+O5])>0 and OK7[304+O5]!=i1 and IsUnitType(it,UNIT_TYPE_HERO)then
return-1
else
return'd'
endif
elseif(i1==suduzhixue)then
if OI7[304+O5]!=null and OK7[304+O5]!=i1 and IsUnitType(it,UNIT_TYPE_HERO)then
return-1
else
return 99
endif
elseif(i1==JB or i1==QB)then
if X6F or OM7[64+O5]then
return 1
else
return 98
endif
elseif(i1==maidasizhishou or i1==maidasizhishou2)then
return 98
elseif(i1==xianfengdun or i1==xianfengdun2)then
return 23
elseif(i1==zhenshibaoshi or i1==OW)then
if X6F then
return 2
else
return 22
endif
elseif(i1==FB)or(i1==GB)or(i1==YB)or(i1==EC)then
if X6F then
return 1
else
return 15
endif
elseif(i1==shengzheyiwu)then
return 21
elseif(i1==yingjiaogong)or(i1==ximeisitedelveduo)or(i1==shenmifazhang)then
return 20
elseif(i1==jianrenqiu)then
return 19
elseif(i1==meikensimu)or(i1==yingzhilingkan or i1==yingzhilingkan2)then
return 18
elseif(i1==yecha or i1==sanhua)then
return 17
elseif(i1==emodaofeng)or(i1==zhenfenbaoshi)or(i1==jixianfaqiu)then
return 16
elseif(i1==zhangu or i1==zhangu2)then
return 15
elseif(i1==liulangfashidoupeng)then
if(GetUnitState(it,UNIT_STATE_MAX_LIFE)>1500.)then
return 10
else
return 15
endif
elseif(i1>=UY and i1<=AY)then
return 14
elseif(i1==yongqixunzhang)then
return 13
elseif(i1==miyinchui)or(i1==biaoqiang)or(i1==shanbihufu)or(i1==kongmingzhang)then
return 12
elseif(i1==dajian)or(i1==banjia)then
return 11
elseif(i1==kuojian)or(i1==jingqizhiqiu)then
return 10
elseif(i1==nengliangzhiqiu)or(i1==huolizhiqiu)or(i1==zhiliaozhihuan)or(i1==xuwubaoshi)then
return 9
elseif(i1==mobang)or(i1==mozhang)or(i1==linghunzhijie)then
if(GetUnitState(it,UNIT_STATE_MAX_MANA)>500.)then
return 8
else
return 12
endif
elseif(i1==huanxinzhiren)or(i1==shirenmozhifu)or(i1==molifazhang)or(i1==tieyitoukui)or(i1==siwangmianju)or(i1==duangun)or(i1==tianyingzhijie or i1==tianyingzhijie2)then
return 9
elseif(i1==yazhizhiren)or(i1==shengdianzhihuan or i1==shengdianzhihuan2)or(i1==qiongguidun or i1==qiongguidun2)then
return 8
elseif(i1==zuduzhiqiu or i1==ES4)then
return 7
elseif(i1==huwan or i1==youlingxidai or i1==wuyongguajian)then
return 6
elseif(i1==huifutoujin)or(i1==xuanmingdunpai)then
return 5
elseif(i1==jiasushoutao)or(i1==jinglingpixue)or(i1==jurenliliangyaodai)or(i1==fashichangpao)or(i1==gongjizhizhao)or(i1==suozijia)then
return 4
elseif(i1==yazhizhiren2)or(i1==huifujiezhi)or(i1==yirenmianzhao)or(i1==yuandun or i1==yuandun2)then
return 3
elseif(i1==guizuyuanhuan)or(i1==liliangshoutao)or(i1==zhilidoupeng)or(i1==minjiebianxie)or(i1==shouhuzhihuan)then
return 2
elseif(i1==WA)or(i1==ZA)or(i1==BA)or(i1==RB)or(i1==VB)or(i1==B5)then
return 1
elseif(i1==tieshuzhigan)then
return 0
elseif(i1>=DH4 and i1<=EZ4)then
return-1
elseif(i1==UZ or i1==XZ)or(i1==YA)or(i1==WB)or(i1==LB)or(i1==W5)then
return-1
endif
return-1
endfunction
function XLF takes integer O5,unit it,boolean X1F returns integer
local integer i=0
local integer j=0
local item ZV7=null
loop
exitwhen i>5
set ZV7=UnitItemInSlot(it,i)
if ZV7==null then
set j=j+1
elseif X1F then
if(X3F(O5,it,ZV7,ZU7(ZV7),false)<99)then
set j=j+1
endif
endif
set i=i+1
endloop
set ZV7=null
return j
endfunction
function X0F takes integer O5,unit it,item ZV7,integer i1 returns boolean
if(IsItemPowerup(ZV7))then
if i1==0 then
set i1=ZU7(ZV7)
endif
set bj_lastCreatedItem=CreateItem(BU[i1],GetUnitX(it),GetUnitY(it))
call SetItemVisible(bj_lastCreatedItem,OW7)
call SetItemPlayer(bj_lastCreatedItem,Player(O5),false)
call SetItemCharges(bj_lastCreatedItem,GetItemCharges(ZV7))
call RemoveItem(ZV7)
set ZV7=bj_lastCreatedItem
endif
set F17=UnitAddItem(it,ZV7)
return F17
endfunction
function X5F takes nothing returns nothing
local item JB9=GetEnumItem()
local unit u=OF4
local player p=GetOwningPlayer(u)
local integer id=GetPlayerId(p)
if GetWidgetLife(JB9)>0 and GetItemPlayer(JB9)==p then
call SetItemPosition(JB9,KS4[id],KT4[id])
call SetItemVisible(JB9,OW7)
call X0F(id,KR4[id],JB9,0)
endif
set JB9=null
set u=null
set p=null
endfunction
function X2F takes nothing returns boolean
return IsChicken(GetFilterUnit())or IsBird(GetFilterUnit())
endfunction
function X_F takes integer O5 returns nothing
local integer i=0
local unit u=null
local item ZV7=null
call GroupEnumUnitsInRange(H8,GetUnitX(KR4[32+O5]),GetUnitY(KR4[32+O5]),1300,Condition(function X2F))
loop
set u=FirstOfGroup(H8)
exitwhen u==null
call GroupRemoveUnit(H8,u)
set i=0
loop
exitwhen i>5
set ZV7=UnitItemInSlot(u,i)
if ZV7!=null and GetItemPlayer(ZV7)==Player(O5)then
call UnitRemoveItem(u,ZV7)
call SetItemPosition(ZV7,KS4[O5],KT4[O5])
if not UnitAddItem(KR4[32+O5],ZV7)then
call SetItemVisible(ZV7,OW7)
endif
endif
set i=i+1
endloop
endloop
set OF4=KR4[32+O5]
if IsPlayerAlly(Player(O5),G8[0])then
call EnumItemsInRect(BD,Condition(function KF8),function X5F)
else
call EnumItemsInRect(LD,Condition(function KF8),function X5F)
endif
set u=null
set ZV7=null
endfunction
function Y4F takes integer O5,integer j returns nothing
local integer i
set i=0
loop
exitwhen i>23
if OI7[O5*24+i]!=null then
call SetItemUserData(OI7[O5*24+i],j)
endif
set i=i+1
endloop
endfunction
function Y7F takes nothing returns nothing
local integer i
local integer j
local integer i1
local unit it=P87
local integer O5=P97
if it==null then
set it=Y7[O5]
endif
if(D)then
set i=0
set FC7="aiReinitA "
loop
exitwhen i>OJ7[128+O5]
if OI7[O5*24+i]!=null then
set FC7=FC7+XP7(i)+GetItemName(OI7[O5*24+i])+"# "
endif
set i=i+1
endloop
endif
set i=12
set j=XLF(O5,KR4[32+O5],false)
set eY[512+O5]=1
loop
exitwhen(i>=OJ7[128+O5])or(j<=0)
if(OI7[O5*24+i]!=null)then
if(GetWidgetLife(OI7[O5*24+i])>0)and(not IsItemOwned(OI7[O5*24+i]))then
call X0F(O5,KR4[32+O5],OI7[O5*24+i],OK7[O5*24+i])
set j=j-1
endif
set OI7[O5*24+i]=null
endif
set i=i+1
endloop
set i=0
loop
exitwhen i>5
set OI7[O5*24+i]=UnitItemInSlot(it,i)
set OK7[O5*24+i]=ZU7(OI7[O5*24+i])
if(OI7[304+O5]==null or GetWidgetLife(OI7[304+O5])<=0 or OK7[O5*24+i]==jingmizhixie)and(OK7[O5*24+i]==suduzhixue or OK7[O5*24+i]==donglixie1 or OK7[O5*24+i]==donglixie2 or OK7[O5*24+i]==donglixie3 or OK7[O5*24+i]==xiangweixie or OK7[O5*24+i]==jingmizhixie or OK7[O5*24+i]==jingmizhixie2 or OK7[O5*24+i]==mifaxie or OK7[O5*24+i]==jingmizhixie)and(IsUnitType(it,UNIT_TYPE_HERO))then
set OI7[304+O5]=OI7[O5*24+i]
set OK7[304+O5]=OK7[O5*24+i]
endif
set OI7[O5*24+6+i]=UnitItemInSlot(KR4[32+O5],i)
set OK7[O5*24+6+i]=ZU7(OI7[O5*24+6+i])
set i=i+1
endloop
set i=12
set j=12
loop
exitwhen i>23
if OI7[O5*24+i]!=null then
if i!=j then
set OI7[O5*24+j]=OI7[O5*24+i]
set OK7[O5*24+j]=OK7[O5*24+i]
set OI7[O5*24+i]=null
endif
set j=j+1
endif
set i=i+1
endloop
if j<12 then
set OJ7[128+O5]=12
else
set OJ7[128+O5]=j
endif
set it=null
endfunction
function Y8F takes integer O5,unit it returns nothing
set P87=it
set P97=O5
call ExecuteFunc("Y7F")
endfunction
function Y9F takes integer O5 returns integer
local integer i=0
local integer j=6
call Y8F(O5,Y7[O5])
loop
exitwhen(i>=OJ7[128+O5])
if(OI7[O5*24+i]!=null)and(GetWidgetLife(OI7[O5*24+i])>0)and(X3F(O5,Y7[O5],OI7[O5*24+i],OK7[O5*24+i],false)>=99)then
set j=j-1
endif
set i=i+1
endloop
return j
endfunction
function YDF takes unit it,integer i1 returns boolean
return((i1==xuanwo or i1==leishenzhichui)or(i1>=sanshizhiren and i1<=sanshizhiren4)or(i1==zhipeitoukui or i1==zhipeitoukui2)or(i1==fengkuangmianju)or(i1==sadanzhixieli)or(i1==anmie)or((i1==sijiadizhiyan or i1==sijiadizhiyan2)and IsUnitType(it,UNIT_TYPE_MELEE_ATTACKER))or(i1==yazhizhiren or i1==yazhizhiren2))
endfunction
function YEF takes unit it,integer i1 returns boolean
return((i1>=sanshizhiren and i1<=sanshizhiren4)or(i1==anmie)or(i1==sijiadizhiyan or i1==sijiadizhiyan2)or(i1==zuduzhiqiu or i1==ES4))
endfunction
function YFF takes integer O5,unit it,integer i1 returns boolean
local boolean YGF=YDF(it,i1)
local boolean YHF=YEF(it,i1)
local integer i=GetUnitTypeId(it)
if(i=='EC77')or(i=='E004')or(i=='U00P')or(i=='Nbrn')or(i=='Emoo')or(i=='N01A')or(i=='H00Q')or(i=='U006' or i=='U00K' or i=='Huth')then
return(not(YGF or YHF))
elseif(i=='Edem' or i=='Ubal')then
return(not(YGF))
elseif(i=='Udea' or i=='H00I')then
return(not(YHF))
elseif(OM7[16+O5]and YGF)then
return false
elseif(OM7[32+O5]and YHF)then
return false
elseif(i1==yazhizhiren or i1==yazhizhiren2)and(i=='H06S')then
return false
elseif YGF and LBool('CItm',"Orb|"+I2S(GetHandleId(it)))then
return false
elseif YHF and LBool('CItm',"Buff|"+I2S(GetHandleId(it)))then
return false
endif
return true
endfunction
function YIF takes integer i1 returns boolean
return((i1==fenzhengmiansha)or(i1==silingshu or i1==silingshu2 or i1==silingshu3)or(i1==huiyao or i1==huiyao2)or(i1==jipin)or(i1==qiangxizhuangjia)or(i1==xiwadeshouhu or i1==xiwadshouhu2)or(i1==dongchayandou)or(i1==meikensimu)or(i1==yingzhilingkan or i1==yingzhilingkan2))
endfunction
function YJF takes integer i1 returns boolean
return((i1==kuangzhanfu))
endfunction
function YKF takes integer O5,integer i1 returns boolean
if(i1==xianfengdun or i1==xianfengdun2)then
return true
elseif(i1==FB)or(i1==GB)or(i1==zhenshibaoshi or i1==OW)or(i1==JB or i1==QB)or(i1==YB)or(i1==EC)or(i1==WA)or(i1==ZA)or(i1==BA)or(i1==RB)or(i1==VB)or(i1==B5)then
if(i1==OJ7[O5]or i1==OJ7[16+O5])then
else
return true
endif
elseif(i1==maidasizhishou or i1==maidasizhishou2)or(i1==meikensimu)or(i1==yingzhilingkan or i1==yingzhilingkan2)then
return true
elseif(i1==zhangu or i1==zhangu2)then
return true
elseif(i1>=UY and i1<=AY)then
return true
elseif(i1==yongqixunzhang)then
return true
elseif(i1==mobang)or(i1==mozhang)or(i1==linghunzhijie)then
return true
elseif(i1==yazhizhiren or i1==yazhizhiren2)or(i1==qiongguidun or i1==qiongguidun2)then
return true
elseif(i1==huwan or i1==youlingxidai or i1==wuyongguajian)then
return true
endif
return false
endfunction
function YMF takes unit it,boolean YNF returns unit
local integer O5=GetPlayerId(GetOwningPlayer(it))
local unit u
if(not OM7['p'+O5])then
return null
endif
set u=LUnit(GetHandleId(Player(O5)),"MyBear")
if YNF then
if(u==null or GetUnitState(u,UNIT_STATE_LIFE)<=0)then
call SelectHeroSkill(it,'A0A5')
call Y07(.1)
if IssueImmediateOrderById(it,852594)then
call Y07(1.)
set u=LUnit(GetHandleId(Player(O5)),"MyBear")
endif
elseif GetUnitTypeId(u)!='n004' then
call SetUnitX(u,GetUnitX(it))
call SetUnitY(u,GetUnitY(it))
endif
call IssueTargetOrderById(u,851986,it)
endif
if(u==null or GetUnitState(u,UNIT_STATE_LIFE)<=0)then
set u=LUnit(GetHandleId(Player(O5)),"BearItemHolder")
if u==null then
if IsJWPlayer(GetOwningPlayer(it))then
set u=CreateUnit(Player(O5),'e01F',-6390,-5615,0)
else
set u=CreateUnit(Player(O5),'e01F',5875,5000,0)
endif
call SUnit(GetHandleId(Player(O5)),"BearItemHolder",u)
endif
endif
set bj_lastReplacedUnit=u
set u=null
return bj_lastReplacedUnit
endfunction
function YOF takes integer O5,unit it,boolean YPF returns unit
local unit Y47
local unit u
if(not OM7['p'+O5])then
return null
endif
set Y47=LUnit(GetHandleId(Player(O5)),"aiBearDummy")
if(Y47==null)then
if IsJWPlayer(GetOwningPlayer(it))then
set Y47=CreateUnit(Player(O5),'e01F',-6390,-5615,0)
else
set Y47=CreateUnit(Player(O5),'e01F',5875,5000,0)
endif
call SUnit(GetHandleId(Player(O5)),"aiBearDummy",Y47)
call ShowUnit(Y47,true)
endif
if not(OM7[48+O5])then
set u=YMF(it,YPF)
if not(u==null or GetUnitState(u,UNIT_STATE_LIFE)<=0)then
call SetUnitPosition(Y47,GetUnitX(u),GetUnitY(u))
endif
endif
set bj_lastReplacedUnit=Y47
set u=null
set Y47=null
return bj_lastReplacedUnit
endfunction
function YQF takes integer O5,unit it returns nothing
local unit u=YMF(it,false)
local item ZV7
local integer i=0
if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>0 then
loop
exitwhen i>5
set bj_lastCreatedItem=UnitItemInSlot(it,i)
if bj_lastCreatedItem!=null then
set ZV7=UnitItemInSlot(u,i)
if ZV7==null or GetItemTypeId(bj_lastCreatedItem)!=GetItemTypeId(ZV7)then
call RemoveItem(ZV7)
set ZV7=CreateItem(GetItemTypeId(bj_lastCreatedItem),GetUnitX(u),GetUnitY(u))
call SetItemVisible(ZV7,OW7)
call SetItemPlayer(ZV7,Player(O5),false)
call SetItemCharges(ZV7,GetItemCharges(bj_lastCreatedItem))
call SetItemUserData(ZV7,0)
call UnitAddItem(u,ZV7)
endif
else
call RemoveItem(UnitItemInSlot(u,i))
endif
set i=i+1
endloop
endif
set u=null
set ZV7=null
endfunction
function YRF takes integer O5,unit it returns nothing
local unit u
local integer i=0
if(not OM7[192+O5])or(OM7[48+O5])then
return
endif
if(it!=null)then
if GetUnitTypeId(it)=='e01F' then
set u=LUnit(GetHandleId(Player(O5)),"MyBear")
if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>0 then
call SetUnitPosition(it,GetUnitX(u),GetUnitY(u))
endif
endif
else
set u=LUnit(GetHandleId(Player(O5)),"aiBearDummy")
if IsJWPlayer(Player(O5))then
call SetUnitPosition(u,-6390,-5615)
else
call SetUnitPosition(u,5875,5000)
endif
call YQF(O5,u)
endif
set u=null
endfunction
function YSF takes integer O5,boolean YTF,boolean YUF returns integer
local integer i=999
local integer YVF=5
local integer j=0
local integer YX7=0
local integer YWF=0
local integer i1
if not YTF then
set YVF=23
endif
loop
exitwhen(j>YVF)
if(OI7[O5*24+j]!=null)then
if(OK7[O5*24+j]==mozhang and OJ7[144+O5]!=OS7)then
else
set YWF=X3F(O5,Y7[O5],OI7[O5*24+j],OK7[O5*24+j],false)
if(YWF<=i)and(YWF!=-1)and(YWF<99)and(not LBool('CItm',"NoSell|"+I2S(GetHandleId(Y7[O5]))+I2S(OK7[O5*24+j])))and(LoadInteger(FY7,OJ7[224+O5],GetHandleId(OI7[O5*24+j]))==0)and(not LoadBoolean(FY7,OJ7[256+O5],GetHandleId(OI7[O5*24+j])))then
set i=YWF
set YX7=j
endif
endif
endif
set j=j+1
endloop
if i<99 and((not YUF)or(YKF(O5,OK7[O5*24+YX7])))then
return YX7
endif
return-1
endfunction
function YXF takes integer O5,boolean YYF returns integer
local integer i=0
local integer j=0
local integer k=0
local item ZV7=null
loop
exitwhen i>23
set ZV7=OI7[O5*24+i]
set k=OK7[O5*24+i]
if ZV7==null or(GetWidgetLife(ZV7)<=0)then
set ZV7=null
set k=0
if i<=5 then
set ZV7=UnitItemInSlot(Y7[O5],i)
elseif i<=11 then
set ZV7=UnitItemInSlot(KR4[32+O5],i-6)
endif
endif
if(ZV7!=null)and(YYF or(not TT9(k)))and(LoadInteger(FY7,OJ7[224+O5],GetHandleId(OI7[O5*24+i]))==0)and(not LoadBoolean(FY7,OJ7[256+O5],GetHandleId(OI7[O5*24+i])))then
set j=j+1
endif
set i=i+1
endloop
set ZV7=null
return j
endfunction
function YZF takes integer O5,unit it returns integer
local integer i=0
local integer YVF=0
local integer j=0
local integer YX7=999
local item ZV7
loop
exitwhen i>5
set ZV7=UnitItemInSlot(it,i)
if ZV7!=null then
set j=X3F(O5,null,null,ZU7(ZV7),false)
if j<99 and j<YX7 then
set YX7=j
set YVF=i
endif
else
set bj_lastCreatedItem=null
set bj_forLoopBIndexEnd=-2
set ZV7=null
return i
endif
set i=i+1
endloop
set ZV7=null
if YX7<999 then
set bj_lastCreatedItem=UnitItemInSlot(it,YVF)
set bj_forLoopBIndexEnd=YX7
return YVF
endif
return-1
endfunction
function YAF takes integer O5,unit it returns boolean
local boolean L37=false
local boolean J4
set bj_lastCreatedItem=null
if(OJ7[O5]!=0)and(X3F(O5,it,null,OJ7[O5],true)>X3F(O5,it,null,OJ7[16+O5],true))then
return AR7(it,BU[OJ7[O5]])
elseif(OJ7[16+O5]!=0)then
return AR7(it,BU[OJ7[16+O5]])
endif
return false
endfunction
function YBF takes integer O5,unit it,integer i1,item ZV7,boolean YCF,boolean Y3F,boolean Y6F returns integer
local integer i
local integer YVF=X3F(O5,it,ZV7,i1,false)
local integer j=0
local integer YX7=0
local integer k=0
local integer YWF=0
local item YLF=null
local boolean L37=false
set YWF=0
set i=999
set F27=null
loop
exitwhen(j>5)
set YLF=OI7[O5*24+j+k]
if GetWidgetLife(YLF)<=0 then
set YLF=null
endif
if(YLF!=null)then
if(UnitHasItem(it,YLF))then
set YWF=X3F(O5,Y7[O5],YLF,OK7[O5*24+j+k],(not Y3F))
if(YWF<=i)then
set i=YWF
set F27=YLF
set YX7=j+k
endif
endif
else
if UnitItemInSlot(it,j+k)==null then
set YX7=j+k
set F27=null
set YCF=true
exitwhen true
endif
endif
set j=j+1
endloop
set YLF=null
if(YVF>i)or YCF then
set YVF=GetItemTypeId(ZV7)
set YLF=F27
if YLF!=null then
set OI7[O5*24+OJ7[128+O5]]=YLF
set OK7[O5*24+OJ7[128+O5]]=ZU7(YLF)
set OJ7[128+O5]=OJ7[128+O5]+1
set OI7[O5*24+YX7]=null
endif
call YRF(O5,it)
if YLF!=null then
call UnitRemoveItem(it,YLF)
call SetItemPosition(YLF,GetUnitX(KR4[32+O5]),GetUnitY(KR4[32+O5]))
call SetItemVisible(YLF,OW7)
if not IsUnitType(it,UNIT_TYPE_HERO)then
call SaveBoolean(FY7,OJ7[256+O5],GetHandleId(YLF),true)
endif
endif
call UnitAddItem(it,ZV7)
set L37=true
if false and(not Y6F)then
if(YVF!=AU[i1])and((i1!=OW)and(i1!=maidasizhishou2)and(i1!=zhipeitoukui2)and(i1!=bizhang3 and i1!=bizhang4)and(i1!=xiwadshouhu2)and(not TT9(i1)))then
call UnitAddItem(it,ZV7)
set L37=true
else
set Y6F=true
endif
endif
if false and Y6F then
if YVF!=AU[i1]then
set bj_lastCreatedItem=CreateItem(AU[i1],GetUnitX(it),GetUnitY(it))
call SetItemVisible(bj_lastCreatedItem,OW7)
call SetItemPlayer(bj_lastCreatedItem,Player(O5),false)
call SetItemCharges(bj_lastCreatedItem,GetItemCharges(ZV7))
call RemoveItem(ZV7)
set ZV7=bj_lastCreatedItem
endif
set eY[512+O5]=0
call UnitAddItem(it,ZV7)
loop
exitwhen eY[512+O5]!=0
call TriggerSleepAction(.1)
endloop
if not IsUnitType(it,UNIT_TYPE_HERO)then
call SaveBoolean(FY7,OJ7[256+O5],GetHandleId(OI7[288+O5]),true)
endif
if(eY[512+O5]==1)then
set L37=true
elseif(eY[512+O5]==2)or(eY[512+O5]==3)then
loop
if eY[512+O5]==3 then
set ZV7=OI7[288+O5]
exitwhen true
endif
call TriggerSleepAction(.1)
endloop
endif
endif
if(OJ7[128+O5]>23)then
if E then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,'x',"|c009090ffAI BUFFER ITEM FAILURE: Overload.|r")
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,'x',"|c009090ffError: "+GetItemName(ZV7)+" on "+I2S(O5)+"'s "+GetUnitName(it)+"|r")
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,'x'," ")
endif
endif
endif
if L37 then
return YX7
else
set bj_forLoopAIndex=GetItemUserData(ZV7)
call SetItemPosition(ZV7,GetUnitX(KR4[32+O5]),GetUnitY(KR4[32+O5]))
call SetItemUserData(ZV7,bj_forLoopAIndex)
call SetItemVisible(ZV7,OW7)
set OI7[O5*24+OJ7[128+O5]]=ZV7
set OK7[O5*24+OJ7[128+O5]]=ZU7(ZV7)
set OJ7[128+O5]=OJ7[128+O5]+1
endif
return-1
endfunction
function Y1F takes integer O5,unit it,item ZV7,integer i1 returns nothing
if TT9(i1)then
call SetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD)+(GetItemCharges(ZV7)/ TV9(i1))*(G14[i1]/ 2))
else
call SetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD)+G14[i1]/ 2)
endif
call ZT7(ZV7)
call DestroyEffect(AddSpecialEffectTarget("UI\\Feedback\\GoldCredit\\GoldCredit.mdl",it,"overhead"))
endfunction
function Y0F takes integer O5,integer TS9 returns integer
if IsUnitType(Y7[O5],UNIT_TYPE_MELEE_ATTACKER)or IsUnitType(Y7[O5],UNIT_TYPE_HERO)==false then
if TS9==sijiadizhiyan2 then
return sijiadizhiyan
elseif TS9==yazhizhiren2 then
return yazhizhiren
elseif TS9==yuandun2 then
return yuandun
elseif TS9==qiongguidun2 then
return qiongguidun
elseif TS9==xianfengdun2 then
return xianfengdun
elseif TS9==ES4 then
return zuduzhiqiu
elseif TS9==huanyingfu2 then
if XUF(Y7[O5])==false then
return huanyingfu
endif
elseif TS9==huanyingfu then
if XUF(Y7[O5])then
return huanyingfu2
endif
elseif TS9==XZ then
return UZ
endif
else
if TS9==sijiadizhiyan then
return sijiadizhiyan2
elseif TS9==yazhizhiren then
return yazhizhiren2
elseif TS9==yuandun then
return yuandun2
elseif TS9==qiongguidun then
return qiongguidun2
elseif TS9==xianfengdun then
return xianfengdun2
elseif TS9==zuduzhiqiu then
return ES4
elseif TS9==huanyingfu then
return huanyingfu2
elseif TS9==UZ then
return XZ
endif
endif
return TS9
endfunction
function Y5F takes player VR7,unit Y47,integer Y2F,integer Y_F,integer B8D,integer B9D,integer BDD,integer Z4F,integer Z7F returns nothing
local item Y98
call DisableTrigger(T34)
if Y_F>0 then
set Y98=UnitItemInSlot(Y47,0)
call RemoveItem(Y98)
endif
if B8D>0 then
set Y98=UnitItemInSlot(Y47,1)
call RemoveItem(Y98)
endif
if B9D>0 then
set Y98=UnitItemInSlot(Y47,2)
call RemoveItem(Y98)
endif
if BDD>0 then
set Y98=UnitItemInSlot(Y47,3)
call RemoveItem(Y98)
endif
if Z4F>0 then
set Y98=UnitItemInSlot(Y47,4)
call RemoveItem(Y98)
endif
if Z7F>0 then
set Y98=UnitItemInSlot(Y47,5)
call RemoveItem(Y98)
endif
set Y2F=Y0F(GetPlayerId(VR7),Y2F)
set OO7=Y2F
set ON7=VR7
set Y98=UnitAddItemById(Y47,BU[Y2F])
call SetItemPlayer(Y98,VR7,true)
call SetItemUserData(Y98,1)
if IsPlayerInForce(VR7,RX4)and(Y47==LUnit(GetHandleId(VR7),"aiBearDummy"))then
set PD7=LUnit(GetHandleId(VR7),"MyBear")
if PD7!=null and GetUnitState(PD7,UNIT_STATE_LIFE)>0 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",PD7,"origin"))
endif
else
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",Y47,"origin"))
endif
if ZU7(Y98)==xuejingshi then
call SetItemCharges(Y98,8)
endif
call EnableTrigger(T34)
if IsPlayerAlly(GetLocalPlayer(),VR7)then
if Y2F==meikensimu then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,W[GetPlayerId(VR7)]+(KW4[GetPlayerId((VR7))])+"|r |c00ffff00"+GetObjectName('n0LX')+"|r")
elseif Y2F==J0 then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,W[GetPlayerId(VR7)]+(KW4[GetPlayerId((VR7))])+"|r |c00ffff00"+GetObjectName('n0LY')+"|r")
endif
endif
set OI7[288+GetPlayerId(VR7)]=Y98
set Y98=null
endfunction
function Z8F takes player p,unit it,integer i1,integer Z9F returns boolean
local integer i
local integer x
local integer y
local integer array ZDF
local boolean array ZEF
local integer array ZFF
local boolean array ZGF
local boolean array ZHF
local integer array ZIF
local player ZJF
local integer k
local player array ZKF
local integer m
local item ZMF
local item ZNF
local item ZOF
local item ZPF
local item ZQF
local item ZRF
local player ZSF
local player ZTF
local player ZUF
local player ZVF
local player ZWF
local player ZXF
local integer ZYF
local integer ZZF
local integer ZAF
local integer ZBF
local integer ZCF
local integer Z3F
local integer Z6F
local integer ZLF
local integer Z1F
local integer Z0F
local integer Z5F
local integer Z2F
local boolean Z_F=true
set ZMF=UnitItemInSlot(it,0)
set ZNF=UnitItemInSlot(it,1)
set ZOF=UnitItemInSlot(it,2)
set ZPF=UnitItemInSlot(it,3)
set ZQF=UnitItemInSlot(it,4)
set ZRF=UnitItemInSlot(it,5)
set ZSF=GetItemPlayer(ZMF)
set ZTF=GetItemPlayer(ZNF)
set ZUF=GetItemPlayer(ZOF)
set ZVF=GetItemPlayer(ZPF)
set ZWF=GetItemPlayer(ZQF)
set ZXF=GetItemPlayer(ZRF)
set ZYF=GetItemUserData(ZMF)
set ZZF=GetItemUserData(ZNF)
set ZAF=GetItemUserData(ZOF)
set ZBF=GetItemUserData(ZPF)
set ZCF=GetItemUserData(ZQF)
set Z3F=GetItemUserData(ZRF)
set Z6F=ZU7(ZMF)
set ZLF=ZU7(ZNF)
set Z1F=ZU7(ZOF)
set Z0F=ZU7(ZPF)
set Z5F=ZU7(ZQF)
set Z2F=ZU7(ZRF)
set ZKF[1]=p
set i=0
if ZMF!=null and ZYF==1 and(ZSF==p or PI4 or(GetPlayerSlotState((ZSF))==PLAYER_SLOT_STATE_LEFT))then
set ZDF[i+1]=Z6F
else
set ZDF[i+1]=0
endif
set i=1
if ZNF!=null and ZZF==1 and(ZTF==p or PI4 or(GetPlayerSlotState((ZTF))==PLAYER_SLOT_STATE_LEFT))then
set ZDF[i+1]=ZLF
else
set ZDF[i+1]=0
endif
set i=2
if ZOF!=null and ZAF==1 and(ZUF==p or PI4 or(GetPlayerSlotState((ZUF))==PLAYER_SLOT_STATE_LEFT))then
set ZDF[i+1]=Z1F
else
set ZDF[i+1]=0
endif
set i=3
if ZPF!=null and ZBF==1 and(ZVF==p or PI4 or(GetPlayerSlotState((ZVF))==PLAYER_SLOT_STATE_LEFT))then
set ZDF[i+1]=Z0F
else
set ZDF[i+1]=0
endif
set i=4
if ZQF!=null and ZCF==1 and(ZWF==p or PI4 or(GetPlayerSlotState((ZWF))==PLAYER_SLOT_STATE_LEFT))then
set ZDF[i+1]=Z5F
else
set ZDF[i+1]=0
endif
set i=5
if ZRF!=null and Z3F==1 and(ZXF==p or PI4 or(GetPlayerSlotState((ZXF))==PLAYER_SLOT_STATE_LEFT))then
set ZDF[i+1]=Z2F
else
set ZDF[i+1]=0
endif
set ZDF[0]=i1
set i=1
loop
exitwhen i>(E54)
if EC4[i]==Z9F or E34[i]==Z9F or E64[i]==Z9F or EL4[i]==Z9F or E14[i]==Z9F then
set ZFF[0]=EC4[i]
set ZFF[1]=E34[i]
set ZFF[2]=E64[i]
set ZFF[3]=EL4[i]
set ZFF[4]=E14[i]
if Z_F then
set ZGF[0]=true
set ZGF[1]=true
set ZGF[2]=true
set ZGF[3]=true
set ZGF[4]=true
set ZGF[5]=true
set ZGF[6]=true
set ZEF[0]=true
set ZEF[1]=true
set ZEF[2]=true
set ZEF[3]=true
set ZEF[4]=true
set ZEF[5]=true
set ZEF[6]=true
set ZIF[0]=0
set ZIF[1]=0
set ZIF[2]=0
set ZIF[3]=0
set ZIF[4]=0
set ZIF[5]=0
set ZIF[6]=0
set Z_F=false
endif
set ZHF[0]=false
set ZHF[1]=false
set ZHF[2]=false
set ZHF[3]=false
set ZHF[4]=false
set x=0
loop
exitwhen x==5
if ZFF[x]==0 then
set ZHF[x]=true
else
set y=0
loop
exitwhen y==7
if ZDF[y]==ZFF[x]and ZEF[y]and ZGF[x]then
set ZEF[y]=false
set ZGF[x]=false
set ZHF[x]=true
set ZIF[y]=1
set y=7
set Z_F=true
else
set y=y+1
endif
endloop
endif
if ZHF[x]then
set x=x+1
else
set x=5
endif
endloop
if ZHF[0]and ZHF[1]and ZHF[2]and ZHF[3]and ZHF[4]then
call Y5F(p,it,E04[i],ZIF[1],ZIF[2],ZIF[3],ZIF[4],ZIF[5],ZIF[6])
call Z8F(p,it,0,E04[i])
set i=E54+2
else
set i=i+1
endif
else
set i=i+1
endif
endloop
set EL=ZIF[0]==1
if i==(E54+2)then
set ZMF=null
set ZNF=null
set ZOF=null
set ZPF=null
set ZQF=null
set ZRF=null
return true
endif
set ZMF=null
set ZNF=null
set ZOF=null
set ZPF=null
set ZQF=null
set ZRF=null
return false
endfunction
function A4F takes unit it,item ZV7 returns nothing
local integer n5
local integer A7F
local integer QR8
set n5=BT9(it)
set A7F=BU9(it)
if A7F!=0 then
call UnitAddAbility(it,A7F)
call UnitMakeAbilityPermanent(it,true,A7F)
call SetPlayerAbilityAvailable(GetOwningPlayer(it),A7F,false)
if GetUnitTypeId(it)=='H00U' then
set H04=it
call ExecuteFunc("A8F")
elseif GetUnitTypeId(it)=='Hmkg' then
set H04=it
call ExecuteFunc("CHD")
endif
endif
set QR8=TO9(it,4)
if n5==UG7 and H44[QR8]!=0 then
call UnitRemoveAbility(it,HD4[QR8])
call UnitAddAbility(it,HE4[QR8])
call SetPlayerAbilityAvailable(GetOwningPlayer(it),HE4[QR8],false)
endif
call ZT7(ZV7)
set ZV7=UnitAddItemById(it,BU[n5])
call SetItemPlayer(ZV7,GetOwningPlayer(it),false)
call SetItemUserData(ZV7,1)
set OI7[288+GetPlayerId(GetOwningPlayer(it))]=ZV7
set ZV7=null
endfunction
function A9F takes integer O5,unit it returns nothing
local integer i=0
local integer YVF=0
set OM7[64+O5]=true
set OJ7[384+O5]=0
if AR7(it,BU[QB])then
call Y1F(O5,it,bj_lastCreatedItem,QB)
endif
if AR7(KR4[32+O5],BU[QB])then
call Y1F(O5,it,bj_lastCreatedItem,QB)
endif
call Y8F(O5,it)
set i=0
loop
exitwhen(i>23)
set YVF=OK7[O5*24+i]
if(YVF==suduzhixue or YVF==donglixie1 or YVF==donglixie2 or YVF==donglixie3 or YVF==xiangweixie or YVF==mifaxie or YVF==jingmizhixie or YVF==jingmizhixie2)then
call Y1F(O5,it,OI7[O5*24+i],YVF)
exitwhen true
endif
set i=i+1
endloop
endfunction
function ADF takes player p,unit it,integer i1,integer Z9F returns boolean
local integer YVF=0
local integer Y2F=0
local item ZV7=null
if i1==D64 and LC7(it,BU[dagongzhishenli])then
set ZV7=bj_lastCreatedItem
set YVF=ZU7(ZV7)
if YVF==dagongzhishenli then
set Y2F=dagongzhishenli2
elseif YVF==dagongzhishenli2 then
set Y2F=dagongzhishenli3
elseif YVF==dagongzhishenli3 then
set Y2F=dagongzhishenli4
elseif YVF==dagongzhishenli4 then
set Y2F=dagongzhishenli5
endif
elseif i1==DL4 and LC7(it,BU[silingshu])then
set ZV7=bj_lastCreatedItem
set YVF=ZU7(ZV7)
if YVF==silingshu then
set Y2F=silingshu2
elseif YVF==silingshu2 then
set Y2F=silingshu3
endif
endif
if Y2F!=0 then
set OO7=Y2F
set ON7=p
call DisableTrigger(T34)
call RemoveItem(ZV7)
set ZV7=UnitAddItemById(it,BU[Y2F])
call SetItemPlayer(ZV7,p,true)
call SetItemUserData(ZV7,1)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",it,"origin"))
call EnableTrigger(T34)
set OI7[288+GetPlayerId(p)]=ZV7
set ZV7=null
return true
endif
return false
endfunction
function AEF takes integer O5,unit it,integer i1,item ZV7,boolean YCF returns boolean
local player VR7=Player(O5)
local boolean L37=false
local integer j=G14[i1]
set OO7=i1
set ON7=VR7
call XM7(O5,"UnitBuyItem2d")
if(OJ7[432+O5]==2 and ADF(VR7,it,i1,i1))or Z8F(VR7,it,i1,i1)then
call XM7(O5,"UnitBuyItem2 "+GetObjectName(BU[i1])+" -> "+GetItemName(OI7[288+O5]))
if ZV7!=null then
call RemoveItem(ZV7)
endif
set ZV7=OI7[288+O5]
set L37=true
else
if XYF(it)==0 then
call XM7(O5,"UnitBuyItem2 Rep "+GetObjectName(BU[i1]))
if ZV7==null then
set ZV7=CreateItem(BU[i1],GetUnitX(it),GetUnitY(it))
call SetItemPlayer(ZV7,VR7,false)
call SetItemUserData(ZV7,1)
endif
set L37=(YBF(O5,it,i1,ZV7,YCF,false,false)!=-1)
else
call XM7(O5,"UnitBuyItem2 Put "+GetObjectName(BU[i1]))
if ZV7==null then
set ZV7=UnitAddItemById(it,BU[i1])
call SetItemPlayer(ZV7,VR7,false)
call SetItemUserData(ZV7,1)
else
call UnitAddItem(it,ZV7)
call SetItemUserData(ZV7,1)
endif
set L37=true
endif
if TT9(i1)then
call SetItemCharges(ZV7,TV9(i1))
elseif i1==YB then
call SetItemCharges(ZV7,2)
endif
endif
if ZV7!=null then
set OI7[288+O5]=ZV7
if(i1==yuanxingxie or i1==DJ4)then
call A9F(O5,it)
endif
if IsUnitType(it,UNIT_TYPE_HERO)and GetItemTypeId(ZV7)==BU[Agha]then
call A4F(it,ZV7)
endif
endif
if(OJ7[432+O5]!=2)then
call TriggerSleepAction(0)
endif
set VR7=null
set ZV7=null
return L37
endfunction
function AFF takes integer O5,unit it,integer i1,boolean YCF returns boolean
local player VR7=Player(O5)
local boolean L37=false
local integer j=G14[i1]
if(i1==ZA or i1==BA or i1==QB)and(AV4[O5]>=AY4)then
set j=j/ 2
endif
if GetPlayerState(VR7,PLAYER_STATE_RESOURCE_GOLD)>=j then
call SetPlayerState(VR7,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(VR7,PLAYER_STATE_RESOURCE_GOLD)-j)
if OM7[48+O5]then
set OJ7[192+O5]=OJ7[192+O5]+j
endif
call YRF(O5,it)
if TT9(i1)and AR7(it,BU[i1])then
call SetItemCharges(bj_lastCreatedItem,GetItemCharges(bj_lastCreatedItem)+TV9(i1))
set L37=true
else
set L37=AEF(O5,it,i1,null,YCF)
endif
set OJ7[96+O5]=0
endif
set VR7=null
return L37
endfunction
function AGF takes integer O5 returns nothing
local integer j
local integer YX7
local integer k
local unit u
local player VR7=Player(O5)
call Y8F(O5,null)
if OM7[48+O5]then
return
endif
set j=6
set k=OJ7[128+O5]-1
loop
exitwhen j>k
if OI7[O5*24+j]!=null and((not OM7[192+O5])or(not LoadBoolean(FY7,OJ7[256+O5],GetHandleId(OI7[O5*24+j]))))then
if IsItemOwned(OI7[O5*24+j])then
call UnitRemoveItem(KR4[32+O5],OI7[O5*24+j])
endif
set YX7=YBF(O5,Y7[O5],OK7[O5*24+j],OI7[O5*24+j],false,true,false)
if YX7!=-1 and YX7<6 then
set OI7[O5*24+YX7]=OI7[O5*24+j]
if(OI7[O5*24+YX7]==null)or(GetWidgetLife(OI7[O5*24+YX7])<=0)then
set OI7[O5*24+YX7]=OI7[288+O5]
endif
set OK7[O5*24+YX7]=OK7[O5*24+j]
endif
call SetItemVisible(OI7[O5*24+j],OW7)
set OI7[O5*24+j]=null
endif
set j=j+1
endloop
if OM7[192+O5]then
set j=GetUnitTypeId(Y7[O5])
if(j=='N01O' or j=='N013' or j=='N014' or j=='N015')then
set u=YOF(O5,Y7[O5],false)
endif
if u!=null then
call Y8F(O5,u)
set j=6
set k=OJ7[128+O5]-1
loop
exitwhen j>k
if OI7[O5*24+j]!=null and(LoadBoolean(FY7,OJ7[256+O5],GetHandleId(OI7[O5*24+j])))then
set YX7=YBF(O5,u,OK7[O5*24+j],OI7[O5*24+j],false,true,false)
if YX7!=-1 and YX7<6 then
set OI7[O5*24+YX7]=OI7[O5*24+j]
if(OI7[O5*24+YX7]==null)or(GetWidgetLife(OI7[O5*24+YX7])<=0)then
set OI7[O5*24+YX7]=OI7[288+O5]
endif
set OK7[O5*24+YX7]=OK7[O5*24+j]
endif
call SetItemVisible(OI7[O5*24+j],OW7)
set OI7[O5*24+j]=null
endif
set j=j+1
endloop
endif
set u=null
endif
call Y8F(O5,null)
set j=12
loop
exitwhen j>OJ7[128+O5]-1
if OI7[O5*24+j]!=null then
call Y1F(O5,Y7[O5],OI7[O5*24+j],OK7[O5*24+j])
set OI7[O5*24+j]=null
endif
set j=j+1
endloop
set VR7=null
set u=null
endfunction
function AHF takes integer O5,unit it,integer AIF,integer i1 returns boolean
local integer i
local integer j
local integer YVF
local integer Z9F=0
local item ZV7=null
local boolean L37=true
local integer AJF
local boolean AKF=false
local boolean AMF=IsUnitType(it,UNIT_TYPE_HERO)
if(it==null)or((not Z_7(it))and(not OM7[48+O5]))then
return false
elseif(OM7[48+O5])and AS7(KR4[32+O5])then
set OM7[128+O5]=true
return false
endif
if(OJ7[432+O5]==1)and(AS7(it)and OJ7[320+O5]<=0)then
set OJ7[96+O5]=i1
return false
endif
if(not IsUnitType(it,UNIT_TYPE_HERO))then
set Z9F=JV
if false then
set OM7[288+O5]=true
if(OJ7[432+O5]==1)then
return false
endif
endif
endif
if AIF>=0 or AIF==-2 then
call XM7(O5,"AIBuy_Core-"+I2S(AIF)+" "+GetObjectName(BU[i1])+" "+I2S(OJ7[32+O5])+"/"+I2S(OJ7[48+O5])+" SIM="+XQ7(OM7[48+O5]))
else
call XM7(O5,"  "+GetObjectName(BU[i1]))
endif
if(AIF==-1)then
set OJ7[64+O5]=OJ7[64+O5]+1
else
set OJ7[64+O5]=0
endif
set AJF=OJ7[64+O5]
if(OM7['p'+O5])then
if(AJF==0)then
call Y8F(O5,it)
call Y4F(O5,0)
endif
set i=0
loop
exitwhen(i>23)
if(OI7[O5*24+i]!=null)then
set L37=false
if(OK7[O5*24+i]==i1)then
set L37=true
elseif LA7(i1,OK7[O5*24+i],false)then
set L37=true
endif
if L37 then
set YVF=LoadInteger(FY7,OJ7[368+O5],i1+Z9F)
if(AJF==0)and(YVF==0)then
set YVF=LoadInteger(FY7,OJ7[352+O5],i1+Z9F)
if YVF==0 then
set YVF=1
endif
call SaveInteger(FY7,OJ7[368+O5],i1+Z9F,YVF)
endif
set YVF=LoadInteger(FY7,OJ7[224+O5],GetHandleId(OI7[O5*24+i]))
if YVF==0 then
set YVF=OJ7[48+O5]
endif
call XM7(O5,"    Found "+XP7(GetHandleId(OI7[O5*24+i]))+XP7(i)+GetItemName(OI7[O5*24+i])+" "+I2S(YVF)+"/"+XP7(OJ7[48+O5])+XQ7(GetItemPlayer(OI7[O5*24+i])==Player(O5))+XQ7(not OM7[48+O5])+XQ7(YVF==OJ7[48+O5])+XQ7(not LoadBoolean(FY7,OJ7[208+O5],GetHandleId(OI7[O5*24+i])))+XQ7(not OM7[192+O5])+XQ7(AMF==(not LoadBoolean(FY7,OJ7[256+O5],GetHandleId(OI7[O5*24+i])))))
if(GetItemPlayer(OI7[O5*24+i])==Player(O5))and((not OM7[48+O5])or((YVF==OJ7[48+O5])and(not LoadBoolean(FY7,OJ7[208+O5],GetHandleId(OI7[O5*24+i])))))then
if(AJF==0)then
call SaveInteger(FY7,OJ7[368+O5],i1+Z9F,LoadInteger(FY7,OJ7[368+O5],i1+Z9F)-1)
endif
if(AJF!=0)or(LoadInteger(FY7,OJ7[368+O5],i1+Z9F)<=0)then
set ZV7=OI7[O5*24+i]
call XM7(O5,"    Found2 "+XQ7(not OM7[192+O5])+XQ7(AMF==(not LoadBoolean(FY7,OJ7[256+O5],GetHandleId(OI7[O5*24+i])))))
if((not OM7[192+O5])or(AMF==(not LoadBoolean(FY7,OJ7[256+O5],GetHandleId(OI7[O5*24+i])))))then
set OI7[O5*24+i]=null
exitwhen true
endif
endif
endif
endif
endif
set i=i+1
endloop
if ZV7!=null and OM7[48+O5]then
call SaveBoolean(FY7,OJ7[208+O5],GetHandleId(ZV7),true)
call SaveInteger(FY7,OJ7[224+O5],GetHandleId(ZV7),OJ7[48+O5])
endif
set L37=true
if(AJF==0)then
set OM7[272+O5]=true
if(not OM7[96+O5])and(OM7[48+O5]or(OJ7[32+O5]>=OJ7[48+O5]))then
if YIF(i1)then
if IsPlayerAlly(Player(O5),G8[0])then
call SInt('CItm',"Sent|"+I2S(i1),LInt('CItm',"Sent|"+I2S(i1))+1)
else
call SInt('CItm',"Scrg|"+I2S(i1),LInt('CItm',"Scrg|"+I2S(i1))+1)
endif
endif
call SInt('CILx',I2S(GetHandleId(it))+"|"+I2S(i1),LInt('CILx',I2S(GetHandleId(it))+"|"+I2S(i1))+1)
if YDF(it,i1)then
call SBool('CItm',"Orb|"+I2S(GetHandleId(it)),true)
endif
if YEF(it,i1)then
call SBool('CItm',"Buff|"+I2S(GetHandleId(it)),true)
endif
set OM7[96+O5]=true
endif
endif
endif
if OJ7[64+O5]<99 then
if ZV7!=null then
call SetItemUserData(ZV7,1)
if(not UnitHasItem(it,ZV7))then
set OM7[272+O5]=false
if(not OM7[48+O5])and(OJ7[432+O5]!=1)then
call XM7(O5,"Add Item: "+GetItemName(ZV7)+" "+XP7(GetItemUserData(ZV7)))
call AEF(O5,it,i1,ZV7,true)
endif
elseif not OM7[48+O5]then
call UnitRemoveItem(it,ZV7)
call AEF(O5,it,i1,ZV7,true)
endif
else
set i=1
loop
exitwhen(i>E54 or E04[i]==i1)
set i=i+1
endloop
if i<=E54 then
if L37 and(EC4[i]!=0)then
set L37=(AHF(O5,it,-1,EC4[i]))
endif
if L37 and(E34[i]!=0)then
set L37=(AHF(O5,it,-1,E34[i]))
endif
if L37 and(E64[i]!=0)then
set L37=(AHF(O5,it,-1,E64[i]))
endif
if L37 and(EL4[i]!=0)then
set L37=(AHF(O5,it,-1,EL4[i]))
endif
if L37 and(E14[i]!=0)then
set L37=(AHF(O5,it,-1,E14[i]))
endif
if L37 then
if(OM7[48+O5])then
call SaveBoolean(FY7,OJ7[208+O5],GetHandleId(OI7[288+O5]),true)
else
if(i1==shengdianzhihuan2)then
call UnitUseItem(it,OI7[288+O5])
endif
endif
if AIF==-1 then
set OM7[144+O5]=true
endif
endif
set AKF=true
else
if(OM7['p'+O5])then
if OJ7[432+O5]==2 then
set L37=false
elseif OM7[48+O5]then
set L37=AFF(O5,KR4[32+O5],i1,false)
if L37 then
call SaveInteger(FY7,OJ7[224+O5],GetHandleId(OI7[288+O5]),OJ7[48+O5])
endif
elseif(OJ7[432+O5]==1)then
if(not XBF(i1))then
set L37=false
elseif(OJ7[320+O5]>0)and IsUnitType(it,UNIT_TYPE_HERO)and AS7(it)and(GetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD)>=G14[i1])and AR7(it,BU[tieshuzhigan])then
call Y1F(O5,it,bj_lastCreatedItem,tieshuzhigan)
set OJ7[320+O5]=OJ7[320+O5]-1
endif
set L37=AFF(O5,it,i1,true)
else
set L37=AFF(O5,it,i1,true)
endif
if not L37 then
set OJ7[96+O5]=i1
endif
endif
endif
if L37 and(not AMF)then
call SaveBoolean(FY7,OJ7[256+O5],GetHandleId(OI7[288+O5]),true)
endif
endif
if AJF==0 then
if(not L37)then
set OJ7['p'+O5]=i1
elseif(not(OJ7[32+O5]<OJ7[48+O5]))or(OM7[48+O5])then
set OJ7['p'+O5]=0
endif
endif
if(not OM7[128+O5])and(OM7[48+O5])and AS7(KR4[32+O5])then
set OM7[128+O5]=true
endif
if AJF==0 and L37 then
if not(OJ7[144+O5]==OQ7)then
if(not OM7[48+O5])and((OJ7[432+O5]!=1)or(OM7[272+O5]))then
set OJ7[32+O5]=OJ7[32+O5]+1
else
if AKF then
set OM7[128+O5]=true
call SInt('CItm',I2S(GetHandleId(it))+"|s"+I2S(OJ7[48+O5]),i1)
endif
set OJ7[48+O5]=OJ7[48+O5]+1
endif
endif
set OM7[96+O5]=false
if(not OM7[48+O5])and AMF then
if(i1==yuanxingxie)then
call A9F(O5,it)
elseif(i1==donglixie1)then
set OJ7[384+O5]=1
set OJ7[400+O5]=1
elseif(i1==donglixie2)then
set OJ7[384+O5]=2
set OJ7[400+O5]=2
elseif(i1==donglixie3)then
set OJ7[384+O5]=3
set OJ7[400+O5]=3
endif
if OJ7[336+O5]!=0 then
set i=0
loop
exitwhen(i>23)
if(OK7[O5*24+i]==OJ7[336+O5])then
call Y1F(O5,it,OI7[O5*24+i],OJ7[336+O5])
exitwhen true
endif
set i=i+1
endloop
set OJ7[336+O5]=0
endif
endif
if(OM7['p'+O5])and(not OM7[48+O5])and(OJ7[432+O5]!=2)and AMF then
set YVF=YXF(O5,false)-6
loop
set i=YSF(O5,false,false)
exitwhen(i==-1)or(YVF<=0)
call Y1F(O5,it,OI7[O5*24+i],OK7[O5*24+i])
set OI7[O5*24+i]=null
set YVF=YVF-1
endloop
endif
if(not OM7[128+O5])and(OM7[48+O5])and(X3F(O5,it,null,i1,true)>=99)then
set OM7[128+O5]=true
endif
if(OM7[192+O5])and(not OM7[48+O5])and(GetUnitTypeId(it)=='e01F')then
call YQF(O5,it)
endif
endif
endif
if(not OM7['p'+O5])then
return true
endif
if(AJF==0)and(not OM7[80+O5])and L37 and(AIF==OJ7[240+O5])then
if(not OM7[48+O5])then
set OJ7[144+O5]=OS7
else
set OM7[160+O5]=true
endif
endif
return L37
endfunction
function ANF takes nothing returns nothing
local integer i=GetHandleId(GetTriggeringTrigger())
local integer O5=LInt(i,"p")
set OM7[208+O5]=AHF(O5,LUnit(i,"u"),LInt(i,"i"),LInt(i,"id"))
set OJ7[272+O5]=0
endfunction
function AOF takes integer O5 returns boolean
return(not(Bz>=OJ7[160+O5]))or(OM7[224+O5]and OJ7[432+O5]!=2)
endfunction
function APF takes unit u,integer AQF returns integer
local player p=GetOwningPlayer(u)
local integer i=0
local integer IM8=0
local integer ARF=0
loop
exitwhen i>15
set ARF=GetUnitTypeId(Y7[i])
if Y7[i]!=null and IsUnitEnemy(Y7[i],p)and(YO7(ARF,AQF))then
set IM8=IM8+1
endif
set i=i+1
endloop
return IM8
endfunction
function ASF takes integer O5,unit it,integer AIF,integer i1 returns boolean
local integer i
local integer Z9F=0
if(OJ7[432+O5]==2 and(HA4[O5]or Bz<OJ7[272+O5]))or(OM7[224+O5]and OJ7[432+O5]!=2)then
return false
endif
if(not OM7['p'+O5])then
if AIF>=0 and(OJ7[240+O5]<=AIF)then
set OJ7[240+O5]=AIF
endif
if(not IsUnitType(it,UNIT_TYPE_HERO))then
set Z9F=JV
endif
call SaveInteger(FY7,OJ7[352+O5],i1+Z9F,LoadInteger(FY7,OJ7[352+O5],i1+Z9F)+1)
return true
endif
if(OM7['p'+O5])and(AIF>=0)and(((not OM7[48+O5])and(OJ7[32+O5]!=AIF))or((OM7[48+O5])and(OJ7[48+O5]!=AIF)))then
return false
endif
if Bz<OJ7[272+O5]then
set i=R2I(Bz)+10
loop
call TriggerSleepAction(1)
exitwhen(Bz>i or Bz>OJ7[272+O5])
endloop
if Bz<OJ7[272+O5]then
return false
endif
endif
set i=GetHandleId(R04['p'+O5])
call SUnit(i,"u",it)
call SInt(i,"i",AIF)
call SInt(i,"id",i1)
if(IsUnitType(it,UNIT_TYPE_HERO))then
set Z9F=GetUnitTypeId(it)
if(LBool(S44,G48(it)+"|D"))then
if(i1==sanyeduijian)then
call SInt(i,"id",tiantangzhiji)
endif
elseif(LBool(S44,G48(it)+"|Xb"))then
if(i1==mozhang)and APF(it,GZ7)<3 and((Z9F=='Emoo')or(Z9F=='HC92')or(Z9F=='Emns')or(Z9F=='E005')or(Z9F=='Naka')or(Z9F=='Edem')or(Z9F=='U00C')or(Z9F=='Hvsh')or(Z9F=='U00P')or(Z9F=='H00K')or(Z9F=='EC45')or(Z9F=='E004')or(Z9F=='H071'))then
call SInt(i,"id",maidasizhishou)
elseif(i1==zhipeitoukui)and APF(it,GY7)<3 and((Z9F=='EC45')or(Z9F=='O00P')or(Z9F=='H001'))then
call SInt(i,"id",fengkuangmianju)
endif
endif
endif
set OJ7[272+O5]=R2I(Bz)+15
set OM7[208+O5]=false
call TriggerExecute(R04['p'+O5])
if(OJ7[432+O5]!=2)then
loop
call TriggerSleepAction(.2)
exitwhen Bz>OJ7[272+O5]
endloop
endif
return OM7[208+O5]
endfunction
function ATF takes integer O5,unit it,integer i1,boolean AUF returns boolean
local boolean AVF=AR7(it,BU[i1])or AR7(KR4[32+O5],BU[i1])or((KR4[32+O5]!=KR4[O5])and AR7(KR4[O5],BU[i1]))
if LBool('CMis',I2S(GetHandleId(it))+"|"+I2S(i1))then
set AUF=false
endif
if AUF and(IsItemOwned(bj_lastCreatedItem)or(not AS7(it)))then
if not((OJ7[O5]==i1 or OJ7[16+O5]==i1)and AVF)then
if OJ7[O5]==0 and OJ7[16+O5]!=i1 then
set OJ7[O5]=i1
elseif OJ7[16+O5]==0 and OJ7[O5]!=i1 then
set OJ7[16+O5]=i1
endif
if not AVF then
return AFF(O5,it,i1,true)
endif
endif
else
if AVF then
if(OJ7[O5]==i1)then
set OJ7[O5]=0
elseif(OJ7[16+O5]==i1)then
set OJ7[16+O5]=0
endif
endif
endif
return false
endfunction
function AWF takes integer O5 returns nothing
local integer i=0
local item ZV7=null
local integer i1
loop
exitwhen i>5
set ZV7=UnitItemInSlot(KR4[32+O5],i)
if ZV7!=null then
set bj_forLoopAIndex=GetItemTypeId(ZV7)
set i1=-1
if(bj_forLoopAIndex==BU[OJ7[O5]])then
set i1=OJ7[O5]
set OJ7[O5]=0
elseif(bj_forLoopAIndex==BU[OJ7[16+O5]])then
set i1=OJ7[16+O5]
set OJ7[16+O5]=0
elseif(bj_forLoopAIndex==BU[QB])then
call Y1F(O5,Y7[O5],ZV7,QB)
endif
if i1!=-1 then
call SBool('CMis',I2S(GetHandleId(Y7[O5]))+"|"+I2S(i1),true)
call Y1F(O5,Y7[O5],ZV7,i1)
endif
endif
set i=i+1
endloop
set ZV7=null
endfunction
function AXF takes integer O5 returns boolean
local integer W57=GetHandleId(KR4[16+O5])
local integer i=0
local boolean AYF=false
if(Bz<hq[896+O5])or(not LBool(W57,"aiCrow|Alive"))then
return false
endif
if(Z47(Y7[O5],h9[16+O5])<1200)then
return false
endif
if(LBool(W57,"aiCrow|Active"))and(Z47(KR4[16+O5],h9[16+O5])<800)and(Bz>LReal(W57,"aiCrow|Move"))then
call Z39(KR4[16+O5])
set AYF=true
endif
set i=LInt(W57,"aiCrow|CurrentOwner")
if(LBool(W57,"aiCrow|Active"))then
if(i==O5)then
if LBool(W57,"aiCrow|Away")then
call IssueNeutralImmediateOrderById(Player(O5),KR4[16+O5],'h085')
else
call IssueImmediateOrderById(KR4[16+O5],852247)
endif
endif
return false
endif
if(i!=O5)and((not PK7)or((IsJWPlayer(Player(O5))and(i!=GetPlayerId(G8[0])))or(IsTZPlayer(Player(O5))and(i!=GetPlayerId(N8[0])))))then
return false
endif
if(not AYF)then
call Z39(KR4[16+O5])
set AYF=true
endif
if(PK7)and(GetOwningPlayer(KR4[16+O5])!=Player(O5))then
call SetUnitOwner(KR4[16+O5],Player(O5),false)
endif
if IssueNeutralImmediateOrderById(Player(O5),KR4[16+O5],'h085')then
call SInt(W57,"aiCrow|CurrentOwner",O5)
call SBool(W57,"aiCrow|Active",true)
call SReal(W57,"aiCrow|Move",Bz+15)
call SBool(W57,"aiCrow|Away",true)
set OM7[224+O5]=true
set i=0
set F27=null
call DisableTrigger(GW4)
loop
exitwhen i>5
set F27=UnitItemInSlot(KR4[O5],i)
if F27!=null then
call UnitAddItem(KR4[16+O5],F27)
endif
set i=i+1
endloop
call EnableTrigger(GW4)
return true
endif
return false
endfunction
function AZF takes integer O5,boolean AAF returns boolean
return(PI7 and(KR4[16+O5]!=null)and OJ7[432+O5]==0 and AAF and(OM7[128+O5]or OM7[144+O5]))
endfunction
function ABF takes integer O5,unit it,boolean AAF returns nothing
local integer i1=GetUnitTypeId(it)
local integer array ACF
local boolean L37=false
local boolean A3F=false
local boolean A6F=false
local boolean J4=false
local string ALF
local integer i
local integer YVF
local integer j
local integer YX7
local integer A1F
local integer k
local integer YWF
local unit u
if AOF(O5)then
return
endif
if(OJ7[432+O5]==2)then
if LInt(GetHandleId(KR4[16+O5]),"aiCrow|CurrentOwner")!=O5 then
return
endif
set KR4[32+O5]=KR4[16+O5]
else
set KR4[32+O5]=KR4[O5]
endif
if(not OM7['p'+O5])then
set OJ7[144+O5]=OR7
else
set OJ7[160+O5]=R2I(Bz)+OU7
call Y8F(O5,it)
endif
set OM7[48+O5]=AAF
set OM7[160+O5]=(AAF and OM7[176+O5])
set i=OJ7[144+O5]
if(OJ7[144+O5]==OQ7)and(not AAF)then
if(PX4)then
else
call ATF(O5,it,ZA,true)
endif
call AFF(O5,it,BA,true)
endif
set YVF=LInt(GetHandleId(Player(O5)),"AI|Class")
if(OJ7[144+O5]==OQ7)and(not AAF)then
set YX7=N58(it)
if YVF==GW7 then
call ASF(O5,it,-2,BA)
else
if IsUnitType(it,UNIT_TYPE_MELEE_ATTACKER)then
call AFF(O5,it,yuandun,false)
if i1!='H06S' then
call AFF(O5,it,yazhizhiren,false)
endif
else
call AFF(O5,it,shouhuzhihuan,false)
if YX7==1 then
call ASF(O5,it,-2,wuyongguajian)
elseif YX7==2 then
call ASF(O5,it,-2,youlingxidai)
else
call ASF(O5,it,-2,huwan)
endif
endif
endif
set OJ7[144+O5]=OR7
set OJ7['p'+O5]=0
endif
if(i1=='H00D')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,xianfengdun)
call ASF(O5,it,4,renjia)
call ASF(O5,it,5,silingshu3)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
set ACF[1]=xieeliandao
endif
elseif(i1=='H0DO')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie3)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,atuosizhigun)
call ASF(O5,it,3,ziyuan)
call ASF(O5,it,4,dagongzhishenli)
call ASF(O5,it,5,yuanlifazhang)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xiwadeshouhu
set ACF[1]=xieeliandao
set ACF[2]=dagongzhishenli5
endif
elseif((i1=='N016')or(i1=='N017')or(i1=='N02B'))then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,zhipeitoukui)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,luosazhifeng)
call ASF(O5,it,4,sanyeduijian)
call ASF(O5,it,5,hudie)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dapao
set ACF[1]=sadanzhixieli
set ACF[2]=hudie
endif
elseif(i1=='Harf')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,meikensimu)
call ASF(O5,it,3,euldeshenshengfazhang)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,xieeliandao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xiwadeshouhu
set ACF[1]=huiyao
endif
elseif(i1=='Naka')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,tianyingzhijie2)
call ASF(O5,it,3,sanyeduijian)
call ASF(O5,it,4,zhangu)
call ASF(O5,it,5,jingubang)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=hudie
set ACF[1]=sadanzhixieli
set ACF[2]=dapao
endif
elseif(i1=='U00P')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie3)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,atuosizhigun)
call ASF(O5,it,4,fenzhengmiansha)
call ASF(O5,it,5,ziyuan)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xieeliandao
endif
elseif(i1=='Ntin')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie3)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,xuejingshi)
call ASF(O5,it,4,xiwadeshouhu)
call ASF(O5,it,5,dagongzhishenli)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xieeliandao
set ACF[1]=dagongzhishenli5
endif
elseif(i1=='Udre')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yingzhilingkan)
call ASF(O5,it,3,bizhang2)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,dapao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=sadanzhixieli
set ACF[1]=heihuangzhang
endif
elseif(i1=='E004')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,tianyingzhijie2)
call ASF(O5,it,3,ziyuan)
call ASF(O5,it,4,jingubang)
call ASF(O5,it,5,sijiadizhiyan2)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dapao
set ACF[1]=hudie
endif
elseif(i1=='U00C')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,bizhang2)
call ASF(O5,it,3,suiguchui)
call ASF(O5,it,4,sanyeduijian)
call ASF(O5,it,5,anmie)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=qiangxizhuangjia
set ACF[1]=shenyuanzhiren
endif
elseif(i1=='N01A')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,atuosizhigun)
call ASF(O5,it,4,ziyuan)
call ASF(O5,it,5,Agha)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xieeliandao
endif
elseif(i1=='Huth')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,fengkuangmianju)
call ASF(O5,it,2,keledebishou)
call ASF(O5,it,3,suiguchui)
call ASF(O5,it,4,luosazhifeng)
call ASF(O5,it,5,sanyeduijian)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=sadanzhixieli
set ACF[1]=shenyuanzhiren
endif
elseif(i1=='Eevi')or(i1=='Eevm')or(i1=='E02V')or(i1=='E02W')or(i1=='E02U')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,tianyingzhijie2)
call ASF(O5,it,2,mozhang)
call ASF(O5,it,3,zhangu)
call ASF(O5,it,4,sanyeduijian)
call ASF(O5,it,5,huanyingfu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=jingubang
set ACF[1]=sadanzhixieli
set ACF[1]=hudie
endif
elseif(i1=='H00S')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie3)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,ziyuan)
call ASF(O5,it,3,heihuangzhang)
call ASF(O5,it,4,atuosizhigun)
call ASF(O5,it,5,xuejingshi)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xieeliandao
endif
elseif(i1=='UC01')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie3)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,ziyuan)
call ASF(O5,it,3,Agha)
call ASF(O5,it,4,jingubang)
call ASF(O5,it,5,xieeliandao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xiwadeshouhu
endif
elseif(i1=='Emoo')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,xiangweixie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,ziyuan)
call ASF(O5,it,4,xieeliandao)
call ASF(O5,it,5,xiwadeshouhu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=Agha
endif
elseif(i1=='H004')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie3)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,dagongzhishenli)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,fenzhengmiansha)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=sijiadizhiyan2
set ACF[1]=dagongzhishenli5
endif
elseif(i1=='E02X')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,dagongzhishenli)
call ASF(O5,it,4,silingshu)
call ASF(O5,it,5,atuosizhigun)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=silingshu3
set ACF[1]=sijiadizhiyan2
set ACF[2]=dagongzhishenli5
endif
elseif(i1=='N0HP')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yingzhilingkan)
call ASF(O5,it,3,dagongzhishenli)
call ASF(O5,it,4,yuanlifazhang)
call ASF(O5,it,5,atuosizhigun)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xieeliandao
set ACF[1]=xiwadeshouhu
set ACF[2]=dagongzhishenli5
endif
elseif(i1=='Nfir')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,tianyingzhijie2)
call ASF(O5,it,3,fengkuangmianju)
call ASF(O5,it,4,luosazhifeng)
call ASF(O5,it,5,heihuangzhang)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dapao
set ACF[1]=hudie
set ACF[2]=sadanzhixieli
endif
elseif(i1=='Nbrn')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,tianyingzhijie2)
call ASF(O5,it,3,fengkuangmianju)
call ASF(O5,it,4,luosazhifeng)
call ASF(O5,it,5,hudie)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dapao
set ACF[1]=sadanzhixieli
endif
elseif(i1=='N00R')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,renjia)
call ASF(O5,it,4,xianfengdun)
call ASF(O5,it,5,xiwadeshouhu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=huiyao
set ACF[1]=molongzhixin
endif
elseif(i1=='U00K')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,keledebishou)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,xiwadeshouhu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xieeliandao
endif
elseif(i1=='UC11')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,shuijingjian)
call ASF(O5,it,4,keledebishou)
call ASF(O5,it,5,dapao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dapao
set ACF[1]=molongzhixin
set ACF[2]=sadanzhixieli
endif
elseif(i1=='H00R')or(i1=='H07I')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,jipin)
call ASF(O5,it,4,xiwadeshouhu)
call ASF(O5,it,5,qiangxizhuangjia)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
set ACF[1]=huiyao
endif
elseif(i1=='Hvwd')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,tianyingzhijie2)
call ASF(O5,it,3,zhangu)
call ASF(O5,it,4,luosazhifeng)
call ASF(O5,it,5,anmie)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=qiangxizhuangjia
set ACF[1]=huanyingfu2
endif
elseif(i1=='Ofar')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,maidasizhishou)
call ASF(O5,it,3,keledebishou)
call ASF(O5,it,4,shuaxinqiu)
call ASF(O5,it,5,molongzhixin)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=qiangxizhuangjia
set ACF[1]=dongchayandou
endif
elseif(i1=='H00I')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,meikensimu)
call ASF(O5,it,3,jipin)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,qiangxizhuangjia)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xiwadeshouhu
endif
elseif(i1=='Udea')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,xiangweixie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,fengkuangmianju)
call ASF(O5,it,3,shuijingjian)
call ASF(O5,it,4,qiangxizhuangjia)
call ASF(O5,it,5,molongzhixin)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dapao
set ACF[1]=xiwadeshouhu
endif
elseif(i1=='U008')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,jipin)
call ASF(O5,it,3,zhangu)
call ASF(O5,it,4,suiguchui)
call ASF(O5,it,5,sanyeduijian)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
set ACF[1]=shenyuanzhiren
endif
elseif(i1=='U006')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,jipin)
call ASF(O5,it,3,heihuangzhang)
call ASF(O5,it,4,ziyuan)
call ASF(O5,it,5,hudie)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=jingubang
endif
elseif(i1=='Hmbr')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,dagongzhishenli)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,xieeliandao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xiwadeshouhu
set ACF[1]=dagongzhishenli5
endif
elseif(i1=='O00P')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,linkenfaqiu)
call ASF(O5,it,3,huanyingfu2)
call ASF(O5,it,4,xulingzhiren)
call ASF(O5,it,5,hudie)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=sadanzhixieli
set ACF[1]=sijiadizhiyan2
endif
elseif(i1=='Hjai')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,jingmizhixie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,dagongzhishenli)
call ASF(O5,it,4,euldeshenshengfazhang)
call ASF(O5,it,5,Agha)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xiwadeshouhu
set ACF[1]=dagongzhishenli5
endif
elseif(i1=='H001')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,fengkuangmianju)
call ASF(O5,it,4,heihuangzhang)
call ASF(O5,it,5,dapao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
set ACF[1]=tiantangzhiji
endif
elseif(i1=='HC49')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,sanshizhiren)
call ASF(O5,it,4,huanyingfu)
call ASF(O5,it,5,qiangxizhuangjia)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=sanshizhiren2
set ACF[1]=molongzhixin
set ACF[2]=hudie
endif
elseif(i1=='HC92')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,fengkuangmianju)
call ASF(O5,it,3,sanshizhiren)
call ASF(O5,it,4,yecha)
call ASF(O5,it,5,suiguchui)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=sanshizhiren2
set ACF[1]=huanyingfu
set ACF[2]=hudie
set ACF[3]=shenyuanzhiren
endif
elseif(i1=='Otch')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,maidasizhishou)
call ASF(O5,it,3,keledebishou)
call ASF(O5,it,4,yuanlifazhang)
call ASF(O5,it,5,Agha)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=shuaxinqiu
set ACF[1]=molongzhixin
set ACF[2]=dapao
endif
elseif(i1=='Ogrh')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,maidasizhishou)
call ASF(O5,it,2,xianfengdun)
call ASF(O5,it,3,sanshizhiren)
call ASF(O5,it,4,huanyingfu)
call ASF(O5,it,5,huiyao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
set ACF[1]=hudie
set ACF[2]=sanshizhiren2
endif
elseif(i1=='Nbbc')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,tianyingzhijie2)
call ASF(O5,it,3,luosazhifeng)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,dapao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=kuangzhanfu
set ACF[1]=hudie
endif
elseif(i1=='Hamg')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,maidasizhishou)
call ASF(O5,it,3,zhangu)
call ASF(O5,it,4,silingshu)
call ASF(O5,it,5,xiwadeshouhu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=silingshu3
set ACF[1]=huiyao
set ACF[2]=qiangxizhuangjia
set ACF[3]=leishenzhichui
endif
elseif(i1=='E005')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,xiangweixie)
call ASF(O5,it,1,maidasizhishou)
call ASF(O5,it,2,fengkuangmianju)
call ASF(O5,it,3,luosazhifeng)
call ASF(O5,it,4,heihuangzhang)
call ASF(O5,it,5,hudie)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dapao
endif
elseif(i1=='Usyl')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,xiangweixie)
call ASF(O5,it,1,fengkuangmianju)
call ASF(O5,it,2,luosazhifeng)
call ASF(O5,it,3,shuijingjian)
call ASF(O5,it,4,huanyingfu2)
call ASF(O5,it,5,hudie)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dapao
set ACF[1]=sijiadizhiyan2
endif
elseif(i1=='Hmkg')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,maidasizhishou)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,Agha)
call ASF(O5,it,4,xuejingshi)
call ASF(O5,it,5,dagongzhishenli)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xieeliandao
set ACF[1]=dagongzhishenli5
endif
elseif(i1=='Emns')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie3)
call ASF(O5,it,1,maidasizhishou)
call ASF(O5,it,2,luosazhifeng)
call ASF(O5,it,3,silingshu)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,anmie)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=silingshu3
set ACF[1]=xieeliandao
endif
elseif(i1=='Ucrl')or(i1=='U01X')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,zhangu)
call ASF(O5,it,2,luosazhifeng)
call ASF(O5,it,3,Agha)
call ASF(O5,it,4,yecha)
call ASF(O5,it,5,shuijingjian)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dapao
set ACF[1]=huanyingfu
set ACF[2]=sadanzhixieli
endif
elseif(i1=='Hblm')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,jingmizhixie)
call ASF(O5,it,1,meikensimu)
call ASF(O5,it,2,Agha)
call ASF(O5,it,3,luosazhifeng)
call ASF(O5,it,4,dagongzhishenli)
call ASF(O5,it,5,silingshu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=silingshu3
set ACF[1]=dagongzhishenli5
set ACF[2]=xieeliandao
endif
elseif(i1=='Uktl')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,maidasizhishou)
call ASF(O5,it,2,keledebishou)
call ASF(O5,it,3,Agha)
call ASF(O5,it,4,shuaxinqiu)
call ASF(O5,it,5,huiyao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xieeliandao
endif
elseif(i1=='H00K')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,euldeshenshengfazhang)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,xieeliandao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xiwadeshouhu
endif
elseif(i1=='H00A')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,xiangweixie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,maidasizhishou)
call ASF(O5,it,3,meikensimu)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,silingshu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=silingshu3
set ACF[1]=anmie
set ACF[2]=qiangxizhuangjia
endif
elseif(i1=='Orkn')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,euldeshenshengfazhang)
call ASF(O5,it,3,yuanlifazhang)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,silingshu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=silingshu3
set ACF[1]=shuaxinqiu
endif
elseif(i1=='H008')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,maidasizhishou)
call ASF(O5,it,3,xianfengdun)
call ASF(O5,it,4,sanyeduijian)
call ASF(O5,it,5,huiyao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
set ACF[1]=xiwadeshouhu
set ACF[2]=qiangxizhuangjia
endif
elseif(i1=='Npbm')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,keledebishou)
call ASF(O5,it,4,molongzhixin)
call ASF(O5,it,5,huiyao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=huanyingfu
endif
elseif(i1=='H000')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,xiangweixie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,xianfengdun)
call ASF(O5,it,3,keledebishou)
call ASF(O5,it,4,huiyao)
call ASF(O5,it,5,qiangxizhuangjia)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
set ACF[1]=xiwadeshouhu
endif
elseif(i1=='Hlgr')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,maidasizhishou)
call ASF(O5,it,3,fengkuangmianju)
call ASF(O5,it,4,sanyeduijian)
call ASF(O5,it,5,molongzhixin)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dapao
set ACF[1]=qiangxizhuangjia
endif
elseif(i1=='Edem')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,maidasizhishou)
call ASF(O5,it,2,jipin)
call ASF(O5,it,3,kuangzhanfu)
call ASF(O5,it,4,huanyingfu)
call ASF(O5,it,5,hudie)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dapao
endif
elseif(i1=='E00P')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,dagongzhishenli)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,silingshu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=silingshu3
set ACF[1]=dagongzhishenli5
set ACF[2]=xiwadeshouhu
endif
elseif(i1=='N01V')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,huanyingfu2)
call ASF(O5,it,3,sanshizhiren)
call ASF(O5,it,4,sanyeduijian)
call ASF(O5,it,5,jingubang)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=sanshizhiren2
set ACF[1]=hudie
endif
elseif(i1=='N01I')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,luosazhifeng)
call ASF(O5,it,4,leishenzhichui)
call ASF(O5,it,5,suiguchui)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
set ACF[1]=qiangxizhuangjia
set ACF[2]=shenyuanzhiren
endif
elseif(i1=='EC57')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,tianyingzhijie2)
call ASF(O5,it,3,luosazhifeng)
call ASF(O5,it,4,silingshu)
call ASF(O5,it,5,huanyingfu2)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=silingshu3
set ACF[1]=hudie
set ACF[2]=xieeliandao
endif
elseif(i1=='UC18')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,jingmizhixie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,dagongzhishenli)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,xieeliandao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xiwadeshouhu
set ACF[1]=dagongzhishenli5
endif
elseif(i1=='UC76')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,xuejingshi)
call ASF(O5,it,4,xieeliandao)
call ASF(O5,it,5,xiwadeshouhu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
endif
elseif(i1=='Ekee')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,xuejingshi)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,xiwadeshouhu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
endif
elseif(i1=='Ulic')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,jingmizhixie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,Agha)
call ASF(O5,it,4,xuejingshi)
call ASF(O5,it,5,shuaxinqiu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xieeliandao
endif
elseif(i1=='N0EG')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,xiangweixie)
call ASF(O5,it,1,maidasizhishou)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,ziyuan)
call ASF(O5,it,4,sanshizhiren)
call ASF(O5,it,5,Agha)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=sanshizhiren2
set ACF[1]=jingubang
endif
elseif(i1=='E01Y')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,tianyingzhijie)
call ASF(O5,it,3,keledebishou)
call ASF(O5,it,4,anmie)
call ASF(O5,it,5,dapao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=qiangxizhuangjia
set ACF[1]=hudie
endif
elseif(i1=='N00B')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie3)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,dagongzhishenli)
call ASF(O5,it,3,keledebishou)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,xieeliandao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xiwadeshouhu
set ACF[1]=dagongzhishenli5
endif
elseif(i1=='H00Q')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,meikensimu)
call ASF(O5,it,2,bizhang2)
call ASF(O5,it,3,xuanwo)
call ASF(O5,it,4,molongzhixin)
call ASF(O5,it,5,shuijingjian)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dapao
set ACF[1]=qiangxizhuangjia
set ACF[2]=leishenzhichui
endif
elseif(i1=='H06S')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,xiangweixie)
call ASF(O5,it,1,maidasizhishou)
call ASF(O5,it,2,luosazhifeng)
call ASF(O5,it,3,shuijingjian)
call ASF(O5,it,4,anmie)
call ASF(O5,it,5,molongzhixin)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dapao
set ACF[1]=qiangxizhuangjia
endif
elseif(i1=='U00F')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,tiaozhantoujin)
call ASF(O5,it,3,renjia)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,molongzhixin)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dongchayandou
set ACF[1]=xiwadeshouhu
endif
elseif(i1=='H00T')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yingzhilingkan)
call ASF(O5,it,3,xianfengdun)
call ASF(O5,it,4,renjia)
call ASF(O5,it,5,Agha)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=huiyao
set ACF[1]=molongzhixin
set ACF[2]=qiangxizhuangjia
set ACF[3]=xiwadeshouhu
endif
elseif(i1=='NC00')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,maidasizhishou)
call ASF(O5,it,2,fengkuangmianju)
call ASF(O5,it,3,bizhang2)
call ASF(O5,it,4,tiantangzhiji)
call ASF(O5,it,5,leishenzhichui)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=qiangxizhuangjia
set ACF[1]=molongzhixin
set ACF[2]=sadanzhixieli
endif
elseif(i1=='O00J')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,fengkuangmianju)
call ASF(O5,it,3,bizhang2)
call ASF(O5,it,4,sanyeduijian)
call ASF(O5,it,5,molongzhixin)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=qiangxizhuangjia
set ACF[1]=Agha
endif
elseif(i1=='U00A')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,maidasizhishou)
call ASF(O5,it,2,tiantangzhiji)
call ASF(O5,it,3,sanshizhiren)
call ASF(O5,it,4,huanyingfu)
call ASF(O5,it,5,molongzhixin)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=sanshizhiren2
set ACF[1]=qiangxizhuangjia
endif
elseif(i1=='H00V')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,tianyingzhijie2)
call ASF(O5,it,2,linkenfaqiu)
call ASF(O5,it,3,huanyingfu2)
call ASF(O5,it,4,dapao)
call ASF(O5,it,5,jingubang)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=hudie
endif
elseif(i1=='EC77')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,meikensimu)
call ASF(O5,it,2,luosazhifeng)
call ASF(O5,it,3,Agha)
call ASF(O5,it,4,huanyingfu2)
call ASF(O5,it,5,molongzhixin)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=hudie
endif
elseif(i1=='E002')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,xianfengdun2)
call ASF(O5,it,2,luosazhifeng)
call ASF(O5,it,3,renjia)
call ASF(O5,it,4,tiantangzhiji)
call ASF(O5,it,5,shuijingjian)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=qiangxizhuangjia
set ACF[1]=molongzhixin
set ACF[2]=dapao
endif
elseif(i1=='E02N')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,luosazhifeng)
call ASF(O5,it,3,Agha)
call ASF(O5,it,4,dapao)
call ASF(O5,it,5,sanshizhiren)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=sanshizhiren2
set ACF[1]=hudie
endif
elseif(i1=='Ubal')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,linkenfaqiu)
call ASF(O5,it,3,huanyingfu2)
call ASF(O5,it,4,huiyao)
call ASF(O5,it,5,hudie)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=sijiadizhiyan2
endif
elseif(i1=='Ewar')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,jipin)
call ASF(O5,it,3,kuangzhanfu)
call ASF(O5,it,4,suiguchui)
call ASF(O5,it,5,sanshizhiren)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=hudie
set ACF[1]=sanshizhiren2
set ACF[2]=shenyuanzhiren
endif
elseif(i1=='EC45')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,maidasizhishou)
call ASF(O5,it,2,fengkuangmianju)
call ASF(O5,it,3,shuijingjian)
call ASF(O5,it,4,kuangzhanfu)
call ASF(O5,it,5,leishenzhichui)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dapao
set ACF[1]=hudie
endif
elseif(i1=='Hvsh')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,luosazhifeng)
call ASF(O5,it,3,sanyeduijian)
call ASF(O5,it,4,shuijingjian)
call ASF(O5,it,5,huiyao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dapao
set ACF[1]=molongzhixin
endif
elseif(i1=='E01B')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,maidasizhishou)
call ASF(O5,it,2,xianfengdun)
call ASF(O5,it,3,sanshizhiren)
call ASF(O5,it,4,huanyingfu)
call ASF(O5,it,5,huiyao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
set ACF[1]=sanshizhiren2
set ACF[2]=hudie
endif
elseif(i1=='N0M0')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,tianyingzhijie2)
call ASF(O5,it,3,kuangzhanfu)
call ASF(O5,it,4,shuijingjian)
call ASF(O5,it,5,sanshizhiren)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dapao
set ACF[1]=sanshizhiren2
set ACF[1]=qiangxizhuangjia
endif
elseif(i1=='H071')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,it,1,fengkuangmianju)
call ASF(O5,it,2,sanyeduijian)
call ASF(O5,it,3,suiguchui)
call ASF(O5,it,4,sijiadizhiyan)
call ASF(O5,it,5,dapao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=shenyuanzhiren
endif
elseif(i1=='Opgh')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,xiangweixie)
call ASF(O5,it,1,xianfengdun)
call ASF(O5,it,2,renjia)
call ASF(O5,it,3,keledebishou)
call ASF(O5,it,4,qiangxizhuangjia)
call ASF(O5,it,5,Agha)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
endif
elseif(i1=='E032')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,xianfengdun)
call ASF(O5,it,4,xuejingshi)
call ASF(O5,it,5,xiwadeshouhu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=huiyao
set ACF[1]=qiangxizhuangjia
set ACF[2]=molongzhixin
endif
elseif(i1=='E02K')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,luosazhifeng)
call ASF(O5,it,4,tiantangzhiji)
call ASF(O5,it,5,molongzhixin)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=qiangxizhuangjia
set ACF[1]=dapao
set ACF[2]=shenyuanzhiren
endif
elseif(i1=='UC42')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,xiangweixie)
call ASF(O5,it,1,maidasizhishou)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,sanyeduijian)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,molongzhixin)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xiwadeshouhu
set ACF[1]=qiangxizhuangjia
endif
elseif(i1=='E02I')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,luosazhifeng)
call ASF(O5,it,4,sanyeduijian)
call ASF(O5,it,5,kuangzhanfu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
set ACF[1]=dapao
endif
elseif(i1=='UC91')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie2)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,keledebishou)
call ASF(O5,it,4,sanyeduijian)
call ASF(O5,it,5,anmie)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
set ACF[1]=qiangxizhuangjia
endif
elseif(i1=='O015')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,yuanlifazhang)
call ASF(O5,it,4,xiwadeshouhu)
call ASF(O5,it,5,xieeliandao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
set ACF[1]=huiyao
endif
elseif(i1=='H00N')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,xianfengdun)
call ASF(O5,it,3,Agha)
call ASF(O5,it,4,xiwadeshouhu)
call ASF(O5,it,5,qiangxizhuangjia)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=huiyao
set ACF[0]=molongzhixin
endif
elseif(i1=='U000')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,dagongzhishenli)
call ASF(O5,it,3,silingshu)
call ASF(O5,it,4,sanyeduijian)
call ASF(O5,it,5,hudie)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=silingshu3
set ACF[1]=xieeliandao
set ACF[2]=dagongzhishenli5
endif
elseif(i1=='E02F')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie3)
call ASF(O5,it,1,meikensimu)
call ASF(O5,it,2,dagongzhishenli)
call ASF(O5,it,3,xiwadeshouhu)
call ASF(O5,it,4,molongzhixin)
call ASF(O5,it,5,huiyao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dagongzhishenli5
endif
elseif(i1=='O01F')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,meikensimu)
call ASF(O5,it,2,bizhang)
call ASF(O5,it,3,molongzhixin)
call ASF(O5,it,4,xuejingshi)
call ASF(O5,it,5,xiwadeshouhu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xieeliandao
set ACF[1]=dongchayandou
endif
elseif(i1=='U00E')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,dagongzhishenli)
call ASF(O5,it,3,xianfengdun)
call ASF(O5,it,4,tiaozhantoujin)
call ASF(O5,it,5,Agha)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
set ACF[1]=dongchayandou
set ACF[2]=xiwadeshouhu
set ACF[3]=dagongzhishenli5
endif
elseif(i1=='H00H')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,dagongzhishenli)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,xuejingshi)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xieeliandao
set ACF[1]=dagongzhishenli5
endif
elseif(i1=='N01W')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,meikensimu)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,Agha)
call ASF(O5,it,4,atuosizhigun)
call ASF(O5,it,5,tiaozhantoujin)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dongchayandou
endif
elseif(i1=='E01A')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,dagongzhishenli)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,luosazhifeng)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,heihuangzhang)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dagongzhishenli5
endif
elseif(i1=='E01C')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie3)
call ASF(O5,it,1,maidasizhishou)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,Agha)
call ASF(O5,it,4,shuaxinqiu)
call ASF(O5,it,5,silingshu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=silingshu3
set ACF[1]=xieeliandao
endif
elseif(i1=='Oshd')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,yuanlifazhang)
call ASF(O5,it,2,silingshu)
call ASF(O5,it,3,dagongzhishenli)
call ASF(O5,it,4,xieeliandao)
call ASF(O5,it,5,Agha)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=silingshu3
set ACF[1]=dagongzhishenli5
endif
elseif(i1=='UC60')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,xiangweixie)
call ASF(O5,it,1,yingzhilingkan)
call ASF(O5,it,2,xianfengdun2)
call ASF(O5,it,3,Agha)
call ASF(O5,it,4,huiyao)
call ASF(O5,it,5,xiwadeshouhu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=qiangxizhuangjia
set ACF[1]=molongzhixin
endif
elseif(i1=='E02J')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,yuanlifazhang)
call ASF(O5,it,2,dagongzhishenli)
call ASF(O5,it,3,Agha)
call ASF(O5,it,4,xieeliandao)
call ASF(O5,it,5,xiwadeshouhu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=dagongzhishenli5
endif
elseif(i1=='E02H')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,yingzhilingkan)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,dagongzhishenli)
call ASF(O5,it,4,atuosizhigun)
call ASF(O5,it,5,xiwadeshouhu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xieeliandao
set ACF[1]=dagongzhishenli5
endif
elseif(i1=='O016')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,keledebishou)
call ASF(O5,it,3,yuanlifazhang)
call ASF(O5,it,4,dagongzhishenli)
call ASF(O5,it,5,xiwadeshouhu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
set ACF[1]=dagongzhishenli5
endif
elseif(i1=='H00U')then
if NU[O5]==1 then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,xiangweixie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,euldeshenshengfazhang)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,xieeliandao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=xiwadeshouhu
endif
else
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie3)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yuanlifazhang)
call ASF(O5,it,3,silingshu)
call ASF(O5,it,4,Agha)
call ASF(O5,it,5,xieeliandao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=silingshu3
set ACF[1]=dapao
endif
endif
elseif i1<'Nzzz' then
if(i1=='N01O' or i1=='N013' or i1=='N014' or i1=='N015')then
if OM7['p'+O5]then
set u=YOF(O5,it,(not AAF))
set OM7[192+O5]=true
else
set u=null
endif
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,donglixie1)
call ASF(O5,u,1,xiangweixie)
call ASF(O5,it,2,mozhang)
call ASF(O5,u,3,huiyao)
call ASF(O5,it,4,xianfengdun)
call ASF(O5,it,5,suiguchui)
call ASF(O5,u,6,jipin)
call ASF(O5,u,7,qiangxizhuangjia)
call ASF(O5,it,8,sanyeduijian)
call ASF(O5,u,9,sanyeduijian)
call ASF(O5,u,10,jingubang)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=anmie
set ACF[1]=shenyuanzhiren
endif
set u=null
elseif(i1=='N0M7')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,yingzhilingkan)
call ASF(O5,it,3,yuanlifazhang)
call ASF(O5,it,4,euldeshenshengfazhang)
call ASF(O5,it,5,silingshu)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=silingshu3
set ACF[1]=sanyeduijian
set ACF[2]=dagongzhishenli5
endif
elseif(i1=='N0MD')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,dagongzhishenli)
call ASF(O5,it,3,yuanlifazhang)
call ASF(O5,it,4,meikensimu)
call ASF(O5,it,5,xieeliandao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=leishenzhichui
set ACF[1]=dagongzhishenli5
endif
elseif(i1=='N0MK')then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,maidasizhishou)
call ASF(O5,it,1,mifaxie)
call ASF(O5,it,2,silingshu3)
call ASF(O5,it,3,dagongzhishenli)
call ASF(O5,it,4,xieeliandao)
call ASF(O5,it,5,dapao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=huanyingfu2
set ACF[1]=dagongzhishenli5
endif
elseif i1=='N0MU' or i1=='N0MW' then
if(OJ7[144+O5]==OR7)and(not OM7[160+O5])then
call ASF(O5,it,0,mifaxie)
call ASF(O5,it,1,mozhang)
call ASF(O5,it,2,zhangu)
call ASF(O5,it,3,xianfengdun)
call ASF(O5,it,4,kuangzhanfu)
call ASF(O5,it,5,huiyao)
endif
if(OJ7[144+O5]==OS7)or(OM7[160+O5])then
set ACF[0]=molongzhixin
set ACF[1]=qiangxizhuangjia
set ACF[2]=xiwadeshouhu
endif
endif
else
set J4=true
endif
if(not OM7['p'+O5])then
set OM7['p'+O5]=true
set OJ7[32+O5]=0
set OJ7[144+O5]=OQ7
set R04['p'+O5]=CreateTrigger()
call TriggerAddAction(R04['p'+O5],function ANF)
call SInt(GetHandleId(R04['p'+O5]),"p",O5)
return
endif
if(not J4)and((OJ7[144+O5]==OS7)or(OM7[160+O5]))and(Z_7(it))then
if AAF then
set OM7[176+O5]=true
else
if not OM7[80+O5]then
call AGF(O5)
set OM7[80+O5]=true
set OM7[176+O5]=true
endif
endif
set L37=true
if OJ7['p'+O5]!=0 and OJ7[432+O5]!=2 then
set YVF=-1
else
set YVF=0
endif
call XM7(O5,"tvv LUX enumerate check "+XP7(OJ7[464+O5])+XP7(OJ7[480+O5]))
call XM7(O5,"  "+GetObjectName(BU[LoadInteger(FY7,OJ7[448+O5],0)])+" - "+GetObjectName(BU[LoadInteger(FY7,OJ7[448+O5],1)]))
if(OJ7[464+O5]<OJ7[480+O5]+YVF)and(not OM7[48+O5])then
call XM7(O5,"tvv LUX enumerate start")
loop
exitwhen(OJ7[464+O5]>=OJ7[480+O5]+YVF)
set L37=false
set YWF=LoadInteger(FY7,OJ7[448+O5],OJ7[464+O5])
call XM7(O5,"tvv LUX enumerate "+XP7(OJ7[464+O5])+XP7(OJ7[480+O5])+GetObjectName(BU[YWF]))
set i=0
loop
exitwhen(i>23)or L37
if(OK7[O5*24+i]==YWF)then
set L37=true
elseif LA7(YWF,OK7[O5*24+i],false)then
set L37=true
endif
if L37 then
exitwhen true
endif
set i=i+1
endloop
if L37 then
call XM7(O5,"tvv LUX enumerate have")
set L37=AEF(O5,it,YWF,OI7[O5*24+i],true)
else
call XM7(O5,"tvv LUX enumerate buy")
set L37=ASF(O5,it,-2,YWF)
endif
if(L37)then
call XM7(O5,"tvv LUX enumerate OK")
set OJ7[464+O5]=OJ7[464+O5]+1
else
call XM7(O5,"tvv LUX enumerate failed")
exitwhen true
endif
endloop
endif
if OJ7['p'+O5]==0 and L37 then
if IsPlayerAlly(Player(O5),G8[0])then
set ALF="Sent|"
else
set ALF="Scrg|"
endif
set A6F=false
loop
set A3F=false
set YVF=1
if OM7[64+O5]then
set YVF=0
endif
set L37=true
loop
set i=Y9F(O5)
exitwhen((i<=YVF)or(L37==false))
set k=0
set i=0
set YX7=0
set A1F=0
loop
exitwhen i>9
if ACF[i]!=0 then
set YX7=i+1
endif
if ACF[10+i]!=0 then
set A1F=i+1
endif
set i=i+1
endloop
set i=0
set L37=false
loop
exitwhen(((not OM7[64+O5])and(i>=YX7+YX7))or(i>=YX7+YX7+A1F+A1F))
if i<YX7 then
set j=GetRandomInt(0,YX7)
elseif i<YX7+YX7 then
set j=i-YX7
elseif i<YX7+YX7+A1F then
set j=10+GetRandomInt(0,A1F)
else
set j=10+(i-(YX7+YX7+A1F))
endif
if ACF[j]!=0 then
if(ACF[j]==sadanzhixieli and(LBool(S44,G48(it)+"|Xb")))then
set ACF[j]=0
else
set k=LInt('CItm',ALF+I2S(ACF[j]))
set YWF=LInt('CILx',I2S(GetHandleId(it))+"|"+I2S(ACF[j]))
if(k>=1)or(((not YJF(ACF[j]))and(YWF>0))or(YWF>1))or(YFF(O5,it,ACF[j])==false and(ACF[j]==sadanzhixieli and AR7(it,zhipeitoukui))==false)then
set ACF[j]=0
else
set L37=ASF(O5,it,-2,ACF[j])
call SaveInteger(FY7,OJ7[448+O5],OJ7[480+O5],ACF[j])
set OJ7[480+O5]=OJ7[480+O5]+1
call XM7(O5,"tvv LUX save1 "+GetObjectName(BU[ACF[j]]))
exitwhen true
endif
endif
endif
set i=i+1
endloop
endloop
call AGF(O5)
if OJ7['p'+O5]==0 and(not A6F)then
set A6F=true
set L37=true
loop
exitwhen L37==false
set i=0
set j=0
set YX7=0
set k=0
set YWF=-1
set L37=false
loop
exitwhen(i>5)
set bj_lastCreatedItem=UnitItemInSlot(it,i)
set YVF=ZU7(bj_lastCreatedItem)
set j=0
if(LoadInteger(FY7,OJ7[224+O5],GetHandleId(bj_lastCreatedItem))!=0)or(LBool('CLxU',I2S(GetHandleId(it))+"|"+I2S(YVF)))then
elseif(YVF==liulangfashidoupeng)then
set j=10
elseif(YVF==tiaozhantoujin)then
if(LInt('CItm',ALF+I2S(dongchayandou))<=1)then
set j=10
else
set j=1
endif
elseif(YVF==zhipeitoukui)then
set j=8
elseif((YVF==zhangu or YVF==zhangu2)and(true or(not AR7(it,BU[qiangxizhuangjia]))and(LInt('CItm',ALF+I2S(qiangxizhuangjia))<=1)))then
set j=8
elseif(YVF==silingshu or YVF==silingshu2)then
set j=7
elseif(YVF==dagongzhishenli or YVF==dagongzhishenli2 or YVF==dagongzhishenli3 or YVF==dagongzhishenli4)then
set j=6
elseif((YVF==sanshizhiren and GetItemCharges(bj_lastCreatedItem)<=3)or YVF==sanshizhiren3)or(YVF==bizhang or YVF==bizhang2)or(YVF==xianfengdun or YVF==xianfengdun2)then
set j=5
elseif(YVF==shuijingjian)then
set j=4
elseif(YVF==suiguchui)then
set j=4
elseif(YVF==suduzhixue or YVF==donglixie1 or YVF==donglixie2 or YVF==donglixie3 or YVF==xiangweixie or YVF==jingmizhixie or YVF==jingmizhixie2 or YVF==mifaxie)and(not OM7[64+O5])then
set j=3
endif
if j>YX7 then
set YX7=j
set k=i
set YWF=YVF
endif
set i=i+1
endloop
if YX7!=0 then
if AAF then
call SaveInteger(FY7,OJ7[224+O5],GetHandleId(bj_lastCreatedItem),OJ7[48+O5])
endif
call SBool('CLxU',I2S(GetHandleId(it))+"|"+I2S(YWF),true)
call Y8F(O5,it)
if(YWF==liulangfashidoupeng)then
set L37=ASF(O5,it,-2,tiaozhantoujin)
set YWF=tiaozhantoujin
elseif(YWF==tiaozhantoujin)and(LInt('CItm',ALF+I2S(dongchayandou))<=1)then
set L37=ASF(O5,it,-2,dongchayandou)
set YWF=dongchayandou
elseif(YWF==zhipeitoukui)then
set L37=ASF(O5,it,-2,sadanzhixieli)
set YWF=sadanzhixieli
elseif(YWF==silingshu or YWF==silingshu2)then
set L37=ASF(O5,it,-2,silingshu3)
set YWF=silingshu3
elseif(YWF==dagongzhishenli or YWF==dagongzhishenli2 or YWF==dagongzhishenli3 or YWF==dagongzhishenli4)then
set L37=ASF(O5,it,-2,dagongzhishenli5)
set YWF=dagongzhishenli5
elseif(YWF==sanshizhiren or YWF==sanshizhiren3)then
set L37=ASF(O5,it,-2,sanshizhiren2)
set YWF=sanshizhiren2
elseif(YWF==shuijingjian)then
set L37=ASF(O5,it,-2,dapao)
set YWF=dapao
elseif(YWF==suiguchui)then
set L37=ASF(O5,it,-2,shenyuanzhiren)
set YWF=shenyuanzhiren
elseif(YWF==suduzhixue or YWF==donglixie1 or YWF==donglixie2 or YWF==donglixie3 or YWF==xiangweixie or YWF==jingmizhixie or YWF==jingmizhixie2 or YWF==mifaxie)then
set L37=ASF(O5,it,-2,yuanxingxie)
if L37 then
set A3F=true
endif
set YWF=yuanxingxie
elseif(YWF==tiaozhantoujin)then
set L37=ASF(O5,it,-2,dongchayandou)
set YWF=dongchayandou
elseif(YWF==zhangu or YWF==zhangu2)then
set OJ7[336+O5]=YWF
set L37=ASF(O5,it,-2,qiangxizhuangjia)
set YWF=qiangxizhuangjia
elseif(YWF==bizhang or YWF==bizhang2)or(YWF==xianfengdun or YWF==xianfengdun2)then
set OJ7[336+O5]=YWF
set L37=ASF(O5,it,-2,molongzhixin)
set YWF=molongzhixin
elseif(YWF==fengkuangmianju)then
set OJ7[336+O5]=YWF
set L37=ASF(O5,it,-2,sadanzhixieli)
set YWF=sadanzhixieli
endif
call SaveInteger(FY7,OJ7[448+O5],OJ7[480+O5],YWF)
set OJ7[480+O5]=OJ7[480+O5]+1
call XM7(O5,"tvv LUX save2 "+GetObjectName(BU[YWF]))
endif
endloop
endif
exitwhen(not A3F)
endloop
endif
endif
if(not J4)and(i!=OQ7)and(not OM7[64+O5])and(not AAF)and(not AR7(it,BU[QB]))and(GetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD)>=G14[QB])then
set YVF=YXF(O5,false)-5
if YVF>0 then
set j=YSF(O5,false,false)
if j!=-1 then
call Y1F(O5,it,OI7[O5*24+j],OK7[O5*24+j])
endif
endif
endif
if(not J4)and(i==OQ7)then
call AGF(O5)
set YVF=XLF(O5,it,false)
if GetHeroLevel(it)>=6 and OM7[64+O5]==false then
set YVF=YVF-1
endif
if YVF>0 and OV7 then
call SetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD)+G14[huifujiezhi])
call AFF(O5,it,huifujiezhi,false)
set YVF=YVF-1
endif
if AR7(it,BU[BA])then
call AFF(O5,it,BA,false)
endif
set OJ7[320+O5]=YVF
loop
exitwhen(YVF<=0)
call AFF(O5,it,tieshuzhigan,false)
set YVF=YVF-1
endloop
endif
set OM7[48+O5]=false
if not AAF then
if OJ7[48+O5]<OJ7[32+O5]then
set OJ7[48+O5]=OJ7[32+O5]
endif
if OM7[192+O5]then
call YRF(O5,null)
endif
call FlushChildHashtable(FY7,OJ7[224+O5])
endif
call FlushChildHashtable(FY7,OJ7[208+O5])
call FlushChildHashtable(FY7,OJ7[368+O5])
set OJ7[160+O5]=0
if AZF(O5,AAF)then
call AXF(O5)
elseif OJ7[432+O5]==2 then
call AGF(O5)
set OJ7[192+O5]=0
set OM7[128+O5]=false
set OM7[144+O5]=false
set KR4[32+O5]=KR4[O5]
endif
if((i1=='Eevi')or(i1=='Eevm'))or((i1=='N016')or(i1=='N017')or(i1=='N02B'))then
call XXF(it)
endif
endfunction
function A0F takes unit it returns nothing
local integer i1=GetUnitTypeId(it)
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer UP
local integer i
local integer j
local item ZV7=null
local boolean L37=true
local boolean A5F=false
local boolean A2F=(not AOF(O5))
if(not((Bz>=RD4-OT7)and(Bz>OJ7[176+O5])and(i1!='H00J')))or OM7[224+O5]then
return
endif
set OJ7[176+O5]=R2I(Bz)+OU7
set hq[592+O5]=Bz+HD7
set G0[320+O5]=false
if(GetUnitState(it,UNIT_STATE_LIFE)>1000. or GetUnitState(it,UNIT_STATE_LIFE)/ GetUnitState(it,UNIT_STATE_MAX_LIFE)>.8)==false and OJ7[96+O5]!=0 then
if(GetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD)>=G14[OJ7[96+O5]])then
call ABF(O5,it,true)
endif
endif
loop
exitwhen GetUnitState(it,UNIT_STATE_LIFE)>1000. or GetUnitState(it,UNIT_STATE_LIFE)/ GetUnitState(it,UNIT_STATE_MAX_LIFE)>.8
if GetUnitState(it,UNIT_STATE_LIFE)<=.405 or HA4[O5]then
set OJ7[176+O5]=0
return
endif
call TriggerSleepAction(1.)
endloop
if(VD4 and VH4[O5])then
if(UnitHasItem(it,VJ4[O5]))then
call DisableTrigger(GW4)
call UnitRemoveItem(it,VJ4[O5])
call RemoveItem(VJ4[O5])
call SetItemVisible(VJ4[O5],OW7)
call EnableTrigger(GW4)
endif
if(VI4[O5]!=null)then
call Y07(.2)
call UnitAddItem(it,VI4[O5])
endif
set VJ4[O5]=null
set VI4[O5]=null
endif
if(VN4[O5])then
if(AR7(it,BU[QB]))then
set VM4[O5]=bj_lastCreatedItem
call DisableTrigger(GW4)
call UnitRemoveItem(it,VM4[O5])
call SetItemPosition(VM4[O5],9999,-9999)
call SetItemVisible(VM4[O5],OW7)
call EnableTrigger(GW4)
set VM4[O5]=null
endif
if(VK4[O5]!=null)then
call Y07(.2)
call UnitAddItem(it,VK4[O5])
endif
set VN4[O5]=false
set VK4[O5]=null
endif
if(AR7(it,BU[bizhang])and(LState(it,"ArmletOfMordigan|Active")))then
call UnitUseItem(it,bj_lastCreatedItem)
endif
loop
call TriggerSleepAction(.1)
exitwhen Bz>OJ7[160+O5]
if GetWidgetLife(it)<.405 then
set ZV7=null
set OJ7[176+O5]=0
return
endif
endloop
if((Y4)and(hG[128+O5]>0))then
set UP=GetPlayerState(GetOwningPlayer(it),PLAYER_STATE_RESOURCE_GOLD)
if(UP>=hG[128+O5])then
call SetPlayerStateBJ(GetOwningPlayer(it),PLAYER_STATE_RESOURCE_GOLD,UP-hG[128+O5])
set hG[128+O5]=0
else
call SetPlayerStateBJ(GetOwningPlayer(it),PLAYER_STATE_RESOURCE_GOLD,0)
set hG[128+O5]=hG[128+O5]-UP
endif
endif
set UP=0
set F57=null
loop
set ZV7=UnitItemInSlot(it,UP)
set i=GetPlayerId(GetItemPlayer(ZV7))
if((ZV7!=null)and((i!=O5))and(i!=15))then
if IsUnitEnemy(it,Player(i))then
set i=O5
else
if F57==null then
set F57=CreateForce()
call ForceEnumAllies(F57,Player(O5),null)
endif
set bj_forLoopAIndex=GetPlayerId(GetItemPlayer(ZV7))
call FQ8(it,F57,GetObjectName('Y040')+W[bj_forLoopAIndex]+GetPlayerName(Player(bj_forLoopAIndex))+GetObjectName('Y041')+GetItemName(ZV7)+GetObjectName('Y042'))
endif
set j=ZU7(ZV7)
set F27=CreateItem(AU[j],GetUnitX(KR4[i]),GetUnitY(KR4[i]))
call SetItemPlayer(F27,GetItemPlayer(ZV7),false)
call SetItemCharges(F27,GetItemCharges(ZV7))
call RemoveItem(ZV7)
set ZV7=null
endif
set UP=UP+1
exitwhen(UP>=bj_MAX_INVENTORY)
endloop
if F57!=null then
call DestroyForce(F57)
set F57=null
endif
call TriggerSleepAction(.1)
set OM7[48+O5]=false
set OI7[304+O5]=null
if L37 and A2F and(OJ7[32+O5]<OJ7[48+O5])then
loop
set UP=LInt('CItm',I2S(GetHandleId(it))+"|s"+I2S(OJ7[32+O5]))
if UP!=0 then
if OJ7[32+O5]>OJ7[240+O5]then
set i=-2
else
set i=OJ7[32+O5]
endif
set L37=ASF(O5,it,i,UP)
endif
exitwhen OJ7[32+O5]==OJ7[48+O5]or UP==0 or(not L37)
endloop
elseif(not A2F)then
set L37=false
endif
call X_F(O5)
set OJ7[320+O5]=0
if L37 and OJ7[96+O5]!=0 and(not OM7[144+O5])then
set L37=(GetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD)>=G14[OJ7[96+O5]])
endif
if L37 and OJ7['p'+O5]!=0 and OJ7[144+O5]!=OR7 and(not AOF(O5))then
set L37=ASF(O5,it,-2,OJ7['p'+O5])
call AGF(O5)
endif
if A2F then
if(not PH7)and((LBool(S44,G48(it)+"|W"))and(GetHeroLevel(it)>6))and(not XCF(O5,it))then
if((AR7(it,BU[jingmizhixie]))or(i1=='Emns')or(i1=='E01B')or(i1=='H00I')or(i1=='N00R')or(XRF(it)))then
if(LBool(S44,G48(it)+"|G"))and(GetHeroLevel(it)>11)and(GetUnitState(it,UNIT_STATE_MAX_LIFE)>1500.)and(Bz>=LReal(S44,G48(it)+"|GTimer"))and(ATF(O5,it,zhenshibaoshi,true))then
call SReal(S44,G48(it)+"|GTimer",Bz+480.)
elseif((i1!='Naka')and(i1!='Hvsh')and(i1!='UC91')and(i1!='N01A'))then
if(YM7(i1)<=2 or GetRandomInt(1,3)==1)and(LInt(S44,G48(it)+"|DustCount")<R2I(SF7*I2R(LInt(S44,G48(it)+"|SentryCount"))))then
if ATF(O5,it,YB,true)then
call SInt(S44,G48(it)+"|DustCount",LInt(S44,G48(it)+"|DustCount")+1)
endif
else
if ATF(O5,it,GB,true)then
call SInt(S44,G48(it)+"|SentryCount",LInt(S44,G48(it)+"|SentryCount")+1)
endif
endif
endif
endif
endif
if(not A5F)and((not OM7[64+O5])and((GetHeroLevel(it)>8)or(GetUnitState(it,UNIT_STATE_MAX_LIFE)>1000))and(i1!='Emns')and(i1!='E01B')and(i1!='H00I')and(i1!='N00R'))then
if not(AR7(it,BU[QB])or AR7(KR4[O5],BU[QB]))and(not AS7(it))then
call AFF(O5,it,QB,true)
set A5F=true
endif
endif
call ATF(O5,it,liulangfashidoupeng,(((GetHeroLevel(it)<17)and(LBool(S44,G48(it)+"|X"))and(i1!='U00F')and(i1!='Edem')and(i1!='EC77'))and((not AR7(it,BU[tiaozhantoujin]))and(not AR7(it,BU[dongchayandou])))))
if L37 or(OJ7[32+O5]<OJ7[48+O5])then
call ABF(O5,it,false)
endif
set OJ7[192+O5]=0
set OM7[128+O5]=false
set OM7[144+O5]=false
set OM7[320+O5]=true
call AGF(O5)
set OI7[304+O5]=null
if(not A5F)and((not OM7[64+O5])and((GetHeroLevel(it)>10)or(GetUnitState(it,UNIT_STATE_MAX_LIFE)>1000))and(i1!='Emns')and(i1!='E01B')and(i1!='H00I')and(i1!='N00R'))and(not AS7(it))then
if not(AR7(it,BU[QB])or AR7(KR4[O5],BU[QB]))and(not AS7(it))then
call AFF(O5,it,QB,true)
set A5F=true
endif
endif
if(PX4)then
call ATF(O5,it,BA,(GetHeroLevel(it)<8)and(GetUnitState(it,UNIT_STATE_MAX_LIFE)<1000))
else
call ATF(O5,it,ZA,(GetHeroLevel(it)<8)and(GetUnitState(it,UNIT_STATE_MAX_LIFE)<1000))
endif
call Y4F(O5,1)
if AR7(it,BU[QB])and GetItemCharges(bj_lastCreatedItem)==1 then
call AFF(O5,it,QB,false)
endif
if AR7(it,BU[GB])and GetItemCharges(bj_lastCreatedItem)==1 then
call AFF(O5,it,GB,false)
endif
if AR7(it,BU[BA])and GetItemCharges(bj_lastCreatedItem)==1 then
call AFF(O5,it,BA,false)
endif
if AR7(it,BU[ZA])and GetItemCharges(bj_lastCreatedItem)==1 then
call AFF(O5,it,ZA,false)
endif
if AR7(it,BU[zhangu2])then
call AFF(O5,it,EU4,false)
endif
call Y4F(O5,0)
call X_F(O5)
call AWF(O5)
call Y8F(O5,it)
call YRF(O5,null)
endif
set OJ7[176+O5]=0
set it=null
set ZV7=null
endfunction
function A_F takes nothing returns nothing
local unit u
local integer j
local integer YX7
local integer k
local integer O5=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)then
call A0F(GetTriggerUnit())
elseif false and(Bz>=OJ7[160+O5])and(Bz>OJ7[176+O5])and(UX8(GetTriggerUnit()))then
set u=GetTriggerUnit()
set OJ7[160+O5]=R2I(Bz)+OU7
call Y8F(O5,u)
set j=6
set k=OJ7[128+O5]-1
loop
exitwhen j>k
if OI7[O5*24+j]!=null and(LoadBoolean(FY7,OJ7[256+O5],GetHandleId(OI7[O5*24+j])))then
set YX7=YBF(O5,u,OK7[O5*24+j],OI7[O5*24+j],false,true,false)
if YX7!=-1 and YX7<6 then
set OI7[O5*24+YX7]=OI7[O5*24+j]
set OK7[O5*24+YX7]=OK7[O5*24+j]
endif
call SetItemVisible(OI7[O5*24+j],OW7)
set OI7[O5*24+j]=null
endif
set j=j+1
endloop
set u=null
set OJ7[160+O5]=0
endif
endfunction
function B4F takes nothing returns nothing
local integer O5=1
local integer B7F=11
local boolean L37=false
local boolean J4=true
local integer i=R2I(Bz)+OU7
loop
exitwhen O5>B7F
if O5==6 then
set O5=7
endif
set L37=true
set J4=false
if KR8(Player(O5))and Y7[O5]!=null and(Bz>OJ7[160+O5])and(Bz>OJ7[176+O5])and(Z47(Y7[O5],h9[16+O5])>1200)then
if L37 and OJ7[96+O5]!=0 then
set L37=(GetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD)>=G14[OJ7[96+O5]])
endif
if((L37)and(OJ7[96+O5]!=0)and(OJ7[144+O5]==OR7)and(eY[O5]==1)and(eY[80+O5]==1 or eY[80+O5]==2)and(OJ7[32+O5]==OJ7[48+O5])and(XBF(OJ7[96+O5]))and(not GZ[160+O5])and((not AS7(Y7[O5]))or(OJ7[320+O5]>0)))and(not OM7[288+O5])then
set OM7[240+O5]=true
set L37=false
elseif OM7[240+O5]then
set OM7[240+O5]=false
set bj_forLoopAIndex=GetUnitUserData(h8[O5])
if bj_forLoopAIndex>'d' then
call MH8(Y7[O5])
endif
endif
if L37 and OJ7['p'+O5]!=0 and OJ7[144+O5]!=OR7 and(not AOF(O5))then
set OJ7[160+O5]=i
set OJ7[176+O5]=i
set OM7[48+O5]=true
set L37=ASF(O5,Y7[O5],-2,OJ7['p'+O5])
if L37 then
set OJ7['p'+O5]=0
endif
set OJ7[160+O5]=0
set OJ7[176+O5]=0
set OM7[48+O5]=false
set J4=true
endif
if L37 then
set OJ7[176+O5]=i
call ABF(O5,Y7[O5],true)
set OJ7[176+O5]=0
elseif J4 then
call FlushChildHashtable(FY7,OJ7[208+O5])
endif
if(OJ7[192+O5]>OP7)and(OM7[144+O5])then
set OM7[128+O5]=true
endif
if AZF(O5,true)then
call AXF(O5)
endif
endif
set O5=O5+1
endloop
endfunction
function B8F takes nothing returns nothing
if(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))!=MAP_CONTROL_USER and RY4[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]==false)then
if((GetItemPlayer(GetManipulatedItem())!=null)and(GetItemPlayer(GetManipulatedItem())!=Player(15))and(GetItemPlayer(GetManipulatedItem())!=GetOwningPlayer(GetTriggerUnit()))and((GetItemType(GetManipulatedItem())==ITEM_TYPE_POWERUP)or(Z47(GetTriggerUnit(),DH8(GetTriggerUnit()))<=2000.)))then
call UnitAddItem(Y7[GetPlayerId(GetItemPlayer(GetManipulatedItem()))],GetManipulatedItem())
elseif((GetItemPlayer(GetManipulatedItem())==null)or(GetItemPlayer(GetManipulatedItem())==Player(15)))then
call SetItemPlayer(GetManipulatedItem(),GetOwningPlayer(GetTriggerUnit()),false)
endif
endif
endfunction
function B9F takes integer O5,real x,real y returns nothing
local unit it=CreateUnit(Player(15),'e00C',x,y,270.)
local texttag t=null
call UnitAddAbility(it,'Aloc')
call UnitAddAbility(it,'A04R')
call UnitAddAbility(it,'A0P4')
call SetUnitUserData(it,O5)
set h7[O5]=it
call SetUnitX(it,x)
call SetUnitY(it,y)
if(((O5>10)and(O5<18))or((O5>30)and(O5<40))or((O5>50)and(O5<60)))then
call GroupAddUnit(ii,it)
endif
set it=null
endfunction
function BDF takes integer O5,integer MD8,integer ME8,real x,real y returns nothing
call B9F(O5,x,y)
set hj[O5]=MD8
set hj[256+O5]=ME8
endfunction
function BEF takes integer i,boolean YV7,real BFF returns integer
if i>5 and i<11 then
set i=11
elseif i>17 and i<25 then
set i=17
elseif i>25 and i<31 then
set i=31
elseif i>39 and i<45 then
set i=39
elseif i>45 and i<51 then
set i=51
elseif i>59 and i<'d' then
set i=59
endif
if BFF>2000 then
return i
endif
if i>=11 and i<=17 then
if YV7 then
if i>15 and PL4==0 then
set i=15
elseif i>16 and PL4<=1 then
set i=16
endif
else
if i<13 and PC4==0 then
set i=13
elseif i<12 and PC4<=1 then
set i=12
endif
endif
elseif i>=31 and i<=39 then
if YV7 then
if i>35 and P14==0 then
set i=35
elseif i>37 and P14<=1 then
set i=37
endif
else
if i<34 and P34==0 then
set i=34
elseif i<33 and P34<=1 then
set i=33
endif
endif
elseif i>=51 and i<=59 then
if YV7 then
if i>57 and P04==0 then
set i=57
elseif i>58 and P04<=1 then
set i=58
endif
else
if i<55 and P64==0 then
set i=55
elseif i<52 and P64<=1 then
set i=52
endif
endif
endif
return i
endfunction
function BGF takes integer O5,integer i,integer k,boolean YV7 returns integer
if(i==31)or(i==32)then
return 334
elseif(i==33)then
return 328
elseif(i==34)then
if(h8[96+O5]==null or(GetUnitX(h7[35])-GetUnitY(h8[96+O5]))<=2100.)and G0[208+O5]then
return 329
else
set G0[208+O5]=false
return 326
endif
elseif(i==35)or(i==36)then
return 329
elseif(i==37)or(i==38)or(i==39)then
return 330
elseif(i==51)or(i==52)or(i==53)then
return 331
elseif(i==54)or(i==55)or(i==56)then
return 332
elseif(i==57)then
if(h8[96+O5]==null or(GetUnitY(h8[96+O5])-GetUnitX(h7[55]))<=2850.)and G0[208+O5]then
return 332
else
set G0[208+O5]=false
return 327
endif
elseif(i==58)or(i==59)then
return 333
elseif(k==1)then
if(i==11)or(i==12)then
return 334
elseif(i==13)then
return 335
elseif(i==14)then
if YV7 then
return 336
else
return 335
endif
elseif(i==15)then
return 336
elseif(i==16)or(i==17)then
return 337
endif
elseif(k==2)then
if(i==11)or(i==12)then
return 338
elseif(i==13)then
return 339
elseif(i==14)then
if YV7 then
return 341
else
return 340
endif
elseif(i==15)or(i==16)then
return 341
elseif(i==17)then
return 342
endif
endif
return 0
endfunction
function BHF takes integer O5,integer i,integer j returns boolean
if i==j then
return true
elseif(i==328 or i==334 or i==335 or i==326)and(j==328 or j==334 or j==335 or j==326)then
return true
elseif(i==329 or i==330 or i==326)and(j==329 or j==330 or j==326)then
return true
elseif(i==331 or i==332 or i==327)and(j==331 or j==332 or j==327)then
return true
elseif eY[272+O5]==0 then
if(i==338 or i==339 or i==340 or i==331 or i==332)and(j==338 or j==339 or j==340 or j==331 or j==332)then
return true
elseif(i==329 or i==330 or i==336 or i==337)and(j==329 or j==330 or j==336 or j==337)then
return true
endif
endif
return false
endfunction
function BIF takes unit Y47,integer O5 returns boolean
return((not AOF(O5))and(not OM7[64+O5])and(GetUnitLevel(Y47)>5)and AR7(Y47,BU[QB])==false and AS7(Y47)==false and OM7[320+O5]and GetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD)>200)
endfunction
function BJF takes nothing returns nothing
local unit Y47=GetTriggerUnit()
local integer O5=GetPlayerId(GetOwningPlayer(Y47))
local integer UP=LInt(GetHandleId(GetTriggeringTrigger()),"SentNum")
local integer i
local boolean BKF=false
if GetPlayerController(Player(O5))==MAP_CONTROL_USER and Y47==Y7[O5]then
if(IsUnitAlly(Y47,G8[0]))then
set UP=LInt(GetHandleId(GetTriggeringTrigger()),"SentNum")
else
set UP=LInt(GetHandleId(GetTriggeringTrigger()),"ScrgNum")
endif
set h8[O5]=h7[UP+1]
set h8[80+O5]=h7[UP]
set h9[O5]=h7[UP-1]
set h9[16+O5]=h7[hj[UP]]
set h8[16+O5]=h7[hj[256+UP]]
endif
if((GetPlayerController(Player(O5))==MAP_CONTROL_COMPUTER)and(IsUnitType(Y47,UNIT_TYPE_HERO)))then
if(IsUnitAlly(Y47,G8[0]))then
set UP=LInt(GetHandleId(GetTriggeringTrigger()),"SentNum")
else
set UP=LInt(GetHandleId(GetTriggeringTrigger()),"ScrgNum")
endif
if(eY[O5]==9)then
if(not Z57(Y47))then
set G0[176+O5]=true
endif
if((h8[128+O5]==h7[UP])and(eY[272+O5]==0))then
set h8[O5]=h7[UP]
set eY[O5]=1
elseif((h8[48+O5]==h7[UP]and(eY[272+O5]<=1))or((eY[272+O5]==1)and(G0[176+O5])))then
if eY[272+O5]==1 then
set h8[32+O5]=h7[BGF(O5,LInt(GetHandleId(GetTriggeringTrigger()),"SentNum"),eY[304+O5],(IsUnitAlly(Y47,G8[0])))]
endif
set h8[48+O5]=h8[32+O5]
set h9[O5]=DH8(Y47)
if(iU(Y47))then
if ZL7(Y47)and GetUnitAbilityLevel(Y47,'A0IH')<1 then
if G0[176+O5]then
call D48(Y47,851986,h8[48+O5])
else
if hq[640+O5]<=Bz then
call D48(Y47,851986,h9[O5])
else
call D48(Y47,851983,h9[O5])
endif
endif
endif
endif
elseif eY[272+O5]>=4 then
set F17=true
if(h8[128+O5]==h7[UP])then
set eY[O5]=1
elseif(h8[48+O5]==h7[UP])and(eY[272+O5]==5)then
set h8[48+O5]=h8[128+O5]
elseif(h8['p'+O5]==h7[UP])and(eY[272+O5]==4)then
set eY[272+O5]=5
set i=GetUnitUserData(h8['p'+O5])
if IsUnitAlly(Y47,G8[0])then
if(i>35 and i<40)then
set h8[48+O5]=h7[35]
elseif(i>55 and i<60)then
set h8[48+O5]=h7[55]
endif
else
if(i>30 and i<35)then
set h8[48+O5]=h7[35]
elseif(i>50 and i<55)then
set h8[48+O5]=h7[55]
endif
endif
set h8[32+O5]=h8[48+O5]
else
set F17=false
endif
if F17 then
if h8[96+O5]!=null then
call VTF(O5,h8[96+O5],true,true)
endif
if ZL7(Y47)and GetUnitAbilityLevel(Y47,'A0IH')<1 then
if(h8[96+O5]!=null and Z57(h8[96+O5]))then
call IssueTargetOrderById(Y47,851983,h8[96+O5])
else
call D48(Y47,851983,h8[48+O5])
endif
endif
endif
endif
elseif eY[O5]==1 and Y47==Y7[O5]and(((UP==34 and P24>4)or UP==35 or(UP==56 and P_4>6)or UP==57)or((UP==135 and P24<=4)or UP==136 or(UP==153 and P_4<=6)or UP==154))and(OM7[240+O5]or BIF(Y47,O5))then
set bj_lastLoadedUnit=Y47
set bj_lastLoadedUnit=AJ7(1200,L_7(Y47),Condition(function GT8))
if(bj_lastLoadedUnit==null)then
call XM7(O5,"Sideshopping")
if UP==34 or UP==35 or UP==136 or UP==135 then
set h8[O5]=h7[353]
elseif UP==56 or UP==57 or UP==154 or UP==153 then
set h8[O5]=h7[354]
endif
set OM7[256+O5]=true
if GetUnitAbilityLevel(Y47,'A0IH')<1 then
call D48(Y47,851986,h8[O5])
endif
endif
elseif eY[O5]==1 and is(Y47)and h4[O5]==null then
if((hj[256+UP]==18)or(hj[UP]==10))then
set i=UP-10
if(P54==i)then
set BKF=true
endif
elseif((hj[256+UP]==40)or(hj[UP]==30))then
set i=UP-30
if(P24==i)then
set BKF=true
endif
elseif((hj[256+UP]==60)or(hj[UP]==50))then
set i=UP-50
if(P_4==i)then
set BKF=true
endif
endif
set bj_lastLoadedUnit=Y47
if BKF and AR7(Y47,BU[GB])and AJ7(2000.,L_7(h7[UP]),Condition(function JD8))==null and AJ7(800.,L_7(h7[UP]),Condition(function AQ7))==null then
call UnitUseItemPoint(Y47,bj_lastCreatedItem,GetUnitX(h7[UP]),GetUnitY(h7[UP]))
endif
endif
if((h8[O5]==h7[UP])or(h9[O5]==h7[UP])or((h8[16+O5]==h7[hj[256+UP]])and(h9[16+O5]==h7[hj[UP]]))or(h8[16+O5]==h7[hj[UP]])or(h9[16+O5]==h7[hj[256+UP]]))and(not OM7[256+O5])then
call MF8(Y47,UP)
endif
if((A87(Y47))and(not Id(O5))and(GetUnitCurrentOrder(Y47)==851986))then
if((UP==38)or(UP==37)or(UP==36))then
call MF8(Y47,32)
elseif((UP==138)or(UP==137)or(UP==136))then
call MF8(Y47,132)
elseif((UP==58)or(UP==57)or(UP==56))then
call MF8(Y47,52)
elseif((UP==158)or(UP==157)or(UP==156))then
call MF8(Y47,152)
endif
endif
elseif(O5==GetPlayerId(G8[0]))then
if((hj[256+UP]==18)or(hj[UP]==10))then
set i=UP-10
if(P54+1==i)then
set P54=i
endif
elseif((hj[256+UP]==40)or(hj[UP]==30))then
set i=UP-30
if(P24+1==i)then
set P24=i
endif
elseif((hj[256+UP]==60)or(hj[UP]==50))then
set i=UP-50
if(P_4+1==i)then
set P_4=i
endif
endif
elseif(O5==GetPlayerId(N8[0]))then
if((hj[256+UP]==18)or(hj[UP]==10))then
set i=UP-10
if(P54-1==i)then
set P54=i
endif
elseif((hj[256+UP]==40)or(hj[UP]==30))then
set i=UP-30
if(P24-1==i)then
set P24=i
endif
elseif((hj[256+UP]==60)or(hj[UP]==50))then
set i=UP-50
if(P_4-1==i)then
set P_4=i
endif
endif
endif
set Y47=null
endfunction
function BMF takes nothing returns boolean
return((((GetOwningPlayer(GetTriggerUnit())==G8[0])or(GetOwningPlayer(GetTriggerUnit())==N8[0]))and(not IsCourier(GetTriggerUnit()))and(not IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)))or((not IsUnitIllusion(GetTriggerUnit()))and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))))
endfunction
function BNF takes nothing returns boolean
return((GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER)and(not IsUnitIllusion(GetTriggerUnit()))and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)))
endfunction
function BOF takes integer BPF,integer BQF returns nothing
local trigger t
local integer i=BPF
local boolexpr Ig=Condition(function BMF)
loop
set t=CreateTrigger()
call TriggerRegisterUnitInRange(t,h7[i],400.,R24)
call SInt(GetHandleId(t),"SentNum",i)
call SInt(GetHandleId(t),"ScrgNum",hj[512+i])
call TriggerAddCondition(t,Ig)
call TriggerAddAction(t,function BJF)
set i=i+1
exitwhen i>BQF
endloop
set t=null
set Ig=null
endfunction
function BRF takes integer O5,integer UP,integer i,boolean YV7 returns integer
local integer j
local integer k
if UP==326 then
if i==34 then
set j=34
else
set j=BGF(O5,i,1,YV7)
endif
elseif UP==327 then
if i==57 then
set j=57
else
set j=BGF(O5,i,2,YV7)
endif
else
set k=eY[304+O5]
set j=BGF(O5,i,k,YV7)
if(j!=0)and(UP!=j)then
if BHF(O5,UP,j)then
elseif(k==1)then
set j=326
elseif(k==2)then
set j=327
endif
else
set j=i
endif
endif
return j
endfunction
function BSF takes integer O5,boolean YV7,integer UP returns nothing
local integer i
local integer j
local boolexpr BTF=null
local unit Y47=null
if eY[272+O5]>3 then
return
endif
set eY[272+O5]=3
set i=1
set F17=true
set bj_lastLoadedUnit=h7[W97(YV7,0,'d')]
if h8[96+O5]!=null and Z_7(h8[96+O5])then
set j=GetPlayerId(GetOwningPlayer(h8[96+O5]))
endif
if((hq[656+O5]<Bz)or((h8[96+O5]!=null)and(Z47(h8[96+O5],h8[j])+400<Z47(h8[96+O5],h9[j]))))then
loop
exitwhen i>5
if YV7 then
set j=GetPlayerId(G8[i])
else
set j=GetPlayerId(N8[i])
endif
if((Y7[j]!=null)and(GetWidgetLife(Y7[j])>.405)and(eY[272+j]!=0)and(eY[j]==9)and(eY[288+j]==eY[288+O5])and(A87(Y7[j])==false))then
if eY[272+j]<3 then
set F17=false
call XK7("gank wait "+I2S(j))
endif
endif
set i=i+1
endloop
endif
if F17 then
if(h8[96+O5]!=null and GetWidgetLife(h8[96+O5])>.405 and(eY[32+GetPlayerId(GetOwningPlayer(h8[96+O5]))]>0))then
set bj_lastLoadedUnit=h8[96+O5]
else
set bj_lastLoadedUnit=h8['p'+O5]
endif
set BTF=Condition(function H88)
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(Y7[O5]),GetUnitY(Y7[O5]),1800.,BTF)
call GroupClear(H8)
call GroupEnumUnitsInRange(H8,GetUnitX(bj_lastLoadedUnit),GetUnitY(bj_lastLoadedUnit),1800.,BTF)
call DestroyBoolExpr(BTF)
call GroupAddGroup(H8,iA)
set BTF=null
set j=0
loop
set Y47=FirstOfGroup(iA)
exitwhen Y47==null
call GroupRemoveUnit(iA,Y47)
if GetUnitTypeId(Y47)!='H00J' and GetUnitLifePercent(Y47)>50 then
if IsUnitAlly(Y47,Player(O5))then
set j=j+1
elseif eY[32+GetPlayerId(GetOwningPlayer(Y47))]>0 then
set j=j-1
endif
endif
endloop
call XK7("gank begin2 "+I2S(j))
if YV7 then
set F57=E8
else
set F57=F8
endif
if j>=0 then
if YV7 then
set bj_lastLoadedUnit=null
if(h8[96+O5]!=null and GetWidgetLife(h8[96+O5])>.405 and IsUnitVisibleEx(h8[96+O5],G8[0]))then
set bj_lastLoadedUnit=h8[96+O5]
else
set bj_lastLoadedUnit=h8['p'+O5]
endif
else
if(h8[96+O5]!=null and GetWidgetLife(h8[96+O5])>.405 and IsUnitVisibleEx(h8[96+O5],N8[0]))then
set bj_lastLoadedUnit=h8[96+O5]
else
set bj_lastLoadedUnit=h8['p'+O5]
endif
endif
call FU8(F57,GetUnitX(bj_lastLoadedUnit),GetUnitY(bj_lastLoadedUnit),O5)
set h8[48+O5]=h8['p'+O5]
set h8[32+O5]=h8[48+O5]
set bj_forLoopAIndex=GetPlayerId(GetOwningPlayer(h8[96+O5]))
set i=1
loop
exitwhen i>5
if YV7 then
set j=GetPlayerId(G8[i])
else
set j=GetPlayerId(N8[i])
endif
if(eY[272+j]!=0)and(eY[j]==9)and(eY[288+j]==eY[288+O5])then
set h8[96+j]=h8[96+O5]
if GetWidgetLife(h8[96+O5])>.405 and IsUnitVisibleEx(h8[96+O5],Player(O5))then
call VTF(j,h8[96+j],true,true)
endif
set h8[48+j]=h8[48+O5]
set h8[32+j]=h8[32+O5]
if not ZL7(Y7[j])then
if h4[j]!=null then
call IssueTargetOrderById(Y7[j],851983,h4[j])
else
call D48(Y7[j],851983,h8[48+j])
endif
endif
set eY[272+j]=4
set hq[624+j]=Bz+HP7
set GZ[128+j]=true
set G0[128+j]=true
set G0[256+j]=true
call FV8(Y7[j],F57)
if h8[96+O5]!=null then
call FQ8(Y7[j],F57,GetObjectName('Y010')+W[bj_forLoopAIndex]+GetUnitName(h8[96+O5])+"|r")
else
call FQ8(Y7[j],F57,GetObjectName('Y009')+YR7(eY[288+O5],false)+"|r")
endif
endif
set i=i+1
endloop
else
call XK7("gank cancel "+I2S(GetUnitUserData(h8[32+O5]))+I2S(GetUnitUserData(h8[128+O5])))
set bj_lastLoadedUnit=h7[BRF(O5,GetUnitUserData(h8[32+O5]),GetUnitUserData(h8[128+O5]),YV7)]
if h8[32+O5]==bj_lastLoadedUnit then
set h8[32+O5]=h8[128+O5]
call XK7("gank cancel0")
else
set h8[32+O5]=bj_lastLoadedUnit
call XK7("gank cancel1 "+I2S(GetUnitUserData(bj_lastLoadedUnit)))
endif
set i=1
loop
exitwhen i>5
if YV7 then
set j=GetPlayerId(G8[i])
else
set j=GetPlayerId(N8[i])
endif
if(eY[272+j]!=0)and(eY[j]==9)and(eY[288+j]==eY[288+O5])then
set eY[272+j]=0
set h8[128+j]=h8[128+O5]
set h8[32+j]=h8[32+O5]
set h8[48+j]=h8[32+j]
if ZL7(Y7[O5])then
call D48(Y7[O5],851986,h8[32+j])
endif
call FV8(Y7[j],F57)
call FQ8(Y7[j],F57,GetObjectName('Y008'))
endif
set i=i+1
endloop
endif
else
if not G0[192+O5]then
set hq[656+O5]=Bz+HO7
set G0[192+O5]=true
endif
set h8[48+O5]=h7[UP]
if ZL7(Y7[O5])then
call IssueImmediateOrderById(Y7[O5],851993)
endif
endif
set Y47=null
endfunction
function BUF takes boolean YV7,integer O5,unit m5 returns nothing
local integer i=0
local integer j=0
local real BVF=Z47(Y7[O5],m5)
local real BG7
set i=1
loop
exitwhen i>11
if YV7 then
set j=GetPlayerId(G8[i])
else
set j=GetPlayerId(N8[i])
endif
if((Y7[j]!=null)and(GetWidgetLife(Y7[j])>.405)and(h4[j]!=null)and(eY[j]==1 or eY[j]>9)and(eY[64+j]==eY[288+O5]or eY[80+j]==eY[288+O5])and(A87(Y7[j])==false))then
set BG7=Z47(Y7[j],m5)
if BG7>BVF-400 then
set h4[j]=m5
set hq[624+j]=Bz+HP7
if is(Y7[j])then
call IssueTargetOrderById(Y7[j],851983,m5)
endif
endif
endif
set i=i+1
endloop
endfunction
function BWF takes nothing returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
return((GetTriggerUnit()==Y7[O5])and(eY[O5]==9)and(KR8(Player(O5))))
endfunction
function BXF takes nothing returns nothing
local unit Y47=GetTriggerUnit()
local integer O5=GetPlayerId(GetOwningPlayer(Y47))
local integer UP
local integer i
local integer j
local integer k
local boolean YV7
set UP=LInt(GetHandleId(GetTriggeringTrigger()),"Num")
set YV7=IsUnitAlly(Y47,G8[0])
if(eY[272+O5]==0)or((eY[272+O5]<=3)and(h8[48+O5]==h7[UP]))then
if eY[272+O5]==0 then
set i=GetUnitUserData(h8[128+O5])
else
set i=GetUnitUserData(h8['p'+O5])
endif
set j=BRF(O5,UP,i,YV7)
if(eY[272+O5]==0)then
set h8[48+O5]=h7[j]
set h8[32+O5]=h8[48+O5]
if ZL7(Y7[O5])then
call D48(Y7[O5],851983,h8[48+O5])
endif
else
if j<'d' then
call BSF(O5,YV7,UP)
else
set eY[272+O5]=2
set h8[48+O5]=h7[j]
set h8[32+O5]=h8[48+O5]
if is(Y7[O5])then
call D48(Y7[O5],851983,h8[48+O5])
endif
endif
endif
endif
set Y47=null
endfunction
function BYF takes integer k,integer j returns nothing
local trigger t
local integer i=k
local boolexpr BZF=Condition(function BWF)
loop
exitwhen i>j
set t=CreateTrigger()
call TriggerRegisterUnitInRange(t,h7[i],400.,R24)
call SInt(GetHandleId(t),"Num",i)
call TriggerAddCondition(t,BZF)
call TriggerAddAction(t,function BXF)
set i=i+1
endloop
set BZF=null
set t=null
endfunction
function BAF takes nothing returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
return((GetTriggerUnit()==Y7[O5])and(KR8(Player(O5))))
endfunction
function BBF takes nothing returns nothing
local unit it=GetTriggerUnit()
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer UP=LInt(GetHandleId(GetTriggeringTrigger()),"Num")
if IsJWPlayer(Player(O5))then
if UP==353 then
call MF8(it,34)
elseif UP==354 then
call MF8(it,56)
endif
else
if UP==353 then
call MF8(it,135)
elseif UP==354 then
call MF8(it,153)
endif
endif
if(is(it))then
set bj_lastLoadedUnit=it
set bj_lastLoadedUnit=AJ7(700,L_7(h8[O5]),Condition(function GT8))
if(bj_lastLoadedUnit!=null)then
call D48(it,851986,h9[O5])
else
call D48(it,851983,h8[O5])
endif
endif
if(BIF(it,O5))then
set OM7[320+O5]=ATF(O5,it,QB,true)
endif
if(OM7[240+O5])then
if(OJ7[144+O5]==OR7)and(OM7[224+O5]==false)then
set OJ7[432+O5]=1
set OJ7[176+O5]=R2I(Bz)+OU7
call ABF(O5,it,false)
set OJ7[176+O5]=0
set OJ7[432+O5]=0
endif
set OM7[240+O5]=false
set OM7[256+O5]=false
endif
set it=null
endfunction
function BCF takes integer k,integer j returns nothing
local trigger t
local integer i=k
local boolexpr BZF=Condition(function BAF)
loop
exitwhen i>j
set t=CreateTrigger()
call TriggerRegisterUnitInRange(t,h7[i],200.,R24)
call SInt(GetHandleId(t),"Num",i)
call TriggerAddCondition(t,BZF)
call TriggerAddAction(t,function BBF)
set i=i+1
endloop
set BZF=null
set t=null
endfunction
function B3F takes nothing returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
local integer UP=LInt(GetHandleId(GetTriggeringTrigger()),"Num")
if(((UP==311)or(UP==312))and(eY[O5]==1))then
if(IsUnitAlly(GetTriggerUnit(),G8[0]))then
if(h8[O5]==h7[36])then
call MF8(GetTriggerUnit(),34)
endif
else
if(h8[O5]==h7[136])then
call MF8(GetTriggerUnit(),134)
endif
endif
elseif(UP==313)then
if(IsUnitAlly(GetTriggerUnit(),N8[0]))then
if(h8[O5]==h7[136])then
set h9[O5]=h7[135]
endif
endif
elseif(UP==314)then
if(IsUnitAlly(GetTriggerUnit(),G8[0]))then
if(h8[O5]==h7[36])then
set h9[O5]=h7[35]
endif
else
if(h8[O5]==h7[136])then
call MF8(GetTriggerUnit(),135)
endif
endif
elseif(((UP==321)or(UP==322))and(eY[O5]==1))then
if(IsUnitAlly(GetTriggerUnit(),G8[0]))then
if(h8[O5]==h7[56])then
call MF8(GetTriggerUnit(),54)
endif
else
if(h8[O5]==h7[156])then
call MF8(GetTriggerUnit(),154)
endif
endif
elseif((UP==315)and(h8[32+O5]==h7[315])and(eY[O5]==10))then
set h8[32+O5]=h9[32+O5]
call D48(GetTriggerUnit(),851986,h8[32+O5])
elseif((UP==325)and(h8[32+O5]==h7[325])and(eY[O5]==10))then
set h8[32+O5]=h9[32+O5]
call D48(GetTriggerUnit(),851986,h8[32+O5])
endif
endfunction
function B6F takes integer BPF returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitInRange(t,h7[BPF],400.,R24)
call SInt(GetHandleId(t),"Num",BPF)
call TriggerAddCondition(t,Condition(function BNF))
call TriggerAddAction(t,function B3F)
endfunction
function BLF takes nothing returns nothing
call B9F(0,-7100,-6985)
call B9F('d',6644,6239)
call B9F(1,-5088.,-6426.)
call B9F('e',4826.,4177.)
call B9F(2,-4290.,-4302.)
call B9F(3,-3288.,-6529.)
call B9F(4,-6238.,-3594.)
call B9F('f',3493.,3180.)
call B9F('g',3041.,5967.)
call B9F('h',6041.,2585.)
set h7[10]=h7[0]
set h7['v']=h7[1]
call BDF(11,10,14,-4166.,-4124.)
call BDF(12,10,14,-2897.,-2633.)
call BDF(13,10,14,-1363.,-1425.)
call BDF(14,10,18,-594.,-602.)
call BDF(15,14,18,553.,-55.)
call BDF(16,14,18,1858.,1109.)
call BDF(17,14,18,3207.,2741.)
call M98('o',17,'n','r')
call M98('p',16,'n','r')
call M98('q',15,'n','r')
call M98('r',14,'n','v')
call M98('s',13,'r','v')
call M98('t',12,'r','v')
call M98('u',11,'r','v')
set h7[18]=h7['e']
set h7['n']=h7['d']
set h7[30]=h7[0]
set h7[140]=h7[1]
call BDF(31,30,35,-6267.,-3320.)
call BDF(32,30,35,-6377.,-1771.)
call BDF(33,30,35,-6066.,273.)
call BDF(34,30,35,-6241.,2786.)
call BDF(35,30,40,-6056.,5347.)
call BDF(36,35,40,-3254.,5752.)
call BDF(37,35,40,-819.,5859.)
call BDF(38,35,40,1086.,5572.)
call BDF(39,35,40,2675.,6207.)
call M98(131,39,130,135)
call M98(132,38,130,135)
call M98(133,37,130,135)
call M98(134,36,130,135)
call M98(135,35,130,140)
call M98(136,34,135,140)
call M98(137,33,135,140)
call M98(138,32,135,140)
call M98(139,31,135,140)
set h7[40]=h7['e']
set h7[130]=h7['d']
set h7[50]=h7[0]
set h7[160]=h7[1]
call BDF(51,50,55,-3196.,-6567.)
call BDF(52,50,55,-237.,-6939.)
call BDF(53,50,55,1811.,-6860.)
call BDF(54,50,55,3727.,-6784.)
call BDF(55,50,60,5532.,-6495.)
call BDF(56,55,60,5943.,-5216.)
call BDF(57,55,60,6186.,-3270.)
call BDF(58,55,60,6040.,-646.)
call BDF(59,55,60,6018.,2213.)
call M98(151,59,150,155)
call M98(152,58,150,155)
call M98(153,57,150,155)
call M98(154,56,150,155)
call M98(155,55,150,160)
call M98(156,54,155,160)
call M98(157,53,155,160)
call M98(158,52,155,160)
call M98(159,51,155,160)
set h7[60]=h7['e']
set h7[150]=h7['d']
set h7[211]=h7[12]
set h7[212]=h7[13]
set h7[213]=h7[16]
call B9F(221,-6220.,3550.)
set h7[222]=h7[36]
set h7[223]=h7[37]
set h7[231]=h7[53]
set h7[232]=h7[54]
set h7[233]=h7[56]
call B9F(234,6070.,-3550.)
set h7[235]=h7[58]
call B9F(250,GetRectCenterX(AD),GetRectCenterY(AD))
call B9F(251,GetRectCenterX(Br),GetRectCenterY(Br))
call B9F(252,GetRectCenterX(cr),GetRectCenterY(cr))
call B9F(253,GetRectCenterX(Cr),GetRectCenterY(Cr))
call B9F(254,GetRectCenterX(fr),GetRectCenterY(fr))
call B9F(255,GetRectCenterX(Fr),GetRectCenterY(Fr))
call B9F(256,GetRectCenterX(Hr),GetRectCenterY(Hr))
call B9F(257,GetRectCenterX(jr),GetRectCenterY(jr))
call B9F(258,GetRectCenterX(Jr),GetRectCenterY(Jr))
call B9F(259,GetRectCenterX(lr),GetRectCenterY(lr))
call B9F(260,GetRectCenterX(mr),GetRectCenterY(mr))
call B9F(261,GetRectCenterX(Ni),GetRectCenterY(Ni))
call B9F(262,GetRectCenterX(Bi),GetRectCenterY(Bi))
call B9F(311,-5232.,3757.)
call B9F(312,-3490.,4685.)
call B9F(313,-6209.,4324.)
call B9F(314,-5024.,5571.)
call B9F(315,-1717.,894.)
call B9F(321,3995.,-5720.)
call B9F(322,4976.,-5129.)
call B9F(325,2222.,-2405.)
call B9F(326,-2300.,1600.)
call B9F(327,3000.,-1820.)
call B9F(328,-4250.,-110.)
call B9F(329,-3950.,4100.)
call B9F(330,150.,2460.)
call B9F(331,2100.,-5600.)
call B9F(332,4350.,-4750.)
call B9F(333,4650.,-1050.)
call B9F(334,-3300.,-1450.)
call B9F(335,-1750.,-100.)
call B9F(336,-250.,700.)
call B9F(337,890.,2100.)
call B9F(338,-2100.,-4200.)
call B9F(339,-310.,-2900.)
call B9F(340,800.,-2200.)
call B9F(341,1900.,-1300.)
call B9F(342,3600.,-100.)
call B9F(351,-5210,5660)
call B9F(352,5260,-6470)
call B9F(353,-7080,4280)
call B9F(354,7210,-4230)
endfunction
function B1F takes nothing returns nothing
local trigger t
call BOF(11,17)
if(not P94)then
call BOF(31,39)
call BOF(51,59)
endif
call B6F(311)
call B6F(312)
call B6F(313)
call B6F(314)
call B6F(315)
call B6F(321)
call B6F(322)
call B6F(325)
call BYF(326,342)
call BCF(353,354)
endfunction
function B0F takes integer o6,integer X4F,integer n6 returns integer
if(X4F<o6)then
return o6
elseif(X4F>n6)then
return n6
endif
return X4F
endfunction
function B5F takes unit it,integer o6 returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer UP=GetUnitUserData(h8[O5])
local integer B2F
if(IsUnitAlly(it,G8[0]))then
if(((o6==-1)and((hj[256+UP]==18)or(hj[UP]==10)))or(o6==0))then
set B2F=9+P54
call MF8(it,B0F(11,B2F,17))
elseif(((o6==-1)and((hj[256+UP]==40)or(hj[UP]==30)))or(o6==1))then
set B2F=29+P24
call MF8(it,B0F(31,B2F,39))
elseif(((o6==-1)and((hj[256+UP]==60)or(hj[UP]==50)))or(o6==2))then
set B2F=49+P_4
call MF8(it,B0F(51,B2F,59))
endif
else
set UP=hj[512+UP]
if(((o6==-1)and((hj[256+UP]=='v')or(hj[UP]=='n')))or(o6==0))then
set B2F='u'-P54
call MF8(it,B0F('o',B2F,'u'))
elseif(((o6==-1)and((hj[256+UP]==140)or(hj[UP]==130)))or(o6==1))then
set B2F=139-P24
call MF8(it,B0F(131,B2F,139))
elseif(((o6==-1)and((hj[256+UP]==160)or(hj[UP]==150)))or(o6==2))then
set B2F=159-P_4
call MF8(it,B0F(151,B2F,159))
endif
endif
endfunction
function B_F takes unit it,unit C4F returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer i1=GetUnitTypeId(it)
local real Y_7=Bz+10
if(i1!='H00J')then
set h9[16+O5]=DH8(it)
set h9[O5]=DH8(it)
call YZ7(it,O5)
set G0[32+O5]=true
set GZ[O5]=false
set G0[48+O5]=false
set G0[O5]=false
set GZ[160+O5]=false
set hq[864+O5]=GetRandomReal(-G97,G97)
call SaveBoolean(R8,GetHandleId(it),'DARK',false)
call RemoveSavedHandle(R8,GetHandleId(it),'DARK')
if Bz>RD4 then
call EnableTrigger(R04[128+O5])
endif
endif
call RemoveGuardPosition(it)
loop
exitwhen((GetUnitLifePercent(it)>95.)and(GetUnitManaPercent(it)>95.)and(Bz>Y_7 or(Bz>OJ7[160+O5])))
if(((PT4)and(IsUnitAlly(it,G8[0])))or((PU4)and(IsUnitAlly(it,N8[0]))))then
exitwhen((GetUnitLifePercent(it)>75.)and(GetUnitManaPercent(it)>25.))
endif
if(not Z_7(it))then
set eY[O5]=1
exitwhen true
endif
if(IsUnitInRange(it,C4F,600.))then
call SetUnitLifePercentBJ(it,RMinBJ(GetUnitLifePercent(it)+5.,100.))
call SetUnitManaPercentBJ(it,RMinBJ(GetUnitManaPercent(it)+5.,100.))
if(is(it))then
call IssueTargetOrderById(it,851971,C4F)
endif
elseif(not Z_7(C4F))then
exitwhen true
endif
call TriggerSleepAction(1.)
endloop
endfunction
function C7F takes integer O5,unit C8F,unit C9F,unit CDF returns boolean
local integer i=0
local boolean L37=false
set bj_lastReplacedUnit=null
if(O5==0)then
set bj_lastReplacedUnit=C8F
elseif(O5==1)then
set bj_lastReplacedUnit=C9F
elseif(O5==2)then
set bj_lastReplacedUnit=CDF
else
return false
endif
set i=LInt(GetHandleId(bj_lastReplacedUnit),"AI|TowerDef_Require")
if(i>0)then
call SInt(GetHandleId(bj_lastReplacedUnit),"AI|TowerDef_Require",i-1)
return true
endif
return false
endfunction
function CEF takes unit ME8 returns boolean
call MoveLocation(Ha,GetUnitX(ME8),GetUnitY(ME8))
return((AN7(1800.,Ha,Condition(function GB8))-(AN7(1400.,Ha,Condition(function GA8))*4))>5)
endfunction
function CFF takes nothing returns nothing
local integer i=1
local integer j=0
loop
exitwhen j>10
if(GM7['p'+j]!=0)then
set GM7[144+j]=R2I(Bz)+HM7
endif
set GM7['p'+j]=0
set GM7[128+j]=0
set j=j+1
endloop
set i=1
loop
exitwhen i>11
if(Y7[i]!=null)then
call ZE7(i)
endif
set i=i+1
endloop
set i=1
loop
exitwhen i>5
set j=GetPlayerId(G8[i])
if((eY[80+j]==3)and(eY[64+j]<3))or(eY[64+j]==5)then
set GM7['p'+eY[64+j]]=GM7['p'+eY[64+j]]+1
else
set GM7['p'+eY[80+j]]=GM7['p'+eY[80+j]]+1
endif
if eY[32+j]>0 then
set GM7[128+eY[80+j]]=GM7[128+eY[80+j]]+1
endif
set j=GetPlayerId(N8[i])
if((eY[80+j]==4)and(eY[64+j]<3))or(eY[64+j]==5)then
set GM7['p'+6+eY[64+j]]=GM7['p'+6+eY[64+j]]+1
else
set GM7['p'+6+eY[80+j]]=GM7['p'+6+eY[80+j]]+1
endif
if eY[32+j]>0 then
set GM7[128+6+eY[80+j]]=GM7[128+6+eY[80+j]]+1
endif
set i=i+1
endloop
endfunction
function CGF takes unit it returns integer
local integer j=3
local integer O5=GetPlayerId(GetOwningPlayer(it))
if(G3>=0)then
set j=G3
elseif(GetHeroLevel(it)<6)then
set j=eY[64+O5]
elseif(GetHeroLevel(it)>=PB4)then
if(PU4 and GM7[64+O5]>=0)then
set j=W97(GM7[64+O5]==3,0,GM7[64+O5])
elseif(G1>=0)then
set j=G1
endif
endif
if(j==3)then
set bj_lastLoadedUnit=it
if(C7F(PL4,JX4,JA4,J34))then
set j=0
elseif(C7F(P04,JY4,JB4,J64))then
set j=2
elseif(C7F(P14,JW4,JZ4,JC4))then
set j=1
elseif(IC(O5))then
if(GM7['p'+6+0]==1)then
set j=0
elseif(GM7['p'+6+1]==1)then
if((GM7['p'+6+2]==0)or(GetRandomInt(1,2)==1))then
set j=1
else
set j=2
endif
endif
elseif(((GM7['p'+6+0]==0)and(GM7[128+0]>0))or((GM7[128+0]-GM7['p'+6+0])>1))then
set j=0
elseif((GM7[128+1]-GM7['p'+6+1])>1)then
set j=1
elseif((GM7[128+2]-GM7['p'+6+2])>1)then
set j=2
elseif((GM7['p'+6+1]==0)and(GM7[128+1]>0))then
if((GM7['p'+6+2]>0)or(GM7[128+2]==0)or(GetRandomInt(1,2)==1))then
set j=1
else
set j=2
endif
elseif((GM7['p'+6+2]==0)and(GM7[128+2]>0))then
set j=2
elseif(GM7['p'+6+0]==0)then
set j=0
elseif(GM7['p'+6+1]==0)then
if((GM7['p'+6+2]>0)or(GetRandomInt(1,2)==1))then
set j=1
else
set j=2
endif
elseif(GM7['p'+6+2]==0)then
set j=2
endif
elseif((GetHeroLevel(it)>13)and(G3<0)and(G1>=0)and(j==G1)and((GM7[128+j])-GM7['p'+6+j]>=0))then
if((j!=0)and(PL4>=2)and(CEF(h7[17])))then
set j=0
elseif((j!=1)and(P14>=2)and(CEF(h7[39])))then
set j=1
elseif((j!=2)and(P04>=2)and(CEF(h7[59])))then
set j=2
endif
endif
if(j>=3)then
set j=eY[64+O5]
if(j>=3)then
set j=GetRandomInt(0,2)
endif
endif
return j
endfunction
function CHF takes unit Y47 returns nothing
local unit A77=null
local integer O5=GetPlayerId(GetOwningPlayer(Y47))
local integer i
local boolean J4=false
local integer YW7=W97(IsUnitAlly(Y47,G8[0]),0,24)
set hq[528+O5]=Bz+5.
if((is(Y47))and(not A87(Y47))and(not G0[32+O5]))and(h4[O5]==null)then
call GroupClear(H8)
set bj_lastLoadedUnit=Y47
call GroupEnumUnitsInRange(H8,GetUnitX(Y47),GetUnitY(Y47),700.,GP7)
set i=(E18(H8))
if G0[48+O5]and Bz>hq[768+O5]then
set J4=(i>2)
if not J4 then
set G0[48+O5]=false
endif
if not J4 then
call XK7("aiDef_Actions_u8v cancelrun")
else
call XK7("aiDef_Actions_u8v Count "+I2S(i))
endif
endif
if(not J4)and ZL7(Y47)then
set bj_lastLoadedUnit=V_7(IsUnitAlly(Y47,G8[0]),IN4,JS4)
set F37=Z47(Y47,bj_lastLoadedUnit)
if G0[240+O5]then
if(F37>3500.)then
call D48(Y47,851986,h9[O5])
set J4=true
else
set G0[240+O5]=false
endif
endif
if(not J4)then
if(F37>6000.)then
call D48(Y47,851986,h9[O5])
elseif F37<700. and i>0 then
set J4=D48(Y47,851983,h8[64+O5])
else
if(not J4)and(GN7[YW7+GM7[64+O5]]==GN7[YW7+4+GM7[64+O5]])then
set A77=GN7[YW7+4+GM7[64+O5]]
if A77!=null and GetWidgetLife(A77)>.405 then
set J4=IssueTargetOrderById(Y47,851983,A77)
endif
endif
if(not J4)and G0[224+O5]then
set A77=GN7[48+O5]
if A77!=null and GetWidgetLife(A77)>.405 then
set J4=IssueTargetOrderById(Y47,851983,A77)
endif
if not J4 then
set G0[224+O5]=false
endif
endif
if not J4 then
set A77=GN7[YW7+GM7[64+O5]]
if A77!=null and GetWidgetLife(A77)>.405 then
set J4=IssueTargetOrderById(Y47,851983,A77)
endif
endif
if not J4 then
set A77=GN7[YW7+16+GM7[64+O5]]
if A77==null or GetWidgetLife(A77)<.405 then
set A77=FirstOfGroup(H8)
if A77!=null then
set GN7[YW7+16+GM7[64+O5]]=A77
else
set A77=GN7[YW7+12+GM7[64+O5]]
if A77==null or GetWidgetLife(A77)<.405 then
set A77=h8[64+O5]
endif
endif
endif
if(Z47(Y47,A77)>H77)then
set J4=D48(Y47,851986,A77)
elseif GetUnitCurrentOrder(Y47)!=851983 then
set J4=D48(Y47,851983,A77)
endif
endif
endif
endif
endif
endif
set Y47=null
set A77=null
endfunction
function CIF takes unit CJF,integer O5,boolean CKF returns nothing
local integer j
local integer YW7
set G0[32+O5]=false
set G0[352+O5]=false
if(CKF)then
set YW7=W97(IsUnitAlly(CJF,G8[0]),0,24)
if GM7[64+O5]>=0 and GM7[YW7+GM7[64+O5]]>GC7 then
call XK7("(tZv) Def con")
set eY[O5]=W97((not GZ[480+O5]),3,4)
else
set j=YU7(IsUnitAlly(CJF,G8[0]))
call XK7("(tZv) Def route "+I2S(j))
if j!=-1 then
set GM7[64+O5]=j
set GM7[YW7+8+j]=GM7[YW7+8+j]-1
set GM7[YW7+12+j]=GM7[YW7+12+j]+1
call YZ7(CJF,O5)
set eY[O5]=W97((not GZ[480+O5]),3,4)
endif
endif
endif
if(eY[O5]==3 or eY[O5]==4)then
call CHF(CJF)
else
if(Bz>RD4)and(is(CJF))then
call D48(CJF,851983,h8[O5])
endif
set eY[O5]=1
endif
endfunction
function CMF takes integer CNF,integer COF returns integer
if((P94)or((PF4)and(PD4)))then
return 0
elseif((PE4)and(PD4))then
return 1
elseif((PE4)and(PF4))then
return 2
elseif((COF>15)or((CNF==0)and(not PE4))or((CNF==1)and(not PF4))or((CNF==2)and(not PD4)))then
return CNF
elseif((not PE4)and(((PF4)and(PD4))or(GetRandomInt(1,2)==1)))then
return 0
elseif((not PF4)and((PD4)or(GetRandomInt(1,2)==1)))then
return 1
elseif(not PD4)then
return 2
endif
return GetRandomInt(0,2)
endfunction
function CPF takes unit it returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer j=0
if(GetUnitTypeId(it)!='H00J')then
if(eY[O5]==2)then
set it=null
return
else
set eY[O5]=2
set h8[O5]=h7['o']
endif
endif
call B_F(it,JS4)
if(GetUnitTypeId(it)!='H00J')then
if Bz>RD4 then
set j=eY[64+O5]
set eY[64+O5]=5
call CFF()
endif
set eY[64+O5]=j
set j=CMF(CGF(it),GetHeroLevel(it))
if(j==0)then
set h8[O5]=h7['o']
set h8[16+O5]=h7['r']
elseif(j==1)then
set h8[O5]=h7[131]
set h8[16+O5]=h7[135]
else
set h8[O5]=h7[151]
set h8[16+O5]=h7[155]
endif
set eY[64+O5]=j
set hq[576+O5]=Bz+HJ7
call CIF(it,O5,PU4)
endif
set it=null
endfunction
function CQF takes nothing returns nothing
call CPF(GetTriggerUnit())
endfunction
function CRF takes unit it returns integer
local integer j=3
local integer O5=GetPlayerId(GetOwningPlayer(it))
if(G4>=0)then
set j=G4
elseif(GetHeroLevel(it)<6)then
set j=eY[64+O5]
elseif(GetHeroLevel(it)>=PA4)then
if(PT4 and GM7[64+O5]>=0)then
set j=W97(GM7[64+O5]==3,0,GM7[64+O5])
elseif(G1>=0)then
set j=G2
endif
endif
if(j==3)then
set bj_lastLoadedUnit=it
if(C7F(PC4,I34,I24,J74))then
set j=0
elseif(C7F(P34,IZ4,I04,J44))then
set j=1
elseif(C7F(P64,IL4,I_4,J84))then
set j=2
elseif(IC(O5))then
if(GM7['p'+0]==1)then
set j=0
elseif(GM7['p'+1]==1)then
if((GM7['p'+2]==0)or(GetRandomInt(1,2)==1))then
set j=1
else
set j=2
endif
endif
elseif(((GM7['p'+0]==0)and(GM7[128+6+0]>0))or((GM7[128+6+0]-GM7['p'+0])>1))then
set j=0
elseif((GM7[128+6+1]-GM7['p'+1])>1)then
set j=1
elseif((GM7[128+6+2]-GM7['p'+2])>1)then
set j=2
elseif((GM7['p'+1]==0)and(GM7[128+6+1]>0))then
if((GM7['p'+2]>0)or(GM7[128+6+2]==0)or(GetRandomInt(1,2)==1))then
set j=1
else
set j=2
endif
elseif((GM7['p'+2]==0)and(GM7[128+6+2]>0))then
set j=2
elseif(GM7['p'+0]==0)then
set j=0
elseif(GM7['p'+1]==0)then
if((GM7['p'+2]>0)or(GetRandomInt(1,2)==1))then
set j=1
else
set j=2
endif
elseif(GM7['p'+2]==0)then
set j=2
endif
elseif((GetHeroLevel(it)>13)and(G4<0)and(G2>=0)and(j==G2)and((GM7[128+6+j]-GM7['p'+j])>=0))then
if((j!=0)and(PC4>=2)and(CEF(h7[11])))then
set j=0
elseif((j!=1)and(P34>=2)and(CEF(h7[31])))then
set j=1
elseif((j!=2)and(P64>=2)and(CEF(h7[51])))then
set j=2
endif
endif
if(j>=3)then
set j=eY[64+O5]
if(j>=3)then
set j=GetRandomInt(0,2)
endif
endif
return j
endfunction
function CSF takes unit it returns nothing
local integer j=0
local integer O5=GetPlayerId(GetOwningPlayer(it))
if(GetUnitTypeId(it)!='H00J')then
if(eY[O5]==2)then
set it=null
return
else
set eY[O5]=2
set h8[O5]=h7[11]
endif
endif
call B_F(it,IN4)
if(GetUnitTypeId(it)!='H00J')then
if Bz>RD4 then
set j=eY[64+O5]
set eY[64+O5]=5
call CFF()
endif
set eY[64+O5]=j
set j=CMF(CRF(it),GetHeroLevel(it))
if(j==0)then
set h8[O5]=h7[11]
set h8[16+O5]=h7[14]
elseif(j==1)then
set h8[O5]=h7[31]
set h8[16+O5]=h7[35]
else
set h8[O5]=h7[51]
set h8[16+O5]=h7[55]
endif
set eY[64+O5]=j
set hq[576+O5]=Bz+HJ7
call CIF(it,O5,PT4)
endif
set it=null
endfunction
function CTF takes nothing returns nothing
call CSF(GetTriggerUnit())
endfunction
function CUF takes nothing returns nothing
local unit it=LUnit(GetHandleId(GetTriggeringTrigger()),"u")
call DisableTrigger(GetTriggeringTrigger())
if IsUnitAlly(it,G8[0])then
if(Z47(it,IN4)<700)then
call CSF(it)
endif
else
if(Z47(it,JS4)<700)then
call CPF(it)
endif
endif
set it=null
endfunction
function CVF takes integer O5,boolean YV7 returns nothing
local integer i=1
local integer CWF=W97(YV7,0,6)
local integer YW7=W97(YV7,0,24)
if(eY[O5]==3 and KR8(Player(O5))and GetWidgetLife(Y7[O5])>.405)then
set G0[48+O5]=false
if GetUnitLifePercent(Y7[O5])<70. or GetUnitManaPercent(Y7[O5])<50. then
set eY[O5]=1
set G0[352+O5]=true
call F28(Y7[O5],true)
call SUnit(S44,"OB|U",Y7[O5])
call ExecuteFunc("CXF")
else
if(Z87(GetUnitX(Y7[O5]),GetUnitY(Y7[O5]),GO7[YW7],GO7[YW7+1])<12000.)then
if(h9[16+O5]==h7[35])then
set h8[16+O5]=h7[35]
set h8[O5]=h7[35]
elseif(h9[16+O5]==h7[55])then
set h8[16+O5]=h7[55]
set h8[O5]=h7[55]
elseif(h9[16+O5]==h7[14])then
set h8[16+O5]=h7[14]
set h8[O5]=h7[14]
elseif(Z87(GetUnitX(Y7[O5]),GetUnitY(Y7[O5]),GO7[YW7],GO7[YW7+1])>5000.)then
if(eY[80+O5]==0)then
set h8[16+O5]=h7[14]
set h8[O5]=h7[14]
elseif(eY[80+O5]==1)then
set h8[16+O5]=h7[35]
set h8[O5]=h7[35]
elseif(eY[80+O5]==2)then
set h8[16+O5]=h7[55]
set h8[O5]=h7[55]
endif
endif
set h9[16+O5]=DH8(Y7[O5])
set h9[O5]=DH8(Y7[O5])
endif
if(is(Y7[O5]))then
call D48(Y7[O5],851983,h8[O5])
endif
set eY[O5]=1
endif
endif
endfunction
function CYF takes boolean YV7 returns boolean
local group g=CreateGroup()
local unit Y47=null
local integer O5=0
local integer CWF=W97(YV7,0,6)
local integer YW7=W97(YV7,0,24)
local integer i
local integer j
local boolean bIsDef=false
set i=0
loop
exitwhen i>18
set GM7[YW7+i]=0
set i=i+1
endloop
set GM7[YW7+19]=-1
set GM7[YW7+20]=-1
set GM7[YW7+21]=-1
set GM7[YW7+22]=-1
set GM7[YW7+23]=-1
call GroupEnumUnitsInRange(g,GO7[YW7],GO7[YW7+1],6000.,R24)
loop
set Y47=FirstOfGroup(g)
exitwhen Y47==null
call GroupRemoveUnit(g,Y47)
set O5=GetPlayerId(GetOwningPlayer(Y47))
set i=GetUnitTypeId(Y47)
if((GetUnitAbilityLevel(Y47,'A04R')!=0 and((i=='umtw' or i=='u00R')or(i=='ebal' or i=='e026'))==false)or GetUnitAbilityLevel(Y47,'Aloc')!=0 or GetWidgetLife(Y47)<50.)then
elseif(IsUnitAlly(Y47,G8[0])==YV7)or O5==12 or O5>14 then
elseif not(IsUnitType(Y47,UNIT_TYPE_MELEE_ATTACKER)or IsUnitType(Y47,UNIT_TYPE_RANGED_ATTACKER))then
else
set j=-1
if(YV7 and(PV4==false or P64>2 or PC4>2 or P34>2))or(YV7==false and(PW4==false or P04>2 or PL4>2 or P14>2))then
if Z87(GetUnitX(Y47),GetUnitY(Y47),GO7[YW7+2],GO7[YW7+3])<=1400. then
set j=3
endif
endif
if j==-1 then
set i=R2I(Atan2(GetUnitY(Y47)-GO7[YW7+1],GetUnitX(Y47)-GO7[YW7])*bj_RADTODEG)
if i>360 then
set i=i-360
elseif i<0 then
set i=i+360
endif
if YV7 then
if i<25 and P64>=2 then
set j=2
elseif i>65 and P34>=2 then
set j=1
elseif PC4>=2 then
set j=0
endif
else
if i>245 and P04>=2 then
set j=2
elseif i<205 and P14>=2 then
set j=1
elseif PL4>=2 then
set j=0
endif
endif
endif
if j!=-1 and((j!=0 or(not PE4))and(j!=1 or(not PF4))and(j!=2 or(not PD4)))then
set i=GetUnitTypeId(Y47)
if IsUnitType(Y47,UNIT_TYPE_HERO)and i!='H00J' then
set GM7[YW7+4+j]=GM7[YW7+4+j]+1
set GM7[YW7+19+O5-CWF-1]=j
set GM7[YW7+j]=GM7[YW7+j]+GB7
if(GN7[YW7+12+j]==null or GetWidgetLife(GN7[YW7+12+j])<.405)or(GetWidgetLife(Y47)<GetWidgetLife(GN7[YW7+12+j]))then
set GN7[YW7+12+j]=Y47
call XK7("aiDefTimer "+I2S(j)+" 12+"+GetUnitName(Y47))
endif
elseif O5!=GetPlayerId(G8[0])and O5!=GetPlayerId(N8[0])then
set GM7[YW7+j]=GM7[YW7+j]+3
else
if(i=='ugho' or i=='unec')or(i=='u001' or i=='u002')or(i=='esen' or i=='edry')or(i=='e00V' or i=='e00W')then
set GM7[YW7+j]=GM7[YW7+j]+1
if GN7[YW7+16+j]==null or GetWidgetLife(GN7[YW7+16+j])<.405 then
set GN7[YW7+16+j]=Y47
endif
elseif(i=='umtw' or i=='u00R')or(i=='ebal' or i=='e026')then
set GM7[YW7+j]=GM7[YW7+j]+3
if GN7[YW7+4+j]==null or GetWidgetLife(GN7[YW7+4+j])<.405 then
set GN7[YW7+4+j]=Y47
endif
else
set GM7[YW7+j]=GM7[YW7+j]+5
if GN7[YW7+8+j]==null or GetWidgetLife(GN7[YW7+8+j])<.405 then
set GN7[YW7+8+j]=Y47
endif
endif
endif
endif
endif
endloop
call DestroyGroup(g)
set g=null
call XK7(GG7+"0 "+I2S(GM7[YW7+0])+"/"+I2S(GM7[YW7+1])+"/"+I2S(GM7[YW7+2])+"/"+I2S(GM7[YW7+3]))
if((YV7 and PT4)or((not YV7)and PU4))then
if GM7[YW7+0]<=GC7 and GM7[YW7+1]<=GC7 and GM7[YW7+2]<=GC7 and GM7[YW7+3]<=GC7 then
return false
endif
endif
if YV7 then
if P64>2 and GM7[YW7+2]>GC7 then
set GM7[YW7+2]=GM7[YW7+2]+G37
endif
if P34>2 and GM7[YW7+1]>GC7 then
set GM7[YW7+1]=GM7[YW7+1]+G37
endif
if PC4>2 and GM7[YW7+0]>GC7 then
set GM7[YW7+0]=GM7[YW7+0]+G37
endif
if GetWidgetLife(J94)<.405 and GM7[YW7+3]>GC7 then
set GM7[YW7+3]=GM7[YW7+3]+G37
endif
if GetWidgetLife(JD4)<.405 and GM7[YW7+3]>GC7 then
set GM7[YW7+3]=GM7[YW7+3]+G37
endif
else
if P04>2 and GM7[YW7+2]>GC7 then
set GM7[YW7+2]=GM7[YW7+2]+G37
endif
if P14>2 and GM7[YW7+1]>GC7 then
set GM7[YW7+1]=GM7[YW7+1]+G37
endif
if PL4>2 and GM7[YW7+0]>GC7 then
set GM7[YW7+0]=GM7[YW7+0]+G37
endif
if GetWidgetLife(JL4)<.405 and GM7[YW7+3]>GC7 then
set GM7[YW7+3]=GM7[YW7+3]+G37
endif
if GetWidgetLife(J14)<.405 and GM7[YW7+3]>GC7 then
set GM7[YW7+3]=GM7[YW7+3]+G37
endif
endif
if GM7[YW7+0]<=GA7 and GM7[YW7+1]<=GA7 and GM7[YW7+2]<=GA7 and GM7[YW7+3]<=GA7 then
return false
endif
set j=0
set i=0
loop
exitwhen j>4
set GM7[YW7+8+j]=GM7[YW7+4+j]
if GetWidgetLife(GN7[YW7+12+j])>.405 then
elseif GetWidgetLife(GN7[YW7+4+j])>.405 then
set GN7[YW7+j]=GN7[YW7+4+j]
elseif GetWidgetLife(GN7[YW7+8+j])>.405 then
set GN7[YW7+j]=GN7[YW7+8+j]
else
if GetWidgetLife(GN7[YW7+12+j])>.405 then
set GN7[YW7+j]=GN7[YW7+12+j]
else
set GN7[YW7+j]=null
endif
endif
set j=j+1
endloop
if YV7 then
if GM7[YW7+1]>GC7 and GM7[YW7+9]==0 then
set GM7[YW7+9]=1
endif
if GM7[YW7+0]>GC7 and GM7[YW7+8]==0 then
set GM7[YW7+8]=1
endif
if GM7[YW7+2]>GC7 and GM7[YW7+10]==0 then
set GM7[YW7+10]=1
endif
set hD=IMaxBJ(1,GM7[YW7+4]+GM7[YW7+5]+GM7[YW7+6]+GM7[YW7+7])
else
if GM7[YW7+1]>GC7 and GM7[YW7+9]==0 then
set GM7[YW7+9]=1
endif
if GM7[YW7+0]>GC7 and GM7[YW7+8]==0 then
set GM7[YW7+8]=1
endif
if GM7[YW7+2]>GC7 and GM7[YW7+10]==0 then
set GM7[YW7+10]=1
endif
set hE=IMaxBJ(1,GM7[YW7+4]+GM7[YW7+5]+GM7[YW7+6]+GM7[YW7+7])
endif
if GM7[YW7+3]>GC7 and GM7[YW7+11]==0 then
set GM7[YW7+11]=1
endif
set i=1
loop
exitwhen i>5
set O5=GM7[80+CWF+i]
if(O5!=-1)and(eY[O5]==2 or eY[O5]==3 or eY[O5]==4)==false and(A87(Y7[O5])or GetWidgetLife(Y7[O5])<.405)==false then
set GM7[48+CWF+i]=GM7[80+CWF+i]
else
set GM7[48+CWF+i]=-1
endif
set GM7[96+O5]=0
set i=i+1
endloop
set i=1
loop
exitwhen i>5
set O5=GM7[80+CWF+i]
if(O5!=-1)and Y7[O5]!=null then
if(eY[O5]==3 or eY[O5]==4)and GM7[64+O5]!=-1 and(A87(Y7[O5])or GetWidgetLife(Y7[O5])<.405)==false then
if GM7[YW7+8+GM7[64+O5]]>0 then
set GM7[48+CWF+i]=-1
set GM7[YW7+8+GM7[64+O5]]=GM7[YW7+8+GM7[64+O5]]-1
set GM7[YW7+12+GM7[64+O5]]=GM7[YW7+12+GM7[64+O5]]+1
else
set GM7[48+CWF+i]=O5
call XK7("aiDefTimer "+I2S(O5)+" relocate")
endif
endif
endif
set i=i+1
endloop
if GM7[YW7+11]>0 and GM7[YW7+15]==0 then
set i=1
loop
exitwhen i>10
if i>5 then
set j=j-5
else
set j=i
endif
set O5=GM7[80+CWF+j]
if(O5!=-1)and(GM7[48+CWF+j]==-1)then
if(eY[O5]==3 or eY[O5]==4)and((GM7[48+CWF+j]!=-1)or(GM7[64+O5]==-1)or(GM7[YW7+8+GM7[64+O5]]<=0)or((GM7[YW7+12+GM7[64+O5]]>1)or(i>5)))then
call XK7("aiDefTimer "+I2S(O5)+" relocate def center")
set GM7[64+O5]=3
set GM7[YW7+11]=GM7[YW7+11]-1
set GM7[YW7+15]=GM7[YW7+15]+1
set GM7[96+O5]=1
endif
endif
set GM7[96+O5]=0
set i=i+1
endloop
endif
set i=1
loop
exitwhen i>5
set O5=GM7[48+CWF+i]
if O5!=-1 and(eY[O5]==3 or eY[O5]==4)then
set j=YU7(YV7)
if j==-1 then
set bj_forLoopAIndex=0
set bj_forLoopBIndex=GC7
loop
exitwhen bj_forLoopAIndex>3
if GM7[YW7+bj_forLoopAIndex]>bj_forLoopBIndex and GM7[YW7+8+j]>-1 then
set bj_forLoopBIndex=GM7[YW7+bj_forLoopAIndex]
set j=bj_forLoopAIndex
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
if j!=-1 then
call XK7("(aiDefTimer) Def route "+I2S(j))
if j!=GM7[64+O5]then
set G0[240+O5]=true
set GM7[96+O5]=1
set GM7[64+O5]=j
endif
set GM7[YW7+8+j]=GM7[YW7+8+j]-1
set GM7[YW7+12+j]=GM7[YW7+12+j]+1
set GM7[48+CWF+i]=-1
else
call CVF(O5,YV7)
endif
endif
set i=i+1
endloop
if GM7[YW7+8]<=0 and GM7[YW7+9]<=0 and GM7[YW7+10]<=0 and GM7[YW7+11]<=0 then
return true
endif
set i=1
loop
exitwhen i>5
set O5=GM7[48+CWF+i]
if(O5!=-1)then
set j=ZD7(Y7[O5])
if GM7[YW7+8+j]+GM7[YW7+12+j]>0 then
call XK7("aiDefTimer "+I2S(O5)+" recruit lane")
set GM7[YW7+8+j]=GM7[YW7+8+j]-1
set GM7[YW7+12+j]=GM7[YW7+12+j]+1
set GM7[64+O5]=j
set GM7[96+O5]=1
set GM7[48+CWF+i]=-1
endif
endif
set i=i+1
endloop
set i=1
loop
exitwhen i>5 or(GM7[YW7+8]<=0 and GM7[YW7+9]<=0 and GM7[YW7+10]<=0 and GM7[YW7+11]<=0)
set O5=GM7[48+CWF+i]
if(O5!=-1)then
if Bz>hq[528+O5]then
set F37=Z87(GetUnitX(Y7[O5]),GetUnitY(Y7[O5]),GO7[YW7],GO7[YW7+1])
if F37<=12000 then
set j=YU7(YV7)
if j!=-1 then
if F37>5000 then
set G0[240+O5]=true
endif
set GM7[YW7+8+j]=GM7[YW7+8+j]-1
set GM7[YW7+12+j]=GM7[YW7+12+j]+1
set GM7[64+O5]=j
set GM7[96+O5]=1
set GM7[48+CWF+i]=-1
endif
endif
endif
endif
set i=i+1
endloop
set i=1
loop
exitwhen i>5 or(GM7[YW7+8]<=0 and GM7[YW7+9]<=0 and GM7[YW7+10]<=0 and GM7[YW7+11]<=0)
set O5=GM7[48+CWF+i]
if(O5!=-1)then
if true and Z87(GetUnitX(Y7[O5]),GetUnitY(Y7[O5]),GO7[W97(YV7,24,0)],GO7[W97(YV7,25,1)])>6000 then
set j=YU7(YV7)
if j!=-1 then
set GM7[YW7+8+j]=GM7[YW7+8+j]-1
set GM7[YW7+12+j]=GM7[YW7+12+j]+1
set GM7[64+O5]=j
set GM7[96+O5]=1
set GM7[48+CWF+i]=-1
endif
endif
endif
set i=i+1
endloop
set bj_forLoopAIndex=GM7[YW7+4]+GM7[YW7+5]+GM7[YW7+6]+GM7[YW7+7]
if(bj_forLoopAIndex>=W97(YV7,HN4,HM4)-1 and bj_forLoopAIndex>=3)then
set i=1
loop
exitwhen i>5
set O5=GM7[80+CWF+i]
if(O5!=-1)and Y7[O5]!=null then
if GetWidgetLife(Y7[O5])<.405 then
if((TimerGetRemaining(L[O5])>20.)and(TimerGetElapsed(L[O5])>4.))then
set j=0
loop
exitwhen NI4[j]==GetEnumUnit()or j>NM4
set j=j+1
endloop
if NI4[j]!=null and GetUnitAbilityLevel(KR4[O5],'A20U')==0 then
if IssueImmediateOrderById(KR4[O5],ED[O5])then
call XK7("aiDefTimer Revive"+I2S(O5))
set j=YU7(YV7)
if j!=-1 then
set GM7[YW7+8+j]=GM7[YW7+8+j]-1
set GM7[YW7+12+j]=GM7[YW7+12+j]+1
set GM7[64+O5]=j
set GM7[96+O5]=1
endif
endif
endif
endif
endif
endif
set i=i+1
endloop
endif
if YV7 then
set F57=E8
else
set F57=F8
endif
set i=1
loop
exitwhen i>5
if YV7 then
set O5=GetPlayerId(G8[i])
else
set O5=GetPlayerId(N8[i])
endif
if KR8(Player(O5))and GM7[96+O5]!=0 then
call YZ7(Y7[O5],O5)
call J3(Y7[O5],ZL7(Y7[O5]))
call FV8(Y7[O5],F57)
if eY[O5]==3 or eY[O5]==4 then
call FQ8(Y7[O5],F57,GetObjectName('Y015')+YR7(GM7[64+O5],true))
else
call FQ8(Y7[O5],F57,GetObjectName('Y014')+YR7(GM7[64+O5],true))
endif
set eY[O5]=3
set GM7[96+O5]=0
endif
set i=i+1
endloop
set Y47=null
set F57=null
return true
endfunction
function CZF takes boolean YV7 returns boolean
local unit Y47=GetTriggerUnit()
local integer O5=GetPlayerId(GetOwningPlayer(Y47))
local integer CWF=W97(YV7,0,6)
local integer YW7=W97(YV7,0,24)
local integer i
local integer j
if((YV7 and P34<2 and PC4<2 and P64<2)or(YV7==false and P14<2 and PL4<2 and P04<2))then
return false
elseif O5!=GetPlayerId(G8[0])and O5!=GetPlayerId(N8[0])then
return false
elseif(IsUnitAlly(Y47,G8[0])==YV7)or GE8(Y47)==false then
return false
endif
set i=R2I(Atan2(GetUnitY(Y47)-GO7[YW7+1],GetUnitX(Y47)-GO7[YW7])*bj_RADTODEG)
set j=-1
if i>360 then
set i=i-360
elseif i<0 then
set i=i+360
endif
if YV7 then
if i<25 and P64>=2 then
set j=2
elseif i>65 and P34>=2 then
set j=1
elseif PC4>=2 then
set j=0
endif
else
if i>245 and P04>=2 then
set j=2
elseif i<205 and P14>=2 then
set j=1
elseif PL4>=2 then
set j=0
endif
endif
if j==-1 then
return false
endif
return CYF(YV7)
endfunction
function CAF takes boolean YV7 returns nothing
local integer i=1
local integer O5
loop
exitwhen i>5
if YV7 then
set O5=GetPlayerId(G8[i])
else
set O5=GetPlayerId(N8[i])
endif
call CVF(O5,YV7)
set i=i+1
endloop
endfunction
function CBF takes nothing returns boolean
if CZF(false)then
call DisableTrigger(R64)
call EnableTrigger(R14)
set PU4=true
endif
return false
endfunction
function CCF takes nothing returns boolean
if not CYF(false)then
call XK7("aiScourgeDefTimer_Conditions DefEnd")
call EnableTrigger(R64)
call DisableTrigger(R14)
set PU4=false
call CAF(false)
endif
return false
endfunction
function C3F takes nothing returns boolean
if CZF(true)then
call DisableTrigger(R34)
call EnableTrigger(RL4)
set PT4=true
endif
return false
endfunction
function C6F takes nothing returns boolean
if not CYF(true)then
call XK7("aiSentDefTimer_Conditions DefEnd")
call EnableTrigger(R34)
call DisableTrigger(RL4)
set PT4=false
call CAF(true)
endif
return false
endfunction
function TRv takes nothing returns boolean
if((IsUnitEnemy(GetFilterUnit(),G8[0]))and(GF8(GetFilterUnit()))and((IsUnitVisibleEx(GetFilterUnit(),G8[0]))or(GetOwningPlayer(GetFilterUnit())==N8[0]))and(GetWidgetLife(GetFilterUnit())>.405))then
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and(GetUnitLifePercent(GetFilterUnit())>30.))then
set hD=hD+1
endif
return true
endif
return false
endfunction
function CLF takes nothing returns boolean
return((not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL))and(GetWidgetLife(GetFilterUnit())>.405)and(GE8(GetFilterUnit())))
endfunction
function C1F takes real K1,unit u returns unit
local unit M88=null
local unit C0F=null
local boolexpr Ig=Condition(function CLF)
local real IW=Z47(u,h9[16+GetPlayerId(GetOwningPlayer(u))])
local real C5F
call GroupClear(iE)
call GroupEnumUnitsInRange(iE,GetUnitX(u),GetUnitY(u),K1,Ig)
loop
set M88=FirstOfGroup(iE)
exitwhen(M88==null)
if((IsUnitVisibleEx(M88,GetOwningPlayer(u)))and(M88!=u))then
set C5F=Z47(M88,h9[16+GetPlayerId(GetOwningPlayer(u))])
if(C5F<IW)then
set C0F=M88
set IW=C5F
endif
endif
call GroupRemoveUnit(iE,M88)
endloop
call DestroyBoolExpr(Ig)
set Ig=null
set M88=null
set hr=C0F
set C0F=null
return hr
endfunction
function C2F takes nothing returns boolean
return((IsHeroUnitId(GetUnitTypeId(GetFilterUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetFilterUnit()!=GetEnumUnit()))
endfunction
function C_F takes unit it returns integer
local integer i1=GetUnitTypeId(it)
if((i1=='Edem')or(i1=='Opgh')or(i1=='O00P')or(i1=='H000')or(i1=='HC49')or(i1=='Npbm')or(i1=='Ogrh')or(i1=='U00A')or(AR7(it,BU[molongzhixin]))or(AR7(it,BU[huanyingfu])))then
return 3
elseif(kq(i1))then
return 2
else
return 1
endif
endfunction
function L4F takes real K1,unit u returns unit
local unit M88=null
local unit C0F=null
local boolexpr Ig=Condition(function C2F)
local real L7F=0
local real L8F=0
call GroupClear(iE)
call GroupEnumUnitsInRange(iE,GetUnitX(u),GetUnitY(u),K1,Ig)
loop
set M88=FirstOfGroup(iE)
exitwhen(M88==null)
set L7F=GetUnitState(M88,UNIT_STATE_LIFE)
if(GetUnitLifePercent(M88)<60.)then
elseif((C0F==null)or(C_F(M88)>C_F(C0F)))then
set C0F=M88
set L8F=L7F
elseif((C_F(M88)==C_F(C0F))and(L8F<L7F))then
set C0F=M88
set L8F=L7F
endif
call GroupRemoveUnit(iE,M88)
endloop
call DestroyBoolExpr(Ig)
set Ig=null
set M88=null
set hr=C0F
set C0F=null
return hr
endfunction
function L9F takes unit it,boolean J2 returns boolean
local integer kt=GetUnitAbilityLevel(it,'A0LN')
local real kl=GetUnitFacing(it)*bj_DEGTORAD
local real LDF=GetUnitX(it)+(350.+I2R(50*kt))*Cos(kl)
local real LEF=GetUnitY(it)+(350.+I2R(50*kt))*Sin(kl)
if((kJ(LDF,LEF))and((J2)or(Z87(LDF,LEF,GetUnitX(h9[16+GetPlayerId(GetOwningPlayer(it))]),GetUnitY(h9[16+GetPlayerId(GetOwningPlayer(it))]))<Z47(it,h9[16+GetPlayerId(GetOwningPlayer(it))]))))then
set GZ[GetPlayerId(GetOwningPlayer(it))]=true
return J8(GetPlayerId(GetOwningPlayer(it)),DE8(it,852129,'A0LN'))
endif
return false
endfunction
function LFF takes unit it,boolean J2 returns boolean
local integer kt=GetUnitAbilityLevel(it,'A1J7')
local real kl=GetUnitFacing(it)*bj_DEGTORAD
local real LDF=GetUnitX(it)+(300.+I2R('d'*kt))*Cos(kl)
local real LEF=GetUnitY(it)+(300.+I2R('d'*kt))*Sin(kl)
if((kJ(LDF,LEF))and((J2)or(Z87(LDF,LEF,GetUnitX(h9[16+GetPlayerId(GetOwningPlayer(it))]),GetUnitY(h9[16+GetPlayerId(GetOwningPlayer(it))]))<Z47(it,h9[16+GetPlayerId(GetOwningPlayer(it))]))))then
set GZ[GetPlayerId(GetOwningPlayer(it))]=true
return J8(GetPlayerId(GetOwningPlayer(it)),IssueImmediateOrderById(it,852600))
endif
return false
endfunction
function LGF takes unit it returns boolean
local integer i1=GetUnitTypeId(it)
local boolean J4=false
local location b5=null
local unit m5=null
local integer O5=GetPlayerId(GetOwningPlayer(it))
local unit H58=null
if(Z47(it,h9[16+O5])<600)or(GetUnitLifePercent(it)>80 and G0[144+O5])or(GetUnitAbilityLevel(it,'A0IH')>0)then
return false
endif
if G0[288+O5]then
set G0[288+O5]=false
set i1=eY[400+O5]
set G0[304+O5]=true
endif
if(i1=='EC45')then
set b5=kk(it,I2R(400+(200*GetUnitAbilityLevel(it,'A0LK'))),h9[16+O5])
set J4=(b5!=null)and(IssuePointOrderByIdLoc(it,852218,b5))
elseif((i1=='UC01')or(i1=='Edem'))then
set b5=kk(it,800.,h9[16+O5])
set J4=(b5!=null)and(IssuePointOrderByIdLoc(it,852525,b5))
elseif((i1=='N0MU')or(i1=='N0MW'))then
set b5=kk(it,800.,h9[16+O5])
set TI7=it
set bj_lastCreatedUnit=it
set H58=B97(1400,it,Condition(function C57))
set J4=H58!=null and AA7(it)>=WI7(GetWidgetLife(H58)<=300,0,1)and IssuePointOrderById(it,852218,GetUnitX(H58)+GetRandomReal(50,'d'),GetUnitY(H58)+GetRandomReal(50,'d'))
if J4 then
call TriggerSleepAction(.1)
endif
set J4=(b5!=null)and AO7(600,it,Condition(function BY7))>=1+WI7(GetWidgetLife(it)<=300 or GetUnitLifePercent(it)<20.,0,1)and(IssuePointOrderByIdLoc(it,852662,b5))
elseif((i1=='Ewar')or(i1=='HC92'))then
if(i1=='Ewar')then
set F37=600+GetUnitAbilityLevel(it,'A0PL')*'d'
else
set F37=700.
endif
set m5=C1F(F37,it)
if((m5!=null)and(it!=m5))then
set J4=(kJ(GetUnitX(m5),GetUnitY(m5)))and(not IsUnitInRange(m5,it,400.))and(IssueTargetOrderById(it,852600,m5))
endif
elseif(i1=='U00K')then
set b5=kk(it,I2R(280+('d'*GetUnitAbilityLevel(it,'A06O'))),h9[16+O5])
set J4=(b5!=null)and(IssuePointOrderByIdLoc(it,852218,b5))
elseif(i1=='O00P')then
set b5=kk(it,600.,h9[16+O5])
if(b5!=null)then
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'A0FN',true)
set GZ[O5]=true
if(GetUnitLifePercent(it)<48.)then
set J4=J8(O5,IssuePointOrderByIdLoc(it,852218,b5))
endif
endif
elseif(i1=='UC11')then
set b5=kk(it,800.,h9[16+O5])
if(b5!=null)and(Bz>V74[32+O5])then
set J4=L77(it,852218,'A1RD',b5)
endif
elseif(i1=='N01V')then
set J4=L9F(it,false)
elseif(i1=='E02F')then
set b5=kk(it,550.,h9[16+O5])
if(b5!=null)then
if(GetUnitLifePercent(it)<35.)then
call XK7("Icarus trying to use Dive")
set GZ[O5]=true
set J4=J8(O5,IssuePointOrderByIdLoc(it,852600,b5))
endif
endif
if((not J4)and(GetUnitLifePercent(it)<35.))then
set J4=IssueImmediateOrderById(it,852662)
endif
elseif(i1=='H00S')then
if(GetUnitManaPercent(it)>15.)then
set b5=kk(it,1200.,h9[16+O5])
if(b5!=null)then
set J4=L77(it,852218,'A14O',b5)
endif
if not J4 then
set b5=kk(it,600.,h9[16+O5])
if(b5!=null)then
set J4=L77(it,852218,'A14O',b5)
endif
endif
if J4 then
set h9[O5]=h9[16+O5]
endif
endif
elseif(i1=='N0M0')then
if(GetUnitState(it,UNIT_STATE_MANA)>100.)and(LoadInteger(R8,GetHandleId(it),(747))>0)and(not LState(it,"AI|EmberEscape"))then
set b5=kk(it,1500.,h9[16+O5])
if(b5!=null)then
set J4=IssuePointOrderByIdLoc(it,852490,b5)
endif
if not J4 then
set b5=kk(it,600.,h9[16+O5])
if(b5!=null)then
set J4=IssuePointOrderByIdLoc(it,852490,b5)
endif
endif
if J4 then
set h9[O5]=h9[16+O5]
call EW8(it,"AI|EmberEscape")
endif
endif
elseif(i1=='E032')then
if GetUnitAbilityLevel(it,'A2E3')!=0 then
set b5=kk(it,600+200*GetUnitAbilityLevel(it,'A2E3'),h9[16+O5])
if(b5!=null)and(K98(b5,300))then
set J4=IssuePointOrderById(it,852662,GetDestructableX(XL4),GetDestructableY(XL4))
endif
if(not J4)then
set b5=kk(it,800.,h9[16+O5])
if(b5!=null)and(K98(b5,300))then
set J4=IssuePointOrderById(it,852662,GetDestructableX(XL4),GetDestructableY(XL4))
endif
endif
endif
elseif(i1=='H071')then
set J4=LFF(it,false)
elseif(i1=='O01F')then
set m5=C1F(1800.,it)
if((m5!=null)and(it!=m5))then
set J4=(kJ(GetUnitX(m5),GetUnitY(m5)))and(not IsUnitInRange(m5,it,1000.))and(C_7(it,852119,'A1TA',m5))
endif
endif
if(i1=='E02X')and(not J4)and(hq[816+O5]>Bz)then
set G0[288+O5]=true
set J4=LGF(it)
set G0[304+O5]=false
endif
if(not J4)and(not G0[304+O5])then
set bj_lastLoadedUnit=it
if(not J4)and((AR7(it,BU[huanyingfu]))and(A87(it))and(AO7(800.,it,Condition(function GT8))>0))then
set GZ[224+O5]=true
set J4=(i1!='Eevm')and(UnitUseItem(it,bj_lastCreatedItem))
set GZ[224+O5]=false
endif
if(not J4)and(AR7(it,BU[keledebishou]))then
set b5=kk(it,700.,h9[16+O5])
set J4=(b5!=null)and(UnitUseItemPointLoc(it,bj_lastCreatedItem,b5))
endif
if(not J4)and(AR7(it,BU[yuanlifazhang]))then
if Y57(it,h9[16+O5],20)then
set b5=kk(it,600.,h9[16+O5])
set J4=(b5!=null)and(UnitUseItemTarget(it,bj_lastCreatedItem,it))
if J4 then
set h9[O5]=h9[16+O5]
endif
elseif(Y57(it,h9[O5],20))and(h9[O5]!=h9[16+O5])then
set b5=kk(it,600.,h9[O5])
set J4=(b5!=null)and(UnitUseItemTarget(it,bj_lastCreatedItem,it))
endif
endif
endif
set b5=null
set m5=null
set H58=null
return J4
endfunction
function LHF takes nothing returns boolean
if(((GetOwningPlayer(GetFilterUnit())==G8[0])or(GetOwningPlayer(GetFilterUnit())==N8[0]))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(hr)))and(GetWidgetLife(GetFilterUnit())>.405))then
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)and(true))then
set hF=hF+1
endif
return true
endif
return false
endfunction
function LIF takes real LJF,unit it,boolean LKF,boolean LMF returns integer
local real LNF
local real LOF
local real LDF=GetUnitX(it)
local real LEF=GetUnitY(it)
local integer kc=0
local integer UP=0
local integer O5=GetPlayerId(GetOwningPlayer(it))
if(LJF>0)then
set LNF=Bz+LJF
loop
set LOF=LNF-Bz
exitwhen LOF<=0
call TriggerSleepAction(.5)
set hr=it
if((GetWidgetLife(it)<=.405)or(GetUnitCurrentOrder(it)==851983)or(not is(it)))then
set LNF=Bz
elseif(not LMF)then
set I97=LoadUnitHandle(R8,(GetHandleId(it)),(652))
set ID7=LUnit((GetHandleId(it)),"AI|TetherSource")
if ZL7(it)and(not A87(it))then
if(I97!=null)and(not IsUnitInRange(it,I97,700)and(IsUnitType(I97,UNIT_TYPE_HERO)))then
call D48(it,851986,I97)
elseif(ID7!=null)and(not IsUnitInRange(it,ID7,700))then
call D48(it,851986,ID7)
else
call D48(it,851986,h9[O5])
endif
endif
set hF=0
set UP=AO7(700.,it,Condition(function LHF))
if((LJF-LOF>1.)and(hF>0))then
set LNF=Bz
set kc=2
elseif((LKF)and(LJF-LOF>1.)and(UP>1))then
set LNF=Bz
set kc=1
elseif(((LJF-LOF>2.)or((LJF-LOF>1.)and(LKF))))then
call MoveLocation(Ha,LDF,LEF)
if(AN7(700.,Ha,Condition(function LHF))>1)then
set LNF=Bz
set kc=3
endif
elseif((LJF-LOF>=2.)and(iy(it)))then
set LNF=Bz
set kc=1
endif
endif
endloop
endif
return kc
endfunction
function LPF takes nothing returns nothing
local unit it=LUnit(GetHandleId(GetTriggeringTrigger()),"Unit")
local integer O5=GetPlayerId(GetOwningPlayer(it))
local boolean VRF=GZ[512+O5]
local integer LQF
if A97(O5)then
return
endif
set G0[48+O5]=true
if(ZL7(it))then
call D48(it,851986,h9[O5])
endif
if(GetUnitTypeId(it)=='H00J')then
call TriggerSleepAction(1.)
set LQF=0
elseif eY[O5]==11 then
set LQF=LIF(1.,it,true,false)
elseif(VRF)then
set LQF=LIF(5.,it,true,false)
else
set LQF=LIF(3.,it,false,false)
endif
set G0[48+O5]=false
if((GetWidgetLife(it)<=.405)or(not is(it)))then
elseif(not ZL7(it))then
elseif((LQF==2)and(not A87(it))and(not G0[32+O5]))then
call IssueImmediateOrderById(it,851993)
elseif((VRF)or(LQF==3))then
if((not A87(it))and(not G0[32+O5])and(G0[128+O5]))then
call D48(it,851983,h8[O5])
else
call F28(it,false)
endif
endif
set it=null
endfunction
function LRF takes unit it returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer UP=GetUnitUserData(h8[O5])
local integer B2F=0
local real M78=.0
if(IsUnitAlly(it,G8[0]))then
if((hj[256+UP]==18)or(hj[UP]==10))then
set B2F=11+P54
if(UP>B2F)then
call B5F(it,0)
endif
elseif((hj[256+UP]==40)or(hj[UP]==30))then
set B2F=31+P24
if(UP>B2F)then
call B5F(it,1)
endif
elseif((hj[256+UP]==60)or(hj[UP]==50))then
set B2F=51+P_4
if(UP>B2F)then
call B5F(it,2)
endif
endif
else
set UP=hj[512+UP]
if((hj[256+UP]=='v')or(hj[UP]=='n'))then
set B2F='w'-P54
if(UP>B2F)then
call B5F(it,0)
endif
elseif((hj[256+UP]==140)or(hj[UP]==130))then
set B2F=141-P24
if(UP>B2F)then
call B5F(it,1)
endif
elseif((hj[256+UP]==160)or(hj[UP]==150))then
set B2F=161-P_4
if(UP>B2F)then
call B5F(it,2)
endif
endif
endif
if false and((eY[O5]==1)and(h4[O5]!=null)and((not Id(O5))and(GetUnitLifePercent(it)<70.)))then
set M78=Z47(it,h8[O5])
if(((M78>2000.)and(Z47(it,DH8(it))>Z47(h8[O5],DH8(it))))or((M78>1400.)and((GZ[400+O5])and(Bz>hq[544+O5]))))then
call XM7(O5,"Cancelkill a "+GetUnitName(h4[O5]))
call VWF(O5,true)
call D48(it,851986,h9[O5])
call VQF(it,true)
endif
endif
endfunction
function LSF takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER)and(not IsUnitIllusion(GetTriggerUnit()))and(GetIssuedOrderId()>852000))
endfunction
function LTF takes nothing returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
set GZ[16+O5]=true
set eY[256+O5]=GetIssuedOrderId()
set hq[448+O5]=Bz+3.
endfunction
function LUF takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetFilterUnit()))==MAP_CONTROL_COMPUTER)and(not IsUnitIllusion(GetFilterUnit()))and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function LVF takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(not IsUnitIllusion(GetFilterUnit()))and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function LWF takes unit Y47,unit A77 returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(Y47))
local integer UP
local integer j
local integer k
local integer CNF=Z97(GetUnitUserData(A77))
local boolean YV7=IsUnitAlly(Y47,G8[0])
set h4[144+O5]=null
set G0[32+O5]=false
set G0[160+O5]=false
set G0[176+O5]=false
set h4[O5]=null
set GZ[128+O5]=false
set eY[272+O5]=0
set UP=GetUnitUserData(A77)
if IsUnitAlly(Y47,G8[0])then
set UP=UP-1
else
set UP=UP+1
endif
set UP=BEF(UP,IsUnitAlly(Y47,G8[0]),X_7(Y47))
set k=ZD7(Y47)
if(Z47(Y47,DH8(Y47))<5000.)then
if(CNF==0)then
set h8[O5]=h7[14]
set h8[16+O5]=h7[14]
elseif(CNF==1)then
set h8[O5]=h7[35]
set h8[16+O5]=h7[35]
else
set h8[O5]=h7[55]
set h8[16+O5]=h7[55]
endif
set eY[O5]=1
set h9[O5]=DH8(Y47)
set h9[16+O5]=DH8(Y47)
set hq[576+O5]=Bz+HA7
if ZL7(Y47)then
call D48(Y47,851983,h8[O5])
endif
return
endif
set h8[128+O5]=h7[UP]
set eY[288+O5]=CNF
if eY[288+O5]!=0 then
set eY[304+O5]=eY[288+O5]
else
set eY[304+O5]=k
if eY[304+O5]==0 then
set eY[304+O5]=GetRandomInt(1,2)
endif
endif
set UP=BEF(GetUnitUserData(h9[O5]),IsUnitAlly(Y47,G8[0]),X_7(Y47))
set h8[48+O5]=h7[UP]
set UP=BGF(O5,UP,eY[304+O5],YV7)
set h8[32+O5]=h7[UP]
set eY[O5]=9
set hq[576+O5]=Bz+HA7
set hq[592+O5]=Bz+HD7
set G0[176+O5]=((not Z57(Y47))and(h8[48+O5]==h8[32+O5]))
set eY[208+O5]=GetUnitUserData(A77)
set h8[144+O5]=A77
if ZL7(Y47)then
if h8[48+O5]!=h8[32+O5]or G0[176+O5]then
call D48(Y47,851983,h8[48+O5])
else
call D48(Y47,851983,h9[O5])
endif
endif
endfunction
function LXF takes unit Y47,unit A77 returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(Y47))
local integer G88=GetPlayerId(GetOwningPlayer(A77))
local boolean YV7=IsUnitAlly(Y47,G8[0])
local integer UP
local integer LYF
local integer CNF=Z97(GetUnitUserData(A77))
local integer i
call VQF(Y7[O5],false)
set G0[160+O5]=true
set h4[144+O5]=Y7[G88]
set G0[32+O5]=false
set h4[O5]=null
set GZ[128+O5]=false
set G0[192+O5]=false
set G0[208+O5]=true
set hq[640+O5]=Bz+H87
set h8[96+O5]=A77
set h8[160+O5]=h8[80+G88]
set eY[288+O5]=ZD7(A77)
if eY[288+O5]!=0 then
set eY[304+O5]=eY[288+O5]
else
set eY[304+O5]=ZD7(Y47)
if eY[304+O5]==0 then
set eY[304+O5]=GetRandomInt(1,2)
endif
endif
set eY[272+O5]=1
set LYF=BEF(GetUnitUserData(h8[80+G88])+W97(YV7,1,-1),YV7,X_7(Y47))
set h8['p'+O5]=h7[LYF]
set UP=GetUnitUserData(h8[80+O5])
set LYF=BGF(O5,UP,eY[304+O5],YV7)
set h8[32+O5]=h7[LYF]
set h8[48+O5]=h8[32+O5]
set UP=ZD7(Y47)
set i=W97(IsUnitAlly(Y47,G8[0]),-1,1)
if(UP==0)then
if(Z47(Y47,DH8(Y47))>Z47(h7[14],DH8(Y47)))then
set h8[48+O5]=h7[14+i]
endif
elseif(UP==1)then
if(Z47(Y47,DH8(Y47))>Z47(h7[34],DH8(Y47)))then
set h8[48+O5]=h7[34+i]
endif
elseif(UP==2)then
if(Z47(Y47,DH8(Y47))>Z47(h7[57],DH8(Y47)))then
set h8[48+O5]=h7[57+i]
endif
endif
set UP=GetUnitUserData(h8['p'+O5])
if(YV7)then
if((hj[256+UP]==18)or(hj[UP]==10))then
set i=IMaxBJ(10+P54,11)
elseif((hj[256+UP]==40)or(hj[UP]==30))then
set i=IMaxBJ(30+P24,31)
else
set i=IMaxBJ(50+P_4,51)
endif
else
set UP=hj[512+UP]
if((hj[256+UP]=='v')or(hj[UP]=='n'))then
set i=IMaxBJ('v'-P54,'o')
elseif((hj[256+UP]==140)or(hj[UP]==130))then
set i=IMaxBJ(140-P24,131)
else
set i=IMaxBJ(160-P_4,151)
endif
endif
set h8[128+O5]=h7[i]
set eY[O5]=9
set hq[576+O5]=Bz+HA7
set hq[592+O5]=Bz+HD7
set G0[176+O5]=((not Z57(Y47))and(h8[48+O5]==h8[32+O5]))
if ZL7(Y47)and GetUnitCurrentOrder(Y47)==851983 then
if h8[48+O5]!=h8[32+O5]or G0[176+O5]then
call D48(Y47,851983,h8[48+O5])
else
call D48(Y47,851983,h9[O5])
endif
endif
endfunction
function LZF takes nothing returns nothing
local unit it=GetEnumUnit()
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer i1=GetUnitTypeId(it)
local real LAF=GetUnitX(it)
local real LBF=GetUnitY(it)
if(i1=='H00J')then
if(GetPlayerController(GetOwningPlayer(it))==MAP_CONTROL_COMPUTER)then
call J3(it,false)
endif
return
endif
if(GetPlayerController(GetOwningPlayer(it))==MAP_CONTROL_COMPUTER)then
if((GetHeroSkillPoints(it)>0)and(Bz>RD4)and(ZL7(it)))then
call ExecuteFunc("XIF")
endif
if((Z47(it,h8[O5])<150.)and(h8[O5]!=h7[1])and(h8[O5]!=h7['e']))then
if(IsUnitAlly(it,G8[0]))then
set hF=GetUnitUserData(h8[O5])
else
set hF=hj[512+GetUnitUserData(h8[O5])]
endif
if(hF>0)then
call MF8(it,hF)
elseif(h8[O5]!=h9[O5])then
set h8[O5]=h9[O5]
else
set h8[O5]=DH8(it)
endif
elseif(eY[O5]==1)then
call LRF(it)
endif
if(P94)then
set hF=GetUnitUserData(h8[O5])
if(((hF>30)and(hF<40))or((hF>50)and(hF<60)))then
call B5F(it,0)
endif
endif
if((h4[80+O5]!=null)and(GetWidgetLife(h4[80+O5])<=.405))then
set h4[80+O5]=null
endif
if((h4[96+O5]!=null)and(GetWidgetLife(h4[96+O5])<=.405))then
set h4[96+O5]=null
endif
if((h4[128+O5]!=null)and((GetWidgetLife(h4[128+O5])<=.405)))then
set h4[128+O5]=null
endif
if((h4[160+O5]!=null)and((GetWidgetLife(h4[160+O5])<=.405)or(not IsUnitInRange(it,h4[160+O5],1000.))))then
set h4[160+O5]=null
endif
if((h4[48+O5]!=null)and(((eY[O5]!=3)and(eY[O5]!=4))or(GetWidgetLife(h4[48+O5])<=.405)))then
set h4[48+O5]=null
endif
if((Z87(LAF,LBF,GetLocationX(HC[32+O5]),GetLocationY(HC[32+O5]))<20.)and(Bz>RD4))then
set G0[48+O5]=false
if(eY[O5]!=2)then
if((GZ[144+O5])and(ZL7(it))and(AO7(700.,it,Condition(function KX))==0)and(((eY[O5]!=9 or eY[272+O5]!=3)and eY[O5]!=10 and eY[O5]!=11)or(AO7(700.,it,Condition(function KA))==0)))then
call ExecuteFunc("LCF")
else
set GZ[144+O5]=true
if((eY[O5]==3)or(eY[O5]==4))then
call YZ7(it,O5)
endif
if(iU(it))then
call J3(it,true)
endif
endif
elseif((GetUnitLifePercent(it)>90)and(GetUnitManaPercent(it)>90))then
if(GZ[144+O5])then
if(IsUnitAlly(it,G8[0]))then
call CIF(it,O5,PT4)
else
call CIF(it,O5,PU4)
endif
else
set GZ[144+O5]=true
endif
endif
elseif(GZ[144+O5])then
set GZ[144+O5]=false
endif
call MoveLocation(HC[32+O5],LAF,LBF)
if((eY[O5]==10)and(hq[432+O5]<Bz))then
set eY[O5]=1
set h4[64+O5]=null
endif
if((GZ[480+O5])and(eY[O5]!=4)and(eY[O5]!=2))then
set GZ[480+O5]=false
endif
if((GZ[16+O5])and(hq[448+O5]<Bz)and(eY[256+O5]==GetUnitCurrentOrder(it)))then
call J3(it,true)
set GZ[16+O5]=false
endif
elseif((GetPlayerController(GetOwningPlayer(it))==MAP_CONTROL_NONE)and(IsUnitInForce(it,RX4)))then
if((is(it))and(GetUnitCurrentOrder(it)!=851983))then
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'Amov',true)
call SetPlayerController(GetOwningPlayer(it),MAP_CONTROL_COMPUTER)
call J3(it,true)
endif
endif
set GZ[32+O5]=false
set GZ[400+O5]=false
endfunction
function L3F takes nothing returns nothing
local integer O5=1
local integer E_8
local integer i=0
local integer j=0
local real L6F
local real LLF
local boolean L1F=false
local string L0F=""
local boolean L5F=(Bz>RD4)
local boolean L2F=(Bz>RD4)
set O5=1
loop
exitwhen O5>11
if O5==6 then
set O5=7
endif
if(GetPlayerSlotState(Player(O5))==PLAYER_SLOT_STATE_PLAYING)then
call GroupClear(iE)
call GroupEnumUnitsOfPlayer(iE,Player(O5),ip)
call ForGroup(iE,function LZF)
if Y7[O5]!=null then
set L6F=2+GetHeroAgi(Y7[O5],true)*.14
set LLF=1
set i=0
loop
exitwhen i>5
set j=GetItemTypeId(UnitItemInSlot(Y7[O5],i))
if((j==BU[suozijia])or(j==BU[renjia])or(j==BU[xuanmingdunpai])or(j==BU[meikensimu])or(j==BU[tieyitoukui])or(j==BU[fenzhengmiansha])or(j==BU[zhipeitoukui])or(j==BU[sadanzhixieli])or(j==BU[bizhang])or(j==BU[bizhang2]))then
set L6F=L6F+5
elseif((j==BU[banjia])or(j==BU[qiangxizhuangjia])or(j==BU[xiwadeshouhu]))then
set L6F=L6F+10
elseif(j==BU[shanbihufu])then
set LLF=LLF+.25
elseif(j==BU[hudie])then
set LLF=LLF+.3
endif
set i=i+1
endloop
set L6F=(.06*L6F)/(1.+.06*L6F)
set hq[752+O5]=(1/(1-L6F))*(LLF)
endif
if Y7[O5]!=null and GetHeroLevel(Y7[O5])<11 then
if IsPlayerAlly(Player(O5),G8[0])then
set L2F=false
else
set L5F=false
endif
endif
endif
set O5=O5+1
endloop
if L5F and(not E27)then
set E27=true
set F17=false
set O5=1
loop
exitwhen O5>5
if KR8(G8[O5])then
set F17=true
endif
set O5=O5+1
endloop
if F17 then
set O5=1
loop
exitwhen O5>5
set E_8=GetPlayerId(G8[O5])
if E57[16+E_8]then
set E57[16+E_8]=false
call F48(IN4,GetObjectName('Y065')+"
					"+GetObjectName('YA65')+HS7+GetObjectName('Y066'),G8[O5])
endif
set O5=O5+1
endloop
endif
endif
if L2F and(not E_7)then
set E_7=true
set F17=false
set O5=1
loop
exitwhen O5>5
if KR8(N8[O5])then
set F17=true
endif
set O5=O5+1
endloop
if F17 then
set O5=1
loop
exitwhen O5>5
set E_8=GetPlayerId(N8[O5])
if E57[16+E_8]then
set E57[16+E_8]=false
call F48(JS4,GetObjectName('Y065')+"
					"+GetObjectName('YA65')+HS7+GetObjectName('Y066'),N8[O5])
endif
set O5=O5+1
endloop
endif
endif
if((G1==0)and(not Ev)and(not Av))then
set G1=GetRandomInt(1,2)
elseif((G1==1)and(not Rv)and(not av))then
if((Nv)or(Ov))then
set G1=2
else
set G1=-1
endif
elseif((G1==2)and(not Nv)and(not Ov))then
if((Rv)or(av))then
set G1=1
else
set G1=-1
endif
endif
if((G2==0)and(not Bv)and(not Dv))then
set G2=GetRandomInt(1,2)
elseif((G2==1)and(not O7)and(not Cv))then
if((P7)or(fv))then
set G2=2
else
set G2=-1
endif
elseif((G2==2)and(not P7)and(not fv))then
if((O7)or(Cv))then
set G2=1
else
set G2=-1
endif
endif
set HA7=HG7-HH7*Bz
if HA7<HI7 then
set HA7=HI7
endif
call CFF()
if PY4 and G4==-1 then
set F57=E8
set i=1
loop
exitwhen i>5
set O5=GM7[80+i]
if O5!=-1 and Y7[O5]!=null and GetUnitLifePercent(Y7[O5])>70. and eY[O5]==1 and h4[O5]==null and(eY[544+O5]==0 and Bz>hq[576+O5])and(GetHeroLevel(Y7[O5])<PA4)and(GetHeroLevel(Y7[O5])>=SE7)then
set j=CMF(CRF(Y7[O5]),GetHeroLevel(Y7[O5]))
if(j!=eY[64+O5])and(j==0 or eY[64+O5]==0)and((GM7['p'+j]!=0)or(GM7[144+j]<Bz))then
set GM7['p'+eY[64+O5]]=GM7['p'+eY[64+O5]]-1
if(j==1)then
call LWF(Y7[O5],h7[29+P24])
call FQ8(Y7[O5],F57,GetObjectName('Y005'))
elseif(j==2)then
call LWF(Y7[O5],h7[49+P_4])
call FQ8(Y7[O5],F57,GetObjectName('Y006'))
else
call LWF(Y7[O5],h7[9+P54])
call FQ8(Y7[O5],F57,GetObjectName('Y004'))
endif
call FV8(Y7[O5],F57)
set GM7['p'+j]=GM7['p'+j]+1
set eY[64+O5]=j
endif
endif
set i=i+1
endloop
endif
if PZ4 and G3==-1 then
set F57=F8
set i=1
loop
exitwhen i>5
set O5=GM7[86+i]
if O5!=-1 and Y7[O5]!=null and GetUnitLifePercent(Y7[O5])>70. and eY[O5]==1 and h4[O5]==null and(eY[544+O5]==0 and Bz>hq[576+O5])and(GetHeroLevel(Y7[O5])<PA4)and(GetHeroLevel(Y7[O5])>=SE7)then
set j=CMF(CGF(Y7[O5]),GetHeroLevel(Y7[O5]))
if(j!=eY[64+O5])and(j==0 or eY[64+O5]==0)and((GM7['v'+j]!=0)or(GM7[144+j]<Bz))then
set GM7['v'+eY[64+O5]]=GM7['v'+eY[64+O5]]-1
if(j==1)then
call LWF(Y7[O5],h7[139-P24])
call FQ8(Y7[O5],F57,GetObjectName('Y005'))
elseif(j==2)then
call LWF(Y7[O5],h7[159-P_4])
call FQ8(Y7[O5],F57,GetObjectName('Y006'))
else
call LWF(Y7[O5],h7['u'-P54])
call FQ8(Y7[O5],F57,GetObjectName('Y004'))
endif
call FV8(Y7[O5],F57)
set GM7['v'+j]=GM7['v'+j]+1
set eY[64+O5]=j
endif
endif
set i=i+1
endloop
endif
set O5=1
loop
exitwhen O5>11
if O5==6 then
set O5=7
endif
if(GetPlayerSlotState(Player(O5))==PLAYER_SLOT_STATE_PLAYING)then
set L1F=false
if Y7[O5]!=null and GetWidgetLife(Y7[O5])>.405 then
if Z57(Y7[O5])then
if h4[176+O5]==null or Z47(Y7[O5],h4[176+O5])>3000. or GetWidgetLife(h4[176+O5])>0 then
set HF7=null
set i=1
loop
exitwhen HF7!=null or i>5
if IsPlayerAlly(Player(O5),G8[0])then
set E_8=GetPlayerId(N8[i])
else
set E_8=GetPlayerId(G8[i])
endif
if Y7[E_8]!=null and GetWidgetLife(Y7[E_8])>.405 and KR8(Player(E_8))then
if Z47(Y7[E_8],Y7[O5])<1800. then
set HF7=Y7[E_8]
endif
endif
set i=i+1
endloop
if HF7!=null then
set h4[176+O5]=HF7
endif
endif
set GO7[48+O5]=GetUnitX(Y7[O5])
set GO7[64+O5]=GetUnitY(Y7[O5])
set eY[336+O5]=eY[80+O5]
if eY[240+O5]<R2I(Bz)then
set HF7=h4[176+O5]
if HF7==null then
set HF7=h4[192+O5]
endif
if HF7!=null then
set E_8=GetPlayerId(GetOwningPlayer(HF7))
set L1F=true
set L0F="|r"+W[E_8]+KW4[E_8]+GetObjectName('Y038')+YR7(eY[80+O5],true)+" - "+W[O5]+GetUnitName(Y7[O5])+"|r"
set h4[192+O5]=null
endif
endif
set eY[240+O5]=R2I(Bz)+HE7
elseif eY[240+O5]<R2I(Bz)and h4[176+O5]!=null then
set E_8=GetPlayerId(GetOwningPlayer(h4[176+O5]))
set L1F=true
set L0F="|r"+W[E_8]+KW4[E_8]+GetObjectName('Y039')+YR7(eY[336+E_8],true)+" - "+W[O5]+GetUnitName(Y7[O5])+"|r"
set h4[192+O5]=h4[176+O5]
set h4[176+O5]=null
endif
else
set h4[176+O5]=null
endif
if L1F then
call TriggerSleepAction(.4)
if IsPlayerAlly(Player(O5),G8[0])then
set F57=F8
else
set F57=E8
endif
if E57[16+GetPlayerId(GetLocalPlayer())]and IsPlayerInForce(GetLocalPlayer(),F57)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10.,L0F)
call FU8(F57,GO7[48+O5],GO7[64+O5],E_8)
endif
endif
endif
set O5=O5+1
endloop
set F57=null
endfunction
function L_F takes integer O5,unit Y47,unit D4G,boolean D7G returns boolean
local boolean L37=false
if(not L37)and((GetUnitAbilityLevel(Y47,'A01O')>0)and(Bz>V74[32+O5]))then
set L37=IssuePointOrderById(Y47,852525,GetUnitX(D4G)+GetRandomReal(-200.,200.),GetUnitY(D4G)+GetRandomReal(-200.,200.))
endif
if(not L37)and D7G and(GetUnitAbilityLevel(Y47,'A0H9')>0 and(Bz>V74[O5]))then
set bj_lastLoadedUnit=D4G
set bj_lastReplacedUnit=AJ7(800.,L_7(D4G),Condition(function GT8))
if(bj_lastReplacedUnit!=null)then
set L37=IssueImmediateOrderById(Y47,852490)
endif
endif
if(not L37)and D7G and(GetUnitAbilityLevel(Y47,'A0R0')>0 and(Bz>V74[O5]))then
set L37=IssuePointOrderById(Y47,852600,GetUnitX(D4G),GetUnitY(D4G))
endif
if(not L37)and D7G and(GetUnitAbilityLevel(Y47,'A1TB')>0 and(Bz>V74[O5]))then
if(Bz>V74[16+O5])then
set bj_lastReplacedUnit=JF8(1800.,Y47,false)
if bj_lastReplacedUnit!=null then
set L37=C_7(Y47,852119,'A1TA',bj_lastReplacedUnit)
set h8[160+O5]=D4G
endif
endif
if(not L37)then
set L37=IssuePointOrderById(Y47,852662,GetUnitX(D4G)+GetRandomReal(-200.,200.),GetUnitY(D4G)+GetRandomReal(-200.,200.))
endif
endif
set bj_lastLoadedUnit=D4G
if(not L37)and D7G and(GetPlayerController(GetOwningPlayer(D4G))==MAP_CONTROL_COMPUTER)and((GetUnitTypeId(D4G)=='Hblm' and DE8(D4G,852180,'A11T'))or((GetUnitAbilityLevel(D4G,'A11Z')+GetUnitAbilityLevel(D4G,'A10U')+GetUnitAbilityLevel(D4G,'A11Y'))>0))and(AO7(800.,Y47,Condition(function GT8))==0)and(ZL7(D4G))and(ZL7(Y47))then
if(IssueTargetOrderById(D4G,852248,Y47))then
set L37=true
call VQF(Y47,true)
endif
endif
if(not L37)and(eY[224+O5]<R2I(Bz)and GetUnitState(Y47,UNIT_STATE_MANA)>GF7)then
set L37=FZ8(Y47,D4G)
endif
return L37
endfunction
function D8G takes unit Y47,boolean YV7,integer YS7 returns integer
local unit D9G=null
local integer O5=0
local integer UP=0
local integer i=0
local integer YWF=0
local integer k=0
local real BVF=0
if LReal(GetHandleId(Y47),"AI|TowerDef_CountCD")>R2I(Bz)then
return LInt(GetHandleId(Y47),"AI|TowerDef_Require")
endif
set F17=false
set bj_lastLoadedUnit=null
set BVF=9999999
call GroupClear(H8)
call GroupEnumUnitsInRange(H8,GetUnitX(Y47),GetUnitY(Y47),1800.,R24)
loop
set D9G=FirstOfGroup(H8)
exitwhen D9G==null
call GroupRemoveUnit(H8,D9G)
set O5=GetPlayerId(GetOwningPlayer(D9G))
set i=GetUnitTypeId(D9G)
if((GetUnitAbilityLevel(D9G,'A04R')!=0 and((i=='umtw' or i=='u00R')or(i=='ebal' or i=='e026'))==false)or GetUnitAbilityLevel(D9G,'Aloc')!=0 or GetWidgetLife(D9G)<50.)then
elseif O5==12 or O5>14 then
elseif not(IsUnitType(D9G,UNIT_TYPE_MELEE_ATTACKER)or IsUnitType(D9G,UNIT_TYPE_RANGED_ATTACKER))then
else
set i=GetUnitTypeId(D9G)
set UP=0
if IsUnitType(D9G,UNIT_TYPE_HERO)and i!='H00J' then
if(IsUnitAlly(D9G,G8[0])==YV7)then
set F17=true
set F37=Z47(Y47,D9G)
if F37<BVF and KR8(Player(O5))then
set bj_lastLoadedUnit=D9G
set BVF=F37
endif
else
set k=k+1
endif
elseif O5!=GetPlayerId(G8[0])and O5!=GetPlayerId(N8[0])then
set UP=3
else
if(i=='ugho' or i=='unec')or(i=='u001' or i=='u002')or(i=='esen' or i=='edry')or(i=='e00V' or i=='e00W')then
set UP=1
elseif(i=='umtw' or i=='u00R')or(i=='ebal' or i=='e026')then
set UP=3
else
set UP=5
endif
endif
if(IsUnitAlly(D9G,G8[0])==YV7)then
set YWF=YWF-UP
else
set YWF=YWF+UP
endif
endif
endloop
if YV7 then
set k=R2I(FB7*I2R(k))
else
set k=R2I(FA7*I2R(k))
endif
set YWF=YWF+IMaxBJ(600-R2I(GetWidgetLife(Y47)),0)/ 30
if(not F17)and(k==0)and(YWF>GA7)then
set k=k+1
endif
call CFF()
set k=k-GM7['p'+W97(YV7,0,6)+YS7]
call SInt(GetHandleId(Y47),"AI|TowerDef_Require",k)
call SReal(GetHandleId(Y47),"AI|TowerDef_CountCD",Bz+1)
return k
endfunction
function DDG takes nothing returns nothing
local unit Y47=LUnit(GetHandleId(GetTriggeringTrigger()),"Unit")
local unit D9G=null
local boolean YV7=IsUnitAlly(Y47,G8[0])
local integer O5=0
local integer j=0
local integer i=0
local integer k=0
local integer YWF=0
local integer UP
local boolean L37=false
if(GetWidgetLife(Y47)<.405 or T79(Y47))or((not((YV7 and PY4)or((not YV7)and PZ4))))or(P94)or(Y47==null)or(LReal(GetHandleId(Y47),"DefCD")>Bz)then
set Y47=null
return
endif
set j=LInt(GetHandleId(Y47),"AI|Lane")
set k=D8G(Y47,YV7,j)
call SReal(GetHandleId(Y47),"DefCD",Bz+1.)
if k<=0 then
set Y47=null
return
endif
if bj_lastLoadedUnit!=null and GetWidgetLife(Y47)<G_7 then
if Bz>LReal(GetHandleId(Y47),"PingCD")then
call SReal(GetHandleId(Y47),"PingCD",Bz+30.)
if YV7 then
call FU8(E8,GetUnitX(Y47),GetUnitY(Y47),GetPlayerId(GetOwningPlayer(bj_lastLoadedUnit)))
else
call FU8(F8,GetUnitX(Y47),GetUnitY(Y47),GetPlayerId(GetOwningPlayer(bj_lastLoadedUnit)))
endif
endif
endif
set D9G=h7[LInt(GetHandleId(Y47),"AI|Wpt")]
set i=1
set YWF=W97(YV7,0,6)
set L37=false
loop
exitwhen(i>5)
set O5=GM7[80+YWF+i]
if O5!=-1 and GetPlayerController(Player(O5))==MAP_CONTROL_COMPUTER then
set GM7[96+O5]=0
set GM7[176+O5]=0
set UP=ZD7(Y7[O5])
set bj_lastLoadedUnit=Y7[O5]
if(Y7[O5]==null)or((eY[O5]!=1 or(GetUnitCurrentOrder(Y7[O5])==851986 and G0[48+O5]==false))and eY[O5]!=10)or(HA4[O5])or(A87(Y7[O5]))then
elseif(UP==j)then
set eY[544+O5]=1
set h9[64+O5]=Y47
set hq[320+O5]=Bz+20.
elseif(eY[544+O5]!=0)or(eY[O5]==3 or eY[O5]==4)or(Bz<hq[528+O5])or(h4[O5]!=null)or(AV4[O5]==AX4)or(GetHeroLevel(Y7[O5])<G67)or(GetUnitLifePercent(Y7[O5])<50.)then
else
set GM7[96+O5]=1
endif
endif
set i=i+1
endloop
set i=1
loop
exitwhen(i>15 or k<=0)
if i>10 then
set O5=GM7[80+YWF+i-10]
elseif i>5 then
set O5=GM7[80+YWF+i-5]
else
set O5=GM7[80+YWF+i]
endif
if O5!=-1 and GM7[96+O5]==1 and GetPlayerController(Player(O5))==MAP_CONTROL_COMPUTER then
set UP=ZD7(Y7[O5])
if(i<5)and(Bz>hq[576+O5])then
elseif(i<=10)and((YV7 and((GM7['p'+UP]-GM7['v'+UP]<0)or(GM7['p'+UP]<=1)))or((not YV7)and((GM7['v'+UP]-GM7['p'+UP]<0)or(GM7['v'+UP]<=1))))then
elseif(GM7[176+O5]==0)then
set GM7[176+O5]=1
set bj_lastCreatedUnit=AJ7(1200.,L_7(Y7[O5]),Condition(function AQ7))
if((bj_lastCreatedUnit==null)or(GetWidgetLife(bj_lastCreatedUnit)>200.))then
set F17=false
if(i<=10)and(eY[224+O5]<R2I(Bz)and GetUnitState(Y47,UNIT_STATE_MANA)>GF7)and AR7(Y47,QB)then
if(AO7(1500.,Y7[O5],Condition(function GT8))==0)and(FZ8(Y7[O5],Y47))then
call LWF(Y7[O5],D9G)
call XK7("TowerDef count30 "+GetUnitName(Y7[O5])+" "+I2S(j)+" "+I2S(k)+"/"+I2S(YWF))
else
call VQF(Y7[O5],true)
set h8[144+O5]=Y47
call XK7("TowerDef count30 "+GetUnitName(Y7[O5])+" "+I2S(j)+" "+I2S(k)+"/"+I2S(YWF))
endif
set F17=true
endif
if(not F17)and(i>10)then
set F17=((j!=UP)and(j==0 or UP==0))
if(F17)then
call XK7("TowerDef count31 "+GetUnitName(Y7[O5])+" "+I2S(j)+" "+I2S(k)+"/"+I2S(YWF))
call LWF(Y7[O5],D9G)
set h4[144+O5]=Y47
set h8[144+O5]=Y47
endif
endif
if(F17)then
set k=k-1
set hq[528+O5]=Bz+10.
set eY[544+O5]=1
set h9[64+O5]=Y47
set GM7['p'+YWF+UP]=GM7['p'+YWF+UP]-1
if eY[O5]!=9 then
set eY[O5]=1
endif
set L37=true
endif
endif
endif
endif
set i=i+1
endloop
if L37 then
call SReal(GetHandleId(Y47),"DefCD",Bz+10.)
endif
set Y47=null
set D9G=null
endfunction
function DEG takes nothing returns boolean
return((GetWidgetLife(GetTriggerUnit())>50.)and(GE8(GetTriggerUnit()))and(IsUnitEnemy(GetTriggerUnit(),G8[0])))
endfunction
function DFG takes nothing returns boolean
return((GetWidgetLife(GetTriggerUnit())>50.)and(GE8(GetTriggerUnit()))and(IsUnitEnemy(GetTriggerUnit(),N8[0])))
endfunction
function DGG takes unit Y47,integer DHG,integer YS7 returns trigger
local trigger t=CreateTrigger()
if GetOwningPlayer(Y47)==G8[0]then
call TriggerRegisterUnitInRange(t,Y47,1200.,Condition(function DEG))
call SInt(GetHandleId(Y47),"AI|WptClear",DHG+1)
else
call TriggerRegisterUnitInRange(t,Y47,1200.,Condition(function DFG))
call SInt(GetHandleId(Y47),"AI|WptClear",DHG-1)
endif
call TriggerAddAction(t,function DDG)
call SUnit(GetHandleId(t),"Unit",Y47)
call SInt(GetHandleId(Y47),"AI|Wpt",DHG)
call SInt(GetHandleId(Y47),"AI|Lane",YS7)
return t
endfunction
function DIG takes unit it returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer k=0
local integer YWF=0
local integer i=0
local integer j=0
local boolean DJG=false
local unit Y47=null
local player pl=GetOwningPlayer(it)
local boolean DKG=false
local integer DMG
local boolean DNG=false
local boolean L37=false
local boolean DOG=IsUnitInRange(it,DH8(it),5000.)
local boolean DPG=false
set i=GetUnitTypeId(it)
if KR8(pl)and((i=='H00R')or(i=='H07I')or(i=='U006')or(i=='Uktl'))then
set DPG=true
set GZ[O5]=true
endif
set i=0
set GZ[320+O5]=false
call GroupClear(H8)
call GroupClear(iA)
call GroupClear(H9)
call GroupEnumUnitsInRange(iA,GetUnitX(it),GetUnitY(it),1800.,null)
loop
set Y47=FirstOfGroup(iA)
exitwhen Y47==null
call GroupRemoveUnit(iA,Y47)
if not IsUnitIllusion(Y47)then
call GroupAddUnit(H8,Y47)
endif
if(not DKG)and IsUnitType(Y47,UNIT_TYPE_HERO)and IsUnitEnemy(Y47,pl)and GetWidgetLife(Y47)>.405 and eY[32+GetPlayerId(GetOwningPlayer(Y47))]>0 then
set DKG=true
call GroupEnumUnitsInRange(H9,GetUnitX(Y47),GetUnitY(Y47),1200.,null)
call GroupAddGroup(H9,H8)
endif
endloop
set h4[304+O5]=null
loop
set Y47=FirstOfGroup(H8)
exitwhen(Y47==null)
if(GetWidgetLife(Y47)<=.405)then
elseif A87(Y47)then
elseif(IsUnitType(Y47,UNIT_TYPE_HERO))then
if(IsUnitEnemy(Y47,pl))then
if((not IsUnitInRange(it,Y47,600.))or(kD(Y47)))and(eY[32+GetPlayerId(GetOwningPlayer(Y47))]==0)then
elseif(GetUnitTypeId(Y47)!='H00J')then
set YWF=YWF-1
set L37=true
if(DPG)and(GetUnitTypeId(Y47)=='Otch')then
set GZ[O5]=false
endif
elseif(not DNG)then
set DNG=true
endif
elseif IsUnitInRange(Y47,it,1200.)or DOG then
if((GetUnitTypeId(Y47)!='H00J')and(not A87(Y47)))then
set k=k+1
set i=i+1
endif
if IsUnitInRange(Y47,it,800)then
set GZ[320+O5]=true
endif
endif
elseif((IsUnitType(Y47,UNIT_TYPE_STRUCTURE)and IsUnitType(Y47,UNIT_TYPE_RANGED_ATTACKER))and(Z47(Y47,it)<800.)and(X_7(it)<2000.))then
if(IsUnitEnemy(Y47,pl))then
set j=j-1
set h4[304+O5]=Y47
elseif IsUnitAlly(Y47,pl)then
set j=j+1
endif
endif
call GroupRemoveUnit(H8,Y47)
endloop
if(DNG)then
set YWF=YWF-1
set DJG=true
endif
if not L37 then
set h4[304+O5]=null
endif
if IsPlayerAlly(pl,G8[0])then
set eY[320+O5]=R2I(k*FA7+YWF*FB7)+j
set GZ[208+O5]=((R2I(i*FA7)>=3)and(k<=0))
else
set eY[320+O5]=R2I(k*FB7+YWF*FA7)+j
set GZ[208+O5]=((R2I(i*FB7)>=3)and(k<=0))
endif
return DJG
endfunction
function DQG takes unit it returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer kc=0
local boolean J4=false
local boolean DJG=false
local player pl=GetOwningPlayer(it)
local integer UP
local real F_8=.0
set DJG=DIG(it)
if A97(O5)then
set pl=null
return false
endif
if(Z47(it,DH8(it))<600.)then
set kc=0
else
set kc=-eY[320+O5]
if(not G0[128+O5])then
set kc=kc+1
endif
if((GetUnitLifePercent(it)<70.)or(IC(O5)))then
set kc=kc+1
endif
if(eY[O5]==3 or eY[O5]==4)then
set kc=kc-1
endif
endif
set G0[144+O5]=DJG
if(kc>2)and(eY[O5]<9)and(h4[O5]==null or(not A47(h4[O5],it)))then
set h4[O5]=null
set GZ[128+O5]=false
set G0[128+O5]=false
set G0[256+O5]=false
if h4[304+O5]==null or kc>=3 then
set hq[496+O5]=Bz+3.
else
set hq[496+O5]=Bz+1.
endif
if(is(it))then
set TI7=it
set F_8=AO7(600,it,Condition(function BY7))
set J4=(GetUnitAbilityLevel(it,'A0IH')<1)and D48(it,851986,h9[O5])
endif
set J4=true
elseif kc>1 then
set G0[256+O5]=false
else
set G0[128+O5]=true
set G0[256+O5]=true
endif
set pl=null
return J4
endfunction
function DRG takes nothing returns boolean
return((not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and(GE8(GetFilterUnit())))
endfunction
function DSG takes nothing returns nothing
local unit it=LUnit(GetHandleId(GetTriggeringTrigger()),"Unit")
local unit m5=GetTriggerUnit()
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer UP
local string L0F
if(IsUnitType(m5,UNIT_TYPE_STRUCTURE))then
set UP=AO7(1250.,m5,Condition(function DRG))
if(eY[O5]==9)then
call MH8(it)
endif
if((GetHeroLevel(it)<6)or((X_7(it)<500)and(not Id(O5))and(Bz>hq[512+O5])))then
if((R2I(GetUnitState(it,UNIT_STATE_LIFE))<(400+(GetHeroLevel(it)*40)))and(UP<3))then
call XM7(O5,"Cancelkill b "+GetUnitName(h4[O5]))
call VWF(O5,false)
set GZ[128+O5]=false
call VQF(it,false)
elseif((GetUnitLifePercent(m5)>20.)and((UP<1)or(((GG8(it))or(GetHeroLevel(it)<10))and(UP<2))))then
call VQF(it,true)
endif
elseif(A87(it))then
call XM7(O5,"Cancelkill m "+GetUnitName(h4[O5]))
call VWF(O5,false)
set GZ[128+O5]=false
call VQF(it,false)
endif
if(GetUnitAbilityLevel(m5,'Avul')>0)then
call B5F(it,-1)
else
set h4[128+O5]=m5
endif
elseif(IsUnitType(m5,UNIT_TYPE_HERO))and(IsUnitVisibleEx(m5,Player(O5)))then
call DQG(it)
if(iy(it))then
set h4[160+O5]=m5
endif
set UP=GetPlayerId(GetOwningPlayer(m5))
if(KR8(Player(O5)))and(eY[240+UP]<R2I(Bz))then
set L0F="|r"+W[O5]+KW4[O5]+GetObjectName('Y038')+YR7(ZE7(O5),true)+" - "+W[UP]+GetUnitName(m5)+"|r"
set h4[192+UP]=null
set eY[240+UP]=R2I(Bz)+HE7
call TriggerSleepAction(.4)
if IsUnitAlly(it,G8[0])then
set F57=E8
else
set F57=F8
endif
if E57[16+GetPlayerId(GetLocalPlayer())]and IsPlayerInForce(GetLocalPlayer(),F57)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10.,L0F)
call FU8(F57,GetUnitX(m5),GetUnitY(m5),O5)
endif
endif
endif
set it=null
set m5=null
endfunction
function DTG takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(Z_7(GetTriggerUnit()))and(IsUnitAlly(GetTriggerUnit(),G8[0])))
endfunction
function DUG takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(Z_7(GetTriggerUnit()))and(IsUnitAlly(GetTriggerUnit(),N8[0])))
endfunction
function DVG takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(Z_7(GetTriggerUnit()))and(GetOwningPlayer(GetTriggerUnit())==G8[0])and((GetUnitTypeId(GetTriggerUnit())=='e00R')or(GetUnitTypeId(GetTriggerUnit())=='e011')or(GetUnitTypeId(GetTriggerUnit())=='e00S')or(GetUnitTypeId(GetTriggerUnit())=='e019')))
endfunction
function DWG takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(Z_7(GetTriggerUnit()))and(GetOwningPlayer(GetTriggerUnit())==N8[0])and((GetUnitTypeId(GetTriggerUnit())=='u00M')or(GetUnitTypeId(GetTriggerUnit())=='u00D')or(GetUnitTypeId(GetTriggerUnit())=='u00N')or(GetUnitTypeId(GetTriggerUnit())=='u00T')))
endfunction
function DXG takes unit it returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(it))
if(R04[32+O5]!=null)then
call LT7(GetHandleId(R04[32+O5]))
call DestroyTrigger(R04[32+O5])
endif
set R04[32+O5]=CreateTrigger()
call SUnit(GetHandleId(R04[32+O5]),"Unit",it)
if(IsUnitAlly(it,G8[0]))then
call TriggerRegisterUnitInRange(R04[32+O5],it,1000.,Condition(function DUG))
call TriggerRegisterUnitInRange(R04[32+O5],it,1000.,Condition(function DWG))
else
call TriggerRegisterUnitInRange(R04[32+O5],it,1000.,Condition(function DTG))
call TriggerRegisterUnitInRange(R04[32+O5],it,1000.,Condition(function DVG))
endif
call TriggerAddAction(R04[32+O5],function DSG)
if(R04[64+O5]!=null)then
call LT7(GetHandleId(R04[64+O5]))
call DestroyTrigger(R04[64+O5])
endif
set R04[64+O5]=CreateTrigger()
call SUnit(GetHandleId(R04[64+O5]),"Unit",it)
call TriggerAddAction(R04[64+O5],function LPF)
set R04[128+O5]=CreateTrigger()
call TriggerRegisterTimerEvent(R04[128+O5],30.,true)
call TriggerAddAction(R04[128+O5],function CUF)
call SUnit(GetHandleId(R04[128+O5]),"u",it)
call DisableTrigger(R04[128+O5])
endfunction
function DYG takes nothing returns nothing
call DIG(LUnit(GetHandleId(GetTriggeringTrigger()),"Unit"))
endfunction
function WCF takes nothing returns nothing
local unit Y47=GetTriggerUnit()
local integer O5=GetPlayerId(GetOwningPlayer(Y47))
if(R04[32+O5]!=null)then
call LT7(GetHandleId(R04[32+O5]))
call DestroyTrigger(R04[32+O5])
endif
set R04[32+O5]=CreateTrigger()
call SUnit(GetHandleId(R04[32+O5]),"Unit",Y47)
if(IsUnitAlly(Y47,G8[0]))then
call TriggerRegisterUnitInRange(R04[32+O5],Y47,1000.,Condition(function DUG))
else
call TriggerRegisterUnitInRange(R04[32+O5],Y47,1000.,Condition(function DTG))
endif
call TriggerAddAction(R04[32+O5],function DYG)
set Y47=null
endfunction
function xh takes nothing returns nothing
local trigger t=CreateTrigger()
local unit it=GetTriggerUnit()
call SUnit(GetHandleId(t),"Unit",it)
if(IsUnitAlly(it,G8[0]))then
call TriggerRegisterUnitInRange(t,it,1000.,Condition(function DUG))
call TriggerRegisterUnitInRange(t,it,1000.,Condition(function DWG))
else
call TriggerRegisterUnitInRange(t,it,1000.,Condition(function DTG))
call TriggerRegisterUnitInRange(t,it,1000.,Condition(function DVG))
endif
call TriggerAddAction(t,function DSG)
set it=null
endfunction
function DZG takes player DAG,string kf returns nothing
if(LTrig(GetHandleId(DAG),kf)!=null)then
call LT7(GetHandleId(LTrig(GetHandleId(DAG),kf)))
call DestroyTrigger(LTrig(GetHandleId(DAG),kf))
call SUnit(GetHandleId(DAG),kf,null)
endif
endfunction
function DBG takes unit it returns nothing
local player pl=GetOwningPlayer(it)
local integer kg=1
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer i1=GetUnitTypeId(it)
local integer DCG=0
local boolean D3G=false
call WAF(O5,it,i1)
if(i1=='H00V')or(i1=='EC77')or(i1=='E004')or(i1=='U00P')or(i1=='Nbrn')or(i1=='Emoo')or(i1=='N01A')or(i1=='H00Q')then
call ExecuteFunc("D6G")
elseif(i1=='E01B')then
call SGroup(GetHandleId(GetOwningPlayer(it)),"MGrp",CreateGroup())
elseif(i1=='H00I')then
call ExecuteFunc("DLG")
elseif(i1=='Hblm')then
call ExecuteFunc("D1G")
elseif(i1=='O00P')then
call ExecuteFunc("D0G")
elseif(i1=='H00A')then
call ExecuteFunc("D5G")
elseif(i1=='Hamg')then
set HC[240+O5]=Location(.0,.0)
elseif((i1=='N01O')or(i1=='N013')or(i1=='N014')or(i1=='N015'))then
set hG[256+O5]=0
call ExecuteFunc("D2G")
elseif(i1=='HC92')then
call PP8("D_G",GetPlayerController(pl)==MAP_CONTROL_COMPUTER)
endif
if false then
if(i1=='Otch')then
call PW8(it,'A0SK')
endif
if(i1=='Hblm')then
call PW8(it,'A085')
endif
if(i1=='Emns')then
call PW8(it,'A1W8')
endif
if(i1=='UC18')then
call PW8(it,'A0X5')
endif
if(i1=='U000')then
call PW8(it,'A0X7')
endif
if(i1=='E002')then
call PW8(it,'A1DP')
endif
if(i1=='U00F')then
call PW8(it,'A06I')
endif
if(i1=='U00K')then
call PW8(it,'A06O')
endif
if(i1=='E01B')then
call PW8(it,'A0HW')
endif
if(i1=='H00I')then
call PW8(it,'A0N8')
endif
if(i1=='N00R')then
call PW8(it,'A0R0')
endif
endif
call SInt(GetHandleId(Player(O5)),"AI|Class",YM7(i1))
set OM7[O5]=true
set OM7['p'+O5]=false
call ABF(O5,it,false)
if(PI7 and AV4[O5]==AZ4)then
if(PK7)then
if(IsJWPlayer(Player(O5)))then
if(PM7==null)then
set PM7=CreateUnit(G8[0],ZA9(Player(O5)),GetUnitX(IN4)-PT7,GetUnitY(IN4)-PT7,0)
call Z_9(GetPlayerId(G8[0]),PM7)
endif
set KR4[16+O5]=PM7
set PP7=PP7+1
if(PP7>PQ7)then
set PM7=null
set PP7=0
endif
else
if(PN7==null)then
set PN7=CreateUnit(N8[0],ZA9(Player(O5)),GetUnitX(JS4)+PT7,GetUnitY(JS4)+PT7,0)
call Z_9(GetPlayerId(N8[0]),PN7)
endif
set KR4[16+O5]=PN7
set PR7=PR7+1
if(PR7>PS7)then
set PN7=null
set PR7=0
endif
endif
else
set KR4[16+O5]=CreateUnit(Player(O5),ZA9(Player(O5)),GetUnitX(KR4[O5]),GetUnitY(KR4[O5]),0)
call Z_9(O5,KR4[16+O5])
endif
endif
if((not T4)and GetUnitName(it)!="Bloodrune")then
if(V94==false)then
if(not D17)then
set KW4[GetPlayerId(pl)]=I2S(i5(pl))+YJ7(pl)+N38(it)
call SetPlayerName(pl,NM8(pl))
endif
else
if GetPlayerController(pl)==MAP_CONTROL_COMPUTER then
loop
if(WZF(it))then
set DCG=GetRandomInt(1,25)
else
set DCG=GetRandomInt(26,CNModeIndex)
endif
if(V84[DCG]!="")then
set KW4[GetPlayerId(pl)]=V84[DCG]
call SetPlayerName(pl,NM8(pl)+" ("+NC8(it)+")")
set V84[DCG]=""
set D3G=true
endif
exitwhen(D3G)
endloop
endif
endif
elseif(Bz<150.)and GetUnitName(it)!="Bloodrune" then
set KW4[GetPlayerId(pl)]=I2S(i5(pl))+YJ7(pl)+" Computer"
call SetPlayerName(pl,NM8(pl)+" ("+NC8(Y7[GetPlayerId(pl)])+")")
else
set pl=null
return
endif
if(IsJWPlayer(pl))then
loop
exitwhen(Z7[kg]==pl)or(kg>5)
set kg=kg+1
endloop
call MultiboardSetItemValueBJ(A4,1,(kg+2),(W[GetPlayerId(pl)]+(NM8(pl)+"|r")))
else
loop
exitwhen(A7[kg]==pl)or(kg>5)
set kg=kg+1
endloop
call MultiboardSetItemValueBJ(A4,1,(kg+3+HM4),(W[GetPlayerId(pl)]+(NM8(pl)+"|r")))
endif
set pl=null
endfunction
function UD takes nothing returns nothing
local unit M88=GetTriggerUnit()
call DZG(GetOwningPlayer(M88),"HasAtkM")
call DZG(GetOwningPlayer(M88),"HasMM")
call DZG(GetOwningPlayer(M88),"HasAM")
call DZG(GetOwningPlayer(M88),"HasOrb")
call DBG(M88)
call DXG(M88)
set M88=null
endfunction
function Uf takes nothing returns nothing
local unit M88=LUnit(S44,"AIHSwap|U")
call DZG(GetOwningPlayer(M88),"HasAtkM")
call DZG(GetOwningPlayer(M88),"HasMM")
call DZG(GetOwningPlayer(M88),"HasAM")
call DZG(GetOwningPlayer(M88),"HasOrb")
call DBG(M88)
call DXG(M88)
set M88=null
endfunction
function E4G takes nothing returns boolean
local integer O5=1
local unit m5=null
if not IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)then
return false
endif
set m5=GetDyingUnit()
loop
exitwhen O5>11
if O5==6 then
set O5=7
endif
if KR8(Player(O5))then
if h4[O5]==m5 then
set h4[O5]=null
call IssueImmediateOrderById(Y7[O5],851972)
if GZ[208+O5]or G0[256+O5]then
call VTF(O5,JS8(800.,Y7[O5]),false,false)
endif
call J3(Y7[O5],false)
endif
endif
set O5=O5+1
endloop
set m5=null
return false
endfunction
function E7G takes nothing returns boolean
return((IsUnitType(GetAttacker(),UNIT_TYPE_STRUCTURE))and(RY4[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))])and(GetUnitTypeId(GetAttacker())!='umtw')and(GetUnitTypeId(GetAttacker())!='ebal')and(GetUnitTypeId(GetAttacker())!='u00R')and(GetUnitTypeId(GetAttacker())!='e026')and(GE8(GetTriggerUnit())))
endfunction
function E8G takes nothing returns nothing
local unit m5=GetTriggerUnit()
local unit E9G=GetAttacker()
local integer O5=GetPlayerId(GetOwningPlayer(m5))
local integer i1=GetUnitTypeId(m5)
if A97(O5)then
set m5=null
set E9G=null
return
endif
if((IsUnitType(m5,UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(m5))==MAP_CONTROL_COMPUTER)and(not G0[O5])and(i1!='H00J'))then
if(((GetUnitLifePercent(E9G)>10.)or(AO7(800.,E9G,Condition(function k0))>1)or(R2I(GetWidgetLife(m5))<(500+(GetHeroLevel(m5)*30)))or(not Id(O5)))and(not A97(O5)))then
set bj_lastLoadedUnit=m5
if((eY[320+O5]>=0)and(hq[720+O5]>-.05))then
call XM7(O5,"Towerhit a")
elseif((not ZL7(m5))and(((i1!='Hblm')and(i1!='Orkn'))or(GetUnitCurrentOrder(m5)!=852600))and((i1!='E01C')or(GetUnitCurrentOrder(m5)!=852089))and((i1!='UC18')or(GetUnitCurrentOrder(m5)!=852487)))then
call XM7(O5,"Towerhit b")
elseif(((X_7(m5)>1500.)and(hq[720+O5]>-.05)and(GetHeroLevel(m5)>10))or(((i1=='EC45')or(i1=='U00K'))and(GZ[384+O5])and(not A87(m5)))or(GZ[256+O5]))then
call XM7(O5,"Towerhit c")
elseif((GetHeroLevel(m5)>6)and(GetUnitAbilityLevel(E9G,'Avul')==0)and(Id(O5))and(GetUnitState(m5,UNIT_STATE_LIFE)>500+(GetHeroLevel(m5)*30)))then
call XM7(O5,"Towerhit d")
elseif(h4[O5]!=null and A87(h4[O5])and G0[128+O5]and X_7(m5)>300. and hq[944+O5]<Bz and AO7(600.,m5,Condition(function GA8))>0)then
call XM7(O5,"Towerhit e")
else
call D48(m5,851986,h9[O5])
if((h4[O5]!=null)and((GetHeroLevel(m5)<6)or(A87(m5))or(not Id(O5))))then
call XM7(O5,"Cancelkill c "+GetUnitName(h4[O5]))
call VWF(O5,false)
endif
set G0[O5]=true
call TriggerSleepAction(1.)
if((Z_7(m5))and(Z_7(E9G))and(IsUnitInRange(m5,E9G,1200.))and(G0[O5]))then
call TriggerSleepAction(1.)
endif
set G0[O5]=false
if((Z_7(m5))and(Z_7(E9G))and(GetUnitCurrentOrder(m5)==851986)and(not IsUnitInRange(m5,E9G,1300.))and(AO7(800.,E9G,Condition(function k5))>1))then
call J3(m5,true)
endif
endif
elseif((not Id(O5))and(ZL7(m5)))then
call IssueTargetOrderById(m5,851983,E9G)
endif
elseif((i1=='H00J')or(i1=='u014')or(i1=='u015')or(i1=='u016')or(i1=='u01D')or(i1=='u01E')or(i1=='u01F')or(i1=='u01R')or(i1=='u01S')or(i1=='u01T')or(i1=='e00K')or(i1=='e00I')or(i1=='e00L')or(i1=='n027')or((GetUnitTypeId(Y7[O5])=='H00A')and(i1!='H00A')))then
call D48(m5,851986,h9[16+O5])
set G0[16+O5]=true
call Y07(1.)
if((Z_7(m5))and(Z_7(E9G))and(IsUnitInRange(m5,E9G,1300.)))then
call D48(m5,851986,h9[16+O5])
endif
set G0[16+O5]=false
endif
set m5=null
set E9G=null
endfunction
function EDG takes nothing returns boolean
return((RY4[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))])and(IsUnitAlly(GetTriggerUnit(),G8[0]))and(GE8(GetTriggerUnit())))
endfunction
function EEG takes nothing returns boolean
return((RY4[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))])and(IsUnitAlly(GetTriggerUnit(),N8[0]))and(GE8(GetTriggerUnit())))
endfunction
function EFG takes unit C4F returns nothing
loop
call D48(GetTriggerUnit(),851986,h9[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))])
call TriggerSleepAction(.3)
exitwhen((not Z_7(GetTriggerUnit()))or(not Z_7(C4F))or(not IsUnitInRange(GetTriggerUnit(),C4F,1200.)))
endloop
endfunction
function EGG takes nothing returns nothing
if((IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(not IsUnitIllusion(GetTriggerUnit())))then
set GZ[128+GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]=false
set h4[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]=null
if(IsUnitAlly(GetTriggerUnit(),N8[0]))then
call EFG(IN4)
else
call EFG(JS4)
endif
elseif(not IsUnitIllusion(GetTriggerUnit()))then
call D48(GetTriggerUnit(),851986,h9[16+GetPlayerId(GetOwningPlayer(GetTriggerUnit()))])
endif
endfunction
function EHG takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER)and(GetUnitCurrentOrder(GetTriggerUnit())!=851986)and(not IsUnitType(GetAttacker(),UNIT_TYPE_STRUCTURE))and(not IsUnitType(GetAttacker(),UNIT_TYPE_HERO)))
endfunction
function EIG takes nothing returns nothing
local unit it=GetTriggerUnit()
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer UP
if((Bz<hq[288+O5])or(not is(it))or((G0[224+O5]or Bz<hq[672+O5])and A87(it)==false))then
set it=null
return
elseif A97(O5)then
set it=null
return
endif
set hq[288+O5]=Bz+1.
set hq[496+O5]=Bz+1.5
call MoveLocation(Ha,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
set bj_lastLoadedUnit=V_7(IsUnitAlly(it,G8[0]),IN4,JS4)
set F37=Z47(it,bj_lastLoadedUnit)
if AN7(150.,Ha,Condition(function k0))>6 then
call VQF(it,true)
elseif(F37<900. and F37+YY7(it)>650.)and(IsUnitType(GetAttacker(),UNIT_TYPE_MELEE_ATTACKER))then
call D48(it,851986,bj_lastLoadedUnit)
else
if(((eY[O5]==3)or(eY[O5]==4))and(IsUnitType(GetAttacker(),UNIT_TYPE_MELEE_ATTACKER))and(not GZ[128+O5])and(h4[O5]==null)and(GetUnitCurrentOrder(it)==851983)and(not GZ[48+O5])and(Z47(it,DH8(it))<6500.))then
if((Bz<hq[784+O5])or(hq[720+O5]<-HR7)or((AN7(1000.,Ha,Condition(function GQ8))==0)and(AN7(700.,Ha,Condition(function k5))==0)and(AN7(600.,Ha,Condition(function k0))>3)))then
call D48(it,851986,bj_lastLoadedUnit)
set G0[48+O5]=true
set hq[768+O5]=Bz+1.
set hq[784+O5]=Bz+5.
endif
endif
if((not(IsUnitType(it,UNIT_TYPE_MELEE_ATTACKER)))and(not GZ[128+O5])and(h4[O5]==null)and(iU(it))and(hq[512+O5]<Bz))then
if(not A87(it))then
if((eY[O5]<10)and((R2I(GetUnitState(it,UNIT_STATE_LIFE))<(550+(GetHeroLevel(it)*40)))or((GetHeroLevel(it)<10)and(IsUnitType(GetAttacker(),UNIT_TYPE_MELEE_ATTACKER)))))then
call VQF(it,true)
endif
else
call F28(it,false)
endif
elseif((IsUnitType(it,UNIT_TYPE_MELEE_ATTACKER))and(not GZ[128+O5])and(h4[O5]==null)and(iU(it))and(hq[512+O5]<Bz))then
if(not A87(it))then
if((eY[O5]<10)and(GetUnitLifePercent(it)<60.)and((AO7(300.,GetTriggerUnit(),Condition(function k5))<3)))then
if(not(AR7(it,BU[sadanzhixieli]))and(not(AR7(it,BU[zhipeitoukui])))and(not(AR7(it,BU[fengkuangmianju])))and((GetUnitAbilityLevel(it,'BUav')==0)or(GetUnitAbilityLevel(it,'B026')==0)or(GetUnitAbilityLevel(it,'B01E')==0))and((AO7(1000.,it,Condition(function GQ8))>0)or(AO7(900.,it,Condition(function GC8))>0)))then
call VQF(it,true)
endif
endif
else
call F28(it,false)
endif
elseif((A87(it))and(not Id(O5)))then
call F28(it,true)
elseif((GetHeroLevel(it)<6)or((GetUnitLifePercent(it)<60.)and(R2I(GetUnitState(it,UNIT_STATE_LIFE))<(400+(GetHeroLevel(it)*50)))and((h4[O5]==null)or(GetUnitState(h4[O5],UNIT_STATE_LIFE)>(GetUnitState(it,UNIT_STATE_LIFE)+(15.*GetHeroLevel(it)))))))then
if((GetHeroLevel(it)<3)or(AO7(500.,GetTriggerUnit(),Condition(function k0))>2))then
set GZ[128+O5]=false
call VQF(it,true)
endif
elseif(GetUnitTypeId(it)=='H00K')and(h4[O5]==null)and(Z47(it,h9[48+O5])>700)then
set UP=GetUnitCurrentOrder(it)
if(UP==852278 or UP==852114 or UP==852504)then
call VQF(it,true)
endif
endif
endif
set it=null
endfunction
function EJG takes nothing returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(GetAttacker()))
if(KR8(Player(O5)))and(GetUnitAbilityLevel(GetAttacker(),'B06L')>0)and(Bz>V74[64+O5])and(h4[O5]==GetTriggerUnit())then
call IssuePointOrderById(Y7[O5],852185,GetUnitX(GetAttacker()),GetUnitY(GetAttacker()))
endif
endfunction
function EKG takes nothing returns boolean
if not((IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))))then
return false
else
if IsUnitIllusion(GetAttacker())then
call EJG()
return false
endif
endif
return(IsUnitType(GetAttacker(),UNIT_TYPE_HERO)!=null)
endfunction
function EMG takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(hz)))and(hZ!=GetFilterUnit())and(hz!=GetFilterUnit())and(GetPlayerController(GetOwningPlayer(GetFilterUnit()))==MAP_CONTROL_COMPUTER)and(not A87(GetFilterUnit())))
endfunction
function ENG takes nothing returns nothing
if((not IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO))and(GF8(GetEnumUnit()))and(GetUnitCurrentOrder(GetEnumUnit())!=851986)and(IsUnitInRange(GetEnumUnit(),hz,1200.)))then
call IssueTargetOrderById(GetEnumUnit(),851983,hz)
endif
endfunction
function EOG takes unit Y47,unit EPG returns nothing
local integer E_8=GetPlayerId(GetOwningPlayer(Y47))
local integer O5
local unit D9G=null
local boolean J4=false
local integer i=0
local integer CWF=0
local integer j=0
local integer k=0
local boolean EQG=false
local unit ERG=null
local boolean L37=false
local boolean YV7
if((GetWidgetLife(EPG)>1.)and(Y47!=null)and(Bz>hq[416+E_8]or(Bz+2.>hq[416+E_8]and(A87(Y47)or A97(E_8)))))then
set hq[416+E_8]=Bz+5.
set k=GetRandomInt(-1,1)
if k<0 then
set k=0
endif
if A87(Y47)then
set k=k+1
endif
set YV7=IsUnitAlly(Y47,G8[0])
set CWF=W97(YV7,0,6)
set ERG=V_7(YV7,IN4,JS4)
set EQG=IsUnitInRange(Y47,ERG,6000.)
set i=1
call XK7("udv Check "+GetUnitName(Y47)+" vs "+GetUnitName(EPG)+" "+I2S(eY[320+E_8])+" "+I2S(j)+" "+I2S(k))
loop
exitwhen(i>5)
set O5=GM7[80+CWF+i]
if(O5!=-1)and(GetPlayerController(Player(O5))==MAP_CONTROL_COMPUTER)then
set D9G=Y7[O5]
set bj_lastLoadedUnit=D9G
set hq[416+O5]=Bz+2.
set J4=false
set L37=false
if(D9G==null)or(A87(D9G))or(HA4[O5])or(eY[544+O5]!=0)then
call XM7(1,"  udvFail1 "+GetUnitName(D9G)+" "+I2S(eY[320+E_8])+" "+I2S(j)+" "+I2S(k))
elseif(hq[480+O5]>Bz)or(h4[O5]!=null and h4[O5]!=EPG and(Z47(Y47,h4[O5])+300<Z47(Y47,EPG)))then
call XM7(1,"  udvFail2 "+GetUnitName(D9G)+" "+I2S(eY[320+E_8])+" "+I2S(j)+" "+I2S(k))
elseif(not EQG)and(eY[O5]==3 or eY[O5]==4 or Bz<hq[528+O5])then
call XM7(1,"  udvFail3 "+GetUnitName(D9G)+" "+I2S(eY[320+E_8])+" "+I2S(j)+" "+I2S(k))
elseif(EQG and eY[O5]!=2 and IsUnitInRange(D9G,ERG,6000.))then
set J4=true
call XM7(1,"  udvOK1 "+GetUnitName(D9G)+" "+I2S(eY[320+E_8])+" "+I2S(j)+" "+I2S(k))
elseif((IsUnitInRange(Y47,D9G,3600.))or(eY[80+O5]==eY[80+E_8]))and((hq[624+E_8]>Bz)or(GetUnitLifePercent(Y47)<80.)or(eY[320+E_8]+j<=k))then
set J4=true
call XM7(1,"  udvOK2 "+GetUnitName(D9G)+" "+I2S(eY[320+E_8])+" "+I2S(j)+" "+I2S(k))
elseif(Bz>hq[320+O5]and(eY[O5]!=9 or(GetUnitLifePercent(Y47)<70.)))and(eY[320+E_8]+j<=k)and(GetHeroLevel(D9G)>=6)and(Z47(Y47,D9G)>3000)and(GetUnitLifePercent(D9G)>70.)and(GetUnitManaPercent(D9G)>30.)and((AV4[O5]==AY4 and GetRandomInt(1,3)==1)or(AV4[O5]==AZ4))then
set L37=L_F(O5,D9G,Y47,true)
call XM7(1,"  udvOK3 "+GetUnitName(D9G)+" "+I2S(eY[320+E_8])+" "+I2S(j)+" "+I2S(k))
endif
if J4 then
if(h4[O5]==EPG)then
if((GetUnitAbilityLevel(EPG,'B02F')==0)and(is(D9G))and(GetUnitCurrentOrder(D9G)!=851983))then
call IssueTargetOrderById(D9G,851983,EPG)
set L37=true
endif
elseif((h4[O5]==null)or(hq[464+GetPlayerId(GetOwningPlayer(Y47))]>Bz)or((GetUnitLifePercent(EPG)+10.)<GetUnitLifePercent(h4[O5])and(GetWidgetLife(EPG)<GetWidgetLife(h4[O5]))))then
set h4[O5]=EPG
if((is(D9G))and(GetUnitAbilityLevel(EPG,'B02F')==0))then
call IssueTargetOrderById(D9G,851983,EPG)
set L37=true
endif
endif
if(hq[624+E_8]>Bz)then
set hq[624+O5]=Bz+HP7
endif
endif
if L37 then
set eY[544+O5]=2
set h9[64+O5]=Y47
set h4[O5]=EPG
set j=j+1
set hq[576+O5]=Bz+HJ7
if eY[O5]==9 or eY[O5]==10 then
call MG8(D9G,Y47)
set eY[O5]=1
endif
endif
endif
set i=i+1
endloop
if(IsUnitInForce(Y47,RX4))then
call GroupClear(iH)
call GroupEnumUnitsOfPlayer(iH,GetOwningPlayer(Y47),R24)
call ForGroup(iH,function ENG)
endif
if eY[320+E_8]+j<0 and Bz>hq[800+E_8]and KR8(Player(E_8))and A87(Y47)then
if YV7 then
set F57=E8
else
set F57=F8
endif
call FU8(F57,GetUnitX(Y47),GetUnitY(Y47),GetPlayerId(GetOwningPlayer(Y47)))
set hq[800+E_8]=Bz+15.
endif
endif
set F57=null
endfunction
function ESG takes nothing returns nothing
local unit X47=GetAttacker()
local unit it=GetTriggerUnit()
local integer O5=0
local real Y_7=.0
if GetPlayerController(GetOwningPlayer(it))==MAP_CONTROL_COMPUTER and ZL7(it)then
set O5=GetPlayerId(GetOwningPlayer(it))
if h4[O5]!=null then
if X47!=h4[O5]then
set hq[944+O5]=Bz+SG7
endif
set Y_7=YY7(it)
if A87(h4[O5])then
set Y_7=Y_7+200.
endif
if(Z47(it,h4[O5])>Y_7-100.)then
call XM7(O5,"Cancelkill o")
call VWF(O5,true)
endif
endif
endif
if(not IsUnitInForce(X47,RX4))then
call TriggerSleepAction(.2)
call EOG(X47,it)
endif
if(not IsUnitInForce(it,RX4))then
call TriggerSleepAction(.2)
call EOG(it,X47)
endif
set X47=null
set it=null
endfunction
function ETG takes nothing returns boolean
return((GetSpellTargetUnit()!=null)and(IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_HERO))and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetSpellTargetUnit())))and(not IsUnitInForce(GetSpellTargetUnit(),RX4)))
endfunction
function EUG takes nothing returns nothing
call EOG(GetSpellTargetUnit(),GetTriggerUnit())
endfunction
function EVG takes nothing returns nothing
local unit Y47=GetTriggerUnit()
local unit EPG=GetAttacker()
local unit D9G=null
local player pl=null
local integer E_8
local integer i=0
local integer j
local integer k=0
local real EWG
local integer O5
set E_8=GetPlayerId(GetOwningPlayer(EPG))
if E_8==GetPlayerId(G8[0])or E_8==GetPlayerId(N8[0])then
set j=-1
if((Y47==J44)or(Y47==JE4)or(Y47==JH4))or((Y47==JC4)or(Y47==J04)or(Y47==J_4))then
set j=1
elseif((Y47==J74)or(Y47==JF4)or(Y47==JI4))or((Y47==J34)or(Y47==J54)or(Y47==K44))then
set j=0
elseif((Y47==J84)or(Y47==JG4)or(Y47==JJ4))or((Y47==J64)or(Y47==J24)or(Y47==K74))then
set j=2
elseif((Y47==J94)or(Y47==J94)or(Y47==IY4))or((Y47==JL4)or(Y47==JL4)or(Y47==JV4))then
set j=3
endif
if(j!=-1 or GetWidgetLife(Y47)<=H47)then
set F17=IsUnitAlly(Y47,G8[0])
set pl=Player(E_8)
if(LReal(GetHandleId(Y47),"AI|Glyph|CD")>Bz)then
elseif(Bz>LReal(S44,"AI|Glyph|"+WF7(F17,"Sent","Scrg")))then
call GroupClear(H8)
call GroupEnumUnitsInRange(H8,GetUnitX(Y47),GetUnitY(Y47),900.,null)
loop
set D9G=FirstOfGroup(H8)
exitwhen D9G==null
call GroupRemoveUnit(H8,D9G)
if GetWidgetLife(D9G)<.405 then
elseif IsUnitType(D9G,UNIT_TYPE_HERO)and GetUnitTypeId(D9G)!='H00J' then
if IsUnitAlly(D9G,pl)then
set k=k+1
else
set k=k-1
endif
elseif Y47!=D9G and GE8(D9G)and IsUnitInRange(D9G,Y47,300.)then
if IsUnitAlly(D9G,pl)then
set k=GetUnitTypeId(D9G)
if(k=='ugho' or k=='unec')or(k=='u001' or k=='u002')or(k=='esen' or k=='edry')or(k=='e00V' or k=='e00W')then
set i=i+1
elseif(k=='umtw' or k=='u00R')or(k=='ebal' or k=='e026')then
set i=i+2
else
set i=i+2
endif
else
set i=-99999
endif
endif
endloop
if((F17 and G07)or((not F17)and G57))then
set bj_forLoopAIndex=G_7
else
set bj_forLoopAIndex=H47
endif
if(i>0 and i+k*3>G17-IMaxBJ(bj_forLoopAIndex-R2I(GetWidgetLife(Y47)),-'d')/ 25)then
if F17 then
set F57=E8
else
set F57=F8
endif
set i=1
set k=-1
set EWG=99999.
loop
exitwhen i>5
if F17 then
set O5=GetPlayerId(G8[i])
else
set O5=GetPlayerId(N8[i])
endif
if KR8(Player(O5))then
if((F17 and G07)or((not F17)and G57))then
call IssueImmediateOrderById(KR4[O5],852244)
exitwhen true
else
if k==-1 then
set k=O5
if Y7[O5]!=null and GetWidgetLife(Y7[O5])>.405 then
set EWG=Z47(Y47,Y7[O5])
endif
else
if Y7[O5]!=null and GetWidgetLife(Y7[O5])>.405 then
set F37=Z47(Y47,Y7[O5])
if F37<EWG then
set k=O5
set EWG=F37
endif
elseif EWG==99999. and GetRandomInt(1,i)==1 then
set k=O5
endif
endif
endif
endif
set i=i+1
endloop
if k!=-1 then
call FQ8(Y7[k],F57,GetObjectName('Y013'))
call FU8(F57,GetUnitX(Y47),GetUnitY(Y47),k)
call SReal(GetHandleId(Y47),"AI|Glyph|CD",Bz+GL7)
endif
endif
endif
endif
set O5=GetUnitTypeId(EPG)
if j!=-1 and((O5=='ugho' or O5=='unec')or(O5=='u001' or O5=='u002')or(O5=='esen' or O5=='edry')or(O5=='e00V' or O5=='e00W'))then
set i=1
set F37=99999.
set bj_forLoopAIndex=-1
loop
exitwhen i>5
if E_8==GetPlayerId(G8[0])then
set O5=GetPlayerId(N8[i])
else
set O5=GetPlayerId(G8[i])
endif
if((Y7[O5]!=null)and(not A87(Y7[O5]))and(GetWidgetLife(Y7[O5])>400.)and(eY[O5]==3 or eY[O5]==4)and(GM7[64+O5]==j)and(Bz>hq[672+O5]))then
set EWG=Z47(Y7[O5],Y47)
if EWG<F37 then
set F37=EWG
set bj_forLoopAIndex=O5
endif
endif
set i=i+1
endloop
if bj_forLoopAIndex!=-1 then
set O5=bj_forLoopAIndex
set G0[224+O5]=true
set GN7[48+O5]=GetAttacker()
call XK7("aiDefMobTowers3 "+I2S(O5)+" "+GetUnitName(GN7[48+O5]))
if ZL7(Y7[O5])then
call IssueTargetOrderById(Y7[O5],851983,GN7[48+O5])
endif
endif
endif
endif
set Y47=null
set EPG=null
set D9G=null
set pl=null
endfunction
function EXG takes nothing returns boolean
local real EYG=.0
local integer O5
if IsUnitType(GetAttacker(),UNIT_TYPE_HERO)then
set O5=GetPlayerId(GetOwningPlayer(GetAttacker()))
if G0[224+O5]and GetTriggerUnit()==GN7[48+O5]then
set G0[224+O5]=false
set hq[672+O5]=Bz+2.
endif
elseif IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)and Bz>G27 then
set G27=Bz+1.
call EVG()
endif
if(Bz<600.)then
set EYG=130.
elseif(Bz<1200.)then
set EYG=140.
elseif(Bz>1200.)then
set EYG=150.
endif
if(not GZ[320+O5])then
set EYG=EYG/ 2+15
endif
return((not IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(GetWidgetLife(GetTriggerUnit())<EYG))
endfunction
function EZG takes nothing returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(GetEnumUnit()))
set h4[96+O5]=GetTriggerUnit()
call DisableTrigger(R04[O5])
call IssueTargetOrderById(GetEnumUnit(),851983,GetTriggerUnit())
call EnableTrigger(R04[O5])
endfunction
function EAG takes nothing returns boolean
local integer O5
if((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetFilterUnit()))==MAP_CONTROL_COMPUTER)and(not IsUnitIllusion(GetFilterUnit()))and(GetWidgetLife(GetFilterUnit())>.405))then
set O5=GetPlayerId(GetOwningPlayer(GetFilterUnit()))
if((A97(O5))or((h4[304+O5]!=null)and(YY7(GetFilterUnit())+Z47(GetTriggerUnit(),h4[304+O5])<Z47(GetFilterUnit(),h4[304+O5]))))then
elseif((iU(GetFilterUnit()))and(not Id(O5))and(not A87(GetFilterUnit()))and((h4[96+O5]==null)or(not Z_7(h4[96+O5]))or((h4[96+O5]!=null)and(Z_7(h4[96+O5]))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(h4[96+O5]))))))then
return((Jw(GetFilterUnit()))and(G0[128+O5])and(not G0[O5])and(not G0[48+O5])and(not G0[64+O5])and(Bz>hq[496+O5])and((not GG8(GetFilterUnit()))or(IsUnitInRange(GetFilterUnit(),GetTriggerUnit(),500.)))and((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))or(GetHeroLevel(GetFilterUnit())<15)))
endif
endif
return false
endfunction
function EBG takes nothing returns nothing
call GroupClear(iG)
call GroupEnumUnitsInRange(iG,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),800.,R_4)
call ForGroup(iG,function EZG)
endfunction
function ECG takes nothing returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(GetKillingUnit()))
if GetKillingUnit()==Y7[O5]and(eY[O5]==3 or eY[O5]==4)then
call CHF(Y7[O5])
endif
return false
endfunction
function E3G takes nothing returns boolean
return((GetOwningPlayer(GetFilterUnit())==Player(12))and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function E6G takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return((GetOwningPlayer(GetFilterUnit())==Player(12))and(GetWidgetLife(GetFilterUnit())>.405)and(i1=='ncnk'))
endfunction
function ELG takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return((GetOwningPlayer(GetFilterUnit())==Player(12))and(GetWidgetLife(GetFilterUnit())>.405)and(i1=='nkol'))
endfunction
function E1G takes nothing returns nothing
if((h0==null)or(GetUnitLevel(GetEnumUnit())>GetUnitLevel(h0))or((GetUnitLevel(GetEnumUnit())==GetUnitLevel(h0))and(GetUnitState(h0,UNIT_STATE_LIFE)<GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE))))then
set h0=GetEnumUnit()
endif
endfunction
function E0G takes unit ME8 returns unit
local boolexpr Ig=Condition(function E3G)
set h0=null
call GroupClear(H8)
call GroupEnumUnitsInRange(H8,GetUnitX(ME8),GetUnitY(ME8),600.,Ig)
call ForGroup(H8,function E1G)
call DestroyBoolExpr(Ig)
set Ig=null
return h0
endfunction
function E5G takes unit ME8,integer YC7,integer E2G returns unit
local boolexpr Ig=null
if(E2G=='ncnk')then
set Ig=Condition(function E6G)
elseif(E2G=='nkol')then
set Ig=Condition(function ELG)
else
set Ig=Condition(function E6G)
endif
set h0=null
call GroupClear(H8)
call GroupEnumUnitsInRange(H8,GetUnitX(ME8),GetUnitY(ME8),600.,Ig)
call ForGroup(H8,function E1G)
call DestroyBoolExpr(Ig)
set Ig=null
return h0
endfunction
function E_G takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER)and(eY[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]==1)and(GetHeroLevel(GetTriggerUnit())>3)and(not A87(GetTriggerUnit()))and(not IsUnitIllusion(GetTriggerUnit()))and(GetUnitAbilityLevel(GetTriggerUnit(),'B02Z')==0))
endfunction
function F4G takes unit ME8 returns boolean
local integer O5=1
local boolean O6=IsUnitAlly(GetTriggerUnit(),G8[0])
local boolean F7G=false
local integer F8G=0
local integer F9G=0
if((O6)and(GetHeroLevel(GetTriggerUnit())>15)and(G2>=0))then
set F9G=AO7(1200.,GetTriggerUnit(),Condition(function G68))
set F7G=F9G>0
elseif((not O6)and(GetHeroLevel(GetTriggerUnit())>15)and(G1>=0))then
set F9G=AO7(1200.,GetTriggerUnit(),Condition(function G68))
set F7G=F9G>0
endif
loop
if((eY[GetPlayerId(G8[O5])]==10)and(h8[48+GetPlayerId(G8[O5])]==ME8))then
return true
endif
if((eY[GetPlayerId(N8[O5])]==10)and(h8[48+GetPlayerId(N8[O5])]==ME8))then
return true
endif
if((F7G)and(eY[80+GetPlayerId(DK8(O5,not O6))]==eY[80+GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]))then
set F8G=F8G+1
endif
set O5=O5+1
exitwhen O5>5
endloop
if(F7G)then
return F8G>=F9G
endif
return false
endfunction
function FDG takes unit it returns boolean
local integer FEG=0
local boolean J4=true
local unit M88=null
local player pl=GetOwningPlayer(it)
call GroupClear(H8)
call GroupEnumUnitsInRange(H8,GetUnitX(it),GetUnitY(it),1600.,R24)
loop
set M88=FirstOfGroup(H8)
exitwhen((M88==null)or(not J4))
if((not Z_7(M88))or(not GF8(M88)))then
elseif(IsUnitEnemy(M88,pl))then
if((IsUnitType(M88,UNIT_TYPE_HERO))or(IsUnitType(M88,UNIT_TYPE_STRUCTURE)))then
set J4=false
elseif(((GetOwningPlayer(M88)==G8[0])or(GetOwningPlayer(M88)==N8[0]))and(IsUnitInRange(M88,it,1200.)))then
set FEG=FEG+1
set J4=FEG<=3
endif
endif
call GroupRemoveUnit(H8,M88)
endloop
set pl=null
return J4
endfunction
function FFG takes unit FGG,unit KV8 returns unit
local integer O5=GetPlayerId(GetOwningPlayer(KV8))
if(FGG==h7[211]or FGG==h7[212])then
if(GetHeroLevel(KV8)>7)then
if(E5G(h7[262],O5,'ncnk')!=null)then
return h7[262]
elseif(E5G(h7[260],O5,'ncnk')!=null)then
return h7[260]
elseif(E5G(h7[253],O5,'ncnk')!=null)then
return h7[253]
elseif(E5G(h7[258],O5,'ncnk')!=null)then
return h7[258]
elseif(E5G(h7[256],O5,'ncnk')!=null)then
return h7[256]
else
return h7[262]
endif
else
if(E5G(h7[262],O5,'nkol')!=null)then
return h7[262]
elseif(E5G(h7[260],O5,'nkol')!=null)then
return h7[260]
elseif(E5G(h7[253],O5,'nkol')!=null)then
return h7[253]
elseif(E5G(h7[258],O5,'nkol')!=null)then
return h7[258]
elseif(E5G(h7[256],O5,'nkol')!=null)then
return h7[256]
else
return h7[260]
endif
endif
elseif(FGG==h7[213])then
if(GetHeroLevel(KV8)>7)then
if(E5G(h7[257],O5,'ncnk')!=null)then
return h7[257]
elseif(E5G(h7[259],O5,'ncnk')!=null)then
return h7[259]
elseif(E5G(h7[261],O5,'ncnk')!=null)then
return h7[261]
else
return h7[257]
endif
else
if(E5G(h7[261],O5,'nkol')!=null)then
return h7[261]
elseif(E5G(h7[259],O5,'nkol')!=null)then
return h7[259]
else
return h7[261]
endif
endif
elseif((FGG==h7[221])or(FGG==h7[222]))then
if(GetHeroLevel(KV8)>7)then
if(E5G(h7[254],O5,'ncnk')!=null)then
return h7[254]
elseif(E5G(h7[255],O5,'ncnk')!=null)then
return h7[255]
else
return h7[254]
endif
else
if(E5G(h7[254],O5,'nkol')!=null)then
return h7[254]
elseif(E5G(h7[255],O5,'nkol')!=null)then
return h7[255]
else
return h7[254]
endif
endif
elseif(FGG==h7[223])then
if(GetHeroLevel(KV8)>7)then
if((IsUnitAlly(KV8,N8[0])))then
if(E5G(h7[254],O5,'ncnk')!=null)then
return h7[254]
elseif(E5G(h7[255],O5,'ncnk')!=null)then
return h7[255]
else
return h7[255]
endif
endif
else
if((IsUnitAlly(KV8,N8[0])))then
if(E5G(h7[254],O5,'nkol')!=null)then
return h7[254]
elseif(E5G(h7[255],O5,'nkol')!=null)then
return h7[255]
else
return h7[255]
endif
endif
endif
elseif(FGG==h7[231])then
if(GetHeroLevel(KV8)>7)then
if((IsUnitAlly(KV8,G8[0])))then
if(E5G(h7[253],O5,'ncnk')!=null)then
return h7[253]
elseif(E5G(h7[258],O5,'ncnk')!=null)then
return h7[258]
elseif(E5G(h7[256],O5,'ncnk')!=null)then
return h7[256]
else
return h7[253]
endif
endif
else
if((IsUnitAlly(KV8,G8[0])))then
if(E5G(h7[253],O5,'nkol')!=null)then
return h7[253]
elseif(E5G(h7[258],O5,'nkol')!=null)then
return h7[258]
elseif(E5G(h7[256],O5,'nkol')!=null)then
return h7[256]
else
return h7[253]
endif
endif
endif
elseif((FGG==h7[232])or(FGG==h7[233]))then
if(GetHeroLevel(KV8)>7)then
if((IsUnitAlly(KV8,G8[0])))then
if(E5G(h7[256],O5,'ncnk')!=null)then
return h7[256]
elseif(E5G(h7[258],O5,'ncnk')!=null)then
return h7[258]
else
return h7[256]
endif
endif
else
if((IsUnitAlly(KV8,G8[0])))then
if(E5G(h7[256],O5,'nkol')!=null)then
return h7[256]
elseif(E5G(h7[258],O5,'nkol')!=null)then
return h7[258]
else
return h7[256]
endif
endif
endif
elseif(FGG==h7[234])then
if(GetHeroLevel(KV8)>7)then
if(E5G(h7[258],O5,'ncnk')!=null)then
return h7[258]
elseif(E5G(h7[256],O5,'ncnk')!=null)then
return h7[256]
else
return h7[258]
endif
else
if(E5G(h7[258],O5,'nkol')!=null)then
return h7[258]
elseif(E5G(h7[256],O5,'nkol')!=null)then
return h7[256]
else
return h7[258]
endif
endif
endif
return null
endfunction
function FHG takes unit it,unit FIG,integer j returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer i1=GetUnitTypeId(it)
local integer UP
local unit FJG=null
local unit m5=null
local boolean FKG=false
local boolean FMG=false
local boolean FNG=(i1=='H00A')or(i1=='U00C')or(i1=='Opgh')or(i1=='N01I')or(i1=='N01H')or(i1=='N01T')or(i1=='N01J')or(i1=='UC42')
if A87(it)or((Bz>hq[528+O5]and Bz>hq[320+O5]and Bz>hq[480+O5]and Bz>hq[576+O5]))==false then
return false
endif
call MoveLocation(Ha,GetUnitX(it),GetUnitY(it))
if((not iy(it))or(not FDG(it))or((GetHeroLevel(it)<7)and(i1!='U00C')and(i1!='Opgh')and(i1!='Eevi')and(i1!='Eevm')and(i1!='E02V')and(i1!='E02W')and(i1!='E02U')and(i1!='UC42')))then
set FKG=false
elseif(i1=='H00A')then
set UP=IH(GetOwningPlayer(it),Condition(function SXD))
set FKG=(Bz>hq[O5])and(GetUnitManaPercent(it)>20.)and(UP<(GetUnitAbilityLevel(it,'A28T')-1))
set FMG=(UP>0)and(GetHeroLevel(it)>12)and(GetUnitLifePercent(it)>75.)
elseif(((IsUnitAlly(it,G8[0]))and(not Gv))or((IsUnitAlly(it,N8[0]))and(not Gw))or(Bz<hq[528+O5]))then
set FKG=false
elseif(i1=='U00C')then
if(GetHeroLevel(it)<18)then
set FKG=true
else
set FKG=(GetRandomInt(1,6)==1 or(j!=0))
endif
set FMG=GetHeroLevel(it)>10
elseif((i1=='Udre')and(not PO8()))then
set FKG=false
elseif((i1=='N01I')or(i1=='N01H')or(i1=='N01T')or(i1=='N01J'))then
set FKG=(GetUnitManaPercent(it)>50.)and(Bz>hq[O5])
elseif(AR7(it,BU[maidasizhishou]))then
set FKG=(Bz>hq[144+O5])and(GetUnitManaPercent(it)>40.)and(GetUnitLifePercent(it)>75.)
if((not FKG)and(i1=='Emoo'))then
if(GetHeroLevel(it)<18)then
set FKG=(GetRandomInt(1,2)==1 or(j!=0))and(GetUnitManaPercent(it)>40.)and(GetUnitLifePercent(it)>75.)and(Bz>hq[O5])
else
set FKG=(GetRandomInt(1,8)==1 or(j!=0))and(GetUnitManaPercent(it)>40.)and(GetUnitLifePercent(it)>75.)and(Bz>hq[O5])
endif
endif
elseif((i1=='E01A')or(i1=='H00K')or(i1=='Oshd')or(i1=='Uktl')or(AV4[GetPlayerId(GetOwningPlayer(it))]==AX4)or((GetHeroLevel(it)>20)and(Bz>2700.))or(GetHeroLevel(it)>=25))then
set FKG=false
elseif(i1=='Emoo')then
if(GetHeroLevel(it)<18)then
set FKG=(GetRandomInt(1,2)==1 or(j!=0))and(GetUnitManaPercent(it)>40.)and(GetUnitLifePercent(it)>75.)and(Bz>hq[O5])
else
set FKG=(GetRandomInt(1,10)==1 or(j!=0))and(GetUnitManaPercent(it)>40.)and(GetUnitLifePercent(it)>75.)and(Bz>hq[O5])
endif
elseif(i1=='UC42')then
if(((GetUnitAbilityLevel(it,'A1P0')==0)and(GetHeroLevel(it)>7))or(((GetUnitAbilityLevel(it,'S00M')==0)and(GetHeroLevel(it)<8))))then
set FKG=true
else
if(GetHeroLevel(it)<13)then
set FKG=(GetRandomInt(1,3)==1 or(j!=0))and(GetUnitManaPercent(it)>40.)and(GetUnitLifePercent(it)>75.)
elseif(GetHeroLevel(it)<16)then
set FKG=(GetRandomInt(1,5)==1 or(j!=0))and(GetUnitManaPercent(it)>40.)and(GetUnitLifePercent(it)>75.)
else
set FKG=(GetRandomInt(1,10)==1 or(j!=0))and(GetUnitManaPercent(it)>40.)and(GetUnitLifePercent(it)>75.)
endif
endif
if((FKG)and(Bz<V74[16+O5])or((V74[16+O5]-Bz)>5))then
set FKG=false
endif
elseif(i1=='Hblm')then
set FKG=(GetHeroLevel(it)<15)and(GetRandomInt(1,2)==1 or(j!=0))and(GetUnitManaPercent(it)>40.)and(Bz>hq[O5])and(GetUnitLifePercent(it)>85.)
elseif(i1=='Ekee')then
if(GetHeroLevel(it)<18)then
set FKG=(GetRandomInt(1,2)==1 or(j!=0))and(GetHeroLevel(it)>10)and(GetUnitManaPercent(it)>60.)and(GetUnitLifePercent(it)>70.)and(Bz>hq[O5])
else
set FKG=(GetRandomInt(1,10)==1 or(j!=0))and(GetUnitManaPercent(it)>40.)and(GetUnitLifePercent(it)>70.)and(Bz>hq[O5])
endif
elseif((i1=='Hvsh')or(i1=='Eevi')or(i1=='Eevm')or(i1=='E02V')or(i1=='E02W')or(i1=='E02U')or(i1=='Huth')or((i1=='NC00')and(GetHeroLevel(it)>11))or(AR7(it,BU[zhipeitoukui]))or(AR7(it,BU[sadanzhixieli]))or(AR7(it,BU[fengkuangmianju]))or(AR7(it,BU[jipin])))then
if(GetHeroLevel(it)<18)then
set FKG=(GetRandomInt(1,2)==1 or(j!=0))
else
set FKG=(GetRandomInt(1,6)==1 or(j!=0))
endif
set FMG=(GetHeroLevel(it)>10)and(i1!='Eevi')and(i1!='Eevm')and(i1!='E02V')and(i1!='E02W')and(i1!='E02U')
elseif((GetHeroLevel(it)>8)and(GetUnitLifePercent(it)>90.)and(GetUnitManaPercent(it)>50.))then
if(GetHeroLevel(it)>=18)then
set FKG=false
elseif(((kq(i1))and(i1!='E01B')and(i1!='Usyl')and(i1!='HC92')and(i1!='Ogrh'))or(i1=='H00H')or(i1=='U00E'))then
set FKG=(GetRandomInt(1,3)==1 or(j!=0))
else
set FKG=(GetHeroLevel(it)>11)and(GetRandomInt(1,5)==1 or(j!=0))
endif
endif
if(FKG)then
if(j!=0)then
set FJG=h7[j]
elseif(FIG==h7[211])then
if((IsUnitAlly(it,G8[0]))or(FNG))then
set FJG=h7[262]
endif
elseif(FIG==h7[212])then
if(((FMG)and(GetHeroLevel(it)>15))or((GetHeroLevel(it)>20)and(GetUnitLifePercent(it)>80.)))then
set FMG=true
set FJG=h7[252]
set m5=E0G(FJG)
if(m5==null)then
set FJG=h7[260]
endif
elseif((IsUnitAlly(it,G8[0]))or(FNG))then
set FJG=h7[260]
endif
elseif(FIG==h7[213])then
if((IsUnitAlly(it,N8[0]))or(FNG))then
set FJG=h7[261]
set m5=E0G(FJG)
if(m5==null)then
set FJG=h7[259]
endif
endif
elseif((FIG==h7[221])or(FIG==h7[222]))then
set FJG=h7[254]
elseif(FIG==h7[223])then
if((IsUnitAlly(it,N8[0]))or(FNG))then
set FJG=h7[257]
set m5=E0G(FJG)
if((m5==null)or((not FMG)and((IsUnitType(m5,UNIT_TYPE_ANCIENT))or(IsUnitType(m5,UNIT_TYPE_MAGIC_IMMUNE)))))then
set FJG=h7[255]
endif
endif
elseif(FIG==h7[231])then
if((IsUnitAlly(it,G8[0]))or(FNG))then
set FJG=h7[253]
endif
elseif((FIG==h7[232])or(FIG==h7[233]))then
set FJG=h7[256]
elseif(FIG==h7[234])then
if((IsUnitAlly(it,N8[0]))or(FNG))then
set FJG=h7[258]
endif
elseif(FIG==h7[235])then
set FJG=h7[251]
set FMG=((FMG)and(GetHeroLevel(it)>15))or((GetHeroLevel(it)>20)and(GetUnitLifePercent(it)>80.))
else
set FJG=null
endif
if((i1=='UC42')and(((GetHeroLevel(it)>7)and(GetUnitAbilityLevel(it,'A1P0')==0))or((GetHeroLevel(it)<8)and(GetUnitAbilityLevel(it,'S00M')==0))))then
set FJG=FFG(FIG,it)
endif
set m5=E0G(FJG)
if((m5==null)or(F4G(FJG)))then
set FKG=false
elseif((IsUnitType(m5,UNIT_TYPE_ANCIENT))or(IsUnitType(m5,UNIT_TYPE_MAGIC_IMMUNE)))then
set FKG=FMG
endif
set FKG=((FJG!=null)and(FKG))
if FKG then
set h8[48+O5]=FJG
set h8[32+O5]=FIG
set h4[64+O5]=m5
call FW8(it,"Jungling")
set eY[O5]=10
set hq[432+O5]=Bz+40.
if j==0 then
if GetRandomInt(0,1)==0 then
set eY[384+O5]=-1
else
set eY[384+O5]=1
endif
endif
endif
endif
set it=null
set FIG=null
set m5=null
set FJG=null
return FKG
endfunction
function FOG takes nothing returns nothing
call FHG(GetTriggerUnit(),LUnit(GetHandleId(GetTriggeringTrigger()),"CrpRect"),0)
endfunction
function FPG takes integer BPF returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitInRange(t,h7[BPF],400.,R24)
call SUnit(GetHandleId(t),"CrpRect",h7[BPF])
call TriggerAddCondition(t,Condition(function E_G))
call TriggerAddAction(t,function FOG)
endfunction
function FQG takes nothing returns nothing
call FPG(211)
call FPG(212)
call FPG(213)
call FPG(221)
call FPG(222)
call FPG(223)
call FPG(231)
call FPG(232)
call FPG(233)
call FPG(234)
call FPG(235)
endfunction
function FRG takes nothing returns boolean
return(GetPlayerController(GetOwningPlayer(GetFilterUnit()))==MAP_CONTROL_COMPUTER)and((T18(GetFilterUnit()))or(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)))and IsUnitIllusion(GetFilterUnit())==false
endfunction
function FSG takes unit ME8 returns unit
local boolexpr Ig=Condition(function E3G)
set h0=null
call GroupClear(H8)
call GroupEnumUnitsInRange(H8,GetUnitX(ME8),GetUnitY(ME8),500.,Ig)
call ForGroup(H8,function E1G)
call DestroyBoolExpr(Ig)
set Ig=null
return h0
endfunction
function FTG takes nothing returns boolean
local integer FUG=GetHandleId(GetTriggeringTrigger())
local unit u
local unit m5
local boolean J4
local real dT
local integer O5=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
if eY[O5]!=10 then
return false
else
set u=GetTriggerUnit()
set m5=V_7(h4[64+O5]!=null and IsUnitInRange(u,h4[64+O5],600),h4[64+O5],FSG(h7[GQ7[FUG-R07]]))
if m5==null then
call FHG(u,h7[GQ7[FUG-R07]],0)
set m5=h4[64+O5]
endif
set J4=(m5!=null)and IssueTargetOrderById(u,851983,m5)
if J4 and(not IsUnitVisibleEx(m5,GetOwningPlayer(u)))then
set dT=TimerGetElapsed(E4)
loop
exitwhen(TimerGetElapsed(E4)-dT)>=4+WI7(UO8(u)==false,2,6)or eY[O5]!=10 or(IssueTargetOrderById(u,851983,m5)and UO8(u)==false and IsUnitVisibleEx(m5,GetOwningPlayer(u)))
call TriggerSleepAction(1)
set J4=IssueTargetOrderById(u,852600,m5)or IssueTargetOrderById(u,851983,m5)
if GetUnitAbilityLevel(u,'A00J')>0 or GetUnitTypeId(u)=='HC92' then
endif
endloop
endif
set u=null
set m5=null
endif
return false
endfunction
function FVG takes nothing returns nothing
local integer i=0
loop
exitwhen i>9
call TriggerAddCondition(R17[i],Condition(function FTG))
call TriggerRegisterUnitInRange(R17[i],h7[GQ7[i]],225,Condition(function FRG))
set i=i+1
endloop
endfunction
function FWG takes nothing returns nothing
local item ZV7=GetEnumItem()
local integer i1
if(GetWidgetLife(ZV7)<=.405)then
else
set F07=GetItemPlayer(ZV7)
set i1=ZU7(ZV7)
if(not IsVisibleToPlayer(GetItemX(ZV7),GetItemY(ZV7),Player(P77)))and(i1!=F1 and i1!=J0 and i1!=N0 and i1!=zhenshibaoshi and i1!=OW)then
elseif IsPlayerAlly(F07,Player(P77))and((IsUnitInRangeLoc(h9[16+P77],L_7(ZV7),700)and(i1!=J0 and i1!=N0 and i1!=zhenshibaoshi and i1!=OW))or(IsUnitInRangeLoc(KR4[GetPlayerId(F07)],L_7(ZV7),'d'))or((F07!=Player(P77))and(not HA4[GetPlayerId(F07)])and(IsUnitInRangeXY(Y7[GetPlayerId(F07)],GetItemX(ZV7),GetItemY(ZV7),700))))then
elseif IsUnitInRangeLoc(O_7,L_7(ZV7),700)and(IsUnitType(bj_lastCreatedUnit,UNIT_TYPE_MELEE_ATTACKER))then
else
set F67=Z47(Y7[P77],ZV7)
if(Hu==null)or(i1==F1 or i1==J0 or i1==N0)or(F67<F37 and(P47!=F1 and P47!=J0 and P47!=N0 and P47!=zhenshibaoshi and P47!=OW))then
set Hu=ZV7
set P47=i1
set F37=F67
endif
endif
endif
set ZV7=null
endfunction
function FXG takes unit it returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(it))
local boolean J4=false
local boolean FYG=false
local integer i1=0
local integer Z9F=0
if eY[528+O5]>3 or Bz<OJ7[160+O5]then
set OI7[336+O5]=null
set eY[528+O5]=0
return false
elseif((OI7[336+O5]!=null)and((not IsItemVisible(OI7[336+O5]))or(GetWidgetLife(OI7[336+O5])<=.405)or(not IsUnitInRangeXY(it,GetItemX(OI7[336+O5]),GetItemY(OI7[336+O5]),800.))))then
set OI7[336+O5]=null
endif
if OI7[320+O5]!=null and GetWidgetLife(OI7[320+O5])<=0 then
set OI7[320+O5]=null
endif
if(OI7[336+O5]==null)then
set eY[528+O5]=1
if OI7[320+O5]==null then
call SetRect(He,GetUnitX(it)-600.,GetUnitY(it)-600.,GetUnitX(it)+600.,GetUnitY(it)+600.)
set Hu=null
set bj_lastCreatedUnit=it
set P77=O5
set P47=0
set F37=999999
if IsUnitAlly(it,G8[0])then
set O_7=JS4
else
set O_7=IN4
endif
call EnumItemsInRect(He,R24,function FWG)
set OI7[336+O5]=Hu
else
set Hu=OI7[320+O5]
endif
else
set Hu=OI7[336+O5]
set eY[528+O5]=eY[528+O5]+1
endif
if((Hu!=null)and(iU(it)))then
set i1=P47
set Z9F=GetItemTypeId(Hu)
set F07=GetItemPlayer(Hu)
call XM7(O5,"aiRespondDroppedItem_uyv "+GetItemName(Hu)+I2S(Z9F))
if((Z9F=='I00K')or(Z9F=='I006')or(Z9F=='I008')or(Z9F=='I00J')or(Z9F=='I007')or(Z9F=='I0HM'))then
elseif Hu==OI7[320+O5]then
set FYG=true
elseif(i1==F1 or i1==J0 or i1==N0 or i1==zhenshibaoshi or i1==OW)and(YZF(O5,it)!=-1 and bj_forLoopBIndexEnd<'d')then
elseif IsPlayerEnemy(Player(O5),F07)and(not TT9(i1))and(i1!=zhenshibaoshi and i1!=OW)then
set FYG=true
elseif F07!=Player(O5)and(not TT9(i1))and(not XZF(i1))and(G14[i1]<500)then
set FYG=true
elseif(i1==zhenshibaoshi or i1==OW)and(LC7(it,BU[zhenshibaoshi]))then
set FYG=true
elseif(not AS7(it))then
elseif(YZF(O5,it)!=-1)then
if(X3F(O5,null,Hu,i1,false)<X3F(O5,null,bj_lastCreatedItem,ZU7(bj_lastCreatedItem),false))then
set FYG=true
endif
elseif YAF(O5,it)then
elseif GetUnitTypeId(it)==CU[zhenshibaoshi]then
else
set FYG=true
endif
if(not FYG)then
if IsUnitInRangeLoc(O_7,L_7(Hu),700)then
else
set J4=(IssueTargetOrderById(it,851971,Hu))
call XM7(O5,GG7+" pick "+GetObjectName(Z9F))
set OJ7[288+O5]=i1
endif
else
if IsUnitInRangeLoc(O_7,L_7(Hu),700)and(IsUnitType(it,UNIT_TYPE_MELEE_ATTACKER))then
else
set J4=(IssueTargetOrderById(it,851983,Hu))
call XM7(O5,GG7+" destroy "+GetObjectName(Z9F))
endif
endif
if J4 then
set hq[832+O5]=Bz+(Z87(GetUnitX(it),GetUnitY(it),GetItemX(Hu),GetItemY(Hu))/ GetUnitMoveSpeed(it))+1.
endif
if(not J4)then
set OI7[336+O5]=null
endif
endif
set Hu=null
return J4
endfunction
function FZG takes nothing returns nothing
set F67=Z47(GetEnumDestructable(),FL7)
if((H0==null or F67<F37)and(GetWidgetLife(GetEnumDestructable())>.5))then
set H0=GetEnumDestructable()
set F37=F67
endif
endfunction
function FAG takes unit it returns boolean
set H0=null
set FL7=it
set F37=999999
call SetRect(He,GetUnitX(it)-450.,GetUnitY(it)-450.,GetUnitX(it)+450.,GetUnitY(it)+450.)
call EnumDestructablesInRect(He,Condition(function K8),function FZG)
return((H0!=null)and(GetUnitAbilityLevel(it,'A0IH')<1 or BS7(it,H0)<=200.)and(UnitUseItemTarget(it,AV7(it,BU[BA]),H0)))
endfunction
function FBG takes integer O5,boolean O6 returns nothing
if(not O6)then
if(h8[32+O5]==h7[213])then
set h8[32+O5]=h7[17]
elseif(h8[32+O5]==h7[212])then
if(h8[48+O5]==h7[252])then
set h8[32+O5]=h7[315]
set h9[32+O5]=h7[15]
else
set h8[32+O5]=h7[325]
set h9[32+O5]=h7[15]
endif
elseif(h8[32+O5]==h7[211])then
set h8[32+O5]=h7[13]
elseif(h8[32+O5]==h7[223])then
set h8[32+O5]=h7[38]
elseif(h8[32+O5]==h7[222])then
set h8[32+O5]=h7[37]
elseif(h8[32+O5]==h7[221])then
set h8[32+O5]=h7[36]
call MF8(GetEnumUnit(),135)
elseif(h8[32+O5]==h7[235])then
set h8[32+O5]=h7[59]
elseif(h8[32+O5]==h7[234])then
set h8[32+O5]=h7[325]
set h9[32+O5]=h7[58]
elseif(h8[32+O5]==h7[233])then
set h8[32+O5]=h7[234]
elseif(h8[32+O5]==h7[232])then
set h8[32+O5]=h7[56]
call MF8(GetEnumUnit(),155)
elseif(h8[32+O5]==h7[231])then
set h8[32+O5]=h7[54]
endif
elseif(O6)then
if(h8[32+O5]==h7[213])then
set h8[32+O5]=h7[315]
set h9[32+O5]=h7[13]
elseif(h8[32+O5]==h7[212])then
set h8[32+O5]=h7[12]
elseif(h8[32+O5]==h7[211])then
set h8[32+O5]=h7[11]
elseif(h8[32+O5]==h7[223])then
set h8[32+O5]=h7[36]
elseif(h8[32+O5]==h7[222])then
set h8[32+O5]=h7[221]
call MF8(GetEnumUnit(),35)
elseif(h8[32+O5]==h7[221])then
set h8[32+O5]=h7[315]
set h9[32+O5]=h7[33]
elseif(h8[32+O5]==h7[235])then
set h8[32+O5]=h7[325]
set h9[32+O5]=h7[56]
elseif(h8[32+O5]==h7[234])then
set h9[32+O5]=h7[56]
elseif(h8[32+O5]==h7[233])then
set h8[32+O5]=h7[54]
call MF8(GetEnumUnit(),55)
elseif(h8[32+O5]==h7[232])then
set h8[32+O5]=h7[53]
elseif(h8[32+O5]==h7[231])then
set h8[32+O5]=h7[52]
endif
endif
endfunction
function FCG takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(not kD(GetFilterUnit()))and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function F3G takes location b5 returns nothing
local unit it=GetEnumUnit()
local integer O5=GetPlayerId(GetOwningPlayer(GetEnumUnit()))
local unit m5=h4[64+O5]
local integer i1
local boolean J4=false
local integer F6G=0
local integer i
local integer j
local integer k
local integer FLG
if(AO7(900.,h8[32+O5],Condition(function FCG))>0)then
call FBG(O5,IsUnitAlly(it,G8[0]))
endif
if((A87(it))or(AN7(900.,b5,Condition(function k6))>0))then
set eY[O5]=1
set hq[544+O5]=Bz+30.
set h4[64+O5]=null
call FBG(O5,IsUnitAlly(it,G8[0]))
call J3(it,false)
if((not A87(it))and(h4[O5]==null)and(G0[256+O5]))then
set G77=AJ7(900.,b5,Condition(function k6))
if(G77!=null)then
call VTF(O5,G77,true,false)
call IssueTargetOrderById(it,851983,h4[O5])
endif
endif
set it=null
set m5=null
return
endif
set F6G=AO7(600.,h8[48+O5],Condition(function E3G))
if F6G==0 then
set i1=GetUnitTypeId(it)
set j=GetHeroLevel(it)
if YO7(i1,GT7)or YO7(i1,GU7)then
if j<12 then
set i=0
else
set i=GetRandomInt(0,(j-12)/ 2)
endif
elseif YO7(i1,GV7)then
set i=GetRandomInt(0,2)
else
set i=GetRandomInt(0,3)
endif
if i==0 then
set i=0
loop
exitwhen(i>9)or(h8[48+O5]==h7[GQ7[i]])
set i=i+1
endloop
set FLG=i
set j=0
set k=eY[384+O5]
loop
if i==0 or i==4 or i==5 or i==9 then
set k=-k
set eY[384+O5]=k
set i=FLG
endif
set i=i+k
exitwhen(j>5)or(FHG(it,h8[48+O5],GQ7[i]))
set j=j+1
endloop
set F6G=AO7(600.,h8[48+O5],Condition(function E3G))
endif
endif
if(F6G==0)then
set GZ[336+O5]=false
if(h8[48+O5]!=h8[32+O5])then
set h8[48+O5]=h8[32+O5]
call J3(it,false)
endif
if(Z47(h8[32+O5],it)<400.)then
set eY[O5]=1
set h4[64+O5]=null
call J3(it,false)
endif
elseif(h8[48+O5]!=h8[32+O5])and(Z47(h8[48+O5],it)<400.)then
set bj_lastLoadedUnit=AJ7(600.,L_7(h8[48+O5]),Condition(function E3G))
if(not GZ[336+O5])and is(it)then
set GZ[336+O5]=IssueTargetOrderById(it,851983,bj_lastLoadedUnit)
endif
set J4=true
endif
if(F6G==0)or J4 then
elseif((m5!=null)and(Z_7(m5))and(GetOwningPlayer(m5)==GetOwningPlayer(it)))then
if(is(it))then
call D48(it,851983,h8[48+O5])
endif
call D48(m5,851983,h8[48+O5])
elseif(GetUnitTypeId(GetEnumUnit())=='H00A')then
if((m5==null)or(not Z_7(m5)))then
call D48(it,851983,h8[48+O5])
elseif(GetOwningPlayer(m5)!=GetOwningPlayer(it))then
set J4=((not IsUnitInRange(it,m5,800.))and(IssueTargetOrderById(it,851971,m5)))or(C_7(it,852131,'A28T',m5))or(D48(it,851983,h8[48+O5]))
endif
elseif(GetUnitTypeId(GetEnumUnit())=='Emoo')then
if((m5==null)or(not Z_7(m5)))then
call D48(it,851983,h8[48+O5])
elseif(GetOwningPlayer(m5)!=GetOwningPlayer(it))then
set J4=((not IsUnitInRange(it,m5,800.))and(IssueTargetOrderById(it,851971,m5)))or(C_7(it,852075,'A0DX',m5)or(D48(it,851983,h8[48+O5])))
endif
elseif(is(it))then
if((h4[64+O5]==null)or(not Z_7(h4[64+O5]))or(not IsUnitInRange(it,h4[64+O5],800.)))then
set h4[64+O5]=AH7(800.,b5,Condition(function E3G))
endif
set m5=h4[64+O5]
if((m5!=null)and(GetWidgetLife(m5)>.405)and(AR7(it,BU[zhipeitoukui])))then
set i1=GetUnitTypeId(m5)
set J4=(((i1=='nomg')or(i1=='nfpc')or(i1=='nsth')or(i1=='ncnk'))and(UnitUseItemTarget(it,AV7(it,BU[zhipeitoukui]),m5)))
elseif((m5!=null)and(GetWidgetLife(m5)>.405)and(AR7(it,BU[maidasizhishou])))then
set i1=GetUnitTypeId(m5)
set J4=((i1!='nkob')and(i1!='ngns')and(i1!='nkot')and(UnitUseItemTarget(it,AV7(it,BU[maidasizhishou]),m5)))
endif
if(not J4)then
set J4=((m5!=null)and(IssueTargetOrderById(it,851983,m5)))or(D48(it,851983,h8[48+O5]))
endif
endif
set it=null
set m5=null
endfunction
function F1G takes unit u returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(u))
local integer UP=0
call XK7("ynv called for: "+GetUnitName(u))
if(A87(u))then
if ZL7(u)then
call D48(u,851986,h9[O5])
endif
call XK7("Goes back : "+GetUnitName(u))
else
if(Z47(u,DH8(u))<12000.)then
if(not IsUnitAlly(u,G8[0]))then
set UP='d'
endif
if(h9[16+O5]==h7[35])then
set h8[16+O5]=h7[35+UP]
set h8[O5]=h7[35+UP]
elseif(h9[16+O5]==h7[55])then
set h8[16+O5]=h7[55+UP]
set h8[O5]=h7[55+UP]
elseif(h9[16+O5]==h7[14])then
set h8[16+O5]=h7[14+UP]
set h8[O5]=h7[14+UP]
endif
set h9[O5]=DH8(u)
set h9[16+O5]=DH8(u)
endif
call XK7("Attacking : "+GetUnitName(u))
if ZL7(u)then
call D48(u,851983,h8[O5])
endif
set eY[O5]=1
set G0[32+O5]=false
set hq[528+O5]=Bz+60.
set hq[592+O5]=Bz+HD7
endif
endfunction
function F0G takes nothing returns nothing
if(GetItemTypeId(GetEnumItem())==AU[F1])and(GetWidgetLife(GetEnumItem())>.405)then
set Hu=GetEnumItem()
endif
endfunction
function F5G takes nothing returns nothing
local real Y_7=Bz+3.
local unit m5=null
local integer i=1
local integer j
local integer YX7
local integer k
local integer O5=0
local unit Y47=null
local unit D9G=null
local item ZV7=null
local player pl=null
local boolean L37=true
local boolean J4=true
if not(GetUnitTypeId(GetDyingUnit())=='n00L')then
return
endif
set Y47=GetKillingUnit()
set pl=GetOwningPlayer(Y47)
set m5=GetDyingUnit()
loop
set i=1
loop
exitwhen i>10
if i<=5 then
set O5=GetPlayerId(G8[i])
else
set O5=GetPlayerId(N8[i-5])
endif
if(Y7[O5]!=null)and(GetWidgetLife(Y7[O5])>.405)and(IsUnitInRange(Y7[O5],m5,1200.))then
if(IsUnitEnemy(Y7[O5],pl))and(IsUnitVisibleEx(Y7[O5],pl))then
set Y_7=.1
exitwhen true
endif
endif
set i=i+1
endloop
exitwhen Bz>Y_7
call TriggerSleepAction(.3)
endloop
call XK7("Roshan Death 02")
call SetRect(He,GetUnitX(m5)-600.,GetUnitY(m5)-600.,GetUnitX(m5)+600.,GetUnitY(m5)+600.)
set Hu=null
call EnumItemsInRect(He,R24,function F0G)
if Hu!=null then
set Y47=null
set D9G=null
set j=0
set YX7=0
set k=0
set i=1
loop
exitwhen i>10
if i<=5 then
set O5=GetPlayerId(G8[i])
else
set O5=GetPlayerId(N8[i-5])
endif
if(Y7[O5]!=null)and(GetWidgetLife(Y7[O5])>.405)and(KR8(Player(O5)))and(IsUnitInRange(Y7[O5],m5,1000.)and(IsVisibleToPlayer(GetItemX(Hu),GetItemY(Hu),Player(O5))))then
set YX7=C[O5]+IU[O5]
if(IsUnitAlly(Y7[O5],pl))then
if Y47==null or(j<YX7)then
if(not AS7(Y7[O5]))or(YAF(O5,Y7[O5]))then
set L37=false
set Y47=Y7[O5]
set j=YX7
elseif L37 then
set Y47=Y7[O5]
set j=YX7
endif
endif
else
if D9G==null or(k<YX7)then
if(not AS7(Y7[O5]))or(YAF(O5,Y7[O5]))then
set J4=false
set D9G=Y7[O5]
set k=YX7
elseif J4 then
set D9G=Y7[O5]
set k=YX7
endif
endif
endif
endif
set i=i+1
endloop
call XK7("Roshan Death 03 "+GetUnitName(Y47)+I2S(W97(L37,1,0)))
endif
set i=1
loop
exitwhen i>10
if i<=5 then
set O5=GetPlayerId(G8[i])
else
set O5=GetPlayerId(N8[i-5])
endif
if eY[O5]==11 then
call F1G(Y7[O5])
endif
set i=i+1
endloop
if Hu!=null then
set OI7[336+GetPlayerId(GetOwningPlayer(Y47))]=Hu
set OI7[336+GetPlayerId(GetOwningPlayer(D9G))]=Hu
set IE7=Bz+3.
loop
call XK7("Roshan Death 04 "+I2S(W97((GetWidgetLife(Hu)<.405),1,0))+" "+I2S(W97(((Y47!=null and GetWidgetLife(Y47)<.405)),1,0))+" "+I2S(W97(((D9G!=null and GetWidgetLife(D9G)<.405)),1,0)))
exitwhen IsItemOwned(Hu)or GetWidgetLife(Hu)<.405 or((Y47!=null and GetWidgetLife(Y47)<.405)and(D9G!=null and GetWidgetLife(D9G)<.405))
if Y47!=null and GetWidgetLife(Y47)>.405 then
if L37 then
call IssueTargetOrderById(Y47,851983,Hu)
else
call IssueTargetOrderById(Y47,851971,Hu)
endif
endif
if D9G!=null and GetWidgetLife(D9G)>.405 then
if J4 then
call IssueTargetOrderById(D9G,851983,Hu)
else
call IssueTargetOrderById(D9G,851971,Hu)
endif
endif
call TriggerSleepAction(.5)
endloop
endif
call XK7("Roshan Death 05")
set m5=null
set Y47=null
set D9G=null
set ZV7=null
set pl=null
endfunction
function F2G takes location b5 returns nothing
local unit it=GetEnumUnit()
local integer O5=GetPlayerId(GetOwningPlayer(GetEnumUnit()))
set hq[544+O5]=Bz+30.
if((A87(it))or(AN7(900.,b5,Condition(function k6))>0))then
set eY[O5]=1
set h4[64+O5]=null
call J3(it,false)
if((not A87(it))and(h4[O5]==null)and(G0[256+O5]))then
set G77=AJ7(900.,b5,Condition(function k6))
if(G77!=null)then
call VTF(O5,h4[O5],true,false)
call IssueTargetOrderById(it,851983,G77)
endif
endif
elseif GetWidgetLife(C4)<.405 and Bz>IE7 then
set eY[O5]=1
set h4[64+O5]=null
call J3(it,false)
elseif((j1(it,AD)>2000.)or(G0[O5]))then
if((IsUnitAlly(it,N8[0]))or(GetUnitX(it)>2300.))then
call D48(it,851986,h7[250])
else
call IssuePointOrderById(it,851986,2736.,-2656.)
endif
else
if G0[48+O5]then
elseif hq[704+O5]<-.05 then
call VQF(it,false)
elseif not IsUnitInRegion(ow,it)then
call D48(it,851986,h7[250])
elseif IsUnitInRange(it,C4,700.)then
call IssueTargetOrderById(it,851983,C4)
else
call D48(it,851983,h7[250])
endif
endif
set it=null
endfunction
function F_G takes nothing returns boolean
set F07=GetOwningPlayer(GetFilterUnit())
return(F07==G8[0]or F07==N8[0])and IsUnitEnemy(bj_lastLoadedUnit,F07)and GetWidgetLife(GetFilterUnit())>.405 and((GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0)and(GetUnitAbilityLevel(GetFilterUnit(),'Aloc')==0))
endfunction
function G4G takes nothing returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(GetEnumUnit()))
if((G0[32+O5])or(not G0[128+O5])or(G0[O5])or(GT))then
elseif(h4[O5]==null)then
call VTF(O5,hz,false,false)
if(ZL7(GetEnumUnit()))then
set GT=VOF(GetEnumUnit(),hz,true)
endif
elseif(ZL7(GetEnumUnit()))then
set GT=VOF(GetEnumUnit(),hz,true)
endif
endfunction
function G7G takes unit G8G,unit G9G returns nothing
set hZ=G8G
set hz=G9G
if(GetWidgetLife(G9G)>1.)then
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(G8G),GetUnitY(G8G),1200.,iP)
set GT=false
call ForGroup(iA,function G4G)
endif
endfunction
function GDG takes unit Y47 returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(Y47))
local boolean GEG=h8[32+O5]==h8[128+O5]
local boolean GFG=true
local integer UP
local integer G88
local integer i
local integer YVF
local integer j
local integer k
local boolean YV7=IsUnitAlly(Y47,G8[0])
if A87(Y47)then
set eY[O5]=1
call MH8(Y47)
call F28(Y47,true)
endif
set hq[544+O5]=Bz+30.
if D then
set FC7="_Uvv "+I2S(eY[O5])+"/"+I2S(eY[272+O5])+" 32:"+I2S(GetUnitUserData(h8[32+O5]))+" / 48:"+I2S(GetUnitUserData(h8[48+O5]))+" / 112:"+I2S(GetUnitUserData(h8['p'+O5]))+" / 128:"+I2S(GetUnitUserData(h8[128+O5]))
if(FC7!=OX7[OA7*12+O5])then
set OX7[OA7*12+O5]=FC7
call XM7(O5,FC7)
endif
endif
if(eY[272+O5]!=0)then
set UP=GetUnitUserData(h8['p'+O5])
else
set UP=GetUnitUserData(h8[128+O5])
endif
if(YV7)then
if((hj[256+UP]==18)or(hj[UP]==10))then
set YVF=IMaxBJ(10+P54-1,11)
elseif((hj[256+UP]==40)or(hj[UP]==30))then
set YVF=IMaxBJ(30+P24-1,31)
else
set YVF=IMaxBJ(50+P_4-1,51)
endif
else
set UP=hj[512+UP]
if((hj[256+UP]=='v')or(hj[UP]=='n'))then
set YVF=IMaxBJ('v'-P54-1,'o')
elseif((hj[256+UP]==140)or(hj[UP]==130))then
set YVF=IMaxBJ(140-P24-1,131)
else
set YVF=IMaxBJ(160-P_4-1,151)
endif
endif
set i=YVF
if eY[272+O5]==0 then
if(YV7)then
if(UP>i)then
set h8[128+O5]=h7[i]
else
set GFG=false
endif
if((h8[128+O5]==h7[15])and(Z_7(JX4)))then
set h8[128+O5]=h7[14]
endif
else
if(UP>i)then
set h8[128+O5]=h7[i]
else
set GFG=false
endif
if((h8[128+O5]==h7[13])and(Z_7(I34)))then
set h8[128+O5]=h7[14]
endif
endif
else
if(YV7)then
set h8[128+O5]=h7[i]
if((h8[128+O5]==h7[15])and(Z_7(JX4)))then
set h8[128+O5]=h7[14]
endif
else
set h8[128+O5]=h7[i]
if((h8[128+O5]==h7[13])and(Z_7(I34)))then
set h8[128+O5]=h7[14]
endif
endif
set j=eY[288+O5]
if(h8[96+O5]!=null)then
set G88=GetPlayerId(GetOwningPlayer(h8[96+O5]))
set j=Z97(GetUnitUserData(h8[80+G88]))
endif
if((h8[96+O5]==null)or(GetWidgetLife(h8[96+O5])<.405)or(j!=eY[288+O5])or(eY[32+GetPlayerId(GetOwningPlayer(h8[96+O5]))]<=0)or(not IsUnitInRange(h8[96+O5],h8[160+O5],2000.)))then
set PG7=h8[96+O5]
set PF7=Y47
set bj_lastLoadedUnit=Y47
set bj_forLoopBIndex=eY[288+O5]
set h8[96+O5]=null
if eY[272+O5]>=4 then
set h8[96+O5]=B97(3000.,Y47,Condition(function GR8))
endif
if h8[96+O5]==null then
set h8[96+O5]=B97(3000.,h7[i],Condition(function GR8))
endif
if(PG7!=null and h8[96+O5]!=PG7)then
set G88=GetPlayerId(GetOwningPlayer(h8[96+O5]))
set k=1
loop
exitwhen k>11
if((IsPlayerAlly(Player(k),Player(O5)))and(eY[k]==9)and(eY[272+k]!=0)and(h8[96+k]==PG7))then
set h8[96+k]=h8[96+O5]
endif
set k=k+1
endloop
endif
endif
if(h8[96+O5]!=null and eY[32+G88]>0)then
set h8[160+O5]=h8[80+G88]
set i=GetUnitUserData(h8[80+G88])
if(Z47(h8[96+O5],h9[G88])<Z47(h8[80+G88],h9[G88]))or(Z47(h8[96+O5],h8[80+G88])<300)then
if YV7 then
set i=i+1
else
set i=i-1
endif
endif
set i=BEF(i,YV7,X_7(Y47))
set j=GetUnitUserData(h8['p'+O5])
if(((YV7)and(i>j or j-i>1))or((not YV7)and(i<j or i-j>1)))and(Z47(Y47,h8['p'+O5])>2000)then
set h8['p'+O5]=h7[i]
endif
else
if(YV7)then
if(UP<i)then
set PF7=h8['p'+O5]
set h8['p'+O5]=h7[i]
endif
if((h8['p'+O5]==h7[15])and(Z_7(JX4)))then
set h8['p'+O5]=h7[14]
endif
else
if(UP<i)then
set PF7=h8['p'+O5]
set h8['p'+O5]=h7[i-1]
endif
if((h8['p'+O5]==h7[13])and(Z_7(I34)))then
set h8['p'+O5]=h7[14]
endif
endif
if h8[32+O5]==PF7 then
set h8[32+O5]=h8['p'+O5]
endif
if h8[48+O5]==PF7 then
set h8[48+O5]=h8['p'+O5]
endif
endif
if eY[272+O5]==2 or eY[272+O5]==3 then
set i=GetUnitUserData(h8['p'+O5])
set k=Z97(GetUnitUserData(h8[80+O5]))
if k==0 then
set k=Z97(GetUnitUserData(h8['p'+O5]))
endif
set UP=GetUnitUserData(h8[48+O5])
set j=BGF(O5,i,k,YV7)
if(j!=0)and(UP!=j)then
if BHF(O5,UP,j)then
elseif(k==1)then
set j=326
elseif(k==2)then
set j=327
endif
set PF7=h8[48+O5]
set h8[48+O5]=h7[j]
set h8[32+O5]=h8[48+O5]
set eY[272+O5]=2
endif
endif
endif
if((GEG)and(GFG))then
set h8[32+O5]=h8[128+O5]
set h8[48+O5]=h8[128+O5]
endif
if((h4[144+O5]!=null)and((Bz+4.)>hq[512+O5]))then
set hq[512+O5]=Bz+4.
endif
set PF7=AJ7(700.,L_7(Y47),Condition(function k6))
if((not G0[160+O5])and((PF7!=null)or((h4[O5]!=null)and(eY[272+O5]!=4))))then
call XK7("_Uvv4 end: 01 ")
set eY[O5]=1
if(eY[272+O5]>=4)then
set h8[96+O5]=PF7
call VTF(O5,h4[O5],true,true)
call MH8(Y47)
set hq[624+O5]=Bz+HP7
set hq[416+O5]=0
call EOG(Y47,h8[96+O5])
else
if((h4[144+O5]!=null)and((Bz+6.)>hq[512+O5]))then
set hq[512+O5]=Bz+6.
endif
if(h8[128+O5]==h8[48+O5])then
if(Z47(Y47,h8[128+O5])<Z47(Y47,h8[O5]))then
if(IsUnitAlly(Y47,G8[0]))then
call MF8(Y47,GetUnitUserData(h8[128+O5]))
else
call MF8(Y47,hj[512+GetUnitUserData(h8[128+O5])])
endif
endif
else
if(Z47(Y47,h8[128+O5])<Z47(Y47,h8[48+O5]))then
set i=GetUnitUserData(h8[128+O5])
else
set i=GetUnitUserData(h8[48+O5])
endif
if i>'d' then
set i=YVF
elseif(not YV7)then
set i=hj[512+i]
endif
call MF8(Y47,i)
endif
if((h4[O5]==null)and(G0[128+O5]))then
set G77=AI7(1000.,Y47,Condition(function k6))
if(G77!=null)then
call VTF(O5,G77,true,true)
call IssueTargetOrderById(Y47,851983,h4[O5])
endif
endif
endif
elseif eY[272+O5]==3 then
call BSF(O5,YV7,UP)
elseif(eY[272+O5]>=4)then
if(not G0[336+O5])and(h8[96+O5]!=null and IsUnitVisibleEx(h8[96+O5],Player(O5)))then
call BUF(YV7,O5,h8[96+O5])
endif
if(h8[96+O5]!=null and Z47(Y47,h8[96+O5])<1000. and IsUnitVisibleEx(h8[96+O5],Player(O5)))then
call XK7("_Uvv4 end:tgt "+GetUnitName(h8[96+O5]))
set eY[O5]=1
call MH8(Y47)
set hq[624+O5]=Bz+HP7
set hq[416+O5]=0
call VTF(O5,h8[96+O5],true,true)
call G7G(Y47,h8[96+O5])
elseif(Z47(Y47,h8[128+O5])<500.)then
call XK7("_Uvv4 end: meet creep")
set eY[O5]=1
call MH8(Y47)
elseif(Z47(Y47,h8[48+O5])<500.)and(eY[272+O5]==5)then
call XK7("_Uvv4 end:48/5 ")
set h8[48+O5]=h8[128+O5]
elseif(Z47(Y47,h8['p'+O5])<800.)and(eY[272+O5]==4)then
call XK7("_Uvv4 5th phase")
set eY[272+O5]=5
call MH8(Y47)
set h8[48+O5]=h8[128+O5]
set i=GetUnitUserData(h8['p'+O5])
if YV7 then
if(i>35 and i<40)then
set h8[48+O5]=h7[35]
elseif(i>55 and i<60)then
set h8[48+O5]=h7[55]
endif
else
if(i>30 and i<35)then
set h8[48+O5]=h7[35]
elseif(i>50 and i<55)then
set h8[48+O5]=h7[55]
endif
endif
set h8[32+O5]=h8[48+O5]
endif
if ZL7(Y47)then
if(h8[96+O5]!=null and Z57(h8[96+O5])and Z47(Y47,h8[96+O5])<1200.)then
call IssueTargetOrderById(Y47,851983,h8[96+O5])
elseif eY[272+O5]==4 then
call D48(Y47,851983,h8[48+O5])
else
call D48(Y47,851986,h8[48+O5])
endif
endif
elseif(Z47(Y47,h8[128+O5])<1000.)and(eY[272+O5]==0)then
set eY[O5]=1
if ZL7(Y47)then
call D48(Y47,851983,h8[48+O5])
endif
call MH8(Y47)
elseif(h8[48+O5]!=h8[32+O5])and(Z47(Y47,h8[48+O5])<1000.)and(eY[272+O5]<=1)then
set h8[48+O5]=h8[32+O5]
if(Z47(Y47,h8[48+O5])<500. and(not Z57(Y47)))then
set G0[176+O5]=true
endif
if ZL7(Y47)then
if G0[176+O5]then
call J3(Y47,false)
else
if hq[640+O5]<=Bz then
call D48(Y47,851986,h9[O5])
elseif GetUnitCurrentOrder(Y47)==851983 then
call D48(Y47,851983,h9[O5])
endif
endif
endif
elseif((not G0[176+O5])and(h8[48+O5]==h8[32+O5]))and(eY[272+O5]<=1)then
if ZL7(Y47)then
if hq[640+O5]<=Bz then
call D48(Y47,851986,h9[O5])
elseif GetUnitCurrentOrder(Y47)==851983 then
call D48(Y47,851983,h9[O5])
endif
endif
elseif((is(Y47))and((AO7(700.,Y47,Condition(function k6))==0)))then
call D48(Y47,851986,h8[48+O5])
endif
set hq[576+O5]=Bz+HI7
set Y47=null
endfunction
function GGG takes real GHG,location b5 returns boolean
local boolean J4=false
local integer O5=GetPlayerId(GetOwningPlayer(GetEnumUnit()))
local integer UP=0
local integer B2F=0
local unit m5=null
local unit M88=null
if(GetUnitCurrentOrder(GetEnumUnit())==851983)then
call GroupClear(H8)
call GroupEnumUnitsInRange(H8,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),RMaxBJ(GHG,500.),R24)
loop
set M88=FirstOfGroup(H8)
exitwhen(M88==null)
if((not Z_7(M88))or(not GF8(M88))or(IsUnitType(M88,UNIT_TYPE_STRUCTURE)))then
elseif((GetOwningPlayer(M88)==G8[0])or(GetOwningPlayer(M88)==N8[0]))then
if(IsUnitEnemy(M88,GetOwningPlayer(GetEnumUnit())))then
set UP=UP+1
set B2F=B2F+1
else
set UP=UP-1
endif
elseif((m5==null)and(IsHeroUnitId(GetUnitTypeId(M88)))and(IsUnitEnemy(M88,GetOwningPlayer(GetEnumUnit())))and(IsUnitVisibleEx(M88,GetOwningPlayer(GetEnumUnit()))))then
set m5=M88
endif
call GroupRemoveUnit(H8,M88)
endloop
if((B2F<5)and(UP<0)and(m5!=null)and(IsHeroUnitId(GetUnitTypeId(m5))))then
set J4=IssueTargetOrderById(GetEnumUnit(),851983,m5)
set GZ[48+O5]=false
endif
set m5=null
endif
return J4
endfunction
function GIG takes real j4,real Ja,location b5 returns boolean
local unit GJG=null
local unit GKG=null
local unit M88=null
local integer O5=GetPlayerId(GetOwningPlayer(GetEnumUnit()))
local boolean J4=false
local unit Y47=null
if(A97(O5))then
return false
elseif((Id(O5))or((GZ[128+O5])and(AN7(800.,b5,Condition(function k6))>0)))then
return false
elseif((h4[96+O5]!=null)and(GetWidgetLife(h4[96+O5])>.405)and(IsUnitInRange(GetEnumUnit(),h4[96+O5],800.)))then
call IssueTargetOrderById(GetEnumUnit(),851983,h4[96+O5])
return true
endif
set Y47=GetEnumUnit()
if(GetUnitLifePercent(Y47)<70.)then
set j4=j4-150.
set Ja=Ja-150.
endif
call GroupClear(H8)
call GroupEnumUnitsInRange(H8,GetUnitX(Y47),GetUnitY(Y47),RMaxBJ(j4,Ja),R24)
loop
set M88=FirstOfGroup(H8)
exitwhen((M88==null)or((GJG!=null)and(GKG!=null)))
if((not Z_7(M88))or(not GF8(M88)))then
elseif((GetOwningPlayer(M88)==G8[0])or(GetOwningPlayer(M88)==N8[0]))then
if((h4[304+O5]!=null)and(YY7(Y47)+Z47(M88,h4[304+O5])<Z47(Y47,h4[304+O5])))then
elseif(IsUnitEnemy(M88,GetOwningPlayer(Y47)))then
if((GKG==null)and(GetUnitState(M88,UNIT_STATE_LIFE)<150.)and(GetUnitLifePercent(M88)<25.)and(IsUnitInRange(M88,Y47,Ja)))then
set GKG=M88
endif
else
if((GJG==null)and(GetUnitState(M88,UNIT_STATE_LIFE)<150.)and(((not IsUnitType(M88,UNIT_TYPE_STRUCTURE))and(GetUnitLifePercent(M88)<25.))or(GetUnitLifePercent(M88)<5.)))then
set GJG=M88
if IsUnitType(GJG,UNIT_TYPE_STRUCTURE)and(ZT or IsUnitType(GJG,UNIT_TYPE_RANGED_ATTACKER)==false)then
if AO7(1800.,GJG,Condition(function k6))==0 then
set GJG=null
endif
endif
endif
endif
endif
call GroupRemoveUnit(H8,M88)
endloop
set M88=null
if((GJG!=null)and((IsUnitType(GJG,UNIT_TYPE_STRUCTURE))or(GetHeroLevel(Y47)<=20)or(GetUnitAbilityLevel(Y47,'A0S0')>0)))then
set h4[96+O5]=GJG
call DisableTrigger(R04[O5])
set J4=IssueTargetOrderById(Y47,851983,GJG)
call EnableTrigger(R04[O5])
elseif(GKG!=null)then
set h4[96+O5]=GKG
call DisableTrigger(R04[O5])
set J4=IssueTargetOrderById(Y47,851983,GKG)
call EnableTrigger(R04[O5])
endif
set Y47=null
set GJG=null
set GKG=null
return J4
endfunction
function GMG takes integer O5,location b5 returns boolean
local unit M88=null
local integer kc=0
local real j4=Z47(GetEnumUnit(),h8[16+GetPlayerId(GetOwningPlayer(GetEnumUnit()))])
local boolean GNG=false
local boolean GOG=false
if(GV8(GetEnumUnit()))then
return true
endif
call GroupClear(H8)
call GroupEnumUnitsInRange(H8,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),1500.,R24)
loop
set M88=FirstOfGroup(H8)
exitwhen(M88==null)
if((not Z_7(M88))or(not GF8(M88)))then
elseif(IsUnitEnemy(M88,GetOwningPlayer(GetEnumUnit())))then
if((not GNG)and(GetOwningPlayer(M88)!=Player(12)))then
if((IsUnitVisibleEx(M88,GetOwningPlayer(GetEnumUnit())))or(GetOwningPlayer(M88)==G8[0])or(GetOwningPlayer(M88)==N8[0]))then
set GNG=true
elseif((IsUnitType(M88,UNIT_TYPE_HERO))and(eY[32+GetPlayerId(GetOwningPlayer(M88))]>0)or((not kD(M88))and(IsUnitInRange(M88,GetEnumUnit(),600.))))then
set GNG=true
endif
endif
elseif((GetOwningPlayer(M88)==G8[0])or(GetOwningPlayer(M88)==N8[0]))then
if(Z47(M88,h8[16+GetPlayerId(GetOwningPlayer(GetEnumUnit()))])<j4)then
if(IsUnitInRange(M88,GetEnumUnit(),700.))then
set kc=kc+1
endif
set GOG=true
elseif((IsUnitType(M88,UNIT_TYPE_STRUCTURE))and(IsUnitInRange(M88,GetEnumUnit(),900.)))then
set GOG=true
if G0[128+O5]then
set kc=kc+2
endif
endif
endif
call GroupRemoveUnit(H8,M88)
endloop
return((kc>1)or((not GNG)and(GOG)))
endfunction
function GPG takes location b5 returns nothing
local unit GQG=GetEnumUnit()
local integer O5=GetPlayerId(GetOwningPlayer(GQG))
local real kl
local boolean L37=false
if A97(O5)then
return
endif
set L37=((LBool(GetHandleId(GQG),"WaterSword|Active"))and(AN7(1200.,L_7(GQG),Condition(function k6))>=1)and(G0[256+O5]))
if((eY[O5]==1)and((GetHeroLevel(GQG)<9)or(GetUnitLifePercent(GQG)<75.))and(GetUnitCurrentOrder(GQG)==851983)and(not G0[48+O5])and(not G0[O5])and(not GZ[128+O5])and(not G0[32+O5]))then
if L37 then
elseif((not GZ[48+O5])and(AN7(300.,b5,Condition(function Kv))==0)and(AN7(600.,b5,Condition(function Kv))>1))then
call IssueImmediateOrderById(GQG,851993)
endif
endif
if((GetHeroLevel(GQG)>8)and(GetUnitLifePercent(GQG)>65.))then
if((not A87(GQG))and(not G0[O5])and(not G0[48+O5])and(not G0[64+O5])and(iU(GQG))and(not GGG(300.,b5))and(not GIG(650.,650.,b5))and((GetUnitCurrentOrder(GQG)==851986)or(GetUnitCurrentOrder(GQG)==851993))and(not G0[32+O5])and(not G0[48+O5])and(Bz>hq[496+O5])and(GMG(O5,b5)))then
call D48(GQG,851983,h8[O5])
endif
elseif((not A87(GQG))and(not G0[O5])and(not G0[48+O5])and(not G0[64+O5])and(iU(GQG))and(not GIG(650.,550.,b5)))then
if((GetUnitCurrentOrder(GQG)==851983)and(not GZ[48+O5])and(not L37))then
if((GetHeroLevel(GQG)<8)and((AN7(300.,b5,Condition(function Kv))>0)or(AN7(500.,b5,Condition(function Kw))>0)))then
set kl=Atan2(GetUnitY(h9[O5])-GetUnitY(GQG),GetUnitX(h9[O5])-GetUnitX(GQG))
call IssuePointOrderById(GQG,851986,GetUnitX(GQG)+200.*Cos(kl),GetUnitY(GQG)+200.*Sin(kl))
elseif(AN7(400.,b5,Condition(function Kv))>1)then
set kl=Atan2(GetUnitY(h9[O5])-GetUnitY(GQG),GetUnitX(h9[O5])-GetUnitX(GQG))
call IssuePointOrderById(GQG,851986,GetUnitX(GQG)+250.*Cos(kl),GetUnitY(GQG)+250.*Sin(kl))
endif
elseif(((GetUnitCurrentOrder(GQG)==851986)or(GetUnitCurrentOrder(GQG)==851993))and(not G0[32+O5])and(not G0[48+O5])and(not G0[48+O5])and(Bz>hq[496+O5])and(GMG(O5,b5)))then
call D48(GQG,851983,h8[O5])
endif
endif
set GQG=null
endfunction
function GRG takes location b5 returns nothing
local unit GSG=GetEnumUnit()
local integer O5=GetPlayerId(GetOwningPlayer(GSG))
local real kl
if((not A87(GSG))and(not G0[O5])and(not G0[48+O5])and(not G0[64+O5])and(iU(GSG))and(not GGG(550.,b5))and(not GIG(900.,800.,b5)))then
if(((GetUnitCurrentOrder(GSG)==851986)or(GetUnitCurrentOrder(GSG)==851993))and(not G0[32+O5])and(Bz>hq[496+O5])and(GMG(O5,b5)))then
call D48(GSG,851983,h8[O5])
elseif((GetUnitCurrentOrder(GSG)==851983)and(not GZ[48+O5]))then
if eY[O5]==3 or eY[O5]==4 then
elseif(((GetHeroLevel(GSG)<6)or(GetUnitLifePercent(GSG)<75.))and(AN7(300.,b5,Condition(function Kv))>1))then
set kl=Atan2(GetUnitY(h9[O5])-GetUnitY(GSG),GetUnitX(h9[O5])-GetUnitX(GSG))
call IssuePointOrderById(GSG,851986,GetUnitX(GSG)+250.*Cos(kl),GetUnitY(GSG)+250.*Sin(kl))
elseif((GetHeroLevel(GSG)<7)and(Bz>hq[496+O5])and((h4[80+O5]==null)or(GetOwningPlayer(h4[80+O5])==G8[0])or(GetOwningPlayer(h4[80+O5])==N8[0]))and(AN7(800.,b5,Condition(function Kv))>0))then
set kl=GetRandomReal(.0,360.)*bj_DEGTORAD
call IssuePointOrderById(GSG,851986,GetUnitX(GSG)+GetRandomReal(50.,90.)*Cos(kl),GetUnitY(GSG)+GetRandomReal(50.,90.)*Sin(kl))
set hq[864+O5]=GetRandomReal(-G97,G97)
endif
endif
endif
set GSG=null
endfunction
function GTG takes location b5 returns nothing
local unit GUG=GetEnumUnit()
local integer O5=GetPlayerId(GetOwningPlayer(GUG))
local unit m5=null
if(not iU(GUG))then
elseif((IsUnitVisibleEx(GUG,G8[0]))and(IsUnitVisibleEx(GUG,N8[0])))then
if(((AN7(1000.,b5,Condition(function A27)))>0)and((AN7(1000.,b5,Condition(function k6)))>0)and((AN7(900.,b5,Condition(function Kd)))<3))then
call D48(GUG,851986,h9[O5])
else
call GPG(b5)
endif
elseif((AN7(1200.,b5,Condition(function k6)))==0)then
if(GetUnitCurrentOrder(GUG)==851983)then
set m5=AH7(400.,b5,Condition(function KA))
if(m5==null)then
set m5=AH7(700.,b5,Condition(function Ka))
endif
if(m5!=null)then
call IssueTargetOrderById(GUG,851983,m5)
endif
endif
else
if(((AN7(1000.,b5,Condition(function Kd)))<2)and(AN7(1000.,b5,Condition(function k8))>1)and(AN7(500.,b5,Condition(function J88))==0))then
call D48(GUG,851986,h9[O5])
elseif((not G0[O5])and(not G0[64+O5])and(iU(GUG))and(not GIG(750.,650.,b5)))then
if(AN7(250.,b5,Condition(function k8))==0 and GetUnitAbilityLevel(GUG,'A00J')==0)or(GetUnitAbilityLevel(GUG,'A00J')!=0 and(AN7(700.,b5,Condition(function HE8))==0)and AO7(800,GUG,Condition(function UP8))==0 and UQ8(GUG)==false)then
call IssueImmediateOrderById(GUG,851993)
else
call IssuePointOrderById(GUG,851986,GetUnitX(m5)+GetRandomReal(0,200.)-100.,GetUnitY(m5)+GetRandomReal(0,200.)-100.)
set hq[864+O5]=GetRandomReal(-G97,G97)
endif
endif
endif
set m5=null
set GUG=null
endfunction
function GVG takes unit it,integer O5,location b5 returns boolean
local unit m5=null
local real GWG=bj_RADTODEG*Atan2(GetUnitY(h9[16+O5])-GetUnitY(it),GetUnitX(h9[16+O5])-GetUnitX(it))
local real GXG
call MoveLocation(Ha,GetUnitX(it)+300.*Cos(GWG*bj_DEGTORAD),GetUnitY(it)+300.*Sin(GWG*bj_DEGTORAD))
if(AN7(500.,Ha,Condition(function Kd))>2)then
set m5=AJ7(500.,Ha,Condition(function Kd))
if(m5!=null)then
set GXG=bj_RADTODEG*Atan2(GetUnitY(m5)-GetUnitY(it),GetUnitX(m5)-GetUnitX(it))
else
return false
endif
if(RAbsBJ(GXG-GWG)>20)then
set m5=null
return false
elseif(GXG>GWG)then
set GWG=GWG-20.
else
set GWG=GWG+20.
endif
call IssuePointOrderById(it,851986,GetUnitX(it)+600.*Cos(bj_DEGTORAD*GWG),GetUnitY(it)+600.*Sin(bj_DEGTORAD*GWG))
set m5=null
return true
else
return false
endif
endfunction
function GYG takes nothing returns nothing
call ExecuteFunc("GZG")
endfunction
function GZG takes nothing returns nothing
local unit it=GetEnumUnit()
local unit FIG=null
local integer O5=GetPlayerId(GetOwningPlayer(it))
local location b5
local integer UP
local real GAG=Z47(it,DH8(it))
local boolean J4=false
local unit H58=null
local real F_8=.0
if(GetUnitTypeId(it)!='H00J')then
set b5=HC[16+O5]
else
if(EJ8(GetHandleId(it),"MCSLoc")!=null)then
set b5=EJ8(GetHandleId(it),"MCSLoc")
else
set b5=GetUnitLoc(it)
call D18(GetHandleId(it),"MCSLoc",b5)
endif
endif
call MoveLocation(b5,GetUnitX(it),GetUnitY(it))
if((A87(it))and(is(it))and(not Id(O5))and(GetUnitAbilityLevel(it,'A0PV')==0)and(GetUnitAbilityLevel(it,'B02Z')==0)and(GetUnitAbilityLevel(it,'A0IH')<1 or AO7(700.,it,Condition(function A27))>1))then
if(not GVG(it,O5,b5))then
if(GAG<1000)or(not LGF(it))then
if((GAG+100.)<Z47(h9[O5],DH8(it)))then
call D48(it,851986,h9[16+O5])
else
call D48(it,851986,h9[O5])
endif
endif
endif
elseif GetUnitAbilityLevel(it,'A0IH')>0 then
set bj_lastLoadedUnit=it
set H58=JF8(600,it,false)
set F_8=AO7(600,it,Condition(function k6))
if AO7(700.,it,Condition(function A27))>1 then
if(not GVG(it,O5,b5))then
if(GAG<1000)or(not LGF(it))then
if((GAG+100.)<Z47(h9[O5],DH8(it)))then
call D48(it,851986,h9[16+O5])
else
call D48(it,851986,h9[O5])
endif
endif
endif
elseif not((GetHeroLevel(it)>=15. and GetUnitLifePercent(it)>40+WI7(H58!=null,25,0))or(H58==null and GetUnitLifePercent(it)>80.))then
set J4=F_8<=1+WI7(H58!=null,1,2)and FZ8(it,V_7(IsUnitAlly(it,G8[0]),IN4,JS4))
else
set J4=is(it)and IssueImmediateOrderById(it,851993)
endif
endif
set J4=DQG(it)
if false and(eY[O5]==1 or eY[O5]==9)and(not OM7[240+O5])then
set UP=-1
if((Z47(it,h8[O5])<400)and(GetUnitCurrentOrder(it)==851983))then
set UP=GetUnitUserData(h8[O5])
elseif((Z47(it,h9[O5])<400)and(GetUnitCurrentOrder(it)==851986))then
set UP=GetUnitUserData(h9[O5])
endif
if(UP>=11 and UP<=17)or(UP>=31 and UP<=39)or(UP>=51 and UP<=59)then
if IsTZPlayer(Player(O5))then
set UP=hj[512+UP]
endif
call MF8(it,UP)
endif
endif
if((eY[O5]==2)and(not J4)and(is(it))and(GAG>500.))then
if(IsUnitAlly(it,G8[0]))then
call CIF(it,O5,PT4)
else
call CIF(it,O5,PU4)
endif
endif
if((eY[O5]==1)and(not J4)and(is(it))and(GetUnitAbilityLevel(it,'B0DV')>0))then
set J4=D48(it,851986,h9[16+O5])
set G0[64+O5]=true
call XK7("Run Forest, Run")
endif
if((not J4)and(GAG>4500.)and(is(it)))then
if(GetUnitAbilityLevel(it,'B0CD')==0)then
if(not J4)and(AR7(it,BU[BA]))then
set UP=R2I(((GetUnitState(it,UNIT_STATE_LIFE)+175.)/ GetUnitState(it,UNIT_STATE_MAX_LIFE))*100.)
if((eY[O5]==1)and(UP<'d')and(UP>50)and(Bz>hq[256+O5]))then
set J4=(h4[O5]==null)and(AN7(1000.,b5,Condition(function JP8))==0)and(AN7(1000.,b5,Condition(function A27))==0)and(iy(it))and(FAG(it))
endif
endif
if(not J4)and(AR7(it,BU[jingmizhixie]))then
if(GetUnitState(it,UNIT_STATE_MAX_LIFE)<700.)then
set UP=R2I(((GetUnitState(it,UNIT_STATE_LIFE)+275.)/ GetUnitState(it,UNIT_STATE_MAX_LIFE))*100.)
else
set UP=R2I(((GetUnitState(it,UNIT_STATE_LIFE)+375.)/ GetUnitState(it,UNIT_STATE_MAX_LIFE))*100.)
endif
if(eY[O5]==1)and(UP<'d')and(UP>45)then
set J4=(h4[O5]==null)and(iy(it))and(UnitCountBuffsExBJ(bj_BUFF_POLARITY_NEGATIVE,bj_BUFF_RESIST_EITHER,it,false,false)==0)and(AN7(1100.,b5,Condition(function KX))==0)and(AN7(700.,b5,Condition(function KA))==0)and(UnitUseItem(it,bj_lastCreatedItem))
endif
endif
if(not J4)and(AR7(it,BU[ZA]))then
if(GetUnitState(it,UNIT_STATE_MAX_LIFE)<700.)then
set UP=R2I(((GetUnitState(it,UNIT_STATE_LIFE)+275.)/ GetUnitState(it,UNIT_STATE_MAX_LIFE))*100.)
else
set UP=R2I(((GetUnitState(it,UNIT_STATE_LIFE)+375.)/ GetUnitState(it,UNIT_STATE_MAX_LIFE))*100.)
endif
if((eY[O5]==1)and(UP<'d')and(UP>45)and(GetUnitAbilityLevel(it,'B02Z')==0))then
set J4=(h4[O5]==null)and(iy(it))and(UnitCountBuffsExBJ(bj_BUFF_POLARITY_NEGATIVE,bj_BUFF_RESIST_EITHER,it,false,false)==0)and(AN7(1100.,b5,Condition(function KX))==0)and(AN7(700.,b5,Condition(function KA))==0)and(UnitUseItemTarget(it,bj_lastCreatedItem,it))
endif
endif
endif
if((not J4)and(GAG>6000.)and(not G0[O5]))then
if eY[208+O5]!=0 then
if eY[O5]!=1 or Z47(it,h7[eY[208+O5]])<3000. then
set eY[208+O5]=0
endif
endif
if(eY[O5]==1)then
if false and((Bz>hq[592+O5])and(OM7[128+O5])and(GetHeroLevel(it)>5)and(h4[O5]==null)and((Bz>hq[592+O5]+60. and AJ7(800.,b5,Condition(function KX))==null)or(AJ7(1200.,b5,Condition(function KX))==null))and((GetHeroLevel(it)<12)or((Z47(it,JX(it))>6000.)and(AJ7(1200.,b5,Condition(function KX))==null))))then
set G0[320+O5]=true
call F28(it,true)
if(IsUnitAlly(it,G8[0]))then
set J4=FZ8(it,IN4)
else
set J4=FZ8(it,JS4)
endif
elseif(eY[208+O5]!=0 and AN7(800.,b5,Condition(function k6))==0)then
if h8[144+O5]!=null then
set J4=FZ8(it,h8[144+O5])
else
set J4=FZ8(it,h7[eY[208+O5]])
endif
endif
elseif((eY[O5]==3)or(eY[O5]==4))then
if(AN7(800.,b5,Condition(function k6))>0)then
elseif(A87(it))then
elseif(IsUnitAlly(it,G8[0]))then
if(GM7[64+O5]==0)then
if(PC4<3)then
set J4=FZ8(it,J74)
elseif(GetWidgetLife(JF4)>.405)then
set J4=FZ8(it,JF4)
elseif(GetWidgetLife(JI4)>.405)then
set J4=FZ8(it,JI4)
elseif(GetWidgetLife(J94)>.405)then
set J4=FZ8(it,J94)
elseif(GetWidgetLife(JD4)>.405)then
set J4=FZ8(it,JD4)
elseif(GetWidgetLife(IY4)>.405)then
set J4=FZ8(it,IY4)
endif
elseif(GM7[64+O5]==1)then
if(P34<3)then
set J4=FZ8(it,J44)
elseif(GetWidgetLife(JE4)>.405)then
set J4=FZ8(it,JE4)
elseif(GetWidgetLife(JH4)>.405)then
set J4=FZ8(it,JH4)
elseif(GetWidgetLife(J94)>.405)then
set J4=FZ8(it,J94)
elseif(GetWidgetLife(JD4)>.405)then
set J4=FZ8(it,JD4)
elseif(GetWidgetLife(IY4)>.405)then
set J4=FZ8(it,IY4)
endif
elseif(GM7[64+O5]==2)then
if(P64<3)then
set J4=FZ8(it,J84)
elseif(GetWidgetLife(JG4)>.405)then
set J4=FZ8(it,JG4)
elseif(GetWidgetLife(JJ4)>.405)then
set J4=FZ8(it,JJ4)
elseif(GetWidgetLife(J94)>.405)then
set J4=FZ8(it,J94)
elseif(GetWidgetLife(JD4)>.405)then
set J4=FZ8(it,JD4)
elseif(GetWidgetLife(IY4)>.405)then
set J4=FZ8(it,IY4)
endif
elseif(GM7[64+O5]==3)then
if(GetWidgetLife(IY4)>.405)then
set J4=FZ8(it,IY4)
endif
endif
if(not J4)then
set J4=FZ8(it,IN4)
endif
else
if(GM7[64+O5]==0)then
if(PL4<3)then
set J4=FZ8(it,J34)
elseif(GetWidgetLife(J54)>.405)then
set J4=FZ8(it,J54)
elseif(GetWidgetLife(K44)>.405)then
set J4=FZ8(it,K44)
elseif(GetWidgetLife(JL4)>.405)then
set J4=FZ8(it,JL4)
elseif(GetWidgetLife(J14)>.405)then
set J4=FZ8(it,J14)
elseif(GetWidgetLife(JV4)>.405)then
set J4=FZ8(it,JV4)
endif
elseif(GM7[64+O5]==1)then
if(P14<3)then
set J4=FZ8(it,JC4)
elseif(GetWidgetLife(J04)>.405)then
set J4=FZ8(it,J04)
elseif(GetWidgetLife(J_4)>.405)then
set J4=FZ8(it,J_4)
elseif(GetWidgetLife(JL4)>.405)then
set J4=FZ8(it,JL4)
elseif(GetWidgetLife(J14)>.405)then
set J4=FZ8(it,J14)
elseif(GetWidgetLife(JV4)>.405)then
set J4=FZ8(it,JV4)
endif
elseif(GM7[64+O5]==2)then
if(P04<3)then
set J4=FZ8(it,J64)
elseif(GetWidgetLife(J24)>.405)then
set J4=FZ8(it,J24)
elseif(GetWidgetLife(K74)>.405)then
set J4=FZ8(it,K74)
elseif(GetWidgetLife(JL4)>.405)then
set J4=FZ8(it,JL4)
elseif(GetWidgetLife(J14)>.405)then
set J4=FZ8(it,J14)
elseif(GetWidgetLife(JV4)>.405)then
set J4=FZ8(it,JV4)
endif
elseif(GM7[64+O5]==3)then
if(GetWidgetLife(JV4)>.405)then
set J4=FZ8(it,JV4)
endif
endif
if(not J4)then
set J4=FZ8(it,JS4)
endif
endif
endif
endif
if((not J4)and(GAG>8500.)and(eY[O5]!=11))then
set FIG=h4[128+O5]
if((FIG!=null)and(Z_7(FIG))and(IsUnitInRange(it,FIG,1000.)))then
if((GetUnitTypeId(FIG)=='u00T')or(GetUnitTypeId(FIG)=='e019'))then
set UP=AO7(1000.,FIG,Condition(function KC))
if((UP==0)and(not Id(O5))and(GetUnitState(it,UNIT_STATE_LIFE)<1600.)and(Bz>hq[512+O5]))then
call XM7(O5,"Cancelkill d "+GetUnitName(h4[O5]))
call VWF(O5,false)
set J4=(GetUnitAbilityLevel(it,'A0IH')<1)and D48(it,851986,h9[O5])
endif
elseif(((Id(O5))and(R2I(GetUnitState(it,UNIT_STATE_LIFE))>(400+(GetHeroLevel(it)*50)))and(GetHeroLevel(it)>=6))or(hq[512+O5]>Bz))then
if((Z47(it,JX(it)))<(Z47(FIG,JX(it))-200.))then
call XM7(O5,"Cancelkill e "+GetUnitName(h4[O5]))
call VWF(O5,true)
set J4=(GetUnitAbilityLevel(it,'A0IH')<1)and D48(it,851986,h9[O5])
set hq[512+O5]=.0
endif
elseif((GetHeroLevel(it)<11)and((Z47(it,JX(it)))<(Z47(FIG,JX(it))+I2R(500-(GetHeroLevel(it)*20))))and(not iy(it))and(h4[80+O5]!=FIG))then
call XM7(O5,"Cancelkill f "+GetUnitName(h4[O5]))
call VWF(O5,true)
set J4=(GetUnitAbilityLevel(it,'A0IH')<1)and D48(it,851986,h9[O5])
set hq[512+O5]=.0
elseif((Bz>hq[512+O5])and((h4[O5]==null)or((not Id(O5))and((GetHeroLevel(it)<16)or(GetUnitState(it,UNIT_STATE_LIFE)<1300.)))))then
set UP=AO7(1000.,FIG,Condition(function KC))
set J4=((Z47(it,JX(it))<(Z47(FIG,JX(it))-200.))or(UP==0)or((GetUnitState(it,UNIT_STATE_LIFE)<1300.)and(UP<2)))and((GetUnitAbilityLevel(it,'A0IH')<1)and D48(it,851986,h9[O5]))
set hq[512+O5]=.0
endif
if((not J4)and(iy(it))and(eY[O5]==1)and(GetHeroLevel(it)>10)and(GetUnitCurrentOrder(it)==851983)and(not G0[O5]))then
set UP=AO7(900.,FIG,Condition(function KC))
if((UP>1)and(GetUnitLifePercent(it)>60.))then
call IssueTargetOrderById(it,851983,FIG)
endif
endif
if((not J4)and(GetUnitLifePercent(FIG)<20.)and(eY[O5]==1)and(GetHeroLevel(it)>10)and(h4[O5]==null)and(not G0[O5])and(iU(it))and((h4[80+O5]==null)or(not IsUnitType(h4[80+O5],UNIT_TYPE_STRUCTURE))))then
set J4=IssueTargetOrderById(it,851983,FIG)
endif
elseif((GAG>12000.)and(not G0[O5])and((h4[80+O5]==null)or(not IsUnitType(h4[80+O5],UNIT_TYPE_STRUCTURE))or(h4[O5]!=null)))then
set FIG=AJ7(1000.,b5,Condition(function KB))
if(FIG!=null)then
if((Id(O5))and(R2I(GetUnitState(it,UNIT_STATE_LIFE))>(500+(GetHeroLevel(it)*30)))and(GetHeroLevel(it)>=6))then
if((Z47(it,JX(it)))<(Z47(FIG,JX(it))-350.))then
call XM7(O5,"Cancelkill g "+GetUnitName(h4[O5]))
call VWF(O5,true)
set J4=(GetUnitAbilityLevel(it,'A0IH')<1)and D48(it,851986,h9[O5])
endif
elseif(h4[O5]==null)then
set J4=(iU(it))and((GetUnitLifePercent(FIG)<10.)or(AN7(700.,b5,Condition(function KX))<4))and(IssueTargetOrderById(it,851983,FIG))
elseif((kA(it,h4[O5],200.))or((Z47(it,JX(it)))<(Z47(FIG,JX(it))-250.)))then
call XM7(O5,"Cancelkill h "+GetUnitName(h4[O5]))
call VWF(O5,true)
set J4=((AN7(700.,b5,Condition(function KX))<4)and(IssueTargetOrderById(it,851983,FIG)))or((GetUnitAbilityLevel(it,'A0IH')<1)and D48(it,851986,h9[O5]))
endif
endif
endif
endif
endif
if((eY[O5]!=2)and(not J4)and(is(it)))then
set UP=GetUnitCurrentOrder(it)
if(OM7[256+O5])then
if(GetUnitAbilityLevel(it,'A0IH')<1)then
call D48(it,851986,h8[O5])
endif
elseif((UP==0)or(UP==851972))then
call J3(it,true)
elseif((G0[32+O5])and(eY[O5]==1)and(UP!=851986)and(GetUnitAbilityLevel(it,'B02Z')==0)and(AN7(900.,b5,Condition(function k8))==0))then
call F28(it,false)
endif
if((h4[O5]==null)and(GAG>2800.))then
set J4=(j1(it,QD)>2000.)and(j1(it,PD)>2000.)and(FXG(it))
set G77=AJ7(800.,b5,Condition(function K4))
if((not J4)and(G77!=null)and(not A87(it)))then
call VTF(O5,G77,false,false)
if h4[O5]!=null then
call IssueTargetOrderById(it,851983,h4[O5])
endif
endif
endif
if((not J4)and(not Id(O5)))then
if((eY[O5]!=1)or(GAG<3000.)or(hq[512+O5]>Bz)or((GetHeroLevel(it)>15)and(GetWidgetLife(it)>1600.))or((h4[O5]!=null)and((GetUnitLifePercent(h4[O5])+15.)<GetUnitLifePercent(it))and(GetUnitState(it,UNIT_STATE_LIFE)>GetUnitState(h4[O5],UNIT_STATE_LIFE))))then
elseif(((UP==851983)or(UP==851993))and((not GZ[48+O5])or(GetHeroLevel(it)<6))and(AN7(700.,b5,Condition(function J88))==0)and(GAG>3500.))then
if(GetHeroLevel(it)<10)then
set UP=AN7(900.,b5,Condition(function Kd))
else
set UP=AN7(900.,b5,Condition(function KC))
endif
if((iy(it))and(GetUnitLifePercent(it)>60.)and((h4[80+O5]==null)or(not IsUnitType(h4[80+O5],UNIT_TYPE_STRUCTURE))))then
set J4=(UP==0)and(AN7(900.,b5,Condition(function Ky))>1)and((GetUnitAbilityLevel(it,'A0IH')<1)and D48(it,851986,h9[O5]))
if((not J4)and(((h4[128+O5]==null)or(not IsUnitInRange(it,h4[128+O5],1800.)))and(((not GG8(it))and(GetHeroLevel(it)>9))or(GetHeroLevel(it)>14))))then
set FIG=AJ7(600.,b5,Condition(function KV))
if((FIG!=null)and(h4[80+O5]!=FIG))then
call IssueTargetOrderById(it,851983,FIG)
endif
endif
else
set J4=(UP<=2)and(AN7(900.,b5,Condition(function Ky))>((UP*2)+1))and((GetUnitAbilityLevel(it,'A0IH')<1)and D48(it,851986,h9[O5]))
endif
elseif((UP==851986)and(not G0[64+O5])and(ZL7(it)))then
if((GetUnitAbilityLevel(it,'B02Z')>0)and(GetUnitLifePercent(it)<95.))then
set FIG=AH7(400.,b5,Condition(function J88))
if(FIG!=null)then
set J4=((AO7(1200.,FIG,Condition(function k8))==0)and(Z47(h9[16+O5],FIG)>Z47(h9[16+O5],it)+500.)and((GetUnitAbilityLevel(it,'A0IH')<1)and D48(it,851983,h8[O5])))
endif
elseif((not G0[32+O5])and(not A87(it)))then
set FIG=AJ7(400.,b5,Condition(function J88))
if(FIG!=null)then
set UP=AO7(1200.,FIG,Condition(function k8))
set J4=((UP<2)or((UP<4)and(AO7(1200.,FIG,Condition(function k6))==0))and(Z47(h9[16+O5],FIG)>Z47(h9[16+O5],it)+500.)and(D48(it,851983,h8[O5])))
endif
endif
endif
endif
if(eY[544+O5]==1)then
set bj_lastLoadedUnit=it
if GetWidgetLife(h9[64+O5])<.405 then
set eY[544+O5]=0
elseif AO7(1200,h9[64+O5],Condition(function GT8))==0 then
if(D8G(h9[64+O5],IsUnitAlly(it,G8[0]),LInt(GetHandleId(h9[64+O5]),"AI|Lane"))<0)then
set eY[544+O5]=0
endif
endif
elseif(eY[544+O5]==2)then
set bj_lastLoadedUnit=it
if GetWidgetLife(h9[64+O5])<.405 then
set eY[544+O5]=0
elseif AO7(1200,h9[64+O5],Condition(function GT8))==0 then
set eY[544+O5]=0
endif
endif
if eY[544+O5]!=0 and hq[848+O5]<Bz+HK7 then
set hq[848+O5]=Bz+HK7
endif
if((J4)or(not is(it)))then
elseif(eY[O5]==1)and(G0[128+O5])then
if OM7[256+O5]and(h8[O5]!=h7[353])and(h8[O5]!=h7[354])then
set OM7[256+O5]=false
endif
if(GetUnitAbilityLevel(it,'B0DV')>0)then
if(GetUnitAbilityLevel(it,'A0IH')<1)then
call D48(it,851986,h9[O5])
endif
set G0[64+O5]=true
call XK7("Sun Ray on me.. moving BACK")
elseif OM7[256+O5]or A97(O5)then
elseif(GG8(it))then
if((GetUnitAbilityLevel(it,'A00J')==0)or(h4[O5]!=null))then
call GPG(b5)
else
call GTG(b5)
endif
else
call GRG(b5)
endif
if h9[64+O5]!=null then
if(GetUnitState(h9[64+O5],UNIT_STATE_LIFE)<.45)or(Z47(h9[64+O5],it)>3000)or(AJ7(3000.,L_7(h9[64+O5]),Condition(function k6))==null)then
set h9[64+O5]=null
else
set hq[320+O5]=Bz+10.
endif
endif
elseif((eY[O5]==3)or(eY[O5]==4))then
if(GAG<6000.)then
call CHF(it)
else
set J4=LGF(it)
endif
elseif(eY[O5]==9)then
call GDG(it)
elseif(eY[O5]==10)then
call F3G(b5)
elseif(eY[O5]==11)then
call F2G(b5)
endif
endif
set it=null
set FIG=null
set b5=null
endfunction
function GBG takes unit it returns integer
local integer i1=GetUnitTypeId(it)
if(i1=='H00U')then
return 19
elseif(i1=='N0HP')then
return 18
elseif(i1=='E002')then
return 17
elseif(i1=='UC42')then
return 16
elseif(i1=='Hmbr')then
return 15
elseif(i1=='UC76')then
return 14
elseif(i1=='Ekee')then
return 13
elseif(i1=='H00H')then
return 12
elseif(i1=='Ulic')then
return 11
elseif(i1=='UC18')then
return 10
elseif(i1=='H004')then
return 9
elseif(i1=='Orkn')then
return 8
elseif(i1=='Ntin')then
return 7
elseif(i1=='U00E')then
return 6
elseif(i1=='N00B')then
return 5
elseif(i1=='Nfir')then
return 4
elseif(i1=='EC77')then
return 3
elseif(i1=='EC57')then
return 2
elseif(i1=='H00V')then
return 1
else
return 0
endif
endfunction
function GCG takes nothing returns boolean
return((not P94)and(not PE4)and(not PF4)and(not PD4))
endfunction
function G3G takes nothing returns nothing
local integer iZ=1
local integer G6G=1
local integer GLG=1
local unit G1G=null
local unit G0G=null
loop
exitwhen iZ>5
if(KR8(G8[iZ]))then
if((G1G==null)or(((GBG(Y7[GetPlayerId(G8[iZ])]))>(GBG(G1G)))or((GBG(G1G)==0)and((YY7(Y7[GetPlayerId(G8[iZ])])>YY7(G1G))or((YY7(Y7[GetPlayerId(G8[iZ])])==YY7(G1G))and(GetHeroStr(Y7[GetPlayerId(G8[iZ])],false)>=GetHeroAgi(Y7[GetPlayerId(G8[iZ])],false))and(GetHeroStr(Y7[GetPlayerId(G8[iZ])],false)>=GetHeroInt(Y7[GetPlayerId(G8[iZ])],false)))))))then
set G1G=Y7[GetPlayerId(G8[iZ])]
set eY[64+GetPlayerId(G8[iZ])]=0
endif
endif
if(KR8(N8[iZ]))then
if((G0G==null)or(((GBG(Y7[GetPlayerId(N8[iZ])]))>(GBG(G0G)))or((GBG(G0G)==0)and((YY7(Y7[GetPlayerId(N8[iZ])])>YY7(G0G))or((YY7(Y7[GetPlayerId(N8[iZ])])==YY7(G0G))and(GetHeroStr(Y7[GetPlayerId(N8[iZ])],false)>=GetHeroAgi(Y7[GetPlayerId(N8[iZ])],false))and(GetHeroStr(Y7[GetPlayerId(N8[iZ])],false)>=GetHeroInt(Y7[GetPlayerId(N8[iZ])],false)))))))then
set G0G=Y7[GetPlayerId(N8[iZ])]
set eY[64+GetPlayerId(N8[iZ])]=0
endif
endif
set iZ=iZ+1
endloop
set iZ=1
loop
exitwhen iZ>5
if((KR8(G8[iZ]))and(G8[iZ]!=GetOwningPlayer(G1G)))then
if(G6G<3)then
set eY[64+GetPlayerId(G8[iZ])]=G6G
else
set eY[64+GetPlayerId(G8[iZ])]=G6G-2
endif
set G6G=G6G+1
endif
if((KR8(N8[iZ]))and(N8[iZ]!=GetOwningPlayer(G0G)))then
if(GLG<3)then
set eY[64+GetPlayerId(N8[iZ])]=GLG
else
set eY[64+GetPlayerId(N8[iZ])]=GLG-2
endif
set GLG=GLG+1
endif
set iZ=iZ+1
endloop
set iZ=1
loop
exitwhen iZ>5
set GLG=GetPlayerId(G8[iZ])
if(eY[64+GLG]==0)then
set h8[GLG]=h7[11]
set h8[16+GLG]=h7[14]
elseif(eY[64+GLG]==1)then
set h8[GLG]=h7[31]
set h8[16+GLG]=h7[35]
else
set h8[GLG]=h7[51]
set h8[16+GLG]=h7[55]
endif
set GLG=GetPlayerId(N8[iZ])
if(eY[64+GLG]==0)then
set h8[GLG]=h7['o']
set h8[16+GLG]=h7['r']
elseif(eY[64+GLG]==1)then
set h8[GLG]=h7[131]
set h8[16+GLG]=h7[135]
else
set h8[GLG]=h7[151]
set h8[16+GLG]=h7[155]
endif
set iZ=iZ+1
endloop
set G1G=null
set G0G=null
endfunction
function G5G takes nothing returns nothing
local integer O5=1
if Bz<RD4 then
return
endif
loop
exitwhen O5>11
if(IsPlayerInForce(Player(O5),RX4))then
call GroupClear(iC)
call GroupEnumUnitsOfPlayer(iC,Player(O5),iL)
call ForGroup(iC,function GYG)
endif
if(IsPlayerInForce(Player(O5),E8))then
if((Y7[O5]!=null)and(GetWidgetLife(Y7[O5])>.405))then
if(IsUnitVisibleEx(Y7[O5],N8[0]))then
set eY[32+O5]=4
elseif(eY[32+O5]>0)then
set eY[32+O5]=eY[32+O5]-1
endif
endif
elseif(IsPlayerInForce(Player(O5),F8))then
if((Y7[O5]!=null)and(GetWidgetLife(Y7[O5])>.405))then
if(IsUnitVisibleEx(Y7[O5],G8[0]))then
set eY[32+O5]=4
elseif(eY[32+O5]>0)then
set eY[32+O5]=eY[32+O5]-1
endif
endif
endif
set O5=O5+1
endloop
endfunction
function G2G takes nothing returns nothing
local unit it=GetEnumUnit()
local integer O5=GetPlayerId(GetOwningPlayer(it))
if not ZL7(it)then
elseif(Bz<=RD4-23.)then
if Z47(it,DH8(it))<600. and eY[O5]!=0 then
if iU(it)then
call IssueImmediateOrderById(it,851993)
endif
else
if IsUnitAlly(it,G8[0])then
call IssuePointOrderById(it,851986,GetRectCenterX(QD),GetRectCenterY(QD))
else
call IssuePointOrderById(it,851986,GetRectCenterX(PD),GetRectCenterY(PD))
endif
endif
elseif(eY[O5]==2)or(not(Bz>OJ7[160+O5]))then
elseif(IsUnitAlly(it,N8[0]))then
if(h8[16+O5]==h7[14])then
call IssuePointOrderById(it,851971,3465.047,2934.085)
elseif(h8[16+O5]==h7[35])then
call IssuePointOrderById(it,851971,1866.325,5447.545)
else
call IssuePointOrderById(it,851971,6235.246,2320.347)
endif
else
if(h8[16+O5]==h7[14])then
call IssuePointOrderById(it,851971,-4333.835,-5104.621)
elseif(h8[16+O5]==h7[35])then
call IssuePointOrderById(it,851971,-6195.5,-3508)
else
call IssuePointOrderById(it,851971,-2690.314,-6847.58)
endif
endif
set it=null
endfunction
function G_G takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local integer O5=LInt(GetHandleId(t),"pID")
call A0F(Y7[O5])
set R04[80+O5]=null
call LT7(GetHandleId(t))
call DestroyTrigger(t)
set t=null
endfunction
function H4G takes nothing returns nothing
local integer O5
local integer i
local integer j
local integer k
if D17 then
return
endif
if(Bz<(RD4+2.))then
if(Bz==RD4-OT7)then
if(GCG())then
call ExecuteFunc("G3G")
endif
if(not FZ7)then
set FZ7=true
set O5=1
set NL4=true
loop
exitwhen O5>11
if O5==6 then
set O5=7
endif
if KR8(Player(O5))and Y7[O5]!=null then
set R04[80+O5]=CreateTrigger()
call TriggerRegisterTimerEvent(R04[80+O5],.1,false)
call TriggerAddAction(R04[80+O5],function G_G)
call SInt(GetHandleId(R04[80+O5]),"pID",O5)
endif
set O5=O5+1
endloop
endif
endif
call GroupClear(R54)
call GroupEnumUnitsInRect(R54,bj_mapInitialPlayableArea,iL)
call ForGroup(R54,function G2G)
else
call DestroyTrigger(GetTriggeringTrigger())
call DestroyTrigger(RA4)
set RA4=null
call DestroyTrigger(Ho)
call EnableTrigger(RB4)
call EnableTrigger(GD7)
call EnableTrigger(R64)
call EnableTrigger(R34)
call EnableTrigger(RZ4)
if(RV4!=null)then
call DisplayTimedTextToPlayer(RT4,0,0,5.,"Picking for AI has ended.")
call SetUnitOwner(h4[512+GetPlayerId(RT4)],RT4,false)
call SetUnitOwner(h4[512+GetPlayerId(RV4)],RV4,false)
set RV4=null
endif
if(RW4!=null)then
call DisplayTimedTextToPlayer(RU4,0,0,5.,"Picking for AI has ended.")
call SetUnitOwner(h4[512+GetPlayerId(RU4)],RU4,false)
call SetUnitOwner(h4[512+GetPlayerId(RW4)],RW4,false)
set RW4=null
endif
set O5=1
loop
exitwhen O5>11
if O5==6 then
set O5=7
endif
set F17=IsPlayerAlly(Player(O5),G8[0])
set j=W97(F17,0,6)
if KR8(Player(O5))and Y7[O5]!=null then
set bj_forLoopBIndex=YQ7(GetUnitTypeId(Y7[O5]))
set i=1
loop
exitwhen i>5
if GM7[48+j+i]==-1 then
set GM7[48+j+i]=O5
exitwhen true
elseif YQ7(GetUnitTypeId(Y7[GM7[48+j+i]]))>bj_forLoopBIndex then
set k=5
loop
exitwhen k==i
set GM7[48+j+k]=GM7[48+j+k-1]
set k=k-1
endloop
set GM7[48+j+i]=O5
exitwhen true
endif
set i=i+1
endloop
endif
set O5=O5+1
endloop
set FC7=""
set i=1
loop
exitwhen i>5
set GM7[80+i]=GM7[48+i]
set GM7[86+i]=GM7[54+i]
set i=i+1
endloop
endif
endfunction
function H7G takes nothing returns nothing
local integer O5=1
local integer UP=0
local integer H8G=0
local integer H9G=0
local integer HDG=0
local integer i=0
loop
exitwhen O5>5
if((Y7[GetPlayerId(G8[O5])]==null)and(GetPlayerSlotState(G8[O5])==PLAYER_SLOT_STATE_PLAYING))then
return
elseif(not KS8(G8[O5]))then
elseif(GetPlayerController(G8[O5])==MAP_CONTROL_COMPUTER)then
if(h8[16+GetPlayerId(G8[O5])]==h7[14])then
set HDG=HDG+1
elseif(h8[16+GetPlayerId(G8[O5])]==h7[35])then
set H8G=H8G+1
else
set H9G=H9G+1
endif
else
set UP=GetPlayerId(G8[O5])
if(IsUnitInRange(Y7[UP],J74,700.))then
set HDG=HDG+1
elseif(IsUnitInRange(Y7[UP],J44,700.))then
set H8G=H8G+1
elseif(IsUnitInRange(Y7[UP],J84,700.))then
set H9G=H9G+1
elseif((j1(Y7[UP],QD)<4000.)or(RectContainsUnit(Cz,Y7[UP])))then
elseif(RAbsBJ(GetUnitX(Y7[UP])-GetUnitY(Y7[UP]))<1500.)then
set HDG=HDG+1
elseif(((GetUnitY(Y7[UP])>5000.)and(GetUnitY(Y7[UP])<6700.))or((GetUnitX(Y7[UP])>-7000.)and(GetUnitX(Y7[UP])<-5500.)))then
set H8G=H8G+1
elseif(((GetUnitY(Y7[UP])>-7500.)and(GetUnitY(Y7[UP])<-6300.))or((GetUnitX(Y7[UP])>5000.)and(GetUnitX(Y7[UP])<6700.)))then
set H9G=H9G+1
endif
endif
set O5=O5+1
endloop
if(HM4<=3)then
set UP=1
else
set UP=2
endif
if((P94)or((PE4)and(PF4))or((PE4)and(PD4))or((PF4)and(PD4)))then
set UP=5
endif
set i=1
loop
exitwhen i>5
if((KS8(G8[i]))and(GetPlayerController(G8[i])==MAP_CONTROL_COMPUTER))then
set O5=GetPlayerId(G8[i])
if(h8[16+O5]==h7[14])then
if(((HDG>1)and(GCG()))or((HDG>UP)and(not(GCG()))))then
if((not PF4)and(H8G<UP))then
set h8[16+O5]=h7[35]
set h8[O5]=h7[32]
set eY[64+O5]=1
set H8G=H8G+1
set HDG=HDG-1
elseif((not PD4)and(H9G<UP))then
set h8[16+O5]=h7[55]
set h8[O5]=h7[52]
set eY[64+O5]=2
set H9G=H9G+1
set HDG=HDG-1
endif
endif
elseif(h8[16+O5]==h7[35])then
if(H8G>UP)then
if((not PE4)and(((HDG<1)and(GCG()))or((HDG<UP)and(not(GCG())))))then
set h8[16+O5]=h7[14]
set h8[O5]=h7[12]
set eY[64+O5]=0
set HDG=HDG+1
set H8G=H8G-1
elseif((not PD4)and(H9G<UP))then
set h8[16+O5]=h7[55]
set h8[O5]=h7[52]
set eY[64+O5]=2
set H9G=H9G+1
set H8G=H8G-1
endif
endif
else
if(H9G>UP)then
if((not PE4)and(((HDG<1)and(GCG()))or((HDG<UP)and(not(GCG())))))then
set h8[16+O5]=h7[14]
set h8[O5]=h7[12]
set eY[64+O5]=0
set HDG=HDG+1
set H9G=H9G-1
elseif((not PF4)and(H8G<UP))then
set h8[16+O5]=h7[35]
set h8[O5]=h7[32]
set eY[64+O5]=1
set H8G=H8G+1
set H9G=H9G-1
endif
endif
endif
endif
set i=i+1
endloop
endfunction
function HEG takes nothing returns nothing
local integer O5=1
local integer UP=0
local integer H8G=0
local integer H9G=0
local integer HDG=0
local integer i=0
loop
exitwhen O5>5
if((Y7[GetPlayerId(N8[O5])]==null)and(GetPlayerSlotState(N8[O5])==PLAYER_SLOT_STATE_PLAYING))then
return
elseif(not KS8(N8[O5]))then
elseif(GetPlayerController(N8[O5])==MAP_CONTROL_COMPUTER)then
if(h8[16+GetPlayerId(N8[O5])]==h7['r'])then
set HDG=HDG+1
elseif(h8[16+GetPlayerId(N8[O5])]==h7[135])then
set H8G=H8G+1
else
set H9G=H9G+1
endif
else
set UP=GetPlayerId(N8[O5])
if(IsUnitInRange(Y7[UP],J34,700.))then
set HDG=HDG+1
elseif(IsUnitInRange(Y7[UP],JC4,700.))then
set H8G=H8G+1
elseif(IsUnitInRange(Y7[UP],J64,700.))then
set H9G=H9G+1
elseif((j1(Y7[UP],PD)<4000.)or(RectContainsUnit(cz,Y7[UP])))then
elseif(RAbsBJ(GetUnitX(Y7[UP])-GetUnitY(Y7[UP]))<1500.)then
set HDG=HDG+1
elseif(((GetUnitY(Y7[UP])>5000.)and(GetUnitY(Y7[UP])<6700.))or((GetUnitX(Y7[UP])>-7000.)and(GetUnitX(Y7[UP])<-5500.)))then
set H8G=H8G+1
elseif(((GetUnitY(Y7[UP])>-7500.)and(GetUnitY(Y7[UP])<-6300.))or((GetUnitX(Y7[UP])>5000.)and(GetUnitX(Y7[UP])<6700.)))then
set H9G=H9G+1
endif
endif
set O5=O5+1
endloop
if(HN4<=3)then
set UP=1
else
set UP=2
endif
if((P94)or((PE4)and(PF4))or((PE4)and(PD4))or((PF4)and(PD4)))then
set UP=5
endif
set i=1
loop
exitwhen i>5
if((KS8(N8[i]))and(GetPlayerController(N8[i])==MAP_CONTROL_COMPUTER))then
set O5=GetPlayerId(N8[i])
if(h8[16+O5]==h7['r'])then
if(((HDG>1)and(GCG()))or((HDG>UP)and(not(GCG()))))then
if((not PD4)and(H9G<UP))then
set h8[16+O5]=h7[155]
set h8[O5]=h7[152]
set eY[64+O5]=2
set H9G=H9G+1
set HDG=HDG-1
elseif((not PF4)and(H8G<UP))then
set h8[16+O5]=h7[135]
set h8[O5]=h7[132]
set eY[64+O5]=1
set H8G=H8G+1
set HDG=HDG-1
endif
endif
elseif(h8[16+O5]==h7[135])then
if(H8G>UP)then
if((not PE4)and(((HDG<1)and(GCG()))or((HDG<UP)and(not(GCG())))))then
set h8[16+O5]=h7['r']
set h8[O5]=h7['p']
set eY[64+O5]=0
set HDG=HDG+1
set H8G=H8G-1
elseif((not PD4)and(H9G<UP))then
set h8[16+O5]=h7[155]
set h8[O5]=h7[152]
set eY[64+O5]=2
set H9G=H9G+1
set H8G=H8G-1
endif
endif
else
if(H9G>UP)then
if((not PE4)and(((HDG<1)and(GCG()))or((HDG<UP)and(not(GCG())))))then
set h8[16+O5]=h7['r']
set h8[O5]=h7['p']
set eY[64+O5]=0
set HDG=HDG+1
set H9G=H9G-1
elseif((not PF4)and(H8G<UP))then
set h8[16+O5]=h7[135]
set h8[O5]=h7[132]
set eY[64+O5]=1
set H8G=H8G+1
set H9G=H9G-1
endif
endif
endif
endif
set i=i+1
endloop
endfunction
function HFG takes nothing returns nothing
if((Bz>26.)and((not P94)or((PE4)and(PF4))or((PE4)and(PD4))or((PF4)and(PD4)))and((Bz<=RD4-30)or(Bz>=RD4-18)))then
if(RT4!=null)then
call H7G()
endif
if(RU4!=null)then
call HEG()
endif
endif
endfunction
function HGG takes nothing returns nothing
local unit it=LUnit(GetHandleId(GetTriggeringTrigger()),"Hero")
local integer ki
if((GetUnitAbilityLevel(it,'A0KX')>0)and(GetUnitLifePercent(it)>90.)and(not IsUnitHidden(it))and(iU(it)))then
set ki=GetHandleId(GetOwningPlayer(it))
if((GetHeroStr(it,true)>(30+(4*GetHeroLevel(it))))and(GetHeroStr(it,false)>(15+GetHeroLevel(it))))then
if(IsTriggerEnabled(LTrig(ki,"MorphStr")))then
call IssueImmediateOrderById(it,852547)
elseif(not IsTriggerEnabled(LTrig(ki,"MorphAgi")))then
call IssueImmediateOrderById(it,852549)
endif
elseif((GetHeroStr(it,true)<(20+(2*GetHeroLevel(it)))))then
if(IsTriggerEnabled(LTrig(ki,"MorphAgi")))then
call IssueImmediateOrderById(it,852550)
elseif(not IsTriggerEnabled(LTrig(ki,"MorphStr")))then
call IssueImmediateOrderById(it,852546)
endif
elseif(IsTriggerEnabled(LTrig(ki,"MorphStr")))then
call IssueImmediateOrderById(it,852547)
elseif(IsTriggerEnabled(LTrig(ki,"MorphAgi")))then
call IssueImmediateOrderById(it,852550)
endif
endif
set it=null
endfunction
function D0G takes nothing returns nothing
local trigger t
if(LTrig(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"HasAM")==null)then
set t=CreateTrigger()
call STrig(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"HasAM",t)
call SUnit(GetHandleId(t),"Hero",GetTriggerUnit())
call TriggerRegisterTimerEventPeriodic(t,1.)
call TriggerAddAction(t,function HGG)
else
set t=LTrig(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"HasAM")
call SUnit(GetHandleId(t),"Hero",GetTriggerUnit())
endif
endfunction
function HHG takes unit it,integer X5 returns nothing
if((it!=null)and(is(it))and(IsUnitInRange(it,GetTriggerUnit(),800.))and(GetUnitLifePercent(it)>50.))then
call IssuePointOrderById(it,X5,GetOrderPointX(),GetOrderPointY())
endif
endfunction
function HIG takes nothing returns nothing
local integer X5=GetIssuedOrderId()
local integer O5=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
if((X5<852000)and(X5!=851973)and(X5!=851974)and((not G0[16+O5])or(X5==851986)))then
call HHG(Y7[16+O5],X5)
call HHG(Y7[32+O5],X5)
call HHG(Y7[48+O5],X5)
endif
endfunction
function DLG takes nothing returns nothing
local trigger t
if(LTrig(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"HasMM")==null)then
set t=CreateTrigger()
call STrig(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"HasMM",t)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerAddAction(t,function HIG)
endif
endfunction
function HJG takes nothing returns boolean
return(GetAttacker()==LUnit(GetHandleId(GetTriggeringTrigger()),"Hero"))
endfunction
function HKG takes unit it,integer HMG,boolean HNG returns nothing
set GZ[304+GetPlayerId(GetOwningPlayer(it))]=HNG
call SetPlayerAbilityAvailable(GetOwningPlayer(it),HMG,HNG)
endfunction
function HOG takes nothing returns nothing
local unit IB=GetAttacker()
local unit m5=GetTriggerUnit()
local integer i1=GetUnitTypeId(IB)
local integer O5=GetPlayerId(GetOwningPlayer(IB))
local integer kt
local integer HMG
local real HPG=.0
local real HQG=.0
local integer UP
local boolean J4
local integer X5=0
if((i1=='H00V')or(i1=='H08D')or(i1=='H08C')or(i1=='H084')or(i1=='H08B'))then
if((IsUnitType(m5,UNIT_TYPE_HERO)or IsUnitType(m5,UNIT_TYPE_STRUCTURE)))then
set J4=(i1!='H00V')and(DE8(IB,852139,'A1C0'))
else
set J4=(i1=='H00V')and(DE8(IB,852138,'A1C0'))
endif
elseif(i1=='EC77')then
set J4=((IsUnitType(m5,UNIT_TYPE_HERO))and((GetUnitState(IB,UNIT_STATE_MANA)>hq[272+O5])or((Bz+30.)<hq[O5])))
call HKG(IB,'A09V',J4)
set X5=852255
set HMG='A09V'
elseif(i1=='E004')then
set HPG=37+(GetHeroLevel(IB)*2.88)
set HQG=10+10*(GetUnitAbilityLevel(IB,'AHfa'))
call HKG(IB,'AHfa',((IsUnitType(m5,UNIT_TYPE_HERO))and((GetUnitState(IB,UNIT_STATE_MANA)>10.)or(A87(m5))))or((IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(GetHeroLevel(IB)>5)and(GetUnitState(IB,UNIT_STATE_MANA)>150.))or((GetHeroLevel(IB)>19)and(GetUnitManaPercent(IB)>75.))or((GetHeroLevel(IB)>5)and(GetUnitState(IB,UNIT_STATE_MANA)>150.)and(GetWidgetLife(m5)>HPG)and(GetWidgetLife(m5)<HPG+HQG)))
set X5=852174
set HMG='AHfa'
elseif(i1=='U00P')then
set HPG=49+(GetHeroLevel(IB)*2.68)
set HQG=GetUnitState(IB,UNIT_STATE_MANA)*(.05+.01*(GetUnitAbilityLevel(IB,'A0OI')))
call HKG(IB,'A0OI',((IsUnitType(m5,UNIT_TYPE_HERO))and((GetUnitState(IB,UNIT_STATE_MANA)>150.)or(A87(m5))))or((GetHeroLevel(IB)>19)and(GetUnitManaPercent(IB)>70.))or((GetHeroLevel(IB)>5)and(GetUnitState(IB,UNIT_STATE_MANA)>150.)and(GetWidgetLife(m5)>HPG)and(GetWidgetLife(m5)<HPG+HQG)))
set X5=852255
set HMG='A0OI'
elseif(i1=='Nbrn')then
call HKG(IB,'A026',(IsUnitType(m5,UNIT_TYPE_HERO))and((GetUnitState(IB,UNIT_STATE_MANA)>150.)or(A87(m5))))
set HMG='A026'
set X5=852244
elseif(i1=='Emoo')then
set HPG=47+(GetHeroLevel(IB)*2.68)
set UP=GetUnitAbilityLevel(IB,'A0DY')
if(UP==0)then
set UP=GetUnitAbilityLevel(IB,'A1WB')
if(UP>0)then
set HQG=DistanceBetweenPoints(GetUnitLoc(m5),GetUnitLoc(IB))*(.1+.05*(GetUnitAbilityLevel(IB,'A1WB')))
call HKG(IB,'A1WB',((IsUnitType(m5,UNIT_TYPE_HERO))and((GetUnitState(IB,UNIT_STATE_MANA)>150.)or(A87(m5))))or((GetHeroLevel(IB)>19)and(GetUnitManaPercent(IB)>68.))or((GetHeroLevel(IB)>5)and(GetUnitManaPercent(IB)>50.)and(GetWidgetLife(m5)>HPG)and(GetWidgetLife(m5)<HPG+HQG)))
set HMG='A1WB'
endif
else
set HQG=DistanceBetweenPoints(GetUnitLoc(m5),GetUnitLoc(IB))*(.1+.05*(GetUnitAbilityLevel(IB,'A0DY')))
call HKG(IB,'A0DY',((IsUnitType(m5,UNIT_TYPE_HERO))and((GetUnitState(IB,UNIT_STATE_MANA)>150.)or(A87(m5))))or((GetHeroLevel(IB)>19)and(GetUnitManaPercent(IB)>75.))or((GetHeroLevel(IB)>5)and(GetUnitManaPercent(IB)>50.)and(GetWidgetLife(m5)>HPG)and(GetWidgetLife(m5)<HPG+HQG)))
set HMG='A0DY'
endif
set X5=852255
elseif(i1=='N01A')then
set HQG=GetHeroInt(IB,true)*.15*(GetUnitAbilityLevel(IB,'A0LZ'))
call HKG(IB,'A0LZ',((IsUnitType(m5,UNIT_TYPE_HERO))and((GetUnitState(IB,UNIT_STATE_MANA)>150.)or(A87(m5))))or((GetHeroLevel(IB)>10)and(GetUnitManaPercent(IB)>70.))or((GetHeroLevel(IB)>5)and(GetUnitState(IB,UNIT_STATE_MANA)>150.)and(GetWidgetLife(m5)>HPG)and(GetWidgetLife(m5)<HPG+HQG)))
set HMG='A0LZ'
set X5=852255
elseif(i1=='H00Q')then
call HKG(IB,'A0QN',(GetUnitState(IB,UNIT_STATE_LIFE)>100.)and((IsUnitType(m5,UNIT_TYPE_HERO))and((GetUnitLifePercent(IB)>60.)or(A87(m5))))or((GetHeroLevel(IB)>14)and(GetUnitLifePercent(IB)>70.)))
set HMG='A0QN'
set X5=852255
endif
if((GZ[304+O5])and(IsUnitType(m5,UNIT_TYPE_HERO)))then
set kt=GetUnitAbilityLevel(IB,HMG)
if((CI7(IB))or(hq[32+O5]>Bz)or(kt==0)or(GetUnitAbilityLevel(IB,'B05V')>0))then
set GZ[304+O5]=false
elseif(i1=='EC77')then
if(kt<=2)then
set hq[32+O5]=Bz+5.-kt
endif
set GZ[304+O5]=GetUnitState(IB,UNIT_STATE_MANA)>20.
elseif(i1=='E004')then
if(kt<=2)then
set hq[32+O5]=Bz+5.-kt
endif
set GZ[304+O5]=GetUnitState(IB,UNIT_STATE_MANA)>8.
elseif(i1=='U00P')then
if(kt<=3)then
set hq[32+O5]=Bz+8.-(2.*kt)
endif
set GZ[304+O5]=GetUnitState(IB,UNIT_STATE_MANA)>100.
elseif(i1=='Nbrn')then
set GZ[304+O5]=GetUnitState(IB,UNIT_STATE_MANA)>12.
elseif(i1=='Emoo')then
if(kt<=3)then
set hq[32+O5]=Bz+7.-kt
endif
set GZ[304+O5]=GetUnitState(IB,UNIT_STATE_MANA)>35.+(5.*kt)
elseif(i1=='N01A')then
if(kt<=3)then
set hq[32+O5]=Bz+4.-kt
endif
set GZ[304+O5]=GetUnitState(IB,UNIT_STATE_MANA)>15.
elseif(i1=='H00Q')then
set GZ[304+O5]=GetUnitState(IB,UNIT_STATE_LIFE)>101.
endif
endif
if IssueImmediateOrderById(IB,X5)then
call IssueTargetOrderById(IB,851983,m5)
endif
set IB=null
set m5=null
endfunction
function HRG takes nothing returns boolean
local integer W57=GetHandleId(GetTriggeringTrigger())
local unit it=LUnit(W57,"Unit")
local integer O5=GetPlayerId(GetOwningPlayer(it))
if(not HA4[O5])and(GetUnitCurrentOrder(it)==851983)and(h4[336+O5]==null)and(Bz>hq[832+O5])then
if IsUnitEnemy(GetTriggerUnit(),Player(O5))and GF8(GetTriggerUnit())and GetWidgetLife(GetTriggerUnit())>.405 and IsUnitVisibleEx(GetTriggerUnit(),Player(O5))then
call IssueTargetOrderById(it,851983,GetTriggerUnit())
endif
endif
return false
endfunction
function HSG takes nothing returns boolean
local trigger t=null
if(GetLearnedSkill()=='A00J')then
call DestroyTrigger(GetTriggeringTrigger())
set t=CreateTrigger()
call TriggerRegisterUnitInRange(t,GetTriggerUnit(),600.,null)
call TriggerAddCondition(t,Condition(function HRG))
call SUnit(GetHandleId(t),"Unit",GetTriggerUnit())
set t=null
endif
return false
endfunction
function D_G takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_HERO_SKILL)
call TriggerAddCondition(t,Condition(function HSG))
set t=null
endfunction
function D6G takes nothing returns nothing
local trigger t
if(LTrig(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"HasOrb")==null)then
set t=CreateTrigger()
call STrig(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"HasOrb",t)
call SUnit(GetHandleId(t),"Hero",GetTriggerUnit())
if(IsJWPlayer(GetOwningPlayer(GetTriggerUnit())))then
call TriggerRegisterPlayerUnitEvent(t,N8[0],EVENT_PLAYER_UNIT_ATTACKED,R24)
call c6(t,EVENT_PLAYER_UNIT_ATTACKED)
else
call TriggerRegisterPlayerUnitEvent(t,G8[0],EVENT_PLAYER_UNIT_ATTACKED,R24)
call B6(t,EVENT_PLAYER_UNIT_ATTACKED)
endif
call TriggerRegisterPlayerUnitEvent(t,O8,EVENT_PLAYER_UNIT_ATTACKED,R24)
call TriggerAddCondition(t,Condition(function HJG))
call TriggerAddAction(t,function HOG)
endif
endfunction
function HTG takes nothing returns boolean
return(((GetUnitTypeId(GetTriggerUnit())=='n01G')or(GetUnitTypeId(GetTriggerUnit())=='n01C')or(GetUnitTypeId(GetTriggerUnit())=='n018')or(GetUnitTypeId(GetTriggerUnit())=='n004'))and(RY4[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]))
endfunction
function HUG takes nothing returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
if((h4[O5]==null)and(not GZ[272+O5])and((GetUnitLifePercent(GetTriggerUnit())<50.)or((Y7[O5]!=null)and(GetHeroLevel(Y7[O5])<10))))then
set GZ[272+O5]=true
call TriggerSleepAction(.2)
call D48(GetTriggerUnit(),851986,h9[O5])
call TriggerSleepAction(1.)
set GZ[272+O5]=false
endif
endfunction
function D2G takes nothing returns nothing
local trigger t
if(LTrig(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"HasAtkM")==null)then
set t=CreateTrigger()
call STrig(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"HasAtkM",t)
call TriggerRegisterPlayerUnitEvent(t,GetOwningPlayer(GetTriggerUnit()),EVENT_PLAYER_UNIT_ATTACKED,R24)
call TriggerAddCondition(t,Condition(function HTG))
call TriggerAddAction(t,function HUG)
endif
endfunction
function HVG takes nothing returns boolean
return((GetUnitAbilityLevel(GetTriggerUnit(),'Aeth')==1)and(not IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(RY4[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]))
endfunction
function HWG takes nothing returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
if(((h4[O5]==null)or(GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)<400.)or(GetRandomInt(1,10)>4))and(GetUnitCurrentOrder(GetTriggerUnit())!=851986))then
call TriggerSleepAction(.5)
call D48(GetTriggerUnit(),851986,h9[O5])
endif
endfunction
function D5G takes nothing returns nothing
local trigger t
if(LTrig(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"HasAtkM")==null)then
set t=CreateTrigger()
call STrig(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"HasAtkM",t)
call TriggerRegisterPlayerUnitEvent(t,GetOwningPlayer(GetTriggerUnit()),EVENT_PLAYER_UNIT_ATTACKED,R24)
call TriggerAddCondition(t,Condition(function HVG))
call TriggerAddAction(t,function HWG)
endif
endfunction
function HXG takes nothing returns boolean
return(((GetUnitTypeId(GetTriggerUnit())=='e00K')or(GetUnitTypeId(GetTriggerUnit())=='e00I')or(GetUnitTypeId(GetTriggerUnit())=='e00L'))and(RY4[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]))
endfunction
function HYG takes nothing returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
call TriggerSleepAction(.5)
call D48(GetTriggerUnit(),851986,h9[512+O5])
if(GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)<200.)then
call D48(GetTriggerUnit(),852525,DH8(GetTriggerUnit()))
endif
endfunction
function D1G takes nothing returns nothing
local trigger t
if(LTrig(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"HasAtkM")==null)then
set t=CreateTrigger()
call STrig(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"HasAtkM",t)
call TriggerRegisterPlayerUnitEvent(t,GetOwningPlayer(GetTriggerUnit()),EVENT_PLAYER_UNIT_ATTACKED,R24)
call TriggerAddCondition(t,Condition(function HXG))
call TriggerAddAction(t,function HYG)
endif
endfunction
function HZG takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetWidgetLife(GetFilterUnit())>.405)and((IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))or(GetUnitAbilityLevel(GetFilterUnit(),'B04R')>0))and(GetUnitAbilityLevel(GetFilterUnit(),'Bcyc')==0)and(GetUnitAbilityLevel(GetFilterUnit(),'Bcy2')==0))
endfunction
function HAG takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(GetWidgetLife(GetFilterUnit())>.405)and((IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(bj_lastLoadedUnit)))or(GetUnitAbilityLevel(GetFilterUnit(),'B04R')>0))and(GetUnitAbilityLevel(GetFilterUnit(),'Bcyc')==0)and(GetUnitAbilityLevel(GetFilterUnit(),'Bcy2')==0))
endfunction
function HBG takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return((GetOwningPlayer(GetFilterUnit())==Player(bj_forLoopAIndexEnd))and((i1=='o018')or(i1=='o002')or(i1=='o00B')or(i1=='o01B'))and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function HCG takes nothing returns nothing
call SetUnitUserData(GetEnumUnit(),GetUnitUserData(GetEnumUnit())+1)
call GroupAddUnit(iA,GetEnumUnit())
endfunction
function H3G takes nothing returns nothing
call SetUnitUserData(GetEnumUnit(),0)
endfunction
function H6G takes nothing returns nothing
local integer O5=1
local group jU=LGroup(GetHandleId(GetTriggeringTrigger()),"MGrp")
local boolexpr M88=ES8(GetHandleId(GetTriggeringTrigger()),"MFilt")
local unit Y47=null
loop
if O5==6 then
set O5=7
endif
exitwhen O5>11
if(GetUnitTypeId(Y7[O5])=='H00K')and(GetPlayerController(Player(O5))==MAP_CONTROL_COMPUTER)and((AV4[O5]!=AX4)or(GetRandomInt(1,10)<=7))then
call GroupClear(jU)
call GroupClear(iA)
set bj_forLoopAIndexEnd=O5
set bj_lastLoadedUnit=Y7[O5]
call GroupEnumUnitsOfPlayer(jU,Player(O5),M88)
loop
set Y47=FirstOfGroup(jU)
exitwhen Y47==null
call GroupRemoveUnit(jU,Y47)
if(AO7(400.,Y47,Condition(function HAG))>0)then
call IssueImmediateOrderById(Y47,852556)
elseif((GetUnitUserData(GetEnumUnit())<2)and(AO7(400.,Y47,Condition(function HF8))>3)and(AO7(1200.,Y47,Condition(function HAG))==0))then
call IssueImmediateOrderById(Y47,852556)
call GroupClear(H9)
call GroupEnumUnitsInRange(H9,GetUnitX(Y47),GetUnitY(Y47),400.,M88)
call ForGroup(H9,function HCG)
endif
endloop
call ForGroup(iA,function H3G)
endif
set O5=O5+1
endloop
set jU=null
set M88=null
set Y47=null
endfunction
function HLG takes nothing returns boolean
return(((GetLearnedSkill()=='A0AK')or((GetLearnedSkill()=='A1FY')))and(not IsUnitIllusion(GetTriggerUnit()))and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER))
endfunction
function Uzv takes nothing returns boolean
local integer i1=GetUnitTypeId(GetTriggerUnit())
return(((i1=='o018')or(i1=='o002')or(i1=='o00B')or(i1=='o01B'))and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER))
endfunction
function UZv takes nothing returns nothing
if(hq[240+GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]>Bz)then
call SetUnitUserData(GetTriggerUnit(),1)
endif
endfunction
function H1G takes nothing returns nothing
local trigger t=CreateTrigger()
call DisableTrigger(GetTriggeringTrigger())
call TriggerRegisterTimerEventPeriodic(t,1.5)
call TriggerAddAction(t,function H6G)
set Hc=Location(.0,.0)
call SGroup(GetHandleId(t),"MGrp",CreateGroup())
call D08(GetHandleId(t),"MFilt",Condition(function HBG))
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function qg takes nothing returns nothing
local trigger t=CreateTrigger()
call ky(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function HLG))
call TriggerAddAction(t,function H1G)
endfunction
function H0G takes nothing returns boolean
return((GetUnitTypeId(GetFilterUnit())=='e020')and(GetWidgetLife(GetFilterUnit())>.405))
endfunction
function H5G takes nothing returns nothing
if((GetPlayerController(GetOwningPlayer(GetEnumUnit()))!=MAP_CONTROL_USER)and((AV4[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]!=AX4)or(GetRandomInt(1,10)<=7)))then
call MoveLocation(Hc,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()))
if((AN7(400.,Hc,Condition(function HZG))>0)and(AN7(1100.,Hc,Condition(function IL8))>0))then
call IssueImmediateOrderById(GetEnumUnit(),852556)
endif
endif
endfunction
function H2G takes nothing returns nothing
local integer O5=1
local group jU=LGroup(GetHandleId(GetTriggeringTrigger()),"MGrp")
local boolexpr M88=ES8(GetHandleId(GetTriggeringTrigger()),"MFilt")
loop
if((GetPlayerController(G8[O5])==MAP_CONTROL_COMPUTER)and(GetUnitTypeId(Y7[GetPlayerId(G8[O5])])=='E01Y'))then
call GroupClear(jU)
call GroupEnumUnitsOfPlayer(jU,G8[O5],M88)
call ForGroup(jU,function H5G)
endif
if((GetPlayerController(N8[O5])==MAP_CONTROL_COMPUTER)and(GetUnitTypeId(Y7[GetPlayerId(N8[O5])])=='E01Y'))then
call GroupClear(jU)
call GroupEnumUnitsOfPlayer(jU,N8[O5],M88)
call ForGroup(jU,function H5G)
endif
set O5=O5+1
endloop
set jU=null
set M88=null
endfunction
function H_G takes nothing returns boolean
return((GetLearnedSkill()=='A0RP')and(not IsUnitIllusion(GetTriggerUnit()))and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER))
endfunction
function I4G takes nothing returns nothing
local trigger t=CreateTrigger()
call DisableTrigger(GetTriggeringTrigger())
call TriggerRegisterTimerEventPeriodic(t,1.5)
call TriggerAddAction(t,function H2G)
set Hc=Location(.0,.0)
call SGroup(GetHandleId(t),"MGrp",CreateGroup())
call D08(GetHandleId(t),"MFilt",Condition(function H0G))
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function FJ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call ky(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function H_G))
call TriggerAddAction(t,function I4G)
endfunction
function I7G takes unit X77 returns location
call MoveLocation(HA,(LoadReal(R8,(GetHandleId(X77)),(7400))),(LoadReal(R8,(GetHandleId(X77)),(7500))))
return HA
endfunction
function I8G takes nothing returns boolean
if((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and(Z_7(GetFilterUnit()))and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))))then
call I7G(GetFilterUnit())
return((Z87(GetLocationX(HA),GetLocationY(HA),GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit())))>3000.)
endif
return false
endfunction
function I9G takes nothing returns nothing
local unit IDG=GetTriggerUnit()
local player pl=GetOwningPlayer(IDG)
local integer O5=GetPlayerId(GetOwningPlayer(IDG))
local integer UP=0
call SetPlayerAbilityAvailable(pl,'A0X7',false)
call SetPlayerAbilityAvailable(pl,'A1H5',false)
set h4[80+GetPlayerId(pl)]=null
if(h4[288+O5]==null)then
set h4[288+O5]=JS8(1500.,IDG)
endif
if(A87(IDG))then
call D48(IDG,851986,h9[O5])
elseif(h4[288+O5]!=null)then
call IssueTargetOrderById(IDG,851983,h4[288+O5])
set hq[512+O5]=Bz+5.+I2R(15*GetUnitAbilityLevel(IDG,'A09U'))
else
call D48(IDG,851983,h8[O5])
set hq[512+O5]=Bz+5.+I2R(15*GetUnitAbilityLevel(IDG,'A09U'))
endif
loop
call Y07(.5)
exitwhen(GetUnitAbilityLevel(IDG,'B00K')==0)
if(not G0[128+O5])then
set h4[288+O5]=null
elseif((h4[288+O5]==null)or(not Z_7(h4[288+O5]))or(GD8(h4[288+O5]))or((kD(h4[288+O5]))and(not IsUnitVisibleEx(h4[288+O5],pl))))then
set h4[288+O5]=JS8(1500.,IDG)
endif
if((A87(IDG))or(not G0[128+O5])or(G0[64+O5])or(G0[O5]))then
call D48(IDG,851986,h9[O5])
elseif(h4[288+O5]!=null)then
call IssueTargetOrderById(IDG,851983,h4[288+O5])
else
call J3(IDG,true)
endif
endloop
if((h4[288+O5]!=null)and(Z_7(h4[288+O5]))and(IsUnitInRange(IDG,h4[288+O5],1200.)))then
call VTF(O5,h4[288+O5],false,false)
endif
call SetPlayerAbilityAvailable(pl,'A0X7',true)
set hq[512+O5]=Bz+3.
set h4[288+O5]=null
set IDG=null
set pl=null
endfunction
function IEG takes nothing returns boolean
return((GQ8())and(GetUnitAbilityLevel(GetFilterUnit(),'Bcmg')==0))
endfunction
function IFG takes nothing returns boolean
return((k3())and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE))and(GetUnitAbilityLevel(GetFilterUnit(),'Bcmg')==0))
endfunction
function IGG takes nothing returns nothing
local unit IDG=GetTriggerUnit()
local unit IHG=null
local integer O5=GetPlayerId(GetOwningPlayer(IDG))
local real kl
if(A87(IDG))then
call D48(IDG,851986,h9[O5])
elseif(h4[288+O5]!=null)then
call D48(IDG,851971,h4[288+O5])
set hq[512+O5]=Bz+5.
else
call D48(IDG,851983,h8[O5])
set hq[512+O5]=Bz+5.
endif
loop
call Y07(.3)
exitwhen(GetUnitAbilityLevel(IDG,'BHfs')==0)
if(not G0[128+O5])then
set h4[288+O5]=null
elseif((h4[288+O5]==null)or(not Z_7(h4[288+O5]))or(GD8(h4[288+O5]))or((kD(h4[288+O5]))and(not IsUnitVisibleEx(h4[288+O5],GetOwningPlayer(IDG)))))then
set h4[288+O5]=AH7(1000.,L_7(IDG),Condition(function IEG))
endif
if((h4[288+O5]!=null)and(AO7(800.,h4[288+O5],Condition(function GC8))>0)and((not A87(h4[288+O5]))or(not IsUnitInRange(h4[288+O5],IDG,400.))))then
set h4[288+O5]=null
endif
if((A87(IDG))or(G0[O5])or(not G0[128+O5])or(G0[64+O5]))then
call D48(IDG,851986,h9[O5])
elseif(h4[288+O5]!=null)then
set IHG=null
if(GetUnitAbilityLevel(h4[288+O5],'Bcmg')==0)then
set kl=Atan2(GetUnitY(h4[288+O5])-GetUnitY(IDG),GetUnitX(h4[288+O5])-GetUnitX(IDG))
call IssuePointOrderById(IDG,851971,GetUnitX(h4[288+O5])+250.*Cos(kl),GetUnitY(h4[288+O5])+250.*Sin(kl))
elseif(GetUnitAbilityLevel(h4[288+O5],'Bcmg')>0)then
if((GetUnitLifePercent(h4[288+O5])<45.)or((GetHeroLevel(IDG)>10)and(h4[O5]==h4[288+O5])and(GetUnitLifePercent(h4[288+O5])<65.)))then
if(IsUnitInRange(IDG,h4[288+O5],200.))then
call UnitRemoveAbility(IDG,'BHfs')
call IssueTargetOrderById(IDG,851983,h4[288+O5])
else
set kl=Atan2(GetUnitY(h4[288+O5])-GetUnitY(IDG),GetUnitX(h4[288+O5])-GetUnitX(IDG))
call IssuePointOrderById(IDG,851971,GetUnitX(h4[288+O5])+250.*Cos(kl),GetUnitY(h4[288+O5])+250.*Sin(kl))
endif
else
set h4[288+O5]=null
endif
endif
else
if((IHG!=null)and(GetUnitAbilityLevel(IHG,'Bcmg')>0))then
set IHG=null
endif
if((IHG==null)and(GetHeroLevel(IDG)>10)and(AO7(800.,IDG,Condition(function GQ8))<=1))then
set IHG=AJ7(600.,L_7(IDG),Condition(function IFG))
endif
if(IHG!=null)then
call IssuePointOrderById(IDG,851986,GetUnitX(IHG),GetUnitY(IHG))
else
call D48(IDG,851986,h9[O5])
endif
endif
endloop
set hq[512+O5]=Bz+3.
set h4[288+O5]=null
set IDG=null
set IHG=null
endfunction
function IIG takes nothing returns nothing
local unit IDG=GetTriggerUnit()
local integer O5=GetPlayerId(GetOwningPlayer(IDG))
local real M78
local boolean J4
if(GetUnitTypeId(IDG)=='Nfir')then
set M78=150.
elseif(GetUnitTypeId(IDG)=='EC57')then
set M78=350.
endif
set h4[288+O5]=JS8(1500.,IDG)
if(h4[288+O5]!=null)then
call IssuePointOrderById(IDG,851971,GetUnitX(h4[288+O5])+5.,GetUnitY(h4[288+O5])+5.)
else
call D48(IDG,851983,h8[O5])
endif
set hq[512+O5]=Bz+30.
loop
call Y07(.4)
exitwhen((GetUnitAbilityLevel(IDG,'B07T')==0)or(A87(IDG)))
if((h4[288+O5]!=null)and(IsUnitInRange(h4[288+O5],IDG,M78)))then
if(GetUnitTypeId(IDG)=='Nfir')then
if(GetUnitCurrentOrder(IDG)!=852273)then
call DE8(IDG,852273,'A29J')
endif
else
call SetPlayerAbilityAvailable(GetOwningPlayer(IDG),'A0A6',true)
set GZ[O5]=true
call J8(O5,DE8(IDG,852594,'A013'))
endif
elseif(ZL7(IDG))then
set J4=(G0[O5])or(G0[64+O5])or(not G0[128+O5])
if((h4[288+O5]!=null)and((J4)or(not Z_7(h4[288+O5]))or(GD8(h4[288+O5]))or((kD(h4[288+O5]))and(not IsUnitVisibleEx(h4[288+O5],GetOwningPlayer(IDG))))))then
set h4[288+O5]=null
call D48(IDG,851986,h9[O5])
endif
if((h4[288+O5]==null)and(not J4))then
set h4[288+O5]=JS8(1200.,IDG)
endif
if((h4[288+O5]!=null)and(not J4)and(not A87(IDG)))then
call IssuePointOrderById(IDG,851971,GetUnitX(h4[288+O5])+5.,GetUnitY(h4[288+O5])+5.)
elseif((A87(IDG))or(J4))then
call D48(IDG,851986,h9[O5])
endif
endif
endloop
set hq[512+O5]=Bz+3.
set h4[288+O5]=null
set GZ[272+O5]=false
set IDG=null
endfunction
function IJG takes nothing returns nothing
local unit IDG=GetTriggerUnit()
local integer O5=GetPlayerId(GetOwningPlayer(IDG))
local integer IKG
local integer UP
if(A87(IDG))then
call D48(IDG,851986,h9[O5])
set IDG=null
return
endif
if(GetUnitTypeId(IDG)=='Naka')then
set IKG='B068'
call SetPlayerAbilityAvailable(GetOwningPlayer(IDG),'A004',false)
elseif(GetUnitTypeId(IDG)=='E004')then
set IKG='B076'
else
set IKG='B07T'
endif
set h4[288+O5]=JS8(1500.,IDG)
if(h4[288+O5]!=null)then
call IssueTargetOrderById(IDG,851983,h4[288+O5])
else
call J3(IDG,true)
endif
set hq[512+O5]=Bz+30.
loop
call Y07(.5)
exitwhen((GetUnitAbilityLevel(IDG,IKG)==0)or(A87(IDG)))
if((h4[288+O5]!=null)and((G0[O5])or(G0[64+O5])or(not G0[128+O5])or(not Z_7(h4[288+O5]))or(GD8(h4[288+O5]))or((kD(h4[288+O5]))and(not IsUnitVisibleEx(h4[288+O5],GetOwningPlayer(IDG))))))then
set h4[288+O5]=null
call D48(IDG,851986,h9[O5])
endif
if((h4[288+O5]!=null)and(not A87(IDG)))then
if((IKG!='B068')and(IsUnitInRange(IDG,h4[288+O5],300.)))then
call UnitRemoveAbility(IDG,IKG)
set GZ[O5]=true
if((GetUnitTypeId(IDG)!='E004')or(not DE8(IDG,852100,'A030')))then
call IssueTargetOrderById(IDG,851983,h4[288+O5])
endif
set GZ[O5]=false
elseif(IKG=='B068')then
call IssueTargetOrderById(IDG,851983,h4[288+O5])
else
call IssuePointOrderById(IDG,851971,GetUnitX(h4[288+O5])+5.,GetUnitY(h4[288+O5])+5.)
endif
elseif((h4[288+O5]==null)and(not A87(IDG))and(not G0[O5])and(not G0[64+O5])and(G0[128+O5]))then
set h4[288+O5]=JS8(1500.,IDG)
if(h4[288+O5]!=null)then
call IssuePointOrderById(IDG,851971,GetUnitX(h4[288+O5])+5.,GetUnitY(h4[288+O5])+5.)
endif
else
call D48(IDG,851986,h9[O5])
endif
endloop
if(GetTriggerEventId()==EVENT_PLAYER_UNIT_USE_ITEM)then
set GZ[272+O5]=false
endif
set hq[512+O5]=Bz+3.
set h4[288+O5]=null
set IDG=null
endfunction
function IMG takes nothing returns boolean
return((GetSpellAbilityId()=='A01O')and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER))
endfunction
function ING takes nothing returns nothing
local unit j5=GetTriggerUnit()
call SetPlayerController(GetOwningPlayer(j5),MAP_CONTROL_NONE)
call Y07(.5)
call SetPlayerController(GetOwningPlayer(j5),MAP_CONTROL_COMPUTER)
call Y07(.0)
call J3(j5,false)
call Y07(1.)
if(Z47(j5,DH8(j5))<1500.)then
set h9[GetPlayerId(GetOwningPlayer(j5))]=DH8(j5)
call F28(j5,true)
else
call MH8(j5)
endif
set j5=null
endfunction
function po takes nothing returns nothing
local trigger t=CreateTrigger()
call ky(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function IMG))
call TriggerAddAction(t,function ING)
endfunction
function IOG takes nothing returns boolean
return((GetSpellAbilityId()=='A0FL')and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER))
endfunction
function IPG takes nothing returns nothing
local unit m5=GetSpellTargetUnit()
local unit j5=GetTriggerUnit()
local player pl=GetOwningPlayer(j5)
local real IQG=.0
call SetPlayerController(pl,MAP_CONTROL_NONE)
call EOG(j5,m5)
set IQG=Bz
loop
call Y07(.5)
exitwhen((GetUnitAbilityLevel(m5,'B03I')==0)or(IsUnitDeadBJ(m5))or(IsUnitDeadBJ(j5)))
endloop
call SetPlayerController(pl,MAP_CONTROL_COMPUTER)
set hq[GetPlayerId(pl)]=Bz+30.
if((IsUnitAliveBJ(m5))and(not A87(j5)))then
call IssueTargetOrderById(j5,851983,m5)
else
call J3(j5,false)
endif
set m5=null
set j5=null
set pl=null
endfunction
function LP8 takes nothing returns nothing
local trigger t=CreateTrigger()
call ky(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function IOG))
call TriggerAddAction(t,function IPG)
endfunction
function IRG takes nothing returns boolean
return((GetSpellAbilityId()=='A02Q' or GetSpellAbilityId()=='A1D9')and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER))
endfunction
function ISG takes nothing returns nothing
local unit m5=GetSpellTargetUnit()
local unit j5=GetTriggerUnit()
local player pl=GetOwningPlayer(j5)
local real IQG=.0
call SetPlayerController(pl,MAP_CONTROL_NONE)
call EOG(j5,m5)
set IQG=Bz
loop
call Y07(.5)
exitwhen((GetUnitAbilityLevel(m5,'B04B')==0)or(IsUnitDeadBJ(m5))or(IsUnitDeadBJ(j5)))
endloop
call SetPlayerController(pl,MAP_CONTROL_COMPUTER)
set hq[GetPlayerId(pl)]=Bz+120.
if((not IsUnitDeadBJ(m5))and(not A87(j5))and(not C_7(j5,852119,'A0GK',m5)))then
call IssueTargetOrderById(j5,851983,m5)
else
call J3(j5,false)
endif
set m5=null
set j5=null
set pl=null
endfunction
function C98 takes nothing returns nothing
local trigger t=CreateTrigger()
call ky(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function IRG))
call TriggerAddAction(t,function ISG)
endfunction
function ITG takes nothing returns boolean
return((GetSpellAbilityId()=='A1BX')and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER))
endfunction
function IUG takes nothing returns nothing
local unit j5=GetTriggerUnit()
local unit m5=null
local player pl=GetOwningPlayer(j5)
local real IQG=.0
call SetPlayerController(pl,MAP_CONTROL_NONE)
set IQG=Bz
set m5=K2(400.,HC[GetPlayerId(pl)])
if(m5!=null)then
call EOG(j5,m5)
endif
loop
call Y07(.5)
exitwhen((GetUnitCurrentOrder(j5)!=852188)or(IsUnitDeadBJ(j5)))
endloop
call SetPlayerController(pl,MAP_CONTROL_COMPUTER)
set hq[GetPlayerId(pl)]=Bz+210.-(GetUnitAbilityLevel(j5,'A1BX')*10.)
call J3(j5,false)
set j5=null
set m5=null
set pl=null
endfunction
function AD8 takes nothing returns nothing
local trigger t=CreateTrigger()
call ky(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function ITG))
call TriggerAddAction(t,function IUG)
endfunction
function IVG takes nothing returns boolean
return((GetSpellAbilityId()=='A04P')and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER))
endfunction
function IWG takes nothing returns nothing
local unit j5=GetTriggerUnit()
call SetPlayerController(GetOwningPlayer(j5),MAP_CONTROL_NONE)
call Y07(.5)
call SetPlayerController(GetOwningPlayer(j5),MAP_CONTROL_COMPUTER)
call Y07(.0)
if(GetSpellTargetUnit()!=null)then
call EOG(j5,GetSpellTargetUnit())
endif
set j5=null
endfunction
function PV takes nothing returns nothing
local trigger t=CreateTrigger()
call ky(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function IVG))
call TriggerAddAction(t,function IWG)
endfunction
function IXG takes nothing returns boolean
return((GetSpellAbilityId()=='A0MQ' or GetSpellAbilityId()=='A1B6')and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER))
endfunction
function IYG takes unit it,integer O5 returns nothing
if(Z47(h9[O5],it)<400.)then
set h8[O5]=h9[O5]
set h9[O5]=DH8(it)
elseif(Z47(h8[O5],it)<400.)then
set h9[O5]=h8[O5]
if(IsUnitAlly(it,G8[0]))then
set h8[O5]=h7[18]
else
set h8[O5]=h7['v']
endif
endif
endfunction
function IZG takes unit it,integer O5,boolean J4 returns nothing
local unit m5=null
if(not J4)then
if((eY[O5]!=3)and(eY[O5]!=4))then
call D48(it,851983,h8[O5])
else
set m5=AH7(1200.,L_7(it),Condition(function k8))
set J4=((m5!=null)and(IssuePointOrderById(it,851983,GetUnitX(m5),GetUnitY(m5))))or(D48(it,851983,h8[O5]))
endif
endif
set m5=null
endfunction
function IAG takes nothing returns nothing
local unit j5=GetTriggerUnit()
local integer O5=GetPlayerId(GetOwningPlayer(j5))
set GZ[O5]=false
set GZ[272+O5]=A87(j5)
call SetPlayerController(GetOwningPlayer(j5),MAP_CONTROL_NONE)
call Y07(.5)
call SetPlayerController(GetOwningPlayer(j5),MAP_CONTROL_COMPUTER)
call Y07(1.5)
set h8[512+O5]=h8[16+O5]
set h9[512+O5]=h9[16+O5]
set h8[528+O5]=h8[16+O5]
set h9[528+O5]=h9[16+O5]
loop
exitwhen(not IsUnitHidden(j5))
call Y07(1.)
endloop
if(Z_7(j5))then
call MH8(j5)
endif
set j5=null
endfunction
function HY9 takes nothing returns nothing
local trigger t=CreateTrigger()
call ky(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function IXG))
call TriggerAddAction(t,function IAG)
endfunction
function IBG takes nothing returns boolean
local integer X5=GetIssuedOrderId()
local integer i=GetUnitTypeId(GetTriggerUnit())
if(X5!=852557)and(X5!=851985)and(X5!=852558)and(not IsUnitInRange(GetTriggerUnit(),Y7[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))],50.))then
if i=='u00G' or i=='u00I' then
call DisableTrigger(GetTriggeringTrigger())
call IssueImmediateOrderById(GetTriggerUnit(),852557)
call EnableTrigger(GetTriggeringTrigger())
endif
endif
return false
endfunction
function aiExorcismFilter takes nothing returns boolean
call XK7(I2S(GetUnitTypeId(GetFilterUnit()))+GetUnitName(bj_lastLoadedUnit)+GetPlayerName(GetOwningPlayer(GetFilterUnit())))
return(GetUnitTypeId(GetFilterUnit())=='u00G' and GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(bj_lastLoadedUnit))
endfunction
function ICG takes nothing returns nothing
local unit Y47=GetEnumUnit()
local player pl=GetOwningPlayer(Y47)
local trigger t=LTrig(GetHandleId(pl),"ExorTrig")
local integer i=GetUnitCurrentOrder(Y47)
if Z47(Y47,bj_lastLoadedUnit)>750. then
call DisableTrigger(t)
call IssuePointOrderById(Y47,851986,GetUnitX(bj_lastLoadedUnit),GetUnitY(bj_lastLoadedUnit))
call EnableTrigger(t)
elseif((i==0)or(i==851986 and Z47(Y47,bj_lastLoadedUnit)<450.))then
call IssueImmediateOrderById(Y47,852557)
endif
set Y47=null
set t=null
set pl=null
endfunction
function I3G takes nothing returns nothing
local unit Y47=GetEnumUnit()
local player pl=GetOwningPlayer(Y47)
local trigger t=LTrig(GetHandleId(pl),"NAttTrig")
local integer i=GetUnitCurrentOrder(Y47)
if Z47(Y47,bj_lastLoadedUnit)>350. then
call DisableTrigger(t)
call IssuePointOrderById(Y47,851986,GetUnitX(bj_lastLoadedUnit),GetUnitY(bj_lastLoadedUnit))
call EnableTrigger(t)
elseif((i==0)or(i==851986 and Z47(Y47,bj_lastLoadedUnit)<200.))then
call IssueImmediateOrderById(Y47,852557)
endif
set Y47=null
set t=null
set pl=null
endfunction
function I6G takes nothing returns nothing
local unit j5=GetTriggerUnit()
local player pl=GetOwningPlayer(j5)
local real LNF=Bz+29.5
local trigger t=LTrig(GetHandleId(pl),"ExorTrig")
local integer ILG=GetSpellAbilityId()
local group I1G=LGroup(GetHandleId(pl),"ExorG")
set hq[GetPlayerId(pl)]=Bz+120.
call RemoveGuardPosition(j5)
if(t==null)then
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,pl,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
call TriggerRegisterPlayerUnitEvent(t,pl,EVENT_PLAYER_UNIT_ISSUED_ORDER,null)
call TriggerRegisterPlayerUnitEvent(t,pl,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,null)
call TriggerAddCondition(t,Condition(function IBG))
call STrig(GetHandleId(pl),"ExorTrig",t)
set I1G=CreateGroup()
call SGroup(GetHandleId(pl),"ExorG",I1G)
else
call EnableTrigger(t)
call GroupClear(I1G)
endif
loop
call TriggerSleepAction(.5)
if((iU(j5))and(GetUnitCurrentOrder(j5)!=851983)and(AO7(750.,j5,Condition(function k0))==0)and(not A87(j5))and((GetUnitLifePercent(j5)>90.)or(not G0[GetPlayerId(GetOwningPlayer(j5))])))then
call D48(j5,851983,h8[GetPlayerId(GetOwningPlayer(j5))])
endif
exitwhen((Bz>LNF)or(not Z_7(j5)))
set bj_lastLoadedUnit=j5
call ForGroup(I1G,function ICG)
endloop
call DisableTrigger(t)
set t=null
set j5=null
endfunction
function I0G takes nothing returns nothing
local unit j5=GetTriggerUnit()
local player pl=GetOwningPlayer(j5)
local real LNF=Bz+9.5
local trigger t=LTrig(GetHandleId(pl),"NAttTrig")
local integer ILG=GetSpellAbilityId()
local group I1G=LGroup(GetHandleId(pl),"NAttG")
call RemoveGuardPosition(j5)
if(t==null)then
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,GetOwningPlayer(j5),EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
call TriggerRegisterPlayerUnitEvent(t,GetOwningPlayer(j5),EVENT_PLAYER_UNIT_ISSUED_ORDER,null)
call TriggerRegisterPlayerUnitEvent(t,GetOwningPlayer(j5),EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,null)
call TriggerAddCondition(t,Condition(function IBG))
call STrig(GetHandleId(GetOwningPlayer(GetTriggerUnit())),"NAttTrig",t)
set I1G=CreateGroup()
call SGroup(GetHandleId(pl),"NAttG",I1G)
else
call EnableTrigger(t)
call GroupClear(I1G)
endif
loop
call TriggerSleepAction(.3)
exitwhen((Bz>LNF)or(not Z_7(j5)))
set bj_lastLoadedUnit=j5
call ForGroup(I1G,function I3G)
endloop
call DisableTrigger(t)
set t=null
set j5=null
endfunction
function I5G takes nothing returns boolean
return((GetSpellAbilityId()=='A0RV')and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER))
endfunction
function I2G takes nothing returns nothing
local unit j5=GetTriggerUnit()
local unit m5=null
local real LNF=Bz+.5
local integer O5=GetPlayerId(GetOwningPlayer(j5))
call SetPlayerController(GetOwningPlayer(j5),MAP_CONTROL_NONE)
call TriggerSleepAction(.01)
loop
if((h4[O5]!=null)and(Z_7(h4[O5]))and(IsUnitInRange(j5,h4[O5],145+(40*GetUnitAbilityLevel(j5,'A0RO')))))then
set m5=h4[O5]
else
set m5=AJ7(I2R(145+(40*GetUnitAbilityLevel(j5,'A0RO'))),L_7(j5),Condition(function GQ8))
endif
if(m5!=null)then
call UnitRemoveAbility(j5,'B08K')
call IssueTargetOrderById(j5,851983,m5)
endif
exitwhen((not G0[128+O5])or(GetUnitAbilityLevel(j5,'B08K')==0)or(not Z_7(j5))or(Bz>=LNF))
call Y07(.5)
endloop
call SetPlayerController(GetOwningPlayer(j5),MAP_CONTROL_COMPUTER)
call J3(j5,false)
set j5=null
set m5=null
endfunction
function FK9 takes nothing returns nothing
local trigger t=CreateTrigger()
call ky(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I5G))
call TriggerAddAction(t,function I2G)
endfunction
function I_G takes nothing returns boolean
return((GetSpellAbilityId()=='A01Z')and(IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetSpellTargetUnit()))==MAP_CONTROL_COMPUTER))
endfunction
function J4G takes nothing returns nothing
local real IW
local real JD
local real Je
local integer O5=GetPlayerId(GetOwningPlayer(hr))
if((GetDestructableTypeId(GetEnumDestructable())=='WTst')or(GetDestructableTypeId(GetEnumDestructable())=='ITtc')or(GetDestructableTypeId(GetEnumDestructable())=='ITtw')or(GetDestructableTypeId(GetEnumDestructable())=='NTtw')or(GetDestructableTypeId(GetEnumDestructable())=='ATtr'))then
set JD=GetUnitX(h9[16+O5])
set Je=GetUnitY(h9[16+O5])
set IW=Z87(GetDestructableX(GetEnumDestructable()),GetDestructableY(GetEnumDestructable()),JD,Je)
if(((Z87(GetUnitX(hr),GetUnitY(hr),JD,Je)-150.)>IW)and((GetLocationX(HC[240+O5])==.0)or(((Z87(GetLocationX(HC[240+O5]),GetLocationY(HC[240+O5]),JD,Je)-150.)>IW))and(Z87(GetLocationX(HC[240+O5]),GetLocationY(HC[240+O5]),GetDestructableX(GetEnumDestructable()),GetDestructableY(GetEnumDestructable()))>250.)))then
call MoveLocation(HC[240+O5],GetDestructableX(GetEnumDestructable()),GetDestructableY(GetEnumDestructable()))
endif
endif
endfunction
function J7G takes nothing returns nothing
local unit J8G=GetSpellTargetUnit()
local integer O5=GetPlayerId(GetOwningPlayer(J8G))
local integer ki=GetHandleId(GetOwningPlayer(GetSpellTargetUnit()))
local location J9G=null
call Y07(.5)
set GZ[272+O5]=false
if(HC[240+O5]==null)then
set HC[240+O5]=Location(.0,.0)
endif
loop
call SetRect(He,GetUnitX(J8G)-600.,GetUnitY(J8G)-600.,GetUnitX(J8G)+600.,GetUnitY(J8G)+600.)
set hr=J8G
call EnumDestructablesInRect(He,R24,function J4G)
set J9G=HC[240+O5]
if(GetLocationX(J9G)!=.0)then
call IssuePointOrderByIdLoc(J8G,851986,J9G)
else
call D48(J8G,851986,h9[O5])
endif
call Y07(.8)
exitwhen((GetUnitAbilityLevel(J8G,'B021')==0)or(GZ[272+O5])or((AO7(1200.,J8G,Condition(function GQ8))==0)and(iy(J8G))))
if((GetLocationX(J9G)!=.0)and(IsUnitInRangeLoc(J8G,J9G,150.)))then
call MoveLocation(J9G,.0,.0)
endif
endloop
if(J9G!=null)then
call MoveLocation(J9G,.0,.0)
endif
set J9G=null
set J8G=null
endfunction
function Pr takes nothing returns nothing
local trigger t=CreateTrigger()
call ky(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I_G))
call TriggerAddAction(t,function J7G)
endfunction
function JDG takes real LDF,real LEF,boolean JEG returns boolean
local boolean J4=false
local unit JFG=null
local unit it=GetEnumUnit()
if Z87(GetUnitX(it),GetUnitY(it),LDF,LEF)>3000 then
if(JEG)then
call FX8(it)
set J4=((GetUnitTypeId(it)=='Emns')and(IssuePointOrderById(it,852525,LDF,LEF)))or((GetUnitTypeId(it)=='N00R')and(((IsUnitAlly(it,G8[0]))and(IssueTargetOrderById(it,852600,IN4)))or((IsUnitAlly(it,N8[0]))and(IssueTargetOrderById(it,852600,JS4)))))
else
call MoveLocation(HB,LDF,LEF)
set JFG=AH7(1200.,HB,Condition(function Kd))
if((JFG!=null)and(AO7(1000.,JFG,Condition(function Kd))>3)and(AO7(1200.,JFG,Condition(function k6))<2)and(Z47(JFG,DH8(it))>4000.)and(kJ(GetUnitX(JFG),GetUnitY(JFG))))then
call FX8(it)
set J4=((GetUnitTypeId(it)=='Emns')and(IssuePointOrderById(it,852525,GetUnitX(JFG),GetUnitY(JFG))))or((GetUnitTypeId(it)=='N00R')and(IssueTargetOrderById(it,852600,JFG)))or((AR7(it,BU[yuanxingxie]))and(UnitUseItemTarget(it,bj_lastCreatedItem,JFG)))
endif
endif
endif
set JFG=null
set it=null
return J4
endfunction
function JGG takes integer JHG returns boolean
local unit u=GetEnumUnit()
local boolean J4=false
if(JHG==0)then
if(IsUnitAlly(u,N8[0]))then
set J4=(JDG(Tm,Um,false))or(JDG(Jm,lm,false))or(JDG(cm,Cm,false))or(JDG(Zq,vQ,false))
else
set J4=(JDG(bQ,BQ,false))or(JDG(aQ,EQ,false))or(JDG(Zq,vQ,false))or(JDG(cm,Cm,false))
endif
elseif(JHG==1)then
if(IsUnitAlly(u,N8[0]))then
set J4=(JDG(-6240.,-3808.,false))or(JDG(-6112.,-1312.,false))or(JDG(-6112.,1504.,false))or(JDG(3169.,5920.,false))
else
set J4=(JDG(-4704.,5920.,false))or(JDG(32.,5856.,false))or(JDG(3169.,5920.,false))or(JDG(-6112.,1504.,false))
endif
elseif(JHG==2)then
if(IsUnitAlly(u,N8[0]))then
set J4=(JDG(-3424.,-6560.,false))or(JDG(-544.,-6688.,false))or(JDG(4960.,-6752.,false))or(JDG(6044.,2874.,false))
else
set J4=(JDG(6048.,-2080.,false))or(JDG(6112.,-96.,false))or(JDG(6044.,2874.,false))or(JDG(4960.,-6752.,false))
endif
elseif(JHG==3)then
set J4=JDG(GetUnitX(DH8(u)),GetUnitY(DH8(u)),true)
endif
set u=null
return J4
endfunction
function JIG takes unit it returns integer
if(GetUnitAbilityLevel(it,'A28S')==0)then
return 150+(150*GetUnitAbilityLevel(it,'A28R'))
else
return 160+(180*GetUnitAbilityLevel(it,'A28S'))
endif
endfunction
function JJG takes unit it returns integer
local integer kt=GetHeroLevel(it)
if(T4 or SC4)then
return(45*kt)
elseif(hG[GetPlayerId(GetOwningPlayer(it))]<5)then
return(30*kt)
elseif(hG[GetPlayerId(GetOwningPlayer(it))]<11)then
return(40*kt)
elseif(hG[GetPlayerId(GetOwningPlayer(it))]<15)then
return(55*kt)
else
return(70*kt)
endif
endfunction
function JKG takes unit it returns integer
local integer kc=GetUnitAbilityLevel(it,'A0MU')
if((kc==0)and(GetUnitAbilityLevel(it,'A0A2')>0))then
return GetUnitAbilityLevel(it,'A0A2')
endif
return kc
endfunction
function JMG takes unit it returns integer
if(GetUnitAbilityLevel(it,'A09W')==0)then
return 236+(150*GetUnitAbilityLevel(it,'A095'))
else
return 350+(150*GetUnitAbilityLevel(it,'A09W'))
endif
endfunction
function JNG takes unit it returns integer
if(GetUnitAbilityLevel(it,'A09Z')==0)then
return 236+(150*GetUnitAbilityLevel(it,'A01P'))
else
return 332+(150*GetUnitAbilityLevel(it,'A09Z'))
endif
endfunction
function JOG takes unit it returns real
if((it==I34)or(it==I24)or(it==J74)or(it==JD4)or(it==J94)or(it==IL4))then
return 50.
elseif((it==IZ4)or(it==I04)or(it==J44))then
return 100.
elseif((it==I_4)or(it==J84))then
return 10.
elseif((it==JA4)or(it==J34)or(it==JL4)or(it==J14))then
return 230.
elseif((it==JY4)or(it==JB4)or(it==J64))then
return 270.
elseif(it==JC4)then
return 150.
else
return 180.
endif
endfunction
function JPG takes unit it returns real
local real JQG=P18(LReal(GetHandleId(it),"TLLife1"),1.)-GetUnitState(it,UNIT_STATE_LIFE)
local real JRG=GetUnitState(it,UNIT_STATE_MAX_LIFE)
if(JRG==0)then
return .0
else
return(JQG/ JRG)*100.
endif
endfunction
function JSG takes unit it,real GHG,integer X5,integer o6 returns boolean
call MoveLocation(Ha,GetUnitX(it)+GHG*Cos(GetUnitFacing(it)*bj_DEGTORAD),GetUnitY(it)+GHG*Sin(GetUnitFacing(it)*bj_DEGTORAD))
return((AN7(260.,Ha,Condition(function k6))>0)and(DE8(it,X5,o6)))
endfunction
function JTG takes unit it,real GHG,boolexpr Ig returns boolean
call MoveLocation(Ha,GetUnitX(it)+GHG*Cos(GetUnitFacing(it)*bj_DEGTORAD),GetUnitY(it)+GHG*Sin(GetUnitFacing(it)*bj_DEGTORAD))
return AN7(260.,Ha,Ig)>0
endfunction
function JUG takes unit j5,unit m5 returns boolean
local integer I8=0
local item ja
local boolean jR=false
loop
set ja=UnitItemInSlot(j5,I8)
if((ja!=null)and(GJ8(GetItemTypeId(ja))))then
set jR=UnitUseItemTarget(j5,ja,m5)
set I8=bj_MAX_INVENTORY
endif
set I8=I8+1
exitwhen I8>=bj_MAX_INVENTORY
endloop
set ja=null
return jR
endfunction
function JVG takes unit it returns boolean
local integer I8=0
local item ja
loop
set ja=UnitItemInSlot(it,I8)
if((ja!=null)and(ks(GetItemTypeId(ja))))then
set ja=null
return true
endif
set I8=I8+1
exitwhen I8>=bj_MAX_INVENTORY
endloop
set ja=null
return false
endfunction
function JWG takes unit j5 returns boolean
local integer I8=0
local item ja
local boolean jR=false
loop
set ja=UnitItemInSlot(j5,I8)
if((ja!=null)and(ks(GetItemTypeId(ja))))then
set GZ[224+GetPlayerId(GetOwningPlayer(j5))]=true
set jR=UnitUseItem(j5,ja)
set GZ[224+GetPlayerId(GetOwningPlayer(j5))]=false
set I8=bj_MAX_INVENTORY
endif
set I8=I8+1
exitwhen I8>=bj_MAX_INVENTORY
endloop
set ja=null
return jR
endfunction
function JXG takes unit j5,unit m5 returns boolean
local integer I8=0
local item ja=null
local location JYG=null
local boolean jR=false
if(GD8(m5))then
return false
endif
loop
set ja=UnitItemInSlot(j5,I8)
if((ja!=null)and(GetItemTypeId(ja)==BU[keledebishou]))then
set JYG=kL(j5,m5,100.)
if(JYG!=null)then
set jR=UnitUseItemPointLoc(j5,ja,JYG)
if((jR)and(hq[512+GetPlayerId(GetOwningPlayer(j5))]<Bz))then
set hq[512+GetPlayerId(GetOwningPlayer(j5))]=Bz+1.
endif
endif
set I8=bj_MAX_INVENTORY
endif
set I8=I8+1
exitwhen I8>=bj_MAX_INVENTORY
endloop
set JYG=null
set ja=null
return jR
endfunction
function JZG takes nothing returns boolean
if((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetWidgetLife(GetFilterUnit())>.405)and((IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))or(eY[32+GetPlayerId(GetOwningPlayer(GetFilterUnit()))]>0))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0))then
return(GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)<=F37)
endif
return false
endfunction
function JAG takes unit it,unit m5 returns nothing
if((it!=null)and(it!=GetTriggerUnit())and(is(it))and(IsUnitInRange(it,GetTriggerUnit(),1200.))and(GetUnitLifePercent(it)>50.))then
if(not IssuePointOrderById(it,852553,GetUnitX(m5)+5.,GetUnitY(m5)+5.))then
call IssueTargetOrderById(it,851983,m5)
endif
endif
endfunction
function JBG takes unit it,unit m5 returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(it))
if(hq[240+O5]<Bz)then
set GZ[O5]=true
if(OM8(it,m5,30/ .035,0,(GetUnitAbilityLevel(it,'A0NB')+1)*250)!=null)and(J8(O5,L77(it,852089,'A0NB',H57)))then
set hq[240+O5]=Bz+1.5
return true
endif
endif
return false
endfunction
function JCG takes nothing returns nothing
call MH8(GetEnumUnit())
endfunction
function J3G takes unit it,unit m5 returns boolean
local integer i1=GetUnitTypeId(it)
local integer O5=GetPlayerId(GetOwningPlayer(it))
local boolean J4=false
call XK7("AI_Harass "+I2S(O5))
if(i1=='H00U')then
set J4=((Bz>V74[16+O5])and K_8(it,D07,D07,D07,'A0VZ')and(C_7(it,852505,'A0VZ',m5)))or(((GetUnitState(it,UNIT_STATE_MANA))>400)and(Bz>V74['p'+O5])and K_8(it,D07,D57,D27,'A0VM')and IssuePointOrderById(it,852215,GetUnitX(m5),GetUnitY(m5)))
elseif(i1=='E02I')then
set J4=(IssuePointOrderById(it,852662,GetUnitX(m5),GetUnitY(m5)))
elseif(i1=='E002')then
set J4=(IsUnitInRange(it,m5,650.))and(GetUnitManaPercent(it)>60.)and(Bz>V74[16+O5])and(DE8(it,852526,'A1E7'))
elseif(i1=='E02J')then
set J4=(IsUnitInRange(it,m5,795.))and(GetUnitAbilityLevel(it,'A1TV')<2)and(GetUnitManaPercent(it)>70.)and(IssueTargetOrderById(it,852095,m5))
if(not J4)then
set J4=(IsUnitInRange(it,m5,795.))and(GetUnitAbilityLevel(it,'A1U6')>0)and(GetUnitAbilityLevel(it,'A1TV')>=2)and(((Bz>V74[48+O5])and(GetUnitManaPercent(it)>55.)and(YB7(O5,it,'A1TV','A1SU'))and(IssueTargetOrderById(it,852095,m5)))or((GetUnitManaPercent(it)>20.)and(IssueTargetOrderById(it,852095,JS8(795.,it)))))
endif
elseif((i1=='H00V')or(i1=='H08D')or(i1=='H08C')or(i1=='H084')or(i1=='H08B'))then
set J4=C_7(it,852119,'A0G2',m5)
elseif(i1=='U000')then
set J4=(C_7(it,852555,'A0X7',m5))or(C_7(it,852248,'A1H5',m5))
elseif(i1=='UC01')then
set J4=C_7(it,852527,'A0Q7',m5)
elseif(i1=='EC57')then
set J4=C_7(it,852669,'A173',m5)
elseif(i1=='Ewar')then
set J4=C_7(it,852662,'A0YM',m5)
elseif(i1=='Ulic')then
set J4=C_7(it,852226,'A07F',m5)
elseif(i1=='UC11')then
set J4=C_7(it,852125,'A02S',m5)
elseif(i1=='Udea')then
set J4=IssueTargetOrderById(it,852662,m5)
elseif(i1=='U00E')then
set J4=(IsUnitInRange(it,m5,400.))and(DE8(it,852526,'A05V'))
elseif(i1=='Oshd')then
set J4=C_7(it,852119,'A0GK',m5)
elseif(i1=='Ofar')then
set J4=C_7(it,852662,'A046',m5)
elseif(i1=='H00H')then
set J4=(IsUnitInRange(it,m5,500.))and(IssueTargetOrderById(it,852089,m5))
elseif(i1=='UC76')then
set J4=C_7(it,852218,kT(it),m5)
elseif(i1=='Hlgr')then
set J4=(C_7(it,852580,'A03F',m5))or(C_7(it,852095,'A0AR',m5))
elseif(i1=='E01B')then
set J4=IssueTargetOrderById(it,852662,m5)
elseif(i1=='N00R')then
set J4=C_7(it,852238,'A01I',m5)
elseif((i1=='H00R')or(i1=='H07I'))then
set H04=it
set J4=(AO7(1000.,it,Condition(function ny))>3)and(IssueTargetOrderById(it,852699,m5))
elseif(i1=='H00N')then
set J4=C_7(it,852238,'A0QE',m5)
elseif(i1=='H008')then
set J4=(IsUnitInRange(it,m5,400.))and(DE8(it,852526,'A0GP'))
elseif(i1=='H000')then
set J4=((IsUnitInRange(it,m5,200.))and(DE8(it,852127,'A00S')))or(C_7(it,852231,'A2ON',m5))
elseif(i1=='Usyl')then
set J4=IssueTargetOrderById(it,852089,m5)
elseif(i1=='Orkn')then
set J4=C_7(it,852587,'A010',m5)
elseif(i1=='Hmbr')then
set J4=(C_7(it,852095,'A0JC',m5))or(C_7(it,852119,'A020',m5))
elseif(i1=='Ntin')then
set J4=(DE8(it,852526,'A05E'))or(C_7(it,852585,'A049',m5))
elseif(i1=='O00P')then
set J4=(C_7(it,852218,'A0FN',m5))or(IssueTargetOrderById(it,852662,m5))
elseif(i1=='Hjai')then
set J4=C_7(it,852089,'A1E9',m5)
elseif(i1=='H00A')then
set J4=C_7(it,852095,'A0LV',m5)
elseif(i1=='H004')then
set J4=(C_7(it,852125,'A01F',m5))or(L77(it,852232,'A027',OO8(it,m5,.95,600.)))
elseif(i1=='N01A')then
set J4=IssueTargetOrderById(it,852662,m5)
elseif(i1=='E00P')then
set J4=C_7(it,852218,'A0O7',m5)
elseif(i1=='N01V')then
set J4=(IsUnitInRange(it,m5,500.))and(IssueImmediateOrderById(it,852600))
elseif(i1=='N00B')then
set J4=((IsUnitInRange(it,m5,350.))and(IssueImmediateOrderById(it,852600)))or(IssuePointOrderById(it,852662,GetUnitX(m5),GetUnitY(m5)))
elseif(i1=='N016')then
set J4=C_7(it,852218,'A21M',m5)
elseif(i1=='N017' or i1=='N02B')then
set J4=(IsUnitInRange(it,m5,400.)and(DE8(it,852177,'A21N')))
elseif(i1=='E02X')then
set J4=C_7(it,852184,'A27G',m5)
else
set J4=VOF(it,m5,true)
endif
return J4
endfunction
function J6G takes nothing returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(GetEnumUnit()))
if((G0[32+O5])or(not G0[128+O5])or(G0[O5]))then
elseif(h4[O5]==null)then
call VTF(O5,hz,false,false)
if(ZL7(GetEnumUnit()))then
call J3G(GetEnumUnit(),hz)
endif
elseif(ZL7(GetEnumUnit()))then
call J3G(GetEnumUnit(),hz)
endif
endfunction
function JLG takes unit G8G,unit G9G returns nothing
set hZ=G8G
set hz=G9G
if(GetWidgetLife(G9G)>1.)then
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(G8G),GetUnitY(G8G),1200.,iP)
call ForGroup(iA,function J6G)
endif
endfunction
function J1G takes unit IB,unit m5,boolean J0G returns nothing
if((m5==null)or(not Z_7(m5))or(not IsUnitType(m5,UNIT_TYPE_HERO))or(IsUnitAlly(m5,GetOwningPlayer(IB))))then
return
endif
set h4[GetPlayerId(GetOwningPlayer(IB))]=m5
call EOG(IB,m5)
if((not IsUnitInForce(IB,RX4))or(not ZL7(IB)))then
elseif((J0G)and(G0[128+GetPlayerId(GetOwningPlayer(IB))])and((not A87(IB))or(A87(m5))))then
call IssueTargetOrderById(IB,851983,m5)
elseif((A87(IB))and(not AF7(m5,IB)))then
call D48(IB,851986,h9[GetPlayerId(GetOwningPlayer(IB))])
endif
endfunction
function J5G takes nothing returns nothing
local unit j5=GetTriggerUnit()
local unit m5=null
local integer O5=GetPlayerId(GetOwningPlayer(j5))
local real J2G=Bz
local real Y_7=Bz+4.5
local real J_G=Bz+7.5
local real BVF=775
local boolean L37=false
local boolean K4G=KR8(Player(O5))
local real K7G=(80.+70.*GetUnitAbilityLevel(j5,'A1NI'))/ 5.
set hq[O5]=Bz+120.
if K4G then
call EW8(j5,"AlcheBrew")
if h4[O5]!=null then
set BVF=Z47(j5,h4[O5])
endif
endif
loop
call TriggerSleepAction(.1)
if K4G then
if h4[O5]!=null then
call XK7("Concotion: target is "+GetUnitName(h4[O5])+", timer is "+R2S(Bz-J2G))
if(not IsUnitInRange(j5,h4[O5],600.))then
exitwhen true
elseif(GetWidgetLife(h4[O5])<K7G*(Bz-J2G)*.7)then
exitwhen true
endif
else
set bj_lastLoadedUnit=j5
if AO7(600.,j5,Condition(function GT8))==0 then
call XK7("Concotion: no nearby targets, timer is "+R2S(Bz-J2G))
exitwhen true
endif
endif
endif
exitwhen((not Z_7(j5))or(Bz>Y_7))
endloop
call G7G(j5,j5)
if not KR8(Player(O5))then
set j5=null
return
endif
if(Z_7(j5))then
set m5=h4[O5]
if(m5==null)or(not Z_7(m5))or(not IsUnitInRange(m5,j5,750.))or(IsUnitType(m5,UNIT_TYPE_MAGIC_IMMUNE))then
set m5=JT8(775.,j5)
endif
loop
exitwhen(Bz>J_G)
if(m5==null)or(not Z_7(m5))or(not IsUnitInRange(m5,j5,750.))or(IsUnitType(m5,UNIT_TYPE_MAGIC_IMMUNE))then
set m5=JT8(775.,j5)
endif
if m5!=null and((GetWidgetLife(m5)<K7G*((Bz-J2G)/ 5)*.7)or(Bz>Y_7))and IssueTargetOrderById(j5,852600,m5)then
call VTF(O5,m5,false,false)
exitwhen true
endif
if m5==null and L37==false and Bz+2.>=J_G then
call VQF(j5,true)
set L37=true
endif
call TriggerSleepAction(.25)
endloop
endif
call EY8(j5,"AlcheBrew")
set j5=null
set m5=null
endfunction
function K8G takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer V37=GetHandleId(t)
local unit it=LoadUnitHandle(R8,V37,'SRAY')
local integer O5=LoadInteger(R8,V37,'SRAY')
local real HS8
local boolean A67=false
if GetTriggerEvalCount(t)>=15 then
call EA8(t)
call FlushChildHashtable(R8,V37)
else
if h4[O5]==null then
if h4[O5]==null then
endif
endif
set HS8=Z47(h4[O5],it)
if h4[O5]==null or(not IsUnitInRange(it,h4[O5],1400))or(((not Y57(it,h4[O5],AsinBJ(.7*GetUnitMoveSpeed(h4[O5])/ HS8)))and GetTriggerEvalCount(t)>12)or GetUnitLifePercent(it)<20.)then
set A67=IssueImmediateOrderById(it,852217)
if A67 then
call EA8(t)
call FlushChildHashtable(R8,V37)
set it=null
set t=null
return false
endif
else
if not(Y57(it,h4[O5],Asin('d'/ HS8)*bj_RADTODEG))then
set A67=IssueTargetOrderById(it,851971,h4[O5])
endif
if HS8>950. then
call IssueImmediateOrderById(it,852177)
elseif HS8<=300. then
call IssueImmediateOrderById(it,852178)
endif
endif
endif
set it=null
set t=null
return false
endfunction
function K9G takes integer O5,unit j5 returns nothing
local trigger t=CreateTrigger()
local integer V37=GetHandleId(t)
call WT7("SunRay")
call TriggerAddCondition(t,Condition(function K8G))
call TriggerRegisterTimerEvent(t,.4,true)
call SaveInteger(R8,V37,'SRAY',O5)
call SaveUnitHandle(R8,V37,'SRAY',j5)
set t=null
endfunction
function KDG takes nothing returns boolean
local unit j5=GetTriggerUnit()
local unit m5=GetOrderTargetUnit()
local integer i1=GetUnitTypeId(GetTriggerUnit())
local location b5=null
local boolean J4=false
if((i1=='EC45')and(GetUnitLifePercent(m5)<55.)and(not IsUnitInRange(j5,m5,250.))and(IsUnitInRange(j5,m5,700.))and(not GD8(m5))and(AO7(800.,m5,Condition(function GQ8))<2)and(AO7(800.,m5,Condition(function GC8))==0)and(not IC(GetPlayerId(GetOwningPlayer(j5)))))then
set b5=kL(j5,m5,150.)
set J4=(b5!=null)and(IssuePointOrderByIdLoc(j5,852218,b5))
elseif((i1=='Edem')and(GetUnitLifePercent(m5)<75.)and(not IsUnitInRange(j5,m5,250.))and(IsUnitInRange(j5,m5,800.))and(not GD8(m5))and(AO7(800.,m5,Condition(function GQ8))<2)and(AO7(800.,m5,Condition(function GC8))==0)and(not IC(GetPlayerId(GetOwningPlayer(j5)))))then
set b5=kL(j5,m5,200.)
set J4=(b5!=null)and(IssuePointOrderByIdLoc(j5,852525,b5))
elseif(((i1=='U00A')or(i1=='Ewar')or(i1=='HC92'))and(GetUnitLifePercent(m5)<75.)and(not IsUnitInRange(j5,m5,250.))and(IsUnitInRange(j5,m5,700.))and(not GD8(m5))and(AO7(800.,m5,Condition(function GQ8))<2)and(AO7(800.,m5,Condition(function GC8))==0)and(kJ(GetUnitX(m5),GetUnitY(m5)))and(not IC(GetPlayerId(GetOwningPlayer(j5)))))then
set J4=IssueTargetOrderById(j5,852600,m5)
elseif((i1=='O00J')and(not IsUnitInRange(m5,j5,700.))and(((AO7(900.,m5,Condition(function GQ8))<=2)and(AR7(j5,BU[zhipeitoukui]))or(AR7(j5,BU[sadanzhixieli])))or((AO7(900.,m5,Condition(function GQ8))<2)))and(GetUnitLifePercent(m5)<70.))then
set J4=C_7(j5,852600,'A1P8',m5)
elseif((i1=='U00F')and(GetUnitLifePercent(m5)<80.)and(not IsUnitInRange(j5,m5,300.)))then
set J4=(Bz>hq[16+GetPlayerId(GetOwningPlayer(j5))])and(VMF(j5,m5))
elseif((i1=='UC11')and(GetUnitAbilityLevel(j5,'B00U')==0)and((hq[416+GetPlayerId(GetOwningPlayer(j5))]>Bz)or(h4[GetPlayerId(GetOwningPlayer(j5))]==m5))and(not IsUnitInRange(j5,m5,200.)))then
set J4=C_7(j5,852066,'A037',j5)
endif
if((not J4)and(GG8(j5))and(AR7(j5,BU[keledebishou]))and(not IC(GetPlayerId(GetOwningPlayer(j5))))and(GetUnitLifePercent(m5)<50.)and(not IsUnitInRange(j5,m5,250.))and(IsUnitInRange(j5,m5,700.))and(AO7(800.,m5,Condition(function GQ8))<2)and(AO7(800.,m5,Condition(function GC8))==0))then
set J4=JXG(j5,m5)
endif
set j5=null
set m5=null
set b5=null
return J4
endfunction
function KEG takes integer O5,unit j5,boolean KFG returns nothing
call DisableTrigger(R04[O5])
call DisableTrigger(R04[16+O5])
if(KFG)then
call PauseUnit(j5,true)
call IssueImmediateOrderById(j5,851972)
call PauseUnit(j5,false)
endif
set G0[272+O5]=true
call J3(j5,true)
set G0[272+O5]=false
call EnableTrigger(R04[O5])
call EnableTrigger(R04[16+O5])
endfunction
function KGG takes nothing returns boolean
local integer O5=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
if O5==0 or O5==6 or O5>11 then
return false
endif
set eY[464+O5]=GetIssuedOrderId()
set h4[336+O5]=null
set eY[480+O5]=0
set eY[496+O5]=0
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER then
set h4[336+O5]=GetOrderTargetUnit()
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER then
set eY[480+O5]=R2I(GetOrderPointX())
set eY[496+O5]=R2I(GetOrderPointY())
endif
return false
endfunction
function KHG takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER)and(not IsUnitIllusion(GetTriggerUnit()))and((GetIssuedOrderId()>852000)or(GetIssuedOrderId()==851983)))
endfunction
function KIG takes nothing returns nothing
local unit j5=GetTriggerUnit()
local unit m5=null
local integer X5=GetIssuedOrderId()
local integer i1=GetUnitTypeId(j5)
local integer O5=GetPlayerId(GetOwningPlayer(j5))
local boolean KJG=false
local integer KKG
local boolean J4
if(GetTriggerEventId()==EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)then
set m5=GetOrderTargetUnit()
if(m5!=null)then
if(not Z_7(m5))then
call KEG(O5,j5,false)
set KJG=true
elseif((X5==852125)or(X5==852555)or(X5==852089)or(X5==852218)or(X5==852652))then
if((GetUnitAbilityLevel(m5,'Bcyc')>0)or(GetUnitAbilityLevel(m5,'Bcy2')>0))then
call KEG(O5,j5,false)
set KJG=true
endif
elseif((X5==852600)and(IsUnitEnemy(m5,GetOwningPlayer(j5)))and(GD8(m5)))then
call KEG(O5,j5,false)
set KJG=true
elseif((X5==851983)and(GetUnitAbilityLevel(m5,'B02F')>0))then
call KEG(O5,j5,false)
set KJG=true
endif
if((not KJG)and(X5>=852000))then
if((GetUnitAbilityLevel(j5,'B03V')>0)and(GetUnitManaPercent(j5)>40.)and((h4[O5]==null)or(IsUnitAlly(m5,GetOwningPlayer(j5)))or(not IsUnitType(m5,UNIT_TYPE_HERO))))then
call KEG(O5,j5,false)
set KJG=true
elseif((GetUnitAbilityLevel(j5,'B01O')>0)and(A87(j5)))then
call KEG(O5,j5,false)
set KJG=true
endif
endif
if((not KJG)and(X5==851983)and(IsUnitType(m5,UNIT_TYPE_HERO))and(IsUnitEnemy(m5,GetOwningPlayer(j5))))then
call MoveLocation(HC[48+O5],GetUnitX(m5),GetUnitY(m5))
call DisableTrigger(R04[O5])
set KJG=(GetHeroLevel(j5)>5)and(G0[128+O5])and(GetUnitAbilityLevel(j5,'BHwe')==0)and(KDG())
call EnableTrigger(R04[O5])
endif
else
set KJG=true
endif
if((X5==851983)and(not KJG))then
set GZ[48+O5]=IsUnitType(m5,UNIT_TYPE_HERO)
set h4[80+O5]=m5
set KJG=true
endif
if(KJG)then
set m5=null
set j5=null
return
endif
call MoveLocation(HC[48+O5],GetUnitX(m5),GetUnitY(m5))
else
if((X5>=852008)and(X5<=852013))then
set KKG=GetItemTypeId(UnitItemInSlot(j5,X5-852008))
if((KKG==BU[QB])or(KKG==BU[JB])or(KKG==BU[yuanxingxie]))then
set KJG=true
endif
elseif(X5==851983)then
set KJG=true
set GZ[48+O5]=false
elseif(X5>=852000)then
if((GetUnitAbilityLevel(j5,'B03V')>0)and(GetUnitManaPercent(j5)>40.)and(h4[O5]==null))then
call KEG(O5,j5,false)
set KJG=true
elseif((GetUnitAbilityLevel(j5,'B01O')>0)and(A87(j5)))then
call KEG(O5,j5,false)
set KJG=true
endif
endif
if(KJG)then
set m5=null
set j5=null
return
endif
call MoveLocation(HC[48+O5],GetOrderPointX(),GetOrderPointY())
endif
if((X5>=852008)and(X5<=852013))then
set X5=GH8(j5)
set J4=true
if((X5==BU[keledebishou])or(X5==BU[yuanxingxie])or(X5==BU[maidasizhishou])or(X5==BU[QB])or(X5==BU[JB])or(X5==BU[GB])or((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))))then
if((X5==BU[euldeshenshengfazhang])and((not A87(j5))or((UnitCountBuffsExBJ(bj_BUFF_POLARITY_NEGATIVE,bj_BUFF_RESIST_EITHER,m5,false,false)>0)))and(not i2(m5))and(GetUnitAbilityLevel(m5,'B009')==0)and(GetUnitAbilityLevel(m5,'B00B')==0)and(GetUnitAbilityLevel(m5,'B01E')==0)and(GetUnitAbilityLevel(m5,'B01P')==0))then
set J4=false
elseif(GJ8(X5))then
if((((i1!='U00E')and(GetUnitLifePercent(m5)>50.))or(GetUnitLifePercent(m5)>75.))and(GetUnitAbilityLevel(m5,'B01N')==0)and(GetUnitAbilityLevel(m5,'B05H')==0))then
set J4=false
elseif((i1=='U000')and(GetUnitAbilityLevel(j5,'B00K')>0))then
set J4=false
endif
elseif((X5==BU[ZA])and((GetUnitAbilityLevel(m5,'B02Z')>0)or(m5!=j5)or(Z47(j5,DH8(j5))<4500.)or(AO7(1200.,m5,Condition(function k0))>0)))then
set J4=false
elseif((X5==BU[keledebishou])and(GetUnitAbilityLevel(j5,'B067')>0))then
set J4=false
endif
elseif((X5==BU[sanshizhiren]or X5==BU[sanshizhiren2])or(X5==BU[zhipeitoukui]))then
if((GetOwningPlayer(m5)==G8[0])or(GetOwningPlayer(m5)==N8[0]))then
set J4=false
elseif(GetOwningPlayer(m5)==Player(12))then
set X5=GetUnitTypeId(m5)
if((X5!='nomg')and(X5!='nfpc')and(X5!='nsth')and(X5!='ncnk'))then
set J4=false
endif
else
set X5=GetUnitTypeId(m5)
if((X5=='u003')or(X5=='u005')or(X5=='u009'))then
set J4=false
endif
endif
else
set J4=false
endif
if not J4 then
call PauseUnit(j5,true)
call IssueImmediateOrderById(j5,851972)
call PauseUnit(j5,false)
call G98(O5,j5,0)
endif
elseif((i1=='H00V')or(i1=='H08D')or(i1=='H08C')or(i1=='H084')or(i1=='H08B'))then
if((X5==852111)and((GetUnitAbilityLevel(j5,'B03V')>0)or((not IsUnitType(m5,UNIT_TYPE_HERO))and(not IsUnitType(m5,UNIT_TYPE_SUMMONED)))))then
call G98(O5,j5,'A1AT')
endif
elseif(i1=='E02J')then
if((X5==852089)and(not GZ[O5]))then
call G98(O5,j5,'A1SU')
endif
elseif(i1=='U00C')then
if((X5==852119)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A194')
elseif(X5==852600)then
call XK7("INFEST USED")
endif
elseif(i1=='EC77')then
if((X5==852527)and((not IsUnitType(m5,UNIT_TYPE_HERO))or((not A87(j5))and((R2I(GetUnitState(m5,UNIT_STATE_LIFE))>(400*GetUnitAbilityLevel(j5,'A080')))or(R2I(GetUnitState(m5,UNIT_STATE_LIFE))>(460*GetUnitAbilityLevel(j5,'A1UZ')))))))then
call J6(O5,j5,'A080','A1UZ')
endif
elseif(i1=='EC45')then
if((X5==852652)and((not GZ[O5])or(AN7(380.,HC[48+O5],Condition(function GQ8))==0)))then
call G98(O5,j5,'A0J1')
endif
elseif(i1=='U000')then
if((X5==852248)and((not IsUnitType(m5,UNIT_TYPE_HERO))or((R2I(GetUnitState(j5,UNIT_STATE_MANA))<(200+(50*GetUnitAbilityLevel(j5,'A09U'))))and(not A87(m5)))or(GetUnitState(m5,UNIT_STATE_MANA)<100.)or(GetUnitAbilityLevel(j5,'B00K')>0)))then
call G98(O5,j5,'A1H5')
elseif(X5==852555)then
if(((not GZ[O5])or(GetUnitAbilityLevel(j5,'B00K')>0)or(not IsUnitType(m5,UNIT_TYPE_HERO)))and((AN7(1500.,HC[48+O5],Condition(function GQ8))>0)or(GetUnitManaPercent(j5)<60.)or(GetHeroLevel(j5)<6)))then
call G98(O5,j5,'A0X7')
endif
endif
elseif(i1=='Udre')then
if((X5==852095)and((not IsUnitType(m5,UNIT_TYPE_HERO))or((PO8())and(GetUnitLifePercent(m5)>80.))))then
call G98(O5,j5,'A02H')
elseif((X5==852585)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A08C')
endif
elseif(i1=='UC01')then
if((X5==852125)and(not IsUnitType(m5,UNIT_TYPE_HERO))and(AN7(600.,HC[48+O5],Condition(function k3))<6))then
call J6(O5,j5,'A28R','A28S')
elseif((X5==852527)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A0Q7')
elseif(X5==852525)then
if(hq[512+O5]<Bz)then
set hq[512+O5]=Bz+1.
endif
endif
elseif(i1=='UC91')then
if((X5==852149)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A034')
endif
elseif(i1=='UC42')then
if((X5==852231)and((not IsUnitType(m5,UNIT_TYPE_HERO))or((R2I(GetUnitState(j5,UNIT_STATE_MANA))<(200+(50*JKG(j5))))and(not i2(m5))and(not A87(m5)))))then
call G98(O5,j5,'A094')
elseif((X5==852583)and((not IsUnitType(m5,UNIT_TYPE_HERO))or((not A87(j5))and(R2I(GetUnitState(m5,UNIT_STATE_LIFE))>(350+(350*JKG(j5)))))))then
call J6(O5,j5,'A0MU','A0A2')
elseif((X5==852600)and(GetUnitManaPercent(j5)<45.))then
call G98(O5,j5,'A10R')
endif
elseif(i1=='NC00')then
if((X5==852095)and(not A87(m5))and(not A87(j5))and((GetUnitAbilityLevel(j5,'B03V')>0)or(not IsUnitType(m5,UNIT_TYPE_HERO))or(R2I(GetUnitState(j5,UNIT_STATE_MANA))<(250+(50*GetUnitAbilityLevel(j5,'A01Y'))))))then
call G98(O5,j5,'AHtb')
endif
elseif((i1=='Eevi')or(i1=='Eevm')or(i1=='E02V')or(i1=='E02W')or(i1=='E02U'))then
if((X5==852189)and(IsUnitEnemy(m5,GetOwningPlayer(j5)))and((not IsUnitType(m5,UNIT_TYPE_HERO))or(GetUnitLifePercent(j5)+10.>GetUnitLifePercent(m5))))then
call G98(O5,j5,'A07Q')
elseif(X5==852189)then
call RemoveGuardPosition(j5)
endif
elseif(i1=='Ekee')then
if(X5==852224)then
call G98(O5,j5,'A06W')
elseif(X5==852119)then
call G98(O5,j5,'A06V')
endif
elseif(i1=='Ulic')then
if((X5==852066)and((GetUnitLifePercent(m5)<50.)or(GetUnitManaPercent(j5)>80.)))then
call G98(O5,j5,'A053')
elseif((X5==852227)and((not IsUnitType(m5,UNIT_TYPE_HERO))or(not GZ[O5])))then
call J6(O5,j5,'A05T','A08H')
elseif((X5==852225)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A08R')
endif
elseif(i1=='U006')then
if(X5==852224)then
call G98(O5,j5,'A0BG')
elseif(X5==852601)then
call G98(O5,j5,'A0BH')
endif
elseif(i1=='UC18')then
if((X5==852502)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A0MN')
elseif((X5==852119)and((not IsUnitType(m5,UNIT_TYPE_HERO))or(not GZ[O5])))then
call J6(O5,j5,'A095','A09W')
elseif((X5==852487)and((IsUnitType(m5,UNIT_TYPE_HERO))or(GetUnitManaPercent(j5)>70.)))then
call G98(O5,j5,'A02N')
endif
elseif(i1=='EC57')then
if((X5==852669)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A173')
endif
elseif(i1=='UC11')then
if((X5==852066)and(not kQ(j5))and((not IsUnitType(m5,UNIT_TYPE_HERO))or(GetUnitAbilityLevel(m5,'B00U')>0)or(AN7(800.,HC[48+O5],Condition(function k3))==0)or(R2I(GetUnitState(j5,UNIT_STATE_MANA))<(140+(GetUnitAbilityLevel(j5,'A29L')*'d')))))then
call G98(O5,j5,'A037')
elseif(X5==852218)and(not GZ[O5])then
call G98(O5,j5,'A1RD')
endif
elseif(i1=='UC60')then
if((X5==852189)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A08X')
endif
elseif(i1=='U00A')then
if((X5==852231)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A055')
elseif(X5==852600)then
if(hq[512+O5]<Bz)then
set hq[512+O5]=Bz+1.
endif
endif
elseif(i1=='Ewar')then
if((X5==852662)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A0YM')
elseif(X5==852600)then
if(hq[512+O5]<Bz)then
set hq[512+O5]=Bz+1.
endif
endif
elseif(i1=='Hvsh')then
if((X5==852668)and(j5!=m5)and(not(YO7(GetUnitTypeId(m5),GX7))))then
call G98(O5,j5,'A0EC')
elseif((X5==852231)and((not IsUnitType(m5,UNIT_TYPE_HERO))or(not GZ[O5])))then
call G98(O5,j5,'A0LH')
endif
elseif(i1=='Opgh')then
if((X5==852119)and((not IsUnitType(m5,UNIT_TYPE_HERO))or((R2I(GetUnitState(m5,UNIT_STATE_LIFE))>(150+(150*GetUnitAbilityLevel(j5,'A0E2'))))or(R2I(GetUnitState(m5,UNIT_STATE_LIFE))>(150+(150*GetUnitAbilityLevel(j5,'A1MR')))))))then
call J6(O5,j5,'A0E2','A1MR')
endif
elseif(i1=='O00J')then
if((X5==852600))then
call XK7("ORDER for COD")
set hq[O5]=Bz+41.
call Y07(1.)
endif
elseif(i1=='E02F')then
if(X5==852600)then
set VS4[O5]=true
endif
elseif(i1=='U00F')then
if((X5==852480)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call J6(O5,j5,'A0FL','A1CX')
endif
elseif(i1=='U00E')then
if((X5==852095)and((not IsUnitType(m5,UNIT_TYPE_HERO))or(GetUnitLifePercent(m5)>60.)))then
call J6(O5,j5,'A067','A08P')
endif
elseif(i1=='Oshd')then
if((X5==852227)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
if(GetUnitLifePercent(m5)>30 or GetWidgetLife(m5)<50)then
call G98(O5,j5,'A04Y')
endif
elseif((X5==852119)and(not kQ(j5))and(GetUnitLifePercent(j5)>70.)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
if((GetUnitLifePercent(j5)>90.)or(AN7(1200.,HC[48+O5],Condition(function GQ8))>0)or(GetUnitManaPercent(j5)<70.))then
call G98(O5,j5,'A0GK')
endif
elseif((X5==852095)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A2OI')
elseif((X5==852480)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A02Q')
endif
elseif(i1=='Ofar')then
if((X5==852662)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A046')
endif
elseif(i1=='H00H')then
if((X5==852669)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A2TD')
elseif((X5==852487)and(((not IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(j5)>70.))or(not IsUnitInRange(j5,m5,500.))))then
call J6(O5,j5,'A0CC','A02Z')
endif
elseif(i1=='UC76')then
if((X5==852592)and(AN7(250.,HC[48+O5],Condition(function GQ8))==0))then
call G98(O5,j5,kS(j5))
endif
elseif(i1=='E01A')then
if((X5==852119)and(not IsUnitType(m5,UNIT_TYPE_HERO))and(AN7(200.,HC[48+O5],Condition(function GQ8))==0))then
if((AN7(1200.,HC[48+O5],Condition(function GQ8))>0)or(GetHeroLevel(j5)<6)or(GetUnitManaPercent(j5)<70.))then
call G98(O5,j5,'A0NM')
endif
elseif((X5==852089)and(AN7(100.,HC[48+O5],Condition(function GQ8))==0))then
call G98(O5,j5,'A0NO')
elseif((X5==852597)and(not IsUnitType(m5,UNIT_TYPE_HERO))and(AN7(400.,HC[48+O5],Condition(function GQ8))==0))then
call J6(O5,j5,'A0NT','A0NX')
endif
elseif(i1=='U00P')then
if((X5==852119)and(not GZ[O5])and((not IsUnitType(m5,UNIT_TYPE_HERO))or((not A87(j5))and(not i2(m5)))))then
call G98(O5,j5,'A0OJ')
elseif((X5==852089)and(GetUnitAbilityLevel(j5,'A0OK')>0)and(AN7(250+('d'*GetUnitAbilityLevel(j5,'A0OK')),HC[48+O5],Condition(function GQ8))==0))then
call J6(O5,j5,'A0OK','A1VW')
elseif((X5==852089)and(GetUnitAbilityLevel(j5,'A1VW')>0)and(AN7(350+('d'*GetUnitAbilityLevel(j5,'A0OK')),HC[48+O5],Condition(function GQ8))==0))then
call J6(O5,j5,'A0OK','A1VW')
endif
elseif(i1=='E01C')then
if((X5==852089)and(not GZ[O5]))then
call G98(O5,j5,'A06P')
elseif((X5==852224)and(not GZ[O5]))then
call G98(O5,j5,'S008')
endif
elseif((i1=='H00I')or(i1=='H00J'))then
if(X5==852089)then
call G98(O5,j5,'A0NB')
endif
elseif(i1=='N01W')then
if((X5==852095)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A0NQ')
endif
elseif(i1=='N00R')then
if((X5==852488)and(not GZ[O5]))then
call G98(O5,j5,'A0RA')
elseif((X5==852526)and(not GZ[O5]))then
call G98(O5,j5,'A288')
endif
elseif(i1=='H00N')then
if((X5==852101)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A0R7')
endif
elseif(i1=='E005')then
if((X5==852231)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A042')
endif
elseif(i1=='Npbm')then
if((X5==852585)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'Acdh')
endif
elseif(i1=='H000')then
if((X5==852231)and((not IsUnitType(m5,UNIT_TYPE_HERO))or(R2I(GetUnitState(m5,UNIT_STATE_LIFE))>(40+('}'*(GetUnitAbilityLevel(j5,'A2ON')))))))then
call G98(O5,j5,'A2ON')
endif
elseif(i1=='Nbrn')then
if((X5==852592)and(AN7(250.,HC[48+O5],Condition(function GQ8))==0))then
call G98(O5,j5,'A0QB')
endif
elseif((i1=='Hlgr')or(i1=='H00F')or(i1=='H00E')or(i1=='H00G'))then
if((X5==852095)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A0AR')
endif
elseif(i1=='Edem')then
if((X5==852095)and((not IsUnitType(m5,UNIT_TYPE_HERO))or((GetUnitManaPercent(m5)>15.)and(GetUnitState(m5,UNIT_STATE_LIFE)>((GetUnitState(m5,UNIT_STATE_MAX_MANA)-GetUnitState(m5,UNIT_STATE_MANA))*(.35+(I2R(GetUnitAbilityLevel(j5,'A0E3'))*.25)))))))then
call G98(O5,j5,'A0E3')
elseif(X5==852525)then
if(hq[512+O5]<Bz)then
set hq[512+O5]=Bz+1.
endif
endif
elseif(i1=='Usyl')then
if((X5==852095)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A04P')
endif
elseif(i1=='Harf')then
if((X5==852225)and((not IsUnitType(m5,UNIT_TYPE_HERO))or((GetUnitLifePercent(m5)>80.)and(not GZ[64+O5]))))then
if((GetUnitLifePercent(m5)>95.)or(AN7(1500.,HC[48+O5],Condition(function GQ8))>0)or(GetUnitManaPercent(j5)<70.))then
call G98(O5,j5,'A08N')
endif
elseif((X5==852186)and(not GZ[O5])and((GetUnitLifePercent(m5)>75.)or(not IsUnitType(m5,UNIT_TYPE_HERO))or(GetUnitState(m5,UNIT_STATE_LIFE)>GetUnitState(j5,UNIT_STATE_LIFE))))then
call G98(O5,j5,'A08V')
endif
elseif((i1=='N016')or(i1=='N017')or(i1=='N02B'))then
if(X5==852218)then
call G98(O5,j5,'A21M')
endif
elseif(i1=='Naka')then
if((X5==852095)and((not IsUnitType(m5,UNIT_TYPE_HERO))or(GetUnitManaPercent(j5)<40.)))then
call G98(O5,j5,'A004')
elseif((X5==852149)and(GetUnitLifePercent(m5)>60.)and(not A87(j5)))then
call G98(O5,j5,'A0B4')
endif
elseif(i1=='Orkn')then
if((X5==852502)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A0RX')
elseif((X5==852480)and((not IsUnitType(m5,UNIT_TYPE_HERO))or(not GZ[O5])))then
call G98(O5,j5,'A00P')
elseif((X5==852504)and(not GZ[O5]))then
call J6(O5,j5,'A00H','A0A1')
endif
elseif(i1=='Hvwd')then
if((X5==852095)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A02A')
elseif((X5==852587)and((not GZ[O5])or(GD8(m5))))then
call J6(O5,j5,'A0IN','A1AW')
endif
elseif(i1=='Hmbr')then
if((X5==852095)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A0JC')
endif
elseif(i1=='Emoo')then
if((X5==852075)and((GetOwningPlayer(m5)==G8[0])or(GetOwningPlayer(m5)==N8[0])))then
call G98(O5,j5,'A0DX')
endif
elseif(i1=='Uktl')then
if((X5==852188)and(AN7(400.,HC[48+O5],Condition(function GQ8))==0))then
call G98(O5,j5,0)
endif
elseif((i1=='Hblm')or(i1=='H06X')or(i1=='H06Y')or(i1=='H06W'))then
if((X5==852662)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A10X')
elseif((X5==852185)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A112')
endif
elseif(i1=='Ntin')then
if((X5==852585)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A049')
endif
elseif(i1=='Emns')then
if((X5==852218)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A21E')
elseif((X5==852119)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
if((AN7(1200.,HC[48+O5],Condition(function GQ8))>0)or(GetUnitManaPercent(j5)<40.))then
call J6(O5,j5,'A1W8','A1W9')
endif
endif
elseif(i1=='O00P')then
if((X5==852218)and(not GZ[O5])and(not A87(j5))and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A0FN')
elseif((X5==852274)and(((IsUnitEnemy(m5,GetOwningPlayer(j5)))and(m5!=h4[O5]))or(GetUnitAbilityLevel(j5,'A0GC')>0)))then
call G98(O5,j5,'A0G8')
endif
elseif(i1=='HC49')then
if((X5==852095)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call J7(O5,j5,'A24D')
endif
elseif(i1=='Nbbc')then
if((X5==852095)and(not A87(j5))and((not IsUnitType(m5,UNIT_TYPE_HERO))or((AN7(600.,HC[48+O5],Condition(function GQ8))*2)<AN7(600.,HC[48+O5],Condition(function k3)))))then
call J6(O5,j5,'A0M1','A1AX')
endif
elseif(i1=='Hjai')then
if((X5==852171)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A04C')
endif
elseif(i1=='HC92')then
if((X5==852089)and(not GZ[64+O5])and(AN7(200+(50*GetUnitAbilityLevel(j5,'A0RG')),HC[48+O5],Condition(function GQ8))==0))then
if((GetUnitManaPercent(j5)<70.)or(GetHeroLevel(j5)<6)or(AN7(1500.,HC[48+O5],Condition(function GQ8))>0))then
call G98(O5,j5,'A0RG')
endif
elseif(X5==852600)then
if(hq[512+O5]<Bz)then
set hq[512+O5]=Bz+1.
endif
endif
elseif(i1=='H001')then
if((X5==852662)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A190')
endif
elseif(i1=='H00A')then
if((X5==852095)and((GetOwningPlayer(m5)==G8[0])or(GetOwningPlayer(m5)==N8[0])or((IsUnitAlly(m5,GetOwningPlayer(j5)))and(IsUnitType(m5,UNIT_TYPE_HERO)))))then
call G98(O5,j5,'A0LV')
elseif((X5==852131)and((GetOwningPlayer(m5)==G8[0])or(GetOwningPlayer(m5)==N8[0])))then
if((GetHeroLevel(j5)<20)or(IH(GetOwningPlayer(j5),Condition(function SXD))>0))then
call G98(O5,j5,'A28T')
endif
elseif((X5==852585)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A0KM')
endif
elseif(i1=='H004')then
if((X5==852232)and(not GZ[64+O5])and(AN7(150.,HC[48+O5],Condition(function GQ8))==0))then
call G98(O5,j5,'A027')
elseif((X5==852119)and((not IsUnitType(m5,UNIT_TYPE_HERO))or(GetUnitLifePercent(m5)>80.)))then
call J6(O5,j5,'A01P','A09Z')
endif
elseif(i1=='Otch')then
if((X5==852600)and((m5==null)or(not IsUnitType(m5,UNIT_TYPE_HERO)))and(AN7(200.,HC[48+O5],Condition(function GQ8))==0))then
if((AN7(1500.,HC[48+O5],Condition(function GQ8))>0)or(GetHeroLevel(j5)<6)or(GetUnitManaPercent(j5)<70.))then
call G98(O5,j5,'A0SK')
endif
endif
elseif(i1=='H00K')then
if(X5==852278)then
call G98(O5,j5,'A05J')
elseif(X5==852114)then
call G98(O5,j5,'A06H')
elseif(X5==852040)then
call G98(O5,j5,'A06B')
elseif(X5==852504)then
call J6(O5,j5,'A0AK','A1FY')
elseif(X5==852119)then
call G98(O5,j5,'A1WF')
endif
elseif(i1=='Hmkg')then
if((X5==852095)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,GM8(j5))
elseif((X5==852600)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A2KQ')
elseif((X5==852101)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,GO8(j5))
endif
elseif(i1=='Ogrh')then
if((X5==852662)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A10D')
endif
elseif(i1=='Hamg')then
if((X5==852095)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A26N')
endif
elseif(i1=='H00D')then
if((X5==852218)and(not GZ[O5])and((GetUnitManaPercent(j5)<30.)or(IsUnitInRangeLoc(j5,HC[48+O5],600.)))and((m5==null)or(not IsUnitType(m5,UNIT_TYPE_HERO))))then
call G98(O5,j5,'A0O1')
elseif((X5==852095)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call J6(O5,j5,'A0O2','A289')
endif
elseif(i1=='E00P')then
if((X5==852218)and((GetUnitManaPercent(j5)<60.)or(GetHeroLevel(j5)<6))and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A0O7')
elseif((X5==852580)and(not IsUnitType(m5,UNIT_TYPE_HERO))and(AN7(200.,HC[48+O5],Condition(function GQ8))==0))then
call G98(O5,j5,'A0O6')
elseif((X5==852125)and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A0O5')
endif
elseif((i1=='N01I')or(i1=='N01H')or(i1=='N01T')or(i1=='N01J'))then
if((X5==852089)and(GetUnitManaPercent(j5)<40.)and((m5==null)or(not IsUnitType(m5,UNIT_TYPE_HERO))))then
call G98(O5,j5,'A0IL')
endif
elseif(i1=='H00S')then
if((X5==852218))then
call G98(O5,j5,'A14O')
elseif((X5==852119))then
call G98(O5,j5,'A14R')
endif
elseif(i1=='N00B')then
if((X5==852089)and(not GZ[O5]))then
call J6(O5,j5,'A0S8','A1QP')
endif
elseif(((i1=='Eevi')or(i1=='Eevm')or(i1=='E02V')or(i1=='E02W')or(i1=='E02U')))then
if((X5==852119)and(not GZ[O5]))then
call G98(O5,j5,'A2KZ')
endif
elseif((i1=='H00R')or(i1=='H07I'))then
if(X5==852089)then
call G98(O5,j5,'A15S')
endif
elseif(i1=='H06S')then
if(X5==852089)then
call G98(O5,j5,'A136')
elseif(X5==852662)then
call G98(O5,j5,'A11K')
endif
elseif(i1=='N0EG')then
if(X5==852119)then
call G98(O5,j5,'A12J')
endif
elseif(i1=='O016')then
if(X5==852089)then
call G98(O5,j5,'A1EL')
elseif(X5==852119)then
call G98(O5,j5,'A19O')
elseif(X5==852218)then
call G98(O5,j5,'A19V')
endif
elseif(i1=='E02N')then
if(X5==852119)then
call G98(O5,j5,'A1SQ')
elseif(X5==852089)then
call J6(O5,j5,'A1T5','A235')
endif
elseif(i1=='E02H')then
if(X5==852119)then
call G98(O5,j5,'A1S8')
elseif(X5==852089)then
call G98(O5,j5,'A1SB')
elseif(X5==852111)then
call G98(O5,j5,'A1SA')
endif
elseif(i1=='O01F')then
if(X5==852119)then
call G98(O5,j5,'A1TA')
endif
elseif(i1=='E02X')then
if((X5==852184)and((GetUnitManaPercent(j5)<60.)or(GetHeroLevel(j5)<6))and(not IsUnitType(m5,UNIT_TYPE_HERO)))then
call G98(O5,j5,'A27G')
elseif((X5==852214)and(not IsUnitType(m5,UNIT_TYPE_HERO))and(AN7(200.,HC[48+O5],Condition(function GQ8))==0))then
call G98(O5,j5,'A27F')
endif
elseif(i1=='N01A')then
if(X5==852089)then
call G98(O5,j5,'A14L')
endif
elseif(i1=='N0M0')then
if(X5==852089)then
call G98(O5,j5,'A2H0')
endif
elseif(i1=='E02K')then
if(X5==852089)then
call G98(O5,j5,'A2JB')
endif
elseif(i1=='H0DO')then
if(X5==852119)then
call G98(O5,j5,'A2BE')
elseif(X5==852668)then
call G98(O5,j5,'A2HN')
endif
elseif(i1=='N0MD')then
if(X5==852119)then
call G98(O5,j5,'A2T5')
endif
endif
set j5=null
set m5=null
endfunction
function KMG takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(not IsUnitIllusion(GetTriggerUnit()))and(GetIssuedOrderId()>852000))
endfunction
function KNG takes nothing returns nothing
local integer i=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
if(GetTriggerEventId()==EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)then
call MoveLocation(HC[i],GetUnitX(GetOrderTargetUnit()),GetUnitY(GetOrderTargetUnit()))
set i=GetIssuedOrderId()-852008
if((i>=0)and(i<6)and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_NONE)and(RY4[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]))then
set i=GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),i))
if((i==BU[euldeshenshengfazhang])or(i==BU[sanshizhiren])or(i==BU[sanshizhiren2])or(i==BU[sanshizhiren3])or(i==BU[sanshizhiren4]))then
call IssueTargetOrderById(GetTriggerUnit(),851983,GetOrderTargetUnit())
endif
endif
else
call MoveLocation(HC[i],GetOrderPointX(),GetOrderPointY())
endif
endfunction
function KOG takes nothing returns nothing
local unit j5=GetTriggerUnit()
local integer X5=GetIssuedOrderId()
local integer i1=GetUnitTypeId(j5)
local integer O5=GetPlayerId(GetOwningPlayer(j5))
if((X5>=852000)and(X5<854000))then
if((GetUnitAbilityLevel(j5,'B01O')>0)and(A87(j5)))then
call J3(j5,true)
set j5=null
return
endif
endif
call MoveLocation(HC[48+O5],GetUnitX(j5),GetUnitY(j5))
if((X5>=852008)and(X5<=852013))then
set X5=GH8(j5)
if((X5==BU[fengkuangmianju])and(Bz>hq[64+O5])and(not GZ[224+O5]))then
call KEG(O5,j5,true)
elseif((X5==BU[shuaxinqiu])and((Bz+20.)>hq[O5])and(Bz>hq[48+O5]))then
call KEG(O5,j5,true)
elseif((X5==BU[meikensimu])and(not GZ[64+O5])and((LBool(GetHandleId(j5),"Mekansm"))or(GetUnitLifePercent(j5)>80.)))then
call KEG(O5,j5,true)
elseif((X5==BU[xiwadeshouhu])and(AN7(900.,HC[48+O5],Condition(function GQ8))==0))then
call KEG(O5,j5,true)
elseif((X5==BU[renjia])and(U_4==false))then
call KEG(O5,j5,true)
elseif((X5==BU[mozhang]or X5==BU[mobang])and(GetUnitState(j5,UNIT_STATE_LIFE)>150)and(GetItemCharges(UnitItemInSlot(j5,GetIssuedOrderId()-852008))<8))then
call KEG(O5,j5,true)
elseif((X5==BU[xuanmingdunpai])and(not GZ[64+O5])and((GetUnitAbilityLevel(j5,'Bdef')>0)or(GetUnitManaPercent(j5)<75.)or(GetHeroLevel(j5)<3)))then
call KEG(O5,j5,true)
elseif((LZ7(X5))and(not GZ[224+O5])and(G0[128+O5]))then
call KEG(O5,j5,true)
elseif(((X5==BU[silingshu])or(X5==BU[silingshu2])or(X5==BU[silingshu3])or(X5==BU[huanyingfu])))then
if((i1=='U000')and(GetUnitAbilityLevel(j5,'B00K')>0))then
call KEG(O5,j5,true)
elseif((not GZ[224+O5])and(GetHeroLevel(j5)<13)and(iy(j5))and(eY[O5]==1)and(not G0[32+O5]))then
call KEG(O5,j5,true)
endif
elseif((X5==BU[dongchayandou])and((V44==false)and(h4[O5]==null)))then
call KEG(O5,j5,true)
endif
elseif(i1=='E002')then
if((X5==852526)and((not GZ[O5])or(AN7(789.,HC[48+O5],Condition(function GQ8))==0)))then
call J7(O5,j5,'A1E7')
endif
elseif(i1=='U00C')then
if((X5==852526)and(AN7(800.,HC[48+O5],Condition(function GQ8))==0))then
call J7(O5,j5,'A0T2')
endif
elseif(i1=='EC77')then
if((X5==852100)and((not GZ[O5])or(GetUnitLifePercent(j5)<50.))and((AN7(1500.,HC[48+O5],Condition(function GQ8))>0)or(GetUnitManaPercent(j5)<70.)or(GetUnitLifePercent(j5)<80.)))then
call J7(O5,j5,'A05D')
endif
elseif(i1=='U000')then
if((X5==852129)and(not GZ[O5]))then
call J7(O5,j5,'A09U')
elseif(X5==852526)then
call J7(O5,j5,'A2KO')
endif
elseif(i1=='UC91')then
if((X5==852100)and(not GZ[O5]))then
call J7(O5,j5,'A05C')
elseif(X5==852164)then
call J7(O5,j5,'A29K')
endif
elseif(i1=='Eevi')then
if((X5==852663)and(not GZ[O5]))then
call J7(O5,j5,'A1RI')
endif
elseif(i1=='Ekee')then
if(X5==852100)then
call J6(O5,j5,'A21F','A21G')
call J7(O5,j5,'A21H')
elseif(X5==852594)then
call J7(O5,j5,'A035')
endif
elseif(i1=='U006')then
if((X5==852164)and(not A87(j5))and(AN7(400.,HC[48+O5],Condition(function GQ8))==0))then
call J7(O5,j5,'A0WQ')
endif
elseif(i1=='EC57')then
if((X5==852594)and(not GZ[O5]))then
call J7(O5,j5,'A0A6')
call SetPlayerAbilityAvailable(GetOwningPlayer(j5),'A013',false)
endif
elseif(i1=='UC11')then
if((X5==852127)and(AN7(420.,HC[48+O5],Condition(function GQ8))==0))then
call J7(O5,j5,'A29L')
endif
elseif((i1=='U008')or(i1=='E015'))then
if((X5==852126)and(GetUnitManaPercent(j5)<65.)and(AN7(500.,HC[48+O5],Condition(function GQ8))==0))then
call J7(O5,j5,'A03D')
elseif((X5==852180)and(AN7(800.,HC[48+O5],Condition(function GQ8))==0))then
call J7(O5,j5,'A093')
endif
elseif(i1=='U00A')then
if((X5==852123)and(AN7(350.,HC[48+O5],Condition(function GQ8))==0))then
call J7(O5,j5,'A03O')
endif
elseif(i1=='Nfir')then
if((X5==852164)and(not JTG(j5,200.,Condition(function k3))))then
call J7(O5,j5,'A0EY')
elseif((X5==852588)and(not JTG(j5,450.,Condition(function k3))))then
call J7(O5,j5,'A0FH')
elseif((X5==852599)and(not JTG(j5,700.,Condition(function k3))))then
call J7(O5,j5,'A0F0')
elseif((X5==852273)and(AN7(350.,HC[48+O5],Condition(function GQ8))==0))then
call J7(O5,j5,'A29J')
endif
elseif(i1=='U00F')then
if((X5==852177)and(((GetUnitLifePercent(j5)<50.)or(AN7(300.,HC[48+O5],Condition(function k3))==0)))and(not kQ(j5)))then
call J7(O5,j5,'A06K')
endif
elseif(i1=='Ofar')then
if((X5==852588)and(AN7(650.,HC[48+O5],Condition(function GQ8))==0))then
call J7(O5,j5,'A29I')
endif
elseif(i1=='H00H')then
if((X5==852594)and(not GZ[O5]))then
call J7(O5,j5,'A09D')
endif
elseif(i1=='Npbm')then
if((X5==852586)and(AN7(800.,HC[48+O5],Condition(function GQ8))==0)and(not GZ[O5]))then
call J7(O5,j5,'A0MQ')
endif
elseif((i1=='Hlgr')or(i1=='H00F')or(i1=='H00E')or(i1=='H00G'))then
if((X5==852180)and(AN7(800.,HC[48+O5],Condition(function GQ8))==0))then
call J7(O5,j5,'A03G')
endif
elseif((i1=='N016')or(i1=='N017')or(i1=='N02B'))then
if((X5==852526)and(not GZ[O5]))then
call J7(O5,j5,'A1EJ')
endif
if((X5==852177)and((h4[O5]==null)or(not IsUnitInRange(j5,h4[O5],400.))))then
call J7(O5,j5,'A21N')
endif
if(X5==852138 or X5==852139)then
call J7(O5,j5,'A0BE')
endif
elseif(i1=='Hvwd')then
if((X5==852669)and(GetUnitManaPercent(j5)<60.)and(not GZ[64+O5]))then
call J7(O5,j5,'A17O')
endif
elseif(i1=='Hmbr')then
if((X5==852164)and(not GZ[O5]))then
call J7(O5,j5,'A29G')
call SetPlayerAbilityAvailable(GetOwningPlayer(j5),'A29H',false)
endif
elseif(i1=='Emoo')then
if((X5==852556)and(GetUnitLifePercent(j5)>80.)and(not GZ[64+O5]))then
call J7(O5,j5,'A01B')
endif
elseif((i1=='Hblm')or(i1=='H06X')or(i1=='H06Y')or(i1=='H06W'))then
if((X5==852180))then
call J7(O5,j5,'A11T')
endif
elseif(i1=='HC49')then
if((X5==852123)and(AN7(600.,HC[48+O5],Condition(function GQ8))==0)and(GetUnitManaPercent(j5)<70.))then
call J7(O5,j5,'A063')
elseif(X5==852526)then
call J7(O5,j5,'A2KU')
endif
elseif(i1=='Nbbc')then
if((X5==852128)and((LState(j5,"Omnislashing"))or((GZ[O5])or((GetUnitManaPercent(j5)<70.)and(AN7(600.,HC[48+O5],Condition(function GQ8))==0)))))then
call J7(O5,j5,'A05G')
endif
elseif(i1=='H001')then
if((X5==852663)and(AN7(400.,HC[48+O5],Condition(function GQ8))==0))then
call J7(O5,j5,'A1WH')
endif
elseif(i1=='H004')then
if((X5==852164)and((GetUnitAbilityLevel(j5,'B004')>0)or(GetUnitManaPercent(j5)<60.)or(AN7(800.,HC[48+O5],Condition(function k3))==0)))then
call J7(O5,j5,'A001')
endif
elseif(i1=='Otch')then
if((X5==852164)and(AN7(200.,HC[48+O5],Condition(function k2))==0))then
call J7(O5,j5,'A0DL')
elseif((X5==852526)and((AN7(400.,HC[48+O5],Condition(function GQ8))==0)or(AN7(500.,HC[48+O5],Condition(function k3))<5)))then
call J7(O5,j5,'A0DH')
call SetPlayerAbilityAvailable(GetOwningPlayer(j5),'A1OB',true)
endif
elseif(i1=='Huth')then
if((X5==852600)and(AN7(500.,HC[48+O5],Condition(function GQ8))==0))then
call J7(O5,j5,'A1P9')
endif
elseif((i1=='N01O')or(i1=='N013')or(i1=='N014')or(i1=='N015'))then
if(X5==852138 or X5==852139)then
call J7(O5,j5,'A0AG')
endif
elseif(i1=='N01I')then
if((X5==852663)and(GetUnitLifePercent(j5)>70.)and(GetUnitManaPercent(j5)<40.)and(AN7(500.,HC[48+O5],Condition(function GQ8))==0))then
call J7(O5,j5,'ANcr')
endif
elseif(i1=='N01V')then
if((X5==852129)and(not GZ[O5]))then
call J7(O5,j5,'A0LN')
endif
elseif(i1=='H00S')then
if((X5==852526)and(not GZ[O5]))then
call J7(O5,j5,'A14P')
endif
elseif(i1=='NE0G')then
if((X5==852526))then
call J7(O5,j5,'A14I')
endif
elseif((i1=='H00R')or(i1=='H07I'))then
if(X5==852180)then
call G98(O5,j5,'A15J')
elseif(X5==852662)then
call G98(O5,j5,'A15V')
endif
elseif(i1=='O016')then
if(X5==852180)then
call G98(O5,j5,'A19Z')
endif
elseif(i1=='E02N')then
if(X5==852600)then
call G98(O5,j5,'A1SO')
elseif(X5==852526)then
call G98(O5,j5,'A229')
endif
elseif(i1=='O01F')then
if(X5==852526)then
call G98(O5,j5,'A1T8')
elseif(X5==852589)and(not GZ[O5])then
call G98(O5,j5,'A28Q')
endif
elseif(i1=='H071')then
if X5==852129 then
call G98(O5,j5,'A1IN')
endif
elseif(i1=='N00B')then
if X5==852514 and(not A87(j5))then
call G98(O5,j5,'A0SB')
endif
elseif((i1=='H00V')or(i1=='H08D')or(i1=='H08C')or(i1=='H084')or(i1=='H08B'))then
if X5==852138 or X5==852139 then
call G98(O5,j5,'A1C0')
endif
endif
set j5=null
endfunction
function KPG takes nothing returns nothing
local unit x6=GetTriggerUnit()
local integer Iz=GetItemTypeId(GetManipulatedItem())
local integer i1=GetUnitTypeId(x6)
local integer O5=GetPlayerId(GetOwningPlayer(x6))
local unit m5=null
local boolean J4=false
if(Iz==BU[BA])then
set hq[256+O5]=Bz+25.
call D48(x6,851986,h9[O5])
if(A87(x6))then
set G0[32+O5]=true
loop
exitwhen((GetUnitLifePercent(x6)>50.)or(Bz>hq[256+O5]))
if(AO7(1000.,x6,Condition(function GQ8))>0)then
call D48(x6,851986,h9[O5])
else
call IssueImmediateOrderById(x6,851993)
endif
call Y07(1.)
endloop
set G0[32+O5]=false
call J3(x6,true)
endif
elseif(Iz==BU[ZA])then
call Y07(.5)
set G0[32+O5]=true
loop
exitwhen((GetUnitAbilityLevel(x6,'B02Z')==0)or(GetUnitLifePercent(x6)>95.))
if(not ZL7(x6))then
elseif(AO7(1500.,x6,Condition(function k2))>0)then
call D48(x6,851986,h9[O5])
else
call IssueImmediateOrderById(x6,851993)
endif
call Y07(.5)
endloop
set G0[32+O5]=false
call J3(x6,true)
elseif(Iz==BU[shuaxinqiu])then
set hq[O5]=Bz
set hq[48+O5]=Bz+160.
elseif(Iz==BU[fengkuangmianju])then
set hq[64+O5]=Bz+30.
call Y07(.1)
set m5=h4[O5]
set J4=(m5!=null)and(not A87(x6))and(IssueTargetOrderById(x6,851983,m5))
elseif(Iz==BU[keledebishou])then
set m5=null
set hq[512+O5]=Bz+3.
set hq['p'+O5]=Bz+25.
call TriggerSleepAction(.01)
if(not A87(x6))then
if(i1=='UC11')then
set m5=JS8(350.,x6)
set J4=(m5!=null)and((((AO7(400.,x6,Condition(function k6))>1 and GZ[208+O5])or A87(m5))and(DE8(x6,852164,'A29L')))or(C_7(x6,852125,'A02S',m5)))
elseif(i1=='EC57')then
set GZ[O5]=true
set J4=J8(O5,(((h4[16+O5]!=null)and(IsUnitInRange(x6,h4[16+O5],350.)))or(AO7(600.,x6,Condition(function GQ8))>1))and(DE8(x6,852594,'A013')))
elseif(i1=='E005')then
if(LC7(x6,BU[heihuangzhang]))then
set J4=(((h4[16+O5]!=null)and(IsUnitInRange(x6,h4[16+O5],350.)))or(AO7(400.,x6,Condition(function GQ8))>1))and(LL7(x6,BU[heihuangzhang]))and(IssueImmediateOrderById(x6,852600))
if(not(J4))then
set J4=(((h4[16+O5]!=null)and(IsUnitInRange(x6,h4[16+O5],350.)))or(AO7(400.,x6,Condition(function GQ8))>1))and(IssueImmediateOrderById(x6,852600))
endif
else
set J4=(((h4[16+O5]!=null)and(IsUnitInRange(x6,h4[16+O5],350.)))or(AO7(400.,x6,Condition(function GQ8))>1))and(IssueImmediateOrderById(x6,852600))
endif
elseif(i1=='Npbm')then
set m5=JS8(220.,x6)
set J4=(m5!=null)and(DE8(x6,852096,'A06M'))
elseif(i1=='H000')then
set m5=JS8(220.,x6)
set J4=(m5!=null)and(DE8(x6,852127,'A00S'))
elseif(i1=='UC76')then
set J4=(((h4[16+O5]!=null)and(IsUnitInRange(x6,h4[16+O5],350.)))or(AO7(500.,x6,Condition(function GQ8))>1))and(IssueImmediateOrderById(x6,852556))
elseif(i1=='Hjai')then
set J4=(((h4[16+O5]!=null)and(IsUnitInRange(x6,h4[16+O5],350.)))or(AO7(400.,x6,Condition(function GQ8))>1))and(((GetUnitState(x6,UNIT_STATE_MANA)>hq[272+O5]+50.)and(LL7(x6,BU[heihuangzhang])))or(C_7(x6,852171,'A04C',h4[16+O5]))or(IssueImmediateOrderById(x6,852600)))
elseif(i1=='Ucrl')or(i1=='U01X')then
set m5=JS8(300.,x6)
set J4=(m5!=null)and(C_7(x6,852089,'A0LL',m5))
elseif(i1=='Otch')then
set m5=JS8(300.,x6)
set J4=(m5!=null)and(((AO7(500.,x6,Condition(function k0))>5)and(DE8(x6,852526,'A0DH')or DE8(x6,852526,'A1OB')))or(DE8(x6,852164,'A0DL')))
elseif(i1=='Opgh')then
set m5=JS8(250.,x6)
set J4=(m5!=null)and(IssueImmediateOrderById(x6,852600))
elseif(i1=='Nfir')then
set m5=JS8(220.,x6)
set J4=(m5!=null)and(DE8(x6,852127,'A0EY'))
if(not J4)then
set m5=JS8(600.,x6)
set J4=(m5!=null)and(Bz>V74[O5])and(G0[256+O5])and(DE8(x6,852273,'A29J'))
endif
elseif(i1=='Huth')then
set m5=JS8(220.,x6)
set J4=(m5!=null)and(DE8(x6,852096,'A03Y'))
elseif(i1=='E01C')then
set m5=JS8(300.,x6)
if((m5!=null)and(AO7(700.,m5,Condition(function k5))>1))then
set GZ[O5]=true
set J4=J8(O5,C_7(x6,852089,'A06P',m5))
endif
elseif(i1=='Ofar')then
set m5=JS8(350.,x6)
set J4=(m5!=null)and(((AO7(500.,x6,Condition(function k0))>4)and(DE8(x6,852588,'A29I')))or(C_7(x6,852662,'A046',m5)))
elseif((i1=='N01I')or(i1=='N01H')or(i1=='N01T')or(i1=='N01J'))then
set m5=JS8(300.,x6)
set J4=(m5!=null)and(C_7(x6,852089,'A0IL',m5))
elseif(i1=='UC91')then
set m5=JS8(300.,x6)
set J4=(m5!=null)and(DE8(x6,852127,'A29K'))
endif
if((not J4)and(m5!=null))then
call IssueTargetOrderById(x6,851983,m5)
endif
endif
elseif(Iz==BU[xieeliandao])then
set hq[96+O5]=Bz+13.
elseif(Iz==BU[ziyuan])then
set V74[240+O5]=Bz+18.
elseif(Iz==BU[xiwadeshouhu])then
set V74[176+O5]=Bz+30.
elseif(Iz==BU[yingzhilingkan])then
set V74[224+O5]=Bz+10.
elseif(Iz==BU[zhangu])then
set V74[256+O5]=Bz+30.
elseif(Iz==BU[mozhang])or(Iz==BU[mobang])then
set V74[192+O5]=Bz+17.
elseif(Iz==BU[xulingzhiren])then
set V74[208+O5]=Bz+30.
call Y07(1.1)
set m5=h4[O5]
if(i1=='O00P')then
set J4=(m5!=null)and(IssueTargetOrderById(x6,852662,m5))
endif
elseif(Iz==BU[renjia])then
set U_4=false
elseif(Iz==BU[meikensimu])then
set hq[80+O5]=Bz+45.
elseif(Iz==BU[mifaxie])then
set hq[128+O5]=Bz+30.
elseif(Iz==BU[maidasizhishou])then
set hq[144+O5]=Bz+100.
elseif((Iz==BU[QB])or(Iz==BU[JB])or(Iz==BU[yuanxingxie]))then
set Iz=GetUnitCurrentOrder(x6)
call SetPlayerController(GetOwningPlayer(x6),MAP_CONTROL_NONE)
loop
exitwhen(Iz!=GetUnitCurrentOrder(x6))
call Y07(.1)
endloop
call Y07(.1)
call SetPlayerController(GetOwningPlayer(x6),MAP_CONTROL_COMPUTER)
call Y07(.5)
call J3(x6,true)
if(Z47(x6,DH8(x6))<1500.)then
set h9[O5]=DH8(x6)
call F28(x6,true)
else
call MH8(x6)
endif
elseif(Iz==BU[luosazhifeng])then
if(GZ[272+O5])then
call Y07(.01)
if((i1=='Nfir')or(i1=='EC57'))then
call ExecuteFunc("IIG")
elseif((i1=='Nbrn')or(i1=='EC77'))then
call ExecuteFunc("IJG")
endif
endif
elseif((Iz==BU[huanyingfu])or(Iz==BU[huanyingfu2]))then
if(not A87(x6))then
call TriggerSleepAction(1.5)
if(i1=='HC49')then
set m5=JS8(400.,x6)
set J4=(m5!=null)and(C_7(x6,852095,'A24D',m5))
elseif(i1=='U00A')then
set m5=JS8(400.,x6)
set J4=(m5!=null)and(C_7(x6,852231,'A055',m5))
elseif(i1=='H00U')then
set m5=JS8(400.,x6)
set J4=(m5!=null)and((Bz>V74[64+O5])and K_8(x6,D27,D27,D07,'A0VO')and(IssueImmediateOrderById(x6,852132)))
if((not J4)and(m5!=null)and(Bz>V74[64+O5]))then
call SetPlayerAbilityAvailable(GetOwningPlayer(x6),YS[7],true)
set J4=IssueImmediateOrderById(x6,852132)
call SetPlayerAbilityAvailable(GetOwningPlayer(x6),YS[7],false)
endif
elseif(i1=='E01B')then
set m5=JS8(400.,x6)
set J4=(m5!=null)and(IssueTargetOrderById(x6,852662,m5))
elseif(i1=='Oshd')then
set m5=JS8(400.,x6)
set J4=(m5!=null)and(GetUnitState(x6,UNIT_STATE_MANA)>hq[272+O5])and(C_7(x6,852480,'A02Q',m5))
elseif(i1=='U000')then
set m5=JS8(400.,x6)
set J4=(m5!=null)and(C_7(x6,852555,'A0X7',m5))
endif
endif
endif
set x6=null
set m5=null
endfunction
function KQG takes integer ILG,integer G88 returns integer
if ILG==eY[172+G88]or ILG==eY[188+G88]then
return 10
elseif GetUnitTypeId(Y7[G88])=='H00U' then
return 5
elseif ILG=='A01O' or ILG=='A02A' or ILG=='A0DX' or ILG=='A04C' or ILG=='A190' or ILG=='A24D' or ILG=='A0SK' or ILG=='A0RG' or ILG=='A027' or ILG=='A047' or ILG=='A01B' or ILG=='A0I7' or ILG=='A10X' or ILG=='A04W' or ILG=='A011' or ILG=='A049' or ILG=='A05E' or ILG=='A21E' or ILG=='A10D' or ILG=='A0LL' or ILG=='A0KM' or ILG=='A0RX' or ILG=='A00P' or ILG=='A06M' or ILG=='A00S' or ILG=='A07A' or ILG=='A0AR' or ILG=='A0QB' or ILG=='A08N' or ILG=='A08V' or ILG=='A0OO' or ILG=='A0O6' or ILG=='A1NI' or ILG=='A0L8' or ILG=='A14R' or ILG=='A0QP' or ILG=='A1EA' or ILG=='A0SC' or ILG=='A136' or ILG=='A12J' or ILG=='A14I' or ILG=='A06W' or ILG=='A0P6' or ILG=='A0X5' or ILG=='A0MN' or ILG=='A173' or ILG=='A08X' or ILG=='A055' or ILG=='A03D' or ILG=='A02H' or(ILG=='A08E' and PO8()==false)or ILG=='AHtb' or ILG=='A0X7' or ILG=='A29K' or ILG=='A194' or ILG=='A0CE' or ILG=='A046' or ILG=='A0GK' or ILG=='A04Y' or ILG=='A05V' or ILG=='A06I' or ILG=='A1P8' or ILG=='A06O' or ILG=='A0I6' or ILG=='A0MF' or ILG=='A0HW' or ILG=='A0NM' or ILG=='A0NO' or ILG=='A0OJ' or ILG=='A06P' or ILG=='A0NB' or ILG=='A10L' or ILG=='A0NQ' or ILG=='A0OR' or ILG=='A0RA' or ILG=='A0R5' or ILG=='A0QE' or ILG=='A1MG' or ILG=='A1YO' or ILG=='A1S7' or ILG=='A1SQ' or ILG=='A1SU' or ILG=='A1S8' then
return 2
endif
return 0
endfunction
function KRG takes unit A77,integer WSF,integer ILG returns nothing
local integer O5=0
local integer i
local integer j
local boolean J4=false
if(not Z57(A77))then
return
endif
loop
exitwhen O5==LF4
if ILG==LE4[O5]then
return
endif
set O5=O5+1
endloop
set i=GetPlayerId(GetOwningPlayer(A77))
set j=KQG(ILG,i)
if j==0 then
return
endif
set O5=1
loop
exitwhen O5>11
if O5==6 then
set O5=7
endif
set J4=false
if KR8(Player(O5))and IsUnitEnemy(A77,Player(O5))and Y7[O5]!=null and GetUnitTypeId(Y7[O5])=='E02X' and GetWidgetLife(Y7[O5])>.405 and(not A87(Y7[O5]))and IsUnitInRange(Y7[O5],A77,950.)and Bz>V74[160+O5]and eY[416+O5]!=ILG and((hq[816+O5]<Bz)or((Bz<V74[O5]-10)and(j<=eY[432+O5]))or(j>eY[432+O5]))then
set eY[448+O5]=ILG
set h4[320+O5]=A77
endif
set O5=O5+1
endloop
endfunction
function KSG takes unit Y47,integer ILG,unit A77 returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(Y47))
local integer E_8=GetPlayerId(GetOwningPlayer(A77))
set eY[336+O5]=0
set eY[352+O5]=0
set eY[368+O5]=0
set eY[188+O5]=0
set V74[O5]=0
set V74[16+O5]=0
set V74[32+O5]=0
set V74[48+O5]=0
if ILG==eY[336+E_8]then
set eY[336+O5]=ILG
elseif ILG==eY[352+E_8]then
set eY[352+O5]=ILG
elseif ILG==eY[368+E_8]then
set eY[368+O5]=ILG
elseif ILG==eY[172+E_8]or ILG==eY[188+E_8]then
set eY[188+O5]=ILG
endif
set eY[432+O5]=KQG(ILG,E_8)
set eY[400+O5]=GetUnitTypeId(A77)
set eY[416+O5]=ILG
set hq[816+O5]=Bz+(GetUnitAbilityLevel(Y47,'A27H')+2)*60
endfunction
function CanDodge takes nothing returns boolean
return GetSpellAbilityId()!='A1MO' and GetSpellAbilityId()!='A2BE' and GetSpellAbilityId()!='A1ZI'
endfunction
function KTG takes unit it,unit m5 returns boolean
local boolean J4=false
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer i1
if(AV4[O5]==AZ4)or(AV4[O5]==AY4 and GetRandomInt(1,3)==1)then
set i1=GetUnitTypeId(it)
set bj_lastLoadedUnit=it
if i1=='U00K' and(Bz>V74[32+O5])and(AO7(900.,it,Condition(function AQ7))==0)then
set J4=IssueImmediateOrderById(it,852503)
elseif i1=='N00B' and(Bz>V74[48+O5])and CanDodge()then
set J4=DE8(it,852514,'A0SB')
elseif i1=='U000' and(Bz>V74[48+O5])then
set J4=DE8(it,852526,'A2KO')
elseif i1=='E01Y' and(Bz>V74[16+O5])then
set J4=DE8(it,852526,'A1EA')
endif
if(not J4)and((GetUnitLifePercent(it)<40)or(A87(it))or(GetUnitMoveSpeed(it)<200))then
if(not J4)and(AR7(it,BU[luosazhifeng]))then
set J4=UnitUseItem(it,bj_lastCreatedItem)
endif
if(not J4)and(AR7(it,BU[euldeshenshengfazhang]))then
set J4=UnitUseItemTarget(it,bj_lastCreatedItem,it)
endif
endif
if(not J4)and(h4[O5]!=null or A87(it))then
if(not J4)and(LC7(it,BU[heihuangzhang]))then
set J4=UnitUseItem(it,bj_lastCreatedItem)
endif
if(not J4)and(LC7(it,BU[huanyingfu]))then
set J4=UnitUseItem(it,bj_lastCreatedItem)
endif
if(not J4)and(LC7(it,BU[dongchayandou]))then
set V44=true
set J4=UnitUseItem(it,bj_lastCreatedItem)
set V44=false
endif
endif
if J4 then
set h4[352+O5]=m5
endif
endif
return J4
endfunction
function KUG takes nothing returns nothing
local unit it=LUnit(GetHandleId(GetTriggeringTrigger()),"AI|Hero")
local integer i=GetHandleId(it)
local integer j=LInt(i,"AI|AncestralCharge|hTrig")
local group g=LoadGroupHandle(R8,j,187)
local unit u=LUnit(i,"AI|AncestralCharge")
local unit m5=LUnit(i,"AI|AncestralCharge|Target")
if u!=null and(m5!=null and Z_7(m5)and(not IsUnitInGroup(m5,g))and(IsUnitInRange(m5,it,1500.)or(IsUnitInRange(m5,it,3000.)and GetWidgetLife(m5)<100.))and IssuePointOrderById(u,851986,GetUnitX(m5),GetUnitY(m5)))==false then
set H04=it
call GroupClear(iA)
call GroupEnumUnitsInRange(iA,GetUnitX(it),GetUnitY(it),1500,Condition(function UM8))
loop
set m5=FirstOfGroup(iA)
exitwhen(m5==null or(not IsUnitInGroup(m5,g)))
call GroupRemoveUnit(iA,m5)
endloop
if(m5!=null)then
call IssuePointOrderById(u,851986,GetUnitX(m5),GetUnitY(m5))
call SUnit(i,"AI|AncestralCharge|Target",m5)
endif
endif
if u==null or m5==null then
call IssueImmediateOrderById(u,852589)
call DestroyTrigger(GetTriggeringTrigger())
endif
set it=null
set g=null
set u=null
set m5=null
endfunction
function KVG takes unit it returns nothing
local trigger t=null
local integer i=0
if(not RY4[GetPlayerId(GetOwningPlayer(it))])then
return
endif
set t=CreateTrigger()
set i=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddAction(t,function KUG)
call SUnit(i,"AI|Hero",it)
set t=null
endfunction
function KWG takes nothing returns boolean
return GU8(GetFilterUnit())==false and IsUnitEnemy(GetEnumUnit(),GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and O18(GetFilterUnit())==false)
endfunction
function KXG takes nothing returns boolean
return GU8(GetFilterUnit())==false and IsUnitEnemy(GetEnumUnit(),GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false and O18(GetFilterUnit())==false)
endfunction
function ai_KaolinRefreshLifeThresholdBuff takes nothing returns boolean
set TF7=50
return true
endfunction
function ai_Kaolin_NoEnemyExtent takes nothing returns boolean
local real x0=GetUnitX(GetEnumUnit())
local real y0=GetUnitY(GetEnumUnit())
local real x=GetUnitX(GetFilterUnit())
local real y=GetUnitY(GetFilterUnit())
local real d=Atan2(y-y0,x-x0)
local real x1=x0+1600*Cos(d)
local real y1=y0+1600*Sin(d)
local integer IM8=AP7(600,x1,y1,Condition(function k6))
return IM8<=2 and IM8<AP7(600,x0,y0,Condition(function k6))
endfunction
function ai_EnemyHeroNearByBuff takes nothing returns boolean
return AP7(TG7,GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()),Condition(function k6))>0
endfunction
function KYG takes nothing returns nothing
local unit j5=GetTriggerUnit()
local integer O5=GetPlayerId(GetOwningPlayer(j5))
local integer HMG=GetSpellAbilityId()
local integer i1=GetUnitTypeId(j5)
local integer KZG=0
local unit m5=null
local boolean J4=false
local boolean KAG=GetPlayerController(GetOwningPlayer(j5))==MAP_CONTROL_COMPUTER
local location b5=null
local integer UP
local real F_8=.0
local real CE7=.0
local real CF7=.0
local real CG7=.0
set m5=GetSpellTargetUnit()
if m5!=null and KR8(GetOwningPlayer(m5))and(is(m5))then
set J4=KTG(m5,j5)
endif
set GZ[16+O5]=false
set h4[32+O5]=null
if(GetSpellTargetUnit()!=null)then
set h4[32+O5]=GetSpellTargetUnit()
set m5=GetSpellTargetUnit()
endif
if i1=='E02X' and HMG!='A27F' and HMG!='A27G' and HMG!='A27H' and HMG!='AZ1H' and HMG!='A27X' and hq[816+O5]>Bz then
set G0[288+O5]=false
set i1=eY[400+O5]
endif
if H_7 and i1!='E02X' then
call KRG(j5,i1,HMG)
endif
if(HMG=='Aeat')then
if(KAG)then
call Y07(.1)
call D48(j5,851986,h9[O5])
endif
elseif(i1=='EC45')then
if((KAG)and(HMG=='A0LK'))then
set hq[512+O5]=Bz+3.
if(m5!=null)then
call Y07(((Z87(GetUnitX(j5),GetUnitX(j5),GetUnitX(m5),GetUnitY(m5))/ 40.)*.01)+.5)
else
call Y07(((Z87(GetUnitX(j5),GetUnitX(j5),GetLocationX(HC[O5]),GetLocationY(HC[O5]))/ 40.)*.01)+.5)
endif
set m5=JS8(300.,j5)
if(((not A87(j5))or(Id(O5)))and(m5!=null))then
set GZ[O5]=true
if((A87(j5))or(not J8(O5,(R2I(GetUnitState(m5,UNIT_STATE_LIFE))<(JJG(j5)))and(GetUnitState(m5,UNIT_STATE_LIFE)>300.)and(D78(j5,852652,'A0J1',0,m5)))))then
call J1G(j5,m5,true)
endif
elseif(A87(j5))then
call D48(j5,851986,h9[O5])
else
call J3(j5,true)
endif
endif
elseif(i1=='U000')then
if(HMG=='A1H5')then
call TriggerSleepAction(.05)
if((h4[O5]==m5)and(GetUnitLifePercent(m5)<70.))then
call EOG(j5,m5)
endif
set KZG=852248
endif
elseif(i1=='UC01')then
if(HMG=='A0ME')then
set hq[512+O5]=Bz+3.
call TriggerSleepAction(.05)
if(not A87(j5))then
set m5=JS8(500.,j5)
if(not KAG)then
if((m5!=null)and(GetUnitLifePercent(m5)<60.))then
call EOG(j5,m5)
endif
elseif(m5!=null)then
set J4=(((R2I(GetUnitState(m5,UNIT_STATE_LIFE))<JIG(j5))and(D78(j5,852125,'A28R','A28S',m5)))or((IsUnitInRange(j5,m5,400.))and(DE8(j5,852526,'A04A')))or(D78(j5,852527,'A0Q7',0,m5)))
endif
else
set J4=(KAG)and(h4[O5]==null)and((eY[O5]==1)or(eY[O5]==3)or(eY[O5]==4))and(D48(j5,851986,h9[O5]))
endif
set KZG=852525
elseif(HMG=='A0Q7')then
call TriggerSleepAction(.05)
call J1G(j5,m5,true)
set J4=(KAG)and(IsUnitInRange(j5,m5,400.))and((DE8(j5,852526,'A04A'))or((A87(m5))and(D78(j5,852125,'A28R','A28S',m5))))
set KZG=852527
elseif(HMG=='A04A')then
call TriggerSleepAction(.05)
set hq[16+O5]=Bz+10.
set m5=JS8(400.,j5)
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<50.))then
call EOG(j5,m5)
endif
if(KAG)then
set J4=(m5!=null)and(((R2I(GetUnitState(m5,UNIT_STATE_LIFE))<JIG(j5))and(not GV8(j5))and(D78(j5,852125,'A28R','A28S',m5)))or(D78(j5,852527,'A0Q7',0,m5)))
endif
set KZG=852218
elseif((HMG=='A28R')or(HMG=='A28S'))then
call TriggerSleepAction(.05)
set KZG=GetUnitAbilityLevel(j5,HMG)
if(KZG!=3)then
set hq[O5]=Bz+140.-(KZG*20.)
else
set hq[O5]=Bz+75.
endif
set m5=K2(400.,HC[O5])
if(m5!=null)then
call J1G(j5,m5,true)
endif
set KZG=852125
endif
elseif((i1=='Eevi')or(i1=='Eevm')or(i1=='E02V')or(i1=='E02W')or(i1=='E02U'))then
if(HMG=='A07Q')then
call TriggerSleepAction(.5)
if(IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(j5)))then
set G0[32+O5]=false
call J1G(j5,GetSpellTargetUnit(),true)
call G7G(j5,GetSpellTargetUnit())
endif
endif
elseif(i1=='Ulic')then
if(HMG=='A07F')then
call TriggerSleepAction(.1)
if((m5!=null)and(A87(m5)))then
call J1G(j5,m5,true)
elseif KAG then
set m5=AH7(600.,b5,Condition(function IC8))
set J4=(m5!=null)and(C_7(j5,852066,'A053',m5))
endif
set KZG=852226
elseif(HMG=='A053')then
call TriggerSleepAction(.1)
if KAG then
set TI7=j5
set m5=B97(700,j5,Condition(function BY7))
set J4=(m5!=null)and(C_7(j5,852226,'A07F',m5))
endif
set KZG=852066
elseif(HMG=='A08R')then
call TriggerSleepAction(.05)
set KZG=852225
endif
elseif(i1=='U006')then
if(HMG=='A0BH')then
call TriggerSleepAction(.05)
set KZG=852601
elseif(HMG=='A0WQ')then
call TriggerSleepAction(.05)
set hq[512+O5]=Bz+20.
call J1G(j5,JS8(500.,j5),true)
set KZG=852164
endif
elseif(i1=='UC18')then
if(HMG=='A0MN')then
call TriggerSleepAction(.05)
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call J1G(j5,m5,true)
if(KAG)then
call Y07(1.)
set KZG=R2I(GetUnitState(m5,UNIT_STATE_LIFE))
if((not GV8(m5))and(KZG>200.)and(KZG<JMG(j5)))then
set GZ[O5]=true
set J4=J8(O5,D78(j5,852119,'A095','A09W',m5))
endif
endif
endif
set KZG=852502
endif
elseif(i1=='EC57')then
if(HMG=='A173')then
call TriggerSleepAction(.05)
set hq[O5]=Bz+22.
if(IsUnitType(m5,UNIT_TYPE_HERO))then
call J1G(j5,m5,true)
if((KAG)and(GetHeroLevel(j5)>5))then
set KZG=GetUnitAbilityLevel(j5,'A013')
if(KZG==0)then
set KZG=GetUnitAbilityLevel(j5,'A0A6')
endif
if((R2I(GetUnitState(m5,UNIT_STATE_LIFE))<('d'+(300*KZG)))and(GetUnitState(m5,UNIT_STATE_LIFE)<200.))then
set GZ[O5]=true
call SetPlayerAbilityAvailable(GetOwningPlayer(j5),'A0A6',true)
set J4=J8(O5,DE8(j5,852594,'A013'))
endif
endif
endif
set KZG=852527
endif
elseif(i1=='UC11')then
if(HMG=='A02S')then
call TriggerSleepAction(.05)
if((m5==null)or(not IsUnitType(m5,UNIT_TYPE_HERO)))then
set m5=K2(350.,HC[O5])
endif
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<50.))then
call EOG(j5,m5)
endif
set J4=(KAG)and(m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<55.)and(IsUnitInRange(j5,m5,350.))and(R2I(GetUnitState(j5,UNIT_STATE_MANA))<(140+(GetUnitAbilityLevel(j5,'A29L')*'d')))and(DE8(j5,852164,'A29L'))
set KZG=852125
elseif(HMG=='A037')then
call TriggerSleepAction(.05)
set m5=h4[O5]
set J4=(KAG)and(m5!=null)and(Z_7(m5))and(G0[128+O5])and(IsUnitInRange(j5,m5,800.))and(IssueTargetOrderById(j5,851983,m5))
set KZG=852066
endif
elseif(i1=='UC60')then
if(HMG=='A08X')then
call TriggerSleepAction(.05)
call J1G(j5,m5,true)
set KZG=852189
endif
elseif(i1=='U00A')then
if((HMG=='A0RW')and(IsUnitEnemy(m5,GetOwningPlayer(j5)))and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call TriggerSleepAction(1.)
if(KAG)then
if((GetUnitLifePercent(m5)>70.)or((Bz<hq[O5])and(GetUnitCurrentOrder(m5)==851973))or(not D78(j5,852231,'A055',0,m5))or(not DE8(j5,852123,'A03O')))then
call J1G(j5,m5,true)
endif
else
call EOG(j5,m5)
endif
elseif(HMG=='A055')then
call TriggerSleepAction(.05)
set hq[O5]=Bz+10.
call J1G(j5,m5,true)
if((KAG)and(G0[128+O5]))then
set J4=((not IsUnitInRange(j5,m5,300.))and(GetUnitLifePercent(m5)<60.)and(GetUnitLifePercent(j5)>60.)and(IssueTargetOrderById(j5,852600,m5)))or((IsUnitInRange(j5,m5,250.))and(GetUnitLifePercent(m5)<65.)and(DE8(j5,852123,'A03O')))
endif
set KZG=852231
elseif(HMG=='A03O')then
set hq[16+O5]=Bz+180.
endif
elseif(i1=='Ewar')then
if((HMG=='A0PL')and(IsUnitEnemy(m5,GetOwningPlayer(j5)))and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call TriggerSleepAction(1.)
if(KAG)then
if(not D78(j5,852662,'A0YM',0,m5))then
call J1G(j5,GetSpellTargetUnit(),true)
endif
else
call EOG(j5,m5)
endif
elseif(HMG=='A0YM')then
call TriggerSleepAction(.05)
call J1G(j5,m5,true)
set J4=(KAG)and(not IsUnitInRange(j5,m5,300.))and(IssueTargetOrderById(j5,852662,m5))
set KZG=852662
endif
elseif(i1=='Udea')then
if(HMG=='A0MF')then
call TriggerSleepAction(.05)
set KZG=852119
elseif(HMG=='A0I3')then
call TriggerSleepAction(.05)
if((IsUnitType(m5,UNIT_TYPE_HERO))and(IsUnitEnemy(m5,GetOwningPlayer(j5)))and(GetUnitLifePercent(m5)<50.))then
call J1G(j5,m5,true)
endif
set KZG=852662
endif
elseif(i1=='Ubal')then
if((KAG)and(HMG=='A0CA'))then
call ExecuteFunc("IGG")
elseif(HMG=='A0CT')then
set G0[32+O5]=false
endif
elseif(i1=='U00F')then
if((HMG=='A0FL')and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call EOG(j5,m5)
if KAG and IsUnitInRange(j5,m5,225)then
call SetPlayerAbilityAvailable(Player(O5),'A06K',true)
call IssueImmediateOrderById(j5,852178)
endif
elseif((HMG=='A06K')and(KAG))then
set m5=JS8(250.,j5)
set J4=(m5!=null)and((h4[O5]==m5)or(GetUnitLifePercent(m5)<75.))and(D78(j5,852480,'A0FL','A1CX',m5))
endif
elseif(i1=='Oshd')then
if((HMG=='A02Q')and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call EOG(j5,m5)
endif
elseif(i1=='H00H')then
if(HMG=='A2TD')then
call TriggerSleepAction(.05)
if((IsUnitEnemy(m5,GetOwningPlayer(j5)))and(IsUnitType(m5,UNIT_TYPE_HERO)))then
set h4[16+O5]=m5
call JLG(j5,m5)
set J4=(KAG)and(not G0[32+O5])and((JUG(j5,m5))or(IssueTargetOrderById(j5,852089,m5)))
endif
set KZG=852486
elseif(HMG=='A0MT')then
call TriggerSleepAction(.05)
set hq[O5]=Bz+6.
set KZG=852089
elseif(HMG=='A09D')then
set hq[16+O5]=Bz+35.
elseif(((HMG=='A0CC')or(HMG=='A02Z'))and(IsUnitType(m5,UNIT_TYPE_HERO)))then
if(GetUnitAbilityLevel(m5,'B01N')==0)then
call EOG(j5,m5)
else
call JLG(j5,m5)
endif
endif
elseif(i1=='UC76')then
if((HMG=='A02M')or(HMG=='A06N')or(HMG=='A072')or(HMG=='A074')or(HMG=='A078'))then
call TriggerSleepAction(.05)
set KZG=852218
elseif((HMG=='A073')or(HMG=='A03J')or(HMG=='A04J')or(HMG=='A04M')or(HMG=='A04N'))and(KAG)then
call ExecuteFunc("I6G")
endif
elseif(i1=='Udea')then
if(HMG=='A0NS')then
if((KAG)and(GetUnitLifePercent(j5)<50.)and(not Id(O5)))then
call TriggerSleepAction(.5)
call F28(j5,false)
endif
endif
elseif(i1=='E01A')then
if((HMG=='A0NT')or(HMG=='A0NX'))then
set m5=K2(500.,HC[O5])
if(m5!=null)then
call EOG(j5,m5)
call JLG(j5,m5)
endif
endif
elseif(i1=='E01C')then
if(HMG=='A06P')then
set m5=K2(500.,HC[O5])
if(m5!=null)then
call EOG(j5,m5)
endif
endif
elseif(i1=='O00J')then
if(HMG=='A1P8')then
elseif(HMG=='A0G4' or HMG=='A1D8')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
call EOG(j5,m5)
endif
endif
elseif(i1=='Npbm')then
if(HMG=='A0MQ')then
set m5=K2(500.,HC[O5])
if(m5!=null)then
call EOG(j5,m5)
call G7G(j5,m5)
endif
elseif(HMG=='A0MQ')then
call TriggerSleepAction(.05)
if(GetUnitLifePercent(m5)<50.)then
call J1G(j5,m5,true)
endif
set KZG=852585
endif
elseif((i1=='Hlgr')or(i1=='H00F')or(i1=='H00E')or(i1=='H00G'))then
if(HMG=='A03F')then
call TriggerSleepAction(.05)
set KZG=852580
elseif(HMG=='A0AR')then
call TriggerSleepAction(.05)
call J1G(j5,m5,true)
set KZG=852095
endif
elseif(i1=='Edem')then
if(HMG=='AEbl')then
set hq[512+O5]=Bz+3.
call TriggerSleepAction(.05)
set m5=JS8(200.,j5)
if(m5!=null)then
call J1G(j5,m5,true)
endif
set J4=(KAG)and(h4[O5]==null)and(A87(j5))and((eY[O5]==1)or(eY[O5]==3)or(eY[O5]==4))and(D48(j5,851986,h9[O5]))
set KZG=852525
endif
elseif(i1=='Naka')then
if(HMG=='A004')then
call TriggerSleepAction(.05)
if(GetUnitLifePercent(m5)<65.)then
call J1G(j5,m5,true)
endif
set KZG=852095
elseif(HMG=='A0B4')then
call TriggerSleepAction(.05)
call J1G(j5,m5,true)
set KZG=852149
endif
elseif(i1=='Orkn')then
if((HMG=='A00P')and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call EOG(j5,m5)
elseif(HMG=='A0RX')then
call TriggerSleepAction(.05)
call J1G(j5,m5,true)
if((KAG)and(IsUnitType(m5,UNIT_TYPE_HERO))and((GetUnitLifePercent(m5)<70.)or((Bz>hq[16+O5])and(GetUnitState(j5,UNIT_STATE_MANA)>(hq[272+O5]+80.+(30.*GetUnitAbilityLevel(j5,'A00P'))))))and(GetHeroLevel(j5)>5)and(GetUnitAbilityLevel(m5,'B00H')>0))then
set GZ[O5]=true
set J4=J8(O5,D78(j5,852504,'A00H','A0A1',m5))
endif
set KZG=852149
elseif((HMG=='A00H')or(HMG=='A0A1'))then
call TriggerSleepAction(.05)
set m5=K2(550.,HC[O5])
if(m5!=null)then
call G7G(j5,m5)
if((KAG)and(Bz>hq[16+O5]))then
set GZ[O5]=true
set J4=(((IsUnitInRange(j5,m5,400)or S19(m5)))and J8(O5,C_7(j5,852480,'A00P',m5)))or(D78(j5,852502,'A0RX',0,m5))
endif
endif
set hq[O5]=Bz+120.
set KZG=852504
endif
elseif(i1=='Hvwd')then
if(HMG=='A0IN')or(HMG=='A1AW')then
call TriggerSleepAction(.3)
set hq[512+O5]=Bz+2.
set hq[O5]=Bz+45.
call J1G(j5,m5,true)
call G7G(j5,m5)
elseif(HMG=='A02A')then
call TriggerSleepAction(.05)
call J1G(j5,m5,true)
set hq[16+O5]=Bz+10.
set KZG=852095
endif
elseif(i1=='Uktl')then
if(HMG=='A1BX')then
set m5=K2(400.,HC[O5])
if(m5!=null)then
call EOG(j5,m5)
call G7G(j5,m5)
endif
endif
elseif(i1=='Emns')then
if(HMG=='A21E')then
call TriggerSleepAction(.05)
call J1G(j5,m5,true)
set KZG=852218
endif
elseif(i1=='O00P')then
if(HMG=='A0FN')then
set hq[O5]=Bz+11.
if((not A87(j5))or(Id(O5)))then
set hq[512+O5]=Bz+3.
if(GetSpellTargetUnit()!=null)then
call Y07((RMaxBJ(Z87(GetUnitX(j5),GetUnitX(j5),GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()))/ 50.,1.)*.04)+.3)
else
call Y07((RMaxBJ(Z87(GetUnitX(j5),GetUnitX(j5),GetLocationX(HC[O5]),GetLocationY(HC[O5]))/ 50.,1.)*.04)+.3)
endif
if(not IsUnitHidden(j5))then
call J1G(j5,JS8(300.,j5),true)
if((KAG)and(GetUnitCurrentOrder(j5)==0))then
call J3(j5,true)
endif
endif
endif
endif
elseif(i1=='HC49')then
if(HMG=='A063')then
set hq[16+O5]=Bz+60.
endif
elseif(i1=='Nbbc')then
if(HMG=='A0M1')then
set hq[O5]=Bz+140.-(GetUnitAbilityLevel(j5,HMG)*10.)
if(IsUnitType(m5,UNIT_TYPE_HERO))then
call EOG(j5,m5)
endif
endif
elseif(i1=='Hjai')then
if(HMG=='A04C')then
call TriggerSleepAction(.05)
if KAG then
call IssueTargetOrderById(j5,851983,m5)
endif
set hq[16+O5]=Bz+10.
if(IsUnitType(m5,UNIT_TYPE_HERO))then
if((GetUnitState(j5,UNIT_STATE_LIFE)>GetUnitState(m5,UNIT_STATE_LIFE))and((GetUnitState(j5,UNIT_STATE_LIFE)-GetUnitState(m5,UNIT_STATE_LIFE))>(40*GetHeroLevel(j5))))then
call EOG(j5,m5)
if((KAG)and(GetHeroLevel(j5)>5)and(Bz>hq[O5])and(GetUnitState(m5,UNIT_STATE_LIFE)>150.)and(G0[128+O5]))and(not IsUnitType(m5,UNIT_TYPE_MAGIC_IMMUNE))then
if(IsUnitInRange(j5,m5,450.))then
set J4=((GetUnitState(j5,UNIT_STATE_MANA)>hq[272+O5]+50.)and(LL7(j5,BU[heihuangzhang])))or(IssueImmediateOrderById(j5,852600))
endif
endif
if((not J4)and(KAG)and(not A87(j5)))then
set J4=IssueTargetOrderById(j5,851983,m5)
endif
endif
endif
set KZG=852171
elseif(HMG=='A1E9')then
call TriggerSleepAction(.05)
if KAG then
call IssueTargetOrderById(j5,851983,m5)
endif
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))and(G0[128+O5]))then
if((GetUnitState(j5,UNIT_STATE_LIFE)>GetUnitState(m5,UNIT_STATE_LIFE))and((GetUnitState(j5,UNIT_STATE_LIFE)-GetUnitState(m5,UNIT_STATE_LIFE))>(40*GetHeroLevel(j5))))then
call J1G(j5,m5,true)
endif
endif
set KZG=852089
elseif((HMG=='A03R')or(HMG=='A0AV'))then
set m5=K2(600.,L_7(j5))
if(m5!=null)then
call EOG(j5,m5)
call G7G(j5,m5)
endif
set hq[O5]=Bz+180.-(GetUnitAbilityLevel(j5,HMG)*30.)
endif
elseif(i1=='HC92')then
if((HMG=='A0K9')and(KAG)and(IsUnitEnemy(m5,GetOwningPlayer(j5)))and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call TriggerSleepAction(1.)
call D78(j5,852089,'A0RG',0,m5)
endif
elseif(i1=='H001')then
if(HMG=='A190')then
call TriggerSleepAction(.05)
set hq[O5]=Bz+8.
call J1G(j5,m5,true)
set J4=(KAG)and(IsUnitInRange(j5,m5,400.))and(GetUnitLifePercent(m5)<70.)and(DE8(j5,852663,'A1WH'))
set KZG=852662
elseif(HMG=='A1WH')then
call TriggerSleepAction(.05)
set m5=JS8(800.,j5)
call J1G(j5,m5,true)
set hq[512+O5]=Bz+20.
if((KAG)and(m5!=null)and(IsUnitInRange(j5,m5,700.)))then
set J4=(D78(j5,852662,'A190',0,m5))or(IssueTargetOrderById(j5,851983,m5))
endif
set KZG=852663
endif
elseif(i1=='H00A')then
if(HMG=='A0KM')then
call TriggerSleepAction(.05)
call J1G(j5,m5,true)
call JLG(j5,m5)
if((KAG)and(IsUnitType(m5,UNIT_TYPE_HERO)))then
set J4=D78(j5,852095,'A0LV',0,m5)
set h4[16+O5]=m5
endif
set KZG=852585
endif
elseif(i1=='H004')then
if(HMG=='A027')then
call TriggerSleepAction(.05)
set m5=K2(280.,HC[O5])
call J1G(j5,m5,true)
if((KAG)and(m5!=null))then
call IssueTargetOrderById(j5,851983,m5)
call Y07(1.)
set J4=((not GV8(m5))and(R2I(GetUnitState(m5,UNIT_STATE_LIFE))<JNG(j5))and(D78(j5,852119,'A01P','A09Z',m5)))or(((GetUnitLifePercent(m5)<50.)and(JUG(j5,m5))))or(D78(j5,852125,'A01F',0,m5))or(IssueTargetOrderById(j5,851983,m5))
endif
set KZG=852232
elseif(HMG=='A01F')then
call TriggerSleepAction(.05)
set hq[16+O5]=Bz+8.5
if(m5==null)then
set m5=K2(300.,HC[O5])
endif
set J4=(KAG)and(m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))and(not GV8(m5))and(R2I(GetUnitState(m5,UNIT_STATE_LIFE))<JNG(j5))and(GetUnitState(m5,UNIT_STATE_LIFE)>200.)and(D78(j5,852119,'A01P','A09Z',m5))
set KZG=852125
endif
elseif(i1=='Huth')then
if(HMG=='A03Y')then
call TriggerSleepAction(.05)
set hq[O5]=Bz+7.75
set m5=JS8(350.,j5)
if((m5!=null)and((not A87(j5))or(A87(m5))))then
call J1G(j5,m5,true)
set J4=(KAG)and(DE8(j5,852600,'A1P9'))
endif
set KZG=852096
elseif(HMG=='A1P9')then
call TriggerSleepAction(.05)
set m5=JS8(500.,j5)
if(m5!=null)then
call J1G(j5,m5,true)
endif
if(KAG)then
if((GetHeroLevel(j5)>5)and(G0[128+O5])and(GetUnitLifePercent(j5)>70.)and(not IC(O5)))then
set hq[512+O5]=Bz+6.
endif
if(m5==null)then
set m5=AJ7(500.,L_7(j5),Condition(function GC8))
endif
set J4=(m5!=null)and(not G0[O5])and(G0[128+O5])and((not A87(j5))or(AF7(m5,j5)))and(IssueTargetOrderById(j5,851983,m5))
endif
set KZG=852561
endif
elseif(i1=='Ogrh')then
if(HMG=='A10D')then
call TriggerSleepAction(.05)
call J1G(j5,m5,true)
set KZG=852662
endif
elseif(i1=='U00C')then
if(HMG=='A194')then
call XK7("OPEN WOUNDS USED")
call TriggerSleepAction(.05)
call J1G(j5,m5,true)
set KZG=852119
endif
elseif(i1=='Hmkg')then
if((HMG=='A04W')or(HMG=='A089')or(HMG=='A08A')or(HMG=='A08D')or(HMG=='A2KQ'))then
call TriggerSleepAction(.05)
if((GZ[O5])or(m5==h4[O5])or(GetUnitLifePercent(m5)<55.))then
call J1G(j5,m5,true)
elseif(IsUnitType(m5,UNIT_TYPE_HERO))then
call EOG(j5,m5)
endif
set KZG=852095
elseif((HMG=='A011')or(HMG=='A007')or(HMG=='A01T')or(HMG=='A00F'))then
call TriggerSleepAction(.05)
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<60.))then
call J1G(j5,m5,true)
endif
set KZG=852662
endif
elseif((i1=='N01I')or(i1=='N01H')or(i1=='N01T')or(i1=='N01J'))then
if(HMG=='A1NI')then
call ExecuteFunc("J5G")
endif
elseif(i1=='N01V')then
if((KAG)and(HMG=='A0LN'))then
call TriggerSleepAction(1.)
if(((GetUnitManaPercent(j5)>55.)and(AO7(500.,j5,Condition(function k3))>2))or(AO7(500.,j5,Condition(function GQ8))>0))then
call IssueImmediateOrderById(j5,852600)
endif
endif
elseif(i1=='Emoo')then
if((HMG=='A01B')and(KAG))then
call ExecuteFunc("I0G")
endif
elseif(i1=='N0HP')then
if(HMG=='A1MI')and KAG then
call TriggerSleepAction(.05)
call IssueImmediateOrderById(j5,851972)
endif
elseif(i1=='H00S')then
if(HMG=='A14R')and KAG then
call Y07(.01)
call IssueTargetOrderById(j5,851983,m5)
endif
elseif(i1=='O01F')then
if KAG then
if HMG=='A1U2' then
call SBool(GetHandleId(j5),"AI|IoSpiritsFar",true)
elseif HMG=='A1U3' then
call SBool(GetHandleId(j5),"AI|IoSpiritsFar",false)
elseif HMG=='A1T8' then
call AddTimedBoolBuff(j5,"AI|IoSpirits",19)
endif
endif
elseif(i1=='E02J')then
if HMG=='A1SU' then
set b5=GetSpellTargetLoc()
call XK7("Kinetic "+R2S(GetLocationX(b5)))
if KAG then
call J3(j5,true)
endif
call Y07(1.2)
set m5=JU8(300,j5,GetLocationX(b5),GetLocationY(b5))
call J1G(j5,m5,true)
if KAG and(m5!=null)then
if(h4[O5]==null or(not IsUnitInRangeLoc(h4[O5],b5,300)))then
call VTF(O5,m5,false,false)
endif
set J4=(IssuePointOrderById(j5,852662,GetLocationX(b5),GetLocationY(b5)))
endif
endif
elseif(i1=='H0DO')then
if HMG=='A2BG' then
call TriggerSleepAction(.05)
set m5=K2(250.,HC[O5])
call J1G(j5,m5,true)
set KZG=852662
endif
elseif(i1=='O015')then
if(HMG=='A1A8')then
if KAG then
call KVG(j5)
endif
endif
elseif(i1=='N0MU')or(i1=='N0MW')then
if KAG then
if HMG=='A2TH' then
set TI7=j5
set J4=LoadBoolean(R8,GetHandleId(j5),StringHash("Stone|Combo"))and LM7(j5)
if not J4 then
call TriggerSleepAction(.1)
set TI7=j5
set CE7=Atan2(GetUnitY(TD7)-GetUnitY(TI7),GetUnitX(TD7)-GetUnitX(TI7))
set CF7=GetUnitX(TD7)+1200*Cos(CE7)
set CG7=GetUnitY(TD7)+1200*Sin(CE7)
set J4=AO7(200,TD7,Condition(function BY7))!=0 and IssueTargetOrderById(j5,852125,TD7)
if not J4 then
set J4=BH7(TI7,TD7,CF7,CG7,200,Condition(function BY7))==false and IsUnitInRange(j5,TD7,250)and C_7(j5,852189,'A2QM',TD7)
endif
endif
elseif HMG=='A2QI' then
call TriggerSleepAction(.1)
if GetUnitTypeId(m5)=='o01X' or GetUnitTypeId(m5)=='o020'then
if IsUnit(AW7(j5),null)==false then
set TI7=j5
if GetUnitLifePercent(j5)>40. and GetUnitLifePercent(AW7(j5))<=50.+AO7(400,j5,Condition(function I18))*8 then
set J4=(m5!=null)and IssuePointOrderById(j5,852662,GetUnitX(m5),GetUnitY(m5))
endif
endif
set J4=(not J4)and C_7(j5,852189,'A2QM',m5)
set J4=(not J4)and AO7(600,m5,Condition(function I18))>=3 and IssuePointOrderById(j5,852662,GetUnitX(m5),GetUnitY(m5))
endif
elseif HMG=='A2QM' then
call TriggerSleepAction(.1)
set J4=LR7(j5,true,true)
set TI7=j5
if not J4 then
if IsUnitEnemy(m5,GetOwningPlayer(j5))and IsUnitType(m5,UNIT_TYPE_HERO)then
set J4=(GetWidgetLife(m5)<=(25+25*GetUnitAbilityLevel(j5,'A2TI'))*AA7(j5)*.7+125.)and((IsUnitInRange(j5,m5,300)and IssueImmediateOrderById(j5,852551))or(IsUnitInRange(j5,m5,600)and(AO7(300,j5,Condition(function BY7))>0)and LE7(j5,.5*(GetUnitX(m5)+GetUnitX(j5)),.5*(GetUnitY(m5)+GetUnitY(j5)),null,'A2TI')))
set J4=(not J4)and LE7(j5,GetUnitX(m5)+GetRandomReal(-50,50),GetUnitY(m5)+GetRandomReal(-50,50),null,'A2QI')
endif
endif
elseif HMG=='A2TI' then
call TriggerSleepAction(.1)
set m5=B97(600,j5,Condition(function C17))
set CE7=Atan2(GetUnitY(m5)-GetUnitY(j5),GetUnitX(m5)-GetUnitX(j5))
set CF7=GetUnitX(j5)+'d'*Cos(CE7)
set CG7=GetUnitY(j5)+'d'*Sin(CE7)
set J4=(m5!=null)and LE7(j5,CF7,CG7,null,'A2QM')
set J4=(not J4)and(m5!=null)and LE7(j5,GetUnitX(m5),GetUnitY(m5),null,'A2QI')
set J4=(not J4)and(m5!=null)and IssuePointOrderById(j5,852218,.5*(GetUnitX(j5)+GetUnitX(m5)),.5*(GetUnitY(j5)+GetUnitY(m5)))
elseif HMG=='A2TJ' then
call TriggerSleepAction(.1)
if IsUnit(AW7(j5),null)==false then
set J4=LR7(j5,true,false)
if not J4 then
set F_8=YH7(j5,AW7(j5))
set J4=LE7(j5,GetUnitX(AW7(j5))+'d'*CosBJ(F_8),GetUnitY(AW7(j5))+'d'*SinBJ(F_8),null,'A2QI')
endif
endif
endif
call AZ7(j5)
endif
elseif(i1=='N0MD')then
if KAG and(HMG=='A2TF')and(m5==j5 or IsUnitAlly(m5,GetOwningPlayer(j5)))then
call C_7(j5,852662,'A2SG',m5)
call XM7(O5,"Combo 2")
endif
endif
if((KAG)and(not J4)and(KZG!=0)and(GetUnitCurrentOrder(j5)==KZG))then
call J3(j5,true)
endif
set j5=null
set m5=null
set b5=null
endfunction
function KBG takes nothing returns nothing
local unit it=GetTriggerUnit()
local integer HMG=GetSpellAbilityId()
local integer i1=GetUnitTypeId(it)
local integer O5=GetPlayerId(GetOwningPlayer(it))
local unit m5=h4[32+O5]
local integer UP
local location b5=null
local boolean J4=false
local boolean KAG=GetPlayerController(GetOwningPlayer(it))==MAP_CONTROL_COMPUTER
local real KCG=0
local unit W17=null
call TriggerSleepAction(.01)
if((not KAG)and(hq[464+O5]>Bz)and(m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))and(IsUnitEnemy(m5,GetOwningPlayer(it))))then
call EOG(it,m5)
endif
if(m5!=null)and(not Z_7(m5))then
set m5=null
endif
if(h4[O5]!=null)and(not Z_7(h4[O5]))then
set h4[O5]=null
endif
if G0[288+O5]then
set G0[288+O5]=false
set i1=eY[400+O5]
endif
if((HMG=='A02O')or(HMG=='A08Y')or(HMG=='A08Z')or(HMG=='A090')or(HMG=='A092'))then
call XK7("Dagon used by |c00ffff00"+GetUnitName(it)+"|r")
if(KAG and VH4[O5])then
if(AR7(it,GetItemTypeId(VJ4[O5])))then
call Y07(1.)
call DisableTrigger(GW4)
call UnitRemoveItem(it,AV7(it,GetItemTypeId(VJ4[O5])))
call RemoveItem(VJ4[O5])
call EnableTrigger(GW4)
endif
if(VI4[O5]!=null)then
call Y07(.2)
call UnitAddItem(it,VI4[O5])
endif
set VG4[O5]=Bz+VF4[VQ4]
set VH4[O5]=false
set VJ4[O5]=null
set VI4[O5]=null
endif
call J1G(it,m5,true)
set J4=(i1=='U00E')and(KAG)and(not GV8(m5))and(D78(it,852095,'A067','A08P',m5))
elseif((HMG=='AChx')or(HMG=='AIpg'))then
call J1G(it,m5,true)
elseif(HMG=='AImt')then
if(KAG)then
call Y07(1.)
call MH8(it)
endif
elseif(i1=='E002')then
if(HMG=='A1E7')then
call J1G(it,JS8(750.,it),true)
elseif(HMG=='A1DP')then
call J1G(it,JS8(550.,it),true)
if(KAG)then
call Y07(WI7(IsUnitInRange(it,m5,300),1.25,2.25))
set J4=(m5!=null)and(Bz>V74[O5])and(((GetUnitAbilityLevel(it,'A1AO')>0)and(DE8(it,852229,'A1AO')))or((GetUnitAbilityLevel(it,'A1UV')>0)and(DE8(it,852229,'A1UV'))))
endif
elseif((HMG=='A1AO')or(HMG=='A1UV'))then
if(KAG)then
set J4=(IsUnitInRange(it,m5,440.))and(IssuePointOrderById(it,852662,GetUnitX(m5)+2,GetUnitY(m5)-2))
endif
endif
elseif((i1=='H00V')or(i1=='H08D')or(i1=='H08C')or(i1=='H084')or(i1=='H08B'))then
if(HMG=='A1AT')then
elseif(HMG=='A0G2')then
if(KAG)then
set J4=(m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<50.)and(IsUnitInRange(it,m5,400.))and(DE8(it,852581,'A1AT'))
else
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<50.))then
call EOG(it,m5)
endif
endif
endif
elseif(i1=='O00J')then
if((m5!=null)and(KAG)and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call VTF(O5,m5,false,false)
call IssueTargetOrderById(it,851983,m5)
endif
elseif(i1=='U00C')then
if(HMG=='A0T2')then
call XK7("RAGE USED")
set hq[240+O5]=Bz+15
if((not A87(it))or(Id(O5)))then
if(m5!=null)then
call J1G(it,m5,true)
set hq[512+O5]=Bz+6.+(GetUnitAbilityLevel(it,HMG)*5.)
else
call J1G(it,JS8(500.,it),true)
set hq[512+O5]=Bz+6.+(GetUnitAbilityLevel(it,HMG)*5.)
endif
endif
call TriggerSleepAction(1.)
if((KAG)and(IsUnitHidden(it)))then
call ShowUnitShow(it)
endif
endif
elseif(i1=='EC77')then
if(HMG=='A05D')then
call J1G(it,JS8(550.,it),true)
elseif((HMG=='A080')or(HMG=='A1UZ'))then
set UP=GetUnitAbilityLevel(it,'A080')
if((UP==0)and(HMG=='A1UZ'))then
set UP=GetUnitAbilityLevel(it,'A1UZ')
if(UP>0)then
set hq[O5]=Bz+12.
endif
elseif(HMG=='A080')then
if(UP==1)then
set hq[O5]=Bz+80.
elseif(UP==2)then
set hq[O5]=Bz+50.
elseif(UP==3)then
set hq[O5]=Bz+30.
else
set hq[O5]=Bz+80.
endif
else
set hq[O5]=Bz+80.
endif
call J1G(it,m5,true)
elseif(HMG=='A09V')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<60.))then
call EOG(it,m5)
endif
endif
elseif(i1=='EC45')then
if(HMG=='A0J1')or(HMG=='A1D7')then
set hq[O5]=Bz+180.
if KAG and G0[128+O5]then
set J4=C27(R37[RL7+O5])and IssuePointOrderByIdLoc(it,852218,R37[RL7+O5])
endif
endif
elseif(i1=='E02I')then
if(HMG=='A1YO')then
set UP=GetUnitAbilityLevel(it,'A1YO')
call EOG(it,m5)
call J1G(it,m5,true)
call TriggerSleepAction(.5)
set J4=(KAG)and(m5!=null)and(iU(it))and(((Bz>V74[32+O5])and(IsUnitInRange(it,m5,1000.))and(AO7(900.,m5,Condition(function GC8))==0)and(IssueTargetOrderById(it,852185,m5)))or((Bz>V74[48+O5])and(IsUnitInRange(it,m5,570.))and(IssueImmediateOrderById(it,852594)))or(IssueTargetOrderById(it,851983,m5)))
elseif(HMG=='A1S7')then
if(m5!=null)then
call EOG(it,m5)
set J4=(KAG)and((Bz>V74[O5])and(IsUnitInRange(it,m5,250.))and((GetUnitLifePercent(m5)<47.)or(GetRandomInt(1,3)==1))and(IssueImmediateOrderById(it,852526)))or(IssuePointOrderById(it,852662,GetUnitX(m5),GetUnitY(m5)))or(IssueTargetOrderById(it,851983,m5))
endif
elseif(HMG=='A1YQ')then
set UP=GetUnitAbilityLevel(it,'A1YQ')
if(h4[O5]!=null)then
call J1G(it,m5,true)
call TriggerSleepAction(.5)
set J4=(KAG)and(h4[O5]!=null)and(iU(it))and(IssueTargetOrderById(it,851983,h4[O5]))
endif
endif
elseif(i1=='H00U')then
if(HMG=='A0XL')then
set V74[80+O5]=Bz+35.
elseif(HMG=='A0VN')then
set V74[48+O5]=Bz+55.
if((KAG)and((GetUnitState(it,UNIT_STATE_MANA))>200)and(GetUnitLevel(it)>=10)and((Bz>V74[O5])or(KA8(it,'A0VM')))and(Bz>V74['p'+O5]))then
set J4=K_8(it,D07,D57,D27,'A0VM')and IssuePointOrderById(it,852215,GetUnitX(h4[O5]),GetUnitY(h4[O5]))
endif
elseif(HMG=='A0VO')then
if(KAG)then
set GZ[224+O5]=true
set J4=(h4[O5]!=null)and(IsUnitInRange(it,h4[O5],450.))and(IsUnitType(h4[O5],UNIT_TYPE_HERO))and(AR7(it,BU[huanyingfu]))and(UnitUseItem(it,AV7(it,BU[huanyingfu])))
set GZ[224+O5]=false
endif
set V74[64+O5]=Bz+30.
elseif(HMG=='A0VZ')then
set V74[16+O5]=Bz+20.
elseif(HMG=='A0VG')then
set V74[144+O5]=Bz+30.
elseif(HMG=='A0VS')then
set V74[32+O5]=Bz+30.
elseif(HMG=='A0VK')then
set V74[96+O5]=Bz+30.
if((KAG)and((GetUnitState(it,UNIT_STATE_MANA))>174)and((Bz>V74[O5])or(KA8(it,'A0VG')))and(Bz>V74[144+O5])and(h4[O5]!=null))then
set UP=GetUnitAbilityLevel(it,'A21W')
if(UP>4)then
if(UP==5)then
call Y07(.6)
elseif(UP==6)then
call Y07(.9)
elseif(UP==7)then
call Y07(1.1)
endif
endif
set J4=K_8(it,D27,D27,D27,'A0VG')and IssuePointOrderById(it,852089,GetUnitX(h4[O5]),GetUnitY(h4[O5]))
endif
elseif(HMG=='A0VQ')then
set V74[128+O5]=Bz+15.
elseif(HMG=='A0VM')then
set V74['p'+O5]=Bz+40.
if((KAG)and((GetUnitState(it,UNIT_STATE_MANA))>'n')and((Bz>V74[O5])or(KA8(it,'A0VZ')))and(Bz>V74[16+O5])and(h4[O5]!=null))then
set J4=K_8(it,D07,D07,D07,'A0VZ')and(C_7(it,852505,'A0VZ',h4[O5]))
endif
if((not J4)and(KAG))then
set J4=L17(it,h4[O5])
endif
elseif(HMG=='A0VP')then
set V74[160+O5]=Bz+25.
elseif(HMG=='A21Y' or HMG=='A1GU')then
set UP=GetUnitAbilityLevel(it,'A21Y')
if(UP>0)then
if(UP==1)then
set V74[O5]=Bz+22.
elseif(UP==2)then
set V74[O5]=Bz+17.
elseif(UP==3)then
set V74[O5]=Bz+12.
else
set V74[O5]=Bz+5.
endif
else
set UP=GetUnitAbilityLevel(it,'A1GU')
if(UP>0)then
if(UP==1)then
set V74[O5]=Bz+16.
elseif(UP==2)then
set V74[O5]=Bz+8.
elseif(UP==3)then
set V74[O5]=Bz+4.
else
set V74[O5]=Bz+2.
endif
endif
endif
endif
elseif(i1=='E02F')then
if(HMG=='A1RJ')then
if(KAG)then
if((GetUnitLifePercent(it)<40.)or(VT4[O5]))then
call Y07(.7)
call DE8(it,852244,'A20N')
endif
set VS4[O5]=false
if((GetUnitLifePercent(it)<40.))then
set J4=IssueImmediateOrderById(it,852662)
else
set m5=JS8(600.,it)
if(m5!=null)then
call J1G(it,m5,true)
call TriggerSleepAction(.5)
set J4=(h4[O5]!=null)and(iU(it))and(IssueTargetOrderById(it,851983,h4[O5]))
endif
endif
set VT4[O5]=false
endif
elseif(HMG=='A1YX')then
call XK7("Icarus casted Firespirits")
elseif(HMG=='A1RK')then
call XK7("Icarus casted Super nova")
set hq[O5]=Bz+110.
elseif(HMG=='A1YY')then
if KAG and(h4[O5]!=null)then
call K9G(O5,it)
endif
endif
elseif(i1=='U000')then
if(HMG=='A0X7')then
if(m5==null)then
set m5=K3(600.,it,Condition(function Kr))
endif
if(not KAG)then
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitAbilityLevel(m5,'BPSE')>0))then
call EOG(it,m5)
endif
elseif((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitAbilityLevel(m5,'BPSE')>0))then
call J1G(it,m5,true)
set UP=R2I(GetUnitState(m5,UNIT_STATE_LIFE))
if((not A87(it))and(AO7(1200.,m5,Condition(function GC8))==0)and(UP<(150+(300*GetUnitAbilityLevel(it,'A09U'))))and(UP>200))then
set GZ[O5]=true
set h4[288+O5]=m5
set J4=J8(O5,(DE8(it,852129,'A09U')))
endif
if((not J4)and((not A87(it))or(AF7(m5,it))))then
set J4=(D78(it,852248,'A1H5',0,m5))or((UP>150)and(GetUnitLifePercent(m5)<40.)and(JUG(it,m5)))or(IssueTargetOrderById(it,851983,m5))or(IssueTargetOrderById(it,851986,m5))
endif
endif
elseif(HMG=='A09U')then
if(KAG)then
call ExecuteFunc("I9G")
set J4=true
endif
endif
elseif(i1=='E004')then
if(HMG=='A030')then
set m5=JS8(400.,it)
if(m5==null)then
set m5=JS8(700.,it)
endif
if(m5!=null)then
call J1G(it,m5,true)
call TriggerSleepAction(.5)
set J4=(KAG)and(h4[O5]!=null)and(iU(it))and(IssueTargetOrderById(it,851983,h4[O5]))
endif
elseif((KAG)and(HMG=='A025'))then
call ExecuteFunc("IJG")
set J4=true
elseif(HMG=='AHfa')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<60.))then
call EOG(it,m5)
endif
endif
elseif(i1=='Udre')then
if(HMG=='A08C')then
call J1G(it,m5,true)
elseif((HMG=='A02H')and((not PO8())or(A87(m5))))then
if(not PO8())then
set hq[512+O5]=Bz+5.
endif
call J1G(it,m5,true)
elseif(HMG=='A03K')then
set UP=GetUnitAbilityLevel(it,HMG)
if(UP<3)then
set hq[O5]=Bz+300.-(UP*60.)
else
set hq[O5]=Bz+125.
endif
if(not A87(it))then
set m5=JS8(500.,it)
call J1G(it,m5,true)
call TriggerSleepAction(.5)
set J4=(KAG)and(D78(it,852095,'A02H',0,m5))
endif
endif
elseif(i1=='UC91')then
if((HMG=='A29K')and(not A87(it)))then
call J1G(it,JS8(320.,it),true)
elseif(HMG=='A05C')then
if(not KAG)then
elseif(A87(it))then
call F28(it,false)
else
set m5=h4[O5]
if(m5==null)then
set m5=JS8(500.,it)
endif
set J4=(m5!=null)and(GetUnitLifePercent(m5)<50.)and(IssueTargetOrderById(it,851983,m5))
endif
elseif(HMG=='A034')then
call J1G(it,m5,IsUnitInRange(it,m5,400.))
call G7G(it,m5)
set J4=(KAG)and(IsUnitInRange(it,m5,300.))and(DE8(it,852127,'A29K'))
endif
elseif(i1=='UC42')then
if(HMG=='A094')then
if(GetUnitLifePercent(m5)<60.)then
call J1G(it,m5,true)
endif
elseif(HMG=='A1OP')then
set m5=K2(600.,HC[O5])
if((m5!=null)and(GetUnitLifePercent(m5)<70.))then
call J1G(it,m5,true)
call G7G(it,m5)
endif
set J4=(KAG)and(GetUnitManaPercent(it)>40.)and(D78(it,852231,'A094',0,m5))
elseif((HMG=='A0MU')or(HMG=='A0A2'))then
set UP=GetUnitAbilityLevel(it,HMG)
if((HMG=='A0A2')and(UP<3))then
set UP=UP+1
endif
set hq[O5]=Bz+210.-(30.*UP)
set J4=(not A87(it))or(A87(m5))
call J1G(it,m5,J4)
if((KAG)and(J4))then
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'A1OP',true)
set GZ[O5]=true
set J4=J8(O5,(D78(it,852231,'A094',0,m5))or(IssueTargetOrderById(it,852488,m5)))
endif
elseif(HMG=='A10R')then
set UP=GetUnitAbilityLevel(it,HMG)
if(KAG)and(GJ7)then
set UP=GetRandomInt(1,2)
if(UP==1)then
call QM8("YUMMY CREEP!!!",3.5,it,.025,'d',0,200,216)
elseif(UP==2)then
call QM8("MMM DELICIOUS!!!",3.5,it,.025,'d',0,200,216)
endif
endif
endif
elseif(i1=='NC00')then
if(HMG=='AHtb')then
call J1G(it,m5,true)
elseif(HMG=='A01Y')then
set GZ[128+O5]=false
set G0[32+O5]=false
endif
elseif((i1=='Eevi')or(i1=='Eevm')or(i1=='E02V')or(i1=='E02W')or(i1=='E02U'))then
if(HMG=='A1RI')then
set UP=GetUnitAbilityLevel(it,HMG)
set hq[O5]=Bz+70.
if(KAG)then
set J4=(IssueImmediateOrderById(it,852600))
if not J4 then
set J4=((h4[O5]!=null)and(A47(h4[O5],it))and(C_7(it,852119,'A2KZ',h4[O5])))
if(AR7(it,BU[sijiadizhiyan]))then
call Y07(.2)
call RemoveItem(AV7(it,BU[sijiadizhiyan]))
call UnitAddItemByIdSwapped(BU[sijiadizhiyan2],it)
endif
endif
endif
endif
elseif(i1=='Ekee')then
if(HMG=='A06W')then
call J1G(it,K2(125.+(25.*GetUnitAbilityLevel(it,'A06W')),HC[O5]),true)
elseif(HMG=='A035')then
set hq[O5]=Bz+32.-(2.*GetUnitAbilityLevel(it,'A035'))
set hq[240+O5]=Bz+7.
set m5=JS8(500.,it)
if(m5!=null)then
call G7G(it,m5)
endif
if(KAG)then
set J4=(m5!=null)and(IssueTargetOrderById(it,851983,m5))
loop
if((iU(it))and(not G0[O5])and(G0[128+O5])and(GetUnitLifePercent(it)>60.))then
if(AO7(450.,it,Condition(function k3))==0)then
set m5=AH7(800.,L_7(it),Condition(function k3))
set J4=((m5!=null)and(IssueTargetOrderById(it,851986,m5)))or(D48(it,851983,h8[O5]))
else
call D48(it,851983,h8[O5])
endif
endif
exitwhen((Bz>hq[240+O5])or(not Z_7(it)))
call Y07(1.)
endloop
else
if((m5!=null)and(GetUnitLifePercent(m5)<50.))then
call EOG(it,m5)
endif
endif
elseif((HMG=='A21F')or(HMG=='A21G'))then
set m5=JS8(300.,it)
if(m5!=null)then
call J1G(it,m5,true)
call G7G(it,m5)
set J4=(KAG)and(IssueTargetOrderById(it,851986,m5))
endif
elseif(HMG=='A06V')and(KAG)and(m5!=null)then
if(GetHeroLevel(it)>6)or(GetUnitLifePercent(m5)<60.)then
call MoveLocation(HA,GetUnitX(m5)+(90.+(25*GetUnitAbilityLevel(it,'A06W')))*Cos(GetUnitFacing(m5)*bj_DEGTORAD),GetUnitY(m5)+(90.+(25*GetUnitAbilityLevel(it,'A06W')))*Sin(GetUnitFacing(m5)*bj_DEGTORAD))
if(Z87(GetUnitX(it),GetUnitY(it),GetLocationX(HA),GetLocationY(HA))<750)or(S19(m5))then
set J4=L77(it,852224,'A06W',HA)
endif
endif
endif
elseif(i1=='Ulic')then
if((HMG=='A05T')or(HMG=='A08H'))then
set UP=GetUnitAbilityLevel(it,HMG)
if(UP!=3)then
set hq[O5]=Bz+175.-(UP*30.)
else
set hq[O5]=Bz+60.
endif
call J1G(it,JS8(750.,it),true)
endif
elseif(i1=='UC18')then
if(HMG=='A0X5')then
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call J1G(it,m5,true)
if(KAG)then
set J4=(IssueTargetOrderById(it,851983,m5))or(IssueTargetOrderById(it,851986,m5))
call Y07(1.)
set UP=R2I(GetUnitState(m5,UNIT_STATE_LIFE))
if((not GV8(m5))and(UP>200.)and(UP<JMG(it)))then
set GZ[O5]=true
set J4=J8(O5,D78(it,852119,'A095','A09W',m5))
endif
endif
endif
elseif((HMG=='A095')or(HMG=='A09W'))then
set UP=GetUnitAbilityLevel(it,HMG)
if(UP!=3)then
set hq[O5]=Bz+210.-(UP*60.)
else
set hq[O5]=Bz+55.
endif
call J1G(it,m5,true)
endif
elseif(i1=='EC57')then
if((HMG=='A013')or(HMG=='A0A6'))then
set hq[16+O5]=Bz+160.-(20.*GetUnitAbilityLevel(it,HMG))
set m5=JS8(600.,it)
if(m5!=null)then
set J4=(KAG)and(D78(it,852669,'A173',0,m5))
if(not J4)then
call J1G(it,m5,true)
endif
endif
endif
elseif(i1=='UC11')then
if(HMG=='A29L')then
call J1G(it,JS8(150.,it),true)
set hq[O5]=Bz+130.-(10.*GetUnitAbilityLevel(it,HMG))
endif
if(HMG=='A1RD')then
if KAG then
if((not J4)and(GetHeroLevel(it)>5)and(Bz>hq[O5]))then
if((m5==null)and(G0[128+O5]))then
set m5=AH7(300.,b5,Condition(function k6))
endif
if((m5!=null)and(not IsUnitIllusion(m5))and(A87(m5)or GZ[208+O5]))then
set J4=(Kz(400.,L_7(it))>1)and(IsUnitInRange(it,m5,300.))and(DE8(it,852164,'A29L'))
call XK7("Attempt Reverse2")
endif
endif
endif
endif
elseif(i1=='H071')then
if(HMG=='A1IM')then
call J1G(it,JS8(150.,it),true)
elseif(HMG=='A1IN')then
set m5=h4[O5]
if m5==null then
set m5=JS8(250.,it)
endif
if((KAG)and(m5!=null))then
set J4=(IsUnitInRange(it,m5,300.))and(IssueImmediateOrderById(it,852526))or(IssueTargetOrderById(it,851983,m5))
if h4[O5]==null then
call VTF(O5,m5,false,false)
endif
endif
endif
elseif((i1=='U008')or(i1=='E015'))then
if(HMG=='A03D')then
set J4=(KAG)and((h4[O5]==null)or(GetUnitManaPercent(it)>50.))and(DE8(it,852600,'A0ZF'))
elseif(HMG=='A093')then
set hq[O5]=Bz+170.-(10.*GetUnitAbilityLevel(it,HMG))
set m5=h4[O5]
if((m5==null)or(not KAG))then
set m5=JS8(500.,it)
call VTF(O5,m5,false,false)
endif
if((m5!=null)and((not A87(it))or(A87(m5))))then
call J1G(it,m5,true)
call G7G(it,m5)
endif
endif
elseif(i1=='Hvsh')then
if(HMG=='A0EC')then
if(m5==it)then
set m5=h4[O5]
if((m5==null)or(not KAG))then
set m5=JS8(600.,it)
endif
endif
if((m5!=null)and(IsUnitEnemy(m5,GetOwningPlayer(it))))then
call J1G(it,m5,true)
endif
elseif(HMG=='A0LH')then
set hq[O5]=Bz+100.
set hq[512+O5]=Bz+6.
call J1G(it,m5,true)
call Y07(1.)
if(Z_7(m5))then
call J1G(it,m5,true)
set J4=(KAG)and(D78(it,852668,'A0EC',0,it))
endif
endif
elseif(i1=='Opgh')then
if(HMG=='A0S1')then
call J1G(it,m5,true)
elseif(HMG=='A0I6')then
set hq[O5]=Bz+14.
set m5=JS8(250.,it)
if(m5!=null)then
call J1G(it,m5,true)
set J4=(KAG)and(IssueTargetOrderById(it,852248,m5))
endif
endif
elseif(i1=='U00K')then
if(HMG=='A06R')then
set hq[O5]=Bz+160.-(20.*GetUnitAbilityLevel(it,'A06R'))
set hq[512+O5]=Bz+3.
if(KAG)then
set m5=JS8(300.,it)
if((m5==null)and(AR7(it,BU[keledebishou])))then
set m5=JS8(900.,it)
if(m5==null)then
set m5=JS8(1200.,it)
endif
if(m5==null)and(Bz>V74[16+O5])then
set m5=JS8(1300.+GetUnitAbilityLevel(it,'A06O')*'d',it)
endif
set J4=(m5!=null)and(UnitUseItemPoint(it,AV7(it,BU[keledebishou]),GetUnitX(m5),GetUnitY(m5)))
call Y07(.1)
if(m5==null)then
set hq[240+O5]=Bz+100.
endif
endif
if((not J4)and(m5!=null)and(Z_7(m5)))then
set J4=IssueTargetOrderById(it,851983,m5)
endif
endif
elseif(HMG=='A0S3')then
set m5=JS8(180.,it)
if((KAG)and(m5!=null)and(IsUnitInRange(it,m5,200.))and(GetUnitAbilityLevel(m5,'BPSE')>0))then
set J4=IssueImmediateOrderById(it,852581)
endif
elseif(HMG=='A06O')then
if(not A87(it))then
set hq[512+O5]=Bz+3.
endif
if((m5==null)or(not IsUnitType(m5,UNIT_TYPE_HERO))or(not IsUnitInRange(it,m5,200.)))then
set m5=JS8(350.,it)
endif
if(m5!=null)then
call EOG(it,m5)
if(not KAG)then
elseif((IsUnitInRange(it,m5,200.))and(Z_7(m5)))then
call VTF(O5,m5,false,false)
set J4=((GetUnitState(m5,UNIT_STATE_LIFE)<200.)and(IssueTargetOrderById(it,851983,m5)))or((Bz>hq[O5])and(AO7(600.,it,Condition(function GQ8))>1)and(R2I(GetUnitState(it,UNIT_STATE_MANA))>150+(75*GetUnitAbilityLevel(it,'A06R')))and(LL7(it,BU[heihuangzhang])))or(IssueImmediateOrderById(it,852581))or(IssueTargetOrderById(it,851983,m5))
else
set J4=IssueTargetOrderById(it,851983,m5)
endif
endif
endif
elseif(i1=='Nfir')then
if(HMG=='A29J')then
set hq[O5]=Bz+130.-(GetUnitAbilityLevel(it,HMG)*10.)
set m5=JS8(150.,it)
if(m5==null)then
set m5=JS8(300.,it)
if(m5==null)then
set m5=JS8(600.,it)
endif
endif
if(m5!=null)then
call J1G(it,m5,true)
endif
elseif((HMG=='A0EY')or(HMG=='A0FH')or(HMG=='A0F0'))then
set J4=(KAG)and(GetUnitAbilityLevel(it,'B07T')==0)and(GetUnitManaPercent(it)>30)and(GetHeroLevel(it)>3)and((JSG(it,200.,852164,'A0EY'))or(JSG(it,450.,852588,'A0FH'))or(JSG(it,700.,852599,'A0F0')))
if(not J4)then
if(HMG=='A0EY')then
set UP=200
elseif(HMG=='A0FH')then
set UP=450
else
set UP=700
endif
call MoveLocation(Ha,GetUnitX(it)+UP*Cos(GetUnitFacing(it)*bj_DEGTORAD),GetUnitY(it)+UP*Sin(GetUnitFacing(it)*bj_DEGTORAD))
set m5=K2(250.,Ha)
set J4=(KAG)and(m5!=null)and(IssueTargetOrderById(it,851983,m5))
endif
if((m5!=null)and(GetUnitLifePercent(m5)<50.))then
call EOG(it,m5)
endif
endif
elseif(i1=='U00F')then
if(HMG=='A06I')then
set hq[16+O5]=Bz+14.
if KAG then
set m5=JS8(225,it)
if m5!=null then
call VTF(O5,m5,false,false)
set J4=D78(it,852480,'A0FL','A1CX',m5)
endif
endif
elseif(HMG=='A0FL')then
set hq[O5]=Bz+30.
if KAG and GetUnitLifePercent(m5)<30 then
set J4=VMF(it,m5)
endif
endif
elseif(i1=='U00E')then
if((HMG=='A067')or(HMG=='A08P'))then
call J1G(it,m5,true)
endif
elseif(i1=='Oshd')then
if(HMG=='A04Y')then
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))and(IsUnitEnemy(m5,GetOwningPlayer(it))))then
call J3(it,false)
loop
exitwhen(GetUnitAbilityLevel(m5,'B02F')==0)
call Y07(1.)
endloop
call JLG(it,m5)
set J4=(KAG)and(G0[128+O5])and(is(it))and(D78(it,852119,'A0GK',0,m5))
endif
elseif(HMG=='A02Q')then
set J4=(KAG)and(Z_7(m5))and(not A87(it))and((D78(it,852119,'A0GK',0,m5))or(IssueTargetOrderById(it,851983,m5)))
set hq[O5]=Bz+120.
endif
elseif(i1=='Ofar')then
if(HMG=='A046')then
call J1G(it,m5,true)
set hq[O5]=Bz+12.
elseif(HMG=='A29I')then
call J1G(it,JS8(550.,it),true)
set hq[16+O5]=Bz+150.
endif
elseif(i1=='UC76')then
if((HMG=='A073')or(HMG=='A03J')or(HMG=='A04J')or(HMG=='A04M')or(HMG=='A04N'))then
if(not A87(it))then
set m5=K2(600.,HC[O5])
if(m5!=null)then
call J1G(it,m5,true)
call G7G(it,m5)
endif
endif
endif
elseif(i1=='E01B')then
if(HMG=='A0HW')then
if((m5==null)or(not IsUnitType(m5,UNIT_TYPE_HERO)))then
elseif(GetUnitLifePercent(m5)<60.)then
call J1G(it,m5,true)
if((A87(m5))and(KAG))then
set J4=IssueImmediateOrderById(it,852490)
endif
else
call EOG(it,m5)
endif
elseif(HMG=='A0H9')then
call J1G(it,JS8(1000.,it),true)
set hq[240+O5]=Bz+2.+(1.5*GetUnitAbilityLevel(it,'A0H9'))
set hq[16+O5]=Bz+180.-(30.*GetUnitAbilityLevel(it,'A0H9'))
elseif(HMG=='A0HA')then
call J1G(it,JS8(500.,it),true)
if(KAG)then
call MH8(it)
endif
endif
elseif(i1=='E01A')then
if(HMG=='A0NM')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
call J1G(it,m5,GetUnitLifePercent(it)>50.)
if((KAG)and((GetUnitLifePercent(it)>50.)or(GetUnitLifePercent(m5)<40.)))then
call Y07(.5)
set J4=D78(it,852089,'A0NO',0,m5)
endif
endif
elseif(HMG=='A0NO')then
set m5=K2(300.,HC[O5])
if(m5!=null)then
call J1G(it,m5,true)
set J4=(KAG)and(((not kr(it))and(D78(it,852597,'A0NT','A0NX',m5)))or(D78(it,852119,'A0NM',0,m5)))
endif
elseif((HMG=='A0NT')or(HMG=='A0NX'))then
set hq[O5]=Bz+90.
endif
elseif(i1=='U00P')then
if(HMG=='A0OJ')then
call Y07(GetUnitAbilityLevel(it,'A0OJ')+.6)
if((m5!=null)and(Z_7(m5))and(IsUnitType(m5,UNIT_TYPE_HERO))and(IsUnitVisibleEx(m5,GetOwningPlayer(it))))then
call J1G(it,m5,GetUnitLifePercent(it)>50.)
endif
elseif((HMG=='A0OK')or(HMG=='A1VW'))then
set hq[O5]=Bz+160.
call J1G(it,K2(500.,HC[O5]),true)
elseif(HMG=='A0OI')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<60.))then
call EOG(it,m5)
endif
endif
elseif(i1=='E01C')then
if(HMG=='A0AS')then
if((IsUnitEnemy(m5,GetOwningPlayer(it)))and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call J1G(it,m5,true)
endif
elseif(HMG=='A0J5')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
call EOG(it,m5)
call JLG(it,m5)
if(KAG)then
if((GetUnitLifePercent(m5)<80.)or(GZ[O5]))then
set GZ[O5]=true
set J4=J8(O5,D78(it,852224,'S008',0,m5))
endif
set J4=(J4)or(IssueTargetOrderById(it,852248,m5))
endif
endif
elseif(HMG=='S008')or(HMG=='S00U')then
set hq[O5]=Bz+165.
set m5=K2(500.,HC[O5])
if(m5!=null)then
call J1G(it,m5,true)
call TriggerSleepAction(.7)
if((KAG)and(AR7(it,BU[keledebishou]))and(not IsUnitInRange(it,m5,250.))and(GetUnitLifePercent(it)>70.)and(GetUnitAbilityLevel(it,'A06P')>1)and(Bz>hq[16+O5]))then
set J4=(GetHeroLevel(it)>5)and(JXG(it,m5))
endif
call TriggerSleepAction(.1)
if((KAG)and(HMG=='S00U')and(AR7(it,BU[shuaxinqiu]))and(GetUnitState(it,UNIT_STATE_MANA)>525+50*GetUnitAbilityLevel(it,'S00U')))then
set J4=(UnitUseItem(it,bj_lastCreatedItem))
if J4 then
call TriggerSleepAction(.1)
set J4=D78(it,852224,'S008',0,m5)
endif
endif
endif
elseif(HMG=='A06P')then
set hq[16+O5]=Bz+20.
endif
elseif((i1=='H00I')or(i1=='H00J'))then
if(HMG=='A0NB')then
set m5=K2(200.,HC[O5])
if(m5!=null)then
call J1G(it,m5,true)
if(KAG)then
call JAG(Y7[O5],m5)
call JAG(Y7[16+O5],m5)
call JAG(Y7[32+O5],m5)
call JAG(Y7[48+O5],m5)
endif
endif
elseif(HMG=='A0N8')then
set m5=JS8(400.,it)
if((KAG)and(not A87(it))and(m5!=null))then
call Y07(.5)
set J4=(GetUnitAbilityLevel(m5,'B078')==0)and(JBG(it,m5))
endif
endif
elseif(i1=='N01W')then
if(HMG=='A10Q')then
if((IsUnitEnemy(m5,GetOwningPlayer(it)))and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call J1G(it,m5,true)
set J4=(KAG)and(D78(it,852095,'A0NQ',0,m5))
endif
elseif(HMG=='A0NQ')then
call J1G(it,m5,true)
set J4=(KAG)and(IsUnitType(m5,UNIT_TYPE_HERO))and(IssueTargetOrderById(it,852248,m5))
elseif(HMG=='A10L')then
set hq[O5]=Bz+300.-(GetUnitAbilityLevel(it,HMG)*50.)
endif
elseif(i1=='N00R')then
if(HMG=='A01I')then
set m5=K2(250.,HC[O5])
if((m5!=null)and(GetUnitLifePercent(m5)<60.))then
call J1G(it,m5,true)
call G7G(it,m5)
endif
elseif(HMG=='A0RA')then
set m5=K2(250.,HC[O5])
if(m5!=null)then
call J1G(it,m5,true)
if((not A87(it))and(KAG))then
set J4=D78(it,852238,'A01I',0,m5)
endif
endif
elseif(HMG=='A0R0')then
call Y07(1.)
call IV(GetUnitX(it),GetUnitY(it),1000.,Condition(function Kq),function JCG)
if(KAG)then
call MH8(it)
endif
endif
elseif((i1=='H00R')or(i1=='H07I'))then
if(HMG=='A0QV')then
set m5=JS8(550.,it)
if(m5!=null)then
if(GetUnitLifePercent(m5)<60.)then
call G7G(it,m5)
endif
if((KAG)and((GetUnitLifePercent(m5)<60.)or(GetUnitManaPercent(it)>60.)))then
set H04=it
set J4=(AO7(1000.,it,Condition(function ny))>6)and(IssueTargetOrderById(it,852699,m5))
endif
endif
elseif((HMG=='A0R5')or(HMG=='A0R3'))then
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))and(IsUnitEnemy(m5,GetOwningPlayer(it)))and(GetUnitLifePercent(m5)<60))then
call J1G(it,m5,true)
if(HMG=='A0R3')then
call JLG(it,m5)
set h4[16+O5]=m5
if((KAG)and(not A87(it)))then
set H04=it
set J4=(DE8(it,'A0QV',851971))or((AO7(1000.,it,Condition(function ny))>4)and(IssueTargetOrderById(it,852699,m5)))
endif
endif
endif
endif
elseif(i1=='H00N')then
if(HMG=='A0QE')then
set m5=K2(250.,HC[O5])
if((m5!=null)and(GetUnitLifePercent(m5)<60.))then
call J1G(it,m5,true)
call G7G(it,m5)
endif
elseif(HMG=='A0QG')then
set UP=R2I(50.+(100.*GetUnitAbilityLevel(it,'A0QE')))
if(m5!=null)then
set m5=JS8(I2R(UP),m5)
endif
if((KAG)and(m5!=null))then
set HMG=R2I(bj_RADTODEG*Atan2(GetUnitY(it)-GetUnitY(m5),GetUnitX(it)-GetUnitX(m5)))
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'A0QE',true)
set J4=IssuePointOrderById(it,852089,GetUnitX(m5)+I2R(HMG)*Cos(UP*bj_DEGTORAD),GetUnitY(m5)+I2R(HMG)*Sin(UP*bj_DEGTORAD))
endif
elseif(HMG=='A0QK' or HMG=='A21Q')then
set hq[O5]=Bz+100.
endif
elseif(i1=='H008')then
if(HMG=='A0FW')then
call J1G(it,m5,true)
elseif(HMG=='A0GP')then
set m5=JS8(600.,it)
if((m5!=null)and(GetUnitLifePercent(m5)<65.))then
call J1G(it,m5,true)
endif
endif
elseif(i1=='E005')then
if((HMG=='A054')or(HMG=='A00U'))then
set UP=GetUnitAbilityLevel(it,HMG)
call J1G(it,JS8(650.,it),true)
call Y07(5.)
if(HMG=='A054')then
set hq[O5]=Bz+155.-(UP*20.)
else
set hq[O5]=Bz+145.-(UP*20.)
endif
endif
elseif(i1=='Npbm')then
if(HMG=='A06M')then
call J1G(it,JS8(250.,it),true)
set hq[O5]=Bz+12.
endif
elseif(i1=='H000')then
if(HMG=='A00S')then
call J1G(it,JS8(300.,it),true)
set hq[O5]=Bz+15.
set J4=(KAG)and(IssueImmediateOrderById(it,852526))
endif
elseif(i1=='N0M7'or i1=='N0MC'or i1=='N0MO'or i1=='N0MA'or i1=='N0MB')then
if KAG and(HMG=='A2NE')then
set J4=(h4[O5]!=null)and IssueTargetOrderById(it,852119,I88(h4[O5],350))
if J4 then
call TriggerSleepAction(.3)
endif
call IssueTargetOrderById(it,851983,h4[O5])
endif
if KAG and(HMG=='A0Z0')then
set W17=GetSpellTargetUnit()
if GetUnitTypeId(it)=='N0M7' then
call IssueImmediateOrderById(it,852180)
call TriggerSleepAction(.125)
endif
set J4=IssueTargetOrderById(it,852119,I88(it,350))
if J4 then
call TriggerSleepAction(.125)
endif
call IssueTargetOrderById(it,851983,W17)
set W17=null
endif
elseif(i1=='N0MK' or i1=='N0MM')then
if KAG and(HMG=='A2M1')then
set h4[O5]=GetSpellTargetUnit()
set J4=IssuePointOrderByIdLoc(it,852600,OM8(it,h4[O5],999999,3.3,0))
call TriggerSleepAction(.3)
call IssueTargetOrderById(it,851983,h4[O5])
elseif KAG and(HMG=='A2M0')then
set m5=V_7((m5!=null)and(G0[128+O5]),m5,B97((500+'d'*(GetUnitAbilityLevel(it,'A2M1'))),it,Condition(function k6)))
set J4=(m5!=null)and(G0[128+O5]and(GetUnitState(it,UNIT_STATE_MANA)>225. or AO7(600,it,Condition(function HK8))>=1))and IssueTargetOrderById(it,852095,m5)
set h4[O5]=V_7(h4[O5]!=null or(not J4),h4[O5],m5)
endif
elseif(i1=='Nbrn')then
if(HMG=='A026')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<60.))then
call EOG(it,m5)
endif
endif
elseif((i1=='Hlgr')or(i1=='H00F')or(i1=='H00E')or(i1=='H00G'))then
if(HMG=='A03G')then
set hq[O5]=Bz+135.
set m5=h4[O5]
if((m5==null)or(not KAG))then
set m5=JS8(700.,it)
call VTF(O5,m5,false,false)
endif
if(m5!=null)then
call J1G(it,m5,true)
call G7G(it,m5)
set J4=(KAG)and(((IsUnitInRange(it,m5,350.))and(C_7(it,852095,'A0AR',m5)))or(IssueTargetOrderById(it,851983,m5)))
endif
endif
elseif(i1=='Edem')then
if(HMG=='A0E3')then
call J1G(it,m5,true)
endif
elseif((i1=='N016')or(i1=='N017')or(i1=='N02B'))then
set m5=h4[O5]
if(HMG=='A1EJ')then
if m5==null then
set m5=JS8(700.,it)
endif
if(m5!=null)then
call J1G(it,m5,true)
call G7G(it,m5)
endif
elseif(HMG=='A21M')and(m5!=null)and KAG then
if(m5!=null)and(IsUnitInRange(it,m5,200.))then
set J4=(i1=='N016')and(DE8(it,852138,'A0BE'))
if J4 then
set i1='N017'
endif
elseif(m5!=null)and((GetUnitLifePercent(m5)<15.)or((not G0[256+O5])and(X_7(it)<2000.)))then
elseif(GetHeroLevel(it)>=6 or h4[O5]!=null)and(LC7(it,BU[heihuangzhang]))then
set J4=(i1=='N016')and(DE8(it,852138,'A0BE'))
endif
if(not J4)then
call IssueTargetOrderById(it,851983,m5)
endif
elseif(HMG=='A0BE')and(m5!=null)and KAG then
call IssueTargetOrderById(it,851983,m5)
if(not J4)and(h4[O5]!=null)then
call TriggerSleepAction(.1)
if(i1!='N016')then
set J4=C_7(it,852218,'A21M',m5)
else
set J4=(IsUnitInRange(it,m5,400.)and(DE8(it,852177,'A21N')))
endif
endif
endif
elseif(i1=='Usyl')then
if(HMG=='A04P')then
call EOG(it,m5)
set hq[O5]=Bz+40.-(10.*GetUnitAbilityLevel(it,'A04P'))
endif
elseif(i1=='Naka')then
if(HMG=='A07A')then
set hq[O5]=Bz+20.
if(KAG)then
call ExecuteFunc("IJG")
set J4=true
endif
endif
elseif(i1=='Orkn')then
if(HMG=='A00P')then
set J4=(KAG)and((D78(it,852502,'A0RX',0,m5))or(IssueTargetOrderById(it,851983,m5)))
set hq[16+O5]=Bz+16.
endif
elseif(i1=='Hmbr')then
if(HMG=='A020')then
set J4=(KAG)and(IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<60.)and(D78(it,852095,'A0JC',0,m5))
elseif(HMG=='A0JC')then
set J4=(KAG)and(IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<60.)and(D78(it,852119,'A020',0,m5))
if((IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<60.))then
call EOG(it,m5)
endif
elseif((HMG=='A29G')or(HMG=='A29H'))then
set hq[O5]=Bz+120.
call J1G(it,JS8(700.,it),true)
endif
elseif(i1=='Emoo')then
if(HMG=='A0DX')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
call J1G(it,m5,true)
endif
set hq[O5]=Bz+35.-(GetUnitAbilityLevel(it,HMG)*5.)
elseif(HMG=='A0DY' or HMG=='A1WB')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<60.))then
call EOG(it,m5)
endif
endif
elseif(i1=='Uktl')then
if(HMG=='A0I7')then
set hq[16+O5]=Bz+15.
call J1G(it,m5,true)
if((KAG)and(IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(it)>5)or(A87(m5))))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(h8[16+O5])-GetUnitY(m5),GetUnitX(h8[16+O5])-GetUnitX(m5)))
set J4=IssuePointOrderById(it,852600,GetUnitX(m5)+100.*Cos(UP*bj_DEGTORAD),GetUnitY(m5)+100.*Sin(UP*bj_DEGTORAD))
endif
elseif(HMG=='A0B1')then
set b5=HC[O5]
set m5=K2(400.,b5)
if(m5!=null)then
call G7G(it,m5)
endif
if((KAG)and(not kr(it)))then
set J4=(m5!=null)and(GetUnitLifePercent(m5)<75.)and((DI8(not IsUnitAlly(it,G8[0]))<=2)or(GetHeroLevel(it)<11))and(IssuePointOrderByIdLoc(it,852188,b5))
if(not J4)then
set UP=AN7(400.,b5,Condition(function GQ8))
set J4=((UP>1)or(UP==DI8(not IsUnitAlly(it,G8[0])))or((UP>0)and(AN7(700.,b5,Condition(function GQ8))>1)and(AN7(700.,b5,Condition(function G68))>0)))and(IssuePointOrderByIdLoc(it,852188,b5))
endif
endif
elseif(HMG=='A1BX')then
set UP=GetUnitAbilityLevel(it,HMG)
set hq[O5]=Bz+210.-(UP*10.)
set m5=JS8(400.,it)
set J4=(KAG)and(m5!=null)and(IssueTargetOrderById(it,851983,m5))
endif
elseif(i1=='Hblm')then
if(HMG=='A085')then
set hq[O5]=Bz+10.
call MoveLocation(Ha,GetUnitX(it)+400*Cos(GetUnitFacing(it)*bj_DEGTORAD),GetUnitY(it)+400*Sin(GetUnitFacing(it)*bj_DEGTORAD))
set m5=K2(400.,Ha)
if(m5!=null)then
call G7G(it,m5)
endif
endif
elseif(i1=='Ntin')then
if(HMG=='A049')then
set hq[32+O5]=Bz+14.
if(GetUnitLifePercent(m5)<60.)then
call J1G(it,m5,true)
endif
elseif(HMG=='A05E')then
set hq[O5]=Bz+25.
elseif(HMG=='A0BQ')then
set hq[16+O5]=Bz+35.
set m5=K2(500.,HC[O5])
if(m5!=null)then
call G7G(it,m5)
endif
if((KAG)and(m5!=null)and(AR7(it,BU[xieeliandao])))then
set J4=UnitUseItemTarget(it,bj_lastCreatedItem,m5)
endif
elseif(HMG=='A065')then
set hq[O5]=Bz
set hq[16+O5]=Bz
set hq[32+O5]=Bz
set hq[80+O5]=Bz
set hq[96+O5]=Bz
endif
elseif(i1=='O00P')then
if(HMG=='A0G6')then
if((KAG)and(GetHeroLevel(it)>5)and((not A87(it))or(Id(O5))))then
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<60.)and(not IsUnitInRange(it,m5,300.)))then
set GZ[O5]=true
set J4=(J8(O5,D78(it,852218,'A0FN',0,m5)))
endif
endif
elseif(HMG=='A0G8')then
call J1G(it,JS8(700.,it),true)
elseif(HMG=='A0GC')then
call J1G(it,JS8(500.,it),true)
endif
elseif(i1=='HC49')then
if(HMG=='A07U')then
set hq[32+O5]=Bz+120.
call Y07(.5)
set J4=(KAG)and(not A87(it))and(DE8(it,852123,'A063'))
elseif(HMG=='A24D')then
set hq[O5]=Bz+14.
call J1G(it,m5,true)
set J4=(KAG)and(not A87(it))and((DE8(it,852526,'A2KU'))or(DE8(it,852123,'A063')))
elseif(HMG=='A063')and(KAG and(h4[O5]!=null)and(not A87(it)))then
set J4=(OY8(it,h4[O5]))and(DE8(it,852526,'A2KU'))
endif
elseif(i1=='Nbbc')then
if(HMG=='A05G')then
set hq[240+O5]=Bz+5.
set m5=JS8(600.,it)
if(m5!=null)then
call G7G(it,m5)
endif
if(KAG)then
loop
if((m5!=null)and(GetUnitLifePercent(m5)<GetUnitLifePercent(it)))then
call IssuePointOrderById(it,851986,GetUnitX(m5)+GetRandomReal(0,300.)-150.,GetUnitY(m5)+GetRandomReal(0,300.)-150.)
elseif((not G0[O5])and(G0[128+O5])and(not A87(it)))then
if(AO7(200.,it,Condition(function k3))==0)then
call D48(it,851983,h8[O5])
endif
endif
if(not G0[128+O5])then
set m5=null
endif
exitwhen(Bz>=hq[240+O5])
call Y07(.5)
endloop
set m5=JS8(500.,it)
if((m5!=null)and(not GV8(m5))and(GetUnitState(m5,UNIT_STATE_LIFE)<1200.)and(GetUnitAbilityLevel(m5,'Bcyc')==0)and(GetUnitAbilityLevel(m5,'Bcy2')==0))then
set UP=AO7(850.,m5,Condition(function GQ8))
set J4=((UP-(AO7(850.,m5,Condition(function k3))))>=0)and(D78(it,852095,'A0M1','A1AX',m5))
endif
else
call EOG(it,m5)
endif
endif
elseif(i1=='Hjai')then
if(HMG=='A0S3')then
set m5=JS8(450.,it)
if((KAG)and(m5!=null)and(not A87(it)))then
set J4=IssueImmediateOrderById(it,852600)
endif
elseif((HMG=='A03R')or(HMG=='A0AV'))then
set hq[O5]=Bz+180.-(GetUnitAbilityLevel(it,HMG)*30.)
endif
elseif(i1=='HC92')then
if(HMG=='A0RG')then
set hq[O5]=Bz+15.
set b5=HC[O5]
set m5=K2(I2R(250+(25*GetUnitAbilityLevel(it,'A0RG'))),b5)
if(m5!=null)then
call J1G(it,m5,true)
set J4=(KAG)and(not A87(it))and(G0[128+O5])and(not IsUnitInRangeLoc(m5,b5,200.))and(IssueTargetOrderById(it,852600,m5))
endif
endif
elseif(i1=='H001')then
if(HMG=='A0S3')then
set m5=JS8(800.,it)
set J4=(KAG)and(m5!=null)and(DE8(it,852663,'A1WH'))
endif
elseif(i1=='H00A')then
if(HMG=='A0LV')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and(IsUnitEnemy(m5,GetOwningPlayer(it)))and(GetUnitLifePercent(m5)<60.))then
call J1G(it,m5,true)
endif
elseif(HMG=='A28T')then
set hq[O5]=Bz+30.
elseif(HMG=='A0LT' or HMG=='A1CS')then
set hq[16+O5]=Bz+120.
endif
elseif(i1=='H004')then
if((HMG=='A01P')or(HMG=='A09Z'))then
if(UP!=3)then
set hq[O5]=Bz+210.-(UP*60.)
else
set hq[O5]=Bz+55.
endif
call J1G(it,m5,true)
endif
elseif(i1=='Ucrl')or(i1=='U01X')then
if(HMG=='A0LL')then
set b5=HC[O5]
set m5=K2(300.,b5)
if(m5!=null)then
call J1G(it,m5,true)
call TriggerSleepAction(1.)
set J4=(KAG)and(IsUnitInRange(it,m5,250.))and(AN7(300.,b5,Condition(function k0))<=2)and(IssueTargetOrderById(it,852600,m5))
endif
elseif(HMG=='A0BZ')then
set hq[O5]=Bz+15.
call Y07(1.2)
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call J1G(it,m5,true)
endif
elseif(HMG=='A1VG')then
set V74[64+O5]=Bz+30
call Y07(.8)
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call J1G(it,m5,true)
endif
endif
elseif(i1=='Otch')then
if(HMG=='A0DL')then
call J1G(it,JS8(250.,it),true)
elseif(HMG=='A0DH' or HMG=='A1OB')then
set hq[O5]=Bz+170.-(GetUnitAbilityLevel(it,HMG)*20.)
call J1G(it,JS8(500.,it),true)
elseif(HMG=='A0SK')then
set m5=K3(900.,it,Condition(function Kr))
if(m5!=null)then
call J1G(it,m5,true)
set J4=(KAG)and(GetUnitLifePercent(it)>50.)and(GetUnitLifePercent(m5)<60.)and(G0[128+O5])and(AO7(700.,m5,Condition(function GQ8))<=2)and(JXG(it,m5))
endif
endif
elseif(i1=='N01A')then
if(HMG=='A14L')then
if(GetUnitLifePercent(m5)<60.)or(GetUnitManaPercent(it)>60 or GetUnitState(it,UNIT_STATE_MANA)>400.)then
set J4=(KAG)and IssueTargetOrderById(it,852095,m5)
call J1G(it,m5,true)
endif
elseif(HMG=='A0L3')then
set hq[O5]=Bz+160.
elseif(HMG=='A0LZ')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<60.))then
call EOG(it,m5)
endif
endif
elseif(i1=='H00K')then
if(HMG=='A06B')then
call J1G(it,JS8(300.,it),true)
endif
if(HMG=='A05J' or HMG=='A06H' or HMG=='A0AK' or HMG=='A1FY')and KAG then
set b5=HC[O5]
if(h9[48+O5]!=null)and(IsUnitInRangeLoc(h9[48+O5],b5,600.))then
set F37=300
call MoveLocation(HA,GetUnitX(h9[48+O5]),GetUnitY(h9[48+O5]))
if GetUnitUserData(h9[48+O5])>'d' then
set F37=150
endif
else
set F37=150
call MoveLocation(HA,GetLocationX(b5),GetLocationY(b5))
endif
if(not J4)and(Bz>V74[16+O5])and(GetUnitState(it,UNIT_STATE_MANA)>WPF(it,'A05J',I87)+WPF(it,'A06B',I87))then
call MoveLocation(HA,GetLocationX(HA)+GetRandomReal(-F37,F37),GetLocationY(HA)+GetRandomReal(-F37,F37))
set J4=(L77(it,852278,'A05J',HA))
endif
set bj_lastLoadedUnit=it
if(not J4)and(Bz>V74[32+O5])and(GetUnitState(it,UNIT_STATE_MANA)>WPF(it,'A06H',I87)+WPF(it,'A06B',I87))and(AN7(600.,HA,Condition(function J98))==0)then
call MoveLocation(HA,GetLocationX(HA)+GetRandomReal(-100.,100.),GetLocationY(HA)+GetRandomReal(-100.,100.))
set J4=(L77(it,852114,'A06H',HA))
endif
if((not J4)and(GetHeroLevel(it)>5)and(Bz>V74[O5])and(GetUnitState(it,UNIT_STATE_MANA)>WPF(it,'A0AK',I87)+WPF(it,'A1FY',I87)+WPF(it,'A06B',I87))and(AN7(600.,HA,Condition(function KG))<8))then
set hq[240+O5]=Bz+5.
set J4=(D88(it,852504,'A0AK','A1FY',GetLocationX(HA)+GetRandomReal(-F37,F37),GetLocationY(HA)+GetRandomReal(-F37,F37)))
endif
if(not J4)and((HMG=='A05J')or(HMG=='A06H'))and KAG then
call VQF(it,false)
endif
endif
elseif(i1=='Huth')then
if(HMG=='A0LC')then
set m5=JS8(550.,it)
set J4=(KAG)and(m5!=null)and(((IsUnitInRange(it,m5,250.))and(DE8(it,852096,'A03Y')))or(IssueTargetOrderById(it,851983,m5)))
endif
elseif(i1=='Hamg')then
if(HMG=='A07Z')then
set m5=JS8(700.,it)
call J1G(it,m5,true)
if((KAG)and(m5!=null))then
set J4=JWG(it)
call Y07(1.)
call IssueTargetOrderById(it,851983,m5)
else
call Y07(1.)
endif
call Y07(7.)
set hq[O5]=Bz+152.
endif
elseif(i1=='H00D')then
if(HMG=='A0O2' or HMG=='A289')then
set hq[O5]=Bz+60.
call J1G(it,m5,true)
if(KAG)then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(m5)-GetUnitY(it),GetUnitX(m5)-GetUnitX(it)))
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'A0O1',true)
set GZ[O5]=true
set J4=J8(O5,IssuePointOrderById(it,852218,GetUnitX(it)+900.*Cos(UP*bj_DEGTORAD),GetUnitY(it)+900.*Sin(UP*bj_DEGTORAD)))
endif
elseif(HMG=='A0O1')then
if(m5==null)then
set m5=K2(300.,HC[O5])
endif
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call J1G(it,m5,true)
endif
endif
elseif(i1=='E00P')then
if(HMG=='A0O7')then
set m5=JS8(500.,it)
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<60.))then
call J1G(it,m5,true)
set J4=(KAG)and(L77(it,852580,'A0O6',OM8(it,m5,2000.,.65,1100.)))
endif
elseif(HMG=='A0O6')then
set hq[O5]=Bz+16.
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call J1G(it,m5,true)
call Y07(1.5)
set J4=(KAG)and(GetUnitLifePercent(m5)<65.)and(GetUnitState(m5,UNIT_STATE_LIFE)>150.)and(IsUnitType(m5,UNIT_TYPE_STUNNED))and(D78(it,852125,'A0O5',0,m5))
endif
elseif(HMG=='A0O5')then
if(m5==null)then
set m5=K2(650.,HC[O5])
endif
call J1G(it,m5,true)
if(m5!=null)then
call G7G(it,m5)
set J4=(KAG)and(L77(it,852580,'A0O6',OM8(it,m5,2000.,.65,1100.)))
endif
endif
elseif((i1=='N01I')or(i1=='N01H')or(i1=='N01T')or(i1=='N01J'))then
if(HMG=='A0IL')then
set hq[O5]=Bz+22.
set m5=K2(600.,HC[O5])
if(m5!=null)then
call J1G(it,m5,true)
call G7G(it,m5)
endif
elseif(HMG=='A1NI')then
if((Z_7(m5))and(GetUnitLifePercent(m5)<65.))then
call EOG(it,m5)
endif
elseif(HMG=='ANcr')then
set hq[512+O5]=Bz+6.
set m5=JS8(500.,it)
if(m5!=null)then
call G7G(it,m5)
set J4=(KAG)and(not A87(it))and(IssueTargetOrderById(it,851983,m5))
endif
endif
elseif(i1=='N01V')then
if(HMG=='A0KV')then
set hq[O5]=Bz+12.
set m5=JS8(400.,it)
if((m5!=null)and(GetUnitLifePercent(m5)<60.))then
call J1G(it,m5,true)
endif
elseif(HMG=='A0L8')then
set hq[32+O5]=Bz+25.
call Y07(.1)
if(m5==null)then
set m5=K2(200.,HC[O5])
endif
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call J1G(it,m5,true)
endif
elseif(HMG=='A0KU')then
set hq[16+O5]=Bz+160.
endif
elseif(i1=='H00S')then
elseif(i1=='H00Q')then
if(HMG=='A0QR')then
call J1G(it,m5,true)
elseif(HMG=='A0QN')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<60.))then
call EOG(it,m5)
endif
endif
elseif(i1=='E01Y')then
if(HMG=='A1EA')then
call J1G(it,JS8(300.,it),true)
endif
elseif(i1=='N00B')then
if(HMG=='A0SC')then
set hq[16+O5]=Bz+20.
set m5=JS8(400.,it)
if(m5!=null)then
call J1G(it,m5,true)
if((KAG)and(GetUnitLifePercent(m5)<60.))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(m5)-GetUnitY(DH8(m5)),GetUnitX(m5)-GetUnitX(DH8(m5))))
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'A0S8',true)
set GZ[O5]=true
set J4=J8(O5,IssuePointOrderById(it,852089,GetUnitX(m5)+250.*Cos(UP*bj_DEGTORAD),GetUnitY(m5)+250.*Sin(UP*bj_DEGTORAD)))
endif
endif
elseif((HMG=='A0S8')or(HMG=='A1QP'))then
set hq[O5]=Bz+85.
set m5=K2(400.,HC[O5])
if(m5!=null)then
call J1G(it,m5,true)
set J4=(KAG)and(IsUnitInRange(it,m5,400.))and(IssueImmediateOrderById(it,852600))
endif
elseif(HMG=='A0SA')then
set m5=JS8(400.,it)
if((m5!=null)and(not A87(it)))then
call J1G(it,m5,true)
set J4=(KAG)and(IssueImmediateOrderById(it,852600))
if((not J4)and(KAG)and(GetUnitLifePercent(m5)<60.))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(m5)-GetUnitY(DH8(m5)),GetUnitX(m5)-GetUnitX(DH8(m5))))
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'A0S8',true)
set GZ[O5]=true
set J4=J8(O5,IssuePointOrderById(it,852089,GetUnitX(m5)+250.*Cos(UP*bj_DEGTORAD),GetUnitY(m5)+250.*Sin(UP*bj_DEGTORAD)))
endif
endif
if(KAG)then
call Y07(1.)
call MH8(it)
endif
endif
elseif(i1=='N0EG')then
if(HMG=='A12J')then
if KAG and GetUnitAbilityLevel(GetSpellTargetUnit(),'BPSE')>1 then
call VTF(O5,m5,false,false)
set J4=IssueTargetOrderById(it,852581,m5)
endif
endif
elseif(i1=='H00T')then
if(HMG=='A0Z8')or(HMG=='A1CV')or(HMG=='A0Z5')and KAG then
set m5=h4[O5]
if(m5==null)or(not IsUnitInRange(it,m5,170))then
set m5=JS8(170.,it)
if m5!=null then
call VTF(O5,m5,false,false)
endif
endif
if(HMG=='A0Z5')then
if A87(it)then
set bj_lastReplacedUnit=h9[16+O5]
set J4=true
elseif m5==null then
if h4[O5]!=null then
set bj_lastReplacedUnit=h4[O5]
else
set bj_lastReplacedUnit=h8[O5]
endif
set J4=true
endif
if J4 then
set m5=LUnit(GetHandleId(it),"AI|Cog1")
set bj_lastLoadedUnit=LUnit(GetHandleId(it),"AI|Cog2")
if Z47(m5,bj_lastReplacedUnit)>Z47(bj_lastLoadedUnit,bj_lastReplacedUnit)then
set m5=bj_lastLoadedUnit
endif
set bj_lastLoadedUnit=LUnit(GetHandleId(it),"AI|Cog3")
if Z47(m5,bj_lastReplacedUnit)>Z47(bj_lastLoadedUnit,bj_lastReplacedUnit)then
set m5=bj_lastLoadedUnit
endif
set bj_lastLoadedUnit=LUnit(GetHandleId(it),"AI|Cog4")
if Z47(m5,bj_lastReplacedUnit)>Z47(bj_lastLoadedUnit,bj_lastReplacedUnit)then
set m5=bj_lastLoadedUnit
endif
if m5!=null then
set h4[96+O5]=m5
set J4=IssueTargetOrderById(it,851983,m5)
if J4 then
set hq[832+O5]=Bz+1.
endif
loop
exitwhen GetWidgetLife(h4[96+O5])<.405
set J4=IssueTargetOrderById(it,851983,m5)
call Y07(.5)
endloop
call J3(it,false)
endif
endif
endif
if(not J4)and(m5!=null)then
if(not J4)and(Bz>V74[32+O5])and(m5!=null)and(IsUnitInRange(it,m5,210))then
set J4=IssueImmediateOrderById(it,852581)
endif
if(not J4)and(Bz>V74[16+O5])and(m5!=null)and(IsUnitInRange(it,m5,275))then
set J4=IssueImmediateOrderById(it,852600)
endif
endif
endif
elseif(i1=='H06S')then
set bj_forLoopAIndex=(GetUnitAbilityLevel(it,'A11N')-2)
if(HMG=='A11N')and(KAG)and(h4[O5]!=null)and(bj_forLoopAIndex>=0)and(Bz>V74[16+O5])and(not A87(it))then
set V74[16+O5]=Bz+4.
set b5=HC[O5]
if bj_forLoopAIndex>0 then
call Y07(bj_forLoopAIndex)
endif
call L77(it,852089,'A136',b5)
endif
elseif(i1=='O015')then
if HMG=='A1A8' and KAG then
set m5=h4[O5]
set b5=HC[O5]
if m5==null or((not IsUnitInRange(it,m5,300))and(not IsUnitInRangeLoc(it,b5,300)))then
set m5=JT8(300.,it)
set bj_lastReplacedUnit=JU8(300.,it,GetLocationX(b5),GetLocationY(b5))
endif
if(Bz>V74[16+O5])then
set J4=(h4[O5]!=null)
if GetUnitLifePercent(bj_lastReplacedUnit)<70. then
set J4=true
elseif GetUnitLifePercent(m5)<70. then
set J4=true
endif
set J4=((J4)and(IssueImmediateOrderById(it,852581)))
endif
if(not J4)then
set J4=IssueImmediateOrderById(it,852217)
endif
elseif HMG=='A1AA' and KAG then
set m5=h4[O5]
set b5=L_7(it)
if(TR4[O5]!=null)and(GetWidgetLife(TR4[O5])>.405)then
call MoveLocation(b5,GetUnitX(TR4[O5]),GetUnitY(TR4[O5]))
endif
set J4=false
if((m5==null or((not IsUnitInRange(it,m5,475))and(not IsUnitInRangeLoc(m5,b5,475)))))then
if G0[256+O5]then
set m5=JT8(475.,it)
set bj_lastReplacedUnit=JU8(475.,it,GetLocationX(b5),GetLocationY(b5))
if GetUnitLifePercent(m5)<GetUnitLifePercent(bj_lastReplacedUnit)then
call VTF(O5,m5,false,false)
set J4=true
else
set h4[O5]=bj_lastReplacedUnit
set m5=bj_lastReplacedUnit
set J4=true
endif
endif
else
set J4=true
endif
if((J4)and(Bz>V74[O5])and(not IsUnitIllusion(m5))and(GetUnitLevel(it)>=6)and(h4[O5]!=null)and(IsUnitInRange(it,m5,1200.)))then
set J4=(IssuePointOrderByIdLoc(it,852600,L_7(m5)))
else
set J4=false
endif
if(not J4)then
set J4=IssueImmediateOrderById(it,852217)
endif
endif
elseif(i1=='O016')then
if HMG=='A19O' then
if KAG then
set J4=DE8(it,852180,'A19Z')
if J4 then
call Y07(.1)
call D48(it,851986,h9[O5])
endif
endif
endif
elseif(i1=='E02H')then
if HMG=='A1S8' and KAG then
if(AO7(450,m5,Condition(function BU7))<=1)then
set J4=C_7(it,852089,'A1SB',m5)
endif
elseif HMG=='A1SB' then
set m5=LUnit(GetHandleId(it),"AI|SoulCatcherTgt")
if KAG then
if(h4[O5]==null)or(m5!=h4[O5]and GetUnitLifePercent(m5)<GetUnitLifePercent(h4[O5]))then
call VTF(O5,m5,false,false)
endif
endif
call JLG(it,m5)
endif
elseif(i1=='E02X')then
if(HMG=='A27G')then
set m5=JS8(500.,it)
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<60.))then
call J1G(it,m5,true)
set J4=(KAG)and(D78(it,852214,'A27F',0,m5))
endif
elseif(HMG=='A27F')then
set hq[O5]=Bz+18.
if((m5!=null)and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call J1G(it,m5,true)
endif
if(KAG)then
set F77=m5
set bj_lastLoadedUnit=JS8(600.,m5)
set F77=null
if bj_lastLoadedUnit==null then
if A87(it)then
set KCG=Atan2(GetUnitY(m5)-GetUnitY(it),GetUnitX(m5)-GetUnitX(it))
set J4=IssuePointOrderById(it,852598,GetUnitX(m5)+375*Cos(KCG),GetUnitY(m5)+375*Sin(KCG))
elseif A87(m5)or(not IsUnitType(m5,UNIT_TYPE_MELEE_ATTACKER))then
set J4=D48(it,852598,it)
endif
else
set J4=D48(it,852598,bj_lastLoadedUnit)
endif
set bj_lastLoadedUnit=null
endif
elseif HMG!='A27H' and HMG!='AZ1H' and HMG!='A27X' and hq[816+O5]>Bz and KAG then
set G0[288+O5]=true
call KBG()
endif
elseif(i1=='E02K')then
if(HMG=='A2CI')then
call J1G(it,m5,true)
call J1G(m5,it,true)
endif
elseif(i1=='N0M0')then
if HMG=='A2JL' and KAG then
call Y07(.2)
set m5=JS8(350.,it)
set bj_lastCreatedUnit=it
if(m5!=null)and(Bz>V74[16+O5])and((h4[O5]!=null)or(GetUnitLifePercent(m5)<70))and(AO7(400.,it,Condition(function BV7))<=2)then
set J4=DE8(it,852526,'A2H3')
endif
endif
elseif(i1=='H0DO')then
if(m5==null)then
set m5=h4[O5]
endif
if(not J4)and(KAG)and(Bz>V74[O5])and(S19(m5))then
set J4=(m5!=null)and(IssueTargetOrderById(it,852662,m5))
endif
if(HMG=='A2HN')then
if KAG and(not J4)and(Bz>V74[16+O5])then
set J4=(m5!=null)and(C_7(it,852119,'A2BE',m5))
endif
endif
elseif(i1=='N0MD')then
if KAG and(HMG=='A2SG')and IsUnitEnemy(m5,GetOwningPlayer(it))then
call C_7(it,852095,'A2QT',m5)
call XM7(O5,"Combo 1")
endif
elseif(i1=='E032')then
if(HMG=='A2E5')then
set b5=HC[O5]
set m5=K2(300.,b5)
if(m5!=null)then
call G7G(it,m5)
endif
endif
endif
if((KAG)and(not J4)and(GetUnitCurrentOrder(it)==0))then
call J3(it,true)
endif
set it=null
set m5=null
set b5=null
endfunction
function K3G takes nothing returns nothing
local unit Y47=GetTriggerUnit()
local integer HMG=GetSpellAbilityId()
local integer i1=GetUnitTypeId(Y47)
local integer O5=GetPlayerId(GetOwningPlayer(Y47))
local integer i
local boolean J4=false
if G0[288+O5]then
set G0[288+O5]=false
set i1=eY[400+O5]
endif
if(PS4)then
set hq[O5]=.0
set hq[16+O5]=.0
set hq[32+O5]=.0
if i1=='H00U' then
set i=1
loop
exitwhen i>10
set V74[i*16+O5]=0
set i=i+1
endloop
endif
endif
if(not PS4)and i1!='H00U' then
if i1=='E02X' then
if(HMG=='A27F')then
set V74[176+O5]=Bz+I2R(LoadInteger(FY7,HMG,-1+GetUnitAbilityLevel(Y47,HMG)))
elseif HMG=='A27G' then
set V74[192+O5]=Bz+I2R(LoadInteger(FY7,HMG,-1+GetUnitAbilityLevel(Y47,HMG)))
elseif HMG=='A27H' or HMG=='AZ1H' then
set V74[160+O5]=Bz+I2R(LoadInteger(FY7,HMG,-1+GetUnitAbilityLevel(Y47,HMG)))
elseif HMG!='A27X' and hq[816+O5]>Bz then
set G0[288+O5]=true
call K3G()
endif
elseif(HMG==eY[336+O5])then
set V74[16+O5]=Bz+I2R(LoadInteger(FY7,HMG,-1+GetUnitAbilityLevel(Y47,HMG)))
elseif HMG==eY[352+O5]then
set V74[32+O5]=Bz+I2R(LoadInteger(FY7,HMG,-1+GetUnitAbilityLevel(Y47,HMG)))
elseif HMG==eY[368+O5]then
set V74[48+O5]=Bz+I2R(LoadInteger(FY7,HMG,-1+GetUnitAbilityLevel(Y47,HMG)))
elseif HMG==eY[172+O5]or HMG==eY[188+O5]then
set bj_forLoopAIndex=0
if HMG==eY[188+O5]then
set bj_forLoopAIndex=LoadInteger(FY7,HMG,-1+GetUnitAbilityLevel(Y47,HMG))
endif
if bj_forLoopAIndex==0 then
set bj_forLoopAIndex=LoadInteger(FY7,eY[172+O5],-1+GetUnitAbilityLevel(Y47,HMG))
endif
set V74[O5]=Bz+I2R(bj_forLoopAIndex)
elseif(HMG=='A0F0')then
set V74[64+O5]=Bz+I2R(LoadInteger(FY7,HMG,-1+GetUnitAbilityLevel(Y47,HMG)))
elseif(HMG=='A0FH')then
set V74[80+O5]=Bz+I2R(LoadInteger(FY7,HMG,-1+GetUnitAbilityLevel(Y47,HMG)))
elseif HMG=='A0HA' then
set V74[64+O5]=Bz+8.
if KR8(Player(O5))then
if h4[O5]!=null then
call TriggerSleepAction(.5)
set J4=(IsUnitInRange(Y47,h4[O5],700))and((IssueTargetOrderById(Y47,852662,h4[O5]))or(IssueTargetOrderById(Y47,851983,h4[O5])))
endif
endif
endif
endif
endfunction
function K6G takes nothing returns boolean
return((IsUnitType(GetAttacker(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetAttacker()))==MAP_CONTROL_COMPUTER)and(not IsUnitIllusion(GetAttacker()))and(IsUnitEnemy(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))))
endfunction
function KLG takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(hr)))and(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))and(GE8(GetFilterUnit())))
endfunction
function K1G takes unit it returns integer
local integer kt=GetUnitAbilityLevel(it,'A0DH')
local integer K0G
if(kt<1)then
set kt=GetUnitAbilityLevel(it,'A1OB')
endif
if(kt>0)then
set hr=it
set K0G=AO7(500.,it,Condition(function KLG))-1
if(K0G<=2)then
return 0
endif
return 140+(50*kt)+((25+(10*kt))*K0G)
endif
return 0
endfunction
function K5G takes nothing returns nothing
call IssueTargetOrderById(GetEnumUnit(),851983,GetTriggerUnit())
endfunction
function K2G takes nothing returns nothing
local boolexpr Ig=Condition(function KH)
call GroupClear(iH)
call GroupEnumUnitsOfPlayer(iH,GetOwningPlayer(GetAttacker()),Ig)
call ForGroup(iH,function K5G)
call DestroyBoolExpr(Ig)
set Ig=null
endfunction
function K_G takes nothing returns nothing
local unit IB=GetAttacker()
local unit m5=GetTriggerUnit()
local integer i1=GetUnitTypeId(IB)
local integer O5=GetPlayerId(GetOwningPlayer(IB))
local location b5=null
local integer UP
local boolean M4G
local boolean J4=false
set GZ[48+O5]=IsUnitType(m5,UNIT_TYPE_HERO)
set h4[80+O5]=m5
if((not Jw(IB))or(GZ[32+O5]))then
set IB=null
set m5=null
return
else
set GZ[32+O5]=true
call TriggerSleepAction(.7)
if((not Z_7(m5))or(not Z_7(IB))or(not is(IB)))then
set GZ[32+O5]=false
set IB=null
set m5=null
return
endif
endif
if(IsUnitType(m5,UNIT_TYPE_HERO))then
if(((GetUnitCurrentOrder(m5)==851973)or(GetUnitLifePercent(m5)<60.))and(Bz>hq[480+O5]))then
call EOG(IB,m5)
if(h4[O5]==null)then
call VTF(O5,m5,false,false)
endif
endif
if(not J4)and(AR7(IB,BU[xieeliandao]))then
set J4=(GetUnitLifePercent(m5)<50.)and(UnitUseItemTarget(IB,bj_lastCreatedItem,m5))
endif
if(not J4)and(AR7(IB,BU[shenyuanzhiren]))then
set J4=(GetUnitLifePercent(m5)<50.)and(UnitUseItemTarget(IB,bj_lastCreatedItem,m5))
endif
if(not J4)and(AR7(IB,BU[atuosizhigun]))then
set J4=(GetUnitLifePercent(m5)<50.)and(UnitUseItemTarget(IB,bj_lastCreatedItem,m5))
endif
if(not J4)and(AR7(IB,BU[tiantangzhiji]))then
set J4=(GetUnitLifePercent(m5)<50.)and(N58(m5)!=1)and(UnitUseItemTarget(IB,bj_lastCreatedItem,m5))
endif
if(not J4)and(AR7(IB,BU[xiwadeshouhu]))then
set J4=(GetUnitLifePercent(m5)<50.)and(UnitUseItem(IB,bj_lastCreatedItem))
endif
if(not J4)and(AR7(IB,BU[ziyuan])and(Bz>V74[240+O5])and(S69(m5)==false)and(CI7(m5)==false))then
set J4=(GetUnitLifePercent(m5)<50.)and(UnitUseItemTarget(IB,bj_lastCreatedItem,m5))
endif
if(not J4)and(AR7(IB,BU[fengkuangmianju]))then
set J4=(GetUnitLifePercent(m5)<50.)and(GetUnitLifePercent(IB)>70.)and(Bz>hq[64+O5])and(G0[256+O5])and(LL7(IB,BU[fengkuangmianju]))
endif
if(not J4)and(AR7(IB,BU[sadanzhixieli]))then
set J4=(GetUnitLifePercent(m5)<70.)and(h4[O5]!=null)and(UnitUseItem(IB,bj_lastCreatedItem))
endif
if(not J4)and(AR7(m5,BU[renjia])and(GetPlayerController(GetOwningPlayer(m5))==MAP_CONTROL_COMPUTER)and(GetUnitLifePercent(m5)<90.)and(IsUnitType(IB,UNIT_TYPE_HERO))and(S69(IB)==false)and((IsUnitInRange(IB,m5,200.))or(IsUnitInRange(IB,m5,670.)))and(KS8(GetOwningPlayer(IB)))and(KS8(GetOwningPlayer(m5)))and((IsUnitType(IB,UNIT_TYPE_MELEE_ATTACKER))or(IsUnitType(IB,UNIT_TYPE_RANGED_ATTACKER))))then
set U_4=true
set J4=(UnitUseItem(m5,bj_lastCreatedItem))
endif
if(not J4)and(AR7(IB,BU[sanshizhiren])or AR7(IB,BU[sanshizhiren2]))then
set J4=(GetUnitLifePercent(m5)<50. or AD7(m5))and(UnitCountBuffsExBJ(bj_BUFF_POLARITY_NEGATIVE,bj_BUFF_RESIST_EITHER,m5,false,false)==0)and(UnitUseItemTarget(IB,bj_lastCreatedItem,m5))
endif
if(not J4)and(LC7(IB,BU[huanyingfu]))then
set GZ[224+O5]=true
set J4=(GetUnitLifePercent(m5)<70.)and(i1!='Eevm')and(UnitUseItem(IB,bj_lastCreatedItem))
set GZ[224+O5]=false
endif
if(not J4)and(AR7(IB,BU[yongqixunzhang]))then
set J4=(m5!=null)and(UnitUseItemTarget(IB,bj_lastCreatedItem,m5))
endif
if(not J4)and(AR7(IB,BU[bizhang2])and(LState(IB,"ArmletOfMordigan|Active")==false)and(GetUnitLifePercent(IB)>90.)and(IsUnitInRange(IB,m5,150.)))then
set J4=(m5!=null)and(UnitUseItem(IB,bj_lastCreatedItem))
endif
if(not J4)and(AR7(IB,BU[bizhang])and(LState(IB,"ArmletOfMordigan|Active"))and((not IsUnitInRange(IB,m5,150.))or(GetUnitLifePercent(IB)<60.)))then
set J4=(UnitUseItem(IB,bj_lastCreatedItem))
endif
if((h4[O5]!=null)and(JVG(IB)))then
set J4=JWG(IB)
endif
if(i1=='U000')then
set J4=DE8(IB,852526,'A2KO')
endif
elseif(IsUnitType(m5,UNIT_TYPE_STRUCTURE))then
if(AR7(IB,BU[fengkuangmianju]))then
set J4=(GetUnitLifePercent(m5)<20.)and(GetUnitLifePercent(IB)>60.)and(Bz>hq[64+O5])and(iy(IB))and(LL7(IB,BU[fengkuangmianju]))
elseif(AR7(IB,BU[huanyingfu]))then
set GZ[224+O5]=true
set J4=(GetUnitLifePercent(m5)<40.)and(i1!='Eevm')and(UnitUseItem(IB,bj_lastCreatedItem))
set GZ[224+O5]=false
endif
if(i1=='H00U' and(not J4))then
call VTF(O5,m5,false,false)
set J4=((Bz>V74[64+O5])and(K_8(IB,D27,D27,D07,'A0VO')and(IssueImmediateOrderById(IB,852132))))or((Bz>V74[128+O5])and(K_8(IB,D57,D57,D27,'A0VQ'))and C_7(IB,852490,'A0VQ',IB))
endif
elseif((GetUnitTypeId(m5)=='n00U')or(GetUnitTypeId(m5)=='n00Y')or(GetUnitTypeId(m5)=='n00Z'))then
if(AR7(IB,BU[sanshizhiren]))then
set J4=(GetUnitLifePercent(m5)>80.)and(UnitUseItemTarget(IB,bj_lastCreatedItem,m5))
endif
endif
set M4G=(m5==h4[O5])
if(J4)then
elseif((IsUnitType(m5,UNIT_TYPE_HERO))and((L17(IB,m5))or((GetUnitLifePercent(m5)<55.)and(GetRandomInt(1,3)==1)and(not VH4[O5])and(JUG(IB,m5)))))then
if((VD4)and(VH4[O5]))then
call JUG(IB,m5)
endif
elseif(i1=='E002')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
if(IsUnitInRange(IB,m5,400.)and(IssuePointOrderById(IB,852662,GetUnitX(m5)+2,GetUnitY(m5)-2)))then
set J4=true
elseif((Bz>V74[O5])and(IsUnitInRange(IB,m5,480.))and(GetUnitLifePercent(m5)<40.))then
set J4=(((GetUnitAbilityLevel(IB,'A1AO')>0)and(DE8(IB,852229,'A1AO')))or((GetUnitAbilityLevel(IB,'A1UV')>0)and(DE8(IB,852229,'A1UV'))))
endif
endif
elseif(i1=='H00U')then
if((GetUnitLifePercent(IB)<35.)and(GetUnitAbilityLevel(IB,'B08X')==0))then
set J4=(Bz>V74[80+O5])and K_8(IB,D07,D07,D57,'A0XL')and(KL8(IB,D57,D57,D57,false))and(IssueImmediateOrderById(IB,852129))
if(not J4)then
set J4=(m5!=null)and(Bz>V74[160+O5])and(K_8(IB,D07,D07,D27,'A0VP'))and(IssueImmediateOrderById(IB,852134))
endif
else
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=((Bz>V74[128+O5])and(K_8(IB,D57,D57,D27,'A0VQ'))and C_7(IB,852490,'A0VQ',IB))or((Bz>V74[64+O5])and(K_8(IB,D27,D27,D07,'A0VO')and(IssueImmediateOrderById(IB,852132))))
endif
endif
elseif(i1=='E02I')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
if(IsUnitInRange(IB,m5,250.)and(Bz>V74[O5])and(GetUnitLifePercent(m5)<47.))then
call VTF(O5,m5,false,false)
set J4=IssueImmediateOrderById(IB,852526)
elseif((Bz>V74[48+O5])and(IsUnitInRange(IB,m5,570.)))then
set J4=IssueImmediateOrderById(IB,852594)
elseif((Bz>V74[16+O5])and(IsUnitInRange(IB,m5,570.))and(not IsUnitInRange(IB,m5,200.)))then
set J4=(IssuePointOrderById(IB,852662,GetUnitX(m5),GetUnitY(m5)))or(IssueTargetOrderById(IB,852185,m5))
endif
endif
elseif(i1=='E02F')then
set J4=(GetUnitLifePercent(IB)>70.)and IssueImmediateOrderById(IB,852490)
elseif(i1=='E02J')then
if(IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitLifePercent(m5)<30.)then
set GZ[O5]=true
set UP=GetUnitAbilityLevel(IB,'A1SW')
set J4=(IsUnitInRange(IB,m5,840.))and(J8(O5,IssuePointOrderById(IB,852089,GetUnitX(m5)+2,GetUnitY(m5)-2)))
if((not(J4))and(Bz>V74[32+O5]))then
set m5=JS8(2200.-(UP*400),IB)
if((m5!=null)and(GetUnitLifePercent(m5)<15.))then
set J4=(C_7(IB,852119,'A1SW',m5))
endif
endif
endif
elseif((i1=='H00V')or(i1=='H08D')or(i1=='H08C')or(i1=='H084')or(i1=='H08B'))then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=((R2I(GetUnitState(m5,UNIT_STATE_LIFE))<(60*GetUnitAbilityLevel(IB,'A0G2')))and(C_7(IB,852119,'A0G2',m5)))or((GetHeroLevel(IB)>5)and(GetUnitAbilityLevel(m5,'Bprg')==0)and((M4G)or((GetUnitLifePercent(m5)<60.)and(IsUnitInRange(IB,m5,500.))))and(DE8(IB,852581,'A1AT')))
endif
elseif(i1=='U00C')then
set J4=(IsUnitType(m5,UNIT_TYPE_HERO))and(hq[240+O5]<=Bz)and((M4G)or(GetUnitLifePercent(m5)<50.))and(DE8(IB,852526,'A0T2'))
if((not J4)and((GetUnitLifePercent(m5)<40.)))then
call SetPlayerAbilityAvailable(GetOwningPlayer(IB),'A194',true)
set GZ[O5]=true
set J4=(IssueTargetOrderById(IB,852119,m5))
set GZ[O5]=false
call SetPlayerAbilityAvailable(GetOwningPlayer(IB),'A194',false)
endif
elseif(i1=='EC77')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and(GetHeroLevel(IB)>5))then
set UP=R2I(GetUnitState(m5,UNIT_STATE_LIFE))
if((Bz>hq[O5])and(UP>200)and(UP<(400*GetUnitAbilityLevel(IB,'A080'))or UP<(460*GetUnitAbilityLevel(IB,'A1UZ')))and(D78(IB,852527,'A080','A1UZ',m5)))then
elseif((GetHeroLevel(IB)>20)and(GetUnitAbilityLevel(IB,'BUhf')==0)and(GetUnitLifePercent(IB)>85.)and(GetUnitLifePercent(m5)<45.))then
set GZ[O5]=true
call J8(O5,DE8(IB,852100,'A05D'))
endif
endif
elseif(i1=='EC45')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and(GetHeroLevel(IB)>5)and(Bz>hq[O5]))then
set UP=R2I(GetUnitState(m5,UNIT_STATE_LIFE))
if((IsUnitInRange(IB,m5,250.))and(UP<JJG(IB))and(UP>300))then
set GZ[O5]=true
set J4=J8(O5,C_7(IB,852652,'A0J1',m5))
endif
endif
elseif(i1=='U000')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>4)or(A87(m5))))then
set J4=((R2I(GetUnitState(m5,UNIT_STATE_LIFE))<(60*GetUnitAbilityLevel(IB,'A1H5')))and(C_7(IB,852248,'A1H5',m5)))or(C_7(IB,852555,'A0X7',m5))
endif
if(not J4)then
set J4=(IsUnitType(m5,UNIT_TYPE_HERO))and(L17(IB,m5))
endif
elseif(i1=='E004')then
if(GetUnitAbilityLevel(IB,'B00S')>0)then
set J4=(IsUnitType(m5,UNIT_TYPE_HERO))and(M4G)and(GetUnitLifePercent(IB)>50.)and(IssueTargetOrderById(IB,851983,m5))
elseif(IsUnitType(m5,UNIT_TYPE_HERO))then
if((GetUnitLifePercent(m5)<65.)and(M4G))then
set GZ[O5]=true
set J4=J8(O5,DE8(IB,852100,'A030'))
endif
elseif((IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(GetUnitLifePercent(m5)<30.))then
set GZ[O5]=true
set J4=J8(O5,DE8(IB,852100,'A030'))
endif
elseif(i1=='Udre')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>4)or(A87(m5))))then
set J4=((not PO8())and((C_7(IB,852095,'A02H',m5))or((M4G)and(GetUnitLifePercent(IB)<60.)and(C_7(IB,852585,'A08C',m5)))))or((PO8())and(GetUnitLifePercent(m5)<50.)and((IssueImmediateOrderById(IB,852621))or(C_7(IB,852095,'A02H',m5))))
endif
elseif(i1=='UC01')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
if((GetHeroLevel(IB)>4)or(A87(m5)))then
call SetPlayerAbilityAvailable(GetOwningPlayer(IB),'A0Q7',true)
set J4=((IsUnitInRange(IB,m5,375.))and(DE8(IB,852526,'A04A')))or((R2I(GetUnitState(m5,UNIT_STATE_LIFE))<(70*GetUnitAbilityLevel(IB,'A0Q7')))and(IssueTargetOrderById(IB,852527,m5)))
endif
elseif((not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(not IsUnitType(m5,UNIT_TYPE_MECHANICAL))and(GetHeroLevel(IB)>12)and(GetUnitManaPercent(IB)>60.)and(G0[128+O5]))then
set UP=AO7(400.,m5,Condition(function Ki))
set J4=(UP>5)and(Bz>hq[O5])and(D78(IB,852125,'A28R','A28S',m5))
if((not J4)and(Bz>hq[16+O5])and((UP>2)or((eY[O5]==10)and(UP>1)))and(AO7(1000.,m5,Condition(function KI))<=1))then
if(not IsUnitInRange(IB,m5,400.))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(IB)-GetUnitY(m5),GetUnitX(IB)-GetUnitX(m5)))
set hq[240+O5]=Bz+3.
call IssuePointOrderById(IB,851986,GetUnitX(m5)+200.*Cos(UP*bj_DEGTORAD),GetUnitY(m5)+200.*Sin(UP*bj_DEGTORAD))
else
set J4=DE8(IB,852526,'A04A')
endif
endif
endif
elseif(i1=='UC91')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=((GetUnitAbilityLevel(m5,'B00T')==0)and(GetUnitLevel(IB)>5)and(C_7(IB,852149,'A034',m5)))or(((GetUnitLifePercent(m5)<80.)or(M4G))and(GetHeroLevel(IB)>3)and(IsUnitInRange(IB,m5,300.))and(DE8(IB,852127,'A29K')))
endif
elseif(i1=='UC42')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>5)or(A87(m5))))then
set UP=R2I(GetUnitState(m5,UNIT_STATE_LIFE))
set J4=((UP>200)and(UP<=(250+(300*JKG(IB))))and(D78(IB,852583,'A0MU','A0A2',m5)))or(C_7(IB,852231,'A094',m5))
if((not J4)and(GetHeroLevel(IB)>7)and(GetUnitManaPercent(IB)>70.)and(M4G))then
set GZ[O5]=true
set J4=J8(O5,IssueTargetOrderById(IB,852488,m5))
endif
endif
elseif(i1=='NC00')then
set J4=(IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>4)or(A87(m5)))and((GetUnitLifePercent(m5)<80.)or(M4G))and(C_7(IB,852095,'AHtb',m5))
elseif((i1=='Eevi')or(i1=='Eevm')or(i1=='E02V')or(i1=='E02W')or(i1=='E02U'))then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
call K2G()
set J4=((GetHeroLevel(IB)>5)and((GetUnitLifePercent(m5)-GetUnitLifePercent(IB))>25.)and(C_7(IB,852189,'A07Q',m5)))
if((not J4)and(i1=='Eevi')and(GetUnitLifePercent(m5)<50.))then
set GZ[O5]=true
set J4=J8(O5,DE8(IB,852663,'A1RI'))
endif
elseif((IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(i1=='Eevi')and(GetUnitLifePercent(m5)<20.))then
set GZ[O5]=true
set J4=J8(O5,DE8(IB,852663,'A1RI'))
endif
elseif(i1=='Ekee')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and(GetUnitAbilityLevel(IB,'B024')>0))then
set J4=(G0[128+O5])and(GetUnitLifePercent(IB)>60.)and(AO7(300.,IB,Condition(function KI))==0)and(IssueTargetOrderById(IB,851986,m5))
endif
elseif(i1=='U006')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
call K2G()
set J4=((R2I(GetUnitState(m5,UNIT_STATE_LIFE))<(55*GetUnitAbilityLevel(IB,'A0BH')))and(C_7(IB,852601,'A0BH',m5)))or(((GetUnitLifePercent(m5)<60.)or(GetUnitLifePercent(IB)<65.))and(DE8(IB,852164,'A0WQ')))
if((not J4)and(GetUnitAbilityLevel(IB,'B01E')>0)and(M4G))then
call IssueTargetOrderById(IB,851983,m5)
endif
endif
elseif(i1=='UC18')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>5)or(A87(m5))))then
set UP=R2I(GetUnitState(m5,UNIT_STATE_LIFE))
if((UP>150)and(UP<JMG(IB))and(not GV8(m5)))then
set GZ[O5]=true
call J8(O5,(D78(IB,852119,'A095','A09W',m5))or(C_7(IB,852502,'A0MN',m5))or(C_7(IB,852555,'A0X5',m5)))
elseif(((GetUnitLifePercent(m5)<80.)or(M4G))and(GetUnitAbilityLevel(m5,'BPSE')==0)and(GetUnitAbilityLevel(m5,'B00H')==0))then
set J4=(C_7(IB,852555,'A0X5',m5))or((Bz>hq[O5])and(C_7(IB,852502,'A0MN',m5)))
endif
endif
elseif(i1=='EC57')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and(GetHeroLevel(IB)>5)and(Bz>hq[16+O5]))then
set UP=GetUnitAbilityLevel(IB,'A013')
if(UP==0)then
set UP=GetUnitAbilityLevel(IB,'A0A6')
endif
if((R2I(GetUnitState(m5,UNIT_STATE_LIFE))<('d'+(100*UP)))and((Bz>hq[O5])or(GetUnitAbilityLevel(m5,'BEsh')>0)))then
set GZ[O5]=true
call SetPlayerAbilityAvailable(GetOwningPlayer(IB),'A0A6',true)
call J8(O5,(DE8(IB,852594,'A013'))or(C_7(IB,852669,'A173',m5)))
else
call C_7(IB,852669,'A173',m5)
endif
endif
elseif(i1=='UC11')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>5)or(A87(m5))))then
set J4=((GetUnitAbilityLevel(IB,'B00U')==0)and(GetUnitLifePercent(IB)>45.)and(C_7(IB,852066,'A037',IB)))or((GetUnitLifePercent(m5)<60.)and(GetUnitLifePercent(m5)>10.)and(IsUnitInRange(IB,m5,400.))and(R2I(GetUnitState(IB,UNIT_STATE_MANA))<(140+(GetUnitAbilityLevel(IB,'A29L')*'d')))and(DE8(IB,852127,'A29L')))or(C_7(IB,852125,'A02S',m5))
elseif((GetHeroLevel(IB)>7)and(not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(iy(IB))and(GetUnitManaPercent(IB)>60.)and(GetUnitState(m5,UNIT_STATE_LIFE)<200.))then
set UP=AO7(450.,m5,Condition(function Ki))
set GZ[O5]=true
set J4=((UP>2)or((eY[O5]==10)and(UP>1)))and(C_7(IB,852125,'A02S',m5))
set GZ[O5]=false
endif
elseif(i1=='UC60')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>4)or(A87(m5))))then
if(GetUnitAbilityLevel(m5,'Bcri')==0)then
call C_7(IB,852189,'A08X',m5)
elseif(IsUnitInRange(IB,m5,860.)and(LInt(GetHandleId(IB),"Level")>GetUnitAbilityLevel(IB,'A1NA'))and(GetUnitManaPercent(IB)>35.)and(GetHeroLevel(IB)>3))then
call IssueTargetOrderById(IB,852248,m5)
elseif(GetUnitLifePercent(IB)>75.)then
call IssueTargetOrderById(IB,851983,m5)
endif
endif
elseif((i1=='U008')or(i1=='E015'))then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>5)or(A87(m5))))then
call K2G()
set J4=((i1=='U008')and((GetUnitLifePercent(m5)<60.)or(A87(IB)))and(DE8(IB,852180,'A093')))or(((i1=='E015')or(R2I(GetUnitState(IB,UNIT_STATE_MANA))>(250+(25*(GetUnitAbilityLevel(IB,'A093'))))))and((DE8(IB,852126,'A03D'))or(DE8(IB,852600,'A0ZF'))))
endif
elseif(i1=='U00A')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>5)or(A87(m5))))then
call K2G()
set J4=((GetUnitLifePercent(m5)<65.)and((Bz>hq[O5])or(GetUnitCurrentOrder(m5)==851973))and(DE8(IB,852123,'A03O')))or(C_7(IB,852231,'A055',m5))
endif
elseif(i1=='Ewar')then
set J4=(IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>5)or(A87(m5)))and((M4G)or(GetUnitLifePercent(m5)<70.))and(C_7(IB,852662,'A0YM',m5))
elseif(i1=='Udea')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=(GetHeroLevel(IB)>3)and((GetUnitLifePercent(IB)>70.)or(GetUnitLifePercent(IB)>GetUnitLifePercent(m5)))and(IssueTargetOrderById(IB,852662,m5))
elseif((IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(GetHeroLevel(IB)>2))then
call IssueTargetOrderById(IB,852119,IB)
endif
elseif(i1=='Hvsh')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=((GetUnitLifePercent(IB)>70.)and(YO7(GetUnitTypeId(m5),GX7))and(GetUnitLifePercent(m5)<50.)and(C_7(IB,852668,'A0EC',m5)))or((GetUnitLifePercent(m5)<60.)and(GetUnitLifePercent(IB)>60.)and(C_7(IB,852668,'A0EC',IB)))
endif
elseif(i1=='Opgh')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>5)or(A87(m5))))then
set UP=R2I(GetUnitState(m5,UNIT_STATE_LIFE))
if(((UP<(150+(150*GetUnitAbilityLevel(IB,'A0E2'))))or(UP<(150+(150*GetUnitAbilityLevel(IB,'A1MR')))))and(UP>150))then
set J4=(D78(IB,852119,'A0E2','A1MR',m5))or((IsUnitInRange(IB,m5,275.))and(IssueImmediateOrderById(IB,852600)))
elseif(R2I(GetUnitState(IB,UNIT_STATE_MANA))>(195+(40*GetUnitAbilityLevel(IB,'A0E2')))or R2I(GetUnitState(IB,UNIT_STATE_MANA))>(195+(40*GetUnitAbilityLevel(IB,'A1MR'))))then
set J4=((AO7(400.,m5,Condition(function KJ))>0)and(IssueTargetOrderById(IB,852248,m5)))or(((YO7(GetUnitTypeId(m5),GX7))or(GetUnitLifePercent(m5)<50.))and(IsUnitInRange(IB,m5,275.))and(IssueImmediateOrderById(IB,852600)))
elseif(AR7(IB,BU[sadanzhixieli]))and(AR7(IB,BU[renjia]))then
set U_4=true
set J4=(GetUnitLifePercent(m5)<70.)and(h4[O5]!=null)and(IsUnitType(IB,UNIT_TYPE_HERO))and((IsUnitInRange(IB,m5,200.))or(i1=='Nbrn')or(i1=='E004')or(i1=='H00V')or(i1=='Usyl')or(i1=='Emoo'))and(UnitUseItem(m5,AV7(m5,BU[renjia])))and(UnitUseItem(m5,AV7(m5,BU[sadanzhixieli])))
set U_4=false
endif
endif
elseif(i1=='Nfir')then
if(GetHeroLevel(IB)>2)then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=(IsUnitInRange(IB,m5,350.))and(GetUnitLifePercent(m5)>15.)and((GetUnitAbilityLevel(IB,'A0CQ'))>(GetUnitAbilityLevel(IB,'A0BR')*3))and(DE8(IB,852273,'A29J'))
elseif((GetHeroLevel(IB)>9)and(not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(not IsUnitType(m5,UNIT_TYPE_MECHANICAL))and(GetUnitManaPercent(IB)>65.)and(GetUnitLifePercent(m5)<50.))then
set J4=AO7(200.,m5,Condition(function Ki))<2
else
set J4=true
endif
if(not J4)then
set UP=R2I(Z87(GetUnitX(IB),GetUnitY(IB),GetUnitX(m5),GetUnitY(m5)))
if((UP>=75)and(UP<=325))then
set J4=(JTG(IB,200.,Condition(function Ki)))and(DE8(IB,852164,'A0EY'))
elseif((UP>=325)and(UP<=575))then
set J4=(JTG(IB,450.,Condition(function Ki)))and(DE8(IB,852588,'A0FH'))
elseif((UP>=575)and(UP<=825))then
set J4=(JTG(IB,700.,Condition(function Ki)))and(DE8(IB,852599,'A0F0'))
endif
endif
endif
elseif(i1=='O00J')then
set J4=(IsUnitType(m5,UNIT_TYPE_HERO))and(GetHeroLevel(IB)>5)and(GetUnitLifePercent(m5)<55.)and(not GV8(m5))and(not IsUnitInRange(IB,m5,250.))and(((AO7(900.,m5,Condition(function Ki))<=2)and(AR7(IB,BU[zhipeitoukui]))or(AR7(IB,BU[sadanzhixieli])))or((AO7(900.,m5,Condition(function Ki))<2)))and(IssueTargetOrderById(IB,852095,m5))
elseif(i1=='U00F')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=((GetUnitAbilityLevel(IB,'B02T')==0)and(GetUnitLifePercent(IB)>55.)and((GetHeroLevel(IB)>6)or(A87(m5)))and(GetUnitState(IB,UNIT_STATE_LIFE)>GetUnitState(m5,UNIT_STATE_LIFE))and(DE8(IB,852177,'A06K')))or(((GetUnitLifePercent(m5)<60.)or(M4G))and(GetUnitState(m5,UNIT_STATE_LIFE)>250.)and(G0[128+O5])and(D78(IB,852480,'A0FL','A1CX',m5)))
endif
elseif(i1=='U00E')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set UP=GetUnitAbilityLevel(IB,'A08P')+1
if(UP<=1)then
set UP=GetUnitAbilityLevel(IB,'A067')
endif
set J4=((UP>0)and(not GV8(m5))and(GetUnitState(m5,UNIT_STATE_LIFE)>200.)and(GetUnitState(m5,UNIT_STATE_LIFE)<((.2+(I2R(UP)*.2))*(GetUnitState(m5,UNIT_STATE_MAX_LIFE)-GetUnitState(m5,UNIT_STATE_LIFE))))and(D78(IB,852095,'A067','A08P',m5)))or((GetHeroLevel(IB)>2)and(IsUnitInRange(IB,m5,400.))and(DE8(IB,852526,'A05V')))
elseif((not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(not IsUnitType(m5,UNIT_TYPE_MECHANICAL))and(GetHeroLevel(IB)>8)and(GetUnitManaPercent(IB)>60.)and(G0[128+O5]))then
set UP=AO7(400.,m5,Condition(function Ki))
if((UP>2)or((eY[O5]==10)and(UP>1)))then
if(not IsUnitInRange(IB,m5,400.))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(IB)-GetUnitY(m5),GetUnitX(IB)-GetUnitX(m5)))
set hq[240+O5]=Bz+3.
call IssuePointOrderById(IB,851986,GetUnitX(m5)+200.*Cos(UP*bj_DEGTORAD),GetUnitY(m5)+200.*Sin(UP*bj_DEGTORAD))
else
set J4=DE8(IB,852526,'A05V')
endif
endif
endif
elseif(i1=='Oshd')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>3)or(A87(m5))))then
set J4=((A87(m5))and(GetUnitState(IB,UNIT_STATE_MANA)>hq[272+O5])and(C_7(IB,852480,'A02Q',m5)))or((GetUnitLifePercent(IB)<90.)and(C_7(IB,852119,'A0GK',m5)))
endif
elseif(i1=='Ofar')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>3)or(A87(m5))))then
set J4=((GetUnitLifePercent(m5)<50.)and(DE8(IB,852588,'A29I')))or((GetUnitManaPercent(IB)>30.)and(C_7(IB,852662,'A046',m5)))
endif
elseif(i1=='H00H')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=((GetHeroLevel(IB)>4)and(GetUnitAbilityLevel(m5,'B01N')==0)and(GetUnitState(IB,UNIT_STATE_MANA)>250.)and(Bz>hq[O5])and(C_7(IB,852669,'A2TD',m5)))or((GetHeroLevel(IB)>2)and(M4G)and(IssueTargetOrderById(IB,852089,m5)))
elseif((GetHeroLevel(IB)>9)and(GetUnitManaPercent(IB)>50.))then
set J4=(AO7(400.,m5,Condition(function Ki))>2)and(AO7(300.,m5,Condition(function Kj))>0)and(IssueTargetOrderById(IB,852089,m5))
endif
elseif(i1=='U00P')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set UP=GetHeroInt(IB,true)-GetHeroInt(m5,true)
set J4=((GetHeroLevel(IB)>5)and(UP>9)and(R2I(GetUnitState(m5,UNIT_STATE_LIFE))<(10*UP))and(D78(IB,852089,'A0OK','A1VW',m5)))or((i2(m5))and(C_7(IB,852119,'A0OJ',m5)))
if((not J4)and(GetUnitManaPercent(IB)>70.)and(GetUnitLifePercent(m5)>60.)and(GetUnitManaPercent(m5)>40.))then
set GZ[O5]=true
set J4=J8(O5,(AO7(700.,m5,Condition(function Kk))==0)and(C_7(IB,852119,'A0OJ',m5)))
endif
endif
elseif(i1=='E01C')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=(GetHeroLevel(IB)>2)and((GetUnitManaPercent(IB)>50.)and(GetUnitLifePercent(m5)<65.))and(IssueTargetOrderById(IB,852248,m5))
if((not J4)and(GetUnitAbilityLevel(IB,'A0J5')>2))then
set J4=(AO7(500.,m5,Condition(function Ki))>3)and((GetUnitManaPercent(IB)>60.)or(GetUnitLifePercent(m5)<65.)or(AO7(500.,m5,Condition(function KJ))>0))and(IssueTargetOrderById(IB,852095,m5))
endif
if((not J4)and(GetUnitLifePercent(m5)<75.)and(GetHeroLevel(IB)>5)and(Bz>hq[O5]))then
set GZ[O5]=true
set J4=J8(O5,C_7(IB,852224,'S008',m5))
endif
elseif(IsUnitType(m5,UNIT_TYPE_STRUCTURE))then
if((GetHeroLevel(IB)>10)and(GetUnitLifePercent(m5)<40.))then
set GZ[O5]=true
set J4=J8(O5,C_7(IB,852224,'S008',m5))
endif
elseif((not IsUnitType(m5,UNIT_TYPE_MECHANICAL))and(GetUnitAbilityLevel(IB,'A0J5')>2)and(GetUnitManaPercent(IB)>60.))then
set J4=(AO7(400.,m5,Condition(function Ki))>3)and(IssueTargetOrderById(IB,852095,m5))
endif
elseif(i1=='UC76')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=(GetHeroLevel(m5)>5)and((GetUnitLifePercent(m5)<60.)or(GetUnitLifePercent(IB)<70.))and(C_7(IB,852592,kS(IB),m5))
if((not J4)and((GetHeroLevel(IB)>5)or(A87(m5))))then
set J4=((GetUnitLifePercent(m5)>10.)and(GetUnitLifePercent(m5)<50.)and(IssueImmediateOrderById(IB,852556)))or(C_7(IB,852218,kT(IB),m5))
endif
elseif((IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(GetUnitLifePercent(m5)<25.)and(GetUnitLifePercent(m5)>10.))then
set J4=(AO7(500.,m5,Condition(function Kj))>2)and(IssueImmediateOrderById(IB,852556))
endif
elseif(i1=='E01B')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>5)or(A87(m5))))then
set J4=((GetUnitLifePercent(m5)<60.)and(IssueTargetOrderById(IB,852662,m5)))or((GetUnitLifePercent(m5)<45.)and(IssueImmediateOrderById(IB,852490)))
endif
elseif((i1=='H00I')or(i1=='H00J'))then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
if((A87(m5))and(GetUnitAbilityLevel(m5,'B078')==0))then
call JBG(IB,m5)
endif
elseif((i1=='H00I')and(GetHeroLevel(IB)>11)and(GetUnitManaPercent(IB)>70.))then
set J4=(AO7(400.,IB,Condition(function Ki))>3)and(IssueTargetOrderById(IB,852553,IB))
endif
elseif(i1=='N01W')then
set J4=(IsUnitType(m5,UNIT_TYPE_HERO))and(M4G)and((GetHeroLevel(IB)>4)or(A87(m5)))and(IssuePointOrderById(IB,852089,GetUnitX(m5),GetUnitY(m5)))
elseif((i1=='H00R')or(i1=='H07I'))then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
call K2G()
endif
elseif(i1=='H00N')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=IssueTargetOrderById(IB,852095,IB)
elseif((not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(IsUnitType(m5,UNIT_TYPE_MELEE_ATTACKER))and(GetHeroLevel(IB)>5)and(GetUnitManaPercent(IB)>50.))then
set J4=(AO7(250.,IB,Condition(function Ki))>2)and(IssueTargetOrderById(IB,852095,IB))
endif
elseif(i1=='H008')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=((GetHeroLevel(IB)>3)or(A87(m5)))and((DE8(IB,852526,'A0GP'))or(IssueTargetOrderById(IB,852600,m5)))
if((not J4)and(GetUnitAbilityLevel(IB,'B04M')>0)and((GetUnitLifePercent(IB)>75.)or(A87(m5))))then
call IssueTargetOrderById(IB,851983,m5)
endif
elseif((GetHeroLevel(IB)>6)and(not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(not IsUnitType(m5,UNIT_TYPE_MECHANICAL))and(GetUnitLifePercent(m5)<75.)and(GetUnitManaPercent(IB)>75.))then
set J4=(AO7(400.,m5,Condition(function Ki))>2)and(DE8(IB,852526,'A0GP'))
endif
elseif(i1=='E005')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>4)or(A87(m5))))then
set UP=AO7(700.,IB,Condition(function Ki))
set J4=((IsUnitInRange(m5,IB,400.))and(UP<2)and(GetUnitAbilityLevel(m5,'B014')==0)and(IssueImmediateOrderById(IB,852600)))or((GetHeroLevel(IB)>20)and(GetUnitState(IB,UNIT_STATE_MANA)>450.)and(C_7(IB,852231,'A042',m5)))
endif
elseif(i1=='Npbm')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
if(((GetUnitLifePercent(m5)<75.)or(M4G))and((GetHeroLevel(IB)>4)or(A87(m5))))then
if(((not IsUnitInRange(IB,m5,200.))or(not DE8(IB,852096,'A06M')))and(GetUnitLifePercent(m5)<50.)and(GetUnitLifePercent(m5)>15.))then
call VTF(O5,m5,false,false)
call DE8(IB,852586,'A0MQ')
endif
endif
elseif((IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(GetUnitLifePercent(m5)<20.))then
set GZ[O5]=true
call DE8(IB,852586,'A0MQ')
endif
elseif(i1=='H000')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetUnitLifePercent(m5)<80.)or(M4G))and((GetHeroLevel(IB)>4)or(A87(m5))))then
set J4=((IsUnitInRange(IB,m5,250.))and(DE8(IB,852127,'A00S')))or((R2I(GetUnitState(m5,UNIT_STATE_LIFE))<(40+('}'*(GetUnitAbilityLevel(IB,'A2ON')))))and(C_7(IB,852231,'A2ON',m5)))
endif
elseif(i1=='Nbrn')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>3)or(A87(m5))))then
set J4=((GetUnitLifePercent(m5)<60.)or(GetUnitLifePercent(IB)<70.))and(GetUnitLifePercent(m5)>20.)and(IsUnitInRange(IB,m5,400.))and(C_7(IB,852592,'A0QB',m5))
if((not J4)and(G0[128+O5])and(GetUnitAbilityLevel(m5,'Bcsd')>0)and(M4G)and((GetUnitLifePercent(IB)>70.)or(A87(m5))))then
call IssueTargetOrderById(IB,851983,m5)
endif
endif
elseif((i1=='Hlgr')or(i1=='H00F')or(i1=='H00E')or(i1=='H00G'))then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetUnitLifePercent(m5)<80.)or(M4G))and((GetHeroLevel(IB)>4)or(A87(m5))))then
set J4=((GetUnitLifePercent(m5)<60.)and(DE8(IB,852180,'A03G')))or((IsUnitInRange(IB,m5,350.))and(C_7(IB,852095,'A0AR',m5)))
endif
elseif(i1=='Edem')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and(GetHeroLevel(IB)>5)and(GetUnitState(m5,UNIT_STATE_LIFE)>200.)and(not GV8(m5)))then
set J4=(((GetUnitManaPercent(m5)<15.)and(GetUnitLifePercent(m5)<50.))or(GetUnitState(m5,UNIT_STATE_LIFE)<((GetUnitState(m5,UNIT_STATE_MAX_MANA)-GetUnitState(m5,UNIT_STATE_MANA))*(.35+(I2R(GetUnitAbilityLevel(IB,'A0E3'))*.25)))))and(C_7(IB,852095,'A0E3',m5))
endif
elseif(i1=='Usyl')then
set J4=(IsUnitType(m5,UNIT_TYPE_HERO))and(not GV8(m5))and(R2I(GetUnitState(m5,UNIT_STATE_LIFE))<(180+(150*GetUnitAbilityLevel(IB,'A04P'))))and(C_7(IB,852095,'A04P',m5))
elseif(i1=='Harf')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=(GetHeroLevel(IB)>2)and(GetUnitLifePercent(IB)<85.)and(C_7(IB,852225,'A08N',IB))
elseif((GetHeroLevel(IB)>7)and(not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(not IsUnitType(m5,UNIT_TYPE_MECHANICAL))and(GetUnitLifePercent(IB)<90.)and(GetUnitManaPercent(IB)>60.))then
set J4=(AO7(400.,IB,Condition(function Ki))>2)and(AO7(800.,IB,Condition(function Kk))==0)and(C_7(IB,852225,'A08N',IB))
endif
elseif((i1=='N016')or(i1=='N017')or(i1=='N02B'))then
if((IsUnitType(m5,UNIT_TYPE_HERO))and(GetHeroLevel(IB)>5))then
if(GetUnitAbilityLevel(IB,'B00B')==0)then
if((GetUnitLifePercent(m5)<70.)or((M4G)and(GetUnitLifePercent(IB)<70.)))then
if((IsUnitInRange(IB,m5,280.)))then
set J4=IssueImmediateOrderById(IB,852138)
call IssueTargetOrderById(IB,851983,m5)
endif
set GZ[O5]=true
call J8(O5,DE8(IB,852100,'A1EJ'))
endif
elseif((GetUnitLifePercent(IB)>70.)and(M4G))then
if((IsUnitInRange(IB,m5,280.)))then
set J4=IssueImmediateOrderById(IB,852138)
call IssueTargetOrderById(IB,851983,m5)
else
set J4=IssueImmediateOrderById(IB,852139)
call IssueTargetOrderById(IB,851983,m5)
endif
endif
endif
elseif(i1=='Naka')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>5)or(A87(m5))))then
set J4=((GetUnitState(m5,UNIT_STATE_LIFE)<(hq[272+O5]))and(C_7(IB,852095,'A004',m5)))or((GetUnitLifePercent(m5)<75.)and(GetUnitAbilityLevel(m5,'B00L')==0)and(GetUnitCurrentOrder(m5)!=851973)and(C_7(IB,852149,'A0B4',m5)))
endif
elseif(i1=='Orkn')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>3)or(A87(m5))))then
if(R2I(GetUnitState(m5,UNIT_STATE_LIFE))<(50*GetUnitAbilityLevel(IB,'A00P')))then
if(IsUnitInRange(IB,m5,400)or S19(m5))then
set GZ[O5]=true
call J8(O5,C_7(IB,852480,'A00P',m5))
endif
elseif((GetHeroLevel(IB)>10)and(GetUnitLifePercent(m5)<70.))then
call C_7(IB,852502,'A0RX',m5)
elseif((GetUnitManaPercent(IB)>60.)or(A87(m5)))then
call C_7(IB,852587,'A010',m5)
endif
elseif((not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(not IsUnitType(m5,UNIT_TYPE_MECHANICAL))and(GetHeroLevel(IB)>9)and(GetUnitManaPercent(IB)>60.))then
set UP=AO7(450.,m5,Condition(function Ki))
set J4=((UP>2)or((eY[O5]==10)and(UP>1)))and(C_7(IB,852587,'A010',m5))
endif
elseif(i1=='Hvwd')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>5)or(A87(m5))))then
if(((GetUnitLifePercent(m5)<70.)or(M4G))and(C_7(IB,852095,'A02A',m5)))then
elseif((A87(m5))and(kA(IB,m5,400.)))then
call D78(IB,852587,'A0IN','A1AW',m5)
endif
endif
elseif(i1=='Hmbr')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetUnitLifePercent(m5)<70.)or(M4G))and((GetHeroLevel(IB)>3)or(A87(m5))))then
set J4=(C_7(IB,852095,'A0JC',m5))or(((GetUnitManaPercent(IB)>40.)or(A87(m5)))and(C_7(IB,852119,'A020',m5)))
endif
elseif(i1=='Emoo')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=(GetUnitManaPercent(IB)>50.)and((GetHeroLevel(IB)>3)or(A87(m5)))and(GetUnitLifePercent(m5)<80.)and(C_7(IB,852075,'A0DX',m5))
elseif((GetOwningPlayer(m5)!=G8[0])and(GetOwningPlayer(m5)!=N8[0])and(not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(GetUnitManaPercent(IB)>60.)and(Bz>hq[O5]))then
set UP=GetUnitTypeId(m5)
set J4=(UP!='n01Q')and(UP!='n01R')and(UP!='hwat')and(UP!='hwt2')and(UP!='hwt3')and(UP!='h006')and(UP!='u003')and(UP!='u005')and(UP!='u009')and(UP!='ugho')and(UP!='u001')and(UP!='unec')and(UP!='u002')and(UP!='esen')and(UP!='e00V')and(UP!='edry')and(UP!='e00W')and(GetUnitLifePercent(m5)>60.)and(C_7(IB,852075,'A0DX',m5))
endif
elseif(i1=='Uktl')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
call K2G()
if((GetHeroLevel(IB)>5)or(A87(m5)))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(h8[O5])-GetUnitY(IB),GetUnitX(h8[O5])-GetUnitX(IB)))
set J4=(IssuePointOrderById(IB,852600,GetUnitX(m5)+80.*Cos(UP*bj_DEGTORAD),GetUnitY(m5)+80.*Sin(UP*bj_DEGTORAD)))or((A87(m5))and(GetUnitState(m5,UNIT_STATE_LIFE)>200.)and(GetUnitState(m5,UNIT_STATE_LIFE)<800.)and(not kr(IB))and(IssuePointOrderById(IB,852188,GetUnitX(m5)+80.*Cos(UP*bj_DEGTORAD),GetUnitY(m5)+80.*Sin(UP*bj_DEGTORAD))))or(IssueTargetOrderById(IB,852662,m5))
endif
elseif((not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(not IsUnitType(m5,UNIT_TYPE_MECHANICAL))and(GetHeroLevel(IB)>9)and(iy(IB))and(GetUnitManaPercent(IB)>60.)and(((h4[128+O5]!=null)and(IsUnitInRange(IB,h4[128+O5],1200.)))or(eY[O5]==10)))then
set UP=AO7(450.,m5,Condition(function Ki))
set J4=((UP>2)or((eY[O5]==10)and(UP>1)))and(IssuePointOrderById(IB,852600,GetUnitX(m5),GetUnitY(m5)))
endif
elseif((i1=='Hblm')or(i1=='H06X')or(i1=='H06Y')or(i1=='H06W'))then
if((not IsUnitType(m5,UNIT_TYPE_HERO))and(not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(GetHeroLevel(IB)>4)and(Bz>hq[O5])and(GetUnitManaPercent(IB)>30.))then
set b5=HC[16+O5]
call MoveLocation(b5,GetUnitX(IB),GetUnitY(IB))
if((AO7(600.,m5,Condition(function Ki))>2)and(not IsUnitInRange(IB,m5,150.))and((AN7(600.,b5,Condition(function KI))==0)or(AN7(500.,b5,Condition(function KJ))>0)or(AN7(500.,b5,Condition(function Kk))>0)))then
set UP=IMaxBJ(R2I(Z87(GetUnitX(m5),GetUnitY(m5),GetUnitX(IB),GetUnitY(IB)))-(435+('x'*GetUnitAbilityLevel(IB,'A085'))),0)
set i1=R2I(bj_RADTODEG*Atan2(GetUnitY(m5)-GetUnitY(IB),GetUnitX(m5)-GetUnitX(IB)))
if((RAbsBJ(GetUnitFacing(IB)-I2R(i1))<25.)or(RAbsBJ(GetUnitFacing(IB)-360.-I2R(i1))<25.))then
call IssuePointOrderById(IB,852600,GetUnitX(IB)+I2R(150+UP)*Cos(i1*bj_DEGTORAD),GetUnitY(IB)+I2R(150+UP)*Sin(i1*bj_DEGTORAD))
endif
endif
endif
elseif(i1=='Ntin')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=((GetHeroLevel(IB)>4)or(A87(m5)))and((C_7(IB,852585,'A049',m5))or(IssuePointOrderById(IB,852190,GetUnitX(IB)+70.*Cos((GetUnitFacing(IB)-180.)*bj_DEGTORAD),GetUnitY(IB)+70.*Sin((GetUnitFacing(IB)-180.)*bj_DEGTORAD))))
elseif((GetHeroLevel(IB)>10)and(GetUnitManaPercent(IB)>40.))then
set UP=AO7(400.,m5,Condition(function Ki))
set J4=((UP>2)or((eY[O5]==10)and(UP>1)))and(IssuePointOrderById(IB,852190,GetUnitX(IB)+70.*Cos((GetUnitFacing(IB)-180.)*bj_DEGTORAD),GetUnitY(IB)+70.*Sin((GetUnitFacing(IB)-180.)*bj_DEGTORAD)))
endif
elseif(i1=='Emns')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>3)or(A87(m5))))then
call K2G()
set J4=((GetUnitLifePercent(m5)<70.)and(D78(IB,852119,'A1W8','A1W9',m5)))or((not IsUnitInRange(IB,m5,200.))and(IsUnitInRange(IB,m5,600))and(C_7(IB,852218,'A21E',m5)))
endif
elseif(i1=='O00P')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
if(GetUnitAbilityLevel(IB,'A0GC')>0)then
call K2G()
endif
set J4=((GetHeroLevel(IB)>5)or(GetUnitLifePercent(m5)<60.))and(IssueTargetOrderById(IB,852662,m5))
if((not J4)and(G0[128+O5])and((GetHeroLevel(IB)>3)or(A87(m5)))and(M4G)and(not IsUnitInRange(IB,m5,350.))and(AO7(600.,m5,Condition(function KI))<3)and(not IC(O5)))then
set b5=kL(IB,m5,200.)
if(b5!=null)then
if((GetUnitState(m5,UNIT_STATE_LIFE)<400.)and(GetUnitLifePercent(m5)<40.))then
call SetPlayerAbilityAvailable(GetOwningPlayer(IB),'A0FN',true)
set GZ[O5]=true
set J4=J8(O5,IssuePointOrderByIdLoc(IB,852218,b5))
endif
endif
endif
elseif((not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(not IsUnitType(m5,UNIT_TYPE_MECHANICAL))and(GetHeroLevel(IB)>10)and(GetUnitManaPercent(IB)>70.)and(not IsUnitInRange(IB,m5,350.)))then
if((AO7(400.,m5,Condition(function Ki))>2)and(AO7(500.,m5,Condition(function KI))==0)and(kJ(GetUnitX(m5),GetUnitY(m5))))then
call SetPlayerAbilityAvailable(GetOwningPlayer(IB),'A0FN',true)
set GZ[O5]=true
set J4=J8(O5,IssuePointOrderById(IB,852218,GetUnitX(m5),GetUnitY(m5)))
endif
endif
elseif(i1=='HC49')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
call K2G()
set UP=R2I(hq[16+O5]-Bz)
set J4=((GetHeroLevel(IB)>4)or(A87(m5)))and((GetUnitLifePercent(m5)<80.)or(M4G))and((((UP<=0)or(UP>50))and(C_7(IB,852095,'A24D',m5)))or((Bz>hq[O5])and(DE8(IB,852123,'A063'))))
endif
elseif(i1=='Nbbc')then
if((not GZ[O5])and(not IsUnitType(m5,UNIT_TYPE_MECHANICAL))and(not IsUnitType(m5,UNIT_TYPE_STRUCTURE)))then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=((not GV8(m5))and(GetUnitState(m5,UNIT_STATE_LIFE)<1200.)and(GetUnitState(m5,UNIT_STATE_LIFE)>200.)and((AO7(900.,m5,Condition(function KI))*2)>=AO7(900.,m5,Condition(function Ki)))and(GetUnitAbilityLevel(m5,'Bcyc')==0)and(GetUnitAbilityLevel(m5,'Bcy2')==0)and(D78(IB,852095,'A0M1','A1AX',m5)))or(((GetHeroLevel(IB)>4)or(A87(m5)))and(not LState(IB,"Omnislashing"))and(DE8(IB,852128,'A05G')))
elseif((GetHeroLevel(IB)>5)and(Bz>hq[O5])and((GetUnitState(IB,UNIT_STATE_MANA)>235.+(75*GetUnitAbilityLevel(IB,'A0M1')))or(GetUnitState(IB,UNIT_STATE_MANA)>235.+(75*GetUnitAbilityLevel(IB,'A1AX'))))and(AO7(400.,m5,Condition(function KI))>0))then
set J4=(not LState(IB,"Omnislashing"))and(DE8(IB,852128,'A05G'))
endif
endif
elseif(i1=='HC92')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>4)or(A87(m5))))then
set J4=(C_7(IB,852089,'A0RG',m5))
if((not J4)and(RAbsBJ((GetUnitFacing(m5)-GetUnitFacing(IB)))<=105.)and(GetUnitLifePercent(IB)>(GetUnitLifePercent(m5)+10.)))then
call IssueTargetOrderById(IB,851983,m5)
endif
endif
elseif(i1=='H001')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>4)or(A87(m5))))then
set J4=((GetUnitLifePercent(m5)<80.)or(M4G))and((((Bz>hq[O5])or(GetUnitCurrentOrder(m5)==851973))and(DE8(IB,852663,'A1WH')))or(C_7(IB,852662,'A190',m5))or(DE8(IB,852526,'A2IS')))
if((not J4)and(GetUnitAbilityLevel(IB,'B009')>0)and((not A87(IB))or(A87(m5))))then
call IssueTargetOrderById(IB,851983,m5)
endif
endif
elseif(i1=='H00A')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>4)or(A87(m5))))then
call K2G()
set J4=(C_7(IB,852585,'A0KM',m5))or(((GetUnitAbilityLevel(IB,'B05H')>0)or(GetUnitLifePercent(m5)<60.))and(C_7(IB,852095,'A0LV',m5)))
endif
elseif(i1=='H004')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
if((A87(m5))or((GetHeroLevel(IB)>3)and((M4G)or(GetUnitLifePercent(m5)<70.))))then
set UP=R2I(GetUnitState(m5,UNIT_STATE_LIFE))
set J4=((UP>150)and(UP<JNG(IB))and(not GV8(m5))and(D78(IB,852119,'A01P','A09Z',m5)))or(C_7(IB,852125,'A01F',m5))
endif
elseif(eY[O5]==10)then
set J4=(GetUnitManaPercent(IB)>60.)and(C_7(IB,852125,'A01F',m5))
endif
elseif(i1=='Ucrl')or(i1=='U01X')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=(M4G)and((GetHeroLevel(IB)>3)or(A87(m5)))and(((Bz>hq[O5])and(C_7(IB,852089,'A0LL',m5)))or(IssueTargetOrderById(IB,852600,m5)))
elseif(GetHeroLevel(IB)>5)then
if(IsUnitType(m5,UNIT_TYPE_STRUCTURE))then
set J4=(GetUnitLifePercent(m5)<30.)and((AO7(275.,m5,Condition(function Ki))>0)or(AO7(275.,m5,Condition(function Kj))>0))and(IssueTargetOrderById(IB,852600,m5))
else
set J4=(GetUnitManaPercent(IB)>60.)and(AO7(400.,m5,Condition(function Ki))>2)and(IssueTargetOrderById(IB,852600,m5))
endif
endif
elseif(i1=='Otch')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=(M4G)and((GetHeroLevel(IB)>3)or(A87(m5)))and(((IsUnitInRange(IB,m5,250.))and(DE8(IB,852164,'A0DL')))or(C_7(IB,852600,'A0SK',m5))or((R2I(GetUnitState(m5,UNIT_STATE_LIFE))<K1G(IB))and(GetUnitState(m5,UNIT_STATE_LIFE)>180.)and((DE8(IB,852526,'A0DH'))or(DE8(IB,852526,'A1OB')))))
elseif((IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(GetHeroLevel(IB)>10))then
set J4=((GetUnitLifePercent(m5)<40.)or(AO7(300.,IB,Condition(function Ki))>2))and(DE8(IB,852164,'A0DL'))
endif
elseif(i1=='N01A')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>3)or(A87(m5))))then
set J4=(((GetUnitAbilityLevel(m5,'BNsi')>0)or(GetUnitManaPercent(m5)<30.)or(GetUnitAbilityLevel(m5,'B01O')>0))and(IssueTargetOrderById(IB,852662,m5)))or((M4G)and(GetUnitAbilityLevel(m5,'BNsi')==0)and((YO7(GetUnitTypeId(m5),GX7))or(GetUnitLifePercent(m5)<60.)or(GetUnitLifePercent(IB)<60.))and(IssueImmediateOrderById(IB,852600)))
endif
elseif(i1=='H00K')then
if((not IsUnitType(m5,UNIT_TYPE_HERO))and(not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(not IsUnitType(m5,UNIT_TYPE_MECHANICAL))and(GetHeroLevel(IB)>10))then
set UP=AO7(300.,m5,Condition(function Ki))
set J4=((UP>1)and(GetHeroLevel(IB)>4)and(AO7(800.,m5,Condition(function KI))==0)and(GetUnitManaPercent(IB)>35.)and(L77(IB,852278,'A05J',L_7(m5))))
elseif((IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(GetHeroLevel(IB)>10)and(GetUnitLifePercent(IB)>70.))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(IB)-GetUnitY(m5),GetUnitX(IB)-GetUnitX(m5)))
call MoveLocation(HA,GetUnitX(m5)+70.*Cos(UP*bj_DEGTORAD),GetUnitY(m5)+70.*Sin(UP*bj_DEGTORAD))
if(IsUnitAlly(IB,G8[0]))then
set F37=Z47(m5,h7['d'])
else
set F37=Z47(m5,h7[0])
endif
set J4=(GetWidgetLife(m5)<450. or F37>6000)and(AO7(800.,m5,Condition(function KI))==0)and(AO7(300.,m5,Condition(function Kj))>1)and(L77(IB,852278,'A05J',HA))
endif
elseif(i1=='Hmkg')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=((GetHeroLevel(IB)>3)or(A87(m5)))and((C_7(IB,852095,GM8(IB),m5))or((GetUnitLifePercent(m5)<60)and(LBool(GetHandleId(IB),"AI|Magi2Blast")and C_7(IB,852600,'A2KQ',m5)))or(C_7(IB,852662,GN8(IB),m5)))
elseif((GetUnitManaPercent(IB)>50.)and(GetHeroLevel(IB)>10))then
set J4=((not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(AO7(300.,m5,Condition(function Ki))>2)and(C_7(IB,852662,GN8(IB),m5)))or((AO7(400.,m5,Condition(function Kj))>2)and(GetUnitAbilityLevel(IB,'Bblo')==0)and(C_7(IB,852101,GO8(IB),IB)))
endif
elseif(i1=='Huth')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
if(GetUnitAbilityLevel(IB,'B02O')==0)then
set J4=((GetHeroLevel(IB)>5)or(A87(m5)))and(((IsUnitInRange(IB,m5,300.))and(DE8(IB,852096,'A03Y')))or(DE8(IB,852100,'A0LC'))or(DE8(IB,852600,'A1P9')))
elseif(GetUnitLifePercent(IB)>50.)then
set J4=IssueTargetOrderById(IB,851983,m5)
endif
elseif(IsUnitType(m5,UNIT_TYPE_STRUCTURE))then
set J4=(GetUnitAbilityLevel(IB,'B02O')==0)and(GetUnitLifePercent(m5)<70.)and(DE8(IB,852600,'A1P9'))
endif
elseif(i1=='Ogrh')then
if((IsUnitType(m5,UNIT_TYPE_HERO))and((GetHeroLevel(IB)>5)or(A87(m5))))then
call K2G()
set J4=(GetUnitLifePercent(m5)<35.)and(C_7(IB,852662,'A10D',m5))
endif
elseif(i1=='Hamg')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=((GetUnitLifePercent(m5)<70.)and(GetUnitAbilityLevel(m5,'B0C1')==0)and(IssueImmediateOrderById(IB,852600)))or((GetUnitAbilityLevel(m5,'B0C1')>0)and(IssueTargetOrderById(IB,851983,m5)))
endif
elseif((i1=='N01O')or(i1=='N013')or(i1=='N014')or(i1=='N015'))then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
call K2G()
set hq[240+O5]=Bz+4.
set J4=(IssueTargetOrderById(IB,852101,IB))or(IssueImmediateOrderById(IB,852599))
elseif(IsUnitType(m5,UNIT_TYPE_STRUCTURE))then
set J4=(IssueTargetOrderById(IB,852101,IB))or(IssueImmediateOrderById(IB,852599))
endif
elseif(i1=='H00D')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
call K2G()
set J4=(GetUnitLifePercent(m5)<55.)and(GetUnitState(m5,UNIT_STATE_LIFE)>200.)and(D78(IB,852095,'A0O2','A289',m5))
elseif((not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(not IsUnitType(m5,UNIT_TYPE_MECHANICAL))and(GetHeroLevel(IB)>8)and(GetUnitManaPercent(IB)>45.)and(GetUnitLifePercent(m5)<75.))then
if(AO7(550.,m5,Condition(function Ki))>2)then
call SetPlayerAbilityAvailable(GetOwningPlayer(IB),'A0O1',true)
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(m5)-GetUnitY(IB),GetUnitX(m5)-GetUnitX(IB)))
set GZ[O5]=true
set J4=IssuePointOrderById(IB,852218,GetUnitX(IB)+1000.*Cos(UP*bj_DEGTORAD),GetUnitY(IB)+1000.*Sin(UP*bj_DEGTORAD))
set GZ[O5]=false
endif
endif
elseif(i1=='E00P')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=((GetHeroLevel(IB)>3)or(A87(m5)))and((C_7(IB,852218,'A0O7',m5))or((GetUnitLifePercent(m5)<60.)and(L77(IB,852580,'A0O6',OM8(IB,m5,2000.,.65,1100.)))))
elseif((not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(GetHeroLevel(IB)>9)and(GetUnitManaPercent(IB)>60.)and(GetUnitLifePercent(m5)<75.))then
set J4=(AO7(400.,m5,Condition(function Ki))>2)and(C_7(IB,852218,'A0O7',m5))
endif
elseif((i1=='N01I')or(i1=='N01H')or(i1=='N01T')or(i1=='N01J'))then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=(((GetHeroLevel(IB)>3)or(A87(m5)))and(C_7(IB,852089,'A0IL',m5)))or(((GetUnitLifePercent(m5)<75.)or(GetUnitLifePercent(IB)<65.))and(i1=='N01I')and(DE8(IB,852663,'ANcr')))
if((not J4)and(i1!='N01I')and(GetUnitLifePercent(IB)>75.))then
call IssueTargetOrderById(IB,851983,m5)
endif
elseif((not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(not IsUnitType(m5,UNIT_TYPE_MECHANICAL)))then
if((Bz>hq[O5])and(GetHeroLevel(IB)>6)and(GetUnitManaPercent(IB)>50.))then
set UP=AO7(500.,m5,Condition(function Ki))
set J4=((UP>3)or((eY[O5]==10)and(UP>1)))and(C_7(IB,852089,'A0IL',m5))
endif
elseif((IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(i1=='N01I')and(GetUnitManaPercent(IB)>50.)and(GetHeroLevel(IB)>10))then
set J4=(AO7(400.,m5,Condition(function Kj))>2)and(DE8(IB,852663,'ANcr'))
endif
elseif(i1=='N01V')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=((GetHeroLevel(IB)>2)or(A87(m5)))and(((IsUnitInRange(IB,m5,550.))and((GetUnitManaPercent(IB)>50.)or(GetUnitLifePercent(m5)<60.))and(IssueImmediateOrderById(IB,852600)))or(((GetUnitLifePercent(m5)<75.)or(M4G))and(VNF(IB,m5))))
elseif((not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(GetHeroLevel(IB)>6)and(GetUnitManaPercent(IB)>60.))then
set UP=AO7(500.,IB,Condition(function Ki))
set J4=((UP>2)or((eY[O5]==10)and(UP>1)))and(IssueImmediateOrderById(IB,852600))
endif
elseif(i1=='H00S')then
if(((GetHeroLevel(IB)>11)and(GetUnitState(IB,UNIT_STATE_MANA)>600.))or(IsUnitType(m5,UNIT_TYPE_HERO))or((IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(GetUnitManaPercent(IB)>30.)and(GetUnitTypeId(m5)!='ebal')and(GetUnitTypeId(m5)!='umtw')and(GetUnitTypeId(m5)!='e026')and(GetUnitTypeId(m5)!='u00R')))then
if(GetUnitAbilityLevel(IB,'A0QZ')>0)then
set hq[240+O5]=Bz+5.
else
set J4=IssueImmediateOrderById(IB,852177)
endif
endif
elseif(i1=='E01Y')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=((M4G)and((GetUnitLifePercent(m5)<80.)or(GetUnitLifePercent(IB)<60.))and(IssueImmediateOrderById(IB,852526)))or((IsUnitInRange(IB,m5,145+(40*GetUnitAbilityLevel(IB,'A0RO'))))and(DE8(IB,852129,'A0RV')))
endif
elseif(i1=='N00B')then
if((GetHeroLevel(IB)>10)and(not IsUnitType(m5,UNIT_TYPE_HERO))and(not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(iy(IB)))then
if(AO7(550.,m5,Condition(function Ki))>2)then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(m5)-GetUnitY(IB),GetUnitX(m5)-GetUnitX(IB)))
set J4=IssuePointOrderById(IB,852662,GetUnitX(IB)+200.*Cos(UP*bj_DEGTORAD),GetUnitY(IB)+200.*Sin(UP*bj_DEGTORAD))
set h4[16+O5]=null
endif
endif
elseif(i1=='N0NG')then
if((IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(GetUnitLifePercent(m5)<35.)and(GetUnitLevel(IB)>5)and(Bz>V74[O5]))then
set J4=D78(IB,852230,'A12P','A1D6',m5)
endif
elseif(i1=='E02X')then
if(IsUnitType(m5,UNIT_TYPE_HERO))then
set J4=((GetHeroLevel(IB)>3)or(A87(m5)))and((C_7(IB,852184,'A27G',m5))or((GetUnitLifePercent(m5)<60.)and(C_7(IB,852214,'A27F',m5))))
elseif((not IsUnitType(m5,UNIT_TYPE_STRUCTURE))and(GetHeroLevel(IB)>9)and(GetUnitManaPercent(IB)>60.)and(GetUnitLifePercent(m5)<75.))then
set J4=(AO7(400.,m5,Condition(function Ki))>2)and(C_7(IB,852184,'A27G',m5))
endif
endif
set GZ[32+O5]=false
set IB=null
set m5=null
set b5=null
endfunction
function M7G takes nothing returns boolean
return((GetSpellTargetUnit()!=null)and(IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_HERO))and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetSpellTargetUnit())))and(GetPlayerController(GetOwningPlayer(GetSpellTargetUnit()))==MAP_CONTROL_COMPUTER))
endfunction
function M8G takes nothing returns boolean
return((IsUnitType(GetAttacker(),UNIT_TYPE_HERO))and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker())))and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER))
endfunction
function M9G takes nothing returns nothing
local unit it
local unit EPG
local integer i1
local integer O5
local boolean MDG
local boolean J4
local real kl
if(GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED)then
set it=GetTriggerUnit()
set EPG=GetAttacker()
elseif(GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT)then
set it=GetSpellTargetUnit()
set EPG=GetTriggerUnit()
else
set it=GetEnumUnit()
set EPG=GetTriggerUnit()
endif
set O5=GetPlayerId(GetOwningPlayer(it))
if((not Jw(it))or(Bz<hq[304+O5]))then
set it=null
set EPG=null
return
endif
if G0[288+O5]then
set G0[288+O5]=false
set i1=eY[400+O5]
set G0[304+O5]=true
else
set G0[304+O5]=false
endif
if not G0[304+O5]then
set hq[496+O5]=Bz+1.5
set hq[304+O5]=Bz+1.
set hq[416+O5]=Bz+5.
if((not IsUnitVisibleEx(EPG,GetOwningPlayer(it)))or(eY[32+GetPlayerId(GetOwningPlayer(EPG))]<=2))then
call TriggerSleepAction(.8)
else
call TriggerSleepAction(.2)
endif
if(Bz>hq[480+O5])then
call EOG(it,EPG)
endif
set MDG=(A87(it))
if(not G0[256+O5])and(not A47(EPG,it))then
call VQF(it,false)
set it=null
set EPG=null
return
elseif((GetHeroLevel(it)>13)and(GetUnitLifePercent(it)>75.)and(GetUnitState(EPG,UNIT_STATE_LIFE)<GetUnitState(it,UNIT_STATE_LIFE))and(h4[O5]==null))then
call VTF(O5,EPG,false,false)
endif
if((Z_7(it))and(not MDG)and((GetHeroLevel(it)<6)or((GG8(it))and(GetHeroLevel(it)<10)))and(iU(it))and(h4[O5]!=EPG))then
if((GetUnitCurrentOrder(it)!=851983)or((GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED)and(not GI8(GetSpellAbilityId())))or(GetUnitLifePercent(it)<70.))then
call VQF(it,false)
set it=null
set EPG=null
return
endif
endif
set i1=GetUnitTypeId(it)
endif
if((not is(it))or(not Z_7(it)))then
if(Z_7(it))then
elseif((i1=='Hblm'))then
set J4=(GetUnitCurrentOrder(it)==852600)and(GetUnitLifePercent(it)<80.)and(D48(it,851986,h9[O5]))
elseif(i1=='E01C')then
set J4=(GetUnitCurrentOrder(it)==852089)and(GetUnitLifePercent(it)<50.)and(D48(it,851986,h9[O5]))
elseif(i1=='UC18')then
set J4=(GetUnitCurrentOrder(it)==852487)and(D48(it,851986,h9[O5]))
endif
set it=null
set EPG=null
return
endif
if((MDG)and((GetUnitState(EPG,UNIT_STATE_LIFE)+200.)>GetUnitState(it,UNIT_STATE_LIFE))and(IsUnitInRange(it,EPG,500.)))then
if(not J4)and((AR7(it,BU[euldeshenshengfazhang])))and((GetUnitLifePercent(it)<40)or(h4[O5]!=EPG))then
set J4=UnitUseItemTarget(it,bj_lastCreatedItem,EPG)
endif
if(not J4)and(AR7(it,BU[xieeliandao]))then
set J4=UnitUseItemTarget(it,bj_lastCreatedItem,EPG)
endif
if(not J4)and(AR7(it,BU[shenyuanzhiren]))and(GetUnitLifePercent(EPG)<40)then
set J4=UnitUseItemTarget(it,bj_lastCreatedItem,EPG)
endif
if(not J4)and(AR7(it,BU[tiantangzhiji]))and(LInt(GetHandleId(GetOwningPlayer(EPG)),"AI|Class")<=2)and(GetUnitLifePercent(it)<40)then
set J4=UnitUseItemTarget(it,bj_lastCreatedItem,EPG)
endif
if(not J4)and(AR7(it,BU[xiwadeshouhu]))then
set J4=UnitUseItem(it,bj_lastCreatedItem)
endif
if(not J4)and(AR7(it,BU[ziyuan])and(Bz>V74[240+O5])and(S69(EPG)==false)and(CI7(EPG)==false))then
set J4=UnitUseItemTarget(it,bj_lastCreatedItem,EPG)
endif
if(not J4)and(LC7(it,BU[dagongzhishenli]))then
set J4=(L17(it,EPG))
endif
if(not J4)and((AR7(it,BU[sanshizhiren])or AR7(it,BU[sanshizhiren2]))and(GetItemCharges(bj_lastCreatedItem)>0))and(UnitCountBuffsExBJ(bj_BUFF_POLARITY_NEGATIVE,bj_BUFF_RESIST_EITHER,EPG,false,false)==0)then
set J4=(UnitUseItemTarget(it,bj_lastCreatedItem,EPG))
endif
if(not J4)and(LC7(it,BU[huanyingfu]))and(GetUnitTypeId(it)!='Eevm')then
set J4=(UnitUseItem(it,bj_lastCreatedItem))
endif
endif
if((not J4)and(IsUnitInRange(it,EPG,500.))and((GetUnitAbilityLevel(EPG,'B009')>0)or(GetUnitAbilityLevel(EPG,'B01E')>0)or(GetUnitAbilityLevel(EPG,'B00B')>0)or(GetUnitAbilityLevel(EPG,'B01P')>0)))then
set J4=VOF(it,EPG,false)
if(not J4)then
if(not J4)and((AR7(it,BU[euldeshenshengfazhang])))then
set J4=UnitUseItemTarget(it,bj_lastCreatedItem,EPG)
endif
if(not J4)and(AR7(it,BU[xieeliandao]))then
set J4=UnitUseItemTarget(it,bj_lastCreatedItem,EPG)
endif
if(not J4)and(AR7(it,BU[shenyuanzhiren]))then
set J4=UnitUseItemTarget(it,bj_lastCreatedItem,EPG)
endif
if(not J4)and(AR7(it,BU[xiwadeshouhu]))then
set J4=UnitUseItem(it,bj_lastCreatedItem)
endif
if(not J4)and(LC7(it,BU[dagongzhishenli]))then
set J4=(L17(it,EPG))
endif
if(not J4)and((AR7(it,BU[sanshizhiren])or AR7(it,BU[sanshizhiren2]))and(GetItemCharges(bj_lastCreatedItem)>0))then
set J4=UnitUseItemTarget(it,bj_lastCreatedItem,EPG)
endif
endif
endif
if(not J4)and(LInt(GetHandleId(GetOwningPlayer(EPG)),"AI|Class")<=2)and(GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED)and(h4[O5]!=null or(GetUnitLifePercent(it)<30))then
if(not J4)and(AR7(it,BU[youhunquanzhang]))then
set J4=UnitUseItem(it,bj_lastCreatedItem)
endif
if(not J4)and(AR7(it,BU[xulingzhiren]))then
set J4=UnitUseItemTarget(it,bj_lastCreatedItem,EPG)
endif
if(not J4)and(AR7(it,BU[renjia]))then
set U_4=true
set J4=UnitUseItem(it,bj_lastCreatedItem)
endif
if(not J4)and(AR7(it,BU[tiantangzhiji]))and((h4[O5]==EPG)or(GetUnitLifePercent(it)<70))then
set J4=UnitUseItemTarget(it,bj_lastCreatedItem,EPG)
endif
if(i1=='U000')and(Bz>V74[48+O5]+4.)then
set J4=DE8(it,852526,'A2KO')
endif
endif
if(J4)then
elseif((i1=='H00V')or(i1=='H08D')or(i1=='H08C')or(i1=='H084')or(i1=='H08B'))then
set J4=((MDG)or(GetUnitAbilityLevel(EPG,'B009')>0)or(GetUnitAbilityLevel(EPG,'B01E')>0)or(GetUnitAbilityLevel(EPG,'B00B')>0)or(GetUnitAbilityLevel(EPG,'BNcr')>0)or(GetUnitAbilityLevel(EPG,'B01P')>0))and(IsUnitInRange(it,EPG,550.))and(DE8(it,852581,'A1AT'))
elseif(i1=='EC77')then
set J4=(MDG)and(((GetUnitAbilityLevel(it,'A080')>0)and(IsUnitInRange(it,EPG,450.)))or((GetUnitAbilityLevel(it,'A1UZ')>0)and(IsUnitInRange(it,EPG,780.))))and(D78(it,852527,'A080','A1UZ',EPG))
elseif(i1=='E004')then
set J4=(MDG)and(IssueImmediateOrderById(it,852129))
elseif((i1=='EC45')or(i1=='Edem')or(i1=='U00K')or(i1=='UC01'))then
set J4=(MDG)and(LGF(it))
elseif(i1=='U000')then
set J4=(MDG)and(IsUnitInRange(it,EPG,400.))and(C_7(it,852555,'A0X7',EPG))
if((not J4)and(MDG)and(GetHeroLevel(it)>15)and(GetUnitLifePercent(it)<20.))then
set GZ[O5]=true
set J4=J8(O5,DE8(it,852129,'A09U'))
endif
elseif(i1=='UC91')then
if(MDG)then
set J4=(IsUnitInRange(EPG,it,300.))and(DE8(it,852127,'A29K'))
else
set J4=((IsUnitInRange(it,EPG,500.))and(C_7(it,852149,'A034',EPG)))or((IsUnitInRange(EPG,it,300.))and(DE8(it,852127,'A29K')))
endif
elseif(i1=='UC42')then
set J4=(MDG)and(IsUnitInRange(it,EPG,500.))and(D78(it,852583,'A0MU','A0A2',EPG))
elseif(i1=='NC00')then
set J4=(MDG)and(IsUnitInRange(it,EPG,450.))and(C_7(it,852095,'AHtb',EPG))
elseif((i1=='Eevi')or(i1=='Eevm')or(i1=='E02V')or(i1=='E02W')or(i1=='E02U'))then
if(GetUnitLifePercent(EPG)>(GetUnitLifePercent(it)+35.))then
set J4=(IsUnitInRange(it,EPG,350.))and(C_7(it,852189,'A07Q',EPG))
endif
elseif(i1=='Ekee')then
set J4=((IsUnitInRange(EPG,it,300.))and(IssueImmediateOrderById(it,852177)))or((IsUnitInRange(EPG,it,500.))and(DE8(it,852594,'A035')))
elseif(i1=='Ulic')then
set J4=((MDG)and(IsUnitInRange(it,EPG,500.))and(C_7(it,852226,'A07F',EPG)))or((GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED)and(C_7(it,852225,'A08R',EPG)))
elseif(i1=='UC18')then
set J4=(MDG)and(((IsUnitInRange(it,EPG,450.))and(C_7(it,852502,'A0MN',EPG)))or((IsUnitInRange(it,EPG,350.))and(C_7(it,852555,'A0X5',EPG))))
elseif(i1=='EC57')then
set J4=(IsUnitInRange(it,EPG,350.))and(C_7(it,852669,'A173',EPG))
elseif(i1=='UC60')then
set J4=(MDG)and((IsUnitInRange(it,EPG,500.))and(C_7(it,852189,'A08X',EPG)))or((IsUnitInRange(it,EPG,860.))and(LInt(GetHandleId(it),"Level")>GetUnitAbilityLevel(it,'A1NA'))and(GetUnitManaPercent(it)>35.)and(GetHeroLevel(it)>3)and(IssueTargetOrderById(it,852248,EPG)))
elseif((i1=='U008')or(i1=='E015'))then
set J4=(MDG)and(IsUnitInRange(it,EPG,1000.))and(DE8(it,852180,'A093'))
elseif(i1=='U00A')then
set J4=(MDG)and(IsUnitInRange(it,EPG,450.))and(C_7(it,852231,'A055',EPG))
elseif(i1=='Ewar')then
set J4=(MDG)and(((IsUnitInRange(it,EPG,350.))and(C_7(it,852662,'A0YM',EPG)))or(LGF(it)))
elseif(i1=='Udea')then
set J4=((GetHeroLevel(it)>5)or(GetUnitLifePercent(it)<60.))and(IssueTargetOrderById(it,852119,it))
elseif(i1=='Hvsh')then
set J4=(MDG)and(IsUnitInRange(it,EPG,500.))and(GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED)and(YO7(GetUnitTypeId(EPG),GX7))and(C_7(it,852668,'A0EC',EPG))
elseif(i1=='Ubal')then
set J4=((JPG(it)>30.)and(DE8(it,852600,'A0CT')))or((GetUnitState(it,UNIT_STATE_MANA)>350.)and(IsUnitType(EPG,UNIT_TYPE_HERO))and(IssuePointOrderById(it,852662,GetUnitX(EPG),GetUnitY(EPG))))or((MDG)and(IssueImmediateOrderById(it,852129)))
if((not J4)and(not MDG)and(GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED))then
set h4[288+O5]=EPG
set J4=IssueImmediateOrderById(it,852129)
endif
elseif(i1=='U00F')then
set J4=(not MDG)and(VMF(it,EPG))
elseif(i1=='Oshd')then
set J4=(IsUnitInRange(it,EPG,450.))and(GetUnitLifePercent(EPG)>30 or GetWidgetLife(EPG)<50)and(((MDG)and(C_7(it,852227,'A04Y',EPG)))or((GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED)and(kq(GetUnitTypeId(EPG)))and(C_7(it,852095,'A2OI',EPG)))or((GetUnitLifePercent(it)<90.)and(C_7(it,852119,'A0GK',EPG))))
elseif(i1=='Ofar')then
set J4=(MDG)and(IsUnitInRange(it,EPG,600.))and(DE8(it,852588,'A29I'))
elseif(i1=='E01A')then
set J4=(MDG)and(IsUnitInRange(it,EPG,550.))and(C_7(it,852119,'A0NM',EPG))
elseif(i1=='U00P')then
set J4=(MDG)and(IsUnitInRange(it,EPG,500.))and(C_7(it,852119,'A0OJ',EPG))
elseif(i1=='UC76')then
set J4=(MDG)and(IsUnitInRange(it,EPG,600.))and(IssueImmediateOrderById(it,852556))
elseif(i1=='E01B')then
if(MDG)then
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'A0HW',true)
set J4=(IsUnitInRange(it,EPG,500.))and(IssueTargetOrderById(it,852662,EPG))
endif
elseif((i1=='H00I')or(i1=='H00J'))then
set J4=(MDG)and(IsUnitInRange(it,EPG,600.))and(JBG(it,EPG))
elseif(i1=='N01W')then
set J4=(((GetHeroLevel(it)>2)or(MDG))and(GetUnitLifePercent(it)<85.)and(IssueTargetOrderById(it,852229,it)))or((GetHeroLevel(it)>10)and(MDG)and(GetUnitAbilityLevel(it,'A0OV')==0)and(IssueTargetOrderById(it,852536,it)))or((MDG)and(IsUnitInRange(it,EPG,500.))and(C_7(it,852095,'A0NQ',EPG)))
elseif(i1=='N00R')then
set J4=(MDG)and(IsUnitInRange(it,EPG,550.))and(C_7(it,852488,'A0RA',EPG))
elseif(i1=='H008')then
set J4=(MDG)and(IsUnitInRange(it,EPG,550.))and(IssueTargetOrderById(it,852600,EPG))
elseif(i1=='Npbm')then
set J4=((MDG)and((DE8(it,852586,'A0MQ'))or((IsUnitInRange(it,EPG,200.))and(DE8(it,852096,'A06M')))))or((not MDG)and(GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED)and(IsUnitInRange(it,EPG,500.))and(C_7(it,852585,'Acdh',EPG)))
elseif(i1=='H000')then
set J4=(MDG)and(IsUnitInRange(EPG,it,220.))and(DE8(it,852127,'A00S'))
elseif(i1=='Nbrn')then
set J4=(YO7(GetUnitTypeId(it),GX7))and(GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED)and(DE8(it,852127,'A00S'))
elseif(i1=='Harf')then
set J4=((GetUnitLifePercent(it)<70.)and((C_7(it,852225,'A08N',it))or((GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED)and(C_7(it,852186,'A08V',it)))))or((MDG)and(IssueImmediateOrderById(it,852599)))
elseif((i1=='N016')or(i1=='N017')or(i1=='N02B'))then
set J4=(GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED)and((((IsUnitInRange(it,EPG,250.))and(IssueImmediateOrderById(it,852138))and(IssueTargetOrderById(it,851983,EPG)))or((IsUnitInRange(it,EPG,550.))and(IssueImmediateOrderById(it,852139))and(IssueTargetOrderById(it,851983,EPG)))))
elseif(i1=='Naka')then
set J4=(MDG)and((IssueImmediateOrderById(it,852129))or((IsUnitInRange(it,EPG,650.))and(IsUnitVisibleEx(it,GetOwningPlayer(EPG)))and(C_7(it,852149,'A0B4',EPG))))
elseif(i1=='Orkn')then
set J4=(MDG)and(IsUnitInRange(EPG,it,450.))and(C_7(it,852502,'A0RX',EPG))
elseif(i1=='Hvwd')then
set J4=(MDG)and((LGF(it))or((IsUnitInRange(EPG,it,450.))and(C_7(it,852095,'A02A',EPG))))
elseif(i1=='Emoo')then
set J4=((GetUnitLifePercent(it)<70.)and(DE8(it,852556,'A01B')))or((IsUnitInRange(EPG,it,600.))and(C_7(it,852075,'A0DX',EPG)))
elseif(i1=='Uktl')then
set J4=(MDG)and(IsUnitInRange(it,EPG,500.))and(IssueTargetOrderById(it,852662,EPG))
elseif((i1=='Hblm')or(i1=='H06X')or(i1=='H06Y')or(i1=='H06W'))then
set J4=(not MDG)and(GetUnitManaPercent(EPG)>30.)and(IsUnitInRange(it,EPG,600.))and(C_7(it,852662,'A10X',EPG))
elseif(i1=='Emns')then
set J4=(MDG)and(not IsUnitInRange(it,EPG,200.))and(IsUnitInRange(it,EPG,550.))and(C_7(it,852218,'A21E',EPG))
elseif(i1=='O00P')then
set J4=(MDG)and((LGF(it))or((GetHeroAgi(it,true)<GetHeroStr(it,true))and(IssueTargetOrderById(it,852662,EPG))))
elseif(i1=='UC11')then
set J4=((MDG)and(LGF(it)))or(IsUnitInRange(it,EPG,350.)and(DE8(it,852127,'A29L')))
elseif(i1=='HC49')then
set J4=(MDG)and((IssueImmediateOrderById(it,852600))or((IsUnitInRange(it,EPG,550.))and(C_7(it,852095,'A24D',EPG)))or(DE8(it,852123,'A063')))
elseif(i1=='Nbbc')then
set J4=(MDG)and((((AR7(it,BU[siwangmianju]))or(AR7(it,BU[jipin])))and(not GV8(EPG))and(D78(it,852095,'A0M1','A1AX',EPG)))or((GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED)and(not GZ[O5])and(not LState(it,"Omnislashing"))and(DE8(it,852128,'A05G'))))
elseif(i1=='HC92')then
set J4=(MDG)and(((IsUnitInRange(it,EPG,300.))and(C_7(it,852089,'A0RG',EPG)))or(LGF(it)))
elseif(i1=='Hjai')then
set J4=(MDG)and(IsUnitInRange(it,EPG,450.))and(C_7(it,852171,'A04C',EPG))
elseif(i1=='N0HP')then
call XK7("Triggered func 8 for |c00ffff00Kaldr"+"|r")
elseif(i1=='H001')then
set J4=(MDG)and(IsUnitInRange(it,EPG,450.))and((C_7(it,852662,'A190',EPG))or(DE8(it,852526,'A2IS')))
elseif(i1=='H00A')then
set J4=(MDG)and((IssueImmediateOrderById(it,852600))or((IsUnitInRange(it,EPG,550.))and(C_7(it,852585,'A0KM',EPG))))
elseif(i1=='Ucrl')or(i1=='U01X')then
set J4=(MDG)and(IsUnitInRange(it,EPG,550.))and(C_7(it,852089,'A0LL',EPG))
elseif(i1=='Otch')then
set J4=(MDG)and(IsUnitInRange(it,EPG,1000.))and(C_7(it,852600,'A0SK',EPG))
elseif(i1=='N01A')then
set J4=(GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED)and((not MDG)or(IsUnitInRange(it,EPG,550.)))and(IssueTargetOrderById(it,852662,EPG))
elseif(i1=='H00K')then
if((GetUnitLifePercent(it)<20.)or(GetUnitState(it,UNIT_STATE_LIFE)<150.))then
set GZ[O5]=true
set J4=J8(O5,(IsUnitInRange(it,EPG,400.))and(C_7(it,852040,'A06B',EPG)))
endif
elseif(i1=='Hmkg')then
set J4=(MDG)and(IsUnitInRange(it,EPG,550.))and((C_7(it,852095,GM8(it),EPG))or((GetUnitLifePercent(EPG)<60)and(LBool(GetHandleId(it),"AI|Magi2Blast")and C_7(it,852600,'A2KQ',EPG))))
elseif(i1=='Hamg')then
if(GetUnitAbilityLevel(it,'B021')>0)then
set GZ[272+O5]=true
endif
if(not MDG)then
set J4=(GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED)and(C_7(it,852095,'A26N',it))
else
set J4=(K6(it))and(IssueTargetOrderById(it,852069,it))
endif
elseif((i1=='N01O')or(i1=='N013')or(i1=='N014')or(i1=='N015'))then
set h4[16+O5]=LUnit(GetHandleId(GetOwningPlayer(it)),"MyBear")
if((h4[16+O5]!=null)and(GetUnitAbilityLevel(it,'A0A5')>1)and(not IsUnitInRange(it,h4[16+O5],800.))and(not GZ[288+O5])and(GetUnitLifePercent(h4[16+O5])>30.))then
endif
elseif(i1=='E00P')then
set J4=(MDG)and(IsUnitInRange(it,EPG,1000.))and(L77(it,852580,'A0O6',OM8(it,EPG,2000.,.65,1100.)))
elseif(i1=='N01V')then
set J4=((MDG)and(IssueImmediateOrderById(it,852493)))or((IsUnitInRange(it,EPG,400.))and(IssueImmediateOrderById(it,852600)))or(((GetUnitLifePercent(EPG)<70.)or(MDG))and(not IsUnitInRange(it,EPG,400.))and(VNF(it,EPG)))
elseif(i1=='E02X')then
set J4=(MDG)and(IsUnitInRange(it,EPG,1000.))and(C_7(it,852214,'A27F',EPG))
if(not J4)and hq[816+O5]>Bz then
set G0[288+O5]=true
call M9G()
endif
set G0[304+O5]=false
endif
if not G0[304+O5]then
if((not J4)and(iU(it)))then
call XK7(GG7+" "+GetUnitName(it)+" step0")
if((MDG)and(GetUnitLifePercent(EPG)>70.))then
call F28(it,false)
elseif((GetHeroLevel(it)>5)and(G0[128+O5])and((GetUnitLifePercent(it)>80.)or(GetUnitState(it,UNIT_STATE_LIFE)>GetUnitState(EPG,UNIT_STATE_LIFE)))and(IsUnitInRange(it,EPG,800.))and(GetUnitCurrentOrder(it)!=851986))then
call IssueTargetOrderById(it,851983,EPG)
call XK7(GG7+" "+GetUnitName(it)+" step1")
elseif((GetHeroLevel(it)<6)and(GetUnitLifePercent(EPG)>60.)and(((not IsUnitInRange(it,EPG,300.))and(GG8(it)))or((IsUnitInRange(it,EPG,300.))and(not GG8(it)))))then
set kl=Atan2(GetUnitY(h9[16+O5])-GetUnitY(it),GetUnitX(h9[16+O5])-GetUnitX(it))
call IssuePointOrderById(it,851986,GetUnitX(it)+300.*Cos(kl),GetUnitY(it)+300.*Sin(kl))
endif
endif
if((hq[656+O5]>Bz)and(GetUnitLifePercent(it)<65.))then
call F28(it,false)
endif
if((J4)or(not is(it)))then
set hq[304+O5]=.0
endif
endif
set it=null
set EPG=null
endfunction
function LCF takes nothing returns nothing
local unit it=GetEnumUnit()
local integer i1=GetUnitTypeId(GetEnumUnit())
local integer O5=GetPlayerId(GetOwningPlayer(GetEnumUnit()))
local real kl=Atan2(GetUnitY(h9[O5])-GetUnitY(it),GetUnitX(h9[O5])-GetUnitX(it))
local real M78
if(AR7(it,BU[keledebishou]))then
if(kJ(GetUnitX(it)+700.*Cos(kl),GetUnitY(it)+700.*Sin(kl)))then
call MoveLocation(HB,GetUnitX(it)+700.*Cos(kl),GetUnitY(it)+700.*Sin(kl))
else
set kl=GetRandomReal(.0,6.28)
call MoveLocation(HB,GetUnitX(it)+500.*Cos(kl),GetUnitY(it)+500.*Sin(kl))
endif
call UnitUseItemPointLoc(it,AV7(it,BU[keledebishou]),HB)
elseif(i1=='EC45')then
set M78=I2R(350+(200*GetUnitAbilityLevel(it,'A0LK')))
if(kJ(GetUnitX(it)+M78*Cos(kl),GetUnitY(it)+M78*Sin(kl)))then
call MoveLocation(HB,GetUnitX(it)+M78*Cos(kl),GetUnitY(it)+M78*Sin(kl))
else
set kl=GetRandomReal(.0,6.28)
call MoveLocation(HB,GetUnitX(it)+(M78-100.)*Cos(kl),GetUnitY(it)+(M78-100.)*Sin(kl))
endif
call IssuePointOrderByIdLoc(it,852218,HB)
elseif((i1=='UC01')or(i1=='Edem'))then
if(kJ(GetUnitX(it)+800.*Cos(kl),GetUnitY(it)+800.*Sin(kl)))then
call MoveLocation(HB,GetUnitX(it)+800.*Cos(kl),GetUnitY(it)+800.*Sin(kl))
else
set kl=GetRandomReal(.0,6.28)
call MoveLocation(HB,GetUnitX(it)+550.*Cos(kl),GetUnitY(it)+550.*Sin(kl))
endif
call IssuePointOrderByIdLoc(it,852525,HB)
elseif(i1=='U00K')then
set M78=I2R(280+('d'*GetUnitAbilityLevel(it,'A06O')))
if(kJ(GetUnitX(it)+M78*Cos(kl),GetUnitY(it)+M78*Sin(kl)))then
call MoveLocation(HB,GetUnitX(it)+M78*Cos(kl),GetUnitY(it)+M78*Sin(kl))
else
set kl=GetRandomReal(.0,6.28)
call MoveLocation(HB,GetUnitX(it)+(M78-100.)*Cos(kl),GetUnitY(it)+(M78-100.)*Sin(kl))
endif
call IssuePointOrderByIdLoc(it,852218,HB)
elseif(i1=='O00P')then
if(kJ(GetUnitX(it)+550.*Cos(kl),GetUnitY(it)+550.*Sin(kl)))then
call MoveLocation(HB,GetUnitX(it)+550.*Cos(kl),GetUnitY(it)+550.*Sin(kl))
else
set kl=GetRandomReal(.0,6.28)
call MoveLocation(HB,GetUnitX(it)+450.*Cos(kl),GetUnitY(it)+450.*Sin(kl))
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'A0FN',true)
call IssuePointOrderByIdLoc(it,852218,HB)
elseif(i1=='N01V')then
set GZ[O5]=true
call J8(O5,DE8(it,852129,'A0LN'))
elseif(i1=='H071')then
set GZ[O5]=true
call J8(O5,DE8(it,852600,'A1J7'))
elseif(i1=='H00S')then
if(kJ(GetUnitX(it)+1500.*Cos(kl),GetUnitY(it)+1500.*Sin(kl)))then
call MoveLocation(HB,GetUnitX(it)+1500.*Cos(kl),GetUnitY(it)+1500.*Sin(kl))
else
set kl=GetRandomReal(.0,6.28)
call MoveLocation(HB,GetUnitX(it)+550.*Cos(kl),GetUnitY(it)+550.*Sin(kl))
endif
call IssuePointOrderByIdLoc(it,852218,HB)
else
call LGF(it)
endif
call Y07(1.)
if Z47(it,h9[O5])<400 then
call D48(it,851983,h8[O5])
else
call D48(it,851986,h9[O5])
endif
set it=null
endfunction
function MEG takes nothing returns boolean
local unit it=GetEnumUnit()
local integer i1=GetUnitTypeId(GetEnumUnit())
local player pl=GetOwningPlayer(GetEnumUnit())
local location b5=HC[16+GetPlayerId(pl)]
local unit m5=null
local boolean J4=false
local integer FFD
local integer UP
local integer O5=GetPlayerId(pl)
if G0[288+O5]then
set G0[288+O5]=false
set i1=eY[400+O5]
set G0[304+O5]=true
else
set G0[304+O5]=false
endif
if(not Z57(it))and(Z27(it))then
return true
endif
if((i1=='H00V')or(i1=='H08D')or(i1=='H08C')or(i1=='H084')or(i1=='H08B'))then
set m5=AJ7(700.,b5,Condition(function Kn))
set J4=(m5!=null)and(DE8(it,852581,'A1AT'))
elseif(i1=='E004')then
set J4=IssueImmediateOrderById(it,852129)
if((not J4)and(GetHeroLevel(it)>6)and(GetUnitAbilityLevel(it,'B07T')==0)and(GetUnitState(it,UNIT_STATE_MANA)>350.))then
set m5=AJ7(500.,b5,Condition(function KD))
set J4=(m5!=null)and(not IsUnitType(m5,UNIT_TYPE_MECHANICAL))and(C_7(it,852066,'A04Q',m5))
endif
elseif((i1=='EC45')or(i1=='Edem')or(i1=='HC92')or(i1=='U00K')or(i1=='N01V')or(i1=='N0MU'))then
set J4=LGF(it)
elseif(i1=='U000')then
if(not kD(it))then
set m5=AJ7(400.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852555,'A0X7',m5))
endif
if((GetHeroLevel(it)>10.)and(GetUnitLifePercent(it)<30.)and(AN7(700.,b5,Condition(function Kn))>0))then
set GZ[GetPlayerId(pl)]=true
set J4=J8(GetPlayerId(pl),DE8(it,852129,'A09U'))
endif
elseif(i1=='Udre')then
if(not PO8())then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852095,'A02H',m5))
endif
elseif(i1=='UC01')then
set J4=LGF(it)
if(not J4)then
set m5=AJ7(450.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852527,'A0Q7',m5))
endif
elseif(i1=='E02F')then
set J4=LGF(it)
elseif(i1=='U00C')then
set UP=GetUnitAbilityLevel(it,'A0SW')
if(UP==1)then
set m5=AJ7(250.,L_7(it),Condition(function IA8))
else
set m5=AJ7(250.,L_7(it),Condition(function IB8))
endif
set J4=(m5!=null)and(D48(it,851986,m5))and(C_7(it,852600,'A0SW',m5))
if(not J4)then
set J4=(hq[240+GetPlayerId(pl)]<=Bz)and(DE8(it,852526,'A0T2'))
endif
elseif(i1=='UC91')then
set J4=(AN7(300.,b5,Condition(function k6))>0)and(DE8(it,852127,'A29K'))
if((not J4)and(A87(it)))then
set GZ[GetPlayerId(pl)]=true
set J4=J8(GetPlayerId(pl),DE8(it,852100,'A05C'))
endif
elseif(i1=='UC42')then
set b5=kk(it,400.,h9[GetPlayerId(pl)])
if(b5!=null)then
call SetPlayerAbilityAvailable(pl,'A1OP',true)
set GZ[GetPlayerId(pl)]=true
set J4=J8(GetPlayerId(pl),IssuePointOrderByIdLoc(it,852488,b5))
endif
set b5=HC[16+GetPlayerId(pl)]
elseif(i1=='NC00')then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852095,'AHtb',m5))
elseif((i1=='Eevi')or(i1=='Eevm')or(i1=='E02V')or(i1=='E02W')or(i1=='E02U'))then
set bj_lastLoadedUnit=it
set H04=null
set H54=null
set F37=GetUnitLifePercent(it)+10.
set F67=GetUnitLifePercent(it)+10.
call AJ7(700.,b5,Condition(function HG8))
if H04!=null then
set m5=H04
else
set m5=H54
endif
call XK7("Attempt Sunder "+GetUnitName(m5))
set J4=(m5!=null)and(C_7(it,852189,'A07Q',m5))
elseif(i1=='UC18')then
set m5=AJ7(400.,b5,Condition(function Kn))
set J4=(m5!=null)and((C_7(it,852555,'A0X5',m5))or(C_7(it,852502,'A0MN',m5))or(L17(it,m5)))
elseif(i1=='EC57')then
set m5=AJ7(450.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852669,'A173',m5))
elseif(i1=='UC60')then
set m5=AJ7(600.,b5,Condition(function Kn))
if((m5!=null)and(AR7(it,BU[ziyuan]))and(S69(m5)==false)and(CI7(m5)==false))then
set J4=UnitUseItemTarget(it,AV7(it,BU[ziyuan]),m5)
endif
if(not J4)then
set J4=(m5!=null)and(C_7(it,852189,'A08X',m5))or((IsUnitInRange(it,m5,860.))and(LInt(GetHandleId(it),"Level")>GetUnitAbilityLevel(it,'A1NA'))and(IssueTargetOrderById(it,852248,m5)))
endif
elseif(i1=='U00A')then
if(not J4)then
set m5=AJ7(550.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852231,'A055',m5))
endif
elseif(i1=='Ewar')then
set J4=LGF(it)
if(not J4)then
set m5=AJ7(450.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852662,'A0YM',m5))
endif
elseif(i1=='Ubal')then
if(GetUnitLifePercent(it)<25.)then
set J4=IssueImmediateOrderById(it,852129)
call D48(it,851986,DH8(it))
endif
if(not J4)then
set m5=AJ7(1200.,b5,Condition(function k6))
set J4=((JPG(it)>30.)and(AN7(900.,b5,Condition(function Kn))>0)and(DE8(it,852600,'A0CT')))or((m5!=null)and(GetUnitState(it,UNIT_STATE_MANA)>350.)and(IssuePointOrderById(it,852662,GetUnitX(m5),GetUnitY(m5))))or(IssueImmediateOrderById(it,852129))
endif
elseif(i1=='U00F')then
set J4=(GetUnitAbilityLevel(it,'B02T')>0)and(IssueImmediateOrderById(it,852178))
elseif(i1=='U00E')then
set J4=DE8(it,852526,'A05V')
elseif(i1=='Oshd')then
set m5=AJ7(600.,b5,Condition(function k8))
set J4=(m5!=null)and(UnitCountBuffsExBJ(bj_BUFF_POLARITY_NEGATIVE,bj_BUFF_RESIST_EITHER,m5,false,false)==0)and(C_7(it,852227,'A04Y',m5))
if(not J4)then
if(m5==null)then
set m5=AJ7(500.,b5,Condition(function k8))
endif
set J4=(m5!=null)and(not IsUnitType(m5,UNIT_TYPE_MECHANICAL))and(C_7(it,852119,'A0GK',m5))
endif
elseif(i1=='Ofar')then
set m5=AJ7(700.,b5,Condition(function Kn))
set J4=((m5!=null)and(C_7(it,852662,'A046',m5)))or((GetHeroLevel(it)>5)and(Bz>hq[16+GetPlayerId(pl)])and(Kz(600.,b5)>1)and(DE8(it,852588,'A29I')))
elseif(i1=='H00H')then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852669,'A2TD',m5))
if(not J4)then
set J4=(IsUnitType(m5,UNIT_TYPE_HERO))and(L17(it,m5))
endif
elseif(i1=='E01A')then
call SetPlayerAbilityAvailable(pl,'A0NE',true)
set m5=AJ7(700.,b5,Condition(function Kn))
set J4=((m5!=null)and(C_7(it,852119,'A0NM',m5)))or((GetUnitAbilityLevel(it,'B06J')==0)and(IssueImmediateOrderById(it,852177)))
elseif(i1=='U00P')then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852119,'A0OJ',m5))
elseif(i1=='E01C')then
set J4=IssueTargetOrderById(it,852248,it)
elseif(i1=='E02I')then
set J4=IssueImmediateOrderById(it,852594)
elseif(i1=='E01B')then
call SetPlayerAbilityAvailable(pl,'A0HW',true)
set m5=AJ7(900.,b5,Condition(function Kn))
set J4=(m5!=null)and(IssueTargetOrderById(it,852662,m5))
elseif((i1=='H00I')or(i1=='H00J'))then
set m5=AJ7(550.,b5,Condition(function Kn))
set J4=(m5!=null)and(JBG(it,m5))
elseif(i1=='N01W')then
set J4=(IssueTargetOrderById(it,852229,it))or((GetUnitAbilityLevel(it,'A0OV')==0)and(IssueTargetOrderById(it,852536,it)))
elseif(i1=='N00R')then
set J4=(is(it))and(Z47(it,DH8(it))>5000.)and(AN7(1200.,b5,Condition(function KX))==0)and(JGG(3))
if(not J4)then
set m5=AJ7(500.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852488,'A0RA',m5))
endif
elseif((i1=='H00R')or(i1=='H07I'))then
set H04=it
set J4=(AN7(1000.,b5,Condition(function ny))>3)and(IssueTargetOrderById(it,852699,it))
elseif(i1=='H00N')then
set J4=C_7(it,852101,'A0R7',it)
elseif(i1=='H008')then
set m5=AJ7(600.,b5,Condition(function k6))
set J4=(m5!=null)and(IssueTargetOrderById(it,852600,m5))
elseif(i1=='E005')then
if((GetHeroLevel(it)>5)and(Bz>hq[GetPlayerId(pl)]))then
set m5=AJ7(400.,b5,Condition(function k6))
set J4=(m5!=null)and(AE7(m5))and(GetUnitAbilityLevel(m5,'B014')==0)and(AN7(700.,b5,Condition(function KA))<(AN7(700.,b5,Condition(function k6))+2))and(IssueImmediateOrderById(it,852600))
endif
elseif(i1=='Npbm')then
set m5=AJ7(600.,b5,Condition(function k6))
if(m5!=null)then
set J4=((IsUnitInRange(it,m5,200.))and(DE8(it,852096,'A06M')))or((GetHeroLevel(it)>5)and(GetUnitLifePercent(it)<35.)and(DE8(it,852586,'A0MQ')))
endif
elseif(i1=='H000')then
set J4=(AN7(280.,b5,Condition(function k6))>0)and(DE8(it,852127,'A00S'))
elseif(i1=='H001')then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852662,'A190',m5))
elseif((i1=='Hlgr')or(i1=='H00F')or(i1=='H00E')or(i1=='H00G'))then
if(i1=='Hlgr')then
set UP=250
else
set UP=400
endif
set m5=AJ7(I2R(UP),b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852095,'A0AR',m5))
elseif(i1=='Harf')then
set J4=C_7(it,852225,'A08N',it)
elseif((i1=='Naka')or(i1=='Ogrh'))then
set J4=IssueImmediateOrderById(it,852129)
if((not J4)and(i1=='Naka')and(GetHeroLevel(it)>5)and(GetUnitAbilityLevel(it,'B062')==0))then
set m5=AJ7(750.,b5,Condition(function k6))
set J4=(m5!=null)and(C_7(it,852149,'A0B4',m5))
endif
elseif(i1=='H00U')then
if((GetUnitAbilityLevel(it,'B08X')==0))then
set J4=((Bz>V74[80+GetPlayerId(pl)])and K_8(it,D07,D07,D57,'A0XL')and(KL8(it,D57,D57,D57,false))and(IssueImmediateOrderById(it,852129)))
if(not J4 and(Bz>V74[80+GetPlayerId(pl)])and(GetUnitLevel(it)>5))then
call XK7("Invoker invoked Ghost Walk")
call SetPlayerAbilityAvailable(GetOwningPlayer(it),YS[4],true)
set J4=(IssueImmediateOrderById(it,852129))
call SetPlayerAbilityAvailable(GetOwningPlayer(it),YS[4],false)
endif
if(not J4)then
set m5=AJ7(500.,b5,Condition(function k6))
set J4=(m5!=null)and(K_8(it,D07,D07,D27,'A0VP'))and(IssueImmediateOrderById(it,852134))
endif
elseif((GetUnitAbilityLevel(it,'B08X')>0))then
set FFD=KU8('Hmbr',it)
call XK7("Zeus Enemy Unit ID: "+I2S(FFD))
if((FFD>0)and(Z_7(Y7[FFD]))and((Bz>hq[FFD])or((hq[FFD]-Bz)>.0)and((hq[FFD]-Bz)<60.))and((GetUnitAbilityLevel(Y7[FFD],'A29G')>0)or(GetUnitAbilityLevel(Y7[FFD],'A29H')>0)))then
call XK7("Zeus Enemy is present and his Ultimate is ready or less than 60 CD")
set UP=GetUnitAbilityLevel(Y7[FFD],'A29G')
if(UP==0)then
set UP=GetUnitAbilityLevel(Y7[FFD],'A29H')
set FFD=350+(UP*'d')
else
set FFD=170+(UP*'d')
endif
if((GetUnitState(it,UNIT_STATE_LIFE)>FFD)and(GetUnitAbilityLevel(it,'A21X')<6))then
call XK7("Invoker has balls and is trying to get out of GhostWalk if no enemy and close to base")
set J4=(Z47(it,DH8(it))<5900.)and(AN7(1400.,b5,Condition(function KX))==0)and(IssueImmediateOrderById(it,D57))
endif
elseif(KU8('Emns',it)>0 or KU8('E01B',it)>0)then
call XK7("Spectre or Furion Enemy are present. Continue walking.")
else
call XK7("Trying to break Ghost Walk")
set J4=(GetUnitAbilityLevel(it,'A21X')<6)and(AN7(1700.,b5,Condition(function KX))==0)and(IssueImmediateOrderById(it,D57))
endif
endif
elseif(i1=='Orkn')then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852502,'A0RX',m5))
elseif(i1=='Hvwd')then
set J4=LGF(it)
if(not J4)then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852095,'A02A',m5))
endif
elseif(i1=='Emoo')then
set J4=DE8(it,852556,'A01B')
if(not J4)then
set m5=AJ7(700.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852075,'A0DX',m5))
endif
elseif(i1=='Uktl')then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(IssueTargetOrderById(it,852662,m5))
elseif(i1=='Ekee')then
set m5=AJ7(600.,b5,Condition(function Kn))
if(GetHeroLevel(it)>=6)then
set J4=(AN7(400.,b5,Condition(function Kn))>0)
if not LState(it,"AI|PulseNova")then
if(J4)then
call SetPlayerAbilityAvailable(Player(O5),'A21G',true)
call DE8(it,852100,'A21F')
call TriggerSleepAction(.1)
endif
else
if(not J4)then
call DE8(it,852100,'A21H')
call TriggerSleepAction(.1)
endif
endif
endif
if(m5!=null)then
call MoveLocation(HA,GetUnitX(m5)+(90.+(25*GetUnitAbilityLevel(it,'A06W')))*Cos(GetUnitFacing(m5)*bj_DEGTORAD),GetUnitY(m5)+(90.+(25*GetUnitAbilityLevel(it,'A06W')))*Sin(GetUnitFacing(m5)*bj_DEGTORAD))
set J4=L77(it,852224,'A06W',HA)
endif
elseif(i1=='Emns')then
set J4=(is(it))and(Z47(it,DH8(it))>5000.)and(AN7(1200.,b5,Condition(function KX))==0)and(JGG(3))
if(not J4)then
set m5=AJ7(650.,b5,Condition(function Kn))
set J4=(m5!=null)and(not IsUnitInRange(it,m5,250.))and(IsUnitInRange(it,m5,600))and(C_7(it,852218,'A21E',m5))
endif
elseif(i1=='O00P')then
if((GetUnitAbilityLevel(it,'A0KX')>0))then
if(IsTriggerEnabled(LTrig(GetHandleId(pl),"MorphAgi")))then
call IssueImmediateOrderById(it,852550)
elseif(not IsTriggerEnabled(LTrig(GetHandleId(pl),"MorphStr")))then
call IssueImmediateOrderById(it,852546)
endif
set G0[32+GetPlayerId(pl)]=true
endif
set J4=LGF(it)
elseif(i1=='HC49')then
set m5=AJ7(750.,L_7(it),Condition(function k6))
set UP=E18(H9)
call XK7("Naga (Song)"+I2S(UP))
if(m5!=null and(UP>1 or GetUnitLifePercent(it)<30.))then
set J4=(GetHeroLevel(it)>5)and(IssueImmediateOrderById(it,852600))
endif
if(not J4)and(m5!=null and UP==1)then
set J4=C_7(it,852095,'A24D',m5)
endif
elseif(i1=='Hjai')then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852171,'A04C',m5))
elseif(i1=='U006')then
set m5=AJ7(600.,b5,Condition(function Kn))
if(not J4)and(m5!=null)and(AN7(1500.,b5,Condition(function KR))==0)and(Z47(it,IN4)>1500)and(Z47(it,JS4)>1500)then
set J4=L77(it,852224,'A0BG',b5)
endif
elseif(i1=='O015')then
set m5=AJ7(1600.,b5,Condition(function Kn))
if((m5!=null)and(not IsUnitIllusion(m5))and(GetUnitLevel(it)>=6)and(IsUnitInRange(it,m5,1600.))and(GetUnitLifePercent(m5)<33.))then
set J4=(IssuePointOrderByIdLoc(it,852600,GetUnitLoc(m5)))
endif
if((GetUnitLifePercent(it)<80.)or(GetUnitManaPercent(it)<60.))then
call D48(it,851986,DH8(it))
call Y07(2.)
call D48(it,851986,DH8(it))
endif
elseif(i1=='E02J')then
set m5=AJ7(800.,b5,Condition(function Kn))
set FFD=GetPlayerId(GetOwningPlayer(it))
set VP4[FFD]=true
if(m5!=null)then
set J4=(Y17(FFD))and(J8(FFD,IssuePointOrderByIdLoc(it,852089,OO8(it,m5,1.2,900))))
endif
if(not(J4))then
set UP=GetUnitAbilityLevel(it,'A1SW')
set m5=AJ7(2200.-(UP*400),b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852119,'A1SW',m5))
endif
set VP4[FFD]=false
if((GetUnitLifePercent(it)<80.)or(GetUnitManaPercent(it)<60.))then
call D48(it,851986,DH8(it))
call Y07(2.)
call D48(it,851986,DH8(it))
endif
elseif(i1=='N0HP')then
call XK7("Triggered running away |c00ffff00Kaldr"+"|r")
set m5=AJ7(700.,b5,Condition(function Kn))
set J4=(m5!=null)and((GetUnitState(it,UNIT_STATE_LIFE))>(GetUnitState(it,UNIT_STATE_MAX_LIFE)/ 2.8))and(C_7(it,852600,'A1MG',m5))
elseif(i1=='H00A')then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=((m5!=null)and(C_7(it,852585,'A0KM',m5)))or((AJ7(900.,b5,Condition(function Kn))!=null)and(GetUnitLifePercent(it)<35.)and(IssueImmediateOrderById(it,852600)))
elseif(i1=='Ucrl')or(i1=='U01X')then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852089,'A0LL',m5))
elseif(i1=='Otch')then
set m5=AJ7(1000.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852600,'A0SK',m5))
elseif(i1=='H00K')then
set m5=JT8(700.,it)
if(m5!=null)and(GetWidgetLife(it)<50.)then
set J4=C_7(it,852040,'A06B',it)
elseif((m5!=null)and(not IsUnitIllusion(m5))and(IsUnitInRange(it,m5,700.))and(GetUnitAbilityLevel(m5,'Bcyc')==0)and(GetUnitAbilityLevel(m5,'Bcy2')==0)and((GetUnitLifePercent(it)<50.)or(GetHeroLevel(it)<8))and(R2I(GetUnitState(m5,UNIT_STATE_LIFE))<(300+('x'*GetUnitAbilityLevel(it,'A06B')))))then
set J4=C_7(it,852040,'A06B',it)
endif
if(not J4)and(GetUnitLifePercent(it)<35.)then
set m5=AJ7(350.,b5,Condition(function k6))
if((m5!=null)and((GetUnitLifePercent(it)<20.)or(AN7(350.,b5,Condition(function k6))>1)))then
set J4=C_7(it,852040,'A06B',m5)
endif
if((not J4)and(GetUnitLifePercent(it)<20.)and(GetUnitState(it,UNIT_STATE_LIFE)<150.)and(AN7(600.,b5,Condition(function k6))>0))then
set J4=C_7(it,852040,'A06B',it)
endif
endif
elseif(i1=='H071')then
set FFD=GetPlayerId(GetOwningPlayer(it))
set VP4[FFD]=true
set J4=IssueImmediateOrderById(it,852129)or(DE8(it,852600,'A1J7'))
set VP4[FFD]=false
elseif(i1=='Huth')then
set J4=(AN7(320.,b5,Condition(function k6))>0)and(DE8(it,852096,'A03Y'))
elseif(i1=='Hmkg')then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and((C_7(it,852101,GO8(it),m5))or(C_7(it,852662,GN8(it),m5))or(C_7(it,852095,GM8(it),m5))or(LBool(GetHandleId(it),"AI|Magi2Blast")and C_7(it,852600,'A2KQ',m5)))
elseif(i1=='Hamg')then
if((GetUnitAbilityLevel(it,'B021')==0)and(AN7(900.,b5,Condition(function JP8))>0)and(ZL7(it)))then
if(not K6(it))then
call MoveLocation(HC[240+GetPlayerId(pl)],.0,.0)
call SetRect(He,GetUnitX(it)-600.,GetUnitY(it)-600.,GetUnitX(it)+600.,GetUnitY(it)+600.)
set hr=it
call EnumDestructablesInRect(He,R24,function J4G)
if(GetLocationX(HC[240+GetPlayerId(pl)])!=.0)then
set J4=IssuePointOrderByIdLoc(it,851986,HC[240+GetPlayerId(pl)])
call MoveLocation(HC[240+GetPlayerId(pl)],.0,.0)
else
set J4=D48(it,851986,h9[GetPlayerId(pl)])
endif
else
set J4=IssueTargetOrderById(it,852069,it)
endif
endif
elseif(i1=='E00P')then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(L77(it,852580,'A0O6',OM8(it,m5,2000.,.65,1100.)))
elseif(i1=='N01I')then
set J4=DE8(it,852663,'ANcr')
elseif(i1=='H00S')then
set m5=AJ7(900.,b5,Condition(function k6))
set J4=(((m5==null)or(not IsUnitInRange(it,m5,250.)))and(LGF(it)))or((m5!=null)and(C_7(it,852186,'A0R6',it)))
elseif(i1=='H00Q')then
set J4=IssueTargetOrderById(it,852095,it)
elseif(i1=='E01Y')then
set J4=IssueImmediateOrderById(it,852526)
elseif(i1=='N00B')then
call SetPlayerAbilityAvailable(pl,'A0SB',true)
if(PK4[GetPlayerId(pl)]==null)then
set i1=R2I(bj_RADTODEG*Atan2(GetUnitY(DH8(it))-GetUnitY(it),GetUnitX(DH8(it))-GetUnitX(it)))
set h4[16+GetPlayerId(pl)]=it
set J4=IssuePointOrderById(it,852662,GetUnitX(it)+150.*Cos(i1*bj_DEGTORAD),GetUnitY(it)+150.*Sin(i1*bj_DEGTORAD))
if J4 then
call Y07(.3)
call DE8(it,852514,'A0SB')
endif
endif
elseif(i1=='H06S')then
set m5=AJ7(950.,b5,Condition(function Kn))
if(not J4)and(Bz>V74[32+O5])and(m5!=null)and(Z47(it,m5)<350+GetUnitAbilityLevel(it,'A11N')*150)then
set J4=IssueTargetOrderById(it,852581,m5)
endif
if(not J4)and(Bz>V74[16+O5])and(m5!=null)then
if OO8(it,m5,2.,1500.)!=null then
set J4=L77(it,852089,'A136',H57)
endif
endif
elseif((i1=='H00R')or(i1=='H07I'))then
if(not J4)and(Bz>V74[32+O5])then
set H04=it
set UP=AN7(1000.,L_7(it),Condition(function ny))
set J4=(UP>=3)and(GetUnitLifePercent(it)<75.)and(IssueTargetOrderById(it,852669,it))
endif
elseif(i1=='N0EG')then
if(not J4)and(Bz>V74[48+O5])then
set J4=DE8(it,852526,'A14I')
endif
if(not J4)and(Bz>V74[32+O5])then
set m5=AJ7(950.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852119,'A12J',m5))
endif
elseif(i1=='H00K')then
if(Bz>V74[16+O5])then
set m5=AJ7(400.,b5,Condition(function Kn))
if(m5!=null)and(GetUnitLifePercent(m5)<60.)and(eY[320+O5]>=0)then
set m5=AJ7(700.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852278,'A05J',it))
endif
endif
elseif(i1=='H00T')then
set m5=AJ7(400.,b5,Condition(function Kn))
if(m5!=null)and(Bz>V74[32+O5])and(Z47(it,m5)>200.)then
set J4=(m5!=null)and(IssueImmediateOrderById(it,852581))
endif
elseif(i1=='E02N')then
set m5=AJ7(700.,b5,Condition(function Kn))
if(not J4)and(Bz>V74[O5])then
if((m5!=null))then
if(GetUnitLifePercent(m5)<50.)and(GetUnitLevel(it)>=6)and(not IsUnitIllusion(m5))then
if OO8(it,m5,2,1000.)!=null then
set J4=D88(it,852089,'A1T5','A235',GetLocationX(H57),GetLocationY(H57))
endif
endif
endif
endif
if(not J4)and(m5!=null)and(Bz>V74[16+O5])and(IsUnitInRange(it,m5,400))then
set J4=DE8(it,852600,'A1SO')
endif
if(not J4)and(m5!=null)and(Bz>V74[32+O5])then
set J4=C_7(it,852119,'A1SQ',m5)
endif
elseif(i1=='E02H')then
if(m5==null)then
set m5=AH7(600.,b5,Condition(function k6))
endif
if(not J4)and(m5!=null)and(Bz>V74[16+O5])then
set J4=C_7(it,852119,'A1S8',m5)
endif
if(not J4)and(m5!=null)and(Bz>V74[O5])and(GetUnitLifePercent(it)<25.)then
set J4=C_7(it,852111,'A1SA',m5)
endif
if(not J4)and(m5!=null)and(Bz>V74[32+O5])then
set J4=C_7(it,852089,'A1SB',m5)
endif
elseif(i1=='O016')then
if(m5==null)then
set m5=AH7(600.,b5,Condition(function k6))
endif
if(not J4)and(m5!=null)and(Bz>V74[48+O5])then
call DE8(it,852180,'A19Z')
call Y07(.1)
endif
if(not J4)and(m5!=null)and((h4[O5]!=null)or(GetUnitLifePercent(m5)<60)or(LInt(GetHandleId(m5),"StickyNapalm|Count")>3))and(Bz>V74[32+O5])then
if(OM8(it,m5,900,.2,1500)!=null)then
set J4=(L77(it,852218,'A19V',OT8(H57,'d',YH7(m5,it))))
endif
endif
elseif(i1=='O01F')then
set J4=LGF(it)
elseif((i1=='Hblm')or(i1=='H06X')or(i1=='H06Y')or(i1=='H06W'))then
if(m5==null)then
set m5=AH7(600.,b5,Condition(function k6))
endif
if((not J4)and(m5!=null)and(Bz>V74[32+O5]))then
set J4=C_7(it,852662,'A10X',m5)
endif
if((not J4)and(m5!=null)and(i1!='Hblm'))then
set F37=YH7(m5,it)
set J4=IssuePointOrderById(it,852089,GetUnitX(m5)+200.*Cos(F37*bj_DEGTORAD),GetUnitY(m5)+200.*Sin(F37*bj_DEGTORAD))
endif
if((not J4)and(Bz>V74[16+O5])and(i1!='Hblm'))then
set F37=YH7(it,h9[O5])
set J4=IssuePointOrderById(it,852600,GetUnitX(it)+150.*Cos(F37*bj_DEGTORAD),GetUnitY(it)+150.*Sin(F37*bj_DEGTORAD))
endif
elseif(i1=='UC11')then
if(m5==null)then
set m5=AH7(400.,b5,Condition(function k6))
endif
if((m5!=null)and(not IsUnitIllusion(m5))and(GetUnitLifePercent(it)<20 or GZ[208+O5]))then
set J4=(DE8(it,852164,'A29L'))
endif
elseif(i1=='E02X')then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(C_7(it,852214,'A27F',m5))
if(not J4)and hq[816+O5]>Bz then
set G0[288+O5]=true
call MEG()
set G0[304+O5]=false
endif
elseif(i1=='N0M0')then
set m5=AJ7(600.,b5,Condition(function Kn))
if(not J4)and(Bz>V74[16+O5])and(m5!=null)and(AO7(400.,it,Condition(function BU7))<=2)then
set J4=DE8(it,852526,'A2H3')
endif
if(not J4)and(m5!=null)then
set J4=LGF(it)
endif
if(not J4)and(Bz>V74[48+O5])and(m5!=null)then
set J4=IssueImmediateOrderById(it,852600)
endif
elseif(i1=='E02K')then
set m5=AJ7(600.,b5,Condition(function Kn))
if(not J4)and(Bz>V74[32+O5])then
set J4=IssueTargetOrderById(it,852248,it)
endif
elseif(i1=='H0DO')then
set m5=AJ7(600.,b5,Condition(function Kn))
if(not J4)and(m5!=null)and(Bz>V74[32+O5])then
set J4=DE8(it,852526,'A2IT')
endif
if(not J4)and(m5!=null)and(Bz>V74[48+O5])then
set J4=C_7(it,852668,'A2HN',m5)
endif
elseif(i1=='N0MD')then
set J4=(IssueTargetOrderById(it,852600,it))
elseif(i1=='E032')then
set m5=AJ7(600.,b5,Condition(function Kn))
if(not J4)then
if GetUnitAbilityLevel(it,'A2FX')==0 then
set F37=GetUnitFacing(it)
set J4=((m5!=null)and(IssuePointOrderById(it,852216,GetUnitX(it)+20*Cos(F37*bj_DEGTORAD),GetUnitY(it)+20*Sin(F37*bj_DEGTORAD))))
else
set bj_lastCreatedUnit=LUnit(GetHandleId(it),"AI|ShredChakram")
if(m5==null)or(not IsUnitInRange(it,bj_lastCreatedUnit,400))then
set J4=IssueImmediateOrderById(it,852177)
endif
endif
endif
if(not J4)and(Bz>V74[32+O5])then
set J4=LGF(it)
endif
if(not J4)and(m5!=null)and(Bz>V74[16+O5])and(IsUnitInRange(it,m5,300))then
set J4=DE8(it,852526,'A2FK')
endif
endif
if(not G0[304+O5])and(not J4)then
if(not J4)and((AR7(it,BU[keledebishou]))and(Bz>hq['p'+GetPlayerId(pl)]))then
set J4=LGF(it)
endif
if(not J4)and(AR7(it,BU[luosazhifeng]))then
set J4=UnitUseItem(it,bj_lastCreatedItem)
endif
if(not J4)and((AR7(it,BU[xiangweixie]))and(AN7(1200.,b5,Condition(function k6))>0))then
set J4=UnitUseItem(it,bj_lastCreatedItem)
endif
if(not J4)and((AR7(it,BU[euldeshenshengfazhang]))and(GetUnitLifePercent(it)<35.))then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(UnitUseItemTarget(it,bj_lastCreatedItem,m5))
endif
if(not J4)and((AR7(it,BU[sanshizhiren])or AR7(it,BU[sanshizhiren2]))and(GetItemCharges(bj_lastCreatedItem)>0)and(GetUnitLifePercent(it)<35.))then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(UnitUseItemTarget(it,bj_lastCreatedItem,m5))
endif
if(not J4)and((AR7(it,BU[xieeliandao]))and(Bz>hq[96+GetPlayerId(pl)]))then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(UnitUseItemTarget(it,bj_lastCreatedItem,m5))
endif
if(not J4)and((AR7(it,BU[shenyuanzhiren])))then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(UnitUseItemTarget(it,bj_lastCreatedItem,m5))
endif
if(not J4)and((AR7(it,BU[tiantangzhiji])))then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(UnitUseItemTarget(it,bj_lastCreatedItem,m5))
endif
if(not J4)and((AR7(it,BU[atuosizhigun])))then
set m5=AJ7(600.,b5,Condition(function Kn))
set J4=(m5!=null)and(UnitUseItemTarget(it,bj_lastCreatedItem,m5))
endif
if(not J4)and((AR7(it,BU[xiwadeshouhu]))and(Bz>V74[176+GetPlayerId(pl)]))then
set m5=AJ7(500.,b5,Condition(function Kn))
set J4=(m5!=null)and(UnitUseItem(it,bj_lastCreatedItem))
endif
if(not J4)and((AR7(it,BU[meikensimu]))and(not LBool(GetHandleId(it),"Mekansm"))and(Bz>hq[80+GetPlayerId(pl)])and(AN7(800.,b5,Condition(function k6))>0))then
set J4=UnitUseItem(it,bj_lastCreatedItem)
endif
if(not J4)and((AR7(it,BU[yingzhilingkan]))and(GetItemCharges(bj_lastCreatedItem)>0)and(Bz>V74[224+GetPlayerId(pl)])and(GetUnitLifePercent(it)<70.))then
set J4=(UnitUseItemTarget(it,bj_lastCreatedItem,it))
endif
if(not J4)and(AR7(it,BU[bizhang])and(LState(it,"ArmletOfMordigan|Active"))and(GetUnitLifePercent(it)<50.))then
set J4=(UnitUseItem(it,bj_lastCreatedItem))
endif
if((not J4)and(L67(it))and(Bz>V74[192+O5]))then
if(GetUnitState(it,UNIT_STATE_LIFE)<150)or((GetItemCharges(bj_lastCreatedItem)>=8)and(AN7(1000.,L_7(it),Condition(function k6))>0)and(GetUnitLifePercent(it)<50 or GetUnitManaPercent(it)<20)and(Z47(it,h9[16+O5])>600))then
set J4=UnitUseItem(it,bj_lastCreatedItem)
endif
endif
if(not J4)and(AR7(it,BU[ziyuan])and(Bz>V74[240+GetPlayerId(pl)])and(S69(m5)==false)and(CI7(m5)==false))then
set J4=UnitUseItemTarget(it,bj_lastCreatedItem,m5)
endif
if((not J4)and(is(it))and(GetUnitAbilityLevel(it,'B02Z')==0)and(GetUnitAbilityLevel(it,'B07T')==0)and(GetUnitAbilityLevel(it,'B068')==0)and(GetUnitAbilityLevel(it,'B00K')==0)and(Z47(it,DH8(it))>6000.)and(AN7(1400.,b5,Condition(function KX))==0))then
if(IsUnitAlly(it,G8[0]))then
set J4=FZ8(it,IN4)
else
set J4=FZ8(it,JS4)
endif
endif
endif
set it=null
set pl=null
set b5=null
set m5=null
return J4
endfunction
function MFG takes nothing returns nothing
local unit Y47=GetEnumUnit()
local integer O5=GetPlayerId(GetOwningPlayer(Y47))
local integer i=1
if((IsUnitType(Y47,UNIT_TYPE_HERO))and(not IsUnitIllusion(Y47)))then
if((GetPlayerController(GetOwningPlayer(Y47))==MAP_CONTROL_COMPUTER)and(GetWidgetLife(Y47)>.405)and(IsUnitType(Y47,UNIT_TYPE_DEAD)==false))then
call ExecuteFunc("MGG")
elseif HA4[O5]then
set h4[O5]=null
if((TimerGetRemaining(L[O5])>20.)and(GetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD)>5000)and(TimerGetElapsed(L[O5])>4.))then
loop
exitwhen NI4[i]==GetEnumUnit()or i>NM4
set i=i+1
endloop
if NI4[i]!=null and GetUnitAbilityLevel(KR4[O5],'A20U')==0 then
call IssueImmediateOrderById(KR4[O5],ED[O5])
endif
endif
endif
elseif((GE8(Y47))and(GetUnitTypeId(Y47)!='ncop')and(Z_7(Y47)))then
set bj_lastLoadedUnit=GetEnumUnit()
call ExecuteFunc("MHG")
endif
set Y47=null
endfunction
function MIG takes nothing returns boolean
local unit Y47=GetEnteringUnit()
local integer i=GetUnitTypeId(Y47)
if(i=='u00G' or i=='u00I')and IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),RX4)then
call RemoveGuardPosition(Y47)
call GroupAddUnit(LGroup(GetHandleId(GetOwningPlayer(GetEnteringUnit())),WF7(i=='u00G',"ExorG","NAttG")),Y47)
call IssueImmediateOrderById(Y47,852557)
endif
if not(KR8(GetOwningPlayer(GetEnteringUnit())))then
set Y47=null
return false
endif
set bj_lastLoadedUnit=Y47
if(i=='u012' or i=='u013')then
call ExecuteFunc("MJG")
elseif(i=='o00C')or(i=='o01G')or(i=='o01H')or(i=='o01I')then
call IssueTargetOrderById(Y47,851986,Y7[GetPlayerId(GetOwningPlayer(Y47))])
elseif(i=='h0DS')then
call SUnit(GetHandleId(Y7[GetPlayerId(GetOwningPlayer(Y47))]),"AI|ShredChakram",Y47)
elseif(GE8(Y47)and IsUnitType(Y47,UNIT_TYPE_HERO)==false)then
call IssueTargetOrderById(Y47,851986,Y7[GetPlayerId(GetOwningPlayer(Y47))])
set F47=false
call ExecuteFunc("MHG")
endif
set Y47=null
return false
endfunction
function MKG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer NR8=GetHandleId(t)
local integer O5=LInt(NR8,"OwnerPID")
local unit m5=Y7[O5]
local unit MMG=null
local string MNG=I2S(LInt(NR8,"famID"))
local integer DMG
local unit it=LUnit(NR8,"unitFamiliar")
local boolean J4=false
local group g=null
local unit u=null
if(GetTriggerEventId()==EVENT_UNIT_DEATH)then
call EY8(Y7[O5],"AIFamiliar"+MNG+"|Status")
call EW8(Y7[O5],"AIFamiliar"+MNG+"|Stone")
call FlushChildHashtable(R8,NR8)
call EA8(t)
call DestroyTrigger(t)
else
set DMG=GetUnitTypeId(it)
if MNG=="1" then
if(DMG=='u014' or DMG=='u015' or DMG=='u016')then
call EY8(m5,"AIFamiliar"+MNG+"|Stone")
else
call EW8(m5,"AIFamiliar"+MNG+"|Stone")
call EY8(m5,"AIFamiliar|CastStone")
endif
elseif MNG=="2" then
if(DMG=='u01D' or DMG=='u01E' or DMG=='u01F')then
call EY8(m5,"AIFamiliar"+MNG+"|Stone")
else
call EW8(m5,"AIFamiliar"+MNG+"|Stone")
call EY8(m5,"AIFamiliar|CastStone")
endif
elseif MNG=="3" then
if(DMG=='u01R' or DMG=='u01S' or DMG=='u01T')then
call EY8(m5,"AIFamiliar"+MNG+"|Stone")
else
call EW8(m5,"AIFamiliar"+MNG+"|Stone")
call EY8(m5,"AIFamiliar|CastStone")
endif
endif
if(GetUnitState(it,UNIT_STATE_LIFE)<.55*(200+(GetUnitAbilityLevel(m5,'A1NE')*'d')))then
set J4=IssueImmediateOrderById(it,852138)or IssueImmediateOrderById(it,852155)or IssueImmediateOrderById(it,852656)or IssueImmediateOrderById(it,852139)or IssueImmediateOrderById(it,852156)or IssueImmediateOrderById(it,852657)
if not J4 then
set J4=D48(it,851986,h9[O5])
endif
elseif((Z47(it,DH8(m5))<1000.)and(GetUnitLifePercent(it)<98.))then
set J4=(D48(it,851986,DH8(m5)))
elseif(not Z_7(m5))then
set J4=D48(it,851986,DH8(m5))
elseif(not IsUnitInRange(it,m5,1200.))then
set J4=IssueTargetOrderById(it,851986,m5)
endif
if not J4 then
set m5=null
if GetUnitState(h4[O5],UNIT_STATE_LIFE)>0 then
set m5=h4[O5]
endif
if m5==null then
set g=CreateGroup()
call GroupClear(g)
call GroupEnumUnitsInRangeOfLoc(g,GetUnitLoc(Y7[O5]),700,Condition(function H48))
if(not YA7(g))then
loop
set u=FirstOfGroup(g)
call GroupRemoveUnit(g,u)
exitwhen(IsUnitEnemy(u,GetOwningPlayer(it))and(IsUnitVisibleEx(u,GetOwningPlayer(it)))or u==null)
endloop
set m5=u
set u=null
endif
call DestroyGroup(g)
endif
set g=CreateGroup()
call GroupEnumUnitsInRangeOfLoc(g,GetUnitLoc(Y7[O5]),700,Condition(function IX8))
if(not YA7(g))then
loop
set u=FirstOfGroup(g)
call GroupRemoveUnit(g,u)
exitwhen(IsUnitEnemy(u,GetOwningPlayer(it))or u==null)
endloop
set MMG=u
set u=null
endif
call DestroyGroup(g)
if MMG!=null and m5!=null then
if Z47(it,MMG)<Z47(it,m5)and m5!=h4[O5]then
set m5=null
endif
endif
if m5!=null then
if(IsUnitInRange(it,m5,250.)and SL9(m5)==false and IsUnitType(m5,UNIT_TYPE_MAGIC_IMMUNE)==false and LState(Y7[O5],"AIFamiliar|CastStone")==false)then
set J4=IssueImmediateOrderById(it,852138)or IssueImmediateOrderById(it,852155)or IssueImmediateOrderById(it,852656)or IssueImmediateOrderById(it,852139)or IssueImmediateOrderById(it,852156)or IssueImmediateOrderById(it,852657)
if J4 then
call EW8(Y7[O5],"AIFamiliar|CastStone")
endif
else
set J4=IssueTargetOrderById(it,851983,m5)
endif
endif
if MMG!=null and J4==false then
if GetUnitCurrentOrder(Y7[O5])==851986 then
set J4=IssueTargetOrderById(it,851986,Y7[O5])
else
set J4=IssueTargetOrderById(it,851983,MMG)
endif
endif
endif
if(not J4)then
if(eY[O5]==10)then
set J4=D48(it,851983,Y7[O5])
else
set J4=IssueTargetOrderById(it,851986,Y7[O5])
endif
endif
endif
set t=null
set m5=null
set MMG=null
set it=null
set g=null
return false
endfunction
function MOG takes integer YC7,unit MPG returns nothing
local trigger t=null
local integer NX8=0
local string MNG
local integer i1=GetUnitTypeId(MPG)
if(not((GetPlayerController(GetOwningPlayer(MPG))==MAP_CONTROL_COMPUTER)and(Z_7(MPG))))then
return
endif
if((i1=='u014' or i1=='u015' or i1=='u016'))then
set MNG="1"
elseif((i1=='u01D' or i1=='u01E' or i1=='u01F'))then
set MNG="2"
elseif((i1=='u01R' or i1=='u01S' or i1=='u01T'))then
set MNG="3"
else
return
endif
set t=CreateTrigger()
set NX8=GetHandleId(t)
call TriggerRegisterUnitEvent(t,MPG,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,MPG,EVENT_UNIT_SPELL_FINISH)
call TriggerRegisterTimerEvent(t,1.4,true)
call TriggerRegisterTimerEvent(t,.1,false)
call TriggerAddCondition(t,Condition(function MKG))
call EW8(Y7[YC7],"AIFamiliar"+MNG+"|Status")
call SUnit(NX8,"unitFamiliar",MPG)
call SInt(NX8,"OwnerPID",YC7)
call SInt(NX8,"famID",S2I(MNG))
set t=null
endfunction
function MQG takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local integer NR8=GetHandleId(t)
local unit NW8=LUnit(NR8,"NinjaScarab")
local unit NV8=LUnit(NR8,"NinjaSummoner")
local unit MRG=GetTriggerUnit()
if((IsUnitType(MRG,UNIT_TYPE_HERO))and(IsUnitEnemy(MRG,GetOwningPlayer(NV8)))and(IsUnitVisibleEx(MRG,GetOwningPlayer(NV8)))and(not IsUnitIllusion(MRG)))then
call IssueImmediateOrderById(NW8,852127)
call EA8(t)
call DestroyTrigger(t)
endif
set t=null
set NW8=null
set NV8=null
set MRG=null
endfunction
function MSG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer NR8=GetHandleId(t)
local unit NV8=LUnit(NR8,"NAScarabOwner")
local unit NW8=LUnit(NR8,"NAScarabUnit")
local unit MTG=null
local unit W17=null
local unit u=null
local group g=CreateGroup()
if((GetTriggerEventId()==EVENT_UNIT_DEATH)or(GetUnitState(NV8,UNIT_STATE_LIFE)<=0))then
if((GetUnitState(NW8,UNIT_STATE_LIFE)>0))then
call D48(NW8,851986,DH8(NV8))
else
call FlushChildHashtable(R8,NR8)
call EA8(t)
call DestroyTrigger(t)
endif
else
call GroupClear(g)
call GroupEnumUnitsInRangeOfLoc(g,GetUnitLoc(NW8),700,Condition(function H88))
if(not YA7(g))then
loop
set u=FirstOfGroup(g)
call GroupRemoveUnit(g,u)
exitwhen IsUnitEnemy(u,GetOwningPlayer(NV8))
endloop
set W17=u
set u=null
endif
call DestroyGroup(g)
if(W17!=null)then
set g=CreateGroup()
call GroupClear(g)
call GroupEnumUnitsInRangeOfLoc(g,GetUnitLoc(NW8),150,Condition(function H98))
if(not YA7(g))then
loop
set u=FirstOfGroup(g)
call GroupRemoveUnit(g,u)
exitwhen(GetUnitTypeId(u)=='u012' or GetUnitTypeId(u)=='u013')
endloop
set MTG=u
set u=null
endif
call DestroyGroup(g)
if(MTG==null)then
set g=CreateGroup()
call GroupClear(g)
call GroupEnumUnitsInRangeOfLoc(g,GetUnitLoc(NV8),500,Condition(function H98))
if(not YA7(g))then
loop
set u=FirstOfGroup(g)
call GroupRemoveUnit(g,u)
exitwhen(GetUnitTypeId(u)=='u012' or GetUnitTypeId(u)=='u013')
endloop
set MTG=u
endif
endif
endif
if(W17!=null and MTG!=null and GetUnitState(W17,UNIT_STATE_LIFE)>0 and IsUnitVisibleEx(W17,GetOwningPlayer(NV8)))then
call IssueTargetOrderById(MTG,851986,W17)
call Y07(3)
if((GetUnitState(NW8,UNIT_STATE_LIFE)>0)and(GetUnitCurrentOrder(NW8)!=851986))then
call IssueTargetOrderById(NW8,851986,NV8)
endif
else
call IssueTargetOrderById(NW8,851986,NV8)
endif
endif
call DestroyGroup(g)
set t=null
set MTG=null
set NV8=null
set NW8=null
set W17=null
set u=null
set g=null
return false
endfunction
function MJG takes nothing returns nothing
local trigger t=CreateTrigger()
local unit NW8=bj_lastLoadedUnit
local unit NV8=Y7[GetPlayerId(GetOwningPlayer(NW8))]
local unit W17=null
local unit u=null
local group g=CreateGroup()
local boolexpr b=Condition(function H88)
local boolean MUG=false
call GroupClear(g)
call GroupEnumUnitsInRangeOfLoc(g,GetUnitLoc(NW8),700,Condition(function H88))
if(not YA7(g))then
loop
set u=FirstOfGroup(g)
call GroupRemoveUnit(g,u)
exitwhen IsUnitEnemy(u,GetOwningPlayer(NV8))
endloop
set W17=u
endif
call DestroyGroup(g)
if(W17!=null and GetUnitState(W17,UNIT_STATE_LIFE)>0 and IsUnitVisibleEx(W17,GetOwningPlayer(NV8)))then
if(Z47(NW8,W17)>250.)then
set MUG=true
call IssueTargetOrderById(NW8,851986,NV8)
else
call IssueImmediateOrderById(NW8,852127)
call EA8(t)
call DestroyTrigger(t)
endif
else
set MUG=true
call IssueTargetOrderById(NW8,851986,NV8)
endif
if(MUG)then
call SUnit(GetHandleId(t),"NAScarabOwner",NV8)
call SUnit(GetHandleId(t),"NAScarabUnit",NW8)
call TriggerRegisterUnitEvent(t,NW8,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,2.1,true)
call TriggerAddCondition(t,Condition(function MSG))
set t=CreateTrigger()
call SUnit(GetHandleId(t),"NinjaSummoner",NV8)
call SUnit(GetHandleId(t),"NinjaScarab",NW8)
call TriggerRegisterUnitInRange(t,NW8,70,b)
call TriggerAddAction(t,function MQG)
endif
call DestroyBoolExpr(b)
set t=null
set g=null
set u=null
set NW8=null
set NV8=null
set W17=null
endfunction
function MVG takes unit N28,integer n5,integer MWG returns item
local real x=V89(N28)
local real y=VD9(N28)
local item JB9=CreateItem(n5,x,y)
local integer i=0
local boolean array VG9
local item Z4
local boolean L37=false
set ON7=I44
call SetItemPlayer(JB9,I44,false)
call SetItemUserData(JB9,1)
if n5>0 then
loop
exitwhen i>(UnitInventorySize(N28)-1)
if UnitItemInSlot(N28,i)==null and i!=MWG then
set Z4=CreateItem('I02M',x,y)
call UnitAddItem(N28,Z4)
set VG9[i]=true
else
set VG9[i]=false
endif
if i==MWG then
set L37=UnitAddItem(N28,JB9)
endif
set i=i+1
endloop
set i=0
loop
exitwhen i>5
if VG9[i]then
call RemoveItem(UnitItemInSlot(N28,i))
endif
set i=i+1
endloop
endif
if(not L37)then
call RemoveItem(JB9)
set JB9=null
call XM7(GetPlayerId(I44),"aiItem_ChangePT FAILED")
endif
set HK4=JB9
set JB9=null
set Z4=null
return HK4
endfunction
function MXG takes integer O5,unit it returns nothing
local integer i
local integer j
if(OJ7[384+O5]!=0)and(Bz>OJ7[160+O5])and(Bz>OJ7[176+O5])then
if GetUnitLifePercent(it)<30 then
set i=2
elseif GetUnitState(it,UNIT_STATE_MANA)<'x' then
set i=3
if OJ7[400+O5]!=3 then
set OJ7[416+O5]=R2I(140./ GetUnitState(it,UNIT_STATE_MAX_MANA)*'d')
endif
elseif OJ7[400+O5]==3 and GetUnitManaPercent(it)<I2R(OJ7[416+O5])then
set i=3
else
set i=OJ7[384+O5]
endif
if OJ7[400+O5]!=i then
set OJ7[400+O5]=i
set i=0
set j=0
loop
set F_7=UnitItemInSlot(it,j)
set G47=GetItemTypeId(F_7)
if G47==BU[donglixie1]then
set i=1
elseif G47==BU[donglixie2]then
set i=2
elseif G47==BU[donglixie3]then
set i=3
endif
if i!=0 then
call XM7(O5,"aiItem_ChangePTb "+GetItemName(F_7)+XP7(OJ7[400+O5])+XP7(i))
call XM7(O5,"aiItem_ChangePT "+I2S(OJ7[400+O5]))
call DisableTrigger(GW4)
call RemoveItem(F_7)
set I44=Player(O5)
set F_7=MVG(it,BU[donglixie1+OJ7[400+O5]-1],j)
call EnableTrigger(GW4)
exitwhen true
endif
set j=j+1
exitwhen j>=bj_MAX_INVENTORY
endloop
set F_7=null
endif
endif
endfunction
function MYG takes nothing returns boolean
local integer MZG=AO7(600,GetEnumUnit(),Condition(function IL8))
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(Z_7(GetFilterUnit()))and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(GetEnumUnit())))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0))and((GetUnitLifePercent(GetFilterUnit())<30.+7*AO7(600,GetEnumUnit(),Condition(function IL8))+7*(AO7(350,GetFilterUnit(),Condition(function k6)))+3*(AO7(350,GetFilterUnit(),Condition(function BU7))))or MZG>=3 or .73*GetWidgetLife(GetFilterUnit())<=350+MZG*70)
endfunction
function MAG takes unit X77,unit AM7,real WTD,real LifeVar,real ManaPercent,real ManaVar returns boolean
return(GetUnitLifePercent(X77)<=45. or GetWidgetLife(X77)<=500.)or(GetUnitManaPercent(AM7)>=50. or GetUnitState(AM7,UNIT_STATE_MANA)>=400.)
endfunction
function MGG takes nothing returns nothing
local region MBG=null
local unit AM7=GetEnumUnit()
local unit X77=null
local integer id=GetUnitTypeId(AM7)
local player pl=GetOwningPlayer(AM7)
local integer O5=GetPlayerId(pl)
local integer UP=0
local location b5=null
local location MCG=null
local location M3G=null
local boolean J4=false
local item M6G=null
local boolean MLG=false
local integer M1G
local unit M0G=null
local unit H58=null
local integer W57=GetHandleId(AM7)
local integer M5G=0
local real F_8=.0
local integer M2G=0
local boolean M_G=false
local real N4G=0
local real N7G=.0
local real N8G=.0
local real N9G=.0
local real NDG=.0
local real YXE=.0
local real YYE=.0
local real NEG=.0
local real NFG=.0
local real NGG=.0
call TriggerSleepAction(.1)
if G0[288+O5]then
set G0[288+O5]=false
set id=eY[400+O5]
set G0[304+O5]=true
endif
set G0[64+O5]=false
if(id!='H00J')then
set b5=HC[16+O5]
else
if(EJ8(GetHandleId(AM7),"MCSLoc")!=null)then
set b5=EJ8(GetHandleId(AM7),"MCSLoc")
else
set b5=GetUnitLoc(AM7)
call D18(GetHandleId(AM7),"MCSLoc",b5)
endif
endif
call MoveLocation(b5,GetUnitX(AM7),GetUnitY(AM7))
if not G0[304+O5]then
if(id!='H00J')and(Z_7(AM7))then
call MXG(O5,AM7)
endif
if(h4[O5]!=null)and((not Z_7(h4[O5]))or(not IsHeroUnitId(GetUnitTypeId(h4[O5])))or((IsUnitIllusion(h4[O5]))and((AN7(800.,b5,Condition(function K7))>0)or(lA(h4[O5],IsUnitAlly(AM7,G8[0])))))or(IsUnitAlly(h4[O5],pl)))then
call XM7(O5,"Cancelkill j "+GetUnitName(h4[O5]))
call VWF(O5,true)
if(ZL7(AM7))then
call J3(AM7,true)
endif
endif
if(id=='U00K')and(GetUnitCurrentOrder(AM7)==852503)and(AO7(GetUnitAbilityLevel(AM7,'A0H0')*50+'d',AM7,Condition(function BU7))<=2)then
set G0[272+O5]=true
call IssueImmediateOrderById(AM7,851972)
call XK7("End Sandstorm")
call J3(AM7,false)
set G0[272+O5]=false
endif
if((G0[O5])or(not ZL7(AM7))or(GetUnitAbilityLevel(AM7,'B0DV')>0))then
set J4=true
if(GetUnitAbilityLevel(AM7,'B0DV')>0)then
set G0[64+O5]=true
endif
elseif(((A87(AM7))and(not Id(O5)))or((G0[32+O5])and(h4[O5]==null)))then
if(h4[O5]!=null)then
call EOG(AM7,h4[O5])
endif
if(eY[O5]!=2)then
if(id=='H00J')then
set J4=(A87(AM7))and(is(AM7))and(not Id(O5))and(D48(AM7,851986,h9[O5]))
elseif(not G0[32+O5])then
call F28(AM7,false)
elseif(Jw(AM7))then
if(A87(AM7))then
set J4=MEG()
endif
if(not J4)then
call LGF(AM7)
endif
endif
endif
set J4=true
elseif(h4[O5]==null)then
if((GetHeroLevel(AM7)>3)and(GetUnitLifePercent(AM7)>70.)and(G0[128+O5]))then
if((AN7(800.,b5,Condition(function K7))>0)or(lA(h4[O5],IsUnitAlly(AM7,G8[0]))))then
set X77=AJ7(1100.,b5,Condition(function KK))
else
set X77=AJ7(1100.,b5,Condition(function Kl))
endif
if(X77!=null)then
if(iy(AM7))then
set h4[160+O5]=X77
endif
if((KY(750.,L_7(X77))<=2)and(not GD8(X77))and((A47(X77,AM7))or(AO7(400.,X77,Condition(function A27))==0)))then
call VTF(O5,X77,false,false)
endif
endif
endif
else
set X77=K3(600.,AM7,Condition(function k6))
if(X77!=h4[O5]and X77!=null)then
if(GetUnitLifePercent(X77)>50.)then
if((GetUnitState(X77,UNIT_STATE_LIFE)+(20.*GetHeroLevel(X77)))<GetUnitState(h4[O5],UNIT_STATE_LIFE))then
call VTF(O5,X77,false,false)
endif
elseif(GetUnitState(X77,UNIT_STATE_LIFE)<GetUnitState(h4[O5],UNIT_STATE_LIFE))then
call VTF(O5,X77,false,false)
endif
endif
if((GetUnitTypeId(h4[O5])=='H00I')and(GetUnitLifePercent(h4[O5])>50.))then
set X77=AJ7(700.,b5,Condition(function KL))
if(X77!=null)then
call VTF(O5,X77,false,false)
endif
endif
if((GetHeroLevel(AM7)<6)and(not A97(O5)))then
if((not IsUnitInRange(AM7,h4[O5],750.))or((GetUnitLifePercent(AM7)-20.)<GetUnitLifePercent(h4[O5])and G0[144+O5]==false)or((not IsUnitVisibleEx(h4[O5],pl))and(kD(h4[O5]))))then
call XM7(O5,"Cancelkill k "+GetUnitName(h4[O5]))
call VWF(O5,false)
call J3(AM7,true)
endif
elseif(((not IsUnitInRange(AM7,h4[O5],1500.)or((GetUnitLifePercent(AM7)+20.)<GetUnitLifePercent(h4[O5])and G0[144+O5]==false))and(not A97(O5)))or(GD8(h4[O5])))then
call XM7(O5,"Cancelkill l "+GetUnitName(h4[O5])+XQ7(IsUnitInRange(AM7,h4[O5],1500.))+XQ7((GetUnitLifePercent(AM7)+20.)<GetUnitLifePercent(h4[O5]))+XQ7(G0[144+O5]==false))
call VWF(O5,true)
call J3(AM7,true)
elseif((not IsUnitVisibleEx(h4[O5],pl))and(((IsVisibleToPlayer(GetUnitX(h4[O5]),GetUnitY(h4[O5]),pl))and(not IsUnitHidden(h4[O5])))or((eY[32+GetPlayerId(GetOwningPlayer(h4[O5]))]<2)and(kD(h4[O5])))))then
if(not A87(h4[O5]))then
if((GetUnitTypeId(h4[O5])=='HC92')and(AR7(AM7,BU[GB]))and(GetItemCharges(bj_lastCreatedItem)>1))then
set J4=((GetUnitX(h4[O5])!=0)or(GetUnitY(h4[O5])!=0))and(UnitUseItemPoint(AM7,AV7(AM7,BU[GB]),GetUnitX(h4[O5]),GetUnitY(h4[O5])))
elseif((GetUnitTypeId(h4[O5])=='H071')and(AR7(AM7,BU[GB]))and(GetItemCharges(bj_lastCreatedItem)>1))then
set J4=((GetUnitX(h4[O5])!=0)or(GetUnitY(h4[O5])!=0))and(UnitUseItemPoint(AM7,AV7(AM7,BU[GB]),GetUnitX(h4[O5]),GetUnitY(h4[O5])))
else
set h4[O5]=null
call J3(AM7,true)
endif
elseif(id=='N01A')then
set J4=IssueImmediateOrderById(AM7,852600)
elseif(AR7(AM7,BU[silingshu3]))then
set J4=UnitUseItem(AM7,bj_lastCreatedItem)
elseif(AR7(AM7,BU[YB]))then
set J4=(Z47(AM7,h4[O5])<=600)and(UnitUseItem(AM7,bj_lastCreatedItem))
elseif(AR7(AM7,BU[GB]))then
set J4=((GetUnitX(h4[O5])!=0)or(GetUnitY(h4[O5])!=0))and(UnitUseItemPoint(AM7,bj_lastCreatedItem,GetUnitX(h4[O5]),GetUnitY(h4[O5])))
else
if(not LBool(S44,G48(AM7)+"|W"))then
call SBool(S44,G48(AM7)+"|W",true)
endif
call XM7(O5,"Cancelkill n "+GetUnitName(h4[O5]))
call VWF(O5,true)
call J3(AM7,true)
endif
endif
endif
endif
if h4[O5]==null then
set hq[624+O5]=0
endif
set X77=h4[O5]
if((iy(AM7))and(X77!=null))then
set h4[160+O5]=X77
endif
set GZ[128+O5]=(X77!=null)and((GetHeroLevel(AM7)>5)or(A47(X77,AM7)))
if((not J4)and(AR7(AM7,BU[xulingzhiren])))and(h4[O5]!=null)then
call UnitUseItemTarget(AM7,bj_lastCreatedItem,X77)
endif
if((not J4)and(AR7(AM7,BU[fenzhengmiansha])))and(h4[O5]!=null)then
call DisableTrigger(R04[O5])
call UnitUseItemPoint(AM7,bj_lastCreatedItem,GetUnitX(X77),GetUnitY(X77))
call EnableTrigger(R04[O5])
endif
if(J4)then
elseif(id=='E002')then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>3))then
set X77=AH7(700.,b5,Condition(function k6))
endif
set J4=(X77!=null)and((GetHeroLevel(AM7)>3)or(A47(X77,AM7)))and(IsUnitInRange(AM7,X77,650.))and(GetUnitManaPercent(AM7)>25.)and(Bz>V74[16+O5])and(DE8(AM7,852526,'A1E7'))
if((not J4)and(G0[256+O5])and(GetHeroLevel(AM7)>3))then
set N=GT7
set H58=AH7(700,b5,And(Condition(function k6),Condition(function J48)))
if H58==null then
set N=GU7
set H58=AH7(700,b5,And(Condition(function k6),Condition(function J48)))
endif
set H58=V_7(H58==null,AH7(700,b5,Condition(function k6)),H58)
set X77=V_7(H58!=null and(X77==null or YE7(X77,30,450,S97)or YE7(AM7,30,400,S87)),H58,X77)
set J4=(X77!=null)and(IsUnitInRange(AM7,X77,WI7((GetUnitMoveSpeed(AM7)-GetUnitMoveSpeed(X77))>=-20,550+(GetUnitMoveSpeed(AM7)-GetUnitMoveSpeed(X77)),250)))and(IssueTargetOrderById(AM7,852662,X77))
endif
if((not J4)and(G0[128+O5])and(GetHeroLevel(AM7)>5))then
set X77=AH7(450.,b5,Condition(function k6))
set J4=(X77!=null)and(Bz>V74[O5])and(((GetUnitAbilityLevel(AM7,'A1AO')>0)and(DE8(AM7,852229,'A1AO')))or((GetUnitAbilityLevel(AM7,'A1UV')>0)and(DE8(AM7,852229,'A1UV'))))
endif
elseif(id=='E02J')then
if(GetHeroLevel(AM7)>3)then
set X77=AJ7(800.,b5,Condition(function k6))
endif
set J4=(X77!=null)and(Bz>V74[16+O5])and(IsUnitInRange(AM7,X77,795.))and(((GetUnitAbilityLevel(AM7,'A1TV')>1)and(GetUnitManaPercent(AM7)>20.))or(GetUnitLifePercent(X77)<40.)or(h4[O5]!=null))and(C_7(AM7,852095,'A1TV',X77))
if(not J4)and(X77!=null)and(Bz>V74[48+O5])and((GetUnitLifePercent(X77)<30.)or((h4[O5]!=null)and((GetUnitLifePercent(X77)<70.)or(eY[320+O5]>0))))then
if(QJ8(AM7,X77))or(not IsUnitInRange(X77,AM7,800))then
call OO8(AM7,X77,1.2,900)
else
call MoveLocation(H57,GetUnitX(X77),GetUnitY(X77))
endif
set J4=(Y17(O5)and(J8(O5,IssuePointOrderByIdLoc(AM7,852089,H57))))
endif
if(not J4)and(X77!=null)and(Bz>V74[32+O5])and(QJ8(AM7,X77))and(not IsUnitInRangeLoc(X77,I7G(X77),600))then
set J4=C_7(AM7,852119,'A1SW',X77)
endif
if(not J4)and(h4[O5]!=null)and(S19(X77)or GetUnitLifePercent(AM7)<80 or GZ[208+O5])then
set J4=(X77!=null)and(IssuePointOrderById(AM7,852662,GetUnitX(X77),GetUnitY(X77)))
endif
if(not J4)and(Bz>V74[32+O5])then
set X77=AJ7(1200.,b5,Condition(function I8G))
set J4=(X77!=null)and(C_7(AM7,852119,'A1SW',X77))
endif
elseif(id=='E02F')then
if((X77==null)and(G0[128+O5]))then
set X77=B97(900.,AM7,Condition(function k6))
endif
if((G0[128+O5])and(LUnit(GetHandleId(AM7),"Bird4")!=null)and(O18(LUnit(GetHandleId(AM7),"Bird4"))==false))then
if X77==null then
set X77=AJ7(900.,b5,Condition(function BU7))
endif
set MCG=OM8(AM7,X77,900,.01,1000)
if MCG!=null then
set J4=IssuePointOrderByIdLoc(AM7,852185,MCG)
else
set J4=IssuePointOrderById(AM7,852185,GetUnitX(X77)+GetRandomReal(-75,75)*GetRandomReal(0,1),GetUnitY(X77)+GetRandomReal(-75,75)*GetRandomReal(0,1))
endif
endif
if(not J4 and(Bz>V74[16+O5]))then
set VT4[O5]=true
set J4=(X77!=null)and(GetUnitAbilityLevel(AM7,'A0IH')<1)and((GetUnitLifePercent(X77)>70.)or((GetUnitLifePercent(X77)<30. and AO7(900.,AM7,Condition(function JP8))>=1))or(GZ[208+O5]))and(IssuePointOrderByIdLoc(AM7,852600,GetUnitLoc(X77)))
endif
if(not J4)then
set J4=((GetUnitLifePercent(AM7)>30.)and(GetUnitState(AM7,UNIT_STATE_MANA)>300. and GetUnitManaPercent(AM7)>40))and(GetUnitAbilityLevel(AM7,'A0IH')<1)and(AO7(900.,AM7,Condition(function JP8))>=1)or(AO7(500.,AM7,Condition(function BU7))>3)and IssueImmediateOrderById(AM7,852490)or((X77!=null)and(GetRandomInt(1,3)==1)and((GetUnitLevel(AM7)>5)or(GetUnitLifePercent(X77)<30.))and(IssuePointOrderByIdLoc(AM7,852600,GetUnitLoc(X77))))
endif
if((not J4)and(Bz>hq[O5])and(AO7(600.,AM7,Condition(function JP8))>=2))and(AO7(550.,AM7,Condition(function IL8))>=2 or GetUnitLifePercent(AM7)<25.)then
set J4=IssueImmediateOrderById(AM7,852662)
endif
set VT4[O5]=false
set H04=AM7
if(not J4)then
set N=GT7
set H58=B97(900,AM7,And(Condition(function I28),Condition(function J48)))
set N=GV7
set H58=V_7(H58==null,B97(900,AM7,And(Condition(function I28),Condition(function J48))),H58)
set X77=V_7(H58!=null,H58,V_7(X77!=null,X77,B97(1100,AM7,And(Condition(function k6),Condition(function G_8)))))
if(X77!=null)and(GetUnitLifePercent(AM7)>40)and(G0[256+O5])and(not IsUnitInRange(AM7,X77,300))and(IsUnitInRange(AM7,X77,1300))then
set h4[O5]=X77
set J4=IssueTargetOrderById(AM7,852218,X77)
endif
endif
elseif((id=='H00V')or(id=='H08D')or(id=='H08C')or(id=='H084')or(id=='H08B'))then
if(GetUnitAbilityLevel(AM7,'BNms')>0)then
if((GetUnitState(AM7,UNIT_STATE_MANA)<100.)and(not A87(AM7)))then
call IssueImmediateOrderById(AM7,852590)
call SetPlayerAbilityAvailable(pl,'A0MP',false)
endif
elseif((GetHeroLevel(AM7)>3)and((GetUnitState(AM7,UNIT_STATE_MANA)>250.)or(A87(AM7))))then
call SetPlayerAbilityAvailable(pl,'A0MP',true)
call IssueImmediateOrderById(AM7,852589)
endif
if((h4[16+O5]!=null)and(G0[128+O5]))then
if(GetUnitAbilityLevel(h4[16+O5],'Bprg')==0)then
set J4=IssueTargetOrderById(AM7,851983,h4[16+O5])
else
set h4[16+O5]=null
endif
endif
call SetPlayerAbilityAvailable(pl,'A0G2',(GetUnitManaPercent(AM7)>75.)and(GetHeroLevel(AM7)>8))
if((not J4)and(X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>3))then
set X77=K3(800.,AM7,Condition(function k6))
endif
set J4=(X77!=null)and(((GetUnitLifePercent(X77)<60.)and(not IsUnitIllusion(X77))and(GetUnitAbilityLevel(X77,'Bprg')==0)and(DE8(AM7,852581,'A1AT')))or(((GetUnitManaPercent(AM7)>70.)or(GetUnitLifePercent(X77)<60.))and(C_7(AM7,852119,'A0G2',X77))))
elseif(id=='U00C')then
if((X77==null)and(G0[128+O5]))then
set X77=AJ7(600.,b5,Condition(function k6))
endif
if((GetHeroLevel(AM7)>6)and(X77!=null)and(GetUnitLifePercent(AM7)>50.)and IsUnitInRange(AM7,X77,300+'d'*GetUnitAbilityLevel(AM7,'A194')))then
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),'A194',false)
if(AR7(AM7,BU[bizhang2])and(LState(AM7,"ArmletOfMordigan|Active")==false)and(GetUnitLifePercent(AM7)>90.)and(IsUnitInRange(AM7,X77,110.)))then
set J4=(X77!=null)and(UnitUseItem(AM7,AV7(AM7,BU[bizhang2])))
elseif(AR7(AM7,BU[bizhang])and(LState(AM7,"ArmletOfMordigan|Active"))and((not IsUnitInRange(AM7,X77,150.))or(GetUnitLifePercent(AM7)<60.)))then
set J4=(UnitUseItem(AM7,AV7(AM7,BU[bizhang])))
else
set J4=(Bz>hq[240+O5])and((hq[416+O5]>Bz)or(GetUnitLifePercent(X77)<60.))and((DE8(AM7,852526,'A0T2'))or(LL7(AM7,BU[heihuangzhang])))
endif
if((not J4)and((GetUnitLifePercent(X77)<50.)))then
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),'A194',true)
set GZ[O5]=true
set J4=(IssueTargetOrderById(AM7,852119,X77))
set GZ[O5]=false
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),'A194',false)
endif
endif
elseif(id=='EC77')then
if((GetHeroLevel(AM7)>20)and(AN7(1500.,b5,Condition(function k6))==0)and(GetUnitManaPercent(AM7)>70.))then
call SetPlayerAbilityAvailable(pl,'A05D',true)
endif
if((X77!=null)and(not IsUnitIllusion(X77))and(GetHeroLevel(AM7)>5)and(Bz>hq[O5]))then
set UP=R2I(GetUnitState(X77,UNIT_STATE_LIFE))
set J4=(UP>200)and(UP<(400*GetUnitAbilityLevel(AM7,'A080'))or UP<(460*GetUnitAbilityLevel(AM7,'A1UZ')))and(D78(AM7,852527,'A080','A1UZ',X77))
endif
if((not J4)and(AR7(AM7,BU[luosazhifeng]))and(GetHeroLevel(AM7)>10)and(GetUnitManaPercent(AM7)>50.)and(G0[128+O5]))then
if((X77==null)and(GetUnitLifePercent(AM7)>70.))then
set X77=AH7(1500.,b5,Condition(function KK))
endif
if((X77!=null)and(not IsUnitIllusion(X77))and(not AR7(X77,BU[zhenshibaoshi]))and(GetUnitTypeId(X77)!='HC92')and(not IsUnitInRange(AM7,X77,800.))and(IsUnitInRange(AM7,X77,1500.)))then
if((AO7(600.,X77,Condition(function J88))>0)or((GetUnitLifePercent(X77)<75.)and(AO7(800.,X77,Condition(function A27))==0)))then
set GZ[272+O5]=true
set J4=UnitUseItem(AM7,AV7(AM7,BU[luosazhifeng]))
set GZ[272+O5]=J4
endif
endif
endif
elseif(id=='EC45')then
set M2G=GetHeroLevel(AM7)
set M5G=W97(GetUnitAbilityLevel(AM7,'A0J1')!=0,'A0J1','A1D7')
if((GetHeroLevel(AM7)>5)and(Bz>hq[O5]))then
if((X77==null)and(G0[128+O5]))then
set X77=AH7(1000.,b5,Condition(function k6))
endif
set F_8=AN7(700.,b5,Condition(function I68))
if((X77!=null)and(not IsUnitIllusion(X77))and((R2I(GetUnitState(X77,UNIT_STATE_LIFE))<(JJG(AM7))+F_8*'d'+WI7(M2G-GetHeroLevel(X77)>3 or M2G>=13.,'d',WI7(M2G>=17,300,175)))or(PS4))and(GetUnitState(X77,UNIT_STATE_LIFE)>300.))then
set GZ[O5]=true
set J4=J8(O5,(IsUnitInRange(AM7,X77,512.5))and(C_7(AM7,852652,M5G,X77)))
if J4 then
call L97(R37[RL7+O5],(X77))
elseif(IsUnitInRange(AM7,X77,700.))and(R2I(GetUnitState(AM7,UNIT_STATE_MANA))>270+(25*GetUnitAbilityLevel(AM7,M5G)))then
set M3G=kL(AM7,X77,200.)
set J4=(M3G!=null)and(AN7(800.,M3G,Condition(function JP8))<=2)and(IssuePointOrderByIdLoc(AM7,852218,M3G))
endif
endif
if((not J4)and(GetHeroLevel(AM7)>10)and(X77!=null)and(not IsUnitIllusion(X77))and(IsUnitInRange(AM7,X77,600.))and(Kz(700.,b5)>=1)and(F_8>0))then
set GZ[O5]=true
set J4=J8(O5,C_7(AM7,852652,M5G,X77))
if J4 then
call L97(R37[RL7+O5],(X77))
endif
endif
endif
if((not J4)and(X77!=null)and(A47(X77,AM7))and(not IC(O5))and(not IsUnitInRange(AM7,X77,250.))and(IsUnitInRange(AM7,X77,I2R(350+(200*GetUnitAbilityLevel(AM7,'A0LK'))))))then
set M3G=kL(AM7,X77,200.)
set J4=(M3G!=null)and(AN7(800.,M3G,Condition(function JP8))<=2)and(IssuePointOrderByIdLoc(AM7,852218,M3G))
endif
elseif(id=='E004')then
call SetPlayerAbilityAvailable(pl,'A04Q',(GetUnitLifePercent(AM7)<70.)and(R2I(GetUnitState(AM7,UNIT_STATE_MANA))>('x'+(80*GetUnitAbilityLevel(AM7,'A025')))))
call SetPlayerAbilityAvailable(pl,'A030',(GetHeroLevel(AM7)>10.)and(iy(AM7))and(AN7(800.,b5,Condition(function k8))>0)and(GetUnitState(AM7,UNIT_STATE_MANA)>225.))
if((X77==null)and(G0[128+O5]))then
set X77=AH7(800.,b5,Condition(function k6))
endif
set J4=(X77!=null)and(GetUnitManaPercent(AM7)>60.)and(GetRandomInt(1,3)==1)and(GetHeroLevel(AM7)>3)and((not IsUnitInRange(AM7,X77,550.))and(C_7(AM7,852173,'AHfa',X77)))
if((GetHeroLevel(AM7)>8)and(G0[128+O5])and(GetUnitAbilityLevel(AM7,'B076')==0))then
if((X77==null)and(GetUnitLifePercent(AM7)>70.))then
if((eY[O5]==9)and(h4[144+O5]!=null)and(Z_7(h4[144+O5]))and(IsUnitInRange(AM7,h4[144+O5],1500.))and(not IsUnitVisibleEx(AM7,GetOwningPlayer(h4[144+O5]))))then
set X77=h4[144+O5]
else
set X77=AH7(1500.,b5,Condition(function KK))
endif
endif
if((X77!=null)and(not IsUnitIllusion(X77))and(not kD(X77))and(GetUnitTypeId(X77)!='HC92')and(not IsUnitInRange(AM7,X77,800.))and(IsUnitInRange(AM7,X77,1500.))and((GetUnitLifePercent(X77)<70.)or(AO7(650.,X77,Condition(function J88))>0)))then
set h4[288+O5]=X77
set J4=(AO7(800.,X77,Condition(function A27))==0)and(IssueImmediateOrderById(AM7,852129))
endif
endif
elseif(id=='U000')then
if(GetUnitAbilityLevel(AM7,'B00K')==0)then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>3))then
set X77=AH7(800.,b5,Condition(function k6))
endif
else
set J4=true
endif
if((not J4)and(X77!=null)and(GetHeroLevel(AM7)>3))then
if((not J4)and(GetUnitLifePercent(X77)<70.))then
set GZ[O5]=true
set J4=J8(O5,(C_7(AM7,852555,'A0X7',X77)))
endif
if(not J4)then
set H04=X77
if not(GetWidgetLife(X77)<.75*RMinBJ(5.*GetHeroInt(X77,true),GetUnitState(X77,UNIT_STATE_MANA)))then
set H04=J_8(AM7)
endif
if(H04!=null)then
set GZ[O5]=true
set J4=J8(O5,(C_7(AM7,852248,'A1H5',X77)))
endif
endif
endif
if((not J4)and(GetHeroLevel(AM7)>5)and(GetUnitLifePercent(AM7)>70.)and(G0[128+O5]))then
if(X77==null)then
if((eY[O5]==9)and(h4[144+O5]!=null)and(Z_7(h4[144+O5]))and(IsUnitInRange(AM7,h4[144+O5],1500.))and(not IsUnitVisibleEx(AM7,GetOwningPlayer(h4[144+O5]))))then
set X77=h4[144+O5]
else
set X77=AH7(1500.,b5,Condition(function KK))
endif
endif
if((X77!=null)and(not IsUnitIllusion(X77))and(GetUnitLifePercent(X77)<75.)and(not kD(X77))and(GetUnitTypeId(X77)!='HC92')and((not IsUnitVisibleEx(AM7,GetOwningPlayer(X77)))or(not IsUnitInRange(AM7,X77,800.)))and(IsUnitInRange(AM7,X77,1500.))and(not AR7(X77,BU[zhenshibaoshi])))then
if(AO7(1000.,X77,Condition(function A27))==0)then
set GZ[O5]=true
set h4[288+O5]=h4[O5]
set J4=J8(O5,DE8(AM7,852129,'A09U'))
endif
endif
endif
if((X77==null)and(GetUnitAbilityLevel(AM7,'B00K')==0)and(GetHeroLevel(AM7)>9)and(AN7(1500.,b5,Condition(function k6))==0)and(GetUnitManaPercent(AM7)>60.))then
call SetPlayerAbilityAvailable(pl,'A0X7',true)
endif
elseif(id=='Udre')then
if(not PO8())then
if((Bz>hq[O5])and(not(GetFloatGameState(GAME_STATE_TIME_OF_DAY)==.0)))then
set J4=IssueImmediateOrderById(AM7,852621)
endif
if((X77==null)and(G0[128+O5]))then
set X77=K3(900.,AM7,Condition(function k6))
if((X77!=null)and(GetUnitState(X77,UNIT_STATE_LIFE)<GetUnitState(AM7,UNIT_STATE_LIFE)))then
call VTF(O5,X77,false,false)
endif
endif
set J4=((X77!=null)and((C_7(AM7,852095,'A02H',X77))or((kP(GetUnitTypeId(X77)))and(C_7(AM7,852585,'A08C',X77)))))
else
set J4=(X77!=null)and(GetHeroLevel(AM7)>5)and(GetUnitLifePercent(X77)<65.)and(C_7(AM7,852095,'A02H',X77))
endif
if((not J4)and(GetHeroLevel(AM7)>10)and(hq[416+O5]>Bz)and(G0[128+O5]))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
set X77=AJ7(700.,b5,Condition(function KN))
if(X77==null)then
set X77=AJ7(500.,b5,Condition(function k6))
endif
set J4=((X77!=null)and(GetUnitManaPercent(X77)>20.)and(C_7(AM7,852585,'A08C',X77)))or((X77!=null)and(GetUnitLifePercent(X77)<70.)and(PO8())and(Bz>hq[O5])and(IssueImmediateOrderById(AM7,852621)))
endif
endif
elseif(id=='UC01')then
call SetPlayerAbilityAvailable(pl,'A04A',(GetHeroLevel(AM7)>10)and(GetUnitManaPercent(AM7)>60.))
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>4))then
set X77=AH7(900.,b5,Condition(function k6))
endif
if(X77!=null)then
if((not IsUnitIllusion(X77))and(GetUnitLifePercent(X77)<50.)and(GetHeroLevel(AM7)>5)and(Bz>hq[O5])and(not IC(O5))and(not IsUnitInRange(AM7,X77,400.))and(IsUnitInRange(AM7,X77,750.)))then
set M3G=kL(AM7,X77,200.)
set J4=(M3G!=null)and((AN7(800.,M3G,Condition(function JP8))-AN7(800.,M3G,Condition(function IL8)))<=1)and(AN7(700.,M3G,Condition(function A27))==0)and((GetUnitAbilityLevel(AM7,'A0IN')<1)and IssuePointOrderByIdLoc(AM7,852525,M3G))
endif
if((not J4)and(not IsUnitIllusion(X77))and(GetHeroLevel(AM7)>5)and(Bz>hq[O5]))then
set J4=(((R2I(GetUnitState(X77,UNIT_STATE_LIFE))<JIG(AM7))or(Kz(400.,L_7(X77))>1))and(D78(AM7,852125,'A28R','A28S',X77)))
endif
if(not J4)then
set J4=(((GetUnitManaPercent(AM7)>60.)and(GetHeroLevel(AM7)>5))or(A47(X77,AM7)))and(C_7(AM7,852527,'A0Q7',X77))
endif
endif
if(not J4)then
set J4=((AN7(400.,b5,Condition(function k6))>0)or((hq[240+O5]>Bz)and(AN7(400.,b5,Condition(function KA))>1)))and(DE8(AM7,852526,'A04A'))
endif
if((not J4)and(GetHeroLevel(AM7)>11.)and(GetUnitManaPercent(AM7)>70.)and(iy(AM7))and(AN7(1400.,b5,Condition(function Ky))==0)and(eY[O5]==1))then
set M3G=kk(AM7,800.,h8[O5])
set J4=(M3G!=null)and(GetUnitAbilityLevel(AM7,'A0IN')<1)and(IssuePointOrderByIdLoc(AM7,852525,M3G))
endif
elseif(id=='UC91')then
if((not J4)and(X77!=null)and(GetHeroLevel(AM7)>5))then
set J4=(((GetUnitLifePercent(X77)<60.)or(h4[O5]!=null)or(AN7(800.,b5,Condition(function IL8))>0))and(GetUnitAbilityLevel(X77,'B00T')==0)and(C_7(AM7,852149,'A034',X77)))
endif
if((not J4)and(X77!=null)and(not IsUnitIllusion(X77))and(GetHeroLevel(AM7)>5)and(GetUnitLifePercent(X77)<40.)and((GetUnitState(AM7,UNIT_STATE_LIFE)>1800.)or(AN7(1000.,b5,Condition(function k6))<=2))and(not IsUnitInRange(AM7,X77,350.)))then
set GZ[O5]=true
set J4=J8(O5,DE8(AM7,852100,'A05C'))
endif
call SetPlayerAbilityAvailable(pl,'A29K',(GetHeroLevel(AM7)>13)and(AN7(1500.,b5,Condition(function k6))==0)and(GetUnitManaPercent(AM7)>75.))
if((not J4)and(X77!=null))then
set J4=((IsUnitInRange(AM7,X77,275.))and(DE8(AM7,852164,'A29K')))
endif
if((not J4)and(GetHeroLevel(AM7)>10)and(hq[416+O5]>Bz))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
set X77=K3(1000.,AM7,Condition(function k6))
set J4=(X77!=null)and(GetUnitAbilityLevel(X77,'B00T')==0)and(C_7(AM7,852149,'A034',X77))
endif
endif
elseif(id=='UC42')then
set UP=GetHeroLevel(AM7)
call SetPlayerAbilityAvailable(pl,'A10R',(GetUnitManaPercent(AM7)>40.)and(Bz>V74[16+O5]))
call SetPlayerAbilityAvailable(pl,'A1OP',(UP>10)and(GetUnitManaPercent(AM7)>55.))
if((X77==null)and(G0[128+O5])and(UP>4))then
set X77=AH7(900.,b5,Condition(function k6))
endif
if((X77!=null)and(UP>4))then
set J4=((R2I(GetUnitState(X77,UNIT_STATE_LIFE))<(250+(250*JKG(AM7))))and(not IsUnitIllusion(X77))and(D78(AM7,852583,'A0MU','A0A2',X77)))or((((GetHeroLevel(X77)==25)or(ModuloInteger(GetHeroLevel(X77),7-GetUnitAbilityLevel(AM7,'A094'))==0))or(GetUnitManaPercent(AM7)>60.)or(A47(X77,AM7)))and(C_7(AM7,852231,'A094',X77)))
if((not J4)and(GetUnitManaPercent(AM7)>60.))then
set GZ[O5]=true
set J4=J8(O5,DE8(AM7,852526,'A1OP'))
endif
endif
if((not J4)and(GetHeroLevel(AM7)>10)and(hq[416+O5]>Bz))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
set X77=K3(1000.,AM7,Condition(function k6))
set J4=(X77!=null)and(D78(AM7,852583,'A0MU','A0A2',X77))
endif
endif
if((not J4)and(IsUnitInRange(AM7,X77,200.)))then
set J4=(X77!=null)and IssueImmediateOrderById(AM7,852127)
endif
if((not J4)and Bz>V74[16+O5])then
set X77=AH7(300.,L_7(AM7),Condition(function IZ8))
set J4=(X77!=null)and(C_7(AM7,852600,'A10R',X77))
endif
elseif((id=='Eevi')or(id=='Eevm')or(id=='E02V')or(id=='E02W')or(id=='E02U'))then
if((not J4)and(GetHeroLevel(AM7)>5)and(GetUnitLifePercent(AM7)<50.)and(Bz>V74[O5]))then
set bj_lastLoadedUnit=AM7
set H04=null
set H54=null
set F37=GetUnitLifePercent(AM7)+20.
set F67=GetUnitLifePercent(AM7)+30.
call AJ7(700.,L_7(AM7),Condition(function HG8))
if H04!=null then
set X77=H04
else
set X77=H54
endif
call XK7("Attempt Sunder0 "+GetUnitName(X77))
set J4=(X77!=null)and(C_7(AM7,852189,'A07Q',X77))
if J4 then
call VTF(O5,X77,false,false)
endif
endif
if((not J4)and(GetHeroLevel(AM7)>5)and(GetUnitLifePercent(AM7)>75.)and(Bz>V74[O5]))then
set X77=AH7(600.,b5,Condition(function I28))
if((X77!=null)and(C[GetPlayerId(GetOwningPlayer(X77))]>D4[GetPlayerId(GetOwningPlayer(X77))]+3))then
set J4=(AO7(800.,X77,Condition(function k6))>0)and(C_7(AM7,852189,'A07Q',X77))
call XK7("Attempt Sunder1")
endif
endif
set X77=h4[O5]
if((not J4)and(X77!=null)and(not IsUnitIllusion(X77)))then
if((not J4)and(id=='Eevi')and(GetUnitLifePercent(X77)<70.))then
set J4=DE8(AM7,852663,'A1RI')
endif
if not J4 and(GetHeroLevel(AM7)>20 or(GetHeroLevel(AM7)-GetHeroLevel(X77)>3)or id!='Eevi')then
set J4=IssueImmediateOrderById(AM7,852600)
endif
if((not J4)and((A47(X77,AM7))or(GZ[208+O5])or(GetUnitLifePercent(X77)<70. and GetUnitManaPercent(AM7)>70.)))then
set J4=C_7(AM7,852119,'A2KZ',X77)
endif
endif
elseif(id=='Ekee')then
if(GetHeroLevel(AM7)>=6)then
set J4=(IsUnitInRange(AM7,h4[O5],400))or((AN7(400.,b5,Condition(function k6))>0)or((GetHeroLevel(AM7)>18)and(GetUnitManaPercent(AM7)>70.)and(AN7(400.,b5,Condition(function BU7))>2)))
if not LState(AM7,"AI|PulseNova")then
if(J4)then
call SetPlayerAbilityAvailable(pl,'A21G',true)
call DE8(AM7,852100,'A21F')
call TriggerSleepAction(.1)
endif
else
if(not J4)then
call DE8(AM7,852100,'A21H')
call TriggerSleepAction(.1)
endif
endif
call TriggerSleepAction(.1)
set J4=false
endif
if(not J4)and G0[128+O5]and(GetUnitAbilityLevel(AM7,'A035')>0)and(GetUnitManaPercent(AM7)>30)and(Bz>V74[32+O5])then
if(X77==null)and AO7(700,AM7,Condition(function G38))==0 then
set X77=AH7(800.,b5,Condition(function A27))
if(X77!=null)then
set F67=Z47(AM7,X77)
if(F67<500)then
if(DE8(AM7,852594,'A035'))then
call TriggerSleepAction(.1)
endif
else
set F37=YH7(AM7,X77)
set F67=F67-516
call MoveLocation(HA,GetWidgetX(AM7)+F67*Cos(F37*bj_DEGTORAD),GetWidgetY(AM7)+F67*Sin(F37*bj_DEGTORAD))
call IssuePointOrderByIdLoc(AM7,851986,HA)
endif
endif
set X77=null
elseif AO7(800,AM7,Condition(function G38))>=1 then
set H58=B97(600,AM7,Condition(function A27))
if AO7(150.,AM7,Condition(function BU7))<=2 then
if(DE8(AM7,852594,'A035'))then
call TriggerSleepAction(.1)
endif
else
set MCG=IS8(H58,500,Condition(function BU7),true)
if C27(MCG)then
call L87(MCG,2*GetUnitX(H58)-GetLocationX(MCG),2*GetUnitY(H58)-GetLocationY(MCG))
if Z87(GetUnitX(AM7),GetUnitY(AM7),GetLocationX(MCG),GetLocationY(MCG))<=150 then
if(DE8(AM7,852594,'A035'))then
call TriggerSleepAction(.5)
endif
endif
call IssuePointOrderByIdLoc(AM7,851986,MCG)
endif
endif
endif
endif
set UP=GetHeroLevel(AM7)
if(not J4)and(h4[O5]!=null)and(AN7(300.,b5,Condition(function k6))>0)then
if(DE8(AM7,852594,'A035'))then
call TriggerSleepAction(.1)
endif
endif
if((X77==null)and(G0[128+O5])and(GetUnitManaPercent(AM7)>70.)and(UP>3))then
set X77=AH7(1000.,b5,Condition(function k6))
endif
if((not J4)and(X77!=null))then
set J4=(((UP>3)or(GetUnitLifePercent(X77)<60.))and(S19(X77))and(C_7(AM7,852224,'A06W',X77)))
endif
if((not J4)and(X77!=null))then
set J4=(((UP>3)or(GetUnitLifePercent(X77)<60.))and(C_7(AM7,852119,'A06V',X77)))
endif
if(not J4)and(X77==null)then
set X77=AH7(1000.,b5,Condition(function BU7))
if(not J4)and(X77!=null)and(UP>8)and(GetUnitManaPercent(AM7)>60.)then
set J4=(C_7(AM7,852119,'A06V',X77))
endif
if(not J4)and(X77!=null)and(UP>14)and(GetUnitManaPercent(AM7)>60.)and(AO7(150.,AM7,Condition(function BU7))>2)then
set J4=(C_7(AM7,852224,'A06W',X77))
endif
if(not J4)and(X77!=null)and((UP>14)or((UP>10)and(eY[O5]>9)))and(GetUnitManaPercent(AM7)>40.)and(AO7(500.,AM7,Condition(function BU7))>2)then
set J4=(DE8(AM7,852594,'A035'))
endif
endif
set bj_lastLoadedUnit=AM7
if(not J4)and(h4[O5]!=null)and(eY[320+O5]>=0)and(not IsUnitInRange(AM7,X77,300))and((GetUnitLifePercent(AM7)>80)or(GetUnitLifePercent(AM7)>(GetUnitLifePercent(X77)+30)))and(GetUnitManaPercent(AM7)>20)and(h4[304+O5]==null)and(AO7(900,X77,Condition(function AQ7))==0)then
set J4=IssuePointOrderById(AM7,852686,GetUnitX(X77),GetUnitY(X77))
endif
elseif(id=='Ulic')then
call SetPlayerAbilityAvailable(pl,'A07F',(GetHeroLevel(AM7)>9)and((GetUnitManaPercent(AM7)>70.)or(X77!=null)or(AN7(900.,b5,Condition(function k6))>0)))
if GetUnitManaPercent(AM7)>60. then
call SetPlayerAbilityAvailable(pl,'A08R',true)
if IssueImmediateOrderById(AM7,852458)then
call TriggerSleepAction(.1)
endif
else
call SetPlayerAbilityAvailable(pl,'A08R',false)
endif
if((X77==null)and(G0[128+O5])and(GetUnitManaPercent(AM7)>70.)and(GetHeroLevel(AM7)>2))then
set X77=AH7(1000.,b5,Condition(function k6))
endif
if((X77!=null)and(GetHeroLevel(AM7)>2))then
if((GetHeroLevel(AM7)>5)and(Bz>hq[O5])and(not IsUnitIllusion(X77))and(GetUnitState(X77,UNIT_STATE_LIFE)>200.))then
set UP=AO7(550.,X77,Condition(function KA))
if((UP>1)and(UP<6)and((UP<=(AO7(550.,X77,Condition(function k6))*2))or((A47(X77,AM7))and(GetUnitState(X77,UNIT_STATE_LIFE)<450.))))then
set GZ[O5]=true
set J4=J8(O5,D78(AM7,852227,'A05T','A08H',X77))
endif
endif
if(not J4)then
set J4=((GetUnitManaPercent(AM7)>60.)or(GetUnitLifePercent(X77)<50.))and(C_7(AM7,852226,'A07F',X77))
endif
endif
if((not J4)and(GetUnitManaPercent(AM7)<75.)or Bz<300.)then
set X77=AH7(600.,b5,Condition(function KD))
set J4=(X77!=null)and(C_7(AM7,852066,'A053',X77))
endif
elseif(id=='U006')then
if(X77==null)then
set X77=AH7(700.,b5,Condition(function k6))
endif
if(not J4)and(X77!=null)and((GetUnitState(X77,UNIT_STATE_LIFE)<56.25*GetUnitAbilityLevel(AM7,'A0BH'))or(GetUnitState(X77,UNIT_STATE_LIFE)>500. and GetUnitState(AM7,UNIT_STATE_MANA)>300.)or(GZ[208+O5]))then
set J4=C_7(AM7,852601,'A0BH',X77)
endif
if(not J4)and(GetUnitAbilityLevel(AM7,'B01E')>0)then
if(h4[O5]==null)then
call VTF(O5,X77,false,false)
endif
if((GetUnitCurrentOrder(AM7)==851986)and(not G0[O5])and(hq[512+O5]>Bz)and(G0[128+O5])and(AN7(800.,b5,Condition(function KC))>1))then
call D48(AM7,851983,h8[O5])
endif
elseif(not J4)and((GetUnitAbilityLevel(AM7,'B01C')>0)and(GetUnitCurrentOrder(AM7)==851986)and((not IsUnitVisibleEx(AM7,G8[0]))or(not IsUnitVisibleEx(AM7,N8[0])))and(((AN7(800.,b5,Condition(function k8))>0)or(AN7(800.,b5,Condition(function KC))>0))))then
call IssueImmediateOrderById(AM7,851993)
endif
if(not J4)and(X77!=null)and((AN7(1500.,b5,Condition(function KR))==0)and(AN7(400.,b5,Condition(function k6))==0)and(Z47(AM7,IN4)>1500)and(Z47(AM7,JS4)>1500)and(GetUnitState(AM7,UNIT_STATE_MANA)>250.))then
set J4=L77(AM7,852224,'A0BG',b5)
endif
if((not J4)and(GetHeroLevel(AM7)>13)and(hq[416+O5]>Bz)and(G0[128+O5])and(GetUnitAbilityLevel(AM7,'B01E')==0)and(GetUnitState(AM7,UNIT_STATE_MANA)>200.))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
if(((X77==null)or(not IsUnitInRange(AM7,X77,400.)))and(G0[128+O5]))then
set X77=AH7(400.,b5,Condition(function k6))
endif
set J4=(X77!=null)and(GetUnitLifePercent(X77)<80.)and(Z47(AM7,X77)<300)and(DE8(AM7,852164,'A0WQ'))
endif
endif
if(not J4)and(h4[O5]==null)and GZ[O5]and((GetUnitState(AM7,UNIT_STATE_MANA)>300 and GetUnitManaPercent(AM7)>50))then
set F37=GetUnitAbilityLevel(AM7,'A0BH')*75.
set X77=AH7(600.,b5,Condition(function I38))
set J4=(X77!=null)and(C_7(AM7,852601,'A0BH',X77))
endif
elseif(id=='UC18')then
call SetPlayerAbilityAvailable(pl,'A0X5',(GetHeroLevel(AM7)>9)and(GetUnitManaPercent(AM7)>60.)and(AN7(1200.,b5,Condition(function k6))==0))
if(X77!=null)then
set GZ[O5]=true
set UP=R2I(GetUnitState(X77,UNIT_STATE_LIFE))
if((Bz>hq[O5])and(not IsUnitIllusion(X77))and(UP>200)and(UP<JMG(AM7)+'d'))then
set J4=J8(O5,(C_7(AM7,852502,'A0MN',X77))or(C_7(AM7,852555,'A0X5',X77))or((not GV8(X77))and(D78(AM7,852119,'A095','A09W',X77))))
elseif((GetHeroLevel(AM7)>2)or(A47(X77,AM7)))then
set J4=(C_7(AM7,852555,'A0X5',X77))or((GetUnitLifePercent(X77)<50.)and(not IsUnitIllusion(X77))and(C_7(AM7,852502,'A0MN',X77)))
endif
elseif((GetUnitManaPercent(AM7)>50.)and(G0[128+O5])and(GetHeroLevel(AM7)>2))then
set X77=AH7(1000.,b5,Condition(function k6))
set J4=(X77!=null)and(C_7(AM7,852555,'A0X5',X77))
endif
if((not J4)and(GetHeroLevel(AM7)>10)and((GetUnitState(AM7,UNIT_STATE_MAX_MANA)-GetUnitState(AM7,UNIT_STATE_MANA))>400.)and(iy(AM7))and(eY[O5]==1))then
set X77=AH7(700.,b5,Condition(function k9))
set J4=(X77!=null)and(C_7(AM7,852066,'A053',X77))
endif
if((not J4)and(GetHeroLevel(AM7)>15)and(hq[416+O5]>Bz)and(Bz>hq[O5])and(G0[128+O5]))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
set X77=K3(700.,AM7,Condition(function k6))
if(X77!=null)then
set UP=R2I(GetUnitState(X77,UNIT_STATE_LIFE))
set J4=(GetUnitLifePercent(X77)<60.)and(UP<1600)and(UP>500)and(not GV8(X77))and(D78(AM7,852119,'A095','A09W',X77))
endif
endif
endif
if(not J4)and(GetUnitManaPercent(AM7)<70)then
set H64=RMinBJ(I2R(GetUnitAbilityLevel(AM7,'A02N')*80),160)
if(X77==null or GetUnitState(X77,UNIT_STATE_MANA)<H64)then
set X77=J08(AM7)
endif
set J4=(X77!=null)and(C_7(AM7,852487,'A02N',X77))
endif
elseif(id=='EC57')then
set J4=GetUnitAbilityLevel(AM7,'B07T')>0
if((not J4)and(X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>3))then
set X77=AH7(900.,b5,Condition(function k6))
endif
if((not J4)and(X77!=null))then
set J4=(((GetUnitManaPercent(AM7)>50.)and(GetHeroLevel(AM7)>4))or(A47(X77,AM7)))and(C_7(AM7,852669,'A173',X77))
endif
if((not J4)and(X77!=null)and(GetUnitLifePercent(X77)<70.)and(not IsUnitIllusion(X77))and(GetHeroLevel(AM7)>10)and(Bz>hq[16+O5])and(G0[128+O5]))then
set UP=Kz(600.,b5)
if((UP>1)or((UP>0)and(AN7(800.,b5,Condition(function IL8))>0)))then
set GZ[O5]=true
call SetPlayerAbilityAvailable(pl,'A0A6',true)
set J4=J8(O5,(DE8(AM7,852594,'A013')))
endif
endif
if((not J4)and(G0[128+O5])and(AR7(AM7,BU[keledebishou]))and(X77!=null)and(not IsUnitIllusion(X77))and(GetHeroLevel(AM7)>10)and(Bz>hq[16+O5])and(GetUnitLifePercent(AM7)>65.)and(GetUnitManaPercent(AM7)>50.)and(not IsUnitInRange(AM7,X77,300.))and(IsUnitInRange(AM7,X77,800.)))then
set h4[16+O5]=X77
set J4=JXG(AM7,X77)
endif
if(not J4)and(h4[O5]!=null)then
set J4=C_7(AM7,852504,'A0MS',X77)
endif
call SetPlayerAbilityAvailable(pl,'A0MS',(not J4)and(GetHeroLevel(AM7)>2)and(GetUnitManaPercent(AM7)>45.))
elseif(id=='UC11')then
if(X77==null)then
set X77=AH7(800.,b5,Condition(function k6))
endif
call SetPlayerAbilityAvailable(pl,'A02S',(GetHeroLevel(AM7)>15)and(AN7(1500.,b5,Condition(function k6))==0)and(GetUnitManaPercent(AM7)>75.))
if((G0[128+O5])and(not J4)and(X77!=null)and(not IsUnitIllusion(X77))and(GetUnitLifePercent(X77)<65. or A47(AM7,X77)or GZ[208+O5]or eY[320+O5]>=0)and(not IsUnitInRange(AM7,X77,250.))and(IsUnitInRange(AM7,X77,700.))and((not IC(O5))or(X_7(AM7)>1600.))and(V74[32+O5]>Bz))then
if(AR7(AM7,BU[keledebishou]))then
set J4=(((Bz>hq[O5])and(GetUnitState(AM7,UNIT_STATE_MANA)>175.+(GetUnitAbilityLevel(AM7,'A29L')*'d')))or(eY[320+O5]>=1)or(A47(AM7,X77)))and(GetUnitState(AM7,UNIT_STATE_MANA)>400.)and(JXG(AM7,X77))
endif
if not J4 then
set J4=((GetUnitState(AM7,UNIT_STATE_MANA)>180.+(GetUnitAbilityLevel(AM7,'A29L')*'d'))or(A47(AM7,X77)))and(C_7(AM7,852218,'A1RD',X77))
endif
endif
if((not J4)and(GetHeroLevel(AM7)>5)and(Bz>hq[O5]))then
if((X77==null)and(G0[128+O5]))then
set X77=JS8(800.,AM7)
endif
if((X77!=null)and(not IsUnitIllusion(X77))and(GetUnitLifePercent(X77)<30 or GZ[208+O5]))then
if(Kz(400.,L_7(X77))>1 or GetUnitLifePercent(X77)<30)and(((not IsUnitInRange(AM7,X77,300.))and(JXG(AM7,X77)))or(IsUnitInRange(AM7,X77,300.)))then
if(not is(AM7))then
call Y07(.1)
endif
set J4=(DE8(AM7,852164,'A29L'))
call XK7("Attempt Reverse "+I2S(O5)+XQ7(J4))
endif
endif
endif
if(not J4)and(IsUnitInRange(AM7,X77,200.))and(AN7(250.,b5,Condition(function k8))<=1)then
set F37=YH7(AM7,X77)
set F67=YH7(AM7,h9[O5])
set F37=RAbsBJ(F37-F67)
if F37<15 then
set F37=RAbsBJ(GetUnitFacing(AM7)-F67)
if F37<15 then
set J4=((GetUnitState(AM7,UNIT_STATE_MANA)>180.+(GetUnitAbilityLevel(AM7,'A29L')*'d'))or(A47(AM7,X77)))and(C_7(AM7,852218,'A1RD',X77))
endif
endif
endif
if((not J4)and(GetHeroLevel(AM7)>3)and(GetUnitManaPercent(AM7)>60.))then
if((X77==null)and(G0[128+O5]))then
set X77=AH7(600.,b5,Condition(function k6))
endif
if((X77!=null)and(IsUnitInRange(AM7,X77,600.)))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(X77)-GetUnitY(AM7),GetUnitX(X77)-GetUnitX(AM7)))
call SetPlayerAbilityAvailable(pl,'A02S',true)
set GZ[O5]=true
set J4=J8(O5,IssuePointOrderById(AM7,852125,GetUnitX(AM7)+300.*Cos(UP*bj_DEGTORAD),GetUnitY(AM7)+300.*Sin(UP*bj_DEGTORAD)))
endif
endif
if((not J4)and(GetHeroLevel(AM7)>10)and(AN7(800.,b5,Condition(function k8))>0))then
set J4=(GetUnitAbilityLevel(AM7,'B00U')==0)and(GetUnitManaPercent(AM7)>65.)and(C_7(AM7,852066,'A037',AM7))
if((not J4)and(GetUnitAbilityLevel(AM7,'B00U')>0)and(GetUnitManaPercent(AM7)>75.))then
set X77=AH7(700.,b5,Condition(function IL8))
set J4=(X77!=null)and(kq(GetUnitTypeId(X77)))and(GetUnitAbilityLevel(X77,'B00U')==0)and(C_7(AM7,852066,'A037',X77))
endif
endif
elseif(id=='UC60')then
if((X77==null)and(G0[128+O5]))then
set X77=AH7(800.,b5,Condition(function k6))
endif
set UP=LInt(GetHandleId(AM7),"Level")
if((X77!=null)and(IsUnitInRange(AM7,X77,860.))and GetUnitState(X77,UNIT_STATE_LIFE)<20+(60*UP))then
set J4=(IssueTargetOrderById(AM7,852248,X77))
else
set J4=((IsUnitInRange(AM7,X77,860.))and(UP>GetUnitAbilityLevel(AM7,'A1NA'))and(GetUnitManaPercent(AM7)>35.)and(GetHeroLevel(AM7)>3)and(IssueTargetOrderById(AM7,852248,X77)))
endif
if((not J4)and(X77!=null)and(AR7(AM7,BU[ziyuan]))and(Bz>V74[240+O5])and(S69(X77)==false)and(CI7(X77)==false))then
set J4=UnitUseItemTarget(AM7,AV7(AM7,BU[ziyuan]),X77)
endif
if(not J4 and X77!=null)then
set J4=(((GetUnitLifePercent(X77)<50.)or(AN7(500.,b5,Condition(function IL8))>0))and((GetHeroLevel(AM7)>10)and(C_7(AM7,852189,'A08X',X77))))
endif
if((not J4)and(GetHeroLevel(AM7)>5)and(Bz>V74[O5]))then
if(LState(AM7,"AIFamiliar1|Status")==false or LState(AM7,"AIFamiliar2|Status")==false or(GetUnitAbilityLevel(AM7,'A2IG')!=0 and LState(AM7,"AIFamiliar3|Status")==false))then
call SetPlayerAbilityAvailable(pl,'A1NE',true)
set J4=IssueImmediateOrderById(AM7,852526)
elseif(LState(AM7,"AIFamiliar1|Stone")and LState(AM7,"AIFamiliar2|Stone")and(GetUnitAbilityLevel(AM7,'A2IG')==0 or LState(AM7,"AIFamiliar3|Stone")))then
call SetPlayerAbilityAvailable(pl,'A1NE',true)
set J4=IssueImmediateOrderById(AM7,852526)
else
call SetPlayerAbilityAvailable(pl,'A1NE',false)
endif
endif
elseif((id=='U008')or(id=='E015'))then
call SetPlayerAbilityAvailable(pl,'A0ZF',(GetHeroLevel(AM7)>15)and(GetUnitManaPercent(AM7)>70.))
call SetPlayerAbilityAvailable(pl,'A03D',(GetHeroLevel(AM7)>10)and(GetUnitManaPercent(AM7)>60.))
if((X77==null)and(G0[128+O5]))then
if(id=='E015')then
set X77=AH7(1000.,b5,Condition(function k6))
elseif(Bz>hq[O5])then
set X77=AJ7(600.,b5,Condition(function k6))
endif
endif
if(X77!=null)then
set J4=(Bz>hq[O5])and(id=='U008')and(not IsUnitIllusion(X77))and((GetUnitLifePercent(X77)<60.)or((GetUnitLifePercent(X77)<75.)and(AN7(2000.,b5,Condition(function A27))==0)))and(DE8(AM7,852180,'A093'))
if((id=='E015')or((not J4)and((GetHeroLevel(AM7)>4)or(GetUnitLifePercent(X77)<60.))and(R2I(GetUnitState(AM7,UNIT_STATE_MANA))>(250+(25*(GetUnitAbilityLevel(AM7,'A093')))))))then
set J4=(DE8(AM7,852600,'A0ZF'))or(DE8(AM7,852126,'A03D'))
endif
endif
if((not J4)and(GetHeroLevel(AM7)>12)and(hq[416+O5]>Bz)and(Bz>hq[O5])and(G0[128+O5]))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
set X77=K3(700.,AM7,Condition(function k6))
set J4=(X77!=null)and(GetUnitLifePercent(X77)<80.)and(DE8(AM7,852180,'A093'))
endif
endif
elseif(id=='U00A')then
set J4=(X77!=null)and(GetHeroLevel(AM7)>5)and(GetUnitLifePercent(X77)<70.)and(C_7(AM7,852231,'A055',X77))
if((not J4)and(X77!=null)and(not IsUnitIllusion(X77))and(((GetHeroLevel(AM7)>5)and(not IC(O5)))or(AF7(X77,AM7)))and(not IsUnitInRangeLoc(X77,b5,250.)))then
set J4=(kJ(GetUnitX(X77),GetUnitY(X77)))and((AO7(800.,X77,Condition(function JP8))-AO7(800.,X77,Condition(function IL8)))<=1)and(IssueTargetOrderById(AM7,852600,X77))
endif
if((not J4)and(GetHeroLevel(AM7)>14)and(hq[416+O5]>Bz)and(Bz>hq[16+O5])and(G0[128+O5]))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
set X77=K3(700.,AM7,Condition(function k6))
set J4=(X77!=null)and(GetUnitLifePercent(X77)<80.)and(DE8(AM7,852123,'A03O'))
endif
endif
if((not J4)and(GetHeroLevel(AM7)>17)and(Bz>hq[16+O5]))then
set X77=AJ7(500.,b5,Condition(function A27))
set J4=(X77!=null)and(GetUnitLifePercent(X77)<55.)and(GetUnitLifePercent(X77)>15.)and(AO7(800.,X77,Condition(function KC))>2)and(DE8(AM7,852123,'A03O'))
endif
elseif(id=='Ewar')then
set M2G=GetUnitAbilityLevel(AM7,'A0YM')
set F_8=WI7(GetUnitAbilityLevel(AM7,'A0PL')>0,1,0)*50+(35-5*M2G)
set H58=B97(1200,AM7,Condition(function BU7))
set SX7=GetWidgetLife(H58)
set J4=(H58!=null)and(not(GetWidgetLife(X77)<=M2G*25+GetRandomReal(0,'d'*R2I(I2R(GetHeroLevel(X77))/ 4.))or GetUnitLifePercent(X77)<=30.))and(GetWidgetLife(H58)<=M2G*50+GetRandomReal(0,20))and IssueTargetOrderById(AM7,852662,H58)
if not J4 then
set J4=(X77!=null)and(((GetHeroLevel(AM7)>5)and(GetUnitLifePercent(X77)<70.))or(AF7(X77,AM7)))and(C_7(AM7,852662,'A0YM',X77))
endif
if((not J4)and(X77!=null)and(not IsUnitIllusion(X77))and(((GetHeroLevel(AM7)>5)and(not IC(O5)))or(AF7(X77,AM7)))and(not IsUnitInRangeLoc(X77,b5,250.)))then
set J4=(kJ(GetUnitX(X77),GetUnitY(X77)))and((AO7(800.,X77,Condition(function JP8))-AO7(800.,X77,Condition(function IL8)))<=1)and(IssueTargetOrderById(AM7,852600,X77))
endif
elseif(id=='Udea')then
set J4=(X77!=null)and(GetHeroLevel(AM7)>5)and((GetUnitLifePercent(AM7)>75.)or((GetUnitLifePercent(AM7)-25.)>GetUnitLifePercent(X77)))and(IssueTargetOrderById(AM7,852662,X77))
if(not J4)then
set X77=AH7(800.,b5,Condition(function I28))
if(X77!=null)then
set J4=((AO7(800.,X77,Condition(function k6))>0)and(IssueTargetOrderById(AM7,852119,X77)))or((GetUnitLifePercent(AM7)>60.)and(IssueTargetOrderById(AM7,852662,X77)))
endif
if((not J4)and(GetHeroLevel(AM7)>3)and(GetUnitManaPercent(AM7)>50.)and(AN7(600.,b5,Condition(function KA))>0))then
set J4=IssueTargetOrderById(AM7,852119,AM7)
endif
endif
elseif(id=='Hvsh')then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>5)and(Bz>hq[O5]))then
set X77=AH7(800.,b5,Condition(function k6))
endif
if(X77!=null)then
if((GetHeroLevel(AM7)>5)and(GetUnitAbilityLevel(AM7,'B01X')==0)and(not IsUnitIllusion(X77))and(Bz>hq[O5])and(GetUnitState(X77,UNIT_STATE_LIFE)>300.))then
if(((IsUnitInRange(AM7,X77,500.))and(GetUnitLifePercent(X77)<60.))or((AO7(700.,X77,Condition(function IL8))>0)and(GetUnitLifePercent(X77)<80.))or((AO7(700.,X77,Condition(function J88))>0)and(AO7(700.,X77,Condition(function k8))<4)))then
set GZ[O5]=true
set J4=J8(O5,C_7(AM7,852231,'A0LH',X77))
endif
else
set J4=(GetHeroLevel(AM7)>5)and(IsUnitInRange(AM7,X77,300.))and(GetUnitLifePercent(AM7)>70.)and(C_7(AM7,852668,'A0EC',AM7))
endif
elseif((GetHeroLevel(AM7)>5)and(GetUnitAbilityLevel(AM7,'B01X')==0)and(GetUnitManaPercent(AM7)>70.))then
set J4=(AN7(1200.,b5,Condition(function k6))==0)and(AN7(700.,b5,Condition(function KA))>0)and(C_7(AM7,852668,'A0EC',AM7))
else
call SetPlayerAbilityAvailable(pl,'A0EC',false)
endif
elseif(id=='Ubal')then
set J4=(JPG(AM7)>35.)and((X77!=null)or(AN7(1000.,b5,Condition(function k6))>0))and(DE8(AM7,852600,'A0CT'))
if(not J4)then
set X77=AH7(1500.,b5,Condition(function k6))
if(X77!=null)then
set J4=IssuePointOrderById(AM7,852662,GetUnitX(X77),GetUnitY(X77))
set X77=null
endif
endif
if((not J4)and(G0[128+O5]))then
if(X77==null)then
set X77=AH7(700.,b5,Condition(function k6))
endif
if(X77!=null)then
if(AO7(900.,X77,Condition(function A27))>0)then
if((AF7(X77,AM7))or((GetHeroLevel(AM7)>4)and(IsUnitInRange(AM7,X77,250.))and(not IC(O5))and(GetUnitLifePercent(AM7)>75.)))then
set h4[288+O5]=X77
set J4=IssueImmediateOrderById(AM7,852129)
endif
else
if((AF7(X77,AM7))or((GetHeroLevel(AM7)>4)and((GetUnitManaPercent(AM7)>50.)or(GetHeroLevel(AM7)>10.))and(AO7(800.,X77,Condition(function JP8))-AO7(800.,X77,Condition(function IL8))<=1)))then
set h4[288+O5]=X77
set J4=IssueImmediateOrderById(AM7,852129)
endif
endif
endif
endif
elseif(id=='Opgh')then
if((G0[128+O5])and(AR7(AM7,BU[keledebishou]))and(GetHeroLevel(AM7)>12)and(X77!=null)and(not IsUnitIllusion(X77))and(Bz>hq[O5])and(not IsUnitInRange(AM7,X77,250.))and(IsUnitInRange(AM7,X77,700.)))then
set J4=((AO7(800.,X77,Condition(function JP8))-AO7(800.,X77,Condition(function IL8)))<=1)and(JXG(AM7,X77))
endif
if(X77!=null)then
set UP=R2I(GetUnitState(X77,UNIT_STATE_LIFE))
set J4=(GetHeroLevel(AM7)>5)and(not IsUnitIllusion(X77))and((UP<(150+(150*GetUnitAbilityLevel(AM7,'A0E2'))))or(UP<(150+(150*GetUnitAbilityLevel(AM7,'A1MR')))))and(UP>150)and(D78(AM7,852119,'A0E2','A1MR',X77))
if((not J4)and((GetHeroLevel(AM7)>3)or(A47(X77,AM7)))and(R2I(GetUnitState(AM7,UNIT_STATE_MANA))>(195+(40*GetUnitAbilityLevel(AM7,'A0E2')))))then
set J4=IssueTargetOrderById(AM7,852248,X77)
endif
endif
if((not J4)and(GetHeroLevel(AM7)>10)and(hq[416+O5]>Bz)and(G0[128+O5]))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
set J4=(GetUnitLifePercent(AM7)>70.)and(((UP>1)and(AN7(280.,b5,Condition(function k6))>1))or((UP<=2)and(AN7(280.,b5,Condition(function k6))>0)))and(IssueImmediateOrderById(AM7,852600))
endif
endif
if((not J4)and(GetHeroLevel(AM7)>3))then
if(X77==null)then
set X77=K3(800.,AM7,Condition(function k6))
endif
set J4=(X77!=null)and((GetUnitManaPercent(AM7)>60.)or(AF7(X77,AM7)))and(IssueTargetOrderById(AM7,852248,X77))
endif
if((not J4)and(AN7(800.,b5,Condition(function I28))>0))then
set J4=(AN7(280.,b5,Condition(function k6))>0)and(IssueImmediateOrderById(AM7,852600))
endif
elseif(id=='U00K')then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>5))then
set X77=AH7(1000.,b5,Condition(function k6))
endif
if((X77!=null)and(not IsUnitInRange(AM7,X77,200.))and(GetUnitLifePercent(X77)<50.)and(GetUnitCurrentOrder(AM7)==851983))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(X77)-GetUnitY(AM7),GetUnitX(X77)-GetUnitX(AM7)))
set J4=IssuePointOrderById(AM7,852218,GetUnitX(X77)+100.*Cos(UP*bj_DEGTORAD),GetUnitY(X77)+100.*Sin(UP*bj_DEGTORAD))
endif
if((not J4)and(X77!=null)and(not IsUnitIllusion(X77))and(GetHeroLevel(AM7)>5)and(R2I(GetUnitState(AM7,UNIT_STATE_MANA))>250+(75*GetUnitAbilityLevel(AM7,'A06R'))))then
if((Bz>hq[O5])and(Bz>hq['p'+O5])and(Bz>hq[240+O5])and(AR7(AM7,BU[keledebishou]))and(IsUnitInRange(AM7,X77,900.))and(not IsUnitInRange(AM7,X77,300.)))then
set UP=AN7(1000.,b5,Condition(function k6))
if((not IsUnitVisibleEx(AM7,GetOwningPlayer(X77)))or((hq[416+O5]>Bz)and((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(800.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1))))then
set J4=(AN7(500.,b5,Condition(function k6))==0)and(IssueImmediateOrderById(AM7,852581))
endif
endif
if(not J4)then
set J4=(Bz>hq[O5])and(IssueTargetOrderById(AM7,852218,X77))
endif
if((not J4)and((hq[O5]-Bz)>20.)and(GetUnitLifePercent(AM7)>70.)and(not IC(O5))and(GetUnitState(AM7,UNIT_STATE_MANA)>500.)and(IsUnitInRange(AM7,X77,500.))and(AN7(500.,b5,Condition(function IL8))>0))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(X77)-GetUnitY(AM7),GetUnitX(X77)-GetUnitX(AM7)))
set J4=IssuePointOrderById(AM7,852218,GetUnitX(X77)+100.*Cos(UP*bj_DEGTORAD),GetUnitY(X77)+100.*Sin(UP*bj_DEGTORAD))
endif
endif
if(not J4)and(Bz>V74[32+O5])and(GetUnitAbilityLevel(AM7,'A0H0')>1)and(G0[256+O5])and(h4[304+O5]==null)and(AO7(GetUnitAbilityLevel(AM7,'A0H0')*50+'d',AM7,Condition(function BU7))>4)then
set J4=IssueImmediateOrderById(AM7,852503)
endif
elseif(id=='Nfir')then
set J4=(GetUnitAbilityLevel(AM7,'B07T')==0)and(GetUnitManaPercent(AM7)>50.)and(GetHeroLevel(AM7)>3)and((JSG(AM7,200.,852164,'A0EY'))or(JSG(AM7,450.,852588,'A0FH'))or(JSG(AM7,700.,852599,'A0F0')))
if((not G0[128+O5])or(J4))then
elseif((AR7(AM7,BU[luosazhifeng]))and(GetHeroLevel(AM7)>10)and(Bz>hq[O5])and(GetUnitManaPercent(AM7)>50.)and((GetUnitAbilityLevel(AM7,'A0CQ'))>(GetUnitAbilityLevel(AM7,'A0BR')*4)))then
if(X77==null)then
set X77=AH7(1200.,b5,Condition(function KK))
endif
if((X77!=null)and(not IsUnitIllusion(X77))and(GetUnitTypeId(X77)!='HC92')and(AO7(800.,X77,Condition(function A27))==0)and((AO7(600.,X77,Condition(function J88))>0)or(not IsUnitInRange(AM7,X77,800.))or(not IsUnitVisibleEx(AM7,G8[0]))or(not IsUnitVisibleEx(AM7,N8[0]))))then
set GZ[272+O5]=true
set J4=UnitUseItem(AM7,AV7(AM7,BU[luosazhifeng]))
set GZ[272+O5]=J4
endif
elseif((AR7(AM7,BU[keledebishou]))and(X77!=null)and(not IsUnitIllusion(X77))and(not IC(O5))and(GetHeroLevel(AM7)>10)and(Bz>hq[O5])and(GetUnitLifePercent(AM7)>65.)and(GetUnitManaPercent(AM7)>50.)and((GetUnitAbilityLevel(AM7,'A0CQ'))>(GetUnitAbilityLevel(AM7,'A0BR')*4)))then
set J4=((AO7(800.,X77,Condition(function JP8))-AO7(800.,X77,Condition(function IL8)))<=1)and(JXG(AM7,X77))
endif
if((not J4)and(GetHeroLevel(AM7)>12)and(hq[416+O5]>Bz)and(Bz>hq[O5])and(G0[128+O5])and(GetRandomInt(1,3)==1))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and(AN7(1000.,b5,Condition(function IL8))>0))then
set UP=AN7(650.,b5,Condition(function k6))
set J4=((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and(DE8(AM7,852273,'A29J'))
endif
endif
elseif(id=='O00J')then
if LoadBoolean(R8,GetHandleId(AM7),'DARK')then
set J4=true
if J4 then
if IsJWPlayer(GetOwningPlayer(AM7))then
set MBG=YR4
else
set MBG=YQ4
endif
set H58=LoadUnitHandle(R8,W57,'DARK')
if IsPointInRegion(IF4,GetUnitX(AM7),GetUnitY(AM7))==false and not((AO7(700,H58,Condition(function k6))<=IMinBJ(W97(IsUnitInRegion(MBG,H58),2+R2I((GetHeroLevel(AM7)-GetHeroLevel(H58))/ 4),999),W97(AO7(500,H58,Condition(function A27))>0,3+R2I(GetUnitLifePercent(AM7)-GetUnitLifePercent(H58))/ 20,999)))or AO7(900,H58,Condition(function HK8))>=2)then
call IssueImmediateOrderById(AM7,851972)
endif
endif
endif
if J4==false and A87(AM7)and AO7(500,AM7,Condition(function k6))>=1 and YE7(AM7,30,400,S87)then
set SD7=2500
set H58=B97(99999,AM7,And(Condition(function BU7),Condition(function G08)))
if H58==null then
set SD7=1500
set H58=B97(99999,AM7,And(Condition(function BU7),Condition(function G08)))
endif
set J4=(H58!=null)and(GetUnitAbilityLevel(AM7,'A0IH')<1 or IsUnitInRange(AM7,X77,WI7(GetWidgetLife(AM7)>1800,600,WI7(GetWidgetLife(AM7)<1000,400,500))))and GetUnitAbilityLevel(AM7,'A0IH')<1 and IssueTargetOrderById(AM7,852600,H58)
endif
if((X77!=null)and(not J4)and(not IsUnitIllusion(X77))and(GetHeroLevel(AM7)>5)and(A47(X77,AM7)or((GetUnitLifePercent(X77)<60.)and(not IsUnitInRange(AM7,X77,600.))))and(((AO7(900.,X77,Condition(function JP8))<=2)and(AR7(AM7,BU[zhipeitoukui]))or(AR7(AM7,BU[sadanzhixieli])))or((AO7(900.,X77,Condition(function JP8))<2))))then
set J4=((not GV8(X77))and(AN7(700.,GetUnitLoc(X77),Condition(function A27))==0)and(IssueTargetOrderById(AM7,852600,X77)))
endif
if((not J4)and(X77!=null)and(not IsUnitIllusion(X77))and(GetHeroLevel(AM7)>5)and(GetUnitLifePercent(X77)<60.)and(IsUnitInRange(AM7,X77,V74[64+O5])))then
set J4=(IssueTargetOrderById(AM7,852248,X77))
endif
if((not J4)and AR7(AM7,BU[bizhang2])and(LState(AM7,"ArmletOfMordigan|Active")==false)and(GetUnitLifePercent(AM7)>90.)and(IsUnitInRange(AM7,X77,110.)))then
set J4=(X77!=null)and(UnitUseItem(AM7,AV7(AM7,BU[bizhang2])))
elseif((not J4)and AR7(AM7,BU[bizhang])and(LState(AM7,"ArmletOfMordigan|Active"))and((not IsUnitInRange(AM7,X77,150.))or(GetUnitLifePercent(AM7)<60.)))then
set J4=(UnitUseItem(AM7,AV7(AM7,BU[bizhang])))
endif
if((not J4)and(GetHeroLevel(AM7)>10)and(hq[O5]>Bz))then
if((X77==null)or(IsUnitInRange(AM7,X77,500.)))then
set X77=K3(1500.,AM7,Condition(function k6))
endif
set J4=(X77!=null)and((GetUnitLifePercent(X77)<60.)and((GetUnitState(X77,UNIT_STATE_LIFE)+300.)<GetUnitState(AM7,UNIT_STATE_LIFE)))and(not IsUnitInRange(AM7,X77,600.))and(AO7(700.,X77,Condition(function JP8))<=2)and(not GD8(X77))and(AN7(700.,GetUnitLoc(X77),Condition(function A27))==0)and(IssueTargetOrderById(AM7,852600,X77))
endif
if((not J4)and(not Id(O5))and(GetHeroLevel(AM7)>10)and(hq[O5]>Bz))then
set X77=AJ7(1300.,b5,Condition(function I28))
if(X77!=null)then
set X77=AJ7(700.,L_7(X77),Condition(function k6))
set J4=(X77!=null)and(not IsUnitInRange(AM7,X77,300.))and(IssueTargetOrderById(AM7,852600,X77))
endif
endif
if(not J4 and Bz>V74[O5])then
set X77=AJ7(V74[64+O5],b5,Condition(function k6))
set J4=(X77!=null)and(GetUnitLifePercent(X77)<40.)and(IssueTargetOrderById(AM7,852248,X77))
endif
if(not J4 and(GetUnitAbilityLevel(AM7,'A1D8')>0))then
set X77=AJ7(V74[64+O5],b5,Condition(function k6))
set J4=(X77!=null)and(GetRandomInt(1,2)==1)and(((AO7(500.,X77,Condition(function JP8))<=2)and(AR7(AM7,BU[zhipeitoukui]))or(AR7(AM7,BU[sadanzhixieli])))or((AO7(500.,X77,Condition(function JP8))<2)))and(IssueTargetOrderById(AM7,852248,X77))
endif
if(not J4)and(GetHeroLevel(AM7)>10)then
set X77=AJ7(2000.,b5,Condition(function k6))
set J4=(X77!=null)and(Bz>V74[16+O5])and(GetUnitLifePercent(AM7)>90.)and(not GD8(X77))and(not IsUnitInRange(AM7,X77,700.))and(((AO7(900.,X77,Condition(function JP8))<=1)and(AR7(AM7,BU[zhipeitoukui]))or(AR7(AM7,BU[sadanzhixieli])))or((AO7(900.,X77,Condition(function JP8))<2)))and(AO7(750.,X77,Condition(function A27))==0)and(IssueTargetOrderById(AM7,852600,X77))
endif
elseif(id=='U00F')then
if((GetUnitAbilityLevel(AM7,'B02T')>0)and(AN7(275.,b5,Condition(function JP8))==0))then
if((X77==null)or(not IsUnitInRange(AM7,X77,500.)))then
set X77=AJ7(500.,b5,Condition(function k6))
endif
if((X77!=null)and(G0[128+O5]))then
call IssueTargetOrderById(AM7,851983,X77)
else
call SetPlayerAbilityAvailable(pl,'A06K',true)
call IssueImmediateOrderById(AM7,852178)
endif
elseif(GetUnitAbilityLevel(AM7,'B02T')==0)then
if(AN7(225.,b5,Condition(function JP8))==0)then
call SetPlayerAbilityAvailable(pl,'A06K',false)
else
call SetPlayerAbilityAvailable(pl,'A06K',true)
call IssueImmediateOrderById(AM7,852177)
endif
endif
if(not J4)and(h4[O5]!=null)and(IsUnitInRange(AM7,X77,225))and(GetUnitLifePercent(X77)<70)then
set J4=D78(AM7,852480,'A0FL','A1CX',X77)
endif
if(not J4)and(h4[O5]!=null)and(IsUnitInRange(AM7,X77,300))and(GetUnitLifePercent(X77)<30)then
set J4=VMF(AM7,X77)
endif
if((not J4)and(GetHeroLevel(AM7)>5)and(GetUnitState(AM7,UNIT_STATE_MANA)>=150.)and(Bz>hq[16+O5]))then
set UP=800+(200*GetUnitAbilityLevel(AM7,'A06I'))
if((X77==null)or(IsUnitIllusion(X77))or(IsUnitInRange(AM7,X77,200.))or(not IsUnitInRange(AM7,X77,UP)))then
set X77=AH7(UP,b5,Condition(function JP8))
endif
set J4=(X77!=null)and(not IsUnitInRange(AM7,X77,200.))and((GetUnitLifePercent(X77)<80.)or(AN7(500.,b5,Condition(function IL8))>0)or(Bz>hq[O5]))and(VMF(AM7,X77))
if((not J4)and(X77!=null)and(not IsUnitInRange(AM7,X77,450.))and(iU(AM7))and(G0[128+O5])and(AN7(400.,L_7(AM7),Condition(function k8))==0))then
set UP=R2I(Z87(GetUnitX(AM7),GetUnitY(AM7),GetUnitX(X77),GetUnitY(X77)))
if(GetRandomInt(1,2)==1)then
set id=R2I(bj_RADTODEG*Atan2(GetUnitY(AM7)-GetUnitY(X77),GetUnitX(AM7)-GetUnitX(X77)))-15
else
set id=R2I(bj_RADTODEG*Atan2(GetUnitY(AM7)-GetUnitY(X77),GetUnitX(AM7)-GetUnitX(X77)))+15
endif
set J4=IssuePointOrderById(AM7,851986,GetUnitX(X77)+UP*Cos(id*bj_DEGTORAD),GetUnitY(X77)+UP*Sin(id*bj_DEGTORAD))
endif
endif
elseif(id=='N0M7'or id=='N0MC'or id=='N0MO'or id=='N0MA'or id=='N0MB')or(id=='N0MK' or id=='N0MM')then
if(id=='N0M7'or id=='N0MC'or id=='N0MO'or id=='N0MA'or id=='N0MB')then
set H58=H_8(900,AM7,350)
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),'A2LA',(H58!=null)or(GetUnitState(AM7,UNIT_STATE_MANA)>600 or GetUnitManaPercent(AM7)>70.))
set J4=(H58!=null)and IssueTargetOrderById(AM7,852119,H58)
if not J4 and G0[128+O5]then
if RJ7[O5]!=null and IsUnitInRange(AM7,RJ7[O5],950)and AO7(350,RJ7[O5],Condition(function k6))>=2 and(GetUnitLifePercent(RJ7[O5])<=60. and(YM7(GetUnitTypeId(RJ7[O5]))==GT7 or YM7(GetUnitTypeId(RJ7[O5]))==GU7))then
set X77=RJ7[O5]
else
set X77=H18(800,AM7,0,Condition(function k6))
endif
set J4=(X77!=null)and(G0[256+O5]or(GetUnitLifePercent(X77)<30.+7*AO7(600,AM7,Condition(function IL8))+7*(AO7(350,X77,Condition(function k6)))+3*(AO7(350,X77,Condition(function BU7))))or .73*GetWidgetLife(X77)<=350)or(AO7(600,AM7,Condition(function IL8))>=3)and IssueTargetOrderById(AM7,852581,X77)
if J4 then
set h4[O5]=V_7(J4,X77,h4[O5])
else
set X77=B97(800,AM7,Condition(function MYG))
set J4=(X77!=null)and IssueTargetOrderById(AM7,852581,X77)
endif
endif
if not J4 then
if AO7(600,AM7,Condition(function IL8))>=4 and AO7(600+'d'*GetUnitAbilityLevel(AM7,'A2NE'),AM7,Condition(function k6))>=1 and G0[256+O5]or(GetUnitLifePercent(AM7)<20. and GD8(AM7)==false)then
set J4=IssueImmediateOrderById(AM7,852180)
endif
endif
if not J4 then
set X77=B97(1200,AM7,Condition(function I_8))
set J4=(X77!=null)and((((not XG7(X77))or GetUnitLifePercent(X77)<=25.)or(GetUnitCurrentOrder(X77)!=851983 or(AO7(600,X77,Condition(function k6))>=1 and GetUnitLifePercent(X77)<=25.)))or GetUnitState(X77,UNIT_STATE_LIFE)<=225)and IssueTargetOrderById(AM7,852536,X77)
endif
else
if(id=='N0MK' or id=='N0MM')then
set H58=B97(500+'d'*GetUnitAbilityLevel(AM7,'A2M1'),AM7,Condition(function G28))
set X77=V_7(H58!=null,H58,X77)
set J4=(G0[256+O5])and(X77!=null)and(GetUnitManaPercent(AM7)>70 or GetUnitLifePercent(X77)<=30.)and IssueTargetOrderById(AM7,852095,X77)
if not J4 then
set X77=V_7(X77!=null,X77,B97(2000,AM7,Condition(function k6)))
if(not Y57(AM7,X77,90))then
set J4=(X77!=null)and(G0[128+O5]or(GetUnitManaPercent(AM7)>65. or GetUnitLifePercent(X77)<80.))and IssuePointOrderById(AM7,852600,(GetUnitX(X77)+'}'*Cos(GetUnitFacing(X77)*bj_DEGTORAD+GetRandomReal(-.52,.52))),(GetUnitY(X77)+'}'*Sin(GetUnitFacing(X77)*bj_DEGTORAD+GetRandomReal(-.52,.52))))
else
set MCG=OM8(AM7,X77,999999,3.3,0)
set J4=(X77!=null)and(G0[256+O5]or((GetUnitManaPercent(AM7)>35. or GetUnitState(AM7,UNIT_STATE_MANA)>=320)or GetUnitLifePercent(X77)<80.))and(MCG!=null)and IssuePointOrderByIdLoc(AM7,852600,MCG)
endif
endif
if not J4 then
set X77=B97(700,AM7,Condition(function HI8))
set H58=B97(1100,AM7,Condition(function HH8))
if X77!=null and H58!=null then
if IsUnitInRange(H58,X77,325)then
set J4=((GetUnitManaPercent(AM7)>=30. or GetUnitState(AM7,UNIT_STATE_MANA)>=225.)or(GetUnitState(X77,UNIT_STATE_LIFE)<=500 or GetUnitLifePercent(X77)<70.)or(GetUnitLifePercent(H58)<=100.))and IssuePointOrderById(AM7,852662,.5*(GetUnitX(X77)+GetUnitX(H58)),.5*(GetUnitY(X77)+GetUnitY(H58)))
else
if AO7(600,H58,Condition(function GL8))>=3 and GetUnitLifePercent(X77)>75. then
set X77=H58
endif
set J4=(X77!=null)and((IsUnitType(X77,UNIT_TYPE_HERO)and(GetUnitLifePercent(X77)<=40. or XF7(X77)))or(IsUnitType(X77,UNIT_TYPE_STRUCTURE)and AO7(600,H58,Condition(function GL8))>=2))and IssuePointOrderById(AM7,852662,GetUnitX(X77)+GetRandomReal(0,'d'),GetUnitY(X77)+GetRandomReal(0,'d'))
endif
else
set X77=V_7(X77==null,H58,X77)
if X77==null then
set X77=B97(1100,AM7,Condition(function J88))
endif
set J4=(X77!=null)and((IsUnitType(X77,UNIT_TYPE_HERO)and(GetUnitLifePercent(X77)<=70. or XF7(X77)))or(IsUnitType(X77,UNIT_TYPE_STRUCTURE)and AO7(600,H58,Condition(function GL8))>=2))and IssuePointOrderById(AM7,852662,GetUnitX(X77)+GetRandomReal(0,'d'),GetUnitY(X77)+GetRandomReal(0,'d'))
endif
endif
if J4 then
endif
if not J4 then
set J4=(GetUnitTypeId(AM7)!='N0MM')and((G0[256+O5]and AO7(750,AM7,Condition(function k6))>=1)or eY[O5]==10 or((AR7(AM7,'I06D')and AO7(500,AM7,Condition(function BU7))>=1)or(AR7(AM7,'I08T')and AO7(600,AM7,And(Condition(function G58),Condition(function GL8)))>=1)))and GetUnitLifePercent(AM7)>20. and IssueImmediateOrderById(AM7,852594)
endif
endif
endif
elseif(id=='U00E')then
call SetPlayerAbilityAvailable(pl,'A05V',(GetHeroLevel(AM7)>4)and(GetUnitManaPercent(AM7)>30.)or(AN7(400.,b5,Condition(function k6))>0))
if((X77!=null)and(not GV8(X77))and(not IsUnitIllusion(X77))and(GetHeroLevel(AM7)>5)and(GetUnitState(X77,UNIT_STATE_LIFE)>200.))then
set UP=GetUnitAbilityLevel(AM7,'A067')
if(UP==0)then
set UP=GetUnitAbilityLevel(AM7,'A08P')+1
endif
set J4=(GetUnitState(X77,UNIT_STATE_LIFE)<((.2+(I2R(UP)*.2))*(GetUnitState(X77,UNIT_STATE_MAX_LIFE)-GetUnitState(X77,UNIT_STATE_LIFE))))and(D78(AM7,852095,'A067','A08P',X77))
endif
if((not J4)and(GetHeroLevel(AM7)>6)and(GetUnitLifePercent(AM7)<85.)and(GetUnitManaPercent(AM7)>35.))then
set J4=((AN7(400.,b5,Condition(function KA))>0)or(AN7(400.,b5,Condition(function KC))>0))and(IssueImmediateOrderById(AM7,852526))
endif
if((not J4)and(hq[240+O5]>Bz))then
set J4=(AN7(400.,b5,Condition(function KA))>1)and(DE8(AM7,852526,'A05V'))
endif
if((not J4)and(GetUnitManaPercent(AM7)>35.)and(GetUnitState(AM7,UNIT_STATE_MANA)>250.))then
set X77=AH7(400.,b5,Condition(function I68))
set J4=(X77!=null)and(((GetUnitLevel(AM7)>4)and(GetUnitLifePercent(X77)<80.))or(GetUnitLifePercent(X77)<55.))and(DE8(AM7,852526,'A05V'))
endif
elseif(id=='Oshd')then
if(GetHeroLevel(AM7)>2)then
if((X77==null)and(G0[128+O5]))then
set X77=AH7(900.,b5,Condition(function k6))
endif
if((X77!=null)and(not IsUnitIllusion(X77))and(GetUnitLifePercent(X77)>30.))then
set J4=((AO7(600.,X77,Condition(function J88))>0)or((AO7(800.,X77,Condition(function I68))==0)and(AO7(800.,X77,Condition(function Ko))==0)and(GetUnitManaPercent(AM7)>65.)))and(C_7(AM7,852227,'A04Y',X77))
endif
if((not J4)and(GetHeroLevel(AM7)>8)and(X77!=null)and(not IsUnitIllusion(X77))and(GetUnitLifePercent(X77)<80.)and(IsUnitInRange(AM7,X77,600.)))then
set J4=(GetUnitState(AM7,UNIT_STATE_MANA)>hq[272+O5])and(AN7(600.,b5,Condition(function IL8))>0)and(C_7(AM7,852480,'A02Q',X77))
endif
if((not J4)and(GetHeroLevel(AM7)>11)and(X77!=null)and(kq(GetUnitTypeId(X77))))then
set J4=C_7(AM7,852095,'A2OI',X77)
endif
if(GetUnitLifePercent(AM7)<85.)then
if((X77==null)and(GetUnitManaPercent(AM7)>70.)and(AN7(1200.,b5,Condition(function k6))==0))then
set X77=AH7(600.,b5,Condition(function KA))
endif
set J4=(X77!=null)and(C_7(AM7,852119,'A0GK',X77))
endif
endif
elseif(id=='Ofar')then
if((G0[128+O5])and(AR7(AM7,BU[keledebishou]))and(X77!=null)and(not IsUnitIllusion(X77))and((GetUnitLifePercent(X77)<70.)or(GetUnitAbilityLevel(X77,'BNab')>0)or(Bz>hq[O5]))and(not IsUnitInRange(AM7,X77,300.))and(IsUnitInRange(AM7,X77,700.)))then
set J4=((AO7(800.,X77,Condition(function JP8))-AO7(800.,X77,Condition(function IL8)))<=1)and(JXG(AM7,X77))
endif
if(GetHeroLevel(AM7)>4)then
if((X77==null)and(G0[128+O5])and(GetUnitManaPercent(AM7)>40.))then
set X77=AH7(800.,b5,Condition(function k6))
endif
else
call SetPlayerAbilityAvailable(pl,'A046',false)
endif
if((not J4)and(X77!=null)and((GetHeroLevel(AM7)>5)or(A87(X77))))then
set J4=((GetUnitManaPercent(AM7)>30.)and(C_7(AM7,852662,'A046',X77)))or((GetUnitLifePercent(X77)<50.)and(not IsUnitIllusion(X77))and(IsUnitInRange(AM7,X77,600.))and(DE8(AM7,852588,'A29I')))
endif
if((not J4)and(GetHeroLevel(AM7)>5)and(Bz>hq[16+O5]))then
set J4=(GetHeroLevel(AM7)>10)and(hq[416+O5]>Bz)and(AN7(600.,b5,Condition(function I68))>0)and(Kz(600.,b5)>1)and(DE8(AM7,852588,'A29I'))
if(not J4)then
set X77=AJ7(925.,b5,Condition(function I28))
set J4=((X77!=null)and(AO7(600.,AM7,Condition(function k6))>0)and(DE8(AM7,852588,'A29I')))
endif
endif
if((not J4)and(X77!=null)and((h4[O5]!=null)or(GetUnitLifePercent(X77)<70.))and(IsUnitInRange(AM7,X77,300)))then
set J4=((GetUnitState(AM7,UNIT_STATE_MANA)>WPF(AM7,'A29I',I87)+60)or(Bz+10<V74[O5]))and(IssueImmediateOrderById(AM7,852164))
call XK7("Anchor2")
endif
if((not J4)and((GetUnitState(AM7,UNIT_STATE_MANA)>WPF(AM7,'A29I',I87)+150))and(GetUnitAbilityLevel(AM7,'A226')>1)and(AO7(400.,AM7,Condition(function BU7))>3))then
set J4=(IssueImmediateOrderById(AM7,852164))
call XK7("Anchor")
endif
elseif(id=='H00H')then
if(h4[16+O5]!=null)then
if((Z_7(h4[16+O5]))and(GetUnitAbilityLevel(h4[16+O5],'B01N')>0))then
set J4=(JUG(AM7,h4[16+O5]))or(IssueTargetOrderById(AM7,852089,h4[16+O5]))
call JLG(AM7,h4[16+O5])
else
set h4[16+O5]=null
endif
elseif((X77!=null)and(not IsUnitIllusion(X77))and(IsUnitInRange(AM7,X77,500.))and((GetHeroLevel(AM7)>4)))then
set J4=(GetUnitAbilityLevel(X77,'B01N')==0)and(GetUnitState(AM7,UNIT_STATE_MANA)>250.)and(Bz>hq[O5])and(C_7(AM7,852669,'A2TD',X77))
endif
if((not J4)and(GetHeroLevel(AM7)>11)and(Bz>hq[16+O5])and(AN7(I2R(270+(250*GetUnitAbilityLevel(AM7,'A09D'))),b5,Condition(function k6))>0))then
set GZ[O5]=true
set J4=J8(O5,DE8(AM7,852594,'A09D'))
endif
if((not J4)and(GetHeroLevel(AM7)>5)and((X77!=null)or(GetUnitLifePercent(AM7)<70.)))then
if((X77==null)or(IsUnitIllusion(X77)))then
if(AN7(800.,b5,Condition(function k6))==0)then
set X77=AH7(500.,b5,Condition(function KA))
set J4=(X77!=null)and(GetUnitLifePercent(X77)>80.)and(D78(AM7,852487,'A0CC','A02Z',X77))
endif
elseif((IsUnitInRange(AM7,X77,400.))and((GetUnitLifePercent(X77)<50.)or(GetUnitAbilityLevel(X77,'B01N')>0)))then
set J4=D78(AM7,852487,'A0CC','A02Z',X77)
endif
if((not J4)and(iy(AM7)))then
call SetPlayerAbilityAvailable(pl,'A0CC',true)
call SetPlayerAbilityAvailable(pl,'A02Z',true)
endif
else
call SetPlayerAbilityAvailable(pl,'A0CC',false)
call SetPlayerAbilityAvailable(pl,'A02Z',false)
endif
elseif(id=='UC76')then
call SetPlayerAbilityAvailable(pl,kT(AM7),(GetHeroLevel(AM7)>10)and((GetUnitManaPercent(AM7)>60.)or(X77!=null)))
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>3))then
set X77=AH7(1000.,b5,Condition(function k6))
endif
if((X77!=null)and(((GetHeroLevel(AM7)>3)and(GetUnitManaPercent(AM7)>40.))or(A47(X77,AM7))))then
set J4=C_7(AM7,852218,kT(AM7),X77)
endif
if((not J4)and(GetHeroLevel(AM7)>5)and(X77!=null)and(not IsUnitIllusion(X77))and(Bz>hq[O5])and(G0[128+O5]))then
set J4=(Kz(500.,b5)>1)and(hq[416+O5]>Bz)and(IssueImmediateOrderById(AM7,852556))
if((not J4)and(X77!=null)and(AR7(AM7,BU[keledebishou]))and(G0[128+O5])and(GetHeroLevel(AM7)>13)and(GetUnitLifePercent(AM7)>70.)and(GetUnitManaPercent(AM7)>30.))then
set h4[16+O5]=X77
set J4=JXG(AM7,X77)
endif
endif
elseif(id=='E01A')then
if(GetUnitManaPercent(AM7)<50.)then
if(GetUnitAbilityLevel(AM7,'B06J')>0)then
call IssueImmediateOrderById(AM7,852178)
endif
call SetPlayerAbilityAvailable(pl,'A0NE',false)
elseif((GetHeroLevel(AM7)>12)and(GetUnitManaPercent(AM7)>70.))then
call SetPlayerAbilityAvailable(pl,'A0NE',true)
if((GetUnitAbilityLevel(AM7,'B06J')==0)and(hG[O5]>14)and(not T4 and not SC4))then
call IssueImmediateOrderById(AM7,852177)
endif
endif
call SetPlayerAbilityAvailable(pl,'A0NM',(X77==null)and(GetHeroLevel(AM7)>7)and(AN7(1500.,b5,Condition(function k6))==0)and(GetUnitManaPercent(AM7)>70.))
if(X77!=null)then
set J4=((GetHeroLevel(AM7)>4)or(A47(X77,AM7)))and((((GetUnitCurrentOrder(X77)==851973)or(IsUnitInRange(AM7,X77,200.)))and(not IsUnitIllusion(X77))and(C_7(AM7,852089,'A0NO',X77)))or((GetUnitLifePercent(X77)<70.)and(C_7(AM7,852119,'A0NM',X77))))
if((not J4)and(GetHeroLevel(AM7)>5)and(not IsUnitIllusion(X77))and(Bz>hq[O5])and(not kr(AM7)))then
set UP=Kz(700.,L_7(X77))
if((UP>2)or((UP>1)and(AN7(700.,b5,Condition(function I68))>0)))then
set J4=((AN7(700.,b5,Condition(function I68))>0)and(C_7(AM7,852119,'A0NM',X77)))or(D78(AM7,852597,'A0NT','A0NX',X77))
endif
endif
endif
elseif(id=='U00P')then
if((X77!=null)and(GetHeroLevel(AM7)>5)and(not IsUnitIllusion(X77))and(Bz>hq[O5]))then
set UP=Kz(700.,L_7(X77))
if((UP>2)or((UP>1)and(AN7(730.,b5,Condition(function IL8))>0)))then
set J4=D78(AM7,852089,'A0OK','A1VW',X77)
endif
endif
elseif(id=='E01C')then
call SetPlayerAbilityAvailable(pl,'A06P',GZ[O5])
set X77=AH7(600.,b5,Condition(function I28))
if(X77==null)then
set X77=AH7(500.,b5,Condition(function I68))
endif
set J4=(X77!=null)and(GetUnitLifePercent(X77)<60.)and(AN7(900.,b5,Condition(function k6))>0)and(IssueTargetOrderById(AM7,852248,X77))
set X77=h4[O5]
if((not J4)and(X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>4)and(GetUnitManaPercent(AM7)>60.)and(GetUnitLifePercent(AM7)>70.))then
set X77=AH7(800.,b5,Condition(function k6))
endif
if(not J4)then
set J4=((GetUnitLifePercent(AM7)<65.)and(IssueTargetOrderById(AM7,852248,AM7)))or((X77!=null)and(((GetHeroLevel(AM7)>3)and(GetUnitManaPercent(AM7)>70.))or(A47(X77,AM7)))and(IssueTargetOrderById(AM7,852248,X77)))
endif
if((not J4)and(X77!=null)and(not IsUnitIllusion(X77))and(GetHeroLevel(AM7)>5))then
set UP=Kz(700.,L_7(X77))
if((UP>2)or(GetUnitLifePercent(X77)<50.)or((UP>1)and(AO7(700.,X77,Condition(function IL8))>0)))then
set GZ[O5]=true
set J4=J8(O5,C_7(AM7,852224,'S008',X77))
endif
if((not J4)and(A47(X77,AM7))and(GetHeroLevel(AM7)>10)and(GetUnitLifePercent(AM7)>60.)and(AO7(700.,X77,Condition(function IL8))>0))then
if((not IsUnitInRange(AM7,X77,250.))and(AR7(AM7,BU[keledebishou]))and(G0[128+O5])and(Bz>hq[16+O5]))then
set J4=JXG(AM7,X77)
endif
if(not J4)then
set GZ[O5]=true
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(h8[O5])-GetUnitY(AM7),GetUnitX(h8[O5])-GetUnitX(AM7)))
call SetPlayerAbilityAvailable(pl,'A06P',true)
set J4=J8(O5,IssuePointOrderById(AM7,852089,GetUnitX(X77)+200.*Cos(UP*bj_DEGTORAD),GetUnitY(X77)+200.*Sin(UP*bj_DEGTORAD)))
endif
endif
endif
elseif(id=='E01B')then
call SetPlayerAbilityAvailable(pl,'A0HW',(GetHeroLevel(AM7)>3)or((X77!=null)and(A47(X77,AM7))))
set J4=(X77!=null)and(GetHeroLevel(AM7)>4)and(GetUnitManaPercent(AM7)>60.)and(IssueTargetOrderById(AM7,852662,X77))
if((not J4)and(GetHeroLevel(AM7)>5)and(Bz>hq[16+O5]))then
set X77=Ie(bj_mapInitialPlayableArea,Condition(function k7))
set J4=(X77!=null)and(R2I(GetUnitState(X77,UNIT_STATE_LIFE))<50+(15*GetHeroLevel(AM7)))and(IssueImmediateOrderById(AM7,852490))
endif
if((not J4)and(Bz<=hq[240+O5])and((hq[240+O5]-Bz)<2.5)and(not IC(O5))and(not Id(O5)))then
set X77=AJ7(2500.,b5,Condition(function k7))
set J4=(X77!=null)and(AF7(X77,AM7))and(not IsUnitInRange(X77,AM7,800.))and((AO7(800.,X77,Condition(function k6))-AO7(800.,X77,Condition(function IL8))<=1))and(AO7(1000.,X77,Condition(function A27))==0)and(IssueTargetOrderById(AM7,852185,X77))
endif
elseif((id=='H00I')or(id=='H00J'))then
if(id=='H00J')then
set J4=((not IsUnitInRange(AM7,Y7[O5],3000.))and(IssueTargetOrderById(AM7,852553,Y7[O5])))or(((eY[O5]==2)or(G0[16+O5]))and(D48(AM7,851986,h9[O5])))
if((not J4)and(kA(AM7,Y7[O5],800.)))then
call D48(AM7,851986,h9[O5])
endif
set UP=1
else
set UP=0
endif
if(not J4)and(h4[O5]!=null)and(not S19(X77))then
set J4=JBG(AM7,X77)
endif
if(not J4)then
if(h4[O5]!=null)and(S19(X77))and(IsUnitInRange(AM7,X77,300))then
set J4=IssuePointOrderByIdLoc(AM7,852553,L_7(X77))
endif
if not J4 then
set H58=B97(300,AM7,Condition(function BU7))
set J4=(H58!=null)and(GetUnitManaPercent(AM7)>=65.)and(GetHeroLevel(AM7)>=12)and(GetRandomReal(0,'d')<=75 and IssuePointOrderByIdLoc(AM7,852553,L_7(X77)))
endif
endif
if((not J4)and(GetHeroLevel(AM7)>8)and(X77!=null)and(GetUnitAbilityLevel(X77,'B078')==0))then
if((Kz(700.,L_7(X77))>1)or(AO7(500.,X77,Condition(function IL8))>UP))then
set J4=JBG(AM7,X77)
endif
endif
if((not J4)and(GetHeroLevel(AM7)>2)and(AN7(800.,b5,Condition(function I28))>0))then
set X77=AH7(800.,b5,Condition(function k6))
set J4=(X77!=null)and(JBG(AM7,X77))
endif
if(not J4)and(id=='H00I')and(GetUnitManaPercent(AM7)>70)and(AN7(300.,L_7(AM7),Condition(function BU7))>2)then
set J4=IssuePointOrderByIdLoc(AM7,852553,L_7(X77))
endif
elseif(id=='N01W')then
set J4=((GetUnitLifePercent(AM7)<80.)and(IssueTargetOrderById(AM7,852229,AM7)))or((X77!=null)and(GetHeroLevel(AM7)>5)and(GetUnitLifePercent(X77)<70.)and(C_7(AM7,852095,'A0NQ',X77)))
if((not J4)and(GetHeroLevel(AM7)>3))then
set X77=AH7(800.,b5,Condition(function I28))
if(X77==null)then
set X77=AH7(600.,b5,Condition(function I68))
endif
if((X77!=null)and(not IsUnitIllusion(X77)))then
set UP=R2I(GetUnitLifePercent(X77))
if((UP<50)and(GetHeroLevel(AM7)>10)and(Bz>hq[O5]))then
set J4=(AO7(800.,X77,Condition(function k6))>0)and((IssueTargetOrderById(AM7,852536,X77))or(IssueTargetOrderById(AM7,852229,X77)))
elseif(UP<70)then
set J4=(X77!=null)and(IssueTargetOrderById(AM7,852229,X77))
endif
elseif((GetHeroLevel(AM7)>9)and(GetUnitManaPercent(AM7)>75.))then
set X77=AH7(600.,b5,Condition(function Kd))
set J4=(X77!=null)and(AO7(300.,X77,Condition(function k8))>1)and(IssueTargetOrderById(AM7,852229,X77))
endif
endif
elseif(id=='N00R')then
call SetPlayerAbilityAvailable(pl,'A01I',(GetHeroLevel(AM7)>7)and(GetUnitManaPercent(AM7)>55.))
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>4))then
set X77=AH7(700.,b5,Condition(function k6))
endif
if(X77!=null)then
set J4=(((GetUnitLifePercent(X77)<50.)or(IsUnitInRange(AM7,X77,250.)))and(C_7(AM7,852488,'A0RA',X77)))or((AO7(300.,AM7,Condition(function VK8))>1)and(DE8(AM7,852526,'A288')))
if((not J4)and((GetUnitCurrentOrder(X77)==851973)or(IsUnitInRange(AM7,X77,300.))or(GetUnitLifePercent(X77)<50.)))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(h8[16+O5])-GetUnitY(X77),GetUnitX(h8[16+O5])-GetUnitX(X77)))
call SetPlayerAbilityAvailable(pl,'A01I',true)
set GZ[O5]=true
set J4=J8(O5,IssuePointOrderById(AM7,852238,GetUnitX(X77)+150.*Cos(UP*bj_DEGTORAD),GetUnitY(X77)+150.*Sin(UP*bj_DEGTORAD)))
endif
endif
if(not J4)then
set X77=AJ7(700.,b5,Condition(function I28))
set J4=(X77!=null)and(AO7(400.,X77,Condition(function k6))>0)and(C_7(AM7,852488,'A0RA',X77))
endif
if((not J4)and(GetHeroLevel(AM7)>9)and((eY[O5]==3)or(eY[O5]==4)or(GetUnitManaPercent(AM7)>60.)))then
set X77=AJ7(700.,b5,Condition(function k8))
set J4=(X77!=null)and(AO7(300.,X77,Condition(function k8))>2)and(AO7(400.,AM7,Condition(function VK8))>2)and(DE8(AM7,852526,'A288'))
endif
if((not J4)and(is(AM7))and(GetHeroLevel(AM7)>9))then
set UP=R2I(Z47(AM7,DH8(AM7)))
if((UP>2000)and(UP<3500)and(eY[O5]==1)and(GetUnitAbilityLevel(AM7,'A0R0')>1))then
if(h8[16+O5]==h7[14])then
set J4=JGG(0)
elseif(h8[16+O5]==h7[35])then
set J4=JGG(1)
elseif(h8[16+O5]==h7[55])then
set J4=JGG(2)
endif
elseif(((eY[O5]==3)or(eY[O5]==4))and(UP>5000)and(AN7(1200.,b5,Condition(function k6))==0))then
set J4=JGG(3)
endif
endif
elseif((id=='H00R')or(id=='H07I'))then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>4))then
set X77=AJ7(700.,b5,Condition(function k6))
endif
if((h4[O5]!=null)or A47(AM7,X77))and(IsUnitInRange(AM7,X77,300.))then
set J4=(Bz>V74[O5])and(DE8(AM7,852180,'A15J'))
endif
if(not J4)and(Bz>V74[48+O5])and((GZ[208+O5])or(GetUnitState(AM7,UNIT_STATE_MANA)>300.)or(h4[O5]!=null))then
set H04=AM7
set H58=(B97(225+175*GetUnitAbilityLevel(AM7,'A15V'),AM7,Condition(function k6)))
set R27=AO7(25+200+200*GetUnitAbilityLevel(AM7,'A15V'),AM7,Condition(function k6))
set bj_forLoopAIndex=AN7(25+200+200*GetUnitAbilityLevel(AM7,'A15V'),b5,Condition(function U38))
if((R27>=1+W97(AO7(800,AM7,Condition(function HK8))>=3,2,0)and(bj_forLoopAIndex>=R2I((10-.1*GetUnitLifePercent(AM7)))or AO7(800,AM7,Condition(function HK8))>=3))and h4[O5]!=null)then
set J4=(AO7(800,AM7,Condition(function HK8))>=2 or(GetWidgetLife(H58)<=400. or GetUnitLifePercent(H58)<=30.))and L77(AM7,852662,'A15V',b5)
endif
endif
if(not J4)and(Bz>V74[32+O5])then
set H04=AM7
set UP=AN7(1000.,b5,Condition(function ny))
if((not J4)and(UP>=4)and(h4[O5]!=null)and(GetUnitLifePercent(AM7)>50.))then
set X77=h4[O5]
set J4=(((GetHeroLevel(AM7)>4)and(GetUnitLifePercent(X77)<70.))or(A47(X77,AM7)))and(IssueTargetOrderById(AM7,852669,X77))
endif
if((not J4)and(UP>=4)and(GetUnitManaPercent(AM7)>40.))then
set X77=AH7(900.,b5,Condition(function I28))
if(X77==null)then
set X77=AH7(700.,b5,Condition(function I68))
endif
set J4=(X77!=null)and(((GetHeroLevel(AM7)>4)and(GetUnitLifePercent(X77)<70.))or(A87(X77)))and(IssueTargetOrderById(AM7,852669,X77))
endif
if(not J4)then
set J4=(UP>=3)and(GetUnitLifePercent(AM7)<75.)and(IssueTargetOrderById(AM7,852669,AM7))
endif
endif
if(not J4)and((h4[O5]!=null)or(GetUnitState(AM7,UNIT_STATE_MANA)>400)or A87(X77))and(GetUnitState(AM7,UNIT_STATE_MANA)>200)then
set J4=(Bz>V74[16+O5])and(C_7(AM7,852089,'A15S',h4[O5]))
endif
elseif(id=='H06S')then
if(not J4)and(GetUnitLevel(AM7)>5)and(Bz>V74[O5])and(h4[O5]!=null)then
if(not J4)and(OM8(AM7,h4[O5],650.,.5,1300.)!=null)then
if((A47(AM7,h4[O5])or GetUnitLifePercent(h4[O5])<50.)and(Z87(GetUnitX(AM7),GetUnitY(AM7),GetLocationX(H57),GetLocationY(H57))>600.))then
set J4=L77(AM7,852662,'A11K',H57)
call XK7("Attempt Ship0")
endif
endif
if(not J4)then
set X77=JL8(AM7)
if(X77!=null)and(OM8(AM7,X77,650.,.5,1300.)!=null)and(Z87(GetUnitX(AM7),GetUnitY(AM7),GetLocationX(H57),GetLocationY(H57))>600.)then
set J4=L77(AM7,852662,'A11K',H57)
call XK7("Attempt Ship0")
endif
endif
if(not J4)then
set X77=h4[O5]
if(X77==null)then
set X77=JT8(1500.,AM7)
endif
if(X77!=null)and(GZ[208+O5]or(GetUnitLifePercent(AM7)<50.)or((GetUnitLifePercent(X77)<50)and(OM8(AM7,X77,650.,.5,1300.)!=null)and(Z87(GetUnitX(AM7),GetUnitY(AM7),GetLocationX(H57),GetLocationY(H57))>600.)))then
set J4=L77(AM7,852662,'A11K',L_7(X77))
if J4 then
call VTF(O5,X77,false,false)
endif
call XK7("Attempt Ship3")
endif
endif
endif
set X77=h4[O5]
if X77==null then
set X77=JT8(1300.,AM7)
endif
if(not J4)and(not IsUnitIllusion(X77))and(Bz>V74[32+O5])and((Bz>V74[16+O5])or(GetUnitAbilityLevel(AM7,'A11N')<=1)or(GetUnitState(AM7,UNIT_STATE_MANA)<=120.))and((h4[O5]!=null and GetUnitLifePercent(h4[O5])<50.)or((X77!=null)and(A87(X77))))then
set J4=IssueTargetOrderById(AM7,852581,X77)
if J4 then
call VTF(O5,X77,false,false)
endif
endif
if(not J4)and(Bz>V74[16+O5])and(V74[32+O5]>Bz+2. or(GetUnitAbilityLevel(AM7,'A136')>1 and h4[O5]==null)or(h4[O5]!=null and GetUnitLifePercent(h4[O5])>80.)or(GetUnitAbilityLevel(AM7,'A11N')<=1))and(X77!=null)and((h4[O5]!=null)or(A47(X77,AM7))or((GetUnitManaPercent(AM7)>50.)and(GetUnitLifePercent(X77)<70. or GetUnitState(AM7,UNIT_STATE_MANA)>400.)))then
if OO8(AM7,X77,2.,1500.)!=null then
set J4=L77(AM7,852089,'A136',H57)
set h4[16+O5]=X77
endif
endif
elseif(id=='H00N')then
call SetPlayerAbilityAvailable(pl,'A0QE',(GetHeroLevel(AM7)>6)and(GetUnitManaPercent(AM7)>70.)and(AN7(700.,b5,Condition(function k6))==0))
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>4))then
set X77=AJ7(700.,b5,Condition(function k6))
endif
if((X77!=null)and((GetUnitLifePercent(X77)<60.)or((GetHeroLevel(AM7)>4)and((GetUnitManaPercent(AM7)>60.)or(AO7(600.,X77,Condition(function I68))>0)))))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(AM7)-GetUnitY(X77),GetUnitX(AM7)-GetUnitX(X77)))
call SetPlayerAbilityAvailable(pl,'A0QE',true)
set J4=IssuePointOrderById(AM7,852089,GetUnitX(X77)+(50.+100.*GetUnitAbilityLevel(AM7,'A0QE'))*Cos(UP*bj_DEGTORAD),GetUnitY(X77)+(50.+100.*GetUnitAbilityLevel(AM7,'A0QE'))*Sin(UP*bj_DEGTORAD))
endif
if((not J4)and(GetHeroLevel(AM7)>6)and(GetUnitManaPercent(AM7)>50.)and(GetRandomInt(1,4)==1))then
set X77=AH7(700.,b5,Condition(function Kd))
set J4=(X77!=null)and(GetUnitLifePercent(X77)>65.)and(IsUnitType(X77,UNIT_TYPE_MELEE_ATTACKER))and(AO7(250.,X77,Condition(function k8))>2)and(IssueTargetOrderById(AM7,852095,X77))
endif
if(not J4)then
set X77=AJ7(700.,b5,Condition(function I28))
set J4=(X77!=null)and(AO7(250.,X77,Condition(function k6))>0)and(C_7(AM7,852101,'A0R7',X77))
endif
if(not J4)then
set X77=AJ7(700.,b5,Condition(function k7))
if(X77!=null)then
set X77=AJ7(700.,L_7(X77),Condition(function I68))
set J4=((X77!=null)and(IsUnitAlly(X77,GetOwningPlayer(AM7)))and(C_7(AM7,852101,'A0R7',X77)))or(C_7(AM7,852101,'A0R7',AM7))
endif
endif
if((not J4)and(GetHeroLevel(AM7)>14.)and(Bz>hq[O5])and(hq[416+O5]>Bz))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
set X77=AJ7(1000.,b5,Condition(function k7))
if(X77!=null)then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(h8[16+O5])-GetUnitY(X77),GetUnitX(h8[16+O5])-GetUnitX(X77)))
set J4=IssuePointOrderById(AM7,852190,GetUnitX(X77)+300*Cos(UP*bj_DEGTORAD),GetUnitY(X77)+300*Sin(UP*bj_DEGTORAD))
else
set X77=AJ7(1000.,b5,Condition(function k6))
if(X77!=null)then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(h9[16+O5])-GetUnitY(X77),GetUnitX(h9[16+O5])-GetUnitX(X77)))
set J4=IssuePointOrderById(AM7,852190,GetUnitX(X77)+300*Cos(UP*bj_DEGTORAD),GetUnitY(X77)+300*Sin(UP*bj_DEGTORAD))
endif
endif
endif
endif
elseif(id=='H008')then
call SetPlayerAbilityAvailable(pl,'A0GP',(GetHeroLevel(AM7)>10)and((GetUnitManaPercent(AM7)>70.)or(X77!=null)))
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>4))then
set X77=AJ7(700.,b5,Condition(function k6))
endif
set J4=(X77!=null)and((IsUnitInRange(AM7,X77,600.))and((A47(X77,AM7))or(GetUnitState(AM7,UNIT_STATE_MANA)>'d' and GetUnitManaPercent(AM7)>40)or(GetUnitLifePercent(X77)<60))and(DE8(AM7,852526,'A0GP')))
set J4=(X77!=null)and(((GetUnitLifePercent(X77)<40.)or((GetUnitAbilityLevel(X77,'B02U')==0)and(hq[416+O5]>Bz)))and(IssueTargetOrderById(AM7,852600,X77)))
elseif(id=='E005')then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>3))then
set X77=AH7(600.,b5,Condition(function k6))
if((X77==null)and(GetHeroLevel(AM7)>10)and(GetUnitManaPercent(AM7)>30.)and(AR7(AM7,BU[keledebishou])))then
set X77=AH7(1200.,b5,Condition(function k6))
endif
endif
if(X77!=null)then
if((GetHeroLevel(AM7)>5)and(not IsUnitIllusion(X77))and(Bz>hq[O5])and(G0[128+O5]))then
if(IsUnitInRange(X77,AM7,500.))then
set UP=AN7(700.,b5,Condition(function k8))-AN7(700.,b5,Condition(function k6))
set J4=(UP<2)and(GetUnitAbilityLevel(X77,'B014')==0)and(IssueImmediateOrderById(AM7,852600))
if J4 then
call TriggerSleepAction(0)
call C_7(AM7,852231,'A042',X77)
endif
elseif((AR7(AM7,BU[keledebishou]))and(G0[128+O5])and(IsUnitInRange(X77,AM7,1000.))and(GetHeroLevel(AM7)>10)and(GetUnitManaPercent(AM7)>30.))then
set UP=AO7(700.,X77,Condition(function k8))-AO7(700.,X77,Condition(function k6))
set h4[16+O5]=X77
set J4=(UP<2)and(GetUnitAbilityLevel(X77,'B014')==0)and(JXG(AM7,X77))
endif
endif
if((not J4)and(A47(X77,AM7)))then
set J4=(C_7(AM7,852231,'A042',X77))
endif
if((not J4)and(GetHeroLevel(AM7)>20))then
set J4=(GetUnitState(AM7,UNIT_STATE_MANA)>450.)and(C_7(AM7,852231,'A042',X77))
endif
endif
elseif(id=='Npbm')then
if((G0[128+O5])and(AR7(AM7,BU[keledebishou]))and(X77!=null)and(not IsUnitIllusion(X77))and(Bz>hq[O5])and(not IsUnitInRange(AM7,X77,250.))and(IsUnitInRange(AM7,X77,700.)))then
set J4=((AO7(800.,X77,Condition(function JP8))-AO7(800.,X77,Condition(function IL8)))<=1)and(JXG(AM7,X77))
endif
if((not J4)and(X77!=null)and(GetHeroLevel(AM7)>2))then
set J4=((A47(X77,AM7))and(C_7(AM7,852585,'Acdh',X77)))or((IsUnitInRange(AM7,X77,200.))and(DE8(AM7,852096,'A06M')))
endif
call SetPlayerAbilityAvailable(pl,'A06M',(GetHeroLevel(AM7)>12)and(AN7(1500.,b5,Condition(function k6))==0)and(GetUnitManaPercent(AM7)>75.))
if((not J4)and(GetHeroLevel(AM7)>12)and(hq[416+O5]>Bz)and(G0[128+O5]))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
set X77=AJ7(800.,b5,Condition(function k6))
if(X77!=null)then
set J4=((kq(GetUnitTypeId(X77)))and(C_7(AM7,852585,'Acdh',X77)))or((IsUnitInRange(AM7,X77,200.))and(DE8(AM7,852096,'A06M')))
endif
endif
endif
elseif(id=='H000')then
if((G0[128+O5])and(AR7(AM7,BU[keledebishou]))and(X77!=null)and(not IsUnitIllusion(X77))and(Bz>hq[O5])and(not IsUnitInRange(AM7,X77,250.))and(IsUnitInRange(AM7,X77,700.)))then
set J4=((AO7(800.,X77,Condition(function JP8))-AO7(800.,X77,Condition(function IL8)))<=1)and(JXG(AM7,X77))
endif
if((not J4)and(X77!=null)and IsUnitInRange(AM7,X77,500))then
set J4=((GetHeroLevel(AM7)>5)and(GetUnitLifePercent(X77)<70.)and((GetUnitState(X77,UNIT_STATE_LIFE)+1000.)<GetUnitState(AM7,UNIT_STATE_LIFE))and(C_7(AM7,852231,'A2ON',X77)))or((IsUnitInRange(AM7,X77,200.))and(GetHeroLevel(AM7)>3)and(DE8(AM7,852127,'A00S')))
elseif(not J4)and(X77==null or(not IsUnitInRange(AM7,X77,800)))then
set H58=HR8(300,190,AM7,0,Condition(function BU7),Condition(function G18))
set J4=(H58!=null)and(GetUnitLifePercent(AM7)>=70. or GetWidgetLife(AM7)>950.)and(GetHeroLevel(AM7)>=4)and(GetRandomReal(0,'d')<=40 and C_7(AM7,852231,'A2ON',H58))
endif
call SetPlayerAbilityAvailable(pl,'A00S',(GetHeroLevel(AM7)>12)and(AN7(1500.,b5,Condition(function k6))==0)and(GetUnitManaPercent(AM7)>75.))
if(not J4)then
set H58=AJ7(800.,b5,Condition(function HD8))
if(GetUnitLifePercent(AM7)<20.)or(((G0[256+O5])and GetUnitState(AM7,UNIT_STATE_LIFE)>=300. and H58!=null and GetUnitLifePercent(H58)<=70.))then
set J4=IssueImmediateOrderById(AM7,852526)
if(h4[O5]==null or(not IsUnitInRange(AM7,h4[O5],1500)))and GetUnitLifePercent(AM7)>30. then
set h4[O5]=V_7(((X77!=null or H58==null)and(IsUnitInRange(X77,AM7,1000))and(GetUnitState(X77,UNIT_STATE_LIFE)<GetUnitState(H58,UNIT_STATE_LIFE))),X77,H58)
endif
endif
endif
elseif(id=='Nbrn')then
if((X77!=null)and(GetUnitManaPercent(AM7)>60.)and(kP(GetUnitTypeId(X77)))and(GetUnitCurrentOrder(AM7)!=851983))then
set J4=C_7(AM7,852592,'A0QB',X77)
endif
if((X77==null)and(not J4)and(G0[128+O5])and(GetHeroLevel(AM7)>3))then
set X77=AH7(800.,b5,Condition(function k6))
endif
set J4=(X77!=null)and(not IsUnitInRange(AM7,X77,550.))and(GetUnitManaPercent(AM7)>60.)and(GetRandomInt(1,3)==1)and(GetHeroLevel(AM7)>3)and(C_7(AM7,852243,'A026',X77))
if((not J4)and(AR7(AM7,BU[luosazhifeng]))and(GetHeroLevel(AM7)>10)and(GetUnitManaPercent(AM7)>50.)and(G0[128+O5]))then
if((X77==null)and(GetUnitLifePercent(AM7)>70.))then
if((eY[O5]==9)and(h4[144+O5]!=null)and(Z_7(h4[144+O5]))and(IsUnitInRange(AM7,h4[144+O5],1500.))and(not IsUnitVisibleEx(AM7,GetOwningPlayer(h4[144+O5]))))then
set X77=h4[144+O5]
else
set X77=AH7(1500.,b5,Condition(function KK))
endif
endif
if((X77!=null)and(not IsUnitIllusion(X77))and(not kD(X77))and(not AR7(X77,BU[zhenshibaoshi]))and(GetUnitTypeId(X77)!='HC92')and(not IsUnitInRange(AM7,X77,800.))and(IsUnitInRange(AM7,X77,1500.))and(AO7(600.,X77,Condition(function J88))>0)or((GetUnitLifePercent(X77)<75.)and(AO7(1000.,X77,Condition(function A27))==0)))then
set h4[288+O5]=X77
set GZ[272+O5]=true
set J4=UnitUseItem(AM7,AV7(AM7,BU[luosazhifeng]))
set GZ[272+O5]=J4
endif
endif
elseif((id=='Hlgr')or(id=='H00F')or(id=='H00E')or(id=='H00G'))then
call SetPlayerAbilityAvailable(pl,'A03F',(GetHeroLevel(AM7)>6)and(GetUnitManaPercent(AM7)>60.))
if((X77==null)and(G0[128+O5]))then
if(id!='Hlgr')then
set X77=AH7(1000.,b5,Condition(function k6))
call VTF(O5,X77,false,false)
elseif((GetHeroLevel(AM7)>3)and(GetUnitManaPercent(X77)>70.))then
set X77=AH7(700.,b5,Condition(function k6))
endif
endif
set J4=(X77!=null)and((GetUnitLifePercent(X77)<60)or(h4[O5]!=null))and(C_7(AM7,852095,'A0AR',X77))
set J4=(X77!=null)and(((GetHeroLevel(AM7)>3)and(GetUnitManaPercent(AM7)>40.))or(A87(X77)))and(C_7(AM7,852580,'A03F',X77))
if((not J4)and(GetHeroLevel(AM7)>12)and(hq[416+O5]>Bz)and(Bz>hq[O5])and(G0[128+O5]))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
set X77=K3(900.,AM7,Condition(function k6))
set J4=(X77!=null)and(GetUnitLifePercent(X77)<80.)and(DE8(AM7,852180,'A03G'))
endif
endif
elseif(id=='Edem')then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>5))then
set X77=AH7(800.,b5,Condition(function k6))
endif
if((X77!=null)and(GetHeroLevel(AM7)>5))then
set H64=.35+.25*GetUnitAbilityLevel(AM7,'A0E3')
if(not IsUnitIllusion(X77))and(not IsUnitType(X77,UNIT_TYPE_MAGIC_IMMUNE))and(GetWidgetLife(X77)<.75*H64*(GetUnitState(X77,UNIT_STATE_MAX_MANA)-GetUnitState(X77,UNIT_STATE_MANA)))then
set J4=(not GV8(X77))and(C_7(AM7,852095,'A0E3',X77))
endif
if((not J4)and(GetUnitLifePercent(X77)<70.)and(G0[128+O5])and(not IsUnitInRange(X77,AM7,300.))and(GetUnitLifePercent(AM7)>70.)and(AO7(800.,X77,Condition(function A27))==0)and((AO7(800.,X77,Condition(function JP8))-AO7(800.,X77,Condition(function IL8)))<=1))then
set M3G=kL(AM7,X77,200.)
set J4=(M3G!=null)and(GetUnitAbilityLevel(AM7,'A0IH')<1 or BI7(AM7,M3G)<350)and(IssuePointOrderByIdLoc(AM7,852525,M3G))
endif
endif
if((not J4)and(GetHeroLevel(AM7)>11.)and(GetUnitManaPercent(AM7)>70.)and(iy(AM7))and(AN7(1400.,b5,Condition(function Ky))==0)and(eY[O5]==1))then
set M3G=kk(AM7,800.,h8[O5])
set J4=(M3G!=null)and(GetUnitAbilityLevel(AM7,'A0IH')<1 or BI7(AM7,M3G)<350)and(IssuePointOrderByIdLoc(AM7,852525,M3G))
endif
elseif(id=='Usyl')then
call SetPlayerAbilityAvailable(pl,'A064',(GetHeroLevel(AM7)>7)and(GetUnitManaPercent(AM7)>70.))
if((GetHeroLevel(AM7)>5)and(Bz>hq[O5]))then
if(X77==null)then
set X77=AH7(1200.+(500.*GetUnitAbilityLevel(AM7,'A04P')),b5,Condition(function k7))
endif
set J4=(X77!=null)and(not IsUnitIllusion(X77))and(not GV8(X77))and(R2I(GetUnitState(X77,UNIT_STATE_LIFE))<(200+(150*GetUnitAbilityLevel(AM7,'A04P'))))and(C_7(AM7,852095,'A04P',X77))
if((not J4)and(hq[416+O5]>Bz)and(GetHeroLevel(AM7)>10)and(AN7(800.,b5,Condition(function IL8))>0))then
if(X77==null)then
set X77=AH7(1200.,b5,Condition(function k6))
endif
set J4=(X77!=null)and(not IsUnitIllusion(X77))and(C_7(AM7,852095,'A04P',X77))
endif
endif
elseif(id=='Harf')then
call SetPlayerAbilityAvailable(pl,'A08V',AN7(1000.,b5,Condition(function k6))>0)
set X77=AH7(800.,b5,Condition(function I28))
if(X77==null)then
set X77=AH7(700.,b5,Condition(function I68))
endif
if((X77!=null)and(GetUnitLifePercent(X77)<70.))then
set J4=(((GetHeroLevel(AM7)>4)or(A47(X77,AM7)))and(C_7(AM7,852225,'A08N',X77)))or((GetUnitLifePercent(X77)<40.)and(AO7(600.,X77,Condition(function k6))>0)and(C_7(AM7,852186,'A08V',X77)))
endif
if((not J4)and(GetHeroLevel(AM7)>12)and(hq[416+O5]>Bz)and(G0[128+O5]))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
set J4=(X77!=null)and(GetUnitLifePercent(X77)<60.)and(AO7(600.,X77,Condition(function k6))>0)and(IssueImmediateOrderById(AM7,852599))
endif
endif
if(not J4)then
set J4=(GetUnitLifePercent(AM7)<75.)and(C_7(AM7,852225,'A08N',AM7))
endif
if((not J4)and(GetHeroLevel(AM7)>10))then
set X77=AH7(450.,b5,Condition(function A27))
if((X77!=null)and(GetUnitLifePercent(X77)<30.)and(GetUnitLifePercent(X77)>10.))then
set J4=(AN7(600.+GetUnitAbilityLevel(AM7,'A2S8')*99999,b5,Condition(function KC))>4)and(IssueImmediateOrderById(AM7,852599))
endif
endif
elseif((id=='N016')or(id=='N017')or(id=='N02B'))then
if((X77==null)and(G0[128+O5]))then
set X77=AH7(700.,b5,Condition(function k6))
if(GetUnitAbilityLevel(AM7,'B00B')>0 or A47(AM7,X77))then
call VTF(O5,X77,false,false)
endif
endif
if(not J4)and(h4[O5]!=null)then
if(id=='N016')then
set J4=(IsUnitInRange(AM7,h4[O5],500.)and(DE8(AM7,852526,'A1EJ')))
else
set J4=(IsUnitInRange(AM7,h4[O5],200.)and(DE8(AM7,852526,'A1EJ')))
endif
endif
if(not J4)and(h4[O5]!=null)then
if(id=='N016')then
set J4=C_7(AM7,852218,'A21M',X77)
else
set J4=(IsUnitInRange(AM7,h4[O5],400.)and(DE8(AM7,852177,'A21N')))
endif
endif
if(not J4)then
if(X77!=null)and(IsUnitInRange(AM7,X77,200.))then
if(id=='N016')then
set J4=(DE8(AM7,852138,'A0BE'))
if J4 then
set id='N017'
endif
endif
elseif(X77!=null)and((GetUnitLifePercent(X77)<15.)or((not G0[256+O5])and(X_7(AM7)<2000.)))then
if(id!='N016')then
set J4=(DE8(AM7,852139,'A0BE'))
if J4 then
set id='N016'
endif
endif
elseif(h4[O5]!=null)and(not IsUnitInRange(AM7,X77,200.))and(Bz>V74[32+O5])then
if(id!='N016')then
set J4=(DE8(AM7,852139,'A0BE'))
if J4 then
set id='N016'
endif
endif
elseif(GetHeroLevel(AM7)>=6 or h4[O5]!=null)and(LC7(AM7,BU[heihuangzhang]))then
set J4=(id=='N016')and(DE8(AM7,852138,'A0BE'))
else
set J4=(id!='N016')and(DE8(AM7,852139,'A0BE'))
endif
endif
elseif(id=='Naka')then
set J4=GetUnitAbilityLevel(AM7,'B068')>0
if((X77==null)or(GetUnitLifePercent(X77)>50.))then
set X77=K3(1000.,AM7,Condition(function k6))
endif
if((not J4)and(X77!=null))then
set J4=(((GetUnitState(X77,UNIT_STATE_LIFE)<hq[272+O5])or((GetHeroLevel(AM7)>3)and(GetUnitManaPercent(AM7)>55.)))and(C_7(AM7,852095,'A004',X77)))or((GetUnitAbilityLevel(X77,'B00L')==0)and((GetUnitLifePercent(X77)<75.)or((GetHeroLevel(AM7)>11)and(GetUnitState(AM7,UNIT_STATE_MANA)>250.)))and(not IsUnitIllusion(X77))and(C_7(AM7,852149,'A0B4',X77)))
endif
if((not J4)and(GetHeroLevel(AM7)>8)and(G0[128+O5])and(Bz>hq[O5]))then
if((X77==null)and(GetUnitLifePercent(AM7)>70.))then
if((eY[O5]==9)and(h4[144+O5]!=null)and(Z_7(h4[144+O5]))and(IsUnitInRange(AM7,h4[144+O5],1500.))and(not IsUnitVisibleEx(AM7,GetOwningPlayer(h4[144+O5]))))then
set X77=h4[144+O5]
else
set X77=AJ7(1500.,b5,Condition(function KK))
endif
endif
if((X77!=null)and(not IsUnitIllusion(X77))and(not kD(X77))and(GetUnitTypeId(X77)!='HC92')and((not IsUnitInRange(AM7,X77,600.))or(not IsUnitVisibleEx(AM7,GetOwningPlayer(X77))))and(IsUnitInRange(AM7,X77,1500.))and((GetUnitLifePercent(X77)<70.)or(AO7(650.,X77,Condition(function J88))>0)))then
set h4[288+O5]=X77
set J4=(AO7(800.,X77,Condition(function A27))==0)and(IssueImmediateOrderById(AM7,852129))
endif
endif
elseif(id=='Orkn')then
call SetPlayerAbilityAvailable(pl,'A010',(GetHeroLevel(AM7)>7)and(GetUnitManaPercent(AM7)>60.))
if((X77==null)and(G0[128+O5]))then
set X77=AH7(900.,b5,Condition(function k6))
endif
if((X77!=null)and((A47(X77,AM7))or((GetUnitLifePercent(X77)<70.)and(AO7(500.,X77,Condition(function I68))>0))))then
set J4=(IsUnitInRange(AM7,X77,400)or S19(X77))and(C_7(AM7,852480,'A00P',X77))
endif
if((not J4)and(X77!=null)and((GetHeroLevel(AM7)>3)or(A47(X77,AM7))))then
set J4=((GetUnitLifePercent(X77)<70.)and(Bz>hq[O5])and(not IsUnitIllusion(X77))and(C_7(AM7,852502,'A0RX',X77)))or((GetUnitManaPercent(AM7)>60.)and(C_7(AM7,852587,'A010',X77)))
endif
if((not J4)and(GetHeroLevel(AM7)>5)and(Bz>hq[O5]))then
if((X77==null)or(GetUnitCurrentOrder(X77)!=851973)or(not IsUnitInRange(AM7,X77,500.)))then
set X77=AH7(900.,b5,Condition(function KM))
endif
if(X77!=null)then
set GZ[O5]=true
set J4=J8(O5,D78(AM7,852504,'A00H','A0A1',X77))
endif
endif
if((not J4)and(GetHeroLevel(AM7)>17)and(Bz>hq[O5]))then
set X77=AJ7(900.,b5,Condition(function A27))
if((X77!=null)and(GetUnitLifePercent(X77)<55.)and(GetUnitLifePercent(X77)>15.)and(AO7(800.,X77,Condition(function KC))>2))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(AM7)-GetUnitY(X77),GetUnitX(AM7)-GetUnitX(X77)))
set GZ[O5]=true
call SetPlayerAbilityAvailable(pl,'A00H',true)
call SetPlayerAbilityAvailable(pl,'A0A1',true)
set J4=IssuePointOrderById(AM7,852504,GetUnitX(X77)+300.*Cos(UP*bj_DEGTORAD),GetUnitY(X77)+300.*Sin(UP*bj_DEGTORAD))
set GZ[O5]=false
endif
endif
elseif(id=='Hvwd')then
call SetPlayerAbilityAvailable(pl,'A17O',GetUnitManaPercent(AM7)>60.)
if((X77!=null)and((GetHeroLevel(AM7)>4)or(A47(X77,AM7))))then
set J4=C_7(AM7,852095,'A02A',X77)
if((not J4)and(GetUnitLifePercent(X77)<60.)and(not IsUnitIllusion(X77))and(kA(AM7,X77,600.)))then
set J4=D78(AM7,852587,'A0IN','A1AW',X77)
endif
endif
if((not J4)and(Bz>hq[O5])and(Bz>hq[16+O5])and(G0[128+O5])and(GetHeroLevel(AM7)>10)and(GetUnitLifePercent(AM7)>80.)and(AN7(400.,b5,Condition(function IL8))>0))then
if(X77==null)then
set X77=K3(375+(GetUnitAbilityLevel(AM7,'A0IN')+GetUnitAbilityLevel(AM7,'A1AW'))*275.,AM7,Condition(function k6))
endif
if((X77!=null)and(not IsUnitIllusion(X77))and(GetUnitLifePercent(X77)<70.)and(not IsUnitInRange(AM7,X77,500.)))then
if(AO7(500.,X77,Condition(function k6))<=2+AN7(700.,b5,Condition(function IL8))and(AN7(500.,b5,Condition(function k6))==0))then
set J4=D78(AM7,852587,'A0IN','A1AW',X77)
endif
endif
endif
if((not J4)and(GetHeroLevel(AM7)>12)and(GetUnitLifePercent(AM7)>60.))then
set J4=(AN7(700.,b5,Condition(function k6))>0)and(AN7(700.,b5,Condition(function IL8))>0)and(C_7(AM7,852669,'A17O',X77))
endif
elseif(id=='Hmbr')then
set N4G=.03+.02*GetUnitAbilityLevel(AM7,'A0N5')
set M2G=(GetHeroLevel(AM7))
set M5G=GetUnitAbilityLevel(AM7,'A020')
set H58=B97(750,AM7,Condition(function BU7))
set X77=B97(850,AM7,Condition(function k6))
set F_8=N4G*GetWidgetLife(H58)
if H58==null or(GetWidgetLife(H58)>70+M5G*15+WI7(M5G==4,15,0)+F_8+GetRandomReal(0,25))then
set H58=V_7(X77!=null,X77,H58)
endif
if M2G<=8 then
set M_G=Y77(AM7,70.,200,S97)and((H58!=null and IsUnitType(H58,UNIT_TYPE_HERO)==false and GetWidgetLife(H58)<=125.)or(X77!=null and(GetUnitLifePercent(X77)<=30 or GetWidgetLife(X77)<300.)))
else
set F_8=N4G*GetWidgetLife(X77)
set M_G=(Y77(AM7,50.,500,S97)and(AO7(1000,AM7,Condition(function BU7))>2 or AO7(800,AM7,Condition(function k6))>=1))or((X77!=null)and((GetUnitState(AM7,UNIT_STATE_MANA)>60+5*M5G and GetWidgetLife(X77)<=F_8+70+M5G*15+WI7(M5G==4,15,0)+GetRandomReal(200,400))or(GetUnitState(AM7,UNIT_STATE_MANA)>=60+5*M5G+55+20*GetUnitAbilityLevel(AM7,'A0JC')and GetWidgetLife(X77)<=600)))
endif
call SetPlayerAbilityAvailable(pl,'A020',(GetHeroLevel(AM7)>=3)and M_G)
if(GetUnitLifePercent(X77)<30. or GetWidgetLife(X77)<300.)and H58!=X77 then
set H58=X77
endif
if H58==null then
set H58=B97(650,AM7,Condition(function BU7))
endif
set J4=M_G and(H58!=null)and IssueTargetOrderById(AM7,852119,H58)
set X77=B97(850,AM7,Condition(function k6))
set UP=GetUnitAbilityLevel(AM7,'A29G')
if(UP==0)then
set UP=GetUnitAbilityLevel(AM7,'A29H')+1
endif
set F37=90+('x'*UP)
if((GetHeroLevel(AM7)>5)and(Bz>hq[O5])and((Ie(bj_mapInitialPlayableArea,Condition(function JZG))!=null)or(PS4)))then
set GZ[O5]=true
call SetPlayerAbilityAvailable(pl,'A29H',true)
set J4=(not J4)and J8(O5,DE8(AM7,852164,'A29G'))
endif
if((not J4)and(GetHeroLevel(AM7)>4))then
if((X77==null)and(G0[128+O5]))then
set X77=AH7(1000.,b5,Condition(function k6))
endif
set J4=(X77!=null)and((GetUnitManaPercent(AM7)>60.)or(A47(X77,AM7)))and(C_7(AM7,852095,'A0JC',X77))
endif
elseif(id=='Emoo')then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>3))then
set X77=AH7(800.,b5,Condition(function k6))
endif
set J4=((GetUnitLifePercent(AM7)<60.)and(DE8(AM7,852556,'A01B')))or((X77!=null)and(GetUnitLifePercent(X77)<50.)and(C_7(AM7,852075,'A0DX',X77)))or((X77!=null)and(GetUnitAbilityLevel(AM7,'A0DY')>0)and(not IsUnitInRange(AM7,X77,550.))and(GetUnitManaPercent(AM7)>60.)and(GetRandomInt(1,3)==1)and(GetHeroLevel(AM7)>3)and(C_7(AM7,852254,'A0DY',X77)))or((X77!=null)and(GetUnitAbilityLevel(AM7,'A1WB')>0)and(not IsUnitInRange(AM7,X77,700.))and(GetUnitManaPercent(AM7)>55.)and(GetRandomInt(1,2)==1)and(C_7(AM7,852254,'A1WB',X77)))
elseif(id=='Uktl')then
if((not J4)and(GetHeroLevel(AM7)>3))then
set J4=(X77!=null)and((GetUnitManaPercent(AM7)>60.)or(A47(X77,AM7)))and(IssueTargetOrderById(AM7,852662,X77))
if((not J4)and(X77!=null)and(not IsUnitIllusion(X77))and(GetHeroLevel(AM7)>7)and(((GetUnitLifePercent(X77)<75.)and(Bz>hq[O5]))or((GetUnitLifePercent(X77)<50.)and(Bz>hq[16+O5])))and(not kr(AM7))and(G0[128+O5]))then
set J4=(Kz(400.,L_7(X77))>0)and(IssuePointOrderById(AM7,852600,GetUnitX(X77),GetUnitY(X77)))
endif
if((not J4)and(GetHeroLevel(AM7)>10.)and(Bz>hq[O5])and(hq[416+O5]>Bz))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
set X77=AJ7(800.,b5,Condition(function k6))
if(X77!=null)then
set UP=AO7(400.,X77,Condition(function k6))
set J4=((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and(IssuePointOrderById(AM7,852600,GetUnitX(X77),GetUnitY(X77)))
endif
endif
endif
if((not J4)and(GetUnitAbilityLevel(AM7,'A180')>0)and(GetUnitManaPercent(AM7)>50.)and GZ[O5])then
if(GetUnitAbilityLevel(AM7,'A180')>1)then
set X77=AH7(600.,b5,Condition(function KD))
set J4=(X77!=null)and(IssueTargetOrderById(AM7,852095,X77))
elseif(GetUnitManaPercent(AM7)>70.)then
set X77=AH7(600.,b5,Condition(function KD))
set J4=(X77!=null)and(GetUnitState(X77,UNIT_STATE_LIFE)<150.)and(IssueTargetOrderById(AM7,852095,X77))
endif
endif
if((not J4)and(GetUnitAbilityLevel(AM7,'A0B1')>0)and(GetUnitManaPercent(AM7)>50.))then
set X77=AJ7(500.,b5,Condition(function k6))
set J4=(X77!=null)and(C_7(AM7,852600,'A0B1',X77))
endif
endif
elseif((id=='Hblm')or(id=='H06X')or(id=='H06Y')or(id=='H06W'))then
if(not J4)and((id=='Hblm')and(GetHeroLevel(AM7)>=6)and(Bz>V74[O5])and(h4[O5]!=null))then
set J4=DE8(AM7,852180,'A11T')
if J4 then
set id='H06X'
call Y07(.3)
set J4=false
endif
endif
if((not J4)and(GetHeroLevel(AM7)>5))then
set bj_lastLoadedUnit=X77
set X77=Ie(bj_mapInitialPlayableArea,Condition(function I28))
if(X77!=null)and(GetUnitLifePercent(X77)<30)and(ZL7(X77))and(Z47(X77,DH8(X77))>Z47(AM7,DH8(AM7))+1500.)and(AO7(750.,X77,Condition(function k6))==0)and(not AR7(X77,BU[ZA]))then
set J4=(id!='Hblm' or DE8(AM7,852180,'A11T'))and(IssueTargetOrderById(AM7,852248,X77))
if J4 then
call Y07(1.)
call VQF(AM7,true)
endif
endif
set X77=bj_lastLoadedUnit
endif
if((not J4)and(h4[O5]!=null)and(Bz>V74[32+O5]))then
set J4=(X77!=null)and(GetUnitAbilityLevel(X77,'B03V')==0)and(not Y57(X77,AM7,30)or A87(X77))and(C_7(AM7,852662,'A10X',X77))
endif
if((not J4)and(GetUnitManaPercent(AM7)>40.))then
set X77=AH7(700.,b5,Condition(function I68))
set J4=(X77!=null)and(GetUnitManaPercent(X77)<75.)and(C_7(AM7,852185,'A112',X77))
endif
if((not J4)and((GetUnitManaPercent(AM7)<50.)))then
set J4=C_7(AM7,852185,'A112',AM7)
endif
if((not J4)and(G0[128+O5])and(GetUnitAbilityLevel(AM7,'A085')>1)and((GetUnitManaPercent(AM7)>30.)or((AN7(1300.,b5,Condition(function k6))<=1)and((GetUnitState(AM7,UNIT_STATE_MANA)>150+WPF(AM7,'A112',I87))and(Bz>V74[48+O5]))))and(Bz>V74[16+O5])and((id!='Hblm')or(((AN7(300.,b5,Condition(function k8))<=2)and(AN7(800.,b5,Condition(function BW7))>2))and((AN7(500.,b5,Condition(function k6))==0)or(AN7(400.,b5,Condition(function J88))>0)))))then
set X77=h4[O5]
if X77==null then
set X77=AH7(1300.,L_7(AM7),Condition(function k6))
endif
if X77==null then
set X77=AH7(1300.,L_7(AM7),Condition(function BU7))
endif
if X77!=null then
set F37=YH7(AM7,X77)
if(IsUnitType(X77,UNIT_TYPE_HERO)and((not Z57(AM7))or S19(X77))and GetUnitLifePercent(X77)>30)or(h4[O5]==null)then
set F37=YH7(AM7,X77)
if(not OK8(AM7,X77,GetUnitX(AM7)+1300.*Cos(F37*bj_DEGTORAD),GetUnitY(AM7)+1300.*Sin(F37*bj_DEGTORAD),400,Condition(function k8)))and(bj_forLoopAIndex>2)then
set J4=IssuePointOrderById(AM7,852218,GetUnitX(AM7)+150.*Cos(F37*bj_DEGTORAD),GetUnitY(AM7)+150.*Sin(F37*bj_DEGTORAD))
endif
endif
endif
endif
if((not J4)and(h4[O5]!=null)and(id!='Hblm'))then
set F37=GetUnitFacing(X77)
set J4=(X77!=null)and(IssuePointOrderById(AM7,852089,GetUnitX(X77)+200.*Cos(F37*bj_DEGTORAD),GetUnitY(X77)+200.*Sin(F37*bj_DEGTORAD)))
endif
elseif(id=='Ntin')then
call SetPlayerAbilityAvailable(pl,'A05E',(GetHeroLevel(AM7)>4)and(GetUnitManaPercent(AM7)>60.)and((X77!=null)or(AN7(1500.,b5,Condition(function k6))>0)))
if(GetHeroLevel(AM7)>4)then
set J4=(X77!=null)and((GetUnitManaPercent(AM7)>60.)or(A47(X77,AM7)))and(C_7(AM7,852585,'A049',X77))
if(not J4)then
if(X77==null)then
set X77=AH7(2400.,b5,Condition(function k7))
endif
set J4=(X77!=null)and(DE8(AM7,852526,'A05E'))
endif
endif
if((not J4)and(GetHeroLevel(AM7)>10)and(GetUnitManaPercent(AM7)>50.))then
set UP=0
if((Bz+10.)<hq[O5])then
set UP=UP+1
endif
if((Bz+10.)<hq[16+O5])then
set UP=UP+1
endif
if((Bz+10.)<hq[32+O5])then
set UP=UP+1
endif
if(((Bz+10.)<hq[80+O5])or((Bz+10.)<hq[96+O5]))then
set UP=UP+1
endif
if(((UP>1)and(AN7(800.,b5,Condition(function k6))==0))or((UP>2)and(GetUnitLifePercent(AM7)>50.)))then
set J4=IssueImmediateOrderById(AM7,852600)
endif
endif
elseif(id=='Emns')then
call SetPlayerAbilityAvailable(pl,'AEfn',(GetHeroLevel(AM7)>4)and(GetUnitManaPercent(AM7)>30.))
if(not J4)and(Bz>V74[O5])and(GetUnitLevel(AM7)>=6)then
if GetUnitAbilityLevel(AM7,'A1W8')>0 then
set F37='i'+GetUnitAbilityLevel(AM7,'A1W8')*30
else
set F37=116.25+GetUnitAbilityLevel(AM7,'A1W9')*41.25
endif
set F17=true
set X77=Ie(bj_mapInitialPlayableArea,Condition(function JZG))
if X77==null then
set F17=false
if h4[O5]!=null then
set F77=h4[O5]
endif
set X77=JS8(99999.,AM7)
set F77=null
if X77==null then
set X77=Ie(bj_mapInitialPlayableArea,Condition(function BU7))
endif
endif
if((X77!=null))then
if(F17)or((not IsUnitType(X77,UNIT_TYPE_HERO))and((Bz-20>V74[O5])and(GetUnitState(AM7,UNIT_STATE_MANA)>300.)))or(IsUnitType(X77,UNIT_TYPE_HERO)and((GetUnitLifePercent(X77)<50. or(GZ[208+O5]and h4[O5]!=null)or((Bz-15>V74[O5])and(GetUnitState(AM7,UNIT_STATE_MANA)>200.)))))then
set J4=D78(AM7,852119,'A1W8','A1W9',X77)
endif
endif
endif
if(is(AM7))then
if((Z47(AM7,DH8(AM7))<1500.)and(eY[O5]==1))then
if(h8[16+O5]==h7[14])then
set J4=JGG(0)
elseif(h8[16+O5]==h7[35])then
set J4=JGG(1)
elseif(h8[16+O5]==h7[55])then
set J4=JGG(2)
endif
elseif(((eY[O5]==3)or(eY[O5]==4))and(Z47(AM7,DH8(AM7))>6000.)and(AN7(1200.,b5,Condition(function k6))==0))then
set J4=JGG(3)
endif
endif
if(not J4)then
if(((X77==null)or(not A47(X77,AM7)))and(G0[128+O5]))then
set X77=K3(800.,AM7,Condition(function k7))
endif
set J4=(X77!=null)and(A47(X77,AM7))and(not IsUnitInRange(AM7,X77,250.))and(IsUnitInRange(AM7,X77,600))and(C_7(AM7,852218,'A21E',X77))
endif
elseif(id=='O00P')then
if(AR7(AM7,BU[xulingzhiren]))then
call SetPlayerAbilityAvailable(pl,'A0G6',false)
endif
if((GetUnitAbilityLevel(AM7,'A0KX')>0)and(Z47(AM7,DH8(AM7))>2000.)and(GetUnitState(AM7,UNIT_STATE_MANA)>100.))then
if((GetHeroStr(AM7,true)>(30+(2*GetHeroLevel(AM7))))and(GetHeroStr(AM7,false)>(15+GetHeroLevel(AM7))))then
if(GetUnitLifePercent(AM7)>75.)then
set J4=IssueImmediateOrderById(AM7,852549)
else
set J4=D48(AM7,851986,h9[O5])
endif
elseif((GetHeroStr(AM7,true)<(20+(2*GetHeroLevel(AM7))))and(IsTriggerEnabled(LTrig(GetHandleId(pl),"MorphAgi"))))then
set J4=IssueImmediateOrderById(AM7,852550)
endif
endif
if((not J4)and(X77!=null)and(GetHeroLevel(AM7)>9)and(Bz>V74[32+O5])and(AR7(AM7,BU[xulingzhiren]))and(Bz>V74[208+O5])and(GetUnitState(AM7,UNIT_STATE_MANA)>315.))then
call VTF(O5,X77,false,false)
call SetPlayerAbilityAvailable(pl,'A0G6',true)
set J4=UnitUseItemTarget(AM7,AV7(AM7,BU[xulingzhiren]),X77)
endif
if((not J4)and(X77!=null)and(GetHeroLevel(AM7)>5))then
set J4=IssueTargetOrderById(AM7,852662,X77)
if((not J4)and(IsUnitInRange(AM7,X77,850.))and(not IsUnitInRange(AM7,X77,400.))and(GetUnitLifePercent(AM7)>75.)and((not IC(O5))or(GetUnitLifePercent(X77)<55.)))then
set M3G=kL(AM7,X77,200.)
if((M3G!=null)and((AN7(800.,M3G,Condition(function JP8))-AN7(800.,M3G,Condition(function IL8)))<=1)and(AN7(700.,M3G,Condition(function A27))==0))then
call SetPlayerAbilityAvailable(pl,'A0FN',true)
set GZ[O5]=true
set J4=J8(O5,IssuePointOrderByIdLoc(AM7,852218,M3G))
endif
endif
endif
if((not J4)and(GetHeroLevel(AM7)>15)and(X77!=null)and(GetUnitAbilityLevel(AM7,'A0GC')==0)and((GetUnitLifePercent(X77)<60.)or((AN7(600.,b5,Condition(function k6))>=2)and(AN7(600.,b5,Condition(function I68))>0))))then
set X77=L4F(800.,AM7)
set J4=(X77!=null)and(C_7(AM7,852274,'A0G8',X77))
endif
elseif(id=='HC49')then
call SetPlayerAbilityAvailable(pl,'A063',(GetHeroLevel(AM7)>4)and(GetUnitManaPercent(AM7)>70.))
set UP=R2I(hq[16+O5]-Bz)
set J4=(X77!=null)and((GetHeroLevel(AM7)>13)or((GetHeroLevel(AM7)>4)and(GetUnitLifePercent(X77)<70.)))and((UP<=0)or(UP>50))and(C_7(AM7,852095,'A24D',X77))
if(not J4)then
set h4[O5]=V_7(h4[O5]==null,X77,h4[O5])
set bj_lastLoadedUnit=AM7
set H58=V_7(h4[O5]!=null and AO7(450,h4[O5],Condition(function OW8))>0,h4[O5],B97(99999,AM7,Condition(function OX8)))
set J4=((H58!=null and(YE7(H58,65,'d'+30*GetUnitAbilityLevel(AM7,'A2KU')+300.,S87)))or(AO7(450,AM7,Condition(function BU7))>=3 and Y77(AM7,70.,500.,S97)))and DE8(AM7,852526,'A2KU')
endif
if((not J4)and(GetHeroLevel(AM7)>10)and(Bz>hq[32+O5]))then
set X77=AJ7(800.,b5,Condition(function I28))
set J4=(X77!=null)and(AO7(600.,X77,Condition(function k6))>0)and(IssueImmediateOrderById(AM7,852600))
endif
elseif(id=='Nbbc')then
if(not GZ[O5])then
call SetPlayerAbilityAvailable(pl,'A05G',(GetHeroLevel(AM7)>4)and((not iy(AM7))or(GetHeroLevel(AM7)>11))and(GetUnitManaPercent(AM7)>70.))
endif
if((GetHeroLevel(AM7)>5)and(Bz>V74[O5])and(G0[128+O5]))then
if(X77==null)then
set X77=AH7(700.,b5,Condition(function k6))
endif
if((X77!=null)and(not IsUnitIllusion(X77))and(not GV8(X77)))then
set UP=AO7(600.,X77,Condition(function k6))+1
if(GetHeroLevel(AM7)<11)then
set J4=(GetUnitState(X77,UNIT_STATE_LIFE)<600.)and(UP>=AO7(700.,X77,Condition(function KA)))and(D78(AM7,852095,'A0M1','A1AX',X77))
elseif((GetUnitState(X77,UNIT_STATE_LIFE)<1200.)or(UP>2)or((UP>1)and(AO7(600.,X77,Condition(function I68))>0)))then
set J4=(UP>=AO7(700.,X77,Condition(function KA)))and(D78(AM7,852095,'A0M1','A1AX',X77))
endif
endif
endif
elseif(id=='Hjai')then
set UP=GetHeroLevel(AM7)
call SetPlayerAbilityAvailable(pl,'A1E9',(UP>9)and((GetUnitManaPercent(AM7)>55.)or(X77!=null)or(AN7(900.,b5,Condition(function k6))>0)))
set J4=(h4[O5]!=null)and(C_7(AM7,852171,'A04C',X77))
if((X77==null)and(G0[128+O5])and(UP>3))then
set X77=AH7(1000.,b5,Condition(function k6))
endif
if(X77!=null)then
if((GetUnitState(AM7,UNIT_STATE_LIFE)>GetUnitState(X77,UNIT_STATE_LIFE))and((GetUnitState(AM7,UNIT_STATE_LIFE)-GetUnitState(X77,UNIT_STATE_LIFE))>(40*GetHeroLevel(AM7))))then
if((AR7(AM7,BU[keledebishou]))and(not IsUnitIllusion(X77))and(G0[128+O5])and(GetUnitLifePercent(AM7)>75.)and(GetHeroLevel(AM7)>10)and(GetUnitState(AM7,UNIT_STATE_MANA)>hq[272+O5]+120.)and(Bz>hq[O5]))then
set h4[16+O5]=X77
set J4=JXG(AM7,X77)
endif
if(not J4)then
set J4=((((UP>5)and(Bz>hq[O5])and(not IsUnitIllusion(X77))and(GetUnitState(AM7,UNIT_STATE_MANA)>hq[272+O5]+150.))or(GetUnitLifePercent(X77)<50.))and(C_7(AM7,852171,'A04C',X77)))or((((GetUnitManaPercent(AM7)>55.)and(UP>3))or(A47(X77,AM7)))and(GetUnitAbilityLevel(X77,'B017')==0)and(C_7(AM7,852089,'A1E9',X77)))
endif
if((not J4)and(not IsUnitIllusion(X77))and(IsUnitInRange(AM7,X77,600.))and(Bz>hq[O5]))then
call XM7(O5,"Attempt Freezing "+XQ7(Kz(500.,b5)>1)+XQ7(GetUnitAbilityLevel(X77,'B017')>0)+XQ7(AN7(850.,b5,Condition(function IL8))>0)+XQ7(GetUnitState(AM7,UNIT_STATE_MANA)>hq[272+O5]+100.))
set J4=(Kz(500.,b5)>1)and(GetUnitState(AM7,UNIT_STATE_MANA)>hq[272+O5]+100.)and((GetUnitAbilityLevel(X77,'B017')>0)or(AN7(850.,b5,Condition(function IL8))>0))and((LL7(AM7,BU[heihuangzhang]))or(IssueImmediateOrderById(AM7,852600)))
endif
endif
endif
elseif(id=='O015')then
if((X77==null)and(G0[128+O5]))then
set X77=AH7(1500.,b5,Condition(function k6))
endif
if((not J4)and(Bz>V74[O5])and(not IsUnitIllusion(X77))and(GetUnitLevel(AM7)>=6)and(h4[O5]!=null)and(IsUnitInRange(AM7,X77,1200.))and((GetUnitLifePercent(X77)<60.)or((S19(X77)or GZ[208+O5])and(GetUnitLifePercent(X77)<80.))))then
if S19(X77)or(Y57(AM7,X77,30))then
set J4=(IssuePointOrderByIdLoc(AM7,852600,L_7(X77)))
endif
endif
if((not J4)and(X77!=null)and(Bz>V74[32+O5])and(not IsUnitIllusion(X77))and(GetUnitAbilityLevel(AM7,'A1A8')>1)and(((((GetUnitState(AM7,UNIT_STATE_MANA)>WPF(AM7,'A1A8',I87)+WPF(AM7,'A1AA',I87))and(Bz+10<V74[O5]))or(GetUnitState(AM7,UNIT_STATE_MANA)>430))and(GetUnitLifePercent(X77)>40.))or(GetWidgetLife(X77)<80*GetUnitAbilityLevel(AM7,'A1A8'))))then
set J4=(C_7(AM7,852669,'A1A8',X77))
endif
if(not J4)and(X77!=null)and(Bz>V74[16+O5])and(not G0[O5])and(IsUnitInRange(AM7,X77,300))and(GetUnitLifePercent(X77)<70.)and((GetUnitState(AM7,UNIT_STATE_MANA)>WPF(AM7,'A1AA',I87)+WPF(AM7,'A1A1',I87))or(Bz+10<V74[O5]))then
set J4=(IssueImmediateOrderById(AM7,852581))
endif
elseif(id=='O016')then
if((X77==null))then
set X77=AH7(1200.,b5,Condition(function k6))
endif
if(not J4)and(h4[O5]!=null)and(Bz>V74[O5])and(GetUnitLevel(AM7)>=6)and(GetUnitLifePercent(X77)<60.)then
set J4=(C_7(AM7,852119,'A19O',X77))
endif
if(not J4)and(h4[O5]!=null)and(Bz>V74[48+O5])and(A87(X77))and(not IsUnitInRange(AM7,X77,400.))and(GetUnitState(AM7,UNIT_STATE_MANA)>WPF(AM7,'A19V',I87)+'d')then
call DE8(AM7,852180,'A19Z')
call Y07(.1)
endif
if(not J4)and(Bz>V74[16+O5])and(GetUnitLevel(AM7)>=4)and((GetUnitState(AM7,UNIT_STATE_MANA)>390.)or((h4[O5]!=null)and(GetUnitState(AM7,UNIT_STATE_MANA)>'d'+WPF(AM7,'A19V',I87)))or(GetUnitLifePercent(X77)<70.))then
set J4=(C_7(AM7,852089,'A1EL',X77))
endif
if(not J4)and(Bz>V74[32+O5])and(X77!=null)and((h4[O5]!=null)or(GetUnitLifePercent(X77)<70.)or(GetUnitState(AM7,UNIT_STATE_MANA)>=400.))then
if(OM8(AM7,X77,750,.2,1500)!=null)then
set J4=(L77(AM7,852218,'A19V',H57))
endif
endif
if(not J4)and(Bz>V74[32+O5])and(h4[O5]==null)and(GetUnitAbilityLevel(AM7,'A19V')>1)and((GetUnitState(AM7,UNIT_STATE_MANA)>=400.)or(GetUnitLifePercent(X77)<70.))then
if((not J4)and(X77!=null)and(not IsUnitInRange(AM7,X77,450.))and(iU(AM7))and(G0[128+O5])and(not G0[48+O5])and(AN7(400.,b5,Condition(function k8))==0))then
set UP=R2I(Z87(GetUnitX(AM7),GetUnitY(AM7),GetUnitX(X77),GetUnitY(X77)))
if(GetRandomInt(1,2)==1)then
set id=R2I(bj_RADTODEG*Atan2(GetUnitY(AM7)-GetUnitY(X77),GetUnitX(AM7)-GetUnitX(X77)))-25
else
set id=R2I(bj_RADTODEG*Atan2(GetUnitY(AM7)-GetUnitY(X77),GetUnitX(AM7)-GetUnitX(X77)))+25
endif
set J4=IssuePointOrderById(AM7,851986,GetUnitX(X77)+UP*Cos(id*bj_DEGTORAD),GetUnitY(X77)+UP*Sin(id*bj_DEGTORAD))
endif
endif
elseif(id=='E02N')then
if(not J4)and(Bz>V74[O5])and(GetUnitLevel(AM7)>=6)then
if GetUnitAbilityLevel(AM7,'A235')>0 then
set F37=150+GetUnitAbilityLevel(AM7,'A235')*37.5
set UP=99999
elseif GetUnitAbilityLevel(AM7,'A1T5')>0 then
set F37=150+GetUnitAbilityLevel(AM7,'A1T5')*37.5
set UP=1000
else
set UP=0
endif
if UP!=0 then
set F17=true
set X77=AH7(UP,GetUnitLoc(AM7),Condition(function JZG))
if X77==null then
set F17=false
if h4[O5]==null then
set X77=AH7(UP,GetUnitLoc(AM7),Condition(function k6))
else
set X77=h4[O5]
endif
endif
if((X77!=null))then
if(F17)or((GetUnitLifePercent(X77)<50. or(GZ[208+O5]and h4[O5]!=null)or((Bz-20>V74[O5])and(GetUnitState(AM7,UNIT_STATE_MANA)>300.))and(not IsUnitIllusion(X77))))then
if A87(X77)or(QJ8(AM7,X77))then
if OO8(AM7,X77,2,UP)!=null then
set J4=D88(AM7,852089,'A1T5','A235',GetLocationX(H57),GetLocationY(H57))
endif
else
set J4=D88(AM7,852089,'A1T5','A235',GetUnitX(X77),GetUnitY(X77))
endif
endif
if J4 then
call Y07(.1)
set J4=false
endif
endif
endif
endif
set X77=h4[O5]
if((X77==null))then
set X77=AH7(800.,b5,Condition(function k6))
endif
if(not J4)and(Bz>V74[16+O5])and(h4[O5]!=null or GetUnitLifePercent(X77)<70.)and(IsUnitInRange(AM7,X77,400))then
set J4=DE8(AM7,852600,'A1SO')
endif
if(not J4)and(Bz>V74[32+O5])and(h4[O5]!=null or GetUnitLifePercent(X77)<70. or A47(X77,AM7))then
set J4=C_7(AM7,852119,'A1SQ',X77)
endif
set UP=AO7(800.,AM7,Condition(function k6))
if(not J4)and(Bz>V74[48+O5])and((h4[O5]!=null and UP>1 and IsUnitInRange(AM7,X77,500))or(UP>2 and GetUnitState(AM7,UNIT_STATE_MANA)>350)or(GetUnitState(AM7,UNIT_STATE_MANA)>450 and AO7(800,AM7,Condition(function BU7))>5))then
set J4=DE8(AM7,852526,'A229')
endif
elseif(id=='O01F')then
if(not J4)and(h4[O5]!=null)and(is(AM7))and(Bz>V74[16+O5])then
set X77=JF8(900.,AM7,false)
if X77!=null then
set J4=C_7(AM7,852119,'A1TA',X77)
endif
endif
if(not J4)and(is(AM7))and(h8[160+O5]!=null)then
set GZ[224+O5]=(LoadUnitHandle(R8,(GetHandleId(AM7)),(652))!=null)
set J4=IssuePointOrderById(AM7,852662,GetUnitX(h8[160+O5])+GetRandomReal(-200.,200.),GetUnitY(h8[160+O5])+GetRandomReal(-200.,200.))
set h8[160+O5]=null
endif
if(not J4)then
set X77=h4[O5]
if(X77==null)then
set X77=AH7(800.,b5,Condition(function k6))
endif
if(h4[O5]!=null)and(GetUnitLifePercent(AM7)+10.>GetUnitLifePercent(X77))then
call SetPlayerAbilityAvailable(Player(O5),'A28Q',true)
set GZ[O5]=true
set J4=(GetUnitAbilityLevel(AM7,'B08A')==0)and(IssueImmediateOrderById(AM7,852589))
else
set GZ[O5]=false
set J4=(GetUnitAbilityLevel(AM7,'B08A')!=0)and(DE8(AM7,852590,'A28Q'))
endif
if J4 then
call Y07(.1)
set J4=false
endif
if(not J4)and(X77!=null)and(h4[O5]!=null or GetUnitManaPercent(AM7)>90 or(GetUnitLifePercent(X77)<70 and GetUnitManaPercent(AM7)>60))then
if LState(AM7,"AI|IoSpirits")then
set UP=R2I(Z47(AM7,X77))
if UP<425 then
set J4=(LBool(GetHandleId(AM7),"AI|IoSpiritsFar"))and(IssueImmediateOrderById(AM7,852217))
else
set J4=(not LBool(GetHandleId(AM7),"AI|IoSpiritsFar"))and(IssueImmediateOrderById(AM7,852490))
endif
else
if(Bz>V74[32+O5])then
set J4=DE8(AM7,852526,'A1T8')and(IssueImmediateOrderById(AM7,852490))
endif
endif
endif
endif
elseif(id=='E02H')then
if(X77==null)then
set X77=AH7(800.,b5,Condition(function k6))
endif
if(not J4)and(X77!=null)and(Bz>V74[O5])and((GetUnitLifePercent(X77)<50. and(UnitCountBuffsExBJ(bj_BUFF_POLARITY_NEGATIVE,bj_BUFF_RESIST_EITHER,X77,false,false)==0))or AD7(X77))then
set J4=C_7(AM7,852111,'A1SA',X77)
if J4 then
call VTF(O5,X77,false,false)
endif
endif
if(not J4)and(X77!=null)and(Bz>V74[32+O5])and(IsUnitInRange(AM7,X77,600))and(h4[O5]!=null or GetUnitLifePercent(X77)<70. or A47(X77,AM7))then
if AN7(450,L_7(X77),Condition(function BU7))<=1 then
set J4=C_7(AM7,852089,'A1SB',X77)
endif
endif
if(not J4)and(X77!=null)and(Bz>V74[16+O5])and(h4[O5]!=null or GetUnitLifePercent(X77)<70. or A47(X77,AM7))and(AO7(450,X77,Condition(function BU7))<=1)then
set J4=C_7(AM7,852119,'A1S8',X77)
endif
if(not J4)then
if(X77==null)then
set X77=AH7(1200.,b5,Condition(function k6))
endif
if(X77!=null)and(Bz>V74[48+O5])and(h4[O5]!=null or GetUnitLifePercent(X77)<70. or A47(X77,AM7)or GetUnitManaPercent(AM7)>50.)and(IsUnitVisibleEx(X77,Player(O5)))then
set J4=IssuePointOrderByIdLoc(AM7,852600,L_7(X77))
call Y07(.5)
endif
endif
elseif id=='H071' then
if((X77==null)and(G0[128+O5]))then
set X77=AH7(800.,b5,Condition(function k6))
endif
if((not J4)and(Bz>V74[32+O5])and(X77!=null)and(GetUnitLifePercent(X77)<60.)and((not IsUnitInRange(AM7,X77,200.))or(A87(X77))))then
if(OM8(AM7,X77,28/ .03,0,(GetUnitAbilityLevel(AM7,'A1J7')+3)*'d')!=null)and(OK8(AM7,X77,GetLocationX(H57),GetLocationY(H57),'x',Condition(function U28)))then
set J4=(Y57(AM7,X77,15))and(IssueImmediateOrderById(AM7,852600))
call VTF(O5,X77,false,false)
endif
endif
if((not J4)and(Bz>V74[16+O5])and(X77!=null)and(IsUnitInRange(AM7,X77,300.))and(GetUnitLifePercent(AM7)>GetUnitLifePercent(X77)+20.)and(G0[256+O5])and((GetUnitState(AM7,UNIT_STATE_MANA)>200.)or A87(X77)))then
set J4=IssueImmediateOrderById(AM7,852526)
endif
if(not J4)and(h4[O5]!=null)and(Bz>V74[O5])and(not IsUnitIllusion(X77))and(IsUnitInRange(AM7,X77,200.))then
set J4=DE8(AM7,852129,'A1IN')
endif
if(not J4)and(h4[O5]==null)and(Bz>V74[16+O5])and(AO7(325.,AM7,Condition(function IY8))>3)and(GetUnitState(AM7,UNIT_STATE_MANA)>400.)then
set J4=IssueImmediateOrderById(AM7,852526)
endif
elseif(id=='H00U')then
if(X77==null and(G0[128+O5]))then
set X77=AH7(800.,b5,Condition(function k6))
endif
set UP=(AN7(1200.,b5,Condition(function KX)))
set J4=(GetUnitAbilityLevel(AM7,'B08X')>0)and(UP>0)and(GetUnitLifePercent(AM7)<70.)
if((not J4)and((GetUnitState(AM7,UNIT_STATE_MANA))>175)and((Bz>V74[O5])or(KA8(AM7,'A0VG')))and(Bz>V74[144+O5]))then
set F37=(37.5+(46.87*GetUnitAbilityLevel(AM7,'A21V')))*(1+B2I(Mode_CC)*4)
set M0G=Ie(bj_mapInitialPlayableArea,Condition(function JZG))
set J4=(M0G!=null)and K_8(AM7,D27,D27,D27,'A0VG')and IssuePointOrderByIdLoc(AM7,852089,OO8(AM7,M0G,1.7,99999))
elseif((not J4)and((GetUnitState(AM7,UNIT_STATE_MANA))>175)and(Bz>V74[144+O5]))then
set F37=(37.5+(46.87*GetUnitAbilityLevel(AM7,'A21V')))
set M0G=Ie(bj_mapInitialPlayableArea,Condition(function JZG))
if(M0G!=null)then
call XK7("Invoker invoked SunStrike")
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),YS[9],true)
set J4=IssuePointOrderByIdLoc(AM7,852089,OO8(AM7,M0G,1.7,99999))
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),YS[9],false)
endif
endif
if((not J4)and(X77!=null)and(not IsUnitIllusion(X77)))then
set h4[O5]=X77
if(((GetUnitState(AM7,UNIT_STATE_MANA))>410)and(GetUnitLevel(AM7)>=10)and(Bz>V74[O5])and(Bz>V74[48+O5])and(Bz>V74['p'+O5])and((KA8(AM7,'A0VN'))or(KA8(AM7,'A0VM'))))then
set J4=K_8(AM7,D27,D27,D57,'A0VN')and(KL8(AM7,D27,D27,D27,false))and IssuePointOrderById(AM7,852216,GetUnitX(X77),GetUnitY(X77))
endif
if((not J4)and((GetUnitState(AM7,UNIT_STATE_MANA))>350)and(GetUnitLevel(AM7)>=14)and(Bz>V74[O5])and(Bz>V74[96+O5])and(Bz>V74[144+O5])and((KA8(AM7,'A0VK'))or(KA8(AM7,'A0VG'))))then
set J4=K_8(AM7,D57,D57,D07,'A0VK')and IssuePointOrderById(AM7,852491,GetUnitX(X77),GetUnitY(X77))
endif
if(not J4 and(GetUnitLevel(AM7)<14)and((GetUnitState(AM7,UNIT_STATE_MANA))>290)and(KA8(AM7,'A0VM')or(Bz>V74[O5])))then
set J4=(K_8(AM7,D07,D57,D27,'A0VM')and IssuePointOrderById(AM7,852215,GetUnitX(X77),GetUnitY(X77)))
endif
if(not J4)then
set J4=(((Bz>V74[64+O5])and K_8(AM7,D27,D27,D07,'A0VO')and(IssueImmediateOrderById(AM7,852132)))or((Bz>V74[16+O5])and K_8(AM7,D07,D07,D07,'A0VZ')and(C_7(AM7,852505,'A0VZ',X77)))or(((GetUnitState(AM7,UNIT_STATE_MANA))>350)and(Bz>V74['p'+O5])and K_8(AM7,D07,D57,D27,'A0VM')and IssuePointOrderById(AM7,852215,GetUnitX(X77),GetUnitY(X77))))
endif
if((not J4)and((GetUnitState(AM7,UNIT_STATE_MANA))>'x'))then
set J4=((Bz>V74[160+O5])and(IsUnitInRange(AM7,X77,106.))and K_8(AM7,D07,D07,D27,'A0VP')and(IssueImmediateOrderById(AM7,852134)))or((Bz>V74[48+O5])and K_8(AM7,D27,D27,D57,'A0VN')and IssuePointOrderById(AM7,852216,GetUnitX(X77),GetUnitY(X77)))or((Bz>V74[32+O5])and K_8(AM7,D57,D57,D57,'A0VS')and(KL8(AM7,D27,D27,D27,false))and(IssuePointOrderByIdLoc(AM7,852217,GetUnitLoc(X77))))
endif
endif
if((GetUnitAbilityLevel(AM7,'B08X')==0))then
if(not J4 and(Bz>V74[O5])and(Bz>V74[48+O5])and(not KA8(AM7,'A0VN'))and(GetRandomInt(1,2)==1))then
call K_8(AM7,D27,D27,D57,'A0VN')
elseif(not J4 and(GetUnitLevel(AM7)<14)and(Bz>V74[O5])and(Bz>V74['p'+O5])and(not KA8(AM7,'A0VM')))then
call K_8(AM7,D07,D57,D27,'A0VM')
elseif(not J4 and(GetUnitLevel(AM7)>=14)and(Bz>V74[O5])and(Bz>V74[96+O5])and(not KA8(AM7,'A0VK'))and(GetRandomInt(1,2)==1))then
call K_8(AM7,D57,D57,D07,'A0VK')
elseif(not J4 and(Bz>V74[O5])and(Bz>V74[16+O5])and(not KA8(AM7,'A0VZ')))then
call K_8(AM7,D07,D07,D07,'A0VZ')
endif
set UP=AO7(1500.,AM7,Condition(function k8))
if((X77!=null and(KZ8(AM7)<3))or((GetUnitLevel(AM7)<5)and(KZ8(AM7)<3))or((KZ8(AM7)<3)and(UP>1)))then
call KL8(AM7,D27,D27,D27,false)
elseif(X77==null and(not J4)and(GetUnitLevel(AM7)>5)and(GetUnitAbilityLevel(AM7,'A21X')>0)and(GetUnitLifePercent(AM7)>80.)and(KW8(AM7)<3)and(UP<2))then
call KL8(AM7,D57,D57,D57,false)
elseif(X77==null and(not J4)and(GetUnitAbilityLevel(AM7,'A21W')>0)and(GetUnitLifePercent(AM7)<58.)and(KY8(AM7)<3))then
call KL8(AM7,D07,D07,D07,false)
endif
if(not J4)then
set X77=null
set X77=AH7(700.,b5,Condition(function J78))
set J4=(X77!=null)and(GetUnitCurrentOrder(X77)==851983)and K_8(AM7,D57,D57,D27,'A0VQ')and C_7(AM7,852490,'A0VQ',X77)
endif
endif
elseif(id=='N0HP')then
set F_8=WI7(AR7(AM7,BU[GQ4]),17,9)
if(not J4)and(Bz>V74[O5])and(GetUnitLevel(AM7)>=6)then
set F37='d'+GetUnitAbilityLevel(AM7,'A1MI')*150+F_8*12.5
set F17=true
set X77=Ie(bj_mapInitialPlayableArea,Condition(function JZG))
if X77==null then
set F17=false
if h4[O5]==null then
set X77=AH7(99999.,GetUnitLoc(AM7),Condition(function k6))
else
set X77=h4[O5]
endif
endif
if((X77!=null))then
if(F17)or((GetUnitLifePercent(X77)<50. or(GZ[208+O5]and h4[O5]!=null)or((Bz-20>V74[O5])and(GetUnitState(AM7,UNIT_STATE_MANA)>300.))and(not IsUnitIllusion(X77))))then
if A87(X77)or(QJ8(AM7,X77))then
if OM8(AM7,X77,500.,.02,1500.)!=null then
set J4=IssuePointOrderByIdLoc(AM7,852662,H57)
if J4 then
call SInt(GetHandleId(AM7),"AI|IBClose",1)
endif
elseif OM8(AM7,X77,1500.,2.02,99999.)!=null then
set J4=IssuePointOrderByIdLoc(AM7,852662,H57)
if J4 then
call SInt(GetHandleId(AM7),"AI|IBClose",0)
endif
endif
else
set J4=IssuePointOrderById(AM7,852662,GetUnitX(X77),GetUnitY(X77))
if J4 then
call SInt(GetHandleId(AM7),"AI|IBClose",2)
endif
endif
endif
if J4 then
call SUnit(GetHandleId(AM7),"AI|IBTgt",X77)
call XM7(O5,"AI|IBTgt "+XQ7(LBool(GetHandleId(AM7),"AI|IBClose"))+GetUnitName(X77))
call TriggerSleepAction(.1)
set J4=false
endif
endif
endif
if(X77==null)then
set X77=AH7(800.,b5,Condition(function k6))
endif
if(not J4)and(not IsUnitIllusion(X77)and(IsUnitInRange(AM7,X77,750.))and((GetUnitState(AM7,UNIT_STATE_MANA))>(GetUnitState(AM7,UNIT_STATE_MAX_MANA)/ 2.5)))then
set J4=(X77!=null)and(C_7(AM7,852600,'A1MG',X77))
endif
if((not J4)and(not IsUnitIllusion(X77))and(IsUnitInRange(AM7,X77,1500.))and((GetUnitState(AM7,UNIT_STATE_MANA))>(GetUnitState(AM7,UNIT_STATE_MAX_MANA)/ 2.5))and((GetUnitLevel(AM7)>10)or(GetUnitManaPercent(AM7)>65.)))then
set J4=(X77!=null)and(C_7(AM7,852089,'A1HS',X77))
endif
if((not J4)and(not IsUnitIllusion(X77))and(IsUnitInRange(AM7,X77,600.))and(GetUnitManaPercent(AM7)>30.))then
set J4=(X77!=null)and(C_7(AM7,852100,'A1HQ',AM7))
endif
if(not J4)then
set J4=(IsUnitType(X77,UNIT_TYPE_HERO))and(L17(AM7,X77))
endif
elseif(id=='E02I')then
if(X77==null and(G0[128+O5]))then
set X77=AH7(1100.,b5,Condition(function k6))
endif
if((X77!=null)and(not IsUnitIllusion(X77))and(GetUnitLifePercent(X77)<60.))then
set J4=(IssuePointOrderById(AM7,852662,GetUnitX(X77),GetUnitY(X77)))or(IssueTargetOrderById(AM7,852185,X77))
endif
if((not J4)and(G0[128+O5])and(Bz>V74[32+O5])and(Bz>V74[16+O5])and(GetUnitLevel(AM7)>6))then
set J4=(X77!=null)and(GetUnitLevel(AM7)>3)and((GetUnitLifePercent(AM7)>75.)or(IsUnitInRange(AM7,X77,300.)))and(not IsUnitIllusion(X77))and((AO7(800.,X77,Condition(function JP8))-AO7(800.,X77,Condition(function IL8)))<=2)and((AN7(750.,GetUnitLoc(X77),Condition(function A27))==0)or(GetRandomInt(1,2)==1))and(GetUnitState(AM7,UNIT_STATE_MANA)>300.)and(IssueTargetOrderById(AM7,852185,X77))
endif
if(not J4 and(X77!=null))then
set J4=(not IsUnitIllusion(X77))and(Bz>V74[O5])and(GetUnitLifePercent(X77)<48.)and(IsUnitInRange(AM7,X77,200.))and(IssueImmediateOrderById(AM7,852526))
endif
if(not J4 and(X77!=null))then
set UP=AN7(780.,GetUnitLoc(X77),Condition(function A27))
set M1G=AO7(800.,X77,Condition(function JP8))
set J4=((Bz>V74[32+O5])and(GetUnitLevel(AM7)>3)and(IsUnitInRange(AM7,X77,800.))and((M1G-AO7(800.,X77,Condition(function IL8)))<=2)and((UP>0)and(M1G<2)or(UP==0)and(M1G<=2))and(IssueTargetOrderById(AM7,852185,X77)))or((Bz>V74[16+O5])and(GetUnitLevel(AM7)>3)and(GetUnitState(AM7,UNIT_STATE_MANA)>150)and(GetUnitLifePercent(X77)<90.)and(IssuePointOrderById(AM7,852662,GetUnitX(X77),GetUnitY(X77))))
endif
elseif(id=='HC92')then
call SetPlayerAbilityAvailable(pl,'A0RG',(GetHeroLevel(AM7)>13)and(AN7(1200.,b5,Condition(function k6))==0)and(GetUnitManaPercent(AM7)>70.))
if((X77!=null)and(not IsUnitIllusion(X77))and(((GetHeroLevel(AM7)>5)and(not IC(O5)))or(AF7(X77,AM7)))and(not IsUnitInRangeLoc(X77,b5,250.)))then
set J4=(kJ(GetUnitX(X77),GetUnitY(X77)))and((AO7(800.,X77,Condition(function JP8))-AO7(800.,X77,Condition(function IL8)))<=1)and(IssueTargetOrderById(AM7,852600,X77))
endif
if((not J4)and(GetHeroLevel(AM7)>14)and(hq[416+O5]>Bz)and(Bz>hq[O5])and(G0[128+O5]))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
set X77=K3(700.,AM7,Condition(function k6))
set J4=(X77!=null)and((AO7(I2R(225+(25*GetUnitAbilityLevel(AM7,'A0RG'))),X77,Condition(function k6))>1)or(GetUnitLifePercent(X77)<80.))and(C_7(AM7,852089,'A0RG',X77))
endif
endif
elseif(id=='H001')then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>10))then
set X77=AH7(800.,b5,Condition(function k6))
endif
set J4=(X77!=null)and(((GetHeroLevel(AM7)>4)and(not IsUnitInRange(AM7,X77,300.)))or(A47(X77,AM7)))and(C_7(AM7,852662,'A190',X77))
if((not J4)and(X77!=null)and(not IsUnitIllusion(X77))and(GetHeroLevel(AM7)>10)and(hq[416+O5]>Bz)and(G0[128+O5])and(GetUnitAbilityLevel(AM7,'B009')==0)and(GetUnitState(AM7,UNIT_STATE_MANA)>200.))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
set J4=((((Bz>hq[O5])or(GetUnitCurrentOrder(X77)==851973))and(IsUnitInRange(AM7,X77,600.)))or(IsUnitInRange(AM7,X77,300.)))and((DE8(AM7,852526,'A2IS'))or(LL7(AM7,BU[heihuangzhang]))or(DE8(AM7,852663,'A1WH')))
endif
endif
if(GetUnitAbilityLevel(AM7,'B009')>0)and(GetUnitLifePercent(AM7)>70)then
if(h4[O5]==null)then
set G77=AH7(700.,b5,Condition(function k6))
call VTF(O5,G77,false,false)
endif
if((GetUnitCurrentOrder(AM7)==851986)and(G0[128+O5])and(hq[512+O5]>Bz)and(not G0[O5])and(AN7(800.,b5,Condition(function KC))>1))then
call D48(AM7,851983,h8[O5])
endif
endif
elseif(id=='H00A')then
set J4=(X77!=null)and(GetUnitLifePercent(X77)<60.)and((not IsUnitIllusion(X77))or(GetUnitLifePercent(X77)>35.))and(C_7(AM7,852585,'A0KM',X77))
if((not J4)and(GetHeroLevel(AM7)>5)and(Bz>hq[16+O5]))then
set X77=Ie(bj_mapInitialPlayableArea,Condition(function I28))
set J4=(X77!=null)and(AO7(800.,X77,Condition(function k6))>0)and(IssueImmediateOrderById(AM7,852600))
if((not J4)and(X77!=null)and(IsUnitInRange(AM7,X77,800.)))then
set J4=(GetUnitLifePercent(X77)<25.)and(not Id(GetPlayerId(GetOwningPlayer(X77))))and(C_7(AM7,852096,'A2MC',X77))
endif
endif
if((not J4)and(h4[16+O5]!=null))then
if((Z_7(h4[16+O5]))and(GetUnitAbilityLevel(h4[16+O5],'B05H')>0))then
set J4=C_7(AM7,852095,'A0LV',h4[16+O5])
call JLG(AM7,h4[16+O5])
else
set h4[16+O5]=null
endif
endif
if((Z47(AM7,DH8(AM7))<1500.)and(eY[O5]==1)and(GetHeroLevel(AM7)>5)and(IH(pl,Condition(function SXD))<2))then
if(IsUnitAlly(AM7,G8[0]))then
if((h8[16+O5]==h7[35])and(G2!=1)and(G4!=1))then
set h8[16+O5]=h7[55]
set h8[O5]=h7[51]
endif
else
if((h8[16+O5]==h7[155])and(G1!=2)and(G3!=2))then
set h8[16+O5]=h7[135]
set h8[O5]=h7[131]
endif
endif
endif
if((not J4)and(GetHeroLevel(AM7)>21)and(IH(pl,Condition(function SXD))==0))then
set X77=AH7(600.,b5,Condition(function k8))
set J4=(X77!=null)and(GetUnitState(X77,UNIT_STATE_LIFE)>800.)and(C_7(AM7,852131,'A28T',X77))
endif
elseif(id=='H004')then
call SetPlayerAbilityAvailable(pl,'A01F',(GetHeroLevel(AM7)>10)and(iy(AM7))and(GetUnitManaPercent(AM7)>60.))
call SetPlayerAbilityAvailable(pl,'A001',(GetUnitManaPercent(AM7)>70.)and(GetUnitAbilityLevel(AM7,'B004')==0))
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>3))then
set X77=AH7(1000.,b5,Condition(function k6))
endif
if(X77!=null)then
if((GetHeroLevel(AM7)>5)and(not IsUnitIllusion(X77))and(not GV8(X77))and(Bz>hq[O5]))then
set UP=R2I(GetUnitState(X77,UNIT_STATE_LIFE))
set J4=(UP<JNG(AM7))and(UP>150)and(D78(AM7,852119,'A01P','A09Z',X77))
endif
if((not J4)and((GetUnitManaPercent(AM7)>40.)or(A47(X77,AM7))))then
if(((Bz>hq[16+O5])and(GetHeroLevel(AM7)>3))or(GetUnitLifePercent(X77)<55.))then
set GZ[64+O5]=true
set J4=L77(AM7,852232,'A027',OO8(AM7,X77,.95,600.))
set GZ[64+O5]=false
endif
if(not J4)then
set J4=(Bz>hq[16+O5])and(GetHeroLevel(AM7)>3)and(GetRandomInt(1,2)==1)and(C_7(AM7,852125,'A01F',X77))
endif
endif
endif
if((not J4)and(GetHeroLevel(AM7)>15)and(hq[416+O5]>Bz)and(Bz>hq[O5])and(G0[128+O5]))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
if(X77==null)then
set X77=K3(700.,AM7,Condition(function k6))
endif
if(X77!=null)then
set UP=R2I(GetUnitState(X77,UNIT_STATE_LIFE))
set J4=(GetUnitLifePercent(X77)<60.)and(UP<1600)and(UP>500)and(not GV8(X77))and(D78(AM7,852119,'A01P','A09Z',X77))
endif
endif
endif
elseif(id=='Ucrl')or(id=='U01X')then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>5)and(GetUnitManaPercent(AM7)>60.))then
set X77=AH7(600.,b5,Condition(function k6))
endif
if((G0[128+O5])and(AR7(AM7,BU[keledebishou]))and(GetHeroLevel(AM7)>8)and(X77!=null)and(not IsUnitIllusion(X77))and(Bz>hq[O5])and(not IsUnitInRange(AM7,X77,250.))and(IsUnitInRange(AM7,X77,600.)))then
set J4=((AO7(800.,X77,Condition(function JP8))-AO7(800.,X77,Condition(function IL8)))<=1)and(JXG(AM7,X77))
endif
call SetPlayerAbilityAvailable(pl,'A0LL',(GetHeroLevel(AM7)>9)and(GetUnitManaPercent(AM7)>60.))
if(not J4)then
set J4=(X77!=null)and((A47(X77,AM7))or((GetHeroLevel(AM7)>7)and(GetUnitState(AM7,UNIT_STATE_MANA)>350.)and(Bz>hq[O5])and(IsUnitInRange(AM7,X77,220.))))and(C_7(AM7,852089,'A0LL',X77))
endif
elseif(id=='Otch')then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>4)and(GetUnitManaPercent(AM7)>60.))then
set X77=AH7(1300.,b5,Condition(function k6))
endif
if(X77!=null)then
if((G0[128+O5])and(AR7(AM7,BU[keledebishou]))and(not IsUnitIllusion(X77))and(GetHeroLevel(AM7)>10)and(Bz>hq[O5])and(AO7(500.,X77,Condition(function k8))>5))then
set J4=JXG(AM7,X77)
endif
if((not J4)and(Bz>hq[O5])and(IsUnitInRange(AM7,X77,400.))and(GetUnitState(X77,UNIT_STATE_LIFE)>180.))then
set UP=K1G(AM7)
if((R2I(GetUnitState(X77,UNIT_STATE_LIFE))<UP)or((UP>'d')and((R2I(GetUnitState(X77,UNIT_STATE_LIFE))-UP)<GetHeroLevel(AM7)*30)))then
set J4=DE8(AM7,852526,'A0DH')or(DE8(AM7,852526,'A1OB'))
endif
endif
if((not J4)and(GetUnitCurrentOrder(X77)==851986)and(GetUnitLifePercent(X77)<50.))then
set J4=C_7(AM7,852600,'A0SK',X77)
endif
if((not J4)and(GetHeroLevel(AM7)>3))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(h8[16+O5])-GetUnitY(X77),GetUnitX(h8[16+O5])-GetUnitX(X77)))
call SetPlayerAbilityAvailable(pl,'A0SK',true)
set J4=IssuePointOrderById(AM7,852600,GetUnitX(X77)+50.*Cos(UP*bj_DEGTORAD),GetUnitY(X77)+50.*Sin(UP*bj_DEGTORAD))
endif
endif
set X77=AJ7(400.,b5,Condition(function k6))
if((not J4)and(Bz>hq[O5])and(X77!=null))then
set hr=AM7
set UP=AN7(500.,b5,Condition(function KLG))
set J4=(((UP>3)and(AN7(400.,b5,Condition(function k6))>1))or((UP>4)and(GetUnitLifePercent(X77)<60.)))and((DE8(AM7,852526,'A0DH'))or(DE8(AM7,852526,'A1OB')))
endif
if(not J4)then
call SetPlayerAbilityAvailable(pl,'A0SK',(GetHeroLevel(AM7)>5)and(GetUnitManaPercent(AM7)>70.))
set J4=(GetHeroLevel(AM7)>10)and(Bz>hq[O5])and(AN7(500.,b5,Condition(function KA))>8)and((DE8(AM7,852526,'A0DH'))or(DE8(AM7,852526,'A1OB')))
endif
elseif(id=='N01A')then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>3))then
set X77=AH7(800.,b5,Condition(function k6))
endif
if(X77!=null)then
set J4=((GetHeroLevel(AM7)>15)and((A47(X77,AM7))or(GetUnitManaPercent(X77)<35.)or(GetUnitAbilityLevel(X77,'B01O')>0))and(IssueTargetOrderById(AM7,852662,X77)))or((X77!=null)and(not IsUnitInRange(AM7,X77,550.))and(GetUnitManaPercent(AM7)>60.)and(GetRandomInt(1,3)==1)and(GetHeroLevel(AM7)>3)and(C_7(AM7,852254,'A0LZ',X77)))
endif
if(not J4)and(X77!=null)and((h4[O5]!=null)or(GetUnitManaPercent(AM7)>70))then
set J4=C_7(AM7,852089,'A14L',X77)
endif
if(not J4)then
if h4[O5]!=null and IsUnitInRange(h4[O5],AM7,850)and GetUnitLifePercent(h4[O5])<GetUnitLifePercent(X77)or GetUnitManaPercent(h4[O5])<GetUnitManaPercent(X77)then
set X77=h4[O5]
endif
if X77==null then
set N=GT7
set X77=B97(900,AM7,Condition(function J48))
endif
set N=GX7
set H58=B97(900,AM7,Condition(function J48))
set X77=V_7((X77!=null)and(((GetHeroLevel(X77)>11 and GetHeroLevel(X77)>GetHeroLevel(H58))or GetUnitManaPercent(H58)<30.)or H58==null),X77,H58)
if X77==null then
set X77=V_7(GetUnitManaPercent(AM7)>40.or GetUnitState(AM7,UNIT_STATE_MANA)>700.,B97(700,AM7,Condition(function k6)),null)
endif
set J4=(X77!=null)and(G0[128+O5]and(GetUnitLifePercent(X77)<=50)or GetUnitManaPercent(AM7)>50.)and IssueTargetOrderById(AM7,852095,X77)
if h4[O5]==null then
set h4[O5]=X77
endif
endif
if((not J4)and(GetHeroLevel(AM7)>5)and(Bz>hq[O5]))then
set X77=Ie(bj_mapInitialPlayableArea,Condition(function I28))
set J4=(X77!=null)and(AO7(700.,X77,Condition(function k6))>0)and(IssueImmediateOrderById(AM7,852600))
endif
elseif(id=='H00K')then
if X77==null then
set X77=JT8(700.,AM7)
endif
if((X77!=null)and(IsUnitType(X77,UNIT_TYPE_HERO))and(not IsUnitIllusion(X77))and(IsUnitInRange(AM7,X77,400.))and(GetUnitAbilityLevel(X77,'Bcyc')==0)and(GetUnitAbilityLevel(X77,'Bcy2')==0)and((GetUnitLifePercent(AM7)<50.)or(GetHeroLevel(AM7)<8))and(R2I(GetUnitState(X77,UNIT_STATE_LIFE))<(300+('x'*GetUnitAbilityLevel(AM7,'A06B')))))then
set J4=C_7(AM7,852040,'A06B',X77)
endif
if(not J4)and(is(AM7))then
if(h4[O5]!=null)then
if(not J4)and(Bz>V74[O5])then
set J4=D78(AM7,852504,'A0AK','A1FY',X77)
endif
if(not J4)and(Bz>V74[32+O5])and(AO7(600.,AM7,Condition(function J98))==0)then
set J4=C_7(AM7,852114,'A06H',AM7)
endif
if(not J4)then
set F37=Atan2(GetUnitY(AM7)-GetUnitY(X77),GetUnitX(AM7)-GetUnitX(X77))
call MoveLocation(HA,GetUnitX(X77)+Cos(F37)*200,GetUnitY(X77)+Sin(F37)*200)
if(not J4)and(Bz>V74[16+O5])and(GetUnitLifePercent(AM7)>60.)then
set J4=L77(AM7,852278,'A05J',HA)
endif
if(not J4)and(Bz>V74[32+O5])and(GetUnitLifePercent(AM7)>60.)and(AO7(600.,X77,Condition(function J98))==0)then
set J4=L77(AM7,852114,'A06H',HA)
endif
endif
elseif(eY[O5]==1 or eY[O5]==3 or eY[O5]==4)then
if((not J4)and(is(AM7))and(eY[O5]==1)and((AN7(400.,b5,Condition(function Ka))>1)or((h4[128+O5]!=null)and(Z_7(h4[128+O5]))and(IsUnitInRange(AM7,h4[128+O5],400.)))))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(h9[O5])-GetUnitY(AM7),GetUnitX(h9[O5])-GetUnitX(AM7)))
call IssuePointOrderById(AM7,851986,GetUnitX(AM7)+350.*Cos(UP*bj_DEGTORAD),GetUnitY(AM7)+350.*Sin(UP*bj_DEGTORAD))
endif
if((not J4)and(is(AM7))and(not GD8(AM7))and(AN7(1200.,b5,Condition(function A27))==0)and(not Z57(AM7)))then
set UP=GetUnitUserData(h8[32+O5])
set F37=300
if((eY[O5]==3)or(eY[O5]==4))and(h8[64+O5]!=null)then
set h9[48+O5]=h8[64+O5]
call XK7("Techies choose defense bombsite "+I2S(UP))
if AO7(600.,AM7,Condition(function k6))>0 or AO7(600.,h9[48+O5],Condition(function k6))>0 then
set F37=-1
endif
elseif(h9[48+O5]==null)or(not IsUnitInRange(AM7,h9[48+O5],1800.))then
set F17=IsUnitAlly(AM7,G8[O5])
set UP=BEF(GetUnitUserData(h8[80+O5]),(not F17),0)
if UP==35 then
set UP=351
elseif UP==55 then
set UP=352
endif
if UP!=0 and(AO7(900.,h7[UP],Condition(function A27))==0)and((F17 and(not IsVisibleToPlayer(GetUnitX(h7[UP]),GetUnitY(h7[UP]),N8[0])))or((not F17)and(not IsVisibleToPlayer(GetUnitX(h7[UP]),GetUnitY(h7[UP]),G8[0]))))then
set h9[48+O5]=h7[UP]
call XK7("Techies choose bombsite "+I2S(GetUnitUserData(h8[80+O5]))+" -> "+I2S(UP))
endif
endif
if F37!=-1 then
if(not J4)and(h9[48+O5]!=null)and(Bz>V74[16+O5])and(GetUnitState(AM7,UNIT_STATE_MANA)>WPF(AM7,'A05J',I87)+WPF(AM7,'A06B',I87))then
call MoveLocation(HA,GetUnitX(h9[48+O5])+GetRandomReal(-F37,F37),GetUnitY(h9[48+O5])+GetRandomReal(-F37,F37))
set J4=(L77(AM7,852278,'A05J',HA))
endif
set bj_lastLoadedUnit=AM7
if(not J4)and(h9[48+O5]!=null)and(Bz>V74[32+O5])and(GetUnitState(AM7,UNIT_STATE_MANA)>WPF(AM7,'A06H',I87)+WPF(AM7,'A06B',I87))and(AO7(600.,h9[48+O5],Condition(function J98))==0)then
call MoveLocation(HA,GetUnitX(h9[48+O5])+GetRandomReal(-100.,100.),GetUnitY(h9[48+O5])+GetRandomReal(-100.,100.))
set J4=(L77(AM7,852114,'A06H',HA))
endif
if((not J4)and(GetHeroLevel(AM7)>5)and(Bz>V74[O5]))then
set X77=AH7(1800.,b5,Condition(function J88))
set bj_forLoopAIndex=(AO7(600.,X77,Condition(function KG)))
if((X77!=null)and(not T79(X77))and(bj_forLoopAIndex<4))then
set UP=R2I(JOG(X77))
set GZ[272+O5]=false
if(bj_forLoopAIndex>0)then
set hq[240+O5]=Bz+5.
else
set hq[240+O5]=.0
endif
set J4=D88(AM7,852504,'A0AK','A1FY',GetUnitX(X77)+GetRandomReal(400.,450.)*Cos(UP*bj_DEGTORAD)+GetRandomReal(-300.,300.),GetUnitY(X77)+GetRandomReal(400.,450.)*Sin(UP*bj_DEGTORAD)+GetRandomReal(-300.,300.))
endif
set bj_forLoopAIndex=(AO7(600.,h8[64+O5],Condition(function KG)))
if((not J4)and((eY[O5]==3)or(eY[O5]==4))and(h8[64+O5]!=null)and(IsUnitInRange(AM7,h8[64+O5],900.))and(bj_forLoopAIndex<6))then
set GZ[272+O5]=false
if(bj_forLoopAIndex>0)then
set hq[240+O5]=Bz+5.
else
set hq[240+O5]=.0
endif
set J4=D88(AM7,852504,'A0AK','A1FY',GetUnitX(h8[64+O5])+GetRandomReal(-300,300),GetUnitY(h8[64+O5])+GetRandomReal(-300.,300.))
endif
if(not J4)then
set GZ[272+O5]=true
set X77=AH7(1800.,b5,Condition(function KG))
set bj_forLoopAIndex=(AO7(600.,h9[48+O5],Condition(function KG)))
if(X77!=null)then
set hq[240+O5]=Bz+5.
set J4=D88(AM7,852504,'A0AK','A1FY',GetUnitX(X77)+GetRandomReal(-100.,100.),GetUnitY(X77)+GetRandomReal(-100.,100.))
elseif(h9[48+O5]!=null)and(GetUnitState(AM7,UNIT_STATE_MANA)>WPF(AM7,'A0AK',I87)+WPF(AM7,'A1FY',I87)+WPF(AM7,'A06B',I87))and(bj_forLoopAIndex<8)then
set hq[240+O5]=Bz+5.
set J4=(D88(AM7,852504,'A0AK','A1FY',GetUnitX(h9[48+O5])+GetRandomReal(-F37,F37),GetUnitY(h9[48+O5])+GetRandomReal(-F37,F37)))
endif
endif
endif
endif
endif
if((not J4)and(Bz>V74[O5])and(G0[256+O5])and(GetUnitManaPercent(AM7)>50.))then
set X77=AH7(700.,b5,Condition(function k8))
set J4=(X77!=null)and(not IsUnitType(X77,UNIT_TYPE_HERO))and(AO7(400.,X77,Condition(function k8))>2)and(D78(AM7,852504,'A0AK','A1FY',X77))
endif
if((not J4)and(Bz>V74[16+O5])and(G0[256+O5])and(GetUnitAbilityLevel(AM7,'A05J')>1)and(GetUnitManaPercent(AM7)>50.))then
set X77=AH7(700.,b5,Condition(function BU7))
set J4=(X77!=null)and(AO7(500.,X77,Condition(function BU7))>2)and(L77(AM7,852278,'A05J',L_7(X77)))
endif
endif
endif
elseif(id=='Huth')then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>10))then
set X77=AH7(800.,b5,Condition(function k6))
endif
call SetPlayerAbilityAvailable(pl,'A03Y',(GetHeroLevel(AM7)>14)and(AN7(1500.,b5,Condition(function k6))==0)and(GetUnitManaPercent(AM7)>75.))
call SetPlayerAbilityAvailable(pl,'A1P9',false)
if(X77!=null)then
set UP=R2I(Z87(GetUnitX(AM7),GetUnitY(AM7),GetUnitX(X77),GetUnitY(X77)))
endif
if((G0[128+O5])and(AR7(AM7,BU[keledebishou]))and(X77!=null)and(not IsUnitIllusion(X77))and(Bz>hq[O5]))then
set J4=(GetHeroLevel(AM7)>5)and(UP>250)and(UP<700)and((AO7(800.,X77,Condition(function JP8))-AO7(800.,X77,Condition(function IL8)))<=1)and(JXG(AM7,X77))
endif
call SetPlayerAbilityAvailable(pl,'A0LC',(GetUnitAbilityLevel(AM7,'B02H')>0)or(X77!=null))
if((not J4)and(X77!=null)and(not IsUnitIllusion(X77))and(GetHeroLevel(AM7)>5))then
set J4=((UP<300)and(GetUnitAbilityLevel(AM7,'B02H')==0)and(DE8(AM7,852100,'A0LC')))or((UP<200)and(DE8(AM7,852600,'A1P9')))or((UP<280)and(DE8(AM7,852096,'A03Y')))
endif
elseif(id=='Ogrh')then
set J4=(X77!=null)and((GetUnitLifePercent(X77)<50.)or(i2(X77)))and(C_7(AM7,852662,'A10D',X77))
if((not J4)and(GetUnitManaPercent(AM7)>70.)and(GetHeroLevel(AM7)>4)and(AN7(800.,b5,Condition(function J88))>0))then
if((X77==null)or(not IsUnitInRange(AM7,X77,800.)))then
set X77=AH7(800.,b5,Condition(function k6))
endif
set J4=(X77!=null)and(C_7(AM7,852662,'A10D',X77))
endif
elseif(id=='Hamg')then
if((X77!=null)and(not IsUnitIllusion(X77))and(GetUnitLifePercent(X77)<70.)and(AN7(700.,b5,Condition(function k6))>1)and(AN7(700.,b5,Condition(function IL8))>0))then
set J4=IssueImmediateOrderById(AM7,852600)
endif
if(X77!=null)then
set J4=C_7(AM7,852095,'A26N',X77)
endif
if(not J4)then
set X77=JV8(99999,AM7)
set H58=B97(99999,AM7,Condition(function UK8))
set X77=V_7(((X77!=null and GetUnitLifePercent(X77)<=45.)or(H58==null and X77!=null and GetUnitLifePercent(X77)<=70)),X77,H58)
set J4=((X77!=null)and IssueTargetOrderById(AM7,852248,X77))
endif
if((not J4)and(GetUnitManaPercent(AM7)>50.)and(GetHeroLevel(AM7)>2))then
set X77=AH7(1500.,b5,Condition(function J88))
if((not J4)and(X77!=null)and(GetUnitLifePercent(X77)<40.)and(GetUnitCurrentOrder(X77)==851986))then
set J4=(K6(X77))and(IssueTargetOrderById(AM7,852069,X77))
endif
endif
if((not J4)and(GetHeroLevel(AM7)>10)and(hq[416+O5]>Bz)and(Bz>hq[O5])and(G0[128+O5]))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and(AN7(1000.,b5,Condition(function IL8))>0))then
set X77=AJ7(500.,b5,Condition(function k6))
if(X77!=null)and(GetUnitLifePercent(X77)<70.)then
set UP=AN7(700.,b5,Condition(function k6))
set J4=((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and(IssueImmediateOrderById(AM7,852600))
endif
endif
endif
elseif((id=='N01O')or(id=='N013')or(id=='N014')or(id=='N015'))then
if((GetHeroLevel(AM7)>15)and(GetUnitTypeId(AM7)=='N01O')and(GetUnitAbilityLevel(AM7,'A0AG')>2)and(Z47(AM7,DH8(AM7))<2000.))then
set J4=DE8(AM7,852138,'A0AG')
endif
if((GetUnitTypeId(AM7)=='N01O')and(GetUnitAbilityLevel(AM7,'A0AG')>1))then
set J4=DE8(AM7,852138,'A0AG')
endif
if((AN7(700.,b5,Condition(function H78))==0)and(((GetUnitTypeId(AM7)=='N013')and(GetUnitAbilityLevel(AM7,'A0AG')>1))or((GetUnitTypeId(AM7)=='N014')and(GetUnitAbilityLevel(AM7,'A0AG')>2))))then
set J4=DE8(AM7,852139,'A0AG')
endif
set X77=LUnit(GetHandleId(pl),"MyBear")
if((X77==null)or(not Z_7(X77))or(GetUnitLifePercent(X77)<20 and Bz>V74[16+O5]))then
set J4=IssueImmediateOrderById(AM7,852594)
endif
if((not J4)and(IsUnitInRange(AM7,X77,600.))and(GetUnitAbilityLevel(X77,'B016')==0)and((h4[O5]!=null)or((GetUnitManaPercent(AM7)>50.)and(AN7(700.,b5,Condition(function KA))>0))))then
set J4=IssueImmediateOrderById(AM7,852526)
endif
if((not J4)and(GetUnitAbilityLevel(AM7,'B016')==0)and((h4[O5]!=null)or((GetUnitManaPercent(AM7)>30.)and(AN7(700.,b5,Condition(function KA))>0))))then
set J4=IssueImmediateOrderById(AM7,852526)
endif
if(AN7(700.,b5,Condition(function J88))>0)then
set hq[240+O5]=Bz+4.
endif
if((not J4)and(GetUnitTypeId(AM7)!='N01O')and(X77!=null)and(IsUnitInRange(AM7,X77,600.))and(hq[416+O5]>Bz))then
set J4=IssueImmediateOrderById(AM7,852599)
endif
elseif(id=='Hmkg')then
call SetPlayerAbilityAvailable(pl,GM8(AM7),(GetHeroLevel(AM7)>4)and(GetUnitManaPercent(AM7)>40.))
call SetPlayerAbilityAvailable(pl,GN8(AM7),(GetHeroLevel(AM7)>12)and(GetUnitManaPercent(AM7)>70.))
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>2))then
set X77=AH7(1000.,b5,Condition(function k6))
endif
set J4=(X77!=null)and(((((GetUnitManaPercent(AM7)>40.)and(GetHeroLevel(AM7)>2))or(A47(X77,AM7)))and(C_7(AM7,852095,GM8(AM7),X77)))or((A47(X77,AM7))and(C_7(AM7,852662,GN8(AM7),X77))))
if((not J4)and(GetUnitManaPercent(AM7)>70.)and(GetHeroLevel(AM7)>12))then
set J4=(AN7(700.,b5,Condition(function k6))==0)and(AN7(700.,b5,Condition(function k8))>0)and(GetUnitAbilityLevel(AM7,'Bblo')==0)and(C_7(AM7,852101,GO8(AM7),AM7))
if(not J4)then
set X77=AH7(700.,b5,Condition(function IL8))
set J4=(X77!=null)and(kq(GetUnitTypeId(X77)))and(AN7(700.,b5,Condition(function KA))>0)and(GetUnitAbilityLevel(X77,'Bblo')==0)and(C_7(AM7,852101,GO8(AM7),X77))
endif
endif
if(not J4)and(X77!=null)and((h4[O5]!=null)or(GetUnitLifePercent(X77)<60))then
set J4=(LBool(GetHandleId(AM7),"AI|Magi2Blast")and C_7(AM7,852600,'A2KQ',X77))
endif
elseif(id=='H00D')then
set UP=GetHeroLevel(AM7)
if(UP>7)then
call SetPlayerAbilityAvailable(pl,'A0O1',(X77==null)and(GetUnitManaPercent(AM7)>50.))
else
call SetPlayerAbilityAvailable(pl,'A0O1',false)
endif
if((h4[16+O5]!=null)and(not Z_7(h4[16+O5])))then
set h4[16+O5]=null
endif
call SetPlayerAbilityAvailable(pl,'A0OO',(UP>9)and(h4[16+O5]==null)and(GetUnitManaPercent(AM7)>60.))
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>4)and(GetUnitManaPercent(AM7)>70.))then
set X77=AH7(800.,b5,Condition(function k6))
endif
if((X77!=null)and(UP>2)and(GetUnitManaPercent(AM7)>30.)and(not IsUnitInRange(AM7,X77,250.))and(IsUnitInRange(AM7,X77,900.)))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(X77)-GetUnitY(AM7),GetUnitX(X77)-GetUnitX(AM7)))
call SetPlayerAbilityAvailable(pl,'A0O1',true)
set GZ[O5]=true
set J4=J8(O5,IssuePointOrderById(AM7,852218,GetUnitX(AM7)+1100.*Cos(UP*bj_DEGTORAD),GetUnitY(AM7)+1100.*Sin(UP*bj_DEGTORAD)))
endif
if((not J4)and(X77!=null)and(GetHeroLevel(AM7)>10)and(hq[416+O5]>Bz)and(Bz>hq[O5])and(G0[128+O5]))then
set UP=AN7(1000.,b5,Condition(function k6))
if(((UP>1)or(UP==DI8(not IsUnitAlly(AM7,G8[0]))))and(AN7(1000.,b5,Condition(function IL8))>0))then
set J4=(GetUnitLifePercent(X77)<75.)and(D78(AM7,852095,'A0O2','A289',X77))
endif
endif
elseif(id=='E00P')then
call SetPlayerAbilityAvailable(pl,'A0O7',(GetHeroLevel(AM7)>9)and(GetUnitManaPercent(AM7)>70.))
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>3)and(GetUnitManaPercent(AM7)>70.))then
set X77=AH7(700.,b5,Condition(function k6))
endif
set J4=(X77!=null)and(GetHeroLevel(AM7)>3)and((GetUnitManaPercent(AM7)>40.)or(A47(X77,AM7)))and(C_7(AM7,852218,'A0O7',X77))
if((not J4)and(X77!=null)and(GetHeroLevel(AM7)>5))then
set J4=(Kz(700.,L_7(X77))>1)and((Bz>hq[O5])or(AO7(700.,X77,Condition(function I68))>0))and(C_7(AM7,852125,'A0O5',X77))
endif
elseif((id=='N01I')or(id=='N01H')or(id=='N01T')or(id=='N01J'))then
if(id=='N01I')then
set J4=(((GetHeroLevel(AM7)>=6)and(h4[O5]!=null))or((GetHeroLevel(AM7)>10)and(GetUnitLifePercent(AM7)<80.)and(AN7(700.,b5,Condition(function k8))>0)))and(IssueImmediateOrderById(AM7,852663))
elseif((X77==null)and(G0[128+O5])and(id!='N01I'))then
set X77=AH7(700.,b5,Condition(function k6))
call VTF(O5,X77,false,false)
endif
if((not J4)and(G0[128+O5])and(eY[320+O5]>=-1)and(h4[O5]!=null or GetUnitManaPercent(AM7)>70)and(GetUnitAbilityLevel(AM7,'A1NI')>1))then
if X77==null then
if((eY[O5]==9)and(h4[144+O5]!=null)and(Z_7(h4[144+O5]))and(IsUnitInRange(AM7,h4[144+O5],1000.))and(not IsUnitVisibleEx(AM7,GetOwningPlayer(h4[144+O5])))and(IsUnitVisibleEx(h4[144+O5],GetOwningPlayer(AM7))))then
set X77=h4[144+O5]
else
set X77=AH7(800.,b5,Condition(function k6))
endif
endif
set J4=(X77!=null)and(IsUnitInRange(AM7,X77,300))and(IssueImmediateOrderById(AM7,852526))
endif
if((not J4)and(X77!=null)and(GetHeroLevel(AM7)>5))then
set J4=(AO7(700.,X77,Condition(function k6))>1)and(AO7(700.,X77,Condition(function I68))>0)and(C_7(AM7,852089,'A0IL',X77))
endif
if((not J4)and(GetHeroLevel(AM7)>11)and(GetUnitManaPercent(AM7)>55.)and(AN7(500.,b5,Condition(function KA))>2)and(Bz>hq[O5]))then
call SetPlayerAbilityAvailable(pl,'A0IL',true)
set J4=IssuePointOrderById(AM7,852089,GetUnitX(AM7)+GetRandomReal(0,200.)-100.,GetUnitY(AM7)+GetRandomReal(0,200.)-100.)
else
call SetPlayerAbilityAvailable(pl,'A0IL',(GetHeroLevel(AM7)>11)and(GetUnitManaPercent(AM7)>50.))
endif
elseif id<='Ezzz' then
if(id=='E01Y')then
call SetPlayerAbilityAvailable(pl,'A0RT',false)
call SetPlayerAbilityAvailable(pl,'A0RV',false)
set J4=(X77!=null)and(IsUnitInRange(AM7,X77,145+(40*GetUnitAbilityLevel(AM7,'A0RO'))))and(DE8(AM7,852129,'A0RV'))
if((not J4)and(GetHeroLevel(AM7)>5)and(AN7(900.,b5,Condition(function A27))==0))then
if((not J4)and(X77!=null)and(GetUnitAbilityLevel(X77,'B08M')==0))then
set J4=((GetUnitLifePercent(X77)<40. or hq[624+O5]>Bz)and(AO7(450.,X77,Condition(function Kh))==0))and(IssuePointOrderById(AM7,852190,GetUnitX(X77),GetUnitY(X77)))
endif
set J4=(not J4)and(LInt(GetHandleId(AM7),"TrapMax")<GetUnitAbilityLevel(AM7,'A0RP')*3+2)and(GetRandomInt(1,3)==1)and(GetUnitManaPercent(AM7)>60.)and(AN7(800.,b5,Condition(function k8))>2)and(AN7(800.,b5,Condition(function Kh))==0)and(not GD8(AM7))and(IssuePointOrderById(AM7,852190,GetUnitX(AM7)+GetRandomReal(-100.,100.),GetUnitY(AM7)+GetRandomReal(-100.,100.)))
endif
elseif(id=='E02K')then
if X77==null then
set X77=AH7(700.,b5,Condition(function k6))
endif
if(not J4)and(X77!=null)and(Bz>V74[16+O5])and((GetUnitLifePercent(X77)<70.)or(h4[O5]!=null))then
set UP=AN7(315.,L_7(X77),Condition(function k8))
if(not J4)then
set J4=(UP>=3)and(C_7(AM7,852089,'A2JB',X77))
endif
endif
if(not J4)and(Bz>V74[32+O5])and((GetUnitLifePercent(AM7)<60)or((h4[O5]!=null)and((GetUnitLifePercent(AM7)<80)or(UnitCountBuffsEx(AM7,false,true,true,true,false,false,false)>=0))))then
set J4=IssueTargetOrderById(AM7,852248,AM7)
endif
if(not J4)and(Bz>V74[O5])and(G0[256+O5])and((GetUnitLifePercent(X77)<30 and GetUnitLifePercent(AM7)>GetUnitLifePercent(X77)+25)or(GZ[208+O5]and GetUnitLifePercent(X77)<60))then
set J4=IssueTargetOrderById(AM7,852095,X77)
endif
if(not J4)and(Bz>V74[32+O5])then
set X77=AH7(800.,b5,Condition(function I28))
set J4=(X77!=null)and(IssueTargetOrderById(AM7,852248,X77))
endif
elseif(id=='E02X')then
call SetPlayerAbilityAvailable(pl,'A27G',(GetHeroLevel(AM7)>9)and(GetUnitManaPercent(AM7)>70.))
if eY[448+O5]!=0 and ZL7(AM7)then
if(IsUnitInRange(AM7,h4[320+O5],950.))and(LoadInteger(R8,(GetHandleId(h4[320+O5])),(705))==eY[448+O5])then
set J4=IssueTargetOrderById(AM7,852665,h4[320+O5])
else
set eY[448+O5]=0
endif
endif
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>3)and(GetUnitManaPercent(AM7)>70.))then
set X77=AH7(700.,b5,Condition(function k6))
endif
if not J4 then
set J4=(X77!=null)and(GetHeroLevel(AM7)>3)and((GetUnitManaPercent(AM7)>40.)or(A47(X77,AM7)))and(C_7(AM7,852184,'A27G',X77))
endif
if(not J4)and hq[816+O5]>Bz then
set G0[288+O5]=true
call MGG()
endif
set G0[304+O5]=false
elseif(id=='E032')then
if X77==null then
set X77=AH7(700.,b5,Condition(function k6))
endif
if(not J4)then
if GetUnitAbilityLevel(AM7,'A2FX')==0 then
if(h4[O5]!=null)and(not IsUnitInRange(AM7,X77,400))then
if OM8(AM7,X77,1000,.1,1200)!=null then
call IssuePointOrderByIdLoc(AM7,852216,H57)
endif
endif
else
if(h4[O5]==null)or(IsUnitInRange(AM7,X77,400))or(AO7(225,LUnit(GetHandleId(AM7),"AI|ShredChakram"),Condition(function k6))==0)then
call IssueImmediateOrderById(AM7,852177)
endif
endif
call TriggerSleepAction(.1)
endif
if(not J4)and(X77!=null)and(Bz>V74[32+O5])and((h4[O5]!=null)or(GetUnitLifePercent(AM7)<70))then
set UP=600+200*GetUnitAbilityLevel(AM7,'A2E3')
if OM8(AM7,X77,2*UP,.8,UP)!=null then
if KE8(AM7,UP)or((XL4!=null)and(bj_enumDestructableRadius==0)and(Z47(XL4,AM7)>400.))then
set J4=IssuePointOrderByIdLoc(AM7,852662,H57)
endif
endif
if(not J4)and(GetUnitLifePercent(X77)<30)then
if K98(L_7(X77),300)and(Z47(XL4,AM7)>400.)then
set J4=IssuePointOrderById(AM7,852662,GetDestructableX(XL4),GetDestructableY(XL4))
endif
endif
endif
if(not J4)and(X77!=null)and(Bz>V74[16+O5])and(IsUnitInRange(AM7,X77,300))then
set J4=DE8(AM7,852526,'A2FK')
endif
endif
elseif id<='Hzzz' then
if(id=='H00Q')then
if(GetHeroLevel(AM7)>6)then
set X77=K3(700.,AM7,Condition(function k6))
set J4=(X77!=null)and((GetUnitState(AM7,UNIT_STATE_LIFE)*.5)>GetUnitState(X77,UNIT_STATE_LIFE))and(IssueTargetOrderById(AM7,852231,X77))
endif
if(not J4)then
set X77=AH7(800.,b5,Condition(function I28))
if(X77==null)then
set X77=AH7(600.,b5,Condition(function I68))
endif
set J4=((X77!=null)and(GetUnitLifePercent(X77)<70.)and((GetHeroLevel(AM7)>4)or(A47(X77,AM7)))and(IssueTargetOrderById(AM7,852095,X77)))or((GetUnitLifePercent(AM7)<70.)and(IssueTargetOrderById(AM7,852095,AM7)))
endif
elseif(id=='H00S')then
set F_8=AO7(500,AM7,Condition(function IL8))
if X77==null then
set X77=JT8(450.,AM7)
if X77==null then
set X77=JT8(1000.,AM7)
endif
endif
set N7G=WI7(X77==null,0,AO7(600,X77,Condition(function k6)))
set N8G=WI7(X77==null,0,AO7(500,X77,Condition(function IL8)))
if LState(AM7,"OverloadActive")then
if(h4[O5]!=null)and(GetUnitLevel(AM7)>5)and(not IsUnitInRange(AM7,h4[O5],450.))and(A47(X77,AM7))then
call OM8(AM7,X77,625*(GetUnitAbilityLevel(AM7,'A14O')+1),1.,99999)
if H57!=null then
set J4=((GetUnitAbilityLevel(AM7,'A0IH')<1 or BI7(AM7,H57)<225)or(BI7(AM7,H57)<400 and N8G>=2))and L77(AM7,852218,'A14O',H57)
endif
endif
if(not J4)then
set J4=IssueTargetOrderById(AM7,851983,X77)
endif
elseif X77!=null and(GetUnitLevel(AM7)>3)then
if(not J4)and((h4[O5]!=null)or(GetUnitState(AM7,UNIT_STATE_MANA)>200.))and((IsUnitInRange(AM7,X77,300.)or G0[256+O5]))then
set J4=(C_7(AM7,852119,'A14R',X77))
endif
if(not J4)and(IsUnitInRange(AM7,X77,200.))then
set J4=(DE8(AM7,852526,'A14P'))
endif
if(not J4)and(h4[O5]!=null)then
if(not IsUnitInRange(AM7,h4[O5],450.))and((A47(X77,AM7))or(G0[256+O5]))then
call OM8(AM7,X77,625*(GetUnitAbilityLevel(AM7,'A14O')+1),1.,99999)
if H57!=null then
set J4=(IsUnitInRange(AM7,X77,350)or GetUnitAbilityLevel(AM7,'A0IH')<1 or(N8G>=2 and IsUnitInRange(AM7,X77,450)))and L77(AM7,852218,'A14O',H57)
endif
elseif GetUnitState(AM7,UNIT_STATE_MANA)>300. then
set F37=Atan2(GetUnitY(X77)-GetUnitY(AM7),GetUnitX(X77)-GetUnitX(AM7))
call MoveLocation(HB,GetUnitX(AM7)+150*Cos(F37),GetUnitY(AM7)+150*Sin(F37))
set J4=(IsUnitInRange(AM7,X77,350)or GetUnitAbilityLevel(AM7,'A0IH')<1)and L77(AM7,852218,'A14O',HB)
endif
endif
if(not J4)then
if AO7(200.,AM7,Condition(function BU7))>2 and(GetUnitState(AM7,UNIT_STATE_MANA)>500. or GetUnitManaPercent(AM7)>90.)then
set J4=(DE8(AM7,852526,'A14P'))
endif
endif
endif
elseif(id=='H00T')then
if(X77==null)then
set X77=AH7(1200.,b5,Condition(function k6))
endif
if(not J4)and(GetUnitLevel(AM7)>5)and(Bz>V74[O5])and(not IsUnitInRange(AM7,X77,300))and(h4[O5]!=null)and(GZ[208+O5]or((AO7(700.,X77,Condition(function AQ7))==0)and(GetUnitLifePercent(X77)<70. or A97(O5))))then
set UP=GetUnitAbilityLevel(AM7,'A0Z8')
if UP==0 then
set UP=GetUnitAbilityLevel(AM7,'A1CV')
endif
if(OO8(AM7,X77,.5,(UP+3)*500)!=null)then
if(OK8(AM7,X77,GetLocationX(H57),GetLocationY(H57),'}',Condition(function UZ8)))or(IsUnitInRange(bj_lastReplacedUnit,X77,175)and(IsUnitEnemy(bj_lastReplacedUnit,Player(O5))or AR7(AM7,BU[FS4])))then
set J4=(D88(AM7,852652,'A0Z8','A1CV',GetLocationX(H57),GetLocationY(H57)))
endif
endif
if J4 then
call Y07(.1)
set J4=false
endif
endif
if(not J4)and(Bz>V74[48+O5])and(GetUnitAbilityLevel(AM7,'A0Z6')>1)then
if(X77==null)then
set X77=AH7(99999.,GetUnitLoc(AM7),Condition(function k6))
endif
if((X77!=null))then
if(GetUnitLifePercent(X77)<50. or GetUnitState(AM7,UNIT_STATE_MANA)>300.)then
if A47(X77,AM7)or GZ[208+O5]or h4[O5]!=null then
if OM8(AM7,X77,1200.,0,99999.)!=null then
set J4=L77(AM7,852089,'A0Z6',H57)
endif
else
set J4=L77(AM7,852089,'A0Z6',L_7(X77))
endif
endif
endif
endif
if(not J4)and(Bz>V74[32+O5])and(X77!=null)and(X_7(AM7)>1000.)and(G0[256+O5])and(GetUnitState(AM7,UNIT_STATE_MANA)>200.)and(IsUnitInRange(AM7,X77,210))then
set J4=IssueImmediateOrderById(AM7,852581)
endif
if(not J4)and(Bz>V74[16+O5])and(h4[O5]!=null)and(IsUnitInRange(AM7,X77,275))then
set J4=IssueImmediateOrderById(AM7,852600)
endif
elseif(id=='H0DO')then
if X77==null then
set X77=AH7(800.,b5,Condition(function k6))
endif
if(not J4)and(X77!=null)and(Bz>V74[48+O5])and((h4[O5]!=null)or(GetUnitManaPercent(X77)>60 and GetUnitLifePercent(X77)<70))and((Bz<V74[O5])or(GetUnitState(AM7,UNIT_STATE_MANA)>WPF(AM7,'A2BG',I87)+'d'))then
set J4=C_7(AM7,852668,'A2HN',X77)
endif
if(not J4)and(X77!=null)and(Bz>V74[O5])and(not GV8(X77))and((GetUnitLifePercent(X77)<30)or(S19(X77))or(GetUnitAbilityLevel(X77,'B0FY')!=0))then
set J4=(OO8(AM7,X77,.5,1200)!=null)and(IssuePointOrderByIdLoc(AM7,852662,H57))
endif
if(not J4)and(X77!=null)and(Bz>V74[32+O5])and((GetUnitLifePercent(X77)<70)or(h4[O5]!=null))and(AO7(Z47(AM7,X77),AM7,Condition(function k6))<=1)then
set J4=DE8(AM7,852526,'A2IT')
endif
if(not J4)and(X77!=null)and(Bz>V74[16+O5])and((GetUnitLifePercent(X77)<70)or(h4[O5]!=null)or(GetUnitManaPercent(X77)>80))and((Bz<V74[O5])or(GetUnitState(AM7,UNIT_STATE_MANA)>WPF(AM7,'A2BG',I87)+'d'))then
set J4=C_7(AM7,852119,'A2BE',X77)
endif
endif
elseif id<='Nzzz' then
if(id=='N00B')then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>3)and(GetUnitManaPercent(AM7)>70.))then
set X77=AH7(1100.,b5,Condition(function k6))
endif
if((X77!=null)and(((GetHeroLevel(AM7)>3)and(GetUnitManaPercent(AM7)>50.))or(GetUnitLifePercent(X77)<60.)))then
set J4=IssuePointOrderById(AM7,852662,GetUnitX(X77)+150.*Cos(GetUnitFacing(X77)*bj_DEGTORAD),GetUnitY(X77)+150.*Sin(GetUnitFacing(X77)*bj_DEGTORAD))
if((GetUnitLifePercent(AM7)>70.)and((Bz>hq[16+O5])or(AF7(X77,AM7)))and(G0[128+O5])and(GetUnitLifePercent(X77)<60.)and(GetUnitState(AM7,UNIT_STATE_LIFE)>(GetUnitState(X77,UNIT_STATE_LIFE)+(15.*GetHeroLevel(X77))))and((AO7(800.,X77,Condition(function JP8))-AO7(800.,X77,Condition(function IL8)))<=1))then
set h4[16+O5]=X77
else
set h4[16+O5]=null
endif
set hq[240+O5]=Bz+3.
endif
if((not J4)and(X77!=null)and(GetUnitLifePercent(X77)<60.)and(IsUnitInRange(AM7,X77,700.)))then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(X77)-GetUnitY(DH8(X77)),GetUnitX(X77)-GetUnitX(DH8(X77))))
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),'A0S8',true)
set GZ[O5]=true
call J8(O5,IssuePointOrderById(AM7,852089,GetUnitX(X77)+250.*Cos(UP*bj_DEGTORAD),GetUnitY(X77)+250.*Sin(UP*bj_DEGTORAD)))
endif
if(not J4)then
set X77=K3(400.,AM7,Condition(function k6))
set J4=(X77!=null)and(IssueImmediateOrderById(AM7,852600))
endif
if((not J4)and(GetHeroLevel(AM7)>13)and(hq[416+O5]>Bz)and(Bz>hq[O5])and(G0[128+O5]))then
set UP=AN7(1000.,b5,Condition(function k6))
if((UP>1)and((AN7(1000.,b5,Condition(function IL8))>0)or(DI8(IsUnitAlly(AM7,G8[0]))==1)))then
set X77=AH7(800.,b5,Condition(function k6))
if(AO7(375.,X77,Condition(function k6))>0)then
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),'A0S8',true)
set GZ[O5]=true
call J8(O5,IssuePointOrderById(AM7,852089,GetUnitX(X77),GetUnitY(X77)))
endif
endif
endif
elseif(id=='N01V')then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>4))then
if((eY[O5]==9)and(h4[144+O5]!=null)and(Z_7(h4[144+O5]))and(IsUnitInRange(AM7,h4[144+O5],1200.))and(not IsUnitVisibleEx(AM7,GetOwningPlayer(h4[144+O5]))))then
set X77=h4[144+O5]
else
set X77=AH7(800.,b5,Condition(function k6))
endif
endif
if((X77!=null)and(GetHeroLevel(AM7)>4))then
if(not IsUnitInRange(AM7,X77,800.))then
set J4=((eY[O5]==9)or(not IsUnitVisibleEx(AM7,GetOwningPlayer(X77))))and(VNF(AM7,X77))
elseif(not IsUnitInRange(AM7,X77,300.))then
set UP=R2I(RAbsBJ((bj_RADTODEG*Atan2(GetUnitY(X77)-GetUnitY(AM7),GetUnitX(X77)-GetUnitX(AM7)))-GetUnitFacing(AM7)))
set J4=((GetUnitLifePercent(X77)<60.)or(AO7(600.,X77,Condition(function I68))>0))and((VNF(AM7,X77))or((Bz>hq[O5])and(UP<50)and(GetUnitState(AM7,UNIT_STATE_MANA)>230.)and((GetUnitAbilityLevel(AM7,'A0IH')<1 or GetWidgetLife(AM7)>1900)and L9F(AM7,true))))
elseif(GetUnitLifePercent(X77)<40. and IsUnitInRange(AM7,X77,300.))then
set J4=VNF(AM7,X77)
endif
if(not J4)and((GetUnitManaPercent(AM7)>50.)or(GetUnitLifePercent(X77)<60.))then
set J4=IssueImmediateOrderById(AM7,852600)
endif
endif
if((not J4)and(GetHeroLevel(AM7)>5)and(Bz>hq[16+O5]))then
set bj_lastLoadedUnit=X77
set X77=Ie(bj_mapInitialPlayableArea,Condition(function I28))
set J4=(X77!=null)and(AO7(800.,X77,Condition(function k6))>0)and(IssueImmediateOrderById(AM7,852493))
set X77=bj_lastLoadedUnit
endif
if(not J4)and(Bz>V74[32+O5])and(h4[O5]==null)and(GetUnitAbilityLevel(AM7,'A0L8')>1)and(GetUnitState(AM7,UNIT_STATE_MANA)>=230.)then
if((not J4)and(X77!=null)and(not IsUnitInRange(AM7,X77,450.))and(iU(AM7))and(G0[128+O5])and(not G0[48+O5])and(AN7(400.,b5,Condition(function k8))==0))then
set UP=R2I(Z87(GetUnitX(AM7),GetUnitY(AM7),GetUnitX(X77),GetUnitY(X77)))
if(GetRandomInt(1,2)==1)then
set id=R2I(bj_RADTODEG*Atan2(GetUnitY(AM7)-GetUnitY(X77),GetUnitX(AM7)-GetUnitX(X77)))-25
else
set id=R2I(bj_RADTODEG*Atan2(GetUnitY(AM7)-GetUnitY(X77),GetUnitX(AM7)-GetUnitX(X77)))+25
endif
set J4=IssuePointOrderById(AM7,851986,GetUnitX(X77)+UP*Cos(id*bj_DEGTORAD),GetUnitY(X77)+UP*Sin(id*bj_DEGTORAD))
endif
endif
elseif(id=='N0EG')then
if X77==null then
set X77=AH7(700.,b5,Condition(function k6))
endif
if(not J4)and(X77!=null)and(Bz>V74[16+O5])and((GetUnitLifePercent(X77)<60)or(h4[O5]!=null))then
set F37=Atan2(GetUnitY(X77)-GetUnitY(AM7),GetUnitX(X77)-GetUnitX(AM7))
if(V38(AM7,X77,F37)!=null)or(VZ8(AM7,X77,F37)!=null)then
set J4=C_7(AM7,852119,'A12J',X77)
if J4 then
call VTF(O5,X77,false,false)
endif
endif
if(not J4)and(not OK8(AM7,X77,GetUnitX(X77),GetUnitY(X77),64,Condition(function U68)))and(IsUnitInRange(AM7,bj_lastLoadedUnit,550.))then
set J4=C_7(AM7,852119,'A12J',bj_lastLoadedUnit)
if J4 then
call VTF(O5,X77,false,false)
endif
endif
if(not J4)and(h4[O5]!=null)and(GetUnitLifePercent(X77)<20.)then
set J4=C_7(AM7,852119,'A12J',X77)
endif
endif
if(not J4)and(Bz>V74[O5])and(X77!=null)and(S19(X77)or GetUnitMoveSpeed(X77)<300.)and(IsUnitInRange(AM7,X77,700.))and((X77==h4[O5])or(GetUnitLifePercent(X77)<70))then
set J4=D78(AM7,852230,'A12P','A1D6',X77)
if J4 then
call VTF(O5,X77,false,false)
endif
endif
if X77==null then
set X77=AH7(1200.,b5,Condition(function k6))
endif
set UP=GetUnitAbilityLevel(AM7,'A12P')
if UP==0 then
set UP=GetUnitAbilityLevel(AM7,'A1D6')
endif
if(not J4)and(X77!=null)and(Bz>V74[32+O5])and(GetUnitAbilityLevel(AM7,'A12K')>1)and((GetUnitState(AM7,UNIT_STATE_MANA)>200.+UP*100.)or(h4[O5]!=null))and((GetUnitLifePercent(X77)>40.)or(GetWidgetLife(X77)<GetUnitAbilityLevel(AM7,'A12K')*70))and(OM8(AM7,X77,3000.,1.,1800.)!=null)then
set J4=IssuePointOrderByIdLoc(AM7,852662,H57)
endif
if(not J4)and(Bz>V74[48+O5])and(((hq[704+O5]<-.1)and(X77!=null))or((hq[704+O5]<-.8)and(GetUnitLifePercent(AM7)<60.)))then
set J4=DE8(AM7,852526,'A14I')
endif
if(not J4)and(Bz>V74[32+O5])and(GetUnitAbilityLevel(AM7,'A12K')>1)and(GetUnitState(AM7,UNIT_STATE_MANA)>300.+UP*100.)then
set X77=K3(1500.,AM7,Condition(function B47))
if(X77!=null)then
set H04=AM7
call OK8(AM7,X77,GetUnitX(X77),GetUnitY(X77),175,Condition(function UM8))
call XK7("Alleria Powershot2 "+I2S(bj_forLoopAIndex))
if bj_forLoopAIndex>2 then
set J4=IssuePointOrderById(AM7,852662,GetUnitX(X77),GetUnitY(X77))
endif
endif
endif
if(not J4)and(Bz>V74[16+O5])and(h4[O5]==null)and(GetUnitAbilityLevel(AM7,'A12J')>1)and(GetUnitState(AM7,UNIT_STATE_MANA)>=250.)then
if X77==null or(not IsUnitInRange(X77,AM7,700))then
set X77=AH7(700.,b5,Condition(function k6))
endif
if((not J4)and(X77!=null)and(not IsUnitInRange(AM7,X77,450.))and(iU(AM7))and(G0[128+O5])and(not G0[48+O5])and(AN7(400.,b5,Condition(function k8))==0))then
set UP=R2I(Z87(GetUnitX(AM7),GetUnitY(AM7),GetUnitX(X77),GetUnitY(X77)))
if(GetRandomInt(1,2)==1)then
set id=R2I(bj_RADTODEG*Atan2(GetUnitY(AM7)-GetUnitY(X77),GetUnitX(AM7)-GetUnitX(X77)))-25
else
set id=R2I(bj_RADTODEG*Atan2(GetUnitY(AM7)-GetUnitY(X77),GetUnitX(AM7)-GetUnitX(X77)))+25
endif
set J4=IssuePointOrderById(AM7,851986,GetUnitX(X77)+UP*Cos(id*bj_DEGTORAD),GetUnitY(X77)+UP*Sin(id*bj_DEGTORAD))
endif
endif
elseif(id=='N0M0')then
if X77==null then
set X77=AH7(700.,b5,Condition(function k6))
endif
if(not J4)and(X77!=null)and((h4[O5]!=null)or(GetUnitLifePercent(X77)<60))and(GetUnitState(AM7,UNIT_STATE_MANA)>'d')then
set UP=1
loop
exitwhen UP>3
set bj_lastCreatedUnit=(LoadUnitHandle(R8,GetHandleId(AM7),(1450+UP)))
exitwhen bj_lastCreatedUnit==null
if(GetWidgetLife(bj_lastCreatedUnit)>0)and(IsUnitInRange(bj_lastCreatedUnit,X77,300))then
set J4=IssuePointOrderById(AM7,852185,GetUnitX(bj_lastCreatedUnit),GetUnitY(bj_lastCreatedUnit))
exitwhen true
endif
set UP=UP+1
endloop
if(not J4)and(not IsUnitInRange(AM7,X77,400))and(LoadInteger(R8,GetHandleId(AM7),(747))>0)and(OM8(AM7,X77,GetUnitMoveSpeed(AM7)*2.5,.2,1500.)!=null)then
set J4=IssuePointOrderByIdLoc(AM7,852490,H57)
endif
if J4 then
call VTF(O5,X77,false,false)
endif
endif
if(not J4)and(X77!=null)and(Bz>V74[16+O5])and((h4[O5]!=null)or(GetUnitLifePercent(X77)<70))and(IsUnitInRange(AM7,X77,350))and(AO7(400.,AM7,Condition(function BU7))<=2)then
set J4=DE8(AM7,852526,'A2H3')
endif
if(not J4)and(X77!=null)and(Bz>V74[32+O5])and((h4[O5]!=null)or(GetUnitManaPercent(AM7)>50 and GetUnitState(AM7,UNIT_STATE_MANA)>220))then
set J4=C_7(AM7,852089,'A2H0',X77)
endif
if(not J4)and(X77!=null)and(Bz>V74[48+O5])and(h4[O5]!=null)then
set J4=IssueImmediateOrderById(AM7,852600)
call XK7("FlameGuard "+I2S(O5))
endif
if(not J4)and(Bz>V74[32+O5])and(GetUnitManaPercent(AM7)>50 and GetUnitState(AM7,UNIT_STATE_MANA)>400)then
set X77=AH7(700.,b5,Condition(function BU7))
if(X77!=null)then
set J4=C_7(AM7,852089,'A2H0',X77)
endif
endif
elseif(id=='N0MD')then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>4))then
set X77=AJ7(650.,b5,Condition(function k6))
endif
if(X77!=null and h9[O5]!=null and Bz>V74[32+O5]and LInt(GetHandleId(GetOwningPlayer(X77)),"AI|Class")<=2)then
set J4=(C_7(AM7,852119,'A2T5',X77))
endif
if(X77!=null)and(((((GetUnitManaPercent(AM7)>80. or GetUnitState(AM7,UNIT_STATE_MANA)>300)and(h9[O5]!=null))or(A47(X77,AM7)))and(Bz>V74[16+O5])and(Bz>V74[48+O5]))or(GetWidgetLife(X77)<67.5*GetUnitAbilityLevel(AM7,'A2SG')))then
set J4=(C_7(AM7,852662,'A2SG',X77))
endif
if(not J4)and(GetHeroLevel(AM7)>5)and(Bz>V74[O5])then
set X77=AH7(750.,b5,Condition(function I28))
set J4=(X77!=null)and(GetUnitManaPercent(AM7)>50. or GetUnitLifePercent(X77)<30.)and(IssueTargetOrderById(AM7,852600,X77))
if(not J4)and(GetUnitLifePercent(AM7)<40.)then
set J4=(IssueTargetOrderById(AM7,852600,AM7))
endif
endif
if(not J4)and(Bz>V74[32+O5])then
set H58=null
set N=GT7
set H58=AH7(700,b5,And(Condition(function k6),Condition(function J48)))
if H58==null then
set N=GU7
set H58=AH7(700,b5,And(Condition(function k6),Condition(function J48)))
endif
set J4=(H58!=null)and(C_7(AM7,852119,'A2T5',H58))
endif
set N=GT7
set H58=AH7(700,b5,And(Condition(function k6),Condition(function J48)))
if H58==null then
set N=GU7
set H58=AH7(700,b5,And(Condition(function k6),Condition(function J48)))
endif
elseif(id=='N0MU' or id=='N0MW')then
call RemoveSavedInteger(R8,GetHandleId(AM7),StringHash("Roll|Stone"))
call RemoveSavedReal(R8,GetHandleId(AM7),StringHash("Roll|Distance"))
call RemoveSavedBoolean(R8,GetHandleId(AM7),StringHash("Roll|State"))
call RemoveSavedHandle(R8,GetHandleId(AM7),StringHash("KaolinTarget"))
set N9G=AO7(650,AM7,Condition(function k6))
set NFG=RK7
set N7G=AO7(650,AM7,Condition(function IL8))
set N8G=RK7
set M_G=(AA7(AM7)>0)
set N4G=WI7(M_G,1600,800)
set NGG=AO7(500,AM7,Condition(function I_8))
set bj_lastCreatedUnit=AM7
set H58=B97(1400,AM7,Condition(function C07))
set J4=H58!=null and AA7(AM7)>=WI7(GetWidgetLife(H58)<=600,0,1)and(LE7(AM7,GetUnitX(H58)+GetRandomReal(-'d','d'),GetUnitY(H58)+GetRandomReal(-'d','d'),null,'A2QI')or(LE7(AM7,GetUnitX(H58)+GetRandomReal(-'d','d'),GetUnitY(H58)+GetRandomReal(-'d','d'),null,'A2QI')or IssuePointOrderById(AM7,852218,GetUnitX(H58)+GetRandomReal(-'d','d'),GetUnitY(H58)+GetRandomReal(-'d','d'))))
if J4 then
call TriggerSleepAction(.5)
if(GetWidgetLife(AM7)>400 or GetWidgetLife(H58)<=400)and IssueTargetOrderById(AM7,851983,H58)then
endif
endif
if not J4 then
if(GetUnitLifePercent(AM7)<=15. or GetWidgetLife(AM7)<=200)or(GetUnitLifePercent(AM7)<=25. and NFG>2.5*GetWidgetLife(AM7))then
set MCG=kk(AM7,N4G,h9[16+O5])
set NDG=Atan2(GetLocationY(MCG)-GetUnitY(AM7),GetLocationX(MCG)-GetUnitX(AM7))
set YXE=GetUnitX(AM7)+'d'*Cos(NDG)
set YYE=GetUnitY(AM7)+'d'*Sin(NDG)
set J4=(GetUnitAbilityLevel(AM7,'A0IH')<1)and(MCG!=null and N9G-N7G>N7G)and LE7(AM7,YXE,YYE,null,'A2TJ')
if not J4 then
set J4=(MCG!=null)and IssuePointOrderByIdLoc(AM7,852662,MCG)
if J4 and AA7(AM7)>0 then
call SaveInteger(R8,GetHandleId(AM7),StringHash("Roll|Stone"),1)
endif
endif
if J4 then
call SaveBoolean(R8,GetHandleId(AM7),StringHash("Roll|State"),true)
endif
endif
endif
if not J4 then
if Bz>V74[O5]then
set bj_lastCreatedUnit=AM7
set NEG=AO7(300,AM7,Condition(function k6))
if NEG>0 then
set N8G=RK7
set X77=B97(300,AM7,Condition(function k6))
else
set NEG=AO7(300,AM7,Condition(function k6))
if NEG>0 then
set NEG=AO7(600,AM7,Condition(function k6))
set X77=B97(600,AM7,Condition(function k6))
set N8G=RK7
endif
endif
if NEG>.0 and(N8G/ NEG<=800. or GetUnitLifePercent(X77)<=70. or GetWidgetLife(X77)<=150+150*GetUnitAbilityLevel(AM7,'A2TI')+AA7(AM7)*200+GetRandomReal(0,'d')or Bz<=RMinBJ(V74[48+O5],RMinBJ(V74[16+O5],V74[32+O5])))then
set NDG=YH7(AM7,X77)
if Bz>V74[48+O5]then
set YXE=GetUnitX(X77)+'d'*CosBJ(NDG)
set YYE=GetUnitY(X77)+'d'*SinBJ(NDG)
elseif Bz>V74[16+O5]then
set F_8=WI7(IsUnitInRange(AM7,X77,250),10,RMinBJ(450,BS7(AM7,X77)/ 2))
set YXE=GetUnitX(X77)-F_8*CosBJ(NDG)
set YYE=GetUnitY(X77)-F_8*SinBJ(NDG)
elseif Bz>V74[32+O5]then
set YXE=GetUnitX(AM7)+150*CosBJ(NDG)
set YYE=GetUnitY(AM7)+150*SinBJ(NDG)
else
set F_8=GetRandomReal(1,360)
set NDG=GetRandomReal(150,450)
set YXE=GetUnitX(AM7)+NDG*CosBJ(NDG)
set YYE=GetUnitY(AM7)+NDG*SinBJ(NDG)
endif
set J4=(X77!=null)and LE7(AM7,YXE,YYE,null,'A2TI')
if not J4 then
set J4=(X77!=null)and IssueImmediateOrderById(AM7,852551)
endif
endif
endif
set N7G=AO7(650,AM7,Condition(function IL8))
set N8G=RK7
endif
if not J4 then
set TI7=AM7
set TC7=mobang
set F_8=AO7(800,AM7,And(Condition(function k6),Condition(function BD7)))
set TC7=mozhang
set F_8=F_8+AO7(800,AM7,And(Condition(function k6),Condition(function BD7)))
set H58=AK7(1400,AM7,And(Condition(function B87),Condition(function C87)))
if H58==null then
set H58=AK7(1400,AM7,Condition(function C97))
endif
set J4=(H58!=null)and(G0[256+O5]or(ZL7(H58)==false or NGG>0 or((GetUnitManaPercent(AM7)>=50. or GetUnitState(AM7,UNIT_STATE_MANA)>=250.)and GetHeroLevel(AM7)>2+WI7(F_8>0,2,0))))and IssueTargetOrderById(AM7,852125,H58)
endif
if not J4 then
set X77=B97(1400,AM7,And(Condition(function k6),Condition(function B57)))
if X77==null then
set X77=B97(1400,AM7,Condition(function k6))
endif
set TC7=mobang
set F_8=AO7(800,AM7,And(Condition(function k6),Condition(function BD7)))
set TC7=mozhang
set F_8=F_8+AO7(800,AM7,And(Condition(function k6),Condition(function BD7)))
set NDG=YH7(AM7,X77)
if GetUnitLifePercent(X77)<=75. or(N7G>=2 and N8G>=(350-GetRandomReal(0,50))*N7G)or ZL7(X77)==false or((GetUnitManaPercent(AM7)>=55. or GetUnitState(AM7,UNIT_STATE_MANA)>=400.)and(GetHeroLevel(AM7)>2+WI7(F_8>0,2,1)or GetWidgetLife(X77)<=350.))then
set YXE=GetUnitX(X77)+'d'*CosBJ(NDG)
set YYE=GetUnitY(X77)+'d'*SinBJ(NDG)
set J4=(X77!=null)and((G0[256+O5])or NGG>0 or((GetUnitLifePercent(X77)<=50.+N9G*10 or GetWidgetLife(X77)<=300.)and AA7(AM7)>=2))and LE7(AM7,YXE,YYE,null,'A2QI')
call LO7(J4,AM7,X77,0)
else
set J4=false
endif
if not J4 then
set R_7=R2I(N9G)
set X77=B97(1400,AM7,Condition(function HJ8))
set J4=(X77!=null)and AO7(600,X77,Condition(function k6))>=2 and IssueTargetOrderById(AM7,852125,X77)
endif
endif
if not J4 then
set X77=B97(N4G-150-GetRandomReal(0,25),AM7,Condition(function BX7))
set F_8=AO7(600,X77,Condition(function k6))
if not((GetUnitAbilityLevel(AM7,'A0IH')>0 and IsUnitInRange(AM7,X77,350)==false)or GetUnitAbilityLevel(AM7,'A2TJ')<1 or V74[32+O5]>=Bz or LoadInteger(FY7,'A2TJ',4+GetUnitAbilityLevel(AM7,'A2TJ'))>GetUnitState(AM7,UNIT_STATE_MANA))then
set NDG=YH7(AM7,X77)
if(X77!=null)and(GetHeroLevel(AM7)>=3 or GetWidgetLife(X77)<=350. or GetUnitLifePercent(X77)<=60.)and((GetUnitLifePercent(AM7)>40. or GetWidgetLife(AM7)>200+25*(GetHeroLevel(AM7))or GetWidgetLife(X77)<=250. or GetUnitLifePercent(X77)<30.)and(G0[128+O5]or A47(X77,AM7)))or(GetUnitState(AM7,UNIT_STATE_MANA)>=175 and V74[O5]<Bz)or(N7G>=2 and RK7>=500.*N7G-'d')then
if S69(X77)==false then
set MCG=OM8(AM7,X77,N4G*RMaxBJ(1,GetUnitMoveSpeed(X77)/ 300.),.5,150)
set MCG=Location(GetLocationX(MCG),GetLocationY(MCG))
if GetUnitState(AM7,UNIT_STATE_MANA)>=175 and Bz>V74[O5]then
call MoveLocation(MCG,GetUnitX(X77),GetUnitY(X77))
call LO7(J4,AM7,X77,'A2QI')
else
if MCG==null and IsUnitInRange(AM7,X77,GetUnitMoveSpeed(X77)/ 150.*N4G+200)then
set MCG=Location(GetUnitX(AM7)+'d'*CosBJ(NDG),GetUnitY(AM7)+'d'*SinBJ(NDG))
else
set MCG=null
endif
endif
else
set MCG=Location(GetUnitX(AM7)+'d'*CosBJ(NDG),GetUnitY(AM7)+'d'*SinBJ(NDG))
endif
set NDG=YH7(AM7,X77)
if not IsUnitInRange(AM7,X77,300)then
set J4=(X77!=null)and MCG!=null and((AA7(AM7)>1 or N9G>=1)and LE7(AM7,GetLocationX(MCG),GetLocationY(MCG),null,'A2TJ'))
else
set J4=(X77!=null)and MCG!=null and(BI7(AM7,MCG)<=1200)and(AA7(AM7)>1 or GetUnitLifePercent(X77)<=20.)and IssuePointOrderByIdLoc(AM7,852662,MCG)
endif
if not J4 then
set J4=(X77!=null)and MCG!=null and(BI7(AM7,MCG)<=1400 and IsUnitInRange(AM7,X77,800))and(AA7(AM7)>1 or AB7(AM7)<1.2)and IssuePointOrderByIdLoc(AM7,852662,MCG)
if J4 and AA7(AM7)>0 then
call SaveInteger(R8,GetHandleId(AM7),StringHash("Roll|Stone"),1)
endif
endif
if J4 then
call SaveBoolean(R8,GetHandleId(AM7),StringHash("Roll|State"),false)
endif
call RemoveLocation(MCG)
set MCG=null
endif
endif
endif
if not J4 then
if Bz>V74[16+O5]then
set X77=B97(2400+150,AM7,Or(Condition(function k6),And(Condition(function k6),Condition(function B57))))
set MCG=OM8(AM7,X77,1200,.1,0)
if X77!=null and MCG==null then
call GroupRemoveUnit(iA,X77)
set X77=FirstOfGroup(iA)
loop
set MCG=OM8(AM7,X77,1200,.1,0)
exitwhen MCG!=null or X77==null
call GroupRemoveUnit(iA,X77)
set X77=FirstOfGroup(iA)
endloop
endif
set J4=(MCG!=null)and(X77!=null)and((ZL7(X77)==false)or NGG>0 or(GetWidgetLife(X77)<=GetUnitAbilityLevel(AM7,'A2QM')*50+50+'}'+'d')or((GetUnitManaPercent(AM7)>=65. or GetUnitState(AM7,UNIT_STATE_MANA)>=400.)and GetHeroLevel(AM7)>3))and LE7(AM7,GetLocationX(MCG),GetLocationY(MCG),null,'A2QM')
set MCG=null
if not J4 then
set TI7=AM7
set H58=AI7(250,AM7,Condition(function CD7))
set J4=H58!=null and C_7(AM7,852189,'A2QM',H58)
endif
if not J4 then
if not J4 then
set X77=B97(500,AM7,And(Condition(function B57),Condition(function k6)))
if X77==null then
set X77=B97(700,AM7,And(Condition(function B57),Condition(function k6)))
endif
set X77=V_7(X77==null,B97(1400.,AM7,And(Condition(function B57),Condition(function k6))),X77)
set X77=V_7(X77==null,B97(500,AM7,Condition(function k6)),X77)
if X77==null then
set X77=B97(700,AM7,Condition(function k6))
if X77==null then
set X77=B97(1400,AM7,Condition(function k6))
if GetUnitLifePercent(X77)>=35. or GetWidgetLife(X77)>=450. then
set X77=null
endif
endif
endif
if IsUnitInRange(AM7,X77,450+GetRandomReal(0,25))then
set NDG=YH7(AM7,X77)
set YXE=GetUnitX(AM7)+75*CosBJ(NDG)
set YYE=GetUnitY(AM7)+75*SinBJ(NDG)
set J4=(X77!=null)and(ZL7(X77)==false or MAG(X77,AM7,75,700,40,250)or GetWidgetLife(X77)<=GetUnitAbilityLevel(AM7,'A2QM')*50+50+125.)and LE7(AM7,YXE,YYE,null,'A2QM')
if J4 then
call LO7(true,AM7,X77,'A2QI')
endif
elseif S69(X77)or 225./ GetUnitMoveSpeed(X77)*1200>=BS7(AM7,X77)then
set NDG=YH7(AM7,X77)
set YXE=GetUnitX(AM7)+150*CosBJ(NDG)
set YYE=GetUnitY(AM7)+150*SinBJ(NDG)
set F_8=GetUnitAbilityLevel(AM7,'A2QM')*50+50+125.
set J4=(X77!=null)and(ZL7(X77)==false or(GetWidgetLife(X77)<=F_8+GetRandomReal(0,75)or(GetUnitLifePercent(X77)<=45. or(GetHeroLevel(AM7)>=3 and(AA7(AM7)>=3 and GetUnitState(AM7,UNIT_STATE_MANA)>=400.)))))and LE7(AM7,YXE,YYE,null,'A2QM')
endif
if not J4 then
set X77=CT7(0,AM7)
set J4=(X77!=null)and IsUnitInRange(AM7,X77,500)and C_7(AM7,852189,'A2QM',X77)
endif
if not J4 then
set X77=B17(500,AM7,800)
set J4=(X77!=null)and IsUnitInRange(AM7,X77,500)and C_7(AM7,852189,'A2QM',X77)
endif
endif
endif
endif
endif
if not J4 then
set bj_lastCreatedUnit=AM7
set H58=B97(1400,AM7,Condition(function C57))
set J4=H58!=null and AA7(AM7)>=WI7(GetWidgetLife(H58)<=300,0,1)and IssuePointOrderById(AM7,852218,GetUnitX(H58)+GetRandomReal(50,'d'),GetUnitY(H58)+GetRandomReal(50,'d'))
if J4 then
call TriggerSleepAction(.5)
if(GetWidgetLife(AM7)>400 or GetWidgetLife(H58)<=400)and IssueTargetOrderById(AM7,851983,H58)then
endif
endif
endif
if not J4 then
endif
elseif(id=='NC00')then
if((X77==null)and(G0[128+O5])and(GetHeroLevel(AM7)>10))then
set X77=AJ7(800.,b5,Condition(function k6))
endif
set J4=(X77!=null)and(((GetUnitManaPercent(AM7)>50.)and(GetHeroLevel(AM7)>4))or(A47(X77,AM7)))and(C_7(AM7,852095,'AHtb',X77))
if((not J4)and(GetHeroLevel(AM7)>10)and(X77!=null)and(not IsUnitIllusion(X77))and(GetUnitCurrentOrder(X77)!=851973)and(AO7(600.,X77,Condition(function IL8))>1))then
set J4=C_7(AM7,852095,'AHtb',X77)
endif
if not J4 then
if((GetUnitLifePercent(AM7)<=15. or GetWidgetLife(AM7)<=250)and(QZ8(AM7,140)and GetUnitState(AM7,UNIT_STATE_MANA)>=169))then
set X77=JR8(800,AM7,Condition(function KXG))
else
set X77=RO8(700,AM7,Condition(function KWG),7,.2*GetUnitState(X77,UNIT_STATE_MAX_LIFE)+(20+70*GetUnitAbilityLevel(AM7,'AHtb'))*WI7(GetUnitState(AM7,UNIT_STATE_MANA)>=170 and Bz>V74[16+O5],1,0))
endif
endif
endif
endif
if J4 then
endif
if not G0[304+O5]then
if((not J4)and(is(AM7)))then
if(GetUnitAbilityLevel(AM7,'B01Q')>0)then
set X77=AH7(250.,b5,Condition(function k6))
if(X77!=null)then
call UnitRemoveAbility(AM7,'B01Q')
set J4=IssueTargetOrderById(AM7,851983,X77)
else
set X77=AH7(800.,b5,Condition(function k6))
set J4=(X77!=null)and(not IsUnitVisibleEx(AM7,GetOwningPlayer(X77)))and(IssueTargetOrderById(AM7,851986,X77))
endif
elseif((Z47(AM7,DH8(AM7))<1000.)and(eY[O5]==1))then
if(AR7(AM7,BU[yuanxingxie]))then
if(h8[16+O5]==h7[14])then
set J4=JGG(0)
elseif(h8[16+O5]==h7[35])then
set J4=JGG(1)
elseif(h8[16+O5]==h7[55])then
set J4=JGG(2)
endif
elseif((GetHeroLevel(AM7)<11)and(not AS7(AM7)))then
set X77=null
if(((id=='H00I')and(GetHeroLevel(AM7)>5))or(id=='H00J'))then
elseif((IsPlayerAlly(pl,N8[0]))and(h8[16+O5]==h7[14])and(PL4<1))then
set X77=JX4
elseif((IsPlayerAlly(pl,G8[0]))and(h8[16+O5]==h7[14])and(PC4<1))then
set X77=I34
elseif((IsPlayerAlly(pl,N8[0]))and(h8[16+O5]==h7[35])and(P14<1))then
set X77=JW4
elseif((IsPlayerAlly(pl,G8[0]))and(h8[16+O5]==h7[35])and(P34<1))then
set X77=IZ4
elseif((IsPlayerAlly(pl,N8[0]))and(h8[16+O5]==h7[55])and(P04<1))then
set X77=JY4
elseif((IsPlayerAlly(pl,G8[0]))and(h8[16+O5]==h7[55])and(P64<1))then
set X77=IL4
endif
if(X77!=null)then
loop
call TriggerSleepAction(.5)
exitwhen(Bz>OJ7[160+O5])
endloop
set J4=FZ8(AM7,X77)
if(not J4 or not MLG)then
call DisableTrigger(GW4)
call RemoveItem(M6G)
call EnableTrigger(GW4)
else
call SetPlayerStateBJ(pl,PLAYER_STATE_RESOURCE_GOLD,(GetPlayerState(pl,PLAYER_STATE_RESOURCE_GOLD)-0))
call SInt(StringHash("Stats"+I2S(O5)),"NumOfConsumables",LInt(StringHash("Stats"+I2S(O5)),"NumOfConsumables")+1)
endif
endif
endif
endif
if((not J4)and(AR7(AM7,BU[xiwadeshouhu])))then
set X77=AH7(700.,b5,Condition(function KA))
if((X77!=null)and(GetUnitState(X77,UNIT_STATE_LIFE)>100.)and(GetUnitState(X77,UNIT_STATE_LIFE)<400.))then
if(not(IsUnitInRange(X77,AM7,550)))then
call IssuePointOrderById(AM7,851986,GetUnitX(X77),GetUnitY(X77))
call Y07(.5)
endif
set J4=(AO7(600.,AM7,Condition(function KA))>3)and(UnitUseItem(AM7,bj_lastCreatedItem))
endif
set X77=null
set J4=false
endif
if((not J4)and(AR7(AM7,BU[maidasizhishou])))then
if((GetRandomInt(1,10)<=4)and(Bz>hq[144+O5]))then
set X77=AH7(700.,b5,Condition(function k8))
set J4=(X77!=null)and(not IsUnitType(X77,UNIT_TYPE_MECHANICAL))and(not IsUnitType(X77,UNIT_TYPE_HERO))and(UnitUseItemTarget(AM7,bj_lastCreatedItem,X77))
endif
endif
if((not J4)and AR7(AM7,BU[yongqixunzhang]))then
set J4=(X77!=null)and(UnitUseItemTarget(AM7,bj_lastCreatedItem,X77))
endif
if((not J4)and AR7(AM7,BU[bizhang2])and(LState(AM7,"ArmletOfMordigan|Active")==false)and(GetUnitLifePercent(AM7)>90.)and(IsUnitInRange(AM7,X77,150.)))then
set J4=(X77!=null)and(UnitUseItem(AM7,bj_lastCreatedItem))
elseif(AR7(AM7,BU[bizhang])and(LState(AM7,"ArmletOfMordigan|Active"))and((not IsUnitInRange(AM7,X77,150.))or(GetUnitLifePercent(AM7)<60.)))then
set J4=(UnitUseItem(AM7,bj_lastCreatedItem))
endif
if((not J4)and AR7(AM7,BU[atuosizhigun]))then
set J4=(X77!=null)and(GetUnitLifePercent(X77)<40)and(UnitUseItemTarget(AM7,bj_lastCreatedItem,X77))
endif
if((not J4)and(AR7(AM7,BU[yuanlifazhang])))then
set J4=(X77!=null)and(GetUnitLifePercent(X77)<30)and(G0[256+O5]or GZ[208+O5])and(Y57(X77,AM7,30))and(UnitUseItemTarget(AM7,bj_lastCreatedItem,X77))
endif
if((not J4)and(AR7(AM7,BU[yingzhilingkan]))and(GetItemCharges(bj_lastCreatedItem)>0)and(Bz>V74[224+O5])and(GetUnitState(X77,UNIT_STATE_LIFE)<'x'))then
set J4=(UnitUseItemTarget(AM7,bj_lastCreatedItem,X77))
endif
if((not J4)and(AR7(AM7,BU[zhangu]))and(GetItemCharges(bj_lastCreatedItem)>0)and(Bz>V74[256+O5]))then
set J4=((AO7(900.,AM7,Condition(function JP8)))>2)and((AO7(900.,AM7,Condition(function IL8)))>1)and(UnitUseItem(AM7,bj_lastCreatedItem))
endif
if((not J4)and(L67(AM7))and(Bz>V74[192+O5]))then
if(GetUnitState(AM7,UNIT_STATE_LIFE)<150)or((GetItemCharges(bj_lastCreatedItem)>=8)and(GetUnitLifePercent(AM7)<50 or GetUnitManaPercent(AM7)<20)and(Z47(AM7,h9[16+O5])>600))then
set J4=UnitUseItem(AM7,bj_lastCreatedItem)
endif
endif
if((not J4)and(AR7(AM7,BU[mifaxie])))then
set J4=(Bz>hq[128+O5])and((GetUnitState(AM7,UNIT_STATE_MAX_MANA)-GetUnitState(AM7,UNIT_STATE_MANA))>150.)and(UnitUseItem(AM7,bj_lastCreatedItem))
endif
if((not J4)and(AR7(AM7,BU[shuaxinqiu])))then
set J4=((Bz+20.)<hq[O5]or(Bz+20.)<V74[O5])and(UnitUseItem(AM7,bj_lastCreatedItem))
endif
if((not J4)and(AR7(AM7,BU[sadanzhixieli])))then
set J4=(GetUnitLifePercent(AM7)<50)and((h4[O5]!=null)or(G0[256+O5])or(GZ[208+O5]))and(UnitUseItem(AM7,bj_lastCreatedItem))
endif
if((not J4)and(AR7(AM7,BU[GB])))then
if(LBool(S44,G48(AM7)+"|G"))then
set X77=AJ7(700.,b5,Condition(function Km))
set J4=(X77!=null)and(GetRandomInt(1,8)==1)and(UnitUseItemPoint(AM7,bj_lastCreatedItem,GetUnitX(X77)+GetRandomReal(.0,200.)-100.,GetUnitY(X77)+GetRandomReal(.0,200.)-100.))
if((not J4)and(GetRandomInt(1,4)==1)and(AJ7(1000.,b5,Condition(function A27))==null)and(AJ7(1200.,b5,Condition(function Km))!=null))then
set J4=(UnitUseItemPoint(AM7,bj_lastCreatedItem,GetUnitX(AM7)+GetRandomReal(.0,200.)-100.,GetUnitY(AM7)+GetRandomReal(.0,200.)-100.))
endif
endif
if((not J4)and(GetRandomInt(1,5)==1)and(Z47(AM7,DH8(AM7))>5000.)and(GetItemCharges(bj_lastCreatedItem)>1)and(AJ7(800.,b5,Condition(function k8))!=null)and(AJ7(1000.,b5,Condition(function A27))==null)and(AJ7(1100.,b5,Condition(function K7))==null))then
set J4=(UnitUseItemPoint(AM7,bj_lastCreatedItem,GetUnitX(AM7)+GetRandomReal(.0,200.)-100.,GetUnitY(AM7)+GetRandomReal(.0,200.)-100.))
endif
endif
if((not J4)and(AR7(AM7,BU[kongmingzhang])))then
if(X77!=null)and(GetUnitLifePercent(X77)<30)then
set J4=UnitUseItemTarget(AM7,bj_lastCreatedItem,X77)
else
set X77=JZ8(500.,AM7)
set J4=(X77!=null)and(UnitUseItemTarget(AM7,bj_lastCreatedItem,X77))
endif
endif
if((not J4)and(AR7(AM7,BU[leishenzhichui])))then
if not((X77!=null)and(IsUnitType(X77,UNIT_TYPE_HERO))and(IsUnitEnemy(X77,Player(O5))))then
set X77=AJ7(900.,b5,Condition(function k6))
endif
if(X77!=null)then
set X77=JX8(900.,AM7)
set J4=(X77!=null)and(UnitUseItemTarget(AM7,bj_lastCreatedItem,X77))
endif
endif
if((not J4)and(AR7(AM7,BU[tiantangzhiji])))and(h4[O5]!=null)then
set X77=JC8(600,AM7)
set J4=(X77!=null)and(UnitUseItemTarget(AM7,bj_lastCreatedItem,X77))
endif
if((not J4)and(AR7(AM7,BU[yuanlifazhang])))then
set X77=JW8(800,AM7)
if(A87(X77))then
set bj_forLoopAIndexEnd=GetPlayerId(GetOwningPlayer(X77))
if Y57(X77,h9[16+bj_forLoopAIndexEnd],20)then
set b5=kk(X77,600.,h9[16+bj_forLoopAIndexEnd])
set J4=(b5!=null)and(UnitUseItemTarget(AM7,bj_lastCreatedItem,X77))
if J4 then
set h9[bj_forLoopAIndexEnd]=h9[16+bj_forLoopAIndexEnd]
endif
elseif(Y57(X77,h9[bj_forLoopAIndexEnd],20))and(h9[bj_forLoopAIndexEnd]!=h9[16+bj_forLoopAIndexEnd])then
set b5=kk(X77,600.,h9[bj_forLoopAIndexEnd])
set J4=(b5!=null)and(UnitUseItemTarget(AM7,bj_lastCreatedItem,X77))
endif
endif
endif
endif
if((not J4)and(h4[O5]!=null)and(G0[128+O5])and(GetHeroLevel(AM7)>5))then
set UP=GetUnitCurrentOrder(AM7)
set X77=h4[O5]
if(((UP==851983)or(UP==851993))and(IsUnitVisibleEx(X77,pl))and(GetUnitAbilityLevel(X77,'B02F')==0)and(not IC(O5))and((GetUnitLifePercent(AM7)+15.)>GetUnitLifePercent(X77))and(not G0[48+O5]))then
call IssueTargetOrderById(AM7,851983,X77)
elseif((UP==851986)and(IsUnitInRange(AM7,X77,600.)))then
call EOG(AM7,X77)
endif
endif
endif
set AM7=null
set pl=null
set b5=null
set M3G=null
set X77=null
set M0G=null
set H58=null
set MCG=null
set MBG=null
endfunction
function MHG takes nothing returns nothing
local unit it=bj_lastLoadedUnit
local unit m5=null
local integer i1=GetUnitTypeId(it)
local integer O5=GetPlayerId(GetOwningPlayer(it))
local integer UP
local boolean J4=false
if F47 then
call TriggerSleepAction(GetRandomReal(.2,.4))
endif
set F47=true
if((i1=='n00H')or(i1=='n00G')or(i1=='n00K')or(i1=='n00J')or(i1=='n00A')or(i1=='n006'))then
set m5=h4[O5]
if(m5==null)then
set m5=AH7(1000.,L_7(it),Condition(function k6))
endif
if((m5!=null)and(GetUnitLifePercent(Y7[O5])>50.)and(GetHeroLevel(Y7[O5])>5)and(not G0[O5])and(G0[128+O5])and(is(Y7[O5]))and(IsUnitInRange(Y7[O5],m5,800.)))then
set UP=GetUnitTypeId(Y7[O5])
if(UP=='Oshd')then
set J4=(Bz>hq[O5])and(GetUnitLifePercent(m5)<70.)and(GetUnitState(Y7[O5],UNIT_STATE_MANA)>hq[272+O5])and(C_7(Y7[O5],852480,'A02Q',m5))
elseif(UP=='U00F')then
set J4=(Bz>hq[O5])and(GetUnitLifePercent(m5)<80.)and(IsUnitInRange(Y7[O5],m5,450.))and(D78(Y7[O5],852480,'A0FL','A1CX',m5))
elseif(UP=='Emoo')then
call C_7(Y7[O5],852075,'A0DX',m5)
elseif(UP=='Uktl')then
set J4=(Bz>hq[O5])and(GetUnitLifePercent(m5)<70.)and(not kr(Y7[O5]))and(IssueTargetOrderById(Y7[O5],852188,m5))
elseif(UP=='Orkn')then
if(IsUnitInRange(Y7[O5],m5,400)or S19(m5))then
set GZ[O5]=true
call J8(O5,C_7(Y7[O5],852480,'A00P',m5))
endif
elseif(UP=='Hjai')then
call C_7(Y7[O5],852171,'A04C',m5)
elseif(UP=='H00A')then
call C_7(Y7[O5],852585,'A0KM',m5)
elseif(UP=='H00D')then
set J4=(GetUnitLifePercent(m5)<50.)and(D78(Y7[O5],852095,'A0O2','A289',m5))
elseif(UP=='E01C')then
if((GetUnitLifePercent(m5)<50.)and(IsUnitInRange(Y7[O5],m5,650.)))then
set GZ[O5]=true
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(h8[O5])-GetUnitY(Y7[O5]),GetUnitX(h8[O5])-GetUnitX(Y7[O5])))
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'A06P',true)
call J8(O5,IssuePointOrderById(Y7[O5],852089,GetUnitX(m5)+200.*Cos(UP*bj_DEGTORAD),GetUnitY(m5)+200.*Sin(UP*bj_DEGTORAD)))
endif
elseif(UP=='N01W')then
set J4=C_7(Y7[O5],852095,'A0NQ',m5)
endif
endif
set J4=(m5!=null)and(GetUnitAbilityLevel(m5,'B02F')==0)and((IssueTargetOrderById(it,852248,m5))or(IssueTargetOrderById(it,851983,m5)))
elseif((i1=='U00A')or(i1=='HC49')or(i1=='Eevm')or(i1=='o007')or(i1=='o00F')or(i1=='hwat')or(i1=='hwt2')or(i1=='hwt3')or(i1=='h006')or(GetUnitAbilityLevel(it,'B030')>0))then
set m5=h4[O5]
if(m5==null)then
set m5=AH7(800.,L_7(it),Condition(function k6))
endif
if((m5!=null)and(GetUnitLifePercent(Y7[O5])>50.)and(not G0[O5])and(G0[128+O5])and(is(Y7[O5]))and(IsUnitInRange(Y7[O5],m5,800.)))then
set UP=GetUnitTypeId(Y7[O5])
if(UP=='U00A')then
set J4=(C_7(Y7[O5],852231,'A055',m5))or(IssueTargetOrderById(Y7[O5],851983,m5))
elseif(UP=='HC49')then
set J4=(C_7(Y7[O5],852095,'A24D',m5))or(IssueTargetOrderById(Y7[O5],851983,m5))
elseif((UP=='E015')or(UP=='Eevm')or(UP=='Uktl'))then
call IssueTargetOrderById(Y7[O5],851983,m5)
endif
endif
set J4=(m5!=null)and(GetUnitAbilityLevel(m5,'B02F')==0)and(IssueTargetOrderById(it,851983,m5))
elseif(i1=='n027')then
set m5=h4[O5]
if(m5==null)then
set m5=AH7(800.,L_7(it),Condition(function k6))
endif
if((m5!=null)and(GetUnitLifePercent(Y7[O5])>50.)and(not G0[O5])and(G0[128+O5])and(is(Y7[O5]))and(IsUnitInRange(Y7[O5],m5,800.)))then
set UP=GetUnitTypeId(Y7[O5])
if(UP=='H00U')then
set J4=((Bz>V74[16+O5])and K_8(Y7[O5],D07,D07,D07,'A0VZ')and(C_7(Y7[O5],852505,'A0VZ',m5)))or(IssueTargetOrderById(Y7[O5],851983,m5))
endif
endif
set J4=(m5!=null)and(GetUnitAbilityLevel(m5,'B02F')==0)and((GetUnitLevel(Y7[O5])>16)or(GetUnitLifePercent(m5)<10.))and(GetUnitLifePercent(m5)<25.)and(IssueTargetOrderById(it,851983,m5))
elseif((i1=='n01G')or(i1=='n01C')or(i1=='n018')or(i1=='n004'))then
if(((GetUnitLifePercent(it)<25.)or(GZ[288+O5]))and((h4[O5]==null)or(not IsUnitInRange(it,Y7[O5],1000.))))then
set J4=D48(it,851986,DH8(it))
set GZ[288+O5]=GetUnitLifePercent(it)<50.
elseif((not GZ[272+O5])and(not G0[16+O5])and(G0[128+O5]))then
set m5=Y7[O5]
set J4=(GetUnitLifePercent(it)<90.)and(Z47(DH8(it),it)<400.)and(D48(it,851986,DH8(it)))
set UP=R2I(Z87(GetUnitX(it),GetUnitY(it),GetUnitX(m5),GetUnitY(m5)))
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'A0A7',UP>800)
if(not J4)then
if(UP>1000)then
set J4=((UP>3000)and(IssueImmediateOrderById(it,852594)))or(IssueTargetOrderById(it,851971,m5))
else
set J4=((not G0[128+O5])or((GetUnitCurrentOrder(m5)==851986)and((Z47(it,h8[O5])+700.)<Z47(m5,h8[O5]))))and(D48(it,851986,h9[O5]))
endif
endif
if((not J4)and(GetHeroLevel(Y7[O5])<12)and(Bz>hq[240+O5])and(eY[O5]==1))then
set m5=AH7(600.,L_7(it),Condition(function KD))
if(m5==null)then
set m5=AH7(600.,L_7(it),Condition(function Kc))
endif
set J4=(m5!=null)and(IssueTargetOrderById(it,851971,m5))
if((not J4)and(AN7(400.,L_7(it),Condition(function Ka))>0))then
set m5=AH7(400.,L_7(it),Condition(function k6))
if(m5==null)then
set UP=R2I(bj_RADTODEG*Atan2(GetUnitY(h9[O5])-GetUnitY(it),GetUnitX(h9[O5])-GetUnitX(it)))
set J4=IssuePointOrderById(it,851986,GetUnitX(it)+350.*Cos(UP*bj_DEGTORAD),GetUnitY(it)+350.*Sin(UP*bj_DEGTORAD))
else
set J4=IssueTargetOrderById(it,851971,m5)
endif
endif
endif
else
set J4=D48(it,851986,DH8(it))
endif
elseif(GetUnitTypeId(Y7[O5])=='H00A')then
set m5=Y7[O5]
set J4=(((GetUnitLifePercent(it)<90.)and(Z47(DH8(it),it)<400.))or(not Z_7(m5)))and(D48(it,851986,DH8(it)))
if((not J4)and(GetUnitLifePercent(it)<30.))then
set J4=((i1=='nomg')or(i1=='nfpc')or(i1=='nsth')or(i1=='ncnk'))and(D48(it,851986,DH8(it)))
endif
if(i1=='nomg')then
if((not J4)and(GetRandomInt(0,5)>1))then
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'ACf2',true)
set J4=((GetUnitAbilityLevel(m5,'BUfa')==0)and(IsUnitInRange(it,m5,800.))and(IssueTargetOrderById(it,852225,m5)))or((GetUnitAbilityLevel(it,'BUfa')==0)and(IssueTargetOrderById(it,852225,it)))
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'ACf2',J4)
else
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'ACf2',false)
endif
endif
if(not J4)then
if(not IsUnitInRange(it,m5,1000.))then
if((h9[O5]!=DH8(it))and(not IsUnitInRange(it,m5,3000.))and((RAbsBJ(GetUnitX(it)-GetUnitX(m5))>3000.)and(RAbsBJ(GetUnitY(it)-GetUnitY(m5))>3000.)))then
set J4=D48(it,851983,h9[O5])
else
set J4=IssueTargetOrderById(it,851971,m5)
endif
else
set J4=((not G0[128+O5])or((GetUnitCurrentOrder(m5)==851986)and((Z47(it,h8[O5])+450.)<Z47(m5,h8[O5]))))and(D48(it,851986,h9[O5]))
endif
endif
if((GetUnitLifePercent(it)<50.)and(IsUnitInRange(it,m5,600.))and(iU(m5)))then
if(((i1=='nomg')or(i1=='nfpc')or(i1=='nsth')or(i1=='ncnk'))and(Z47(it,DH8(it))>4000.))then
call C_7(m5,852131,'A28T',it)
endif
endif
if((not J4)and(h4[O5]!=null))then
set m5=h4[O5]
if(i1=='nsth')then
set J4=(IsUnitInRange(it,m5,700.))and(IssueTargetOrderById(it,852125,m5))
elseif((i1=='nfpc')or(i1=='ncnk'))then
set J4=(IsUnitInRange(it,m5,250.))and(IssueTargetOrderById(it,852127,m5))
endif
endif
elseif((i1=='n01Q')or(i1=='n01R'))then
set J4=((Z_7(Y7[O5]))and(IssueTargetOrderById(it,851986,Y7[O5])))
elseif((i1=='u003')or(i1=='u005')or(i1=='u009'))then
elseif((i1=='u014')or(i1=='u015')or(i1=='u016'))then
if(LState(Y7[O5],"AIFamiliar1|Status")==false)then
call MOG(O5,it)
endif
set J4=true
elseif((i1=='u01D')or(i1=='u01E')or(i1=='u01F'))then
if(LState(Y7[O5],"AIFamiliar2|Status")==false)then
call MOG(O5,it)
endif
set J4=true
elseif((i1=='u01R')or(i1=='u01S')or(i1=='u01T'))then
if(LState(Y7[O5],"AIFamiliar3|Status")==false)then
call MOG(O5,it)
endif
set J4=true
elseif((i1=='e00K')or(i1=='e00I')or(i1=='e00L'))then
set h4[16+O5]=it
if(is(it))then
set J4=(((G0[16+O5])or((GetUnitLifePercent(it)<90.)and(Z47(DH8(it),it)<400.)))and(D48(it,851986,DH8(it))))or((GetUnitState(it,UNIT_STATE_LIFE)<175.)and((D48(it,852525,DH8(it)))or(D48(it,851986,DH8(it)))))
if((h8[528+O5]!=null)and(not J4))then
set UP=GetUnitUserData(h8[528+O5])
if((UP<10)or(UP>60))then
set UP=GetUnitUserData(h9[512+O5])
endif
if((UP>=10)and(UP<=18))then
set m5=h7[10+P54]
elseif((UP>=30)and(UP<=40))then
set m5=h7[30+P24]
elseif((UP>=50)and(UP<=60))then
set m5=h7[50+P_4]
endif
if((Bz>hq[240+O5])and(GetRandomInt(1,2)==1))then
if((m5!=h7[10+P54])and(AO7(900.,h7[10+P54],Condition(function KC))>4)and(AO7(900.,h7[10+P54],Condition(function A27))>0))then
set m5=h7[10+P54]
set hq[240+O5]=Bz+30.
elseif((m5!=h7[30+P24])and(AO7(900.,h7[30+P24],Condition(function KC))>4)and(AO7(900.,h7[30+P24],Condition(function A27))>0))then
set m5=h7[30+P24]
set hq[240+O5]=Bz+30.
elseif((m5!=h7[50+P_4])and(AO7(900.,h7[50+P_4],Condition(function KC))>4)and(AO7(900.,h7[50+P_4],Condition(function A27))>0))then
set m5=h7[50+P_4]
set hq[240+O5]=Bz+30.
endif
endif
if((UP>=10)and(UP<=60))then
if(IsUnitAlly(it,N8[0]))then
set UP=hj[512+GetUnitUserData(m5)]
else
set UP=GetUnitUserData(m5)
endif
set h8[512+O5]=h7[UP+1]
set h8[528+O5]=h7[UP]
set h9[512+O5]=h7[UP-1]
endif
endif
if(GZ[O5])then
set J4=IssueImmediateOrderById(it,852521)
set GZ[O5]=false
else
if(h8[512+O5]!=null)then
set J4=((not IsUnitInRange(it,h8[528+O5],3500.))and(D48(it,852525,h8[528+O5])))or(D48(it,851983,h8[512+O5]))
else
set J4=((Y7[O5]!=null)and(not IsUnitInRange(it,Y7[O5],400.))and(D48(it,851983,Y7[O5])))
endif
endif
endif
elseif((i1=='e00M')or(i1=='e00N')or(i1=='e00O'))then
if((eY[O5]!=3)and(eY[O5]!=4))then
if(((GetUnitY(it)>4000.)and(GetUnitY(it)<7000.))or((GetUnitX(it)>-7500.)and(GetUnitX(it)<-5000.)))then
set m5=h7[30+P24]
elseif(((GetUnitY(it)>-8000.)and(GetUnitY(it)<-5500.))or((GetUnitX(it)>4500.)and(GetUnitX(it)<7000.)))then
set m5=h7[50+P_4]
else
set m5=h7[10+P54]
endif
if(IsUnitAlly(it,N8[0]))then
set UP=hj[512+GetUnitUserData(m5)]
else
set UP=GetUnitUserData(m5)
endif
set J4=D48(it,851983,h7[UP+1])
endif
elseif((i1=='n00U')or(i1=='n00Y')or(i1=='n00Z'))then
set m5=h4[O5]
if(m5==null)then
set m5=AH7(800.,L_7(it),Condition(function k6))
endif
set J4=(GetUnitLifePercent(it)<90.)and(GetUnitLifePercent(Y7[O5])>50.)and(not G0[O5])and(is(Y7[O5]))and(IsUnitInRange(Y7[O5],it,800.))and(IssueTargetOrderById(Y7[O5],852248,it))
if((not J4)and(m5!=null)and(GetUnitLifePercent(m5)<50.)and(GetUnitLifePercent(Y7[O5])>50.)and(not G0[O5])and(is(Y7[O5]))and(IsUnitInRange(Y7[O5],m5,800.)))then
set GZ[O5]=true
set J4=J8(O5,C_7(Y7[O5],852089,'A06P',m5))
endif
set J4=(m5!=null)and(GetUnitAbilityLevel(m5,'B02F')==0)and(IssueTargetOrderById(it,851983,m5))
elseif(GetUnitAbilityLevel(it,'B03A')>0)then
set J4=(GetUnitLifePercent(it)<50.)and(D48(it,851986,h9[O5]))
elseif((i1=='npn3')or(i1=='npn6')or(i1=='n010')or(i1=='n0GZ'))then
call IYG(it,16+O5)
if(GZ[272+O5])then
set J4=D48(it,851986,h9[16+O5])
else
set m5=h4[O5]
if(m5==null)then
set m5=AH7(800.,L_7(it),Condition(function k6))
endif
set J4=(m5!=null)and((IssueTargetOrderById(it,852252,m5))or(IssueImmediateOrderById(it,852520))or((GetUnitAbilityLevel(m5,'B02F')==0)and(IssueTargetOrderById(it,851983,m5))))
endif
call IZG(it,16+O5,J4)
set J4=true
elseif((i1=='npn2')or(i1=='npn5')or(i1=='n012')or(i1=='n0H1'))then
call IYG(it,512+O5)
set m5=h4[O5]
if(m5==null)then
set m5=AH7(800.,L_7(it),Condition(function k6))
endif
if(m5!=null)then
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'ACcy',true)
set J4=(GZ[272+O5])and(IssueTargetOrderById(it,852144,m5))
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'ACcy',J4)
if(not J4)then
set J4=((UnitCountBuffsExBJ(bj_BUFF_POLARITY_POSITIVE,bj_BUFF_RESIST_EITHER,GetFilterUnit(),false,false)>0)and(IssueTargetOrderById(it,852057,m5)))or((GetUnitAbilityLevel(m5,'B02F')==0)and(IssueTargetOrderById(it,851983,m5)))
endif
else
call SetPlayerAbilityAvailable(GetOwningPlayer(it),'ACcy',false)
endif
call IZG(it,512+O5,J4)
if(GetUnitLifePercent(it)<25.)then
set J4=IssueImmediateOrderById(it,852129)
elseif(GetUnitAbilityLevel(it,'BOwk')>0)then
set J4=D48(it,851986,h9[16+O5])
endif
set J4=true
elseif((i1=='npn1')or(i1=='npn4')or(i1=='n011')or(i1=='n0H0'))then
call IYG(it,528+O5)
set m5=h4[O5]
if(m5==null)then
set m5=AH7(800.,L_7(it),Condition(function k6))
endif
set J4=(m5!=null)and(GetUnitAbilityLevel(m5,'B02F')==0)and(IssueTargetOrderById(it,851983,m5))
call IZG(it,528+O5,J4)
set J4=true
elseif((i1=='n01M')or(i1=='n01S'))then
set m5=h4[O5]
set h4[16+O5]=it
if(m5==null)then
set m5=AH7(800.,L_7(it),Condition(function k6))
endif
set J4=(m5!=null)and(GetUnitAbilityLevel(m5,'B02F')==0)and(IssueTargetOrderById(it,851983,m5))
endif
if(not J4)then
if h4[O5]!=null then
call IssueTargetOrderById(it,851983,h4[O5])
elseif((eY[O5]>=9))then
call IssueTargetOrderById(it,851990,Y7[O5])
elseif((eY[O5]!=3)and(eY[O5]!=4))then
call D48(it,851983,h8[O5])
else
if(Z_7(Y7[O5]))then
if(IsUnitInRange(it,Y7[O5],1200.))then
set m5=Y7[O5]
else
set m5=AH7(1200.,L_7(Y7[O5]),Condition(function k8))
endif
else
set m5=AH7(1200.,L_7(it),Condition(function k8))
endif
set J4=((m5!=null)and(IssuePointOrderById(it,851983,GetUnitX(m5),GetUnitY(m5))))or(D48(it,851983,h8[64+O5]))
endif
endif
set it=null
set m5=null
endfunction
function NHG takes nothing returns nothing
local integer O5=1
local real Y_7
loop
exitwhen O5>11
if(IsPlayerInForce(Player(O5),RX4))then
call GroupClear(R54)
call GroupEnumUnitsOfPlayer(R54,Player(O5),R24)
call ForGroup(R54,function MFG)
endif
if Y7[O5]!=null and GetWidgetLife(Y7[O5])>.405 then
set Y_7=GetUnitState(Y7[O5],UNIT_STATE_LIFE)/ GetUnitState(Y7[O5],UNIT_STATE_MAX_LIFE)
set hq[704+O5]=(Y_7-hq[688+O5])
if(Bz>hq[736+O5])or(hq[720+O5]>hq[704+O5])then
set hq[720+O5]=hq[704+O5]
set hq[736+O5]=Bz+10.
endif
set hq[688+O5]=Y_7
endif
set O5=O5+1
endloop
endfunction
function NIG takes nothing returns boolean
return(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and(not GI8(GetSpellAbilityId())))
endfunction
function NJG takes nothing returns nothing
local unit j5=GetTriggerUnit()
local unit m5=GetEnumUnit()
local integer i1=GetUnitTypeId(m5)
if((A87(m5))or(not iU(m5)))then
elseif((i1=='UC01')and(GetUnitLifePercent(m5)<40.))then
call D78(m5,852125,'A28R','A28S',j5)
elseif(i1=='U00F')then
call VMF(m5,j5)
elseif((i1=='Opgh')and(IsUnitInRange(m5,j5,400.)))then
call IssueImmediateOrderById(m5,852600)
elseif((i1=='Ofar')and(IsUnitInRange(m5,j5,500.)))then
call DE8(m5,852588,'A29I')
elseif(i1=='Uktl')then
call IssueTargetOrderById(m5,852600,j5)
elseif((i1=='Hblm')or(i1=='H06X')or(i1=='H06Y')or(i1=='H06W'))then
set i1=R2I(bj_RADTODEG*Atan2(GetUnitY(j5)-GetUnitY(m5),GetUnitX(j5)-GetUnitX(m5)))
call IssuePointOrderById(m5,852600,GetUnitX(m5)+150.*Cos(i1*bj_DEGTORAD),GetUnitY(j5)+150.*Sin(i1*bj_DEGTORAD))
elseif(i1=='Ntin')then
call IssueTargetOrderById(m5,852190,j5)
elseif((i1=='Hjai')and(IsUnitInRange(m5,j5,500.))and(GetUnitLifePercent(m5)<50.))then
call IssueImmediateOrderById(m5,852600)
elseif(i1=='N0HP')then
call XK7("Triggered func 10 for |c00ffff00Kaldr"+"|r")
elseif(i1=='H00K')then
call D88(m5,852504,'A0AK','A1FY',GetUnitX(j5),GetUnitY(j5))
elseif(i1=='N01V')then
call VNF(m5,j5)
elseif(i1!='U00E')then
call J3G(m5,j5)
endif
set j5=null
set m5=null
endfunction
function NKG takes unit u returns boolean
local real NMG=1.
if(U24)then
if(AV4[GetPlayerId(GetOwningPlayer(u))]==AX4)then
set NMG=10.-GetRandomReal(0,'d')
elseif(AV4[GetPlayerId(GetOwningPlayer(u))]==AY4)then
set NMG=45.-GetRandomReal(0,'d')
elseif(AV4[GetPlayerId(GetOwningPlayer(u))]==AZ4)then
set NMG=65.-GetRandomReal(0,'d')
endif
call XK7("Low Dodge ON & chance for |c00ffff00"+GetUnitName(u)+"|r: "+R2S(NMG))
else
if(AV4[GetPlayerId(GetOwningPlayer(u))]==AX4)then
set NMG=.0
endif
endif
return(NMG>0)
endfunction
function NNG takes unit j5,unit NOG,real kl returns nothing
local real IW=bj_RADTODEG*Atan2(GetUnitY(NOG)-GetUnitY(j5),GetUnitX(NOG)-GetUnitX(j5))
if(IW>kl)then
set IW=IW+90
else
set IW=IW-90
endif
if not((GetUnitAbilityLevel(NOG,'N00B')>0)and(DE8(NOG,852514,'A0SB')))then
call IssuePointOrderById(NOG,851986,GetUnitX(NOG)+250.*Cos(IW*bj_DEGTORAD),GetUnitY(NOG)+250.*Sin(IW*bj_DEGTORAD))
endif
endfunction
function NPG takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitEnemy(GetFilterUnit(),RM4))and(GetPlayerController(GetOwningPlayer(GetFilterUnit()))==MAP_CONTROL_COMPUTER)and(GetWidgetLife(GetFilterUnit())>.405)and(ZL7(GetFilterUnit())))
endfunction
function NQG takes aidifficulty d returns real
if d==AI_DIFFICULTY_NEWBIE then
return .2
elseif d==AI_DIFFICULTY_NORMAL then
return .1
endif
return .05
endfunction
function NRG takes nothing returns nothing
local integer NSG=GetHandleId(GetExpiredTimer())
local unit u
local real x0
local real y0
local real x1
local real y1
local real r
if LoadReal(R8,NSG,7)<TimerGetElapsed(E4)then
call FlushChildHashtable(R8,NSG)
call DestroyTimer(GetExpiredTimer())
else
set u=LoadUnitHandle(R8,NSG,1)
set x0=LoadReal(R8,NSG,2)
set y0=LoadReal(R8,NSG,3)
set x1=LoadReal(R8,NSG,4)
set y1=LoadReal(R8,NSG,5)
set r=LoadReal(R8,NSG,6)
set u=null
endif
endfunction
function AI_DodgeLineStarter takes nothing returns nothing
local integer NSG
set bj_lastStartedTimer=CreateTimer()
set NSG=GetHandleId(bj_lastStartedTimer)
call SaveUnitHandle(R8,NSG,1,GetEnumUnit())
call SaveReal(R8,NSG,2,RF4)
call SaveReal(R8,NSG,3,RG4)
call SaveReal(R8,NSG,4,RH4)
call SaveReal(R8,NSG,5,RI4)
call SaveReal(R8,NSG,6,RJ4)
call SaveReal(R8,NSG,7,RK4)
call TimerStart(bj_lastStartedTimer,NQG(GetAIDifficulty(GetOwningPlayer(GetEnumUnit()))),true,function NRG)
endfunction
function NTG takes nothing returns nothing
local unit AM7=GetEnumUnit()
local real x1=GetUnitX(AM7)
local real y1=GetUnitY(AM7)
local real dx=RH4-RF4
local real dy=RI4-RG4
local real r=SquareRoot(dx*dx+dy*dy)
local real r1=((x1-RF4)*dx+(y1-RG4)*dy)/ r
call XK7(W[GetPlayerId(GetOwningPlayer(AM7))]+KW4[GetPlayerId(GetOwningPlayer(AM7))]+"|r: AI_Dodge "+W[GetPlayerId(RM4)]+GetUnitName(Y7[GetPlayerId(RM4)])+"|r "+R2S(r1)+"/"+R2S(r))
if r1>0 and r1<=r then
set dx=x1-RF4-dx*r1/ r
set dy=y1-RG4-dy*r1/ r
set r=SquareRoot(dx*dx+dy*dy)
if not((GetUnitAbilityLevel(AM7,'N00B')>0)and(DE8(AM7,852514,'A0SB')))then
if r==.0 then
call IssuePointOrderById(AM7,851986,x1-(y1-RG4)*RJ4/ r1,y1+(x1-RF4)*RJ4/ r1)
elseif r<RJ4 then
call IssuePointOrderById(AM7,851986,x1+dx*(RJ4/ r-1),y1+dy*(RJ4/ r-1))
endif
endif
endif
set AM7=null
endfunction
function WYv_OLD takes nothing returns nothing
local unit j5=GetTriggerUnit()
local unit AM7=GetEnumUnit()
local real IW
local real kl
set IW=Z87(GetUnitX(j5),GetUnitY(j5),GetUnitX(AM7),GetUnitY(AM7))
set kl=RAbsBJ(Atan2(GetLocationY(Hb)-GetUnitY(j5),GetLocationX(Hb)-GetUnitX(j5)))
if((ZL7(AM7))and(Z87(GetUnitX(AM7),GetUnitY(AM7),GetUnitX(j5)+IW*Cos(kl),GetUnitY(j5)+IW*Sin(kl))<300.))then
call NNG(j5,AM7,kl*bj_RADTODEG)
if h4[352+GetPlayerId(GetOwningPlayer(AM7))]==null then
set h4[352+GetPlayerId(GetOwningPlayer(AM7))]=j5
endif
endif
set j5=null
set AM7=null
endfunction
function WYv takes nothing returns nothing
local unit j5=GetTriggerUnit()
local unit AM7=GetEnumUnit()
local real IW=Z87(GetUnitX(j5),GetUnitY(j5),GetUnitX(AM7),GetUnitY(AM7))
local real kl=Atan2(GetLocationY(Hb)-GetUnitY(j5),GetLocationX(Hb)-GetUnitX(j5))
if((NKG(AM7))and(ZL7(AM7))and(Z87(GetUnitX(AM7),GetUnitY(AM7),GetUnitX(j5)+IW*Cos(kl),GetUnitY(j5)+IW*Sin(kl))<300.))then
call NNG(j5,AM7,kl*bj_RADTODEG)
if h4[352+GetPlayerId(GetOwningPlayer(AM7))]==null then
set h4[352+GetPlayerId(GetOwningPlayer(AM7))]=j5
endif
endif
set j5=null
set AM7=null
endfunction
function NUG takes nothing returns nothing
local unit AM7=GetEnumUnit()
local unit j5=GetTriggerUnit()
local real IW
local real kl
set IW=Z87(GetUnitX(j5),GetUnitY(j5),GetUnitX(AM7),GetUnitY(AM7))
set kl=RAbsBJ(Atan2(GetLocationY(Hb)-GetUnitY(j5),GetLocationX(Hb)-GetUnitX(j5)))
if((ZL7(AM7))and(((IsUnitInRange(AM7,j5,750.))and(not VOF(AM7,j5,true)))or(not LGF(AM7)))and(Z87(GetUnitX(AM7),GetUnitY(AM7),GetUnitX(j5)+IW*Cos(kl),GetUnitY(j5)+IW*Sin(kl))<700.))then
call NNG(j5,AM7,kl*bj_RADTODEG)
set G0[64+GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=true
if h4[352+GetPlayerId(GetOwningPlayer(AM7))]==null then
set h4[352+GetPlayerId(GetOwningPlayer(AM7))]=j5
endif
endif
set j5=null
set AM7=null
endfunction
function NVG takes nothing returns nothing
local unit AM7=GetEnumUnit()
local unit j5=GetTriggerUnit()
local real IW
local real kl
set IW=Z87(GetUnitX(j5),GetUnitY(j5),GetUnitX(AM7),GetUnitY(AM7))
set kl=RAbsBJ(Atan2(GetLocationY(Hb)-GetUnitY(j5),GetLocationX(Hb)-GetUnitX(j5)))
if((NKG(AM7))and(ZL7(AM7))and(Z87(GetUnitX(AM7),GetUnitY(AM7),GetUnitX(j5)+IW*Cos(kl),GetUnitY(j5)+IW*Sin(kl))<700.))then
call NNG(j5,AM7,kl*bj_RADTODEG)
set G0[64+GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=true
if h4[352+GetPlayerId(GetOwningPlayer(AM7))]==null then
set h4[352+GetPlayerId(GetOwningPlayer(AM7))]=j5
endif
endif
set j5=null
set AM7=null
endfunction
function WZv_OLD takes nothing returns nothing
local unit AM7=GetEnumUnit()
local unit IB=null
local real kl
if(ZL7(GetEnumUnit()))then
set IB=h4[272+GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]
if((IB!=null)and(IsUnitVisibleEx(IB,GetOwningPlayer(GetEnumUnit()))))then
set kl=RAbsBJ((bj_RADTODEG*Atan2(GetUnitY(GetEnumUnit())-GetUnitY(IB),GetUnitX(GetEnumUnit())-GetUnitX(IB)))-GetUnitFacing(IB))
if(kl<50.)then
call NNG(IB,GetEnumUnit(),GetUnitFacing(IB))
set G0[64+GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=true
if h4[352+GetPlayerId(GetOwningPlayer(AM7))]==null then
set h4[352+GetPlayerId(GetOwningPlayer(AM7))]=GetTriggerUnit()
endif
endif
endif
set IB=null
endif
set AM7=null
endfunction
function WZv takes nothing returns nothing
local unit AM7=GetEnumUnit()
local unit IB=null
local real kl
if((NKG(AM7))and(ZL7(AM7)))then
set IB=h4[272+GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]
if((IB!=null)and(IsUnitVisibleEx(IB,GetOwningPlayer(AM7))))then
set kl=RAbsBJ((bj_RADTODEG*Atan2(GetUnitY(AM7)-GetUnitY(IB),GetUnitX(AM7)-GetUnitX(IB)))-GetUnitFacing(IB))
if(kl<50.)then
call NNG(IB,AM7,GetUnitFacing(IB))
set G0[64+GetPlayerId(GetOwningPlayer(AM7))]=true
if h4[352+GetPlayerId(GetOwningPlayer(AM7))]==null then
set h4[352+GetPlayerId(GetOwningPlayer(AM7))]=GetTriggerUnit()
endif
endif
endif
set IB=null
endif
endfunction
function NWG takes nothing returns nothing
local unit j5=GetTriggerUnit()
local unit m5=GetEnumUnit()
local integer O5=GetPlayerId(GetOwningPlayer(m5))
local real kl=RAbsBJ((bj_RADTODEG*Atan2(GetUnitY(m5)-GetUnitY(j5),GetUnitX(m5)-GetUnitX(j5)))-GetUnitFacing(j5))
local real IW=Z87(GetUnitX(m5),GetUnitY(m5),GetUnitX(j5),GetUnitY(j5))
local boolean M4G
local boolean J4
if(IW>900)then
set M4G=kl<140.
elseif(IW>600)then
set M4G=(GetWidgetLife(m5)<1500.)and(kl<110.)
elseif(IW>300)then
set M4G=(GetWidgetLife(m5)<1000.)and(kl<80.)
else
set M4G=(GetWidgetLife(m5)<1000.)and(kl<50.)
endif
if(not iU(m5))then
elseif(not M4G)then
set J4=(IW<700.)and((h4[O5]==null)or(h4[O5]==j5))and((VOF(m5,j5,true))or(IssueTargetOrderById(m5,851983,j5)))
else
if(IW<600.)then
if(bj_RADTODEG*Atan2(GetUnitY(m5)-GetUnitY(j5),GetUnitX(m5)-GetUnitX(j5))>GetUnitFacing(j5))then
call IssuePointOrderById(m5,851986,GetUnitX(j5)+300.*Cos((GetUnitFacing(j5)+90.)*bj_DEGTORAD),GetUnitY(j5)+300.*Sin((GetUnitFacing(j5)+90.)*bj_DEGTORAD))
else
call IssuePointOrderById(m5,851986,GetUnitX(j5)+300.*Cos((GetUnitFacing(j5)-90.)*bj_DEGTORAD),GetUnitY(j5)+300.*Sin((GetUnitFacing(j5)-90.)*bj_DEGTORAD))
endif
elseif((GetWidgetLife(m5)<1200.)or((IW>800.)and(h4[O5]==null)))then
set G0[64+O5]=true
call D48(m5,851986,h9[O5])
if((GetUnitAbilityLevel(m5,'A0A5')>0)and(LUnit(GetHandleId(GetOwningPlayer(m5)),"MyBear")!=null))then
call D48(LUnit(GetHandleId(GetOwningPlayer(m5)),"MyBear"),851986,h9[O5])
endif
endif
endif
set j5=null
set m5=null
endfunction
function NXG takes nothing returns boolean
return((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and((GetUnitAbilityLevel(GetFilterUnit(),'Adts')>0)or(GetUnitAbilityLevel(GetFilterUnit(),'Adt1')>0)or(GetUnitAbilityLevel(GetFilterUnit(),'A0M5')>0)or(GetUnitAbilityLevel(GetFilterUnit(),'Atru')>0)or(GetUnitAbilityLevel(GetFilterUnit(),'A0JI')>0)))
endfunction
function NYG takes nothing returns boolean
return((GetUnitTypeId(GetFilterUnit())==GetUnitTypeId(GetTriggerUnit()))and(GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())))
endfunction
function NZG takes nothing returns nothing
local unit m5=GetEnumUnit()
local unit j5=GetTriggerUnit()
local item jp=AV7(m5,BU[GB])
if((jp!=null)and((GetUnitLifePercent(j5)<50.)or((h4[GetPlayerId(GetOwningPlayer(m5))]==j5)and(GetUnitLifePercent(j5)<70.))))then
if(IsUnitInRange(j5,m5,1000.))then
call UnitUseItemPoint(m5,jp,GetUnitX(j5),GetUnitY(j5))
endif
endif
set m5=null
set j5=null
set jp=null
endfunction
function NAG takes nothing returns nothing
local unit m5=GetEnumUnit()
local unit j5=null
local integer O5=GetPlayerId(GetOwningPlayer(m5))
if(h4[O5]==GetTriggerUnit())then
set j5=AH7(500.,L_7(GetTriggerUnit()),Condition(function NYG))
if(j5!=null)then
set h4[O5]=j5
if(not ZL7(m5))then
elseif(not iU(m5))then
call IssueTargetOrderById(m5,851983,j5)
else
call J3(m5,false)
endif
endif
endif
set m5=null
set j5=null
endfunction
function NBG takes nothing returns boolean
local integer i1=GetUnitTypeId(GetFilterUnit())
return(((i1=='n00H')or(i1=='n00G')or(i1=='n00K'))and(GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())))
endfunction
function NCG takes nothing returns nothing
local unit m5=GetEnumUnit()
local integer i1=GetUnitTypeId(m5)
local unit N3G=AJ7(800.,L_7(GetTriggerUnit()),Condition(function NBG))
if((not ZL7(m5))or(N3G==null))then
elseif((i1=='H00V')or(i1=='H08D')or(i1=='H08C')or(i1=='H084')or(i1=='H08B'))then
call DE8(m5,852581,'A1AT')
elseif(i1=='Emoo')then
call C_7(m5,852075,'A0DX',N3G)
elseif(AR7(m5,BU[zhipeitoukui]))then
call UnitUseItemTarget(m5,AV7(m5,BU[zhipeitoukui]),N3G)
elseif(AR7(m5,BU[sanshizhiren]))then
call UnitUseItemTarget(m5,AV7(m5,BU[sanshizhiren]),N3G)
endif
set m5=null
set N3G=null
endfunction
function N6G takes nothing returns nothing
local unit j5=GetTriggerUnit()
local unit m5=GetEnumUnit()
local integer O5=GetPlayerId(GetOwningPlayer(m5))
if((ZL7(m5))and((not IsUnitInRange(j5,m5,500.))or(not VOF(m5,j5,false))))then
if((A87(j5))and(not A87(m5))and(IsUnitInRange(j5,m5,500.)))then
call IssueTargetOrderById(m5,851983,j5)
else
if(AO7(900.,j5,Condition(function k2))<(1+GetUnitAbilityLevel(j5,GetSpellAbilityId())))then
call D48(m5,851986,h9[O5])
endif
endif
endif
set j5=null
set m5=null
endfunction
function NLG takes nothing returns nothing
if((GetUnitAbilityLevel(GetEnumUnit(),'B0C1')==0)or(not LGF(GetEnumUnit())))then
call ExecuteFunc("M9G")
if((GetUnitTypeId(GetEnumUnit())=='Nbbc')and(GetUnitAbilityLevel(GetEnumUnit(),'B0C1')>0)and(not LState(GetEnumUnit(),"Omnislashing")))then
call DE8(GetEnumUnit(),852128,'A05G')
endif
endif
endfunction
function N1G takes nothing returns nothing
call ExecuteFunc("N0G")
endfunction
function N0G takes nothing returns nothing
local unit m5=GetEnumUnit()
local integer i1=GetUnitTypeId(m5)
local integer HMG=GetSpellAbilityId()
if(not ZL7(m5))then
elseif((AR7(m5,BU[luosazhifeng]))and(HMG!='A06R')and(HMG!='A03R')and(HMG!='A0AV')and(UnitUseItem(m5,AV7(m5,BU[luosazhifeng]))))then
elseif((AR7(m5,BU[huanyingfu]))and(HMG!='A06R')and(HMG!='A03R')and(HMG!='A0AV')and(UnitUseItem(m5,AV7(m5,BU[huanyingfu]))))then
elseif(LGF(m5))then
elseif((HMG!='A06R')and(HMG!='A03R')and(HMG!='A0AV')and((i1=='Naka')or(i1=='E004')or(i1=='Ubal')))then
call IssueImmediateOrderById(m5,852129)
elseif((HMG!='A06R')and(HMG!='A03R')and(HMG!='A0AV')and(i1=='U000'))then
call DE8(m5,852129,'A09U')
elseif((HMG!='A06R')and(HMG!='A03R')and(HMG!='A0AV')and(i1=='HC49'))then
call DE8(m5,852123,'A063')
elseif(((HMG!='A0M1')or(HMG!='A1AX'))and(i1=='U00C'))then
call DE8(m5,852526,'A0T2')
elseif((HMG!='A06R')and(HMG!='A03R')and(HMG!='A0AV')and(i1=='U00A'))then
call DE8(m5,852123,'A03O')
elseif(i1=='Npbm')then
set GZ[GetPlayerId(GetOwningPlayer(m5))]=true
call J8(GetPlayerId(GetOwningPlayer(m5)),DE8(m5,852586,'A0MQ'))
elseif((HMG=='A0M1')and(i1=='Oshd'))then
call C_7(m5,852227,'A04Y',m5)
elseif(i1=='Harf')then
if(HMG!='A0M1')then
set GZ[GetPlayerId(GetOwningPlayer(m5))]=true
call J8(GetPlayerId(GetOwningPlayer(m5)),C_7(m5,852186,'A08V',m5))
else
call IssueImmediateOrderById(m5,852599)
endif
elseif(i1=='N01V')then
if((HMG!='A03R')and(HMG!='A0AV')and(HMG!='A06R'))then
call IssueImmediateOrderById(m5,852493)
endif
endif
set m5=null
endfunction
function N5G takes nothing returns nothing
local unit j5=GetTriggerUnit()
local unit m5=GetEnumUnit()
local integer HMG
local integer O5=GetPlayerId(GetOwningPlayer(m5))
set G0[64+O5]=true
if(ZL7(m5))then
if((i2(j5))and(VOF(m5,j5,false)))then
elseif(Z47(m5,h9[O5])<Z47(j5,h9[O5]))then
call D48(m5,851986,h9[O5])
else
call D48(m5,851986,h8[O5])
endif
set HMG=GetSpellAbilityId()
if((HMG=='A054')or(HMG=='A00U')or(HMG=='A03R')or(HMG=='A0AV')or((HMG=='A06R')and(GZ[GetPlayerId(GetOwningPlayer(j5))])))then
call N1G()
endif
endif
set j5=null
set m5=null
endfunction
function N2G takes nothing returns nothing
local unit m5=GetEnumUnit()
if((not iU(m5))and(GetUnitLifePercent(m5)<95.)and(h4[GetPlayerId(GetOwningPlayer(m5))]==null)and(not IsUnitInRange(GetTriggerUnit(),m5,300.)))then
call IssuePointOrderById(m5,851986,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
set m5=null
endfunction
function N_G takes nothing returns nothing
local unit m5=GetEnumUnit()
local integer HMG=GetSpellAbilityId()
local integer O5=GetPlayerId(GetOwningPlayer(m5))
set G0[64+O5]=true
if((HMG=='A0J1')or(HMG=='A1BX'))then
if(ZL7(m5))then
if(Z47(m5,h9[O5])<Z87(GetLocationX(Hb),GetLocationY(Hb),GetUnitX(h9[O5]),GetUnitY(h9[O5])))then
call D48(m5,851986,h9[O5])
else
call D48(m5,851986,h8[O5])
endif
endif
else
if((ZL7(m5))and((GetUnitLevel(m5)<6)or(GetUnitLifePercent(m5)<75.)or(not Id(O5))))then
if(((HMG=='A0IL')or(HMG=='A0BQ'))and(GetUnitLevel(m5)>5)and(GetUnitState(m5,UNIT_STATE_LIFE)>1300.))then
elseif((HMG=='A0RA')and(Z47(m5,h9[O5])<Z87(GetLocationX(Hb),GetLocationY(Hb),GetUnitX(h9[O5]),GetUnitY(h9[O5]))))then
call D48(m5,851986,h9[O5])
else
call D48(m5,851986,h9[O5])
endif
endif
endif
set m5=null
endfunction
function O4G takes nothing returns nothing
local unit m5=GetEnumUnit()
set G0[64+GetPlayerId(GetOwningPlayer(m5))]=true
if((is(m5))and((GetUnitLevel(m5)<5)or(GetUnitLifePercent(m5)<75.)or(h4[GetPlayerId(GetOwningPlayer(m5))]==null)))then
if((GetSpellAbilityId()!='A035')or(AO7(500.,GetTriggerUnit(),Condition(function k0))<3))then
call D48(m5,851986,h9[GetPlayerId(GetOwningPlayer(m5))])
endif
endif
set m5=null
endfunction
function O7G takes nothing returns nothing
local unit m5=GetEnumUnit()
local unit j5=GetTriggerUnit()
if((GetPlayerController(GetOwningPlayer(m5))==MAP_CONTROL_COMPUTER)and(ZL7(m5))and(IsUnitType(m5,UNIT_TYPE_HERO)))then
if(not VOF(m5,j5,true))then
set G0[64+GetPlayerId(GetOwningPlayer(m5))]=true
call D48(m5,851986,h9[GetPlayerId(GetOwningPlayer(m5))])
endif
endif
set m5=null
set j5=null
endfunction
function O8G takes nothing returns nothing
local unit m5=GetEnumUnit()
local unit j5=GetTriggerUnit()
if((GetPlayerController(GetOwningPlayer(m5))==MAP_CONTROL_COMPUTER)and(Z37(m5))and(IsUnitType(m5,UNIT_TYPE_HERO)))then
if((GetUnitLifePercent(m5)>45. or GetUnitState(m5,UNIT_STATE_LIFE)>500.)and((AO7(800.,j5,Condition(function I58))>=2)or(AO7(650.,j5,Condition(function I08))>=2)or((AO7(800.,j5,Condition(function I58))>=1)and(AO7(650.,j5,Condition(function I08))>=1))))then
set j5=AJ7(800.,L_7(m5),Condition(function A_7))
if(j5!=null)then
set h4[GetPlayerId(GetOwningPlayer(m5))]=j5
call EOG(m5,j5)
call IssueTargetOrderById(m5,851983,j5)
endif
else
if(LGF(m5))then
elseif(Z47(m5,h9[GetPlayerId(GetOwningPlayer(m5))])<Z47(j5,h9[GetPlayerId(GetOwningPlayer(m5))]))then
set G0[64+GetPlayerId(GetOwningPlayer(m5))]=true
call D48(m5,851986,h9[GetPlayerId(GetOwningPlayer(m5))])
else
call D48(m5,851986,h8[GetPlayerId(GetOwningPlayer(m5))])
endif
endif
endif
set m5=null
set j5=null
endfunction
function O9G takes real ODG,real OEG returns boolean
return ODG!=null and OEG!=null
endfunction
function OFG takes location OGG,real c,real OHG,boolean OIG returns location
local real OJG=GetLocationX(OGG)
local real OKG=GetLocationY(OGG)
local real ODG=PQ8(OJG+(Cos(OHG*bj_DEGTORAD)*c))
local real OEG=PS8(OKG+(Sin(OHG*bj_DEGTORAD)*c))
if((OIG)and(O9G(ODG,OEG)!=true))then
return null
endif
return Location(ODG,OEG)
endfunction
function OMG takes nothing returns nothing
local unit L07=GetTriggerUnit()
local unit W17=GetEnumUnit()
local location ONG=GetUnitLoc(L07)
local location OOG=GetUnitLoc(W17)
local real OHG=AngleBetweenPoints(ONG,OOG)
local real OPG=DistanceBetweenPoints(ONG,OOG)
local real c=OPG+100.
local location OQG=OFG(ONG,c,OHG,true)
if((GetPlayerController(GetOwningPlayer(W17))==MAP_CONTROL_COMPUTER)and(ZL7(W17))and(IsUnitType(W17,UNIT_TYPE_HERO)))then
if(OQG!=null)then
call IssuePointOrderByIdLoc(W17,851986,OQG)
endif
endif
set L07=null
set W17=null
call RemoveLocation(ONG)
set ONG=null
call RemoveLocation(OOG)
set OOG=null
call RemoveLocation(OQG)
set OQG=null
endfunction
function ORG takes nothing returns nothing
local unit m5=GetEnumUnit()
local integer i=0
if(GetPlayerController(GetOwningPlayer(m5))==MAP_CONTROL_COMPUTER)and((AR7(m5,BU[yazhizhiren])or AR7(m5,BU[BA])))then
set H64=Z47(FL7,m5)
if(H04==null)or(H64<F37)then
set H04=m5
set F37=H64
endif
endif
set m5=null
endfunction
function OSG takes nothing returns nothing
call ExecuteFunc("M9G")
endfunction
function OTG takes nothing returns nothing
local unit j5=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local integer OUG=GetSpellAbilityId()
local integer O5=GetPlayerId(GetOwningPlayer(j5))
local real JD
local real Je
local integer UP
local real LNF
local integer i=1
local real x0
local real y0
local real x1
local real y1
local real r
if(OUG=='A0LH')then
if((GetPlayerController(GetOwningPlayer(m5))!=MAP_CONTROL_USER)and(IsUnitType(m5,UNIT_TYPE_HERO)))then
set LNF=Bz
set UP=3+(2*GetUnitAbilityLevel(j5,OUG))
loop
set JD=GetUnitX(m5)
set Je=GetUnitY(m5)
if((GetWidgetLife(m5)<1500.)and(GetPlayerController(GetOwningPlayer(m5))==MAP_CONTROL_COMPUTER)and(ZL7(m5))and((GetUnitX(m5)!=JD)or(GetUnitY(m5)!=Je)))then
call IssueImmediateOrderById(m5,851993)
endif
call Y07(.2)
exitwhen((RAbsBJ(Bz-LNF)>=UP)or(not Z_7(m5)))
endloop
endif
elseif(OUG=='A19O')then
if((GetPlayerController(GetOwningPlayer(m5))==MAP_CONTROL_COMPUTER)and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call Y07(.5)
loop
set i=i+1
if((IsUnitInRange(j5,m5,500.))and(is(m5))and(VOF(m5,j5,true)))then
elseif((IsUnitInRange(j5,m5,800.))and(is(m5)))then
call D48(m5,851986,h9[GetPlayerId(GetOwningPlayer(m5))])
set G0[64+GetPlayerId(GetOwningPlayer(m5))]=true
endif
exitwhen((i==6)or(not Z_7(j5))or(not Z_7(m5)))
call Y07(.5)
endloop
endif
elseif(OUG=='A19Z')then
if((GetPlayerController(GetOwningPlayer(m5))==MAP_CONTROL_COMPUTER)and(IsUnitType(m5,UNIT_TYPE_HERO)))then
loop
if(ZL7(m5))then
if(not VOF(m5,j5,true))then
call D48(m5,851986,h9[GetPlayerId(GetOwningPlayer(m5))])
set G0[64+GetPlayerId(GetOwningPlayer(m5))]=true
endif
endif
set i=i+1
exitwhen((i>15)or(not Z_7(m5))or(not Z_7(j5)))
call Y07(.5)
endloop
endif
elseif(OUG=='A14L')then
if((GetPlayerController(GetOwningPlayer(m5))==MAP_CONTROL_COMPUTER)and(IsUnitType(m5,UNIT_TYPE_HERO))and(is(m5)))then
call Y07(1.5)
set UP=GetUnitTypeId(m5)
if(UP=='U00F')then
call DE8(m5,852177,'A06K')
elseif(UP=='UC11')then
call C_7(m5,852066,'A037',m5)
elseif(UP=='Hamg')then
call C_7(m5,852095,'A26N',m5)
elseif(UP=='H00K')then
call C_7(m5,852278,'A05J',m5)
else
call J3G(m5,j5)
endif
endif
elseif(OUG=='A1P8')then
if((GetPlayerController(GetOwningPlayer(m5))==MAP_CONTROL_COMPUTER)and(IsUnitType(m5,UNIT_TYPE_HERO)))then
call Y07(.5)
loop
if((IsUnitInRange(j5,m5,600.))and(is(m5))and(VOF(m5,j5,true)))then
elseif((AN7(700.,L_7(m5),Condition(function GC8))==0)and(AN7(700.,L_7(m5),Condition(function KQ))==0)and(IsUnitInRange(j5,m5,1500.))and(is(m5)))then
call D48(m5,851986,h9[GetPlayerId(GetOwningPlayer(m5))])
endif
exitwhen((GetUnitAbilityLevel(m5,'B01Y')==0)or(not Z_7(j5))or(not Z_7(m5)))
call Y07(.5)
endloop
endif
elseif((OUG=='A21E')or(OUG=='A0BA')or(OUG=='A04C'))then
set F17=false
if(OUG=='A21E')then
call Y07(1)
set bj_lastLoadedUnit=j5
set m5=AJ7(150,HC[O5],Condition(function GT8))
if m5!=null then
call XM7(O5,"AI|SproutTree0 "+GetUnitName(m5))
set F37=99999
set HB4=GetPlayerId(GetOwningPlayer(m5))
set FL7=null
if((h4[HB4]!=null)or((G0[256+HB4])and(not A87(m5))and(GetHeroLevel(m5)>4)))then
if(h4[HB4]!=null)then
set H04=h4[HB4]
else
set H04=h8[HB4]
endif
else
set H04=h9[HB4]
endif
set UP=1
loop
exitwhen UP>8
set bj_lastCreatedDestructable=E78(GetHandleId(j5),"AI|SproutTree"+I2S(UP))
set H64=Z47(bj_lastCreatedDestructable,H04)
if H64<F37 then
set FL7=bj_lastCreatedDestructable
set F37=H64
endif
call DZ8(GetHandleId(j5),"AI|SproutTree"+I2S(UP),null)
set UP=UP+1
endloop
set F37=99999
set H04=null
call IV(GetLocationX(HC[O5]),GetLocationY(HC[O5]),350,Condition(function GT8),function ORG)
set m5=H04
call XM7(O5,"AI|SproutTree2 "+GetUnitName(m5))
if(m5!=null)and(AR7(m5,BU[yazhizhiren])or AR7(m5,BU[BA]))then
call UnitUseItemTarget(m5,bj_lastCreatedItem,FL7)
endif
endif
endif
if((OUG!='A21E')or(F37>600))and((m5!=null)and(GetPlayerController(GetOwningPlayer(m5))==MAP_CONTROL_COMPUTER)and(IsUnitType(m5,UNIT_TYPE_HERO))and(ZL7(m5)))then
if(OUG!='A21E')then
call Y07(1)
endif
set UP=GetUnitTypeId(m5)
if((UP=='H00U')and(Bz>V74[80+GetPlayerId(GetOwningPlayer(m5))])and K_8(m5,D07,D07,D57,'A0XL')and(KL8(m5,D57,D57,D57,false)))then
call IssueImmediateOrderById(m5,852129)
elseif((UP=='U00A')or(UP=='Ewar')or(UP=='HC92'))then
call IssueTargetOrderById(m5,852600,j5)
elseif((OUG=='A04C')and(UP=='Nbbc'))then
if(not LState(m5,"Omnislashing"))then
call DE8(m5,852128,'A05G')
endif
elseif((OUG=='A21E')and(UP=='Ekee'))then
set GZ[64+GetPlayerId(GetOwningPlayer(m5))]=true
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A06W',true)
call IssuePointOrderById(m5,852224,GetUnitX(m5)+10.,GetUnitY(m5)+10.)
set GZ[64+GetPlayerId(GetOwningPlayer(m5))]=false
elseif((OUG=='A21E')and(UP=='H00D'))then
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A0O1',true)
if((GetUnitLifePercent(m5)>50.)or(GetUnitLifePercent(j5)<50.))then
set LNF=bj_RADTODEG*Atan2(GetUnitY(j5)-GetUnitY(m5),GetUnitX(j5)-GetUnitX(m5))
else
set LNF=bj_RADTODEG*Atan2(GetUnitY(m5)-GetUnitY(j5),GetUnitX(m5)-GetUnitX(j5))
endif
set GZ[GetPlayerId(GetOwningPlayer(m5))]=true
call J8(GetPlayerId(GetOwningPlayer(m5)),IssuePointOrderById(m5,852218,GetUnitX(m5)+900.*Cos(LNF*bj_DEGTORAD),GetUnitY(m5)+900.*Sin(LNF*bj_DEGTORAD)))
elseif((OUG=='A21E')and(UP=='H004'))then
set GZ[64+GetPlayerId(GetOwningPlayer(m5))]=true
call MoveLocation(HA,GetWidgetX(m5)+10,GetWidgetY(m5)+10)
call L77(m5,852232,'A027',HA)
set GZ[64+GetPlayerId(GetOwningPlayer(m5))]=false
elseif((OUG=='A21E')and(UP=='HC92'))then
set GZ[64+GetPlayerId(GetOwningPlayer(m5))]=true
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A0RG',true)
call IssuePointOrderById(m5,852089,GetUnitX(m5)+10.,GetUnitY(m5)+10.)
set GZ[64+GetPlayerId(GetOwningPlayer(m5))]=false
elseif((GetUnitLifePercent(j5)<50.)and(kJ(GetUnitX(j5),GetUnitY(j5)))and(GetUnitLifePercent(m5)>50.))then
if(UP=='EC45')then
call IssueTargetOrderById(m5,852218,j5)
elseif((UP=='UC01')or(UP=='Edem'))then
call IssueTargetOrderById(m5,852525,j5)
elseif(UP=='U00K')then
call IssueTargetOrderById(m5,852218,j5)
elseif(UP=='O00P')then
call C_7(m5,852218,'A0FN',j5)
elseif(AR7(m5,BU[keledebishou]))then
call UnitUseItemPoint(m5,AV7(m5,BU[keledebishou]),GetUnitX(j5),GetUnitY(j5))
else
call LGF(m5)
endif
else
call LGF(m5)
endif
endif
elseif((OUG=='A0MU')or(OUG=='A0A2')or(OUG=='A080')or(OUG=='A1UZ'))then
if((GetPlayerController(GetOwningPlayer(m5))==MAP_CONTROL_COMPUTER)and(IsUnitType(m5,UNIT_TYPE_HERO))and(not IsUnitIllusion(m5))and(GetWidgetLife(m5)<1200.))then
call F28(m5,false)
endif
elseif(OUG=='A1NI')then
elseif(OUG=='A02N')then
if((GetPlayerController(GetOwningPlayer(m5))==MAP_CONTROL_COMPUTER)and(IsUnitType(m5,UNIT_TYPE_HERO)))then
loop
if((iU(m5))and(not A87(m5)))then
call IssueTargetOrderById(m5,851983,j5)
endif
exitwhen((GetUnitCurrentOrder(j5)!=852487)or(not Z_7(m5))or(not Z_7(j5)))
call Y07(.5)
endloop
endif
elseif((OUG=='A1YY')or(OUG=='A205'))then
if((IsUnitVisibleEx(j5,G8[0]))and(IsUnitVisibleEx(j5,N8[0])))then
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
call Y07(.2)
call MoveLocation(Hb,JD,Je)
call TriggerSleepAction(.5)
loop
call IV(GetUnitX(j5),GetUnitY(j5),1800.,Condition(function JH8),function NUG)
call Y07(.8)
exitwhen((GetUnitAbilityLevel(m5,'B0DV')==0)or(not Z_7(m5))or(not Z_7(j5)))
endloop
endif
elseif(OUG=='A1RK')then
call Y07(.2)
set LNF=Bz
loop
call IV(GetUnitX(j5),GetUnitY(j5),1100.,Condition(function JH8),function O8G)
call Y07(1.)
exitwhen((RAbsBJ(Bz-LNF)>=7.7)or(not Z_7(j5)))
endloop
elseif((OUG=='A0CC')or(OUG=='A02Z')or(OUG=='A04L'))then
if((GetPlayerController(GetOwningPlayer(m5))==MAP_CONTROL_COMPUTER)and(IsUnitType(m5,UNIT_TYPE_HERO)))then
loop
if(ZL7(m5))then
if(not VOF(m5,j5,true))then
call D48(m5,851986,h9[GetPlayerId(GetOwningPlayer(m5))])
set G0[64+GetPlayerId(GetOwningPlayer(m5))]=true
endif
endif
exitwhen((GetUnitCurrentOrder(j5)!=852487)or(not Z_7(m5))or(not Z_7(j5)))
call Y07(.5)
endloop
endif
elseif((OUG=='A017')or(OUG=='A07A')or(OUG=='A025')or(OUG=='A09U')or(OUG=='A01Z'))then
call TriggerSleepAction(.5)
if((not IsUnitVisibleEx(j5,G8[0]))or(not IsUnitVisibleEx(j5,N8[0])))then
call IV(GetUnitX(j5),GetUnitY(j5),1000.,Condition(function KO),function NZG)
endif
elseif((OUG=='A0B8')or(OUG=='A063')or(OUG=='A03O'))then
call TriggerSleepAction(1.)
if((AO7(800.,j5,Condition(function NXG))==0)and(not lA(j5,not IsUnitAlly(j5,G8[0]))))then
call IV(GetUnitX(j5),GetUnitY(j5),1000.,Condition(function JH8),function NAG)
endif
elseif(OUG=='A0D7')then
call TriggerSleepAction(.5)
if((not IsUnitVisibleEx(j5,G8[0]))or(not IsUnitVisibleEx(j5,N8[0])))then
call IV(GetUnitX(j5),GetUnitY(j5),1000.,Condition(function JH8),function NAG)
endif
elseif((OUG=='A0X7')or(OUG=='A0X5')or(OUG=='A06O')or(OUG=='A0SK'))then
if((IsUnitVisibleEx(j5,G8[0]))and(IsUnitVisibleEx(j5,N8[0])))then
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
set x0=GetUnitX(j5)
set y0=GetUnitY(j5)
set RJ4=SquareRoot((JD-x0)*(JD-x0)+(Je-y0)*(Je-y0))
if(OUG=='A0SK')then
set r=1300.
else
set r=700.
endif
set x1=x0+(JD-x0)*r/ RJ4
set y1=y0+(Je-y0)*r/ RJ4
call Y07(.2)
set RM4=GetOwningPlayer(j5)
set RJ4=250.
set RF4=x0
set RG4=y0
set RH4=x1
set RI4=y1
call IV(x0,y0,r,Condition(function NPG),function NTG)
endif
elseif(OUG=='A0VN')then
if(KQ8(GetOwningPlayer(j5))or GetRandomInt(1,4)==4)then
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
call IV(JD,Je,1100.,Condition(function JH8),function OMG)
endif
elseif((OUG=='A1P9')or(OUG=='A0LC'))then
if(AN7(1200.,GetUnitLoc(j5),Condition(function GZ8))>1)then
call XK7("Trying to PWN Ursa")
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
call IV(JD,Je,1100.,Condition(function JH8),function O7G)
endif
elseif(OUG=='A06I')then
set r=800+(200*GetUnitAbilityLevel(j5,'A06I'))
set LNF=TimerGetElapsed(E4)
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
set x0=GetUnitX(j5)
set y0=GetUnitY(j5)
set RJ4=SquareRoot((JD-x0)*(JD-x0)+(Je-y0)*(Je-y0))
set x1=x0+(JD-x0)*r/ RJ4
set y1=y0+(Je-y0)*r/ RJ4
set m5=j5
loop
exitwhen((m5!=null)and(IsUnitVisibleEx(m5,G8[0]))and(IsUnitVisibleEx(m5,N8[0])))
call Y07(.3)
call GroupClear(iF)
set bj_groupEnumTypeId='u00H'
call GroupEnumUnitsOfPlayer(iF,GetOwningPlayer(j5),filterGetUnitsOfPlayerAndTypeId)
set m5=GroupPickRandomUnit(iF)
exitwhen(RAbsBJ(TimerGetElapsed(E4)-LNF)>1.)
endloop
call Y07(.2)
loop
exitwhen(RAbsBJ(TimerGetElapsed(E4)-LNF)>1.)
set RM4=GetOwningPlayer(j5)
set RJ4=250.
set RF4=GetUnitX(m5)
set RG4=GetUnitY(m5)
set RH4=x1
set RI4=y1
call IV(RF4,RG4,r,Condition(function NPG),function NTG)
call Y07(.4)
endloop
elseif(OUG=='A0O1')then
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
call Y07(.1)
loop
call GroupClear(iF)
set bj_groupEnumTypeId='e01T'
call GroupEnumUnitsOfPlayer(iF,GetOwningPlayer(j5),filterGetUnitsOfPlayerAndTypeId)
set m5=GroupPickRandomUnit(iF)
exitwhen((m5!=null)and(IsUnitVisibleEx(m5,G8[0]))and(IsUnitVisibleEx(m5,N8[0])))
call Y07(.3)
exitwhen(m5==null)
endloop
loop
call GroupClear(iF)
set bj_groupEnumTypeId='e01T'
call GroupEnumUnitsOfPlayer(iF,GetOwningPlayer(j5),filterGetUnitsOfPlayerAndTypeId)
set m5=FirstOfGroup(iF)
exitwhen(m5==null)
call MoveLocation(Hb,JD,Je)
call IV(JD,Je,1000.,Condition(function JH8),function NVG)
call Y07(.5)
endloop
elseif(OUG=='A085')then
call Y07(.1)
set LNF=I2R(1150+(250*GetUnitAbilityLevel(j5,'A085')))
loop
call GroupClear(iF)
set bj_groupEnumTypeId='u00J'
call GroupEnumUnitsOfPlayer(iF,GetOwningPlayer(j5),filterGetUnitsOfPlayerAndTypeId)
set m5=FirstOfGroup(iF)
exitwhen((m5!=null)and(IsUnitVisibleEx(m5,G8[0]))and(IsUnitVisibleEx(m5,N8[0])))
call Y07(.3)
exitwhen((GetUnitCurrentOrder(j5)!=852600)or(not Z_7(j5)))
endloop
loop
exitwhen((GetUnitCurrentOrder(j5)!=852600)or(not Z_7(j5)))
call IV(GetUnitX(j5),GetUnitY(j5),LNF,Condition(function JH8),function NWG)
call Y07(.5)
endloop
elseif(OUG=='A0L8')then
set LNF=TimerGetElapsed(E4)+3.5
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
set x0=JD-GetUnitX(j5)
set y0=Je-GetUnitY(j5)
set r=SquareRoot(x0*x0+y0*y0)
set x0=x0*1000./ r
set y0=y0*1000./ r
loop
set bj_groupEnumTypeId='h005'
call GroupEnumUnitsOfPlayer(iF,GetOwningPlayer(j5),filterGetUnitsOfPlayerAndTypeId)
loop
set m5=FirstOfGroup(iF)
exitwhen m5==null or(GetWidgetLife(m5)>.405)
call GroupRemoveUnit(iF,m5)
endloop
set h4[272+O5]=m5
exitwhen((m5!=null)and(IsUnitVisibleEx(m5,G8[0]))and(IsUnitVisibleEx(m5,N8[0])))
call Y07(.1)
exitwhen TimerGetElapsed(E4)>LNF
endloop
call Y07(.1)
loop
exitwhen(TimerGetElapsed(E4)>LNF)or(GetWidgetLife(m5)<.405)
set RM4=GetOwningPlayer(j5)
set RF4=GetUnitX(m5)
set RG4=GetUnitY(m5)
set RH4=RF4+x0
set RI4=RG4+y0
set RJ4=300.
call IV(RF4,RG4,1000.,Condition(function NPG),function NTG)
call Y07(.1)
endloop
elseif(OUG=='A1S4')then
set LNF=TimerGetElapsed(E4)
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
set r=SquareRoot((JD-x0)*(JD-x0)+(Je-y0)*(Je-y0))
set x0=(JD-GetUnitX(j5))*1000./ r
set y0=(Je-GetUnitY(j5))*1000./ r
loop
set bj_groupEnumTypeId='h0C2'
call GroupEnumUnitsOfPlayer(iF,GetOwningPlayer(j5),filterGetUnitsOfPlayerAndTypeId)
set m5=FirstOfGroup(iF)
exitwhen((m5!=null)and(IsUnitVisibleEx(m5,G8[0]))and(IsUnitVisibleEx(m5,N8[0])))
call Y07(.3)
exitwhen(RAbsBJ(TimerGetElapsed(E4)-LNF)>3.5)
endloop
set h4[272+O5]=m5
call Y07(.2)
loop
exitwhen(RAbsBJ(TimerGetElapsed(E4)-LNF)>3.5)or(not Z_7(m5))
set RM4=GetOwningPlayer(j5)
set RF4=GetUnitX(m5)
set RG4=GetUnitY(m5)
set RH4=RF4+x0
set RI4=RG4+y0
set RJ4=200.
call IV(RF4,RG4,1000.,Condition(function NPG),function NTG)
call Y07(.2)
endloop
elseif(OUG=='A00P')then
loop
call Y07(.8)
exitwhen((GetUnitAbilityLevel(m5,'B008')==0)or(GetUnitCurrentOrder(j5)!=852480))
call EOG(j5,m5)
endloop
elseif((OUG=='A0NO')or(OUG=='A0S8')or(OUG=='A0QE'))then
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
if(OUG=='A0NO')then
set UP=180
elseif(OUG=='A0QE')then
set UP=200+'d'*GetUnitAbilityLevel(j5,'A0QE')
else
set UP=400
endif
call IV(JD,Je,UP,Condition(function JH8),function OSG)
elseif((OUG=='A0MT')or(OUG=='A027')or(OUG=='A064')or(OUG=='A0BZ')or(OUG=='A06W'))then
if((IsUnitVisibleEx(j5,G8[0]))and(IsUnitVisibleEx(j5,N8[0])))then
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
if(OUG=='A06W')then
set UP=130+(25*GetUnitAbilityLevel(j5,'A06W'))
elseif(OUG=='A027')then
set UP=250
else
set UP=500
if(OUG=='A064')then
call Y07(.5)
endif
endif
set LNF=Bz
loop
exitwhen(RAbsBJ(Bz-LNF)>=1.5)
call IV(JD,Je,UP,Condition(function JH8),function N_G)
call Y07(.4)
endloop
call Y07(.4)
call IV(JD,Je,UP,Condition(function JH8),function OSG)
endif
elseif((OUG=='A05T')or(OUG=='A08H')or(OUG=='A0M1')or(OUG=='A1AX'))then
call Y07(.5)
call IV(GetUnitX(m5),GetUnitY(m5),600.,Condition(function JH8),function N1G)
elseif((OUG=='A01F')or(OUG=='A02S')or(OUG=='A0O7')or(OUG=='A02M')or(OUG=='A06N')or(OUG=='A072')or(OUG=='A074')or(OUG=='A078')or(OUG=='A0FN')or(OUG=='A03F')or(OUG=='A28R')or(OUG=='A28S'))then
call IV(GetUnitX(j5)+350.*Cos(GetUnitFacing(j5)*bj_DEGTORAD),GetUnitY(j5)+350.*Sin(GetUnitFacing(j5)*bj_DEGTORAD),450.,Condition(function JH8),function OSG)
elseif((OUG=='A05E')or(OUG=='A29I')or(OUG=='A013')or(OUG=='A0A6'))then
call Y07(.5)
call IV(GetUnitX(j5),GetUnitY(j5),900.,Condition(function JH8),function OSG)
elseif((OUG=='A06M')or(OUG=='A08N')or(OUG=='A03Y')or(OUG=='A00S')or(OUG=='A29K')or(OUG=='A0DL')or(OUG=='A0SC'))then
call IV(GetUnitX(j5),GetUnitY(j5),350.,Condition(function JH8),function OSG)
elseif((OUG=='A05V')or(OUG=='A0DH')or(OUG=='A29L')or(OUG=='A0KV'))then
call IV(GetUnitX(j5),GetUnitY(j5),550.,Condition(function JH8),function OSG)
elseif((OUG=='A00Y')or(OUG=='A0G2')or(OUG=='A010')or(OUG=='A020'))then
call IV(GetUnitX(m5),GetUnitY(m5),450.,Condition(function JH8),function OSG)
elseif(OUG=='A07Z')then
call Y07(1.)
call IV(GetUnitX(j5),GetUnitY(j5),950.,Condition(function JH8),function NLG)
elseif((OUG=='A0HB')or(OUG=='A0D3')or(OUG=='A0DF'))then
call Y07(1.)
call IV(GetUnitX(j5),GetUnitY(j5),1000.,Condition(function JH8),function NCG)
elseif((OUG=='A0EY')or(OUG=='A0FH')or(OUG=='A0F0'))then
if(OUG=='A0EY')then
set LNF=200.
elseif(OUG=='A0FH')then
set LNF=450.
elseif(OUG=='A0F0')then
set LNF=700.
endif
call IV(GetUnitX(j5)+LNF*Cos(GetUnitFacing(j5)*bj_DEGTORAD),GetUnitY(j5)+LNF*Sin(GetUnitFacing(j5)*bj_DEGTORAD),350.,Condition(function JH8),function OSG)
elseif((OUG=='A054')or(OUG=='A00U')or(OUG=='A29J'))then
call IV(GetUnitX(j5),GetUnitY(j5),850.,Condition(function JH8),function N5G)
elseif((OUG=='A0H0')or(OUG=='A0RV'))then
call TriggerSleepAction(.1)
loop
call IV(GetUnitX(j5),GetUnitY(j5),700.,Condition(function JH8),function NJG)
exitwhen(((IsUnitVisibleEx(j5,G8[0]))and(IsUnitVisibleEx(j5,N8[0])))or(not Z_7(j5)))
call Y07(1.5)
endloop
elseif(OUG=='A01B')then
set LNF=Bz
loop
exitwhen(RAbsBJ(Bz-LNF)>=9.)
call IV(GetUnitX(j5),GetUnitY(j5),700.,Condition(function Kq),function N2G)
call Y07(.8)
endloop
elseif(OUG=='A0B1')then
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
set LNF=Bz
call Y07(.5)
loop
exitwhen(RAbsBJ(Bz-LNF)>=7.5)
call IV(JD,Je,550.,Condition(function JH8),function N_G)
call Y07(.6)
endloop
elseif(OUG=='A01I')then
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
set LNF=Bz
call Y07(.5)
loop
exitwhen(RAbsBJ(Bz-LNF)>=6.5)
call IV(JD,Je,300.,Condition(function JH8),function N_G)
call Y07(.6)
endloop
elseif(OUG=='A0RA')then
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
set LNF=Bz
call Y07(.5)
loop
exitwhen(RAbsBJ(Bz-LNF)>=9.)
call IV(JD,Je,450.,Condition(function JH8),function N_G)
call Y07(.6)
endloop
elseif(OUG=='A0IL')then
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
set LNF=Bz
call Y07(.5)
loop
exitwhen(RAbsBJ(Bz-LNF)>=10.5)
call IV(JD,Je,630.,Condition(function JH8),function N_G)
call Y07(.6)
endloop
elseif(OUG=='A0BQ')then
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
set LNF=Bz
call Y07(.5)
loop
exitwhen(RAbsBJ(Bz-LNF)>=7.5)
call IV(JD,Je,1000.,Condition(function JH8),function N_G)
call Y07(.6)
endloop
elseif(OUG=='A0RG')then
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
set UP=360+(80*GetUnitAbilityLevel(j5,'A0RG'))
set LNF=Bz
call Y07(.5)
loop
exitwhen(RAbsBJ(Bz-LNF)>=6.5)
call IV(JD,Je,UP,Condition(function JH8),function N_G)
call Y07(.6)
endloop
elseif(OUG=='A05G')then
set LNF=Bz
loop
exitwhen(RAbsBJ(Bz-LNF)>=4.5)
call IV(GetUnitX(j5),GetUnitY(j5),420.,Condition(function JH8),function O4G)
call Y07(.6)
endloop
elseif(OUG=='A035')then
set LNF=Bz
call Y07(.5)
loop
exitwhen(RAbsBJ(Bz-LNF)>=7.5)
call IV(GetUnitX(j5),GetUnitY(j5),680.,Condition(function JH8),function O4G)
call Y07(.6)
endloop
elseif(OUG=='A0O5')then
set LNF=Bz
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
loop
exitwhen(RAbsBJ(Bz-LNF)>=4.5)
call IV(JD,Je,950.,Condition(function JH8),function N_G)
call Y07(.5)
endloop
elseif(OUG=='A0J1')then
call Y07(1.)
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
set LNF=Bz
loop
exitwhen((not GZ[384+O5])or(RAbsBJ(Bz-LNF)>=5.))
call MoveLocation(Hb,JD,Je)
call IV(JD,Je,750.,Condition(function JH8),function N_G)
call Y07(.5)
endloop
set GZ[384+O5]=false
elseif(OUG=='A06R')then
loop
call Y07(.5)
exitwhen((GetUnitCurrentOrder(j5)!=852581)or(not Z_7(j5)))
call IV(GetUnitX(j5),GetUnitY(j5),750.,Condition(function JH8),function N5G)
endloop
call Y07(.5)
if(GZ[384+O5])then
set UP=0
loop
exitwhen((not GZ[384+O5])or(UP>12))
call IV(GetUnitX(j5),GetUnitY(j5),550.,Condition(function JH8),function N5G)
call Y07(.6)
set UP=UP+1
endloop
set GZ[384+O5]=false
endif
elseif((OUG=='A0NT')or(OUG=='A0NX'))then
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
call Y07(.5)
loop
call Y07(.6)
exitwhen((GetUnitCurrentOrder(j5)!=852597)or(not Z_7(j5)))
call IV(JD,Je,900.,Condition(function JH8),function N5G)
endloop
elseif((OUG=='A03R')or(OUG=='A0AV'))then
call Y07(.5)
loop
call Y07(.6)
exitwhen((GetUnitCurrentOrder(j5)!=852600)or(not Z_7(j5)))
call IV(GetUnitX(j5),GetUnitY(j5),900.,Condition(function JH8),function N5G)
endloop
elseif((OUG=='A073')or(OUG=='A03J')or(OUG=='A04J')or(OUG=='A04M')or(OUG=='A04N'))then
set LNF=Bz
loop
exitwhen((RAbsBJ(Bz-LNF)>=29.)or(not Z_7(j5)))
call IV(GetUnitX(j5),GetUnitY(j5),1200.,Condition(function JH8),function N6G)
call Y07(.8)
endloop
elseif(OUG=='A1BX')then
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
loop
call Y07(.6)
exitwhen((GetUnitCurrentOrder(j5)!=852188)or(not Z_7(j5)))
call MoveLocation(Hb,JD,Je)
call IV(JD,Je,1000.,Condition(function JH8),function N_G)
endloop
elseif((OUG=='A21F')or(OUG=='A21G'))then
loop
call Y07(1.)
exitwhen((GetUnitAbilityLevel(j5,'B024')==0)or(not Z_7(j5)))
call IV(GetUnitX(j5),GetUnitY(j5),350.,Condition(function JH8),function O4G)
endloop
elseif(OUG=='A1AA')then
if((IsUnitVisibleEx(j5,G8[0]))and(IsUnitVisibleEx(j5,N8[0])))then
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
set x0=GetUnitX(j5)
set y0=GetUnitX(j5)
set LNF=Bz
call G7G(j5,j5)
loop
exitwhen(RAbsBJ(Bz-LNF)>=1.5)
call IV(JD,Je,475,Condition(function JH8),function N_G)
call IV(x0,y0,475,Condition(function JH8),function N_G)
call Y07(.4)
endloop
call Y07(.4)
call IV(JD,Je,UP,Condition(function JH8),function OSG)
endif
elseif(OUG=='A1A1')then
set r=2400
set LNF=TimerGetElapsed(E4)
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
set x0=GetUnitX(j5)
set y0=GetUnitY(j5)
set RJ4=SquareRoot((JD-x0)*(JD-x0)+(Je-y0)*(Je-y0))
set x1=x0+(JD-x0)*r/ RJ4
set y1=y0+(Je-y0)*r/ RJ4
set m5=j5
call Y07(1.)
loop
exitwhen(RAbsBJ(TimerGetElapsed(E4)-LNF)>3.5)
set RM4=GetOwningPlayer(j5)
set RJ4=350.
set RF4=GetUnitX(m5)
set RG4=GetUnitY(m5)
set RH4=x1
set RI4=y1
call IV(RF4,RG4,r,Condition(function NPG),function NTG)
call Y07(.4)
endloop
elseif(OUG=='A07Q')then
if GetPlayerController(GetOwningPlayer(j5))==MAP_CONTROL_COMPUTER then
call RemoveGuardPosition(j5)
endif
elseif(OUG=='A06B')then
call G7G(j5,j5)
elseif(OUG=='A2E3')then
set r=600+(200*GetUnitAbilityLevel(j5,'A2E3'))
set LNF=TimerGetElapsed(E4)
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
set x0=GetUnitX(j5)
set y0=GetUnitY(j5)
set RJ4=SquareRoot((JD-x0)*(JD-x0)+(Je-y0)*(Je-y0))
set x1=x0+(JD-x0)*r/ RJ4
set y1=y0+(Je-y0)*r/ RJ4
set m5=j5
loop
exitwhen((m5!=null)and(IsUnitVisibleEx(m5,G8[0]))and(IsUnitVisibleEx(m5,N8[0])))
call Y07(.3)
call GroupClear(iF)
set bj_groupEnumTypeId='u00H'
call GroupEnumUnitsOfPlayer(iF,GetOwningPlayer(j5),filterGetUnitsOfPlayerAndTypeId)
set m5=GroupPickRandomUnit(iF)
exitwhen(RAbsBJ(TimerGetElapsed(E4)-LNF)>1.)
endloop
call Y07(.2)
loop
exitwhen(RAbsBJ(TimerGetElapsed(E4)-LNF)>1.)
set RM4=GetOwningPlayer(j5)
set RJ4=250.
set RF4=GetUnitX(m5)
set RG4=GetUnitY(m5)
set RH4=x1
set RI4=y1
call IV(RF4,RG4,r,Condition(function NPG),function NTG)
call Y07(.4)
endloop
elseif(OUG==IP7[1]or OUG==IP7[2]or OUG==IP7[3])and KR8(Player(O5))then
set JD=GetLocationX(HC[O5])
set Je=GetLocationY(HC[O5])
set F37=Z87(GetUnitX(j5),GetUnitY(j5),JD,Je)/(2.5*GetUnitMoveSpeed(j5))-.4
if F37>0 then
call VM7(F37)
else
call VM7(.1)
endif
set bj_lastLoadedUnit=j5
call MoveLocation(HA,JD,Je)
set F17=(iU(j5))and((LState(j5,"AI|EmberEscape")or(AN7(300,HA,Condition(function GT8))!=0))and IssuePointOrderById(j5,852185,JD,Je))
call EY8(j5,"AI|EmberEscape")
elseif(OUG=='A1R5' or OUG=='A137' or OUG=='A231')then
set eY[224+O5]=R2I(Bz)+GE7
set hq[832+O5]=R2I(Bz)+9
endif
set j5=null
set m5=null
endfunction
function OVG takes nothing returns nothing
local unit j5=GetTriggerUnit()
local integer O5=GetPlayerId(GetOwningPlayer(j5))
local integer OUG=GetSpellAbilityId()
local boolean KAG=(GetPlayerController(Player(O5))==MAP_CONTROL_COMPUTER)
local unit X77=GetSpellTargetUnit()
local integer X5
local integer i1
local integer UP=1
if(OUG=='A1R5' or OUG=='A137' or OUG=='A231')then
set hq[832+O5]=0
endif
if(OUG=='A1R5' or OUG=='A137')and KAG then
call Y07(.1)
if(VK4[O5]!=null)and(not UnitHasItem(j5,VK4[O5]))then
if AR7(j5,BU[QB])then
call RemoveItem(bj_lastCreatedItem)
endif
if UnitAddItem(j5,VK4[O5])then
set VK4[O5]=null
endif
endif
endif
if(OUG=='A1R5' or OUG=='A137')or(OUG=='A231')or(OUG=='A01O')or(OUG=='A0HA')then
call Y07(.1)
call MH8(j5)
endif
if(OUG=='A1TB')then
call Y07(11.)
set I97=LoadUnitHandle(R8,(GetHandleId(j5)),(652))
set bj_forLoopAIndex=GetPlayerId(GetOwningPlayer(I97))
if(not GZ[224+O5])or(h4[bj_forLoopAIndex]!=null)or KQ8(Player(bj_forLoopAIndex))then
call IssueImmediateOrderById(j5,852600)
endif
endif
call Y07(2)
loop
exitwhen UP>11
if h4[352+UP]==j5 then
set i1=GetUnitTypeId(Y7[UP])
set X5=GetUnitCurrentOrder(Y7[UP])
set G0[272+UP]=true
if i1=='U00K' and(X5==852503)then
call IssueImmediateOrderById(Y7[UP],851972)
call J3(Y7[UP],false)
call XK7("Dodge complete")
elseif i1=='N00B' and(X5==852514)then
call IssueImmediateOrderById(Y7[UP],851972)
call J3(Y7[UP],false)
endif
set G0[272+UP]=false
set h4[352+UP]=null
endif
set UP=UP+1
endloop
set j5=null
endfunction
function OWG takes nothing returns nothing
call F1G(GetEnumUnit())
endfunction
function OXG takes unit u returns nothing
if(A87(u))then
if ZL7(u)then
call D48(u,851986,h9[GetPlayerId(GetOwningPlayer(u))])
endif
elseif(Z47(u,DH8(u))>5500.)then
if ZL7(u)then
call D48(u,851986,h9[GetPlayerId(GetOwningPlayer(u))])
endif
set h4[GetPlayerId(GetOwningPlayer(u))]=null
else
if ZL7(u)then
call D48(u,851983,JW(u))
endif
endif
if((eY[GetPlayerId(GetOwningPlayer(u))]!=4)and(eY[GetPlayerId(GetOwningPlayer(u))]!=2))then
set eY[GetPlayerId(GetOwningPlayer(u))]=3
endif
endfunction
function OYG takes unit u returns nothing
if(A87(u))then
if ZL7(u)then
call D48(u,851986,h9[GetPlayerId(GetOwningPlayer(u))])
endif
elseif(Z47(u,DH8(u))>5500.)then
if ZL7(u)then
call D48(u,851986,h9[GetPlayerId(GetOwningPlayer(u))])
endif
set h4[GetPlayerId(GetOwningPlayer(u))]=null
else
if ZL7(u)then
call D48(u,851983,JW(u))
endif
endif
set eY[GetPlayerId(GetOwningPlayer(u))]=4
set GZ[480+GetPlayerId(GetOwningPlayer(u))]=true
endfunction
function OZG takes nothing returns nothing
call OXG(GetEnumUnit())
endfunction
function OAG takes nothing returns nothing
call OYG(GetEnumUnit())
endfunction
function OBG takes nothing returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(GetEnumUnit()))
if((Z47(GetEnumUnit(),DH8(GetEnumUnit()))<5000.)and(eY[O5]!=4))then
if(IsUnitAlly(GetEnumUnit(),N8[0]))then
if(G3==0)then
set h8[O5]=h7['o']
set h8[16+O5]=h7['r']
elseif(G3==1)then
set h8[O5]=h7[131]
set h8[16+O5]=h7[135]
elseif(G3==2)then
set h8[O5]=h7[151]
set h8[16+O5]=h7[155]
endif
elseif(IsUnitAlly(GetEnumUnit(),G8[0]))then
if(G4==0)then
set h8[O5]=h7[11]
set h8[16+O5]=h7[14]
elseif(G4==1)then
set h8[O5]=h7[31]
set h8[16+O5]=h7[35]
elseif(G4==2)then
set h8[O5]=h7[51]
set h8[16+O5]=h7[55]
endif
endif
set h9[O5]=DH8(GetEnumUnit())
set h9[16+O5]=DH8(GetEnumUnit())
if(ZL7(GetEnumUnit()))then
call D48(GetEnumUnit(),851983,h8[O5])
endif
set eY[O5]=1
elseif((IsUnitAlly(GetEnumUnit(),G8[0]))and(eY[O5]!=9))then
if(((G4==1)and(ZD7(GetEnumUnit())==2))or((G4==2)and(ZD7(GetEnumUnit())==1)))then
set G0[32+O5]=true
call J3(GetEnumUnit(),true)
elseif(G4==0)then
call LWF(GetEnumUnit(),h7[9+P54])
elseif(G4==1)then
call LWF(GetEnumUnit(),h7[29+P24])
elseif(G4==2)then
call LWF(GetEnumUnit(),h7[49+P_4])
endif
elseif((IsUnitAlly(GetEnumUnit(),N8[0]))and(eY[O5]!=9))then
if(((G3==1)and(ZD7(GetEnumUnit())==2))or((G3==2)and(ZD7(GetEnumUnit())==1)))then
set G0[32+O5]=true
call J3(GetEnumUnit(),true)
elseif(G3==0)then
call LWF(GetEnumUnit(),h7['u'-P54])
elseif(G3==1)then
call LWF(GetEnumUnit(),h7[139-P24])
elseif(G3==2)then
call LWF(GetEnumUnit(),h7[159-P_4])
endif
endif
endfunction
function OCG takes nothing returns nothing
set eY[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=11
set h8[48+GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=h7[250]
endfunction
function CXF takes nothing returns nothing
local unit it=LUnit(S44,"OB|U")
local integer LQF
if(ZL7(it))then
call D48(it,851986,h9[GetPlayerId(GetOwningPlayer(it))])
endif
set G0[48+GetPlayerId(GetOwningPlayer(it))]=true
set LQF=LIF(6.,it,false,true)
set G0[48+GetPlayerId(GetOwningPlayer(it))]=false
if(GetWidgetLife(it)<=.405)then
elseif((LQF==2)and(not A87(it))and(not G0[32+GetPlayerId(GetOwningPlayer(it))])and(ZL7(it)))then
call IssueImmediateOrderById(it,851993)
elseif(LQF==3)then
if((not A87(it))and(not G0[32+GetPlayerId(GetOwningPlayer(it))]))then
if ZL7(it)then
call D48(it,851983,h8[GetPlayerId(GetOwningPlayer(it))])
endif
else
call F28(it,false)
endif
endif
endfunction
function O3G takes player O6G,player OLG,boolean O1G,string O0G returns nothing
if(O1G)then
call DisplayTimedTextToPlayer(OLG,0,0,10.,W[GetPlayerId(O6G)]+GetPlayerName(O6G)+"|r has learned "+O0G)
else
call DisplayTimedTextToPlayer(OLG,0,0,10.,W[GetPlayerId(O6G)]+GetPlayerName(O6G)+"|r didn't yet learn "+O0G)
endif
endfunction
function O5G takes player OLG,unit O2G,integer O_G,string P4G returns nothing
call DisplayTimedTextToPlayer(OLG,0,0,10.,"    - |c0000cc00"+GetAbilityName(O_G)+"|r "+P4G+"[|c00ffff00Level "+I2S(GetUnitAbilityLevel(O2G,O_G))+"|r]")
endfunction
function P7G takes player P8G,player P9G returns nothing
local integer iZ=GetPlayerId(P8G)
local unit it=Y7[iZ]
local integer PDG
local integer PEG=0
local integer array PFG
local boolean array PGG
if(it==null)then
return
endif
set PFG[1]=eY[336+iZ]
if(GetUnitAbilityLevel(it,PFG[1])!=0)then
set PGG[1]=true
set PEG=PEG+1
else
set PGG[1]=false
endif
set PFG[2]=eY[352+iZ]
if(GetUnitAbilityLevel(it,PFG[2])!=0)then
set PGG[2]=true
set PEG=PEG+1
else
set PGG[2]=false
endif
set PFG[3]=eY[368+iZ]
if((GetUnitTypeId(it)=='N01O')or(GetUnitTypeId(it)=='N013')or(GetUnitTypeId(it)=='N014')or(GetUnitTypeId(it)=='N015'))then
set PFG[3]='A0AE'
endif
if(GetUnitAbilityLevel(it,PFG[3])!=0)then
set PGG[3]=true
set PEG=PEG+1
else
set PGG[3]=false
endif
set PFG[4]=eY[172+iZ]
if(GetUnitAbilityLevel(it,PFG[4])!=0)then
set PGG[4]=true
set PEG=PEG+1
else
set PGG[4]=false
endif
set PFG[5]=eY[188+iZ]
if(GetUnitAbilityLevel(it,PFG[5])!=0)then
set PGG[5]=true
set PEG=PEG+1
else
set PGG[5]=false
endif
set PFG[6]='Aamk'
if((GetUnitTypeId(it)=='Nfir')or(GetUnitTypeId(it)=='O00P')or(GetUnitTypeId(it)=='N01O')or(GetUnitTypeId(it)=='N013')or(GetUnitTypeId(it)=='N014')or(GetUnitTypeId(it)=='N015')or(GetUnitTypeId(it)=='Hblm')or(GetUnitTypeId(it)=='N0MU')or(GetUnitTypeId(it)=='N0MW'))then
set PFG[6]='A0NR'
endif
if(GetUnitAbilityLevel(it,PFG[6])!=0)then
set PGG[6]=true
set PEG=PEG+1
else
set PGG[6]=false
endif
if(PEG==0)then
call O3G(P8G,P9G,false,"any skill!")
return
endif
if((PEG==1))then
call O3G(P8G,P9G,true,"the following skill:")
endif
if((PEG>1))then
call O3G(P8G,P9G,true,"the following skills:")
endif
set PDG=1
loop
if(PGG[PDG])then
if(GetUnitAbilityLevel(it,PFG[PDG])==1)then
call O5G(P9G,it,PFG[PDG],"")
else
call O5G(P9G,it,PFG[PDG],"up to ")
endif
endif
exitwhen PDG>2
set PDG=PDG+1
endloop
if(GetUnitAbilityLevel(it,PFG[4])>=GetUnitAbilityLevel(it,PFG[5]))then
if(PGG[4])then
if(GetUnitAbilityLevel(it,PFG[4])==1)then
call O5G(P9G,it,PFG[4],"")
else
call O5G(P9G,it,PFG[4],"up to ")
endif
endif
elseif(PGG[5])then
if(GetUnitAbilityLevel(it,PFG[5])==1)then
call O5G(P9G,it,PFG[5],"")
else
call O5G(P9G,it,PFG[5],"up to ")
endif
endif
if(PGG[6])then
if(GetUnitAbilityLevel(it,PFG[6])==1)then
call O5G(P9G,it,PFG[6],"")
else
call O5G(P9G,it,PFG[6],"up to ")
endif
endif
if((PEG<4))then
call O3G(P8G,P9G,false,"the following skills:")
endif
if((PEG==4))then
call O3G(P8G,P9G,false,"the following skill:")
endif
set PDG=1
loop
if(not(PGG[PDG]))then
call O5G(P9G,it,PFG[PDG],"")
endif
exitwhen PDG>2
set PDG=PDG+1
endloop
if((GetUnitAbilityLevel(it,PFG[4])==0)and(GetUnitAbilityLevel(it,PFG[5])==0))then
call O5G(P9G,it,PFG[4],"")
endif
if(not(PGG[6]))then
call O5G(P9G,it,PFG[6],"")
endif
set it=null
endfunction
function PHG takes string VH returns nothing
local player pl=null
local unit m5=null
local integer UP
local integer B2F=0
local integer kg
local boolean L1F=false
local string PIG=""
local group PJG=null
local integer i=0
if((SubString(VH,0,2)=="-o")or(SubString(VH,0,2)=="-c")or(SubString(VH,0,2)==" c"))then
set VH=SubString(VH,2,StringLength(VH))
else
return
endif
set F57=null
if(VH=="tango")then
if(Bz<60.)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,GetObjectName('Y019'))
set PX4=true
endif
elseif(VH=="flask")then
if(Bz<60.)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,GetObjectName('Y020'))
set PX4=false
endif
elseif(VH=="ld")then
if(U24==false)then
set U24=true
call X17(GetObjectName('Y021'))
else
set U24=false
call X17(GetObjectName('Y022'))
endif
elseif(VH=="aen")then
if(GetTriggerPlayer()==RT4 and RU4==null)then
call ju(WO7(bj_mapInitialPlayableArea,Condition(function JM8)),function OWG)
set bj_lastLoadedUnit=JS4
set L1F=true
elseif(GetTriggerPlayer()==RU4 and RT4==null)then
call ju(WO7(bj_mapInitialPlayableArea,Condition(function JK8)),function OWG)
set bj_lastLoadedUnit=IN4
set L1F=true
endif
set PIG=GetObjectName('Y023')
elseif(VH=="den")then
if(GetTriggerPlayer()==RT4 and RU4==null)then
call ju(WO7(bj_mapInitialPlayableArea,Condition(function JM8)),function OZG)
set bj_lastLoadedUnit=JS4
set L1F=true
elseif(GetTriggerPlayer()==RU4 and RT4==null)then
call ju(WO7(bj_mapInitialPlayableArea,Condition(function JK8)),function OZG)
set bj_lastLoadedUnit=IN4
set L1F=true
endif
set PIG=GetObjectName('Y024')
elseif(VH=="sden")then
if(GetTriggerPlayer()==RT4 and RU4==null)then
call ju(WO7(bj_mapInitialPlayableArea,Condition(function JM8)),function OAG)
set bj_lastLoadedUnit=JS4
set L1F=true
elseif(GetTriggerPlayer()==RU4 and RT4==null)then
call ju(WO7(bj_mapInitialPlayableArea,Condition(function JK8)),function OAG)
set bj_lastLoadedUnit=IN4
set L1F=true
endif
set PIG=GetObjectName('Y026')
elseif(VH=="roshanen")then
if GetWidgetLife(C4)<.405 then
if(GetTriggerPlayer()==RT4)then
set bj_lastLoadedUnit=JS4
elseif(GetTriggerPlayer()==RU4)then
set bj_lastLoadedUnit=IN4
endif
set L1F=true
set PIG=GetObjectName('Y027')
else
if(GetTriggerPlayer()==RT4)then
call ju(WO7(bj_mapInitialPlayableArea,Condition(function JM8)),function OCG)
set bj_lastLoadedUnit=JS4
set L1F=true
elseif(GetTriggerPlayer()==RU4)then
call ju(WO7(bj_mapInitialPlayableArea,Condition(function JK8)),function OCG)
set bj_lastLoadedUnit=IN4
set L1F=true
endif
set PIG=GetObjectName('Y012')
endif
elseif(SubString(VH,0,7)=="itemfix")then
set VH=SubString(VH,7,StringLength(VH))
set F57=CreateForce()
call ForceAddPlayer(F57,GetTriggerPlayer())
loop
call TriggerSleepAction(.0)
set kg=kh(VH)
if(kg>=0)then
set pl=Z07(SubString(VH,0,kg))
set VH=SubString(VH,kg+1,StringLength(VH))
else
set pl=Z07(SubString(VH,0,StringLength(VH)))
endif
if((pl!=null)and(KR8(pl))and((IsPlayerAlly(pl,G8[0])and(RT4==null or GetTriggerPlayer()==RT4))or(IsPlayerAlly(pl,N8[0])and(RU4==null or GetTriggerPlayer()==RU4))))then
set UP=GetPlayerId(pl)
if Y7[UP]==null then
else
if GetWidgetLife(Y7[UP])>.405 then
call F28(Y7[UP],true)
set hq[528+UP]=Bz+30.
call SUnit(S44,"OB|U",Y7[UP])
call ExecuteFunc("CXF")
if(eY[UP]>=9)then
set eY[UP]=1
endif
endif
set GZ[192+UP]=true
call FV8(Y7[UP],F57)
call FQ8(Y7[UP],F57,"Fixing itembuild")
endif
endif
exitwhen kg<0
endloop
call DestroyForce(F57)
elseif((VH=="neut")or(VH=="neu"))then
if(GetTriggerPlayer()==RT4)then
set bj_lastLoadedUnit=IN4
set Gv=not Gv
if(Gv)then
set B2F=1
endif
else
set bj_lastLoadedUnit=JS4
set Gw=not Gw
if(Gw)then
set B2F=1
endif
endif
set L1F=true
set PIG=GetObjectName('Y016')+WF7(B2F==1,GetObjectName('Y1ON'),GetObjectName('YOOF'))
elseif(VH=="ui")then
call ExecuteFunc("PKG")
elseif(SubString(VH,0,2)=="sv")then
set VH=SubString(VH,2,StringLength(VH))
loop
call TriggerSleepAction(.0)
set kg=kh(VH)
if(kg>=0)then
set pl=Z07(SubString(VH,0,kg))
set VH=SubString(VH,kg+1,StringLength(VH))
else
set pl=Z07(SubString(VH,0,StringLength(VH)))
endif
if((pl!=null)and(KR8(pl)))then
call P7G(pl,GetTriggerPlayer())
endif
exitwhen kg<0
endloop
elseif(SubString(VH,0,1)=="b")then
set F57=CreateForce()
call ForceAddPlayer(F57,GetTriggerPlayer())
if VH=="b" then
set VH=WF7(IsPlayerAlly(GetTriggerPlayer(),G8[0]),"1,2,3,4,5","6,7,8,9,0")
else
set VH=SubString(VH,1,StringLength(VH))
endif
loop
set kg=kh(VH)
if(kg>=0)then
set pl=Z07(SubString(VH,0,kg))
set VH=SubString(VH,kg+1,StringLength(VH))
else
set pl=Z07(SubString(VH,0,StringLength(VH)))
endif
set L1F=false
if((pl!=null)and(KS8(pl))and(GetPlayerController(pl)==MAP_CONTROL_COMPUTER)and(IsPlayerAlly(pl,GetTriggerPlayer())))then
set L1F=true
set UP=GetPlayerId(pl)
if(Y7[UP]==null)then
set L1F=false
elseif not Z_7(Y7[UP])then
set PIG=GetObjectName('Y028')
else
call SUnit(S44,"OB|U",Y7[UP])
call ExecuteFunc("CXF")
if(eY[UP]>=9)then
set eY[UP]=1
endif
set PIG=GetObjectName('Y003')
endif
endif
if L1F then
call FV8(Y7[UP],F57)
call FQ8(Y7[UP],F57,PIG)
endif
exitwhen kg<0
endloop
set L1F=false
call DestroyForce(F57)
elseif(SubString(VH,0,1)=="f")then
set F57=CreateForce()
call ForceAddPlayer(F57,GetTriggerPlayer())
if VH=="f" then
set VH=WF7(IsPlayerAlly(GetTriggerPlayer(),G8[0]),"1,2,3,4,5","6,7,8,9,0")
else
set VH=SubString(VH,1,StringLength(VH))
endif
loop
set kg=kh(VH)
if(kg>=0)then
set pl=Z07(SubString(VH,0,kg))
set VH=SubString(VH,kg+1,StringLength(VH))
else
set pl=Z07(SubString(VH,0,StringLength(VH)))
endif
set L1F=false
if((pl!=null)and(KS8(pl))and(GetPlayerController(pl)==MAP_CONTROL_COMPUTER)and(IsPlayerAlly(pl,GetTriggerPlayer())))then
set L1F=true
set UP=GetPlayerId(pl)
if(Y7[UP]==null)then
set L1F=false
elseif not Z_7(Y7[UP])then
set PIG=GetObjectName('Y028')
else
call F28(Y7[UP],true)
set hq[528+UP]=Bz+30.
call SUnit(S44,"OB|U",Y7[UP])
call ExecuteFunc("CXF")
if(eY[UP]>=9)then
set eY[UP]=1
endif
set PIG=GetObjectName('Y002')
endif
endif
if L1F then
call FV8(Y7[UP],F57)
call FQ8(Y7[UP],F57,PIG)
endif
exitwhen kg<0
endloop
set L1F=false
call DestroyForce(F57)
elseif((SubString(VH,0,1)=="a")and(VH!="auto"))then
set F57=CreateForce()
call ForceAddPlayer(F57,GetTriggerPlayer())
if VH=="a" then
set VH=WF7(IsPlayerAlly(GetTriggerPlayer(),G8[0]),"1,2,3,4,5","6,7,8,9,0")
else
set VH=SubString(VH,1,StringLength(VH))
endif
loop
set kg=kh(VH)
if(kg>=0)then
set pl=Z07(SubString(VH,0,kg))
set VH=SubString(VH,kg+1,StringLength(VH))
else
set pl=Z07(SubString(VH,0,StringLength(VH)))
endif
set L1F=false
if((pl!=null)and(KS8(pl))and(GetPlayerController(pl)==MAP_CONTROL_COMPUTER)and(IsPlayerAlly(pl,GetTriggerPlayer())))then
set L1F=true
set UP=GetPlayerId(pl)
if(Y7[UP]==null)then
set L1F=false
elseif not Z_7(Y7[UP])then
set PIG=GetObjectName('Y028')
elseif A87(Y7[UP])then
set PIG=GetObjectName('Y029')
else
call F1G(Y7[UP])
set PIG=GetObjectName('Y001')
endif
endif
if L1F then
call FV8(Y7[UP],F57)
call FQ8(Y7[UP],F57,PIG)
endif
exitwhen kg<0
endloop
set L1F=false
call DestroyForce(F57)
elseif(SubString(VH,0,1)=="d")then
set F57=CreateForce()
call ForceAddPlayer(F57,GetTriggerPlayer())
if VH=="d" then
set VH=WF7(IsPlayerAlly(GetTriggerPlayer(),G8[0]),"1,2,3,4,5","6,7,8,9,0")
else
set VH=SubString(VH,1,StringLength(VH))
endif
loop
set kg=kh(VH)
if(kg>=0)then
set pl=Z07(SubString(VH,0,kg))
set VH=SubString(VH,kg+1,StringLength(VH))
else
set pl=Z07(SubString(VH,0,StringLength(VH)))
endif
set L1F=false
if((pl!=null)and(KS8(pl))and(GetPlayerController(pl)==MAP_CONTROL_COMPUTER)and(IsPlayerAlly(pl,GetTriggerPlayer())))then
set UP=GetPlayerId(pl)
set L1F=true
if(Y7[UP]==null)then
set L1F=false
elseif not Z_7(Y7[UP])then
set PIG=GetObjectName('Y028')
elseif A87(Y7[UP])then
set PIG=GetObjectName('Y029')
else
call OXG(Y7[UP])
set PIG=GetObjectName('Y024')
endif
endif
if L1F then
call FV8(Y7[UP],F57)
call FQ8(Y7[UP],F57,PIG)
endif
exitwhen kg<0
endloop
set L1F=false
call DestroyForce(F57)
elseif(SubString(VH,0,2)=="sd")then
set F57=CreateForce()
call ForceAddPlayer(F57,GetTriggerPlayer())
if VH=="sd" then
set VH=WF7(IsPlayerAlly(GetTriggerPlayer(),G8[0]),"1,2,3,4,5","6,7,8,9,0")
else
set VH=SubString(VH,2,StringLength(VH))
endif
loop
set kg=kh(VH)
if(kg>=0)then
set pl=Z07(SubString(VH,0,kg))
set VH=SubString(VH,kg+1,StringLength(VH))
else
set pl=Z07(SubString(VH,0,StringLength(VH)))
endif
set L1F=false
if((pl!=null)and(KS8(pl))and(GetPlayerController(pl)==MAP_CONTROL_COMPUTER)and(IsPlayerAlly(pl,GetTriggerPlayer())))then
set UP=GetPlayerId(pl)
set L1F=true
if(Y7[UP]==null)then
set L1F=false
elseif not Z_7(Y7[UP])then
set PIG=GetObjectName('Y028')
elseif A87(Y7[UP])then
set PIG=GetObjectName('Y029')
else
call OYG(Y7[UP])
set PIG=GetObjectName('Y025')
endif
endif
if L1F then
call FV8(Y7[UP],F57)
call FQ8(Y7[UP],F57,PIG)
endif
exitwhen kg<0
endloop
set L1F=false
call DestroyForce(F57)
elseif(SubString(VH,0,6)=="roshan")then
if GetWidgetLife(C4)<.405 then
if(GetTriggerPlayer()==RT4)then
set bj_lastLoadedUnit=JS4
elseif(GetTriggerPlayer()==RU4)then
set bj_lastLoadedUnit=IN4
endif
set L1F=true
set PIG=GetObjectName('Y027')
else
set F57=CreateForce()
call ForceAddPlayer(F57,GetTriggerPlayer())
if VH=="roshan" then
set VH=WF7(IsPlayerAlly(GetTriggerPlayer(),G8[0]),"1,2,3,4,5","6,7,8,9,0")
else
set VH=SubString(VH,6,StringLength(VH))
endif
loop
set kg=kh(VH)
if(kg>=0)then
set pl=Z07(SubString(VH,0,kg))
set VH=SubString(VH,kg+1,StringLength(VH))
else
set pl=Z07(SubString(VH,0,StringLength(VH)))
endif
set L1F=false
if((pl!=null)and(KS8(pl))and(GetPlayerController(pl)==MAP_CONTROL_COMPUTER)and(IsPlayerAlly(pl,GetTriggerPlayer())))then
set UP=GetPlayerId(pl)
set L1F=true
if(Y7[UP]==null)then
set L1F=false
elseif not Z_7(Y7[UP])then
set PIG=GetObjectName('Y028')
elseif A87(Y7[UP])then
set PIG=GetObjectName('Y029')
else
set eY[UP]=11
set h8[48+UP]=h7[250]
set PIG=GetObjectName('Y012')
endif
if L1F then
call FV8(Y7[UP],F57)
call FQ8(Y7[UP],F57,PIG)
endif
endif
exitwhen kg<0
endloop
set L1F=false
call DestroyForce(F57)
endif
elseif(P94)then
elseif(VH=="auto")then
if(GetTriggerPlayer()==RT4)then
set PY4=(not PY4)
set bj_lastLoadedUnit=IN4
set PIG=GetObjectName('Y067')+WF7(PY4,GetObjectName('Y1ON'),GetObjectName('YOOF'))
else
set PZ4=(not PZ4)
set bj_lastLoadedUnit=JS4
set PIG=GetObjectName('Y067')+WF7(PZ4,GetObjectName('Y1ON'),GetObjectName('YOOF'))
endif
set L1F=true
elseif(VH=="p")then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,GetObjectName('Y072')+"
		"+GetObjectName('YA72')+"
		"+GetObjectName('YBLA')+"
		"+HS7+GetObjectName('Y073')+"
		"+HS7+GetObjectName('Y074')+"
		"+HS7+GetObjectName('Y075')+"
		"+HS7+GetObjectName('Y076'))
elseif(VH=="pn")then
if(GetTriggerPlayer()==RT4)then
set G4=-1
set bj_lastLoadedUnit=IN4
else
set G3=-1
set bj_lastLoadedUnit=JS4
endif
set L1F=true
set PIG=GetObjectName('Y071')
elseif((VH=="pl")or(VH=="pr")or(VH=="pm"))then
if(VH=="pl")then
set B2F=1
elseif(VH=="pr")then
set B2F=2
else
set B2F=0
endif
if(GetTriggerPlayer()==RT4)then
set G4=B2F
call ju(WO7(bj_mapInitialPlayableArea,Condition(function JK8)),function OBG)
set bj_lastLoadedUnit=IN4
else
set G3=B2F
call ju(WO7(bj_mapInitialPlayableArea,Condition(function JM8)),function OBG)
set bj_lastLoadedUnit=JS4
endif
set L1F=true
if(B2F==1)then
set PIG=GetObjectName('Y077')
elseif(B2F==2)then
set PIG=GetObjectName('Y078')
else
set PIG=GetObjectName('Y079')
endif
elseif(SubString(VH,0,1)=="t")then
if VH!="t" then
set VH=SubString(VH,1,StringLength(VH))
set kg=kE(VH," ")
if kg==0 then
set VH=SubString(VH,1,StringLength(VH))
set kg=kE(VH," ")
endif
set bj_lastLoadedUnit=V_7(IsPlayerAlly(GetTriggerPlayer(),G8[0]),IN4,JS4)
if(kg>=0)then
set FC7=SubString(VH,kg+1,StringLength(VH))
if FC7=="0" then
set B2F=10
else
set B2F=S2I(FC7)
endif
set pl=Z17(B2F)
set bj_forLoopAIndex=GetPlayerId(pl)
if(Y7[bj_forLoopAIndex]==null)then
set PIG=GetObjectName('Y080')
set B2F=0
elseif(not Z_7(Y7[bj_forLoopAIndex]))then
set PIG=GetObjectName('Y081')
set B2F=0
set kg=0
elseif(not IsUnitVisibleEx(Y7[bj_forLoopAIndex],GetTriggerPlayer()))and(eY[32+bj_forLoopAIndex]<=2)then
set PIG=GetObjectName('Y082')
set B2F=0
set kg=0
elseif(not IsPlayerEnemy(GetTriggerPlayer(),pl))then
set PIG=GetObjectName('Y083')
set B2F=0
set kg=0
else
set VH=SubString(VH,0,kg+1)
set m5=Y7[bj_forLoopAIndex]
endif
set L1F=(B2F==0)
else
set B2F=0
set VH="t"
endif
if(B2F>0)then
set B2F=ZD7(m5)
set F57=CreateForce()
call ForceAddPlayer(F57,GetTriggerPlayer())
if SubString(VH,0,1)==" " then
set VH=SubString(VH,1,StringLength(VH))
endif
set kg=kh(VH)
if(kg==-1)then
set VH=SubString(VH,0,1)
if VH=="a" or VH=="x" then
set VH=WF7(IsPlayerAlly(GetTriggerPlayer(),G8[0]),"1,2,3,4,5","6,7,8,9,0")
endif
endif
loop
set kg=kh(VH)
if(kg>=0)then
set pl=Z07(SubString(VH,0,kg))
set VH=SubString(VH,kg+1,StringLength(VH))
else
set pl=Z07(SubString(VH,0,StringLength(VH)))
endif
set L1F=false
if((pl!=null)and(KS8(pl))and(GetPlayerController(pl)==MAP_CONTROL_COMPUTER)and(IsPlayerAlly(pl,GetTriggerPlayer())))then
set UP=GetPlayerId(pl)
set L1F=true
if(Y7[UP]==null)then
set L1F=false
elseif not Z_7(Y7[UP])then
set PIG=GetObjectName('Y028')
elseif A87(Y7[UP])then
set PIG=GetObjectName('Y029')
elseif h4[UP]!=null and A87(h4[UP])then
set PIG=GetObjectName('Y030')
elseif((((B2F==1)and(ZD7(Y7[UP])==2))or((B2F==2)and(ZD7(Y7[UP])==1)))and Z47(Y7[UP],DH8(Y7[UP]))>10000.)then
set PIG=GetObjectName('Y031')
else
call VQF(Y7[UP],false)
call LXF(Y7[UP],m5)
set G0[160+UP]=true
set h4[144+UP]=m5
set PIG=GetObjectName('Y007')+W[GetPlayerId(GetOwningPlayer(m5))]+GetPlayerName(GetOwningPlayer(m5))+"|r"
endif
endif
if L1F then
call FV8(Y7[UP],F57)
call FQ8(Y7[UP],F57,PIG)
endif
exitwhen kg<0
endloop
call DestroyForce(F57)
set L1F=false
endif
endif
if VH=="t" then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,GetObjectName('Y085')+"
			"+GetObjectName('YA85')+"
			"+GetObjectName('YB85')+"
			"+"
			"+HS7+GetObjectName('Y086')+"
			"+HS7+GetObjectName('Y087')+"
			")
endif
elseif(VH=="g")then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,GetObjectName('Y088')+"
		"+GetObjectName('YA88')+"
		"+GetObjectName('YB88')+"
		"+"
		"+HS7+GetObjectName('Y089')+"
		"+HS7+GetObjectName('Y090')+"
		"+HS7+GetObjectName('Y091')+"
		")
elseif((SubString(VH,0,2)=="gl")or(SubString(VH,0,2)=="gr")or(SubString(VH,0,2)=="gm"))then
set F57=CreateForce()
call ForceAddPlayer(F57,GetTriggerPlayer())
if(SubString(VH,0,2)=="gl")then
set B2F=1
elseif(SubString(VH,0,2)=="gr")then
set B2F=2
else
set B2F=0
endif
set VH=SubString(VH,2,StringLength(VH))
set PJG=CreateGroup()
set i=1
loop
exitwhen i>5
if IsPlayerAlly(GetTriggerPlayer(),G8[0])then
set pl=G8[i]
else
set pl=N8[i]
endif
set UP=GetPlayerId(pl)
if(KR8(pl)and Y7[UP]!=null and Z_7(Y7[UP])and A87(Y7[UP])==false and ZD7(Y7[UP])==0)then
call GroupAddUnit(PJG,Y7[UP])
endif
set i=i+1
endloop
loop
set kg=kh(VH)
if(kg>=0)then
set pl=Z07(SubString(VH,0,kg))
set VH=SubString(VH,kg+1,StringLength(VH))
else
set pl=Z07(SubString(VH,0,StringLength(VH)))
endif
set L1F=false
if((pl!=null)and(KR8(pl))and(IsPlayerAlly(pl,GetTriggerPlayer())))then
set UP=GetPlayerId(pl)
set L1F=true
if Y7[UP]==null then
set L1F=false
elseif not Z_7(Y7[UP])then
set PIG=GetObjectName('Y028')
elseif A87(Y7[UP])then
set PIG=GetObjectName('Y029')
elseif h4[UP]!=null and A87(h4[UP])then
set PIG=GetObjectName('Y030')
else
set G0[64+UP]=true
set h4[UP]=null
call VQF(Y7[UP],false)
if(B2F==ZD7(Y7[UP]))then
set B2F=-1
elseif((((B2F==1)and(ZD7(Y7[UP])==2))or((B2F==2)and(ZD7(Y7[UP])==1)))and Z47(Y7[UP],DH8(Y7[UP]))>10000.)then
if(eY[224+UP]<R2I(Bz))then
if(B2F==1)then
set eY[208+UP]=W97(GetTriggerPlayer()==RT4,29+P24,139-P24)
elseif(B2F==2)then
set eY[208+UP]=W97(GetTriggerPlayer()==RT4,49+P_4,159-P_4)
endif
else
set B2F=10+B2F
call LWF(Y7[UP],V_7(GetTriggerPlayer()==RT4,h7[9+P54],h7['u'-P54]))
endif
elseif(B2F==1)then
call LWF(Y7[UP],V_7(GetTriggerPlayer()==RT4,h7[29+P24],h7[139-P24]))
elseif(B2F==2)then
call LWF(Y7[UP],V_7(GetTriggerPlayer()==RT4,h7[49+P_4],h7[159-P_4]))
else
call LWF(Y7[UP],V_7(GetTriggerPlayer()==RT4,h7[9+P54],h7['u'-P54]))
endif
set G0[160+UP]=true
set hq[320+UP]=Bz+45.
if(B2F==1)then
set PIG=GetObjectName('Y034')
elseif(B2F==2)then
set PIG=GetObjectName('Y035')
elseif(B2F==11)then
set PIG=GetObjectName('Y036')
elseif(B2F==12)then
set PIG=GetObjectName('Y037')
elseif(B2F==-1)then
set PIG=GetObjectName('Y033')
else
set PIG=GetObjectName('Y032')
endif
endif
endif
if L1F then
call FV8(Y7[UP],F57)
call FQ8(Y7[UP],F57,PIG)
endif
if(B2F>10)then
set B2F=B2F-10
set bj_lastLoadedUnit=FirstOfGroup(PJG)
if bj_lastLoadedUnit!=null then
call GroupRemoveUnit(PJG,bj_lastLoadedUnit)
set UP=GetPlayerId(GetOwningPlayer(bj_lastLoadedUnit))
if(B2F==1)then
call LWF(Y7[UP],V_7(GetTriggerPlayer()==RT4,h7[29+P24],h7[139-P24]))
call FV8(Y7[UP],F57)
call FQ8(Y7[UP],F57,GetObjectName('Y018'))
elseif(B2F==2)then
call LWF(Y7[UP],V_7(GetTriggerPlayer()==RT4,h7[49+P_4],h7[159-P_4]))
call FV8(Y7[UP],F57)
call FQ8(Y7[UP],F57,GetObjectName('Y017'))
endif
endif
endif
exitwhen kg<0
endloop
call DestroyForce(F57)
call DestroyGroup(PJG)
set L1F=false
endif
if L1F and PIG!="" then
call F48(bj_lastLoadedUnit,PIG,GetTriggerPlayer())
endif
call DestroyForce(F57)
set pl=null
set m5=null
set F57=null
set PJG=null
endfunction
function PMG takes nothing returns nothing
if(GetEventPlayerChatString()==" ")then
call PHG("-oui")
else
call PHG(GetEventPlayerChatString())
endif
endfunction
function PNG takes unit Y47 returns integer
local integer i1=GetUnitTypeId(Y47)
if i1=='H00K' then
return 0
endif
if(i1=='HC49' or i1=='HC92' or(i1=='N01O' or i1=='N013' or i1=='N014' or i1=='N015')or i1=='Nbbc' or i1=='Huth' or i1=='Ogrh' or i1=='E005' or((i1=='N016')or(i1=='N017')or(i1=='N02B'))or i1=='Nbrn' or((i1=='Eevi')or(i1=='Eevm')or(i1=='E02V')or(i1=='E02W')or(i1=='E02U'))or i1=='U006' or i1=='Ewar' or i1=='E004' or i1=='EC45' or i1=='EC77' or i1=='Nfir' or i1=='Hvsh' or i1=='E01B' or i1=='H00I' or i1=='H071')then
return 0+GetHeroLevel(Y47)/ 5
endif
if(i1=='Hvwd' or i1=='O00P' or i1=='H001' or i1=='HC49' or i1=='HC92' or i1=='N01O' or i1=='Nbbc' or i1=='Huth' or i1=='Ogrh' or i1=='E005' or i1=='Usyl' or i1=='H008' or i1=='Naka' or i1=='Hlgr' or i1=='Edem' or i1=='Nbrn' or i1=='H00D' or i1=='N01V' or i1=='H00Q' or i1=='E01Y' or i1=='H00T' or i1=='H06S' or((i1=='Eevi')or(i1=='Eevm')or(i1=='E02V')or(i1=='E02W')or(i1=='E02U'))or i1=='EC57' or i1=='UC11' or i1=='U00A' or i1=='U008' or i1=='U006' or((i1=='H00V')or(i1=='H08D')or(i1=='H08C')or(i1=='H084')or(i1=='H08B'))or i1=='Udre' or i1=='UC42' or i1=='U000' or i1=='UC91' or i1=='EC45' or i1=='EC77' or i1=='E002' or i1=='U00C' or i1=='O00J' or i1=='Ubal' or i1=='Nfir' or i1=='U00K' or i1=='Hvsh' or i1=='E01B' or i1=='H00I' or i1=='H071' or i1=='E02I' or i1=='E02N' or i1=='N0M0' or i1=='E02K')then
return 3
endif
if(i1=='H001' or i1=='Hamg' or(i1=='Ucrl'or i1=='U01X')or i1=='H008' or i1=='Npbm' or i1=='H000' or i1=='Hlgr' or i1=='N01I' or i1=='H06S' or i1=='UC11' or i1=='U00A' or i1=='U008' or i1=='NC00' or i1=='U00C' or i1=='Ofar' or i1=='U00F' or i1=='Opgh' or i1=='Udea' or i1=='H00R' or i1=='O015' or i1=='O01F' or i1=='E02F' or i1=='E032')then
return 2
endif
if(i1=='Emoo' or i1=='Otch' or i1=='N01A' or i1=='Uktl' or((i1=='Hblm')or(i1=='H06X')or(i1=='H06Y')or(i1=='H06W'))or i1=='Hmkg' or i1=='Emns' or i1=='Ucrl' or i1=='H00A' or i1=='Orkn' or i1=='Harf' or i1=='E00P' or i1=='N00B' or i1=='N0EG' or i1=='UC18' or i1=='UC60' or i1=='UC01' or i1=='H00H' or i1=='Oshd' or i1=='U00E' or i1=='E01A' or i1=='U00P' or i1=='E01C' or i1=='N01W' or i1=='N00R' or i1=='H00N' or i1=='H00U' or i1=='N0HP' or i1=='O016' or i1=='E02J' or i1=='E02H' or i1=='H0DO')then
return 3
endif
if(i1=='Hmbr' or i1=='Emoo' or i1=='Hjai' or i1=='H004' or i1=='Hmkg' or i1=='Ntin' or i1=='E00P' or i1=='H00S' or i1=='Ekee' or i1=='Ulic' or i1=='UC76' or i1=='UC18' or i1=='H00H' or i1=='Oshd' or i1=='E01A' or i1=='U00P' or i1=='H00U' or i1=='E02X')then
return 3
endif
return 0
endfunction
function POG takes unit Y47 returns integer
local integer i1=GetUnitTypeId(Y47)
if(i1=='HC49' or i1=='HC92' or(i1=='N01O' or i1=='N013' or i1=='N014' or i1=='N015')or i1=='Nbbc' or i1=='Huth' or i1=='Ogrh' or i1=='E005' or((i1=='N016')or(i1=='N017')or(i1=='N02B'))or i1=='Nbrn' or((i1=='Eevi')or(i1=='Eevm')or(i1=='E02V')or(i1=='E02W')or(i1=='E02U'))or i1=='U006' or i1=='Ewar' or i1=='E004' or i1=='EC45' or i1=='EC77' or i1=='Nfir' or i1=='Hvsh' or i1=='E01B' or i1=='H00I' or i1=='H071')then
return 3
endif
if(i1=='Hvwd' or i1=='O00P' or i1=='H001' or i1=='HC49' or i1=='HC92' or i1=='N01O' or i1=='Nbbc' or i1=='Huth' or i1=='Ogrh' or i1=='E005' or i1=='Usyl' or i1=='H008' or i1=='Naka' or i1=='Hlgr' or i1=='Edem' or i1=='Nbrn' or i1=='H00D' or i1=='N01V' or i1=='H00Q' or i1=='E01Y' or i1=='H00T' or i1=='H06S' or((i1=='Eevi')or(i1=='Eevm')or(i1=='E02V')or(i1=='E02W')or(i1=='E02U'))or i1=='EC57' or i1=='UC11' or i1=='U00A' or i1=='U008' or i1=='U006' or((i1=='H00V')or(i1=='H08D')or(i1=='H08C')or(i1=='H084')or(i1=='H08B'))or i1=='Udre' or i1=='UC42' or i1=='U000' or i1=='UC91' or i1=='EC45' or i1=='EC77' or i1=='E002' or i1=='U00C' or i1=='O00J' or i1=='Ubal' or i1=='Nfir' or i1=='U00K' or i1=='Hvsh' or i1=='E01B' or i1=='H00I' or i1=='H071' or i1=='E02I' or i1=='E02N' or i1=='N0M0')then
return 2
endif
if(i1=='H001' or i1=='Hamg' or(i1=='Ucrl'or i1=='U01X')or i1=='H008' or i1=='Npbm' or i1=='H000' or i1=='Hlgr' or i1=='N01I' or i1=='H06S' or i1=='UC11' or i1=='U00A' or i1=='U008' or i1=='NC00' or i1=='U00C' or i1=='Ofar' or i1=='U00F' or i1=='Opgh' or i1=='Udea' or i1=='H00R' or i1=='O015' or i1=='O01F' or i1=='E02F' or i1=='E02K' or i1=='E032')then
return 1
endif
if(i1=='Emoo' or i1=='Otch' or i1=='N01A' or i1=='Uktl' or((i1=='Hblm')or(i1=='H06X')or(i1=='H06Y')or(i1=='H06W'))or i1=='Hmkg' or i1=='Emns' or(i1=='Ucrl'or i1=='U01X')or i1=='H00A' or i1=='Orkn' or i1=='Harf' or i1=='E00P' or i1=='N00B' or i1=='N0EG' or i1=='UC18' or i1=='UC60' or i1=='UC01' or i1=='H00H' or i1=='Oshd' or i1=='U00E' or i1=='E01A' or i1=='U00P' or i1=='E01C' or i1=='N01W' or i1=='N00R' or i1=='H00N' or i1=='H00U' or i1=='N0HP' or i1=='O016' or i1=='E02J' or i1=='E02H' or i1=='H0DO')then
return 1
endif
if(i1=='Hmbr' or i1=='Emoo' or i1=='Hjai' or i1=='H004' or i1=='Hmkg' or i1=='Ntin' or i1=='H00K' or i1=='E00P' or i1=='H00S' or i1=='Ekee' or i1=='Ulic' or i1=='UC76' or i1=='UC18' or i1=='H00H' or i1=='Oshd' or i1=='E01A' or i1=='U00P' or i1=='H00U' or i1=='E02X')then
return 2
endif
return 1
endfunction
function PPG takes boolean YV7 returns nothing
local integer O5=0
local integer i=1
if YV7 then
set F57=E8
else
set F57=F8
endif
set i=1
loop
exitwhen i>5
if YV7 then
set O5=GetPlayerId(G8[i])
else
set O5=GetPlayerId(N8[i])
endif
if Y7[O5]!=null and GetUnitLifePercent(Y7[O5])>50 and KR8(Player(O5))and eY[O5]!=11 then
call XK7("Roshan "+I2S(O5))
call FV8(Y7[O5],F57)
call FQ8(Y7[O5],F57,GetObjectName('Y012'))
set eY[O5]=11
set h8[48+O5]=h7[250]
endif
set i=i+1
endloop
set F57=null
endfunction
function PQG takes nothing returns nothing
call ZT7(GetEnumItem())
endfunction
function PRG takes nothing returns boolean
return GetWidgetLife(GetFilterItem())<=.401
endfunction
function PSG takes nothing returns nothing
call EnumItemsInRect(GetWorldBounds(),Condition(function PRG),function PQG)
endfunction
function PTG takes nothing returns nothing
local integer O5=0
local integer G88=0
local integer i
local integer YVF=-1
local integer j
local integer k
local integer PUG
local integer PVG
local boolean PWG=false
local boolean PXG=false
local boolean YV7
local real PYG=0
local real PZG=0
set k=0
set i=1
loop
exitwhen i>5
set O5=GetPlayerId(G8[i])
if(Y7[O5]!=null)then
if GetHeroLevel(Y7[O5])>=6 then
set PWG=true
endif
if(GetHeroLevel(Y7[O5])>11 and GetUnitLifePercent(Y7[O5])>50)then
set PYG=PYG+FA7
endif
endif
set O5=GetPlayerId(N8[i])
if(Y7[O5]!=null)then
if GetHeroLevel(Y7[O5])>=6 then
set PXG=true
endif
if(GetHeroLevel(Y7[O5])>11 and GetUnitLifePercent(Y7[O5])>50)then
set PZG=PZG+FB7
endif
endif
set i=i+1
endloop
set i=1
loop
exitwhen i>5
set O5=GetPlayerId(G8[i])
if(eY[O5]==9 and eY[272+O5]!=0)then
set PWG=false
endif
if(Y7[O5]!=null and(GetUnitLifePercent(Y7[O5])>10))then
set PZG=PZG-FA7
endif
set O5=GetPlayerId(N8[i])
if(eY[O5]==9 and eY[272+O5]!=0)then
set PXG=false
endif
if(Y7[O5]!=null and(GetUnitLifePercent(Y7[O5])>10))then
set PYG=PYG-FB7
endif
set i=i+1
endloop
if(not PWG)and(not PXG)then
return
endif
if GetWidgetLife(C4)>.405 then
if(PYG>=3 and(P54>4 and P24>5 and P_4>5))then
call PPG(true)
endif
if(PYG>=3 and(P54<4 and P24<5 and P_4<5))then
call PPG(false)
endif
endif
set i=0
set k=0
if PXG then
set i=i+HM4
set bj_forLoopAIndex=1
else
set bj_forLoopAIndex=6
endif
if PWG then
set i=i+HN4
set bj_forLoopAIndexEnd=10
else
set bj_forLoopAIndexEnd=5
endif
set G88=-1
loop
exitwhen((bj_forLoopAIndex>bj_forLoopAIndexEnd)or(G88!=-1))
set O5=GetPlayerId(Z17(bj_forLoopAIndex))
set YV7=(bj_forLoopAIndex<6)
if(Y7[O5]!=null)then
if((GetWidgetLife(Y7[O5])>.405)and(not A87(Y7[O5])))then
call GroupClear(H8)
set bj_lastLoadedUnit=Y7[O5]
set j=GetUnitUserData(h8[80+O5])
if((G88==-1)and(AO7(1200.,Y7[O5],Condition(function GA8))<=1)and(Z57(Y7[O5]))and((GetRandomInt(1,i)==1)and(GetRandomInt(1,10)<=7+POG(Y7[O5]))))then
if((j>11 and j<17)or(j==11 and YV7==false)or(j==17 and YV7)or(j>11 and j<17)or(j==11 and YV7==false)or(j==17 and YV7)or(j>31 and j<39)or(j==31 and YV7==false)or(j==39 and YV7)or(j>11 and j<17)or(j==11 and YV7==false)or(j==17 and YV7)or(j>51 and j<59)or(j==51 and YV7==false)or(j==59 and YV7))then
set G88=O5
endif
endif
endif
set i=i-1
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if G88!=-1 then
call XM7(0,"gank target "+GetUnitName(Y7[G88]))
set PVG=ZD7(Y7[G88])
if(PVG==0 and PE4)or(PVG==1 and PF4)or(PVG==2 and PD4)or(PVG!=0 and P94)then
return
endif
set bj_forLoopAIndex=1
set i=W97(YV7,HN4,HM4)
set j=0
set k=0
loop
exitwhen((bj_forLoopAIndex>10)or(eY[320+G88]+j+k>GS7 and k!=0))
if bj_forLoopAIndex==6 then
set i=W97(YV7,HN4,HM4)
endif
if bj_forLoopAIndex<=5 then
if YV7 then
set O5=GetPlayerId(N8[bj_forLoopAIndex])
else
set O5=GetPlayerId(G8[bj_forLoopAIndex])
endif
else
if YV7 then
set O5=GetPlayerId(N8[bj_forLoopAIndex-5])
else
set O5=GetPlayerId(G8[bj_forLoopAIndex-5])
endif
endif
if(Y7[O5]!=null)then
if(GetUnitLifePercent(Y7[O5])>70)and(GetUnitManaPercent(Y7[O5])>50. and GetUnitState(Y7[O5],UNIT_STATE_MANA)>200)then
set PUG=ZD7(Y7[O5])
call XM7(0," Gank recruit "+GetUnitName(Y7[O5])+" "+XP7(PUG)+XP7(PVG)+XP7(eY[272+O5])+XQ7(GetHeroLevel(Y7[O5])>=6)+"- "+XQ7(eY[O5]==1)+XQ7(h4[O5]==null)+XQ7(Bz>hq[320+O5])+XQ7(Bz>hq[480+O5])+XQ7(Bz>hq[528+O5])+XQ7(Bz>hq[576+O5])+XP7(eY[544+O5])+XQ7(Bz>hq[848+O5]))
if(PUG==PVG)and(bj_forLoopAIndex<=5)then
set j=j+1
if(KR8(Player(O5)))and((YVF==-1)or(GetRandomInt(1,3)<=PNG(Y7[O5])))then
set YVF=O5
endif
elseif((PUG!=PVG)and((PVG==0)or(PUG==0)))and(eY[272+O5]!=-1)then
if((KR8(Player(O5)))and(GetHeroLevel(Y7[O5])>=6)and(eY[O5]==1)and(h4[O5]==null)and(Bz>hq[320+O5])and(Bz>hq[480+O5])and(Bz>hq[528+O5])and(Bz>hq[576+O5])and(eY[544+O5]==0)and(Bz>hq[848+O5]))then
if(GetRandomInt(1,3)<=PNG(Y7[O5]))and((GetRandomInt(1,i)<=2)or(bj_forLoopAIndex>5))then
set k=k+1
call XM7(0," count "+GetUnitName(Y7[O5]))
set eY[272+O5]=-1
else
call XM7(0," gank (-) "+GetUnitName(Y7[O5]))
endif
endif
endif
endif
set i=i-1
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call XM7(0,"Gank Balance:"+I2S(eY[320+G88])+" inLane:"+I2S(j)+" Recruit:"+I2S(k))
if(h4[304+G88]!=null)then
set k=k-1
endif
if(j>2)then
set YVF=-1
endif
if(k>eY[320+G88]+GS7)then
if YV7 then
set F57=F8
else
set F57=E8
endif
set O5=1
if k==0 and YVF!=-1 then
set O5=YVF
endif
loop
if(eY[272+O5]==-1)or((O5==YVF)and(k==0))then
call FV8(Y7[O5],F57)
call FQ8(Y7[O5],F57,GetObjectName('Y007')+W[G88]+GetUnitName(Y7[G88])+"|r")
call LXF(Y7[O5],Y7[G88])
endif
set O5=O5+1
exitwhen(O5>11)or(k==0)
endloop
set GR7=GetRandomInt(0,2)
endif
set O5=1
loop
exitwhen O5>11
if eY[272+O5]==-1 then
set eY[272+O5]=0
endif
set O5=O5+1
endloop
endif
set F57=null
endfunction
function PAG takes nothing returns nothing
local button PBG=GetClickedButton()
local integer ki=GetHandleId(GetTriggeringTrigger())
local string VH=EQ8(ki,"PlHost")
local string kf=EQ8(ki,"Oid")
local integer UP=0
if(GetTriggerPlayer()!=RT4)then
set UP=5
endif
if(PBG==ER8(S44,VH+"|Btn11"))then
call PHG(kf+" "+I2S(1+UP))
elseif(PBG==ER8(S44,VH+"|Btn12"))then
call PHG(kf+" "+I2S(2+UP))
elseif(PBG==ER8(S44,VH+"|Btn13"))then
call PHG(kf+" "+I2S(3+UP))
elseif(PBG==ER8(S44,VH+"|Btn14"))then
call PHG(kf+" "+I2S(4+UP))
elseif(PBG==ER8(S44,VH+"|Btn15"))then
call PHG(kf+" "+I2S(5+UP))
elseif(PBG==ER8(S44,VH+"|Btn1A"))then
call PHG(kf)
endif
call LT7(ki)
call DestroyTrigger(GetTriggeringTrigger())
call DialogDestroy(GetClickedDialog())
set PBG=null
endfunction
function PCG takes string ki,boolean J4 returns nothing
local dialog P3G=DialogCreate()
local trigger t=CreateTrigger()
local string VH=""
local integer O5=1
if(GetTriggerPlayer()==RT4)then
set VH="Sent"
else
set VH="Scrg"
endif
call DialogSetMessage(P3G,GetObjectName('Y063'))
loop
if(IsPlayerInForce(DK8(O5,GetTriggerPlayer()==RT4),RX4))then
call D58(S44,VH+"|Btn1"+I2S(O5),DialogAddButton(P3G,GetPlayerName(DK8(O5,GetTriggerPlayer()==RT4)),0))
endif
set O5=O5+1
exitwhen O5>5
endloop
if(J4)then
call D58(S44,VH+"|Btn1A",DialogAddButton(P3G,GetObjectName('Y062'),0))
endif
call D58(S44,VH+"|Btn1X",DialogAddButton(P3G,GetObjectName('Y050'),0))
call DS8(GetHandleId(t),"PlHost",VH)
call DS8(GetHandleId(t),"Oid",ki)
call TriggerRegisterDialogEvent(t,P3G)
call TriggerAddAction(t,function PAG)
call DialogDisplay(GetTriggerPlayer(),P3G,true)
set t=null
endfunction
function P6G takes nothing returns nothing
local button PBG=GetClickedButton()
local integer ki=GetHandleId(GetTriggeringTrigger())
local string VH=EQ8(ki,"PlHost")
local string kf=EQ8(ki,"Oid")
if(PBG==ER8(S44,VH+"|Btn21"))then
call PCG(kf+"l",false)
elseif(PBG==ER8(S44,VH+"|Btn22"))then
call PCG(kf+"r",false)
elseif(PBG==ER8(S44,VH+"|Btn23"))then
call PCG(kf+"m",false)
elseif(PBG==ER8(S44,VH+"|Btn21X"))then
call PHG(kf+"l")
elseif(PBG==ER8(S44,VH+"|Btn22X"))then
call PHG(kf+"r")
elseif(PBG==ER8(S44,VH+"|Btn23X"))then
call PHG(kf+"m")
elseif(PBG==ER8(S44,VH+"|Btn24"))then
call PHG(kf+"n")
endif
call LT7(ki)
call DestroyTrigger(GetTriggeringTrigger())
call DialogDestroy(GetClickedDialog())
set PBG=null
endfunction
function PLG takes string ki,boolean J4 returns nothing
local dialog P3G=DialogCreate()
local trigger t=CreateTrigger()
local string VH=""
local string kf=""
local string P1G=""
if(J4)then
set P1G="X"
endif
if(GetTriggerPlayer()==RT4)then
set VH="Sent"
else
set VH="Scrg"
endif
call DialogSetMessage(P3G,GetObjectName('Y051'))
call D58(S44,VH+"|Btn21"+P1G,DialogAddButton(P3G,GetObjectName('Y053'),0))
call D58(S44,VH+"|Btn22"+P1G,DialogAddButton(P3G,GetObjectName('Y052'),0))
call D58(S44,VH+"|Btn23"+P1G,DialogAddButton(P3G,GetObjectName('Y054'),0))
if(J4)then
call D58(S44,VH+"|Btn24",DialogAddButton(P3G,GetObjectName('Y055'),0))
endif
call DialogAddButton(P3G,GetObjectName('Y050'),0)
call DS8(GetHandleId(t),"PlHost",VH)
call DS8(GetHandleId(t),"Oid",ki)
call TriggerRegisterDialogEvent(t,P3G)
call TriggerAddAction(t,function P6G)
call DialogDisplay(GetTriggerPlayer(),P3G,true)
set t=null
endfunction
function P0G takes nothing returns nothing
local button PBG=GetClickedButton()
local integer ki=GetHandleId(GetTriggeringTrigger())
local string VH=EQ8(ki,"PlHost")
if(PBG==ER8(S44,VH+"|Btn61"))then
call PCG("-osd",true)
elseif(PBG==ER8(S44,VH+"|Btn62"))then
call PCG("-oroshan",true)
elseif(PBG==ER8(S44,VH+"|Btn63"))then
call PHG("-oneut")
elseif(PBG==ER8(S44,VH+"|Btn64"))then
call PHG("-oauto")
endif
call LT7(ki)
call DestroyTrigger(GetTriggeringTrigger())
call DialogDestroy(GetClickedDialog())
set PBG=null
endfunction
function P5G takes nothing returns nothing
local dialog P3G=DialogCreate()
local trigger t=CreateTrigger()
local string VH=""
if(GetTriggerPlayer()==RT4)then
set VH="Sent"
else
set VH="Scrg"
endif
call DialogSetMessage(P3G,GetObjectName('Y043'))
call D58(S44,VH+"|Btn61",DialogAddButton(P3G,GetObjectName('Y056'),0))
call D58(S44,VH+"|Btn62",DialogAddButton(P3G,GetObjectName('Y057'),0))
if(((GetTriggerPlayer()==RT4)and(Gv))or((GetTriggerPlayer()==RU4)and(Gw)))then
call D58(S44,VH+"|Btn63",DialogAddButton(P3G,GetObjectName('Y058'),0))
else
call D58(S44,VH+"|Btn63",DialogAddButton(P3G,GetObjectName('Y059'),0))
endif
if(P94)then
elseif(((GetTriggerPlayer()==RT4)and(PY4))or((GetTriggerPlayer()==RU4)and(PZ4)))then
call D58(S44,VH+"|Btn64",DialogAddButton(P3G,GetObjectName('Y060'),0))
else
call D58(S44,VH+"|Btn64",DialogAddButton(P3G,GetObjectName('Y061'),0))
endif
call DialogAddButton(P3G,GetObjectName('Y050'),0)
call DS8(GetHandleId(t),"PlHost",VH)
call TriggerRegisterDialogEvent(t,P3G)
call TriggerAddAction(t,function P0G)
call DialogDisplay(GetTriggerPlayer(),P3G,true)
set t=null
endfunction
function P2G takes nothing returns nothing
local button PBG=GetClickedButton()
local integer ki=GetHandleId(GetTriggeringTrigger())
local string VH=EQ8(ki,"PlHost")
if(PBG==ER8(S44,VH+"|Btn01"))then
call PCG("-oa",true)
elseif(PBG==ER8(S44,VH+"|Btn02"))then
call PCG("-od",true)
elseif(PBG==ER8(S44,VH+"|Btn03"))then
call PCG("-ob",false)
elseif(PBG==ER8(S44,VH+"|Btn04"))then
call PCG("-of",false)
elseif(PBG==ER8(S44,VH+"|Btn05"))then
call PLG("-og",false)
elseif(PBG==ER8(S44,VH+"|Btn06"))then
call PLG("-op",true)
elseif(PBG==ER8(S44,VH+"|Btn07"))then
call P5G()
endif
call LT7(ki)
call DestroyTrigger(GetTriggeringTrigger())
call DialogDestroy(GetClickedDialog())
set PBG=null
endfunction
function PKG takes nothing returns nothing
local dialog P3G=DialogCreate()
local trigger t=CreateTrigger()
local string VH=""
if(GetTriggerPlayer()==RT4)then
set VH="Sent"
else
set VH="Scrg"
endif
call DialogSetMessage(P3G,GetObjectName('Y043'))
call D58(S44,VH+"|Btn01",DialogAddButton(P3G,GetObjectName('Y044'),0))
call D58(S44,VH+"|Btn02",DialogAddButton(P3G,GetObjectName('Y045'),0))
call D58(S44,VH+"|Btn03",DialogAddButton(P3G,GetObjectName('Y046'),0))
call D58(S44,VH+"|Btn04",DialogAddButton(P3G,GetObjectName('Y047'),0))
if(not P94)then
call D58(S44,VH+"|Btn05",DialogAddButton(P3G,GetObjectName('Y048'),0))
call D58(S44,VH+"|Btn06",DialogAddButton(P3G,GetObjectName('Y084'),0))
endif
call D58(S44,VH+"|Btn07",DialogAddButton(P3G,GetObjectName('Y049'),0))
call DialogAddButton(P3G,GetObjectName('Y050'),0)
call DS8(GetHandleId(t),"PlHost",VH)
call TriggerRegisterDialogEvent(t,P3G)
call TriggerAddAction(t,function P2G)
call DialogDisplay(GetTriggerPlayer(),P3G,true)
set t=null
endfunction
function P_G takes nothing returns nothing
local integer Q4G
local integer HMG
local integer CNF
local integer Q7G=1
local location Q8G=null
local location Q9G=null
local string QDG=""
local string QEG=""
if(Bz<150.)then
set Q4G=0
elseif(Bz<1200.)then
set Q4G=GetRandomInt(1,2)
else
set Q4G=GetRandomInt(1,3)
endif
if(Q4G==0)then
return
elseif(Q4G==1)then
set HMG='n003'
set QDG="Siege Golems"
elseif(Q4G==2)then
set HMG='n00E'
set QDG="Scary Fish"
else
set HMG='n00D'
set QDG="Ancient Hydras"
endif
if(Bz>2400.)then
set Q7G=Q7G+1
endif
if P94 then
set CNF=3
else
set CNF=GetRandomInt(2,4)
endif
if(CNF==2)then
set Q8G=U7
set Q9G=qv
set QEG="west"
elseif(CNF==3)then
set Q8G=Tv
set Q9G=mv
set QEG="middle"
elseif(CNF==4)then
set Q8G=Uv
set Q9G=pv
set QEG="east"
endif
call CreateNUnitsAtLoc(Q7G,HMG,G8[0],Q8G,bj_UNIT_FACING)
call XS9(bj_lastCreatedGroup,CNF)
call CreateNUnitsAtLoc(Q7G,HMG,N8[0],Q9G,bj_UNIT_FACING)
call XS9(bj_lastCreatedGroup,CNF)
call NN8(bj_FORCE_ALL_PLAYERS,10.,"|c000000ff"+QDG+"|r spawned in the "+QEG+" path!")
set Q8G=null
set Q9G=null
endfunction
function QFG takes boolean O6,string VH,integer QGG returns nothing
local integer QHG=0
local integer QIG=0
local integer QJG=0
local boolean QKG=false
local boolean QMG=false
local integer O5=1
local integer i1
local player pl
loop
set pl=DK8(O5,not O6)
if((KS8(pl))and(Y7[GetPlayerId(pl)]!=null))then
set i1=GetUnitTypeId(Y7[GetPlayerId(pl)])
if((i1=='H00K')or(i1=='HC92')or(i1=='H071'))then
set QMG=true
elseif((i1=='Naka')or(i1=='E004')or(i1=='U000')or(i1=='Ogrh')or(i1=='N01V')or(i1=='U006')or(i1=='Hamg'))then
set QKG=true
endif
if(IsUnitType(Y7[GetPlayerId(pl)],UNIT_TYPE_MELEE_ATTACKER))then
set QHG=QHG+1
endif
if(YO7(i1,GX7))then
set QIG=QIG+1
endif
if(YM7(i1)<=2)then
set QJG=QJG+1
endif
endif
set O5=O5+1
exitwhen O5>5
endloop
if(QMG)then
call SBool(S44,VH+"|G",true)
call SBool(S44,VH+"|W",true)
elseif(QKG)then
call SBool(S44,VH+"|W",true)
endif
if(QHG!=0)and((QHG==QGG)or((QGG>3)and(QHG>=3)))then
call SBool(S44,VH+"|M",true)
endif
if(QIG!=0)and((QIG==QGG)or((QGG>3)and(QIG>=3)))then
call SBool(S44,VH+"|X",true)
endif
if(QGG>3 and QIG<=2)or(QGG<=3 and QIG<QGG)then
call SBool(S44,VH+"|Xb",true)
endif
if(QJG!=0)and((QJG==QGG)or((QGG>3)and(QJG>=3)))then
call SBool(S44,VH+"|D",true)
endif
set pl=null
endfunction
function QNG takes nothing returns nothing
call DestroyTrigger(GetTriggeringTrigger())
call QFG(true,"Sent",HN4)
call QFG(false,"Scrg",HM4)
endfunction
function QOG takes player pl returns nothing
if((LT))then
elseif(AV4[GetPlayerId(pl)]==AX4)then
if(not BT)then
call SetPlayerHandicapXPBJ(pl,(GetPlayerHandicapXPBJ(pl)+20.))
else
call SetPlayerHandicapXPBJ(pl,(GetPlayerHandicapXPBJ(pl)+CG_Values[16]))
endif
elseif(AV4[GetPlayerId(pl)]==AY4)then
if(not BT)then
call SetPlayerHandicapXPBJ(pl,(GetPlayerHandicapXPBJ(pl)+45.))
else
call SetPlayerHandicapXPBJ(pl,(GetPlayerHandicapXPBJ(pl)+CG_Values[17]))
endif
else
if(not BT)then
call SetPlayerHandicapXPBJ(pl,(GetPlayerHandicapXPBJ(pl)+80.))
else
call SetPlayerHandicapXPBJ(pl,(GetPlayerHandicapXPBJ(pl)+CG_Values[18]))
endif
endif
set AV4[16+GetPlayerId(pl)]=R2I(GetPlayerHandicapXPBJ(pl))
endfunction
function QPG takes player pl,integer O5 returns nothing
local integer i=0
local integer E_8=GetPlayerId(pl)
set hG[48+E_8]=GetRandomInt(0,1)
if(T4 or SC4)then
set hG[48+E_8]=GetRandomInt(0,2)
endif
set hG[64+E_8]=GetRandomInt(0,2)
set hG[80+E_8]=GetRandomInt(0,2)
set OC4[E_8]=false
call ForceRemovePlayer(T9,pl)
if F7 then
set i=i+8
endif
if(CT)then
set i=i+R2I(CG_Values[15])
endif
if((WT)or(O5==0))then
elseif(AV4[E_8]==AX4)then
call SetPlayerStateBJ(pl,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(pl,PLAYER_STATE_RESOURCE_GOLD)+('d'/ O5)+(10*(O5-1)))
elseif(AV4[E_8]==AY4)then
call SetPlayerStateBJ(pl,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(pl,PLAYER_STATE_RESOURCE_GOLD)+(300/ O5)+(10*(O5-1)))
set i=i+4
else
call SetPlayerStateBJ(pl,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(pl,PLAYER_STATE_RESOURCE_GOLD)+(500/ O5)+(10*(O5-1)))
set i=i+8
endif
if(CT)then
call SetPlayerStateBJ(pl,PLAYER_STATE_RESOURCE_GOLD,R2I(GetPlayerState(pl,PLAYER_STATE_RESOURCE_GOLD)*CG_Values[14]))
endif
set AV4[32+E_8]=i
set AV4[48+E_8]=i
set AV4[64+E_8]=0
endfunction
function QQG takes trigger t,boolean O6,boolean QRG,boolean QSG returns nothing
if(DM8(O6)!=null)then
call TriggerRegisterPlayerChatEvent(t,DM8(O6),"-o",false)
call TriggerRegisterPlayerChatEvent(t,DM8(O6),"-c",false)
call TriggerRegisterPlayerChatEvent(t,DM8(O6)," c",false)
call TriggerRegisterPlayerChatEvent(t,DM8(O6)," ",true)
if(IsTriggerEnabled(RA4))then
call TriggerRegisterPlayerChatEvent(RA4,DM8(O6),"-pa",true)
call TriggerRegisterPlayerChatEvent(RA4,DM8(O6),"-px",true)
if((DM8(not O6)==null)and(QSG))then
if(QRG)then
call DisplayTimedTextToPlayer(DM8(O6),0,0,10.,GetObjectName('Y100')+HS7+"-pa|r/"+HS7+"-pe|r")
else
call DisplayTimedTextToPlayer(DM8(O6),0,0,10.,GetObjectName('Y101')+HS7+"-pe|r")
endif
call TriggerRegisterPlayerChatEvent(RA4,DM8(O6),"-pe",true)
elseif(QRG)then
call DisplayTimedTextToPlayer(DM8(O6),0,0,10.,GetObjectName('Y102')+HS7+"-pa|r")
endif
endif
endif
endfunction
function QTG takes nothing returns nothing
local integer i=0
loop
exitwhen i>15
if Y7[i]!=null and GetPlayerController(Player(i))==MAP_CONTROL_COMPUTER and IsUnitInRange(Y7[i],IN4,1000)==false and IsUnitInRange(Y7[i],JS4,1000)==false then
set OJ7[176+i]=0
endif
set i=i+1
endloop
endfunction
function QUG takes nothing returns nothing
local trigger t
set t=CreateTrigger()
call TriggerRegisterUnitInRange(t,JS4,700.,null)
call TriggerAddCondition(t,Condition(function JJ8))
call TriggerAddAction(t,function A_F)
set t=CreateTrigger()
call TriggerRegisterUnitInRange(t,IN4,700.,null)
call TriggerAddCondition(t,Condition(function JI8))
call TriggerAddAction(t,function A_F)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,10,true)
call TriggerAddAction(t,function QTG)
set t=null
endfunction
function QVG takes nothing returns nothing
local trigger t=null
local string VH=GetEventPlayerChatString()
local player pl=Z17(S2I(SubString(VH,8,StringLength(VH))))
if(pl!=null)and(pl!=GetTriggerPlayer())and KQ8(pl)then
if GetTriggerPlayer()==RT4 then
if IsPlayerAlly(GetLocalPlayer(),RT4)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10.,W[0]+"The Sentinel|r's AI Leadership has been granted to "+W[GetPlayerId(pl)]+GetPlayerName(pl)+"|r.")
endif
set RT4=pl
set t=GetTriggeringTrigger()
call DestroyTrigger(t)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,RT4,"-aigrant",false)
call TriggerAddAction(t,function QVG)
call DestroyTrigger(F87)
set F87=CreateTrigger()
call QQG(F87,true,false,false)
call TriggerAddAction(F87,function PMG)
else
if IsPlayerAlly(GetLocalPlayer(),RU4)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10.,W[6]+"The Scourge|r's AI Leadership has been granted to "+W[GetPlayerId(pl)]+GetPlayerName(pl)+"|r.")
endif
set RU4=pl
set t=GetTriggeringTrigger()
call DestroyTrigger(t)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,RU4,"-aigrant",false)
call TriggerAddAction(t,function QVG)
call DestroyTrigger(F97)
set F97=CreateTrigger()
call QQG(F97,false,false,false)
call TriggerAddAction(F97,function PMG)
endif
else
call ShowWarningToPlayer(GetTriggerPlayer(),"Invalid Leader Choice")
endif
endfunction
function QWG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=LUnit(EC8,"Source")
local integer QRD=LInt(EC8,"TargetIndex")
local unit m5=KH8(QRD)
local real P08=LReal(EC8,"Damage")
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED or GetUnitAbilityLevel(GetTriggerUnit(),'B031')==0 then
call DestroyEffect(LEff(EC8,"FX"))
call KG8(QRD)
call LT7(EC8)
call EA8(t)
set I67=true
call Dmg(p5,m5,NormalFire,P08)
set I67=false
if P08>0 then
call QM8("+"+I2S(R2I(P08)),1,m5,.023,255,0,0,216)
endif
elseif GetEventDamage()>1 then
call SReal(EC8,"Damage",(P08+GetEventDamage()*.3)*1.)
endif
set t=null
set p5=null
set m5=null
return false
endfunction
function QXG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
call LT7(EC8)
call EA8(t)
set t=CreateTrigger()
set EC8=GetHandleId(t)
call SUnit(EC8,"Source",p5)
call SInt(EC8,"TargetIndex",KJ8(m5))
call SEff(EC8,"FX",AddSpecialEffectTarget("Abilities\\Spells\\Other\\Silence\\SilenceTarget.mdl",m5,"overhead"))
call SReal(EC8,"Damage",(0)*1.)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,5,false)
call TriggerAddCondition(t,Condition(function QWG))
set t=null
return false
endfunction
function QYG takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function QXG))
call SUnit(EC8,"Target",GetSpellTargetUnit())
call SUnit(EC8,"Source",GetTriggerUnit())
set t=null
endfunction
function QZG takes nothing returns nothing
if GetSpellAbilityId()=='A0FD' and HasLinkin(GetSpellTargetUnit())==false then
call QYG()
endif
endfunction
function QAG takes nothing returns nothing
local unit u=GetTriggerUnit()
local item JB9
local integer i=0
local real x=GetUnitX(u)
local real y=GetUnitY(u)
local integer TK9
local item QBG
call DisableTrigger(GW4)
loop
exitwhen i>5
set JB9=UnitItemInSlot(u,i)
set TK9=ZU7(JB9)
if TK9==jianrenqiu then
set I44=GetItemPlayer(JB9)
call RemoveItem(JB9)
set QBG=CreateItem(AU[zhiliaozhihuan],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[xuwubaoshi],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
elseif TK9==shengdianzhihuan or TK9==shengdianzhihuan2 then
set I44=GetItemPlayer(JB9)
call RemoveItem(JB9)
set QBG=CreateItem(AU[shouhuzhihuan],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[yirenmianzhao],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
elseif TK9==xiwadeshouhu then
set I44=GetItemPlayer(JB9)
call RemoveItem(JB9)
set QBG=CreateItem(AU[suozijia],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[shenmifazhang],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[EH4],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
elseif TK9==xiwadshouhu2 then
set I44=GetItemPlayer(JB9)
call RemoveItem(JB9)
set QBG=CreateItem(AU[banjia],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[shenmifazhang],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[EH4],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
elseif TK9==leishenzhichui then
set I44=GetItemPlayer(JB9)
call RemoveItem(JB9)
set QBG=CreateItem(AU[zhenfenbaoshi],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[xuanwo],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[EM4],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
elseif TK9==mifaxie then
set I44=GetItemPlayer(JB9)
call RemoveItem(JB9)
set QBG=CreateItem(AU[suduzhixue],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[nengliangzhiqiu],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
elseif TK9==zhipeitoukui then
set I44=GetItemPlayer(JB9)
call RemoveItem(JB9)
set QBG=CreateItem(AU[tieyitoukui],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[siwangmianju],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
elseif TK9==zhipeitoukui2 then
set I44=GetItemPlayer(JB9)
call RemoveItem(JB9)
set QBG=CreateItem(AU[tieyitoukui],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[siwangmianju],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
elseif TK9==huanyingfu then
set I44=GetItemPlayer(JB9)
call RemoveItem(JB9)
set QBG=CreateItem(AU[yecha],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[jixianfaqiu],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[DC4],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
elseif TK9==xulingzhiren then
set I44=GetItemPlayer(JB9)
call RemoveItem(JB9)
set QBG=CreateItem(AU[yingjiaogong],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[youhunquanzhang],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
elseif false and TK9==jingmizhixie then
set I44=GetItemPlayer(JB9)
call RemoveItem(JB9)
set QBG=CreateItem(AU[suduzhixue],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[shouhuzhihuan],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[huifujiezhi],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
elseif TK9==sanyeduijian then
set I44=GetItemPlayer(JB9)
call RemoveItem(JB9)
set QBG=CreateItem(AU[sanhua],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[yecha],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
elseif TK9==tianyingzhijie or TK9==tianyingzhijie2 then
set I44=GetItemPlayer(JB9)
call RemoveItem(JB9)
set QBG=CreateItem(AU[youlingxidai],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[shengdianzhihuan],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
elseif TK9==shenyuanzhiren then
set I44=GetItemPlayer(JB9)
call RemoveItem(JB9)
set QBG=CreateItem(AU[shengzheyiwu],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
set QBG=CreateItem(AU[suiguchui],x,y)
call SetItemPlayer(QBG,I44,false)
call SetItemUserData(QBG,1)
endif
set i=i+1
endloop
call EnableTrigger(GW4)
set u=null
set JB9=null
set QBG=null
endfunction
function QCG takes nothing returns boolean
if GetSpellAbilityId()=='A0K5' or GetSpellAbilityId()=='A1RF' then
call QAG()
endif
return false
endfunction
function Q3G takes nothing returns nothing
local unit m5=GetEnumUnit()
local group PBD=pw
local unit p5=qw
if IsUnitInGroup(m5,PBD)==false then
call GroupAddUnit(PBD,m5)
call IssueTargetOrderById(Qw,852075,m5)
set I67=true
call Dmg(p5,m5,NormalFire,200)
set I67=false
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",m5,"origin"))
endif
set m5=null
set PBD=null
set p5=null
endfunction
function Q6G takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=LUnit(EC8,"Source")
local unit AC7=LUnit(EC8,"Caster")
local group PBD=LGroup(EC8,"AlreadyDamaged")
local real d
local real x
local real x0=GetUnitX(p5)
local real y
local real y0=GetUnitY(p5)
local group g=OG8()
local integer OUD=GetTriggerEvalCount(t)
local integer i
call SetUnitX(AC7,GetUnitX(p5))
call SetUnitY(AC7,GetUnitY(p5))
set pw=PBD
set qw=p5
set Qw=LUnit(EC8,"Nuker")
if GetTriggerEvalCount(t)>33 then
call KillUnit(AC7)
call OF8(PBD)
call LT7(EC8)
call EA8(t)
else
set d=OUD*22.53
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 H04=p5
call GroupEnumUnitsInRange(g,x,y,187.76,Condition(function U38))
call ForGroup(g,function Q3G)
set i=i+1
endloop
endif
call OF8(g)
set t=null
set AC7=null
set PBD=null
set p5=null
set g=null
return false
endfunction
function QLG takes nothing returns nothing
local unit N28=GetTriggerUnit()
local real x=GetUnitX(N28)
local real y=GetUnitY(N28)
local group PBD=OG8()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit AC7=CreateUnit(GetOwningPlayer(N28),'h091',x,y,0)
local unit Q1G=CreateUnit(GetOwningPlayer(N28),'e00E',GetUnitX(N28),GetUnitY(N28),0)
call UnitAddAbility(Q1G,'A0T0')
call SGroup(EC8,"AlreadyDamaged",PBD)
call SUnit(EC8,"Caster",AC7)
call SUnit(EC8,"Nuker",Q1G)
call SUnit(EC8,"Source",N28)
call TriggerRegisterTimerEvent(t,.06*300/ 350,true)
call TriggerAddCondition(t,Condition(function Q6G))
set t=null
set PBD=null
set AC7=null
set Q1G=null
set N28=null
endfunction
function Q0G takes nothing returns nothing
if GetSpellAbilityId()=='A0T9' then
call QLG()
endif
endfunction
function Q5G takes unit Z77,integer YLE returns nothing
local integer W57=GetHandleId(Z77)
call SaveInteger(R8,(W57),(750),(YLE))
endfunction
function Q2G takes nothing returns nothing
local integer i=0
local integer Q_G=0
local boolean R4G=false
if GetSpellAbilityId()=='A0JY' then
loop
exitwhen i>5
if ZX7(UnitItemInSlot(GetTriggerUnit(),i))==mobang or ZX7(UnitItemInSlot(GetTriggerUnit(),i))==mozhang then
set Q_G=GetItemCharges(UnitItemInSlot(GetTriggerUnit(),i))
if Q_G>0 then
call SetItemCharges(UnitItemInSlot(GetTriggerUnit(),i),0)
call Q5G(GetTriggerUnit(),0)
if R4G==false then
set R4G=true
call SetUnitState(GetTriggerUnit(),UNIT_STATE_MANA,GetUnitState(GetTriggerUnit(),UNIT_STATE_MANA)+15*Q_G)
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+15*Q_G)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIre\\AIreTarget.mdl",GetTriggerUnit(),"origin"))
endif
endif
return
endif
set i=i+1
endloop
endif
endfunction
function R7G takes integer id returns boolean
local integer i=1
loop
exitwhen i>MZ4
if id==MY4[i]then
return false
endif
set i=i+1
endloop
return true
endfunction
function R8G takes unit R9G,unit p5 returns nothing
if IsUnitVisibleEx(R9G,GetOwningPlayer(p5))==false and GetRandomInt(1,'d')<10 then
call PlaySoundOnUnitBJ(RI,'d',p5)
endif
endfunction
function RDG takes nothing returns nothing
local unit N28=GetEnumUnit()
local integer i=0
loop
exitwhen i>5
if IsUnitVisibleEx(GetTriggerUnit(),GetOwningPlayer(GetEnumUnit()))then
if ZX7(UnitItemInSlot(N28,i))==mobang or ZX7(UnitItemInSlot(N28,i))==mozhang then
if ZX7(UnitItemInSlot(N28,i))==mozhang then
if GetItemCharges(UnitItemInSlot(N28,i))==15 then
call R8G(GetTriggerUnit(),N28)
endif
call Q5G(N28,PC8(GetItemCharges(UnitItemInSlot(N28,i))+1,15))
call SetItemCharges(UnitItemInSlot(N28,i),PC8(GetItemCharges(UnitItemInSlot(N28,i))+1,15))
else
if GetItemCharges(UnitItemInSlot(N28,i))==10 then
call R8G(GetTriggerUnit(),N28)
endif
call Q5G(N28,PC8(GetItemCharges(UnitItemInSlot(N28,i))+1,10))
call SetItemCharges(UnitItemInSlot(N28,i),PC8(GetItemCharges(UnitItemInSlot(N28,i))+1,10))
endif
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl",N28,"chest"))
set i=5
endif
endif
set i=i+1
endloop
set N28=null
endfunction
function REG takes nothing returns nothing
local group g=OG8()
local unit p5=GetTriggerUnit()
local real x=GetUnitX(p5)
local real y=GetUnitY(p5)
call GroupEnumUnitsInRange(g,x,y,1225,Condition(function V98))
call ForGroup(g,function RDG)
call OF8(g)
set g=null
set p5=null
endfunction
function RFG takes nothing returns nothing
if R7G(GetSpellAbilityId())and MY8(GetSpellAbilityId())and GetUnitAbilityLevel(GetTriggerUnit(),'A04R')==0 and XL8(GetSpellAbilityId())==false then
call REG()
endif
endfunction
function RGG takes unit Z77,unit X77 returns nothing
local integer ML8=GetUnitAbilityLevel(Z77,'A0SS')
local real P08=(.05+.05*ML8)*GetUnitState(X77,UNIT_STATE_LIFE)
if GetUnitAbilityLevel(X77,'A04R')==0 and GetUnitAbilityLevel(Z77,'BNdo')==0 then
call Dmg(Z77,X77,HeroNormal,P08)
call SetUnitState(Z77,UNIT_STATE_LIFE,P08+GetUnitState(Z77,UNIT_STATE_LIFE))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",Z77,"origin"))
endif
endfunction
function RHG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local unit p5=LUnit(EC8,"Source")
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==p5 then
call DisableTrigger(t)
call RGG(p5,m5)
call LT7(EC8)
call EA8(t)
endif
else
call LT7(EC8)
call EA8(t)
endif
set t=null
set p5=null
set m5=null
return false
endfunction
function RIG takes nothing returns nothing
local trigger t=CreateTrigger()
local unit m5=GetTriggerUnit()
local unit p5=GetAttacker()
local integer EC8=GetHandleId(t)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,1,false)
call TriggerAddCondition(t,Condition(function RHG))
call SUnit(EC8,"Target",m5)
call SUnit(EC8,"Source",p5)
set m5=null
set p5=null
set t=null
endfunction
function RJG takes nothing returns nothing
local unit p5=GetAttacker()
if LState(p5,"CooldownState")==false then
call AddTimedBoolBuff(p5,"CooldownState",.4)
call RIG()
endif
endfunction
function RKG takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),'A0SS')>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==LUnit(GetHandleId(GetTriggeringTrigger()),"Hero")and GetUnitTypeId(GetTriggerUnit())!='n00L' and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))then
call RJG()
endif
return false
endfunction
function RMG takes unit N28,boolean SY8 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function RKG))
call SUnit(GetHandleId(t),"Hero",N28)
if SY8 then
set UV7[GetPlayerId(GetOwningPlayer(N28))]=t
endif
set t=null
endfunction
function RNG takes nothing returns boolean
if GetLearnedSkill()=='A0SS' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A0SS')==1 then
call RMG(GetTriggerUnit(),false)
endif
return false
endfunction
function FQ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function RNG))
set t=null
endfunction
function ROG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
if GetUnitTypeId(N28)=='E02X' then
call SetUnitVertexColor(N28,255,255,255,255)
else
call SetUnitVertexColor(N28,'d','d','d',255)
endif
call DestroyEffect(LEff(EC8,"FX1"))
call DestroyEffect(LEff(EC8,"FX2"))
call UnitRemoveAbility(N28,'A0SR')
call UnitRemoveAbility(N28,'A0ST')
call LT7(EC8)
call EA8(t)
set t=null
set N28=null
return false
endfunction
function RPG takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit N28=GetTriggerUnit()
local integer TA8=GetUnitAbilityLevel(N28,'A0T2')
call SetUnitVertexColor(N28,0,0,0,255)
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),'A0ST',false)
call AddPermanentAbility(N28,'A0ST')
call AddPermanentAbility(N28,'A0SR')
call SetUnitAbilityLevel(N28,'A0SR',TA8)
call T99(N28,0,0)
call SUnit(EC8,"Hero",N28)
call SEff(EC8,"FX1",AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Bloodlust\\BloodlustTarget.mdl",N28,"right hand"))
call SEff(EC8,"FX2",AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Bloodlust\\BloodlustTarget.mdl",N28,"left hand"))
call TriggerRegisterTimerEvent(t,2+TA8,false)
call TriggerAddCondition(t,Condition(function ROG))
set N28=null
set t=null
endfunction
function RQG takes nothing returns boolean
if GetSpellAbilityId()=='A0T2' then
call RPG()
endif
return false
endfunction
function FR9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function RQG))
set t=null
endfunction
function Snatch_Damage takes nothing returns nothing
call Dmg(D37,GetEnumUnit(),NormalFire,D67*'}'+25)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Naga\\NagaBlood\\NagaBloodWindserpent.mdl",GetEnumUnit(),"overhead"))
endfunction
function Snatch_Process takes nothing returns nothing
local integer W57=GetHandleId(GetTriggeringTrigger())
local unit Z77=H04
local unit X77=H54
local real P08=LReal(W57,"Damage")
call Dmg(Z77,X77,NormalFire,P08)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Naga\\NagaBlood\\NagaBloodWindserpent.mdl",X77,"overhead"))
set Z77=null
set X77=null
endfunction
function RRG takes nothing returns nothing
local unit Z77=D37
local unit X77=GetEnumUnit()
local integer ML8=D67
local trigger t=T88(Z77,X77,'h0DF',"BJE",600)
local integer W57=GetHandleId(t)
call SReal(W57,"Damage",((ML8*'}'+25)*1.))
set Z77=null
set X77=null
endfunction
function RSG takes unit Z77,unit X77,integer ML8 returns nothing
local group g=OG8()
set H04=Z77
set D37=Z77
set D67=ML8
call GroupEnumUnitsInRange(g,GetUnitX(X77),GetUnitY(X77),700+25,Condition(function UM8))
call ForGroup(g,function RRG)
call OF8(g)
set g=null
endfunction
function RTG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer NR8=GetHandleId(t)
local integer YC7=LInt(NR8,"HeroPID")
local unit RUG=LUnit(NR8,"ConsumeCaster")
call DisableTrigger(R04[YC7])
call IssueImmediateOrderById(RUG,852597)
call EnableTrigger(R04[YC7])
call LT7(NR8)
call EA8(t)
set t=null
set RUG=null
return false
endfunction
function RVG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=LUnit(W57,"Target")
local unit AM7=LUnit(W57,"Hero")
local unit AC7=LUnit(W57,"Caster")
local integer ML8=LInt(W57,"Level")
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call UnitShareVision(X77,GetOwningPlayer(AM7),false)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl",GetUnitX(X77),GetUnitY(X77)))
call SetUnitPosition(AM7,GetUnitX(X77),GetUnitY(X77))
call PauseUnit(AM7,false)
call ShowUnit(AM7,true)
call SetUnitPathing(AM7,true)
call ClearSelectionForPlayer(GetOwningPlayer(AM7))
call SelectUnitForPlayerSingle(AM7,GetOwningPlayer(AM7))
call SetUnitInvulnerable(AM7,false)
call DestroyEffect(LEff(W57,"FX"))
call DestroyEffect(LEff(W57,"FX3"))
call RemoveUnit(AC7)
call LT7(W57)
call EA8(t)
call RSG(AM7,X77,ML8)
call SaveInteger(R8,(GetHandleId((AM7))),((4310)),(2))
elseif IsUnitType(X77,UNIT_TYPE_HERO)and IsUnitEnemy(X77,GetOwningPlayer(AM7))then
call UnitShareVision(X77,GetOwningPlayer(AM7),false)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl",GetUnitX(X77),GetUnitY(X77)))
call SetUnitPosition(AM7,GetUnitX(X77),GetUnitY(X77))
call PauseUnit(AM7,false)
call ShowUnit(AM7,true)
call SetUnitPathing(AM7,true)
call ClearSelectionForPlayer(GetOwningPlayer(AM7))
call SelectUnitForPlayerSingle(AM7,GetOwningPlayer(AM7))
call SetUnitInvulnerable(AM7,false)
call DestroyEffect(LEff(W57,"FX"))
call DestroyEffect(LEff(W57,"FX3"))
call RemoveUnit(AC7)
call LT7(W57)
call EA8(t)
call RSG(AM7,X77,ML8)
call SaveInteger(R8,(GetHandleId((AM7))),((4310)),(2))
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='A0SX' then
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl",GetUnitX(X77),GetUnitY(X77)))
if IsUnitEnemy(X77,GetOwningPlayer(AM7))then
call SetUnitState(AM7,UNIT_STATE_LIFE,GetUnitState(AM7,UNIT_STATE_LIFE)+GetUnitState(X77,UNIT_STATE_LIFE))
endif
call UnitShareVision(X77,GetOwningPlayer(AM7),false)
call SetUnitPosition(AM7,GetUnitX(X77),GetUnitY(X77))
call PauseUnit(AM7,false)
call ShowUnit(AM7,true)
call SetUnitPathing(AM7,true)
call SetUnitAnimation(AM7,"Stand Victory")
call TK8(AM7,1.5)
call ClearSelectionForPlayer(GetOwningPlayer(AM7))
call SelectUnitForPlayerSingle(AM7,GetOwningPlayer(AM7))
call SetUnitInvulnerable(AM7,false)
call DestroyEffect(LEff(W57,"FX"))
call DestroyEffect(LEff(W57,"FX3"))
call RemoveUnit(AC7)
call LT7(W57)
call EA8(t)
call RSG(AM7,X77,ML8)
if IsUnitEnemy(X77,GetOwningPlayer(AM7))then
call UnitRemoveBuffs(X77,true,true)
call T99(X77,0,0)
call Dmg(AM7,X77,NormalFire,100000)
call Dmg(AM7,X77,HeroNormal,100000)
call Dmg(AM7,X77,HeroMagic,100000)
endif
call SaveInteger(R8,(GetHandleId((AM7))),((4310)),(2))
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELECTED and GetTriggerUnit()==X77 then
call ClearSelectionForPlayer(GetOwningPlayer(AM7))
call SelectUnitAddForPlayer(AC7,GetOwningPlayer(AM7))
else
call SetUnitPosition(AM7,GetUnitX(X77),GetUnitY(X77))
endif
set t=null
set X77=null
set AM7=null
return false
endfunction
function RWG takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local trigger RXG=CreateTrigger()
local unit AC7=CreateUnit(GetOwningPlayer(N28),'e010',7260,-7732,0)
local string RYG="Objects\\Spawnmodels\\Naga\\NagaBlood\\NagaBloodWindserpent.mdl"
local string RZG="Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBase.mdl"
local string RAG="Abilities\\Spells\\Other\\Aneu\\AneuTarget.mdl"
if IsPlayerEnemy(GetLocalPlayer(),GetOwningPlayer(N28))and N08(GetLocalPlayer())==false then
set RYG=""
set RZG=""
set RAG=""
endif
call UnitRemoveBuffs(N28,true,true)
call T99(N28,0,0)
call SetUnitInvulnerable(AC7,true)
call AddPermanentAbility(AC7,'A0SX')
call ClearSelectionForPlayer(GetOwningPlayer(N28))
call SelectUnitForPlayerSingle(AC7,GetOwningPlayer(N28))
call UnitShareVision(m5,GetOwningPlayer(N28),true)
call SetUnitInvulnerable(N28,true)
call ShowUnit(N28,false)
call PauseUnit(N28,true)
call SetUnitPathing(N28,false)
call DestroyEffect(AddSpecialEffectTarget(RYG,m5,"overhead"))
call SUnit(EC8,"Target",m5)
call SUnit(EC8,"Hero",N28)
call SUnit(EC8,"Caster",AC7)
call SEff(EC8,"FX",AddSpecialEffectTarget(RZG,m5,"overhead"))
call SEff(EC8,"FX3",AddSpecialEffectTarget(RAG,m5,"overhead"))
call SInt(EC8,"Level",(GetUnitAbilityLevel(N28,'A0SW')))
call TriggerRegisterDeathEvent(t,m5)
call TriggerRegisterPlayerUnitEvent(t,GetOwningPlayer(N28),EVENT_PLAYER_UNIT_SELECTED,Condition(function KF8))
call TriggerRegisterUnitEvent(t,AC7,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterTimerEvent(t,.2,true)
call TriggerAddCondition(t,Condition(function RVG))
call SaveInteger(R8,(GetHandleId((N28))),((4310)),(1))
if KR8(GetOwningPlayer(N28))then
call SUnit(GetHandleId(RXG),"ConsumeCaster",AC7)
call SInt(GetHandleId(RXG),"HeroPID",GetPlayerId(GetOwningPlayer(N28)))
call TriggerRegisterTimerEvent(RXG,1.,false)
call TriggerAddCondition(RXG,Condition(function RTG))
endif
set t=null
set RXG=null
set N28=null
set m5=null
endfunction
function RBG takes nothing returns boolean
if GetSpellAbilityId()=='A0SW' then
call RWG()
endif
return false
endfunction
function RCG takes nothing returns boolean
if GetSpellAbilityId()=='A0SW' and IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and(IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_HERO)or IsUnitIllusion(GetSpellTargetUnit()))then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n0LV'))
endif
return false
endfunction
function FT9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function RBG))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function RCG))
set t=null
endfunction
function R3G takes integer C77,unit Z77,unit X77 returns nothing
local unit AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
if C77==0 then
call IssueTargetOrderById(Z77,851983,X77)
elseif C77==1 then
call AddPermanentAbility(AC7,'A0TH')
call SetUnitAbilityLevel(AC7,'A0TH',1)
call IssueTargetOrderById(AC7,852075,X77)
elseif C77==2 then
call AddPermanentAbility(AC7,'A0TH')
call SetUnitAbilityLevel(AC7,'A0TH',1)
call IssueTargetOrderById(AC7,852075,X77)
elseif C77==3 then
call AddPermanentAbility(AC7,'A0TH')
call SetUnitAbilityLevel(AC7,'A0TH',2)
call IssueTargetOrderById(AC7,852075,X77)
elseif C77==4 then
call AddPermanentAbility(AC7,'A0TH')
call SetUnitAbilityLevel(AC7,'A0TH',3)
call IssueTargetOrderById(AC7,852075,X77)
elseif C77==5 then
call AddPermanentAbility(AC7,'A0TH')
call SetUnitAbilityLevel(AC7,'A0TH',4)
call IssueTargetOrderById(AC7,852075,X77)
elseif C77==6 then
call AddPermanentAbility(AC7,'A0TH')
call SetUnitAbilityLevel(AC7,'A0TH',5)
call IssueTargetOrderById(AC7,852075,X77)
endif
set AC7=null
endfunction
function R6G takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=LInt(EC8,"Level")
local integer P89=LInt(EC8,"Count")
local unit p5=LUnit(EC8,"Source")
local integer QRD=LInt(EC8,"TargetIndex")
local unit m5=KH8(QRD)
local real RLG=(10.+TA8*5.)/ 100.
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
set P89=P89+1
call R3G(P89,p5,m5)
if P89==8 then
call KG8(QRD)
call LT7(EC8)
call EA8(t)
else
call SInt(EC8,"Count",P89)
endif
elseif W18(GetEventDamage())and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))and IsUnitType(GetEventDamageSource(),UNIT_TYPE_STRUCTURE)==false then
if IsUnitType(GetEventDamageSource(),UNIT_TYPE_HERO)or GetUnitAbilityLevel(GetEventDamageSource(),'A04R')==0 then
call SetUnitState(GetEventDamageSource(),UNIT_STATE_LIFE,GetUnitState(GetEventDamageSource(),UNIT_STATE_LIFE)+GetEventDamage()*RLG)
else
call SetUnitState(Y7[GetPlayerId(GetOwningPlayer(GetEventDamageSource()))],UNIT_STATE_LIFE,GetUnitState(Y7[GetPlayerId(GetOwningPlayer(GetEventDamageSource()))],UNIT_STATE_LIFE)+GetEventDamage()*RLG)
endif
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",GetEventDamageSource(),"origin"))
endif
set t=null
set p5=null
set m5=null
return false
endfunction
function R1G takes nothing returns nothing
local unit p5=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call R3G(0,p5,m5)
call SInt(EC8,"Count",0)
call SInt(EC8,"Level",GetUnitAbilityLevel(p5,'A194'))
call SUnit(EC8,"Source",p5)
call SInt(EC8,"TargetIndex",KJ8(m5))
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterTimerEvent(t,.01,false)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function R6G))
set t=null
set p5=null
set m5=null
endfunction
function R0G takes nothing returns boolean
if GetSpellAbilityId()=='A194' and HasLinkin(GetSpellTargetUnit())==false then
call R1G()
endif
return false
endfunction
function FS9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function R0G))
set t=null
call PU8('A0TH')
endfunction
function IsUnitHeroFilter takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)!=null)
endfunction
function R2G takes nothing returns boolean
local integer i1=GetSpellAbilityId()
if(i1=='A0AA' or i1=='A1EV' or i1=='A0SX' or i1=='A0GJ' or i1=='A0GE' or i1=='A0GS' or i1=='A0AB' or i1=='A1HR' or i1=='A1S5' or i1=='A1IN' or i1=='A1S8' or i1=='A0AC' or i1=='A0AD' or i1=='A0AE' or i1=='A1AO' or i1=='A1UV' or i1=='A1DJ' or i1=='A1U7')or i1=='A1S7' or i1=='A0X6' or i1=='A284' or i1=='A0HM' or(i1=='A07X' or i1=='A0AL')or i1=='A07T' or i1=='A0X6' or i1=='A0HG' or i1=='A0FZ' then
elseif i1=='A14Q' then
call KillUnit(GetTriggerUnit())
else
call UnitRemoveAbility(GetTriggerUnit(),i1)
endif
return true
endfunction
function R_G takes nothing returns boolean
local unit u=GetTriggerUnit()
local boolean S4G
if GetUnitAbilityLevel(u,'Aloc')>0 and GetPlayerController(GetOwningPlayer(u))==MAP_CONTROL_COMPUTER then
if XJ7("(not LoadBoolean(hash_aiAbilities,AIDummyState,GetHandleId(u)))")and(GetUnitAbilityLevel(u,'A0SX')==0 and GetUnitAbilityLevel(u,'A1HW')==0 and GetUnitAbilityLevel(u,'A1HX')==0 and GetUnitAbilityLevel(u,'A1NF')==0 and GetUnitAbilityLevel(u,'A0FZ')==0 and GetUnitAbilityLevel(u,'A1FM')==0 and GetUnitAbilityLevel(u,'A1DJ')==0 and GetUnitAbilityLevel(u,'A1U7')==0 and GetUnitTypeId(u)!='h0B1' and GetUnitTypeId(u)!='e010' and GetUnitTypeId(u)!='h0C3' and GetUnitTypeId(u)!='e02P' and GetUnitTypeId(u)!='h00O' and GetUnitTypeId(u)!='e02D' and GetUnitTypeId(u)!='h081' and GetUnitTypeId(u)!='o019')then
set S4G=GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_ENDCAST and R2G()
endif
endif
set u=null
return false
endfunction
function S7G takes unit Y47,integer TS9 returns item
local integer V37
local item S8G
set V37=0
loop
exitwhen V37>5
set S8G=UnitItemInSlot(Y47,V37)
if(S8G!=null)and(ZU7(S8G)==TS9)then
set S8G=null
return UnitItemInSlot(Y47,V37)
endif
set V37=V37+1
endloop
set S8G=null
return null
endfunction
function J39 takes nothing returns nothing
local unit N28=H04
local integer i=1
local integer S9G
if GetUnitTypeId(N28)!='H00U' then
return
endif
loop
exitwhen i>11
set S9G=YS[i]
call AddPermanentAbility(N28,S9G)
call SetPlayerAbilityAvailable(GetOwningPlayer(N28),S9G,false)
set i=i+1
endloop
set N28=null
endfunction
function SDG takes nothing returns boolean
if GetUnitTypeId(GetTriggerUnit())=='H00U' and IsUnitIllusion(GetTriggerUnit())==false then
set H04=GetTriggerUnit()
call J39()
elseif(GetUnitTypeId(GetTriggerUnit())=='Ubal' or GetUnitTypeId(GetTriggerUnit())=='E02X')and IsUnitIllusion(GetTriggerUnit())==false then
set H04=GetTriggerUnit()
call ExecuteFunc("OWF")
elseif GetUnitTypeId(GetTriggerUnit())=='H00I' and IsUnitIllusion(GetTriggerUnit())==false then
set H04=GetTriggerUnit()
call ExecuteFunc("T6E")
endif
return false
endfunction
function SEG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
call UnitRemoveAbility(m5,'A0VJ')
call UnitRemoveAbility(m5,'A109')
if GetUnitAbilityLevel(m5,'A0VJ')==0 or GetUnitAbilityLevel(m5,'A109')==0 then
call LT7(EC8)
call EA8(t)
endif
set t=null
set m5=null
return false
endfunction
function SFG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
call DestroyEffect(LEff(EC8,"FX"))
call LT7(EC8)
call EA8(t)
call UnitRemoveAbility(m5,'A0VJ')
call UnitRemoveAbility(m5,'A109')
if GetUnitAbilityLevel(m5,'A0VJ')>0 or GetUnitAbilityLevel(m5,'A109')>0 then
set t=CreateTrigger()
set EC8=GetHandleId(t)
call SUnit(EC8,"Target",m5)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function SEG))
endif
set t=null
set m5=null
return false
endfunction
function SGG takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit N28=GetTriggerUnit()
local integer SHG=GetHandleId(N28)
local unit m5=GetSpellTargetUnit()
local integer SIG=LInt(SHG,"WexLevel")
local integer SJG=LInt(SHG,"ExortLevel")
call AddPermanentAbility(m5,'A0VJ')
call SetUnitAbilityLevel(m5,'A0VJ',SIG)
call AddPermanentAbility(m5,'A109')
call SetUnitAbilityLevel(m5,'A109',SJG)
call TriggerRegisterTimerEvent(t,9,false)
call TriggerAddCondition(t,Condition(function SFG))
call SUnit(EC8,"Target",m5)
call SEff(EC8,"FX",AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIsp\\SpeedTarget.mdl",m5,"origin"))
set t=null
set N28=null
set m5=null
endfunction
function SKG takes nothing returns boolean
if GetSpellAbilityId()=='A0VQ' then
call SGG()
endif
return false
endfunction
function SMG takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function SKG))
call PY8('A0VJ',GetRandomReal(1,25))
call PY8('A109',GetRandomReal(1,25))
set t=null
endfunction
function SNG takes unit p5 returns real
return 400+400.*(LInt(GetHandleId(p5),"WexLevel"))
endfunction
function SOG takes unit Z77,unit X77,integer SPG,integer SQG returns nothing
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
local unit SRG=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
local real SSG=.5+.3*SQG
if SQG==7 then
set SSG=2.5
endif
call AddPermanentAbility(AC7,'A0XK')
call SetUnitAbilityLevel(AC7,'A0XK',SQG)
call IssueTargetOrderById(AC7,852144,X77)
call W48(SRG,X77,1,70+(SPG+SPG+SQG)*15.,SSG+0.01)
set AC7=null
set SRG=null
endfunction
function STG takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),H24)==false then
call GroupAddUnit(H24,GetEnumUnit())
call SOG(H04,GetEnumUnit(),HB4,HC4)
endif
endfunction
function SUG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit oA=LUnit(EC8,"Caster")
local real x2=LReal(EC8,"x2")
local real y2=LReal(EC8,"y2")
local real a=LReal(EC8,"a")
local integer SIG=LInt(EC8,"WexLevel")
local integer SVG=LInt(EC8,"QuasLevel")
local group g=LGroup(EC8,"g")
local real x=GetUnitX(oA)+25*Cos(a)
local real y=GetUnitY(oA)+25*Sin(a)
local group SWG=OG8()
local real SXG=Z87(x,y,x2,y2)
if SXG<=30 then
set x=x2
set y=y2
endif
call SetUnitX(oA,PQ8(x))
call SetUnitY(oA,PS8(y))
set H04=oA
set H24=g
set HB4=SIG
set HC4=SVG
call GroupEnumUnitsInRange(SWG,x,y,200,Condition(function UM8))
call ForGroup(SWG,function STG)
call OF8(SWG)
if SXG<=30 or GetTriggerEvalCount(t)>'}' then
call KillUnit(oA)
call LT7(EC8)
call EA8(t)
endif
set t=null
set oA=null
set g=null
set SWG=null
return false
endfunction
function SYG takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local location l=GetSpellTargetLoc()
local unit p5=GetTriggerUnit()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local real a=Atan2(y-GetUnitY(p5),x-GetUnitX(p5))
local unit oA
set x=GetUnitX(p5)
set y=GetUnitY(p5)
set oA=CreateUnit(GetOwningPlayer(p5),'n01U',x,y,a*bj_RADTODEG)
call TriggerRegisterTimerEvent(t,.025,true)
call TriggerAddCondition(t,Condition(function SUG))
call SUnit(EC8,"Caster",oA)
call SReal(EC8,"x2",x+SNG(p5)*Cos(a))
call SReal(EC8,"y2",y+SNG(p5)*Sin(a))
call SInt(EC8,"WexLevel",(LInt(GetHandleId(p5),"WexLevel")))
call SInt(EC8,"QuasLevel",(LInt(GetHandleId(p5),"QuasLevel")))
call SReal(EC8,"a",a)
call SGroup(EC8,"g",OG8())
call RemoveLocation(l)
set t=null
set l=null
set p5=null
endfunction
function SZG takes nothing returns boolean
if GetSpellAbilityId()=='A0VK' then
call SYG()
endif
return false
endfunction
function SAG takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function SZG))
call PY8('A0XK',GetRandomReal(1,25))
set t=null
endfunction
function SBG takes nothing returns nothing
local real SCG=P18(PL8(GetUnitState(GetEnumUnit(),UNIT_STATE_MANA),pB),0)
local real S3G=SCG*.5
if GU8(GetEnumUnit())==false and SCG>0 and NH8(GetEnumUnit())==false then
if GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)>(S3G+.5)then
call SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)-S3G)
else
call SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,1)
call Dmg(PB,GetEnumUnit(),NormalFire,S3G)
endif
call SetUnitState(GetEnumUnit(),UNIT_STATE_MANA,GetUnitState(GetEnumUnit(),UNIT_STATE_MANA)-SCG)
endif
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)then
set EMPShockManaBurn=EMPShockManaBurn+S3G
endif
endfunction
function S6G takes unit s,unit p5,integer SIG,integer SJG returns nothing
local group g=OG8()
set PB=p5
set H04=p5
set pB=SIG*75+25
call GroupEnumUnitsInRange(g,GetUnitX(p5),GetUnitY(p5),700,Condition(function UM8))
set EMPShockManaBurn=0
call ForGroup(g,function SBG)
call SetUnitState(s,UNIT_STATE_MANA,GetUnitState(p5,UNIT_STATE_MANA)+EMPShockManaBurn)
call OF8(g)
set g=null
endfunction
function SLG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer iX=GetTriggerEvalCount(t)
local unit oA=LUnit(EC8,"Caster")
local unit S1G
local real S0G=2.9
local real S5G=VN+(EN-VN)*iX/(S0G/ .05)
call SetUnitScale(oA,S5G,S5G,S5G)
if iX>(S0G/ .05)then
call S6G(LUnit(EC8,"Hero"),oA,LInt(EC8,"WexLevel"),LInt(EC8,"ExortLevel"))
set S1G=CreateUnit(GetOwningPlayer(oA),'e01O',GetUnitX(oA),GetUnitY(oA),0)
call SetUnitTimeScale(S1G,.3)
call RemoveUnit(oA)
call KillUnit(S1G)
call LT7(EC8)
call EA8(t)
endif
set t=null
set oA=null
set S1G=null
return false
endfunction
function S2G takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local location l=GetSpellTargetLoc()
local unit p5=GetTriggerUnit()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local real a=Atan2(y-GetUnitY(p5),x-GetUnitX(p5))
local unit oA=CreateUnit(GetOwningPlayer(p5),'e01M',x,y,a*bj_RADTODEG)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function SLG))
call SUnit(EC8,"Caster",oA)
call SInt(EC8,"WexLevel",((LInt(GetHandleId(p5),"WexLevel"))))
call SInt(EC8,"QuasLevel",((LInt(GetHandleId(p5),"QuasLevel"))))
call SInt(EC8,"ExortLevel",((LInt(GetHandleId(p5),"ExortLevel"))))
call SUnit(EC8,"Hero",p5)
call RemoveLocation(l)
set t=null
set l=null
set p5=null
endfunction
function S_G takes nothing returns boolean
if GetSpellAbilityId()=='A0VS' then
call S2G()
endif
return false
endfunction
function T4G takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function S_G))
set t=null
endfunction
function T7G takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit T8G=LUnit(EC8,"Caster")
local unit hn=LUnit(EC8,"Hero")
if GetUnitAbilityLevel(hn,'B08X')==0 then
call UnitRemoveAbility(hn,'AZ0O')
call UnitRemoveAbility(hn,'AZ0P')
call UnitRemoveAbility(hn,'BZ0O')
call UnitRemoveAbility(hn,'BZ0P')
call KillUnit(T8G)
call LT7(EC8)
call EA8(t)
else
call SetUnitAbilityLevel(T8G,'A0VH',(LInt(GetHandleId(hn),"QuasLevel")))
call SetUnitX(T8G,GetUnitX(hn))
call SetUnitY(T8G,GetUnitY(hn))
endif
set t=null
set T8G=null
set hn=null
return false
endfunction
function T9G takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit hn=GetTriggerUnit()
local unit T8G=CreateUnit(GetOwningPlayer(hn),'e01V',GetUnitX(hn),GetUnitY(hn),0)
call AddPermanentAbility(T8G,'A0VH')
call SetUnitAbilityLevel(T8G,'A0VH',(LInt(GetHandleId(hn),"QuasLevel")))
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function T7G))
if GetUnitAbilityLevel(hn,'A0XL')<6 and GetUnitAbilityLevel(hn,'A0XL')>1 then
call AddPermanentAbility(hn,'AZ0O')
call SetUnitAbilityLevel(hn,'AZ0O',GetUnitAbilityLevel(hn,'A0XL')-1)
elseif GetUnitAbilityLevel(hn,'A0XL')>5 then
call AddPermanentAbility(hn,'AZ0P')
call SetUnitAbilityLevel(hn,'AZ0P',GetUnitAbilityLevel(hn,'A0XL')-5)
endif
call SUnit(EC8,"Caster",T8G)
call SUnit(EC8,"Hero",hn)
set t=null
set hn=null
endfunction
function TDG takes nothing returns boolean
if GetSpellAbilityId()=='A0XL' then
call T9G()
endif
return false
endfunction
function TEG takes unit hn returns nothing
if GetUnitAbilityLevel(hn,'A0XL')>0 then
call SetUnitAbilityLevel(hn,'A0XL',(LInt(GetHandleId(hn),"WexLevel")))
endif
endfunction
function TFG takes nothing returns boolean
if IsUnitIllusion(GetTriggerUnit())==false then
call TEG(GetTriggerUnit())
endif
return false
endfunction
function TGG takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function TDG))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function TFG))
call PY8('A0VH',GetRandomReal(1,25))
set t=null
endfunction
function THG takes unit TIG,unit m5,integer SIG returns nothing
local unit TJG=CreateUnit(GetOwningPlayer(m5),'e00E',GetUnitX(m5),GetUnitY(m5),0)
call AddPermanentAbility(TJG,'A0VT')
call SetUnitAbilityLevel(TJG,'A0VT',SIG)
call IssueTargetOrderById(TJG,852585,m5)
set TJG=null
endfunction
function TKG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit TIG=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
local real TMG=LReal(EC8,"Angle")
local real TNG=LReal(EC8,"Rate")
local integer SIG=LInt(EC8,"WexLevel")
local integer SVG=LInt(EC8,"QuasLevel")
local integer TOG=SVG*25/ 3
local real x
local real y
local integer FWF=GetTriggerEvalCount(t)
if FWF>TOG/ 3 then
call SReal(EC8,"Rate",TNG*.98)
endif
if FWF>TOG or GetTriggerEventId()==EVENT_UNIT_DEATH then
call LT7(EC8)
call EA8(t)
if GetTriggerEventId()!=EVENT_UNIT_DEATH then
call THG(TIG,m5,SIG)
endif
else
set x=PQ8(GetUnitX(m5)+TNG*Cos(TMG))
set y=PS8(GetUnitY(m5)+TNG*Sin(TMG))
call KillTrees(x,y,150)
call SetUnitPosition(m5,x,y)
endif
set t=null
set TIG=null
set m5=null
return false
endfunction
function TPG takes unit TIG,unit m5,integer SIG,integer SVG,integer TQG returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local real TMG=Atan2(GetUnitY(m5)-GetUnitY(TIG),GetUnitX(m5)-GetUnitX(TIG))
call Dmg(TIG,m5,NormalFire,TQG*40)
call SUnit(EC8,"Source",TIG)
call SUnit(EC8,"Target",m5)
call SReal(EC8,"Angle",TMG)
call SReal(EC8,"Rate",6)
call SInt(EC8,"WexLevel",SIG)
call SInt(EC8,"QuasLevel",SVG)
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function TKG))
set t=null
endfunction
function TRG takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),H24)==false and GU8(GetEnumUnit())==false then
call GroupAddUnit(H24,GetEnumUnit())
call TPG(H04,GetEnumUnit(),HB4,HC4,H34)
endif
endfunction
function TSG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit TJG=LUnit(EC8,"Caster")
local real a=LReal(EC8,"a")
local real x2=LReal(EC8,"x2")
local real y2=LReal(EC8,"y2")
local group g=LGroup(EC8,"g")
local integer SIG=LInt(EC8,"WexLevel")
local integer SVG=LInt(EC8,"QuasLevel")
local integer TQG=LInt(EC8,"ExortLevel")
local real x=GetUnitX(TJG)
local real y=GetUnitY(TJG)
local group g2
if Z87(x,y,x2,y2)<'d' then
set x=x2
set y=y2
else
set x=x+33*Cos(a)
set y=y+33*Sin(a)
endif
call SetUnitX(TJG,PQ8(x))
call SetUnitY(TJG,PS8(y))
set g2=OG8()
set H04=TJG
set H24=g
set HB4=SIG
set HC4=SVG
set H34=TQG
call GroupEnumUnitsInRange(g2,x,y,200,Condition(function UM8))
call ForGroup(g2,function TRG)
call OF8(g2)
if(x==x2 and y==y2)or GetTriggerEvalCount(t)>35 then
set g2=OG8()
set H04=TJG
set H24=g
set HB4=SIG
set HC4=SVG
set H34=TQG
call GroupEnumUnitsInRange(g2,x,y,250,Condition(function UM8))
call ForGroup(g2,function TRG)
call OF8(g2)
call LT7(EC8)
call EA8(t)
call KillUnit(TJG)
call OF8(g)
endif
set t=null
set TJG=null
set g=null
set g2=null
return false
endfunction
function TTG takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local location l=GetSpellTargetLoc()
local unit TIG=GetTriggerUnit()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local real a=Atan2(y-GetUnitY(TIG),x-GetUnitX(TIG))
local unit TJG=CreateUnit(GetOwningPlayer(TIG),'n01X',GetUnitX(TIG),GetUnitY(TIG),a*bj_RADTODEG)
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerAddCondition(t,Condition(function TSG))
call SUnit(EC8,"Caster",TJG)
call SReal(EC8,"a",a)
call SReal(EC8,"x2",GetUnitX(TIG)+1000*Cos(a))
call SReal(EC8,"y2",GetUnitY(TIG)+1000*Sin(a))
call SGroup(EC8,"g",OG8())
call SInt(EC8,"WexLevel",(LInt(GetHandleId(TIG),"WexLevel")))
call SInt(EC8,"QuasLevel",(LInt(GetHandleId(TIG),"QuasLevel")))
call SInt(EC8,"ExortLevel",(LInt(GetHandleId(TIG),"ExortLevel")))
call RemoveLocation(l)
set t=null
set l=null
set TIG=null
endfunction
function TUG takes nothing returns boolean
if GetSpellAbilityId()=='A0VM' then
call TTG()
endif
return false
endfunction
function TVG takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function TUG))
call PY8('A0VT',GetRandomReal(1,25))
set t=null
endfunction
function TWG takes unit hn returns real
local integer TXG=(LInt(GetHandleId(hn),"ExortLevel"))
return(80+TXG*35.)/ 2
endfunction
function TYG takes unit hn returns real
local integer SPG=(LInt(GetHandleId(hn),"WexLevel"))
return 325+SPG*175.
endfunction
function TZG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit TIG=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
local real P99=LReal(EC8,"Damage")
local effect FX=LEff(EC8,"FX")
local integer FWF=GetTriggerEvalCount(t)
call Dmg(TIG,m5,NormalFire,P99)
if FWF==3 then
call LT7(EC8)
call EA8(t)
call DestroyEffect(FX)
endif
set t=null
set TIG=null
set m5=null
set FX=null
return false
endfunction
function TAG takes unit TIG,unit m5,real P99 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call SUnit(EC8,"Source",TIG)
call SUnit(EC8,"Target",m5)
call SReal(EC8,"Damage",P99)
call SEff(EC8,"FX",AddSpecialEffectTarget("Environment\\SmallBuildingFire\\SmallBuildingFire2.mdl",m5,"chest"))
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function TZG))
set t=null
endfunction
function TBG takes nothing returns nothing
call TAG(H04,GetEnumUnit(),H64/ 5)
call Dmg(H04,GetEnumUnit(),NormalFire,H64)
endfunction
function TCG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
local real a=LReal(EC8,"a")
local integer FWF=GetTriggerEvalCount(t)-26
local unit TIG=LUnit(EC8,"Source")
local real T3G
local real T6G
local unit TLG
local group g
if FWF==1 then
set TLG=CreateUnit(GetOwningPlayer(TIG),'e01L',x,y,a*bj_RADTODEG)
call SUnit(EC8,"Caster",TLG)
elseif FWF>1 then
set TLG=LUnit(EC8,"Caster")
endif
if FWF>0 then
set T3G=PQ8(GetUnitX(TLG)+15*Cos(a))
set T6G=PS8(GetUnitY(TLG)+15*Sin(a))
call SetUnitX(TLG,T3G)
call SetUnitY(TLG,T6G)
if(FWF>1 and ModuloInteger(FWF,10)==0)or FWF==1 then
set g=OG8()
set H04=TIG
set H64=TWG(TIG)
call GroupEnumUnitsInRange(g,T3G,T6G,300,Condition(function UM8))
call ForGroup(g,function TBG)
call OF8(g)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",T3G,T6G))
endif
if FWF>TYG(TIG)/ 16.6 then
call LT7(EC8)
call EA8(t)
call KillUnit(TLG)
endif
endif
set t=null
set g=null
set TLG=null
set TIG=null
return false
endfunction
function T1G takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local location l=GetSpellTargetLoc()
local unit TIG=GetTriggerUnit()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local real a=Atan2(y-GetUnitY(TIG),x-GetUnitX(TIG))
local unit T0G=CreateUnit(GetOwningPlayer(TIG),'e01K',x,y,a*bj_RADTODEG)
call SetUnitTimeScale(T0G,.58)
call UnitApplyTimedLife(T0G,'BTLF',1.75)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function TCG))
call SUnit(EC8,"Source",TIG)
call SReal(EC8,"x",x)
call SReal(EC8,"y",y)
call SReal(EC8,"a",a)
call RemoveLocation(l)
set t=null
set l=null
set TIG=null
endfunction
function T5G takes nothing returns boolean
if GetSpellAbilityId()=='A0VN' then
call T1G()
endif
return false
endfunction
function T2G takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function T5G))
set t=null
endfunction
function T_G takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local real U4G=LReal(GetHandleId(m5),"MeltingStrike|Last")
if U4G+5<=ZM7()then
call UnitRemoveAbility(m5,'A0VW')
endif
call LT7(EC8)
call EA8(t)
set t=null
set m5=null
return false
endfunction
function U7G takes unit m5 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=GetUnitAbilityLevel(m5,'A0VW')
if TA8==0 then
call AddPermanentAbility(m5,'A0VW')
endif
call SetUnitAbilityLevel(m5,'A0VW',TA8+1)
call SUnit(EC8,"Target",m5)
call SReal(GetHandleId(m5),"MeltingStrike|Last",ZM7())
call TriggerRegisterTimerEvent(t,5,false)
call TriggerAddCondition(t,Condition(function T_G))
set t=null
endfunction
function U8G takes nothing returns boolean
local real d
if GetUnitAbilityLevel(GetTriggerUnit(),'B091')>0 and GetUnitAbilityLevel(GetEventDamageSource(),'A0VV')>0 and LUnit(GetHandleId(GetTriggeringTrigger()),"Source")==GetEventDamageSource()then
call UnitRemoveAbility(GetTriggerUnit(),'B091')
call DisableTrigger(GetTriggeringTrigger())
call U7G(GetTriggerUnit())
call LT7(GetHandleId(GetTriggeringTrigger()))
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function U9G takes nothing returns nothing
local trigger t
local unit m5
local unit p5
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
set m5=GetSpellTargetUnit()
set p5=GetTriggerUnit()
else
set m5=GetTriggerUnit()
set p5=GetAttacker()
endif
if IsUnitIllusion(p5)==false then
set t=CreateTrigger()
call SUnit(GetHandleId(t),"Source",p5)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function U8G))
endif
set t=null
set m5=null
set p5=null
endfunction
function UDG takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if GetUnitAbilityLevel(GetAttacker(),'A0VV')>0 and LBool(GetHandleId(GetTriggeringTrigger()),"OrbOn")and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==LUnit(GetHandleId(GetTriggeringTrigger()),"Source")then
call U9G()
endif
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if(GetIssuedOrderId()==852255)then
call SBool(GetHandleId(GetTriggeringTrigger()),"OrbOn",true)
elseif(GetIssuedOrderId()==852256)then
call SBool(GetHandleId(GetTriggeringTrigger()),"OrbOn",false)
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='A0VV' then
call U9G()
endif
return false
endfunction
function UEG takes unit p5 returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t,p5,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,p5,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function UDG))
call SUnit(GetHandleId(t),"Source",p5)
call SBool(GetHandleId(t),"OrbOn",true)
set t=null
endfunction
function UFG takes nothing returns nothing
call KillUnit(GetEnumUnit())
endfunction
function UGG takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='n027')
endfunction
function UHG takes player p returns nothing
local group g=OG8()
call GroupEnumUnitsOfPlayer(g,p,Condition(function UGG))
call ForGroup(g,function UFG)
call OF8(g)
set g=null
endfunction
function UIG takes nothing returns nothing
local unit p5=GetTriggerUnit()
local unit oA
local integer SVG=(LInt(GetHandleId(p5),"QuasLevel"))
local integer SJG=(LInt(GetHandleId(p5),"ExortLevel"))
call UHG(GetOwningPlayer(p5))
set oA=CreateUnit(GetOwningPlayer(p5),'n027',GetUnitX(p5),GetUnitY(p5),GetUnitFacing(p5))
call SetUnitColor(oA,GetPlayerColor(G8[0]))
call AddSpecialEffectTarget("Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl",oA,"chest")
call UnitApplyTimedLife(oA,'BTLF',10+10*SVG)
call SetUnitAbilityLevel(oA,'A0VV',SJG)
call UEG(oA)
if Ab[GetPlayerId(GetOwningPlayer(p5))]then
call SelectUnitAddForPlayer(oA,GetOwningPlayer(p5))
endif
if SVG>3 and SJG>3 then
set oA=CreateUnit(GetOwningPlayer(p5),'n027',GetUnitX(p5),GetUnitY(p5),GetUnitFacing(p5))
call SetUnitColor(oA,GetPlayerColor(G8[0]))
call AddSpecialEffectTarget("Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl",oA,"chest")
call UnitApplyTimedLife(oA,'BTLF',10+10*SVG)
call SetUnitAbilityLevel(oA,'A0VV',SJG)
call UEG(oA)
if Ab[GetPlayerId(GetOwningPlayer(p5))]then
call SelectUnitAddForPlayer(oA,GetOwningPlayer(p5))
endif
endif
call SetPlayerTechResearched(GetOwningPlayer(p5),'R00G',SJG)
call SetPlayerTechResearched(GetOwningPlayer(p5),'R00H',SVG)
set p5=null
set oA=null
endfunction
function UJG takes nothing returns boolean
if GetSpellAbilityId()=='A0VO' then
call UIG()
endif
return false
endfunction
function UKG takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function UJG))
call PY8('A0VV',GetRandomReal(1,25))
call PY8('A0VW',GetRandomReal(1,25))
set t=null
endfunction
function UMG takes unit Z77 returns integer
local integer ML8=(LInt(GetHandleId(Z77),"QuasLevel"))
if ML8==1 then
return'A230'
elseif ML8==2 then
return'A22Z'
elseif ML8==3 then
return'A22Y'
elseif ML8==4 then
return'A22U'
elseif ML8==5 then
return'A22V'
elseif ML8==6 then
return'A22W'
elseif ML8==7 then
return'A22X'
endif
return'A230'
endfunction
function UNG takes unit X77 returns nothing
call UnitRemoveAbility(X77,'A230')
call UnitRemoveAbility(X77,'A22Z')
call UnitRemoveAbility(X77,'A22Y')
call UnitRemoveAbility(X77,'A22U')
call UnitRemoveAbility(X77,'A22V')
call UnitRemoveAbility(X77,'A22W')
call UnitRemoveAbility(X77,'A22X')
call UnitRemoveAbility(X77,'B08Z')
endfunction
function UOG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local real LBD=(LoadReal(R8,(GetHandleId(X77)),(681)))
call FlushChildHashtable(R8,(W57))
call EA8(t)
if GetTriggerEventId()==EVENT_WIDGET_DEATH or LBD<(TimerGetElapsed(E4))then
call UNG(X77)
endif
set t=null
set X77=null
return false
endfunction
function UPG takes nothing returns nothing
local unit Z77=H04
local unit X77=GetEnumUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local real LBD=(LoadReal(R8,(GetHandleId(X77)),(681)))
if LBD<(TimerGetElapsed(E4))then
call AddPermanentAbility(X77,UMG(Z77))
endif
call SaveReal(R8,(GetHandleId(X77)),(681),(((TimerGetElapsed(E4))+2)*1.))
call SaveUnitHandle(R8,(W57),(17),(X77))
call TriggerRegisterTimerEvent(t,2.01,false)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function UOG))
set t=null
set Z77=null
endfunction
function UQG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real BJ7=(LoadReal(R8,(W57),(6)))
local real BK7=(LoadReal(R8,(W57),(7)))
local real a=(LoadReal(R8,(W57),(137)))
local real VL8=(LoadReal(R8,(W57),(57)))
local real x
local real y
local integer i=1
local integer C77=GetTriggerEvalCount(t)
local group g
if C77*.1>VL8 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set g=OG8()
set H04=Z77
loop
exitwhen i>7
set x=BJ7+80*i*Cos((a+90)*bj_DEGTORAD)
set y=BK7+80*i*Sin((a+90)*bj_DEGTORAD)
call GroupEnumUnitsInRange(g,x,y,'i',Condition(function UW8))
call ForGroup(g,function UPG)
set x=BJ7+80*i*Cos((a-90)*bj_DEGTORAD)
set y=BK7+80*i*Sin((a-90)*bj_DEGTORAD)
call GroupEnumUnitsInRange(g,x,y,'i',Condition(function UW8))
call ForGroup(g,function UPG)
set i=i+1
endloop
call OF8(g)
set g=null
endif
set t=null
set Z77=null
return false
endfunction
function URG takes nothing returns nothing
local unit p5=GetTriggerUnit()
local real a=GetUnitFacing(p5)
local integer i=1
local unit oA
local real x
local real y
local real BJ7=GetUnitX(p5)+225*Cos(a*bj_DEGTORAD)
local real BK7=GetUnitY(p5)+225*Sin(a*bj_DEGTORAD)
local integer SVG=(LInt(GetHandleId(p5),"QuasLevel"))
local integer SJG=(LInt(GetHandleId(p5),"ExortLevel"))
local real VL8=1.5+1.5*SVG
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
loop
exitwhen i>7
set x=BJ7+80*i*Cos((a+90)*bj_DEGTORAD)
set y=BK7+80*i*Sin((a+90)*bj_DEGTORAD)
set oA=CreateUnit(GetOwningPlayer(p5),'u00O',x,y,GetRandomReal(0,360))
call SetUnitAbilityLevel(oA,'S00H',SVG)
call SetUnitAbilityLevel(oA,'A0XN',SJG)
call SetUnitAnimation(oA,"birth")
call QueueUnitAnimation(oA,"stand")
call UnitApplyTimedLife(oA,'BTLF',VL8)
set x=BJ7+80*i*Cos((a-90)*bj_DEGTORAD)
set y=BK7+80*i*Sin((a-90)*bj_DEGTORAD)
set oA=CreateUnit(GetOwningPlayer(p5),'u00O',x,y,GetRandomReal(0,360))
call SetUnitAbilityLevel(oA,'S00H',SVG)
call SetUnitAbilityLevel(oA,'A0XN',SJG)
call SetUnitAnimation(oA,"birth")
call QueueUnitAnimation(oA,"stand")
call UnitApplyTimedLife(oA,'BTLF',VL8)
set i=i+1
endloop
call TriggerAddCondition(t,Condition(function UQG))
call TriggerRegisterTimerEvent(t,.1,true)
call SaveReal(R8,(W57),(6),((BJ7)*1.))
call SaveReal(R8,(W57),(7),((BK7)*1.))
call SaveReal(R8,(W57),(137),((a)*1.))
call SaveUnitHandle(R8,(W57),(2),(p5))
call SaveReal(R8,(W57),(57),((VL8)*1.))
set oA=null
set p5=null
set t=null
endfunction
function USG takes nothing returns boolean
if GetSpellAbilityId()=='A0VP' then
call URG()
endif
return false
endfunction
function UTG takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function USG))
call PY8('S00H',GetRandomReal(1,25))
call PY8('A0XN',GetRandomReal(1,25))
set t=null
endfunction
function UUG takes nothing returns nothing
if IsCourier(GetEnumUnit())==false then
call Dmg(H04,GetEnumUnit(),HeroMagic,H64)
endif
endfunction
function UVG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit hn=LUnit(EC8,"Hero")
local real P99=LReal(EC8,"Damage")
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
local group g=OG8()
local integer FWF
set H04=hn
call GroupEnumUnitsInRange(g,x,y,200,Condition(function UM8))
set FWF=CountUnitsInGroup(g)
if FWF<1 then
set FWF=1
endif
set H64=P99/ FWF
call ForGroup(g,function UUG)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y))
call OF8(g)
call DestroyEffect(LEff(EC8,"Effect"))
call LT7(EC8)
call EA8(t)
set t=null
set hn=null
set g=null
return false
endfunction
function UWG takes unit hn,real x,real y returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local real P99=(LInt(GetHandleId(hn),"ExortLevel"))*62.5+12.5+25
local string s=""
if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(hn))or(L8 and(GetLocalPlayer()==KU4 or GetLocalPlayer()==KV4))then
set s="Abilities\\Spells\\Items\\VampiricPotion\\VampPotionCaster.mdl"
endif
call S18(GetOwningPlayer(hn),5.7,x,y,400)
call TriggerRegisterTimerEvent(t,1.7,false)
call TriggerAddCondition(t,Condition(function UVG))
call SUnit(EC8,"Hero",hn)
call SReal(EC8,"x",x)
call SReal(EC8,"y",y)
call SReal(EC8,"Damage",P99)
call SEff(EC8,"Effect",AddSpecialEffect(s,x,y))
set t=null
set hn=null
endfunction
function UXG takes nothing returns boolean
if GetSpellAbilityId()=='A0VG' then
call UWG(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endif
return false
endfunction
function UYG takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function UXG))
set t=null
endfunction
function UZG takes unit TIG,unit m5,integer i returns nothing
local unit UAG=CreateUnit(GetOwningPlayer(m5),'e00E',GetUnitX(m5),GetUnitY(m5),0)
call AddPermanentAbility(UAG,'A0VI')
call IssueTargetOrderById(UAG,852095,m5)
if GU8(m5)==false then
call Dmg(TIG,m5,NormalFire,i*7)
endif
set UAG=null
endfunction
function UBG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local integer TA8=LInt(EC8,"Level")
local unit TIG=LUnit(EC8,"Source")
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamage()>10 and EV8(t,"Cooldown")==false and GetOwningPlayer(GetEventDamageSource())!=GetOwningPlayer(GetTriggerUnit())then
call DisableTrigger(t)
call UZG(TIG,m5,TA8)
call EnableTrigger(t)
call EL8(t,"Cooldown",.8-TA8*.0285)
endif
else
call DestroyEffect(LEff(EC8,"FX"))
call LT7(EC8)
call EA8(t)
endif
set t=null
set m5=null
set TIG=null
return false
endfunction
function UCG takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit hn=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local integer TA8=(LInt(GetHandleId(hn),"QuasLevel"))
call TriggerRegisterTimerEvent(t,2.5+TA8*.5,false)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function UBG))
call SUnit(EC8,"Target",m5)
call SInt(EC8,"Level",TA8)
call SUnit(EC8,"Source",hn)
call SEff(EC8,"FX",AddSpecialEffectTarget("Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl",m5,"overhead"))
call UZG(hn,m5,TA8)
set t=null
set hn=null
set m5=null
endfunction
function U3G takes nothing returns boolean
if GetSpellAbilityId()=='A0VZ' then
call UCG()
endif
return false
endfunction
function U6G takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function U3G))
call PY8('A0VI',GetRandomReal(1,25))
set t=null
endfunction
function ULG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit hn=LUnit(EC8,"Hero")
local integer TA8=LInt(EC8,"Level")
call SetUnitState(hn,UNIT_STATE_LIFE,GetUnitState(hn,UNIT_STATE_LIFE)+TA8*1)
return false
endfunction
function U1G takes unit hn,integer TA8 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(hn)
call SBool(EC8,"Invoker|HasQuas",true)
call STrig(EC8,"Invoker|QuasTrigger",t)
call SUnit(GetHandleId(t),"Hero",hn)
call SInt(GetHandleId(t),"Level",TA8)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function ULG))
set t=null
endfunction
function U0G takes unit hn returns nothing
local integer EC8=GetHandleId(hn)
local boolean U5G=LBool(EC8,"Invoker|HasQuas")
local trigger t
if U5G then
call SBool(EC8,"Invoker|HasQuas",false)
set t=LTrig(EC8,"Invoker|QuasTrigger")
call LT7(GetHandleId(t))
call EA8(t)
endif
set t=null
endfunction
function U2G takes unit hn returns nothing
local integer EC8=GetHandleId(hn)
local integer U_G=LInt(EC8,"Invoker|Wex")
local integer V4G=LInt(EC8,"Invoker|Quas")
local integer V7G=LInt(EC8,"Invoker|Exort")
local integer SIG=GetUnitAbilityLevel(hn,'A21X')
local integer SVG=GetUnitAbilityLevel(hn,'A21W')
local integer SJG=GetUnitAbilityLevel(hn,'A21V')
call UnitRemoveAbility(hn,'A0WD')
call UnitRemoveAbility(hn,'A0VE')
call U0G(hn)
call UnitRemoveAbility(hn,'A0V7')
if U_G>0 then
call AddPermanentAbility(hn,'A0WD')
call AddPermanentAbility(hn,'A0VE')
call SetUnitAbilityLevel(hn,'A0WD',U_G*SIG)
call SetUnitAbilityLevel(hn,'A0VE',U_G*SIG)
call SetPlayerAbilityAvailable(GetOwningPlayer(hn),'A0WD',false)
endif
if V4G>0 then
call U1G(hn,V4G*SVG)
endif
if V7G>0 then
call AddPermanentAbility(hn,'A0V7')
call SetUnitAbilityLevel(hn,'A0V7',V7G*SJG)
endif
endfunction
function V8G takes nothing returns boolean
if IsUnitIllusion(GetTriggerUnit())==false and(GetLearnedSkill()=='A21X' or GetLearnedSkill()=='A21W' or GetLearnedSkill()=='A21V')then
call U2G(GetTriggerUnit())
if GetLearnedSkill()=='A21X' then
call SetHeroAgi(GetTriggerUnit(),GetHeroAgi(GetTriggerUnit(),false)+2,true)
call SInt((GetHandleId(GetTriggerUnit())),"WexLevel",(GetUnitAbilityLevel(GetTriggerUnit(),'A21X')))
endif
if GetLearnedSkill()=='A21W' then
call SetHeroStr(GetTriggerUnit(),GetHeroStr(GetTriggerUnit(),false)+2,true)
call SInt((GetHandleId(GetTriggerUnit())),"QuasLevel",(GetUnitAbilityLevel(GetTriggerUnit(),'A21W')))
endif
if GetLearnedSkill()=='A21V' then
call SetHeroInt(GetTriggerUnit(),GetHeroInt(GetTriggerUnit(),false)+2,true)
call SInt((GetHandleId(GetTriggerUnit())),"ExortLevel",(GetUnitAbilityLevel(GetTriggerUnit(),'A21V')))
endif
endif
return false
endfunction
function V9G takes unit hn returns nothing
if GetUnitAbilityLevel(hn,'A0XL')>0 then
call SetUnitAbilityLevel(hn,'A0XL',GetUnitAbilityLevel(hn,'A21X'))
endif
endfunction
function VDG takes nothing returns nothing
local integer VEG=0
local unit hn=GetTriggerUnit()
local integer KC8=GetHandleId(hn)
local integer VFG=LInt(KC8,"Invoker|Wex")
local integer VGG=LInt(KC8,"Invoker|Quas")
local integer VHG=LInt(KC8,"Invoker|Exort")
local integer K38=LInt(KC8,"Invoker|Current1")
local integer K68=LInt(KC8,"Invoker|Current2")
if VFG==3 and VGG==0 and VHG==0 then
set VEG=1
elseif VFG==2 and VGG==1 and VHG==0 then
set VEG=2
elseif VFG==2 and VGG==0 and VHG==1 then
set VEG=3
elseif VFG==1 and VGG==2 and VHG==0 then
set VEG=4
elseif VFG==1 and VGG==1 and VHG==1 then
set VEG=5
elseif VFG==1 and VGG==0 and VHG==2 then
set VEG=6
elseif VFG==0 and VGG==1 and VHG==2 then
set VEG=7
elseif VFG==0 and VGG==2 and VHG==1 then
set VEG=8
elseif VFG==0 and VGG==0 and VHG==3 then
set VEG=9
elseif VFG==0 and VGG==3 and VHG==0 then
set VEG=10
endif
if YS[VEG]==K68 then
return
endif
if false and(GetUnitAbilityLevel(hn,'A21Y')==1 or GetUnitAbilityLevel(hn,'A1GU')==1)then
call SetPlayerAbilityAvailable(GetOwningPlayer(hn),K68,false)
set K68=YS[VEG]
call SetPlayerAbilityAvailable(GetOwningPlayer(hn),K68,true)
else
if K38!=0 and K68!=0 then
call SetPlayerAbilityAvailable(GetOwningPlayer(hn),K38,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(hn),K68,false)
set K38=K68
set K68=YS[VEG]
call SetPlayerAbilityAvailable(GetOwningPlayer(hn),K38,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(hn),K68,true)
elseif K38==0 and K68!=0 then
call SetPlayerAbilityAvailable(GetOwningPlayer(hn),K68,false)
set K38=K68
set K68=YS[VEG]
call SetPlayerAbilityAvailable(GetOwningPlayer(hn),K38,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(hn),K68,true)
else
set K68=YS[VEG]
call SetPlayerAbilityAvailable(GetOwningPlayer(hn),K68,true)
endif
endif
call SInt(KC8,"Invoker|Current1",K38)
call SInt(KC8,"Invoker|Current2",K68)
call V9G(hn)
set hn=null
endfunction
function VIG takes unit AM7,integer VJG,integer VKG,integer VMG returns nothing
local integer Orb1=0
local integer Orb2=0
local integer Orb3=0
local integer VNG
local integer VOG
local integer VPG
local integer VQG
local integer VRG
local integer VSG
local integer VTG
local integer VUG
local integer VVG
call UnitRemoveAbility(AM7,'A0DN')
call UnitRemoveAbility(AM7,'A0DG')
call UnitRemoveAbility(AM7,'A0IX')
call UnitRemoveAbility(AM7,'A0I1')
call UnitRemoveAbility(AM7,'A0I0')
call UnitRemoveAbility(AM7,'A0HZ')
call UnitRemoveAbility(AM7,'A0IC')
call UnitRemoveAbility(AM7,'A0IB')
call UnitRemoveAbility(AM7,'A0ID')
call UnitRemoveAbility(AM7,'A22C')
call UnitRemoveAbility(AM7,'A22D')
call UnitRemoveAbility(AM7,'A22E')
call UnitRemoveAbility(AM7,'A22F')
call UnitRemoveAbility(AM7,'A22G')
call UnitRemoveAbility(AM7,'A22H')
call UnitRemoveAbility(AM7,'A22I')
call UnitRemoveAbility(AM7,'A22J')
call UnitRemoveAbility(AM7,'A22K')
if S7G(AM7,FB4)==null then
set VNG='A0DN'
set VOG='A0DG'
set VPG='A0IX'
set VQG='A0I1'
set VRG='A0I0'
set VSG='A0HZ'
set VTG='A0IC'
set VUG='A0IB'
set VVG='A0ID'
else
set VNG='A22C'
set VOG='A22D'
set VPG='A22E'
set VQG='A22F'
set VRG='A22G'
set VSG='A22H'
set VTG='A22I'
set VUG='A22J'
set VVG='A22K'
endif
if VJG==1 and VKG==0 and VMG==0 then
call AddPermanentAbility(AM7,VNG)
elseif VJG==0 and VKG==1 and VMG==0 then
call AddPermanentAbility(AM7,VQG)
elseif VJG==0 and VKG==0 and VMG==1 then
call AddPermanentAbility(AM7,VTG)
elseif VJG==2 and VKG==0 and VMG==0 then
call AddPermanentAbility(AM7,VNG)
call AddPermanentAbility(AM7,VOG)
elseif VJG==1 and VKG==1 and VMG==0 then
call AddPermanentAbility(AM7,VNG)
call AddPermanentAbility(AM7,VRG)
elseif VJG==1 and VKG==0 and VMG==1 then
call AddPermanentAbility(AM7,VNG)
call AddPermanentAbility(AM7,VUG)
elseif VJG==0 and VKG==2 and VMG==0 then
call AddPermanentAbility(AM7,VQG)
call AddPermanentAbility(AM7,VRG)
elseif VJG==0 and VKG==1 and VMG==1 then
call AddPermanentAbility(AM7,VQG)
call AddPermanentAbility(AM7,VUG)
elseif VJG==0 and VKG==0 and VMG==2 then
call AddPermanentAbility(AM7,VTG)
call AddPermanentAbility(AM7,VUG)
elseif VJG==3 and VKG==0 and VMG==0 then
call AddPermanentAbility(AM7,VNG)
call AddPermanentAbility(AM7,VOG)
call AddPermanentAbility(AM7,VPG)
elseif VJG==2 and VKG==1 and VMG==0 then
call AddPermanentAbility(AM7,VNG)
call AddPermanentAbility(AM7,VOG)
call AddPermanentAbility(AM7,VSG)
elseif VJG==2 and VKG==0 and VMG==1 then
call AddPermanentAbility(AM7,VNG)
call AddPermanentAbility(AM7,VOG)
call AddPermanentAbility(AM7,VVG)
elseif VJG==1 and VKG==2 and VMG==0 then
call AddPermanentAbility(AM7,VNG)
call AddPermanentAbility(AM7,VRG)
call AddPermanentAbility(AM7,VSG)
elseif VJG==1 and VKG==1 and VMG==1 then
call AddPermanentAbility(AM7,VNG)
call AddPermanentAbility(AM7,VRG)
call AddPermanentAbility(AM7,VVG)
elseif VJG==1 and VKG==0 and VMG==2 then
call AddPermanentAbility(AM7,VNG)
call AddPermanentAbility(AM7,VUG)
call AddPermanentAbility(AM7,VVG)
elseif VJG==0 and VKG==1 and VMG==2 then
call AddPermanentAbility(AM7,VTG)
call AddPermanentAbility(AM7,VUG)
call AddPermanentAbility(AM7,VSG)
elseif VJG==0 and VKG==2 and VMG==1 then
call AddPermanentAbility(AM7,VQG)
call AddPermanentAbility(AM7,VRG)
call AddPermanentAbility(AM7,VVG)
elseif VJG==0 and VKG==0 and VMG==3 then
call AddPermanentAbility(AM7,VTG)
call AddPermanentAbility(AM7,VUG)
call AddPermanentAbility(AM7,VVG)
elseif VJG==0 and VKG==3 and VMG==0 then
call AddPermanentAbility(AM7,VQG)
call AddPermanentAbility(AM7,VRG)
call AddPermanentAbility(AM7,VSG)
endif
endfunction
function A8F takes nothing returns nothing
local unit AM7=H04
local integer W57=GetHandleId(AM7)
local integer VWG=LInt(W57,"Invoker|OrbFirst")
local integer VXG=LInt(W57,"Invoker|OrbSecond")
local integer VYG=LInt(W57,"Invoker|OrbThird")
local integer VJG=0
local integer VKG=0
local integer VMG=0
if VWG=='A21X' then
set VJG=VJG+1
elseif VWG=='A21W' then
set VKG=VKG+1
elseif VWG=='A21V' then
set VMG=VMG+1
endif
if VXG=='A21X' then
set VJG=VJG+1
elseif VXG=='A21W' then
set VKG=VKG+1
elseif VXG=='A21V' then
set VMG=VMG+1
endif
if VYG=='A21X' then
set VJG=VJG+1
elseif VYG=='A21W' then
set VKG=VKG+1
elseif VYG=='A21V' then
set VMG=VMG+1
endif
call VIG(AM7,VJG,VKG,VMG)
set AM7=null
endfunction
function VZG takes nothing returns nothing
local unit hn=GetTriggerUnit()
local integer EC8=GetHandleId(hn)
local integer VAG=GetSpellAbilityId()
local integer VBG=LInt(EC8,"Invoker|OrbFirst")
local integer VCG=LInt(EC8,"Invoker|OrbSecond")
local integer V3G=LInt(EC8,"Invoker|OrbThird")
local integer U_G=0
local integer V4G=0
local integer V7G=0
set VBG=VCG
set VCG=V3G
set V3G=VAG
if VBG=='A21X' then
set U_G=U_G+1
elseif VBG=='A21W' then
set V4G=V4G+1
elseif VBG=='A21V' then
set V7G=V7G+1
endif
if VCG=='A21X' then
set U_G=U_G+1
elseif VCG=='A21W' then
set V4G=V4G+1
elseif VCG=='A21V' then
set V7G=V7G+1
endif
if V3G=='A21X' then
set U_G=U_G+1
elseif V3G=='A21W' then
set V4G=V4G+1
elseif V3G=='A21V' then
set V7G=V7G+1
endif
call SInt(EC8,"Invoker|OrbFirst",VBG)
call SInt(EC8,"Invoker|OrbSecond",VCG)
call SInt(EC8,"Invoker|OrbThird",V3G)
call SInt(EC8,"Invoker|Wex",U_G)
call SInt(EC8,"Invoker|Quas",V4G)
call SInt(EC8,"Invoker|Exort",V7G)
call VIG(hn,U_G,V4G,V7G)
call U2G(hn)
call V9G(hn)
endfunction
function V6G takes nothing returns boolean
if GetSpellAbilityId()=='A21X' or GetSpellAbilityId()=='A21W' or GetSpellAbilityId()=='A21V' then
call VZG()
elseif GetSpellAbilityId()=='A21Y' or GetSpellAbilityId()=='A1GU' then
call VDG()
endif
return false
endfunction
function FU9 takes nothing returns nothing
local trigger t=CreateTrigger()
call PU8(YS[1])
call PU8(YS[2])
call PU8(YS[3])
call PU8(YS[4])
call PU8(YS[5])
call PU8(YS[6])
call PU8(YS[7])
call PU8(YS[8])
call PU8(YS[9])
call PU8(YS[10])
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function V6G))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function V8G))
set t=null
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,GetObjectName('n06G'))
call PY8('A0XO',GetRandomReal(1,25))
call PY8('A0WD',GetRandomReal(1,25))
call PY8('A0VE',GetRandomReal(1,25))
call PY8('A0V7',GetRandomReal(1,25))
call PY8('A21V',GetRandomReal(1,25))
call PY8('A21X',GetRandomReal(1,25))
call PY8('A21W',GetRandomReal(1,25))
call SMG()
call SAG()
call T4G()
call TGG()
call TVG()
call T2G()
call UKG()
call UTG()
call UYG()
call U6G()
endfunction
function VLG takes nothing returns nothing
if S_9(GetEnumUnit())then
return
endif
call T68(GetEnumUnit(),S64,1,7,'B0BV')
call UnitMakeAbilityPermanent(GetEnumUnit(),true,S64)
call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),S64,false)
endfunction
function V1G takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A2IS')
local group g=OG8()
if ML8==1 then
set S64='A1F6'
elseif ML8==2 then
set S64='A1F7'
elseif ML8==3 then
set S64='A1F3'
elseif ML8==4 then
set S64='A1F5'
endif
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),925,Condition(function U48))
call ForGroup(g,function VLG)
call OF8(g)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl",Z77,"overhead"))
set Z77=null
set g=null
endfunction
function V0G takes nothing returns boolean
if GetSpellAbilityId()=='A2IS' then
call V1G()
endif
return false
endfunction
function FW9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function V0G))
set t=null
endfunction
function V5G takes nothing returns nothing
call Stun(SL4,GetEnumUnit(),2)
call Dmg(SL4,GetEnumUnit(),NormalFire,KD7*75+25)
endfunction
function V2G takes player p,unit m5,integer TA8 returns nothing
local unit AC7=CreateUnit(p,'e00E',GetUnitX(m5),GetUnitY(m5),0)
local integer o6
local group g=OG8()
set KD7=TA8
set H04=Y7[GetPlayerId(p)]
call GroupEnumUnitsInRange(g,GetUnitX(m5),GetUnitY(m5),280,Condition(function UM8))
call GroupAddUnit(g,m5)
set SL4=AC7
call ForGroup(g,function V5G)
call OF8(g)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\StormBolt\\StormBoltMissile.mdl",m5,"origin"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\StormBolt\\StormBoltMissile.mdl",m5,"origin"))
set AC7=null
set g=null
endfunction
function V_G takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local player p=ED8(EC8,"p")
local integer QRD=LInt(EC8,"TargetIndex")
local unit m5=KH8(QRD)
local integer TA8=LInt(EC8,"Level")
local unit VA8=LUnit(EC8,"Projectile")
local real x=GetUnitX(VA8)
local real y=GetUnitY(VA8)
local real Y5=GetUnitX(m5)
local real Z5=GetUnitY(m5)
local real F4=1000*.035
local real l4=YI7(x,y,Y5,Z5)
local real X0D=x+F4*Cos(l4*bj_DEGTORAD)
local real X5D=y+F4*Sin(l4*bj_DEGTORAD)
local boolean UN9=LBool(EC8,"Active")
call SetUnitX(VA8,X0D)
call SetUnitY(VA8,X5D)
call SetUnitFacing(VA8,l4)
if Z87(Y5,Z5,X0D,X5D)<=F4 then
if UN9 then
call V2G(p,m5,TA8)
endif
call KillUnit(VA8)
call KG8(QRD)
call LT7(EC8)
call EA8(t)
endif
set t=null
set m5=null
set VA8=null
return false
endfunction
function W4G takes nothing returns nothing
local unit p5=GetTriggerUnit()
local integer TA8=GetUnitAbilityLevel(p5,'A190')
local unit m5=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit VA8=CreateUnit(GetOwningPlayer(p5),'h07Q',GetUnitX(p5),GetUnitY(p5),YI7(GetUnitX(p5),GetUnitY(p5),GetUnitX(m5),GetUnitY(m5)))
local boolean UN9=HasLinkin(GetSpellTargetUnit())==false
call SBool(EC8,"Active",UN9)
call DA8(EC8,"p",GetOwningPlayer(p5))
call SInt(EC8,"TargetIndex",KJ8(m5))
call SUnit(EC8,"Projectile",VA8)
call SInt(EC8,"Level",TA8)
call TriggerRegisterTimerEvent(t,.035,true)
call TriggerAddCondition(t,Condition(function V_G))
set t=null
set p5=null
set m5=null
set VA8=null
endfunction
function W7G takes nothing returns boolean
if GetSpellAbilityId()=='A190' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",GetTriggerUnit(),"weapon"))
else
call W4G()
endif
endif
return false
endfunction
function FV9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function W7G))
set t=null
endfunction
function W8G takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7=LUnit(W57,"Hero")
local integer C77=(LInt(W57,"Count"))
if GetTriggerEventId()!=EVENT_PLAYER_UNIT_SPELL_EFFECT then
set C77=C77+1
call SInt(W57,"Count",C77)
endif
if(GetTriggerEventId()!=EVENT_PLAYER_UNIT_SPELL_EFFECT and C77>1)or(GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT and IsPurgeId(GetSpellAbilityId())and GetSpellTargetUnit()==AM7)then
if(GetTriggerEventId()!=EVENT_PLAYER_UNIT_SPELL_EFFECT and C77>1)then
if O18(AM7)==false then
call UnitRemoveAbility(AM7,'A0WO')
call UnitRemoveAbility(AM7,'B009')
call UnitRemoveAbility(AM7,'B0DP')
endif
call LT7(W57)
call EA8(t)
endif
elseif GetTriggerEventId()!=EVENT_PLAYER_UNIT_SPELL_EFFECT then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\BattleCryCaster.mdx",AM7,"overhead"))
call AddPermanentAbility(AM7,'A0WO')
call SetUnitAbilityLevel(AM7,'A0WO',GetUnitAbilityLevel(AM7,'A1WH'))
call UnitMakeAbilityPermanent(AM7,true,'A0WO')
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),'A0WO',false)
endif
set t=null
set AM7=null
return false
endfunction
function W9G takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AM7=GetTriggerUnit()
call TriggerRegisterTimerEvent(t,25,false)
call TriggerRegisterTimerEvent(t,.31,false)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function W8G))
call SUnit(W57,"Hero",AM7)
call SInt(W57,"Count",0)
set t=null
set AM7=null
endfunction
function WDG takes nothing returns boolean
if GetSpellAbilityId()=='A1WH' and GetUnitTypeId(GetTriggerUnit())=='H001' then
call W9G()
endif
return false
endfunction
function FX9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WDG))
set t=null
endfunction
function WEG takes nothing returns nothing
local location l
local unit N28=GetTriggerUnit()
local real x1=GetUnitX(N28)
local real y1=GetUnitY(N28)
local real a
local real x2
local real y2
local integer TA8=GetUnitAbilityLevel(N28,'A0X5')
local real P99
local real Hk
local unit m5=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 TA8==1 then
set P99=60
set Hk=.5
elseif TA8==2 then
set P99=130
set Hk=1
elseif TA8==3 then
set P99=200
set Hk=1.5
elseif TA8==4 then
set P99=260
set Hk=2
endif
if GetSpellTargetUnit()!=null and HasLinkin(GetSpellTargetUnit())then
set m5=GetSpellTargetUnit()
endif
call G4F(N28,m5,P99,Hk,.52,x1,y1,x2,y2,150,null,true,1600)
call RemoveLocation(l)
set l=null
set N28=null
endfunction
function WFG takes nothing returns boolean
if GetSpellAbilityId()=='A0X5' then
call WEG()
endif
return false
endfunction
function FY9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WFG))
call PU8('A0X6')
set t=null
endfunction
function WGG takes nothing returns boolean
if(GetSpellAbilityId()=='A095' or GetSpellAbilityId()=='A09W')and GU8(GetSpellTargetUnit())then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n0LR'))
endif
return false
endfunction
function DeathFinger_Agha_Func takes nothing returns nothing
local group g=CreateGroup()
local unit s=GetTriggerUnit()
local unit u=GetSpellTargetUnit()
local integer i=GetUnitAbilityLevel(s,'A09W')
local real d=150*i+575
call GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),225,null)
call GroupRemoveUnit(g,u)
loop
set u=FirstOfGroup(g)
exitwhen u==null
if IsUnitType(u,UNIT_TYPE_DEAD)==false and IsUnitEnemy(u,GetOwningPlayer(s))and GetUnitAbilityLevel(u,'Aloc')+GetUnitAbilityLevel(u,'A04R')+GetUnitAbilityLevel(u,'Avul')==0 and(IsUnitType(u,UNIT_TYPE_ANCIENT)or IsUnitType(u,UNIT_TYPE_STRUCTURE)or IsUnitType(u,UNIT_TYPE_MECHANICAL))==false then
call AddTimedLightningToUnitEx(s,u,0.4,"AFOD",false)
call Dmg(s,u,1,d)
endif
call GroupRemoveUnit(g,u)
endloop
call DestroyGroup(g)
set g=null
set s=null
set u=null
endfunction
function DeathFinger_Agha takes nothing returns nothing
if GetSpellAbilityId()=='A09W' then
call DeathFinger_Agha_Func()
endif
endfunction
function FZ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function WGG))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function DeathFinger_Agha))
set t=null
endfunction
function WHG takes nothing returns nothing
local location l
local unit N28=GetTriggerUnit()
local real x1=GetUnitX(N28)
local real y1=GetUnitY(N28)
local real a
local real x2
local real y2
local integer TA8=GetUnitAbilityLevel(N28,'A0X7')
local real P99
local real Hk
local unit m5=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 TA8==1 then
set P99=80
set Hk=.75
elseif TA8==2 then
set P99=140
set Hk=1.25
elseif TA8==3 then
set P99=200
set Hk=1.75
elseif TA8==4 then
set P99=260
set Hk=2.25
endif
if GetSpellTargetUnit()!=null and HasLinkin(GetSpellTargetUnit())then
set m5=GetSpellTargetUnit()
endif
call G4F(N28,m5,P99,Hk,.52,x1,y1,x2,y2,150,null,true,1600)
call RemoveLocation(l)
set l=null
set N28=null
endfunction
function WIG takes nothing returns boolean
if GetSpellAbilityId()=='A0X7' then
call WHG()
endif
return false
endfunction
function FA9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WIG))
call PU8('A0X6')
set t=null
endfunction
function WJG takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A1H5')
local real r=GetHeroInt(X77,true)*(3+.5*ML8)
local integer P8D=IMinBJ(R2I(r),R2I(GetUnitState(X77,UNIT_STATE_MANA)))
call SetUnitState(X77,UNIT_STATE_MANA,GetUnitState(X77,UNIT_STATE_MANA)-P8D)
call Dmg(Z77,X77,NormalFire,P8D)
call GMD("MBUR",Z77,X77,1,1,1,1,.5)
call QM8("-"+I2S(P8D),3,X77,.023,82,82,255,255)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\ManaBurn\\ManaBurnTarget.mdl",X77,"chest"))
set Z77=null
set X77=null
endfunction
function WKG takes nothing returns boolean
if GetSpellAbilityId()=='A1H5' and HasLinkin(GetSpellTargetUnit())==false then
call WJG()
endif
return false
endfunction
function FB9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WKG))
set t=null
endfunction
function WMG takes nothing returns nothing
call IssueTargetOrderById(U54,852668,GetEnumUnit())
endfunction
function WNG takes nothing returns nothing
local unit W8D=GetTriggerUnit()
local real x=GetUnitX(W8D)
local real y=GetUnitY(W8D)
local unit CKE=CreateUnit(GetOwningPlayer(W8D),'e00E',x,y,0)
local group g=OG8()
set U54=CKE
call AddPermanentAbility(CKE,'A1GG')
call GroupEnumUnitsInRange(g,x,y,325,Condition(function UB8))
call ForGroup(g,function WMG)
call OF8(g)
call KillUnit(W8D)
call SetUnitAnimation(W8D,"death")
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UndeadLargeDeathExplode\\UndeadLargeDeathExplode.mdl",x,y))
set W8D=null
set CKE=null
set g=null
endfunction
function WOG takes nothing returns boolean
if GetSpellAbilityId()=='A1HH' then
call WNG()
endif
return false
endfunction
function FC9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WOG))
call PU8('A1GG')
set t=null
endfunction
function WPG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77
local integer ML8=GetUnitAbilityLevel(Z77,'A2KO')
local group XCD=(LoadGroupHandle(R8,(W57),(22)))
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamage()>0 and IsPlayerEnemy(GetOwningPlayer(GetEventDamageSource()),GetOwningPlayer(Z77))then
if IsPlayer(GetOwningPlayer(GetEventDamageSource()))and W18(GetEventDamage())then
set X77=Y7[GetPlayerId(GetOwningPlayer(GetEventDamageSource()))]
if IsUnitInGroup(X77,XCD)==false then
call GroupAddUnit(XCD,X77)
call AddLife(Z77,GetEventDamage())
if O18(X77)==false then
call Stun(Z77,X77,.6*ML8)
call Dmg(Z77,X77,HeroMagic,GetEventDamage())
endif
set X77=null
endif
endif
endif
else
call UnitRemoveAbility(Z77,'A2KP')
call OF8(XCD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
return false
endfunction
function WQG takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,2.25,false)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function WPG))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveGroupHandle(R8,(W57),(22),(OG8()))
call AddPermanentAbility(Z77,'A2KP')
set Z77=null
set t=null
endfunction
function WRG takes nothing returns boolean
if GetSpellAbilityId()=='A2KO' then
call WQG()
endif
return false
endfunction
function F39 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WRG))
set t=null
endfunction
function WSG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local group g=LGroup(W57,"g")
call OF8(g)
call LT7(W57)
call EA8(t)
set t=null
set g=null
return false
endfunction
function WTG takes group g returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SGroup(W57,"g",g)
call TriggerRegisterTimerEvent(t,10,false)
call TriggerAddCondition(t,Condition(function WSG))
set t=null
endfunction
function WUG takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local unit AC7
local integer i=1
local real x1=GetUnitX(AM7)
local real y1=GetUnitY(AM7)
local real x2
local real y2
local real P08
local real VL8
local integer ML8=GetUnitAbilityLevel(AM7,'A29I')
local group g=OG8()
if ML8==1 then
set VL8=1.5
set P08=200
elseif ML8==2 then
set VL8=1.8
set P08=325
elseif ML8==3 then
set VL8=2.25
set P08=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 G4F(AM7,null,P08,VL8,.52,x1,y1,x2,y2,250,g,false,775)
set i=i+1
endloop
call WTG(g)
set AM7=null
set AC7=null
set g=null
endfunction
function WVG takes nothing returns boolean
if GetSpellAbilityId()=='A29I' then
call WUG()
endif
return false
endfunction
function L28 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WVG))
call PU8('A0X6')
set t=null
endfunction
function WWG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local real LBD=(LoadReal(R8,(GetHandleId(X77)),(715)))
call FlushChildHashtable(R8,(W57))
call EA8(t)
if GetTriggerEventId()==EVENT_WIDGET_DEATH or LBD<(TimerGetElapsed(E4))then
call UnitRemoveAbility(X77,'A228')
call UnitRemoveAbility(X77,'B0E8')
endif
set t=null
set X77=null
return false
endfunction
function WXG takes unit X77 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call AddPermanentAbility(X77,'A228')
call TriggerRegisterDeathEvent(t,X77)
call TriggerRegisterTimerEvent(t,6.,false)
call TriggerAddCondition(t,Condition(function WWG))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveReal(R8,(GetHandleId(X77)),(715),((5.9+(TimerGetElapsed(E4)))*1.))
set t=null
endfunction
function WYG takes nothing returns nothing
if S_9(GetEnumUnit())==false then
call WXG(GetEnumUnit())
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),'A228',false)
call Dmg(CM4,GetEnumUnit(),HeroNormal,25+50*CN4)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\CrushingWave\\CrushingWaveDamage.mdl",GetEnumUnit(),"chest"))
endfunction
function UM8_A226 takes nothing returns boolean
return IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(true or T18(GetFilterUnit()))
endfunction
function WZG takes nothing returns nothing
local group g=OG8()
local unit Z77=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A226')
set H04=Z77
set CN4=ML8
set CM4=Z77
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),425,Condition(function UM8_A226))
call ForGroup(g,function WYG)
call OF8(g)
set g=null
set Z77=null
endfunction
function WAG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SetUnitTimeScale(Z77,1)
set t=null
set Z77=null
return false
endfunction
function WBG takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
call TriggerRegisterTimerEvent(t,.3,false)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerAddCondition(t,Condition(function WAG))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SetUnitTimeScale(Z77,2)
set t=null
set Z77=null
endfunction
function WCG takes nothing returns boolean
if GetSpellAbilityId()=='A226' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
call WZG()
else
call WBG()
endif
endif
return false
endfunction
function L_8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function WCG))
set t=null
endfunction
function ND1 takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer h=GetHandleId(t)
local texttag NE1=LoadTextTagHandle(R8,h,'s')
local string s=LoadStr(R8,h,'t')
local real r=time-LoadReal(R8,h,'u')
if r<=.25 then
call SetTextTagText(NE1,s,.025*3*r/ .25)
elseif r<=.5 then
call SetTextTagText(NE1,s,.075-.05*(r-.25)/ .25)
elseif r>=3 then
call TimerOff()
endif
set t=null
set NE1=null
endfunction
function ShowCriticalMove takes string NG1,unit NH1,boolean NI1 returns nothing
local texttag NE1=CreateTextTag()
local timer t=CreateTimer()
call SetTextTagText(NE1,NG1,.025)
call SetTextTagLifespan(NE1,3)
if NI1 then
call SetTextTagColor(NE1,$FF,48,48,$FF)
else
call SetTextTagColor(NE1,$FF,$FF,$FF,$FF)
endif
call SetTextTagPos(NE1,GetUnitX(NH1),GetUnitY(NH1),0)
call SetTextTagVelocity(NE1,0,.03)
call SetTextTagPermanent(NE1,false)
call SetTextTagVisibility(NE1,true)
call SetTextTagFadepoint(NE1,2)
if IsUnitVisibleEx(NH1,GetLocalPlayer())==false then
call SetTextTagVisibility(NE1,false)
endif
call TimerStart(t,.025,true,function ND1)
call SaveTextTagHandle(R8,GetHandleId(t),'s',NE1)
call SaveStr(R8,GetHandleId(t),'t',NG1)
call SaveReal(R8,GetHandleId(t),'u',time)
set t=null
set NE1=null
endfunction
function W3G takes nothing returns nothing
local integer W57=GetHandleId(GetTriggeringTrigger())
local unit Z77=H04
local unit X77=H54
local integer ML8=LInt(W57,"Level")
local real P08=ML8*40+20
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
local integer i=GetUnitAbilityLevel(LUnit(W57,"Source"),'A03Q')
if IsUnitType(X77,UNIT_TYPE_HERO)then
set P08=P08/ 2
endif
if i>0 and GetRandomInt(0,99)<15 then
set P08=P08*(1.5+i)
call ShowCriticalMove(I2S(R2I(P08)),X77,true)
endif
call AddPermanentAbility(AC7,'A0YL')
call SetUnitAbilityLevel(AC7,'A0YL',ML8)
call IssueTargetOrderById(AC7,852075,X77)
call Dmg(Z77,X77,HeroMagic,P08)
set Z77=null
set X77=null
set AC7=null
endfunction
function W6G takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=T88(AM7,X77,'h010',"W3G",1200)
local integer WLG=GetHandleId(t)
call SInt(WLG,"Level",GetUnitAbilityLevel(AM7,'A0YM'))
set AM7=null
set X77=null
set t=null
endfunction
function W1G takes nothing returns boolean
if GetSpellAbilityId()=='A0YM' and HasLinkin(GetSpellTargetUnit())==false then
call W6G()
endif
return false
endfunction
function LI8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function W1G))
set t=null
endfunction
function W0G takes nothing returns nothing
local location l=GetSpellTargetLoc()
call QH8("Abilities\\Spells\\Orc\\EarthQuake\\EarthQuakeTarget.mdl",GetLocationX(l),GetLocationY(l),2)
call TerrainDeformationRippleBJ(.3,false,l,0,300,'d',.4,20)
call RemoveLocation(l)
set l=null
endfunction
function W5G takes nothing returns boolean
if GetSpellAbilityId()=='A06W' then
call W0G()
endif
return false
endfunction
function CW8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function W5G))
endfunction
function W2G takes itemtype W_G,integer X4G returns nothing
local group g
set bj_stockPickedItemType=W_G
set bj_stockPickedItemLevel=X4G
set g=CreateGroup()
call GroupEnumUnitsOfType(g,"marketplace",bH)
call ForGroup(g,function UpdateEachStockBuildingEnum)
call DestroyGroup(g)
set g=null
endfunction
function X7G takes nothing returns nothing
local integer pickedItemId
local itemtype X8G
local integer X9G=0
local integer XDG=0
local integer X4G
set X4G=1
loop
if(bj_stockAllowedPermanent[X4G])then
set XDG=XDG+1
if(GetRandomInt(1,XDG)==1)then
set X8G=ITEM_TYPE_PERMANENT
set X9G=X4G
endif
endif
if(bj_stockAllowedCharged[X4G])then
set XDG=XDG+1
if(GetRandomInt(1,XDG)==1)then
set X8G=ITEM_TYPE_CHARGED
set X9G=X4G
endif
endif
if(bj_stockAllowedArtifact[X4G])then
set XDG=XDG+1
if(GetRandomInt(1,XDG)==1)then
set X8G=ITEM_TYPE_ARTIFACT
set X9G=X4G
endif
endif
set X4G=X4G+1
exitwhen X4G>10
endloop
if(XDG==0)then
set X8G=null
return
endif
call W2G(X8G,X9G)
set X8G=null
endfunction
function XEG takes nothing returns nothing
call X7G()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INTERVAL,true,function X7G)
endfunction
function XFG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer ZW7=LInt(W57,"itemId")
local real x=LReal(W57,"x")
local real y=LReal(W57,"y")
local player p=ED8(W57,"p")
local boolean XGG=LBool(W57,"consumable")
local integer P29=LInt(W57,"charges")
local item XHG=CreateItem(ZW7,x,y)
call SetItemPlayer(XHG,p,true)
call SetItemUserData(XHG,0)
if XGG then
call SetItemCharges(XHG,P29)
endif
call LT7(W57)
call EA8(t)
set eY[512+GetPlayerId(p)]=3
set OI7[288+GetPlayerId(p)]=XHG
set t=null
set p=null
return false
endfunction
function XIG takes integer ZW7,real x,real y,player p,boolean XGG,integer P29 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SInt(W57,"itemId",ZW7)
call SReal(W57,"x",x*1.)
call SReal(W57,"y",y*1.)
call DA8(W57,"p",p)
call SBool(W57,"consumable",XGG)
call SInt(W57,"charges",P29)
call TriggerAddCondition(t,Condition(function XFG))
call TriggerRegisterTimerEvent(t,0,false)
set eY[512+GetPlayerId(p)]=2
set t=null
endfunction
function XJG takes player p,unit Y47,integer TS9,item XKG returns item
local integer V37
local item S8G
set V37=0
loop
exitwhen V37>5
set S8G=UnitItemInSlot(Y47,V37)
if S8G!=null and S8G!=XKG and ZU7(S8G)==TS9 and(GetItemPlayer(S8G)==p or TS9==FB or TS9==GB)then
set S8G=null
return UnitItemInSlot(Y47,V37)
endif
set V37=V37+1
endloop
set S8G=null
return null
endfunction
function XMG takes player p,unit Y47,integer TS9 returns item
local integer V37
local item S8G
set V37=0
loop
exitwhen V37>5
set S8G=UnitItemInSlot(Y47,V37)
if(S8G!=null)and(ZU7(S8G)==TS9)and(GetItemPlayer(S8G)==p or TS9==FB or TS9==GB)then
set S8G=null
return UnitItemInSlot(Y47,V37)
endif
set V37=V37+1
endloop
set S8G=null
return null
endfunction
function XNG takes item Z4 returns integer
local integer n5
local integer i=1
if Z4==null then
return-2
endif
set n5=GetItemTypeId(Z4)
loop
exitwhen i>JV
if LU[i]==n5 then
return BU[i]
endif
set i=i+1
endloop
return-1
endfunction
function XOG takes item ZV7 returns boolean
return GetItemType(ZV7)==ITEM_TYPE_POWERUP or GetItemType(ZV7)==ITEM_TYPE_PURCHASABLE or GetItemType(ZV7)==ITEM_TYPE_MISCELLANEOUS
endfunction
function XPG takes nothing returns nothing
local item Y98=GetEnumItem()
if GetWidgetLife(Y98)>0 and GetItemPlayer(Y98)==GS4 and UT4==0 and IsItemVisible(Y98)then
set UT4=UT4+1
call UnitAddItem(GT4,Y98)
endif
set Y98=null
endfunction
function XQG takes nothing returns nothing
local item Y98=GetEnumItem()
if GetWidgetLife(Y98)>0 and GetItemPlayer(Y98)==GS4 and IsItemVisible(Y98)then
call UnitAddItem(zh,Y98)
endif
set Y98=null
endfunction
function XRG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=LUnit(EC8,"Source")
local unit ZC9=LUnit(EC8,"Courier")
local player p=ED8(EC8,"p")
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
local rect r=Rect(x-300,y-300,x+300,y+300)
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call LT7(EC8)
call EA8(t)
set GS4=p
set GT4=p5
set zh=ZC9
call EnumItemsInRect(r,Condition(function KF8),function XQG)
else
if GetTriggerEvalCount(t)>9 then
call LT7(EC8)
call EA8(t)
set GS4=p
set GT4=p5
set zh=ZC9
call EnumItemsInRect(r,Condition(function KF8),function XQG)
else
set GS4=p
set GT4=p5
set UT4=0
call EnumItemsInRect(r,Condition(function KF8),function XPG)
endif
endif
call RemoveRect(r)
set t=null
set p5=null
set ZC9=null
set r=null
return false
endfunction
function XSG takes unit ZC9,unit p5 returns nothing
local player p=GetOwningPlayer(p5)
local integer i
local item Y98
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local real x=GetUnitX(ZC9)
local real y=GetUnitY(ZC9)
local integer TS9
if IsTerrainPathable(x,y,PATHING_TYPE_WALKABILITY)then
set x=GetUnitX(p5)
set y=GetUnitY(p5)
endif
call TriggerRegisterDeathEvent(t,p5)
call TriggerRegisterTimerEvent(t,.01,true)
call TriggerAddCondition(t,Condition(function XRG))
call SUnit(EC8,"Source",p5)
call SUnit(EC8,"Courier",ZC9)
call DA8(EC8,"p",p)
call SReal(EC8,"x",x*1.)
call SReal(EC8,"y",y*1.)
set i=0
loop
exitwhen i>5
set Y98=UnitItemInSlot(ZC9,i)
set TS9=ZU7(Y98)
if Y98!=null and GetItemPlayer(Y98)==p and BV9(Y98)==false and(TS9!=AY and TS9!=BY and TS9!=CY and TS9!=DZ and TS9!=EZ)then
call UnitRemoveItem(ZC9,Y98)
call SetItemPosition(Y98,x,y)
endif
set i=i+1
endloop
set t=null
set Y98=null
endfunction
function XTG takes trigger t returns nothing
local integer W57=GetHandleId(t)
local unit SS9=LUnit(W57,"Courier")
local unit AM7=LUnit(W57,"Source")
local real x
local real y
local real XUG
local real XVG
local real XWG
local real XXG
local real XYG
local real LW7
local real XZG
local real XAG=GetUnitX(AM7)
local real XBG=GetUnitY(AM7)
if(ZA7(AM7)==false)then
set x=GetUnitX(AM7)
set y=GetUnitY(AM7)
set XXG=LReal(W57,"DeliveryTargetX")
set XYG=LReal(W57,"DeliveryTargetY")
call SReal(W57,"DeliveryTargetX",x*1.)
call SReal(W57,"DeliveryTargetY",y*1.)
set XWG=Atan2(y-XYG,x-XXG)
set XUG=SquareRoot((x-XXG)*(x-XXG)+(y-XYG)*(y-XYG))/ .2
set XVG=GetUnitMoveSpeed(SS9)
set LW7=Z87(GetUnitX(AM7),GetUnitY(AM7),GetUnitX(SS9),GetUnitY(SS9))
set XZG=RAbsBJ(XWG*bj_RADTODEG-GetUnitFacing(SS9))
if(LW7<XVG-XUG and XVG>XUG)or(LW7<RMaxBJ(XVG,XUG)and XZG>=90)then
else
set XAG=x+XUG*Cos(XWG)
set XBG=y+XUG*Sin(XWG)
endif
endif
call SInt(W57,"OnDelivery",(1))
call IssuePointOrderById(SS9,851986,XAG,XBG)
set SS9=null
set AM7=null
set t=null
endfunction
function XCG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit ZC9=LUnit(W57,"Courier")
local unit Z77=LUnit(W57,"Source")
local real x
local real y
local integer i
local player p=GetOwningPlayer(Z77)
local item Y98
local integer O5=GetPlayerId(p)
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
if GetTriggerUnit()==Z77 then
call Z69(ZC9)
endif
call LT7(W57)
call EA8(t)
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_POINT_ORDER then
if(LInt(W57,"OnDelivery"))==1 then
call SInt(W57,"OnDelivery",0)
elseif GetIssuedOrderId()!=852100 and GetIssuedOrderId()!=852090 and(not RY4[O5])then
call EA8(t)
endif
elseif(RY4[O5]and HA4[O5])then
call Z69(ZC9)
else
if Z47(ZC9,Z77)<150 then
call LT7(W57)
call EA8(t)
if RY4[O5]and LInt(GetHandleId(ZC9),"aiCrow|CurrentOwner")==O5 then
set OJ7[432+O5]=2
call ABF(O5,Y7[O5],false)
call XM7(O5,"Delivery succeed")
set OJ7[432+O5]=0
else
call XSG(ZC9,Z77)
endif
call Z69(ZC9)
else
if RY4[O5]then
set H04=ZC9
set i=AO7(1000.,H04,Condition(function VW8))
if(i==0)then
call XTG(t)
else
call IssuePointOrderByIdLoc(ZC9,851986,L_7(KR4[O5]))
if Z47(ZC9,Y7[O5])<800 and is(Y7[O5])and h4[O5]==null then
call IssuePointOrderByIdLoc(Y7[O5],851986,L_7(KR4[O5]))
endif
endif
else
call XTG(t)
endif
if(Bz>hq[880+O5])and KR8(p)and(Z47(ZC9,Z77)<1800)then
call IssueImmediateOrderById(ZC9,852100)
set hq[880+O5]=Bz+5
endif
endif
endif
set t=null
set ZC9=null
set Z77=null
set Y98=null
return false
endfunction
function X3G takes unit AM7,boolean X6G returns nothing
local trigger t=null
local integer W57=0
local unit SS9=GetSellingUnit()
local integer XLG=LInt(GetHandleId(SS9),"DeliveryIndex")
local integer O5=GetPlayerId(GetOwningPlayer(AM7))
if AM7!=null then
if RY4[O5]and(LInt(GetHandleId(SS9),"aiCrow|CurrentOwner")==O5)then
set t=LTrig(GetHandleId(SS9),"aiCrow|DeliverTrigger")
if(t!=null and IsTriggerEnabled(t))then
set t=null
set SS9=null
call XM7(O5,"aiCrow|DeliverTrigger out")
return
endif
endif
set t=CreateTrigger()
set W57=GetHandleId(t)
if AM7!=LUnit(GetHandleId(SS9),"DeliveryTarget"+I2S(XLG))and X6G then
set XLG=XLG+1
call SInt(GetHandleId(SS9),"DeliveryIndex",XLG)
call SUnit(GetHandleId(SS9),"DeliveryTarget"+I2S(XLG),(AM7))
endif
call SReal(W57,"DeliveryTargetX",(GetUnitX(AM7)*1.))
call SReal(W57,"DeliveryTargetY",(GetUnitY(AM7)*1.))
call IssueTargetOrderById(SS9,851986,AM7)
call TriggerRegisterDeathEvent(t,SS9)
call TriggerRegisterDeathEvent(t,AM7)
call TriggerRegisterUnitEvent(t,SS9,EVENT_UNIT_ISSUED_ORDER)
call TriggerRegisterUnitEvent(t,SS9,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterUnitEvent(t,SS9,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterTimerEvent(t,.2,true)
call TriggerAddCondition(t,Condition(function XCG))
call SUnit(W57,"Source",AM7)
call SUnit(W57,"Courier",SS9)
call STrig(GetHandleId(SS9),"aiCrow|DeliverTrigger",t)
call XM7(O5,"aiCrow|DeliverTrigger init")
endif
set t=null
set SS9=null
endfunction
function X1G takes nothing returns nothing
local item Y98=GetEnumItem()
local unit u=OF4
local player p=GetOwningPlayer(u)
local integer id=GetPlayerId(p)
if GetWidgetLife(Y98)>0 and GetItemPlayer(Y98)==p and IsItemVisible(Y98)then
call SetItemPosition(Y98,KS4[id],KT4[id])
call UnitAddItem(OG4,Y98)
endif
set Y98=null
set u=null
set p=null
endfunction
function X0G takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit u=(LoadUnitHandle(R8,(W57),(53)))
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
set OF4=u
set OG4=Z77
if IsJWPlayer(GetOwningPlayer(u))then
call EnumItemsInRect(BD,Condition(function KF8),function X1G)
else
call EnumItemsInRect(LD,Condition(function KF8),function X1G)
endif
if GetTriggerEvalCount(t)==3 then
call KillUnit(u)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set u=null
set Z77=null
return false
endfunction
function X5G takes unit LSD returns nothing
local unit u=GetSoldUnit()
local integer i=0
local item Y98
local integer id=GetPlayerId(GetOwningPlayer(u))
local region r=CreateRegion()
local trigger t
local integer W57
local unit Z77=GetSellingUnit()
if IsJWPlayer(GetOwningPlayer(u))then
call RegionAddRect(r,BD)
else
call RegionAddRect(r,LD)
endif
if IsUnitInRegion(r,Z77)then
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function X0G))
call SaveUnitHandle(R8,(W57),(53),(u))
call SaveUnitHandle(R8,(W57),(2),(Z77))
loop
exitwhen i>5
set Y98=UnitItemInSlot(Z77,i)
if NB8(ZU7(Y98))==false and ZU7(Y98)!=F1 and BV9(Y98)==false then
call UnitRemoveItemFromSlot(Z77,i)
if IsUnitInRegion(r,Z77)and IsPlayerAlly(GetItemPlayer(Y98),GetOwningPlayer(Z77))then
set id=GetPlayerId(GetItemPlayer(Y98))
call SetItemPosition(Y98,KS4[id],KT4[id])
endif
endif
set i=i+1
endloop
endif
call RemoveRegion(r)
set u=null
set Y98=null
set t=null
set r=null
set Z77=null
endfunction
function BuyBackGoldLimit takes nothing returns nothing
local integer h=GetT()
local integer g=LInt(h,"SumGold")
local integer g2=LInt(h,"StaticGold")
local integer id=LInt(h,"id")
local player p=Player(id)
local integer x=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)
local integer y
if time>LReal(GetHandleId(p),"BuyBackGoldLimitTime")then
set p=null
call SBool(GetHandleId(p),"GoldLimit",false)
call TriggerOff()
return
endif
if GetTriggerEventId()==EVENT_PLAYER_UNIT_DEATH then
call TimerStart(LTimer(h,"tm"),0,false,null)
else
if x<=g then
set y=x
elseif x-g<2 then
set y=g
elseif GetTriggerEventId()!=EVENT_GAME_VARIABLE_LIMIT then
if g2==WQ4[id]then
set y=g
else
set y=(g-g2)+WQ4[id]
endif
else
set y=x
endif
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,y)
call SInt(h,"SumGold",y)
call SInt(h,"StaticGold",WQ4[id])
endif
set p=null
endfunction
function BuyBackGoldLimitReg takes player p returns nothing
local trigger t=CreateTrigger()
local timer tm=CreateTimer()
local integer h=GetHandleId(t)
local integer id=GetPlayerId(p)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerRegisterTimerExpireEvent(t,tm)
call TriggerRegisterTimer(t)
call TriggerAddCondition(t,Condition(function BuyBackGoldLimit))
call SInt(h,"id",id)
call SInt(h,"SumGold",GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD))
call SInt(h,"StaticGold",WQ4[id])
call STimer(h,"tm",tm)
set t=null
set tm=null
endfunction
function X2G takes nothing returns nothing
if GetUnitTypeId(GetSoldUnit())=='h085' then
if Y7[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]!=null and O18(Y7[GetPlayerId(GetOwningPlayer(GetSoldUnit()))])==false then
call X3G(Y7[GetPlayerId(GetOwningPlayer(GetSoldUnit()))],true)
endif
call KillUnit(GetSoldUnit())
elseif GetUnitTypeId(GetSoldUnit())=='h0BV' then
if Y7[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]!=null then
call X5G(Y7[GetPlayerId(GetOwningPlayer(GetSoldUnit()))])
endif
call KillUnit(GetSoldUnit())
elseif GetUnitTypeId(GetSoldUnit())=='h0DE' then
if Y7[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]!=null then
call X3G(LUnit(GetHandleId(GetSellingUnit()),("DeliveryTarget"+I2S(LInt(GetHandleId(GetSellingUnit()),"DeliveryIndex")-1))),false)
endif
call KillUnit(GetSoldUnit())
elseif WO8(GetUnitTypeId(GetSoldUnit()))then
if Y7[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]!=null then
if O18(Y7[GetPlayerId(GetOwningPlayer(GetSoldUnit()))])and GetOwningPlayer(GetSoldUnit())==GetOwningPlayer(GetSellingUnit())and(LState(Y7[GetPlayerId(GetOwningPlayer(GetSoldUnit()))],"JustUseAegis")==false)and(IH4[GetPlayerId((GetOwningPlayer(GetSoldUnit())))]==false)then
call PC9(Y7[GetPlayerId(GetOwningPlayer(GetSoldUnit()))])
set HC7=true
call ReviveHero(Y7[GetPlayerId(GetOwningPlayer(GetSoldUnit()))],GetUnitX(GetSoldUnit()),GetUnitY(GetSoldUnit()),true)
if LBool(GetHandleId(GetOwningPlayer(GetSoldUnit())),"GoldLimit")==false then
call SBool(GetHandleId(GetOwningPlayer(GetSoldUnit())),"GoldLimit",true)
call BuyBackGoldLimitReg(GetOwningPlayer(GetSoldUnit()))
endif
set HC7=false
call SetUnitState(Y7[GetPlayerId(GetOwningPlayer(GetSoldUnit()))],UNIT_STATE_MANA,10000)
set WQ4[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]=IMaxBJ(0,WQ4[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]-FD[WQ8(GetHeroLevel(Y7[GetPlayerId(GetOwningPlayer(GetSellingUnit()))]))])
call WC8(GetOwningPlayer(GetSoldUnit()))
else
call SetPlayerState(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_GOLD)+FD[WQ8(GetHeroLevel(Y7[GetPlayerId(GetOwningPlayer(GetSellingUnit()))]))])
if(IH4[GetPlayerId((GetOwningPlayer(GetSoldUnit())))]==false)==false then
call ShowWarningToPlayer(GetOwningPlayer(GetSoldUnit()),GetObjectName('n0N4'))
endif
endif
endif
call KillUnit(GetSoldUnit())
endif
endfunction
function X_G takes player p4,unit S4,integer Y2F,integer Y_F,integer B8D,integer B9D,integer BDD,integer Z4F,integer Z7F returns nothing
local item Y98
call DisableTrigger(T34)
if Y_F>0 then
set Y98=UnitItemInSlot(S4,0)
call ZT7(Y98)
endif
if B8D>0 then
set Y98=UnitItemInSlot(S4,1)
call ZT7(Y98)
endif
if B9D>0 then
set Y98=UnitItemInSlot(S4,2)
call ZT7(Y98)
endif
if BDD>0 then
set Y98=UnitItemInSlot(S4,3)
call ZT7(Y98)
endif
if Z4F>0 then
set Y98=UnitItemInSlot(S4,4)
call ZT7(Y98)
endif
if Z7F>0 then
set Y98=UnitItemInSlot(S4,5)
call ZT7(Y98)
endif
set OO7=Y2F
set ON7=p4
set Y98=UnitAddItemById(S4,BU[Y2F])
call SetItemPlayer(Y98,p4,true)
call SetItemUserData(Y98,0)
if IsPlayerInForce(p4,RX4)and(S4==LUnit(GetHandleId(p4),"aiBearDummy"))then
set PD7=LUnit(GetHandleId(p4),"MyBear")
if PD7!=null and GetUnitState(PD7,UNIT_STATE_LIFE)>0 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",PD7,"origin"))
endif
else
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",S4,"origin"))
endif
if ZU7(Y98)==xuejingshi then
call SetItemCharges(Y98,8)
endif
call EnableTrigger(T34)
if IsPlayerAlly(GetLocalPlayer(),p4)then
if Y2F==meikensimu then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,W[GetPlayerId(p4)]+(KW4[GetPlayerId((p4))])+"|r |c00ffff00"+GetObjectName('n0LX')+"|r")
elseif Y2F==J0 then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,W[GetPlayerId(p4)]+(KW4[GetPlayerId((p4))])+"|r |c00ffff00"+GetObjectName('n0LY')+"|r")
endif
endif
set OI7[288+GetPlayerId(p4)]=Y98
set Y98=null
endfunction
function Y4G takes player p,unit S4,integer TK9 returns boolean
local integer i
local integer x
local integer y
local integer array ZDF
local boolean array ZEF
local integer array ZFF
local boolean array ZGF
local boolean array ZHF
local integer array ZIF
local player ZJF
local integer Y7G=1
local integer k
local player array ZKF
local integer m
local item ZMF
local item ZNF
local item ZOF
local item ZPF
local item ZQF
local item ZRF
local player ZSF
local player ZTF
local player ZUF
local player ZVF
local player ZWF
local player ZXF
local integer ZYF
local integer ZZF
local integer ZAF
local integer ZBF
local integer ZCF
local integer Z3F
local integer Z6F
local integer ZLF
local integer Z1F
local integer Z0F
local integer Z5F
local integer Z2F
local boolean Y8G=false
local boolean Z_F=true
set ZMF=UnitItemInSlot(S4,0)
set ZNF=UnitItemInSlot(S4,1)
set ZOF=UnitItemInSlot(S4,2)
set ZPF=UnitItemInSlot(S4,3)
set ZQF=UnitItemInSlot(S4,4)
set ZRF=UnitItemInSlot(S4,5)
set ZSF=GetItemPlayer(ZMF)
set ZTF=GetItemPlayer(ZNF)
set ZUF=GetItemPlayer(ZOF)
set ZVF=GetItemPlayer(ZPF)
set ZWF=GetItemPlayer(ZQF)
set ZXF=GetItemPlayer(ZRF)
set ZYF=GetItemUserData(ZMF)
set ZZF=GetItemUserData(ZNF)
set ZAF=GetItemUserData(ZOF)
set ZBF=GetItemUserData(ZPF)
set ZCF=GetItemUserData(ZQF)
set Z3F=GetItemUserData(ZRF)
set Z6F=ZU7(ZMF)
set ZLF=ZU7(ZNF)
set Z1F=ZU7(ZOF)
set Z0F=ZU7(ZPF)
set Z5F=ZU7(ZQF)
set Z2F=ZU7(ZRF)
if(GetPlayerSlotState((p))==PLAYER_SLOT_STATE_LEFT)then
set Y7G=5
set Y8G=true
endif
set ZKF[1]=p
if Y8G then
set k=2
set m=1
loop
exitwhen k>Y7G
if IsJWPlayer(p)then
if p!=G8[m]then
set ZKF[k]=G8[m]
set k=k+1
endif
else
if p!=N8[m]then
set ZKF[k]=N8[m]
set k=k+1
endif
endif
set m=m+1
endloop
endif
set k=1
loop
exitwhen k>Y7G
set ZJF=ZKF[k]
set i=0
if ZMF!=null and ZYF==1 and(ZSF==ZJF or PI4 or(GetPlayerSlotState((ZSF))==PLAYER_SLOT_STATE_LEFT))then
set ZDF[i+1]=Z6F
else
set ZDF[i+1]=0
endif
set i=1
if ZNF!=null and ZZF==1 and(ZTF==ZJF or PI4 or(GetPlayerSlotState((ZTF))==PLAYER_SLOT_STATE_LEFT))then
set ZDF[i+1]=ZLF
else
set ZDF[i+1]=0
endif
set i=2
if ZOF!=null and ZAF==1 and(ZUF==ZJF or PI4 or(GetPlayerSlotState((ZUF))==PLAYER_SLOT_STATE_LEFT))then
set ZDF[i+1]=Z1F
else
set ZDF[i+1]=0
endif
set i=3
if ZPF!=null and ZBF==1 and(ZVF==ZJF or PI4 or(GetPlayerSlotState((ZVF))==PLAYER_SLOT_STATE_LEFT))then
set ZDF[i+1]=Z0F
else
set ZDF[i+1]=0
endif
set i=4
if ZQF!=null and ZCF==1 and(ZWF==ZJF or PI4 or(GetPlayerSlotState((ZWF))==PLAYER_SLOT_STATE_LEFT))then
set ZDF[i+1]=Z5F
else
set ZDF[i+1]=0
endif
set i=5
if ZRF!=null and Z3F==1 and(ZXF==ZJF or PI4 or(GetPlayerSlotState((ZXF))==PLAYER_SLOT_STATE_LEFT))then
set ZDF[i+1]=Z2F
else
set ZDF[i+1]=0
endif
set ZDF[0]=TK9
set i=1
loop
exitwhen i>(E54)
set ZFF[0]=EC4[i]
set ZFF[1]=E34[i]
set ZFF[2]=E64[i]
set ZFF[3]=EL4[i]
set ZFF[4]=E14[i]
if Z_F then
set ZGF[0]=true
set ZGF[1]=true
set ZGF[2]=true
set ZGF[3]=true
set ZGF[4]=true
set ZGF[5]=true
set ZGF[6]=true
set ZEF[0]=true
set ZEF[1]=true
set ZEF[2]=true
set ZEF[3]=true
set ZEF[4]=true
set ZEF[5]=true
set ZEF[6]=true
set ZIF[0]=0
set ZIF[1]=0
set ZIF[2]=0
set ZIF[3]=0
set ZIF[4]=0
set ZIF[5]=0
set ZIF[6]=0
set Z_F=false
endif
set ZHF[0]=false
set ZHF[1]=false
set ZHF[2]=false
set ZHF[3]=false
set ZHF[4]=false
set x=0
loop
exitwhen x==5
if ZFF[x]==0 then
set ZHF[x]=true
else
set y=0
loop
exitwhen y==7
if ZDF[y]==ZFF[x]and ZEF[y]and ZGF[x]then
set ZEF[y]=false
set ZGF[x]=false
set ZHF[x]=true
set ZIF[y]=1
set y=7
set Z_F=true
else
set y=y+1
endif
endloop
endif
if ZHF[x]then
set x=x+1
else
set x=5
endif
endloop
if ZHF[0]and ZHF[1]and ZHF[2]and ZHF[3]and ZHF[4]then
call X_G(ZJF,S4,E04[i],ZIF[1],ZIF[2],ZIF[3],ZIF[4],ZIF[5],ZIF[6])
set i=E54+2
else
set i=i+1
endif
endloop
set EL=ZIF[0]==1
if i==(E54+2)then
set ZMF=null
set ZNF=null
set ZOF=null
set ZPF=null
set ZQF=null
set ZRF=null
return true
endif
set k=k+1
endloop
set ZMF=null
set ZNF=null
set ZOF=null
set ZPF=null
set ZQF=null
set ZRF=null
return false
endfunction
function Y9G takes player p4,unit S4,integer TK9 returns boolean
local boolean UY9
set EL=false
set UY9=Y4G(p4,S4,TK9)
return UY9
endfunction
function YDG takes nothing returns boolean
if IsUnitAlly(GetFilterUnit(),GetOwningPlayer(H04))and GetUnitAbilityLevel(GetFilterUnit(),'Aloc')==0 and UnitInventorySize(GetFilterUnit())>1 and GetUnitTypeId(GetFilterUnit())!='ncop' and GetPlayerAlliance(GetOwningPlayer(GetFilterUnit()),GetOwningPlayer(H04),ALLIANCE_SHARED_CONTROL)and GetOwningPlayer(H04)!=GetOwningPlayer(GetFilterUnit())and IsUnitIllusion(GetFilterUnit())==false and O18(GetFilterUnit())==false then
if IsCourier(GetFilterUnit())then
set HB4=HB4+1
set H54=GetFilterUnit()
endif
endif
return false
endfunction
function YEG takes nothing returns boolean
if IsUnitAlly(GetFilterUnit(),GetOwningPlayer(H04))and GetUnitAbilityLevel(GetFilterUnit(),'Aloc')==0 and UnitInventorySize(GetFilterUnit())>1 and GetUnitTypeId(GetFilterUnit())!='ncop' and IsUnitIllusion(GetFilterUnit())==false and O18(GetFilterUnit())==false then
if GetOwningPlayer(H04)==GetOwningPlayer(GetFilterUnit())then
if IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)then
if GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 then
set H54=GetFilterUnit()
endif
elseif IsUnitType(H54,UNIT_TYPE_HERO)==false then
set H54=GetFilterUnit()
endif
endif
endif
return false
endfunction
function YFG takes unit S4,integer YGG returns unit
local group g=OG8()
set H04=S4
set H54=null
call GroupEnumUnitsInRange(g,GetUnitX(eH),GetUnitY(eH),1300+YGG,Condition(function YEG))
if H54==null then
set HB4=0
call OF8(g)
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(eH),GetUnitY(eH),1100+YGG,Condition(function YDG))
if HB4>1 then
set H54=null
endif
endif
call OF8(g)
set g=null
return H54
endfunction
function YHG takes player p4,unit S4,unit YIG,integer TK9,real x,real y,integer Q_G,integer YJG returns nothing
local unit YKG
local item QBG=null
set eH=YIG
if GetUnitPointValue(S4)==200 then
set YKG=YFG(S4,0)
if YKG==null then
set YKG=YFG(S4,300)
endif
else
set YKG=S4
endif
set OO7=TK9
set ON7=p4
if YKG==null or Y9G(p4,YKG,TJ9(TK9))==false or EL==false then
if TU9(TJ9(TK9))then
if XYF(YKG)==0 or YKG==null then
call XIG(AU[TK9],x,y,p4,true,Q_G)
else
set QBG=UnitAddItemById(YKG,BU[TK9])
call SetItemCharges(QBG,Q_G)
call SetItemPlayer(QBG,p4,true)
call SetItemUserData(QBG,YJG)
endif
elseif TT9(TJ9(TK9))then
if YKG==null or(XYF(YKG)==0 and AV7(YKG,BU[TK9])==null)then
call XIG(AU[TK9],x,y,p4,true,TV9(TK9))
else
set QBG=CreateItem(AU[TK9],x,y)
call SetItemPlayer(QBG,p4,true)
call SetItemUserData(QBG,YJG)
call SetItemCharges(QBG,TV9(TK9))
call UnitAddItem(YKG,QBG)
endif
else
if XYF(YKG)==0 or YKG==null then
call XIG(AU[TK9],x,y,p4,false,0)
else
set QBG=UnitAddItemById(YKG,BU[TK9])
call SetItemPlayer(QBG,p4,true)
call SetItemUserData(QBG,0)
endif
endif
endif
if QBG!=null then
set OI7[288+GetPlayerId(p4)]=QBG
endif
set YKG=null
set QBG=null
endfunction
function YMG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit YNG=LUnit(EC8,"Tower")
if GetTriggerEventId()!=EVENT_UNIT_DEATH then
call UnitRemoveAbility(YNG,'A17R')
call UnitRemoveAbility(YNG,'A24F')
endif
call DestroyEffect(LEff(EC8,"FX"))
call LT7(EC8)
call EA8(t)
set t=null
set YNG=null
return false
endfunction
function YOG takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>.5 and IsUnitAlly(GetFilterUnit(),Sh)and GetOwningPlayer(GetFilterUnit())!=P8 and GetUnitTypeId(GetFilterUnit())!='ncop' and GetUnitTypeId(GetFilterUnit())!='n0FJ' and GetUnitTypeId(GetFilterUnit())!='n0FI' and GetUnitTypeId(GetFilterUnit())!='n0F6' and GetUnitTypeId(GetFilterUnit())!='n0FH'
endfunction
function YPG takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit S4=GetEnumUnit()
local string s
call UnitAddAbility(S4,'A17R')
call UnitAddAbility(S4,'A24F')
if IsJWPlayer(Sh)then
set s="effects\\GlyphSent.mdx"
else
set s="effects\\GlyphScourge.mdx"
endif
call SEff(EC8,"FX",AddSpecialEffectTarget(s,S4,"origin"))
call SUnit(EC8,"Tower",S4)
call TriggerRegisterUnitEvent(t,S4,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,JW7,false)
call TriggerAddCondition(t,Condition(function YMG))
set t=null
set S4=null
endfunction
function YQG takes unit YRG,player p returns nothing
local integer i
if IsJWPlayer(p)then
set i=1
if YRG!=KR4[i]then
call IssueImmediateOrderById(KR4[i],852244)
endif
set i=2
if YRG!=KR4[i]then
call IssueImmediateOrderById(KR4[i],852244)
endif
set i=3
if YRG!=KR4[i]then
call IssueImmediateOrderById(KR4[i],852244)
endif
set i=4
if YRG!=KR4[i]then
call IssueImmediateOrderById(KR4[i],852244)
endif
set i=5
if YRG!=KR4[i]then
call IssueImmediateOrderById(KR4[i],852244)
endif
else
set i=7
if YRG!=KR4[i]then
call IssueImmediateOrderById(KR4[i],852244)
endif
set i=8
if YRG!=KR4[i]then
call IssueImmediateOrderById(KR4[i],852244)
endif
set i=9
if YRG!=KR4[i]then
call IssueImmediateOrderById(KR4[i],852244)
endif
set i=10
if YRG!=KR4[i]then
call IssueImmediateOrderById(KR4[i],852244)
endif
set i=11
if YRG!=KR4[i]then
call IssueImmediateOrderById(KR4[i],852244)
endif
endif
endfunction
function YSG takes nothing returns nothing
local group g
local unit YRG=GetTriggerUnit()
local player p=GetOwningPlayer(YRG)
if(IsJWPlayer(p)and Th==false)or(IsJWPlayer(p)==false and Uh==false)then
set g=OG8()
set Sh=p
call GroupEnumUnitsInRange(g,0,0,12000,Condition(function YOG))
call ForGroup(g,function YPG)
call OF8(g)
if IsJWPlayer(p)then
set Th=true
call YQG(YRG,p)
set Th=false
call SReal(S44,"AI|Glyph|Sent",Bz+300.)
else
set Uh=true
call YQG(YRG,p)
set Uh=false
call SReal(S44,"AI|Glyph|Scrg",Bz+300.)
endif
endif
set g=null
set YRG=null
set p=null
endfunction
function YTG takes nothing returns nothing
if GetSpellAbilityId()=='A141' or GetSpellAbilityId()=='A1WI' then
call YSG()
endif
endfunction
function YUG takes player p,integer TK9 returns nothing
local integer i=GetPlayerId(p)
if TK9==WA then
set Zh[i]=Zh[i]+1
elseif TK9==ZA then
set Zh[i]=Zh[i]+1
elseif TK9==BA then
set Zh[i]=Zh[i]+3
elseif TK9==FB then
set Zh[i]=Zh[i]+2
set GU4[i]=GU4[i]+2
elseif TK9==GB then
set Zh[i]=Zh[i]+2
set GU4[i]=GU4[i]+2
elseif TK9==JB then
set Zh[i]=Zh[i]+1
elseif TK9==QB then
set Zh[i]=Zh[i]+1
elseif TK9==YB then
set Zh[i]=Zh[i]+2
elseif TK9==YA then
set Zh[i]=Zh[i]+2
elseif TK9==LB then
set Zh[i]=Zh[i]+2
endif
endfunction
function YVG takes unit YWG,unit YXG returns boolean
local integer TK9
if GetUnitTypeId(YXG)=='N0MM' then
return true
endif
if(YWG==JU4 or YWG==JT4)and IsUnitAlly(YXG,N8[0])then
return false
elseif(YWG==IR4 or YWG==IO4)and IsUnitAlly(YXG,G8[0])then
return false
endif
set TK9=NL8(YXG)
if TK9==FB or TK9==zhenshibaoshi or TK9==EC then
return true
endif
return false
endfunction
function YYG takes unit YIG,unit YZG returns real
if YIG==IO4 or YIG==IP4 or YIG==IQ4 or YIG==IR4 or YIG==IS4 or YIG==IT4 or YIG==IU4 or YIG==IV4 or YIG==IW4 or YIG==IX4 then
return KS4[GetPlayerId(GetOwningPlayer(YZG))]
elseif YIG==JT4 or YIG==zs or YIG==Zs or YIG==JU4 or YIG==eS or YIG==oS or YIG==rS or YIG==aS or YIG==nS or YIG==VS then
return KS4[GetPlayerId(GetOwningPlayer(YZG))]
elseif YIG==D_7 or YIG==E87 then
return-7133.
elseif YIG==E47 or YIG==E77 then
return 7207.
endif
return GetUnitX(YZG)
endfunction
function YAG takes unit YIG,unit YZG returns real
if YIG==IO4 or YIG==IP4 or YIG==IQ4 or YIG==IR4 or YIG==IS4 or YIG==IT4 or YIG==IU4 or YIG==IV4 or YIG==IW4 or YIG==IX4 then
return KT4[GetPlayerId(GetOwningPlayer(YZG))]
elseif YIG==JT4 or YIG==zs or YIG==Zs or YIG==JU4 or YIG==eS or YIG==oS or YIG==rS or YIG==aS or YIG==nS or YIG==VS then
return KT4[GetPlayerId(GetOwningPlayer(YZG))]
elseif YIG==D_7 or YIG==E87 then
return 4317.
elseif YIG==E47 or YIG==E77 then
return-4243.
endif
return GetUnitY(YZG)
endfunction
function YBG takes unit YIG,unit YZG returns real
if YIG==IO4 or YIG==IP4 or YIG==IQ4 or YIG==IR4 or YIG==IS4 or YIG==IT4 or YIG==IU4 or YIG==IV4 or YIG==IW4 or YIG==IX4 then
return GetRectCenterX(QD)
elseif YIG==JT4 or YIG==zs or YIG==Zs or YIG==JU4 or YIG==eS or YIG==oS or YIG==rS or YIG==aS or YIG==nS or YIG==VS then
return GetRectCenterX(PD)
endif
return GetUnitX(YZG)
endfunction
function YCG takes unit YIG,unit YZG returns real
if YIG==IO4 or YIG==IP4 or YIG==IQ4 or YIG==IR4 or YIG==IS4 or YIG==IT4 or YIG==IU4 or YIG==IV4 or YIG==IW4 or YIG==IX4 then
return GetRectCenterY(QD)
elseif YIG==JT4 or YIG==zs or YIG==Zs or YIG==JU4 or YIG==eS or YIG==oS or YIG==rS or YIG==aS or YIG==nS or YIG==VS then
return GetRectCenterY(PD)
endif
return GetUnitY(YZG)
endfunction
function Y3G takes nothing returns nothing
local unit u=GetSoldUnit()
local player p=GetOwningPlayer(u)
local integer TS9=NL8(u)
local real x
local real y
if YVG(GetSellingUnit(),u)then
call ShowWarningToPlayer(p,(GetObjectName(('n02G'))))
if IsUnitAlly(u,G8[0])then
set p=N8[0]
else
set p=G8[0]
endif
set x=YBG(GetSellingUnit(),u)
set y=YCG(GetSellingUnit(),u)
call XIG(AU[NL8(u)],x,y,p,true,TV9(NL8(u)))
else
call YUG(p,TJ9(TS9))
if BU[TS9]==0 then
call ShowWarningToPlayer(p,GetObjectName(YX4))
else
set x=YYG(GetSellingUnit(),u)
set y=YAG(GetSellingUnit(),u)
if TS9==YB then
call YHG(p,u,GetSellingUnit(),TJ9(TS9),x,y,2,0)
else
call YHG(p,u,GetSellingUnit(),TJ9(TS9),x,y,0,0)
endif
endif
endif
call UnitAddAbility(u,'Aloc')
call ShowUnit(u,true)
call UnitApplyTimedLife(u,'BTLF',2)
set u=null
set p=null
endfunction
function Y6G takes nothing returns boolean
if WR4==false then
if GetUnitPointValue(GetSoldUnit())>=200 and GetUnitPointValue(GetSoldUnit())<500 then
call Y3G()
if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(GetSoldUnit()))or(L8 and(GetLocalPlayer()==KU4 or GetLocalPlayer()==KV4))then
if GetUnitTypeId(GetSoldUnit())=='h02F' then
call PingMinimapEx(GetUnitX(GetSoldUnit()),GetUnitY(GetSoldUnit()),3,255,255,255,false)
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,20,W[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(KW4[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r |c00ffff00"+GetObjectName('n0HU')+"|r")
elseif GetUnitTypeId(GetSoldUnit())=='h03Q' then
call PingMinimapEx(GetUnitX(GetSoldUnit()),GetUnitY(GetSoldUnit()),3,255,255,255,false)
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,20,W[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(KW4[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r |c00ffff00"+GetObjectName('n0KG')+"|r")
elseif GetUnitTypeId(GetSoldUnit())=='h076' then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,W[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(KW4[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r |c00ffff00"+GetObjectName('n0KO')+"|r")
elseif GetUnitTypeId(GetSoldUnit())=='h02C' then
call PingMinimapEx(GetUnitX(GetSoldUnit()),GetUnitY(GetSoldUnit()),3,255,255,255,false)
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,W[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(KW4[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r |c00ffff00"+GetObjectName('n0KP')+"|r")
elseif GetUnitTypeId(GetSoldUnit())=='h02D' then
call PingMinimapEx(GetUnitX(GetSoldUnit()),GetUnitY(GetSoldUnit()),3,255,255,255,false)
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,W[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(KW4[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r |c00ffff00"+GetObjectName('n0KQ')+"|r")
elseif GetUnitTypeId(GetSoldUnit())=='h0BA' then
call PingMinimapEx(GetUnitX(GetSoldUnit()),GetUnitY(GetSoldUnit()),3,255,255,255,false)
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,W[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(KW4[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r |c00ffff00"+GetObjectName('n0KT')+"|r")
elseif GetUnitTypeId(GetSoldUnit())=='h01G' then
call PingMinimapEx(GetUnitX(GetSoldUnit()),GetUnitY(GetSoldUnit()),3,255,255,255,false)
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,W[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(KW4[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r |c00ffff00"+GetObjectName('n0LB')+"|r")
elseif GetUnitTypeId(GetSoldUnit())=='h0D3' then
call PingMinimapEx(GetUnitX(GetSoldUnit()),GetUnitY(GetSoldUnit()),3,255,255,255,false)
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,W[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(KW4[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r |c00ffff00"+GetObjectName('n0LP')+"|r")
endif
endif
else
call X2G()
endif
endif
return false
endfunction
function YLG takes nothing returns boolean
if GetSpellAbilityId()=='A1RI' or GetSpellAbilityId()=='A0BE' then
if O18(GetTriggerUnit())==false then
call XXF(GetTriggerUnit())
endif
endif
return false
endfunction
function RestrictedItems_UpdateMeleeRange_All2 takes nothing returns nothing
call XXF(H04)
endfunction
function Y1G takes unit AM7,item Y98 returns boolean
local unit u=AM7
local integer z8=GetUnitTypeId(u)
local integer TS9=ZU7(Y98)
local real x
local real y
local boolean Y0G=true
set x=GetUnitX(u)
set y=GetUnitY(u)
set ON7=GetItemPlayer(Y98)
if TS9==UY then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl",u,"overhead"))
call PM8(GetOwningPlayer(u),"Abilities\\Spells\\Human\\Heal\\HealTarget.wav")
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[ZY])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
if TS9==sanshizhiren and GetItemCharges(Y98)==0 then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[sanshizhiren3])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
if TS9==zhangu and GetItemCharges(Y98)==0 then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[zhangu2])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
call DisableTrigger(GW4)
if(TS9==donglixie2 or TS9==donglixie1 or TS9==donglixie3)and(AU7(u,BU[donglixie2],Y98)!=null or AU7(u,BU[donglixie1],Y98)!=null or AU7(u,BU[donglixie3],Y98)!=null)then
call ShowWarningToPlayer(GetOwningPlayer(u),(GetObjectName(('n02L'))))
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=CreateItem(AU[TS9],x,y)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
if(TS9==yazhizhiren)and(AU7(u,BU[yazhizhiren],Y98)!=null or AU7(u,BU[yazhizhiren2],Y98)!=null)then
call ShowWarningToPlayer(GetOwningPlayer(u),(GetObjectName(('n0HL'))))
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=CreateItem(AU[TS9],x,y)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
set Y0G=false
endif
if Y0G and(TS9==yazhizhiren2)and(AU7(u,BU[yazhizhiren],Y98)!=null or AU7(u,BU[yazhizhiren2],Y98)!=null)then
call ShowWarningToPlayer(GetOwningPlayer(u),(GetObjectName(('n0HL'))))
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=CreateItem(AU[TS9],x,y)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
set Y0G=false
endif
if(TS9==bizhang2 or TS9==bizhang or TS9==bizhang4 or TS9==bizhang3)and(AU7(u,BU[bizhang2],Y98)!=null or AU7(u,BU[bizhang],Y98)!=null or AU7(u,BU[bizhang4],Y98)!=null or AU7(u,BU[bizhang3],Y98)!=null)then
call ShowWarningToPlayer(GetOwningPlayer(u),(GetObjectName(('n02C'))))
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=CreateItem(AU[TS9],x,y)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
if(TS9==J0 and IsPlayerEnemy(GetItemPlayer(Y98),GetOwningPlayer(u)))then
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=UnitAddItemById(u,BU[N0])
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
if(TS9==F1)and(IsBird(u)or UX8(u))then
if IsBird(u)then
call ShowWarningToPlayer(GetOwningPlayer(u),(GetObjectName(('n02K'))))
endif
set I44=GetItemPlayer(Y98)
set HB4=GetItemCharges(Y98)
call RemoveItem(Y98)
if TS9==F1 then
set HK4=CreateItem(AU[TS9],GetRectCenterX(AD),GetRectCenterY(AD))
endif
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
if TS9==F1 then
call SetItemCharges(HK4,HB4)
endif
endif
if false and TS9==keledebishou and(z8=='Hvwd' or z8=='U00F')then
call ShowWarningToPlayer(GetOwningPlayer(u),(GetObjectName(('n02J'))))
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=CreateItem(AU[TS9],x,y)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
if Y0G and(TS9==yazhizhiren or TS9==yazhizhiren2)and(z8=='H06S')then
call ShowWarningToPlayer(GetOwningPlayer(u),(GetObjectName(('n02J'))))
set I44=GetItemPlayer(Y98)
call RemoveItem(Y98)
set HK4=CreateItem(AU[TS9],x,y)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
set Y0G=false
endif
if(TS9==heihuangzhang or TS9==WL or TS9==ZL or TS9==AL or TS9==LL or TS9==D1 or TS9==E1)and z8=='U00C' then
call DisplayTimedTextToPlayer(GetOwningPlayer(u),0,V9,10,"|c00ff0303"+(GetObjectName(('n02P')))+"|r")
endif
call EnableTrigger(GW4)
if Y0G then
call XVF(AM7,Y98)
endif
set u=null
set Y98=null
return false
endfunction
function Y5G takes integer TS9 returns boolean
return TS9==zhipeitoukui2 or TS9==bizhang3 or TS9==bizhang4 or TS9==xiwadshouhu2 or TS9==zhipeitoukui or TS9==bizhang or TS9==bizhang2 or TS9==xiwadeshouhu or TS9==zhenshibaoshi or TS9==OW or TS9==maidasizhishou or TS9==maidasizhishou2
endfunction
function Y2G takes integer TS9 returns boolean
return TS9==zhenshibaoshi or TS9==OW
endfunction
function Y_G takes unit N28,item JB9 returns boolean
local item ZV7=JB9
local integer TS9=ZX7(ZV7)
local integer Z4G=0
local boolean UY9=false
local integer Z7G=ZY7(ZV7)
local boolean Z8G=false
if IsUnitType(N28,UNIT_TYPE_HERO)then
if TS9==zhipeitoukui2 then
set Z4G=zhipeitoukui
endif
if TS9==maidasizhishou2 then
set Z4G=maidasizhishou
endif
if TS9==bizhang3 then
set Z4G=bizhang
endif
if TS9==bizhang4 then
set Z4G=bizhang2
endif
if TS9==xiwadshouhu2 then
set Z4G=xiwadeshouhu
endif
if TS9==OW then
set Z4G=zhenshibaoshi
endif
if Z7G==OW then
set Z4G=zhenshibaoshi
set Z8G=true
endif
if Z4G!=0 then
set I44=GetItemPlayer(ZV7)
call ZT7(ZV7)
if Z8G then
set HK4=UnitAddItemById(N28,LU[Z4G])
else
set HK4=UnitAddItemById(N28,BU[Z4G])
endif
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
set UY9=true
endif
else
if TS9==zhipeitoukui then
set Z4G=zhipeitoukui2
endif
if TS9==maidasizhishou then
set Z4G=maidasizhishou2
endif
if TS9==bizhang then
set Z4G=bizhang3
endif
if TS9==bizhang2 then
set Z4G=bizhang4
endif
if TS9==xiwadeshouhu then
set Z4G=xiwadshouhu2
endif
if TS9==zhenshibaoshi then
set Z4G=OW
endif
if Z7G==zhenshibaoshi then
set Z4G=OW
set Z8G=true
endif
if Z4G!=0 then
set I44=GetItemPlayer(ZV7)
call ZT7(ZV7)
if Z8G then
set HK4=UnitAddItemById(N28,LU[Z4G])
else
set HK4=UnitAddItemById(N28,BU[Z4G])
endif
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
set UY9=true
endif
endif
set ZV7=null
return UY9
endfunction
function Z9G takes unit N28,item JB9 returns boolean
if Y5G(ZX7(JB9))or Y2G(ZY7(JB9))then
return Y_G(N28,JB9)
endif
return false
endfunction
function ZDG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit YKG=LUnit(EC8,"Unit")
local integer ZEG=LInt(EC8,"EventType")
local integer TK9=LInt(EC8,"indexId")
local boolean ZFG=LBool(EC8,"Temporary")
local item Y98
local player p=GetOwningPlayer(YKG)
local player ZGG
local integer Q_G
local boolean ZHG=false
local item QBG
local integer n5
local integer A7F
local integer newCharges
local item Z4
local integer targetCount
local item ZIG
local boolean ZJG=false
local integer QR8
call DisableTrigger(T34)
if ZFG then
set ZIG=null
set ZGG=ED8(EC8,"p")
set Q_G=LInt(EC8,"charges")
else
set Y98=EK8(EC8,"Item")
set ZIG=Y98
set ZGG=GetItemPlayer(Y98)
set Q_G=GetItemCharges(Y98)
endif
set OO7=TK9
set ON7=ZGG
set eY[512+GetPlayerId(ON7)]=1
if ZFG then
set OI7[288+GetPlayerId(ZGG)]=null
else
set OI7[288+GetPlayerId(ZGG)]=Y98
endif
if ZFG==false and Y98==null then
call FlushChildHashtable(R8,(EC8))
call EA8(t)
call EnableTrigger(T34)
set t=null
set YKG=null
set p=null
return false
endif
if ZEG==1 then
if p!=ZGG and GetUnitTypeId(YKG)=='ncop' then
if TT9(TJ9(TK9))or TU9(TJ9(TK9))then
set ZHG=true
endif
if IsPlayerEnemy(p,ZGG)then
call XIG(AU[TK9],KS4[GetPlayerId(p)],KT4[GetPlayerId(p)],ZGG,ZHG,Q_G)
else
call XIG(AU[TK9],KS4[GetPlayerId(ZGG)],KT4[GetPlayerId(ZGG)],ZGG,ZHG,Q_G)
endif
call ShowWarningToPlayer(p,(GetObjectName(('n0DR'))))
if ZFG==false then
set ZJG=true
call ZT7(Y98)
endif
elseif PI4==false and ZFG==false and GetItemType(Y98)==ITEM_TYPE_CAMPAIGN and XNG(Y98)!=0 and(p==ZGG or(GetPlayerSlotState((ZGG))==PLAYER_SLOT_STATE_LEFT))then
if TU9(TK9)then
set ZHG=true
else
set ZHG=false
endif
if(GetPlayerSlotState((ZGG))==PLAYER_SLOT_STATE_LEFT)and NB8(TK9)then
else
call ZT7(Y98)
set ZJG=true
set QBG=UnitAddItemById(YKG,BU[TK9])
set ZIG=QBG
call SetItemPlayer(QBG,ZGG,false)
call SetItemUserData(QBG,0)
if ZHG then
call SetItemCharges(QBG,Q_G)
endif
endif
elseif PI4==false and ZFG==false and GetItemType(Y98)==ITEM_TYPE_PERMANENT and p!=ZGG and LU[ZU7(Y98)]!=0 and(GetPlayerSlotState((ZGG))==PLAYER_SLOT_STATE_LEFT)==false then
if TU9(TK9)then
set ZHG=true
else
set ZHG=false
endif
call ZT7(Y98)
set ZJG=true
set QBG=UnitAddItemById(YKG,LU[TK9])
set ZIG=QBG
call SetItemPlayer(QBG,ZGG,false)
call SetItemUserData(QBG,0)
if ZHG then
call SetItemCharges(QBG,Q_G)
endif
elseif ZFG==false and GetItemType(Y98)==ITEM_TYPE_PERMANENT and TR9(Y98)and IsUnitType(YKG,UNIT_TYPE_HERO)then
set n5=BT9(YKG)
set A7F=BU9(YKG)
if A7F!=0 then
call UnitAddAbility(YKG,A7F)
call UnitMakeAbilityPermanent(YKG,true,A7F)
call SetPlayerAbilityAvailable(p,A7F,false)
if GetUnitTypeId(YKG)=='H00U' then
set H04=YKG
call ExecuteFunc("A8F")
elseif GetUnitTypeId(YKG)=='Hmkg' then
set H04=YKG
call ExecuteFunc("CHD")
endif
endif
set QR8=TO9(YKG,4)
if n5==UG7 and H44[QR8]!=0 then
call UnitRemoveAbility(YKG,HD4[QR8])
call UnitAddAbility(YKG,HE4[QR8])
call SetPlayerAbilityAvailable(p,HE4[QR8],false)
endif
if TK9!=n5 then
call ZT7(Y98)
set QBG=UnitAddItemById(YKG,BU[n5])
set ZIG=QBG
call SetItemPlayer(QBG,ZGG,false)
call SetItemUserData(QBG,1)
endif
elseif ZFG==false and GetItemType(Y98)==ITEM_TYPE_ARTIFACT then
call DisableTrigger(GW4)
set Z4=XJG(ZGG,YKG,TK9,Y98)
if Z4==null then
else
call SetItemCharges(Z4,Q_G+GetItemCharges(Z4))
call ZT7(Y98)
set ZIG=null
endif
call EnableTrigger(GW4)
elseif ZFG and TT9(TJ9(TK9))then
call DisableTrigger(GW4)
if XYF(YKG)==0 and XMG(ZGG,YKG,TK9)==null then
call ShowWarningToPlayer(p,(GetObjectName(('n02O'))))
call XIG(AU[(TK9)],((LReal(EC8,"x"))*1.),((LReal(EC8,"y"))*1.),(ZGG),(true),(Q_G))
else
set Z4=XMG(ZGG,YKG,TK9)
if Z4==null then
call DisableTrigger(GW4)
set QBG=UnitAddItemById(YKG,BU[TK9])
set ZIG=QBG
call SetItemPlayer(QBG,ZGG,false)
call SetItemUserData(QBG,1)
call SetItemCharges(QBG,Q_G)
else
call SetItemCharges(Z4,Q_G+GetItemCharges(Z4))
set OI7[288+GetPlayerId(ZGG)]=Z4
endif
endif
call EnableTrigger(GW4)
elseif ZFG then
call YHG(ZGG,YKG,null,TK9,LReal(EC8,"x"),LReal(EC8,"y"),Q_G,1)
elseif ZFG==false and(GetItemType(Y98)==ITEM_TYPE_PERMANENT or GetItemType(Y98)==ITEM_TYPE_CAMPAIGN)then
call SetItemUserData(Y98,1)
set ZJG=Y9G(ZGG,YKG,0)
endif
if ZJG==false and ZIG!=null and XOG(ZIG)==false then
set ZJG=Z9G(YKG,ZIG)
endif
if ZJG==false and ZIG!=null and XOG(ZIG)==false then
call Y1G(YKG,ZIG)
endif
else
if GetWidgetLife(Y98)>0 then
set n5=BT9(YKG)
set A7F=BU9(YKG)
if AV7(YKG,BU[n5])==null and GetUnitAbilityLevel(YKG,A7F)>0 then
call UnitRemoveAbility(YKG,A7F)
if GetUnitTypeId(YKG)=='Hmkg' then
set H04=YKG
call ExecuteFunc("CID")
endif
endif
set QR8=TO9(YKG,4)
if n5==UG7 and H44[QR8]!=0 then
call UnitRemoveAbility(YKG,HE4[QR8])
call UnitAddAbility(YKG,HD4[QR8])
call SetPlayerAbilityAvailable(p,HD4[QR8],false)
endif
if IsItemOwned(Y98)==false then
if GetItemType(Y98)==ITEM_TYPE_ARTIFACT or TU9(TK9)then
set ZHG=true
endif
call XIG(AU[TK9],GetItemX(Y98),GetItemY(Y98),ZGG,ZHG,Q_G)
call ZT7(Y98)
endif
endif
endif
call LT7(EC8)
call EA8(t)
call EnableTrigger(T34)
if ZIG!=null then
set OI7[288+GetPlayerId(ZGG)]=ZIG
endif
set t=null
set Y98=null
set YKG=null
set p=null
set ZGG=null
set QBG=null
set Z4=null
set ZIG=null
return false
endfunction
function ZKG takes nothing returns boolean
local item JB9
local integer ZEG
local unit YKG=GetTriggerUnit()
local trigger t
local integer EC8
local integer n5
local integer A7F
local integer id
set id=GetPlayerId(GetOwningPlayer(YKG))
if(IsUnitType(YKG,UNIT_TYPE_HERO)or UX8(YKG))and IsUnitIllusion(YKG)==false and GetUnitTypeId(YKG)!='N0MM' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM then
if GetItemTypeId(GetManipulatedItem())==BU[biaoqiang]then
set GY4=GY4+1
set SM4[id]=SM4[id]+1
elseif GetItemTypeId(GetManipulatedItem())==BU[keledebishou]then
set GZ4=GZ4+1
set SN4[id]=SN4[id]+1
elseif GetItemTypeId(GetManipulatedItem())==BU[xuejingshi]then
set GA4=GA4+1
set SO4[id]=SO4[id]+1
elseif GetItemTypeId(GetManipulatedItem())==BU[suiguchui]or GetItemTypeId(GetManipulatedItem())==BU[shenyuanzhiren]then
set GB4=GB4+1
set SP4[id]=SP4[id]+1
elseif GetItemTypeId(GetManipulatedItem())==BU[linkenfaqiu]then
set GX4=GX4+1
set SQ4[id]=SQ4[id]+1
call UnitAddItemById(YKG,'I0HM')
elseif GetItemTypeId(GetManipulatedItem())==BU[molongzhixin]then
set G34=G34+1
set SR4[id]=SR4[id]+1
elseif GetItemTypeId(GetManipulatedItem())==BU[sanyeduijian]then
set E97=E97+1
set SS4[id]=SS4[id]+1
elseif GetItemTypeId(GetManipulatedItem())==BU[sanhua]then
set ED7=ED7+1
set ST4[id]=ST4[id]+1
elseif GetItemTypeId(GetManipulatedItem())==BU[tiantangzhiji]then
set JI7=JI7+1
set JK7[id]=JK7[id]+1
elseif GetItemTypeId(GetManipulatedItem())==BU[jingmizhixie]then
set JJ7=JJ7+1
set JO7[id]=JO7[id]+1
endif
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_DROP_ITEM then
if GetItemTypeId(GetManipulatedItem())==BU[biaoqiang]then
set SM4[id]=SM4[id]-1
set GY4=GY4-1
elseif GetItemTypeId(GetManipulatedItem())==BU[keledebishou]and GetUnitTypeId(YKG)!='N0MM' then
set SN4[id]=SN4[id]-1
set GZ4=GZ4-1
elseif GetItemTypeId(GetManipulatedItem())==BU[jingmizhixie]then
set JO7[id]=JO7[id]-1
set JJ7=JJ7-1
elseif GetItemTypeId(GetManipulatedItem())==BU[xuejingshi]then
set SO4[id]=SO4[id]-1
set GA4=GA4-1
elseif GetItemTypeId(GetManipulatedItem())==BU[suiguchui]or GetItemTypeId(GetManipulatedItem())==BU[shenyuanzhiren]then
set GB4=GB4-1
set SP4[id]=SP4[id]-1
if SP4[id]<1 or AU7(YKG,BU[suiguchui],GetManipulatedItem())==null or AU7(YKG,BU[shenyuanzhiren],GetManipulatedItem())==null then
call UnitRemoveAbility(YKG,'A174')
endif
elseif GetItemTypeId(GetManipulatedItem())==BU[linkenfaqiu]then
set GX4=IMaxBJ(GX4-1,0)
set SQ4[id]=IMaxBJ(SQ4[id]-1,0)
call UnitRemoveAbility(YKG,'B0BI')
elseif GetItemTypeId(GetManipulatedItem())==BU[molongzhixin]and GetUnitTypeId(YKG)!='N0MM' then
set SR4[id]=SR4[id]-1
set G34=G34-1
endif
endif
endif
if RY4[id]and(not OM7[304+id])and(GetManipulatedItem()!=OI7[336+id])then
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_PAWN_ITEM then
set JB9=GetSoldItem()
call SetItemUserData(JB9,-2)
set n5=BT9(YKG)
set A7F=BU9(YKG)
if AU7(YKG,BU[n5],JB9)==null and GetUnitAbilityLevel(YKG,A7F)>0 then
call UnitRemoveAbility(YKG,A7F)
if GetUnitTypeId(YKG)=='Hmkg' then
set H04=YKG
call ExecuteFunc("CID")
endif
endif
elseif GetItemTypeId(GetManipulatedItem())!='I00E' and GetItemTypeId(GetManipulatedItem())!='I02M' then
set JB9=GetManipulatedItem()
if IsUnitIllusion(YKG)or GetItemUserData(JB9)==-2 then
set JB9=null
set YKG=null
set t=null
return false
endif
if GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM then
set ZEG=1
else
set ZEG=2
endif
if(ZEG==1 or(ZEG==2 and XOG(JB9)==false and GetWidgetLife(JB9)>0))and GetUnitTypeId(YKG)!='H00J' then
set OO7=ZU7(JB9)
if(GetItemPlayer(JB9)!=Player(15))then
set ON7=GetItemPlayer(JB9)
endif
set OI7[288+GetPlayerId(ON7)]=null
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function ZDG))
call SUnit(EC8,"Unit",YKG)
call SInt(EC8,"EventType",ZEG)
call SInt(EC8,"indexId",OO7)
if XOG(JB9)then
call SBool(EC8,"Temporary",true)
call DA8(EC8,"p",ON7)
call SInt(EC8,"charges",GetItemCharges(JB9))
call SReal(EC8,"x",(GetItemX(JB9))*1.)
call SReal(EC8,"y",(GetItemY(JB9))*1.)
else
call SBool(EC8,"Temporary",false)
call DB8(EC8,"Item",JB9)
call SetItemUserData(JB9,0)
endif
endif
endif
set OM7[304+id]=false
set JB9=null
set YKG=null
set t=null
return false
endfunction
function ZMG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
if GetUnitAbilityLevel(N28,'B01S')==0 then
call UnitRemoveAbility(N28,'B01S')
call UnitRemoveAbility(N28,'B04A')
call LT7(EC8)
call EA8(t)
elseif GetUnitState(N28,UNIT_STATE_LIFE)==GetUnitState(N28,UNIT_STATE_MAX_LIFE)and GetUnitState(N28,UNIT_STATE_MANA)==GetUnitState(N28,UNIT_STATE_MAX_MANA)then
call UnitRemoveAbility(N28,'B01S')
call UnitRemoveAbility(N28,'B04A')
call LT7(EC8)
call EA8(t)
endif
set t=null
set N28=null
return false
endfunction
function ZNG takes unit N28,item JB9 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function ZMG))
call SUnit(EC8,"Hero",N28)
set t=null
endfunction
function ZOG takes unit N28,item JB9 returns nothing
local unit u=N28
local real x=GetUnitX(u)
local real y=GetUnitY(u)
local unit AC7=CreateUnit(GetOwningPlayer(u),'e00E',x,y,0)
local unit ZPG=CreateUnit(GetOwningPlayer(u),'e00E',x,y,0)
if IsUnitType(u,UNIT_TYPE_MELEE_ATTACKER)then
call UnitAddAbility(AC7,'AZ3K')
call UnitAddAbility(ZPG,'AZ3K')
else
call UnitAddAbility(AC7,'A0GR')
call UnitAddAbility(ZPG,'A0GR')
endif
call IssueTargetOrderById(AC7,852274,u)
call IssueTargetOrderById(ZPG,852274,u)
set u=null
set AC7=null
set ZPG=null
endfunction
function ZQG takes unit N28,item JB9 returns nothing
if GetItemTypeId(JB9)=='I007' or GetItemTypeId(JB9)=='I006' or GetItemTypeId(JB9)=='I008' or GetItemTypeId(JB9)=='I00K' or GetItemTypeId(JB9)=='I00J' then
call A29(N28,GetItemTypeId(JB9),false)
endif
if GetItemTypeId(JB9)=='I007' then
call ZOG(N28,JB9)
elseif GetItemTypeId(JB9)=='I00J' then
if GetUnitAbilityLevel(N28,'B09Y')>0 then
call UnitRemoveAbility(N28,'B09Y')
call UnitRemoveAbility(N28,'B01Q')
call DisableTrigger(GetTriggeringTrigger())
call UnitAddItemById(N28,'I00J')
call EnableTrigger(GetTriggeringTrigger())
endif
elseif GetItemTypeId(JB9)=='I008' then
call ZNG(N28,JB9)
endif
endfunction
function ZRG takes unit AM7,item Y98 returns nothing
local integer OL8
local integer ML8
call UnitRemoveAbility(AM7,'A27S')
call UnitRemoveAbility(AM7,'A27Q')
call UnitRemoveAbility(AM7,'A27R')
call UnitRemoveAbility(AM7,'A27T')
if GetUnitAbilityLevel(AM7,'A28F')>0 then
call UnitRemoveAbility(AM7,'A28F')
call UnitAddAbility(AM7,'A28F')
endif
if GetUnitTypeId(AM7)=='Edem' then
set OL8='A0KY'
elseif GetUnitTypeId(AM7)=='U00F' then
set OL8='A06D'
elseif GetUnitTypeId(AM7)=='EC77' then
set OL8='A0MM'
elseif GetUnitTypeId(AM7)=='Ogrh' then
set OL8='A0YK'
elseif GetUnitTypeId(AM7)=='H00I' or GetUnitTypeId(AM7)=='H00J' then
set OL8='A2QA'
elseif GetUnitTypeId(AM7)=='UC60' then
set OL8='AZ1C'
else
set AM7=null
return
endif
set ML8=GetUnitAbilityLevel(AM7,OL8)
if ML8>0 then
call UnitRemoveAbility(AM7,OL8)
call UnitAddAbility(AM7,OL8)
call SetUnitAbilityLevel(AM7,OL8,ML8)
endif
endfunction
function ZSG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit u=LUnit(EC8,"Unit")
local integer ZTG=LInt(EC8,"itemslot")
local item JB9=UnitItemInSlot(u,ZTG)
if JB9!=null and NB8(ZU7(JB9))==false and GetWidgetLife(JB9)>0 and BV9(JB9)==false then
call SetItemDroppable(JB9,true)
endif
call LT7(EC8)
call EA8(t)
set t=null
set JB9=null
return false
endfunction
function ZUG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit u=LUnit(EC8,"Unit")
local integer ZTG=LInt(EC8,"itemslot")
local item JB9=UnitItemInSlot(u,ZTG)
call LT7(EC8)
call EA8(t)
if(u!=null and GetUnitTypeId(u)>1 and IsUnitType(u,UNIT_TYPE_DEAD)==false)and(JB9!=null and GetWidgetLife(JB9)>0)then
set t=CreateTrigger()
set EC8=GetHandleId(t)
call SetItemDroppable(JB9,false)
call SInt(EC8,"itemslot",ZTG)
call SUnit(EC8,"Unit",u)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerAddCondition(t,Condition(function ZSG))
endif
set JB9=null
set u=null
set t=null
return false
endfunction
function ZVG takes nothing returns nothing
local integer ZTG
local unit u=GetTriggerUnit()
local trigger t
local integer EC8
local item JB9
if GetIssuedOrderId()==852008 then
set ZTG=0
elseif GetIssuedOrderId()==852009 then
set ZTG=1
elseif GetIssuedOrderId()==852010 then
set ZTG=2
elseif GetIssuedOrderId()==852011 then
set ZTG=3
elseif GetIssuedOrderId()==852012 then
set ZTG=4
elseif GetIssuedOrderId()==852013 then
set ZTG=5
endif
set JB9=UnitItemInSlot(u,ZTG)
if JB9!=null and GetWidgetLife(JB9)>0 then
set t=CreateTrigger()
set EC8=GetHandleId(t)
call SInt(EC8,"itemslot",ZTG)
call SUnit(EC8,"Unit",u)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function ZUG))
endif
set JB9=null
set u=null
set t=null
endfunction
function ZWG takes nothing returns boolean
if GetIssuedOrderId()==852008 or GetIssuedOrderId()==852009 or GetIssuedOrderId()==852010 or GetIssuedOrderId()==852011 or GetIssuedOrderId()==852012 or GetIssuedOrderId()==852013 then
call ZVG()
endif
return false
endfunction
function ZXG takes integer TK9 returns boolean
return TK9!=J0 and TK9!=xuejingshi and TK9!=zhenshibaoshi and TK9!=F1
endfunction
function ZYG takes nothing returns nothing
if GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM then
call SetItemPawnable(GetManipulatedItem(),false)
else
call SetItemPawnable(GetManipulatedItem(),true)
endif
endfunction
function ZZG takes nothing returns boolean
if GetItemType(GetManipulatedItem())==ITEM_TYPE_PERMANENT and ZXG(ZX7(GetManipulatedItem()))and IsCourier(GetTriggerUnit())then
call ZYG()
endif
return false
endfunction
function ZAG takes nothing returns boolean
local unit N28=GetTriggerUnit()
local integer TA8=1
if AV7(N28,BU[jingmizhixie2])!=null then
set TA8=2
endif
if AU7(N28,BU[suduzhixue],GetManipulatedItem())!=null then
set TA8=3
endif
if AU7(N28,BU[xiangweixie],GetManipulatedItem())!=null then
set TA8=4
endif
if AU7(N28,BU[donglixie1],GetManipulatedItem())!=null or AU7(N28,BU[donglixie2],GetManipulatedItem())!=null or AU7(N28,BU[donglixie3],GetManipulatedItem())!=null then
set TA8=5
endif
if AU7(N28,BU[mifaxie],GetManipulatedItem())!=null then
set TA8=6
endif
if AU7(N28,BU[jingmizhixie],GetManipulatedItem())!=null then
set TA8=7
endif
if AU7(N28,BU[yuanxingxie],GetManipulatedItem())!=null then
set TA8=8
endif
if AU7(N28,BU[euldeshenshengfazhang],GetManipulatedItem())!=null then
call UnitAddAbility(N28,'A0V0')
call SetUnitAbilityLevel(N28,'A0V0',TA8)
call UnitMakeAbilityPermanent(N28,true,'A0V0')
else
call UnitRemoveAbility(N28,'A0V0')
endif
set N28=null
return false
endfunction
function ZBG takes nothing returns boolean
local unit N28=GetTriggerUnit()
local integer TA8=1
if AV7(N28,BU[jingmizhixie2])!=null then
set TA8=2
endif
if AU7(N28,BU[suduzhixue],GetManipulatedItem())!=null then
set TA8=3
endif
if AV7(N28,BU[xiangweixie])!=null then
set TA8=4
endif
if AV7(N28,BU[donglixie1])!=null or AU7(N28,BU[donglixie2],GetManipulatedItem())!=null or AU7(N28,BU[donglixie3],GetManipulatedItem())!=null then
set TA8=5
endif
if AV7(N28,BU[mifaxie])!=null then
set TA8=6
endif
if AU7(N28,BU[jingmizhixie],GetManipulatedItem())!=null then
set TA8=7
endif
if AV7(N28,BU[yuanxingxie])!=null then
set TA8=8
endif
if AV7(N28,BU[euldeshenshengfazhang])!=null then
call UnitAddAbility(N28,'A0V0')
call SetUnitAbilityLevel(N28,'A0V0',TA8)
call UnitMakeAbilityPermanent(N28,true,'A0V0')
endif
set N28=null
return false
endfunction
function ZCG takes nothing returns nothing
local unit AM7=GetTriggerUnit()
if GetTriggerEventId()==EVENT_PLAYER_UNIT_DROP_ITEM then
if ZX7(GetManipulatedItem())==bizhang2 or ZX7(GetManipulatedItem())==bizhang4 then
call UnitRemoveAbility(AM7,'A2QD')
endif
if ZX7(GetManipulatedItem())==sadanzhixieli then
call UnitRemoveAbility(AM7,'A1BW')
endif
if ZX7(GetManipulatedItem())==xuejingshi then
call UnitRemoveAbility(AM7,'A0G3')
call UnitRemoveAbility(AM7,'A09M')
call UnitRemoveAbility(AM7,'A0UX')
call UnitRemoveAbility(AM7,'A2KL')
endif
if ZX7(GetManipulatedItem())==bizhang or ZX7(GetManipulatedItem())==bizhang3 then
call UnitRemoveAbility(AM7,'A2QD')
call UnitRemoveAbility(AM7,'A0TC')
call UnitRemoveAbility(AM7,'A0UK')
endif
endif
if GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM then
if ZX7(GetManipulatedItem())==bizhang2 or ZX7(GetManipulatedItem())==bizhang4 then
call UnitAddAbility(AM7,'A2QD')
call UnitMakeAbilityPermanent(AM7,true,'A2QD')
endif
if ZX7(GetManipulatedItem())==sadanzhixieli then
call UnitAddAbility(AM7,'A1BW')
call UnitMakeAbilityPermanent(AM7,true,'A1BW')
endif
if ZX7(GetManipulatedItem())==xuejingshi then
call AddPermanentAbility(AM7,'A0G3')
call AddPermanentAbility(AM7,'A09M')
call AddPermanentAbility(AM7,'A0UX')
call AddPermanentAbility(AM7,'A2KL')
endif
if ZX7(GetManipulatedItem())==bizhang or ZX7(GetManipulatedItem())==bizhang3 then
call UnitAddAbility(AM7,'A2QD')
call UnitMakeAbilityPermanent(AM7,true,'A2QD')
call UnitAddAbility(AM7,'A0TC')
call UnitMakeAbilityPermanent(AM7,true,'A0TC')
call UnitAddAbility(AM7,'A0UK')
call UnitMakeAbilityPermanent(AM7,true,'A0UK')
endif
endif
set AM7=null
endfunction
function Z3G takes nothing returns boolean
if GetItemType(GetManipulatedItem())==ITEM_TYPE_PERMANENT and(ZX7(GetManipulatedItem())==bizhang or ZX7(GetManipulatedItem())==bizhang2 or ZX7(GetManipulatedItem())==bizhang3 or ZX7(GetManipulatedItem())==bizhang4 or ZX7(GetManipulatedItem())==sadanzhixieli or ZX7(GetManipulatedItem())==xuejingshi)then
call ZCG()
endif
return false
endfunction
function Z6G takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit N28=LUnit(W57,"Hero")
local item JB9=EK8(W57,"Item")
if GetTriggerEventId()==EVENT_UNIT_DROP_ITEM and GetManipulatedItem()==JB9 then
call LT7(W57)
call EA8(t)
elseif GetTriggerEventId()!=EVENT_UNIT_DROP_ITEM then
if((LoadInteger(R8,(GetHandleId((N28))),((4310))))==1)==false then
call SetUnitState(N28,UNIT_STATE_LIFE,P18(GetUnitState(N28,UNIT_STATE_LIFE)-GL4,1))
endif
endif
set t=null
set N28=null
set JB9=null
return false
endfunction
function ZLG takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_DROP_ITEM)
call TriggerAddCondition(t,Condition(function Z6G))
call SUnit(W57,"Hero",AM7)
call DB8(W57,"Item",GetManipulatedItem())
call TriggerEvaluate(t)
set t=null
set AM7=null
endfunction
function Z1G takes nothing returns boolean
if GetItemType(GetManipulatedItem())==ITEM_TYPE_PERMANENT and(ZX7(GetManipulatedItem())==bizhang or ZX7(GetManipulatedItem())==bizhang3)then
call ZLG()
endif
return false
endfunction
function Z0G takes unit u returns boolean
local item Z5G=CreateItem('I0KK',GetUnitX(u),GetUnitY(u))
local boolean V99=UnitAddItem(u,Z5G)
if V99==false then
call RemoveItem(Z5G)
endif
return V99
endfunction
function Z2G takes unit N28,item JB9,integer MWG returns item
local real x=V89(N28)
local real y=VD9(N28)
local integer i=0
local boolean array VG9
local item Z4
loop
exitwhen i>(UnitInventorySize(N28)-1)
if UnitItemInSlot(N28,i)==null and i!=MWG then
set Z4=CreateItem('I02M',x,y)
call UnitAddItem(N28,Z4)
set VG9[i]=true
else
set VG9[i]=false
endif
if i==MWG then
call UnitAddItem(N28,JB9)
endif
set i=i+1
endloop
set i=0
loop
exitwhen i>5
if VG9[i]then
call RemoveItem(UnitItemInSlot(N28,i))
endif
set i=i+1
endloop
set HK4=JB9
set Z4=null
return HK4
endfunction
function Z_G takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local integer i=0
local item A4G
local integer TK9
local unit AC7
local item A7G
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call SBool(GetHandleId(N28),"LinkenSphere|CD",false)
call LT7(EC8)
call EA8(t)
elseif Z0G(N28)==false then
call TriggerRegisterTimerEvent(t,5.5,false)
else
call SBool(GetHandleId(N28),"LinkenSphere|CD",false)
set ON7=GetOwningPlayer(N28)
call DisableTrigger(GW4)
if SQ4[GetPlayerId(GetOwningPlayer(N28))]>0 then
call SetItemVisible(UnitAddItemById(N28,'I0HM'),false)
endif
loop
exitwhen i>5
set A4G=UnitItemInSlot(N28,i)
set TK9=ZX7(A4G)
if TK9==linkenfaqiu2 then
set I44=GetItemPlayer(A4G)
call RemoveItem(A4G)
set AC7=CreateUnit(GetOwningPlayer(N28),'e00E',GetUnitX(N28),GetUnitY(N28),0)
call UnitAddAbility(AC7,'AInv')
set A7G=UnitAddItemById(AC7,BU[linkenfaqiu])
call UnitUseItem(AC7,A7G)
set HK4=Z2G(N28,A7G,i)
call SetItemPlayer(A7G,I44,false)
call SetItemUserData(A7G,1)
call UnitRemoveAbility(AC7,'AInv')
set AC7=null
set A7G=null
endif
set A4G=null
set i=i+1
endloop
call EnableTrigger(GW4)
call LT7(EC8)
call EA8(t)
endif
set t=null
set N28=null
return false
endfunction
function A8G takes unit AM7 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer i=0
local item A4G
local integer TS9
local unit AC7
local item A9G
call DisableTrigger(GW4)
call SBool(GetHandleId(AM7),"LinkenSphere|CD",true)
call TriggerRegisterTimerEvent(t,17,false)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function Z_G))
call SUnit(W57,"Hero",AM7)
loop
exitwhen i>5
set A4G=UnitItemInSlot(AM7,i)
set TS9=ZX7(A4G)
if TS9==linkenfaqiu or TS9==linkenfaqiu2 then
set I44=GetItemPlayer(A4G)
set ON7=I44
call RemoveItem(A4G)
set AC7=CreateUnit(GetOwningPlayer(AM7),'e00E',GetUnitX(AM7),GetUnitY(AM7),0)
call UnitAddAbility(AC7,'AInv')
set A9G=UnitAddItemById(AC7,BU[linkenfaqiu2])
call UnitUseItem(AC7,A9G)
set HK4=Z2G(AM7,A9G,i)
call SetItemPlayer(A9G,I44,false)
call SetItemUserData(A9G,1)
call UnitRemoveAbility(AC7,'AInv')
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\DispelMagic\\DispelMagicTarget.mdl",AM7,"origin"))
set AC7=null
set A9G=null
endif
set A4G=null
set i=i+1
endloop
call EnableTrigger(GW4)
set t=null
endfunction
function ADG takes nothing returns boolean
local integer i=1
local unit N28
local integer id
if U9 then
return false
endif
if GX4>0 then
loop
exitwhen i>5
set id=GetPlayerId(G8[i])
set N28=Y7[id]
if SQ4[id]>0 and N28!=null and GetUnitTypeId(N28)>1 and IsUnitType(N28,UNIT_TYPE_DEAD)==false and LBool(GetHandleId(N28),"LinkenSphere|CD")==false and HasLinkin(N28)==false and LBool(GetHandleId(N28),"MantaBlocked")==false then
call A8G(N28)
endif
set id=GetPlayerId(N8[i])
set N28=Y7[id]
if SQ4[id]>0 and N28!=null and GetUnitTypeId(N28)>1 and IsUnitType(N28,UNIT_TYPE_DEAD)==false and LBool(GetHandleId(N28),"LinkenSphere|CD")==false and HasLinkin(N28)==false and LBool(GetHandleId(N28),"MantaBlocked")==false then
call A8G(N28)
endif
set i=i+1
endloop
endif
set N28=null
return false
endfunction
function AEG takes unit hn,item x5 returns integer
local integer i=0
loop
exitwhen i>5
if UnitItemInSlot(hn,i)==x5 then
return i
endif
set i=i+1
endloop
return-1
endfunction
function AFG takes nothing returns nothing
local unit S4=GetTriggerUnit()
local item Z4=GetManipulatedItem()
local integer TK9=ZX7(Z4)
local integer MWG
call DisableTrigger(GW4)
if TK9==shengdianzhihuan then
set MWG=AEG(S4,Z4)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(Z4)
set HK4=VE9(S4,BU[shengdianzhihuan2],MWG)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TK9==shengdianzhihuan2 then
set MWG=AEG(S4,Z4)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(Z4)
set HK4=VE9(S4,BU[shengdianzhihuan],MWG)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
if TK9==tianyingzhijie then
set MWG=AEG(S4,Z4)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(Z4)
set HK4=VE9(S4,BU[tianyingzhijie2],MWG)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TK9==tianyingzhijie2 then
set MWG=AEG(S4,Z4)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(Z4)
set HK4=VE9(S4,BU[tianyingzhijie],MWG)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
if TK9==jingubang then
set MWG=AEG(S4,Z4)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(Z4)
set HK4=VE9(S4,BU[jingubang2],MWG)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TK9==jingubang2 then
set MWG=AEG(S4,Z4)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(Z4)
set HK4=VE9(S4,BU[jingubang],MWG)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
call EnableTrigger(GW4)
set S4=null
set Z4=null
endfunction
function AGG takes nothing returns nothing
local unit AHG=GetTriggerUnit()
local item AIG=GetManipulatedItem()
local integer AJG=ZX7(AIG)
local integer ZTG
call DisableTrigger(GW4)
if AJG==huiyao then
set ZTG=AEG(AHG,AIG)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(AIG)
set HK4=VE9(AHG,BU[huiyao2],ZTG)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif AJG==huiyao2 then
set ZTG=AEG(AHG,AIG)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(AIG)
set HK4=VE9(AHG,BU[huiyao],ZTG)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
call EnableTrigger(GW4)
set AHG=null
set AIG=null
endfunction
function AKG takes nothing returns nothing
local unit S4=GetTriggerUnit()
local item Z4=GetManipulatedItem()
local integer TK9=ZX7(Z4)
local integer MWG
call DisableTrigger(GW4)
if GetUnitTypeId(S4)!='H00J' then
if TK9==donglixie1 then
set MWG=AEG(S4,Z4)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(Z4)
call DisableTrigger(GW4)
set HK4=VE9(S4,BU[donglixie2],MWG)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TK9==donglixie2 then
set MWG=AEG(S4,Z4)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(Z4)
call DisableTrigger(GW4)
set HK4=VE9(S4,BU[donglixie3],MWG)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TK9==donglixie3 then
set MWG=AEG(S4,Z4)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(Z4)
call DisableTrigger(GW4)
set HK4=VE9(S4,BU[donglixie1],MWG)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
endif
call EnableTrigger(GW4)
set S4=null
set Z4=null
endfunction
function AMG takes integer n5 returns integer
if n5=='I006' then
return CY
elseif n5=='I008' then
return DZ
elseif n5=='I00J' then
return AY
elseif n5=='I00K' then
return BY
elseif n5=='I007' then
return EZ
endif
return-1
endfunction
function ANG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit u=LUnit(W57,"Unit")
local integer ZTG=LInt(W57,"itemslot")
local item Y98=UnitItemInSlot(u,ZTG)
local integer AOG=LInt(W57,"itemhandleid")
local item A9G
local integer VF9
if Y98!=null and NB8(ZU7(Y98))and GetHandleId(Y98)==AOG and O18(u)==false then
set A9G=CreateItem(LoadInteger(R8,GetHandleId(Y98),GetHandleId(u)),GetUnitX(u),GetUnitY(u))
call LT7(GetHandleId(Y98))
set VF9=AEG(u,Y98)
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=VE9(u,BU[ZY],VF9)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call LT7(W57)
call EA8(t)
call UnitAddItem(u,A9G)
call UnitRemoveAbility(u,'B0GI')
endif
set t=null
set u=null
set Y98=null
set A9G=null
return false
endfunction
function APG takes unit u,item A7G returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer ZTG=AEG(u,A7G)
call SInt(EC8,"itemslot",ZTG)
call SInt(EC8,"itemhandleid",GetHandleId(A7G))
call SUnit(EC8,"Unit",u)
call TriggerRegisterTimerEvent(t,120.,true)
call TriggerAddCondition(t,Condition(function ANG))
set t=null
endfunction
function AQG takes nothing returns nothing
local unit u=GetTriggerUnit()
local item Y98=GetManipulatedItem()
local integer TS9=ZU7(Y98)
local unit ARG
local integer ASG
local boolean TargetFrog
local integer VF9
local item A9G
local integer ATG
if TS9==VY then
set VF9=AEG(u,Y98)
set ARG=LUnit(GetHandleId(u),"BottleTargetUnit")
set ASG=LInt(GetHandleId(u),"BottleTargetItemId")
if GetUnitTypeId(ARG)=='nfoh' or GetUnitTypeId(ARG)=='ndfl' then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl",u,"overhead"))
call PM8(GetOwningPlayer(u),"Abilities\\Spells\\Human\\Heal\\HealTarget.wav")
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=VE9(u,BU[ZY],VF9)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call UnitRemoveAbility(u,'B0GI')
elseif ZV9(ASG)then
set ATG=AMG(ASG)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl",u,"overhead"))
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
call DisableTrigger(GW4)
if GetOwningPlayer(u)==I44 then
set HK4=VE9(u,BU[ATG],VF9)
else
set HK4=VE9(u,LU[ATG],VF9)
endif
call EnableTrigger(GW4)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
set A9G=UnitItemInSlot(u,VF9)
call SaveInteger(R8,GetHandleId(A9G),GetHandleId(u),ASG)
call APG(u,A9G)
call UnitRemoveAbility(u,'B0GI')
endif
elseif TS9==ZY then
set VF9=AEG(u,Y98)
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=VE9(u,BU[YY],VF9)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call UnitRemoveAbility(u,'B0GI')
elseif TS9==YY then
set VF9=AEG(u,Y98)
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=VE9(u,BU[XY],VF9)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call UnitRemoveAbility(u,'B0GI')
elseif TS9==XY then
set VF9=AEG(u,Y98)
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=VE9(u,BU[VY],VF9)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,0)
elseif NB8(TS9)then
if LoadInteger(R8,GetHandleId(Y98),GetHandleId(u))>0 then
set G64=true
set VF9=AEG(u,Y98)
set A9G=CreateItem(LoadInteger(R8,GetHandleId(Y98),GetHandleId(u)),GetUnitX(u),GetUnitY(u))
call LT7(GetHandleId(Y98))
set I44=GetItemPlayer(Y98)
call ZT7(Y98)
set HK4=VE9(u,BU[ZY],VF9)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call UnitAddItem(u,A9G)
set G64=false
call UnitRemoveAbility(u,'B0GI')
endif
endif
set u=null
set Y98=null
set ARG=null
set A9G=null
endfunction
function ArmletChange takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
local integer i=SAInt(h,"i",1)
local integer id='AZ1I'+(i-1)/ 4
local integer l=i-i/ 4*4
local real lostlife=GetUnitState(s,UNIT_STATE_MAX_LIFE)-GetUnitState(s,UNIT_STATE_LIFE)
if l==0 then
set l=4
endif
if l==1 and id>'AZ1I' then
call UnitRemoveAbility(s,id-1)
call AddPermanentAbility(s,id)
endif
call SetUnitAbilityLevel(s,id,l)
call SetWidgetLife(s,RMaxBJ(GetUnitState(s,UNIT_STATE_MAX_LIFE)-lostlife,1))
if i>=25 then
call RemoveSavedHandle(R8,GetHandleId(s),StringHash("ArmletTrig"))
call TriggerOff()
endif
set s=null
endfunction
function ArmletOfMordiganAddStr takes nothing returns nothing
local trigger t=CreateTrigger()
local unit s=GetTriggerUnit()
call TriggerRegisterTimerEvent(t,0.7/ 24,true)
call TriggerAddCondition(t,Condition(function ArmletChange))
call SUnit(GetHandleId(t),"s",s)
call SInt(GetHandleId(t),"i",1)
call STrig(GetHandleId(s),"ArmletTrig",t)
call AddPermanentAbility(s,'AZ1I')
set s=null
set t=null
endfunction
function ArmletOfMordiganMinusStr takes nothing returns nothing
local unit s=GetTriggerUnit()
local trigger t=LTrig(GetHandleId(s),"ArmletTrig")
local real lostlife=GetUnitState(s,UNIT_STATE_MAX_LIFE)-GetUnitState(s,UNIT_STATE_LIFE)
if t!=null then
call RemoveSavedHandle(R8,GetHandleId(s),StringHash("ArmletTrig"))
call FlushChildHashtable(R8,GetHandleId(t))
call DisableTrigger(t)
call DestroyTrigger(t)
endif
call UnitRemoveAbility(s,'AZ1I')
call UnitRemoveAbility(s,'AZ1J')
call UnitRemoveAbility(s,'AZ1K')
call UnitRemoveAbility(s,'AZ1L')
call UnitRemoveAbility(s,'AZ1M')
call UnitRemoveAbility(s,'AZ1N')
call UnitRemoveAbility(s,'AZ1O')
call SetWidgetLife(s,RMaxBJ(GetUnitState(s,UNIT_STATE_MAX_LIFE)-lostlife,1))
set s=null
set t=null
endfunction
function AUG takes nothing returns boolean
local integer MWG
local real VY8
call DisableTrigger(GW4)
if ZX7(GetManipulatedItem())==bizhang2 then
call ArmletOfMordiganAddStr()
set VY8=GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)-GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)
set MWG=AEG(GetTriggerUnit(),GetManipulatedItem())
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(GetManipulatedItem())
set HK4=VE9(GetTriggerUnit(),BU[bizhang],MWG)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,P18(GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)-VY8,1))
call AddTimedBoolBuff(GetTriggerUnit(),"ArmletOfMordiganState",.04)
call EW8(GetTriggerUnit(),"ArmletOfMordigan|Active")
endif
if ZX7(GetManipulatedItem())==bizhang then
call ArmletOfMordiganMinusStr()
set VY8=GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)-GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)
set MWG=AEG(GetTriggerUnit(),GetManipulatedItem())
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(GetManipulatedItem())
set HK4=VE9(GetTriggerUnit(),BU[bizhang2],MWG)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,P18(GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)-VY8,1))
call EY8(GetTriggerUnit(),"ArmletOfMordigan|Active")
endif
call EnableTrigger(GW4)
return false
endfunction
function AVG takes nothing returns nothing
if GetItemTypeId(GetManipulatedItem())==BU[jianrenqiu]then
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),(GetObjectName(('n0G1'))))
endif
endfunction
function AWG takes nothing returns nothing
local unit Y47=GetTriggerUnit()
local item ZV7=GetManipulatedItem()
local integer TS9=ZX7(ZV7)
local integer VF9
call DisableTrigger(GW4)
if TS9==heihuangzhang then
set VF9=AEG(Y47,ZV7)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(ZV7)
set HK4=VE9(Y47,BU[WL],VF9)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call BR9(HK4)
elseif TS9==WL then
set VF9=AEG(Y47,ZV7)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(ZV7)
set HK4=VE9(Y47,BU[ZL],VF9)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call BR9(HK4)
elseif TS9==ZL then
set VF9=AEG(Y47,ZV7)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(ZV7)
set HK4=VE9(Y47,BU[AL],VF9)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call BR9(HK4)
elseif TS9==AL then
set VF9=AEG(Y47,ZV7)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(ZV7)
set HK4=VE9(Y47,BU[LL],VF9)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call BR9(HK4)
elseif TS9==LL then
set VF9=AEG(Y47,ZV7)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(ZV7)
set HK4=VE9(Y47,BU[D1],VF9)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call BR9(HK4)
elseif TS9==D1 then
set VF9=AEG(Y47,ZV7)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(ZV7)
set HK4=VE9(Y47,BU[E1],VF9)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call BR9(HK4)
endif
call EnableTrigger(GW4)
set Y47=null
set ZV7=null
endfunction
function AXG takes nothing returns nothing
local unit S4=GetTriggerUnit()
local item Z4=GetManipulatedItem()
local integer TK9=ZX7(Z4)
local integer MWG
call DisableTrigger(GW4)
if TK9==sanshizhiren and GetItemCharges(Z4)==0 then
set MWG=AEG(S4,Z4)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(Z4)
set HK4=VE9(S4,BU[sanshizhiren3],MWG)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TK9==sanshizhiren2 and GetItemCharges(Z4)==0 then
set MWG=AEG(S4,Z4)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(Z4)
set HK4=VE9(S4,BU[sanshizhiren4],MWG)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
elseif TK9==zhangu and GetItemCharges(Z4)==0 then
set MWG=AEG(S4,Z4)
set I44=GetItemPlayer(GetManipulatedItem())
call RemoveItem(Z4)
set HK4=VE9(S4,BU[zhangu2],MWG)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
endif
call EnableTrigger(GW4)
set S4=null
set Z4=null
endfunction
function AYG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=LUnit(EC8,"Source")
if Z0G(p5)then
call UnitAddItemById(p5,'I0HM')
endif
call LT7(EC8)
call EA8(t)
call SBool(GetHandleId(p5),"MantaBlocked",false)
set t=null
set p5=null
return false
endfunction
function AZG takes nothing returns nothing
local unit p5=GetTriggerUnit()
local item Z4=GetManipulatedItem()
local integer TK9=ZX7(Z4)
local trigger t
if(TK9==huanyingfu or TK9==huanyingfu2)and LBool(GetHandleId(p5),"MantaBlocked")then
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.41,false)
call TriggerAddCondition(t,Condition(function AYG))
call SUnit(GetHandleId(t),"Source",p5)
set t=null
endif
set p5=null
set Z4=null
endfunction
function AAG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local integer C77=LInt(W57,"Count")
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='Aeat' then
call SInt(W57,"Count",16)
endif
elseif O18(Z77)or GetTriggerEventId()==EVENT_UNIT_DEATH or C77==0 then
call UnitRemoveAbility(Z77,'A0PV')
call UnitRemoveAbility(Z77,'B07L')
call EY8(Z77,"ActiveTango")
call LT7(W57)
call EA8(t)
else
call SetUnitState(Z77,UNIT_STATE_LIFE,GetUnitState(Z77,UNIT_STATE_LIFE)+'s'/ 16)
call SInt(W57,"Count",C77-1)
endif
return false
endfunction
function ABG takes nothing returns nothing
local unit p5=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call EW8(p5,"ActiveTango")
call AddPermanentAbility(p5,'A0PV')
call SUnit(EC8,"Source",p5)
call SInt(EC8,"Count",16)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,p5,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,p5,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function AAG))
call TriggerEvaluate(t)
set p5=null
set t=null
endfunction
function ACG takes nothing returns nothing
if(GetSpellAbilityId()=='Aeat' or GetSpellAbilityId()=='AZ2C')and LState(GetTriggerUnit(),"ActiveTango")==false and GetSpellTargetUnit()==null then
call ABG()
endif
endfunction
function A3G takes integer id,real x,real y returns nothing
if IsPointInRegion(UM4,x,y)==false then
set UK4=UK4+1
set UG4[UK4]=Player(id)
set UH4[UK4]=x
set UI4[UK4]=y
set UJ4[UK4]=(TimerGetElapsed(E4))
endif
endfunction
function A6G takes integer id,real x,real y returns integer
local real WR8=(TimerGetElapsed(E4))
local integer i=0
local integer P89=0
if IsPointInRegion(UM4,x,y)then
return P89
endif
loop
exitwhen i>UK4
if(WR8<UJ4[i]+e4)and(Z87(x,y,UH4[i],UI4[i])<o4*2+50)and IsPlayerAlly(Player(id),UG4[i])then
set P89=P89+1
endif
set i=i+1
endloop
return P89
endfunction
function ALG takes integer A1G returns integer
if A1G==GetPlayerId(G8[1])then
return'h0BI'
elseif A1G==GetPlayerId(G8[2])then
return'h0BK'
elseif A1G==GetPlayerId(G8[3])then
return'h0BG'
elseif A1G==GetPlayerId(G8[4])then
return'h0BF'
elseif A1G==GetPlayerId(G8[5])then
return'h0BL'
elseif A1G==GetPlayerId(N8[1])then
return'h0BH'
elseif A1G==GetPlayerId(N8[2])then
return'h0BJ'
elseif A1G==GetPlayerId(N8[3])then
return'h0BM'
elseif A1G==GetPlayerId(N8[4])then
return'h0A5'
elseif A1G==GetPlayerId(N8[5])then
return'h0BN'
endif
return'h0BN'
endfunction
function A0G takes integer A1G returns integer
return'h0AX'
endfunction
function A5G takes integer A1G returns string
if A1G==GetPlayerId(G8[1])then
return"war3mapImported\\TeleportTarget_Blue.mdx"
elseif A1G==GetPlayerId(G8[2])then
return"war3mapImported\\TeleportTarget_Teal.mdx"
elseif A1G==GetPlayerId(G8[3])then
return"war3mapImported\\TeleportTarget_Purple.mdx"
elseif A1G==GetPlayerId(G8[4])then
return"war3mapImported\\TeleportTarget_Yellow.mdx"
elseif A1G==GetPlayerId(G8[5])then
return"war3mapImported\\TeleportTarget_Orange.mdx"
elseif A1G==GetPlayerId(N8[1])then
return"war3mapImported\\TeleportTarget_Pink.mdx"
elseif A1G==GetPlayerId(N8[2])then
return"war3mapImported\\TeleportTarget_Gray.mdx"
elseif A1G==GetPlayerId(N8[3])then
return"war3mapImported\\TeleportTarget_LightBlue.mdx"
elseif A1G==GetPlayerId(N8[4])then
return"war3mapImported\\TeleportTarget_DarkGreen.mdx"
elseif A1G==GetPlayerId(N8[5])then
return"war3mapImported\\TeleportTarget_Brown.mdx"
endif
return"Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl"
endfunction
function A2G takes integer A1G returns string
return"Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl"
endfunction
function A_G takes nothing returns boolean
local real d
if IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0 and GetUnitAbilityLevel(GetFilterUnit(),'Asud')==0 and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(H54))and GetUnitTypeId(GetFilterUnit())!='u00S' and GetUnitTypeId(GetFilterUnit())!='ncop' and IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false then
set d=Z87(HL4,H14,GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()))
if d<H64 then
set H64=d
set H04=GetFilterUnit()
endif
endif
return false
endfunction
function B4G takes unit S4,real x,real y returns unit
local group g=OG8()
set H04=null
set H54=S4
set H64=99999
set HL4=x
set H14=y
call GroupEnumUnitsInRange(g,x,y,99999,Condition(function A_G))
call OF8(g)
set g=null
return H04
endfunction
function B7G takes unit u returns boolean
local integer id=GetUnitTypeId(u)
return id=='n0FH' or id=='n0F6' or id=='n0FI' or id=='n0FJ'
endfunction
function B8G takes unit u returns boolean
local integer id=GetUnitTypeId(u)
return id=='u00R' or id=='umtw' or id=='e026' or id=='ebal'
endfunction
function B9G takes nothing returns boolean
local real d
if(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 or B8G(GetFilterUnit())or GetUnitTypeId(GetFilterUnit())=='nfoh' or GetUnitTypeId(GetFilterUnit())=='ndfl' or B7G(GetFilterUnit()))and O18(GetFilterUnit())==false and GetUnitAbilityLevel(GetFilterUnit(),'Asud')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(H54))and GetOwningPlayer(GetFilterUnit())!=P8 and IsUnitIllusion(GetFilterUnit())==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_FLYING)==false and GetUnitTypeId(GetFilterUnit())!='n0F5' then
set d=Z87(HL4,H14,GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()))
if d<H64 then
set H64=d
set H04=GetFilterUnit()
endif
endif
return false
endfunction
function FlyShoeStructureCond takes nothing returns boolean
return IsUnitAlly(GetEnumUnit(),GetOwningPlayer(H54))and IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)and IsUnitType(GetEnumUnit(),UNIT_TYPE_DEAD)==false
endfunction
function BDG takes unit Y47,real x,real y returns unit
local group g=OG8()
set H04=null
set H54=Y47
set H64=99999
set HL4=x
set H14=y
call GroupEnumUnitsInRange(g,x,y,350,Condition(function FlyShoeStructureCond))
set H04=FirstOfGroup(g)
if H04!=null then
call OF8(g)
set g=null
return H04
endif
call GroupEnumUnitsInRange(g,x,y,99999,Condition(function B9G))
call OF8(g)
set g=null
return H04
endfunction
function BEG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=(LoadUnitHandle(R8,(EC8),(14)))
local real x=(LoadReal(R8,(EC8),(6)))
local real y=(LoadReal(R8,(EC8),(7)))
local unit BFG=(LoadUnitHandle(R8,(EC8),(448)))
local unit BGG=(LoadUnitHandle(R8,(EC8),(447)))
local ubersplat BHG=(LoadUbersplatHandle(R8,(EC8),(131)))
local integer P89=(LoadInteger(R8,(EC8),(34)))
local real TL8=(LoadReal(R8,(EC8),(57)))
local real WR8=LReal(EC8,"OriginalTime")
local integer id=GetPlayerId(GetOwningPlayer(N28))
local boolean BIG=false
local integer i=0
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST then
if GetSpellAbilityId()=='A1R5' or GetSpellAbilityId()=='A137'then
set BIG=true
endif
else
set P89=P89+1
call SaveInteger(R8,(EC8),(34),(P89))
if P89==1 then
if TL8>3 then
call SetUnitAnimationByIndex(BFG,1)
call SetUnitAnimationByIndex(BGG,1)
endif
elseif P89==2 then
set BIG=true
endif
endif
if BIG then
call SaveInteger(R8,(GetHandleId((N28))),((4256)),(2))
call KillUnit(BFG)
call KillUnit(BGG)
call DestroyUbersplat(BHG)
call FlushChildHashtable(R8,(EC8))
call EA8(t)
if P89==2 then
call DestroyEffect(AddSpecialEffect(A2G(id),GetUnitX(N28),GetUnitY(N28)))
call DestroyEffect(AddSpecialEffect(A5G(id),x,y))
call SetUnitX(N28,x)
call SetUnitY(N28,y)
call PauseUnit(N28,true)
call PauseUnit(N28,false)
call KillTrees(x,y,240)
set H04=N28
call ExecuteFunc("BJG")
endif
endif
set hq[832+GetPlayerId(GetOwningPlayer(N28))]=0
set t=null
set N28=null
set BFG=null
set BGG=null
set BHG=null
return false
endfunction
function BKG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7=(LoadUnitHandle(R8,(W57),(14)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local unit BMG=(LoadUnitHandle(R8,(W57),(448)))
local unit BNG=(LoadUnitHandle(R8,(W57),(447)))
local ubersplat GRD=(LoadUbersplatHandle(R8,(W57),(131)))
local integer C77=(LoadInteger(R8,(W57),(34)))
local real VL8=(LoadReal(R8,(W57),(57)))
local real PX9=(LoadReal(R8,(W57),(442)))
local integer id=GetPlayerId(GetOwningPlayer(AM7))
local boolean WA7=false
local integer i=0
local integer P29
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST then
if GetSpellAbilityId()=='A231' then
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(177))))
call SaveInteger(R8,(GetHandleId((AM7))),((4256)),(2))
call KillUnit(BMG)
call KillUnit(BNG)
call DestroyUbersplat(GRD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveType(X77,UNIT_TYPE_PEON)
set h8[176+id]=null
endif
elseif GetTriggerEventId()==EVENT_UNIT_DEATH then
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(177))))
call UnitRemoveType(X77,UNIT_TYPE_PEON)
call SaveInteger(R8,(GetHandleId((AM7))),((4256)),(2))
call KillUnit(BMG)
call KillUnit(BNG)
call DestroyUbersplat(GRD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set h8[176+id]=null
else
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(177))))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl",GetUnitX(AM7),GetUnitY(AM7)))
call SaveInteger(R8,(GetHandleId((AM7))),((4256)),(2))
call KillUnit(BMG)
call KillUnit(BNG)
call DestroyUbersplat(GRD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveType(X77,UNIT_TYPE_PEON)
call SetUnitX(AM7,GetUnitX(X77)-1)
call SetUnitY(AM7,GetUnitY(X77)-1)
call PauseUnit(AM7,true)
call PauseUnit(AM7,false)
call KillTrees(x,y,240)
set H04=AM7
call ExecuteFunc("BJG")
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl",GetUnitX(AM7),GetUnitY(AM7)))
set h8[176+id]=null
endif
set t=null
set AM7=null
set BMG=null
set BNG=null
set GRD=null
set X77=null
return false
endfunction
function BOG takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local location l
local real x
local real y
local real a
local trigger t
local integer EC8
local unit BFG
local unit BGG
local ubersplat BHG
local integer id=GetPlayerId(GetOwningPlayer(N28))
local integer P89
local real BPG
if(YY4 and GetSpellAbilityId()=='A137')then
set YY4=false
call SetUnitState(N28,UNIT_STATE_MANA,GetUnitState(N28,UNIT_STATE_MANA)+75)
return
endif
set t=CreateTrigger()
set EC8=GetHandleId(t)
call SaveInteger(R8,(GetHandleId((N28))),((4256)),(1))
if m5==null then
set l=GetSpellTargetLoc()
set x=GetLocationX(l)
set y=GetLocationY(l)
if GetSpellAbilityId()=='A1R5' then
if x==UL4[id]and y==U14[id]then
if IsJWPlayer(GetOwningPlayer(N28))then
set x=GetUnitX(IN4)
set y=GetUnitY(IN4)
else
set x=GetUnitX(JS4)
set y=GetUnitY(JS4)
endif
endif
endif
set m5=B4G(N28,x,y)
call RemoveLocation(l)
else
set x=GetUnitX(m5)
set y=GetUnitY(m5)
endif
if Z87(x,y,GetUnitX(m5),GetUnitY(m5))>o4 then
set a=Atan2(y-GetUnitY(m5),x-GetUnitX(m5))
set x=GetUnitX(m5)+o4*Cos(a)
set y=GetUnitY(m5)+o4*Sin(a)
elseif Z87(x,y,GetUnitX(m5),GetUnitY(m5))<50 then
set a=Atan2(y-GetUnitY(m5),x-GetUnitX(m5))
set x=GetUnitX(m5)+'x'*Cos(a)
set y=GetUnitY(m5)+'x'*Sin(a)
endif
if IsPointInRegion(IF4,x,y)then
set a=Atan2(y-GetUnitY(m5),x-GetUnitX(m5))
set x=GetUnitX(m5)+200*Cos(a)
set y=GetUnitY(m5)+200*Sin(a)
endif
set x=PQ8(x)
set y=PS8(y)
if(IsUnitAlly(N28,GetLocalPlayer())and GetLocalPlayer()!=GetOwningPlayer(N28))or(L8 and(GetLocalPlayer()==KU4 or GetLocalPlayer()==KV4))then
call PingMinimapEx(x,y,3,255,255,255,false)
endif
set BGG=CreateUnit(GetOwningPlayer(N28),ALG(id),x,y,0)
set BFG=CreateUnit(GetOwningPlayer(N28),A0G(id),GetUnitX(N28),GetUnitY(N28),0)
set BHG=CreateUbersplat(GetUnitX(N28),GetUnitY(N28),"SCTP",255,255,255,255,false,false)
if IsUnitVisibleEx(N28,GetLocalPlayer())then
call SetUbersplatRenderAlways(BHG,true)
else
call SetUbersplatRenderAlways(BHG,false)
endif
set P89=A6G(GetPlayerId(GetOwningPlayer(N28)),x,y)
if P89>0 then
set P89=P89+1
set BPG=4+P89*.5
else
set BPG=3
endif
call A3G(GetPlayerId(GetOwningPlayer(N28)),x,y)
if P89>0 then
call SetUnitAnimationByIndex(BFG,2)
call SetUnitAnimationByIndex(BGG,2)
endif
call TriggerRegisterTimerEvent(t,BPG-3,false)
call TriggerRegisterTimerEvent(t,BPG,false)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t,Condition(function BEG))
call S18(GetOwningPlayer(N28),BPG,x,y,200)
call SaveUnitHandle(R8,(EC8),(447),(BGG))
call SaveUnitHandle(R8,(EC8),(448),(BFG))
call SaveReal(R8,(EC8),(6),((x)*1.))
call SaveReal(R8,(EC8),(7),((y)*1.))
call SReal(EC8,"OriginalTime",TimerGetElapsed(E4))
call SaveReal(R8,(EC8),(57),((BPG)*1.))
call SaveUbersplatHandle(R8,(EC8),(131),(BHG))
call SaveUnitHandle(R8,(EC8),(14),(N28))
call SaveInteger(R8,(EC8),(34),(0))
call TS8(N28,WA4,x,y,2400)
set h8[176+id]=m5
set N28=null
set m5=null
set BFG=null
set BGG=null
set l=null
set t=null
set BHG=null
endfunction
function BQG takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local location l
local real x
local real y
local real a
local trigger t
local integer W57
local unit BMG
local unit BNG
local ubersplat GRD
local integer id=GetPlayerId(GetOwningPlayer(AM7))
local integer C77
local real BRG
set t=CreateTrigger()
set W57=GetHandleId(t)
if X77==null then
set l=GetSpellTargetLoc()
set x=GetLocationX(l)
set y=GetLocationY(l)
if x==UL4[id]and y==U14[id]then
if IsJWPlayer(GetOwningPlayer(AM7))then
set x=GetUnitX(IN4)
set y=GetUnitY(IN4)
else
set x=GetUnitX(JS4)
set y=GetUnitY(JS4)
endif
endif
set X77=BDG(AM7,x,y)
call RemoveLocation(l)
endif
set x=GetUnitX(X77)
set y=GetUnitY(X77)
if(IsUnitAlly(AM7,GetLocalPlayer())and GetLocalPlayer()!=GetOwningPlayer(AM7))or(L8 and(GetLocalPlayer()==KU4 or GetLocalPlayer()==KV4))then
call PingMinimapEx(x,y,3,255,255,255,false)
endif
set GRD=CreateUbersplat(GetUnitX(AM7),GetUnitY(AM7),"SCTP",255,255,255,255,false,false)
if IsUnitVisibleEx(AM7,GetLocalPlayer())then
call SetUbersplatRenderAlways(GRD,true)
else
call SetUbersplatRenderAlways(GRD,false)
endif
set BRG=3
call UnitAddType(X77,UNIT_TYPE_PEON)
call TriggerRegisterTimerEvent(t,BRG,false)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_SPELL_ENDCAST)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function BKG))
call S18(GetOwningPlayer(AM7),BRG,x,y,200)
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
call SaveReal(R8,(W57),(442),(((TimerGetElapsed(E4)))*1.))
call SaveReal(R8,(W57),(57),((BRG)*1.))
call SaveUbersplatHandle(R8,(W57),(131),(GRD))
call SaveUnitHandle(R8,(W57),(14),(AM7))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(34),(0))
call SaveEffectHandle(R8,(W57),(175),(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdl",AM7,"origin")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl",AM7,"origin")))
call SaveEffectHandle(R8,(W57),(177),(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdl",X77,"origin")))
call TS8(AM7,WA4,x,y,2400)
set AM7=null
set X77=null
set BMG=null
set BNG=null
set l=null
set t=null
set GRD=null
endfunction
function BSG takes nothing returns nothing
if(GetSpellAbilityId()=='A1R5' or GetSpellAbilityId()=='A137')and IsCourier(GetTriggerUnit())==false then
call BOG()
endif
if GetSpellAbilityId()=='A231' then
call BQG()
endif
endfunction
function NecroUnit takes unit u returns boolean
local integer i=GetUnitTypeId(u)
return i=='n00H' or i=='n00G' or i=='n00K' or i=='n00J' or i=='n00A' or i=='n006'
endfunction
function BTG takes nothing returns nothing
if GetSpellAbilityId()=='A137' and GetSpellTargetItem()!=null then
call IssueImmediateOrderById(GetTriggerUnit(),851972)
if IsJWPlayer(GetOwningPlayer(GetTriggerUnit()))then
call UnitUseItemTarget(GetTriggerUnit(),AV7(GetTriggerUnit(),QB),IN4)
set YY4=true
else
call UnitUseItemTarget(GetTriggerUnit(),AV7(GetTriggerUnit(),QB),JS4)
set YY4=true
endif
endif
if(GetSpellAbilityId()=='A28Y' or GetSpellAbilityId()=='ACch')and NecroUnit(GetSpellTargetUnit())then
call IssueImmediateOrderById(GetTriggerUnit(),851972)
endif
endfunction
function BUG takes nothing returns nothing
if JV7==(LoadInteger(R8,(GetHandleId(GetEnumUnit())),(784)))then
call KillUnit(GetEnumUnit())
endif
endfunction
function BVG takes nothing returns boolean
local integer i=GetUnitTypeId(GetFilterUnit())
return i=='n00H' or i=='n00G' or i=='n00K' or i=='n00J' or i=='n00A' or i=='n006'
endfunction
function DeathExpAddCond takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitType(GetFilterUnit(),UNIT_TYPE_DEAD)==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(globalS))
endfunction
function DeathExpAddFunc takes nothing returns nothing
call AddHeroXP(GetEnumUnit(),globalI,false)
endfunction
function DeathExpAdd takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
local integer i=LInt(h,"i")
local group g=null
if GetTriggerEventId()==EVENT_UNIT_DEATH and IsUnitEnemy(GetKillingUnit(),GetOwningPlayer(s))then
set g=CreateGroup()
set globalS=s
call GroupEnumUnitsInRange(g,GetUnitX(s),GetUnitY(s),1325,Condition(function DeathExpAddCond))
if CountUnitsInGroup(g)>0 then
set globalI=i/ CountUnitsInGroup(g)
call ForGroup(g,function DeathExpAddFunc)
endif
call DestroyGroup(g)
set g=null
elseif IsUnitType(s,UNIT_TYPE_DEAD)or s==null then
call TriggerOff()
endif
set s=null
endfunction
function DeathExpSet takes unit s,integer i returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function DeathExpAdd))
call SUnit(GetHandleId(t),"s",s)
call SInt(GetHandleId(t),"i",i)
set t=null
endfunction
function BWG takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit BXG
local unit BYG
local integer BZG
local integer BAG
local group g=OG8()
local real a=GetUnitFacing(Z77)*bj_DEGTORAD
local real x1=GetUnitX(Z77)+50*Cos(a)
local real y1=GetUnitY(Z77)+50*Sin(a)
local real x2=GetUnitX(Z77)+50*Cos(a)
local real y2=GetUnitY(Z77)+50*Sin(a)
local integer x=-59
if GetSpellAbilityId()=='A0HB' then
set BZG='n00H'
set BAG='n00J'
set x=x+100
elseif GetSpellAbilityId()=='A0D3' then
set BZG='n00G'
set BAG='n00A'
set x=x+150
elseif GetSpellAbilityId()=='A0DF' then
set BZG='n00K'
set BAG='n006'
set x=x+200
endif
set JV7=GetUnitTypeId(Z77)
call GroupEnumUnitsOfPlayer(g,GetOwningPlayer(GetTriggerUnit()),Condition(function BVG))
call ForGroup(g,function BUG)
call OF8(g)
set BXG=CreateUnit(GetOwningPlayer(Z77),BZG,x1,y1,GetUnitFacing(Z77))
call SaveInteger(R8,(GetHandleId(BXG)),(784),(JV7))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",BXG,"origin"))
call UnitApplyTimedLife(BXG,'BTLF',40)
set BYG=CreateUnit(GetOwningPlayer(Z77),BAG,x2,y2,GetUnitFacing(Z77))
call SaveInteger(R8,(GetHandleId(BYG)),(784),(JV7))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",BYG,"origin"))
call UnitApplyTimedLife(BYG,'BTLF',40)
call DeathExpSet(BXG,x)
call DeathExpSet(BYG,x)
set g=null
set BXG=null
set BYG=null
set Z77=null
endfunction
function BBG takes nothing returns nothing
if GetSpellAbilityId()=='A0HB' or GetSpellAbilityId()=='A0D3' or GetSpellAbilityId()=='A0DF' then
call BWG()
endif
endfunction
function BCG takes nothing returns nothing
if GetSpellAbilityId()=='A1FP' then
call QG8("Abilities\\Spells\\Items\\VampiricPotion\\VampPotionCaster.mdl",GetTriggerUnit(),"origin",3.5)
call TZ8(GetTriggerUnit(),'A1CN',1,3.5)
endif
endfunction
function B3G takes nothing returns boolean
return(LState(GetFilterUnit(),"4323"))
endfunction
function B6G takes nothing returns nothing
local group g
local unit u
if GetSpellAbilityId()=='ACch' then
set g=OG8()
call GroupEnumUnitsOfPlayer(g,GetOwningPlayer(GetTriggerUnit()),Condition(function B3G))
set u=FirstOfGroup(g)
call OF8(g)
if u!=null then
call KillUnit(u)
endif
call EW8(GetSpellTargetUnit(),"4323")
call UnitAddAbility(GetSpellTargetUnit(),'Aeth')
call UnitAddAbility(GetSpellTargetUnit(),'ACrk')
call P28(GetSpellTargetUnit())
set g=null
set u=null
endif
endfunction
function BLG takes integer i returns integer
if i==OH4 then
return OP4
endif
if i==OI4 then
return OQ4
endif
if i==OJ4 then
return OR4
endif
if i==OK4 then
return OS4
endif
if i==OM4 then
return OT4
endif
if i==ON4 then
return OU4
endif
if i==OO4 then
return OV4
endif
return 0
endfunction
function B1G takes integer i returns integer
if i==OH4 then
return 10
endif
if i==OI4 then
return 9
endif
if i==OJ4 then
return 8
endif
if i==OK4 then
return 7
endif
if i==OM4 then
return 6
endif
if i==ON4 then
return 5
endif
if i==OO4 then
return 4
endif
return 0
endfunction
function B0G takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
if O18(N28)==false and N28!=null then
call SetUnitScale(N28,PG8(N28)*ZS,PG8(N28)*ZS,PG8(N28)*ZS)
endif
call LT7(EC8)
call EA8(t)
set t=null
set N28=null
return false
endfunction
function B5G takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local unit AC7=CreateUnit(GetOwningPlayer(AM7),'e00E',GetUnitX(AM7),GetUnitY(AM7),0)
local trigger t=CreateTrigger()
local real VL8=B1G(GetSpellAbilityId())
call TD8(AM7,OW4,VL8)
call UnitMakeAbilityPermanent(AM7,true,OW4)
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),OW4,false)
call UnitAddAbility(AC7,BLG(GetSpellAbilityId()))
call IssueTargetOrderById(AC7,852186,AM7)
call T99(AM7,0,0)
if IsCourier(AM7)then
call T98(AM7,VL8,3)
else
call T98(AM7,VL8,1.4)
endif
call TriggerRegisterTimerEvent(t,VL8+7.,false)
call TriggerAddCondition(t,Condition(function B0G))
call SUnit(GetHandleId(t),"Hero",AM7)
set t=null
set AM7=null
set AC7=null
endfunction
function B2G takes nothing returns nothing
if BLG(GetSpellAbilityId())>0 then
call B5G()
endif
endfunction
function B_G takes nothing returns nothing
if GetSpellAbilityId()=='A02W' then
call UnitResetCooldown(GetTriggerUnit())
endif
endfunction
function C4G takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit ZC9=LUnit(EC8,"chicken")
local integer A99=LInt(EC8,"newability")
local integer AD9=LInt(EC8,"itemId0")
local integer AE9=LInt(EC8,"itemId1")
local integer AF9=LInt(EC8,"itemId2")
local integer AG9=LInt(EC8,"itemId3")
local integer AH9=LInt(EC8,"itemId4")
local integer AI9=LInt(EC8,"itemId5")
local player AJ9=ED8(EC8,"pPlayer0")
local player AK9=ED8(EC8,"pPlayer1")
local player AM9=ED8(EC8,"pPlayer2")
local player AN9=ED8(EC8,"pPlayer3")
local player AO9=ED8(EC8,"pPlayer4")
local player AP9=ED8(EC8,"pPlayer5")
local integer AQ9=LInt(EC8,"charges0")
local integer AR9=LInt(EC8,"charges1")
local integer AS9=LInt(EC8,"charges2")
local integer AT9=LInt(EC8,"charges3")
local integer AU9=LInt(EC8,"charges4")
local integer AV9=LInt(EC8,"charges5")
call DisableTrigger(GW4)
if GetTriggerEvalCount(t)==1 then
call UnitAddAbility(ZC9,A99)
if KT[GetPlayerId(GetOwningPlayer(ZC9))]==false then
call UnitRemoveType(ZC9,UNIT_TYPE_PEON)
else
call UnitAddType(ZC9,UNIT_TYPE_PEON)
endif
else
if AD9>0 then
set HK4=CreateItem(AD9,GetUnitX(ZC9),GetUnitY(ZC9))
call UnitAddItem(ZC9,HK4)
call SetItemPlayer(HK4,AJ9,false)
call SetItemUserData(HK4,1)
endif
if AQ9>0 then
call SetItemCharges(HK4,AQ9)
endif
if AE9>0 then
set HK4=CreateItem(AE9,GetUnitX(ZC9),GetUnitY(ZC9))
call UnitAddItem(ZC9,HK4)
call SetItemPlayer(HK4,AK9,false)
call SetItemUserData(HK4,1)
endif
if AR9>0 then
call SetItemCharges(HK4,AR9)
endif
if AF9>0 then
set HK4=CreateItem(AF9,GetUnitX(ZC9),GetUnitY(ZC9))
call UnitAddItem(ZC9,HK4)
call SetItemPlayer(HK4,AM9,false)
call SetItemUserData(HK4,1)
endif
if AS9>0 then
call SetItemCharges(HK4,AS9)
endif
if AG9>0 then
set HK4=CreateItem(AG9,GetUnitX(ZC9),GetUnitY(ZC9))
call UnitAddItem(ZC9,HK4)
call SetItemPlayer(HK4,AN9,false)
call SetItemUserData(HK4,1)
endif
if AT9>0 then
call SetItemCharges(HK4,AT9)
endif
if AH9>0 then
set HK4=CreateItem(AH9,GetUnitX(ZC9),GetUnitY(ZC9))
call UnitAddItem(ZC9,HK4)
call SetItemPlayer(HK4,AO9,false)
call SetItemUserData(HK4,1)
endif
if AU9>0 then
call SetItemCharges(HK4,AU9)
endif
if AI9>0 then
set HK4=CreateItem(AI9,GetUnitX(ZC9),GetUnitY(ZC9))
call UnitAddItem(ZC9,HK4)
call SetItemPlayer(HK4,AP9,false)
call SetItemUserData(HK4,1)
endif
if AV9>0 then
call SetItemCharges(HK4,AV9)
endif
if KT[GetPlayerId(GetOwningPlayer(ZC9))]==false then
call UnitRemoveType(ZC9,UNIT_TYPE_PEON)
else
call UnitAddType(ZC9,UNIT_TYPE_PEON)
endif
call SetUnitFlyHeight(ZC9,240,0)
call LT7(EC8)
call EA8(t)
endif
call EnableTrigger(GW4)
set t=null
set ZC9=null
set AJ9=null
set AK9=null
set AM9=null
set AN9=null
set AO9=null
set AP9=null
return false
endfunction
function C7G takes unit ZC9 returns nothing
local integer AX9=GetUnitTypeId(ZC9)
local real x=GetUnitX(ZC9)
local real y=GetUnitY(ZC9)
local item AY9
local item AZ9
local item AA9
local item AB9
local item AC9
local item A39
local player AJ9
local player AK9
local player AM9
local player AN9
local player AO9
local player AP9
local integer AD9
local integer AE9
local integer AF9
local integer AG9
local integer AH9
local integer AI9
local integer AQ9=-1
local integer AR9=-1
local integer AS9=-1
local integer AT9=-1
local integer AU9=-1
local integer AV9=-1
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer A99
local item JB9
local integer i
local item C8G
set i=0
loop
exitwhen i>5
set C8G=UnitItemInSlot(ZC9,i)
if ZU7(C8G)==zhenshibaoshi then
call UnitRemoveItem(ZC9,C8G)
endif
set i=i+1
endloop
set AY9=UnitItemInSlot(ZC9,0)
set AZ9=UnitItemInSlot(ZC9,1)
set AA9=UnitItemInSlot(ZC9,2)
set AB9=UnitItemInSlot(ZC9,3)
set AC9=UnitItemInSlot(ZC9,4)
set A39=UnitItemInSlot(ZC9,5)
set AD9=GetItemTypeId(AY9)
set AE9=GetItemTypeId(AZ9)
set AF9=GetItemTypeId(AA9)
set AG9=GetItemTypeId(AB9)
set AH9=GetItemTypeId(AC9)
set AI9=GetItemTypeId(A39)
set AJ9=GetItemPlayer(AY9)
set AK9=GetItemPlayer(AZ9)
set AM9=GetItemPlayer(AA9)
set AN9=GetItemPlayer(AB9)
set AO9=GetItemPlayer(AC9)
set AP9=GetItemPlayer(A39)
set JB9=AY9
if GetItemType(JB9)==ITEM_TYPE_ARTIFACT or TU9(ZU7(JB9))then
set AQ9=GetItemCharges(JB9)
endif
set JB9=AZ9
if GetItemType(JB9)==ITEM_TYPE_ARTIFACT or TU9(ZU7(JB9))then
set AR9=GetItemCharges(JB9)
endif
set JB9=AA9
if GetItemType(JB9)==ITEM_TYPE_ARTIFACT or TU9(ZU7(JB9))then
set AS9=GetItemCharges(JB9)
endif
set JB9=AB9
if GetItemType(JB9)==ITEM_TYPE_ARTIFACT or TU9(ZU7(JB9))then
set AT9=GetItemCharges(JB9)
endif
set JB9=AC9
if GetItemType(JB9)==ITEM_TYPE_ARTIFACT or TU9(ZU7(JB9))then
set AU9=GetItemCharges(JB9)
endif
set JB9=A39
if GetItemType(JB9)==ITEM_TYPE_ARTIFACT or TU9(ZU7(JB9))then
set AV9=GetItemCharges(JB9)
endif
call ZT7(AY9)
call ZT7(AZ9)
call ZT7(AA9)
call ZT7(AB9)
call ZT7(AC9)
call ZT7(A39)
if IsJWPlayer(GetOwningPlayer(ZC9))then
set A99='S00I'
else
set A99='S00J'
endif
if GetRandomInt(1,3)==1 then
set A99='S00Z'
endif
call DA8(EC8,"pPlayer0",AJ9)
call DA8(EC8,"pPlayer1",AK9)
call DA8(EC8,"pPlayer2",AM9)
call DA8(EC8,"pPlayer3",AN9)
call DA8(EC8,"pPlayer4",AO9)
call DA8(EC8,"pPlayer5",AP9)
call SInt(EC8,"itemId0",AD9)
call SInt(EC8,"itemId1",AE9)
call SInt(EC8,"itemId2",AF9)
call SInt(EC8,"itemId3",AG9)
call SInt(EC8,"itemId4",AH9)
call SInt(EC8,"itemId5",AI9)
call SInt(EC8,"charges0",AQ9)
call SInt(EC8,"charges1",AR9)
call SInt(EC8,"charges2",AS9)
call SInt(EC8,"charges3",AT9)
call SInt(EC8,"charges4",AU9)
call SInt(EC8,"charges5",AV9)
call SUnit(EC8,"chicken",ZC9)
call SInt(EC8,"newability",A99)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function C4G))
set t=null
set ZC9=null
set AY9=null
set AZ9=null
set AA9=null
set AB9=null
set AC9=null
set A39=null
set AJ9=null
set AK9=null
set AM9=null
set AN9=null
set AO9=null
set AP9=null
endfunction
function C9G takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LUnit(W57,"Source"))
local item CDG=AV7(Z77,BU[ED4])
if CDG==null then
set CDG=AV7(Z77,LU[ED4])
endif
if CDG!=null then
call RemoveItem(CDG)
call C7G(Z77)
else
call ShowWarningToPlayer(GetOwningPlayer(Z77),GetObjectName(YK4))
endif
call LT7(W57)
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function CEG takes unit Z77 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call ZX9(Z77)
call TriggerRegisterTimerEvent(t,.05,false)
call TriggerAddCondition(t,Condition(function C9G))
call SUnit(W57,"Source",Z77)
set t=null
endfunction
function CFG takes nothing returns boolean
if GetSpellAbilityId()=='A0GD' then
call CEG(GetTriggerUnit())
endif
return false
endfunction
function CGG takes nothing returns boolean
local unit AM7=GetTriggerUnit()
local item Y98=GetManipulatedItem()
local integer id=GetItemTypeId(Y98)
local integer i
if(id==BU[JB]or id==BU[yuanxingxie])and IsUnitType(AM7,UNIT_TYPE_HERO)then
set UL4[GetPlayerId(GetOwningPlayer(AM7))]=GetItemX(Y98)
set U14[GetPlayerId(GetOwningPlayer(AM7))]=GetItemY(Y98)
endif
call ZQG(AM7,Y98)
call ZRG(AM7,Y98)
if(GetItemTypeId(Y98)==BU[bizhang]or GetItemTypeId(Y98)==BU[bizhang2])and IsCourier(AM7)then
call UnitRemoveItem(AM7,Y98)
elseif GetItemTypeId(Y98)==BU[mozhang]and IsUnitType(AM7,UNIT_TYPE_HERO)then
set i=(LoadInteger(R8,(GetHandleId(AM7)),(750)))
if i>0 then
if(LoadBoolean(R8,(GetHandleId(AM7)),(751)))==false then
call SaveBoolean(R8,(GetHandleId(AM7)),(751),(true))
call SetItemCharges(Y98,i)
endif
endif
elseif GetItemTypeId(Y98)==BU[F1]and GetUnitTypeId(AM7)!='n00L' and NU4==false then
set NT4=AM7
set NU4=true
call X48("AegisOn",GetPlayerId(GetOwningPlayer(AM7)))
call NN8(bj_FORCE_ALL_PLAYERS,10.,W[GetPlayerId(GetOwningPlayer(AM7))]+GetUnitName(AM7)+"|r "+GetObjectName(XP4))
elseif GetItemTypeId(Y98)==BU[ED4]and IsChicken(AM7)then
call CEG(AM7)
elseif GetItemTypeId(Y98)==BU[GI4]and GetUnitTypeId(AM7)=='Emoo' then
call SetPlayerTechResearched(GetOwningPlayer(AM7),'R00J',1)
elseif GetItemTypeId(Y98)==BU[GM4]and GetUnitTypeId(AM7)=='H00I' then
set H04=AM7
call ExecuteFunc("TCE")
elseif GetItemTypeId(Y98)==BU[GG4]and GetUnitTypeId(AM7)=='Ucrl' then
call UnitAddAbility(AM7,'A2KB')
call UnitRemoveAbility(AM7,'A2KB')
call AddUnitAnimationProperties(AM7,"upgrade",true)
call SetPlayerTechResearched(GetOwningPlayer(AM7),'R00K',1)
endif
set AM7=null
set Y98=null
return false
endfunction
function CHG takes nothing returns nothing
local unit CIG=GetTriggerUnit()
local item CJG=AV7(CIG,BU[ED4])
if CJG==null then
set CJG=AV7(CIG,LU[ED4])
endif
if CJG!=null then
call ZT7(CJG)
call UnitRemoveAbility(CIG,'A0VR')
call UnitAddAbility(CIG,'A0VU')
call SetUnitState(CIG,UNIT_STATE_MANA,400)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",CIG,"origin"))
else
call ShowWarningToPlayer(GetOwningPlayer(CIG),(GetObjectName(('n02Q'))))
endif
set CIG=null
endfunction
function CKG takes nothing returns nothing
if GetSpellAbilityId()=='A0VR' then
call CHG()
endif
endfunction
function CMG takes nothing returns nothing
local unit u=GetEnumUnit()
local integer i=0
local player p=GetOwningPlayer(GetTriggerUnit())
local item JB9
local integer id=GetPlayerId(p)
loop
exitwhen i>5
set JB9=UnitItemInSlot(u,i)
if JB9!=null and GetItemPlayer(JB9)==p then
call UnitRemoveItem(u,JB9)
call SetItemPosition(JB9,KS4[id],KT4[id])
endif
set i=i+1
endloop
set u=null
set JB9=null
endfunction
function CNG takes nothing returns nothing
local item JB9=GetEnumItem()
local unit u=OF4
local player p=GetOwningPlayer(u)
local integer id=GetPlayerId(p)
if GetWidgetLife(JB9)>0 and GetItemPlayer(JB9)==p and IsItemVisible(JB9)then
call SetItemPosition(JB9,KS4[id],KT4[id])
call UnitAddItem(KR4[id],JB9)
endif
set JB9=null
set u=null
set p=null
endfunction
function COG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit u=LUnit(EC8,"u")
set OF4=u
if IsJWPlayer(GetOwningPlayer(OF4))then
call EnumItemsInRect(BD,Condition(function KF8),function CNG)
else
call EnumItemsInRect(LD,Condition(function KF8),function CNG)
endif
if GetTriggerEvalCount(t)==2 then
call LT7(EC8)
call EA8(t)
endif
set t=null
set u=null
return false
endfunction
function CPG takes nothing returns boolean
return IsCourier(GetFilterUnit())
endfunction
function CQG takes nothing returns nothing
local unit u=GetTriggerUnit()
local integer i=0
local group g=OG8()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),1300,Condition(function CPG))
call ForGroup(g,function CMG)
call OF8(g)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function COG))
call SUnit(EC8,"u",u)
set u=null
set g=null
endfunction
function CRG takes nothing returns nothing
if GetSpellAbilityId()=='A14D' then
call CQG()
endif
endfunction
function CSG takes nothing returns nothing
local unit u=GetTriggerUnit()
local integer i=0
local item JB9
local integer id=GetPlayerId(GetOwningPlayer(u))
local region r=CreateRegion()
if IsJWPlayer(GetOwningPlayer(u))then
call RegionAddRect(r,BD)
else
call RegionAddRect(r,LD)
endif
loop
exitwhen i>5
set JB9=UnitItemInSlot(u,i)
if NB8(ZU7(JB9))==false and ZU7(JB9)!=F1 and BV9(JB9)==false then
call UnitRemoveItemFromSlot(u,i)
if(GetUnitTypeId(u)=='ncop' or IsUnitInRegion(r,u))and IsPlayerAlly(GetItemPlayer(JB9),GetOwningPlayer(u))then
set id=GetPlayerId(GetItemPlayer(JB9))
call SetItemPosition(JB9,KS4[id],KT4[id])
endif
endif
set i=i+1
endloop
call RemoveRegion(r)
set u=null
set r=null
endfunction
function CTG takes nothing returns nothing
if GetSpellAbilityId()=='A138' or GetSpellAbilityId()=='A14C' then
call CSG()
endif
endfunction
function CUG takes nothing returns nothing
if GetSpellAbilityId()=='A12W' and GetUnitAbilityLevel(GetTriggerUnit(),'Bpsh')>0 then
call UnitRemoveAbility(GetTriggerUnit(),'Bpsh')
endif
endfunction
function CVG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
call DestroyEffect(LEff(EC8,"FX"))
call LT7(EC8)
call EA8(t)
else
if W18(GetEventDamage())and IsUnitAlly(GetEventDamageSource(),GetOwningPlayer(GetTriggerUnit()))==false and IsUnitType(GetEventDamageSource(),UNIT_TYPE_STRUCTURE)==false and p3==false then
if IsUnitType(GetEventDamageSource(),UNIT_TYPE_HERO)or GetUnitAbilityLevel(GetEventDamageSource(),'A04R')==0 then
call DisableTrigger(t)
set p3=true
call Dmg(GetTriggerUnit(),GetEventDamageSource(),HeroMagic,GetEventDamage())
set p3=false
call EnableTrigger(t)
else
call DisableTrigger(t)
set p3=true
call Dmg(GetTriggerUnit(),Y7[GetPlayerId(GetOwningPlayer(GetEventDamageSource()))],HeroMagic,GetEventDamage())
set p3=false
call EnableTrigger(t)
endif
endif
endif
set t=null
return false
endfunction
function CWG takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit p5=GetTriggerUnit()
call TriggerRegisterUnitEvent(t,p5,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,4.5,false)
call TriggerAddCondition(t,Condition(function CVG))
call SEff(EC8,"FX",AddSpecialEffectTarget("Abilities\\Spells\\Orc\\SpikeBarrier\\SpikeBarrier.mdl",p5,"chest"))
set t=null
set p5=null
endfunction
function CXG takes nothing returns nothing
if GetSpellAbilityId()=='A15W' then
call CWG()
endif
endfunction
function CYG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local real a=LReal(EC8,"a")
local real d=LReal(EC8,"d")
local real x=PQ8(GetUnitX(m5)+d/ 10*Cos(a*bj_DEGTORAD))
local real y=PS8(GetUnitY(m5)+d/ 10*Sin(a*bj_DEGTORAD))
if GetTriggerEvalCount(t)==11 or GetTriggerEventId()==EVENT_UNIT_DEATH or LState(m5,"PowerCogShocked")then
if(LBool(EC8,"AI"))then
call J3(m5,false)
endif
call LT7(EC8)
call EA8(t)
else
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl",x,y))
if LState(m5,"4306")==false and LState(m5,"4324")==false and GetUnitAbilityLevel(m5,'B08V')==0 then
call KillTrees(x,y,150)
call SetUnitX(m5,x)
call SetUnitY(m5,y)
endif
endif
set m5=null
set t=null
return false
endfunction
function CZG takes nothing returns nothing
local unit m5=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local real x
local real y
local real d
local real a
local integer i=-1
local boolean CAG=false
if GetSpellTargetItem()!=null then
set m5=GetTriggerUnit()
endif
call AddTimedBoolBuff(m5,"4414",3)
set a=GetUnitFacing(m5)
loop
exitwhen CAG or i==23
set i=i+1
set x=PQ8(GetUnitX(m5)+(600-i*25)*Cos(a*bj_DEGTORAD))
set y=PS8(GetUnitY(m5)+(600-i*25)*Sin(a*bj_DEGTORAD))
if(IsPointInRegion(IF4,((x)*1.),((y)*1.)))==false then
set CAG=true
endif
endloop
set d=Z87(x,y,GetUnitX(m5),GetUnitY(m5))
call TriggerRegisterTimerEvent(t,.04,true)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function CYG))
call SUnit(EC8,"Target",m5)
call SReal(EC8,"a",(a)*1.)
call SReal(EC8,"d",(d)*1.)
call SBool(EC8,"AI",(KR8(GetOwningPlayer(m5)))and(IsUnitAlly(m5,GetOwningPlayer(GetTriggerUnit()))))
set m5=null
set t=null
endfunction
function CBG takes nothing returns nothing
if GetSpellAbilityId()=='A19M' and GetUnitTypeId(GetSpellTargetUnit())!='n00L' then
if IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))or LBool(GetHandleId(GetOwningPlayer(GetSpellTargetUnit())),"DisableHelp")==false then
call CZG()
endif
endif
endfunction
function CCG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=LUnit(EC8,"Source")
if GetTriggerEvalCount(t)>40 or GetTriggerEventId()==EVENT_UNIT_DEATH or GU8(p5)or LState(p5,"Teleporting")then
call UnitRemoveAbility(p5,'Aetl')
call LT7(EC8)
call EA8(t)
endif
set p5=null
set t=null
return false
endfunction
function HND takes nothing returns nothing
local unit p5=GetTriggerUnit()
local trigger t
local integer W57
if IsCourier(p5)==false then
set t=CreateTrigger()
set W57=GetHandleId(t)
call UnitAddAbility(p5,'Aetl')
call UnitMakeAbilityPermanent(p5,true,'Aetl')
call SetPlayerAbilityAvailable(GetOwningPlayer(p5),'Aetl',false)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterUnitEvent(t,p5,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function CCG))
call SUnit(W57,"Source",p5)
endif
set p5=null
set t=null
endfunction
function C3G takes nothing returns nothing
if GetSpellAbilityId()=='A1AC' and GU8(GetTriggerUnit())==false then
call HND()
endif
endfunction
function C6G takes nothing returns nothing
local unit p5=GetTriggerUnit()
local real x
local real y
if IsJWPlayer(GetOwningPlayer(p5))then
set x=GetRectCenterX(QD)
set y=GetRectCenterY(QD)
else
set x=GetRectCenterX(PD)
set y=GetRectCenterY(PD)
endif
call IssuePointOrderById(p5,851986,x,y)
set p5=null
endfunction
function CLG takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real x
local real y
if IsJWPlayer(GetOwningPlayer(Z77))then
set x=-4533
set y=1158
else
set x=3190
set y=-35
endif
call IssuePointOrderById(Z77,851986,x,y)
set Z77=null
endfunction
function C1G takes nothing returns nothing
if GetSpellAbilityId()=='A1AS' then
call C6G()
elseif GetSpellAbilityId()=='A2KS' then
call CLG()
endif
endfunction
function C0G takes nothing returns nothing
if LState(GetEnumUnit(),"PipeOfInsightOn")then
call ShowWarningToPlayer(GetOwningPlayer(GetEnumUnit()),GetObjectName('n02M'))
else
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)then
call AddTimedBoolBuff(GetEnumUnit(),"PipeOfInsightOn",50)
endif
if GetUnitAbilityLevel(GetEnumUnit(),'B0BT')==0 and GetUnitAbilityLevel(GetEnumUnit(),'B0BU')==0 then
call IssueTargetOrderById(Mw,852186,GetEnumUnit())
endif
endif
endfunction
function C5G takes nothing returns nothing
local unit p5=GetTriggerUnit()
local group g=OG8()
set Mw=CreateUnit(GetOwningPlayer(p5),'e00E',GetUnitX(p5),GetUnitY(p5),0)
call UnitAddAbility(Mw,'A1EV')
call GroupEnumUnitsInRange(g,GetUnitX(p5),GetUnitY(p5),925,Condition(function VT8))
call ForGroup(g,function C0G)
call OF8(g)
set p5=null
set g=null
endfunction
function C2G takes nothing returns nothing
if GetSpellAbilityId()=='A1EW' then
call C5G()
endif
endfunction
function C_G takes nothing returns nothing
local unit N28=GetTriggerUnit()
call SBool(GetHandleId(N28),"MantaBlocked",true)
set N28=null
endfunction
function L4G takes nothing returns nothing
if(GetSpellAbilityId()=='A0B8' or GetSpellAbilityId()=='A1WE')and HasLinkin(GetTriggerUnit())then
call C_G()
endif
endfunction
function L7G takes integer id returns boolean
return id=='ugho' or id=='unec' or id=='esen' or id=='edry' or id=='u001' or id=='u002' or id=='e00V' or id=='e00W' or id=='ebal' or id=='e026' or id=='umtw' or id=='u00R'
endfunction
function L8G takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>8 then
call DestroyEffect(LEff(EC8,"FX"))
call LT7(EC8)
call EA8(t)
else
if GetUnitState(m5,UNIT_STATE_LIFE)>(150./ 8.+.5)then
call SetUnitState(m5,UNIT_STATE_LIFE,GetUnitState(m5,UNIT_STATE_LIFE)-150./ 8.)
else
set X64[GetPlayerId(GetOwningPlayer(m5))]=true
set I67=true
call Dmg(p5,m5,NormalFire,50)
set X64[GetPlayerId(GetOwningPlayer(m5))]=false
set I67=false
endif
endif
set t=null
set p5=null
set m5=null
return false
endfunction
function L9G takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
if GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEventId()==EVENT_UNIT_DAMAGED and(L7G(GetUnitTypeId(GetEventDamageSource()))==false and(GetOwningPlayer(GetEventDamageSource())!=O8 or GetUnitTypeId(GetEventDamageSource())=='n00L')and GetEventDamage()>0)or X34)then
call UnitRemoveAbility(m5,'B0CG')
call LT7(EC8)
call EA8(t)
endif
set t=null
set m5=null
return false
endfunction
function LDG takes nothing returns nothing
local trigger t
local integer EC8
local unit p5=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local unit AC7
local integer i=0
local boolean LEG=false
local boolean LFG=false
local integer P29
if m5==null then
set m5=GetTriggerUnit()
endif
set AC7=CreateUnit(GetOwningPlayer(p5),'e00E',GetUnitX(m5),GetUnitY(m5),0)
loop
exitwhen i>5 or LFG
if ZX7(UnitItemInSlot(p5,i))==yingzhilingkan then
set P29=GetItemCharges(UnitItemInSlot(p5,i))
if P29>0 then
set LEG=true
set P29=P29-1
else
set LFG=true
set LEG=false
endif
endif
set i=i+1
endloop
if LEG then
set t=CreateTrigger()
set EC8=GetHandleId(t)
if IsUnitAlly(m5,GetOwningPlayer(p5))then
call UnitAddAbility(AC7,'A1MM')
call IssueTargetOrderById(AC7,852609,m5)
call SUnit(EC8,"Target",m5)
call TriggerRegisterTimerEvent(t,L3,false)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function L9G))
else
call SUnit(EC8,"Target",m5)
call SUnit(EC8,"Source",p5)
call SEff(EC8,"FX",AddSpecialEffectTarget("war3mapImported\\Urn_Enemy.mdx",m5,"overhead"))
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function L8G))
call RW8(m5,StringHash("Urn"),1,8,p5,'A1MO',false)
endif
endif
set p5=null
set AC7=null
set m5=null
set t=null
endfunction
function LGG takes nothing returns nothing
if GetSpellAbilityId()=='A1MO' then
call LDG()
endif
endfunction
function LHG takes nothing returns nothing
local integer i=0
loop
exitwhen i>16
set X64[i]=false
set i=i+1
endloop
endfunction
function LIG takes nothing returns nothing
if S_9(GetEnumUnit())==false then
call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),'A1ZX',false)
call T68(GetEnumUnit(),'A1ZX',1,AE4,'B0DX')
endif
endfunction
function LJG takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local integer i=0
local boolean LKG=false
local boolean ZJE=false
local integer P29
local group g
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),925,Condition(function U88))
call ForGroup(g,function LIG)
call OF8(g)
set g=null
set Z77=null
endfunction
function LMG takes nothing returns nothing
if GetSpellAbilityId()=='A1ZW' then
call LJG()
endif
endfunction
function LNG takes unit u returns boolean
local integer WS7=GetUnitTypeId(u)
return WS7=='H0B8' or WS7=='n0FJ' or WS7=='n0FI' or WS7=='n0F6' or WS7=='n0FH' or WS7=='u00S'
endfunction
function LOG takes unit u returns boolean
local integer id=GetUnitTypeId(u)
return NK8(id)
endfunction
function LPG takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),AF4)and O18(GetFilterUnit())==false and(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)or IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)or LOG(GetFilterUnit()))and LNG(GetFilterUnit())==false
endfunction
function LQG takes unit Z77 returns boolean
local group g=OG8()
local boolean LKG
set AF4=GetOwningPlayer(Z77)
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),1050,Condition(function LPG))
set LKG=FirstOfGroup(g)!=null
call OF8(g)
return LKG
endfunction
function LRG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local group g
local integer C77
local boolean LSG
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if GetAttacker()==Z77 then
call UnitRemoveAbility(Z77,'A20L')
call UnitRemoveAbility(Z77,'A20S')
call UnitRemoveAbility(Z77,'B0E2')
call UnitRemoveAbility(Z77,'B09Y')
if((LoadInteger(R8,(GetHandleId((Z77))),((4302))))==1)==false then
call UnitSetUsesAltIcon(Z77,false)
endif
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
else
set LSG=(LoadBoolean(R8,(W57),(671)))
set C77=(LoadInteger(R8,(W57),(34)))
set C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
set g=OG8()
set AF4=GetOwningPlayer(Z77)
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),1050,Condition(function LPG))
if GetUnitAbilityLevel(Z77,'B09Y')>0 then
call SaveBoolean(R8,(W57),(671),(true))
elseif LSG then
call SaveBoolean(R8,(W57),(671),(false))
call UnitRemoveAbility(Z77,'A20L')
call AddPermanentAbility(Z77,'A20L')
endif
if C77>350 or FirstOfGroup(g)!=null then
call UnitRemoveAbility(Z77,'A20L')
call UnitRemoveAbility(Z77,'A20S')
call UnitRemoveAbility(Z77,'B0E2')
call UnitRemoveAbility(Z77,'B09Y')
if((LoadInteger(R8,(GetHandleId((Z77))),((4302))))==1)==false then
call UnitSetUsesAltIcon(Z77,false)
endif
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
call OF8(g)
endif
set t=null
set Z77=null
set g=null
return false
endfunction
function LTG takes nothing returns nothing
local unit Z77=GetEnumUnit()
local trigger t
local integer W57
if IsPlayer(GetOwningPlayer(Z77))and LQG(Z77)==false then
if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(Z77))==false and N08(GetLocalPlayer())==false then
call UnitSetUsesAltIcon(Z77,true)
endif
call AddPermanentAbility(Z77,'A20L')
call UnitMakeAbilityPermanent(Z77,true,'A20L')
if S_9(Z77)==false then
call AddPermanentAbility(Z77,'A20S')
call UnitMakeAbilityPermanent(Z77,true,'A20S')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A20S',false)
endif
set t=CreateTrigger()
set W57=GetHandleId(t)
call SaveInteger(R8,(W57),(34),(0))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveBoolean(R8,(W57),(671),(false))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("war3mapImported\\SmokeOfDeceit.mdx",Z77,"chest")))
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function LRG))
set t=null
endif
set Z77=null
endfunction
function LUG takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local group g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),1225,Condition(function U78))
call ForGroup(g,function LTG)
call OF8(g)
set Z77=null
set g=null
endfunction
function LVG takes nothing returns nothing
if GetSpellAbilityId()=='A206' then
call LUG()
endif
endfunction
function InitTrig_Smoke_of_Deceit takes nothing returns nothing
call SetAltMinimapIcon("war3mapImported\\black.blp")
endfunction
function LWG takes nothing returns nothing
if S_9(GetEnumUnit())==false then
call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),'A28F',false)
call T68(GetEnumUnit(),'A28F',1,LH4,'B0EQ')
endif
endfunction
function LXG takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local group g=OG8()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
call GroupEnumUnitsInRange(g,x,y,600+25,Condition(function UB8))
call ForGroup(g,function LWG)
call OF8(g)
call DestroyEffect(AddSpecialEffect("war3mapImported\\DarkLightningNova.mdx",x,y))
set Z77=null
set g=null
endfunction
function LYG takes nothing returns nothing
if GetSpellAbilityId()=='A28D' then
call LXG()
endif
endfunction
function LZG takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call UnitAddAbility(AC7,'A2K3')
call IssueTargetOrderById(AC7,852075,X77)
set Z77=null
set X77=null
set AC7=null
endfunction
function LAG takes nothing returns nothing
if GetSpellAbilityId()=='A2EA' and HasLinkin(GetSpellTargetUnit())==false then
call LZG()
endif
endfunction
function LBG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer C77=(LoadInteger(R8,(W57),(34)))
if GetTriggerEventId()==EVENT_WIDGET_DEATH or C77==10 or(GetTriggerEventId()==EVENT_UNIT_DAMAGED and GetEventDamage()>20)then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
set C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
call SetUnitState(Z77,UNIT_STATE_LIFE,GetUnitState(Z77,UNIT_STATE_LIFE)+17)
endif
set t=null
set Z77=null
return false
endfunction
function LCG takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function LBG))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveInteger(R8,(W57),(34),(0))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("war3mapImported\\TranquilBootsHeal.mdx",Z77,"origin")))
set Z77=null
set t=null
endfunction
function L3G takes nothing returns nothing
if GetSpellAbilityId()=='A2K1' then
call LCG()
endif
endfunction
function L6G takes nothing returns boolean
local unit Q89=GetSummonedUnit()
local integer i=0
local item VN9
local integer TS9
if IsUnitIllusion(Q89)then
loop
exitwhen i>5
set VN9=UnitItemInSlot(Q89,i)
set TS9=ZX7(VN9)
if TS9==jingmizhixie then
call DisableTrigger(GW4)
set I44=GetItemPlayer(VN9)
call RemoveItem(VN9)
set HK4=VE9(Q89,BU[jingmizhixie2],i)
call SetItemPlayer(HK4,I44,false)
call SetItemUserData(HK4,1)
call EnableTrigger(GW4)
endif
set i=i+1
endloop
endif
set Q89=null
return false
endfunction
function LLG takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local unit AC7
if GetUnitX(Z77)!=x or GetUnitY(Z77)!=y or(GetUnitAbilityLevel(Z77,'B0GM')==0 and GetTriggerEvalCount(t)>R2I(.3/ .05))or GetTriggerEvalCount(t)>R2I(HJ4/ .05)then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SaveInteger(R8,(GetHandleId((Z77))),((4337)),(2))
call UnitRemoveAbility(Z77,'B0GL')
call UnitRemoveAbility(Z77,'B0GM')
call UnitRemoveAbility(Z77,'A2R3')
elseif GetTriggerEvalCount(t)==R2I(.3/ .05)then
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
call UnitAddAbility(AC7,'A2R2')
call IssueTargetOrderById(AC7,852069,Z77)
call SaveInteger(R8,(GetHandleId((Z77))),((4337)),(2))
set AC7=null
endif
set t=null
set Z77=null
return false
endfunction
function L1G takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local integer L0G=(LoadInteger(R8,(W57),(375)))
local integer id=GetUnitCurrentOrder(Z77)
if GetUnitX(Z77)!=x or GetUnitY(Z77)!=y then
call IssueImmediateOrderById(Z77,851993)
call SaveReal(R8,(L0G),(6),((GetUnitX(Z77))*1.))
call SaveReal(R8,(L0G),(7),((GetUnitY(Z77))*1.))
elseif id==0 or id==851973 or id==851983 or id==851971 then
call IssueImmediateOrderById(Z77,851993)
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function L5G takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local trigger t2=CreateTrigger()
local integer WED=GetHandleId(t2)
local string L2G="Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl"
if GetLocalPlayer()!=GetOwningPlayer(Z77)then
set L2G=""
endif
call AddPermanentAbility(Z77,'A2R3')
call SaveInteger(R8,(GetHandleId((Z77))),((4337)),(1))
call DestroyEffect(AddSpecialEffectTarget(L2G,Z77,"chest"))
call DestroyEffect(AddSpecialEffectTarget(L2G,Z77,"hand left"))
call DestroyEffect(AddSpecialEffectTarget(L2G,Z77,"hand right"))
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function LLG))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(6),((GetUnitX(Z77))*1.))
call SaveReal(R8,(W57),(7),((GetUnitY(Z77))*1.))
call TriggerRegisterTimerEvent(t2,.01,false)
call TriggerAddCondition(t2,Condition(function L1G))
call SaveUnitHandle(R8,(WED),(2),(Z77))
call SaveReal(R8,(WED),(6),((GetUnitX(Z77))*1.))
call SaveReal(R8,(WED),(7),((GetUnitY(Z77))*1.))
call SaveInteger(R8,(WED),(375),(W57))
set Z77=null
set t=null
endfunction
function L_G takes nothing returns nothing
if GetSpellAbilityId()=='A2R1' and((LoadInteger(R8,(GetHandleId((GetTriggerUnit()))),((4337))))==1)==false then
call L5G()
endif
endfunction
function D4H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if GetUnitAbilityLevel(Z77,'Bdet')==0 then
call UnitRemoveAbility(Z77,'A2SJ')
call UnitRemoveAbility(Z77,'B0GR')
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
if UN8(Z77)then
if GetUnitAbilityLevel(Z77,'B0GR')==0 then
call AddPermanentAbility(Z77,'A2SJ')
endif
else
if GetUnitAbilityLevel(Z77,'B0GR')>0 then
call UnitRemoveAbility(Z77,'A2SJ')
call UnitRemoveAbility(Z77,'B0GR')
endif
endif
endif
set Z77=null
set t=null
return false
endfunction
function D7H takes nothing returns nothing
local unit Z77=GetEnumUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerAddCondition(t,Condition(function D4H))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=null
set Z77=null
endfunction
function D8H takes nothing returns nothing
local group g=OG8()
local unit Z77=GetTriggerUnit()
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),1050+25,Condition(function V98))
call ForGroup(g,function D7H)
call OF8(g)
set g=null
set Z77=null
endfunction
function D9H takes nothing returns nothing
if GetSpellAbilityId()=='AItb' then
call D8H()
endif
endfunction
function DDH takes nothing returns nothing
if IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==false then
call Dmg(GetTriggerUnit(),GetSpellTargetUnit(),2,'d')
endif
endfunction
function DEH takes nothing returns nothing
if GetSpellAbilityId()=='A1FD' then
if GetUnitTypeId(GetSpellTargetUnit())=='o004' or GetUnitTypeId(GetSpellTargetUnit())=='oeye' then
call DDH()
endif
endif
endfunction
function DFH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call SetItemCharges(AV7(Z77,BU[xuejingshi]),GetItemCharges(AV7(Z77,BU[xuejingshi]))+1)
call FlushChildHashtable(R8,(W57))
call EA8(t)
if GetUnitTypeId(Z77)=='Npbm' then
set BG4=Z77
endif
call KillUnit(Z77)
set Z77=null
set t=null
return false
endfunction
function DGH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call TriggerAddCondition(t,Condition(function DFH))
call TriggerRegisterTimerEvent(t,.01,false)
set t=null
set Z77=null
endfunction
function DHH takes nothing returns nothing
if GetSpellAbilityId()=='A2TK' then
call DGH()
endif
endfunction
function DIH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local unit AC7
if GetUnitX(Z77)!=x or GetUnitY(Z77)!=y or(GetUnitAbilityLevel(Z77,'B0G8')==0 and GetTriggerEvalCount(t)>R2I(2.4/ .05))then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call EY8(Z77,"ShadowAmu|4330")
call UnitRemoveAbility(Z77,'B0G6')
call UnitRemoveAbility(Z77,'B0G8')
elseif GetTriggerEvalCount(t)==R2I(2.4/ .05)then
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
call UnitAddAbility(AC7,'A2N5')
call IssueTargetOrderById(AC7,852069,Z77)
call EY8(Z77,"ShadowAmu|4330")
set AC7=null
endif
set t=null
set Z77=null
return false
endfunction
function DJH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local integer L0G=(LoadInteger(R8,(W57),(375)))
local integer id=GetUnitCurrentOrder(Z77)
if GetUnitX(Z77)!=x or GetUnitY(Z77)!=y then
call IssueImmediateOrderById(Z77,851993)
call SaveReal(R8,(L0G),(6),((GetUnitX(Z77))*1.))
call SaveReal(R8,(L0G),(7),((GetUnitY(Z77))*1.))
elseif id==0 or id==851973 or id==851983 or id==851971 then
call IssueImmediateOrderById(Z77,851993)
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function DKH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local trigger t2=CreateTrigger()
local integer WED=GetHandleId(t2)
local string L2G="Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl"
if GetLocalPlayer()!=GetOwningPlayer(Z77)then
set L2G=""
endif
call EW8(Z77,"ShadowAmu|4330")
call DestroyEffect(AddSpecialEffectTarget(L2G,Z77,"chest"))
call DestroyEffect(AddSpecialEffectTarget(L2G,Z77,"hand left"))
call DestroyEffect(AddSpecialEffectTarget(L2G,Z77,"hand right"))
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function DIH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(6),((GetUnitX(Z77))*1.))
call SaveReal(R8,(W57),(7),((GetUnitY(Z77))*1.))
call TriggerRegisterTimerEvent(t2,.01,false)
call TriggerAddCondition(t2,Condition(function DJH))
call SaveUnitHandle(R8,(WED),(2),(Z77))
call SaveReal(R8,(WED),(6),((GetUnitX(Z77))*1.))
call SaveReal(R8,(WED),(7),((GetUnitY(Z77))*1.))
call SaveInteger(R8,(WED),(375),(W57))
set Z77=null
set t=null
endfunction
function A2N1_Invisible takes nothing returns nothing
local unit u=LUnit(GetT(),"u")
if LBool(GetT(),"Inv")and GetIssuedOrderId()>0 then
call UnitRemoveAbility(u,'BZ2F')
call TriggerOff()
elseif GetIssuedOrderId()==0 then
call DisableTrigger(GetTriggeringTrigger())
call IssueImmediateOrderById(u,851993)
if GetUnitAbilityLevel(u,'Abun')==0 then
call UnitAddAbility(u,'Abun')
call UnitRemoveAbility(u,'Abun')
endif
call EnableTrigger(GetTriggeringTrigger())
call SBool(GetT(),"Inv",true)
call UseSkillWithProj(GetOwningPlayer(u),u,'AZ2F',1,852069,1)
endif
set u=null
endfunction
function A2N1_ChooseTarget takes nothing returns nothing
local trigger t=CreateTrigger()
local unit u=GetSpellTargetUnit()
local integer h=GetHandleId(t)
local string str="Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl"
if GetSpellTargetItem()!=null then
set u=GetTriggerUnit()
endif
if GetUnitAbilityLevel(u,'BZ2F')>0 then
call DisableTrigger(t)
call DestroyTrigger(t)
set t=null
set u=null
return
endif
if IsPlayerEnemy(GetLocalPlayer(),GetOwningPlayer(u))then
set str=""
endif
call DestroyEffect(AddSpecialEffectTarget(str,u,"chest"))
call DestroyEffect(AddSpecialEffectTarget(str,u,"hand left"))
call DestroyEffect(AddSpecialEffectTarget(str,u,"hand right"))
call TriggerRegisterTimerEvent(t,1.5,false)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_ISSUED_ORDER)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(t,Condition(function A2N1_Invisible))
call SUnit(h,"u",u)
set t=null
set u=null
endfunction
function DMH takes nothing returns nothing
if GetSpellAbilityId()=='A2N1' then
call A2N1_ChooseTarget()
endif
endfunction
function DNH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,W57,(17)))
local integer VID=(LoadInteger(R8,W57,(34)))
if(GetTriggerEventId()==EVENT_WIDGET_DEATH or GetTriggerEvalCount(t)>=VID or GU8(X77))then
call UI8(X77)
call DestroyEffect((LoadEffectHandle(R8,W57,(32))))
call FlushChildHashtable(R8,W57)
call EA8(t)
endif
set t=null
set X77=null
return false
endfunction
function DOH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local unit AC7
local integer ML8=2
local real VL8=4.5
local trigger t=CreateTrigger()
local integer V37=GetHandleId(t)
if IsUnitType(X77,UNIT_TYPE_MELEE_ATTACKER)then
set ML8=1
set VL8=3
endif
call UG8(X77)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function DNH))
call SaveUnitHandle(R8,V37,(17),(X77))
call SaveInteger(R8,V37,(34),(R2I(VL8*10)))
call SaveEffectHandle(R8,V37,(32),(AddSpecialEffectTarget("Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl",X77,"overhead")))
set Z77=null
set X77=null
set AC7=null
endfunction
function DPH takes nothing returns nothing
if GetSpellAbilityId()=='A2K4' and HasLinkin(GetSpellTargetUnit())==false then
call DOH()
endif
endfunction
function DQH takes integer ML8,unit Z77,unit X77 returns nothing
set I67=true
call Dmg(Z77,X77,NormalFire,300+'d'*ML8)
set I67=false
endfunction
function DRH takes nothing returns nothing
local integer DSH=0
if GetSpellAbilityId()=='A02O' then
set DSH=1
endif
if GetSpellAbilityId()=='A08Y' then
set DSH=2
endif
if GetSpellAbilityId()=='A08Z' then
set DSH=3
endif
if GetSpellAbilityId()=='A090' then
set DSH=4
endif
if GetSpellAbilityId()=='A092' then
set DSH=5
endif
if DSH>0 and HasLinkin(GetSpellTargetUnit())==false then
call DQH(DSH,GetTriggerUnit(),GetSpellTargetUnit())
endif
endfunction
function DTH takes nothing returns nothing
if GetSpellAbilityId()=='A2HQ' then
call QD9(GetTriggerUnit(),GetSpellTargetUnit())
endif
endfunction
function DUH takes unit Z77,integer MB8,real x,real y returns nothing
local unit DVH=CreateUnit(GetOwningPlayer(Z77),MB8,x,y,0)
call UnitApplyTimedLife(DVH,'BTLF',15)
set DVH=null
endfunction
function DWH takes nothing returns nothing
local unit DVH
local real x
local real y
if GetSpellAbilityId()=='A1ZL' then
set x=GetDestructableX(GetSpellTargetDestructable())
set y=GetDestructableY(GetSpellTargetDestructable())
call DUH(GetTriggerUnit(),'n0LM',x,y)
elseif GetSpellAbilityId()=='A1ZM' then
set x=GetDestructableX(GetSpellTargetDestructable())
set y=GetDestructableY(GetSpellTargetDestructable())
call DUH(GetTriggerUnit(),'n0LN',x,y)
endif
set DVH=null
endfunction
function DXH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
call UnitRemoveAbility(Z77,'A1ZJ')
call UnitRemoveAbility(X77,'A1ZJ')
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
set X77=null
return false
endfunction
function DYH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,7,false)
call TriggerAddCondition(t,Condition(function DXH))
call SaveUnitHandle(R8,(W57),(2),(GetTriggerUnit()))
call SaveUnitHandle(R8,(W57),(17),(GetSpellTargetUnit()))
call SaveEffectHandle(R8,(W57),(175),(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl",GetSpellTargetUnit(),"chest")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl",GetTriggerUnit(),"chest")))
call UnitAddAbility(GetTriggerUnit(),'A1ZJ')
call UnitAddAbility(GetSpellTargetUnit(),'A1ZJ')
call UnitMakeAbilityPermanent(GetTriggerUnit(),true,'A1ZJ')
call UnitMakeAbilityPermanent(GetSpellTargetUnit(),true,'A1ZJ')
set t=null
endfunction
function DZH takes nothing returns nothing
if GetSpellAbilityId()=='A1ZI' and HasLinkin(GetSpellTargetUnit())==false then
call DYH()
endif
endfunction
function DAH takes nothing returns nothing
local unit Y47=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local unit AC7
if GetSpellTargetUnit()==null then
if GetSpellAbilityId()=='AIpl' then
set AC7=CreateUnit(GetOwningPlayer(Y47),'e00E',GetUnitX(Y47),GetUnitY(Y47),0)
call UnitAddAbility(AC7,'A1WA')
call IssueTargetOrderById(AC7,852609,Y47)
set AC7=null
elseif GetSpellAbilityId()=='AIpr' then
set AC7=CreateUnit(GetOwningPlayer(Y47),'e00E',GetUnitX(Y47),GetUnitY(Y47),0)
call UnitAddAbility(AC7,'AIpr')
call IssueTargetOrderById(AC7,852609,Y47)
set AC7=null
endif
endif
set Y47=null
set X77=null
endfunction
function DBH takes nothing returns nothing
if GetSpellAbilityId()=='AIpl' or GetSpellAbilityId()=='AIpr' then
call DAH()
endif
endfunction
function DCH takes integer ML8 returns integer
if ML8==1 then
return 25
elseif ML8==2 then
return 41
elseif ML8==3 then
return 62
elseif ML8==4 then
return 88
elseif ML8==5 then
return'w'
elseif ML8==6 then
return 155
endif
return 25
endfunction
function D3H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=(LoadInteger(R8,(W57),(34)))
if(GetTriggerEventId()==EVENT_UNIT_DEATH and GetKillingUnit()==Z77)or(GetTriggerEventId()==EVENT_UNIT_DAMAGED and GetUnitAbilityLevel(X77,'B0ES')>0)then
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Transmute\\PileofGold.mdl",GetUnitX(X77),GetUnitY(X77)))
call AddHeroXP(Z77,R2I(DCH(ML8)*2.5),true)
call TM8(GetOwningPlayer(Z77),X77,190)
set WQ4[GetPlayerId(GetOwningPlayer(Z77))]=WQ4[GetPlayerId(GetOwningPlayer(Z77))]+190
call FlushChildHashtable(R8,(W57))
call EA8(t)
call KillUnit(X77)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function D6H takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitLevel(X77)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(34),(ML8))
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function D3H))
set t=null
set Z77=null
set X77=null
endfunction
function DLH takes nothing returns nothing
if GetSpellAbilityId()=='A28Y' then
call D6H()
endif
endfunction
function D1H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer NZ8=GetHandleId(t)
local unit W8D=(LoadUnitHandle(R8,(NZ8),(2)))
local real D0H=(LoadReal(R8,(NZ8),(242)))
local real D5H=(LoadReal(R8,(NZ8),(529)))
local real D2H=(LoadReal(R8,(NZ8),(530)))
local real D_H=GetUnitState(W8D,UNIT_STATE_MANA)
local real E4H=GetUnitState(W8D,UNIT_STATE_MAX_MANA)
local real E7H=D0H-D_H
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call FlushChildHashtable(R8,(NZ8))
call EA8(t)
elseif GetTriggerEvalCount(t)==20*10 then
call FlushChildHashtable(R8,(NZ8))
call EA8(t)
if D5H<150 then
call SetUnitState(W8D,UNIT_STATE_MANA,D_H-(150-D5H-D2H))
endif
else
if E7H>0 then
set D5H=D5H+(D0H-D_H)
if D2H>0 then
if E7H>D2H then
call SetUnitState(W8D,UNIT_STATE_MANA,D_H+D2H)
set D2H=0
else
if D2H>(E4H-D_H)then
set D2H=D2H-(E4H-D_H)
call SetUnitState(W8D,UNIT_STATE_MANA,D_H+E4H-D_H)
else
set D2H=D2H-E7H
call SetUnitState(W8D,UNIT_STATE_MANA,D_H+E7H)
endif
endif
endif
endif
set D0H=D_H
call SaveReal(R8,(NZ8),(242),((D0H)*1.))
call SaveReal(R8,(NZ8),(529),((D5H)*1.))
call SaveReal(R8,(NZ8),(530),((D2H)*1.))
endif
set t=null
set W8D=null
return false
endfunction
function E8H takes nothing returns nothing
local unit W8D=GetTriggerUnit()
local real WLE=GetUnitState(W8D,UNIT_STATE_LIFE)
local trigger t=CreateTrigger()
local integer NZ8=GetHandleId(t)
local real D_H=GetUnitState(W8D,UNIT_STATE_MANA)
if WLE>151 then
call SetUnitState(W8D,UNIT_STATE_LIFE,WLE-150)
else
call SetUnitState(W8D,UNIT_STATE_LIFE,1)
endif
call QG8("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkZapTarget.mdl",W8D,"origin",2)
call SetUnitState(W8D,UNIT_STATE_MANA,D_H+150)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerRegisterUnitEvent(t,W8D,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function D1H))
call SaveUnitHandle(R8,(NZ8),(2),(W8D))
call SaveReal(R8,(NZ8),(242),((GetUnitState(W8D,UNIT_STATE_MANA))*1.))
call SaveReal(R8,(NZ8),(529),((0)*1.))
if(D_H+150)>GetUnitState(W8D,UNIT_STATE_MAX_MANA)then
call SaveReal(R8,(NZ8),(530),(((D_H+150)-GetUnitState(W8D,UNIT_STATE_MAX_MANA))*1.))
endif
set W8D=null
endfunction
function E9H takes nothing returns nothing
if GetSpellAbilityId()=='A1Q8' then
call E8H()
endif
endfunction
function EDH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if GetTriggerEvalCount(t)>30 or GetTriggerEventId()==EVENT_UNIT_DEATH then
call UnitRemoveAbility(Z77,'A1QC')
call UnitRemoveAbility(Z77,'B0CY')
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set Z77=null
set t=null
return false
endfunction
function EEH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer VL8=(LoadInteger(R8,(W57),(34)))
if GetTriggerEvalCount(t)>VL8/ .1 or GetTriggerEventId()==EVENT_UNIT_DEATH or((LoadInteger(R8,(GetHandleId((Z77))),((4256))))==1)then
call UnitRemoveAbility(Z77,'Aetl')
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set Z77=null
set t=null
return false
endfunction
function EFH takes unit u,integer VL8 returns nothing
local unit Z77=u
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call UnitAddAbility(Z77,'Aetl')
call UnitMakeAbilityPermanent(Z77,true,'Aetl')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'Aetl',false)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function EEH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveInteger(R8,(W57),(34),(VL8))
set Z77=null
set t=null
endfunction
function EGH takes nothing returns nothing
local integer W57=GetHandleId(GetTriggeringTrigger())
local unit Z77=H04
local unit X77=H54
local real P08=(LoadReal(R8,(W57),(20)))
local trigger t
local integer VL8=3
if Z77==X77 then
set VL8=4
endif
if IsPlayerAlly(GetOwningPlayer(X77),GetOwningPlayer(Z77))and Z77!=X77 then
call EFH(X77,4)
elseif Z77!=X77 then
set t=CreateTrigger()
set W57=GetHandleId(t)
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A1QC',false)
call UnitAddAbility(X77,'A1QC')
call UnitMakeAbilityPermanent(X77,true,'A1QC')
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function EDH))
call SaveUnitHandle(R8,(W57),(2),(X77))
call EFH(X77,VL8)
call QM8("+"+I2S(R2I(P08)),2,X77,.027,3,216,'x',216)
set I67=true
call Dmg(Z77,X77,NormalFire,P08)
set I67=false
endif
call EFH(Z77,VL8)
set Z77=null
set X77=null
endfunction
function EHH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t2=T88(Z77,X77,'h0BS',"EGH",1000)
local integer WED=GetHandleId(t2)
local integer VWD=N58(Z77)
local real EIH
if VWD==OF7 then
set EIH=GetHeroAgi(Z77,true)
elseif VWD==OG7 then
set EIH=GetHeroStr(Z77,true)
elseif VWD==OH7 then
set EIH=GetHeroInt(Z77,true)
endif
call SaveReal(R8,(WED),(20),((EIH*2.+75)*1.))
set Z77=null
set X77=null
set t2=null
endfunction
function EJH takes nothing returns nothing
if GetSpellAbilityId()=='A1QD' and(IsPlayerAlly(GetOwningPlayer(GetSpellTargetUnit()),GetOwningPlayer(GetTriggerUnit()))or HasLinkin(GetSpellTargetUnit())==false)then
call EHH()
endif
endfunction
function EKH 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 EMH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local group g=OG8()
set H04=Z77
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),25+600,Condition(function U08))
call ForGroup(g,function EKH)
call OF8(g)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set g=null
set Z77=null
set t=null
return false
endfunction
function ENH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local group g
local trigger t
if GetSpellAbilityId()=='A0K7' then
if GetUnitTypeId(Z77)!='H00J' then
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function EMH))
call SaveUnitHandle(R8,(GetHandleId(t)),(2),(Z77))
set t=null
else
call SetUnitState(Z77,UNIT_STATE_MANA,GetUnitState(Z77,UNIT_STATE_MANA)+25)
endif
endif
set Z77=null
set g=null
set t=null
endfunction
function AIcyDamageFunc takes nothing returns nothing
local integer h=GetT()
local unit u=LUnit(h,"u")
if GetTriggerEventId()==EVENT_WIDGET_DEATH or LUnit(h,"u")==null then
call TriggerOff()
elseif GetUnitAbilityLevel(u,'Bcyc')+GetUnitAbilityLevel(u,'Bcy2')==0 then
call Dmg(LUnit(h,"s"),u,1,50)
call TriggerOff()
endif
set u=null
endfunction
function AIcyDamage takes unit s,unit u returns nothing
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
call TriggerRegisterVariableEvent(t,"time",GREATER_THAN,time+2.5)
call TriggerRegisterDeathEvent(t,u)
call TriggerAddCondition(t,Condition(function AIcyDamageFunc))
call SUnit(h,"s",s)
call SUnit(h,"u",u)
set t=null
endfunction
function EOH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local unit AC7
if GetSpellAbilityId()=='A1T7' and(HasLinkin(GetSpellTargetUnit())==false or IsPlayerAlly(GetOwningPlayer(Z77),GetOwningPlayer(X77)))then
if GetSpellTargetItem()!=null then
set X77=GetTriggerUnit()
endif
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call UnitAddAbility(AC7,'AIcy')
call IssueTargetOrderById(AC7,852144,X77)
if IsUnitEnemy(X77,GetOwningPlayer(Z77))then
call AIcyDamage(Z77,X77)
endif
endif
set Z77=null
set X77=null
set AC7=null
endfunction
function EPH takes nothing returns boolean
if GetUnitTypeId(GetTriggerUnit())=='e00E' then
return false
endif
call B99()
call A79()
call AL9()
call ACG()
call BSG()
call BBG()
call B6G()
call B2G()
call A59()
call BCG()
call B_G()
call QZG()
call ZU9()
call Q0G()
call CKG()
call RFG()
call Q2G()
call CTG()
call CRG()
call YTG()
call CUG()
call CXG()
call CBG()
call C3G()
call C1G()
call CFG()
call C2G()
call L4G()
call LGG()
call E9H()
call EJH()
call EOH()
call ENH()
call DLH()
call DBH()
call DZH()
call DWH()
call LMG()
call LVG()
call LYG()
call LAG()
call DTH()
call DRH()
call L3G()
call DPH()
call DMH()
call DHH()
call L_G()
call D9H()
call DEH()
if GetSpellAbilityId()=='A2K7' and HasLinkin(GetSpellTargetUnit())==false then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\LevelerStunFX.mdx",GetSpellTargetUnit(),"head"))
endif
return false
endfunction
function EQH takes nothing returns boolean
call AFG()
call AGG()
call AKG()
call AQG()
call BI9()
call AUG()
call AVG()
call AWG()
call AXG()
call AZG()
return false
endfunction
function ERH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local unit ESH=LUnit(EC8,"Caster")
local unit m5=LUnit(EC8,"Target")
local effect FX=LEff(EC8,"FX")
local player p=GetOwningPlayer(N28)
call UnitShareVision(m5,p,false)
call DestroyEffect(FX)
call RemoveUnit(ESH)
call UnitRemoveAbility(m5,'B06H')
call LT7(EC8)
call EA8(t)
set t=null
set N28=null
set ESH=null
set m5=null
set FX=null
set p=null
return false
endfunction
function ETH takes nothing returns nothing
local unit N28=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local player p=GetOwningPlayer(N28)
local unit ESH
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local string s="effects\\Snipe Target.mdx"
if IsPlayerAlly(GetLocalPlayer(),p)==false and N08(GetLocalPlayer())==false then
set s=""
endif
call UnitShareVision(m5,p,true)
set ESH=CreateUnit(GetOwningPlayer(m5),'e01R',0,0,0)
call AddPermanentAbility(ESH,'A0NI')
call SUnit(EC8,"Target",m5)
call SUnit(EC8,"Hero",N28)
call SUnit(EC8,"Caster",ESH)
call SEff(EC8,"FX",AddSpecialEffectTarget(s,m5,"overhead"))
call TriggerRegisterTimerEvent(t,4,false)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t,Condition(function ERH))
set t=null
set N28=null
set m5=null
set ESH=null
set p=null
endfunction
function EUH takes nothing returns boolean
if GetSpellAbilityId()=='A04P' then
call ETH()
endif
return false
endfunction
function BD8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CHANNEL)
call TriggerAddCondition(t,Condition(function EUH))
set t=null
endfunction
function EVH takes nothing returns boolean
local real d
if IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(H54))then
set d=Z87(HL4,H14,GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()))
if d<H64 then
set H64=d
set H04=GetFilterUnit()
endif
endif
return false
endfunction
function EWH takes unit EXH,real x,real y returns unit
local group g=OG8()
set H04=null
set H54=EXH
set H64=99999
set HL4=x
set H14=y
call GroupEnumUnitsInRange(g,x,y,2000,Condition(function EVH))
call OF8(g)
set g=null
return H04
endfunction
function EYH takes nothing returns boolean
local real d
if GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and O18(GetFilterUnit())==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(H54))then
set d=Z87(HL4,H14,GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()))
if d<H64 then
set H64=d
set H04=GetFilterUnit()
endif
endif
return false
endfunction
function EZH takes unit EXH,real x,real y returns unit
local group g=OG8()
set H04=null
set H54=EXH
set H64=99999
set HL4=x
set H14=y
call GroupEnumUnitsInRange(g,x,y,2000,Condition(function EYH))
call OF8(g)
set g=null
return H04
endfunction
function EAH takes nothing returns nothing
local unit N28=GetTriggerUnit()
local location l
local real x
local real y
local unit m5=GetSpellTargetUnit()
if m5==null then
set l=GetSpellTargetLoc()
set x=GetLocationX(l)
set y=GetLocationY(l)
call RemoveLocation(l)
if GetSpellAbilityId()=='A0CX' then
set m5=EWH(N28,x,y)
else
set m5=EZH(N28,x,y)
endif
set x=GetUnitX(m5)
set y=GetUnitY(m5)
else
set x=GetUnitX(GetSpellTargetUnit())
set y=GetUnitY(GetSpellTargetUnit())
endif
if(IsUnitAlly(N28,GetLocalPlayer())and GetLocalPlayer()!=GetOwningPlayer(N28))or(L8 and(GetLocalPlayer()==KU4 or GetLocalPlayer()==KV4))then
call PingMinimapEx(x,y,3,255,255,255,false)
endif
set N28=null
set l=null
endfunction
function EBH takes nothing returns boolean
if GetSpellAbilityId()=='A0CX' or GetSpellAbilityId()=='AImt' then
call EAH()
endif
return false
endfunction
function ECH takes unit E3H returns nothing
local group g=OG8()
local real x=GetUnitX(E3H)
local real y=GetUnitY(E3H)
local unit E6H
local unit ELH=CreateUnit(GetOwningPlayer(E3H),'e00E',x,y,0)
local integer E1H=GetUnitAbilityLevel(E3H,'A0Z4')
set H04=E3H
call GroupEnumUnitsInRange(g,x,y,300,Condition(function V78))
set E6H=GroupPickRandomUnit(g)
call OF8(g)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl",E3H,"origin"))
if E6H!=null then
call AddPermanentAbility(ELH,'A0Z7')
call SetUnitAbilityLevel(ELH,'A0Z7',E1H)
call IssueTargetOrderById(ELH,852095,E6H)
endif
set g=null
set E6H=null
set ELH=null
endfunction
function E0H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer E5H=GetHandleId(t)
local integer E2H=GetTriggerEvalCount(t)
local unit E_H=LUnit(E5H,"Hero")
if E2H>15 or GetTriggerEventId()==EVENT_UNIT_DEATH then
call LT7(E5H)
call EA8(t)
else
call ECH(E_H)
endif
set t=null
set E_H=null
return false
endfunction
function F4H takes nothing returns nothing
local trigger t=CreateTrigger()
local integer E5H=GetHandleId(t)
local unit E_H=GetTriggerUnit()
call TriggerRegisterTimerEvent(t,.7,true)
call TriggerRegisterUnitEvent(t,E_H,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function E0H))
call SUnit(E5H,"Hero",E_H)
call TriggerEvaluate(t)
set t=null
set E_H=null
endfunction
function F7H takes nothing returns boolean
if GetSpellAbilityId()=='A0Z4' then
call F4H()
endif
return false
endfunction
function F_9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function F7H))
set t=null
endfunction
function F8H takes real s,real F9H,real FDH,real FEH returns boolean
return s<=F9H and s<=FDH and s<=FEH
endfunction
function FFH takes unit u,real x,real y,real d returns real
local real x2=GetUnitX(u)
local real y2=GetUnitY(u)
local real FGH=Z87(x-d,y,x2,y2)
local real FHH=Z87(x+d,y,x2,y2)
local real FIH=Z87(x,y+d,x2,y2)
local real FJH=Z87(x,y-d,x2,y2)
if F8H(FGH,FHH,FJH,FIH)then
return 180.
elseif F8H(FHH,FGH,FJH,FIH)then
return .0
elseif F8H(FJH,FHH,FGH,FIH)then
return 270.
endif
return 90.
endfunction
function FKH takes real s,real F9H,real FDH,real FEH,real FMH,real FNH,real FOH,real FPH returns boolean
return s<=F9H and s<=FDH and s<=FEH and s<=FMH and s<=FNH and s<=FOH and s<=FPH
endfunction
function FQH takes unit u,integer EC8 returns unit
local real x1=GetUnitX(u)
local real y1=GetUnitY(u)
local unit FRH=LUnit(EC8,"Cog1")
local unit FSH=LUnit(EC8,"Cog2")
local unit FTH=LUnit(EC8,"Cog3")
local unit FUH=LUnit(EC8,"Cog4")
local unit FVH=LUnit(EC8,"Cog5")
local unit FWH=LUnit(EC8,"Cog6")
local unit FXH=LUnit(EC8,"Cog7")
local unit FYH=LUnit(EC8,"Cog8")
local real F9H=Z87(x1,y1,GetUnitX(FRH),GetUnitY(FRH))
local real FDH=Z87(x1,y1,GetUnitX(FSH),GetUnitY(FSH))
local real FEH=Z87(x1,y1,GetUnitX(FTH),GetUnitY(FTH))
local real FMH=Z87(x1,y1,GetUnitX(FUH),GetUnitY(FUH))
local real FNH=Z87(x1,y1,GetUnitX(FVH),GetUnitY(FVH))
local real FOH=Z87(x1,y1,GetUnitX(FWH),GetUnitY(FWH))
local real FPH=Z87(x1,y1,GetUnitX(FXH),GetUnitY(FXH))
local real FZH=Z87(x1,y1,GetUnitX(FYH),GetUnitY(FYH))
if FKH(F9H,FDH,FEH,FMH,FNH,FOH,FPH,FZH)then
return FRH
elseif FKH(FDH,F9H,FEH,FMH,FNH,FOH,FPH,FZH)then
return FSH
elseif FKH(FEH,FDH,F9H,FMH,FNH,FOH,FPH,FZH)then
return FTH
elseif FKH(FMH,FDH,FEH,F9H,FNH,FOH,FPH,FZH)then
return FUH
elseif FKH(FNH,FDH,FEH,FMH,F9H,FOH,FPH,FZH)then
return FVH
elseif FKH(FOH,FDH,FEH,FMH,FNH,F9H,FPH,FZH)then
return FWH
elseif FKH(FPH,FDH,FEH,FMH,FNH,FOH,F9H,FZH)then
return FXH
elseif FKH(FZH,FDH,FEH,FMH,FNH,FOH,FPH,F9H)then
return FYH
endif
call X17("WTF????")
return null
endfunction
function FAH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=LUnit(W57,"Target")
local real FBH=LReal(W57,"Angle")
local real x=GetUnitX(X77)
local real y=GetUnitY(X77)
local real TNG=12
local unit Z77=LUnit(W57,"Source")
local integer ML8=LInt(W57,"Level")
local integer FCH=40+40*ML8
if GetTriggerEvalCount(t)>21 then
call LT7(W57)
call EA8(t)
call EY8(X77,"PowerCogShocked")
call Dmg(Z77,X77,NormalFire,I2R(FCH))
call SetUnitState(X77,UNIT_STATE_MANA,P18(GetUnitState(X77,UNIT_STATE_MANA)-FCH,0))
else
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl",x,y))
call KillTrees(x,y,150)
if LState(X77,"TimeWalk|Active")==false then
call SetUnitPosition(X77,x+TNG*Cos(FBH*bj_DEGTORAD),y+TNG*Sin(FBH*bj_DEGTORAD))
endif
endif
set t=null
set X77=null
return false
endfunction
function F3H takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit m5=GetEnumUnit()
local real x=H64
local real y=HL4
local real d=H14
local real FBH=FFH(m5,x,y,d)
local real F6H=200
local real FLH=d-Z87(GetUnitX(m5),GetUnitY(m5),x,y)+F6H/ 2
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl",m5,"chest"))
call EW8(m5,"PowerCogShocked")
if FLH>0 then
call SetUnitX(m5,GetUnitX(m5)+FLH*Cos(FBH*bj_DEGTORAD))
call SetUnitY(m5,GetUnitY(m5)+FLH*Sin(FBH*bj_DEGTORAD))
endif
call SUnit(EC8,"Target",m5)
call SReal(EC8,"Angle",FBH*1.)
call SInt(EC8,"Level",HB4)
call SUnit(EC8,"Source",H04)
call TriggerRegisterTimerEvent(t,.04,true)
call TriggerAddCondition(t,Condition(function FAH))
set t=null
set m5=null
endfunction
function F1H takes unit u,integer EC8 returns boolean
local unit F0H=FQH(u,EC8)
local boolean F5H=true
if O18(F0H)or LInt(GetHandleId(F0H),"PowerCogUsed")==1 then
set F5H=false
endif
call SInt(GetHandleId(F0H),"PowerCogUsed",1)
call SetUnitVertexColor(F0H,25,25,25,175)
set F0H=null
return F5H
endfunction
function F2H takes nothing returns nothing
if GetUnitState(GetEnumUnit(),UNIT_STATE_MANA)>0 and IsUnitInGroup(GetEnumUnit(),H24)==false and LState(GetEnumUnit(),"PowerCogShocked")==false and F1H(GetEnumUnit(),HC4)then
call EW8(GetEnumUnit(),"PowerCogShocked")
call GroupAddUnit(H_4,GetEnumUnit())
endif
endfunction
function F_H takes trigger t,unit AM7,real x,real y,real d,integer ML8 returns nothing
local integer W57=GetHandleId(t)
local real F6H=200
local rect r1=Rect(x-d,y-d,x+d,y+d)
local rect r2=Rect(x-d-F6H,y-d-F6H,x+d+F6H,y+d+F6H)
local group g1=OG8()
local group g2=OG8()
local group g3=OG8()
set H04=AM7
call GroupEnumUnitsInRect(g1,r1,Condition(function UW8))
call GroupEnumUnitsInRect(g2,r2,Condition(function UW8))
set H24=g1
set H_4=g3
set H64=x
set HL4=y
set H14=d
set HC4=W57
call ForGroup(g2,function F2H)
set HB4=ML8
call ForGroup(g3,function F3H)
call OF8(g1)
call OF8(g2)
call OF8(g3)
call RemoveRect(r1)
call RemoveRect(r2)
set g1=null
set g2=null
set g3=null
set r1=null
set r2=null
endfunction
function G4H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
local player p=ED8(EC8,"p")
local boolean G7H=LBool(EC8,"NeedFix")
call LT7(EC8)
call EA8(t)
if G7H then
call S18(p,.2,x,y,500)
endif
set t=null
set p=null
return false
endfunction
function G8H takes unit F0H returns nothing
local real x=GetUnitX(F0H)
local real y=GetUnitY(F0H)
local player p=GetOwningPlayer(F0H)
local unit oA=CreateUnit(p,'u00W',x,y,0)
call KillUnit(oA)
set p=null
set oA=null
endfunction
function G9H takes integer W57,real x,real y,boolean GDH,player p returns nothing
local unit GEH=LUnit(W57,"Cog"+"1")
local unit GFH=LUnit(W57,"Cog"+"2")
local unit GGH=LUnit(W57,"Cog"+"3")
local unit GHH=LUnit(W57,"Cog"+"4")
local unit GIH=LUnit(W57,"Cog"+"5")
local unit GJH=LUnit(W57,"Cog"+"6")
local unit GKH=LUnit(W57,"Cog"+"7")
local unit GMH=LUnit(W57,"Cog"+"8")
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.1,false)
call TriggerAddCondition(t,Condition(function G4H))
call SReal(GetHandleId(t),"x",x*1.)
call SReal(GetHandleId(t),"y",y*1.)
call DA8(GetHandleId(t),"p",p)
call SBool(GetHandleId(t),"NeedFix",GDH)
set J37=true
call G8H(GEH)
call RemoveUnit(GEH)
call G8H(GFH)
call RemoveUnit(GFH)
call G8H(GGH)
call RemoveUnit(GGH)
call G8H(GHH)
call RemoveUnit(GHH)
call G8H(GIH)
call RemoveUnit(GIH)
call G8H(GJH)
call RemoveUnit(GJH)
call G8H(GKH)
call RemoveUnit(GKH)
call G8H(GMH)
call RemoveUnit(GMH)
set GEH=null
set GFH=null
set GGH=null
set GHH=null
set GIH=null
set GJH=null
set GKH=null
set GMH=null
endfunction
function PowerCog_DeathBurn takes nothing returns nothing
local integer FCH=(40+40*JL7)/ 2
call Dmg(J67,GetEnumUnit(),1,I2R(FCH))
call SetUnitState(GetEnumUnit(),UNIT_STATE_MANA,P18(GetUnitState(GetEnumUnit(),UNIT_STATE_MANA)-FCH,0))
endfunction
function GNH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit GOH=(LoadUnitHandle(R8,(W57),(19)))
local group g
if J37==false then
set g=OG8()
set H04=GOH
set J67=GOH
call GroupEnumUnitsInRange(g,GetUnitX(GOH),GetUnitY(GOH),175+25,Condition(function UW8))
call OF8(g)
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set g=null
set GOH=null
return false
endfunction
function GPH takes unit GOH,integer W57,integer V37,player p returns nothing
local trigger t=CreateTrigger()
local integer WED=GetHandleId(t)
call TriggerRegisterDeathEvent(t,GOH)
call SaveUnitHandle(R8,(WED),(19),(GOH))
call TriggerAddCondition(t,Condition(function GNH))
if IsUnitVisibleEx(GOH,p)then
call SBool(W57,"NeedFix",true)
endif
call SUnit(W57,"Cog"+I2S(V37),GOH)
set t=null
endfunction
function GQH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local real VL8=LReal(W57,"Duration")
local integer C77=GetTriggerEvalCount(t)
if C77>R2I(VL8*'d')then
call G9H(W57,LReal(W57,"x"),LReal(W57,"y"),LBool(W57,"NeedFix"),ED8(W57,"Enemy"))
call LT7(W57)
call EA8(t)
else
call F_H(t,LUnit(W57,"Hero"),LReal(W57,"x"),LReal(W57,"y"),LReal(W57,"d"),LInt(W57,"Level"))
endif
set t=null
return false
endfunction
function GRH takes nothing returns nothing
call SetUnitX(GetEnumUnit(),GetUnitX(H04))
call SetUnitY(GetEnumUnit(),GetUnitY(H04))
endfunction
function GSH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7=LUnit(W57,"Hero")
local integer ML8=GetUnitAbilityLevel(AM7,'A0Z5')
local integer ID='u00S'
local real x1=GetUnitX(AM7)
local real y1=GetUnitY(AM7)
local real x2
local real y2
local real d='}'
local unit GOH
local real VL8=4+ML8
local real BufferDuration=5
local group g
local rect GTH
local player GUH
local boolean b=ML8<4
set JL7=ML8
set J37=false
if IsJWPlayer(GetOwningPlayer(AM7))then
set GUH=N8[0]
else
set GUH=G8[0]
endif
call LT7(W57)
call EA8(t)
set t=CreateTrigger()
set W57=GetHandleId(t)
call SBool(W57,"NeedFix",false)
set x2=x1+d
set y2=y1
set GOH=CreateUnit(GetOwningPlayer(AM7),ID,x2,y2,0)
if b then
call UnitAddAbility(GOH,'AZ0F')
endif
call SetUnitPosition(GOH,x2,y2)
call GPH(GOH,W57,1,GUH)
if KR8(GetOwningPlayer(AM7))then
call SUnit(GetHandleId(AM7),"AI|Cog1",GOH)
endif
set x2=x1+d
set y2=y1+d
set GOH=CreateUnit(GetOwningPlayer(AM7),ID,x2,y2,0)
if b then
call UnitAddAbility(GOH,'AZ0F')
endif
call SetUnitPosition(GOH,x2,y2)
call GPH(GOH,W57,2,GUH)
set x2=x1
set y2=y1+d
set GOH=CreateUnit(GetOwningPlayer(AM7),ID,x2,y2,0)
if b then
call UnitAddAbility(GOH,'AZ0F')
endif
call SetUnitPosition(GOH,x2,y2)
call GPH(GOH,W57,3,GUH)
if KR8(GetOwningPlayer(AM7))then
call SUnit(GetHandleId(AM7),"AI|Cog2",GOH)
endif
set x2=x1-d
set y2=y1+d
set GOH=CreateUnit(GetOwningPlayer(AM7),ID,x2,y2,0)
if b then
call UnitAddAbility(GOH,'AZ0F')
endif
call SetUnitPosition(GOH,x2,y2)
call GPH(GOH,W57,4,GUH)
set x2=x1-d
set y2=y1
set GOH=CreateUnit(GetOwningPlayer(AM7),ID,x2,y2,0)
if b then
call UnitAddAbility(GOH,'AZ0F')
endif
call SetUnitPosition(GOH,x2,y2)
call GPH(GOH,W57,5,GUH)
if KR8(GetOwningPlayer(AM7))then
call SUnit(GetHandleId(AM7),"AI|Cog3",GOH)
endif
set x2=x1-d
set y2=y1-d
set GOH=CreateUnit(GetOwningPlayer(AM7),ID,x2,y2,0)
if b then
call UnitAddAbility(GOH,'AZ0F')
endif
call SetUnitPosition(GOH,x2,y2)
call GPH(GOH,W57,6,GUH)
set x2=x1
set y2=y1-d
set GOH=CreateUnit(GetOwningPlayer(AM7),ID,x2,y2,0)
if b then
call UnitAddAbility(GOH,'AZ0F')
endif
call SetUnitPosition(GOH,x2,y2)
call GPH(GOH,W57,7,GUH)
if KR8(GetOwningPlayer(AM7))then
call SUnit(GetHandleId(AM7),"AI|Cog4",GOH)
endif
set x2=x1+d
set y2=y1-d
set GOH=CreateUnit(GetOwningPlayer(AM7),ID,x2,y2,0)
if b then
call UnitAddAbility(GOH,'AZ0F')
endif
call SetUnitPosition(GOH,x2,y2)
call GPH(GOH,W57,8,GUH)
call TriggerRegisterTimerEvent(t,.01,true)
call TriggerAddCondition(t,Condition(function GQH))
call SReal(W57,"Duration",VL8*1.)
call SReal(W57,"x",x1*1.)
call SReal(W57,"y",y1*1.)
call SReal(W57,"d",d*1.)
call SUnit(W57,"Hero",AM7)
call SInt(W57,"Level",ML8)
call DA8(W57,"Enemy",GUH)
set d=d+'n'
set g=OG8()
set GTH=Rect(x1-d,y1-d,x1+d,y1+d)
set H04=AM7
call GroupEnumUnitsInRect(g,GTH,Condition(function VE8))
call ForGroup(g,function GRH)
call OF8(g)
set t=null
set g=null
set AM7=null
set GOH=null
set GTH=null
set GUH=null
return false
endfunction
function GVH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AM7=GetTriggerUnit()
call TriggerRegisterTimerEvent(t,.1,false)
call TriggerAddCondition(t,Condition(function GSH))
call SUnit(W57,"Hero",AM7)
set t=null
set AM7=null
endfunction
function GWH takes nothing returns boolean
if GetSpellAbilityId()=='A0Z5' then
call GVH()
endif
return false
endfunction
function G49 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function GWH))
set t=null
set J37=false
endfunction
function GXH takes nothing returns nothing
if IsCourier(GetEnumUnit())==false then
call Dmg(H04,GetEnumUnit(),NormalFire,H64)
endif
endfunction
function GYH takes unit GZH,real x,real y returns nothing
local real x1
local real y1
local group g=OG8()
local integer GAH=GetUnitAbilityLevel(GZH,'A0Z6')
local real GBH=40+40*GAH
set H04=GZH
set H64=GBH
call GroupEnumUnitsInRange(g,x,y,600,Condition(function UM8))
call ForGroup(g,function GXH)
call OF8(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 S18(GetOwningPlayer(GZH),10,x,y,600)
set g=null
endfunction
function GCH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7
local unit G3H=LUnit(W57,"Projectile")
local real BM7=LReal(W57,"TargetX")
local real BN7=LReal(W57,"TargetY")
local real G6H=LReal(W57,"Angle")
local real GLH=LReal(W57,"SourceX")
local real G1H=LReal(W57,"SourceY")
local real G0H=PQ8(GLH+30*Cos(G6H))
local real G5H=PS8(G1H+30*Sin(G6H))
call SetUnitX(G3H,G0H)
call SetUnitY(G3H,G5H)
call SReal(W57,"SourceX",G0H)
call SReal(W57,"SourceY",G5H)
if Z87(BM7,BN7,G0H,G5H)<=35 then
call KillUnit(G3H)
set AM7=LUnit(W57,"Hero")
call GYH(AM7,G0H,G5H)
call LT7(W57)
call EA8(t)
endif
set t=null
set AM7=null
set G3H=null
return false
endfunction
function G2H takes nothing returns nothing
local unit hn=GetTriggerUnit()
local real GLH=PQ8(GetUnitX(hn))
local real G1H=PS8(GetUnitY(hn))
local location G_H=GetSpellTargetLoc()
local real H4H=PQ8(GetLocationX(G_H))
local real H7H=PS8(GetLocationY(G_H))
local real G6H=Atan2(H7H-G1H,H4H-GLH)
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit G3H=CreateUnit(GetOwningPlayer(hn),'h03Y',GLH,G1H,G6H*bj_RADTODEG)
call RemoveLocation(G_H)
call SetUnitFacing(G3H,G6H*bj_RADTODEG)
call SetUnitPathing(G3H,false)
call AddPermanentAbility(G3H,'Aloc')
call ShowUnit(G3H,false)
call UnitRemoveAbility(G3H,'Aloc')
call ShowUnit(G3H,true)
call SReal(EC8,"OriginalX",GLH)
call SReal(EC8,"OriginalY",G1H)
call SReal(EC8,"SourceX",GLH)
call SReal(EC8,"SourceY",G1H)
call SReal(EC8,"TargetX",H4H)
call SReal(EC8,"TargetY",H7H)
call SReal(EC8,"Angle",G6H)
call SUnit(EC8,"Hero",hn)
call SUnit(EC8,"Projectile",G3H)
call TriggerRegisterTimerEvent(t,.025,true)
call TriggerAddCondition(t,Condition(function GCH))
set hn=null
set G_H=null
set t=null
set G3H=null
endfunction
function H8H takes nothing returns boolean
if GetSpellAbilityId()=='A0Z6' then
call G2H()
endif
return false
endfunction
function G79 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function H8H))
set t=null
endfunction
function H9H takes unit p5,unit m5 returns nothing
local unit AC7=CreateUnit(GetOwningPlayer(p5),'e00E',GetUnitX(m5),GetUnitY(m5),0)
local integer TA8=GetUnitAbilityLevel(p5,'A0Z8')
if TA8==0 then
set TA8=GetUnitAbilityLevel(p5,'A1CV')
endif
call AddPermanentAbility(AC7,'A0Z9')
call SetUnitAbilityLevel(AC7,'A0Z9',TA8)
call IssueTargetOrderById(AC7,852095,m5)
set AC7=null
endfunction
function HDH takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),H24)==false then
call GroupAddUnit(H24,GetEnumUnit())
call H9H(H04,GetEnumUnit())
endif
endfunction
function HEH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local unit m5=LUnit(EC8,"Target")
local integer HFH=LInt(EC8,"MaxLinks")
local integer P89=GetTriggerEvalCount(t)
local unit HGH
local group HHH=LGroup(EC8,"AlreadyAdded")
local group g
local real HIH=200
if m5==null then
set HGH=LUnit(EC8,"HJH"+I2S(HFH+1-P89))
call RemoveUnit(HGH)
else
set HGH=LUnit(EC8,"HJH"+I2S(P89))
call SetUnitX(N28,GetUnitX(HGH))
call SetUnitY(N28,GetUnitY(HGH))
call RemoveUnit(HGH)
if P89==HFH then
set HIH=225
endif
set g=OG8()
set H04=N28
set H24=HHH
call GroupEnumUnitsInRange(g,GetUnitX(N28),GetUnitY(N28),HIH,Condition(function UM8))
call ForGroup(g,function HDH)
call OF8(g)
endif
if P89==HFH then
if m5!=null then
call PauseUnit(m5,false)
endif
call KillTrees(GetUnitX(N28),GetUnitY(N28),'d')
call OF8(HHH)
call LT7(EC8)
call EA8(t)
endif
set t=null
set N28=null
set m5=null
set HGH=null
set HHH=null
set g=null
return false
endfunction
function HKH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local real l4=LReal(EC8,"Angle")
local integer JLE=LInt(EC8,"MaxCount")
local integer P89=GetTriggerEvalCount(t)
local real x=GetUnitX(N28)+P89*50*Cos(l4*bj_DEGTORAD)
local real y=GetUnitY(N28)+P89*50*Sin(l4*bj_DEGTORAD)
local boolean C7D=LBool(EC8,"Scepter")
local unit HMH
local trigger HNH=LTrig(EC8,"Retract")
local integer E9F=GetHandleId(HNH)
local group g=OG8()
local unit m5
local integer ID='u00V'
local real HIH='}'
if P89==1 then
set HIH='d'
endif
set H04=N28
call GroupEnumUnitsInRange(g,x,y,HIH,Condition(function UZ8))
call GroupRemoveUnit(g,N28)
set m5=GroupPickRandomUnit(g)
call OF8(g)
if m5!=null or P89==JLE or P89==(JLE-1)or P89==(JLE-2)then
set ID='u00U'
endif
set HMH=CreateUnit(GetOwningPlayer(N28),ID,x,y,l4)
call SUnit(E9F,"HJH"+I2S(P89),HMH)
if m5!=null then
if(IsUnitAlly(m5,GetOwningPlayer(N28))and C7D==false)or GetOwningPlayer(m5)==O8 or LState(m5,"Frozen")then
set m5=null
endif
call LT7(EC8)
call EA8(t)
if m5!=null and IsUnitAlly(m5,GetOwningPlayer(N28))==false then
call PauseUnit(m5,true)
endif
call TriggerRegisterTimerEvent(HNH,.5/ JLE,true)
call TriggerAddCondition(HNH,Condition(function HEH))
call SInt(E9F,"MaxLinks",P89)
call SUnit(E9F,"Target",m5)
call SUnit(E9F,"Hero",N28)
call SGroup(E9F,"AlreadyAdded",OG8())
elseif P89>JLE then
set m5=null
call LT7(EC8)
call EA8(t)
call TriggerRegisterTimerEvent(HNH,.5/ JLE,true)
call TriggerAddCondition(HNH,Condition(function HEH))
call SInt(E9F,"MaxLinks",P89)
call SUnit(E9F,"Target",m5)
call SUnit(E9F,"Hero",N28)
call SGroup(E9F,"AlreadyAdded",OG8())
endif
set t=null
set N28=null
set HMH=null
set HNH=null
set g=null
set m5=null
return false
endfunction
function HJH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit N28=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real l4=YI7(GetUnitX(N28),GetUnitY(N28),GetLocationX(l),GetLocationY(l))
local integer TA8=GetUnitAbilityLevel(N28,'A0Z8')
local integer HOH
local integer JLE
local boolean C7D=true
if TA8==0 then
set TA8=GetUnitAbilityLevel(N28,'A1CV')
set C7D=true
endif
set HOH=1500+500*TA8
set JLE=HOH/ 50
call SUnit(EC8,"Hero",N28)
call SInt(EC8,"Level",TA8)
call SReal(EC8,"Angle",l4*1.)
call SInt(EC8,"MaxCount",JLE)
call STrig(EC8,"Retract",CreateTrigger())
call SBool(EC8,"Scepter",C7D)
call TriggerRegisterTimerEvent(t,.5/ JLE,true)
call TriggerAddCondition(t,Condition(function HKH))
call RemoveLocation(l)
set t=null
set N28=null
set l=null
endfunction
function HPH takes nothing returns boolean
if GetSpellAbilityId()=='A0Z8' or GetSpellAbilityId()=='A1CV' then
call HJH()
endif
return false
endfunction
function G89 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function HPH))
set t=null
endfunction
function HQH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local real P08
if ML8==1 then
set P08=15
elseif ML8==2 then
set P08=30
elseif ML8==3 then
set P08=40
elseif ML8==4 then
set P08=50
endif
if GetTriggerEvalCount(t)==3 or GetTriggerEvalCount(t)==4 then
call Dmg(Z77,X77,NormalFire,P08)
endif
if GetTriggerEvalCount(t)==4 then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call UnitRemoveAbility(X77,'A1VS')
call UnitRemoveAbility(X77,'B0DN')
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function HRH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,'AHtb')
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetEventDamageSource()==Z77 and GetEventDamage()==0 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function HQH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("Environment\\LargeBuildingFire\\LargeBuildingFire1.mdl",X77,"chest")))
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A1VS',false)
call AddPermanentAbility(X77,'A1VS')
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function HSH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local real d=Z47(Z77,X77)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,6,false)
call TriggerAddCondition(t,Condition(function HRH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call RW8(X77,'A1VS',1,2,Z77,'AHtb',false)
set t=null
set Z77=null
set X77=null
endfunction
function HTH 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 HUH takes nothing returns boolean
if GetSpellAbilityId()=='AHtb' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST then
call HTH()
elseif HasLinkin(GetSpellTargetUnit())==false then
call HSH()
endif
endif
return false
endfunction
function F09 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function HUH))
set t=null
endfunction
function HVH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call SelectUnitForPlayerSingle(Z77,GetOwningPlayer(Z77))
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function HWH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer ML8=GetUnitAbilityLevel(Z77,'A01Y')
local real VL8=360-'d'*ML8
local unit AC7
if TimerGetRemaining(M_4[GetPlayerId(GetOwningPlayer(Z77))])==0 and GetUnitState(Z77,UNIT_STATE_MANA)>=140 then
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
call UnitAddAbility(AC7,'A274')
call IssueImmediateOrderById(AC7,852096)
call TimerStart(M_4[GetPlayerId(GetOwningPlayer(Z77))],VL8,false,null)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,3+.01,false)
call TriggerAddCondition(t,Condition(function HVH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
endif
set t=null
set Z77=null
set AC7=null
return false
endfunction
function HXH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
call TriggerRegisterDeathEvent(t,Z77)
call TriggerAddCondition(t,Condition(function HWH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=null
set Z77=null
endfunction
function HYH takes nothing returns boolean
if GetLearnedSkill()=='A01Y' and GetUnitAbilityLevel(GetTriggerUnit(),'A01Y')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call HXH()
endif
return false
endfunction
function F29 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function HYH))
set t=null
endfunction
function HZH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,'A2S0')
local real HAH=(LoadReal(R8,(W57),(797)))
local real HBH=(LoadReal(R8,(W57),(798)))
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call SaveInteger(R8,(GetHandleId((Z77))),((4338)),(2))
call AddPermanentAbility(Z77,'A2RZ')
call SetUnitAbilityLevel(Z77,'A2RZ',ML8)
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif HAH>0 then
call SaveInteger(R8,(GetHandleId((Z77))),((4338)),(2))
if GetUnitTypeId(Z77)=='NC00' then
call AddPermanentAbility(Z77,'A2RZ')
call SetUnitAbilityLevel(Z77,'A2RZ',ML8)
endif
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
if O18(Z77)==false then
call SetUnitState(Z77,UNIT_STATE_LIFE,P18(1,GetUnitState(Z77,UNIT_STATE_LIFE)-HAH))
endif
if O18(X77)==false then
call SetUnitState(X77,UNIT_STATE_LIFE,GetUnitState(X77,UNIT_STATE_LIFE)+HAH)
endif
else
set HAH=GetUnitState(X77,UNIT_STATE_MAX_LIFE)*.2
call SetUnitState(Z77,UNIT_STATE_LIFE,GetUnitState(Z77,UNIT_STATE_LIFE)+HAH)
call SetUnitState(X77,UNIT_STATE_LIFE,P18(1,GetUnitState(X77,UNIT_STATE_LIFE)-HAH))
call SaveReal(R8,(W57),(797),((HAH)*1.))
call SaveReal(R8,(W57),(798),((HBH)*1.))
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function HCH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
call TriggerRegisterTimerEvent(t,.01,false)
call TriggerRegisterTimerEvent(t,7,false)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerAddCondition(t,Condition(function HZH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveReal(R8,(W57),(797),((0)*1.))
call SaveReal(R8,(W57),(798),((0)*1.))
call SaveEffectHandle(R8,(W57),(175),(AddSpecialEffectTarget("war3mapImported\\MortalStrikeCaster.mdx",Z77,"overhead")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget("war3mapImported\\MortalStrikeTarget.mdx",X77,"overhead")))
call SaveInteger(R8,(GetHandleId((Z77))),((4338)),(1))
call UnitRemoveAbility(Z77,'A2RZ')
set t=null
set Z77=null
set X77=null
endfunction
function H3H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(GetTriggerUnit(),'A2S0')
if ML8==1 then
call AddPermanentAbility(Z77,'A2RZ')
elseif((LoadInteger(R8,(GetHandleId((Z77))),((4338))))==1)==false then
call SetUnitAbilityLevel(Z77,'A2RZ',ML8)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2RZ',false)
set Z77=null
endfunction
function NewVampAura takes nothing returns nothing
local unit s=GetTriggerUnit()
if GetUnitAbilityLevel(s,'AUav')==1 then
set skingcount=skingcount+1
set sking[skingcount]=s
call UnitAddAbility(s,'AF3Y')
call SetPlayerAbilityAvailable(GetOwningPlayer(s),'AF3Y',false)
elseif GetUnitAbilityLevel(s,'AUav')>1 then
call SetUnitAbilityLevel(s,'AF4Y',GetUnitAbilityLevel(s,'AUav'))
endif
set s=null
endfunction
function NewMortalStrike takes nothing returns nothing
local unit s=GetTriggerUnit()
if GetUnitAbilityLevel(s,'A2S0')==1 then
call UnitAddAbility(s,'AF5Y')
elseif GetUnitAbilityLevel(s,'A2S0')>1 then
call SetUnitAbilityLevel(s,'AF5Y',GetUnitAbilityLevel(s,'A2S0'))
endif
set s=null
endfunction
function H6H takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_HERO_SKILL then
if GetLearnedSkill()=='A2S0' and IsUnitIllusion(GetTriggerUnit())==false then
call NewMortalStrike()
call H3H()
elseif GetLearnedSkill()=='AUav' then
call NewVampAura()
endif
else
if GetSpellAbilityId()=='A2S0' then
call IssueImmediateOrderById(GetTriggerUnit(),851972)
endif
endif
return false
endfunction
function F59 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function H6H))
set t=null
endfunction
function HLH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=LUnit(EC8,"Source")
call LT7(EC8)
call EA8(t)
call W78(p5,0)
set t=null
set p5=null
return false
endfunction
function H1H takes nothing returns boolean
if GetUnitTypeId(GetFilterUnit())==GetUnitTypeId(BB)and GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(BB)and IsUnitIllusion(GetFilterUnit())then
call SetUnitX(GetFilterUnit(),OB)
call SetUnitY(GetFilterUnit(),AB)
call IssueTargetOrderById(GetFilterUnit(),851983,cB)
endif
return false
endfunction
function H0H takes nothing returns nothing
local unit p5=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local real t5=GetUnitX(p5)
local real w5=GetUnitY(p5)
local real Y5=GetUnitX(m5)
local real Z5=GetUnitY(m5)
local real l4=YI7(t5,w5,Y5,Z5)
local real AYE=Z87(t5,w5,Y5,Z5)
local real d=GetRandomReal(AYE*.3,AYE*.8)
local integer TA8=GetUnitAbilityLevel(p5,'A0RW')
local real RIF=t5+d*Cos(l4*bj_DEGTORAD)
local real RJF=w5+d*Sin(l4*bj_DEGTORAD)
local unit u=CreateUnit(GetOwningPlayer(p5),EB,RIF,RJF,0)
local unit u2
local group g
local trigger t
local integer EC8
call SetUnitX(p5,RIF)
call SetUnitY(p5,RJF)
call SetUnitFacing(p5,-l4)
call PlaySoundOnUnitBJ(zE,'d',m5)
if IsUnitEnemy(m5,GetOwningPlayer(p5))and GetUnitTypeId(m5)!='n00L' then
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1.2,false)
call TriggerRegisterUnitEvent(t,p5,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function HLH))
call SUnit(EC8,"Source",p5)
set t=null
call W78(p5,25*TA8)
set RIF=t5+(d-25)*Cos(l4*bj_DEGTORAD)
set RJF=w5+(d-25)*Sin(l4*bj_DEGTORAD)
call AddTimedBoolBuff(m5,"4405",1)
call SetUnitX(m5,RIF)
call SetUnitY(m5,RJF)
call SetUnitFacing(m5,l4)
call IssueTargetOrderById(p5,851983,m5)
set g=OG8()
set OB=RIF
set AB=RJF
set BB=p5
set cB=m5
call GroupEnumUnitsInRange(g,t5,w5,1400,Condition(function H1H))
call OF8(g)
set u2=CreateUnit(GetOwningPlayer(p5),EB,RIF,RJF,0)
call KillUnit(u2)
endif
call KillUnit(u)
set p5=null
set m5=null
set u=null
set u2=null
set g=null
endfunction
function H5H takes nothing returns boolean
if GetSpellAbilityId()=='A0RW' then
call H0H()
endif
return false
endfunction
function H2H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local unit u=CreateUnit(GetOwningPlayer(N28),EB,GetUnitX(N28),GetUnitY(N28),0)
call PlaySoundOnUnitBJ(zE,'d',N28)
call KillUnit(u)
call LT7(EC8)
call EA8(t)
set u=null
set t=null
set N28=null
return false
endfunction
function H_H takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerAddCondition(t,Condition(function H2H))
call TriggerRegisterTimerEvent(t,.3,false)
call SUnit(EC8,"Hero",GetTriggerUnit())
set t=null
endfunction
function I4H takes nothing returns boolean
if GetSpellAbilityId()=='A0RW' then
call H_H()
endif
return false
endfunction
function CN8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function H5H))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function I4H))
set t=null
endfunction
function I7H takes nothing returns boolean
return GetSpellAbilityId()=='A065'
endfunction
function I8H takes nothing returns nothing
local integer T8=0
local integer U8=5
local integer array I9H
local player array IDH
local integer TS9
local item Z4
set I9H[0]=0
set I9H[1]=0
set I9H[2]=0
set I9H[3]=0
set I9H[4]=0
set I9H[5]=0
call DisableTrigger(GW4)
loop
exitwhen T8>U8
set TS9=ZX7(UnitItemInSlot(GetTriggerUnit(),T8))
if TS9==heihuangzhang or TS9==WL or TS9==ZL or TS9==AL or TS9==LL or TS9==D1 or TS9==E1 or TS9==zhipeitoukui or TS9==silingshu or TS9==silingshu2 or TS9==silingshu3 or TS9==maidasizhishou or TS9==shuaxinqiu or TS9==W5 or TS9==mifaxie then
set I9H[T8]=GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),T8))
set IDH[T8]=GetItemPlayer(UnitItemInSlot(GetTriggerUnit(),T8))
call RemoveItem(UnitItemInSlot(GetTriggerUnit(),T8))
endif
set T8=T8+1
endloop
call UnitResetCooldown(GetTriggerUnit())
set T8=0
set U8=5
loop
exitwhen T8>U8
if I9H[T8]>0 then
set Z4=CreateItem(I9H[T8],0,0)
call SetItemPlayer(Z4,IDH[T8],false)
call SetItemUserData(Z4,1)
call UnitAddItem(GetTriggerUnit(),Z4)
endif
set T8=T8+1
endloop
call EnableTrigger(GW4)
set Z4=null
endfunction
function BP8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(t,Condition(function I7H))
call TriggerAddAction(t,function I8H)
endfunction
function IEH takes nothing returns nothing
call Dmg(A94,GetEnumUnit(),NormalFire,(60.+20.*AD4)*.25)
endfunction
function IFH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer C77=GetTriggerEvalCount(t)
local group g
if C77==20 or GetTriggerEventId()==EVENT_UNIT_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set H04=Z77
set A94=Z77
set AD4=GetUnitAbilityLevel(Z77,'A05G')
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),275,Condition(function UM8))
call ForGroup(g,function IEH)
call OF8(g)
set g=null
endif
set t=null
set Z77=null
return false
endfunction
function IGH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function IFH))
call SaveUnitHandle(R8,(W57),(2),(GetTriggerUnit()))
call TriggerEvaluate(t)
call AddTimedBoolBuff(GetTriggerUnit(),"BladeFury|Active",5)
endfunction
function IHH takes nothing returns boolean
if GetSpellAbilityId()=='A05G' then
call IGH()
endif
return false
endfunction
function AJ8 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IHH))
set t=null
endfunction
function IIH takes nothing returns nothing
local integer O5=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
local integer i1
local unit it=null
local item ZV7=null
local integer i
local boolean J4=false
local player p=null
if(not RY4[O5])or(GetItemTypeId(GetManipulatedItem())=='I02M')or(not IsTriggerEnabled(GW4))or(GetUnitTypeId(GetTriggerUnit())=='e00E')then
return
elseif(GetItemType(GetManipulatedItem())==ITEM_TYPE_POWERUP)or(GetItemTypeId(GetManipulatedItem())=='I0HM')then
call J3(it,false)
return
endif
set ZV7=GetManipulatedItem()
set p=GetItemPlayer(ZV7)
if(p==Player(15))then
set p=ON7
endif
if(p!=Player(O5))or(ZV7==OI7[336+O5])then
set it=GetTriggerUnit()
set i1=ZU7(ZV7)
if(IsUnitType(it,UNIT_TYPE_HERO)and(GetUnitTypeId(it)!='H00J'))then
set bj_lastCreatedItem=null
if OJ7[288+O5]==0 and(Bz>OJ7[160+O5])and((XZF(i1)or XAF(i1))and((not IsItemPowerup(ZV7))or(not AS7(it))or(AR7(it,BU[tieshuzhigan]))))then
set OJ7[288+O5]=i1
if bj_lastCreatedItem!=null and IsItemPowerup(ZV7)then
set J4=true
endif
endif
if(i1==OJ7[288+O5]or i1==F1 or i1==J0 or i1==N0 or i1==zhenshibaoshi or i1==OW)then
set OJ7[288+O5]=i1
if IsItemPowerup(ZV7)and AS7(it)and(YZF(O5,it)!=-1 or YAF(O5,it))then
set J4=(i1!=ZU7(bj_lastCreatedItem))
endif
endif
if J4 then
set eY[512+O5]=0
set OM7[304+O5]=true
call UnitRemoveItem(it,bj_lastCreatedItem)
call SetItemPosition(bj_lastCreatedItem,GetUnitX(it),GetUnitY(it))
loop
exitwhen eY[512+O5]!=0
call TriggerSleepAction(.1)
endloop
set OI7[320+O5]=OI7[288+O5]
call J3(it,false)
call FXG(it)
endif
endif
if(not IsItemPowerup(ZV7))then
if i1==OJ7[288+O5]then
call Y07(1.)
set OJ7[288+O5]=0
else
if PI4 and GetItemType(ZV7)==ITEM_TYPE_PERMANENT and GetItemTypeId(ZV7)==BU[i1]then
else
set OM7[304+O5]=true
call UnitDropItemPoint(it,ZV7,GetUnitX(it),GetUnitY(it))
endif
endif
endif
set it=null
endif
set ZV7=null
set p=null
endfunction
function DisplayOrder takes nothing returns nothing
call DisplayTimedTextToPlayer(GetOwningPlayer(GetTriggerUnit()),0,0,10,I2S(GetIssuedOrderId())+": "+OrderId2String(GetIssuedOrderId()))
endfunction
function IJH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer iX=GetTriggerEvalCount(t)
local unit p5=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
local integer TA8=LInt(EC8,"Level")
local real IKH
local unit IMH
set IKH=.6*(iX-25)*(iX-25)
if iX<51 then
if ModuloInteger(iX,5)==0 then
call Dmg(p5,m5,NormalFire,3+3*TA8)
endif
if H7E(m5)==false then
call SetUnitFlyHeight(m5,500-IKH,0)
endif
else
set IMH=CreateUnit(GetOwningPlayer(p5),'e00E',GetUnitX(m5),GetUnitY(m5),0)
call AddPermanentAbility(IMH,'A11L')
call SetUnitAbilityLevel(IMH,'A11L',TA8)
call IssueTargetOrderById(IMH,852075,m5)
if H7E(m5)==false then
call SetUnitFlyHeight(m5,GetUnitDefaultFlyHeight(m5),0)
endif
if U9==false then
call PauseUnit(m5,false)
endif
call SetUnitPathing(m5,true)
call LT7(EC8)
call EA8(t)
endif
set t=null
set p5=null
set m5=null
set IMH=null
return false
endfunction
function INH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit p5=H04
local unit m5=GetEnumUnit()
local integer TA8=HB4
call PauseUnit(m5,true)
call SetUnitPathing(m5,false)
if H7E(m5)==false then
call AddPermanentAbility(m5,'Amrf')
call UnitRemoveAbility(m5,'Amrf')
endif
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerAddCondition(t,Condition(function IJH))
call SUnit(EC8,"Source",p5)
call SUnit(EC8,"Target",m5)
call SInt(EC8,"Level",TA8)
call Dmg(p5,m5,NormalFire,30+30*TA8)
set t=null
set p5=null
set m5=null
endfunction
function IOH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
local integer TA8=LInt(EC8,"Level")
local group g=OG8()
local ubersplat GRD=CreateUbersplat(x,y,"THNN",255,255,255,255,false,false)
call SetUbersplatRenderAlways(GRD,true)
call S18(GetOwningPlayer(N28),4,x,y,400)
call DestroyEffect(LEff(EC8,"FX1"))
call DestroyEffect(LEff(EC8,"FX2"))
call DestroyEffect(LEff(EC8,"FX3"))
call DestroyEffect(LEff(EC8,"FX4"))
call DestroyEffect(LEff(EC8,"FX5"))
call DestroyEffect(LEff(EC8,"FX6"))
call LT7(EC8)
call EA8(t)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",x,y))
call DestroyEffect(AddSpecialEffect("effects\\TidalErruption.mdx",x,y))
set H04=N28
set HB4=TA8
call GroupEnumUnitsInRange(g,x,y,225+25,Condition(function UW8))
call ForGroup(g,function INH)
call OF8(g)
set t=null
set N28=null
return false
endfunction
function IPH takes nothing returns nothing
local unit N28=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=GetUnitAbilityLevel(N28,'A136')
local string s=""
local real a
if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(N28))or N08(GetLocalPlayer())then
set s="Objects\\Spawnmodels\\Other\\IllidanFootprint\\IllidanWaterSpawnFootPrint.mdl"
endif
call RemoveLocation(l)
call SInt(EC8,"Level",TA8)
call SUnit(EC8,"Hero",N28)
call SReal(EC8,"x",x)
call SReal(EC8,"y",y)
call SInt(EC8,"Level",TA8)
set a=0
call SEff(EC8,"FX1",AddSpecialEffect(s,x+40*Cos(a/ 6*360*bj_DEGTORAD),y+40*Sin(a/ 6*360*bj_DEGTORAD)))
set a=1
call SEff(EC8,"FX2",AddSpecialEffect(s,x+40*Cos(a/ 6*360*bj_DEGTORAD),y+40*Sin(a/ 6*360*bj_DEGTORAD)))
set a=2
call SEff(EC8,"FX3",AddSpecialEffect(s,x+40*Cos(a/ 6*360*bj_DEGTORAD),y+40*Sin(a/ 6*360*bj_DEGTORAD)))
set a=3
call SEff(EC8,"FX4",AddSpecialEffect(s,x+40*Cos(a/ 6*360*bj_DEGTORAD),y+40*Sin(a/ 6*360*bj_DEGTORAD)))
set a=4
call SEff(EC8,"FX5",AddSpecialEffect(s,x+40*Cos(a/ 6*360*bj_DEGTORAD),y+40*Sin(a/ 6*360*bj_DEGTORAD)))
set a=5
call SEff(EC8,"FX6",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 IOH))
set N28=null
set t=null
set l=null
endfunction
function IQH takes nothing returns boolean
if GetSpellAbilityId()=='A136' then
call IPH()
endif
return false
endfunction
function G99 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IQH))
set t=null
endfunction
function FID takes nothing returns nothing
call SetPlayerAbilityAvailable(GetOwningPlayer(B2),'A147',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(B2),'A148',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(B2),'A11U',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(B2),'A149',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(C2),'A147',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(C2),'A148',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(C2),'A11U',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(C2),'A149',false)
endfunction
function IRH takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local integer KC8=GetHandleId(t)
local unit AM7=LUnit(KC8,"Hero")
local real ISH=ZM7()
local integer ML8=GetUnitAbilityLevel(AM7,'A13T')
local real ITH=LReal(GetHandleId(AM7),"WaterSword|LastUsed")
local boolean IUH=LBool(GetHandleId(AM7),"WaterSword|Active")
if ISH-ITH>16-ML8*3 and IUH==false and GetUnitTypeId(AM7)=='H06S' and O18(AM7)==false then
call SBool(GetHandleId(AM7),"WaterSword|Active",true)
call UnitAddAbility(AM7,'A11O')
call SetUnitAbilityLevel(AM7,'A11O',ML8)
call UnitAddAbility(AM7,'A11R')
if ML8==1 then
call AddPermanentAbility(AM7,'A147')
elseif ML8==2 then
call AddPermanentAbility(AM7,'A148')
elseif ML8==3 then
call AddPermanentAbility(AM7,'A11U')
elseif ML8==4 then
call AddPermanentAbility(AM7,'A149')
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),'A147',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),'A148',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),'A11U',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(AM7),'A149',false)
elseif IUH==false then
call UnitRemoveAbility(AM7,'A11O')
call UnitRemoveAbility(AM7,'A11R')
call UnitRemoveAbility(AM7,'A147')
call UnitRemoveAbility(AM7,'A148')
call UnitRemoveAbility(AM7,'A11U')
call UnitRemoveAbility(AM7,'A149')
endif
set t=null
set AM7=null
endfunction
function IVH takes nothing returns boolean
local unit AM7=GetTriggerUnit()
call SBool(GetHandleId(AM7),"WaterSword|Active",false)
call SReal(GetHandleId(AM7),"WaterSword|LastUsed",ZM7())
call UnitRemoveAbility(AM7,'A11O')
call UnitRemoveAbility(AM7,'A11R')
call UnitRemoveAbility(AM7,'A147')
call UnitRemoveAbility(AM7,'A148')
call UnitRemoveAbility(AM7,'A11U')
call UnitRemoveAbility(AM7,'A149')
set AM7=null
return false
endfunction
function IWH takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer KC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddAction(t,function IRH)
call SUnit(KC8,"Hero",AM7)
call SReal(KC8,"WaterSword|LastUsed",.0)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function IVH))
set AM7=null
set t=null
endfunction
function IXH takes nothing returns boolean
if GetLearnedSkill()=='A13T' and GetUnitAbilityLevel(GetTriggerUnit(),'A13T')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call IWH()
endif
return false
endfunction
function IYH takes nothing returns boolean
return GetUnitAbilityLevel(GetAttacker(),'A13T')>0
endfunction
function IZH takes nothing returns nothing
local unit AM7=GetEventDamageSource()
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetUnitAbilityLevel(AM7,'A13T')>0 and IsPlayerEnemy(GetOwningPlayer(AM7),GetOwningPlayer(GetTriggerUnit()))then
if LBool(GetHandleId(AM7),"WaterSword|Active")then
call SBool(GetHandleId(AM7),"WaterSword|Active",false)
call SReal(GetHandleId(AM7),"WaterSword|LastUsed",ZM7())
call UnitRemoveAbility(AM7,'A11O')
call UnitRemoveAbility(AM7,'A11R')
call UnitRemoveAbility(AM7,'A147')
call UnitRemoveAbility(AM7,'A148')
call UnitRemoveAbility(AM7,'A11U')
call UnitRemoveAbility(AM7,'A149')
call NP8(GetTriggeringTrigger())
endif
endif
else
call NP8(GetTriggeringTrigger())
endif
set AM7=null
endfunction
function IAH takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerAddAction(t,function IZH)
set t=null
endfunction
function GD9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function IXH))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function IYH))
call TriggerAddAction(t,function IAH)
set t=null
endfunction
function IBH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local image i=EM8(EC8,"i")
local real x=LReal(EC8,"x")
local real y=LReal(EC8,"y")
local unit Z77=LUnit(EC8,"Source")
if GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='A13D')then
if GetTriggerEventId()!=EVENT_UNIT_DEATH and GU8(m5)==false then
call SetUnitPosition(m5,x,y)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A13D',false)
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A11N' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A11N',true)
endif
call SBool(GetHandleId(m5),"XMarked",false)
call DestroyEffect(LEff(EC8,"FX"))
call ShowImage(i,false)
call DestroyImage(i)
call LT7(EC8)
call EA8(t)
endif
set t=null
set m5=null
set i=null
set Z77=null
return false
endfunction
function ICH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local real x=GetUnitX(X77)
local real y=GetUnitY(X77)
local real I3H=90
local image i=CreateImage("Fonts\\X.blp",I3H,I3H,0,x-I3H/ 2,y-I3H/ 2,0,0,0,0,2)
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local string fx=""
local integer ML8=GetUnitAbilityLevel(Z77,'A11N')
call AddTimedBoolBuff(X77,"4401",5)
call AddPermanentAbility(Z77,'A13D')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A13D',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A11N',false)
call SetImageRenderAlways(i,true)
if IsUnitAlly(X77,GetOwningPlayer(Z77))then
set ML8=ML8*2
endif
if IsUnitAlly(Z77,GetOwningPlayer(X77))==false or IsUnitAlly(X77,GetLocalPlayer())or N08(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(Z77),'o01Z',x,y,0),'BTLF',5)
call TriggerRegisterTimerEvent(t,ML8,false)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IBH))
call SBool(GetHandleId(X77),"XMarked",true)
call D28(W57,"i",i)
call SUnit(W57,"Target",X77)
call SReal(W57,"x",x)
call SReal(W57,"y",y)
call SEff(W57,"FX",AddSpecialEffectTarget(fx,X77,"overhead"))
call SUnit(W57,"Source",Z77)
call SReal(GetHandleId(X77),"AI|XMark|X",x)
call SReal(GetHandleId(X77),"AI|XMark|Y",y)
set Z77=null
set X77=null
set i=null
set t=null
endfunction
function I6H takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A11N' and(IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))or HasLinkin(GetSpellTargetUnit())==false)then
call ICH()
endif
else
if GetLearnedSkill()=='A11N' then
call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),'A13D',false)
call AddPermanentAbility(GetTriggerUnit(),'A13D')
endif
endif
return false
endfunction
function ILH takes nothing returns boolean
if GetSpellAbilityId()=='A11N' then
if LBool(GetHandleId(GetOwningPlayer(GetSpellTargetUnit())),"DisableHelp")and IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n038'))
endif
endif
return false
endfunction
function GE9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function I6H))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function ILH))
set t=null
endfunction
function I1H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local integer I0H=1
local player p
local real d
local unit m5=LUnit(EC8,"Target")
local integer I5H=LInt(EC8,"MaxIndex")
local unit IMH
local integer Hk=LInt(EC8,"Duration")
if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>Hk then
call LT7(EC8)
call EA8(t)
else
loop
exitwhen I0H>I5H
set p=ED8(EC8,"Player|"+I2S(I0H))
set d=LReal(EC8,"Damage|"+I2S(I0H))
if p==null then
set I0H=I5H
else
set IMH=CreateUnit(p,'e00E',0,0,0)
call SetUnitState(m5,UNIT_STATE_LIFE,P18(1,GetUnitState(m5,UNIT_STATE_LIFE)-d/ Hk))
endif
set I0H=I0H+1
endloop
endif
set t=null
set p=null
set m5=null
set IMH=null
return false
endfunction
function I2H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local player p=ED8(EC8,"p")
local trigger I_H=LTrig(EC8,"Phase2")
local integer I0H=GetTriggerEvalCount(t)
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
call LT7(EC8)
call EA8(t)
call TriggerRegisterTimerEvent(I_H,1,true)
call TriggerAddCondition(I_H,Condition(function I1H))
call UnitRemoveAbility(m5,'B09U')
else
set EC8=GetHandleId(I_H)
call SetUnitState(m5,UNIT_STATE_LIFE,GetUnitState(m5,UNIT_STATE_LIFE)+.5*GetEventDamage())
call DA8(EC8,"Player|"+I2S(I0H),GetOwningPlayer(GetEventDamageSource()))
call SReal(EC8,"Damage|"+I2S(I0H),.5*GetEventDamage())
call SInt(EC8,"MaxIndex",I0H)
endif
set t=null
set m5=null
set p=null
set I_H=null
return false
endfunction
function J4H takes nothing returns nothing
local unit p5=DT
local unit m5=GetEnumUnit()
local integer TA8=ET
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer Hk=8
local trigger I_H=CreateTrigger()
call TZ8(m5,'A126',1,Hk)
call SetPlayerAbilityAvailable(GetOwningPlayer(m5),'A126',false)
call TriggerRegisterTimerEvent(t,Hk+.01,false)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function I2H))
call DA8(EC8,"p",GetOwningPlayer(p5))
call SUnit(EC8,"Target",m5)
call STrig(EC8,"Phase2",I_H)
call SUnit(GetHandleId(I_H),"Target",m5)
call SInt(GetHandleId(I_H),"Duration",Hk)
set p5=null
set m5=null
set t=null
set I_H=null
endfunction
function J7H takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and IsUnitInGroup(GetFilterUnit(),gN)==false then
call GroupAddUnit(gN,GetFilterUnit())
return true
endif
return false
endfunction
function J8H takes nothing returns nothing
local unit Z77=DT
local unit X77=GetEnumUnit()
local integer ML8=ET
call Stun(Z77,X77,1.4)
call Dmg(Z77,X77,NormalFire,300+'d'*ML8)
set Z77=null
set X77=null
endfunction
function J9H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit S08=LUnit(W57,"Projectile")
local unit JDH
local real CV7=LReal(W57,"Angle")
local real BJ7=GetUnitX(S08)
local real BK7=GetUnitY(S08)
local real BM7=LReal(W57,"x2")
local real BN7=LReal(W57,"y2")
local integer C77=GetTriggerEvalCount(t)
local real S_8=PQ8(BM7+13.33*C77*Cos(CV7))
local real T48=PS8(BN7+13.33*C77*Sin(CV7))
local integer ML8=LInt(W57,"Level")
local group XCD=LGroup(W57,"AlreadyHit")
local group g
if C77<19 then
call SetUnitVertexColor(S08,255,255,255,5+C77*10)
set JDH=LUnit(W57,"Projectile2")
call SetUnitVertexColor(JDH,255,255,255,5+C77*10)
elseif C77<'}' then
call SetUnitVertexColor(S08,255,255,255,190)
elseif C77<150 then
endif
set g=OG8()
set gN=XCD
set H04=S08
set DT=S08
set ET=ML8
call GroupEnumUnitsInRange(g,GetUnitX(S08),GetUnitY(S08),425,Condition(function J7H))
call ForGroup(g,function J4H)
call OF8(g)
call SetUnitX(S08,S_8)
call SetUnitY(S08,T48)
if C77==140 then
set JDH=LUnit(W57,"Projectile2")
call KillUnit(JDH)
elseif C77<140 then
set JDH=LUnit(W57,"Projectile2")
call SetUnitX(JDH,S_8)
call SetUnitY(JDH,T48)
endif
if C77==150 then
set g=OG8()
set H04=S08
call GroupEnumUnitsInRange(g,S_8,T48,425+25,Condition(function UM8))
call ForGroup(g,function J8H)
call OF8(g)
call KillUnit(S08)
call OF8(XCD)
call LT7(W57)
call EA8(t)
endif
set t=null
set S08=null
set JDH=null
set XCD=null
set g=null
return false
endfunction
function JEH takes nothing returns nothing
local unit N28=GetTriggerUnit()
local real iN=GetUnitX(N28)
local real io=GetUnitY(N28)
local location l=GetSpellTargetLoc()
local real EBE=GetLocationX(l)
local real ECE=GetLocationY(l)
local real RK
local real x1
local real y1
local real x2
local real y2
local trigger t
local integer EC8
local integer TA8
local unit IJ
local unit JDH
local string s=""
local integer JFH='h06U'
if GetRandomInt(0,5)==0 then
set JFH='h0DJ'
endif
if IsPlayerAlly(GetOwningPlayer(N28),GetLocalPlayer())or N08(GetLocalPlayer())then
set s="war3mapImported\\Whirlpool.mdx"
endif
if EBE==GetUnitX(N28)and ECE==GetUnitY(N28)then
set EBE=EBE+50*Cos(GetUnitFacing(N28)*bj_DEGTORAD)
set ECE=ECE+50*Sin(GetUnitFacing(N28)*bj_DEGTORAD)
endif
set RK=Atan2(ECE-io,EBE-iN)
set x1=iN-1000*Cos(RK)
set y1=io-1000*Sin(RK)
set x2=iN+1000*Cos(RK)
set y2=io+1000*Sin(RK)
set t=CreateTrigger()
set EC8=GetHandleId(t)
set TA8=GetUnitAbilityLevel(N28,'A11K')
set IJ=CreateUnit(GetOwningPlayer(N28),JFH,x1,y1,Atan2(ECE-io,EBE-iN)*bj_RADTODEG)
set JDH=CreateUnit(GetOwningPlayer(N28),'h06V',x1,y1,Atan2(ECE-io,EBE-iN)*bj_RADTODEG)
call SetUnitVertexColor(IJ,255,255,255,0)
call SetUnitPathing(IJ,false)
call RemoveLocation(l)
call SInt(EC8,"Level",TA8)
call SReal(EC8,"Angle",RK)
call SUnit(EC8,"Projectile",IJ)
call SUnit(EC8,"Projectile2",JDH)
call SReal(EC8,"x2",x1)
call SReal(EC8,"y2",y1)
call SGroup(EC8,"AlreadyHit",OG8())
call DestroyEffect(AddSpecialEffect(s,PQ8(x2),PS8(y2)))
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function J9H))
set N28=null
set t=null
set IJ=null
set JDH=null
set l=null
endfunction
function JGH takes nothing returns boolean
if GetSpellAbilityId()=='A11K' then
call JEH()
endif
return false
endfunction
function GF9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function JGH))
call PU8('A11L')
set t=null
endfunction
function JHH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
if EI8(EC8,"Light")!=null then
call DestroyLightning(EI8(EC8,"Light"))
endif
call LT7(EC8)
call EA8(t)
set t=null
return false
endfunction
function JIH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit VA8=LUnit(EC8,"Projectile")
local unit m5=LUnit(EC8,"Target")
local real JJH=LReal(EC8,"OriginalAngle")
local real l4=Atan2(GetUnitY(m5)-GetUnitY(VA8),GetUnitX(m5)-GetUnitX(VA8))
local integer TA8=LInt(EC8,"Level")
local real x=GetUnitX(VA8)+50*Cos(l4)
local real y=GetUnitY(VA8)+50*Sin(l4)
local unit AC7
local destructable d
local lightning F8F
local unit ZPG
local boolean UN9=LBool(EC8,"Active")
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call LT7(EC8)
call EA8(t)
call KillUnit(VA8)
else
call SetUnitX(VA8,x)
call SetUnitY(VA8,y)
call SetUnitFacing(VA8,l4*bj_RADTODEG)
if Z87(x,y,GetUnitX(m5),GetUnitY(m5))<45 then
set YU4=(LoadReal(R8,(EC8),(6)))
set YV4=(LoadReal(R8,(EC8),(7)))
call LT7(EC8)
call EA8(t)
if GetUnitTypeId(m5)!='n00L' and UN9 then
set AC7=VC8(VA8,m5,JJH)
set d=VZ8(VA8,m5,JJH)
if AC7!=null then
set t=CreateTrigger()
set EC8=GetHandleId(t)
set ZPG=CreateUnit(GetOwningPlayer(m5),'e00E',GetUnitX(m5),GetUnitY(m5),0)
call AddPermanentAbility(ZPG,'A12I')
call SetUnitAbilityLevel(ZPG,'A12I',TA8+1)
call IssueTargetOrderById(ZPG,852095,m5)
set ZPG=CreateUnit(GetOwningPlayer(m5),'e00E',GetUnitX(AC7),GetUnitY(AC7),0)
call AddPermanentAbility(ZPG,'A12I')
call SetUnitAbilityLevel(ZPG,'A12I',TA8+1)
call IssueTargetOrderById(ZPG,852095,AC7)
call TriggerRegisterTimerEvent(t,.25+TA8*.75,false)
call TriggerAddCondition(t,Condition(function JHH))
set F8F=AddLightning("MFPB",true,GetUnitX(m5),GetUnitY(m5),GetUnitX(AC7),GetUnitY(AC7))
call SetLightningColor(F8F,.5,.5,1,1)
call DX8(EC8,"Light",F8F)
elseif d!=null then
set t=CreateTrigger()
set EC8=GetHandleId(t)
set ZPG=CreateUnit(GetOwningPlayer(m5),'e00E',GetUnitX(m5),GetUnitY(m5),0)
call AddPermanentAbility(ZPG,'A12I')
call SetUnitAbilityLevel(ZPG,'A12I',TA8+1)
call IssueTargetOrderById(ZPG,852095,m5)
call TriggerRegisterTimerEvent(t,.25+TA8*.75,false)
call TriggerAddCondition(t,Condition(function JHH))
set F8F=AddLightning("MFPB",true,GetUnitX(m5),GetUnitY(m5),GetDestructableX(d),GetDestructableY(d))
call SetLightningColor(F8F,.5,.5,1,1)
call DX8(EC8,"Light",F8F)
call SetDestructableAnimation(d,"stand hit")
else
set ZPG=CreateUnit(GetOwningPlayer(m5),'e00E',GetUnitX(m5),GetUnitY(m5),0)
call AddPermanentAbility(ZPG,'A12I')
call SetUnitAbilityLevel(ZPG,'A12I',1)
call IssueTargetOrderById(ZPG,852095,m5)
endif
endif
call KillUnit(VA8)
endif
endif
set t=null
set VA8=null
set m5=null
set F8F=null
set AC7=null
set d=null
set ZPG=null
return false
endfunction
function JKH takes nothing returns nothing
local unit p5=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local real l4=Atan2(GetUnitY(m5)-GetUnitY(p5),GetUnitX(m5)-GetUnitX(p5))
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit VA8=CreateUnit(GetOwningPlayer(p5),'h077',GetUnitX(p5),GetUnitY(p5),l4*bj_RADTODEG)
local integer TA8=GetUnitAbilityLevel(p5,'A12J')
local boolean UN9=HasLinkin(GetSpellTargetUnit())==false
call SUnit(EC8,"Projectile",VA8)
call SUnit(EC8,"Target",m5)
call SInt(EC8,"Level",TA8)
call SReal(EC8,"OriginalAngle",(l4)*1.)
call SBool(EC8,"Active",UN9)
call SaveReal(R8,(EC8),(6),((GetUnitX(p5))*1.))
call SaveReal(R8,(EC8),(7),((GetUnitY(p5))*1.))
call TriggerRegisterTimerEvent(t,.033,true)
call TriggerAddCondition(t,Condition(function JIH))
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
set p5=null
set m5=null
set t=null
endfunction
function JMH takes nothing returns boolean
if GetSpellAbilityId()=='A12J' then
call JKH()
endif
return false
endfunction
function GG9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function JMH))
set t=null
endfunction
function JNH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=LUnit(EC8,"Source")
local integer TA8=LInt(EC8,"Level")
local integer JOH=LInt(EC8,"BonusID")
call DestroyEffect(AddSpecialEffect("effects\\Tornado.mdx",GetUnitX(p5),GetUnitY(p5)))
if GetTriggerEvalCount(t)>10*(2+.75*TA8)or GetTriggerEventId()==EVENT_UNIT_DEATH then
call UnitRemoveAbility(p5,JOH)
call UnitRemoveAbility(p5,'B09W')
call DestroyEffect(LEff(EC8,"FX1"))
call DestroyEffect(LEff(EC8,"FX2"))
call LT7(EC8)
call EA8(t)
endif
set t=null
set p5=null
return false
endfunction
function JPH takes nothing returns nothing
local unit p5=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=GetUnitAbilityLevel(p5,'A14I')
local integer JOH
if TA8==1 then
set JOH='A135'
elseif TA8==2 then
set JOH='A12O'
elseif TA8==3 then
set JOH='A134'
elseif TA8==4 then
set JOH='A139'
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(p5),JOH,false)
call TZ8(p5,JOH,1,2+.75*TA8)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterUnitEvent(t,p5,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function JNH))
call SUnit(EC8,"Source",p5)
call SInt(EC8,"Level",TA8)
call SInt(EC8,"BonusID",JOH)
call SEff(EC8,"FX1",AddSpecialEffectTarget("effects\\Tornado.mdx",p5,"hand,left"))
call SEff(EC8,"FX2",AddSpecialEffectTarget("effects\\Tornado.mdx",p5,"hand,right"))
set p5=null
set t=null
endfunction
function JQH takes nothing returns boolean
if GetSpellAbilityId()=='A14I' then
call JPH()
endif
return false
endfunction
function GH9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function JQH))
set t=null
endfunction
function JRH takes unit p5,unit m5,real P99,integer JSH,integer JTH returns nothing
call Dmg(p5,m5,NormalFire,(P99)*Pow(.9,JSH)*Pow(.99,JTH))
endfunction
function JUH takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),ZB)==false and GetUnitAbilityLevel(GetEnumUnit(),'Bcyc')==0 then
call JRH(vc,GetEnumUnit(),ec,ac,xc)
call GroupAddUnit(ZB,GetEnumUnit())
set ac=ac+1
endif
endfunction
function JVH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit IJ=LUnit(EC8,"Projectile")
local real i9e=LReal(EC8,"TargetX")
local real ave=LReal(EC8,"TargetY")
local real RK=LReal(EC8,"Angle")
local real P99=LReal(EC8,"Damage")
local integer JTH=LInt(EC8,"TreeCount")
local integer JSH=LInt(EC8,"UnitCount")
local group JWH=LGroup(EC8,"AlreadyHit")
local real x=PQ8(GetUnitX(IJ)+(60*Pow(.9,JSH)*Pow(.99,JTH))*Cos(RK))
local real y=PS8(GetUnitY(IJ)+(60*Pow(.9,JSH)*Pow(.99,JTH))*Sin(RK))
local group g=OG8()
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 JTH=JTH+KillTrees(x,y,75)
call SInt(EC8,"TreeCount",JTH)
set ZB=JWH
set vc=IJ
set ec=P99
set xc=JTH
set ac=JSH
set H04=IJ
call GroupEnumUnitsInRange(g,x,y,d,Condition(function UM8))
call ForGroup(g,function JUH)
call OF8(g)
call SInt(EC8,"UnitCount",ac)
call SetUnitX(IJ,x)
call SetUnitY(IJ,y)
if GetTriggerEvalCount(t)>29 then
call KillUnit(IJ)
call OF8(JWH)
call LT7(EC8)
call EA8(t)
endif
set t=null
set IJ=null
set JWH=null
set g=null
return false
endfunction
function JXH takes nothing returns nothing
local unit p5=GetTriggerUnit()
local real x2=LReal(GetHandleId(p5),"ReverseLance|x")
local real y2=LReal(GetHandleId(p5),"ReverseLance|y")
local real JYH=PL8(ZM7()-LReal(GetHandleId(p5),"ReverseLance|Time"),1.)
local real RK=Atan2(y2-GetUnitY(p5),x2-GetUnitX(p5))
local trigger t
local integer EC8
local unit IJ
local integer TA8=GetUnitAbilityLevel(p5,'A12K')
local real P99=(40+80*TA8)*(JYH)
set t=CreateTrigger()
set EC8=GetHandleId(t)
set IJ=CreateUnit(GetOwningPlayer(p5),'h078',GetUnitX(p5),GetUnitY(p5),RK*bj_RADTODEG)
set x2=GetUnitX(p5)+1700*Cos(RK)
set y2=GetUnitY(p5)+1700*Sin(RK)
call SUnit(EC8,"Projectile",IJ)
call SReal(EC8,"TargetX",x2)
call SReal(EC8,"TargetY",y2)
call SReal(EC8,"Angle",RK)
call SReal(EC8,"Damage",P99)
call SInt(EC8,"TreeCount",0)
call SInt(EC8,"UnitCount",0)
call SGroup(EC8,"AlreadyHit",OG8())
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function JVH))
set p5=null
set t=null
set IJ=null
endfunction
function JZH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit N28=LUnit(EC8,"Hero")
call SetUnitTimeScale(N28,1)
call LT7(EC8)
call EA8(t)
set t=null
set N28=null
return false
endfunction
function JAH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit N28=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
call RemoveLocation(l)
call SReal(GetHandleId(N28),"ReverseLance|x",x)
call SReal(GetHandleId(N28),"ReverseLance|y",y)
call SReal(GetHandleId(N28),"ReverseLance|Time",ZM7())
call SetUnitTimeScale(N28,.75)
call SUnit(EC8,"Hero",N28)
call TriggerRegisterTimerEvent(t,.75,false)
call TriggerRegisterUnitEvent(t,N28,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function JZH))
set t=null
set N28=null
endfunction
function JBH takes nothing returns boolean
if GetSpellAbilityId()=='A12K' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST then
call SBool(GetHandleId(GetTriggerUnit()),"ReverseLance|Active",false)
call JAH()
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
call SBool(GetHandleId(GetTriggerUnit()),"ReverseLance|Active",true)
elseif LBool(GetHandleId(GetTriggerUnit()),"ReverseLance|Active")then
call JXH()
endif
endif
return false
endfunction
function GI9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_ENDCAST)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function JBH))
set t=null
endfunction
function JCH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=LUnit(EC8,"Source")
local integer QRD=LInt(EC8,"TargetIndex")
local unit m5=KH8(QRD)
local real J3H=LReal(EC8,"Rate")
local boolean C7D=LBool(EC8,"Scepter")
if GetTriggerEvalCount(t)==1 then
call TriggerRegisterUnitEvent(t,p5,EVENT_UNIT_SPELL_EFFECT)
endif
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==p5 and C7D==false then
call SetUnitState(m5,UNIT_STATE_LIFE,GetUnitState(m5,UNIT_STATE_LIFE)+(J3H)*GetEventDamage())
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A12P' or GetSpellAbilityId()=='A1D6' then
call KG8(QRD)
call LT7(EC8)
call EA8(t)
endif
else
call UnitRemoveAbility(p5,'A12R')
call UnitRemoveAbility(p5,'B09X')
call KG8(QRD)
call LT7(EC8)
call EA8(t)
call UnitRemoveAbility(p5,'A1FK')
call UnitRemoveAbility(p5,'A1FL')
call UnitRemoveAbility(p5,'A1FJ')
call SUnit(GetHandleId(p5),"Target",p5)
endif
set t=null
set p5=null
set m5=null
return false
endfunction
function J6H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=GetUnitAbilityLevel(Z77,'A12P')
local real HHE=.6-TA8*.1
local boolean PPE=false
call UnitRemoveAbility(Z77,'A12R')
call UnitRemoveAbility(Z77,'B09X')
if TA8==0 then
call UnitRemoveAbility(Z77,'A1FK')
call UnitRemoveAbility(Z77,'A1FL')
call UnitRemoveAbility(Z77,'A1FJ')
set PPE=true
set TA8=GetUnitAbilityLevel(Z77,'A1D6')
set HHE=.6-TA8*.15
if TA8==1 then
if PPE then
call AddPermanentAbility(Z77,'A1FJ')
else
call AddPermanentAbility(Z77,'A1FK')
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1FJ',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1FK',false)
elseif TA8==2 then
if PPE then
call AddPermanentAbility(Z77,'AZ3L')
else
call AddPermanentAbility(Z77,'A1FL')
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'AZ3L',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1FL',false)
elseif TA8==3 and PPE==false then
call AddPermanentAbility(Z77,'A1FJ')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1FJ',false)
endif
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A12R',false)
call AddPermanentAbility(Z77,'A12R')
call IssueTargetOrderById(Z77,851983,X77)
call SUnit(EC8,"Source",Z77)
call SBool(EC8,"Scepter",PPE)
call SInt(EC8,"TargetIndex",KJ8(X77))
call SReal(EC8,"Rate",HHE)
call SInt(EC8,"Attacks",0)
call SUnit(GetHandleId(Z77),"Target",X77)
call TriggerRegisterTimerEvent(t,20,false)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function JCH))
set Z77=null
set X77=null
set t=null
endfunction
function JLH takes nothing returns boolean
if(GetSpellAbilityId()=='A12P' or GetSpellAbilityId()=='A1D6')and HasLinkin(GetSpellTargetUnit())==false then
call J6H()
endif
return false
endfunction
function J1H takes unit Z77 returns nothing
local unit X77=LUnit(GetHandleId(Z77),"Target")
local integer i=GetUnitAbilityLevel(Z77,'A1D6')
if GetTriggerUnit()==X77 then
if GetUnitAbilityLevel(Z77,'A12R')==0 then
call AddPermanentAbility(Z77,'A12R')
if i>0 then
if i==1 then
call AddPermanentAbility(Z77,'A1FK')
elseif i==2 then
call AddPermanentAbility(Z77,'A1FL')
elseif i==3 then
call AddPermanentAbility(Z77,'A1FJ')
endif
endif
endif
call DestroyEffect(AddSpecialEffectTarget("effects\\Tornado.mdx",Z77,"hand,left"))
call DestroyEffect(AddSpecialEffectTarget("effects\\Tornado.mdx",Z77,"hand,right"))
elseif GetTriggerUnit()!=X77 then
call UnitRemoveAbility(Z77,'A12R')
call UnitRemoveAbility(Z77,'B09X')
call UnitRemoveAbility(Z77,'A1FK')
call UnitRemoveAbility(Z77,'A1FL')
call UnitRemoveAbility(Z77,'A1FJ')
endif
set X77=null
endfunction
function J0H takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),'A12P')+GetUnitAbilityLevel(GetAttacker(),'A1D6')>0 and LUnit(GetHandleId(GetAttacker()),"Target")!=GetAttacker()and LUnit(GetHandleId(GetAttacker()),"Target")!=null then
call J1H(GetAttacker())
endif
return false
endfunction
function GJ9 takes nothing returns nothing
local trigger t=CreateTrigger()
local trigger t2=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function JLH))
call TriggerRegisterAllPlayersEvent(t2,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t2,Condition(function J0H))
set t=null
set t2=null
endfunction
function FrostArmor_RangedAttackerFuncAction takes nothing returns nothing
local unit f=GetAttacker()
local unit s=CreateUnit(GetOwningPlayer(f),'e00E',GetUnitX(f),GetUnitY(f),0)
call UnitAddAbility(s,'AZ0Q')
call IssueTargetOrderById(s,852077,f)
call UnitApplyTimedLife(s,'BTLF',2.5)
set s=null
set f=null
endfunction
function FrostArmor_RangedAttackerFunc takes nothing returns nothing
if GetUnitAbilityLevel(GetTriggerUnit(),'BUfa')>0 and IsUnitType(GetAttacker(),UNIT_TYPE_RANGED_ATTACKER)then
call FrostArmor_RangedAttackerFuncAction()
endif
endfunction
function J5H takes unit N28,integer TA8 returns integer
local integer J2H
local integer J_H
if TA8==1 then
set J_H='B0B1'
set J2H='A18Z'
if GetUnitAbilityLevel(N28,J_H)>0 then
call UnitRemoveAbility(N28,J_H)
return J2H
endif
set J_H='B0B0'
set J2H='A19J'
if GetUnitAbilityLevel(N28,J_H)>0 then
call UnitRemoveAbility(N28,J_H)
return J2H
endif
set J_H='B0AY'
set J2H='A19J'
if GetUnitAbilityLevel(N28,J_H)>0 then
call UnitRemoveAbility(N28,J_H)
return J2H
endif
return'A18Y'
elseif TA8==2 then
set J_H='B0B8'
set J2H='A19H'
if GetUnitAbilityLevel(N28,J_H)>0 then
call UnitRemoveAbility(N28,J_H)
return J2H
endif
set J_H='B0B7'
set J2H='A19G'
if GetUnitAbilityLevel(N28,J_H)>0 then
call UnitRemoveAbility(N28,J_H)
return J2H
endif
set J_H='B0B2'
set J2H='A19G'
if GetUnitAbilityLevel(N28,J_H)>0 then
call UnitRemoveAbility(N28,J_H)
return J2H
endif
return'A19I'
elseif TA8==3 then
set J_H='B0B3'
set J2H='A19E'
if GetUnitAbilityLevel(N28,J_H)>0 then
call UnitRemoveAbility(N28,J_H)
return J2H
endif
set J_H='B0B9'
set J2H='A19D'
if GetUnitAbilityLevel(N28,J_H)>0 then
call UnitRemoveAbility(N28,J_H)
return J2H
endif
set J_H='B0B6'
set J2H='A19D'
if GetUnitAbilityLevel(N28,J_H)>0 then
call UnitRemoveAbility(N28,J_H)
return J2H
endif
return'A19K'
elseif TA8==4 then
set J_H='B0B5'
set J2H='A196'
if GetUnitAbilityLevel(N28,J_H)>0 then
call UnitRemoveAbility(N28,J_H)
return J2H
endif
set J_H='B0B4'
set J2H='A195'
if GetUnitAbilityLevel(N28,J_H)>0 then
call UnitRemoveAbility(N28,J_H)
return J2H
endif
set J_H='B0BA'
set J2H='A195'
if GetUnitAbilityLevel(N28,J_H)>0 then
call UnitRemoveAbility(N28,J_H)
return J2H
endif
return'A19L'
endif
return 0
endfunction
function K4H takes nothing returns nothing
local unit N28=GetTriggerUnit()
local integer TA8=GetUnitAbilityLevel(N28,'A18X')
local integer J_H=J5H(N28,TA8)
local unit AC7=CreateUnit(GetOwningPlayer(N28),'e00E',GetUnitX(N28),GetUnitY(N28),0)
call AddPermanentAbility(AC7,J_H)
call IssueTargetOrderById(AC7,852101,N28)
set N28=null
set AC7=null
endfunction
function K7H takes nothing returns boolean
if GetSpellAbilityId()=='A01F' or GetSpellAbilityId()=='A027' or GetSpellAbilityId()=='A01P' or GetSpellAbilityId()=='A09Z' or(GetUnitPointValue(GetTriggerUnit())==500 and MY8(GetSpellAbilityId()))then
call K4H()
endif
return false
endfunction
function K8H takes unit AM7,boolean SY8 returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function K7H))
if GetUnitPointValue(AM7)==500 then
set UW7[GetPlayerId(GetOwningPlayer(AM7))]=t
endif
set t=null
set AM7=null
endfunction
function K9H takes nothing returns boolean
if GetLearnedSkill()=='A18X' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A18X')==1 then
call K8H(GetTriggerUnit(),false)
endif
return false
endfunction
function GK9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function K9H))
set t=null
endfunction
function KDH takes nothing returns boolean
if(GetSpellAbilityId()=='A01P')and GU8(GetSpellTargetUnit())then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n0LR'))
endif
return false
endfunction
function GM9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function KDH))
set t=null
endfunction
function KEH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local unit X77=LUnit(W57,"Target")
local integer C77=LInt(GetHandleId(X77),"StickyNapalm|Count")
local boolean KFH=LBool(W57,"Locked")
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call SetUnitTurnSpeed(X77,GetUnitDefaultTurnSpeed(X77))
call SInt(GetHandleId(X77),"StickyNapalm|Count",0)
call LT7(W57)
call EA8(t)
call T99(X77,0,0)
elseif C77==0 then
call SetUnitTurnSpeed(X77,GetUnitDefaultTurnSpeed(X77))
call SInt(GetHandleId(X77),"StickyNapalm|Count",0)
call LT7(W57)
call EA8(t)
elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED and KFH==false then
if C77>0 and GetUnitAbilityLevel(GetEventDamageSource(),'A1EL')>0 and LUnit(GetHandleId(GetTriggeringTrigger()),"Source")==GetEventDamageSource()then
call SBool(W57,"Locked",true)
if TE4 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\LordofFlameMissile\\LordofFlameMissile.mdl",X77,"chest"))
if IsUnitType(X77,UNIT_TYPE_HERO)then
call Dmg(Z77,X77,NormalFire,.5*(5+5*GetUnitAbilityLevel(Z77,'A1EL'))*C77)
else
call Dmg(Z77,X77,NormalFire,.5*(5+5*GetUnitAbilityLevel(Z77,'A1EL'))*C77*.5)
endif
elseif(GetEventDamage()>38 and IsUnitType(X77,UNIT_TYPE_HERO))or(GetEventDamage()>50 and IsUnitType(X77,UNIT_TYPE_HERO)==false)then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\LordofFlameMissile\\LordofFlameMissile.mdl",X77,"chest"))
if IsUnitType(X77,UNIT_TYPE_HERO)then
call Dmg(Z77,X77,NormalFire,(5+5*GetUnitAbilityLevel(Z77,'A1EL'))*C77)
else
call Dmg(Z77,X77,NormalFire,(5+5*GetUnitAbilityLevel(Z77,'A1EL'))*C77*.5)
endif
endif
call SBool(W57,"Locked",false)
endif
else
call SetUnitTurnSpeed(X77,GetUnitDefaultTurnSpeed(X77)*.3)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function KGH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LUnit(W57,"Source"))
local unit X77=(LUnit(W57,"Target"))
local real U89=(LReal(GetHandleId(X77),"StickyNapalm|LastTime"))
local integer StickyCount=(LInt(GetHandleId(X77),"StickyNapalm|Count"))
if(TimerGetElapsed(E4))-U89>=8 then
call SetUnitTurnSpeed(X77,GetUnitDefaultTurnSpeed(X77))
call SInt(GetHandleId(X77),"StickyNapalm|Count",0)
call T99(X77,0,0)
endif
call LT7(W57)
call EA8(t)
set t=null
set Z77=null
set X77=null
return false
endfunction
function KHH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetEnumUnit()
local trigger t
local integer W57
local integer ML8=GetUnitAbilityLevel(Z77,'A1EL')
local integer C77=IMinBJ(LInt(GetHandleId(X77),"StickyNapalm|Count")+1,10)
if GU8(X77)then
set Z77=null
set X77=null
return
endif
call T99(X77,ML8,C77)
call SInt(GetHandleId(X77),"StickyNapalm|Count",C77)
call SReal(GetHandleId(X77),"StickyNapalm|LastTime",(TimerGetElapsed(E4))*1.)
call SetUnitTurnSpeed(X77,GetUnitDefaultTurnSpeed(X77)*.3)
if IsUnitType(X77,UNIT_TYPE_HERO)then
call QN8(GetOwningPlayer(Z77),I2S(C77)+"!",2,X77,.026,50,0,255,216)
endif
if C77==1 then
set t=CreateTrigger()
set W57=GetHandleId(t)
call SUnit(W57,"Source",Z77)
call SUnit(W57,"Target",X77)
call SBool(W57,"Locked",false)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function KEH))
endif
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,8,false)
call TriggerAddCondition(t,Condition(function KGH))
call SUnit(W57,"Source",Z77)
call SUnit(W57,"Target",X77)
set t=null
set Z77=null
set X77=null
endfunction
function KIH takes nothing returns nothing
local group g=OG8()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local unit p5=GetTriggerUnit()
call GroupEnumUnitsInRange(g,x,y,400,Condition(function UB8))
call ForGroup(g,function KHH)
call S18(GetOwningPlayer(p5),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 OF8(g)
set g=null
set l=null
set p5=null
endfunction
function KJH takes nothing returns boolean
if GetSpellAbilityId()=='A1EL' then
call KIH()
endif
return false
endfunction
function GN9 takes nothing returns nothing
local integer i
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function KJH))
set YG4[1]='A1XC'
set YG4[2]='A1XB'
set YG4[3]='A1X4'
set YG4[4]='A1X5'
set YG4[5]='A1X6'
set YG4[6]='A1X7'
set YG4[7]='A1XA'
set YG4[8]='A1X8'
set YG4[9]='A1X9'
set YG4[10]='A1XD'
set YH4[1]='A1XM'
set YH4[2]='A1XE'
set YH4[3]='A1XF'
set YH4[4]='A1XG'
set YH4[5]='A1XH'
set YH4[6]='A1XI'
set YH4[7]='A1XJ'
set YH4[8]='A1XK'
set YH4[9]='A1XN'
set YH4[10]='A1XL'
set YI4[1]='A1XO'
set YI4[2]='A1XV'
set YI4[3]='A1XW'
set YI4[4]='A1XQ'
set YI4[5]='A1XR'
set YI4[6]='A1XS'
set YI4[7]='A1XX'
set YI4[8]='A1XT'
set YI4[9]='A1XU'
set YI4[10]='A1XP'
set YJ4[1]='A1XY'
set YJ4[2]='A1XZ'
set YJ4[3]='A1Y5'
set YJ4[4]='A1Y6'
set YJ4[5]='A1Y7'
set YJ4[6]='A1Y1'
set YJ4[7]='A1Y2'
set YJ4[8]='A1Y3'
set YJ4[9]='A1Y4'
set YJ4[10]='A1Y0'
set i=1
loop
exitwhen i>10
call PU8(YG4[i])
set i=i+1
endloop
set i=1
loop
exitwhen i>10
call PU8(YH4[i])
set i=i+1
endloop
set i=1
loop
exitwhen i>10
call PU8(YI4[i])
set i=i+1
endloop
set i=1
loop
exitwhen i>10
call PU8(YJ4[i])
set i=i+1
endloop
set t=null
endfunction
function KKH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit m5=LUnit(EC8,"Target")
local real a=LReal(EC8,"a")
local real d=LReal(EC8,"d")
local real x1=LReal(EC8,"x")
local real y1=LReal(EC8,"y")
local real x2
local real y2
local real x
local real y
if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>10 then
call KillTrees(GetUnitX(m5),GetUnitY(m5),200)
call DestroyEffect(LEff(EC8,"FX"))
call LT7(EC8)
call EA8(t)
else
set x2=x1+d*Cos(a)
set y2=y1+d*Sin(a)
if(IsPointInRegion(IF4,((x2)*1.),((y2)*1.)))==false then
call SReal(EC8,"x",(x2)*1.)
call SReal(EC8,"y",(y2)*1.)
set x=x2
set y=y2
else
set x=x1
set y=y1
endif
if IsUnitType(m5,UNIT_TYPE_HERO)then
call SetUnitPosition(m5,x,y)
else
call SetUnitX(m5,x)
call SetUnitY(m5,y)
endif
endif
set t=null
set m5=null
return false
endfunction
function KMH takes nothing returns nothing
local unit p5=GetTriggerUnit()
local unit m5=GetEnumUnit()
local integer TA8=GetUnitAbilityLevel(p5,'A19V')
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function KKH))
call SUnit(EC8,"Target",m5)
call SReal(EC8,"a",(Atan2(GetUnitY(m5)-C1,GetUnitX(m5)-B1))*1.)
call SReal(EC8,"d",(P18((400-Z87(B1,C1,GetUnitX(m5),GetUnitY(m5))),10)/ 10)*1.)
call SReal(EC8,"x",(GetUnitX(m5))*1.)
call SReal(EC8,"y",(GetUnitY(m5))*1.)
set p5=null
set m5=null
set t=null
call Dmg(TF4,GetEnumUnit(),NormalFire,TG4*75)
endfunction
function KNH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit AC7=LUnit(EC8,"Caster")
local unit p5=LUnit(EC8,"Source")
local real a=LReal(EC8,"a")
local group g=OG8()
local unit m5
local real x=GetUnitX(AC7)
local real y=GetUnitY(AC7)
local real GJF=LReal(EC8,"FinalX")
local real GKF=LReal(EC8,"FinalY")
set x=PQ8(x+36*Cos(a))
set y=PS8(y+36*Sin(a))
call SetUnitX(AC7,x)
call SetUnitY(AC7,y)
set H04=AC7
call GroupEnumUnitsInRange(g,x,y,'}',Condition(function UW8))
set m5=FirstOfGroup(g)
call OF8(g)
if Z87(x,y,GJF,GKF)<40 or GetTriggerEvalCount(t)>'d' then
set m5=null
set x=GJF
set y=GKF
set TF4=p5
set TG4=LInt(EC8,"Level")
set N1=m5
if m5==null then
set B1=x
set C1=y
else
set B1=GetUnitX(m5)
set C1=GetUnitY(m5)
endif
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,400,Condition(function UW8))
if m5!=null then
call GroupRemoveUnit(g,m5)
call Stun(p5,m5,.3)
call Dmg(TF4,m5,NormalFire,TG4*75)
endif
call ForGroup(g,function KMH)
call KillUnit(AC7)
call OF8(g)
call LT7(EC8)
call EA8(t)
endif
set t=null
set m5=null
set AC7=null
set p5=null
set g=null
return false
endfunction
function KOH takes nothing returns nothing
local unit p5=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local real a=Atan2(y-GetUnitY(p5),x-GetUnitX(p5))
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local integer TA8=GetUnitAbilityLevel(p5,'A19V')
local unit AC7
set AC7=CreateUnit(GetOwningPlayer(p5),'h0ED',GetUnitX(p5),GetUnitY(p5),a*bj_RADTODEG)
call RemoveLocation(l)
call SReal(EC8,"a",a)
call SInt(EC8,"Level",TA8)
call SUnit(EC8,"Source",p5)
call SUnit(EC8,"Caster",AC7)
call SReal(EC8,"FinalX",((x)*1.))
call SReal(EC8,"FinalY",((y)*1.))
call TriggerRegisterTimerEvent(t,.04,true)
call TriggerAddCondition(t,Condition(function KNH))
set p5=null
set AC7=null
set l=null
set t=null
endfunction
function KPH takes nothing returns boolean
if GetSpellAbilityId()=='A19V' then
call KOH()
endif
return false
endfunction
function GO9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function KPH))
set t=null
endfunction
function KQH takes nothing returns nothing
local unit Z77=TH4
local unit YNG=GetEnumUnit()
local unit X77
local group g
if GetUnitCurrentOrder(YNG)==0 then
set g=OG8()
set H04=YNG
call GroupEnumUnitsInRange(g,GetUnitX(YNG),GetUnitY(YNG),825,Condition(function UM8))
set X77=FirstOfGroup(g)
if X77!=null then
call GroupRemoveUnit(g,X77)
endif
if FirstOfGroup(g)==null and X77==Z77 then
call IssueTargetOrderById(YNG,851983,X77)
endif
call OF8(g)
set X77=null
set g=null
endif
set Z77=null
set YNG=null
endfunction
function KRH takes unit Z77 returns nothing
local group g=OG8()
set H04=Z77
set TH4=Z77
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),1000,Condition(function VM8))
call ForGroup(g,function KQH)
call OF8(g)
set g=null
endfunction
function KSH takes nothing returns nothing
call Dmg(TH4,GetEnumUnit(),NormalFire,TI4*10)
endfunction
function KTH takes unit Z77,integer W57,integer C77 returns nothing
local group g1=OG8()
local group g2=OG8()
local integer i=0
set H04=Z77
loop
exitwhen i>C77
call GroupEnumUnitsInRange(g2,LReal(W57,"X"+I2S(i)),LReal(W57,"Y"+I2S(i)),225,Condition(function UM8))
call GroupAddGroup(g2,g1)
call GroupClear(g2)
set i=i+1
endloop
call OF8(g2)
if FirstOfGroup(g1)!=null then
set TH4=Z77
set TI4=GetUnitAbilityLevel(Z77,'A19Z')
call ForGroup(g1,function KSH)
endif
call OF8(g1)
set g1=null
set g2=null
endfunction
function KUH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
local real PND=LReal(W57,"LastX")
local real POD=LReal(W57,"LastY")
local integer C77=LInt(W57,"Count")
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>C77
call DestroyEffect(LEff(W57,"FX"+I2S(i)))
set i=i+1
endloop
call LT7(W57)
call EA8(t)
else
set x=GetUnitX(Z77)
set y=GetUnitY(Z77)
if L8 then
call KRH(Z77)
endif
if Z87(x,y,PND,POD)>'}' then
set C77=C77+1
call SInt(W57,"Count",C77)
call SReal(W57,"LastX",x)
call SReal(W57,"LastY",y)
call SEff(W57,"FX"+I2S(C77),AddSpecialEffect("Environment\\LargeBuildingFire\\LargeBuildingFire1.mdl",x,y))
call SReal(W57,"X"+I2S(C77),x)
call SReal(W57,"Y"+I2S(C77),y)
endif
if ModuloInteger(GetTriggerEvalCount(t),10)==0 then
set TE4=true
call KTH(Z77,W57,C77)
set TE4=false
endif
call KillTrees(GetUnitX(Z77),GetUnitY(Z77),'d')
endif
return false
endfunction
function KVH takes nothing returns nothing
local unit p5=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function KUH))
call SUnit(EC8,"Source",p5)
call SEff(EC8,"FX"+I2S(0),AddSpecialEffect("Environment\\LargeBuildingFire\\LargeBuildingFire1.mdl",GetUnitX(p5),GetUnitY(p5)))
call SReal(EC8,"LastX",GetUnitX(p5))
call SReal(EC8,"LastY",GetUnitY(p5))
call SReal(EC8,"X"+I2S(0),GetUnitX(p5))
call SReal(EC8,"Y"+I2S(0),GetUnitY(p5))
set p5=null
set t=null
endfunction
function KWH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=LUnit(EC8,"Source")
if O18(p5)then
return false
endif
if GetUnitTypeId(p5)=='O016' then
call SetUnitFlyHeight(p5,170,0)
elseif GetUnitTypeId(p5)=='O017' then
call SetUnitFlyHeight(p5,220,0)
endif
set t=null
set p5=null
return false
endfunction
function KXH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit p5=GetTriggerUnit()
call TriggerRegisterTimerEvent(t,2,true)
call TriggerAddCondition(t,Condition(function KWH))
call SUnit(EC8,"Source",p5)
set t=null
set p5=null
endfunction
function KYH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
call SetTerrainPathable(x,y,PATHING_TYPE_WALKABILITY,false)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
return false
endfunction
function KZH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
call SetTerrainPathable(x,y,PATHING_TYPE_WALKABILITY,true)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function KYH))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
set Z77=null
set t=null
endfunction
function KAH takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A19Z' then
if GetUnitTypeId(GetTriggerUnit())=='O016' then
call KVH()
elseif IsTerrainPathable(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),PATHING_TYPE_WALKABILITY)then
call KZH()
endif
endif
else
if GetLearnedSkill()=='A19Z' and GetUnitAbilityLevel(GetTriggerUnit(),'A19Z')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call KXH()
endif
endif
return false
endfunction
function GP9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function KAH))
set t=null
endfunction
function KBH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=LUnit(EC8,"Source")
local unit m5=LUnit(EC8,"Target")
local unit AC7=LUnit(EC8,"Caster")
local real d=Z87(GetUnitX(p5),GetUnitY(p5),GetUnitX(m5),GetUnitY(m5))
local real a
local real TL8=LReal(EC8,"Duration")
local real FDF=LReal(EC8,"rRealX0")
local real FEF=LReal(EC8,"rRealY0")
local real KDE
local real KEE
if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>R2I(20*TL8)then
call DestroyEffect(LEff(EC8,"FX"))
call LT7(EC8)
call EA8(t)
call KillUnit(AC7)
call SetUnitPathing(m5,true)
call UI8(p5)
call KillTrees(GetUnitX(m5),GetUnitY(m5),175)
call EY8(p5,"AI|Lasso")
else
call SetUnitX(AC7,GetUnitX(p5))
call SetUnitY(AC7,GetUnitY(p5))
if Z87(FDF,FEF,GetUnitX(p5),GetUnitY(p5))>400 then
call DestroyEffect(LEff(EC8,"FX"))
call LT7(EC8)
call EA8(t)
call KillUnit(AC7)
call SetUnitPathing(m5,true)
call UI8(p5)
call KillTrees(GetUnitX(m5),GetUnitY(m5),175)
else
call SReal(EC8,"rRealX0",GetUnitX(p5))
call SReal(EC8,"rRealY0",GetUnitY(p5))
if d>300 then
set a=Atan2(GetUnitY(m5)-GetUnitY(p5),GetUnitX(m5)-GetUnitX(p5))
set KDE=GetUnitX(p5)+300*Cos(a)
set KEE=GetUnitY(p5)+300*Sin(a)
if(IsPointInRegion(IF4,((KDE)*1.),((KEE)*1.)))==false then
call SetUnitX(m5,KDE)
call SetUnitY(m5,KEE)
endif
endif
endif
endif
set t=null
set p5=null
set m5=null
set AC7=null
return false
endfunction
function KCH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit p5=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local unit AC7=CreateUnit(GetOwningPlayer(p5),'u00Y',GetUnitX(p5),GetUnitY(p5),0)
local integer TA8=GetUnitAbilityLevel(p5,'A19O')
if TA8==0 then
set TA8=GetUnitAbilityLevel(p5,'A1MV')+2
endif
call AddPermanentAbility(AC7,'A19N')
call SetUnitAbilityLevel(AC7,'A19N',GetUnitAbilityLevel(p5,'A19O'))
call IssueTargetOrderById(AC7,852480,m5)
call SetUnitPathing(AC7,false)
call SetUnitPathing(m5,false)
call UG8(p5)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerRegisterUnitEvent(t,p5,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function KBH))
call SUnit(EC8,"Source",p5)
call SUnit(EC8,"Target",m5)
call SUnit(EC8,"Caster",AC7)
call SReal(EC8,"Duration",(2.5+TA8*.5)*1.)
call SEff(EC8,"FX",AddSpecialEffectTarget("Abilities\\Spells\\Human\\AerialShackles\\AerialShacklesTarget.mdl",m5,"chest"))
call SReal(EC8,"rRealX0",GetUnitX(p5))
call SReal(EC8,"rRealY0",GetUnitY(p5))
call EW8(p5,"AI|Lasso")
set t=null
set p5=null
set m5=null
set AC7=null
endfunction
function K3H takes nothing returns boolean
if(GetSpellAbilityId()=='A19O' or GetSpellAbilityId()=='A1MV')and HasLinkin(GetSpellTargetUnit())==false and GetUnitTypeId(GetSpellTargetUnit())!='n00L' then
call KCH()
endif
return false
endfunction
function GQ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function K3H))
set t=null
endfunction
function K6H takes nothing returns boolean
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if IsPlayer(GetOwningPlayer(GetEventDamageSource()))and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))and w1==false then
if W1==false then
call UnitRemoveAbility(GetTriggerUnit(),'B0BM')
call EA8(GetTriggeringTrigger())
endif
endif
if W1 then
set W1=false
endif
if w1 then
set w1=false
endif
else
call EA8(GetTriggeringTrigger())
endif
return false
endfunction
function KLH takes nothing returns nothing
local unit m5=GetEnumUnit()
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,m5,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,6,false)
call TriggerAddCondition(t,Condition(function K6H))
set m5=null
set t=null
endfunction
function K1H takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),'B0BM')>0 and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0
endfunction
function K0H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local real x=(LoadReal(R8,(EC8),(6)))
local real y=(LoadReal(R8,(EC8),(7)))
local group g=OG8()
call GroupEnumUnitsInRange(g,x,y,1000,Condition(function K1H))
call ForGroup(g,function KLH)
call OF8(g)
call FlushChildHashtable(R8,(EC8))
call EA8(t)
set t=null
set g=null
return false
endfunction
function K5H takes nothing returns nothing
if TJ4==1 or TJ4==2 then
call Dmg(GetTriggerUnit(),GetEnumUnit(),HeroNormal,70+10*GetUnitAbilityLevel(GetTriggerUnit(),'A1AA'))
endif
if TJ4==1 or TJ4==3 then
call Dmg(GetTriggerUnit(),GetEnumUnit(),HeroNormal,70+10*GetUnitAbilityLevel(GetTriggerUnit(),'A1AA'))
endif
endfunction
function K2H takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'h07Z',x,y,0)
local group g=OG8()
local unit u
set HB7=GetUnitAbilityLevel(Z77,'A1AA')
if((LoadInteger(R8,(GetHandleId((Z77))),((4270))))==1)==false then
call SetUnitTimeScale(AC7,2.5)
call UnitApplyTimedLife(AC7,'BTLF',2)
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',x,y,0)
call AddPermanentAbility(AC7,'A1A9')
call SetUnitAbilityLevel(AC7,'A1A9',GetUnitAbilityLevel(Z77,'A1AA'))
call IssueImmediateOrderById(AC7,852127)
call GroupEnumUnitsInRange(g,x,y,500,Condition(function UB8))
set TJ4=1
call ForGroup(g,function K5H)
call OF8(g)
call TriggerRegisterTimerEvent(t,.65,false)
call TriggerAddCondition(t,Condition(function K0H))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
else
call SetUnitTimeScale(AC7,2.5)
call UnitApplyTimedLife(AC7,'BTLF',2)
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',x,y,0)
call AddPermanentAbility(AC7,'A1A9')
call SetUnitAbilityLevel(AC7,'A1A9',GetUnitAbilityLevel(Z77,'A1AA'))
call IssueImmediateOrderById(AC7,852127)
call GroupEnumUnitsInRange(g,x,y,500,Condition(function UB8))
set TJ4=2
call ForGroup(g,function K5H)
call TriggerRegisterTimerEvent(t,.65,false)
call TriggerAddCondition(t,Condition(function K0H))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
set t=CreateTrigger()
set W57=GetHandleId(t)
set u=(TR4[GetPlayerId(GetOwningPlayer((Z77)))])
call IssueImmediateOrderById(u,851972)
set x=GetUnitX(u)
set y=GetUnitY(u)
set AC7=CreateUnit(GetOwningPlayer(Z77),'h07Z',x,y,0)
call SetUnitTimeScale(AC7,2.5)
call UnitApplyTimedLife(AC7,'BTLF',2)
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',x,y,0)
call AddPermanentAbility(AC7,'A1A9')
call SetUnitAbilityLevel(AC7,'A1A9',GetUnitAbilityLevel(Z77,'A1AA'))
call IssueImmediateOrderById(AC7,852127)
call GroupEnumUnitsInRange(g,x,y,500,Condition(function UB8))
set TJ4=3
call ForGroup(g,function K5H)
call OF8(g)
call TriggerRegisterTimerEvent(t,.65,false)
call TriggerAddCondition(t,Condition(function K0H))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
call SetUnitAnimationByIndex(u,3)
endif
set t=null
set Z77=null
set AC7=null
set g=null
endfunction
function K_H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=(LoadUnitHandle(R8,(EC8),(2)))
local unit M4H=(LoadUnitHandle(R8,(EC8),(335)))
local boolean M7H=(LoadBoolean(R8,(EC8),(336)))
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST then
call SaveInteger(R8,(GetHandleId((p5))),((4269)),(2))
call SaveBoolean(R8,(GetHandleId(M4H)),(337),(true))
if M7H then
call ShowUnit(M4H,false)
call KillUnit(M4H)
else
call ShowUnit(M4H,false)
call UnitRemoveAbility(M4H,'Aloc')
call ShowUnit(M4H,true)
endif
call FlushChildHashtable(R8,(EC8))
call EA8(t)
else
if M7H then
call SetUnitFacing(M4H,GetUnitFacing(p5))
endif
endif
set t=null
set M4H=null
return false
endfunction
function M8H takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit p5=GetTriggerUnit()
local unit M4H
local boolean KillImage
call SaveBoolean(R8,(EC8),(336),(false))
if((LoadInteger(R8,(GetHandleId((p5))),((4270))))==1)==false then
call SaveBoolean(R8,(EC8),(336),(true))
set M4H=CreateUnit(GetOwningPlayer(p5),'h07U',GetUnitX(p5),GetUnitY(p5),GetUnitFacing(p5))
call AddPermanentAbility(M4H,'Aloc')
call AddPermanentAbility(M4H,'Aetl')
call SetUnitPosition(M4H,GetUnitX(p5),GetUnitY(p5))
call SetUnitScale(M4H,1.4,1.4,1.4)
else
set M4H=(TR4[GetPlayerId(GetOwningPlayer((p5)))])
call UnitAddAbility(M4H,'Aloc')
endif
call IssueImmediateOrderById(M4H,851972)
call SaveInteger(R8,(GetHandleId((p5))),((4269)),(1))
call SetUnitAnimation(M4H,"spell slam")
call QueueUnitAnimation(M4H,"spell slam")
call SaveUnitHandle(R8,(EC8),(335),(M4H))
call SaveUnitHandle(R8,(EC8),(2),(p5))
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterUnitEvent(t,p5,EVENT_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t,Condition(function K_H))
call SaveUnitHandle(R8,(EC8),(335),(M4H))
set t=null
set p5=null
set M4H=null
endfunction
function M9H takes nothing returns boolean
if GetSpellAbilityId()=='A1AA' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_FINISH then
call K2H()
else
call M8H()
endif
endif
return false
endfunction
function GU9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function M9H))
set t=null
endfunction
function MDH takes nothing returns nothing
if S_9(GetEnumUnit())then
return
endif
if GetUnitAbilityLevel(GetEnumUnit(),'A1CA')>0 then
call UnitRemoveAbility(GetEnumUnit(),'A1CA')
call UnitRemoveAbility(GetEnumUnit(),'B0BP')
endif
if GetUnitAbilityLevel(GetEnumUnit(),'A1C9')>0 then
call UnitRemoveAbility(GetEnumUnit(),'A1C9')
call UnitRemoveAbility(GetEnumUnit(),'B0BP')
endif
if GetUnitAbilityLevel(GetEnumUnit(),'A1CB')>0 then
call UnitRemoveAbility(GetEnumUnit(),'A1CB')
call UnitRemoveAbility(GetEnumUnit(),'B0BP')
endif
if GetUnitAbilityLevel(GetEnumUnit(),'A1CC')>0 then
call UnitRemoveAbility(GetEnumUnit(),'A1CC')
call UnitRemoveAbility(GetEnumUnit(),'B0BP')
endif
call WF8(GetEnumUnit(),0)
endfunction
function MEH takes nothing returns nothing
if S_9(GetEnumUnit())then
return
endif
if TK4==1 then
if GetUnitAbilityLevel(GetEnumUnit(),'A1CA')==0 then
call AddPermanentAbility(GetEnumUnit(),'A1CA')
endif
elseif TK4==2 then
if GetUnitAbilityLevel(GetEnumUnit(),'A1C9')==0 then
call AddPermanentAbility(GetEnumUnit(),'A1C9')
endif
elseif TK4==3 then
if GetUnitAbilityLevel(GetEnumUnit(),'A1CB')==0 then
call AddPermanentAbility(GetEnumUnit(),'A1CB')
endif
elseif TK4==4 then
if GetUnitAbilityLevel(GetEnumUnit(),'A1CC')==0 then
call AddPermanentAbility(GetEnumUnit(),'A1CC')
endif
endif
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)then
call WF8(GetEnumUnit(),R2I((I2R(GetHeroAgi(GetEnumUnit(),true))/ 7)*I2R(TK4)/ 4))
endif
endfunction
function MFH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local group PLF=(LoadGroupHandle(R8,(W57),(340)))
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local group g=OG8()
local group g2
if Z77==null or GetUnitTypeId(Z77)!='O015' then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call OF8(PLF)
call OF8(g)
return false
endif
set H04=Z77
set TK4=GetUnitAbilityLevel(Z77,'A1CD')
call GroupEnumUnitsInRange(g,x,y,300,Condition(function UM8))
if((LoadInteger(R8,(GetHandleId((Z77))),((4270))))==1)then
set g2=OG8()
call GroupEnumUnitsInRange(g2,GetUnitX((TR4[GetPlayerId(GetOwningPlayer((Z77)))])),GetUnitY((TR4[GetPlayerId(GetOwningPlayer((Z77)))])),300,Condition(function UM8))
call GroupAddGroup(g2,g)
call OF8(g2)
set g2=null
endif
call GroupRemoveGroup(g,PLF)
call ForGroup(PLF,function MDH)
if O18(Z77)==false then
call ForGroup(g,function MEH)
endif
call SaveGroupHandle(R8,(W57),(340),(g))
call OF8(PLF)
set t=null
set Z77=null
set PLF=null
return false
endfunction
function MGH takes unit Z77,boolean SY8 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer i
local player p
call AddPermanentAbility(Z77,'A1CQ')
call TriggerRegisterTimerEvent(t,.3,true)
call TriggerAddCondition(t,Condition(function MFH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveGroupHandle(R8,(W57),(340),(OG8()))
call SaveTriggerHandle(R8,(GetHandleId(Z77)),(338),(t))
call SaveBoolean(R8,(GetHandleId(Z77)),(339),(true))
set i=0
loop
exitwhen i>5
set p=G8[i]
call SetPlayerAbilityAvailable(p,'A1CA',false)
call SetPlayerAbilityAvailable(p,'A1C9',false)
call SetPlayerAbilityAvailable(p,'A1CB',false)
call SetPlayerAbilityAvailable(p,'A1CC',false)
set p=N8[i]
call SetPlayerAbilityAvailable(p,'A1CA',false)
call SetPlayerAbilityAvailable(p,'A1C9',false)
call SetPlayerAbilityAvailable(p,'A1CB',false)
call SetPlayerAbilityAvailable(p,'A1CC',false)
set i=i+1
endloop
if GetUnitPointValue(Z77)==500 then
set UW7[GetPlayerId(GetOwningPlayer(Z77))]=t
endif
set t=null
set Z77=null
endfunction
function MHH takes nothing returns boolean
if GetLearnedSkill()=='A1CD' and GetUnitAbilityLevel(GetTriggerUnit(),'A1CD')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call MGH(GetTriggerUnit(),false)
endif
return false
endfunction
function GT9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function MHH))
set t=null
endfunction
function MIH takes nothing returns nothing
local real x1=Z1
local real y1=v2
local real x2=TS4
local real y2=o2
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 P99=GetUnitState(GetEnumUnit(),UNIT_STATE_MAX_LIFE)*.35/ 2
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)then
call SetUnitPosition(GetEnumUnit(),x4,y4)
else
call SetUnitX(GetEnumUnit(),x4)
call SetUnitY(GetEnumUnit(),y4)
endif
call IssueTargetOrderById(Y1,852075,GetEnumUnit())
call Dmg(z1,GetEnumUnit(),NormalFire,P99)
call Dmg(z1,GetEnumUnit(),HeroNormal,P99)
endfunction
function MJH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=(LoadUnitHandle(R8,(EC8),(2)))
local real x0=(LoadReal(R8,(EC8),(282)))
local real y0=(LoadReal(R8,(EC8),(283)))
local real a0=(LoadReal(R8,(EC8),(341)))
local integer i=0
local real x
local real y
local group g=OG8()
local group ZZE=OG8()
local integer TA8=GetUnitAbilityLevel(p5,'A1A1')
local integer VID=(LoadInteger(R8,(EC8),(34)))
call FlushChildHashtable(R8,(EC8))
call EA8(t)
set H04=p5
set z1=p5
set Y1=CreateUnit(GetOwningPlayer(p5),'e00E',x0,y0,0)
call AddPermanentAbility(Y1,'A1CE')
call SetUnitAbilityLevel(Y1,'A1CE',TA8)
loop
exitwhen i>VID
set x=x0+i*200*Cos(a0)
set y=y0+i*200*Sin(a0)
call QH8("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 KillTrees(x,y,300)
call GroupEnumUnitsInRange(g,x,y,325,Condition(function UM8))
call GroupAddGroup(g,ZZE)
call GroupClear(g)
set i=i+1
endloop
set Z1=x0
set v2=y0
set TS4=x
set o2=y
call ForGroup(ZZE,function MIH)
call OF8(ZZE)
call OF8(g)
set t=null
set p5=null
return false
endfunction
function MKH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=(LoadUnitHandle(R8,(EC8),(2)))
local real a=(LoadReal(R8,(EC8),(137)))
local real x0=(LoadReal(R8,(EC8),(282)))
local real y0=(LoadReal(R8,(EC8),(283)))
local real a0
local real MMH
local real MNH
local real MOH
local real MPH
local real MQH
local real MRH
local real MSH
local real MTH
local real MUH
local real MVH
local real MWH
local real MXH
local real x
local real y
local ubersplat BHG
local integer P89=GetTriggerEvalCount(t)
local integer VID=(LoadInteger(R8,(EC8),(34)))
set x=x0+200*P89*Cos(a)
set y=y0+200*P89*Sin(a)
set BHG=CreateUbersplat(x,y,"THND",255,255,255,255,false,false)
call SetUbersplatRenderAlways(BHG,true)
set MMH=x+200*Cos(bj_DEGTORAD*(a*bj_RADTODEG-45))
set MNH=y+200*Sin(bj_DEGTORAD*(a*bj_RADTODEG-45))
set MOH=x+200*Cos(bj_DEGTORAD*(a*bj_RADTODEG+45))
set MPH=y+200*Sin(bj_DEGTORAD*(a*bj_RADTODEG+45))
set MQH=x-'d'*Cos(bj_DEGTORAD*(a*bj_RADTODEG-45))
set MRH=y-'d'*Sin(bj_DEGTORAD*(a*bj_RADTODEG-45))
set MSH=x-'d'*Cos(bj_DEGTORAD*(a*bj_RADTODEG+45))
set MTH=y-'d'*Sin(bj_DEGTORAD*(a*bj_RADTODEG+45))
set MUH=x
set MVH=y
set MWH=x
set MXH=y
call S18(GetOwningPlayer(p5),4,x,y,500)
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",MMH,MNH))
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",MOH,MPH))
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",MQH,MRH))
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",MSH,MTH))
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",MUH,MVH))
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",MWH,MXH))
if GetTriggerEvalCount(t)>VID then
set x0=(LoadReal(R8,(EC8),(282)))
set y0=(LoadReal(R8,(EC8),(283)))
set a0=(LoadReal(R8,(EC8),(341)))
call FlushChildHashtable(R8,(EC8))
call EA8(t)
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.5,false)
call TriggerAddCondition(t,Condition(function MJH))
call SaveUnitHandle(R8,(EC8),(2),(p5))
call SaveReal(R8,(EC8),(282),((x0)*1.))
call SaveReal(R8,(EC8),(283),((y0)*1.))
call SaveReal(R8,(EC8),(341),((a0)*1.))
call SaveInteger(R8,(EC8),(34),(VID))
endif
set t=null
set p5=null
return false
endfunction
function MYH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer EC8=GetHandleId(t)
local unit p5=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local real a=Atan2(y-GetUnitY(p5),x-GetUnitX(p5))
local integer VID=11
call TriggerRegisterTimerEvent(t,.22,true)
call TriggerAddCondition(t,Condition(function MKH))
call SaveUnitHandle(R8,(EC8),(2),(p5))
call SaveReal(R8,(EC8),(6),((GetUnitX(p5))*1.))
call SaveReal(R8,(EC8),(7),((GetUnitY(p5))*1.))
call SaveReal(R8,(EC8),(137),((a)*1.))
call SaveReal(R8,(EC8),(282),((GetUnitX(p5))*1.))
call SaveReal(R8,(EC8),(283),((GetUnitY(p5))*1.))
call SaveReal(R8,(EC8),(341),((a)*1.))
call SaveInteger(R8,(EC8),(34),(VID))
set t=null
set p5=null
endfunction
function MZH takes nothing returns boolean
if GetSpellAbilityId()=='A1A1' then
call MYH()
endif
return false
endfunction
function GR9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function MZH))
set t=null
endfunction
function MAH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call UnitRemoveAbility(Z77,'A2NI')
call UnitAddAbility(Z77,'A2NI')
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function MBH takes unit Z77 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function MAH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=null
endfunction
function MCH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer EC8=GetHandleId(t)
local unit p5=(LoadUnitHandle(R8,(EC8),(2)))
call DestroyEffect((LoadEffectHandle(R8,(EC8),(32))))
call FlushChildHashtable(R8,(EC8))
call EA8(t)
call W78(p5,0)
set t=null
set p5=null
return false
endfunction
function M3H takes unit Z77,unit Q89,unit M6H,integer MLH,integer M1H returns nothing
local trigger t
local integer W57
local unit AC7
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",Q89,"chest"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",Z77,"chest"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",Z77,"origin"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",Z77,"hand,left"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",Z77,"hand,right"))
call ShowUnit(Q89,false)
call KillUnit(Q89)
call KillUnit(M6H)
if GetPlayerController(GetOwningPlayer(Z77))==MAP_CONTROL_COMPUTER then
call RemoveSavedHandle(R8,GetHandleId(Z77),StringHash("AI|AncestralCharge"))
endif
call SaveInteger(R8,(GetHandleId((Z77))),((4270)),(2))
if M1H>0 or MLH>0 then
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,9.1,false)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MCH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
call AddPermanentAbility(AC7,'A1G9')
call SetUnitAbilityLevel(AC7,'A1G9',M1H)
call IssueTargetOrderById(AC7,852101,Z77)
call W78(Z77,MLH)
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("war3mapImported\\RadianceHands.mdx",Z77,"weapon")))
endif
set t=null
set AC7=null
endfunction
function M0H takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),M1)==false then
if IsUnitIllusion(GetEnumUnit())==false then
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)then
set TP4=TP4+(TO4*10)
set TQ4=TQ4+5
else
set TP4=TP4+(TO4*3)
set TQ4=TQ4+1
endif
endif
call GroupAddUnit(M1,GetEnumUnit())
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",GetEnumUnit(),"chest"))
set w1=true
set W1=true
call Dmg(TM4,GetEnumUnit(),NormalFire,TN4)
set w1=false
set W1=false
endif
endfunction
function M5H takes real M2H,real M_H,real N4H,real N7H,real N8H,real N9H returns real
local real NDH
local real NEH
local real NFH
local real NGH
local real NHH
local real NIH
local real NJH
local real REFLECTED_SCALED_V_X
local real REFLECTED_SCALED_V_Y
local real NKH
local real NMH
local real NNH
local real NOH
local real NPH
local real NQH
local real NRH
local real NSH
set NNH=N4H-N8H
set NOH=N7H-N9H
set NPH=-1*NOH
set NQH=NNH
set NRH=SquareRoot(NPH*NPH+NQH*NQH)
set NPH=NPH/ NRH
set NQH=NQH/ NRH
set NDH=M2H-N4H
set NEH=M_H-N7H
set NFH=SquareRoot(NDH*NDH+NEH*NEH)
set NGH=NDH/ NFH
set NHH=NEH/ NFH
set NSH=NDH*NPH+NEH*NQH
set NIH=-1*M2H+2*N4H+2*NPH*NSH
set NJH=-1*M_H+2*N7H+2*NQH*NSH
set NKH=N8H+N4H-NIH
set NMH=N9H+N7H-NJH
return NKH
endfunction
function NTH takes real M2H,real M_H,real N4H,real N7H,real N8H,real N9H returns real
local real NDH
local real NEH
local real NFH
local real NGH
local real NHH
local real NIH
local real NJH
local real REFLECTED_SCALED_V_X
local real REFLECTED_SCALED_V_Y
local real NKH
local real NMH
local real NNH
local real NOH
local real NPH
local real NQH
local real NRH
local real NSH
set NNH=N4H-N8H
set NOH=N7H-N9H
set NPH=-1*NOH
set NQH=NNH
set NRH=SquareRoot(NPH*NPH+NQH*NQH)
set NPH=NPH/ NRH
set NQH=NQH/ NRH
set NDH=M2H-N4H
set NEH=M_H-N7H
set NFH=SquareRoot(NDH*NDH+NEH*NEH)
set NGH=NDH/ NFH
set NHH=NEH/ NFH
set NSH=NDH*NPH+NEH*NQH
set NIH=-1*M2H+2*N4H+2*NPH*NSH
set NJH=-1*M_H+2*N7H+2*NQH*NSH
set NKH=N8H+N4H-NIH
set NMH=N9H+N7H-NJH
return NMH
endfunction
function NUH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit Q89=(LoadUnitHandle(R8,(W57),(335)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local real x0=(LoadReal(R8,(W57),(282)))
local real y0=(LoadReal(R8,(W57),(283)))
local real x1=GetUnitX(Z77)
local real y1=GetUnitY(Z77)
local real x2=GetUnitX(Q89)
local real y2=GetUnitY(Q89)
local real x3
local real y3
local real a
local group XCD=(LoadGroupHandle(R8,(W57),(187)))
local group g
local real d
local integer ML8=GetUnitAbilityLevel(Z77,'A1A8')
local real NVH=(LoadReal(R8,(W57),(342)))
local real PX9=(TimerGetElapsed(E4))
call SetUnitX(AC7,GetUnitX(Q89))
call SetUnitY(AC7,GetUnitY(Q89))
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call OF8(XCD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
call ShowUnit(Q89,false)
call KillUnit(Q89)
call KillUnit(AC7)
if GetPlayerController(GetOwningPlayer(Z77))==MAP_CONTROL_COMPUTER then
call RemoveSavedHandle(R8,GetHandleId(Z77),StringHash("AI|AncestralCharge"))
endif
call SaveInteger(R8,(GetHandleId((Z77))),((4270)),(2))
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A1A8' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1A8',true)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2NI',false)
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A2NI' then
call IssueImmediateOrderById(Q89,851972)
call SaveBoolean(R8,(W57),(249),(true))
call SetUnitAnimationByIndex(Q89,3)
call MBH(GetTriggerUnit())
elseif GetSpellAbilityId()=='A2LK' then
if IssueImmediateOrderById(Z77,852581)then
call UnitRemoveAbility(Q89,'A2LK')
endif
endif
if GetPlayerController(GetOwningPlayer(Z77))==MAP_CONTROL_COMPUTER then
call RemoveSavedHandle(R8,GetHandleId(Z77),StringHash("AI|AncestralCharge"))
endif
elseif Z87(x1,y1,x2,y2)<'d' then
call M3H(Z77,Q89,AC7,(LoadInteger(R8,(W57),(344))),(LoadInteger(R8,(W57),(345))))
call OF8(XCD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A1A8' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1A8',true)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2NI',false)
elseif GetTriggerEvalCount(t)>400 or(LoadBoolean(R8,(W57),(249)))then
call AddPermanentAbility(Q89,'Aloc')
if GetTriggerEvalCount(t)==401 and(LoadBoolean(R8,(W57),(249)))==false then
call IssueImmediateOrderById(Q89,851972)
call SetUnitAnimationByIndex(Q89,3)
endif
set g=OG8()
set TO4=ML8
set TP4=(LoadInteger(R8,(W57),(344)))
set TQ4=(LoadInteger(R8,(W57),(345)))
set TN4=20+40*ML8
set TM4=Z77
set H04=Z77
set M1=XCD
call GroupEnumUnitsInRange(g,GetUnitX(Q89),GetUnitY(Q89),300,Condition(function UM8))
call ForGroup(g,function M0H)
call OF8(g)
set g=null
call SaveInteger(R8,(W57),(344),(TP4))
call SaveInteger(R8,(W57),(345),(TQ4))
if((LoadInteger(R8,(GetHandleId((Z77))),((4269))))==1)==false then
set a=Atan2(y1-y2,x1-x2)
call SetUnitFacing(Q89,a*bj_RADTODEG)
set x3=GetUnitX(Q89)+12*Cos(a)
set y3=GetUnitY(Q89)+12*Sin(a)
call SetUnitX(Q89,PQ8(x3))
call SetUnitY(Q89,PS8(y3))
call SaveReal(R8,(W57),(282),((x1)*1.))
call SaveReal(R8,(W57),(283),((y1)*1.))
endif
else
call SetUnitMoveSpeed(Q89,GetUnitMoveSpeed(Z77))
call UnitRemoveAbility(Q89,'Aloc')
set g=OG8()
set TO4=ML8
set TP4=(LoadInteger(R8,(W57),(344)))
set TQ4=(LoadInteger(R8,(W57),(345)))
set TN4=80+40*ML8
set TM4=Z77
set H04=Z77
set M1=XCD
call GroupEnumUnitsInRange(g,GetUnitX(Q89),GetUnitY(Q89),300,Condition(function UM8))
call ForGroup(g,function M0H)
call OF8(g)
set g=null
call SaveInteger(R8,(W57),(344),(TP4))
call SaveInteger(R8,(W57),(345),(TQ4))
if x0!=x1 or y0!=y1 then
set NVH=PX9
call SaveReal(R8,(W57),(342),((NVH)*1.))
endif
if((LoadInteger(R8,(GetHandleId((Z77))),((4269))))==1)==false then
if NVH==PX9 then
set x3=M5H(x0,y0,x1,y1,x2,y2)
set y3=NTH(x0,y0,x1,y1,x2,y2)
set a=Atan2(y3-y2,x3-x2)*bj_RADTODEG
call SaveReal(R8,(W57),(282),((x1)*1.))
call SaveReal(R8,(W57),(283),((y1)*1.))
endif
if(NVH+.3)<PX9 then
call SaveInteger(R8,(W57),(343),(1))
elseif(NVH+.3)>PX9 and(LoadInteger(R8,(W57),(343)))==1 then
call SaveInteger(R8,(W57),(343),(2))
elseif(LoadInteger(R8,(W57),(343)))==3 then
call SaveInteger(R8,(W57),(343),(1))
endif
else
call SaveInteger(R8,(W57),(343),(3))
endif
endif
set t=null
set Z77=null
set Q89=null
set XCD=null
set AC7=null
return false
endfunction
function NWH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real x0=GetUnitX(Z77)
local real y0=GetUnitY(Z77)
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=P18(Z87(x0,y0,lx,ly),300)
local real x1=PQ8(x0+d*Cos(a))
local real y1=PS8(y0+d*Sin(a))
local unit Q89=CreateUnit(GetOwningPlayer(Z77),'h07U',x1,y1,(a*bj_RADTODEG)-180)
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'o021',x1,y1,(a*bj_RADTODEG)-180)
call SetUnitMoveSpeed(Q89,GetUnitMoveSpeed(Z77))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",Q89,"chest"))
if GetUnitAbilityLevel(Z77,'A1CD')>0 then
call AddPermanentAbility(Q89,'A1CQ')
endif
if GetUnitAbilityLevel(Z77,'A1AA')==0 then
call UnitRemoveAbility(Q89,'A2LK')
endif
call UnitAddAbility(Z77,'A2NI')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1A8',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2NI',true)
call RemoveLocation(l)
set TR4[GetPlayerId(GetOwningPlayer(Z77))]=Q89
call SaveInteger(R8,(GetHandleId((Z77))),((4270)),(1))
call AddPermanentAbility(Q89,'Avul')
call AddPermanentAbility(Q89,'Aetl')
if(LoadBoolean(R8,(GetHandleId(Z77)),(339)))then
call TriggerEvaluate((LoadTriggerHandle(R8,(W57),(338))))
endif
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,Q89,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function NUH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(335),(Q89))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveReal(R8,(W57),(282),((x0)*1.))
call SaveReal(R8,(W57),(283),((y0)*1.))
call SaveGroupHandle(R8,(W57),(187),(OG8()))
call SaveInteger(R8,(W57),(343),(2))
call SaveReal(R8,(W57),(342),(((TimerGetElapsed(E4))-5)*1.))
call SaveBoolean(R8,(W57),(249),(false))
if GetPlayerController(GetOwningPlayer(Z77))==MAP_CONTROL_COMPUTER then
call SUnit(GetHandleId(Z77),"AI|AncestralCharge",Q89)
call SInt(GetHandleId(Z77),"AI|AncestralCharge|hTrig",W57)
endif
set t=null
set Z77=null
set Q89=null
set AC7=null
endfunction
function NXH takes nothing returns boolean
if GetSpellAbilityId()=='A1A8' then
call NWH()
endif
return false
endfunction
function GS9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function NXH))
call PU8('A1G9')
set t=null
endfunction
function NYH takes nothing returns boolean
if GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_COMPUTER and(GetItemTypeId(GetManipulatedItem())==BU[donglixie2]or GetItemTypeId(GetManipulatedItem())==BU[donglixie1]or GetItemTypeId(GetManipulatedItem())==BU[donglixie3])then
call UnitRemoveAbility(GetTriggerUnit(),'A14A')
endif
if GetItemTypeId(GetManipulatedItem())=='IZ0L' then
call RemoveItem(GetManipulatedItem())
set bj_lastCreatedItem=CreateItem(AU[GetRandomInt(1,EX4)],0,0)
call SetItemUserData(bj_lastCreatedItem,1)
call SetItemPlayer(bj_lastCreatedItem,GetOwningPlayer(GetTriggerUnit()),true)
call UnitAddItem(GetTriggerUnit(),bj_lastCreatedItem)
if GetItemTypeId(bj_lastCreatedItem)=='I0NE' or GetItemTypeId(bj_lastCreatedItem)=='I05F' or GetItemTypeId(bj_lastCreatedItem)=='I05D' or GetItemTypeId(bj_lastCreatedItem)=='I05C' then
call SetItemCharges(bj_lastCreatedItem,5)
elseif GetItemTypeId(bj_lastCreatedItem)=='I0AW' then
call SetItemCharges(bj_lastCreatedItem,1)
endif
call Achieve(GetOwningPlayer(GetTriggerUnit()),'CJ26')
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,GetUnitName(GetTriggerUnit())+GetObjectName('OP02'))
endif
return false
endfunction
function NZH takes unit u,integer d returns nothing
local texttag t=CreateTextTag()
call SetTextTagText(t,"+"+I2S(d)+" "+GetObjectName('n0LQ'),.03)
call SetTextTagPosUnit(t,u,0)
call SetTextTagColorBJ(t,50,75,255,15)
call SetTextTagVelocity(t,0,.035)
call SetTextTagFadepoint(t,3)
call SetTextTagLifespan(t,2.5)
call SetTextTagPermanent(t,false)
call SetTextTagVisibility(t,false)
call SetTextTagVisibility(t,true)
if IsUnitVisibleEx(u,GetLocalPlayer())or N08(GetLocalPlayer())then
call SetTextTagVisibility(t,true)
else
call SetTextTagVisibility(t,false)
endif
set t=null
endfunction
function DarkRitual_Cond takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitType(GetFilterUnit(),UNIT_TYPE_DEAD)==false
endfunction
function NAH takes nothing returns nothing
local unit p5=GetTriggerUnit()
local unit m5=GetSpellTargetUnit()
local group g=CreateGroup()
local integer i
if GetUnitState(p5,UNIT_STATE_LIFE)>1 then
call SetUnitState(p5,UNIT_STATE_MANA,GetUnitState(p5,UNIT_STATE_MANA)+GetUnitState(m5,UNIT_STATE_LIFE)*(GetUnitAbilityLevel(p5,'A053')*.15+.1))
call NZH(m5,R2I(GetUnitState(m5,UNIT_STATE_LIFE)*(GetUnitAbilityLevel(p5,'A053')*.15+.1)))
call KillUnit(m5)
call GroupEnumUnitsInRange(g,GetUnitX(p5),GetUnitY(p5),1325,Condition(function DarkRitual_Cond))
if IsUnitType(m5,UNIT_TYPE_MELEE_ATTACKER)then
set i=62
else
set i=41
endif
set i=i/ CountUnitsInGroup(g)
loop
set m5=FirstOfGroup(g)
exitwhen m5==null
call AddHeroXP(m5,i,false)
call GroupRemoveUnit(g,m5)
endloop
endif
call DestroyGroup(g)
set g=null
set p5=null
set m5=null
endfunction
function NBH takes nothing returns boolean
if GetSpellAbilityId()=='A053' and IsCourier(GetSpellTargetUnit())==false then
call NAH()
endif
return false
endfunction
function NCH takes item Y98,unit Z77,boolean TBE returns nothing
local integer TS9=ZU7(Y98)
local integer W57=GetHandleId(Z77)
local string s=""
if(TS9==zhenshibaoshi and AU7(Z77,zhenshibaoshi,Y98)==null)or(TS9==OW and AU7(Z77,OW,Y98)==null)then
if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(Z77))or N08(GetLocalPlayer())then
set s=EE7
endif
if TBE then
if XYF(Z77)>0 or GetItemType(Y98)==ITEM_TYPE_PERMANENT or GetItemType(Y98)==ITEM_TYPE_CAMPAIGN then
if GetUnitAbilityLevel(Z77,'A26A')==0 and GetUnitAbilityLevel(Z77,'A26B')==0 then
if s==EE7 then
call AddPermanentAbility(Z77,'A26A')
else
call AddPermanentAbility(Z77,'A26B')
endif
endif
endif
else
if not(GetUnitAbilityLevel(Z77,'A26A')==0 and GetUnitAbilityLevel(Z77,'A26B')==0)then
call UnitRemoveAbility(Z77,'A26B')
call UnitRemoveAbility(Z77,'A26A')
call RemoveSavedHandle(R8,(W57),(670))
endif
endif
endif
endfunction
function N3H takes nothing returns boolean
local unit p5=GetTriggerUnit()
local item Y98=GetManipulatedItem()
local integer id=GetItemTypeId(Y98)
if GetUnitTypeId(p5)=='e01F' and GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM then
call UnitRemoveAbility(p5,'A04I')
endif
if Y98==null or IsUnitIllusion(p5)or IsUnitType(p5,UNIT_TYPE_HERO)==false or XC8(GetUnitTypeId(p5))or GetItemTypeId(Y98)=='I00E' or GetItemTypeId(Y98)=='I02M' then
set p5=null
set Y98=null
return false
endif
if(GetTriggerEventId()==EVENT_PLAYER_UNIT_DROP_ITEM and GetItemType(Y98)!=ITEM_TYPE_PURCHASABLE)or GetTriggerEventId()==EVENT_PLAYER_UNIT_PAWN_ITEM then
call NCH(Y98,p5,false)
call X48("DRI_"+I2S(GetPlayerId(GetOwningPlayer(p5))),BU[TJ9(ZU7(Y98))])
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM then
call NCH(Y98,p5,true)
call X48("PUI_"+I2S(GetPlayerId(GetOwningPlayer(p5))),BU[TJ9(ZU7(Y98))])
endif
set p5=null
set Y98=null
return false
endfunction
function N6H takes unit AM7 returns nothing
local integer id=GetPlayerId(GetOwningPlayer(AM7))
local integer NLH=TO9(AM7,1)
local integer N1H=GetUnitAbilityLevel(AM7,G04[NLH])
call UnitRemoveAbility(AM7,H74[NLH])
call UnitRemoveAbility(AM7,'A500')
call DisableTrigger(UU7[id])
call DisableTrigger(UY7[id])
call UnitRemoveAbility(AM7,'A0SA')
if NLH==43 then
call SInt(GetHandleId(AM7),"RefractionPrevent_Remaining",0)
call SInt(GetHandleId(AM7),"RefractionDamage_Remaining",0)
call UnitRemoveAbility(AM7,'A0RF')
call UnitRemoveAbility(AM7,'A0RM')
call UnitRemoveAbility(AM7,'A0RN')
endif
call NP8(UU7[id])
call NP8(UY7[id])
if N1H>0 then
call UnitAddAbility(AM7,'A500')
call SetUnitAbilityLevel(AM7,'A500',N1H)
endif
set UU7[id]=null
set UY7[id]=null
endfunction
function N0H takes unit AM7 returns nothing
local integer id=GetPlayerId(GetOwningPlayer(AM7))
local integer NLH=TO9(AM7,2)
local integer N5H=GetUnitAbilityLevel(AM7,G54[NLH])
local integer i=1
call UnitRemoveAbility(AM7,H84[NLH])
call UnitRemoveAbility(AM7,'A501')
call DisableTrigger(UV7[id])
call DisableTrigger(UZ7[id])
if NLH==59 then
call UnitRemoveAbility(AM7,'A021')
call SInt(GetHandleId(AM7),"TotalWebs",0)
loop
exitwhen i>8
call RemoveUnit(LUnit(GetHandleId(AM7),"Web"+I2S(i)))
set i=i+1
endloop
endif
if NLH==62 then
call UnitRemoveAbility(AM7,'A08C')
call RemoveUnit(LUnit(GetHandleId(UZ7[id]),"VisionUnit"))
if GetUnitAbilityLevel(AM7,'A086')==0 then
call UnitRemoveAbility(AM7,'A116')
call UnitRemoveAbility(AM7,'A117')
endif
endif
if NLH==78 then
call W78(AM7,0)
endif
call NP8(UV7[id])
call NP8(UZ7[id])
if N5H>0 then
call UnitAddAbility(AM7,'A501')
call SetUnitAbilityLevel(AM7,'A501',N5H)
endif
set UV7[id]=null
set UZ7[id]=null
endfunction
function Vge takes nothing returns nothing
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(W8),false)
endfunction
function N2H takes unit AM7 returns nothing
local integer id=GetPlayerId(GetOwningPlayer(AM7))
local integer NLH=TO9(AM7,3)
local integer N_H=GetUnitAbilityLevel(AM7,G24[NLH])
local group g=null
call UnitRemoveAbility(AM7,H94[NLH])
call UnitRemoveAbility(AM7,'A502')
call DisableTrigger(UW7[id])
call DisableTrigger(UA7[id])
call UnitRemoveAbility(AM7,'A13D')
if NLH==15 then
call UnitRemoveAbility(AM7,'A1CQ')
call ForGroup(LGroup(GetHandleId(UW7[id]),"ActiveGroup"),function MDH)
call OF8(LGroup(GetHandleId(UW7[id]),"ActiveGroup"))
endif
if NLH==27 then
call UnitRemoveAbility(AM7,'A0NZ')
endif
if NLH==38 then
call UnitRemoveAbility(AM7,'A1FC')
endif
if NLH==41 then
call DestroyEffect(LEff(GetHandleId(AM7),"OverloadFX1"))
call DestroyEffect(LEff(GetHandleId(AM7),"OverloadFX2"))
endif
if NLH==42 then
call DestroyEffect(LEff(GetHandleId(UW7[id]),"FX1"))
call DestroyEffect(LEff(GetHandleId(UW7[id]),"FX2"))
call W78(AM7,0)
call WE8(AM7,0)
endif
if NLH==58 then
call RemoveUnit(LUnit(GetHandleId(AM7),"FeralHeartCaster"))
endif
if NLH==60 then
call SetUnitVertexColorBJ(AM7,'d','d','d',0)
call UnitRemoveAbility(AM7,'A13F')
call UnitRemoveAbility(AM7,'A13H')
call UnitRemoveAbility(AM7,'A13G')
call UnitRemoveAbility(AM7,'B0A2')
call UnitRemoveAbility(AM7,'B0A1')
call UnitRemoveAbility(AM7,'B0A3')
call UnitRemoveAbility(AM7,'A13I')
call UnitRemoveAbility(AM7,'B0A0')
endif
if NLH==62 then
call UnitRemoveAbility(AM7,'S00A')
call RemoveUnit(LUnit(GetHandleId(UA7[id]),"VisionUnit"))
if GetUnitAbilityLevel(AM7,'A08E')==0 then
call UnitRemoveAbility(AM7,'A116')
call UnitRemoveAbility(AM7,'A117')
endif
endif
if NLH==87 then
call UnitRemoveAbility(AM7,'A0OL')
call UnitRemoveAbility(AM7,'A0OM')
call UnitRemoveAbility(AM7,'A0ON')
call UnitRemoveAbility(AM7,'A0OH')
endif
call NP8(UW7[id])
call NP8(UA7[id])
if N_H>0 then
call UnitAddAbility(AM7,'A502')
call SetUnitAbilityLevel(AM7,'A502',N_H)
endif
set UW7[id]=null
set UA7[id]=null
set g=null
endfunction
function O4H takes unit AM7 returns nothing
local integer id=GetPlayerId(GetOwningPlayer(AM7))
local integer NLH=TO9(AM7,4)
local boolean C7D=AR7(AM7,BU[UG7])
local integer O7H=GetUnitAbilityLevel(AM7,G_4[NLH])
if C7D and H44[NLH]!=0 then
set O7H=GetUnitAbilityLevel(AM7,H44[NLH])
endif
call UnitRemoveAbility(AM7,HD4[NLH])
call UnitRemoveAbility(AM7,HE4[NLH])
call UnitRemoveAbility(AM7,'A503')
call DisableTrigger(UX7[id])
call DisableTrigger(UB7[id])
call UnitRemoveAbility(AM7,'A0MB')
call UnitRemoveAbility(AM7,'A02T')
call UnitRemoveAbility(AM7,'A0RT')
call UnitRemoveAbility(AM7,'A0HA')
call UnitRemoveAbility(AM7,'A1IE')
call UnitRemoveAbility(AM7,'B0C9')
call UnitRemoveAbility(AM7,'A1IF')
call UnitRemoveAbility(AM7,'B0C9')
call UnitRemoveAbility(AM7,'A1IG')
call UnitRemoveAbility(AM7,'B0C9')
if NLH==29 then
call RemoveUnit(LUnit(GetHandleId(AM7),"Warpath|Caster"))
call W78(AM7,0)
endif
call NP8(UX7[id])
call NP8(UB7[id])
if O7H>0 then
call UnitAddAbility(AM7,'A503')
call SetUnitAbilityLevel(AM7,'A503',O7H)
endif
call TimerStart(M_4[id],0,false,null)
set UX7[id]=null
set UB7[id]=null
endfunction
function O8H takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit AM7=LUnit(GetHandleId(t),"FormlessUnit")
local integer KB8=LInt(GetHandleId(t),"GAD")
call IssueImmediateOrderById(AM7,852178)
if KB8=='A504' then
call N6H(AM7)
call N0H(AM7)
call N2H(AM7)
call O4H(AM7)
elseif KB8=='A505' then
call N6H(AM7)
elseif KB8=='A506' then
call N0H(AM7)
elseif KB8=='A507' then
call N2H(AM7)
elseif KB8=='A508' then
call O4H(AM7)
endif
call DestroyTimer(t)
set AM7=null
set t=null
endfunction
function O9H takes unit AM7,integer KB8 returns nothing
local timer t=CreateTimer()
call IssueImmediateOrderById(AM7,851972)
call SUnit(GetHandleId(t),"FormlessUnit",AM7)
call SInt(GetHandleId(t),"GAD",KB8)
call TimerStart(t,0,false,function O8H)
set t=null
endfunction
function ODH takes nothing returns nothing
local timer t=CreateTimer()
call IssueImmediateOrderById(bj_lastCreatedUnit,851972)
call SUnit(GetHandleId(t),"FormlessUnit",bj_lastCreatedUnit)
call SInt(GetHandleId(t),"GAD",'A504')
call TimerStart(t,0,false,function O8H)
set t=null
endfunction
function OEH takes nothing returns boolean
if GetSpellAbilityId()=='A504' or GetSpellAbilityId()=='A505' or GetSpellAbilityId()=='A506' or GetSpellAbilityId()=='A507' or GetSpellAbilityId()=='A508' then
call O9H(GetTriggerUnit(),GetSpellAbilityId())
endif
return false
endfunction
function GAD takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OEH))
set t=null
endfunction
function OFH takes nothing returns boolean
return GetSpellAbilityId()=='A500' or GetSpellAbilityId()=='A501' or GetSpellAbilityId()=='A502' or GetSpellAbilityId()=='A503'
endfunction
function OGH takes nothing returns nothing
local unit AM7=GetTriggerUnit()
local player p=GetOwningPlayer(AM7)
local integer Y28=GetUnitPointValue(GetSpellTargetUnit())
local integer KB8=GetSpellAbilityId()
local integer ML8=GetUnitAbilityLevel(AM7,KB8)
local integer id=GetPlayerId(p)
local unit Y_8=null
local integer OHH=0
local integer OIH=0
local integer OJH=0
local string OKH=""
local string fx=""
local trigger t
local integer OMH=TO9(AM7,1)
local integer ONH=TO9(AM7,2)
local integer OOH=TO9(AM7,3)
local integer OPH=TO9(AM7,4)
if KB8=='A500' then
set OHH=G04[Y28]
set OIH=H74[Y28]
set OKH=HF4[Y28]
set fx="Abilities\\Spells\\Items\\AIsm\\AIsmTarget.mdl"
elseif KB8=='A501' then
set OHH=G54[Y28]
set OIH=H84[Y28]
set OKH=HG4[Y28]
set fx="Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl"
elseif KB8=='A502' then
set OHH=G24[Y28]
set OIH=H94[Y28]
set OKH=HH4[Y28]
set fx="Abilities\\Spells\\Items\\AIam\\AIamTarget.mdl"
elseif KB8=='A503' then
set OHH=G_4[Y28]
set OIH=HD4[Y28]
set OKH=HI4[Y28]
set fx="Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl"
if H44[Y28]!=0 and AR7(AM7,BU[UG7])then
set OHH=H44[Y28]
set OIH=HE4[Y28]
endif
endif
if OIH==0 then
call ShowWarningToPlayer(p,"Unable to copy "+GetAbilityName(OHH)+".")
elseif UC7[id]==false and OKH!="passive" and(OKH==HF4[OMH]or OKH==HG4[ONH]or OKH==HH4[OOH]or OKH==HI4[OPH])then
if OKH==HF4[OMH]then
set OJH=G04[OMH]
elseif OKH==HG4[ONH]then
set OJH=G54[ONH]
elseif OKH==HH4[OOH]then
set OJH=G24[OOH]
elseif OKH==HI4[OPH]then
set OJH=G_4[OPH]
endif
call ShowWarningToPlayer(p,"Cannot copy "+GetAbilityName(OHH)+" because you already
		have an ability with this base order ( "+GetAbilityName(OJH)+" ).
		Use - override to disable this.")
else
call DestroyEffect(AddSpecialEffectTarget(fx,AM7,"origin"))
call UnitRemoveAbility(AM7,KB8)
call UnitAddAbility(AM7,OIH)
call SetPlayerAbilityAvailable(p,OIH,false)
call UnitModifySkillPoints(AM7,ML8)
if OHH=='A0S9' then
call UnitAddAbility(AM7,'A0SA')
elseif OHH=='A11N' then
call UnitAddAbility(AM7,'A13D')
elseif OHH=='A00J' then
call UnitAddAbility(AM7,'A0MB')
call SetUnitAbilityLevel(AM7,'A0MB',ML8)
elseif OHH=='A0AK' or OHH=='A1FY' then
call UnitAddAbility(AM7,'A1WF')
elseif OHH=='A0RP' then
call UnitAddAbility(AM7,'A0RT')
elseif OHH=='A0H9' then
call UnitAddAbility(AM7,'A0HA')
endif
if OHH=='A0DY' then
call UHD(AM7,true)
elseif OHH=='A18X' then
call K8H(AM7,true)
elseif OHH=='A0LZ' then
call DVE(AM7,true)
elseif OHH=='A1CD' then
call MGH(AM7,true)
elseif OHH=='A19Q' then
call HLE(AM7,true)
elseif OHH=='A0M3' then
call RRD(AM7,true)
elseif OHH=='A0FV' then
call RDD(AM7,true)
elseif OHH=='A1IQ' then
call QXD(AM7,true)
elseif OHH=='A0O8' then
call X8D(AM7,true)
elseif OHH=='A0QW' then
call F7E(AM7,true)
elseif OHH=='A0QN' then
call WND(AM7,true)
elseif OHH=='A0QQ' then
call WWD(AM7,true)
elseif OHH=='A1EA' then
call I_E(AM7,true)
elseif OHH=='A03E' then
call V8F(AM7,true)
elseif OHH=='A0BG' then
call NLE(AM7,true)
elseif OHH=='A08E' or OHH=='A086' then
call CSE(AM7,true,OHH)
elseif OHH=='A0CZ' then
call P1E(AM7,true)
elseif OHH=='A081' then
call QAE(AM7,true)
elseif OHH=='A1E6' then
call E6F(AM7,true)
elseif OHH=='A0SS' then
call RMG(AM7,true)
elseif OHH=='A04E' then
call JSF(AM7,true)
elseif OHH=='A01N' then
call B9E(AM7,true)
elseif OHH=='A06D' then
elseif OHH=='A0ES' then
call IGF(AM7,true)
elseif OHH=='A0CT' then
elseif OHH=='A0NS' or OHH=='A1DA' then
call MEE(AM7,true)
elseif OHH=='A0NA' then
call HYF(AM7,true)
elseif OHH=='A0OI' then
call OUE(AM7,true)
elseif OHH=='A0IF' then
call OSE(AM7,true)
elseif OHH=='A1IN' then
call QBF(AM7,true)
endif
endif
set AM7=null
set p=null
set t=null
endfunction
function GZD takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OFH))
call TriggerAddAction(t,function OGH)
set t=null
endfunction
function OQH takes nothing returns boolean
return(GetLearnedSkill()=='A500' or GetLearnedSkill()=='A501' or GetLearnedSkill()=='A502' or GetLearnedSkill()=='A503')and GetUnitAbilityLevel(GetTriggerUnit(),'A504')==0 and GetUnitAbilityLevel(GetTriggerUnit(),'A505')==0 and GetUnitAbilityLevel(GetTriggerUnit(),'A506')==0 and GetUnitAbilityLevel(GetTriggerUnit(),'A507')==0 and GetUnitAbilityLevel(GetTriggerUnit(),'A508')==0
endfunction
function ORH takes nothing returns boolean
return GetIssuedOrderId()==852543
endfunction
function OSH takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit OTH=LUnit(GetHandleId(t),"FormlessUnit")
local integer OUH
call IssueImmediateOrderById(OTH,852544)
if GetUnitAbilityLevel(OTH,'A504')>0 then
set OUH='A509'
elseif GetUnitAbilityLevel(OTH,'A505')>0 then
set OUH='A50A'
elseif GetUnitAbilityLevel(OTH,'A506')>0 then
set OUH='A50B'
elseif GetUnitAbilityLevel(OTH,'A507')>0 then
set OUH='A50C'
elseif GetUnitAbilityLevel(OTH,'A508')>0 then
set OUH=0
endif
call UnitRemoveAbility(OTH,'A509')
call UnitRemoveAbility(OTH,'A50A')
call UnitRemoveAbility(OTH,'A50B')
call UnitRemoveAbility(OTH,'A50C')
if OUH!=0 then
call UnitAddAbility(OTH,OUH)
call SetPlayerAbilityAvailable(GetOwningPlayer(OTH),OUH,false)
endif
call LT7(GetHandleId(t))
call DestroyTimer(t)
set t=null
set OTH=null
endfunction
function OVH takes nothing returns nothing
local unit OTH=GetTriggerUnit()
local timer t=CreateTimer()
call SUnit(GetHandleId(t),"FormlessUnit",OTH)
call TimerStart(t,0,false,function OSH)
set OTH=null
set t=null
endfunction
function OWH takes nothing returns nothing
local integer VCe=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function ORH))
call TriggerAddAction(t,function OVH)
if GetLearnedSkill()!='A500' then
call UnitAddAbility(GetTriggerUnit(),'A500')
call UnitRemoveAbility(GetTriggerUnit(),'A500')
elseif GetLearnedSkill()!='A501' then
call UnitAddAbility(GetTriggerUnit(),'A501')
call UnitRemoveAbility(GetTriggerUnit(),'A501')
elseif GetLearnedSkill()!='A502' then
call UnitAddAbility(GetTriggerUnit(),'A502')
call UnitRemoveAbility(GetTriggerUnit(),'A502')
elseif GetLearnedSkill()!='A503' then
call UnitAddAbility(GetTriggerUnit(),'A503')
call UnitRemoveAbility(GetTriggerUnit(),'A503')
endif
call UnitAddAbility(GetTriggerUnit(),'A505')
call UnitRemoveAbility(GetTriggerUnit(),'A505')
call UnitAddAbility(GetTriggerUnit(),'A506')
call UnitRemoveAbility(GetTriggerUnit(),'A506')
call UnitAddAbility(GetTriggerUnit(),'A507')
call UnitRemoveAbility(GetTriggerUnit(),'A507')
call UnitAddAbility(GetTriggerUnit(),'A508')
call UnitRemoveAbility(GetTriggerUnit(),'A508')
call UnitAddAbility(GetTriggerUnit(),'A504')
set t=null
endfunction
function GBD takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function OQH))
call TriggerAddAction(t,function OWH)
set t=null
endfunction
function OXH takes nothing returns nothing
local unit O4D=GetTriggerUnit()
local player E5D=GetOwningPlayer(O4D)
local real x
local real y
local integer YX8
set IH4[GetPlayerId(E5D)]=false
set HA4[GetPlayerId(GetOwningPlayer((O4D)))]=false
if IsJWPlayer(GetOwningPlayer(O4D))then
set x=GetRectCenterX(QD)
set y=GetRectCenterY(QD)
else
set x=GetRectCenterX(PD)
set y=GetRectCenterY(PD)
endif
if HC7 then
set ExtraReviveTime[GetPlayerId(E5D)]=R2I(TimerGetRemaining(L[GetPlayerId(E5D)])*.25)
call SReal(GetHandleId(E5D),"BuyBackGoldLimitTime",time+TimerGetRemaining(L[GetPlayerId(E5D)]))
else
set ExtraReviveTime[GetPlayerId(E5D)]=0
endif
call TimerStart(L[GetPlayerId(E5D)],.0,false,null)
if YU8(O4D)then
call Y18(O4D)
else
call YS8(O4D,E5D,x,y,false)
endif
call SetUnitX(O4D,x)
call SetUnitY(O4D,y)
call YP8(O4D)
call SetUnitPathing(O4D,true)
if AV7(O4D,BU[xuejingshi])!=null and GetUnitTypeId(O4D)!='H00J' then
set YX8=(R2I(((GetItemCharges(AV7(O4D,BU[xuejingshi]))*.67)*1.)))
if GetItemCharges(AV7(O4D,BU[xuejingshi]))==1 then
set YX8=0
endif
call SetItemCharges(AV7(O4D,BU[xuejingshi]),YX8)
call AddHeroXP(O4D,GetHeroXP(OX4[GetPlayerId(GetOwningPlayer(O4D))]),true)
call RemoveUnit(OX4[GetPlayerId(GetOwningPlayer(O4D))])
endif
set bj_lastCreatedUnit=O4D
call PP8("ODH",T07 and GetUnitPointValue(O4D)==500)
set O4D=null
set E5D=null
endfunction
function OYH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer C77=(LoadInteger(R8,(GetHandleId(X77)),(627)))
local real OZH=(LoadReal(R8,(GetHandleId(X77)),(628)))
local integer ML8=GetUnitAbilityLevel(Z77,'A1S4')
local real P08=(5+ML8*15)*Pow(2,IMinBJ(C77,5)-1)
set P08=P08+IMaxBJ(C77-5,0)*50
if GetTriggerEventId()==EVENT_UNIT_DEATH then
if IsUnitType(X77,UNIT_TYPE_HERO)then
endif
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SaveInteger(R8,(GetHandleId(X77)),(627),(0))
call SaveReal(R8,(GetHandleId(X77)),(628),((0)*1.))
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A1S9' then
if IsUnitType(X77,UNIT_TYPE_HERO)then
endif
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SaveInteger(R8,(GetHandleId(X77)),(627),(0))
call SaveReal(R8,(GetHandleId(X77)),(628),((0)*1.))
if(LState(X77,"DisruptionState"))then
call SetUnitInvulnerable(X77,false)
endif
call Dmg(Z77,X77,NormalFire,P08)
if(LState(X77,"DisruptionState"))then
call SetUnitInvulnerable(X77,true)
endif
call QM8(I2S(R2I(P08))+"!",2,X77,.025,'d',0,200,216)
endif
elseif(TimerGetElapsed(E4))>OZH then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
if IsUnitType(X77,UNIT_TYPE_HERO)then
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SaveInteger(R8,(GetHandleId(X77)),(627),(0))
call SaveReal(R8,(GetHandleId(X77)),(628),((0)*1.))
if(LState(X77,"DisruptionState"))then
call SetUnitInvulnerable(X77,false)
endif
call Dmg(Z77,X77,NormalFire,P08)
if(LState(X77,"DisruptionState"))then
call SetUnitInvulnerable(X77,true)
endif
call QM8(I2S(R2I(P08))+"!",2,X77,.025,'d',0,200,216)
else
if IsUnitType(X77,UNIT_TYPE_HERO)then
endif
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function OAH takes unit Z77,unit X77 returns nothing
local trigger t
local integer W57
local integer ML8=GetUnitAbilityLevel(Z77,'A1S4')
local unit S08
if(LoadInteger(R8,(GetHandleId(X77)),(627)))>0 then
call SaveInteger(R8,(GetHandleId(X77)),(627),((LoadInteger(R8,(GetHandleId(X77)),(627)))+1))
call SaveReal(R8,(GetHandleId(X77)),(628),(((TimerGetElapsed(E4))+10)*1.))
else
set t=CreateTrigger()
set W57=GetHandleId(t)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
if IsUnitType(X77,UNIT_TYPE_HERO)then
endif
call SaveInteger(R8,(GetHandleId(X77)),(627),(1))
if IsUnitType(X77,UNIT_TYPE_HERO)then
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("war3mapImported\\shamanyouranus-ShadowyMissile.mdl",X77,"chest")))
else
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("war3mapImported\\shamanyouranus-ShadowyMissile.mdl",X77,"origin")))
endif
call SaveReal(R8,(GetHandleId(X77)),(628),(((TimerGetElapsed(E4))+10)*1.))
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function OYH))
set S08=null
endif
call QM8("+"+I2S((LoadInteger(R8,(GetHandleId(X77)),(627)))),3,X77,.025,'d',0,200,216)
call Dmg(Z77,X77,NormalFire,50)
set t=null
set S08=null
endfunction
function OBH takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),WP4)==false then
call GroupAddUnit(WP4,GetEnumUnit())
call OAH(WO4,GetEnumUnit())
endif
endfunction
function OCH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit S08=(LoadUnitHandle(R8,(W57),(45)))
local integer O3H=GetTriggerEvalCount(t)
local real a=(LoadReal(R8,(W57),(137)))
local real x=PQ8(GetUnitX(S08)+(20)*Cos(a))
local real y=PS8(GetUnitY(S08)+(20)*Sin(a))
local group g
local group O6H=(LoadGroupHandle(R8,(W57),(133)))
local unit X77
if O3H==75 then
call OF8(O6H)
call KillUnit(S08)
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set H04=Z77
set WO4=Z77
set WP4=O6H
call SetUnitX(S08,x)
call SetUnitY(S08,y)
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,190+25,Condition(function UW8))
call ForGroup(g,function OBH)
set X77=FirstOfGroup(g)
call OF8(g)
endif
set t=null
set Z77=null
set S08=null
set g=null
set X77=null
set O6H=null
return false
endfunction
function OLH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local real a=YI7(GetUnitX(Z77),GetUnitY(Z77),x,y)*bj_DEGTORAD
local unit S08=CreateUnit(GetOwningPlayer(Z77),'h0C2',GetUnitX(Z77),GetUnitY(Z77),a*bj_RADTODEG)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function OCH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(45),(S08))
call SaveReal(R8,(W57),(137),((a)*1.))
call SaveGroupHandle(R8,(W57),(133),(OG8()))
call AddPermanentAbility(Z77,'A1S9')
set t=null
set Z77=null
set S08=null
endfunction
function O1H takes nothing returns boolean
if GetSpellAbilityId()=='A1S4' then
call OLH()
endif
return false
endfunction
function HD9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O1H))
set t=null
endfunction
function O0H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit O5H=GetSummonedUnit()
if GetTriggerEventId()!=EVENT_PLAYER_UNIT_SUMMON then
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetUnitAbilityLevel(O5H,'B0DA')>0 and GetOwningPlayer(GetSummoningUnit())==GetOwningPlayer(Z77)then
if IsUnitAlly(X77,GetOwningPlayer(Z77))then
call SelectUnitAddForPlayer(O5H,GetOwningPlayer(Z77))
else
call IssueTargetOrderById(O5H,851983,X77)
endif
endif
set t=null
set Z77=null
set X77=null
set O5H=null
return false
endfunction
function O2H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call EY8(X77,"DisruptionState")
call SetUnitInvulnerable(X77,false)
call PauseUnit(X77,false)
call ShowUnit(X77,true)
call RemoveSavedHandle(R8,(GetHandleId(X77)),(673))
call FlushChildHashtable(R8,(W57))
call EA8(t)
if GetTriggerEventId()!=EVENT_UNIT_DEATH then
call ClearSelectionForPlayer(GetOwningPlayer(X77))
call SelectUnitAddForPlayer(X77,GetOwningPlayer(X77))
call S68(WM4,GetUnitX(X77),GetUnitY(X77))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,3,false)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function O0H))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call AddPermanentAbility(AC7,'A1S5')
call SetUnitAbilityLevel(AC7,'A1S5',GetUnitAbilityLevel(Z77,'A1S8'))
call IssueTargetOrderById(AC7,852274,X77)
call IssueTargetOrderById(AC7,852274,X77)
endif
set t=null
set Z77=null
set X77=null
set AC7=null
return false
endfunction
function O_H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A1S8')
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AC7=CreateUnit(GetOwningPlayer(X77),'o019',GetUnitX(X77),GetUnitY(X77),0)
call UnitApplyTimedLife(AC7,'BTLF',2.6)
if IsUnitAlly(X77,GetOwningPlayer(Z77))==false then
set AC7=CreateUnit(GetOwningPlayer(Z77),'o019',GetUnitX(X77),GetUnitY(X77),0)
call UnitApplyTimedLife(AC7,'BTLF',2.6)
endif
call SetUnitInvulnerable(X77,true)
call PauseUnit(X77,true)
call ShowUnit(X77,false)
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffect("war3mapImported\\WILLTHEALMIGHTY-Void5.mdx",GetUnitX(X77),GetUnitY(X77))))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function O2H))
call SaveUnitHandle(R8,GetHandleId(Z77),(673),X77)
call EW8(X77,"DisruptionState")
set Z77=null
set X77=null
set t=null
set AC7=null
endfunction
function P4H takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A1S8' and(IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))or HasLinkin(GetSpellTargetUnit())==false)then
call O_H()
endif
else
if GetSpellAbilityId()=='A1S8' and GetSpellTargetUnit()!=GetTriggerUnit()and IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and LBool(GetHandleId(GetOwningPlayer(GetSpellTargetUnit())),"DisableHelp")then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n038'))
endif
endif
return false
endfunction
function HE9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function P4H))
set t=null
endfunction
function P7H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer ML8=GetUnitAbilityLevel(Z77,'A1SB')
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SUnit(GetHandleId(Z77),"AI|SoulCatcherTgt",null)
elseif GetEventDamage()>5 then
call DisableTrigger(t)
call Dmg(GetEventDamageSource(),GetTriggerUnit(),HeroMagic,(.1+.1*ML8)*GetEventDamage())
call EnableTrigger(t)
endif
set Z77=null
set t=null
return false
endfunction
function P8H takes nothing returns nothing
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local group g=OG8()
local unit Z77=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A1SB')
local unit X77
local trigger t
local integer W57
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,475,Condition(function UW8))
set X77=(LoadUnitHandle(R8,(GetHandleId(Z77)),(673)))
if X77!=null then
if Z87(GetUnitX(X77),GetUnitY(X77),x,y)<475 and IsUnitEnemy(X77,GetOwningPlayer(Z77))then
call GroupAddUnit(g,X77)
endif
endif
set X77=GroupPickRandomUnit(g)
call OF8(g)
call DestroyEffect(AddSpecialEffect("war3mapImported\\Desecrate.mdx",x,y))
if X77!=null then
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,12,false)
call TriggerAddCondition(t,Condition(function P7H))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("war3mapImported\\void.mdx",X77,"chest")))
if IsUnitType(X77,UNIT_TYPE_HERO)then
call AddTimedBoolBuff(X77,"AI|SoulCatcher",12)
call SUnit(GetHandleId(Z77),"AI|SoulCatcherTgt",X77)
endif
endif
set g=null
set Z77=null
set X77=null
set t=null
endfunction
function P9H takes nothing returns boolean
if GetSpellAbilityId()=='A1SB' then
call P8H()
endif
return false
endfunction
function HF9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function P9H))
set t=null
endfunction
function PDH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer O3H=GetTriggerEvalCount(t)
local integer ML8=GetUnitAbilityLevel(Z77,'A1SA')+GetUnitAbilityLevel(Z77,'AZ3A')
if O3H==5 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
if(LState(X77,"DisruptionState"))then
call SetUnitInvulnerable(X77,false)
endif
call Dmg(Z77,X77,NormalFire,4*(25+25*ML8))
if(LState(X77,"DisruptionState"))then
call SetUnitInvulnerable(X77,true)
endif
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function PEH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function PDH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call TriggerEvaluate(t)
set t=null
set Z77=null
set X77=null
endfunction
function PFH takes nothing returns boolean
if(GetSpellAbilityId()=='A1SA' or GetSpellAbilityId()=='AZ3A')and IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and HasLinkin(GetSpellTargetUnit())==false then
call PEH()
endif
return false
endfunction
function HG9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function PFH))
set t=null
endfunction
function PGH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer O3H=GetTriggerEvalCount(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call UnitRemoveAbility(Z77,'A1SP')
set t=null
set Z77=null
return false
endfunction
function PHH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
call AddPermanentAbility(Z77,'A1SP')
call UnitMakeAbilityPermanent(Z77,true,'A1SP')
call SetUnitAbilityLevel(Z77,'A1SP',GetUnitAbilityLevel(Z77,'A1SO'))
call TriggerRegisterTimerEvent(t,3,false)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function PGH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=null
set Z77=null
endfunction
function PIH takes nothing returns boolean
if GetSpellAbilityId()=='A1SO' then
call PHH()
endif
return false
endfunction
function HH9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function PIH))
set t=null
endfunction
function PJH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer C77=GetTriggerEvalCount(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit S08=(LoadUnitHandle(R8,(W57),(45)))
local real x
local real y
local real d
local real PKH
local real PND=(LoadReal(R8,(W57),(23)))
local real POD=(LoadReal(R8,(W57),(24)))
local real a=YI7(PND,POD,GetUnitX(X77),GetUnitY(X77))*bj_DEGTORAD
local integer ML8=GetUnitAbilityLevel(Z77,'A1SQ')
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call UnitShareVision(S08,GetOwningPlayer(X77),false)
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
if GetTriggerUnit()!=S08 then
call KillUnit(S08)
endif
elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED then
call UnitRemoveBuffs(S08,true,true)
elseif C77<3/ .02 then
call SetUnitFacing(S08,a*bj_RADTODEG)
else
if C77==4/ .02 then
call UnitShareVision(S08,GetOwningPlayer(X77),true)
endif
call SetUnitFacing(S08,a*bj_RADTODEG)
set x=PND+(280+VL4*C77*.02)*.02*Cos(a)
set y=POD+(280+VL4*C77*.02)*.02*Sin(a)
call SetUnitPosition(S08,x,y)
call SaveReal(R8,(W57),(23),((x)*1.))
call SaveReal(R8,(W57),(24),((y)*1.))
if Z87(x,y,GetUnitX(X77),GetUnitY(X77))<20 then
set d=RMinBJ(Z87(x,y,(LoadReal(R8,(W57),(6))),(LoadReal(R8,(W57),(7)))),1500)
set PKH=d/ 1500*('n'*GetUnitAbilityLevel(Z77,'A1SQ'))
set PKH=RMaxBJ(PKH,50)
call KillUnit(S08)
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call Dmg(Z77,X77,NormalFire,PKH)
call Stun(Z77,X77,2+.2*ML8)
endif
endif
set t=null
set Z77=null
set X77=null
set S08=null
return false
endfunction
function PMH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local real a=YI7(GetUnitX(Z77),GetUnitY(Z77),GetUnitX(X77),GetUnitY(X77))*bj_DEGTORAD
local real x=PQ8(GetUnitX(Z77)+150*Cos(a))
local real y=PS8(GetUnitY(Z77)+150*Sin(a))
local integer ML8=GetUnitAbilityLevel(Z77,'A1SQ')
local unit S08
local integer PNH
local string POH="effects\\Snipe Target.mdx"
if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(Z77))==false and N08(GetLocalPlayer())==false then
set POH=""
endif
if ML8==1 then
set PNH='h0CG'
elseif ML8==2 then
set PNH='h0C1'
elseif ML8==3 then
set PNH='h0CF'
elseif ML8==4 then
set PNH='h0CH'
endif
set S08=CreateUnit(GetOwningPlayer(Z77),PNH,x,y,a*bj_RADTODEG)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,S08,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,S08,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function PJH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(45),(S08))
call SaveReal(R8,(W57),(6),((GetUnitX(Z77))*1.))
call SaveReal(R8,(W57),(7),((GetUnitY(Z77))*1.))
call SaveReal(R8,(W57),(23),((GetUnitX(S08))*1.))
call SaveReal(R8,(W57),(24),((GetUnitY(S08))*1.))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget(POH,X77,"overhead")))
set t=null
set Z77=null
set X77=null
set S08=null
endfunction
function PPH takes nothing returns boolean
if GetSpellAbilityId()=='A1SQ' and HasLinkin(GetSpellTargetUnit())==false then
call PMH()
endif
return false
endfunction
function HI9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function PPH))
call PU8('A0X6')
set t=null
endfunction
function PQH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(X77,'A1SS')
call UnitRemoveAbility(X77,'B0DE')
set t=null
set X77=null
return false
endfunction
function PRH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(X77,'A1T4')
call UnitRemoveAbility(X77,'B0DG')
set t=null
set X77=null
return false
endfunction
function PSH takes nothing returns nothing
local trigger t
local integer W57
local integer ML8=GetUnitAbilityLevel(VY4,'A1T5')
local boolean PPE=false
if ML8==0 then
set ML8=GetUnitAbilityLevel(VY4,'A235')
set PPE=true
endif
if S_9(GetEnumUnit())==false then
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,2,false)
call TriggerRegisterUnitEvent(t,GetEnumUnit(),EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function PQH))
call SaveUnitHandle(R8,(W57),(17),(GetEnumUnit()))
call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),'A1SS',false)
call AddPermanentAbility(GetEnumUnit(),'A1SS')
endif
call Dmg(VY4,GetEnumUnit(),NormalFire,ML8*50+200)
set t=null
endfunction
function PTH takes nothing returns nothing
local trigger t
local integer W57
local integer ML8=GetUnitAbilityLevel(VY4,'A1T5')
local boolean PPE=false
if ML8==0 then
set ML8=GetUnitAbilityLevel(VY4,'A235')
set PPE=true
endif
if S_9(GetEnumUnit())==false then
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,3,false)
call TriggerRegisterUnitEvent(t,GetEnumUnit(),EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function PRH))
call SaveUnitHandle(R8,(W57),(17),(GetEnumUnit()))
call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),'A1T4',false)
call AddPermanentAbility(GetEnumUnit(),'A1T4')
endif
if PPE then
call Dmg(VY4,GetEnumUnit(),NormalFire,ML8*50+50+75)
else
call Dmg(VY4,GetEnumUnit(),NormalFire,ML8*50+50)
endif
set t=null
endfunction
function PUH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local group g
local integer O3H=GetTriggerEvalCount(t)
local fogmodifier PVH=(LoadFogModifierHandle(R8,(W57),(42)))
if O3H==1 then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Calldown_FlyUp.mdx",Z77,"chest"))
elseif O3H==2 then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Calldown_FlyUp.mdx",Z77,"chest"))
elseif O3H==3 then
call DestroyEffect(AddSpecialEffect("war3mapImported\\Calldown_FlyDown.mdx",x,y))
elseif O3H==4 then
set g=OG8()
set H04=Z77
set VY4=Z77
call GroupEnumUnitsInRange(g,x,y,450+25,Condition(function UM8))
call ForGroup(g,function PSH)
call OF8(g)
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl",x,y))
elseif O3H==5 then
call DestroyEffect(AddSpecialEffect("war3mapImported\\Calldown_FlyDown.mdx",x,y))
elseif O3H==6 then
set g=OG8()
set H04=Z77
set VY4=Z77
call GroupEnumUnitsInRange(g,x,y,450+25,Condition(function UM8))
call ForGroup(g,function PTH)
call OF8(g)
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl",x,y))
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FogModifierStop(PVH)
call DestroyFogModifier(PVH)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set g=null
set PVH=null
return false
endfunction
function PWH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local string s=""
local fogmodifier N4E=CreateFogModifierRadius(GetOwningPlayer(Z77),FOG_OF_WAR_VISIBLE,x,y,350,true,true)
call FogModifierStart(N4E)
if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(Z77))or N08(GetLocalPlayer())then
set s="war3mapImported\\CallDown_4.mdx"
endif
call TriggerRegisterTimerEvent(t,.1,false)
call TriggerRegisterTimerEvent(t,.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 PUH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffect(s,x,y)))
call SaveFogModifierHandle(R8,(W57),(42),(N4E))
set t=null
set Z77=null
set N4E=null
endfunction
function PXH takes nothing returns boolean
if GetSpellAbilityId()=='A1T5' or GetSpellAbilityId()=='A235' then
call PWH()
endif
return false
endfunction
function HJ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function PXH))
set t=null
endfunction
function PYH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer KC8=GetHandleId(t)
local unit Z77=LUnit(KC8,"Source")
local integer HQE
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 and(GetEventDamage()>20 or IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))then
set HQE=LInt(GetHandleId(Z77),"Count")
if HQE>0 then
call SInt(GetHandleId(Z77),"Count",(HQE+1))
endif
call LT7(KC8)
call EA8(t)
endif
else
call LT7(KC8)
call EA8(t)
endif
set t=null
set Z77=null
return false
endfunction
function PZH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=LUnit(W57,"Source")
if NJ8(Z77)==false then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(Z77,'A237')
call UnitAddAbility(Z77,'A22B')
call UnitRemoveAbility(Z77,'A22B')
if(AV7((Z77),BU[GK4])!=null)then
call UnitAddAbility(Z77,'A237')
endif
endif
set t=null
set Z77=null
return false
endfunction
function PAH takes unit Z77 returns nothing
local trigger t
if NJ8(Z77)==false then
call UnitRemoveAbility(Z77,'A237')
call UnitAddAbility(Z77,'A22B')
call UnitRemoveAbility(Z77,'A22B')
if(AV7((Z77),BU[GK4])!=null)then
call UnitAddAbility(Z77,'A237')
endif
else
set t=CreateTrigger()
call SUnit(GetHandleId(t),"Source",Z77)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function PZH))
set t=null
endif
endfunction
function PBH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer KC8=GetHandleId(t)
local unit Z77=LUnit(KC8,"Source")
call UnitRemoveAbility(Z77,'A1TW')
call UnitRemoveAbility(Z77,'B0DJ')
call PAH(Z77)
call LT7(KC8)
call EA8(t)
set t=null
return false
endfunction
function PCH takes nothing returns nothing
local unit WX8=GetAttacker()
local integer KC8=GetHandleId(WX8)
local integer HQE=LInt(KC8,"Count")
local integer WY8=GetUnitAbilityLevel(WX8,'A229')
local trigger t
if IsUnitIllusion(GetAttacker())and GetUnitAbilityLevel(GetAttacker(),'A1TW')>0 then
call PAH(GetAttacker())
call UnitRemoveAbility(GetAttacker(),'A1TW')
endif
if GetAttacker()==WX8 then
set HQE=HQE+1
if HQE>3+WY8 then
call UnitRemoveAbility(WX8,'A1TW')
call UnitRemoveAbility(WX8,'B0DJ')
call PAH(WX8)
set t=LTrig(KC8,"FlakCannon_EndTrig")
call LT7(GetHandleId(t))
call EA8(t)
else
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2,false)
call TriggerAddCondition(t,Condition(function PYH))
call SUnit(GetHandleId(t),"Source",WX8)
endif
endif
set t=null
set WX8=null
endfunction
function P3H takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),'A1TW')>0 then
call PCH()
endif
return false
endfunction
function P6H takes nothing returns nothing
local trigger t=CreateTrigger()
local integer KC8=GetHandleId(t)
local unit Z77=GetTriggerUnit()
call TriggerRegisterTimerEvent(t,15,false)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function PBH))
call SUnit(KC8,"Source",Z77)
call STrig(GetHandleId(Z77),"FlakCannon_EndTrig",t)
call SInt(GetHandleId(Z77),"Count",(1))
call UnitRemoveAbility(Z77,'A237')
call UnitAddAbility(Z77,'A22A')
call UnitRemoveAbility(Z77,'A22A')
if(AV7((Z77),BU[GK4])!=null)then
call UnitAddAbility(Z77,'A237')
endif
set t=null
set Z77=null
endfunction
function PLH takes nothing returns boolean
if IsUnitIllusion(GetTriggerUnit())and GetUnitTypeId(GetTriggerUnit())=='E02O' then
call PAH(GetTriggerUnit())
endif
return false
endfunction
function P1H takes nothing returns boolean
if GetSpellAbilityId()=='A229' and GetUnitTypeId(GetTriggerUnit())=='E02N' then
call P6H()
endif
return false
endfunction
function HK9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function P1H))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function P3H))
set t=CreateTrigger()
call TriggerRegisterEnterRectSimple(t,GetWorldBounds())
call TriggerAddCondition(t,Condition(function PLH))
set t=null
endfunction
function P0H takes nothing returns boolean
local unit X77=GetFilterUnit()
local unit Z77=VZ4
local real P5H=VA4
local real P2H=VB4
local real ON2=VC4
local real OS2=V34
local real x
local real y
local real a
local real d
if(GU8(GetFilterUnit())==false and IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))then
if(LState(X77,"4324")==false)then
call AddTimedBoolBuff(X77,"4324",.3)
endif
set d=Z87(P5H,P2H,GetUnitX(X77),GetUnitY(X77))
set a=YI7(P5H,P2H,GetUnitX(X77),GetUnitY(X77))*bj_DEGTORAD
if d>V64 then
set x=GetUnitX(X77)+11*Cos(a)
set y=GetUnitY(X77)+11*Sin(a)
else
set x=GetUnitX(X77)-11*Cos(a)
set y=GetUnitY(X77)-11*Sin(a)
endif
call SetUnitX(X77,x)
call SetUnitY(X77,y)
endif
set X77=null
set Z77=null
return false
endfunction
function P_H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real P5H=(LoadReal(R8,(W57),(6)))
local real P2H=(LoadReal(R8,(W57),(7)))
local real x
local real y
local integer i=0
local group g
if GetTriggerEvalCount(t)>(50*(2+.5*GetUnitAbilityLevel(Z77,'A1SU')))then
loop
exitwhen i>16
set i=i+1
endloop
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set g=OG8()
set VA4=P5H
set VB4=P2H
set VZ4=Z77
set H04=Z77
loop
exitwhen i>16
set x=P5H+V64*Cos(bj_DEGTORAD*360.*i/ 16.)
set y=P2H+V64*Sin(bj_DEGTORAD*360.*i/ 16.)
set VC4=x
set V34=y
call GroupEnumUnitsInRange(g,x,y,75,Condition(function P0H))
set i=i+1
endloop
call OF8(g)
set g=null
endif
set t=null
set Z77=null
return false
endfunction
function Q4H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real P5H=(LoadReal(R8,(W57),(6)))
local real P2H=(LoadReal(R8,(W57),(7)))
local real x
local real y
local integer i=0
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=CreateTrigger()
set W57=GetHandleId(t)
loop
exitwhen i>16
set x=P5H+V64*Cos(bj_DEGTORAD*360.*i/ 16.)
set y=P2H+V64*Sin(bj_DEGTORAD*360.*i/ 16.)
set i=i+1
endloop
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffect("war3mapImported\\KineticField_FX_Stand.mdx",P5H,P2H)))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(6),((P5H)*1.))
call SaveReal(R8,(W57),(7),((P2H)*1.))
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function P_H))
set t=null
set Z77=null
return false
endfunction
function Q7H takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real P5H=GetSpellTargetX()
local real P2H=GetSpellTargetY()
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffect("war3mapImported\\KineticField_FX_Start.mdx",P5H,P2H)))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(6),((P5H)*1.))
call SaveReal(R8,(W57),(7),((P2H)*1.))
call TriggerRegisterTimerEvent(t,1.2,false)
call TriggerAddCondition(t,Condition(function Q4H))
call S18(GetOwningPlayer(Z77),5.5,P5H,P2H,300)
set t=null
set Z77=null
endfunction
function Q8H takes nothing returns boolean
if GetSpellAbilityId()=='A1SU' then
call Q7H()
endif
return false
endfunction
function HM9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Q8H))
set t=null
endfunction
function Q9H takes nothing returns nothing
call Dmg(WG4,GetEnumUnit(),NormalFire,WF4)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Purge_NoBirth.mdx",GetEnumUnit(),"origin"))
endfunction
function StaticStorm_Agha takes nothing returns nothing
local unit u=GetEnumUnit()
local unit f=CreateUnit(GetOwningPlayer(u),'e00E',GetUnitX(u),GetUnitY(u),0)
call UnitAddAbility(f,'AZ0J')
call IssueTargetOrderById(f,852583,u)
call Dmg(WG4,u,NormalFire,WF4)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Purge_NoBirth.mdx",u,"origin"))
endfunction
function QDH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer ML8=(LoadInteger(R8,(W57),(5)))
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit S08=(LoadUnitHandle(R8,(W57),(45)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local boolean b=LoadBoolean(R8,W57,'b')
local group g
local integer limit=20
local integer O3H=GetTriggerEvalCount(t)
if b then
set limit=28
endif
if O3H>limit then
call StopSound(WN4,false,true)
call KillUnit(S08)
call ShowUnit(S08,false)
call KillUnit(AC7)
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set g=OG8()
set H04=Z77
set WG4=Z77
set WF4=.25*(150+50*ML8)*(O3H*1.0/ limit)
set WH4=false
if ModuloInteger(O3H,4)==0 then
set WH4=true
endif
call GroupEnumUnitsInRange(g,GetUnitX(S08),GetUnitY(S08),475,Condition(function UV8))
if b then
call ForGroup(g,function StaticStorm_Agha)
else
call ForGroup(g,function Q9H)
endif
call OF8(g)
set g=null
endif
set t=null
set Z77=null
set S08=null
set AC7=null
return false
endfunction
function QEH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real QFH=GetSpellTargetX()
local real QGH=GetSpellTargetY()
local unit S08=CreateUnit(GetOwningPlayer(Z77),'h0CK',QFH,QGH,0)
local integer ML8=GetUnitAbilityLevel(Z77,'A1U6')
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',QFH,QGH,0)
local boolean b=false
if ML8==0 then
set ML8=GetUnitAbilityLevel(Z77,'AZ0I')
set b=true
endif
call SetSoundVolume(WN4,200)
call StartSound(WN4)
call SetSoundPosition(WN4,QFH,QGH,'d')
if IsTZPlayer(GetOwningPlayer(Z77))then
call AddPermanentAbility(AC7,'A1U5')
else
call AddPermanentAbility(AC7,'A1U4')
endif
call IssuePointOrderById(AC7,852473,QFH,QGH)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(45),(S08))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveBoolean(R8,W57,'b',b)
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerAddCondition(t,Condition(function QDH))
set t=null
set Z77=null
set S08=null
set AC7=null
endfunction
function QHH takes nothing returns boolean
if GetSpellAbilityId()=='A1U6' or GetSpellAbilityId()=='AZ0I' then
call QEH()
endif
return false
endfunction
function HN9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function QHH))
set t=null
endfunction
function QIH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit S08=(LoadUnitHandle(R8,(W57),(45)))
local real QFH=(LoadReal(R8,(W57),(6)))
local real QGH=(LoadReal(R8,(W57),(7)))
local real x=GetUnitX(S08)
local real y=GetUnitY(S08)
local real a=YI7(x,y,QFH,QGH)
local real d=Z87(x,y,QFH,QGH)
local real r=(LoadReal(R8,(W57),(671)))
call SetUnitFacing(S08,a)
set x=x+r*Cos(a*bj_DEGTORAD)
set y=y+r*Sin(a*bj_DEGTORAD)
call SetUnitX(S08,x)
call SetUnitY(S08,y)
if d<40 then
call KillUnit(S08)
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call AddTimedBoolBuff(X77,"4411",1)
call SetUnitPosition(X77,QFH,QGH)
call PanCameraToTimedForPlayer(GetOwningPlayer(X77),QFH,QGH,0)
elseif GU8(X77)then
call KillUnit(S08)
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set X77=null
set S08=null
return false
endfunction
function QJH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local real x=(LoadReal(R8,(GetHandleId(X77)),(7400)))
local real y=(LoadReal(R8,(GetHandleId(X77)),(7500)))
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit S08=CreateUnit(GetOwningPlayer(Z77),'h0C6',GetUnitX(X77),GetUnitY(X77),0)
local real d=Z87(x,y,GetUnitX(X77),GetUnitY(X77))
local real r=.02*(RMaxBJ(d/ 1.8,600))
call TriggerAddCondition(t,Condition(function QIH))
call TriggerRegisterTimerEvent(t,.02,true)
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(45),(S08))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
call SaveReal(R8,(W57),(671),((r)*1.))
call SaveEffectHandle(R8,(W57),(175),(AddSpecialEffectTarget("effects\\Lightning_Ball_Tail_FX.mdx",X77,"overhead")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffect("effects\\Lightning_Ball_Tail_FX.mdx",x,y)))
call TriggerEvaluate(t)
set Z77=null
set X77=null
set S08=null
set t=null
endfunction
function QKH takes nothing returns boolean
if GetSpellAbilityId()=='A1SW' and HasLinkin(GetSpellTargetUnit())==false then
if IsUnitIllusion(GetSpellTargetUnit())then
call KillUnit(GetSpellTargetUnit())
else
call QJH()
endif
endif
return false
endfunction
function BJG takes nothing returns nothing
local unit X77=H04
local integer i=0
loop
exitwhen i>15
set i=i+1
endloop
set X77=null
endfunction
function QMH takes nothing returns nothing
local unit X77=GetEnumUnit()
local integer W57=GetHandleId(X77)
local integer i=1
loop
exitwhen i>14
call SaveReal(R8,(W57),(7400+i-1),(((LoadReal(R8,(W57),(7400+i))))*1.))
call SaveReal(R8,(W57),(7500+i-1),(((LoadReal(R8,(W57),(7500+i))))*1.))
set i=i+1
endloop
call SaveReal(R8,(W57),(7400+14),((GetUnitX(X77))*1.))
call SaveReal(R8,(W57),(7500+14),((GetUnitY(X77))*1.))
set X77=null
endfunction
function QNH takes nothing returns boolean
local group g=OG8()
call GroupEnumUnitsInRange(g,0,0,99999,Condition(function U58))
call ForGroup(g,function QMH)
call OF8(g)
set g=null
return false
endfunction
function HO9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function QKH))
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerAddCondition(t,Condition(function QNH))
set t=null
endfunction
function QOH takes nothing returns nothing
if V14!=GetEnumUnit()then
call Dmg(V04,GetEnumUnit(),NormalFire,V54*20+20)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",GetEnumUnit(),"chest"))
endif
endfunction
function QPH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
local unit S08=(LoadUnitHandle(R8,(W57),(45)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local group g
local integer C77=GetTriggerEvalCount(t)
local unit XAD=null
call SetUnitX(AC7,GetUnitX(X77))
call SetUnitY(AC7,GetUnitY(X77))
call SetUnitX(S08,GetUnitX(X77))
call SetUnitY(S08,GetUnitY(X77))
if C77==1 or C77=='d' or C77==200 or C77==300 then
set g=OG8()
if O18(X77)then
set XAD=CreateUnit(GetOwningPlayer(X77),'e00C',GetUnitX(X77),GetUnitY(X77),0)
call UnitApplyTimedLife(XAD,'BTLF',.2)
call IssueTargetOrderById(AC7,852119,XAD)
else
call IssueTargetOrderById(AC7,852119,X77)
call Dmg(Z77,X77,NormalFire,ML8*20+20)
endif
call QG8("war3mapImported\\ThunderStorm_Groundeffect.mdx",X77,"origin",.6)
set H04=Z77
set V04=Z77
set V14=X77
set V54=ML8
call GroupEnumUnitsInRange(g,GetUnitX(X77),GetUnitY(X77),240+25,Condition(function UM8))
call ForGroup(g,function QOH)
call OF8(g)
if GetTriggerEvalCount(t)==300 then
call KillUnit(AC7)
call KillUnit(S08)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
endif
set t=null
set Z77=null
set X77=null
set AC7=null
set g=null
set XAD=null
set S08=null
return false
endfunction
function R98 takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer ML8=GetUnitAbilityLevel(Z77,'A1TV')
local unit AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
local unit S08=CreateUnit(GetOwningPlayer(Z77),'e02P',GetUnitX(X77),GetUnitY(X77),0)
call AddPermanentAbility(S08,'Aloc')
call AddPermanentAbility(AC7,'A1U7')
call SetUnitAbilityLevel(AC7,'A1U7',ML8)
call AddPermanentAbility(AC7,'Aloc')
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function QPH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call SaveUnitHandle(R8,(W57),(45),(S08))
call SaveInteger(R8,(W57),(5),(ML8))
call RW8(X77,StringHash("R98"),2,6,Z77,'A1TV',false)
set Z77=null
set X77=null
set AC7=null
set t=null
set S08=null
endfunction
function QQH takes nothing returns boolean
if GetSpellAbilityId()=='A1TV' and HasLinkin(GetSpellTargetUnit())==false then
call R98()
endif
return false
endfunction
function HP9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function QQH))
set t=null
endfunction
function QRH takes nothing returns nothing
local integer QSH=W84
local unit X77=GetEnumUnit()
local integer QTH=662-1+QSH
local real QUH=(LoadReal(R8,(GetHandleId(X77)),(QTH)))
local real QVH=(TimerGetElapsed(E4))
if QUH<QVH then
call SaveReal(R8,(GetHandleId(X77)),(QTH),((QVH+2)*1.))
if IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)==false then
call Dmg(VV4,X77,NormalFire,2+6*W94)
endif
endif
set X77=null
endfunction
function Spirits_DamageHeroes takes nothing returns nothing
local integer QWH=W84
local unit X77=GetEnumUnit()
local integer QXH=662-1+QWH
local real QYH=(LoadReal(R8,(GetHandleId(X77)),(QXH)))
local real QZH=(TimerGetElapsed(E4))
if QYH<QZH then
call SaveReal(R8,(GetHandleId(X77)),(QXH),((QZH+2)*1.))
if IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)==false then
call Dmg(VV4,X77,NormalFire,15+10*W94)
endif
endif
set X77=null
endfunction
function QAH takes nothing returns nothing
if IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)==false then
call Dmg(VV4,GetEnumUnit(),NormalFire,W44)
endif
endfunction
function QBH takes unit Z77,unit QCH returns nothing
local group g=OG8()
set H04=Z77
set W44=25*W94
set VV4=Z77
set VW4=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(QCH),GetUnitY(QCH),0)
call GroupEnumUnitsInRange(g,GetUnitX(QCH),GetUnitY(QCH),325,Condition(function U18))
call AddPermanentAbility(VW4,'A1TO')
call ForGroup(g,function QAH)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathMissile.mdl",GetUnitX(QCH),GetUnitY(QCH)))
call KillUnit(QCH)
call OF8(g)
call UnitApplyTimedLife(CreateUnit(GetOwningPlayer(Z77),'o00Q',GetUnitX(QCH),GetUnitY(QCH),0),'BTLF',2)
set g=null
endfunction
function Q3H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit Q6H=(LoadUnitHandle(R8,(W57),(393)))
local unit QLH=(LoadUnitHandle(R8,(W57),(394)))
local unit Q1H=(LoadUnitHandle(R8,(W57),(395)))
local unit Q0H=(LoadUnitHandle(R8,(W57),(396)))
local unit Q5H=(LoadUnitHandle(R8,(W57),(397)))
local real x
local real y
local real a
local real d=(LoadReal(R8,(W57),(138)))
local real P5H=GetUnitX(Z77)
local real P2H=GetUnitY(Z77)
local real AQD
local integer C77=GetTriggerEvalCount(t)
local real KQD
local group g
local integer Q2H=0
local real RF8=2.25
local real Q_H
if O18(Q6H)==false then
set Q2H=Q2H+1
endif
if O18(QLH)==false then
set Q2H=Q2H+1
endif
if O18(Q1H)==false then
set Q2H=Q2H+1
endif
if O18(Q0H)==false then
set Q2H=Q2H+1
endif
if O18(Q5H)==false then
set Q2H=Q2H+1
endif
if Q2H==5 then
set RF8=2.25
elseif Q2H==4 then
set RF8=2.1
elseif Q2H==3 then
set RF8=1.95
elseif Q2H==2 then
set RF8=1.8
elseif Q2H==1 then
set RF8=1.65
endif
set AQD=-1*360*.02/ RF8
set Q_H=(LoadReal(R8,(W57),(137)))+AQD
call SaveReal(R8,(W57),(137),((Q_H)*1.))
set W94=GetUnitAbilityLevel(Z77,'A1T8')
set VV4=Z77
if C77==50 then
call ShowUnit(QLH,true)
call SaveBoolean(R8,(W57),(512),(true))
call AddPermanentAbility(QLH,'Aloc')
endif
if C77=='d' then
call ShowUnit(Q1H,true)
call SaveBoolean(R8,(W57),(513),(true))
call AddPermanentAbility(Q1H,'Aloc')
endif
if C77==150 then
call ShowUnit(Q0H,true)
call SaveBoolean(R8,(W57),(514),(true))
call AddPermanentAbility(Q0H,'Aloc')
endif
if C77==200 then
call ShowUnit(Q5H,true)
call SaveBoolean(R8,(W57),(515),(true))
call AddPermanentAbility(Q5H,'Aloc')
endif
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A1U3' then
if(LoadBoolean(R8,(W57),(655)))then
call SaveBoolean(R8,(W57),(655),(false))
call SaveBoolean(R8,(W57),(656),(false))
else
call SaveBoolean(R8,(W57),(655),(true))
call SaveBoolean(R8,(W57),(656),(false))
endif
elseif GetSpellAbilityId()=='A1U2' then
if(LoadBoolean(R8,(W57),(656)))then
call SaveBoolean(R8,(W57),(655),(false))
call SaveBoolean(R8,(W57),(656),(false))
else
call SaveBoolean(R8,(W57),(655),(false))
call SaveBoolean(R8,(W57),(656),(true))
endif
endif
endif
if(LoadBoolean(R8,(W57),(655)))then
set d=RMaxBJ(d-5,'d')
call SaveReal(R8,(W57),(138),((d)*1.))
elseif(LoadBoolean(R8,(W57),(656)))then
set d=RMinBJ(d+5,875)
call SaveReal(R8,(W57),(138),((d)*1.))
endif
if GetTriggerEventId()==EVENT_UNIT_DEATH or C77==950 or(O18(Q6H)and O18(QLH)and O18(Q1H)and O18(Q0H)and O18(Q5H))or(C77>1 and GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='A1T8')then
if GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT then
call UnitRemoveAbility(Z77,'A1U3')
call UnitRemoveAbility(Z77,'A1U2')
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
if O18(Q6H)==false then
call QBH(Z77,Q6H)
endif
if O18(QLH)==false then
call QBH(Z77,QLH)
endif
if O18(Q1H)==false then
call QBH(Z77,Q1H)
endif
if O18(Q0H)==false then
call QBH(Z77,Q0H)
endif
if O18(Q5H)==false then
call QBH(Z77,Q5H)
endif
else
set g=OG8()
if O18(Q6H)==false and(LoadBoolean(R8,(W57),(511)))then
set KQD=360*5/ 5.
set a=KQD+Q_H
set x=PQ8(P5H+d*Cos(a*bj_DEGTORAD))
set y=PS8(P2H+d*Sin(a*bj_DEGTORAD))
call SetUnitX(Q6H,x)
call SetUnitY(Q6H,y)
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,95,Condition(function U28))
if FirstOfGroup(g)!=null then
call QBH(Z77,Q6H)
endif
call GroupClear(g)
set VX4=Q6H
set W84=1
set VV4=Z77
call GroupEnumUnitsInRange(g,x,y,175,Condition(function U_8))
call ForGroup(g,function QRH)
call GroupClear(g)
endif
if O18(QLH)==false and(LoadBoolean(R8,(W57),(512)))then
set KQD=360*4/ 5.
set a=KQD+Q_H
set x=PQ8(P5H+d*Cos(a*bj_DEGTORAD))
set y=PS8(P2H+d*Sin(a*bj_DEGTORAD))
call SetUnitX(QLH,x)
call SetUnitY(QLH,y)
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,95,Condition(function U28))
if FirstOfGroup(g)!=null then
call QBH(Z77,QLH)
endif
call GroupClear(g)
set VX4=QLH
set W84=2
set VV4=Z77
call GroupEnumUnitsInRange(g,x,y,175,Condition(function U_8))
call ForGroup(g,function QRH)
call GroupClear(g)
endif
if O18(Q1H)==false and(LoadBoolean(R8,(W57),(513)))then
set KQD=360*3/ 5.
set a=KQD+Q_H
set x=PQ8(P5H+d*Cos(a*bj_DEGTORAD))
set y=PS8(P2H+d*Sin(a*bj_DEGTORAD))
call SetUnitX(Q1H,x)
call SetUnitY(Q1H,y)
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,95,Condition(function U28))
if FirstOfGroup(g)!=null then
call QBH(Z77,Q1H)
endif
call GroupClear(g)
set VX4=Q1H
set W84=3
set VV4=Z77
call GroupEnumUnitsInRange(g,x,y,175,Condition(function U_8))
call ForGroup(g,function QRH)
call GroupClear(g)
endif
if O18(Q0H)==false and(LoadBoolean(R8,(W57),(514)))then
set KQD=360*2/ 5.
set a=KQD+Q_H
set x=PQ8(P5H+d*Cos(a*bj_DEGTORAD))
set y=PS8(P2H+d*Sin(a*bj_DEGTORAD))
call SetUnitX(Q0H,x)
call SetUnitY(Q0H,y)
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,95,Condition(function U28))
if FirstOfGroup(g)!=null then
call QBH(Z77,Q0H)
endif
call GroupClear(g)
set VX4=Q0H
set W84=4
set VV4=Z77
call GroupEnumUnitsInRange(g,x,y,175,Condition(function U_8))
call ForGroup(g,function QRH)
call GroupClear(g)
endif
if O18(Q5H)==false and(LoadBoolean(R8,(W57),(515)))then
set KQD=360*1/ 5.
set a=KQD+Q_H
set x=PQ8(P5H+d*Cos(a*bj_DEGTORAD))
set y=PS8(P2H+d*Sin(a*bj_DEGTORAD))
call SetUnitX(Q5H,x)
call SetUnitY(Q5H,y)
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,95,Condition(function U28))
if FirstOfGroup(g)!=null then
call QBH(Z77,Q5H)
endif
call GroupClear(g)
set VX4=Q5H
set W84=5
set VV4=Z77
call GroupEnumUnitsInRange(g,x,y,175,Condition(function U_8))
call ForGroup(g,function QRH)
call GroupClear(g)
endif
call OF8(g)
endif
set t=null
set Z77=null
set Q6H=null
set QLH=null
set Q1H=null
set Q0H=null
set Q5H=null
set g=null
return false
endfunction
function R4H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Q6H
local unit QLH
local unit Q1H
local unit Q0H
local unit R7H
local real x
local real y
set x=GetUnitX(Z77)+250*Cos(bj_DEGTORAD*360*5/ 5.*-1.)
set y=GetUnitY(Z77)+250*Sin(bj_DEGTORAD*360*5/ 5.*-1.)
set Q6H=CreateUnit(GetOwningPlayer(Z77),'h0CJ',x,y,360*5/ 5.*-1.)
call AddPermanentAbility(Q6H,'Aloc')
set x=GetUnitX(Z77)+250*Cos(bj_DEGTORAD*360*4/ 5.*-1.)
set y=GetUnitY(Z77)+250*Sin(bj_DEGTORAD*360*4/ 5.*-1.)
set QLH=CreateUnit(GetOwningPlayer(Z77),'h0CJ',x,y,360*4/ 5.*-1.)
call ShowUnit(QLH,false)
call SetUnitInvulnerable(QLH,true)
set x=GetUnitX(Z77)+250*Cos(bj_DEGTORAD*360*3/ 5.*-1.)
set y=GetUnitY(Z77)+250*Sin(bj_DEGTORAD*360*3/ 5.*-1.)
set Q1H=CreateUnit(GetOwningPlayer(Z77),'h0CJ',x,y,360*3/ 5.*-1.)
call ShowUnit(Q1H,false)
call SetUnitInvulnerable(QLH,true)
set x=GetUnitX(Z77)+250*Cos(bj_DEGTORAD*360*2/ 5.*-1.)
set y=GetUnitY(Z77)+250*Sin(bj_DEGTORAD*360*2/ 5.*-1.)
set Q0H=CreateUnit(GetOwningPlayer(Z77),'h0CJ',x,y,360*2/ 5.*-1.)
call ShowUnit(Q0H,false)
call SetUnitInvulnerable(Q0H,true)
set x=GetUnitX(Z77)+250*Cos(bj_DEGTORAD*360*1/ 5.*-1.)
set y=GetUnitY(Z77)+250*Sin(bj_DEGTORAD*360*1/ 5.*-1.)
set R7H=CreateUnit(GetOwningPlayer(Z77),'h0CJ',x,y,360*1/ 5.*-1.)
call ShowUnit(R7H,false)
call SetUnitInvulnerable(R7H,true)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(393),(Q6H))
call SaveUnitHandle(R8,(W57),(394),(QLH))
call SaveUnitHandle(R8,(W57),(395),(Q1H))
call SaveUnitHandle(R8,(W57),(396),(Q0H))
call SaveUnitHandle(R8,(W57),(397),(R7H))
call SaveBoolean(R8,(W57),(511),(true))
call SaveBoolean(R8,(W57),(512),(false))
call SaveBoolean(R8,(W57),(513),(false))
call SaveBoolean(R8,(W57),(514),(false))
call SaveBoolean(R8,(W57),(515),(false))
call SaveBoolean(R8,(W57),(655),(false))
call SaveBoolean(R8,(W57),(656),(false))
call SaveReal(R8,(W57),(138),((150)*1.))
call AddPermanentAbility(Z77,'A1U2')
call AddPermanentAbility(Z77,'A1U3')
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Q3H))
set Z77=null
set t=null
set Q6H=null
set QLH=null
set Q1H=null
set Q0H=null
set R7H=null
endfunction
function R8H takes nothing returns boolean
if GetSpellAbilityId()=='A1T8' then
call R4H()
endif
return false
endfunction
function HQ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function R8H))
set t=null
endfunction
function R9H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
call AddLife(Z77,GetEventDamage()*.05*ML8)
set t=null
set Z77=null
return false
endfunction
function RDH takes unit u returns nothing
local trigger t
call UnitRemoveAbility(u,'A1TS')
call UnitRemoveAbility(u,'A1TR')
call UnitRemoveAbility(u,'A1TT')
call UnitRemoveAbility(u,'A1TP')
if(LoadBoolean(R8,(GetHandleId(u)),(708)))then
call SaveBoolean(R8,(GetHandleId(u)),(708),(false))
set t=(LoadTriggerHandle(R8,(GetHandleId(u)),(709)))
call FlushChildHashtable(R8,(GetHandleId(t)))
call EA8(t)
call RemoveSavedHandle(R8,(GetHandleId(u)),(709))
set t=null
endif
endfunction
function REH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call RDH(Z77)
call FlushChildHashtable(R8,(W57))
call EA8(t)
return false
endfunction
function RFH takes unit u,integer i returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SaveUnitHandle(R8,(W57),(2),(u))
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function REH))
if i==1 then
call AddPermanentAbility(u,'A1TS')
call SetPlayerAbilityAvailable(GetOwningPlayer(u),'A1TS',false)
elseif i==2 then
call AddPermanentAbility(u,'A1TR')
call SetPlayerAbilityAvailable(GetOwningPlayer(u),'A1TR',false)
elseif i==3 then
call AddPermanentAbility(u,'A1TT')
call SetPlayerAbilityAvailable(GetOwningPlayer(u),'A1TT',false)
elseif i==4 then
call AddPermanentAbility(u,'A1TP')
call SetPlayerAbilityAvailable(GetOwningPlayer(u),'A1TP',false)
endif
if(LoadBoolean(R8,(GetHandleId(u)),(708)))==false then
call SaveBoolean(R8,(GetHandleId(u)),(708),(true))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function R9H))
call SaveTriggerHandle(R8,(GetHandleId(u)),(709),(t))
call SaveUnitHandle(R8,(GetHandleId(t)),(2),(u))
call SaveInteger(R8,(GetHandleId(t)),(5),(i))
endif
set t=null
endfunction
function RGH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer C77=(LoadInteger(R8,(W57),(34)))
local integer ML8=GetUnitAbilityLevel(Z77,'A28Q')
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit RHH=(LoadUnitHandle(R8,(GetHandleId(Z77)),(652)))
local boolean RIH=false
local real RJH=.2*(GetUnitState(Z77,UNIT_STATE_LIFE)*.045)
local real RKH=.2*(GetUnitState(Z77,UNIT_STATE_MANA)*.045)
if GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if GetIssuedOrderId()==852589then
call RFH(Z77,ML8)
elseif GetIssuedOrderId()==852590then
call RDH(Z77)
endif
endif
if GetUnitAbilityLevel(Z77,'A1TS')>0 or GetUnitAbilityLevel(Z77,'A1TR')>0 or GetUnitAbilityLevel(Z77,'A1TT')>0 or GetUnitAbilityLevel(Z77,'A1TP')>0 then
set RIH=true
call SetUnitState(Z77,UNIT_STATE_LIFE,RMaxBJ(GetUnitState(Z77,UNIT_STATE_LIFE)-RJH,1))
call SetUnitState(Z77,UNIT_STATE_MANA,RMaxBJ(GetUnitState(Z77,UNIT_STATE_MANA)-RKH,1))
endif
if RHH==null then
if X77!=null then
call RDH(X77)
set X77=null
call SaveUnitHandle(R8,(W57),(17),(X77))
endif
else
if X77==null then
set X77=RHH
if RIH then
call SaveUnitHandle(R8,(W57),(17),(X77))
call RFH(X77,ML8)
else
call RDH(X77)
endif
elseif X77!=RHH then
call RDH(X77)
if RIH then
set X77=RHH
call SaveUnitHandle(R8,(W57),(17),(X77))
call RFH(X77,ML8)
endif
elseif RIH==false then
call RDH(X77)
elseif X77==RHH then
if RIH then
set X77=RHH
call SaveUnitHandle(R8,(W57),(17),(X77))
call RFH(X77,ML8)
endif
endif
endif
set t=null
set Z77=null
set X77=null
set RHH=null
return false
endfunction
function RMH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer ML8=GetUnitAbilityLevel(Z77,'A28Q')
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(null))
call TriggerRegisterTimerEvent(t,.2,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function RGH))
set Z77=null
set t=null
endfunction
function RNH takes nothing returns boolean
if GetLearnedSkill()=='A28Q' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A28Q')==1 then
call RMH()
endif
return false
endfunction
function HR9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function RNH))
set t=null
endfunction
function A1TA_Slow takes unit s,integer i returns nothing
local unit f=CreateUnit(GetOwningPlayer(s),'e00E',GetUnitX(s),GetUnitY(s),0)
call UnitAddAbility(f,'AZ0N')
call SetUnitAbilityLevel(f,'AZ0N',i)
call IssueTargetOrderById(f,852075,s)
call UnitApplyTimedLife(f,'BTLF',3)
set f=null
endfunction
function ROH takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),V24)==false then
call GroupAddUnit(V24,GetEnumUnit())
call A1TA_Slow(GetEnumUnit(),W74)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\DragonHawkMissile\\DragonHawkMissile.mdl",GetEnumUnit(),"chest"))
endif
endfunction
function RPH takes unit Z77,unit X77,group O6H returns nothing
local real x1=GetUnitX(Z77)
local real y1=GetUnitY(Z77)
local real x2=GetUnitX(X77)
local real y2=GetUnitY(X77)
local real a=YI7(x1,y1,x2,y2)*bj_DEGTORAD
local real x
local real y
local real d=Z87(x1,y1,x2,y2)
local group g=OG8()
local integer i=1
set V24=O6H
set VU4=Z77
set W74=GetUnitAbilityLevel(Z77,'A1TA')
set V_4=W74*50+50
loop
exitwhen i>8
set H04=Z77
set x=x1+d*i/ 8*Cos(a)
set y=y1+d*i/ 8*Sin(a)
call GroupEnumUnitsInRange(g,x,y,'d',Condition(function UM8))
call ForGroup(g,function ROH)
call GroupClear(g)
set i=i+1
endloop
call OF8(g)
set g=null
endfunction
function RQH takes unit Z77,unit X77 returns boolean
return(LState(Z77,"Relocate|Active"))
endfunction
function RRH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local real d=Z47(Z77,X77)
local real a=YH7(Z77,X77)*bj_DEGTORAD
local real x=GetUnitX(Z77)+20*Cos(a)
local real y=GetUnitY(Z77)+20*Sin(a)
local location l
if d<300 or d>2150 then
set l=T89(x,y)
set x=GetLocationX(l)
set y=GetLocationY(l)
call SetUnitX(Z77,PQ8(x))
call SetUnitY(Z77,PQ8(y))
call KillTrees(x,y,350)
call RemoveLocation(l)
set l=null
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SaveInteger(R8,(GetHandleId((Z77))),((4295)),(2))
else
call SetUnitX(Z77,x)
call SetUnitY(Z77,y)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function RSH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local group O6H=(LoadGroupHandle(R8,(W57),(133)))
local lightning F4F=(LoadLightningHandle(R8,(W57),(196)))
local integer C77=GetTriggerEvalCount(t)
local real d=Z47(Z77,X77)
local real a=1
local real WSD=GetUnitState(Z77,UNIT_STATE_LIFE)
local real ATD=GetUnitState(Z77,UNIT_STATE_MANA)
local real RTH=(LoadReal(R8,(W57),(670)))
local real RUH=(LoadReal(R8,(W57),(667)))
local real RVH
local real RWH
local real RXH=1.5
if X77==null or Z77==null or O18(Z77)or(C77>600 and RQH(Z77,X77)==false and((LoadInteger(R8,(GetHandleId((Z77))),((4295))))==1)==false)or(d>925 and((LoadInteger(R8,(GetHandleId((Z77))),((4295))))==1)==false)or GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='A1TU')then
call OF8(O6H)
call DestroyLightning(F4F)
call UnitRemoveAbility(X77,'A1TH')
call UnitRemoveAbility(X77,'A1TI')
call UnitRemoveAbility(X77,'A1TG')
call UnitRemoveAbility(X77,'A1TJ')
call UnitRemoveAbility(X77,'B0DH')
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(Z77,'A1TH')
call UnitRemoveAbility(Z77,'A1TI')
call UnitRemoveAbility(Z77,'A1TG')
call UnitRemoveAbility(Z77,'A1TJ')
call UnitRemoveAbility(Z77,'B0DH')
call UnitRemoveAbility(Z77,'A1TU')
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A1TA' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1TA',true)
endif
call RemoveSavedHandle(R8,GetHandleId(Z77),652)
call RemoveSavedHandle(R8,GetHandleId(X77),StringHash("AI|TetherSource"))
else
set RVH=WSD/ GetUnitState(Z77,UNIT_STATE_MAX_LIFE)
set RWH=ATD/ GetUnitState(Z77,UNIT_STATE_MAX_MANA)
if RVH-RTH>0 and(RVH-RTH)<.5 then
if LState(Z77,"ArmletOfMordiganState")==false then
call SetUnitState(X77,UNIT_STATE_LIFE,GetUnitState(X77,UNIT_STATE_LIFE)+RXH*(RVH-RTH)*GetUnitState(Z77,UNIT_STATE_MAX_LIFE))
endif
endif
if RWH-RUH>0 and(RWH-RUH)<.5 then
call SetUnitState(X77,UNIT_STATE_MANA,GetUnitState(X77,UNIT_STATE_MANA)+RXH*(RWH-RUH)*GetUnitState(Z77,UNIT_STATE_MAX_MANA))
endif
call SaveReal(R8,(W57),(670),((GetUnitState(Z77,UNIT_STATE_LIFE)/ GetUnitState(Z77,UNIT_STATE_MAX_LIFE))*1.))
call SaveReal(R8,(W57),(667),((GetUnitState(Z77,UNIT_STATE_MANA)/ GetUnitState(Z77,UNIT_STATE_MAX_MANA))*1.))
call MoveLightning(F4F,true,GetUnitX(Z77),GetUnitY(Z77),GetUnitX(X77),GetUnitY(X77))
call RPH(Z77,X77,O6H)
if IsUnitVisibleEx(Z77,GetLocalPlayer())==false and IsUnitVisibleEx(X77,GetLocalPlayer())==false then
set a=0
endif
if N08(GetLocalPlayer())then
set a=1
endif
if d<700 or((LoadInteger(R8,(GetHandleId((Z77))),((4295))))==1)then
call SetLightningColor(F4F,.0,1.,1.,a)
else
call SetLightningColor(F4F,.8,.7,.4,a)
endif
endif
set t=null
set Z77=null
set X77=null
set O6H=null
set F4F=null
return false
endfunction
function RYH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local lightning RZH=AddLightning("CHIM",true,GetUnitX(Z77),GetUnitY(Z77),GetUnitX(X77),GetUnitY(X77))
local integer ML8=GetUnitAbilityLevel(Z77,'A1TA')
local integer RAH
local real d=Z47(Z77,X77)
local real a=YH7(Z77,X77)*bj_DEGTORAD
local location l
local real x
local real y
call SetLightningColor(RZH,.0,1.,1.,1)
call AddPermanentAbility(Z77,'A1TU')
if ML8==1 then
set RAH='A1TH'
elseif ML8==2 then
set RAH='A1TI'
elseif ML8==3 then
set RAH='A1TG'
elseif ML8==4 then
set RAH='A1TJ'
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1TA',false)
call AddPermanentAbility(Z77,RAH)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),RAH,false)
call AddPermanentAbility(X77,RAH)
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),RAH,false)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveGroupHandle(R8,(W57),(133),(OG8()))
call SaveLightningHandle(R8,(W57),(196),(RZH))
call SaveReal(R8,(W57),(670),((GetUnitState(Z77,UNIT_STATE_LIFE)/ GetUnitState(Z77,UNIT_STATE_MAX_LIFE))*1.))
call SaveReal(R8,(W57),(667),((GetUnitState(Z77,UNIT_STATE_MANA)/ GetUnitState(Z77,UNIT_STATE_MAX_MANA))*1.))
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function RSH))
call SaveUnitHandle(R8,(GetHandleId(Z77)),(652),(X77))
if IsUnitType(X77,UNIT_TYPE_HERO)then
call SUnit((GetHandleId(X77)),"AI|TetherSource",Z77)
endif
if d>700 then
set t=CreateTrigger()
set W57=GetHandleId(t)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("Abilities\\Weapons\\DragonHawkMissile\\DragonHawkMissile.mdl",Z77,"chest")))
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function RRH))
call SaveInteger(R8,(GetHandleId((Z77))),((4295)),(1))
endif
set Z77=null
set t=null
endfunction
function RBH takes nothing returns boolean
if GetSpellAbilityId()=='A1TA' then
call RYH()
endif
return false
endfunction
function HS9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function RBH))
set t=null
endfunction
function RCH takes unit Z77,real x,real y returns boolean
local boolean LTD=false
local player p=GetOwningPlayer(Z77)
local unit AC7=CreateUnit(p,'e02Q',GetUnitX(Z77),GetUnitY(Z77),0)
call AddPermanentAbility(AC7,'A1V4')
if IssuePointOrderById(AC7,852525,x,y)then
call KillUnit(AC7)
set AC7=null
return true
else
call KillUnit(AC7)
set AC7=null
return false
endif
endfunction
function R3H takes string R6H,unit X77 returns nothing
local texttag tt=CreateTextTag()
call SetTextTagText(tt,R6H,.033)
call SetTextTagPosUnit(tt,X77,64)
call SetTextTagColor(tt,0,50,255,255)
call SetTextTagVelocity(tt,0,.0355)
call SetTextTagFadepoint(tt,.15)
call SetTextTagPermanent(tt,false)
call SetTextTagLifespan(tt,.85)
call SetTextTagVisibility(tt,true)
set tt=null
endfunction
function RLH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer O3H=GetTriggerEvalCount(t)
if O18(Z77)==false and O3H<12 then
call R3H(I2S(12-O3H),Z77)
endif
if O3H==12 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
return false
endfunction
function R1H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(GetHandleId(Z77)),(652)))
local real QFH=(LoadReal(R8,(W57),(47)))
local real QGH=(LoadReal(R8,(W57),(48)))
local real P5H=(LoadReal(R8,(W57),(189)))
local real P2H=(LoadReal(R8,(W57),(190)))
local fogmodifier PVH=(LoadFogModifierHandle(R8,(W57),(42)))
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call EY8(Z77,"Relocate|Active")
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FogModifierStop(PVH)
call DestroyFogModifier(PVH)
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
call KillTrees(QFH,QGH,250)
call KillTrees(P5H,P2H,250)
if GetTriggerEvalCount(t)==1 then
if O18(Z77)==false then
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",GetUnitX(Z77),GetUnitY(Z77)))
call SetUnitPosition(Z77,QFH,QGH)
call PanCameraToTimedForPlayer(GetOwningPlayer(Z77),QFH,QGH,0)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",GetUnitX(Z77),GetUnitY(Z77)))
call MH8(Z77)
endif
if X77!=null and O18(X77)==false and GetOwningPlayer(X77)!=G8[0]and GetOwningPlayer(X77)!=N8[0]and((LBool(GetHandleId(GetOwningPlayer((X77))),"DisableHelp"))==false)then
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",GetUnitX(X77),GetUnitY(X77)))
call AddTimedBoolBuff(X77,"4402",1)
call SetUnitPosition(X77,QFH,QGH)
if IsUnitType(X77,UNIT_TYPE_HERO)and O18(X77)==false then
call PanCameraToTimedForPlayer(GetOwningPlayer(X77),QFH,QGH,0)
endif
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",GetUnitX(X77),GetUnitY(X77)))
call MH8(X77)
endif
else
if O18(Z77)==false then
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",GetUnitX(Z77),GetUnitY(Z77)))
call SetUnitPosition(Z77,P5H,P2H)
call PanCameraToTimedForPlayer(GetOwningPlayer(Z77),P5H,P2H,0)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",GetUnitX(Z77),GetUnitY(Z77)))
call MH8(Z77)
endif
if X77!=null and O18(X77)==false and GetOwningPlayer(X77)!=G8[0]and GetOwningPlayer(X77)!=N8[0]and((LBool(GetHandleId(GetOwningPlayer((X77))),"DisableHelp"))==false)then
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",GetUnitX(X77),GetUnitY(X77)))
call AddTimedBoolBuff(X77,"4402",1)
call SetUnitPosition(X77,P5H,P2H)
if IsUnitType(X77,UNIT_TYPE_HERO)and O18(X77)==false then
call PanCameraToTimedForPlayer(GetOwningPlayer(X77),P5H,P2H,0)
endif
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",GetUnitX(X77),GetUnitY(X77)))
call MH8(X77)
endif
call EY8(Z77,"Relocate|Active")
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FogModifierStop(PVH)
call DestroyFogModifier(PVH)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
endif
set t=null
set Z77=null
set X77=null
set PVH=null
return false
endfunction
function R0H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real QFH=(LoadReal(R8,(W57),(47)))
local real QGH=(LoadReal(R8,(W57),(48)))
local fogmodifier PVH
local integer ML8=GetUnitAbilityLevel(Z77,'A1TB')
if S69(Z77)or UD8(Z77)or O18(Z77)then
call EY8(Z77,"Relocate|Active")
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetTriggerEvalCount(t)==(2.75-.25*ML8)/ .05 then
set PVH=CreateFogModifierRadius(GetOwningPlayer(Z77),FOG_OF_WAR_VISIBLE,GetUnitX(Z77),GetUnitY(Z77),400,true,true)
call FogModifierStart(PVH)
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=CreateTrigger()
set W57=GetHandleId(t)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call TriggerRegisterTimerEvent(t,.01,false)
call TriggerRegisterTimerEvent(t,12,false)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function R1H))
call SaveReal(R8,(W57),(189),((GetUnitX(Z77))*1.))
call SaveReal(R8,(W57),(190),((GetUnitY(Z77))*1.))
call SaveReal(R8,(W57),(47),((QFH)*1.))
call SaveReal(R8,(W57),(48),((QGH)*1.))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffect("war3mapImported\\EarthlyEminence.mdl",GetUnitX(Z77),GetUnitY(Z77))))
call SaveFogModifierHandle(R8,(W57),(42),(PVH))
set t=CreateTrigger()
set W57=GetHandleId(t)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function RLH))
endif
set Z77=null
set t=null
set PVH=null
return false
endfunction
function R5H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local unit X77=(LoadUnitHandle(R8,(GetHandleId(Z77)),(652)))
local integer id=GetPlayerId(GetOwningPlayer(Z77))
local integer ML8=GetUnitAbilityLevel(Z77,'A1TB')
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",Z77,"chest"))
if X77!=null then
endif
call PingMinimapEx(x,y,4.,255,0,0,false)
call S18(G8[1],2.5,x,y,300)
call S18(N8[1],2.5,x,y,300)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerAddCondition(t,Condition(function R0H))
call SaveReal(R8,(W57),(47),((x)*1.))
call SaveReal(R8,(W57),(48),((y)*1.))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffect("war3mapImported\\EarthlyEminence.mdl",x,y)))
call EW8(Z77,"Relocate|Active")
set Z77=null
set t=null
endfunction
function R2H takes nothing returns boolean
if GetSpellAbilityId()=='A1TB' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
call R5H()
else
if RCH(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())==false then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n0KX'))
else
if IsJWPlayer(GetOwningPlayer(GetTriggerUnit()))then
if IsPointInRegion(WE4,GetSpellTargetX(),GetSpellTargetY())then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n03Y'))
endif
else
if IsPointInRegion(WD4,GetSpellTargetX(),GetSpellTargetY())then
call ZN7(GetTriggerUnit())
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),GetObjectName('n03Y'))
endif
endif
endif
endif
endif
return false
endfunction
function HT9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function R2H))
set WD4=CreateRegion()
call RegionAddRect(WD4,XD)
call RegionAddRect(WD4,BD)
set WE4=CreateRegion()
call RegionAddRect(WE4,WD)
call RegionAddRect(WE4,LD)
set t=null
endfunction
function R_H takes unit Z77,unit T_F,real S4H,real S7H,real a2 returns nothing
local integer i=0
local real S8H
local real S9H=GetUnitY(T_F)
local real a
local real x
local real y
local real SDH
if T_F!=null then
set S8H=GetUnitX(T_F)
set S9H=GetUnitY(T_F)
set a=YI7(S4H,S7H,S8H,S9H)
else
set a=a2
set S8H=S4H+50*Cos(a*bj_DEGTORAD)
set S9H=S7H+50*Sin(a*bj_DEGTORAD)
endif
set SDH=a
set x=S8H+200*Cos(SDH*bj_DEGTORAD)
set y=S9H+200*Sin(SDH*bj_DEGTORAD)
call TI8(CreateDestructable('B006',x,y,-1*SDH,.6,1),5)
call KillTrees(x,y,300)
set SDH=a-40
set x=S8H+200*Cos(SDH*bj_DEGTORAD)
set y=S9H+200*Sin(SDH*bj_DEGTORAD)
call TI8(CreateDestructable('B006',x,y,-1*SDH,.6,1),5)
call KillTrees(x,y,300)
set SDH=a-80
set x=S8H+200*Cos(SDH*bj_DEGTORAD)
set y=S9H+200*Sin(SDH*bj_DEGTORAD)
call TI8(CreateDestructable('B006',x,y,-1*SDH,.6,1),5)
call KillTrees(x,y,300)
set SDH=a+40
set x=S8H+200*Cos(SDH*bj_DEGTORAD)
set y=S9H+200*Sin(SDH*bj_DEGTORAD)
call TI8(CreateDestructable('B006',x,y,-1*SDH,.6,1),5)
call KillTrees(x,y,300)
set SDH=a+80
set x=S8H+200*Cos(SDH*bj_DEGTORAD)
set y=S9H+200*Sin(SDH*bj_DEGTORAD)
call TI8(CreateDestructable('B006',x,y,-1*SDH,.6,1),5)
call KillTrees(x,y,300)
if T_F!=null then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ChainFreeze_F6.mdx",T_F,"chest"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",T_F,"chest"))
call Dmg(ZU4,T_F,NormalFire,ZY4*70)
endif
endfunction
function SEH takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),ZZ4)==false then
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==false then
call GroupAddUnit(ZZ4,GetEnumUnit())
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ChainFreeze_F6.mdx",GetEnumUnit(),"chest"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",GetEnumUnit(),"chest"))
call Dmg(ZU4,GetEnumUnit(),NormalFire,ZY4*70)
else
set ZX4=GetEnumUnit()
endif
endif
endfunction
function SFH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer TG8=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(TG8),(2)))
local unit T_F=(LoadUnitHandle(R8,(TG8),(17)))
local unit SGH=(LoadUnitHandle(R8,(TG8),(45)))
local real SHH=(LoadReal(R8,(TG8),(683)))
local real SIH=(LoadReal(R8,(TG8),(684)))
local real S4H=GetUnitX(SGH)
local real S7H=GetUnitY(SGH)
local real SJH=Atan2(SIH-S7H,SHH-S4H)
local real SKH=S4H+18*Cos(SJH)
local real SMH=S7H+18*Sin(SJH)
local group SNH=(LoadGroupHandle(R8,(TG8),(133)))
local integer QFH=GetUnitAbilityLevel(Z77,'A1YO')
local group g=OG8()
set H04=Z77
set ZU4=Z77
set ZZ4=SNH
set ZY4=QFH
set ZX4=null
call GroupEnumUnitsInRange(g,SKH,SMH,225,Condition(function UM8))
call ForGroup(g,function SEH)
call OF8(g)
call SetUnitPosition(SGH,SKH,SMH)
if Z87(SKH,SMH,SHH,SIH)<40 or ZX4!=null then
call KillTrees(SKH,SMH,300)
call KillUnit(SGH)
call ShowUnit(SGH,false)
call SetUnitPathing(SGH,true)
if ZX4!=null then
call R_H(Z77,ZX4,SKH,SMH,SJH*bj_RADTODEG)
else
call R_H(Z77,null,SKH,SMH,SJH*bj_RADTODEG)
endif
call OF8(SNH)
call FlushChildHashtable(R8,(TG8))
call EA8(t)
endif
set t=null
set SGH=null
set SNH=null
set g=null
return false
endfunction
function SOH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer TG8=GetHandleId(t)
local unit SGH=CreateUnit(GetOwningPlayer(Z77),'h0CS',GetUnitX(Z77),GetUnitY(Z77),0)
local real S4H=GetUnitX(Z77)
local real S7H=GetUnitY(Z77)
local real S8H=GetSpellTargetX()
local real S9H=GetSpellTargetY()
local real SJH=Atan2(S9H-S7H,S8H-S4H)
local real SHH=PQ8(S4H+1600*Cos(SJH))
local real SIH=PS8(S7H+1600*Sin(SJH))
call SetUnitFacing(SGH,SJH*bj_RADTODEG)
call SetUnitPathing(SGH,false)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function SFH))
call SaveUnitHandle(R8,(TG8),(2),(Z77))
call SaveReal(R8,(TG8),(683),((SHH)*1.))
call SaveReal(R8,(TG8),(684),((SIH)*1.))
call SaveReal(R8,(TG8),(13),((SJH)*1.))
call SaveUnitHandle(R8,(TG8),(45),(SGH))
call SaveGroupHandle(R8,(TG8),(133),(OG8()))
set Z77=null
set SGH=null
set t=null
endfunction
function SPH takes nothing returns boolean
if GetSpellAbilityId()=='A1YO' then
call SOH()
endif
return false
endfunction
function HU9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function SPH))
set t=null
endfunction
function SQH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,'A1YQ')
local integer C77=GetTriggerEvalCount(t)
local real y=(C77-50)*(C77-50)/ 4.3
local real P08
if ML8==1 then
set P08=75
elseif ML8==2 then
set P08=150
else
set P08=225
endif
if C77==1 then
call IssueTargetOrderById(Z77,851983,X77)
endif
if C77<50 then
if H7E(X77)==false then
call SetUnitFlyHeight(X77,700*C77/ 50,0)
endif
elseif C77<'d' then
if H7E(X77)==false then
call SetUnitFlyHeight(X77,700-700*(C77-50)/ 50,0)
endif
else
if H7E(X77)==false then
call SetUnitFlyHeight(X77,GetUnitDefaultFlyHeight(X77),0)
endif
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call LT7(W57)
call EA8(t)
call T68(X77,'A204',1,1+ML8,'B0DY')
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A204',false)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function SRH takes unit Z77,unit X77 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer ML8=GetUnitAbilityLevel(Z77,'A1YQ')
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call QM8("WALRUS PUNCH !!",3.5,Z77,.03,255,0,0,255)
call S68(YZ4,GetUnitX(X77),GetUnitY(X77))
call AddPermanentAbility(AC7,'A1UP')
call IssueTargetOrderById(AC7,852095,X77)
if H7E(X77)==false then
call AddPermanentAbility(X77,'Amrf')
call UnitRemoveAbility(X77,'Amrf')
endif
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",X77,"overhead"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",X77,"head"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",X77,"left,hand"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",X77,"right,hand"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",X77,"chest"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",X77,"origin"))
call TriggerRegisterTimerEvent(t,.01,true)
call TriggerAddCondition(t,Condition(function SQH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveEffectHandle(R8,(W57),(175),(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathMissile.mdl",X77,"chest")))
set t=null
endfunction
function SSH takes nothing returns boolean
local trigger t2=GetTriggeringTrigger()
local integer WED=GetHandleId(t2)
local unit Z77=(LoadUnitHandle(R8,(WED),(2)))
local unit X77=(LoadUnitHandle(R8,(WED),(17)))
local integer KC8=GetHandleId(Z77)
local trigger t=LTrig(KC8,"WalrusPunch|Clear")
if GetTriggerEvalCount(t2)==1 then
call IssueTargetOrderById(Z77,851983,X77)
elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 and GetEventDamage()>30 then
if X77==LUnit(KC8,"WalrusPunch|Target")then
call TZ8(Z77,'A1UH',1,.1)
call TZ8(Z77,'A1UI',1,.1)
call SRH(Z77,X77)
if t!=null then
call TriggerEvaluate(t)
endif
endif
call EA8(t2)
call LT7(WED)
endif
else
call UnitRemoveAbility(Z77,'A1UH')
call UnitRemoveAbility(Z77,'A1UI')
call LT7(WED)
call EA8(t2)
endif
set t2=null
set t=null
set Z77=null
set X77=null
return false
endfunction
function STH takes nothing returns boolean
local unit Z77=GetAttacker()
local unit X77=GetTriggerUnit()
local integer KC8=GetHandleId(Z77)
local trigger t=LTrig(KC8,"WalrusPunch|Clear")
local trigger t2
local integer WED
if LState(Z77,"WalrusPunch|Active")and t!=null and X77!=LUnit(KC8,"WalrusPunch|Target")and IsUnitAlly(X77,GetOwningPlayer(Z77))==false and IsUnitType(X77,UNIT_TYPE_STRUCTURE)==false then
call SUnit(KC8,"WalrusPunch|Target",X77)
call UnitRemoveAbility(Z77,'A1UH')
call UnitRemoveAbility(Z77,'A1UI')
if true or GetUnitState(X77,UNIT_STATE_LIFE)/ GetUnitState(X77,UNIT_STATE_MAX_LIFE)>.5 then
call AddPermanentAbility(Z77,'A1UH')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1UH',false)
else
call AddPermanentAbility(Z77,'A1UI')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A1UI',false)
endif
call IssueImmediateOrderById(Z77,851972)
set t2=CreateTrigger()
set WED=GetHandleId(t2)
call TriggerRegisterTimerEvent(t2,.0,false)
call TriggerRegisterTimerEvent(t2,2.,false)
call TriggerRegisterUnitEvent(t2,X77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t2,Condition(function SSH))
call SaveUnitHandle(R8,(WED),(2),(Z77))
call SaveUnitHandle(R8,(WED),(17),(X77))
endif
set Z77=null
set X77=null
return false
endfunction
function SUH takes nothing returns boolean
if LState(GetAttacker(),"WalrusPunch|Active")then
call STH()
endif
return false
endfunction
function SVH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer KC8=GetHandleId(Z77)
call EY8(Z77,"WalrusPunch|Active")
call DestroyEffect(LEff(KC8,"WalrusPunch|Visual"))
call UnitRemoveAbility(Z77,'A1UH')
call UnitRemoveAbility(Z77,'A1UI')
call DO8(KC8,"WalrusPunch|Visual")
call DO8(KC8,"WalrusPunch|Target")
call DO8(KC8,"WalrusPunch|Clear")
call LT7(W57)
call EA8(t)
set Z77=null
set t=null
return false
endfunction
function SWH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local integer KC8=GetHandleId(Z77)
call TriggerRegisterTimerEvent(t,10.,false)
call TriggerAddCondition(t,Condition(function SVH))
call EW8(Z77,"WalrusPunch|Active")
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SUnit(KC8,"WalrusPunch|Target",Z77)
call SEff(KC8,"WalrusPunch|Visual",(AddSpecialEffectTarget("war3mapImported\\WalrusPunchWeaponFX.mdx",Z77,"weapon")))
call STrig(KC8,"WalrusPunch|Clear",t)
set t=null
set Z77=null
endfunction
function SXH takes nothing returns boolean
if GetSpellAbilityId()=='A1YQ' then
call SWH()
endif
return false
endfunction
function HV9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function SXH))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function SUH))
set t=null
endfunction
function SYH takes nothing returns nothing
call ShowUnit(GetEnumUnit(),true)
call UnitRemoveAbility(GetEnumUnit(),'A04R')
call SetUnitInvulnerable(GetEnumUnit(),false)
call PauseUnit(GetEnumUnit(),false)
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)then
call SetUnitPosition(GetEnumUnit(),ZL4,Z14)
call SelectUnitForPlayerSingle(GetEnumUnit(),GetOwningPlayer(GetEnumUnit()))
else
call SetUnitX(GetEnumUnit(),ZL4)
call SetUnitY(GetEnumUnit(),Z14)
endif
if GetEnumUnit()==ZB4 and ZC4!=null then
call IssueTargetOrderById(ZB4,851983,ZC4)
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 SZH takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),ZA4)==false then
call GroupAddUnit(ZA4,GetEnumUnit())
call Dmg(ZB4,GetEnumUnit(),NormalFire,40*Z64+40)
call SetUnitAbilityLevel(Z34,'A0X6',V68(.25*Z64+.25))
endif
call SetUnitX(Z34,GetUnitX(GetEnumUnit()))
call SetUnitY(Z34,GetUnitY(GetEnumUnit()))
call IssueTargetOrderById(Z34,852095,GetEnumUnit())
endfunction
function SAH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit S08=(LoadUnitHandle(R8,(W57),(45)))
local real BM7=GetUnitX(X77)
local real BN7=GetUnitY(X77)
local real r=(LoadReal(R8,(W57),(671)))
local real a=YI7(GetUnitX(S08),GetUnitY(S08),BM7,BN7)*bj_DEGTORAD
local real x=GetUnitX(S08)+r*Cos(a)
local real y=GetUnitY(S08)+r*Sin(a)
local group SNH=(LoadGroupHandle(R8,(W57),(133)))
local group g
local integer C77=GetTriggerEvalCount(t)
local real UXF=RMinBJ(2.5+(C77*.02),10)
local real QFF=225+40*(C77*.02)
set Z64=GetUnitAbilityLevel(Z77,'A1S7')
set H04=Z77
set ZA4=SNH
set ZB4=Z77
set ZC4=X77
set Z34=(LoadUnitHandle(R8,(W57),(19)))
call SetUnitX(S08,x)
call SetUnitY(S08,y)
call SetUnitX(Z77,x)
call SetUnitY(Z77,y)
call SetUnitFacing(S08,a*bj_RADTODEG-180)
call SetUnitScale(S08,UXF,UXF,UXF)
if Z87(x,y,BM7,BN7)<r*2 or C77==150 then
call KillTrees(x,y,300)
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,QFF,Condition(function UM8))
call ForGroup(g,function SZH)
call OF8(g)
set g=null
set ZL4=x
set Z14=y
call ForGroup((LoadGroupHandle(R8,(W57),(22))),function SYH)
call OF8((LoadGroupHandle(R8,(W57),(22))))
call OF8(SNH)
call KillUnit(S08)
call LT7(W57)
call EA8(t)
else
if ModuloInteger(GetTriggerEvalCount(t),5)==0 then
call KillTrees(x,y,300)
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,QFF,Condition(function UM8))
call ForGroup(g,function SZH)
call OF8(g)
set g=null
endif
endif
set t=null
set Z77=null
set S08=null
set SNH=null
return false
endfunction
function SBH takes nothing returns nothing
call DestroyEffect(AddSpecialEffect("war3mapImported\\ChainFreeze_F6.mdx",GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit())))
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit())))
call ShowUnit(GetEnumUnit(),false)
call AddPermanentAbility(GetEnumUnit(),'A04R')
call SetUnitInvulnerable(GetEnumUnit(),true)
call PauseUnit(GetEnumUnit(),true)
if ZB4!=GetEnumUnit()then
set Z54=Z54+1
endif
endfunction
function SCH takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))or(GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit()))))and((LoadBoolean(R8,(GetHandleId(GetOwningPlayer(GetFilterUnit()))),(139)))==false or ZB4==GetFilterUnit())
endfunction
function S3H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local real S4H=GetUnitX(Z77)
local real S7H=GetUnitY(Z77)
local real BM7=GetUnitX(X77)
local real BN7=GetUnitY(X77)
local real a=YI7(S4H,S7H,BM7,BN7)*bj_DEGTORAD
local unit S08=CreateUnit(GetOwningPlayer(Z77),'h0C3',GetUnitX(Z77),GetUnitY(Z77),GetUnitFacing(Z77))
local group g=OG8()
set Z04=0
set Z54=1
set ZB4=Z77
set Z04=1.5*RMaxBJ(133,GetUnitMoveSpeed(Z77))
call GroupEnumUnitsInRange(g,S4H,S7H,255,Condition(function SCH))
call ForGroup(g,function SBH)
set Z34=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
call AddPermanentAbility(Z34,'A0X6')
call SetUnitTimeScale(S08,2)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function SAH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(19),(Z34))
call SaveUnitHandle(R8,(W57),(45),(S08))
call SaveReal(R8,(W57),(137),((a)*1.))
call SaveReal(R8,(W57),(671),((Z04*.02)*1.))
call SaveReal(R8,(W57),(47),((BM7)*1.))
call SaveReal(R8,(W57),(48),((BN7)*1.))
call SaveGroupHandle(R8,(W57),(22),(g))
call SaveGroupHandle(R8,(W57),(133),(OG8()))
set t=null
set Z77=null
set S08=null
set g=null
endfunction
function Angle_U takes unit MZ1,unit N11 returns real
return Atan2(GetUnitY(N11)-GetUnitY(MZ1),GetUnitX(N11)-GetUnitX(MZ1))
endfunction
function Angle_Uxy takes unit MZ1,real x,real y returns real
return Atan2(y-GetUnitY(MZ1),x-GetUnitX(MZ1))
endfunction
function A1S7_CondEx takes unit s,unit u returns boolean
return GetUnitAbilityLevel(u,'A04R')==0 and IsUnitType(u,UNIT_TYPE_HERO)and IsUnitType(u,UNIT_TYPE_DEAD)==false and IsUnitAlly(u,GetOwningPlayer(s))and LBool(GetHandleId(GetOwningPlayer(u)),"DisableHelp")==false
endfunction
function A1S7_CondEx2 takes unit s,unit u returns boolean
return GetUnitAbilityLevel(u,'A04R')==0 and GetUnitDefaultMoveSpeed(u)>100 and IsUnitType(u,UNIT_TYPE_DEAD)==false and IsUnitAlly(u,GetOwningPlayer(s))and LBool(GetHandleId(GetOwningPlayer(u)),"DisableHelp")==false
endfunction
function A1S7_Cond takes nothing returns boolean
if A1S7_CondEx(globalS,GetFilterUnit())then
call SetUnitScale(GetFilterUnit(),0,0,0)
call SetUnitInvulnerable(GetFilterUnit(),true)
return true
endif
return false
endfunction
function A1S7_SetXY takes nothing returns nothing
call SetXY(GetEnumUnit(),globalX,globalY)
endfunction
function CountHeroesInGroupEnum takes nothing returns nothing
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)then
set globalI=globalI+1
endif
endfunction
function CountHeroesInGroup takes group g returns integer
set globalI=0
call ForGroup(g,function CountHeroesInGroupEnum)
return globalI
endfunction
function StopSnowballEnum takes nothing returns nothing
local unit s=GetEnumUnit()
call SetUnitScale(s,PG8(s),0,0)
call SetUnitInvulnerable(s,false)
if globalX<10000 then
call SetUnitPosition(s,globalX,globalY)
endif
call UnitRemoveAbility(s,'A04R')
set s=null
endfunction
function A1S7_Charge takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
local unit f=LUnit(h,"f")
local real x=LReal(h,"NowX")
local real y=LReal(h,"NowY")
local real d
local real a
local unit u
local boolean StopSnowball=false
local group g=LGroup(h,"g")
local group g2=CreateGroup()
if GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER and LBool(h,"MoveStart")==false then
set u=GetOrderTargetUnit()
if u!=null and A1S7_CondEx2(s,u)and Dist_U(s,u)<400 then
call GroupAddUnit(g,u)
call SetUnitScale(u,0,0,0)
call SetXY(u,GetUnitX(f),GetUnitY(f))
call SetUnitInvulnerable(u,true)
call UnitAddAbility(u,'A04R')
endif
call SetUnitScale(f,3.5+(0.5*CountHeroesInGroup(g)-1),0,0)
elseif LBool(h,"MoveStart")==false and(time>(LReal(h,"StartTime")+4)or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()=='AZ3J'))then
call IssueImmediateOrderById(s,851972)
call UnitRemoveAbilityDelay(s,'AZ3J')
call SAReal(h,"Speed",(CountHeroesInGroup(g)-1)*0.75)
call SetUnitTimeScale(f,2+(CountHeroesInGroup(g)-1)*0.25)
call SBool(h,"MoveStart",true)
call SReal(h,"MoveStartTime",time)
call SetTextTagVelocity(LTTag(h,"Text"),0,.0355)
call SetTextTagLifespan(LTTag(h,"Text"),1)
call SReal(h,"Dmg",40+40*LInt(h,"i")+(10+10*LInt(h,"i"))*(CountHeroesInGroup(g)-1))
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST and IsUnitInGroup(GetTriggerUnit(),g)and GetSpellAbilityId()!='AZ3J' then
call IssueImmediateOrderById(GetTriggerUnit(),851972)
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED and IsUnitInGroup(GetAttacker(),g)then
call IssueImmediateOrderById(GetAttacker(),851972)
elseif GetTriggerEventId()==EVENT_GAME_VARIABLE_LIMIT then
set d=LReal(h,"Speed")
set u=LUnit(h,"Target")
if LBool(h,"MoveStart")then
set a=Angle_U(f,u)
set x=x+Cos(a)*d
set y=y+Sin(a)*d
call SetXY(f,x,y)
call SetUnitFacing(f,a*bj_RADTODEG+180)
call SReal(h,"NowX",x)
call SReal(h,"NowY",y)
if Dist_U(f,u)<d or time-LReal(h,"MoveStartTime")>3 then
set StopSnowball=true
endif
else
call SetTextTagText(LTTag(h,"Text"),R2SW(time-LReal(h,"StartTime"),1,1),.033)
endif
set globalX=GetUnitX(f)
set globalY=GetUnitY(f)
call ForGroup(g,function A1S7_SetXY)
if LBool(h,"MoveStart")then
set d=(time-LReal(h,"MoveStartTime"))*40+225
call SetUnitScale(f,3.5+(0.5*CountHeroesInGroup(g)-1)+0.05*(d-225),0,0)
call GroupEnumUnitsInRange(g2,x,y,d,null)
call KillTrees(x,y,d)
set d=LReal(h,"Dmg")
set a=0.25+0.25*LInt(h,"lv")
loop
set u=FirstOfGroup(g2)
exitwhen u==null
if IsUnitEnemy(u,GetOwningPlayer(s))and IsUnitType(u,UNIT_TYPE_MAGIC_IMMUNE)==false and GetUnitAbilityLevel(u,'A04R')+GetUnitAbilityLevel(u,'Avul')+GetUnitAbilityLevel(u,'Aloc')==0 and IsUnitType(u,UNIT_TYPE_ANCIENT)==false and IsUnitType(u,UNIT_TYPE_DEAD)==false and LoadBoolean(R8,h,GetHandleId(u))==false then
call SaveBoolean(R8,h,GetHandleId(u),true)
call DestroyEffect(AddSpecialEffect("war3mapImported\\ChainFreeze_F6.mdx",GetUnitX(u),GetUnitY(u)))
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",GetUnitX(u),GetUnitY(u)))
call Dmg(s,u,1,d)
call Stun(s,u,a)
endif
call GroupRemoveUnit(g2,u)
endloop
call DestroyGroup(g2)
if StopSnowball then
if Dist_U(f,u)<d then
set globalX=GetUnitX(u)
set globalY=GetUnitY(u)
else
set globalX=10001.
set globalY=10001.
endif
call ForGroup(g,function StopSnowballEnum)
call SetPlayerAbilityAvailable(GetOwningPlayer(s),'A1S7',true)
call DestroyGroup(g)
call DestroyTextTag(LTTag(h,"Text"))
call KillUnit(f)
call TriggerOff()
endif
endif
endif
set s=null
set u=null
set f=null
set g=null
set g2=null
endfunction
function A1S7_CondEx2_AI takes nothing returns boolean
return A1S7_CondEx2(globalS,GetFilterUnit())
endfunction
function AI_A1S7_AddUnit takes nothing returns nothing
local unit s=LUnit(GetT(),"s")
local group g=CreateGroup()
set globalS=s
call GroupEnumUnitsInRange(g,GetUnitX(s),GetUnitY(s),390,Condition(function A1S7_CondEx2_AI))
if FirstOfGroup(g)==null then
call IssueImmediateOrderById(s,852177)
call TriggerOff()
else
call IssueTargetOrderById(s,851971,FirstOfGroup(g))
endif
call DestroyGroup(g)
set g=null
set s=null
endfunction
function AI_A1S7 takes unit s returns nothing
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
call TriggerRegisterVariableEvent(t,"time",GREATER_THAN,time+0.1)
call SUnit(h,"s",s)
set t=null
endfunction
function SnowballStartEnum takes nothing returns nothing
local unit s=GetEnumUnit()
call SetUnitScale(s,0,0,0)
call UnitAddAbility(s,'A04R')
call SetXY(s,globalX,globalY)
call SetUnitInvulnerable(s,true)
set s=null
endfunction
function NewA1S7 takes nothing returns nothing
local trigger t=CreateTrigger()
local unit s=GetTriggerUnit()
local integer i=GetUnitAbilityLevel(s,'A1S7')
local integer h=GetHandleId(t)
local group g=CreateGroup()
local real x=GetUnitX(s)
local real y=GetUnitY(s)
local unit f=CreateUnit(GetOwningPlayer(s),'h0C3',x,y,GetUnitFacing(s)-180)
local texttag tt=CreateTextTag()
call SetTextTagText(tt,"4.0",.033)
call SetTextTagPosUnit(tt,f,64)
call SetTextTagColor(tt,128,128,128,255)
call SetTextTagFadepoint(tt,.15)
call SetTextTagPermanent(tt,false)
call SetTextTagVisibility(tt,IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(s)))
call STTag(h,"Text",tt)
call SetUnitScale(s,0,0,0)
call SetUnitTimeScale(f,0)
set globalS=s
call GroupEnumUnitsInRange(g,x,y,125,Condition(function A1S7_Cond))
set globalX=x
set globalY=y
call ForGroup(g,function SnowballStartEnum)
call SetUnitScale(f,2.5+0.2*(CountHeroesInGroup(g)-1),0,0)
call SetPlayerAbilityAvailable(GetOwningPlayer(s),'A1S7',false)
call AddPermanentAbility(s,'AZ3J')
call AddPermanentAbility(s,'A04R')
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_DEATH)
call TriggerRegisterTimer(t)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(t,Condition(function A1S7_Charge))
call SUnit(h,"s",s)
call SUnit(h,"f",f)
call SUnit(h,"Target",GetSpellTargetUnit())
call SReal(h,"StartTime",time)
call SReal(h,"NowX",GetUnitX(s))
call SReal(h,"NowY",GetUnitY(s))
call SReal(h,"Speed",RMaxBJ(133,GetUnitMoveSpeed(s))*.015)
call SGroup(h,"g",g)
call SInt(h,"lv",i)
if GetPlayerController(GetOwningPlayer(s))==MAP_CONTROL_COMPUTER then
call AI_A1S7(s)
endif
set t=null
endfunction
function S6H takes nothing returns boolean
if GetSpellAbilityId()=='A1S7' then
call NewA1S7()
endif
return false
endfunction
function HW9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function S6H))
call PU8('A0X6')
set t=null
endfunction
function SLH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer TG8=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(TG8),(2)))
local unit T_F=(LoadUnitHandle(R8,(TG8),(17)))
call LT7(TG8)
call EA8(t)
call IssueTargetOrderById(Z77,851986,T_F)
set t=null
set Z77=null
set T_F=null
return false
endfunction
function S1H takes nothing returns nothing
local unit Z77=GetSummonedUnit()
local unit T_F=GetSummoningUnit()
local trigger t=CreateTrigger()
local integer TG8=GetHandleId(t)
call TriggerAddCondition(t,Condition(function SLH))
call TriggerRegisterTimerEvent(t,.2,false)
call SaveUnitHandle(R8,(TG8),(2),(Z77))
call SaveUnitHandle(R8,(TG8),(17),(T_F))
set t=null
set Z77=null
set T_F=null
endfunction
function S0H takes nothing returns boolean
local integer id=GetUnitTypeId(GetSummonedUnit())
if id=='o01J' or id=='o01K' or id=='o01L' or id=='o01M' then
call S1H()
endif
return false
endfunction
function HX9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function S0H))
endfunction
function S5H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit AC7=(LoadUnitHandle(R8,(W57),(19)))
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED then
call XK7("PrimalSplit_Loop "+GetUnitName(BG4))
set BG4=GetEventDamageSource()
else
call SetUnitX(Z77,GetUnitX(X77))
call SetUnitY(Z77,GetUnitY(X77))
call SetUnitX(AC7,GetUnitX(X77))
call SetUnitY(AC7,GetUnitY(X77))
endif
set t=null
set Z77=null
set X77=null
set AC7=null
return false
endfunction
function S2H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED then
set BG4=GetEventDamageSource()
call XK7("PrimalSplit_Minor_Loop "+GetUnitName(BG4))
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function AZ2L_Remove takes nothing returns nothing
local integer h=GetT()
call UnitRemoveAbility(LUnit(h,"s"),LInt(h,"id"))
call TriggerOff()
endfunction
function RemoveAbilityDelay takes unit s,integer id,real r returns nothing
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
call TriggerRegisterTimerEvent(t,r,false)
call TriggerAddCondition(t,Condition(function AZ2L_Remove))
call SUnit(h,"s",s)
call SInt(h,"id",id)
set t=null
endfunction
function RemoveAbilityTimed_Act takes nothing returns nothing
local unit s=LUnit(GetT(),"s")
call TriggerSleepAction(LReal(GetT(),"r"))
call UnitRemoveAbility(s,LInt(GetT(),"id"))
endfunction
function RemoveAbilityTimed takes unit s,integer id,real r returns nothing
local trigger t=CreateTrigger()
call SUnit(GetHandleId(t),"s",s)
call SInt(GetHandleId(t),"id",id)
call SReal(GetHandleId(t),"r",r)
call TriggerAddAction(t,function RemoveAbilityTimed_Act)
call TriggerExecute(t)
set t=null
endfunction
function A0MX_AddSkill takes nothing returns nothing
local integer t=GetT()
local unit s=LUnit(t,"s")
local integer xtimer
if s==null then
call TriggerOff()
set s=null
return
endif
set xtimer=LInt(GetHandleId(s),"timer")
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if GetAttacker()==s then
if GetUnitAbilityLevel(s,'AF4L')>0 then
call RemoveAbilityTimed(s,'AF4L',0.3)
endif
set xtimer=0
else
set s=null
return
endif
else
set xtimer=xtimer+1
endif
if xtimer==10 then
if GetUnitAbilityLevel(s,'AF4L')==0 then
call UnitAddAbility(s,'AF4L')
endif
set xtimer=0
endif
call SInt(GetHandleId(s),"timer",xtimer)
set s=null
endfunction
function A0MX takes unit s returns nothing
local trigger t=CreateTrigger()
call SBool(GetHandleId(s),"A0MX_Trig",true)
call SInt(GetHandleId(s),"timer",0)
call SUnit(GetHandleId(t),"s",s)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterTimerEventPeriodic(t,1.00)
call TriggerAddAction(t,function A0MX_AddSkill)
set s=null
set t=null
endfunction
function S_H takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetSummoningUnit()
local unit X77=GetSummonedUnit()
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
local integer T4H
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function S5H))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(19),(AC7))
if AR7(Z77,'I0A8')then
call UnitAddAbility(AC7,'A04I')
endif
if GetUnitAbilityLevel(Z77,'A1B6')>0 then
set T4H=GetUnitAbilityLevel(Z77,'A06M')
if T4H>0 then
call AddPermanentAbility(X77,'A06M')
call SetUnitAbilityLevel(X77,'A06M',T4H)
endif
endif
call XK7("PrimalSplit ")
set t=null
set Z77=null
set X77=null
set AC7=null
endfunction
function T7H takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetSummoningUnit()
local unit X77=GetSummonedUnit()
local integer T4H
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function S2H))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
if GetUnitAbilityLevel(Z77,'A1B6')>0 then
set T4H=GetUnitAbilityLevel(Z77,'A06M')
if T4H>0 then
call AddPermanentAbility(X77,'A06M')
call SetUnitAbilityLevel(X77,'A06M',T4H)
endif
endif
set t=null
set Z77=null
set X77=null
endfunction
function PrimalSplit_Storm takes nothing returns nothing
local unit u=GetSummonedUnit()
local integer i=GetUnitAbilityLevel(GetSummoningUnit(),'Acdh')
if i>0 and GetUnitAbilityLevel(GetSummoningUnit(),'A1B6')>0 then
call AddPermanentAbility(u,'Acdh')
call SetUnitAbilityLevel(u,'Acdh',i)
endif
set u=null
endfunction
function PrimalSplit_Fire takes nothing returns nothing
local unit u=GetSummonedUnit()
local integer i=GetUnitAbilityLevel(GetSummoningUnit(),'A0MX')
if i>0 and GetUnitAbilityLevel(GetSummoningUnit(),'A1B6')>0 then
call AddPermanentAbility(u,'A0MX')
call SetUnitAbilityLevel(u,'A0MX',i)
call A0MX(u)
endif
set u=null
endfunction
function T8H takes nothing returns boolean
local integer MB8=GetUnitTypeId(GetSummonedUnit())
call XK7("PrimalSplit_Main "+I2S(MB8))
if MB8=='npn3' or MB8=='npn6' or MB8=='n010' or MB8=='n0GZ' then
call S_H()
elseif(MB8=='npn2' or MB8=='npn5' or MB8=='n012' or MB8=='n0H1')then
call PrimalSplit_Storm()
elseif(MB8=='npn1' or MB8=='npn4' or MB8=='n011' or MB8=='n0H0')then
call PrimalSplit_Fire()
elseif NK8(MB8)then
call T7H()
endif
return false
endfunction
function HZ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call XK7("HZ9")
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function T8H))
set t=null
endfunction
function T9H takes nothing returns nothing
call Stun(L44,GetEnumUnit(),.75+.25*GetUnitAbilityLevel(L44,'A27F'))
endfunction
function TDH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local real a=(LoadReal(R8,(W57),(137)))
local real BM7=(LoadReal(R8,(W57),(47)))
local real BN7=(LoadReal(R8,(W57),(48)))
local real BJ7=(LoadReal(R8,(W57),(189)))
local real BK7=(LoadReal(R8,(W57),(190)))
local group g
local real d=Z87(BJ7,BK7,BM7,BN7)/ 25
local location l
local integer C77=GetTriggerEvalCount(t)
local real x=BJ7+d*C77*Cos(a)
local real y=BK7+d*C77*Sin(a)
call SetUnitX(X77,PQ8(x))
call SetUnitY(X77,PS8(y))
if H7E(X77)==false then
call SetUnitFlyHeight(X77,325-13*C77,0)
endif
if C77==25 then
call SetUnitX(X77,PQ8(BM7))
call SetUnitY(X77,PS8(BN7))
if IsPointInRegion(IF4,GetUnitX(X77),GetUnitY(X77))then
set l=T89(GetUnitX(X77),GetUnitY(X77))
call SetUnitX(X77,PR8(GetLocationX(l)))
call SetUnitY(X77,PT8(GetLocationY(l)))
call RemoveLocation(l)
set l=null
endif
set H04=Z77
set L44=Z77
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(X77),GetUnitY(X77),350,Condition(function UM8))
call GroupRemoveUnit(g,X77)
call ForGroup(g,function T9H)
call OF8(g)
call KillTrees(GetUnitX(X77),GetUnitY(X77),150)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",GetUnitX(X77),GetUnitY(X77)))
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
if H7E(X77)==false then
call SetUnitFlyHeight(X77,GetUnitDefaultFlyHeight(X77),0)
endif
call SetUnitPathing(X77,true)
endif
set t=null
set Z77=null
set X77=null
set g=null
return false
endfunction
function TEH takes unit Z77,unit X77,unit Target2,real TFH,real TGH,effect FX,effect THH returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local real BM7=TFH
local real BN7=TGH
local real a=YI7(GetUnitX(X77),GetUnitY(X77),TFH,TGH)*bj_DEGTORAD
if Z87(GetUnitX(X77),GetUnitY(X77),TFH,TGH)>375 then
set BM7=GetUnitX(X77)+375*Cos(a)
set BN7=GetUnitY(X77)+375*Sin(a)
endif
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveReal(R8,(W57),(137),((a)*1.))
call SaveReal(R8,(W57),(47),((BM7)*1.))
call SaveReal(R8,(W57),(48),((BN7)*1.))
call SaveReal(R8,(W57),(189),((GetUnitX(X77))*1.))
call SaveReal(R8,(W57),(190),((GetUnitY(X77))*1.))
call SaveEffectHandle(R8,(W57),(32),(FX))
call SaveEffectHandle(R8,(W57),(176),(THH))
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function TDH))
set t=null
endfunction
function TIH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer C77=(LoadInteger(R8,(W57),(34)))
local integer VID=(LoadInteger(R8,(W57),(12)))
local real BM7=(LoadReal(R8,(W57),(47)))
local real BN7=(LoadReal(R8,(W57),(48)))
local integer TJH=(LoadInteger(R8,(W57),(706)))
local real a
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A27F',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A27X',false)
call TEH(Z77,X77,(LoadUnitHandle(R8,(W57),(711))),BM7,BN7,(LoadEffectHandle(R8,(W57),(32))),(LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A27X' then
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
set a=YI7(GetUnitX(X77),GetUnitY(X77),GetSpellTargetX(),GetSpellTargetY())*bj_DEGTORAD
if Z87(GetUnitX(X77),GetUnitY(X77),GetSpellTargetX(),GetSpellTargetY())>375 then
set BM7=GetUnitX(X77)+375*Cos(a)
set BN7=GetUnitY(X77)+375*Sin(a)
else
set BM7=GetSpellTargetX()
set BN7=GetSpellTargetY()
endif
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffect("Abilities\\Spells\\Other\\GeneralAuraTarget\\GeneralAuraTarget.mdl",BM7,BN7)))
call SaveReal(R8,(W57),(47),((BM7)*1.))
call SaveReal(R8,(W57),(48),((BN7)*1.))
call SaveUnitHandle(R8,(W57),(711),(GetSpellTargetUnit()))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget("Abilities\\Spells\\Other\\GeneralAuraTarget\\GeneralAuraTarget.mdl",GetSpellTargetUnit(),"origin")))
endif
else
set C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
call SetUnitPathing(X77,false)
if(LoadInteger(R8,(W57),(707)))==1 then
set TJH=TJH+3
else
set TJH=TJH-3
endif
call SaveInteger(R8,(W57),(706),(TJH))
if TJH==30 then
call SaveInteger(R8,(W57),(707),(-1))
elseif TJH==-30 then
call SaveInteger(R8,(W57),(707),(1))
endif
if H7E(X77)==false then
if C77<15 then
call SetUnitFlyHeight(X77,C77*20,0)
else
call SetUnitFlyHeight(X77,300+TJH,0)
endif
endif
if C77>(VID-25)then
if H7E(X77)==false then
call SetUnitFlyHeight(X77,300,0)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A27F',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A27X',false)
call TEH(Z77,X77,(LoadUnitHandle(R8,(W57),(711))),BM7,BN7,(LoadEffectHandle(R8,(W57),(32))),(LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function TKH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer ML8=GetUnitAbilityLevel(Z77,'A27F')
local unit AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call UnitAddAbility(AC7,'A282')
call SetUnitAbilityLevel(AC7,'A282',ML8)
call IssueTargetOrderById(AC7,852095,X77)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A27F',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A27X',true)
call UnitAddAbility(Z77,'A27X')
call SetUnitPathing(X77,false)
if H7E(X77)==false then
call AddPermanentAbility(X77,'Amrf')
call UnitRemoveAbility(X77,'Amrf')
endif
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(711),(X77))
call SaveInteger(R8,(W57),(12),(R2I((1.25+.25*ML8)/ .02)))
call SaveInteger(R8,(W57),(34),(0))
call SaveInteger(R8,(W57),(706),(0))
call SaveInteger(R8,(W57),(707),(1))
call SaveReal(R8,(W57),(47),((GetUnitX(X77))*1.))
call SaveReal(R8,(W57),(48),((GetUnitY(X77))*1.))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("war3mapImported\\AntiGravityTarget.mdx",X77,"origin")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffect("Abilities\\Spells\\Other\\GeneralAuraTarget\\GeneralAuraTarget.mdl",GetUnitX(X77),GetUnitY(X77))))
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterDeathEvent(t,X77)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function TIH))
set Z77=null
set X77=null
endfunction
function TMH takes nothing returns boolean
if GetSpellAbilityId()=='A27F' and HasLinkin(GetSpellTargetUnit())==false then
call TKH()
endif
return false
endfunction
function HA9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function TMH))
call PU8('A0X6')
call PU8('A282')
set t=null
endfunction
function TNH takes unit Z77,unit X77 returns nothing
local integer ML8=GetUnitAbilityLevel(Z77,'A27G')
if IsUnitType(X77,UNIT_TYPE_HERO)then
if ML8==1 then
call TZ8(X77,'A27W',1,10)
elseif ML8==2 then
call TZ8(X77,'A286',1,10)
elseif ML8==3 then
call TZ8(X77,'A285',1,10)
elseif ML8==4 then
call TZ8(X77,'A287',1,10)
endif
else
if ML8==1 then
call TZ8(X77,'A291',1,10)
elseif ML8==2 then
call TZ8(X77,'A28Z',1,10)
elseif ML8==3 then
call TZ8(X77,'A292',1,10)
elseif ML8==4 then
call TZ8(X77,'A290',1,10)
endif
endif
call S68(B_4,GetUnitX(X77),GetUnitY(X77))
endfunction
function TOH takes nothing returns nothing
local real d
if IsUnitInGroup(GetEnumUnit(),L94)==false then
set d=Z47(GetEnumUnit(),L84)
if d<LD4 then
set LD4=d
set L74=GetEnumUnit()
endif
endif
endfunction
function TPH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local group XCD=(LoadGroupHandle(R8,(W57),(187)))
local real x=GetUnitX(X77)
local real y=GetUnitY(X77)
local group g=OG8()
call GroupAddUnit(XCD,X77)
call TNH(Z77,X77)
set H04=Z77
set L74=null
set L84=X77
set L94=XCD
set LD4=999999
call GroupEnumUnitsInRange(g,x,y,440+25,Condition(function V78))
call ForGroup(g,function TOH)
call OF8(g)
if L74==null or GetTriggerEvalCount(t)>26 then
call OF8(XCD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set X77=L74
call SaveUnitHandle(R8,(W57),(17),(X77))
endif
set g=null
set t=null
set Z77=null
set X77=null
set XCD=null
return false
endfunction
function TQH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local group XCD=OG8()
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),GetUnitFacing(Z77))
call S68(B_4,GetUnitX(Z77),GetUnitY(Z77))
call AddPermanentAbility(AC7,'A284')
call SetUnitAbilityLevel(AC7,'A284',GetUnitAbilityLevel(Z77,'A27G'))
call IssueTargetOrderById(AC7,852119,X77)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveGroupHandle(R8,(W57),(187),(XCD))
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerAddCondition(t,Condition(function TPH))
set Z77=null
set X77=null
set t=null
set AC7=null
endfunction
function TRH takes nothing returns boolean
if GetSpellAbilityId()=='A27G' and HasLinkin(GetSpellTargetUnit())==false then
call TQH()
endif
return false
endfunction
function HB9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function TRH))
set t=null
endfunction
function TSH takes nothing returns boolean
if IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),GetLearnedSkill())==1 then
if GetLearnedSkill()=='A27F' then
call UnitRemoveAbility(GetTriggerUnit(),'A27I')
elseif GetLearnedSkill()=='A27G' then
call UnitRemoveAbility(GetTriggerUnit(),'A27K')
elseif GetLearnedSkill()=='A27V' then
call UnitRemoveAbility(GetTriggerUnit(),'A27J')
endif
endif
return false
endfunction
function TVH takes nothing returns boolean
local integer i1=GetSpellAbilityId()
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and TUH(i1)==false then
call SaveInteger(R8,(GetHandleId(GetTriggerUnit())),(705),(i1))
call SaveInteger(R8,(GetHandleId(GetTriggerUnit())),(712),(GetUnitAbilityLevel(GetTriggerUnit(),i1)))
endif
return false
endfunction
function TWH takes unit u returns nothing
call UnitRemoveAbility(u,'A13D')
call UnitRemoveAbility(u,'A2NI')
call UnitRemoveAbility(u,'A1QV')
call UnitRemoveAbility(u,'A1TU')
call UnitRemoveAbility(u,'A24A')
call UnitRemoveAbility(u,'A24B')
call UnitRemoveAbility(u,'A1NH')
call UnitRemoveAbility(u,'A20N')
call UnitRemoveAbility(u,'A1Z2')
call UnitRemoveAbility(u,'A1Z3')
call UnitRemoveAbility(u,'A205')
call UnitRemoveAbility(u,'A1VU')
call UnitRemoveAbility(u,'A0GC')
call UnitRemoveAbility(u,'A24E')
call UnitRemoveAbility(u,'A0RT')
call UnitRemoveAbility(u,'A1RA')
call UnitRemoveAbility(u,'A0HA')
call UnitRemoveAbility(u,'A0SA')
call UnitRemoveAbility(u,'A121')
call UnitRemoveAbility(u,'A1WF')
call UnitRemoveAbility(u,'A02T')
call UnitRemoveAbility(u,'A1S9')
call UnitRemoveAbility(u,'A21H')
call UnitRemoveAbility(u,'A1MN')
call UnitRemoveAbility(u,'A06K')
call UnitRemoveAbility(u,'A0NE')
call UnitRemoveAbility(u,'A0MP')
call UnitRemoveAbility(u,'A2MB')
endfunction
function TXH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer TYH=(LoadInteger(R8,(W57),(704)))
local integer SSG=(LoadInteger(R8,(W57),(713)))
if TYH==(LoadInteger(R8,(GetHandleId(Z77)),(704)))then
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetTriggerEvalCount(t)>(15-SSG)and O18(Z77)==false then
call UnitRemoveAbility(Z77,TYH)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
return false
endfunction
function TZH takes unit Z77,integer TYH,real U89 returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1.,true)
call TriggerAddCondition(t,Condition(function TXH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveInteger(R8,(W57),(704),(TYH))
call SaveInteger(R8,(GetHandleId(Z77)),(704),(-1))
call SaveInteger(R8,(W57),(713),(R2I((TimerGetElapsed(E4))-U89)))
set t=null
endfunction
function TAH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer TYH=(LoadInteger(R8,(W57),(704)))
local integer C77=(LoadInteger(R8,(W57),(34)))
local integer ML8=GetUnitAbilityLevel(Z77,'A27H')+GetUnitAbilityLevel(Z77,'AZ1H')
local boolean aghabool=LBool(W57,"Agha")
local real U89=(LoadReal(R8,(W57),(411)))
if GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT and GetTriggerEventId()!=EVENT_WIDGET_DEATH then
if C77==0 then
call SaveInteger(R8,(W57),(34),(1))
call DisplayTimedTextToPlayer(GetOwningPlayer(Z77),0,0,10,"|c00ff0303"+GetObjectName('n0LW')+"|r")
else
call TWH(Z77)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),TYH,false)
call FlushChildHashtable(R8,(W57))
call EA8(t)
call TZH(Z77,TYH,U89)
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A27H' or GetSpellAbilityId()=='AZ1H' then
call TWH(Z77)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),TYH,false)
call FlushChildHashtable(R8,(W57))
call EA8(t)
call TZH(Z77,TYH,U89)
elseif GetSpellAbilityId()==TYH then
call SaveReal(R8,(W57),(411),(((TimerGetElapsed(E4)))*1.))
endif
elseif GetTriggerEventId()==EVENT_WIDGET_DEATH then
call TWH(Z77)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),TYH,false)
call FlushChildHashtable(R8,(W57))
call EA8(t)
call TZH(Z77,TYH,U89)
endif
set t=null
set Z77=null
return false
endfunction
function TBH takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer TYH=(LoadInteger(R8,(W57),(704)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local real TCH=GetUnitAbilityLevel(Z77,'A27H')
local integer T3H=GetHandleId(Z77)
local integer T6H=GetHandleId(X77)
if TCH==0 then
set TCH=GetUnitAbilityLevel(Z77,'AZ1H')
call SBool(W57,"Agha",true)
endif
set TCH=60*(2+TCH)
if(LInt(T6H,"WexLevel"))>0 then
call SInt(T3H,"WexLevel",(LInt(T6H,"WexLevel")))
endif
if(LInt(T6H,"QuasLevel"))>0 then
call SInt(T3H,"QuasLevel",(LInt(T6H,"QuasLevel")))
endif
if(LInt(T6H,"ExortLevel"))>0 then
call SInt(T3H,"ExortLevel",(LInt(T6H,"ExortLevel")))
endif
if(LoadInteger(R8,(GetHandleId(X77)),(710)))>0 then
call SaveInteger(R8,(GetHandleId(Z77)),(710),((LoadInteger(R8,(GetHandleId(X77)),(710)))))
endif
call S68(B04,GetUnitX(Z77),GetUnitY(Z77))
call QM8(GetObjectName(TYH),3.5,Z77,.024,170,0,255,216)
call SaveInteger(R8,(GetHandleId(Z77)),(704),(TYH))
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),TYH,true)
call AddPermanentAbility(Z77,TYH)
call SetUnitAbilityLevel(Z77,TYH,ML8)
set t=CreateTrigger()
set W57=GetHandleId(t)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveInteger(R8,(W57),(34),(0))
call SaveInteger(R8,(W57),(704),(TYH))
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterTimerEvent(t,TCH,false)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerRegisterTimerEvent(t,TCH-20,false)
call TriggerAddCondition(t,Condition(function TAH))
if KR8(GetOwningPlayer(Z77))then
call KSG(Z77,TYH,X77)
endif
set t=null
set Z77=null
set X77=null
endfunction
function TLH takes unit Z77,unit X77,integer TYH,integer ML8 returns nothing
local trigger t=T88(X77,Z77,'h0DB',"TBH",900)
local integer W57=GetHandleId(t)
if LoadBoolean(R8,TYH,'Agha')then
if(GetSpellAbilityId()=='AZ1H' and LoadBoolean(R8,TYH,'High')==false)then
set TYH=LoadInteger(R8,TYH,'Agha')
elseif(GetSpellAbilityId()!='AZ1H' and LoadBoolean(R8,TYH,'High'))then
set TYH=LoadInteger(R8,TYH,'Agha')
endif
endif
call S68(B14,GetUnitX(X77),GetUnitY(X77))
call QM8(GetObjectName(TYH),3.75,X77,.024,170,0,255,216)
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(704),(TYH))
call SaveInteger(R8,(W57),(5),(ML8))
set t=null
endfunction
function T1H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if TUH(GetSpellAbilityId())then
else
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
else
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function T0H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
if(LoadInteger(R8,(GetHandleId(X77)),(705)))!=0 then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Nebula.mdx",X77,"origin"))
call TLH(Z77,X77,(LoadInteger(R8,(GetHandleId(X77)),(705))),(LoadInteger(R8,(GetHandleId(X77)),(712))))
endif
set Z77=null
set X77=null
endfunction
function SpellSteal takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local string fx=""
if IsPlayerAlly(GetOwningPlayer(Z77),GetLocalPlayer())or N08(GetLocalPlayer())then
set fx="war3mapImported\\Nebula.mdx"
endif
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget(fx,X77,"origin")))
call TriggerRegisterTimerEvent(t,20,false)
call TriggerRegisterDeathEvent(t,X77)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function T1H))
set Z77=null
set X77=null
endfunction
function T5H takes nothing returns boolean
if(GetSpellAbilityId()=='A27H' or GetSpellAbilityId()=='AZ1H')and HasLinkin(GetSpellTargetUnit())==false then
call T0H()
endif
return false
endfunction
function SaveAghaSkillData takes integer i,integer l returns nothing
call SaveBoolean(R8,i,'Agha',true)
call SaveBoolean(R8,l,'Agha',true)
call SaveBoolean(R8,l,'High',true)
call SaveInteger(R8,i,'Agha',l)
call SaveInteger(R8,l,'Agha',i)
endfunction
function SaveAghaData takes nothing returns nothing
call SaveAghaSkillData('A01P','A09Z')
call SaveAghaSkillData('A095','A09W')
call SaveAghaSkillData('A0CC','A02Z')
call SaveAghaSkillData('A28R','A28S')
call SaveAghaSkillData('A00H','A0A1')
call SaveAghaSkillData('A29G','A29H')
call SaveAghaSkillData('A03R','A0AV')
call SaveAghaSkillData('A05T','A08H')
call SaveAghaSkillData('A21F','A21G')
call SaveAghaSkillData('A1W8','A1W9')
call SaveAghaSkillData('A013','A0A6')
call SaveAghaSkillData('A067','A08P')
call SaveAghaSkillData('A054','A00U')
call SaveAghaSkillData('A0NT','A0NX')
call SaveAghaSkillData('A0MU','A0A2')
call SaveAghaSkillData('A0MQ','A1B6')
call SaveAghaSkillData('A0Z8','A1CV')
call SaveAghaSkillData('A0IN','A1AW')
call SaveAghaSkillData('A0M1','A1AX')
call SaveAghaSkillData('A0LT','A1CS')
call SaveAghaSkillData('A03K','A1B0')
call SaveAghaSkillData('A0O5','A1B1')
call SaveAghaSkillData('A06R','A1B4')
call SaveAghaSkillData('A0QR','A1B3')
call SaveAghaSkillData('A21Y','A1GU')
call SaveAghaSkillData('A0FL','A1CX')
call SaveAghaSkillData('A12P','A1D6')
call SaveAghaSkillData('A0J1','A1D7')
call SaveAghaSkillData('A0G4','A1D8')
call SaveAghaSkillData('A02Q','A1D9')
call SaveAghaSkillData('A0NS','A1DA')
call SaveAghaSkillData('A10Q','A1DB')
call SaveAghaSkillData('A0AK','A1FY')
call SaveAghaSkillData('A0E2','A1MR')
call SaveAghaSkillData('A0DH','A1OB')
call SaveAghaSkillData('A0S8','A1QP')
call SaveAghaSkillData('S008','S00U')
call SaveAghaSkillData('A1AO','A1UV')
call SaveAghaSkillData('A080','A1UZ')
call SaveAghaSkillData('A0OK','A1VW')
call SaveAghaSkillData('A0DY','A1WB')
call SaveAghaSkillData('A0QK','A21Q')
call SaveAghaSkillData('A1T5','A235')
call SaveAghaSkillData('A0MW','A27C')
call SaveAghaSkillData('A0O2','A289')
call SaveAghaSkillData('A1NE','A2IG')
call SaveAghaSkillData('A0L3','A2QC')
call SaveAghaSkillData('A1MI','A2QE')
call SaveAghaSkillData('A0ER','A2S8')
call SaveAghaSkillData('A1BX','AZ0M')
call SaveAghaSkillData('A1U6','AZ0I')
call SaveAghaSkillData('A05E','AZ0U')
call SaveAghaSkillData('A049','AZ0S')
call SaveAghaSkillData('A27H','AZ1H')
call SaveAghaSkillData('A1SA','AZ3A')
endfunction
function HC9 takes nothing returns nothing
local trigger t=CreateTrigger()
call SaveAghaData()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function T5H))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function TVH))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function TSH))
set t=null
endfunction
function T_H takes nothing returns nothing
if S_9(GetEnumUnit())then
return
endif
if GetUnitAbilityLevel(GetEnumUnit(),'A27S')>0 then
call UnitRemoveAbility(GetEnumUnit(),'A27S')
endif
if GetUnitAbilityLevel(GetEnumUnit(),'A27Q')>0 then
call UnitRemoveAbility(GetEnumUnit(),'A27Q')
endif
if GetUnitAbilityLevel(GetEnumUnit(),'A27R')>0 then
call UnitRemoveAbility(GetEnumUnit(),'A27R')
endif
if GetUnitAbilityLevel(GetEnumUnit(),'A27T')>0 then
call UnitRemoveAbility(GetEnumUnit(),'A27T')
endif
endfunction
function U4H takes nothing returns nothing
if S_9(GetEnumUnit())then
return
endif
if LG4==1 then
if GetUnitAbilityLevel(GetEnumUnit(),'A27S')==0 then
call AddPermanentAbility(GetEnumUnit(),'A27S')
call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),'A27S',false)
endif
elseif LG4==2 then
if GetUnitAbilityLevel(GetEnumUnit(),'A27Q')==0 then
call UnitRemoveAbility(GetEnumUnit(),'A27S')
call AddPermanentAbility(GetEnumUnit(),'A27Q')
call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),'A27Q',false)
endif
elseif LG4==3 then
if GetUnitAbilityLevel(GetEnumUnit(),'A27R')==0 then
call UnitRemoveAbility(GetEnumUnit(),'A27S')
call UnitRemoveAbility(GetEnumUnit(),'A27Q')
call AddPermanentAbility(GetEnumUnit(),'A27R')
call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),'A27R',false)
endif
elseif LG4==4 then
if GetUnitAbilityLevel(GetEnumUnit(),'A27T')==0 then
call UnitRemoveAbility(GetEnumUnit(),'A27S')
call UnitRemoveAbility(GetEnumUnit(),'A27Q')
call UnitRemoveAbility(GetEnumUnit(),'A27R')
call AddPermanentAbility(GetEnumUnit(),'A27T')
call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),'A27T',false)
endif
endif
endfunction
function U7H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local group XIE=(LoadGroupHandle(R8,(W57),(340)))
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local group g=OG8()
if Z77==null or GetUnitTypeId(Z77)!='E02X' then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call ForGroup(XIE,function T_H)
call OF8(XIE)
call OF8(g)
return false
endif
set H04=Z77
set LG4=GetUnitAbilityLevel(Z77,'A27V')
if O18(Z77)==false then
call GroupEnumUnitsInRange(g,x,y,925,Condition(function VH8))
endif
call GroupRemoveGroup(g,XIE)
call ForGroup(XIE,function T_H)
if O18(Z77)==false then
call ForGroup(g,function U4H)
endif
call SaveGroupHandle(R8,(W57),(340),(g))
call OF8(XIE)
set t=null
set Z77=null
set XIE=null
set g=null
return false
endfunction
function U8H takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local integer i
local player p
call TriggerRegisterTimerEvent(t,.3,true)
call TriggerAddCondition(t,Condition(function U7H))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveGroupHandle(R8,(W57),(340),(OG8()))
set i=0
loop
exitwhen i>5
set p=G8[i]
call SetPlayerAbilityAvailable(p,'A27S',false)
call SetPlayerAbilityAvailable(p,'A27Q',false)
call SetPlayerAbilityAvailable(p,'A27R',false)
call SetPlayerAbilityAvailable(p,'A27T',false)
set p=N8[i]
call SetPlayerAbilityAvailable(p,'A27S',false)
call SetPlayerAbilityAvailable(p,'A27Q',false)
call SetPlayerAbilityAvailable(p,'A27R',false)
call SetPlayerAbilityAvailable(p,'A27T',false)
set i=i+1
endloop
set t=null
set Z77=null
endfunction
function U9H takes nothing returns boolean
if GetLearnedSkill()=='A27V' and GetUnitAbilityLevel(GetTriggerUnit(),'A27V')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call U8H()
endif
return false
endfunction
function H39 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function U9H))
set t=null
endfunction
function UDH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call AddUnitAnimationProperties(Z77,"alternate",false)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function UEH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function UDH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=null
set Z77=null
endfunction
function UFH takes nothing returns boolean
if(GetSpellAbilityId()=='A073' or GetSpellAbilityId()=='A03J' or GetSpellAbilityId()=='A04J' or GetSpellAbilityId()=='A04M' or GetSpellAbilityId()=='A04N')and GetUnitTypeId(GetTriggerUnit())=='E02X' then
call UEH()
endif
return false
endfunction
function H69 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function UFH))
set t=null
endfunction
function UGH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,'A29V')
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A29W' then
call UnitRemoveAbility(Z77,'A29W')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A29W',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A29V',true)
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call Stun(Z77,X77,.5+.5*ML8)
call SetUnitX(Z77,GetUnitX(X77))
call SetUnitY(Z77,GetUnitY(X77))
call IssueTargetOrderById(Z77,851983,X77)
call UnitShareVision(X77,GetOwningPlayer(Z77),false)
endif
else
call UnitRemoveAbility(Z77,'A29W')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A29W',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A29V',true)
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call UnitShareVision(X77,GetOwningPlayer(Z77),false)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
return false
endfunction
function UHH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if GetTriggerEvalCount(GetTriggeringTrigger())>30 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
call TF9(Z77)
endif
set t=null
set Z77=null
return false
endfunction
function UIH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77
local integer C77=(LoadInteger(R8,(W57),(34)))
local integer ML8=GetUnitAbilityLevel(Z77,'A29V')
if C77>60 then
call UnitRemoveAbility(Z77,'B0EV')
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamage()>'d' and IsUnitType(GetEventDamageSource(),UNIT_TYPE_STRUCTURE)==false then
call AddLife(Z77,GetEventDamage())
set X77=Y7[GetPlayerId(GetOwningPlayer(GetEventDamageSource()))]
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call TF9(Z77)
call FlushChildHashtable(R8,(W57))
call EA8(t)
if O18(X77)==false then
call UnitShareVision(X77,GetOwningPlayer(Z77),true)
call AddPermanentAbility(Z77,'A29W')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A29W',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A29V',false)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterTimerEvent(t,4,false)
call TriggerAddCondition(t,Condition(function UGH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveEffectHandle(R8,(W57),(175),(AddSpecialEffectTarget("war3mapImported\\RetaliationTarget.mdx",Z77,"origin")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget("war3mapImported\\RetaliationTarget.mdx",X77,"origin")))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function UHH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
endif
endif
else
call SaveInteger(R8,(W57),(34),(C77+1))
endif
set t=null
set Z77=null
return false
endfunction
function UJH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function UIH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveInteger(R8,(W57),(34),(0))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("war3mapImported\\RetaliationShield.mdx",Z77,"chest")))
set Z77=null
set t=null
endfunction
function UKH takes nothing returns boolean
if GetSpellAbilityId()=='A29V' then
call UJH()
endif
return false
endfunction
function Register_Retaliation takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function UKH))
set t=null
endfunction
function UMH takes nothing returns nothing
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\ImmolationRed\\ImmolationRedDamage.mdl",GetEnumUnit(),"chest"))
call Dmg(IG7,GetEnumUnit(),NormalFire,(20+10*IH7)/ 5)
endfunction
function UNH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer ML8=GetUnitAbilityLevel(Z77,'A2HS')
local group g
if GetUnitAbilityLevel(Z77,'B0FP')==0 and GetUnitAbilityLevel(Z77,'B0FQ')==0 then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(Z77,'A2H7')
call UnitRemoveAbility(Z77,'B0FO')
call UnitRemoveAbility(Z77,'A2IX')
call UnitRemoveAbility(Z77,'A2IW')
call UnitRemoveAbility(Z77,'A2IV')
call UnitRemoveAbility(Z77,'A2IY')
else
set H04=Z77
set IG7=Z77
set IH7=ML8
set g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),400+25,Condition(function UM8))
call ForGroup(g,function UMH)
call OF8(g)
endif
set g=null
set t=null
set Z77=null
return false
endfunction
function UOH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
local integer ML8=GetUnitAbilityLevel(Z77,'A2HS')
call UnitAddAbility(AC7,'A2H5')
call SetUnitAbilityLevel(AC7,'A2H5',ML8)
call IssueTargetOrderById(AC7,852186,Z77)
call TriggerRegisterTimerEvent(t,.2,true)
call TriggerAddCondition(t,Condition(function UNH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("war3mapImported\\FlameGuard.mdx",Z77,"origin")))
if ML8==1 then
elseif ML8==2 then
elseif ML8==3 then
elseif ML8==4 then
endif
set Z77=null
set AC7=null
set t=null
endfunction
function UPH takes nothing returns boolean
if GetSpellAbilityId()=='A2HS' then
call UOH()
endif
return false
endfunction
function H19 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function UPH))
set t=null
endfunction
function UQH takes unit Z77 returns nothing
call UnitRemoveAbility(Z77,'BOhx')
call UnitRemoveAbility(Z77,'B00H')
endfunction
function URH takes unit Z77 returns nothing
call UnitRemoveAbility(Z77,'A2H9')
call UnitRemoveAbility(Z77,'B0FM')
endfunction
function USH takes unit Z77 returns nothing
call UnitRemoveAbility(Z77,'A2JH')
call UnitRemoveAbility(Z77,'A2JG')
call UnitRemoveAbility(Z77,'A2JJ')
call UnitRemoveAbility(Z77,'A2JI')
call UnitRemoveAbility(Z77,'B0FL')
endfunction
function UTH takes unit Z77 returns nothing
call AddPermanentAbility(Z77,'A2H9')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2H9',false)
endfunction
function UUH takes unit Z77 returns nothing
local integer ML8=GetUnitAbilityLevel(Z77,'A2H0')
if ML8==1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2JH',false)
call AddPermanentAbility(Z77,'A2JH')
elseif ML8==2 then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2JG',false)
call AddPermanentAbility(Z77,'A2JG')
elseif ML8==3 then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2JJ',false)
call AddPermanentAbility(Z77,'A2JJ')
elseif ML8==4 then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2JI',false)
call AddPermanentAbility(Z77,'A2JI')
endif
endfunction
function UVH takes unit Z77,unit X77 returns nothing
local real a=GetRandomReal(0,360)
local real x=GetUnitX(X77)+50*Cos(a*bj_DEGTORAD)
local real y=GetUnitY(X77)+50*Sin(a*bj_DEGTORAD)
call SetUnitPosition(Z77,x,y)
call SetUnitFacing(Z77,bj_RADTODEG*Atan2(GetUnitY(X77)-GetUnitY(Z77),GetUnitX(X77)-GetUnitX(Z77)))
call SetUnitAnimation(Z77,"Attack")
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Fire_Blink_2.mdx",Z77,"chest"))
call USH(Z77)
if IsUnitType(X77,UNIT_TYPE_HERO)or IsUnitIllusion(X77)then
call UUH(Z77)
call UnitRemoveAbility(Z77,'A2JF')
else
call AddPermanentAbility(Z77,'A2JF')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2JF',false)
endif
call IssueTargetOrderById(Z77,851983,X77)
endfunction
function UWH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local real BJ7=(LoadReal(R8,(W57),(189)))
local real BK7=(LoadReal(R8,(W57),(190)))
local group XCD=(LoadGroupHandle(R8,(W57),(187)))
local group g=(LoadGroupHandle(R8,(W57),(22)))
local unit X77=null
local boolean LKG=false
local fogmodifier N4E=(LoadFogModifierHandle(R8,(W57),(42)))
local integer ML8=GetUnitAbilityLevel(Z77,'A2H0')
loop
exitwhen FirstOfGroup(g)==null or LKG
set X77=FirstOfGroup(g)
call GroupRemoveUnit(g,X77)
if IsUnitInGroup(X77,XCD)and X77!=null then
set X77=null
set LKG=false
else
set LKG=true
endif
endloop
call SetUnitPathing(Z77,false)
call SetUnitInvulnerable(Z77,true)
call UE8(Z77)
if LKG==false or((LoadInteger(R8,(GetHandleId((Z77))),((4319))))==1)then
call SaveInteger(R8,(GetHandleId((Z77))),((4318)),(2))
call URH(Z77)
call UnitRemoveAbility(Z77,'A2JF')
call USH(Z77)
call UE8(Z77)
call UQH(Z77)
call UnitAddAbility(Z77,'A2H2')
call UnitRemoveAbility(Z77,'A2H2')
call UE8(Z77)
if((LoadInteger(R8,(GetHandleId((Z77))),((4319))))==1)==false then
call SetUnitX(Z77,BJ7)
call SetUnitY(Z77,BK7)
endif
call SetUnitVertexColor(Z77,255,255,255,255)
call SetUnitPathing(Z77,true)
call SetUnitInvulnerable(Z77,false)
call SetUnitTimeScale(Z77,1)
call OF8(XCD)
call OF8(g)
call RemoveUnit((LoadUnitHandle(R8,(W57),(19))))
call FogModifierStop(N4E)
call DestroyFogModifier(N4E)
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
call GroupAddUnit(XCD,X77)
call UVH(Z77,X77)
endif
set t=null
set Z77=null
set X77=null
set g=null
set XCD=null
set N4E=null
return false
endfunction
function UXH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local fogmodifier N4E=CreateFogModifierRadius(GetOwningPlayer(Z77),FOG_OF_WAR_VISIBLE,x,y,600,true,true)
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'h0E7',GetUnitX(Z77),GetUnitY(Z77),GetUnitFacing(Z77))
local group g=OG8()
local integer ML8=GetUnitAbilityLevel(Z77,'A2H0')
call SetUnitVertexColor(AC7,255,255,255,'d')
call FogModifierStart(N4E)
call SaveInteger(R8,(GetHandleId((Z77))),((4318)),(1))
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,150+'d'*ML8+25,Condition(function T_8))
call UE8(Z77)
call UQH(Z77)
call UnitAddAbility(Z77,'A2H1')
call UnitRemoveAbility(Z77,'A2H1')
call SetUnitVertexColor(Z77,255,255,255,'}')
call SetUnitPathing(Z77,false)
call SetUnitInvulnerable(Z77,true)
call SetUnitTimeScale(Z77,3)
call TriggerRegisterTimerEvent(t,.2,true)
call TriggerAddCondition(t,Condition(function UWH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
call SaveReal(R8,(W57),(189),((GetUnitX(Z77))*1.))
call SaveReal(R8,(W57),(190),((GetUnitY(Z77))*1.))
call SaveGroupHandle(R8,(W57),(187),(OG8()))
call SaveGroupHandle(R8,(W57),(22),(g))
call SaveFogModifierHandle(R8,(W57),(42),(N4E))
call SaveUnitHandle(R8,(W57),(19),(AC7))
call UTH(Z77)
call TriggerEvaluate(t)
set Z77=null
set t=null
set N4E=null
set AC7=null
set g=null
endfunction
function UYH takes nothing returns boolean
if GetSpellAbilityId()=='A2H0' then
call UXH()
endif
return false
endfunction
function UZH takes nothing returns boolean
local unit Q89=GetSummonedUnit()
if IsUnitIllusion(Q89)and GetUnitTypeId(Q89)=='N0MH' then
call URH(Q89)
call UnitRemoveAbility(Q89,'A2JF')
call USH(Q89)
call UnitAddAbility(Q89,'A2H2')
call UnitRemoveAbility(Q89,'A2H2')
endif
set Q89=null
return false
endfunction
function H09 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function UYH))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function UZH))
set t=null
endfunction
function UAH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,'A2H3')
local integer VID=2
if ML8>2 then
set VID=3
endif
if GetTriggerEvalCount(t)==VID then
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
call Dmg(Z77,X77,1,20+20*ML8)
set t=null
set Z77=null
set X77=null
return false
endfunction
function UBH takes nothing returns nothing
local unit Z77=H04
local unit X77=H54
local unit AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call UnitAddAbility(AC7,'A2H4')
call SetUnitAbilityLevel(AC7,'A2H4',GetUnitAbilityLevel(Z77,'A2H3'))
call IssueTargetOrderById(AC7,852106,X77)
call TriggerAddCondition(t,Condition(function UAH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call TriggerRegisterTimerEvent(t,0,false)
call TriggerRegisterTimerEvent(t,1,true)
set AC7=null
set Z77=null
set X77=null
endfunction
function UCH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local group g=OG8()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local unit u1=null
local unit u2=null
local unit u3=null
local integer IM8=0
local unit u
local trigger t
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,425,Condition(function V78))
loop
exitwhen FirstOfGroup(g)==null or IM8==2
set u=GroupPickRandomUnit(g)
if u!=null then
if IM8==0 then
set u1=u
elseif IM8==1 then
set u2=u
elseif IM8==2 then
set u3=u
endif
set IM8=IM8+1
call GroupRemoveUnit(g,u)
endif
endloop
call OF8(g)
if u1!=null then
call T88(Z77,u1,'h0E0',"UBH",9000)
endif
if u2!=null then
call T88(Z77,u2,'h0E0',"UBH",9000)
endif
if u3!=null then
endif
set g=null
set Z77=null
set u=null
set u1=null
set u2=null
set u3=null
endfunction
function U3H takes nothing returns boolean
if GetSpellAbilityId()=='A2H3' then
call UCH()
endif
return false
endfunction
function HL9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function U3H))
set t=null
endfunction
function U6H takes nothing returns boolean
local unit Z77=(LoadUnitHandle(R8,(GetHandleId(GetTriggeringTrigger())),(2)))
local integer W57=GetHandleId(Z77)
local integer i=0
local real QZH=(TimerGetElapsed(E4))
local integer ULH=(LoadInteger(R8,(W57),(749)))
local real x
local real y
local real t
loop
exitwhen i>ULH
set t=(LoadReal(R8,(W57),(10000+i)))
if t+10>QZH then
set x=(LoadReal(R8,(W57),(11000+i)))
set y=(LoadReal(R8,(W57),(12000+i)))
endif
set i=i+1
endloop
set Z77=null
return false
endfunction
function U1H takes integer W57,integer ULH,real S_8,real T48 returns boolean
local real x
local real y
local real t
local integer i=0
local real QZH=(TimerGetElapsed(E4))
loop
exitwhen i>ULH
set t=(LoadReal(R8,(W57),(10000+i)))
if t+10>QZH then
set x=(LoadReal(R8,(W57),(11000+i)))
set y=(LoadReal(R8,(W57),(12000+i)))
if Z87(x,y,S_8,T48)<75 then
return true
endif
endif
set i=i+1
endloop
return false
endfunction
function U0H takes integer W57,integer ULH returns integer
local real t
local integer i=0
local real QZH=(TimerGetElapsed(E4))
loop
exitwhen i>ULH
set t=(LoadReal(R8,(W57),(10000+i)))
if t+10<QZH then
return i
endif
set i=i+1
endloop
return-1
endfunction
function U5H takes unit Z77,integer U2H,real x,real y returns nothing
local integer W57=GetHandleId(Z77)
local integer ULH=(LoadInteger(R8,(W57),(749)))
local integer U_H
if U1H(W57,ULH,x,y)then
return
endif
set U_H=U0H(W57,ULH)
if U_H==-1 then
set U_H=ULH
set ULH=ULH+1
call SaveInteger(R8,(W57),(749),(ULH))
endif
call SaveInteger(R8,(W57),(13000),(U2H))
call SaveReal(R8,(W57),(10000),(((TimerGetElapsed(E4)))*1.))
call SaveReal(R8,(W57),(11000),((x)*1.))
call SaveReal(R8,(W57),(12000),((y)*1.))
endfunction
function V4H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function U6H))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set Z77=null
set t=null
endfunction
function V7H takes nothing returns nothing
call Dmg(IJ7,GetEnumUnit(),1,50+II7*50)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\LordofFlameMissile\\LordofFlameMissile.mdl",GetEnumUnit(),"origin"))
endfunction
function V8H takes unit Z77,unit ETE,real x,real y returns nothing
local group g
call KillUnit(ETE)
call QH8("war3mapImported\\Firaga_2.mdx",x,y,2)
set g=OG8()
set H04=Z77
set IJ7=Z77
set II7=GetUnitAbilityLevel(Z77,'A2JK')
call GroupEnumUnitsInRange(g,x,y,450+25,Condition(function UM8))
call UnitRemoveAbility(Z77,'A04R')
call ForGroup(g,function V7H)
call AddPermanentAbility(Z77,'A04R')
call OF8(g)
set g=null
endfunction
function V9H takes unit Z77,unit VDH returns nothing
local integer W57=GetHandleId(Z77)
local integer VEH=(LoadInteger(R8,(W57),(746)))
local unit VFH
local integer i=1
local integer x
loop
exitwhen i>VEH
set VFH=(LoadUnitHandle(R8,(W57),(1450+i)))
if VFH==VDH then
set VEH=VEH-1
call SaveUnitHandle(R8,(W57),(1450+i),((LoadUnitHandle(R8,(W57),(1450+i+1)))))
call SaveInteger(R8,(W57),(746),(VEH))
set x=i+1
loop
exitwhen x>VEH
call SaveUnitHandle(R8,(W57),(1450+x),((LoadUnitHandle(R8,(W57),(1450+x+1)))))
set x=x+1
endloop
endif
set i=i+1
endloop
set VFH=null
endfunction
function VGH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit ETE=(LoadUnitHandle(R8,(W57),(19)))
local real PPD=GetUnitX(ETE)
local real PQD=GetUnitY(ETE)
local real BM7=(LoadReal(R8,(W57),(47)))
local real BN7=(LoadReal(R8,(W57),(48)))
local real a=YI7(PPD,PQD,BM7,BN7)*bj_DEGTORAD
local real S_8
local real T48
local real d=Z87(PPD,PQD,BM7,BN7)
local real AQD=GetUnitMoveSpeed(Z77)*2.5*.02
local group g
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call V9H(Z77,ETE)
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(177))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif d<2 then
call SetUnitAnimationByIndex(ETE,1)
else
if d<AQD then
set S_8=BM7
set T48=BN7
else
set S_8=PPD+AQD*Cos(a)
set T48=PQD+AQD*Sin(a)
endif
call SetUnitX(ETE,S_8)
call SetUnitY(ETE,T48)
endif
set t=null
set Z77=null
set ETE=null
return false
endfunction
function VHH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real a=YI7(GetUnitX(Z77),GetUnitY(Z77),GetSpellTargetX(),GetSpellTargetY())*bj_DEGTORAD
local integer W57=GetHandleId(Z77)
local integer VEH=(LoadInteger(R8,(W57),(746)))
local integer ML8=GetUnitAbilityLevel(Z77,'A2JK')
local unit VFH=(LoadUnitHandle(R8,(W57),(1450+1)))
local unit VIH=CreateUnit(GetOwningPlayer(Z77),'h0E8',GetUnitX(Z77),GetUnitY(Z77),a*bj_RADTODEG)
local trigger t
local integer i=1
set VEH=VEH+1
call SaveUnitHandle(R8,(W57),(1450+VEH),(VIH))
call SaveInteger(R8,(W57),(746),(VEH))
set t=CreateTrigger()
set W57=GetHandleId(t)
call SetUnitVertexColor(VIH,255,255,255,75)
call SetUnitTimeScale(VIH,2)
call SetUnitAnimationByIndex(VIH,0)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function VGH))
call TriggerRegisterDeathEvent(t,VIH)
call UnitApplyTimedLife(VIH,'BTLF',45)
call SaveEffectHandle(R8,(W57),(175),(AddSpecialEffectTarget("war3mapImported\\Phoenix_Missile_smaller.mdx",VIH,"hand right alternate")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget("war3mapImported\\Phoenix_Missile_smaller.mdx",VIH,"hand left alternate")))
call SaveEffectHandle(R8,(W57),(177),(AddSpecialEffectTarget("war3mapImported\\FlameDash_Ground.mdx",VIH,"origin")))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(19),(VIH))
call SaveReal(R8,(W57),(47),((GetSpellTargetX())*1.))
call SaveReal(R8,(W57),(48),((GetSpellTargetY())*1.))
set Z77=null
set t=null
set VFH=null
set VIH=null
endfunction
function VJH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local integer YLE=(LoadInteger(R8,(GetHandleId(Z77)),(747)))
if YLE>0 then
call VHH()
call UnitRemoveAbility(Z77,IP7[YLE])
set YLE=YLE-1
call SaveInteger(R8,(GetHandleId(Z77)),(747),(YLE))
call AddPermanentAbility(Z77,IP7[YLE])
else
call ShowWarningToPlayer(GetOwningPlayer(GetTriggerUnit()),"No more charges")
endif
set Z77=null
endfunction
function VKH takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='h0E8'
endfunction
function VMH takes nothing returns nothing
local real LW7=Z87(GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),IK7,IM7)
if LW7>IN7 and O18(GetEnumUnit())==false then
set IO7=GetEnumUnit()
set IN7=LW7
endif
endfunction
function VNH takes unit Z77,real x,real y returns unit
local group g=OG8()
set IO7=null
set IN7=-1
set IK7=x
set IM7=y
call GroupEnumUnitsOfPlayer(g,GetOwningPlayer(Z77),Condition(function VKH))
call ForGroup(g,function VMH)
call OF8(g)
set g=null
return IO7
endfunction
function FireRemnant_FindTargetClosest takes nothing returns nothing
local real LW7=Z87(GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),IK7,IM7)
if LW7<IN7 and O18(GetEnumUnit())==false then
set IO7=GetEnumUnit()
set IN7=LW7
endif
endfunction
function VOH takes unit u1,unit u2 returns real
local real UFD=Z47(u1,u2)
local real RF8=UFD/ 1300.
if RF8>.4 then
return UFD/ .4
endif
return 1300.
endfunction
function VPH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real GJF=(LoadReal(R8,(W57),(47)))
local real GKF=(LoadReal(R8,(W57),(48)))
local unit ETE=(LoadUnitHandle(R8,(W57),(19)))
local real PPD=GetUnitX(Z77)
local real PQD=GetUnitY(Z77)
local real BM7=(LoadReal(R8,(W57),(6)))
local real BN7=(LoadReal(R8,(W57),(7)))
local real a
local real S_8
local real T48
local real d
local real VQH=(LoadReal(R8,(W57),(44)))
local real AQD=VQH*.02
local group g
local integer C77=(LoadInteger(R8,(W57),(34)))
if ETE!=null then
set BM7=GetUnitX(ETE)
set BN7=GetUnitY(ETE)
call SaveReal(R8,(W57),(6),((BM7)*1.))
call SaveReal(R8,(W57),(7),((BN7)*1.))
endif
set a=YI7(PPD,PQD,BM7,BN7)*bj_DEGTORAD
set d=Z87(PPD,PQD,BM7,BN7)
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call SaveInteger(R8,(GetHandleId((Z77))),((4319)),(2))
call SetUnitVertexColor(Z77,255,255,255,255)
call SetUnitTimeScale(Z77,1)
call SetUnitAnimationByIndex(Z77,0)
call SetUnitPathing(Z77,true)
call SetUnitInvulnerable(Z77,false)
call UnitRemoveAbility(Z77,'A04R')
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(177))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif d<AQD then
call SetUnitX(Z77,BM7)
call SetUnitY(Z77,BN7)
call KillTrees(BM7,BN7,150)
call V8H(Z77,ETE,BM7,BN7)
set ETE=VNH(Z77,GJF,GKF)
if ETE==null then
call SaveInteger(R8,(GetHandleId((Z77))),((4319)),(2))
call KillTrees(BM7,BN7,'d')
call SetUnitVertexColor(Z77,255,255,255,255)
call SetUnitTimeScale(Z77,1)
call SetUnitAnimationByIndex(Z77,1)
call SetUnitPathing(Z77,true)
call SetUnitInvulnerable(Z77,false)
call UnitRemoveAbility(Z77,'A04R')
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(177))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
call SaveInteger(R8,(W57),(34),(C77+1))
call SaveUnitHandle(R8,(W57),(19),(ETE))
call SaveReal(R8,(W57),(44),((VOH(Z77,ETE))*1.))
call SaveReal(R8,(W57),(6),((GetUnitX(ETE))*1.))
call SaveReal(R8,(W57),(7),((GetUnitY(ETE))*1.))
endif
else
call SetUnitAnimationByIndex(Z77,0)
call SetUnitPathing(Z77,false)
set S_8=PPD+AQD*Cos(a)
set T48=PQD+AQD*Sin(a)
call SetUnitX(Z77,S_8)
call SetUnitY(Z77,T48)
call KillTrees(S_8,T48,'d')
call SetUnitFacing(Z77,a*bj_RADTODEG)
endif
call U5H(Z77,C77,GetUnitX(Z77),GetUnitY(Z77))
set t=null
set Z77=null
set ETE=null
return false
endfunction
function VRH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call SetUnitState(Z77,UNIT_STATE_MANA,GetUnitState(Z77,UNIT_STATE_MANA)+150)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function VSH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t
local integer W57=GetHandleId(Z77)
local integer VEH=(LoadInteger(R8,(W57),(746)))
local unit ETE
if VEH>0 and((LoadInteger(R8,(GetHandleId((Z77))),((4319))))==1)==false then
set t=CreateTrigger()
set W57=GetHandleId(t)
call SetUnitVertexColor(Z77,255,0,0,75)
call SetUnitTimeScale(Z77,2)
call SetUnitAnimationByIndex(Z77,0)
call SetUnitPathing(Z77,false)
call SetUnitInvulnerable(Z77,true)
call AddPermanentAbility(Z77,'A04R')
call SaveInteger(R8,(GetHandleId((Z77))),((4319)),(1))
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function VPH))
call TriggerRegisterDeathEvent(t,Z77)
call SaveEffectHandle(R8,(W57),(175),(AddSpecialEffectTarget("war3mapImported\\Phoenix_Missile_smaller.mdx",Z77,"hand right alternate")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget("war3mapImported\\Phoenix_Missile_smaller.mdx",Z77,"hand left alternate")))
call SaveEffectHandle(R8,(W57),(177),(AddSpecialEffectTarget("war3mapImported\\FlameDash_Ground.mdx",Z77,"origin")))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(47),((GetSpellTargetX())*1.))
call SaveReal(R8,(W57),(48),((GetSpellTargetY())*1.))
set ETE=VNH(Z77,GetSpellTargetX(),GetSpellTargetY())
call SaveUnitHandle(R8,(W57),(19),(ETE))
call SaveReal(R8,(W57),(44),((VOH(Z77,ETE))*1.))
call SaveReal(R8,(W57),(6),((GetUnitX(ETE))*1.))
call SaveReal(R8,(W57),(7),((GetUnitY(ETE))*1.))
call SaveInteger(R8,(W57),(34),(1))
else
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.0,false)
call TriggerAddCondition(t,Condition(function VRH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
endif
set t=null
set Z77=null
set ETE=null
endfunction
function VTH takes nothing returns boolean
if GetSpellAbilityId()==IP7[0]or GetSpellAbilityId()==IP7[1]or GetSpellAbilityId()==IP7[2]or GetSpellAbilityId()==IP7[3]then
call VJH()
elseif GetSpellAbilityId()=='A2JL' then
call VSH()
endif
return false
endfunction
function VUH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer YLE=(LoadInteger(R8,(GetHandleId(Z77)),(747)))
local integer C77=(LoadInteger(R8,(W57),(34)))
if YLE<3 then
set C77=C77-1
call SaveInteger(R8,(W57),(34),(C77))
if C77==0 then
call UnitRemoveAbility(Z77,IP7[YLE])
set C77=35
call SaveInteger(R8,(W57),(34),(C77))
set YLE=YLE+1
call SaveInteger(R8,(GetHandleId(Z77)),(747),(YLE))
call AddPermanentAbility(Z77,IP7[YLE])
endif
endif
set t=null
set Z77=null
return false
endfunction
function VVH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SaveInteger(R8,(GetHandleId(Z77)),(747),(3))
call AddPermanentAbility(Z77,IP7[3])
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function VUH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveInteger(R8,(W57),(34),(30))
set Z77=null
set t=null
endfunction
function VWH takes nothing returns boolean
if GetLearnedSkill()=='A2JK' and IsUnitIllusion(GetTriggerUnit())==false then
call AddPermanentAbility(GetTriggerUnit(),'A2JL')
call SetUnitAbilityLevel(GetTriggerUnit(),'A2JL',GetUnitAbilityLevel(GetTriggerUnit(),'A2JK'))
if GetUnitAbilityLevel(GetTriggerUnit(),'A2JK')==1 then
call VVH()
call V4H()
endif
endif
return false
endfunction
function H59 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function VTH))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function VWH))
set t=null
set IP7[0]='A2JO'
set IP7[1]='A2JQ'
set IP7[2]='A2JP'
set IP7[3]='A2JR'
endfunction
function VXH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamage()>2 and IQ7 then
set IQ7=false
call Dmg(GetEventDamageSource(),X77,3,GetEventDamage()*.25)
set IQ7=true
endif
else
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function VYH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
local integer ML8=GetUnitAbilityLevel(Z77,'A2A8')
set IQ7=true
call UnitAddAbility(AC7,'A2A7')
call SetUnitAbilityLevel(AC7,'A2A7',ML8)
call IssueTargetOrderById(AC7,852668,X77)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterDeathEvent(t,X77)
call TriggerRegisterTimerEvent(t,2+ML8,false)
call TriggerAddCondition(t,Condition(function VXH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
set Z77=null
set X77=null
set t=null
endfunction
function VZH takes nothing returns boolean
if GetSpellAbilityId()=='A2A8' then
call VYH()
endif
return false
endfunction
function Register_ArcaneSeal takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function VZH))
set t=null
endfunction
function VAH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local real a=(LoadReal(R8,(W57),(137)))
local real d=(LoadReal(R8,(W57),(138)))
local real x=PQ8(GetUnitX(X77)+d/ 10*Cos(a))
local real y=PS8(GetUnitY(X77)+d/ 10*Sin(a))
if GetTriggerEvalCount(t)==11 or GetTriggerEventId()==EVENT_UNIT_DEATH then
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
call DestroyEffect(AddSpecialEffect("war3mapImported\\ThrustMovement.mdx",x,y))
call KillTrees(x,y,150)
call SetUnitX(X77,x)
call SetUnitY(X77,y)
endif
set X77=null
set t=null
return false
endfunction
function VBH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local integer ML8=GetUnitAbilityLevel(Z77,'A2A9')
local real a
local real x
local real y
local real d
local integer i=-1
local boolean ZJE=false
if Z77==X77 then
set a=GetUnitFacing(Z77)*bj_DEGTORAD
else
set a=YH7(Z77,X77)*bj_DEGTORAD
endif
loop
exitwhen ZJE or i==23
set i=i+1
set x=PQ8(GetUnitX(X77)+(350-i*25)*Cos(a))
set y=PS8(GetUnitY(X77)+(350-i*25)*Sin(a))
if(IsPointInRegion(IF4,((x)*1.),((y)*1.)))==false then
set ZJE=true
endif
endloop
set d=Z87(x,y,GetUnitX(X77),GetUnitY(X77))
call TriggerRegisterTimerEvent(t,.03,true)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function VAH))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveReal(R8,(W57),(137),((a)*1.))
call SaveReal(R8,(W57),(138),((d)*1.))
if IsUnitAlly(Z77,GetOwningPlayer(X77))then
call SetUnitState(X77,UNIT_STATE_LIFE,GetUnitState(X77,UNIT_STATE_LIFE)+50+50*ML8)
else
call Dmg(Z77,X77,3,50+50*ML8)
endif
set Z77=null
set X77=null
set t=null
endfunction
function VCH takes nothing returns boolean
if GetSpellAbilityId()=='A2A9' then
call VBH()
endif
return false
endfunction
function Register_Thrust takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function VCH))
set t=null
endfunction
function V3H takes nothing returns nothing
call IssueTargetOrderById(IR7,852106,GetEnumUnit())
call Dmg(GetTriggerUnit(),GetEnumUnit(),1,60*IS7)
endfunction
function V6H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local group g1=OG8()
local group g2=OG8()
local integer ML8=GetUnitAbilityLevel(Z77,'A2A6')
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
set IS7=ML8
set IR7=CreateUnit(GetOwningPlayer(Z77),'e00E',x,y,0)
call UnitAddAbility(IR7,'A2AE')
call SetUnitAbilityLevel(IR7,'A2AE',ML8)
call GroupEnumUnitsInRange(g1,x,y,425,Condition(function UB8))
call GroupEnumUnitsInRange(g2,x,y,825,Condition(function UB8))
call GroupRemoveGroup(g1,g2)
call ForGroup(g2,function V3H)
call OF8(g1)
call OF8(g2)
call DestroyEffect(AddSpecialEffect("war3mapImported\\ConjureForceAoE.mdx",x,y))
set Z77=null
set g1=null
set g2=null
endfunction
function VLH takes nothing returns boolean
if GetSpellAbilityId()=='A2A6' then
call V6H()
endif
return false
endfunction
function Register_ConjureForce takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function VLH))
set t=null
endfunction
function V1H takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),IU7)==false then
call GroupAddUnit(IU7,GetEnumUnit())
call Dmg(IT7,GetEnumUnit(),3,IV7)
endif
endfunction
function V0H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local group g=(LoadGroupHandle(R8,(W57),(22)))
local unit S08=(LoadUnitHandle(R8,(W57),(45)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local real CV7=(LoadReal(R8,(W57),(13)))
local real P08=(LoadReal(R8,(W57),(20)))
local group V5H
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x
local real y
if GetTriggerEvalCount(t)>67 then
call OF8(g)
call FlushChildHashtable(R8,(W57))
call EA8(t)
call KillUnit(S08)
else
set x=GetUnitX(S08)
set y=GetUnitY(S08)
set V5H=OG8()
set IU7=g
set H04=S08
set IT7=Z77
set IV7=P08
call GroupEnumUnitsInRange(V5H,x,y,225,Condition(function UV8))
call ForGroup(V5H,function V1H)
call OF8(V5H)
call SetUnitX(S08,PQ8(x+15*Cos(CV7*bj_DEGTORAD)))
call SetUnitY(S08,PS8(y+15*Sin(CV7*bj_DEGTORAD)))
endif
set t=null
set g=null
set V5H=null
set Z77=null
set S08=null
return false
endfunction
function V2H takes unit Z77,real P08,real x,real y returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local group g=OG8()
local real x1=GetUnitX(Z77)
local real y1=GetUnitY(Z77)
local real x2=x
local real y2=y
local real CV7=YI7(x1,y1,x2,y2)
local integer ML8=GetUnitAbilityLevel(Z77,'A2AA')
local unit S08=CreateUnit(GetOwningPlayer(Z77),'h0DI',x1,y1,CV7)
call SetUnitScale(S08,1.5,1.5,1.5)
call SaveUnitHandle(R8,(W57),(45),(S08))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveGroupHandle(R8,(W57),(22),(g))
call SaveReal(R8,(W57),(13),((CV7)*1.))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(20),((P08)*1.))
call TriggerRegisterTimerEvent(t,.015,true)
call TriggerAddCondition(t,Condition(function V0H))
set t=null
set S08=null
set g=null
endfunction
function V_H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local boolean W4H=(LoadBoolean(R8,(W57),(95)))
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2AB',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2AA',true)
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if W4H==false and GetEventDamage()>2 and GetEventDamage()<3000 and IsUnitIllusion(X77)==false then
call SaveReal(R8,(W57),(20),(((LoadReal(R8,(W57),(20)))+GetEventDamage())*1.))
call AddLife(X77,GetEventDamage())
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST then
if GetSpellAbilityId()=='A2AA' then
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call SaveBoolean(R8,(W57),(95),(true))
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A2AB' then
call V2H(Z77,(LoadReal(R8,(W57),(20))),GetSpellTargetX(),GetSpellTargetY())
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2AB',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2AA',true)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
else
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2AB',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2AA',true)
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function W7H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call AddPermanentAbility(Z77,'A2AB')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2AB',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2AA',false)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_ENDCAST)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerRegisterTimerEvent(t,20,false)
call TriggerAddCondition(t,Condition(function V_H))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveBoolean(R8,(W57),(95),(false))
call SaveEffectHandle(R8,(W57),(175),(AddSpecialEffectTarget("war3mapImported\\WispShellBlue_2.mdx",Z77,"origin")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget("war3mapImported\\DivineWrathTarget.mdx",X77,"origin")))
set Z77=null
set X77=null
set t=null
endfunction
function W8H takes nothing returns boolean
if GetSpellAbilityId()=='A2AA' then
call W7H()
endif
return false
endfunction
function Register_DivineWrath takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function W8H))
set t=null
endfunction
function W9H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT or GetSpellAbilityId()=='A2BD' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2BC',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2BD',false)
call UnitRemoveAbility(Z77,'Aetl')
call UnitRemoveAbility(Z77,'A2B3')
call UnitRemoveAbility(Z77,'A2B0')
call UnitRemoveAbility(Z77,'A2B1')
call UnitRemoveAbility(Z77,'A2B2')
call UnitRemoveAbility(Z77,'B0F2')
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
return false
endfunction
function WDH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A2BC')
call TriggerRegisterTimerEvent(t,5,false)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function W9H))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call UnitAddAbility(Z77,'A2BD')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2BC',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2BD',true)
call UnitAddAbility(Z77,'Aetl')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'Aetl',false)
if ML8==1 then
call UnitAddAbility(Z77,'A2B3')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2B3',false)
elseif ML8==2 then
call UnitAddAbility(Z77,'A2B0')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2B0',false)
elseif ML8==3 then
call UnitAddAbility(Z77,'A2B1')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2B1',false)
elseif ML8==4 then
call UnitAddAbility(Z77,'A2B2')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2B2',false)
endif
set t=null
set Z77=null
endfunction
function WEH takes nothing returns boolean
if GetSpellAbilityId()=='A2BC' then
call WDH()
endif
return false
endfunction
function Register_Wraith takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WEH))
set t=null
endfunction
function WFH takes unit Z77,unit OZF,unit X77,integer ML8 returns nothing
call Stun(Z77,X77,1.25+.25*ML8)
call Dmg(Z77,X77,1,40*ML8)
call KillUnit(OZF)
endfunction
function WGH takes nothing returns boolean
if(IsUnitEnemy(H04,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and O18(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or T18(GetFilterUnit())))and(IsUnitVisibleEx(GetFilterUnit(),GetOwningPlayer(H04))or UN8(GetFilterUnit())==false)then
return IsUnitInGroup(GetFilterUnit(),KN7)==false
endif
return false
endfunction
function WHH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local group g
local integer i=1
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local real a=(LoadReal(R8,(W57),(137)))
local unit OZF
local unit X77
local real BM7=(LoadReal(R8,(W57),(47)))
local real BN7=(LoadReal(R8,(W57),(48)))
local group XCD=(LoadGroupHandle(R8,(W57),(187)))
set KN7=XCD
set x=PQ8(x+12*Cos(a))
set y=PS8(y+12*Sin(a))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
if GetTriggerEvalCount(t)>39 then
loop
exitwhen i>3
call KillUnit((LoadUnitHandle(R8,(W57),(393+i-1))))
set i=i+1
endloop
call OF8(XCD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set g=OG8()
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,275,Condition(function WGH))
loop
exitwhen i>3
if(LoadBoolean(R8,(W57),(511+i-1)))==false then
set OZF=(LoadUnitHandle(R8,(W57),(393+i-1)))
set x=(LoadReal(R8,(W57),(549+i-1)))
set y=(LoadReal(R8,(W57),(567+i-1)))
set x=PQ8(x+12*Cos(a))
set y=PS8(y+12*Sin(a))
call SaveReal(R8,(W57),(549+i-1),((x)*1.))
call SaveReal(R8,(W57),(567+i-1),((y)*1.))
call SetUnitX(OZF,x)
call SetUnitY(OZF,y)
set X77=GroupPickRandomUnit(g)
if X77!=null then
call GroupRemoveUnit(g,X77)
call SaveInteger(R8,(GetHandleId((X77))),((4314)),(1))
call SaveBoolean(R8,(W57),(511+i-1),(true))
call WFH(Z77,OZF,X77,GetUnitAbilityLevel(Z77,'A2B4'))
endif
endif
set i=i+1
endloop
call OF8(g)
set g=null
set OZF=null
set X77=null
endif
set t=null
set Z77=null
return false
endfunction
function WIH takes nothing returns nothing
local real BM7=GetSpellTargetX()
local real BN7=GetSpellTargetY()
local unit Z77=GetTriggerUnit()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local real a=YI7(x,y,BM7,BN7)*bj_DEGTORAD
local real b
local unit AC7
local real S_8=PQ8(x+500*Cos(a))
local real T48=PS8(y+500*Sin(a))
local integer i=0
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local real KQD
local integer ML8=GetUnitAbilityLevel(Z77,'A2B4')
local integer MB8='h0DN'
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 AC7=CreateUnit(GetOwningPlayer(Z77),MB8,x+'d'*Cos(a)+'d'*Cos(b),y+'d'*Sin(a)+'d'*Sin(b),a*bj_RADTODEG)
call SaveUnitHandle(R8,(W57),(393+i-1),(AC7))
call SaveBoolean(R8,(W57),(511+i-1),(false))
call SaveReal(R8,(W57),(549+i-1),((GetUnitX(AC7))*1.))
call SaveReal(R8,(W57),(567+i-1),((GetUnitY(AC7))*1.))
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 AC7=CreateUnit(GetOwningPlayer(Z77),MB8,x+'d'*Cos(a)+'d'*Cos(b),y+'d'*Sin(a)+'d'*Sin(b),a*bj_RADTODEG)
call SaveUnitHandle(R8,(W57),(393+i-1),(AC7))
call SaveBoolean(R8,(W57),(511+i-1),(false))
call SaveReal(R8,(W57),(549+i-1),((GetUnitX(AC7))*1.))
call SaveReal(R8,(W57),(567+i-1),((GetUnitY(AC7))*1.))
set i=i+1
set AC7=CreateUnit(GetOwningPlayer(Z77),MB8,x+'d'*Cos(a),y+'d'*Sin(a),a*bj_RADTODEG)
call SaveUnitHandle(R8,(W57),(393+i-1),(AC7))
call SaveBoolean(R8,(W57),(511+i-1),(false))
call SaveReal(R8,(W57),(549+i-1),((GetUnitX(AC7))*1.))
call SaveReal(R8,(W57),(567+i-1),((GetUnitY(AC7))*1.))
call TriggerRegisterTimerEvent(t,.015,true)
call TriggerAddCondition(t,Condition(function WHH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
call SaveReal(R8,(W57),(137),((a)*1.))
call SaveReal(R8,(W57),(47),((S_8)*1.))
call SaveReal(R8,(W57),(48),((T48)*1.))
call SaveGroupHandle(R8,(W57),(187),(OG8()))
set Z77=null
set AC7=null
set t=null
endfunction
function WJH takes nothing returns boolean
if GetSpellAbilityId()=='A2B4' then
call WIH()
endif
return false
endfunction
function IV9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WJH))
set t=null
endfunction
function WKH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer C77=GetTriggerEvalCount(t)
local integer ML8=GetUnitAbilityLevel(Z77,'A2B5')
if C77==6 then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitShareVision(X77,GetOwningPlayer(Z77),false)
endif
call Dmg(Z77,X77,1,20+10*ML8)
set t=null
set Z77=null
set X77=null
return false
endfunction
function WMH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function WKH))
call SaveUnitHandle(R8,(W57),(2),(GetTriggerUnit()))
call SaveUnitHandle(R8,(W57),(17),(GetEnumUnit()))
call SaveEffectHandle(R8,(W57),(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 WNH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local group g=OG8()
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
call UnitAddAbility(AC7,'A2B7')
call IssueImmediateOrderById(AC7,852625)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",GetUnitX(Z77),GetUnitY(Z77)))
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),625,Condition(function UB8))
call ForGroup(g,function WMH)
call OF8(g)
set g=null
set Z77=null
set AC7=null
endfunction
function WOH takes nothing returns boolean
if GetSpellAbilityId()=='A2B5' then
call WNH()
endif
return false
endfunction
function Register_Miasma takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WOH))
set t=null
endfunction
function GetTotalMinutes takes nothing returns integer
return R2I((TimerGetElapsed(E4))/ 60)
endfunction
function WPH takes unit Z77,integer WQD returns nothing
local integer ARD=GetHeroAgi(Z77,false)
local integer ASD=GetHeroStr(Z77,false)
local integer WQH=GetHeroInt(Z77,false)
call SetHeroAgi(Z77,ARD-WQD,true)
call SetHeroStr(Z77,ASD-WQD,true)
call SetHeroInt(Z77,WQH-WQD,true)
endfunction
function WRH takes unit Z77,integer WQD returns nothing
local integer ARD=GetHeroAgi(Z77,false)
local integer ASD=GetHeroStr(Z77,false)
local integer WQH=GetHeroInt(Z77,false)
call SetHeroAgi(Z77,ARD+WQD,true)
call SetHeroStr(Z77,ASD+WQD,true)
call SetHeroInt(Z77,WQH+WQD,true)
endfunction
function WSH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer WTH=(LoadInteger(R8,(W57),(744)))
local integer ML8=GetUnitAbilityLevel(Z77,'A2G2')
local integer S59=(R2I((TimerGetElapsed(E4))/ 60))
local real WUH=ML8+1+(.1+.1*ML8)*S59
local integer WVH=3+3*ML8+R2I((.1+.1*ML8)*S59)
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A2G2' then
if X77!=null and X77!=GetSpellTargetUnit()then
call UnitRemoveAbility(X77,'A2IO')
call WPH(X77,WTH)
call WPH(Z77,WTH)
call SaveInteger(R8,(W57),(744),(0))
endif
set X77=GetSpellTargetUnit()
call SaveUnitHandle(R8,(W57),(17),(X77))
call AddPermanentAbility(X77,'A2IO')
call QG8("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkZapTarget.mdl",Z77,"chest",1.9)
call QG8("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkZapTarget.mdl",X77,"chest",1.9)
return false
else
return false
endif
endif
if X77==null then
elseif O18(X77)or O18(Z77)or Z47(Z77,X77)>1400 then
call WPH(Z77,WTH)
call WPH(X77,WTH)
call SaveInteger(R8,(W57),(744),(0))
call UnitRemoveAbility(Z77,'A2IO')
call UnitRemoveAbility(X77,'A2IO')
else
if GetUnitAbilityLevel(Z77,'A2IO')==0 then
call AddPermanentAbility(Z77,'A2IO')
endif
if GetUnitAbilityLevel(X77,'A2IO')==0 then
call AddPermanentAbility(X77,'A2IO')
endif
if WTH!=WVH then
call WRH(Z77,WVH-WTH)
call WRH(X77,WVH-WTH)
call SaveInteger(R8,(W57),(744),(WVH))
endif
call SetUnitState(Z77,UNIT_STATE_LIFE,GetUnitState(Z77,UNIT_STATE_LIFE)+WUH)
call SetUnitState(X77,UNIT_STATE_LIFE,GetUnitState(X77,UNIT_STATE_LIFE)+WUH)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function WWH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WSH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(null))
call SaveInteger(R8,(W57),(744),(0))
set t=null
set Z77=null
endfunction
function WXH takes nothing returns boolean
if GetLearnedSkill()=='A2G2' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A2G2')==1 then
call WWH()
endif
return false
endfunction
function Register_Brotherhood takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function WXH))
set t=null
endfunction
function WYH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED or(GetEventDamage()>30 and GetEventDamageSource()!=GetTriggerUnit()and IsPlayer(GetOwningPlayer(GetEventDamageSource())))then
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
call AddLife(Z77,GetEventDamage())
endif
call UnitRemoveAbility(Z77,'A2IL')
call UnitRemoveAbility(Z77,'A2IM')
call UnitRemoveAbility(Z77,'A2BY')
call UnitRemoveAbility(Z77,'A2IN')
call UnitRemoveAbility(Z77,'B0F4')
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
return false
endfunction
function WZH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetEnumUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A2BV')
local real d
local integer id
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
if ML8==1 then
set d=4
set id='A2IL'
elseif ML8==2 then
set d=5
set id='A2IM'
elseif ML8==3 then
set d=6
set id='A2BY'
elseif ML8==4 then
set d=7
set id='A2IN'
endif
call AddPermanentAbility(X77,id)
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),id,false)
call TriggerAddCondition(t,Condition(function WYH))
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterDeathEvent(t,X77)
call TriggerRegisterTimerEvent(t,d,false)
call SaveUnitHandle(R8,(W57),(2),(X77))
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIsp\\SpeedTarget.mdl",X77,"origin")))
set Z77=null
set X77=null
set t=null
endfunction
function WAH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local group g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),375,Condition(function VI8))
call ForGroup(g,function WZH)
call OF8(g)
set g=null
set Z77=null
endfunction
function WBH takes nothing returns boolean
if GetSpellAbilityId()=='A2BV' then
call WAH()
endif
return false
endfunction
function Register_Gallop takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function WBH))
endfunction
function WCH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer W3H=(LoadInteger(R8,(W57),(59)))
if GetTriggerEventId()==EVENT_UNIT_DAMAGED and GetEventDamageSource()!=Z77 then
set t=null
set Z77=null
return false
endif
if LoadTriggerHandle(R8,GetHandleId(Z77),'a2ey')==t then
call UnitRemoveAbility(Z77,W3H)
call UnitRemoveAbility(Z77,'B0FJ')
call UnitRemoveAbility(Z77,'B0FK')
call RemoveSavedHandle(R8,GetHandleId(Z77),'a2ey')
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function W6H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X47=GetAttacker()
local integer ML8=GetUnitAbilityLevel(Z77,'A2EY')
local integer id
if Z77==GetTriggerUnit()and Ran()<(14+2*ML8)and LState(Z77,"4316")==false and IsUnitAlly(Z77,GetOwningPlayer(X47))==false then
call AddTimedBoolBuff(Z77,"4316",0.9)
if ML8==1 then
set id='A2GD'
elseif ML8==2 then
set id='A2GE'
elseif ML8==3 then
set id='A2GF'
elseif ML8==4 then
set id='A2GC'
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),id,false)
call AddPermanentAbility(Z77,id)
set t=CreateTrigger()
call SaveTriggerHandle(R8,GetHandleId(Z77),'a2ey',t)
set W57=GetHandleId(t)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerRegisterUnitEvent(t,X47,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,1,false)
call TriggerAddCondition(t,Condition(function WCH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveInteger(R8,(W57),(59),(id))
endif
set t=null
set Z77=null
set X47=null
return false
endfunction
function WLH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function W6H))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set Z77=null
set t=null
endfunction
function W1H takes nothing returns boolean
if GetLearnedSkill()=='A2EY' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A2EY')==1 then
call WLH()
endif
return false
endfunction
function I49 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function W1H))
set t=null
endfunction
function W0H 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 QNE
if d<1 then
call UnitRemoveAbility(u,IW7[0])
call UnitRemoveAbility(u,IW7[1])
call UnitRemoveAbility(u,IW7[2])
call UnitRemoveAbility(u,IW7[3])
call UnitRemoveAbility(u,IW7[4])
call UnitRemoveAbility(u,IW7[5])
call UnitRemoveAbility(u,IW7[6])
call UnitRemoveAbility(u,IW7[7])
call UnitRemoveAbility(u,IW7[8])
call UnitRemoveAbility(u,IW7[9])
call UnitRemoveAbility(u,IW7[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 QNE=10
set i=0
loop
exitwhen i>QNE
if b[i]==1 then
call AddPermanentAbility(u,IW7[i])
else
call UnitRemoveAbility(u,IW7[i])
endif
set i=i+1
endloop
endfunction
function W5H takes unit Z77,integer ML8,unit X77 returns nothing
local integer W57=GetHandleId(Z77)
local integer W2H=(LoadInteger(R8,(W57),(739)))
if IsUnitType(X77,UNIT_TYPE_HERO)then
set W2H=W2H+6+4*ML8
call SaveInteger(R8,(W57),(739),(W2H))
call QM8(GetUnitName(Z77)+" Won The Duel!!",5,Z77,.03,255,0,0,255)
call W0H(Z77,W2H)
endif
endfunction
function W_H takes unit u returns boolean
return GetUnitAbilityLevel(u,'Bcyc')==0 or NH8(u)==false
endfunction
function X4H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local real PX9=(LoadReal(R8,(W57),(442)))
local unit AC7
if GetTriggerEvalCount(t)==1 then
set AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
call UnitAddAbility(AC7,'A2G5')
call IssueTargetOrderById(AC7,852583,X77)
set AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
call UnitAddAbility(AC7,'A2G5')
call IssueTargetOrderById(AC7,852583,Z77)
set AC7=null
endif
if GetTriggerEventId()==EVENT_WIDGET_DEATH or PX9<(TimerGetElapsed(E4))or W_H(Z77)==false or W_H(X77)==false then
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
if GetTriggerUnit()==Z77 then
call W5H(X77,ML8,GetTriggerUnit())
else
call W5H(Z77,ML8,GetTriggerUnit())
endif
endif
call UnitRemoveAbility(Z77,'B0FG')
call UnitRemoveAbility(X77,'B0FG')
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
call SetUnitPathing(Z77,true)
call SetUnitPathing(X77,true)
elseif GetIssuedOrderId()!=851973 then
call SetUnitPathing(Z77,false)
call SetUnitPathing(X77,false)
call UnitRemoveAbility(Z77,'Abun')
call UnitRemoveAbility(X77,'Abun')
call DisableTrigger(t)
call IssueTargetOrderById(Z77,851983,X77)
call IssueTargetOrderById(X77,851983,Z77)
call EnableTrigger(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function X7H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A2CI')
local trigger t
local integer W57
call SetUnitPathing(Z77,false)
call SetUnitPathing(X77,false)
call IssueTargetOrderById(Z77,851983,X77)
call IssueTargetOrderById(X77,851983,Z77)
set t=CreateTrigger()
set W57=GetHandleId(t)
call SaveEffectHandle(R8,(W57),(175),(AddSpecialEffectTarget("war3mapImported\\DuelFX.mdx",Z77,"overhead")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget("war3mapImported\\DuelFX.mdx",X77,"overhead")))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveReal(R8,(W57),(442),(((TimerGetElapsed(E4))+.75*ML8+3.25)*1.))
call TriggerAddCondition(t,Condition(function X4H))
call TriggerRegisterTimerEvent(t,.05,true)
call TriggerRegisterTimerEvent(t,.01,false)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerRegisterDeathEvent(t,X77)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_ISSUED_ORDER)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_ISSUED_ORDER)
set Z77=null
set X77=null
set t=null
endfunction
function X8H takes nothing returns boolean
if GetSpellAbilityId()=='A2CI' and HasLinkin(GetSpellTargetUnit())==false then
call X7H()
endif
return false
endfunction
function I89 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function X8H))
set t=null
set IW7[0]='A2GK'
set IW7[1]='A2GJ'
set IW7[2]='A2GI'
set IW7[3]='A2GH'
set IW7[4]='A2GN'
set IW7[5]='A2GO'
set IW7[6]='A2GM'
set IW7[7]='A2GL'
set IW7[8]='A2GP'
set IW7[9]='AZ1S'
set IW7[10]='AZ1T'
endfunction
function X9H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local integer C77=(LoadInteger(R8,(W57),(34)))
local real d
local unit X47
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
set d=GetEventDamage()
if W18(d)and d>50 then
set C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
set X47=GetEventDamageSource()
if IsUnitType(X47,UNIT_TYPE_HERO)==false and GetUnitAbilityLevel(X47,'A04R')!=0 then
set X47=Y7[GetPlayerId(GetOwningPlayer(X47))]
endif
call AddLife(Z77,d)
set d=d*(.4+.2*ML8)
if IsUnitAlly(X77,GetOwningPlayer(Z77))then
call SetUnitState(X77,UNIT_STATE_LIFE,GetUnitState(X77,UNIT_STATE_LIFE)+d)
else
call Dmg(Z77,X77,3,d)
endif
endif
endif
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED or C77==3 then
call DestroyEffect((LoadEffectHandle(R8,(W57),(175))))
call DestroyEffect((LoadEffectHandle(R8,(W57),(176))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function XDH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A2IQ')
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call QG8("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkZapTarget.mdl",Z77,"chest",1.9)
call QG8("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkZapTarget.mdl",X77,"chest",1.9)
call SaveEffectHandle(R8,(W57),(175),(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkTarget.mdl",Z77,"chest")))
call SaveEffectHandle(R8,(W57),(176),(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkTarget.mdl",X77,"chest")))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveInteger(R8,(W57),(34),(0))
call TriggerAddCondition(t,Condition(function X9H))
call TriggerRegisterTimerEvent(t,10,false)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_DAMAGED)
set Z77=null
set X77=null
set t=null
endfunction
function XEH takes nothing returns boolean
if GetSpellAbilityId()=='A2IQ' then
call XDH()
endif
return false
endfunction
function Register_Deflection takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function XEH))
set t=null
endfunction
function XFH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=(LoadInteger(R8,(W57),(5)))
local integer C77=(LoadInteger(R8,(W57),(34)))
local integer VID=5
set C77=C77+1
call SaveInteger(R8,(W57),(34),(C77))
if GetTriggerEventId()==EVENT_WIDGET_DEATH or C77>VID then
call UnitRemoveAbility(X77,IX7[ML8])
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
call SetUnitState(X77,UNIT_STATE_LIFE,GetUnitState(X77,UNIT_STATE_LIFE)+20+10*ML8)
call QG8("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkZapTarget.mdl",X77,"chest",1.9)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function XGH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A2J2')
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TF9(X77)
call T99(X77,0,0)
call AddPermanentAbility(X77,IX7[ML8])
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),IX7[ML8],false)
call SaveEffectHandle(R8,(W57),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Human\\InnerFire\\InnerFireTarget.mdl",X77,"overhead")))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveInteger(R8,(W57),(34),(0))
call TriggerAddCondition(t,Condition(function XFH))
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterDeathEvent(t,X77)
call TriggerEvaluate(t)
set Z77=null
set X77=null
set t=null
endfunction
function XHH takes nothing returns boolean
if GetSpellAbilityId()=='A2J2' then
call XGH()
endif
return false
endfunction
function H_9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function XHH))
set IX7[1]='A2J9'
set IX7[2]='A2JA'
set IX7[3]='A2J8'
set IX7[4]='A2J7'
set t=null
endfunction
function XIH takes unit Z77,integer ML8 returns nothing
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',GetUnitX(Z77),GetUnitY(Z77),0)
call AddPermanentAbility(AC7,'A2JC')
call SetUnitAbilityLevel(AC7,'A2JC',ML8/ 3)
call IssueTargetOrderById(AC7,852101,Z77)
set AC7=null
endfunction
function XJH takes nothing returns nothing
if IsUnitType(GetEnumUnit(),UNIT_TYPE_SUMMONED)or IsUnitIllusion(GetEnumUnit())then
call Dmg(GetTriggerUnit(),GetEnumUnit(),1,GetUnitState(GetEnumUnit(),UNIT_STATE_MAX_LIFE)*.25)
endif
call Dmg(GetTriggerUnit(),GetEnumUnit(),1,20+40*IA7+10*IY7+15*IZ7*IA7+5*IZ7)
endfunction
function XKH takes nothing returns nothing
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)then
set IZ7=IZ7+1
else
set IY7=IY7+1
endif
endfunction
function XMH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local integer ML8=GetUnitAbilityLevel(Z77,'A2JB')
local group g=OG8()
call DestroyEffect(AddSpecialEffect("war3mapImported\\OverwhelmingOdds.mdx",x,y))
call GroupEnumUnitsInRange(g,x,y,330+25,Condition(function UB8))
set IY7=0
set IZ7=0
set IA7=ML8
call ForGroup(g,function XKH)
call ForGroup(g,function XJH)
call OF8(g)
call XIH(Z77,9*IZ7+3*IY7)
set Z77=null
set g=null
endfunction
function XNH takes nothing returns boolean
if GetSpellAbilityId()=='A2JB' then
call XMH()
endif
return false
endfunction
function I79 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function XNH))
call PU8('A2JC')
set t=null
endfunction
function XOH takes nothing returns nothing
set I67=true
call Dmg(IB7,GetEnumUnit(),1,((200+400*I37)/ IC7)/ 20)
set I67=false
endfunction
function XPH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real x=(LoadReal(R8,(W57),(6)))
local real y=(LoadReal(R8,(W57),(7)))
local group g
if GetTriggerEvalCount(t)>20 then
call DestroyEffect((LoadEffectHandle(R8,(W57),(32))))
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
set g=OG8()
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,170+25,Condition(function VE8))
set I37=GetUnitAbilityLevel(Z77,'A2BG')+GetUnitAbilityLevel(Z77,'AZ11')
set IB7=Z77
set IC7=CountUnitsInGroup(g)
call ForGroup(g,function XOH)
call OF8(g)
set g=null
endif
set t=null
set Z77=null
return false
endfunction
function XQH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local string s="war3mapImported\\DivineWrathTarget.mdx"
local location l=GetSpellTargetLoc()
call PlaySoundAtPointBJ(JP7,'d',l,0)
call RemoveLocation(l)
set l=null
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function XPH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
call DestroyEffect(AddSpecialEffect(s,x,y))
set t=null
set Z77=null
endfunction
function XRH takes nothing returns boolean
if GetSpellAbilityId()=='A2BG' or GetSpellAbilityId()=='AZ11' then
call XQH()
endif
return false
endfunction
function ID9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function XRH))
set t=null
set JP7=CreateSound("Abilities\\Spells\\Demon\\RainOfFire\\RainOfFireTarget2.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(JP7,"StarfallTarget")
call SetSoundDuration(JP7,3000)
endfunction
function XSH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,'A2BT')
local real d
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
set d=GetEventDamage()*(.2+.05*ML8)
else
call SaveInteger(R8,(GetHandleId((X77))),((4317)),(2))
call UnitRemoveAbility(X77,'A2I6')
call UnitRemoveAbility(X77,'A2I5')
call UnitRemoveAbility(X77,'A2I7')
call UnitRemoveAbility(X77,'A2I8')
call UnitRemoveAbility(X77,'B0FS')
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function XTH takes unit Z77,unit X77 returns nothing
local trigger t
local integer W57
local integer ML8=GetUnitAbilityLevel(Z77,'A2BT')
local unit LastTarget=(LoadUnitHandle(R8,(GetHandleId(Z77)),(741)))
local integer C77=(LoadInteger(R8,(GetHandleId(X77)),(742)))
local integer id
if((LoadInteger(R8,(GetHandleId((X77))),((4317))))==1)then
call SaveInteger(R8,(GetHandleId(X77)),(742),(0))
call SaveReal(R8,(GetHandleId(X77)),(743),(((TimerGetElapsed(E4)))*1.))
else
if(LoadReal(R8,(GetHandleId(X77)),(743)))+10<(TimerGetElapsed(E4))then
set C77=1
else
set C77=C77+1
endif
if IsUnitType(X77,UNIT_TYPE_HERO)or IsUnitIllusion(X77)then
call QN8(GetOwningPlayer(Z77),I2S(C77)+"!",2,X77,.026,50,0,255,216)
endif
call SaveInteger(R8,(GetHandleId(X77)),(742),(C77))
call SaveReal(R8,(GetHandleId(X77)),(743),(((TimerGetElapsed(E4)))*1.))
if C77==4 then
call SaveInteger(R8,(GetHandleId(X77)),(742),(0))
call SaveInteger(R8,(GetHandleId((X77))),((4317)),(1))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.5+.5*ML8,false)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function XSH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
if ML8==1 then
set id='A2I6'
elseif ML8==2 then
set id='A2I5'
elseif ML8==3 then
set id='A2I7'
elseif ML8==4 then
set id='A2I8'
endif
call AddPermanentAbility(X77,id)
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),id,false)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\FarseerMissile_Purple_2.mdx",X77,"chest"))
endif
endif
set t=null
endfunction
function XUH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 then
call DisableTrigger(t)
call XTH(Z77,X77)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
else
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function XVH takes nothing returns nothing
local trigger t=CreateTrigger()
local unit X77=GetTriggerUnit()
local unit Z77=GetAttacker()
local integer W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,1.2,false)
call TriggerAddCondition(t,Condition(function XUH))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set X77=null
set Z77=null
set t=null
endfunction
function XWH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if GetAttacker()==Z77 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(Z77))then
if LState(Z77,"4315")==false then
call AddTimedBoolBuff(Z77,"4315",.3)
call XVH()
endif
endif
set t=null
set Z77=null
return false
endfunction
function XXH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function XWH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=null
set Z77=null
endfunction
function XYH takes nothing returns boolean
if GetLearnedSkill()=='A2BT' and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A2BT')==1 then
call XXH()
endif
return false
endfunction
function Register_Amp takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function XYH))
set t=null
endfunction
function XZH takes nothing returns nothing
local integer W57=GetHandleId(GetTriggeringTrigger())
local unit Z77=H04
local unit X77=H54
local integer ML8=GetUnitAbilityLevel(Z77,'A2BE')
local real P08=40+20*ML8+1.6*GetHeroInt(Z77,true)
set I67=true
call Dmg(Z77,X77,1,P08)
set I67=false
set Z77=null
set X77=null
endfunction
function XAH takes nothing returns nothing
local trigger t=T88(GetTriggerUnit(),GetSpellTargetUnit(),'h0DQ',"XZH",500)
local integer W57=GetHandleId(t)
set t=null
endfunction
function XBH takes nothing returns boolean
if GetSpellAbilityId()=='A2BE' and HasLinkin(GetSpellTargetUnit())==false then
call XAH()
endif
return false
endfunction
function IE9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function XBH))
set t=null
endfunction
function XCH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local real d
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
else
call UnitRemoveAbility(X77,'A2HX')
call UnitRemoveAbility(X77,'A2I0')
call UnitRemoveAbility(X77,'A2HY')
call UnitRemoveAbility(X77,'A2HZ')
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set X77=null
set t=null
return false
endfunction
function X3H takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A2HN')
local real VN7=2+ML8
local integer id='A2HX'
if ML8==1 then
set id='A2HX'
elseif ML8==2 then
set id='A2I0'
elseif ML8==3 then
set id='A2HY'
elseif ML8==4 then
set id='A2HZ'
endif
call AddPermanentAbility(X77,id)
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),id,false)
call TriggerRegisterTimerEvent(t,VN7,false)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function XCH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
set Z77=null
set X77=null
set t=null
endfunction
function X6H takes nothing returns boolean
if GetSpellAbilityId()=='A2HN' and IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_HERO)and HasLinkin(GetSpellTargetUnit())==false then
call X3H()
endif
return false
endfunction
function IF9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function X6H))
set t=null
endfunction
function XLH takes nothing returns nothing
local integer W57=GetHandleId(GetTriggeringTrigger())
local unit Z77=H04
local unit X77=H54
local real x=GetUnitX(X77)
local real y=GetUnitY(X77)
local integer ML8=GetUnitAbilityLevel(Z77,'A2IT')
local unit AC7=CreateUnit(GetOwningPlayer(Z77),'e00E',x,y,0)
call UnitAddAbility(AC7,'A2IU')
call SetUnitAbilityLevel(AC7,'A2IU',ML8)
call IssueImmediateOrderById(AC7,852096)
set Z77=null
set X77=null
set AC7=null
endfunction
function X1H takes unit Z77,group g returns unit
local unit X0H=null
local real d=99999
local unit DMF=FirstOfGroup(g)
call GroupRemoveUnit(g,DMF)
loop
exitwhen DMF==null
if Z47(Z77,DMF)<d then
set d=Z47(Z77,DMF)
set X0H=DMF
endif
set DMF=FirstOfGroup(g)
call GroupRemoveUnit(g,DMF)
endloop
return X0H
endfunction
function X5H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=null
local group g=OG8()
call GroupEnumUnitsInRange(g,GetUnitX(Z77),GetUnitY(Z77),1600+25,Condition(function VD8))
set X77=X1H(Z77,g)
call OF8(g)
if X77!=null then
call T88(Z77,X77,'h0E6',"XLH",800)
endif
set g=null
set X77=null
set Z77=null
endfunction
function X2H takes nothing returns boolean
if GetSpellAbilityId()=='A2IT' then
call X5H()
endif
return false
endfunction
function I99 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function X2H))
set t=null
endfunction
function X_H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer QLF=(LoadInteger(R8,(W57),(422)))
local integer Q1F=(LoadInteger(R8,(W57),(423)))
local integer OAE=(LoadInteger(R8,(W57),(424)))
call SetHeroAgi(X77,GetHeroAgi(X77,false)+QLF,true)
call SetHeroStr(X77,GetHeroStr(X77,false)+Q1F,true)
call SetHeroInt(X77,GetHeroInt(X77,false)+OAE,true)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set X77=null
return false
endfunction
function Y4H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetEnumUnit()
local integer ML8=GetUnitAbilityLevel(Z77,'A2FK')
local trigger t
local integer W57
local integer VWD
local integer QLF
local integer Q1F
local integer OAE
local real AQD
if IsUnitType(X77,UNIT_TYPE_HERO)then
set VWD=N58(X77)
set AQD=.15
if VWD==2 then
set QLF=R2I(AQD*GetHeroAgi(X77,false))-1
set Q1F=0
set OAE=0
elseif VWD==3 then
set QLF=0
set Q1F=R2I(AQD*GetHeroStr(X77,false))-1
set OAE=0
elseif VWD==1 then
set QLF=0
set Q1F=0
set OAE=R2I(AQD*GetHeroInt(X77,false))-1
endif
call SetHeroAgi(X77,GetHeroAgi(X77,false)-QLF,true)
call SetHeroStr(X77,GetHeroStr(X77,false)-Q1F,true)
call SetHeroInt(X77,GetHeroInt(X77,false)-OAE,true)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,7,false)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function X_H))
call SaveInteger(R8,(W57),(422),(QLF))
call SaveInteger(R8,(W57),(424),(OAE))
call SaveInteger(R8,(W57),(423),(Q1F))
call SaveUnitHandle(R8,(W57),(17),(X77))
set t=null
endif
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",X77,"chest"))
call Dmg(Z77,X77,I17,50+50*ML8)
set Z77=null
set X77=null
endfunction
function Y7H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local group g=OG8()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local real a=YI7(GetUnitX(Z77),GetUnitY(Z77),x,y)*bj_DEGTORAD
set x=GetUnitX(Z77)
set y=GetUnitY(Z77)
if KillTrees(x,y,IL7)>0 then
set I17=3
else
set I17=1
endif
call GroupEnumUnitsInRange(g,x,y,IL7+25,Condition(function UB8))
call ForGroup(g,function Y4H)
call OF8(g)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\WhirlingDeath_01.mdx",Z77,"origin"))
set Z77=null
set g=null
endfunction
function Y8H takes nothing returns boolean
if GetSpellAbilityId()=='A2FK' then
call Y7H()
endif
return false
endfunction
function IG9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Y8H))
set t=null
endfunction
function Y9H takes unit Z77,unit X77 returns nothing
local integer ML8=GetUnitAbilityLevel(Z77,'A2E3')
call Dmg(Z77,X77,3,60+40*ML8)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",X77,"origin"))
endfunction
function YDH takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),H24)==false then
call GroupAddUnit(H24,GetEnumUnit())
call Y9H(H04,GetEnumUnit())
endif
endfunction
function YEH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7=(LoadUnitHandle(R8,(W57),(14)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer YFH=(LoadInteger(R8,(W57),(18)))
local integer C77=GetTriggerEvalCount(t)
local unit YGH
local group YHH=(LoadGroupHandle(R8,(W57),(16)))
local group g
local boolean YIH=(LoadBoolean(R8,(W57),(727)))
local boolean YJH=(LoadBoolean(R8,(W57),(740)))
if S69(AM7)then
set YJH=true
call SaveBoolean(R8,(W57),(740),(YJH))
endif
if YIH==false then
set YGH=(LoadUnitHandle(R8,(W57),(700+YFH+1-C77)))
call RemoveUnit(YGH)
else
set YGH=(LoadUnitHandle(R8,(W57),(700+C77)))
if YJH==false then
call SetUnitX(AM7,GetUnitX(YGH))
call SetUnitY(AM7,GetUnitY(YGH))
endif
call RemoveUnit(YGH)
set g=OG8()
set H04=AM7
set H24=YHH
call GroupEnumUnitsInRange(g,GetUnitX(AM7),GetUnitY(AM7),250,Condition(function UT8))
call ForGroup(g,function YDH)
call OF8(g)
endif
if C77==(YFH)then
call KillTrees(GetUnitX(AM7),GetUnitY(AM7),90)
call OF8(YHH)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set AM7=null
set YGH=null
set YHH=null
set g=null
return false
endfunction
function YKH takes nothing returns nothing
if NG8(GetEnumDestructable())and IsDestructableDeadBJ(GetEnumDestructable())==false then
set I07=I07+1
endif
endfunction
function YMH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7=(LoadUnitHandle(R8,(W57),(14)))
local real CV7=(LoadReal(R8,(W57),(13)))
local integer VID=(LoadInteger(R8,(W57),(12)))
local integer C77=GetTriggerEvalCount(t)
local real x=(LoadReal(R8,(W57),(6)))+C77*50*Cos(CV7*bj_DEGTORAD)
local real y=(LoadReal(R8,(W57),(7)))+C77*50*Sin(CV7*bj_DEGTORAD)
local boolean PPE=(LoadBoolean(R8,(W57),(15)))
local unit YNH
local trigger YOH=(LoadTriggerHandle(R8,(W57),(11)))
local integer YPH=GetHandleId(YOH)
local integer ID='u01Q'
local real QFF=250
local rect r
local real d=90
set r=Rect(x-d,y-d,x+d,y+d)
set I07=0
call EnumDestructablesInRect(r,Condition(function KF8),function YKH)
if I07>0 or C77==VID or C77==(VID-1)or C77==(VID-2)then
set ID='u01P'
endif
set YNH=CreateUnit(GetOwningPlayer(AM7),ID,x,y,CV7)
call SaveUnitHandle(R8,(YPH),(700+C77),(YNH))
if I07>0 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call TriggerRegisterTimerEvent(YOH,.5/ VID,true)
call TriggerAddCondition(YOH,Condition(function YEH))
call SaveInteger(R8,(YPH),(18),(C77))
call SaveBoolean(R8,(YPH),(727),(true))
call SaveUnitHandle(R8,(YPH),(14),(AM7))
call SaveGroupHandle(R8,(YPH),(16),(OG8()))
call SaveReal(R8,(YPH),(6),((x)*1.))
call SaveReal(R8,(YPH),(7),((y)*1.))
call SaveBoolean(R8,(YPH),(740),(false))
elseif C77>VID then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call TriggerRegisterTimerEvent(YOH,.5/ VID,true)
call TriggerAddCondition(YOH,Condition(function YEH))
call SaveInteger(R8,(YPH),(18),(C77))
call SaveBoolean(R8,(YPH),(727),(false))
call SaveUnitHandle(R8,(YPH),(14),(AM7))
call SaveGroupHandle(R8,(YPH),(16),(OG8()))
call SaveBoolean(R8,(YPH),(740),(false))
endif
set t=null
set AM7=null
set YNH=null
set YOH=null
return false
endfunction
function YQH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AM7=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real CV7=YI7(GetUnitX(AM7),GetUnitY(AM7),GetLocationX(l),GetLocationY(l))
local integer ML8=GetUnitAbilityLevel(AM7,'A2E3')
local integer YRH
local integer VID
local trigger YSH=CreateTrigger()
set YRH=600+200*ML8
set VID=YRH/ 50
call SaveUnitHandle(R8,(W57),(14),(AM7))
call SaveInteger(R8,(W57),(5),(ML8))
call SaveReal(R8,(W57),(13),((CV7)*1.))
call SaveInteger(R8,(W57),(12),(VID))
call SaveTriggerHandle(R8,(W57),(11),(YSH))
call SaveReal(R8,(W57),(6),((GetUnitX(AM7))*1.))
call SaveReal(R8,(W57),(7),((GetUnitY(AM7))*1.))
call TriggerRegisterTimerEvent(t,.5/ VID,true)
call TriggerAddCondition(t,Condition(function YMH))
call RemoveLocation(l)
set t=null
set AM7=null
set l=null
endfunction
function YTH takes nothing returns boolean
if GetSpellAbilityId()=='A2E3' then
call YQH()
endif
return false
endfunction
function IH9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function YTH))
set t=null
endfunction
function YUH takes unit Z77 returns nothing
local integer C77=(LoadInteger(R8,(GetHandleId(Z77)),(728)))
local integer ML8=GetUnitAbilityLevel(Z77,'A2E4')
local integer i=1
set C77=IMinBJ(C77,4*ML8)
loop
exitwhen i>20
if C77==i then
call AddPermanentAbility(Z77,I57[i])
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),I57[i],false)
else
call UnitRemoveAbility(Z77,I57[i])
endif
set i=i+1
endloop
endfunction
function YVH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer C77=(LoadInteger(R8,(GetHandleId(Z77)),(728)))-1
call SaveInteger(R8,(GetHandleId(Z77)),(728),(C77))
call YUH(Z77)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function YWH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local integer C77=(LoadInteger(R8,(GetHandleId(Z77)),(728)))+1
if IsUnitEnemy(GetAttacker(),GetOwningPlayer(Z77))then
call SaveInteger(R8,(GetHandleId(Z77)),(728),(C77))
call YUH(Z77)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,16,false)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerAddCondition(t,Condition(function YVH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
endif
set t=null
set Z77=null
return false
endfunction
function YXH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function YWH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
set t=null
set Z77=null
endfunction
function YYH takes nothing returns boolean
if GetLearnedSkill()=='A2E4' and GetUnitAbilityLevel(GetTriggerUnit(),'A2E4')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call YXH()
endif
return false
endfunction
function II9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function YYH))
set t=null
set I57[1]='A2DG'
set I57[2]='A2DF'
set I57[3]='A2DL'
set I57[4]='A2DM'
set I57[5]='A2DJ'
set I57[6]='A2DI'
set I57[7]='A2DN'
set I57[8]='A2DO'
set I57[9]='A2DH'
set I57[10]='A2DU'
set I57[11]='A2DP'
set I57[12]='A2DQ'
set I57[13]='A2DR'
set I57[14]='A2DS'
set I57[15]='A2DT'
set I57[16]='A2DK'
set I57[17]='A2OT'
set I57[18]='A2OS'
set I57[19]='A2OU'
set I57[20]='A2OV'
endfunction
function YZH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
call UnitRemoveAbility(Z77,'Bpig')
call UnitRemoveAbility(Z77,'BEia')
call UnitRemoveAbility(Z77,'A2FX')
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function YAH takes unit Z77,unit X77 returns nothing
local unit AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
local integer WTD=R2I('d'*GetUnitState(X77,UNIT_STATE_LIFE)/ GetUnitState(X77,UNIT_STATE_MAX_LIFE))
local integer ML8=P38(PC8(R2I('d'-WTD)/ 5,20),1)
call UnitAddAbility(AC7,'A2DV')
call SetUnitAbilityLevel(AC7,'A2DV',ML8)
call IssueTargetOrderById(AC7,852075,X77)
set AC7=null
endfunction
function YBH takes nothing returns nothing
if U9==false then
call Dmg(J77,GetEnumUnit(),3,(25+25*J87)*.5)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",GetEnumUnit(),"origin"))
call YAH(J77,GetEnumUnit())
endif
endfunction
function YCH takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),J47)==false then
call GroupAddUnit(J47,GetEnumUnit())
call Dmg(J77,GetEnumUnit(),3,60+40*J87)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",GetEnumUnit(),"origin"))
call YAH(J77,GetEnumUnit())
endif
endfunction
function Y3H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit S08=(LoadUnitHandle(R8,(W57),(45)))
local real BM7=(LoadReal(R8,(W57),(6)))
local real BN7=(LoadReal(R8,(W57),(7)))
local real x
local real y
local real a
local integer Y6H=(LoadInteger(R8,(W57),(33)))
local group XCD=(LoadGroupHandle(R8,(W57),(187)))
local group g
local integer C77=(LoadInteger(R8,(W57),(34)))
local real YLH
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A2FX' then
call SaveInteger(R8,(W57),(33),(2))
call GroupClear(XCD)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2FX',false)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function YZH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
endif
elseif GetTriggerEventId()==EVENT_WIDGET_DEATH or(LoadInteger(R8,(GetHandleId(Z77)),(704)))==-1 then
call UI8(Z77)
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A2E5' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2E5',true)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2FX',false)
call UnitRemoveAbility(Z77,'A2FX')
call UnitRemoveAbility(Z77,'Bpig')
call UnitRemoveAbility(Z77,'BEia')
call KillUnit(S08)
call OF8(XCD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
elseif Y6H==0 then
set a=YI7(GetUnitX(S08),GetUnitY(S08),BM7,BN7)*bj_DEGTORAD
set x=GetUnitX(S08)+18*Cos(a)
set y=GetUnitY(S08)+18*Sin(a)
call KillTrees(x,y,175)
if Z87(x,y,BM7,BN7)<40 then
set x=BM7
set y=BN7
endif
call SetUnitX(S08,x)
call SetUnitY(S08,y)
set H04=Z77
set J77=Z77
set J87=GetUnitAbilityLevel(Z77,'A2E5')
set J47=XCD
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,I27+25,Condition(function UM8))
call ForGroup(g,function YCH)
call OF8(g)
if x==BM7 and y==BN7 then
call SaveInteger(R8,(W57),(33),(1))
call GroupClear(XCD)
endif
elseif Y6H==1 then
set C77=C77+1
if C77==25 then
set x=GetUnitX(S08)
set y=GetUnitY(S08)
call KillTrees(x,y,175)
set C77=0
set H04=Z77
set J77=Z77
set J87=GetUnitAbilityLevel(Z77,'A2E5')
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,I_7+25,Condition(function UM8))
call ForGroup(g,function YBH)
call OF8(g)
set YLH=(15+5*J87)/ 2
if GetUnitState(Z77,UNIT_STATE_MANA)<YLH or Z47(Z77,S08)>2000 then
call SaveInteger(R8,(W57),(33),(2))
call GroupClear(XCD)
call UnitRemoveAbility(Z77,'A2FX')
call UnitRemoveAbility(Z77,'Bpig')
call UnitRemoveAbility(Z77,'BEia')
else
call SetUnitState(Z77,UNIT_STATE_MANA,GetUnitState(Z77,UNIT_STATE_MANA)-YLH)
endif
endif
call SaveInteger(R8,(W57),(34),(C77))
elseif Y6H==2 then
set a=YI7(GetUnitX(S08),GetUnitY(S08),GetUnitX(Z77),GetUnitY(Z77))*bj_DEGTORAD
set x=GetUnitX(S08)+16*Cos(a)
set y=GetUnitY(S08)+16*Sin(a)
call KillTrees(x,y,175)
call SetUnitX(S08,x)
call SetUnitY(S08,y)
set H04=Z77
set J77=Z77
set J87=GetUnitAbilityLevel(Z77,'A2E5')
set J47=XCD
set g=OG8()
call GroupEnumUnitsInRange(g,x,y,I27+25,Condition(function UM8))
call ForGroup(g,function YCH)
call OF8(g)
if Z87(x,y,GetUnitX(Z77),GetUnitY(Z77))<40 then
call UI8(Z77)
call KillUnit(S08)
call OF8(XCD)
call FlushChildHashtable(R8,(W57))
call EA8(t)
if(LoadInteger(R8,(GetHandleId(Z77)),(704)))==0 or(LoadInteger(R8,(GetHandleId(Z77)),(704)))=='A2E5' then
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2E5',true)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2FX',false)
endif
endif
set t=null
set Z77=null
set S08=null
set XCD=null
set g=null
return false
endfunction
function Y1H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local real a=YI7(GetUnitX(Z77),GetUnitY(Z77),x,y)*bj_DEGTORAD
local unit S08=CreateUnit(GetOwningPlayer(Z77),'h0DS',GetUnitX(Z77),GetUnitY(Z77),a*bj_RADTODEG)
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerRegisterUnitEvent(t,Z77,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Y3H))
call SaveUnitHandle(R8,(W57),(45),(S08))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(6),((x)*1.))
call SaveReal(R8,(W57),(7),((y)*1.))
call SaveInteger(R8,(W57),(33),(0))
call SaveGroupHandle(R8,(W57),(187),(OG8()))
call UG8(Z77)
call AddPermanentAbility(Z77,'A2FX')
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2E5',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(Z77),'A2FX',true)
set Z77=null
set t=null
set S08=null
endfunction
function Y0H takes nothing returns boolean
if GetSpellAbilityId()=='A2E5' then
call Y1H()
endif
return false
endfunction
function IJ9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Y0H))
call PU8('A2DV')
set t=null
endfunction
function Trap_RemoveBonus takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if((LoadInteger(R8,(GetHandleId(Z77)),(754)))==(LoadInteger(R8,(W57),(754))))then
call W78((Z77),(0))
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
set t=null
set Z77=null
return false
endfunction
function Y5H takes nothing returns nothing
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)then
set KP7=KP7+60
else
set KP7=KP7+20
endif
call UnitRemoveAbility(GetEnumUnit(),KT7)
call UnitRemoveAbility(GetEnumUnit(),KU7)
endfunction
function Y2H takes nothing returns nothing
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)then
set KP7=KP7+60
else
set KP7=KP7+20
endif
endfunction
function Y_H takes nothing returns nothing
call Stun(KQ7,GetEnumUnit(),.5+KR7*.5)
call Dmg(KQ7,GetEnumUnit(),NormalFire,KP7)
endfunction
function Z4H takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),KU7)>0
endfunction
function Z7H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local group g=OG8()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
set KQ7=Z77
set KR7=GetUnitAbilityLevel(Z77,KS7)
set KP7=0
call GroupEnumUnitsInRange(g,0,0,9999,Condition(function Z4H))
call ForGroup(g,function Y5H)
call ForGroup(g,function Y_H)
call OF8(g)
set g=null
set Z77=null
endfunction
function Z8H takes nothing returns boolean
if GetSpellAbilityId()==KS7 then
call Z7H()
endif
return false
endfunction
function Z9H takes string QO8,unit X77,unit AM7 returns nothing
local texttag tt=CreateTextTag()
call SetTextTagText(tt,QO8,.033)
call SetTextTagPosUnit(tt,X77,64)
call SetTextTagColor(tt,0,75,255,255)
call SetTextTagVelocity(tt,0,.0355)
call SetTextTagFadepoint(tt,.15)
call SetTextTagPermanent(tt,false)
call SetTextTagLifespan(tt,1.)
if IsUnitAlly(AM7,GetLocalPlayer())or N08(GetLocalPlayer())then
call SetTextTagVisibility(tt,true)
else
call SetTextTagVisibility(tt,false)
endif
set tt=null
endfunction
function ZDH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local real U89=(LoadReal(R8,(GetHandleId(X77)),(753)))
if GetTriggerEventId()==EVENT_WIDGET_DEATH or U89<(TimerGetElapsed(E4))then
call UnitRemoveAbility(X77,KT7)
call UnitRemoveAbility(X77,KU7)
call SaveReal(R8,(GetHandleId(X77)),(753),((0)*1.))
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set X77=null
return false
endfunction
function ZEH takes unit Z77,unit X77 returns nothing
local trigger t
local integer W57
local group g=OG8()
call SaveReal(R8,(GetHandleId(X77)),(753),(((TimerGetElapsed(E4))+KO7)*1.))
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.25,true)
call TriggerRegisterDeathEvent(t,X77)
call TriggerAddCondition(t,Condition(function ZDH))
call SaveUnitHandle(R8,(W57),(17),(X77))
call AddPermanentAbility(X77,KT7)
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),KT7,false)
set KQ7=Z77
set KR7=GetUnitAbilityLevel(Z77,KS7)
set KP7=0
call GroupEnumUnitsInRange(g,0,0,9999,Condition(function Z4H))
call ForGroup(g,function Y2H)
call OF8(g)
call Z9H(I2S(KP7),X77,Z77)
set t=null
endfunction
function ZFH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
call FlushChildHashtable(R8,(W57))
call EA8(t)
else
if GetEventDamageSource()==Z77 and GetEventDamage()>0 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
if S_9(X77)==false then
call ZEH(Z77,X77)
endif
endif
endif
set t=null
set Z77=null
set X77=null
return false
endfunction
function ZGH takes nothing returns nothing
local unit Z77=GetAttacker()
local unit X77=GetTriggerUnit()
local trigger t
local integer W57
if LState(Z77,"4325")==false then
call AddTimedBoolBuff(Z77,"4325",.2)
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,X77,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerAddCondition(t,Condition(function ZFH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
endif
set Z77=null
set X77=null
endfunction
function ZHH takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),KS7)>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitTypeId(GetTriggerUnit())!='n00L' and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))then
call ZGH()
endif
return false
endfunction
function IO9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Z8H))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function ZHH))
set t=null
endfunction
function ZIH takes nothing returns nothing
local integer W57=GetHandleId(GetTriggeringTrigger())
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit ZJH=H04
local unit X77=H54
local integer ML8=GetUnitAbilityLevel(Z77,KV7)
if GU8(X77)==false then
call Dmg(Z77,X77,NormalFire,20+80*ML8)
call T68(X77,KW7,1,4,KX7)
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),KW7,false)
call UnitMakeAbilityPermanent(X77,true,'A2MJ')
endif
set Z77=null
set X77=null
set ZJH=null
endfunction
function ZKH takes nothing returns nothing
local unit Z77=KY7
local unit X77=GetEnumUnit()
local trigger t=T88(KZ7,X77,'h0EE',"ZIH",600)
local integer W57=GetHandleId(t)
call SaveUnitHandle(R8,(W57),(2),(Z77))
set Z77=null
set X77=null
set t=null
endfunction
function ZMH takes unit Z77,unit X77 returns nothing
local integer ML8=GetUnitAbilityLevel(Z77,KV7)
local group g=OG8()
set H04=Z77
set KY7=Z77
set KZ7=X77
call GroupEnumUnitsInRange(g,GetUnitX(X77),GetUnitY(X77),500+25,Condition(function UM8))
call GroupRemoveUnit(g,X77)
call ForGroup(g,function ZKH)
call OF8(g)
set Z77=null
set X77=null
set g=null
endfunction
function ZNH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local unit S08=(LoadUnitHandle(R8,(W57),(45)))
local real x=GetUnitX(S08)
local real y=GetUnitY(S08)
local real BM7=GetUnitX(X77)
local real BN7=GetUnitY(X77)
local real ZOH=Z87(BM7,BN7,x,y)
local integer C77=GetTriggerEvalCount(t)
local real S28=YI7(x,y,BM7,BN7)
local real S_8
local real T48
local real S58=ZOH/((KA7/ .02)-C77)
if S58<KB7*.02 then
set S58=KB7*.02
endif
set S_8=x+S58*Cos(S28*bj_DEGTORAD)
set T48=y+S58*Sin(S28*bj_DEGTORAD)
call SetUnitX(S08,S_8)
call SetUnitY(S08,T48)
call SetUnitFacing(S08,S28)
if Z87(BM7,BN7,S_8,T48)<=S58 then
call KillUnit(S08)
call ZMH(Z77,X77)
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set X77=null
set Z77=null
set S08=null
return false
endfunction
function ZPH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit S08=CreateUnit(GetOwningPlayer(Z77),'h0EJ',GetUnitX(Z77),GetUnitY(Z77),0)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function ZNH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
call SaveUnitHandle(R8,(W57),(45),(S08))
set Z77=null
set X77=null
set S08=null
set t=null
endfunction
function ZQH takes nothing returns boolean
if GetSpellAbilityId()==KV7 then
call ZPH()
endif
return false
endfunction
function IN9 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function ZQH))
set t=null
endfunction
function ZRH takes nothing returns nothing
call Stun(J97,GetEnumUnit(),1.5)
call Dmg(J97,GetEnumUnit(),2,50+50*JD7)
endfunction
function ZSH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local real a=(LoadReal(R8,(W57),(137)))
local real BM7=(LoadReal(R8,(W57),(47)))
local real BN7=(LoadReal(R8,(W57),(48)))
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local group g=OG8()
local integer ML8=GetUnitAbilityLevel(Z77,'A2F4')
set x=PQ8(x+32*Cos(a))
set y=PS8(y+32*Sin(a))
if Z87(x,y,BM7,BN7)<40 then
set x=BM7
set y=BN7
endif
call SetUnitX(Z77,x)
call SetUnitY(Z77,y)
call SetUnitFacing(Z77,a*bj_RADTODEG)
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,'}'+25,Condition(function UM8))
if FirstOfGroup(g)!=null or(x==BM7 and y==BN7)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 UM8))
set JD7=ML8
set J97=Z77
if GetTriggerEventId()!=EVENT_WIDGET_DEATH then
call ForGroup(g,function ZRH)
endif
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
call OF8(g)
set t=null
set Z77=null
set g=null
return false
endfunction
function ZTH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local real BM7=GetSpellTargetX()
local real BN7=GetSpellTargetY()
local real a=YI7(x,y,BM7,BN7)*bj_DEGTORAD
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerRegisterDeathEvent(t,Z77)
call TriggerAddCondition(t,Condition(function ZSH))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveReal(R8,(W57),(137),((a)*1.))
call SaveReal(R8,(W57),(47),((BM7)*1.))
call SaveReal(R8,(W57),(48),((BN7)*1.))
set Z77=null
set t=null
endfunction
function ZUH takes nothing returns boolean
if GetSpellAbilityId()=='A2F4' then
call ZTH()
endif
return false
endfunction
function Register_SonicBoom takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function ZUH))
set t=null
endfunction
function ZVH takes nothing returns nothing
local unit Z77=JE7
local unit X77=GetEnumUnit()
call TZ8(X77,'A2F3',1,10)
call Dmg(Z77,X77,2,50*JF7+2*GetHeroAgi(Z77,true))
set Z77=null
set X77=null
endfunction
function ZWH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real WPE=PL8((TimerGetElapsed(E4))-(LoadReal(R8,(GetHandleId(Z77)),(358))),5.)
local integer ML8=GetUnitAbilityLevel(Z77,'A2EE')
local real P08=(40+80*ML8)*(WPE)
local group g=OG8()
local real d=WPE*600
local real a=(LoadReal(R8,(GetHandleId(Z77)),(736)))
local real x=GetUnitX(Z77)+d*Cos(a)
local real y=GetUnitY(Z77)+d*Sin(a)
set H04=Z77
call GroupEnumUnitsInRange(g,x,y,325,Condition(function UM8))
set JF7=ML8
set JE7=Z77
call ForGroup(g,function ZVH)
call OF8(g)
call QH8("effects\\BasicWaterFlash.mdx",x,y,1)
set Z77=null
set g=null
endfunction
function ZXH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit AM7=(LoadUnitHandle(R8,(W57),(14)))
call SetUnitTimeScale(AM7,1)
call FlushChildHashtable(R8,(W57))
call EA8(t)
if GetTriggerEventId()!=EVENT_UNIT_DEATH then
call ZN7(AM7)
endif
set t=null
set AM7=null
return false
endfunction
function ZYH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit AM7=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local real a=YI7(GetUnitX(AM7),GetUnitY(AM7),x,y)*bj_DEGTORAD
local real RF8=RMaxBJ(Z87(GetUnitX(AM7),GetUnitY(AM7),x,y)/ 600,.32)
call RemoveLocation(l)
call SaveReal(R8,(GetHandleId(AM7)),(356),((x)*1.))
call SaveReal(R8,(GetHandleId(AM7)),(357),((y)*1.))
call SaveReal(R8,(GetHandleId(AM7)),(736),((a)*1.))
call SaveReal(R8,(GetHandleId(AM7)),(358),(((TimerGetElapsed(E4)))*1.))
call SetUnitTimeScale(AM7,.75)
call SaveUnitHandle(R8,(W57),(14),(AM7))
call TriggerRegisterTimerEvent(t,RF8-.01,false)
call TriggerRegisterUnitEvent(t,AM7,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function ZXH))
set t=null
set l=null
set AM7=null
endfunction
function ZZH takes nothing returns boolean
if GetSpellAbilityId()=='A2EE' then
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST then
call SaveBoolean(R8,(GetHandleId(GetTriggerUnit())),(360),(false))
call ZYH()
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
call SaveBoolean(R8,(GetHandleId(GetTriggerUnit())),(360),(true))
elseif(LoadBoolean(R8,(GetHandleId(GetTriggerUnit())),(360)))then
call ZWH()
endif
endif
return false
endfunction
function Register_WindBlast takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_ENDCAST)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function ZZH))
set t=null
endfunction
function ZAH takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if GetUnitAbilityLevel(Z77,'B086')==0 and GetUnitAbilityLevel(Z77,'B087')==0 then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call UnitRemoveAbility(Z77,'A2F2')
call UnitRemoveAbility(Z77,'B0F7')
endif
set t=null
set Z77=null
return false
endfunction
function ZBH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
local unit X77=GetSpellTargetUnit()
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A2F2',false)
call AddPermanentAbility(X77,'A2F2')
call TriggerRegisterTimerEvent(t,.2,true)
call TriggerAddCondition(t,Condition(function ZAH))
call SaveUnitHandle(R8,(W57),(2),(X77))
set Z77=null
set t=null
endfunction
function ZCH takes nothing returns boolean
if GetSpellAbilityId()=='A2F0' then
call ZBH()
endif
return false
endfunction
function Register_WindBarrier takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function ZCH))
set t=null
endfunction
function Z3H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer ML8=GetUnitAbilityLevel(Z77,'A2F5')
local integer id
local integer Q38
call FlushChildHashtable(R8,(W57))
call EA8(t)
if IsUnitAlly(X77,GetOwningPlayer(Z77))then
set Q38='B0F8'
if ML8==1 then
set id='A2FG'
elseif ML8==2 then
set id='A2FF'
elseif ML8==3 then
set id='A2FH'
endif
call SetUnitState(X77,UNIT_STATE_LIFE,GetUnitState(X77,UNIT_STATE_LIFE)+'d'+50*ML8)
else
set Q38='B0F9'
if ML8==1 then
set id='A2FD'
elseif ML8==2 then
set id='A2FC'
elseif ML8==3 then
set id='A2FE'
endif
call Dmg(Z77,X77,1,'d'+50*ML8)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),id,false)
call T68(X77,id,1,4,Q38)
set t=null
set Z77=null
set X77=null
return false
endfunction
function Z6H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetEnumUnit()
local unit AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call TF9(X77)
call T99(X77,0,0)
call UnitAddAbility(AC7,'A2FI')
call IssueTargetOrderById(AC7,852144,X77)
call TriggerRegisterTimerEvent(t,4,false)
call TriggerAddCondition(t,Condition(function Z3H))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(X77))
set t=null
set Z77=null
set X77=null
set AC7=null
endfunction
function ZLH takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local real BM7=GetSpellTargetX()
local real BN7=GetSpellTargetY()
local group g=OG8()
call S18(GetOwningPlayer(Z77),4,BM7,BN7,300)
call GroupEnumUnitsInRange(g,BM7,BN7,400+25,Condition(function T08))
call ForGroup(g,function Z6H)
call OF8(g)
set Z77=null
set g=null
endfunction
function Z1H takes nothing returns boolean
if GetSpellAbilityId()=='A2F5' then
call ZLH()
endif
return false
endfunction
function Register_PrevailingWinds takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Z1H))
set t=null
endfunction
function Z0H takes nothing returns nothing
local integer W57=GetHandleId(GetTriggeringTrigger())
local unit Z77=H04
local unit X77=H54
local unit AC7=CreateUnit(GetOwningPlayer(X77),'e00E',GetUnitX(X77),GetUnitY(X77),0)
local real P08=GetUnitAbilityLevel(Z77,'A2FT')*60+40
call UnitAddAbility(AC7,'A2FU')
call IssueTargetOrderById(AC7,852106,X77)
call Dmg(Z77,X77,1,P08)
set AC7=null
set Z77=null
set X77=null
endfunction
function Z5H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local group g=OG8()
local real x=GetUnitX(Z77)
local real y=GetUnitY(Z77)
local unit u1=null
local unit u2=null
local unit u3=null
local integer IM8=0
local unit u
local trigger t
call GroupEnumUnitsInRange(g,x,y,425,Condition(function UB8))
loop
exitwhen FirstOfGroup(g)==null or IM8==3
set u=GroupPickRandomUnit(g)
if u!=null then
if IM8==0 then
set u1=u
elseif IM8==1 then
set u2=u
elseif IM8==2 then
set u3=u
endif
set IM8=IM8+1
call GroupRemoveUnit(g,u)
endif
endloop
call OF8(g)
if u1!=null then
call T88(Z77,u1,'h0DZ',"Z0H",400)
endif
if u2!=null then
call T88(Z77,u2,'h0DZ',"Z0H",400)
endif
if u3!=null then
call T88(Z77,u3,'h0DZ',"Z0H",400)
endif
set g=null
set Z77=null
set u=null
set u1=null
set u2=null
set u3=null
endfunction
function Z2H takes nothing returns boolean
if GetSpellAbilityId()=='A2FT' then
call Z5H()
endif
return false
endfunction
function Register_HolyShackles takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Z2H))
set t=null
endfunction
function Z_H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local integer V_8=(LoadInteger(R8,(W57),(30)))
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
local unit X77=(LoadUnitHandle(R8,(W57),(17)))
local integer C77=(LoadInteger(R8,(GetHandleId(Z77)),(737)))
local trigger A4H=(LoadTriggerHandle(R8,(GetHandleId(Z77)),(738)))
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==Z77 then
call DisableTrigger(t)
call FlushChildHashtable(R8,(W57))
call EA8(t)
set C77=C77-1
if C77==0 then
call FlushChildHashtable(R8,(GetHandleId(A4H)))
call EA8(A4H)
call RemoveSavedHandle(R8,(GetHandleId(Z77)),(738))
call SaveInteger(R8,(GetHandleId(Z77)),(737),(-1))
call UnitRemoveAbility(Z77,'A2FN')
call UnitRemoveAbility(Z77,'B0FA')
else
call SaveInteger(R8,(GetHandleId(Z77)),(737),(C77))
endif
endif
else
call FlushChildHashtable(R8,(W57))
call EA8(t)
endif
set t=null
set X77=null
set Z77=null
set A4H=null
return false
endfunction
function A7H takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer W57=GetHandleId(t)
local unit Z77=(LoadUnitHandle(R8,(W57),(2)))
if GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED then
call FlushChildHashtable(R8,(W57))
call EA8(t)
call RemoveSavedHandle(R8,(GetHandleId(Z77)),(738))
call SaveInteger(R8,(GetHandleId(Z77)),(737),(-1))
call UnitRemoveAbility(Z77,'A2FN')
call UnitRemoveAbility(Z77,'B0FA')
elseif GetAttacker()==Z77 then
set t=CreateTrigger()
set W57=GetHandleId(t)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2,false)
call TriggerAddCondition(t,Condition(function Z_H))
call SaveUnitHandle(R8,(W57),(2),(Z77))
call SaveUnitHandle(R8,(W57),(17),(GetTriggerUnit()))
endif
set t=null
set Z77=null
return false
endfunction
function A8H takes nothing returns nothing
local unit Z77=GetTriggerUnit()
local unit X77=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer W57=GetHandleId(t)
call SetPlayerAbilityAvailable(GetOwningPlayer(X77),'A2FN',false)
call AddPermanentAbility(X77,'A2FN')
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterTimerEvent(t,12,false)
call TriggerAddCondition(t,Condition(function A7H))
call SaveUnitHandle(R8,(W57),(2),(X77))
call SaveInteger(R8,(GetHandleId(X77)),(737),(GetUnitAbilityLevel(Z77,'A2FQ')+1))
call SaveTriggerHandle(R8,(GetHandleId(X77)),(738),(t))
set X77=null
set t=null
set Z77=null
endfunction
function A9H takes nothing returns boolean
if GetSpellAbilityId()=='A2FQ' then
call A8H()
endif
return false
endfunction
function Register_Focus takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function A9H))
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 ADH takes string AEH,string AFH,integer AGH returns integer
local integer i=AGH
local string AHH=null
loop
exitwhen i==StringLength(AEH)
set AHH=SubString(AEH,i,i+1)
if(AHH==AFH)then
return i
endif
set i=i+1
endloop
return-1
endfunction
function AIH takes nothing returns nothing
local string AJH=GetEventPlayerChatString()
local integer AKH=ADH(AJH," ",0)
local integer AMH=ADH(AJH," ",AKH+1)
local integer ANH=S2I(SubString(AJH,AKH,AMH+1))
local string AOH=SubString(AJH,AMH+1,StringLength(AJH))
local boolean APH=false
local integer i=0
set AOH="+"+AOH
if ANH<12 then
loop
exitwhen i==14
if(AOH==GetPlayerName(Player(i)))then
set APH=true
endif
set i=i+1
endloop
if((not APH)and(VR4>0)and(GetPlayerController(Player(ANH))==MAP_CONTROL_COMPUTER)and(ANH!=0)and(ANH!=6)and(ANH<12)and(StringLength(AOH)<20))then
call X17("Renaming "+GetPlayerName(Player(ANH))+" : "+AOH)
set KW4[ANH]=AOH
call SetPlayerName(Player(ANH),AOH)
set VR4=VR4-1
endif
endif
endfunction
function AQH takes nothing returns nothing
local trigger t=CreateTrigger()
local integer i=0
loop
exitwhen i==14
call TriggerRegisterPlayerChatEvent(t,Player(i),"-rn ",false)
set i=i+1
endloop
call TriggerAddAction(t,function AIH)
set t=null
endfunction
function bool_TestVersion_BEGINTRIG takes nothing returns boolean
return E
endfunction
function ARH takes nothing returns nothing
local real dt=TimerGetElapsed(E4)
local real X
local real Y
local real dx
local real dy
local real Vx
local real Vy
local group g=OG8()
local unit AM7=GetOrderedUnit()
local unit X77
local integer i=1
local integer ML8
call X17("ARH")
call SyncSelections()
call GroupEnumUnitsSelected(g,GetTriggerPlayer(),null)
set X77=FirstOfGroup(g)
call OF8(g)
set g=null
set dx=GetUnitX(X77)
set dy=GetUnitY(X77)
call Y07(.1)
set dt=TimerGetElapsed(E4)-dt
set X=GetUnitX(X77)
set Y=GetUnitY(X77)
set dx=(X-dx)/ dt
set dy=(Y-dy)/ dt
loop
set AM7=Y7[i]
set ML8=GetUnitAbilityLevel(AM7,'A06I')
if ML8>0 then
set dt=OH8(40./ .03,X+dx*.3-GetUnitX(AM7),Y+dy*.3-GetUnitY(AM7),dx,dy)
if dt>0 and dt<=((800.+200.*ML8)*.03/ 40.)then
call IssuePointOrderById(AM7,852600,X+dx*(dt+.3),Y+dy*(dt+.3))
endif
endif
set i=i+1
exitwhen i>10
endloop
set X77=null
set AM7=null
endfunction
function ASH takes nothing returns nothing
local trigger t=CreateTrigger()
call X17("ASH")
call TriggerRegisterPlayerEvent(t,G8[1],EVENT_PLAYER_END_CINEMATIC)
call TriggerRegisterPlayerEvent(t,G8[2],EVENT_PLAYER_END_CINEMATIC)
call TriggerRegisterPlayerEvent(t,G8[3],EVENT_PLAYER_END_CINEMATIC)
call TriggerRegisterPlayerEvent(t,G8[4],EVENT_PLAYER_END_CINEMATIC)
call TriggerRegisterPlayerEvent(t,G8[5],EVENT_PLAYER_END_CINEMATIC)
call TriggerRegisterPlayerEvent(t,N8[1],EVENT_PLAYER_END_CINEMATIC)
call TriggerRegisterPlayerEvent(t,N8[2],EVENT_PLAYER_END_CINEMATIC)
call TriggerRegisterPlayerEvent(t,N8[3],EVENT_PLAYER_END_CINEMATIC)
call TriggerRegisterPlayerEvent(t,N8[4],EVENT_PLAYER_END_CINEMATIC)
call TriggerRegisterPlayerEvent(t,N8[5],EVENT_PLAYER_END_CINEMATIC)
call TriggerAddAction(t,function ARH)
endfunction
function Test_3 takes nothing returns boolean
call TriggerSleepAction(2)
call X17("Timer Event Condition")
return false
endfunction
function Test_32 takes nothing returns nothing
call TriggerSleepAction(2)
call X17("Timer Event Action")
endfunction
function Test_33 takes nothing returns boolean
call TriggerSleepAction(2)
call X17("IssuePointOrder Event Condition")
return false
endfunction
function Test_34 takes nothing returns nothing
call TriggerSleepAction(2)
call X17("IssuePointOrder Event Action")
endfunction
function Test_35 takes nothing returns nothing
call TriggerSleepAction(2)
call X17("Timer Function")
endfunction
function Test01 takes nothing returns nothing
call KillUnit(I34)
call KillUnit(I24)
call WR9()
call WR9()
call WR9()
call WR9()
call WR9()
call WD9()
endfunction
function testKill takes nothing returns nothing
call UnitDamageTarget(JS4,GetEnumUnit(),0x989680,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_UNKNOWN,WEAPON_TYPE_WHOKNOWS)
endfunction
function test141 takes nothing returns boolean
call XK7("01")
return true
endfunction
function test142 takes nothing returns boolean
call XK7("02")
return true
endfunction
function aiDEBUG122 takes nothing returns nothing
call XK7(XW7(GetUnitTypeId(GetEnumUnit()))+GetUnitName(GetEnumUnit()))
endfunction
function ATH takes nothing returns nothing
call XK7("Enum Item "+GetItemName(GetEnumItem())+XW7(GetItemTypeId(GetEnumItem()))+XP7(GetPlayerId(GetItemPlayer(GetEnumItem()))))
endfunction
function AUH takes nothing returns nothing
local unit j5=Y7[GetPlayerId(Player(2))]
local unit m5=Y7[GetPlayerId(Player(7))]
local boolean FB8=false
local item FA8=null
local integer i=0
local integer UP=0
local group g
local trigger t=null
local timer t2=null
set UP=S2I(SubString(GetEventPlayerChatString(),3,255))
if UP==0 then
call KillUnit(JX4)
call KillUnit(JA4)
call WR9()
call WR9()
call WR9()
call WR9()
call WR9()
call W99()
elseif UP==1 then
call KillUnit(JX4)
call KillUnit(JW4)
call KillUnit(JY4)
call WR9()
call WR9()
call KillUnit(Y7[7])
call KillUnit(Y7[8])
call W99()
elseif UP==2 then
set i=1
loop
exitwhen i>11
if i==6 then
set i=7
endif
if Y7[i]!=null then
call DisplayTextToPlayer(GetLocalPlayer(),0,0,"EHP Modifier "+I2S(i)+": "+R2S(hq[752+i])+"/"+R2S(hq[720+i])+" - d% = "+R2S(hq[704+i]))
endif
set i=i+1
endloop
elseif UP==3 then
call LXF(Y7[7],Y7[1])
elseif UP==4 then
call EnumItemsInRect(QD,R24,function ATH)
elseif UP==5 then
set PH7=true
call XK7("aiDEBUG_DustWardDisable")
elseif UP=='n' then
call AddPermanentAbility(Y7[1],'A2E3')
call SetUnitAbilityLevel(Y7[1],'A2E3',4)
call IH9()
elseif UP=='o' then
set bj_lastLoadedUnit=LUnit(GetHandleId(Player(1)),"MyBear")
if OM8(Y7[1],bj_lastLoadedUnit,2800,.8,1400)!=null then
call XK7("AimL "+XR7(H57))
set F17=KE8(Y7[1],1400)
call XK7("AimTimber "+XR7(H57)+XQ7(F17))
call UnitResetCooldown(Y7[1])
call SetUnitState(Y7[1],UNIT_STATE_MANA,99999.)
call DestroyEffect(AddSpecialEffectLoc("UI\\Feedback\\GoldCredit\\GoldCredit.mdl",H57))
call IssuePointOrderByIdLoc(Y7[1],852662,H57)
if F17 then
call XK7(I2S(1)+" hit timberchain")
elseif bj_enumDestructableRadius==0 then
call XK7(I2S(1)+" some tree is on the way")
else
call XK7(I2S(1)+" no tree found")
endif
endif
elseif UP=='x' then
set i=0
loop
exitwhen i>5
set F27=UnitItemInSlot(PM7,i)
call XK7(I2S(i)+" "+GetItemName(F27)+" "+GetPlayerName(GetItemPlayer(F27)))
set i=i+1
endloop
elseif UP=='y' then
set i=1
loop
exitwhen i>5
call SetUnitState(Y7[GetPlayerId(N8[i])],UNIT_STATE_LIFE,50)
set i=i+1
endloop
elseif UP=='z' then
elseif UP=='{' then
call SetItemPlayer(CreateItem(AU[zhenshibaoshi],GetUnitX(Y7[1]),GetUnitY(Y7[1])),Player(2),false)
else
call GroupClear(H8)
call GroupEnumUnitsSelected(H8,Player(1),null)
set bj_lastLoadedUnit=FirstOfGroup(H8)
set bj_forLoopAIndex=GetPlayerId(GetOwningPlayer(bj_lastLoadedUnit))
call DisableTrigger(R04[bj_forLoopAIndex])
call XK7("Attempt Order: "+I2S(UP)+" >> "+XQ7(IssueTargetOrderById(bj_lastLoadedUnit,UP,Y7[2])))
call EnableTrigger(R04[bj_forLoopAIndex])
endif
set j5=null
set m5=null
set FA8=null
set g=null
endfunction
function AVH takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())==Player(M))
endfunction
function AWH takes nothing returns nothing
call DisplayTextToPlayer(V8,0,0,"SC "+GetUnitName(GetTriggerUnit())+" casted spell "+XW7(GetSpellAbilityId())+" on "+GetUnitName(GetSpellTargetUnit())+" at ("+I2S(R2I(GetSpellTargetX()))+","+I2S(R2I(GetSpellTargetY()))+")")
endfunction
function aiIsWaypoint takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='e00C'
endfunction
function AXH takes nothing returns nothing
local string AYH
local integer O5
if GH7!="" and GH7!=GetUnitName(GetTriggerUnit())then
return
endif
set O5=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
set AYH="|cffffffa0"+GetUnitName(GetTriggerUnit())+"|r: "+" |cffa0ffff"+OrderId2String(GetIssuedOrderId())+"|r |cffffa0ff("+I2S(GetIssuedOrderId())+")|r "+XP7(eY[O5])+XQ7(G0[128+O5])
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ISSUED_ORDER then
set AYH=AYH
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER then
set AYH=AYH+" ("+I2S(R2I(GetOrderPointX()))+","+I2S(R2I(GetOrderPointY()))+") ["+I2S(GetUnitUserData(h9[O5]))+"-"+I2S(GetUnitUserData(h8[O5]))+"]"
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER then
set AYH=AYH+" > "+GetUnitName(GetOrderTargetUnit())
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_ISSUED_UNIT_ORDER then
set AYH=AYH
endif
call DisplayTextToPlayer(V8,0,0,AYH+" |cffa0a0ff"+GG7+"|r")
endfunction
function AZH takes nothing returns nothing
local string XO7=GetEventPlayerChatString()
if(StringLength(XO7)==4)then
if(IsTriggerEnabled(AH4))then
call DisableTrigger(AH4)
call X17("Order Capture Trigger disabled")
else
call EnableTrigger(AH4)
call X17("Order Capture Trigger enabled")
endif
if(IsTriggerEnabled(AI4))then
call DisableTrigger(AI4)
call X17("SpellCast Capture Trigger disabled")
else
call EnableTrigger(AI4)
call X17("SpellCast Capture Trigger enabled")
endif
if(IsTriggerEnabled(AH4))then
call X17("Listening to |c00ffff00"+KW4[M]+"|r")
endif
else
if(not IsTriggerEnabled(AH4))then
call EnableTrigger(AH4)
call X17("Order Capture Trigger enabled")
call EnableTrigger(AI4)
call X17("SpellCast Capture Trigger enabled")
endif
set M=GetPlayerId(Z17(S2I(SubString(XO7,4,StringLength(XO7)))))
call X17("Changed listening to |c00ffff00"+KW4[M]+"|r")
endif
endfunction
function AAH takes nothing returns boolean
set GH7=SubString(GetEventPlayerChatString(),8,255)
call XK7("Filter applied: -"+GH7+"-")
return false
endfunction
function ABH takes nothing returns boolean
if(D==false)then
set D=true
call X17("Debug mode enabled")
call X57(true)
if(not uy)then
call W19()
endif
else
set D=false
call X17("Debug mode disabled")
call X57(false)
endif
return false
endfunction
function ACH takes nothing returns boolean
return GetIssuedOrderId()==851990
endfunction
function A3H takes nothing returns nothing
local unit u=GetTriggerUnit()
local real x=GetOrderPointX()
local real y=GetOrderPointY()
call IssueImmediateOrderById(u,851972)
call SetUnitAnimation(u,"spell")
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl",GetUnitX(u),GetUnitY(u)))
call TriggerSleepAction(.05)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",u,"origin"))
call TriggerSleepAction(.1)
call KillTrees(x,y,130)
call SetUnitX(u,x)
call SetUnitY(u,y)
endfunction
function A6H takes nothing returns nothing
if IsTriggerEnabled(AP4)==false then
call EnableTrigger(AP4)
call X17("Instant Jump is enabled")
else
call DisableTrigger(AP4)
call X17("Instant Jump is disabled")
endif
endfunction
function ALH takes nothing returns boolean
call DisplayTimedTextToPlayer(AM4,0,V9,10.,W[GetPlayerId(GetOwningPlayer(GetFilterUnit()))]+GetObjectName(GetUnitTypeId(GetFilterUnit()))+"|r movespeed is "+I2S(R2I(.5+GetUnitMoveSpeed(GetFilterUnit())+LReal(GetHandleId(GetFilterUnit()),"extraSpeed"))))
return false
endfunction
function A1H takes nothing returns boolean
if AN4>0 then
call SetUnitMoveSpeed(GetFilterUnit(),AN4)
else
call SetUnitMoveSpeed(GetFilterUnit(),GetUnitDefaultMoveSpeed(GetFilterUnit()))
endif
return false
endfunction
function A0H takes nothing returns boolean
call KillUnit(GetFilterUnit())
return false
endfunction
function A5H takes nothing returns boolean
call RemoveUnit(GetFilterUnit())
return false
endfunction
function A2H takes nothing returns boolean
local unit u=GetFilterUnit()
call UnitResetCooldown(u)
call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_MAX_LIFE))
call SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MAX_MANA))
if u==Y7[GetPlayerId(GetOwningPlayer(u))]then
call TimerStart(M_4[GetPlayerId(GetOwningPlayer(u))],0,false,null)
endif
return false
endfunction
function A_H takes nothing returns boolean
if GetWidgetLife(GetFilterUnit())>.405 then
call SetUnitState(GetFilterUnit(),UNIT_STATE_LIFE,RMaxBJ(.5,AN4))
endif
return false
endfunction
function B4H takes nothing returns boolean
call SetUnitState(GetFilterUnit(),UNIT_STATE_MANA,RMaxBJ(0,AN4))
return false
endfunction
function B7H takes nothing returns boolean
call SetUnitOwner(GetFilterUnit(),Player(AN4),true)
return false
endfunction
function B8H takes integer i returns nothing
if i<0 or i>15 then
call DisplayTimedTextToPlayer(AM4,0,0,10.,"Incorrect owner. Should be 0 . . 15")
return
else
set AN4=i
endif
call GroupEnumUnitsSelected(AK4,AM4,Filter(function B7H))
endfunction
function B9H takes nothing returns boolean
call PauseUnit(GetFilterUnit(),(not IsUnitPaused(GetFilterUnit())))
return false
endfunction
function BDH takes integer i returns player
local player p=null
local unit u=null
if i==(-20164)then
call GroupEnumUnitsSelected(AK4,AM4,Filter(function KF8))
set u=FirstOfGroup(AK4)
if u!=null then
set p=GetOwningPlayer(u)
endif
call GroupClear(AK4)
set u=null
elseif i<0 or i>15 then
call DisplayTimedTextToPlayer(AM4,0,0,10.,"Incorrect player. Should be 0 . . 15")
else
set p=Player(i)
endif
if p==AM4 then
set p=null
endif
return p
endfunction
function BEH takes integer i returns nothing
local player p=BDH(i)
if p!=null then
call SetPlayerAlliance(p,AM4,ALLIANCE_SHARED_CONTROL,(not(GetPlayerAlliance(p,AM4,ALLIANCE_SHARED_CONTROL))))
endif
endfunction
function BFH takes integer i returns nothing
local player p=BDH(i)
if p!=null then
call SetPlayerAlliance(p,AM4,ALLIANCE_SHARED_VISION,(not(GetPlayerAlliance(p,AM4,ALLIANCE_SHARED_VISION))))
if GetPlayerAlliance(p,AM4,ALLIANCE_SHARED_VISION)then
call DisplayTimedTextToPlayer(AM4,0,0,10.,W[GetPlayerId(p)]+GetPlayerName(p)+"|r |c00e4cd5ahas shared vision with you|r")
else
call DisplayTimedTextToPlayer(AM4,0,0,10.,"|c00e4cd5aShared vision from|r "+W[GetPlayerId(p)]+GetPlayerName(p)+"|r |c00e4cd5ahas been taken away|r")
endif
endif
endfunction
function BGH takes nothing returns nothing
local unit u=null
call GroupEnumUnitsSelected(AK4,AM4,Filter(function KF8))
set u=FirstOfGroup(AK4)
set AN4=R2I(GetUnitX(u))
set AO4=R2I(GetUnitY(u))
call GroupClear(AK4)
set u=null
endfunction
function BHH takes string l,integer t returns nothing
local real x
local real y
set HK4=null
if l=="t" then
set x=GetLocationX(W7)
set y=GetLocationY(W7)
call EnumItemsInRect(YD,Condition(function KF8),function BJ9)
elseif l=="b" then
set x=GetLocationX(X7)
set y=GetLocationY(X7)
call EnumItemsInRect(TD,Condition(function KF8),function BJ9)
elseif l=="h" then
call BGH()
set x=AN4
set y=AO4
elseif l=="a" then
call BHH("t",t)
call BHH("b",t)
return
else
return
endif
if HK4!=null then
return
endif
if t==1 then
call CreateItem('I007',x,y)
elseif t==2 then
call CreateItem('I008',x,y)
elseif t==3 then
call CreateItem('I00J',x,y)
elseif t==4 then
call CreateItem('I00K',x,y)
elseif t==5 then
call CreateItem('I006',x,y)
endif
endfunction
function BIH takes nothing returns boolean
if GetUnitAbilityLevel(GetFilterUnit(),'Avul')>0 then
call UnitRemoveAbility(GetFilterUnit(),'Avul')
else
call UnitAddAbility(GetFilterUnit(),'Avul')
endif
return false
endfunction
function BJH takes nothing returns boolean
if GetUnitAbilityLevel(GetFilterUnit(),'A0Z2')==0 then
call UnitAddAbility(GetFilterUnit(),'A0Z2')
call SetUnitAbilityLevel(GetFilterUnit(),'A0Z2',3)
else
call UnitRemoveAbility(GetFilterUnit(),'A0Z2')
endif
return false
endfunction
function BKH takes nothing returns boolean
if GetUnitAbilityLevel(GetFilterUnit(),'Agho')==0 then
call UnitAddAbility(GetFilterUnit(),'Agho')
else
call UnitRemoveAbility(GetFilterUnit(),'Agho')
endif
return false
endfunction
function AC_Fly takes nothing returns boolean
if GetUnitAbilityLevel(GetFilterUnit(),'Amrf')==0 then
call UnitAddAbility(GetFilterUnit(),'Amrf')
call SetUnitFlyHeight(GetFilterUnit(),315.,0)
else
call UnitRemoveAbility(GetFilterUnit(),'Amrf')
call SetUnitFlyHeight(GetFilterUnit(),GetUnitDefaultFlyHeight(GetFilterUnit()),0)
endif
return false
endfunction
function BMH takes nothing returns boolean
call UnitRemoveBuffs(GetFilterUnit(),true,true)
return false
endfunction
function BNH takes nothing returns nothing
call WR9()
endfunction
function BOH takes nothing returns nothing
if P94==false and PF4==false then
if(av)then
call CreateNUnitsAtLoc(T7,'umtw',N8[0],qv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'u00R',N8[0],qv,bj_UNIT_FACING)
endif
call XS9(bj_lastCreatedGroup,2)
endif
if PE4==false then
if(Ev)then
call CreateNUnitsAtLoc(T7,'umtw',N8[0],mv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'u00R',N8[0],mv,bj_UNIT_FACING)
endif
call XS9(bj_lastCreatedGroup,3)
endif
if P94==false and PD4==false then
if(Ov)then
call CreateNUnitsAtLoc(T7,'umtw',N8[0],pv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'u00R',N8[0],pv,bj_UNIT_FACING)
endif
call XS9(bj_lastCreatedGroup,4)
endif
if P94==false and PF4==false then
if(O7)then
call CreateNUnitsAtLoc(T7,'ebal',G8[0],U7,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'e026',G8[0],U7,bj_UNIT_FACING)
endif
call XS9(bj_lastCreatedGroup,2)
endif
if PE4==false then
if(Bv)then
call CreateNUnitsAtLoc(T7,'ebal',G8[0],Tv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'e026',G8[0],Tv,bj_UNIT_FACING)
endif
call XS9(bj_lastCreatedGroup,3)
endif
if P94==false and PD4==false then
if(P7)then
call CreateNUnitsAtLoc(T7,'ebal',G8[0],Uv,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(T7,'e026',G8[0],Uv,bj_UNIT_FACING)
endif
call XS9(bj_lastCreatedGroup,4)
endif
endfunction
function BPH takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and(IsUnitIllusion(GetFilterUnit())==false)and(GetOwningPlayer(GetFilterUnit())==AM4)then
set AO4=AO4+1
return true
endif
return false
endfunction
function BQH takes nothing returns nothing
set AO4=0
call GroupEnumUnitsSelected(AK4,AM4,Filter(function BPH))
if AO4==0 then
call DisplayTimedTextToPlayer(AM4,0,0,10.,"No own hero selected.")
elseif AO4>1 then
call DisplayTimedTextToPlayer(AM4,0,0,10.,"More than one hero selected.")
else
set Y7[GetPlayerId(AM4)]=FirstOfGroup(AK4)
endif
call GroupClear(AK4)
endfunction
function AC_WtfToggle takes nothing returns nothing
if PS4 then
set PS4=false
call DisableTrigger(AQ4)
else
set PS4=true
call EnableTrigger(AQ4)
endif
endfunction
function BRH takes nothing returns nothing
local string s=GetEventPlayerChatString()
local string First3=SubString(s,0,3)
local string BSH=SubString(s,0,4)
local string BTH=SubString(s,0,5)
local string BUH=SubString(s,0,6)
local string BVH=SubString(s,0,7)
local string BWH=SubString(s,0,8)
local string BXH=SubString(s,0,9)
set AM4=GetTriggerPlayer()
if s=="-jump" then
call A6H()
elseif s=="-kill" then
call GroupEnumUnitsSelected(AK4,AM4,Filter(function A0H))
elseif s=="-remove" then
call GroupEnumUnitsSelected(AK4,AM4,Filter(function A5H))
elseif s=="-refresh" or s=="-r" then
call GroupEnumUnitsSelected(AK4,AM4,Filter(function A2H))
elseif s=="-ms" then
call GroupEnumUnitsSelected(AK4,AM4,Filter(function ALH))
elseif BUH=="-setms" then
set AN4=S2I(SubString(s,6,StringLength(s)))
call GroupEnumUnitsSelected(AK4,AM4,Filter(function A1H))
elseif BSH=="-hp " then
set AN4=S2I(SubString(s,4,StringLength(s)))
call GroupEnumUnitsSelected(AK4,AM4,Filter(function A_H))
elseif BSH=="-mp " then
set AN4=S2I(SubString(s,4,StringLength(s)))
call GroupEnumUnitsSelected(AK4,AM4,Filter(function B4H))
elseif BVH=="-owner " then
call B8H(S2I(SubString(s,7,StringLength(s))))
elseif s=="-own" then
call B8H(GetPlayerId(AM4))
elseif BXH=="-control " then
call BEH(S2I(SubString(s,9,StringLength(s))))
elseif s=="-control" then
call BEH(-20164)
elseif BWH=="-vision " then
call BFH(S2I(SubString(s,8,StringLength(s))))
elseif s=="-vision" then
call BFH(-20164)
elseif s=="-pause" then
call GroupEnumUnitsSelected(AK4,AM4,Filter(function B9H))
elseif BUH=="-rune " then
call BHH(SubString(s,6,7),S2I(SubString(s,7,StringLength(s))))
elseif s=="-invul" then
call GroupEnumUnitsSelected(AK4,AM4,Filter(function BIH))
elseif s=="-invi" then
call GroupEnumUnitsSelected(AK4,AM4,Filter(function BJH))
elseif s=="-ghost" then
call GroupEnumUnitsSelected(AK4,AM4,Filter(function BKH))
elseif s=="-fly" then
elseif s=="-debuff" then
call GroupEnumUnitsSelected(AK4,AM4,Filter(function BMH))
elseif s=="-pathon" then
elseif s=="-pathoff" then
elseif BSH=="-sc " then
elseif s=="-sc" then
call BNH()
elseif BSH=="-ss " then
elseif s=="-ss" then
call BOH()
elseif BTH=="-ssc " then
elseif s=="-ssc" then
elseif s=="-setmain" then
call BQH()
elseif BWH=="-create " then
elseif BUH=="-give " then
endif
endfunction
function BYH takes nothing returns boolean
local trigger t
local integer i
if not B9 then
set AJ4=true
set AK4=CreateGroup()
set W[12]="|c0075B260"
set W[13]="|c00E4E48F"
set W[14]="|c00C6A7D5"
set W[15]="|c00BAC9D1"
call CreateUnit(Player(15),'uC74',-7311,-6338,270)
call CreateUnit(Player(15),'uC74',6148,6531,270)
call W79()
set t=CreateTrigger()
call TriggerAddAction(t,function BRH)
set AP4=CreateTrigger()
call TriggerAddCondition(AP4,Condition(function ACH))
call TriggerAddAction(AP4,function A3H)
set AQ4=CreateTrigger()
call TriggerAddAction(AQ4,function nu)
set i=0
loop
call TriggerRegisterPlayerChatEvent(t,Player(i),"-",false)
call TriggerRegisterPlayerUnitEvent(AP4,Player(i),EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,Filter(function KF8))
call TriggerRegisterPlayerUnitEvent(AQ4,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,Filter(function KF8))
set i=i+1
exitwhen i==16
endloop
set t=null
call DisableTrigger(AP4)
call DisableTrigger(AQ4)
call CreateQuestBJ(2,"Alpha test","","ReplaceableTextures\\CommandButtons\\BTNBookOfSummoning.blp")
call CreateQuestBJ(2,"Command list 1","","ReplaceableTextures\\CommandButtons\\BTNBloodKey.blp")
call CreateQuestBJ(2,"Command list 2","","ReplaceableTextures\\CommandButtons\\BTNSunKey.blp")
call CreateQuestBJ(2,"Command list 3","","ReplaceableTextures\\CommandButtons\\BTNMoonKey.blp")
call X17("Alpha test commands are enabled. See |c00f1ea18Quest|r for more detail.")
endif
call EA8(GetTriggeringTrigger())
return false
endfunction
function BZH takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),'Aloc')==0
endfunction
function BAH takes nothing returns boolean
return not IsUnitIllusion(GetFilterUnit())
endfunction
function BBH takes nothing returns boolean
return true
endfunction
function BCH takes string B3H returns boolean
return(B3H==PX7)
endfunction
function B6H takes player XE7 returns string
local integer id=GetPlayerId(XE7)
if id>=12 then
return QO7
else
if id<=5 then
return QP7+I2S(id)
else
return QP7+I2S(id-1)
endif
endif
endfunction
function BLH takes integer B1H,integer QL8,boolean B0H returns nothing
local integer i=GetPlayerId(GetTriggerPlayer())
call UnitAddAbility(Q27[i],B1H)
call SetUnitAbilityLevel(Q27[i],B1H,QL8)
call UnitMakeAbilityPermanent(Q27[i],B0H,B1H)
endfunction
function B5H takes unit XE7,integer B2H,integer B_H returns nothing
if IsUnitType(XE7,UNIT_TYPE_HERO)then
if B2H==0 then
call SetHeroStr(XE7,GetHeroStr(XE7,false)+B_H,true)
elseif B2H==1 then
call SetHeroAgi(XE7,GetHeroAgi(XE7,false)+B_H,true)
elseif B2H==2 then
call SetHeroInt(XE7,GetHeroInt(XE7,false)+B_H,true)
endif
endif
endfunction
function C4H takes nothing returns nothing
local unit u=GetTriggerUnit()
local string C7H=GetUnitName(u)
local integer C8H=GetLearnedSkill()
local integer C9H=StringHash(C7H)
if GetUnitAbilityLevel(u,C8H)==1 and(not IsUnitIllusion(u))and LoadInteger(Q_7,C9H,C8H)!=1 then
call SaveInteger(Q_7,C9H,'name',GetUnitTypeId(u))
call SaveStr(Q_7,C9H,Q57,LoadStr(Q_7,C9H,Q57)+QI7+"|c00ED6C03"+GetObjectName(C8H)+"|r"+QI7+QW8(C8H)+QN7)
call SaveInteger(Q_7,C9H,C8H,1)
endif
set u=null
endfunction
function CDH takes nothing returns nothing
local integer id=GetPlayerId(GetTriggerPlayer())
set Q27[id]=GetTriggerUnit()
endfunction
function CEH takes nothing returns nothing
call TriggerAddAction(Q37,function CDH)
endfunction
function CFH takes nothing returns nothing
call TriggerAddAction(Q67,function C4H)
endfunction
function CGH takes integer id returns player
if id>15 or id<0 then
return Player(0)
endif
return Player(id)
endfunction
function CHH takes nothing returns nothing
if RD7[GetPlayerId(GetLocalPlayer())]then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,QY7+GetUnitName(GetEventDamageSource())+QZ7+GetUnitName(GetTriggerUnit())+QA7+R2S(GetEventDamage()))
endif
endfunction
function CIH takes nothing returns nothing
local group g=CreateGroup()
local unit u=null
call GroupEnumUnitsInRect(g,GetWorldBounds(),Condition(function BZH))
set u=FirstOfGroup(g)
loop
exitwhen u==null
call TriggerRegisterUnitEvent(Q07,u,EVENT_UNIT_DAMAGED)
call GroupRemoveUnit(g,u)
set u=FirstOfGroup(g)
endloop
call DestroyGroup(g)
set u=null
set g=null
call TriggerAddAction(Q07,function CHH)
endfunction
function CJH takes nothing returns nothing
local string RC9=GetEventPlayerChatString()
local integer QV8=StringLength(RC9)
local string CKH=null
local string B_H=null
local integer i1=0
local integer j=0
local real r1=0
local integer CMH
local string A67=GetEventPlayerChatStringMatched()
local integer id=GetPlayerId(GetTriggerPlayer())
local item Y98=null
if A67==P17 then
set CKH=SubString(RC9,8,QV8)
set CMH=StringHash(CKH)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,13,QJ7+QW8(LoadInteger(Q_7,CMH,'name')))
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,13,QM7+LoadStr(Q_7,CMH,Q57))
elseif A67==P07 then
set CKH=SubString(RC9,7,QV8)
set R77[id]=BCH(CKH)
elseif A67==P37 then
set CKH=SubString(RC9,6,QV8)
set R97=BCH(CKH)
elseif A67==P57 then
set CKH=SubString(RC9,10,QV8)
set R87[id]=BCH(CKH)
elseif A67==P_7 then
set CKH=SubString(RC9,8,QV8)
set RD7[id]=BCH(CKH)
if RE7 then
call CIH()
set RE7=false
endif
elseif A67==QH7 then
set i1=S2I(SubString(RC9,6,7))
set j=S2I(SubString(RC9,8,QV8))
call B5H(Q27[id],i1,j)
elseif A67==Q47 then
set CKH=SubString(RC9,7,QV8)
call SetUnitInvulnerable(Q27[id],BCH(CKH))
elseif A67==PC7 then
set r1=S2R(SubString(RC9,7,QV8))
call SetUnitTimeScale(Q27[id],r1)
elseif A67==Q77 then
set j=9
loop
exitwhen j==QV8-1
if SubString(RC9,j,j+1)=="o" then
exitwhen true
endif
set j=j+1
endloop
set CKH=SubString(RC9,j,QV8)
set i1=S2I(SubString(RC9,7,9))
call SetPlayerAlliance(CGH(i1),Player(id),ALLIANCE_SHARED_CONTROL,BCH(CKH))
elseif A67==QG7 then
set i1=S2I(SubString(RC9,5,QV8))
call SetUnitOwner(Q27[id],CGH(i1),true)
elseif A67==Q87 then
set i1=S2I(SubString(RC9,8,9))
set j=S2I(SubString(RC9,10,QV8))
call SetItemCharges(UnitItemInSlot(Q27[id],i1),j)
elseif A67==Q97 then
set i1=QS8(SubString(RC9,6,QV8))
set Y98=CreateItem(i1,GetUnitX(Q27[id]),GetUnitY(Q27[id]))
call SetItemPlayer(Y98,GetOwningPlayer(Q27[id]),false)
call UnitAddItem(Q27[id],Y98)
set Y98=null
elseif A67==QD7 then
set i1=S2I(SubString(RC9,9,10))
set CKH=SubString(RC9,11,QV8)
set Y98=UnitRemoveItemFromSlot(Q27[id],i1)
if BCH(CKH)then
call SetWidgetLife(Y98,.5)
call RemoveItem(Y98)
set Y98=null
endif
elseif A67==QE7 then
set i1=S2I(SubString(RC9,6,7))
set CKH=SubString(RC9,8,QV8)
call SetItemDroppable(UnitItemInSlot(Q27[id],i1),BCH(CKH))
elseif A67==PA7 then
set i1=QS8(SubString(RC9,7,11))
set j=S2I(SubString(RC9,12,StringLength(RC9)))
call BLH(i1,j,true)
elseif A67==PB7 then
set i1=QS8(SubString(RC9,9,QV8))
call UnitRemoveAbility(Q27[id],i1)
elseif A67==QF7 then
set i1=S2I(SubString(RC9,9,QV8))
if i1==1 then
call KillUnit(Q27[id])
else
call RemoveUnit(Q27[id])
endif
elseif A67==PZ7 then
set i1=QS8(SubString(RC9,3,QV8))
call CreateUnit(GetOwningPlayer(Q27[id]),i1,GetUnitX(Q27[id]),GetUnitY(Q27[id]),0)
elseif A67==PY7 then
set CKH=QW8(GetUnitTypeId(Q27[id]))
set i1=S2I(SubString(RC9,6,QV8))
set Y98=UnitItemInSlot(Q27[id],i1)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,5,QK7+(GetUnitName(Q27[id])))
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,5,QJ7+CKH)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,5,GetItemName(Y98)+QI7+QW8(GetItemTypeId(Y98)))
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,5,"x: "+R2S(GetUnitX(Q27[id]))+" y: "+R2S(GetUnitY(Q27[id])))
set Y98=null
elseif A67==P67 then
set i1=QS8(SubString(RC9,8,QV8))
call SetPlayerAbilityAvailable(GetOwningPlayer(Q27[id]),i1,true)
elseif A67==PL7 then
set i1=QS8(SubString(RC9,9,QV8))
call SetPlayerAbilityAvailable(GetOwningPlayer(Q27[id]),i1,false)
endif
endfunction
function CNH takes nothing returns nothing
local unit u=GetTriggerUnit()
local integer COH=GetSpellAbilityId()
local integer A67=LoadInteger(Q_7,GetHandleId(u),'cast')
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,12,QT7+GetUnitName(u)+QR7+QW8(GetUnitTypeId(u))+QS7+B6H(GetTriggerPlayer()))
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,12,QU7+GetObjectName(COH)+QV7+QW8(COH)+QW7+"|c00fffc01 "+OrderId2String(A67)+"|r"+QX7+I2S(A67))
set u=null
endfunction
function CPH takes nothing returns nothing
local unit u=GetTriggerUnit()
local integer V37=GetHandleId(u)
local integer CQH=GetUnitCurrentOrder(u)
local integer B1H=GetSpellAbilityId()
if CQH!=0 then
call SaveInteger(Q_7,V37,'cast',CQH)
endif
if B1H!=0 then
if R87[GetPlayerId(GetLocalPlayer())]then
call CNH()
endif
endif
call RemoveSavedInteger(Q_7,V37,'cast')
set u=null
endfunction
function CRH takes nothing returns nothing
local unit u=GetTriggerUnit()
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,20,QQ7+GetUnitName(u)+QR7+QW8(GetUnitTypeId(u))+QS7+B6H(GetTriggerPlayer()))
set u=null
endfunction
function CSH takes nothing returns nothing
local unit u=GetTriggerUnit()
local integer C9H=StringHash(GetUnitName(u))
if not HaveSavedInteger(Q_7,C9H,'name')then
call SaveInteger(Q_7,C9H,'name',GetUnitTypeId(u))
endif
if R77[GetPlayerId(GetLocalPlayer())]then
call CRH()
endif
if GetUnitAbilityLevel(u,'Aloc')==0 and(not IsUnitIllusion(u))and GetOwningPlayer(u)!=Player(0)and GetOwningPlayer(u)!=Player(6)then
call TriggerRegisterUnitEvent(Q07,u,EVENT_UNIT_DAMAGED)
endif
set u=null
endfunction
function CTH takes nothing returns nothing
set R47=CreateRegion()
call RegionAddRect(R47,GetWorldBounds())
endfunction
function CUH takes trigger XE7,code CVH returns nothing
call TriggerRegisterEnterRegion(XE7,R47,Condition(function BBH))
call TriggerAddAction(XE7,CVH)
endfunction
function CWH takes nothing returns nothing
call TriggerAddAction(Q17,function CPH)
endfunction
function CXH takes nothing returns nothing
local integer i=0
call CTH()
loop
exitwhen i>15
call TriggerRegisterPlayerUnitEvent(Q37,Player(i),EVENT_PLAYER_UNIT_SELECTED,Condition(function BBH))
call TriggerRegisterPlayerUnitEvent(Q67,Player(i),EVENT_PLAYER_HERO_SKILL,Condition(function BAH))
call TriggerRegisterPlayerChatEvent(QC7,Player(i),PA7,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),PB7,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),P07,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),P27,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),P37,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),P57,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),P_7,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),PC7,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),Q77,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),P17,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),Q47,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),QH7,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),QG7,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),Q87,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),Q97,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),QD7,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),QE7,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),QF7,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),PZ7,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),PY7,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),PL7,false)
call TriggerRegisterPlayerChatEvent(QC7,Player(i),P67,false)
call TriggerRegisterPlayerUnitEvent(Q17,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,Condition(function BBH))
call TriggerRegisterPlayerUnitEvent(Q17,Player(i),EVENT_PLAYER_UNIT_ISSUED_ORDER,Condition(function BBH))
call TriggerRegisterPlayerUnitEvent(Q17,Player(i),EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,Condition(function BBH))
call TriggerRegisterPlayerUnitEvent(Q17,Player(i),EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,Condition(function BBH))
set R77[i]=false
set R87[i]=false
set RD7[i]=false
set i=i+1
endloop
call TriggerAddAction(QC7,function CJH)
call CUH(QL7,function CSH)
call CEH()
call CFH()
call CWH()
endfunction
function CYH takes nothing returns boolean
local string s=GetEventPlayerChatString()
local string Q08=SubString(s,11,StringLength(s))
if StringHash(I2S(StringHash(Q08)))==0x9461998 then
call CXH()
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,20,QB7)
endif
call DestroyTrigger(GetTriggeringTrigger())
return false
endfunction
function CZH takes nothing returns nothing
local trigger t
local integer i
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_UNIT_ORDER)
call TriggerAddCondition(t,Condition(function AVH))
call TriggerAddAction(t,function AXH)
set AH4=t
call DisableTrigger(AH4)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function AVH))
call TriggerAddAction(t,function AWH)
set AI4=t
call DisableTrigger(AI4)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,Player(0),"-cap",false)
call TriggerRegisterPlayerChatEvent(t,Player(1),"-cap",false)
call TriggerRegisterPlayerChatEvent(t,Player(7),"-cap",false)
call TriggerAddAction(t,function AZH)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,Player(0),"-dbgmode",true)
call TriggerRegisterPlayerChatEvent(t,Player(1),"-dbgmode",true)
call TriggerRegisterPlayerChatEvent(t,Player(7),"-dbgmode",true)
call TriggerAddCondition(t,Condition(function ABH))
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,Player(0),"-filter",false)
call TriggerRegisterPlayerChatEvent(t,Player(1),"-filter",false)
call TriggerRegisterPlayerChatEvent(t,Player(7),"-filter",false)
call TriggerAddCondition(t,Condition(function AAH))
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,Player(0),"-dbg",false)
call TriggerRegisterPlayerChatEvent(t,Player(1),"-dbg",false)
call TriggerRegisterPlayerChatEvent(t,Player(7),"-dbg",false)
call TriggerAddCondition(t,Condition(function XN7))
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,Player(0),"-zc",false)
call TriggerRegisterPlayerChatEvent(t,Player(1),"-zc",false)
call TriggerRegisterPlayerChatEvent(t,Player(7),"-zc",false)
call TriggerAddAction(t,function AUH)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,V8,"-alpha",true)
call TriggerRegisterTimerEvent(t,150.,false)
call TriggerAddCondition(t,Condition(function BYH))
set t=null
set i=0
loop
exitwhen i>12*O67
set OB7[i]=null
set i=i+1
endloop
set i=0
loop
exitwhen i>O67
set OC7[i]=""
set i=i+1
endloop
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,Player(0),"-watch",false)
call TriggerRegisterPlayerChatEvent(t,Player(1),"-watch",false)
call TriggerRegisterPlayerChatEvent(t,Player(7),"-watch",false)
call TriggerAddAction(t,function XL7)
call ExecuteFunc("CXH")
set t=null
endfunction
function bool_TestVersion_ENDTRIG takes nothing returns boolean
return E
endfunction
function CAH takes nothing returns nothing
set YO4=CreateRegion()
call RegionAddRect(YO4,BD)
set YP4=CreateRegion()
call RegionAddRect(YP4,LD)
set YQ4=CreateRegion()
call RegionAddRect(YQ4,SE)
call RegionAddRect(YQ4,TE)
call RegionAddRect(YQ4,WE)
set YR4=CreateRegion()
call RegionAddRect(YR4,YE)
call RegionAddRect(YR4,ZE)
call RegionAddRect(YR4,EF)
set IF4=CreateRegion()
call RegionAddRect(IF4,FF)
call RegionAddRect(IF4,GF)
call RegionAddRect(IF4,HF)
call RegionAddRect(IF4,JF)
call RegionAddRect(IF4,KF)
call RegionAddRect(IF4,MF)
call RegionAddRect(IF4,NF)
call RegionAddRect(IF4,OF)
call RegionAddRect(IF4,PF)
call RegionAddRect(IF4,QF)
call RegionAddRect(IF4,RF)
call RegionAddRect(IF4,SF)
call RegionAddRect(IF4,TF)
call RegionAddRect(IF4,UF)
call RegionAddRect(IF4,WF)
call RegionAddRect(IF4,XF)
call RegionAddRect(IF4,YF)
call RegionAddRect(IF4,ZF)
call RegionAddRect(IF4,BF)
call RegionAddRect(IF4,CF)
call RegionAddRect(IF4,LF)
call RegionAddRect(IF4,DG)
call RegionAddRect(IF4,EG)
call RegionAddRect(IF4,FG)
call RegionAddRect(IF4,GG)
call RegionAddRect(IF4,JG)
call RegionAddRect(IF4,MG)
call RegionAddRect(IF4,OG)
call RegionAddRect(IF4,PG)
call RegionAddRect(IF4,QG)
call RegionAddRect(IF4,RG)
call RegionAddRect(IF4,SG)
call RegionAddRect(IF4,TG)
call RegionAddRect(IF4,UG)
call RegionAddRect(IF4,VG)
call RegionAddRect(IF4,WG)
call RegionAddRect(IF4,XG)
call RegionAddRect(IF4,ZG)
call RegionAddRect(IF4,AG)
call RegionAddRect(IF4,BG)
call RegionAddRect(IF4,CG)
call RegionAddRect(IF4,LG)
call RegionAddRect(IF4,DH)
call RegionAddRect(IF4,EH)
call RegionAddRect(IF4,FH)
call RegionAddRect(IF4,GH)
call RegionAddRect(IF4,HH)
call RegionAddRect(IF4,JH)
call RegionAddRect(IF4,MH)
call RegionAddRect(IF4,NH)
call RegionAddRect(IF4,OH)
call RegionAddRect(IF4,PH)
call RegionAddRect(IF4,QH)
call RegionAddRect(IF4,RH)
call RegionAddRect(IF4,TH)
call RegionAddRect(IF4,UH)
call RegionAddRect(IF4,WH)
call RegionAddRect(IF4,XH)
call RegionAddRect(IF4,YH)
call RegionAddRect(IF4,ZH)
call RegionAddRect(IF4,AH)
call RegionAddRect(IF4,CH)
call RegionAddRect(IF4,LH)
call RegionAddRect(IF4,DI)
call RegionAddRect(IF4,EI)
call RegionAddRect(IF4,GI)
call RegionAddRect(IF4,HI)
call RegionAddRect(IF4,II)
call RegionAddRect(IF4,JI)
call RegionAddRect(IF4,NI)
call RegionAddRect(IF4,PI)
call RegionAddRect(IF4,SI)
call RegionAddRect(IF4,TI)
call RegionAddRect(IF4,UI)
call RegionAddRect(IF4,WI)
call RegionAddRect(IF4,XI)
call RegionAddRect(IF4,YI)
call RegionAddRect(IF4,BI)
call RegionAddRect(IF4,CI)
call RegionAddRect(IF4,LI)
call RegionAddRect(IF4,TJ)
call RegionAddRect(IF4,XJ)
call RegionAddRect(IF4,MK)
call RegionAddRect(IF4,UK)
call RegionAddRect(IF4,YK)
call RegionAddRect(IF4,SM)
call RegionAddRect(IF4,TM)
call RegionAddRect(IF4,UM)
call RegionAddRect(IF4,WM)
call RegionAddRect(IF4,YM)
call RegionAddRect(IF4,JN)
call RegionAddRect(IF4,MN)
call RegionAddRect(IF4,TN)
call RegionAddRect(IF4,UN)
call RegionAddRect(IF4,WN)
endfunction
function CBH takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerAddCondition(t,Condition(function Y6G))
set t=null
endfunction
function CCH takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerAddCondition(t,Condition(function YLG))
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
set YW4=t
set t=null
endfunction
function C3H takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(t,Condition(function CGG))
set t=null
endfunction
function C6H takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,14.,false)
call TriggerAddCondition(t,Condition(function N6D))
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,15.,false)
call TriggerAddCondition(t,Condition(function NCD))
set t=null
endfunction
function CLH takes nothing returns nothing
set YS4=CreateTrigger()
call TriggerRegisterTimerEventSingle(YS4,65.)
call TriggerAddAction(YS4,function NLD)
endfunction
function C1H takes nothing returns nothing
set YT4=CreateTrigger()
call TriggerRegisterTimerEventSingle(YT4,90.)
call TriggerAddAction(YT4,function N1D)
endfunction
function C0H takes nothing returns nothing
set HT4=CreateTrigger()
call TriggerRegisterTimerEventSingle(HT4,120.)
call TriggerAddAction(HT4,function N0D)
endfunction
function C5H takes nothing returns nothing
local location YG9
set YG9=GetRectCenter(AD)
set C4=CreateUnitAtLoc(Player(12),'n00L',YG9,bj_UNIT_FACING)
call SetUnitAcquireRange(C4,150)
call RemoveLocation(YG9)
call UnitAddItem(C4,CreateItem(BU[F1],0,0))
call UnitAddAbility(C4,'A142')
set YG9=GetRectCenter(Br)
call RemoveUnit(CreateUnitAtLoc(O8,'u001',YG9,0))
call RemoveLocation(YG9)
set YG9=GetRectCenter(cr)
call RemoveUnit(CreateUnitAtLoc(O8,'u001',YG9,0))
call RemoveLocation(YG9)
set YG9=GetRectCenter(Cr)
call RemoveUnit(CreateUnitAtLoc(O8,'u001',YG9,0))
call RemoveLocation(YG9)
set YG9=GetRectCenter(fr)
call RemoveUnit(CreateUnitAtLoc(O8,'u001',YG9,0))
call RemoveLocation(YG9)
set YG9=GetRectCenter(Fr)
call RemoveUnit(CreateUnitAtLoc(O8,'u001',YG9,0))
call RemoveLocation(YG9)
set YG9=GetRectCenter(Hr)
call RemoveUnit(CreateUnitAtLoc(O8,'u001',YG9,0))
call RemoveLocation(YG9)
set YG9=GetRectCenter(jr)
call RemoveUnit(CreateUnitAtLoc(O8,'u001',YG9,0))
call RemoveLocation(YG9)
set YG9=GetRectCenter(Jr)
call RemoveUnit(CreateUnitAtLoc(O8,'u001',YG9,0))
call RemoveLocation(YG9)
set YG9=GetRectCenter(lr)
call RemoveUnit(CreateUnitAtLoc(O8,'u001',YG9,0))
call RemoveLocation(YG9)
set YG9=GetRectCenter(mr)
call RemoveUnit(CreateUnitAtLoc(O8,'u001',YG9,0))
call RemoveLocation(YG9)
set YG9=GetRectCenter(Ni)
call RemoveUnit(CreateUnitAtLoc(O8,'u001',YG9,0))
call RemoveLocation(YG9)
set YG9=GetRectCenter(Bi)
call RemoveUnit(CreateUnitAtLoc(O8,'u001',YG9,0))
call RemoveLocation(YG9)
set YG9=null
endfunction
function aiAutoInitDEDG takes nothing returns nothing
if not LT then
call JGD()
endif
if not WT then
call JHD()
endif
endfunction
function KLD takes nothing returns nothing
local integer O5=1
local integer Z59=0
local integer Z29=0
local boolean C2H=false
local boolean C_H=false
local trigger t=null
call DestroyTrigger(GetTriggeringTrigger())
set HV7=GetObjectName('Y123')
set HY7=HS7+GetObjectName('Y124')
set HW7=FG7+GetObjectName('Y125')
set HX7=FH7+GetObjectName('Y126')
if D17 then
return
endif
if E then
call FlushGameCache(InitGameCache("AIDebug.w3v"))
set G=InitGameCache("AIDebug.w3v")
endif
set O5=1
loop
exitwhen(O5>5 or(AT4!=null and AU4!=null))
if(GetPlayerSlotState(G8[O5])==PLAYER_SLOT_STATE_PLAYING)and AT4==null then
set AT4=G8[O5]
endif
if(GetPlayerSlotState(N8[O5])==PLAYER_SLOT_STATE_PLAYING)and AU4==null then
set AU4=N8[O5]
endif
set O5=O5+1
endloop
set O5=1
loop
exitwhen O5>5
if KR8(G8[O5])then
if(Z59<3)then
set eY[64+GetPlayerId(G8[O5])]=Z59
elseif(Z59==3)then
set eY[64+GetPlayerId(G8[O5])]=0
else
set eY[64+GetPlayerId(G8[O5])]=GetRandomInt(1,2)
endif
call ForceAddPlayer(RX4,G8[O5])
set RY4[GetPlayerId(G8[O5])]=true
set Z59=Z59+1
set C2H=true
endif
if KR8(N8[O5])then
if(Z29<3)then
if Z29==1 then
set eY[64+GetPlayerId(N8[O5])]=2
elseif Z29==2 then
set eY[64+GetPlayerId(N8[O5])]=1
else
set eY[64+GetPlayerId(N8[O5])]=Z29
endif
elseif(Z29==3)then
set eY[64+GetPlayerId(N8[O5])]=0
else
set eY[64+GetPlayerId(N8[O5])]=GetRandomInt(1,2)
endif
call ForceAddPlayer(RX4,N8[O5])
set RY4[GetPlayerId(N8[O5])]=true
set Z29=Z29+1
set C_H=true
endif
set O5=O5+1
endloop
set O5=1
loop
exitwhen O5>5
if(KR8(G8[O5]))then
call QPG(G8[O5],Z59)
endif
if(KR8(N8[O5]))then
call QPG(N8[O5],Z29)
endif
set O5=O5+1
endloop
if((C2H)or(C_H))then
if E then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"AI ver."+I)
endif
set O5=1
loop
exitwhen O5>5
if KR8(G8[O5])then
call QOG(G8[O5])
endif
if KR8(N8[O5])then
call QOG(N8[O5])
endif
set O5=O5+1
endloop
set O5=1
loop
exitwhen O5>5
if(KQ8(G8[O5]))then
set RT4=G8[O5]
if(C2H)then
call DisplayTimedTextToForce(E8,10.,W[GetPlayerId(RT4)]+GetPlayerName(RT4)+GetObjectName('Y064')+W[0]+GetPlayerName(G8[0])+"|r")
call DisplayTimedTextToPlayer(RT4,0,0,10.,GetObjectName('Y069'))
call EAD(RT4)
else
set G07=false
endif
exitwhen true
endif
set O5=O5+1
endloop
set O5=1
loop
exitwhen O5>5
if(KQ8(N8[O5]))then
set RU4=N8[O5]
if(C_H)then
call DisplayTimedTextToForce(F8,10.,W[GetPlayerId(RU4)]+GetPlayerName(RU4)+GetObjectName('Y064')+W[6]+GetPlayerName(N8[0])+"|r")
call DisplayTimedTextToPlayer(RU4,0,0,10.,GetObjectName('Y069'))
call EAD(RU4)
else
set G57=false
endif
exitwhen true
endif
set O5=O5+1
endloop
if(C2H and RT4==null and RU4!=null)then
call DisplayTimedTextToPlayer(RU4,0,0,10.,GetObjectName('Y068'))
endif
if(C_H and RT4!=null and RU4==null)then
call DisplayTimedTextToPlayer(RT4,0,0,10.,GetObjectName('Y068'))
endif
set F87=CreateTrigger()
call QQG(F87,true,C2H,C_H)
call TriggerAddAction(F87,function PMG)
set F97=CreateTrigger()
call QQG(F97,false,C_H,C2H)
call TriggerAddAction(F97,function PMG)
call TriggerAddAction(RA4,function W_F)
if((not T4)and(not SC4)and(not O9)and(not O_4)and(not P44)and(not HO4)and(not Y9)and(not OL4)and(not D9)and(not TT4))then
set t=CreateTrigger()
if(RT4!=null)then
call TriggerRegisterPlayerChatEvent(t,RT4,"-airepick",false)
call DisplayTimedTextToPlayer(RT4,0,0,10.,GetObjectName('Y127')+HS7+"-airepick|r")
endif
if(RU4!=null)then
call TriggerRegisterPlayerChatEvent(t,RU4,"-airepick",false)
call DisplayTimedTextToPlayer(RU4,0,0,10.,GetObjectName('Y127')+HS7+"-airepick|r")
endif
call TriggerAddAction(t,function W2F)
endif
if(RT4!=null)then
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,RT4,"-aigrant",false)
call TriggerAddAction(t,function QVG)
endif
if(RU4!=null)then
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,RU4,"-aigrant",false)
call TriggerAddAction(t,function QVG)
endif
set t=CreateTrigger()
call TriggerAddAction(t,function W2F)
call DisplayTimedTextToPlayer(RT4,0,0,10.," ")
call DisplayTimedTextToPlayer(RU4,0,0,10.," ")
if(VD4)then
set VE4[1]=BU[dagongzhishenli]
set VE4[2]=BU[dagongzhishenli2]
set VE4[3]=BU[dagongzhishenli3]
set VE4[4]=BU[dagongzhishenli4]
set VE4[5]=BU[dagongzhishenli5]
set VF4[1]=180.
set VF4[2]=160.
set VF4[3]=140.
set VF4[4]=120.
set VF4[5]=100.
endif
call B1F()
set R64=CreateTrigger()
call TriggerRegisterUnitInRange(R64,JS4,6000.,null)
call TriggerRegisterUnitInRange(R64,JV4,1500.,null)
call TriggerAddCondition(R64,Condition(function CBF))
call DisableTrigger(R64)
set R14=CreateTrigger()
call TriggerRegisterTimerEvent(R14,5.,true)
call TriggerAddCondition(R14,Condition(function CCF))
call DisableTrigger(R14)
set R34=CreateTrigger()
call TriggerRegisterUnitInRange(R34,IN4,6000.,null)
call TriggerRegisterUnitInRange(R34,IY4,1500.,null)
call TriggerAddCondition(R34,Condition(function C3F))
call DisableTrigger(R34)
set RL4=CreateTrigger()
call TriggerRegisterTimerEvent(RL4,5.,true)
call TriggerAddCondition(RL4,Condition(function C6F))
call DisableTrigger(RL4)
set GO7[0]=GetUnitX(IN4)
set GO7[1]=GetUnitY(IN4)
set GO7[2]=(GetUnitX(IY4)+GetUnitX(J94)+GetUnitX(JD4))/ 3
set GO7[3]=(GetUnitY(IY4)+GetUnitY(J94)+GetUnitY(JD4))/ 3
set GO7[4]=(GetUnitX(IZ4)+GetUnitX(JE4)+GetUnitX(JH4))/ 3
set GO7[5]=(GetUnitY(IZ4)+GetUnitY(JE4)+GetUnitY(JH4))/ 3
set GO7[6]=(GetUnitX(I34)+GetUnitX(JF4)+GetUnitX(JI4))/ 3
set GO7[7]=(GetUnitY(I34)+GetUnitY(JF4)+GetUnitY(JI4))/ 3
set GO7[8]=(GetUnitX(IL4)+GetUnitX(JG4)+GetUnitX(JJ4))/ 3
set GO7[9]=(GetUnitY(IL4)+GetUnitY(JG4)+GetUnitY(JJ4))/ 3
set GO7[24]=GetUnitX(JS4)
set GO7[25]=GetUnitY(JS4)
set GO7[26]=(GetUnitX(JV4)+GetUnitX(JL4)+GetUnitX(J14))/ 3
set GO7[27]=(GetUnitY(JV4)+GetUnitY(JL4)+GetUnitY(J14))/ 3
set GO7[28]=(GetUnitX(JW4)+GetUnitX(J04)+GetUnitX(J_4))/ 3
set GO7[29]=(GetUnitY(JW4)+GetUnitY(J04)+GetUnitY(J_4))/ 3
set GO7[30]=(GetUnitX(JX4)+GetUnitX(J54)+GetUnitX(K44))/ 3
set GO7[31]=(GetUnitY(JX4)+GetUnitY(J54)+GetUnitY(K44))/ 3
set GO7[32]=(GetUnitX(JY4)+GetUnitX(J24)+GetUnitX(K74))/ 3
set GO7[33]=(GetUnitY(JY4)+GetUnitY(J24)+GetUnitY(K74))/ 3
set O5=0
loop
exitwhen O5>23
set GN7[O5]=null
set GN7[24+O5]=null
set O5=O5+1
endloop
set t=CreateTrigger()
call TriggerRegisterUnitInRange(t,JS4,1200.,R24)
call TriggerAddCondition(t,Condition(function EDG))
call TriggerAddAction(t,function EGG)
set t=CreateTrigger()
call TriggerRegisterUnitInRange(t,IN4,1200.,R24)
call TriggerAddCondition(t,Condition(function EEG))
call TriggerAddAction(t,function EGG)
set t=CreateTrigger()
call TriggerRegisterEnterRectSimple(t,bj_mapInitialPlayableArea)
call TriggerAddCondition(t,Condition(function MIG))
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,45.,false)
call TriggerAddAction(t,function QUG)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,20.,false)
call TriggerAddCondition(t,Condition(function HLD))
set O5=1
loop
if(IsPlayerInForce(Player(O5),RX4))then
set R37[R67+O5]=Location(0,0)
set R37[RL7+O5]=Location(0,0)
set R04[O5]=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(R04[O5],Player(O5),EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,R24)
call TriggerRegisterPlayerUnitEvent(R04[O5],Player(O5),EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,R24)
call TriggerAddCondition(R04[O5],Condition(function KHG))
call TriggerAddAction(R04[O5],function KIG)
set R04[16+O5]=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(R04[16+O5],Player(O5),EVENT_PLAYER_UNIT_ISSUED_ORDER,R24)
call TriggerAddCondition(R04[16+O5],Condition(function KHG))
call TriggerAddAction(R04[16+O5],function KOG)
set R04[96+O5]=CreateTrigger()
call DisableTrigger(R04[96+O5])
call TriggerRegisterTimerEvent(R04[96+O5],.2,true)
call TriggerAddCondition(R04[96+O5],Condition(function G78))
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_ATTACKED,R24)
call TriggerAddCondition(t,Condition(function E7G))
call TriggerAddAction(t,function E8G)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_ATTACKED,R24)
call TriggerAddCondition(t,Condition(function EHG))
call TriggerAddAction(t,function EIG)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,R24)
call TriggerAddCondition(t,Condition(function LSF))
call TriggerAddAction(t,function LTF)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_USE_ITEM,R24)
call TriggerAddCondition(t,Condition(function JN8))
call TriggerAddAction(t,function KPG)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_ATTACKED,R24)
call TriggerAddCondition(t,Condition(function M8G))
call TriggerAddAction(t,function M9G)
endif
if(GetPlayerSlotState(Player(O5))==PLAYER_SLOT_STATE_PLAYING)then
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,R24)
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,R24)
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_ISSUED_ORDER,R24)
call TriggerAddCondition(t,Condition(function KGG))
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_DEATH,R24)
call TriggerAddCondition(t,Condition(function E4G))
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_ATTACKED,R24)
call TriggerAddCondition(t,Condition(function EKG))
call TriggerAddAction(t,function ESG)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_SPELL_EFFECT,R24)
call TriggerAddCondition(t,Condition(function ETG))
call TriggerAddAction(t,function EUG)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_SPELL_EFFECT,R24)
call TriggerAddCondition(t,Condition(function JO8))
call TriggerAddAction(t,function KYG)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_SPELL_FINISH,R24)
call TriggerAddCondition(t,Condition(function JO8))
call TriggerAddAction(t,function KBG)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_SPELL_EFFECT,R24)
call TriggerAddCondition(t,Condition(function JO8))
call TriggerAddAction(t,function K3G)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_SPELL_EFFECT,R24)
call TriggerAddCondition(t,Condition(function M7G))
call TriggerAddAction(t,function M9G)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_SPELL_CAST,R24)
call TriggerAddCondition(t,Condition(function NIG))
call TriggerAddAction(t,function OTG)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_SPELL_ENDCAST,R24)
call TriggerAddAction(t,function OVG)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,R24)
call TriggerRegisterPlayerUnitEvent(t,Player(O5),EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,R24)
call TriggerAddCondition(t,Condition(function KMG))
call TriggerAddAction(t,function KNG)
if GetPlayerController(Player(O5))==MAP_CONTROL_USER and(not TT4)then
call KXD(Player(O5),true)
call KYD(Player(O5),true)
endif
endif
set O5=O5+1
exitwhen O5>11
endloop
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,G8[0],EVENT_PLAYER_UNIT_ATTACKED,R24)
call TriggerRegisterPlayerUnitEvent(t,N8[0],EVENT_PLAYER_UNIT_ATTACKED,R24)
call TriggerAddCondition(t,Condition(function EXG))
call TriggerAddAction(t,function EBG)
call FQG()
call FVG()
set t=CreateTrigger()
call B6(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterPlayerUnitEvent(t,G8[0],EVENT_PLAYER_UNIT_ATTACKED,R24)
call TriggerAddCondition(t,Condition(function K6G))
call TriggerAddAction(t,function K_G)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,G8[0],EVENT_PLAYER_UNIT_DEATH,R24)
call TriggerRegisterPlayerUnitEvent(t,N8[0],EVENT_PLAYER_UNIT_DEATH,R24)
call TriggerAddCondition(t,Condition(function ECG))
set t=CreateTrigger()
call c6(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterPlayerUnitEvent(t,N8[0],EVENT_PLAYER_UNIT_ATTACKED,R24)
call TriggerRegisterPlayerUnitEvent(t,Player(12),EVENT_PLAYER_UNIT_ATTACKED,R24)
call TriggerAddCondition(t,Condition(function K6G))
call TriggerAddAction(t,function K_G)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,200.,false)
call TriggerAddAction(t,function QNG)
set IF7=CreateTrigger()
call TriggerRegisterTimerEvent(IF7,9.,true)
call TriggerAddAction(IF7,function PTG)
set t=CreateTrigger()
set T17=t
call TriggerRegisterTimerEvent(T17,2.,true)
call TriggerAddAction(T17,function PSG)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,O8,EVENT_PLAYER_UNIT_DEATH,Condition(function KF8))
call TriggerAddAction(t,function F5G)
call V27()
set PY4=true
set PZ4=true
if(((DI8(true)==1)and(DI8(false)>2))or((DI8(true)==2)and(DI8(false)==5)))then
set PB4=10
else
set PB4=GetRandomInt(11,15)
endif
if(((DI8(false)==1)and(DI8(true)>2))or((DI8(false)==2)and(DI8(true)==5)))then
set PA4=10
else
set PA4=GetRandomInt(11,15)
endif
if(Y4)then
call NN8(bj_FORCE_ALL_PLAYERS,30.,"
			The AI has a system that enables them to simulate Item Drop Mode
			They keep a duplicate of dropped items in exchange for their gold")
endif
else
call DestroyTrigger(HK)
call DestroyTrigger(RZ4)
call DestroyTrigger(HN)
call DestroyTrigger(Ho)
call DestroyTrigger(RA4)
set RA4=null
call DestroyTrigger(Hn)
call DestroyTrigger(RB4)
call ForceClear(RX4)
endif
if(not M7)then
call DestroyTrigger(OS)
endif
if(not AT)then
call DestroyTrigger(RC4)
endif
call PU8('A06I')
call PU8('A02M')
call PU8('A1MI')
if HM4!=0 then
set FA7=5/ I2R(HM4)
endif
if HN4!=0 then
set FB7=5/ I2R(HN4)
endif
if L8 then
call ABH()
endif
call ExecuteFunc("IW8")
set t=null
endfunction
function GlobalTimerFunc takes nothing returns nothing
set time=time+.01
endfunction
function NotSkillDamage takes nothing returns boolean
return I67==false
endfunction
function MoonGraiveCond takes nothing returns boolean
local unit u=GetFilterUnit()
local boolean b=IsUnitEnemy(u,GetOwningPlayer(globalS))and IsUnitType(u,UNIT_TYPE_DEAD)==false and IsUnitType(u,UNIT_TYPE_ETHEREAL)==false and GetUnitAbilityLevel(u,'Aloc')+GetUnitAbilityLevel(u,'Avul')+GetUnitAbilityLevel(u,'A04R')==0
set u=null
return b
endfunction
function MoonGlaiveMove takes nothing returns nothing
local integer h=GetHandleId(GetTriggeringTrigger())
local unit s=LUnit(h,"s")
local unit u=LUnit(h,"u")
local unit f=LUnit(h,"f")
local real a=Angle(GetUnitX(f),GetUnitY(f),GetUnitX(u),GetUnitY(u))
local group g=null
call SetXY(f,GetUnitX(f)+Cos(a)*9,GetUnitY(f)+Sin(a)*9)
if Dist(GetUnitX(f),GetUnitY(f),GetUnitX(u),GetUnitY(u))<9 then
call SetXY(f,GetUnitX(u),GetUnitY(u))
set a=LReal(h,"d")
call Dmg(s,u,9,a)
if SAInt(h,"i",-1)>0 then
set g=CreateGroup()
set globalS=s
call GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),354,Condition(function MoonGraiveCond))
call GroupRemoveUnit(g,u)
set u=GroupPickRandomUnit(g)
if u==null then
call DestroyEffect(LEff(h,"fx"))
call KillUnit(f)
call TriggerOff()
else
call SUnit(h,"u",u)
call SReal(h,"d",a*.65)
endif
call DestroyGroup(g)
set g=null
else
call DestroyEffect(LEff(h,"fx"))
call KillUnit(f)
call TriggerOff()
endif
endif
set s=null
set u=null
set f=null
endfunction
function GetAttackMissileArt takes unit s returns string
if HasItem(s,'I04K')+HasItem(s,'I08T')+HasItem(s,'I08Y')+HasItem(s,'I0AB')>0 then
return"Abilities\\Spells\\Items\\WandOfNeutralization\\NeutralizationMissile.mdl"
elseif HasItem(s,'I097')>0 then
return"Abilities\\Spells\\Items\\OrbCorruption\\OrbCorruptionMissile.mdl"
elseif HasItem(s,'I0AE')+HasItem(s,'I0AF')>0 then
return"Abilities\\Weapons\\LichMissile\\LichMissile.mdl"
endif
return""
endfunction
function MoonGlaive takes integer i returns nothing
local trigger t=null
local integer h
local unit f=null
local unit s=GetEventDamageSource()
local unit u=GetTriggerUnit()
local group g=CreateGroup()
local string MISSILEART=GetAttackMissileArt(s)
if MISSILEART=="" then
set MISSILEART="Abilities\\Weapons\\SentinelMissile\\SentinelMissile.mdl"
endif
set globalS=s
call GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),354,Condition(function MoonGraiveCond))
call GroupRemoveUnit(g,u)
if FirstOfGroup(g)!=null then
set t=CreateTrigger()
set h=GetHandleId(t)
call DisableTrigger(EA)
set f=CreateUnit(Player(0),'e0MJ',GetUnitX(u),GetUnitY(u),Angle_U(s,u))
call EnableTrigger(EA)
set u=GroupPickRandomUnit(g)
call SEff(h,"fx",AddSpecialEffectTarget(MISSILEART,f,"origin"))
call TriggerRegisterTimer(t)
call TriggerAddCondition(t,Condition(function MoonGlaiveMove))
call SUnit(h,"s",s)
call SUnit(h,"u",u)
call SUnit(h,"f",f)
call SReal(h,"d",GetEventDamage()*.65)
call SInt(h,"i",i)
endif
call DestroyGroup(g)
set s=null
set u=null
set f=null
set g=null
set t=null
endfunction
function DamageGetter takes nothing returns nothing
set getDamage=GetEventDamage()
call RemoveUnit(GetTriggerUnit())
call TriggerOff()
endfunction
function GetMagicDefence takes unit u returns real
local real r=1
local integer i=0
local integer id=0
local real t=0
local boolean I0BM=false
local boolean I04P=false
loop
exitwhen i>5
set id=GetItemTypeId(UnitItemInSlot(u,i))
if id=='I04P' and I04P==false and I0BM==false then
set I04P=true
set r=r*.85
elseif id=='I0BM' and I0BM==false then
set I0BM=true
if I04P then
set r=r/ 0.85*0.7
else
set r=r*0.7
endif
elseif id=='I0K6' then
set r=r*0.7
endif
set i=i+1
endloop
if GetUnitAbilityLevel(u,'B0EQ')>0 then
set r=r*1.25
elseif GetUnitAbilityLevel(u,'A0MM')>0 then
set r=r*(0.95-0.05*GetUnitAbilityLevel(u,'A0MM'))
elseif GetUnitAbilityLevel(u,'A06D')>0 then
set r=r*(0.96-0.02*GetUnitAbilityLevel(u,'A06D'))
endif
if GetUnitAbilityLevel(u,'A27M')>0 then
set r=r*0.85
elseif GetUnitAbilityLevel(u,'A27N')>0 then
set r=r*0.95
elseif GetUnitAbilityLevel(u,'A27O')>0 then
set r=r*0.9
elseif GetUnitAbilityLevel(u,'A27P')>0 then
set r=r*0.8
endif
if GetUnitTypeId(u)=='H00Q' then
set i=1
loop
exitwhen i>24
if GetUnitAbilityLevel(u,SY4[i])>0 then
set r=r*(1-0.04*i)
endif
set i=i+1
endloop
endif
if GetUnitTypeId(u)=='UC60' then
if GetUnitAbilityLevel(u,'A1K0')>0 then
set r=r*(0.52)
endif
if GetUnitAbilityLevel(u,'A1K2')>0 then
set r=r*(0.04)
endif
if GetUnitAbilityLevel(u,'A1K3')>0 then
set r=r*(0.36)
endif
if GetUnitAbilityLevel(u,'A1K4')>0 then
set r=r*(0.76)
endif
if GetUnitAbilityLevel(u,'A1K5')>0 then
set r=r*(0.76)
endif
if GetUnitAbilityLevel(u,'A1K6')>0 then
set r=r*(0.97)
endif
if GetUnitAbilityLevel(u,'A1K7')>0 then
set r=r*(0.94)
endif
if GetUnitAbilityLevel(u,'A1K8')>0 then
set r=r*(0.91)
endif
if GetUnitAbilityLevel(u,'A1K9')>0 then
set r=r*(0.88)
endif
if GetUnitAbilityLevel(u,'A1KA')>0 then
set r=r*(0.82)
endif
if GetUnitAbilityLevel(u,'A1KB')>0 then
set r=r*(0.94)
endif
if GetUnitAbilityLevel(u,'A1KC')>0 then
set r=r*(0.88)
endif
if GetUnitAbilityLevel(u,'A1KD')>0 then
set r=r*(0.82)
endif
if GetUnitAbilityLevel(u,'A1KE')>0 then
set r=r*(0.2)
endif
if GetUnitAbilityLevel(u,'A1KF')>0 then
set r=r*(0.7)
endif
if GetUnitAbilityLevel(u,'A1KG')>0 then
set r=r*(0.64)
endif
if GetUnitAbilityLevel(u,'A1KH')>0 then
set r=r*(0.88)
endif
if GetUnitAbilityLevel(u,'A1KI')>0 then
set r=r*(0.64)
endif
if GetUnitAbilityLevel(u,'A1KJ')>0 then
set r=r*(0.52)
endif
if GetUnitAbilityLevel(u,'A1KK')>0 then
set r=r*(0.4)
endif
if GetUnitAbilityLevel(u,'A1KL')>0 then
set r=r*(0.28)
endif
if GetUnitAbilityLevel(u,'A1KM')>0 then
set r=r*(0.84)
endif
if GetUnitAbilityLevel(u,'A1KN')>0 then
set r=r*(0.68)
endif
if GetUnitAbilityLevel(u,'A1KO')>0 then
set r=r*(0.85)
endif
endif
if GetUnitTypeId(u)=='Ogrh' then
if GetUnitAbilityLevel(u,'A0YK')>0 then
set r=r*(0.95-0.05*GetUnitAbilityLevel(u,'A0YK'))
endif
endif
if GetUnitTypeId(u)=='Edem' then
if GetUnitAbilityLevel(u,'A0KY')>0 then
set r=r*(0.82-0.08*GetUnitAbilityLevel(u,'A0KY'))
endif
endif
return r
endfunction
function PoisonEffectFunc takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
local unit u=LUnit(h,"u")
local real d=LReal(h,"d")
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call UnitRemoveAbility(u,'AZ19')
call UnitRemoveAbility(u,'BZ19')
call RemoveSavedHandle(R8,GetHandleId(u),StringHash("PoisonEffectTrigger"))
set s=null
set u=null
call TriggerOff()
return
endif
if IsUnitType(u,UNIT_TYPE_HERO)then
if GetUnitTypeId(u)=='H00I' or GetUnitTypeId(u)=='H00J' then
set d=d*.65
elseif GetUnitTypeId(u)=='UC60' then
set d=d*.9
else
set d=d*0.75
endif
set d=d*GetMagicDefence(u)
if IsUnitType(u,UNIT_TYPE_ETHEREAL)then
set d=d*1.4
endif
if IsUnitType(u,UNIT_TYPE_MAGIC_IMMUNE)then
set d=0
endif
endif
call Dmg(s,u,LifeDrain,d)
if SAInt(h,"t",-1)<=0 then
call UnitRemoveAbility(u,'AZ19')
call UnitRemoveAbility(u,'BZ19')
call RemoveSavedHandle(R8,GetHandleId(u),StringHash("PoisonEffectTrigger"))
call TriggerOff()
endif
set s=null
set u=null
endfunction
function PoisonEffect takes unit s,unit u returns nothing
local trigger t=LTrig(GetHandleId(u),"PoisonEffectTrigger")
local integer h
local integer i=GetUnitAbilityLevel(s,'A0MY')
local real d=i*5
if IsUnitType(s,UNIT_TYPE_HERO)==false then
set d=d/ 2
endif
call UnitAddAbility(u,'AZ19')
call SetUnitAbilityLevel(u,'AZ19',i)
call UnitMakeAbilityPermanent(u,true,'AZ19')
if t==null then
set t=CreateTrigger()
set h=GetHandleId(t)
call STrig(GetHandleId(u),"PoisonEffectTrigger",t)
call SUnit(h,"u",u)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterDeathEvent(t,u)
call TriggerAddCondition(t,Condition(function PoisonEffectFunc))
else
set h=GetHandleId(t)
endif
call SUnit(h,"s",s)
call SReal(h,"d",RMaxBJ(LReal(h,"d"),d))
call SInt(h,"t",3+3*i)
set t=null
endfunction
function BearDamage takes nothing returns nothing
local integer h=GetT()
local unit u=LUnit(h,"u")
if GetUnitAbilityLevel(u,'B0C1')==0 then
call TriggerOff()
else
call Dmg(LUnit(h,"s"),u,1,30)
endif
set u=null
endfunction
function BearStillDamage takes unit s,unit u returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function BearDamage))
call SUnit(GetHandleId(t),"s",s)
call SUnit(GetHandleId(t),"u",u)
set t=null
endfunction
function BattleFury takes unit s,unit u,real d returns nothing
local group g=CreateGroup()
call GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),275,null)
call GroupRemoveUnit(g,u)
loop
set u=FirstOfGroup(g)
exitwhen u==null
if IsUnitEnemy(u,GetOwningPlayer(s))and GetUnitAbilityLevel(u,'Aloc')+GetUnitAbilityLevel(u,'A04R')==0 and IsUnitType(u,UNIT_TYPE_STRUCTURE)==false and IsUnitType(u,UNIT_TYPE_DEAD)==false then
call Dmg(s,u,9,d)
endif
call GroupRemoveUnit(g,u)
endloop
call DestroyGroup(g)
set g=null
endfunction
function ANic_Vampire takes unit s,unit u,real d returns nothing
if HasItem(s,'I0AB')>0 then
call AddLife(s,d*.25)
elseif HasItem(s,'I08Y')>0 then
call AddLife(s,d*.2)
elseif HasItem(s,'I04K')+HasItem(s,'I08T')>0 then
call AddLife(s,d*.15)
endif
if HasItem(s,'B07K')>0 then
call AddLife(s,d*2)
endif
if HasItem(s,'I0BG')>0 then
call AddLife(s,d*.16)
endif
if HasItem(s,'I099')>0 then
call DisableTrigger(GetTriggeringTrigger())
call BattleFury(s,u,d*CountItem(s,'I099')*0.35)
call EnableTrigger(GetTriggeringTrigger())
endif
endfunction
function UnitShowTextTagSimple takes string NG1,integer OP1,integer OR1,integer OQ1,unit NH1 returns nothing
local texttag NE1=CreateTextTag()
call SetTextTagText(NE1,NG1,.025)
call SetTextTagLifespan(NE1,3)
call SetTextTagColor(NE1,OP1,OR1,OQ1,$FF)
call SetTextTagPos(NE1,GetUnitX(NH1),GetUnitY(NH1),0)
call SetTextTagVelocity(NE1,0,.03)
call SetTextTagPermanent(NE1,false)
call SetTextTagVisibility(NE1,true)
if IsUnitVisibleEx(NH1,GetLocalPlayer())==false then
call SetTextTagVisibility(NE1,false)
endif
set NE1=null
endfunction
function ANic takes unit s,unit u returns nothing
local real d=LReal(GetHandleId(u),"ANic_Dmg")
if IsUnitType(u,UNIT_TYPE_STRUCTURE)then
return
endif
if time>LReal(GetHandleId(u),"ANic_LastHitTime")+15 then
set d=0
endif
set d=d+10+5*GetUnitAbilityLevel(s,'ANic')
call UnitShowTextTagSimple("+"+R2SW(d,5,0),200,128,128,u)
call Dmg(s,u,2,d)
call ANic_Vampire(s,u,d)
call SReal(GetHandleId(u),"ANic_Dmg",d)
call SReal(GetHandleId(u),"ANic_LastHitTime",time)
call UseSkillWithProj(GetOwningPlayer(u),u,'AZ3O',1,852075,15.5)
call KillUnit(bj_lastCreatedUnit)
endfunction
function Ubal_MultiAttackFunc takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
local unit u=LUnit(h,"u")
local real d=LReal(h,"d")
local unit f=LUnit(h,"f")
local real a
if Dist_U(f,u)<9 or u==null then
call KillUnit(f)
call DestroyEffect(LEff(h,"fx"))
call Dmg(s,u,9,LReal(h,"d"))
call TriggerOff()
else
set a=Angle_U(f,u)
call SetXY(f,GetUnitX(f)+Cos(a)*9,GetUnitY(f)+Sin(a)*9)
call SetUnitFacing(f,a*bj_RADTODEG)
endif
set s=null
set u=null
set f=null
endfunction
function A0CG_RemoveVampire takes unit s returns nothing
call UnitRemoveAbility(s,'A09P')
call UnitRemoveAbility(s,'A0II')
call UnitRemoveAbility(s,'A04T')
call UnitRemoveAbility(s,'A09P')
endfunction
function RefreshItem takes unit s returns nothing
local item it=null
local integer i=0
loop
exitwhen i>5
set it=UnitItemInSlot(s,i)
if it!=null then
call UnitRemoveItem(s,it)
call UnitAddItem(s,it)
endif
set i=i+1
endloop
set it=null
endfunction
function Ubal_MultiAttack_Enable takes nothing returns nothing
local unit s=LUnit(GetT(),"s")
call UnitRemoveAbility(s,'AZ4G')
call A0CG_RemoveVampire(s)
call SetPlayerAbilityAvailable(GetOwningPlayer(s),'A0CG',true)
call AddPermanentAbility(s,'A0CG')
call SetUnitAbilityLevel(s,'A0CG',LInt(GetT(),"lv"))
call SBool(GetHandleId(s),"MultiAttackDisabled",false)
call TriggerOff()
set s=null
endfunction
function Ubal_MultiAttack takes unit s,unit u,real d returns nothing
local trigger t=CreateTrigger()
local unit f=CreateUnit(GetOwningPlayer(s),'e0MJ',GetUnitX(s),GetUnitY(s),Angle_U(s,u)*bj_RADTODEG)
local integer h=GetHandleId(t)
call TriggerRegisterTimer(t)
call TriggerAddCondition(t,Condition(function Ubal_MultiAttackFunc))
call SUnit(h,"s",s)
call SUnit(h,"u",u)
call SReal(h,"d",d)
call SUnit(h,"f",f)
call SEff(h,"fx",AddSpecialEffectTarget("Abilities\\Weapons\\CryptFiendMissile\\CryptFiendMissile.mdl",f,"origin"))
set t=CreateTrigger()
set h=GetHandleId(t)
if GetUnitAbilityLevel(s,'A0CG')==4 then
call TriggerRegisterTimerEvent(t,2.5,false)
else
call TriggerRegisterTimerEvent(t,7-GetUnitAbilityLevel(s,'A0CG'),false)
endif
call SUnit(h,"s",s)
call SInt(h,"lv",GetUnitAbilityLevel(s,'A0CG'))
call UnitRemoveAbility(s,'A0CG')
call SetPlayerAbilityAvailable(GetOwningPlayer(s),'A0CG',false)
call AddPermanentAbility(s,'AZ4G')
call SBool(GetHandleId(s),"MultiAttackDisabled",true)
if IsUnitType(s,UNIT_TYPE_DEAD)==false and IsUnitPaused(s)==false then
call RefreshItem(s)
endif
call TriggerAddCondition(t,Condition(function Ubal_MultiAttack_Enable))
set t=null
set f=null
endfunction
function AttackEffect takes nothing returns nothing
local integer h=GetT()
local unit s=GetEventDamageSource()
local integer id=NowDamageType
local real d=GetEventDamage()
local unit u=GetTriggerUnit()
local integer i=0
local integer cntra=0
local boolean isdone=false
local group Nranges=CreateGroup()
if id==0 and(GetUnitAbilityLevel(s,'Aloc')>0 and IsUnitType(s,UNIT_TYPE_HERO)==false)then
set id=1
endif
if Mode_DD and d>1 then
call ShowDamage(u,id,d,GetOwningPlayer(s)==GetLocalPlayer()or GetOwningPlayer(u)==GetLocalPlayer())
endif
if(Mode_NA)and d>2 and d<5000 and IsUnitType(s,UNIT_TYPE_HERO)and IsUnitType(u,UNIT_TYPE_HERO)then
set i=R2I(time)
if(i!=LoadInteger(R8,GetHandleId(s),'DmgT'))then
call SaveReal(R8,GetHandleId(s),'Dmg5',LoadReal(R8,GetHandleId(s),'Dmg4'))
call SaveReal(R8,GetHandleId(s),'Dmg4',LoadReal(R8,GetHandleId(s),'Dmg3'))
call SaveReal(R8,GetHandleId(s),'Dmg3',LoadReal(R8,GetHandleId(s),'Dmg2'))
call SaveReal(R8,GetHandleId(s),'Dmg2',LoadReal(R8,GetHandleId(s),'Dmg1'))
call SaveReal(R8,GetHandleId(s),'Dmg1',LoadReal(R8,GetHandleId(s),'Dmg0'))
call SaveReal(R8,GetHandleId(s),'Dmg0',d)
call SaveInteger(R8,GetHandleId(s),'DmgT',i)
else
call SaveReal(R8,GetHandleId(s),'Dmg0',LoadReal(R8,GetHandleId(s),'Dmg0')+d)
endif
if LoadReal(R8,GetHandleId(s),'Dmg1')+LoadReal(R8,GetHandleId(s),'Dmg2')+LoadReal(R8,GetHandleId(s),'Dmg3')+LoadReal(R8,GetHandleId(s),'Dmg4')+LoadReal(R8,GetHandleId(s),'Dmg5')>5000 then
call Achieve(GetOwningPlayer(s),'CJ05')
call SaveReal(R8,GetHandleId(s),'Dmg1',0)
call SaveReal(R8,GetHandleId(s),'Dmg2',0)
call SaveReal(R8,GetHandleId(s),'Dmg3',0)
call SaveReal(R8,GetHandleId(s),'Dmg4',0)
call SaveReal(R8,GetHandleId(s),'Dmg5',0)
endif
if GetUnitState(u,UNIT_STATE_LIFE)-d<3 and GetUnitState(u,UNIT_STATE_LIFE)-d>0.5 then
call Achieve(GetOwningPlayer(s),'CJ28')
endif
endif
if IsUnitType(s,UNIT_TYPE_HERO)or IsUnitType(u,UNIT_TYPE_HERO)then
call TestMsg(GetUnitName(s)+" causes "+R2S(GetEventDamage())+" damage to "+GetUnitName(u))
endif
if GetUnitAbilityLevel(u,'Bpoi')+GetUnitAbilityLevel(u,'Bpsd')>0 and GetUnitAbilityLevel(s,'A0MY')>0 then
call UnitRemoveAbility(u,'Bpoi')
call UnitRemoveAbility(u,'Bpsd')
call PoisonEffect(s,u)
elseif GetUnitAbilityLevel(u,'BZ00')>0 then
call UnitRemoveAbility(u,'BZ00')
if IsUnitType(s,UNIT_TYPE_MELEE_ATTACKER)then
call UseSkillWithProj(GetOwningPlayer(s),u,'AZ2U',1,852075,6)
else
call UseSkillWithProj(GetOwningPlayer(s),u,'AZ2V',1,852075,4)
endif
elseif GetUnitAbilityLevel(u,'BIcb')>0 then
call UnitRemoveAbility(u,'BIcb')
call UseSkillWithProj(GetOwningPlayer(s),u,'AZ2W',1,852662,1)
elseif GetUnitAbilityLevel(u,'BZ4C')>0 then
call UnitRemoveAbility(u,'BZ4C')
if not LBool(GetHandleId(s),"MultiAttackDisabled")then
call Ubal_MultiAttack(s,u,d)
endif
elseif GetUnitAbilityLevel(u,'B0O8')>0 then
call UnitRemoveAbility(u,'B0O8')
call W5D(s,u)
elseif GetUnitAbilityLevel(u,'B0DM')>0 then
call UnitRemoveAbility(u,'B0DM')
if IsUnitType(s,UNIT_TYPE_RANGED_ATTACKER)then
call UseSkillWithProj(GetOwningPlayer(s),u,'AZ3Q',1,852662,4.5)
else
call UseSkillWithProj(GetOwningPlayer(s),u,'AZ3P',1,852662,4.5)
endif
endif
if GetTriggerEventId()==EVENT_UNIT_DAMAGED and GetUnitAbilityLevel(GetEventDamageSource(),'Aloc')==0 and(GetEventDamage()>51 or IsUnitType(s,UNIT_TYPE_HERO)==false or IsUnitType(u,UNIT_TYPE_STRUCTURE)or(HasItem(s,'I0A8')==0 and GetHeroLevel(s)<6))and NotSkillDamage()and id==0 then
if GetUnitAbilityLevel(s,'A09Y')>0 and GetRandomInt(0,99)<20 and LoadReal(battleHT,GetHandleId(u),GetHandleId(s))>time then
call UseSkillWithProj(GetOwningPlayer(s),u,'A1GZ',1,852106,4)
call BearStillDamage(s,u)
endif
if GetUnitAbilityLevel(s,'A041')>0 then
if GetUnitAbilityLevel(s,'A041')==4 then
call MoonGlaive(5)
else
call MoonGlaive(GetUnitAbilityLevel(GetEventDamageSource(),'A041'))
endif
endif
if GetUnitAbilityLevel(s,'ANic')>0 and IsUnitType(u,UNIT_TYPE_STRUCTURE)==false and IsUnitType(u,UNIT_TYPE_MECHANICAL)==false and LoadReal(battleHT,GetHandleId(u),GetHandleId(s))>time then
call ANic(s,u)
endif
if UnitHasBuffBJ(s,'BZ10')and IsUnitType(u,UNIT_TYPE_STRUCTURE)==false and IsUnitType(u,UNIT_TYPE_MECHANICAL)==false and IsUnitAlly(u,GetOwningPlayer(s))==false and GetUnitLifePercent(s)<100 then
loop
exitwhen(isdone==true)
set cntra=cntra+1
if cntra>skingcount then
set isdone=true
endif
if isdone==false then
call GroupEnumUnitsInRange(Nranges,GetUnitX(s),GetUnitY(s),925,null)
if IsUnitInGroup(sking[cntra],Nranges)==true then
if GetUnitAbilityLevel(sking[cntra],'AF4Y')==1 then
call SetUnitState(s,UNIT_STATE_LIFE,GetUnitState(s,UNIT_STATE_LIFE)+GetEventDamage()*(0.15))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",s,"origin"))
set isdone=true
elseif GetUnitAbilityLevel(sking[cntra],'AF4Y')==2 then
call SetUnitState(s,UNIT_STATE_LIFE,GetUnitState(s,UNIT_STATE_LIFE)+GetEventDamage()*(0.2))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",s,"origin"))
set isdone=true
elseif GetUnitAbilityLevel(sking[cntra],'AF4Y')==3 then
call SetUnitState(s,UNIT_STATE_LIFE,GetUnitState(s,UNIT_STATE_LIFE)+GetEventDamage()*(0.25))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",s,"origin"))
set isdone=true
elseif GetUnitAbilityLevel(sking[cntra],'AF4Y')==4 then
call SetUnitState(s,UNIT_STATE_LIFE,GetUnitState(s,UNIT_STATE_LIFE)+GetEventDamage()*(0.3))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",s,"origin"))
set isdone=true
endif
endif
set Nranges=null
endif
endloop
endif
elseif GetTriggerEventId()==EVENT_UNIT_DEATH or LUnit(GetT(),"u")==null then
call SBool(GetHandleId(LUnit(GetT(),"u")),"AttackEffectProcess",false)
call TriggerOff()
endif
set s=null
set u=null
endfunction
function AttackEffectCond takes nothing returns nothing
local trigger t=null
local unit s=GetTriggerUnit()
local unit u=GetOrderTargetUnit()
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
set u=s
set s=GetAttacker()
endif
call SaveReal(battleHT,GetHandleId(u),GetHandleId(s),time+2)
if u!=null and GetUnitAbilityLevel(u,'Aloc')==0 and(GetUnitAbilityLevel(u,'A04R')+GetUnitAbilityLevel(u,'Avul')==0 or IsUnitType(u,UNIT_TYPE_HERO))and(not LBool(GetHandleId(u),"AttackEffectProcess"))then
call SBool(GetHandleId(u),"AttackEffectProcess",true)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DAMAGED)
if IsUnitType(u,UNIT_TYPE_HERO)==false then
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
endif
call TriggerRegisterTimerEvent(t,10,true)
call SUnit(GetHandleId(t),"u",u)
call TriggerAddCondition(t,Condition(function AttackEffect))
endif
if s!=null and GetUnitAbilityLevel(u,'Aloc')==0 and(GetUnitAbilityLevel(u,'A04R')+GetUnitAbilityLevel(u,'Avul')==0 or IsUnitType(u,UNIT_TYPE_HERO))and(not LBool(GetHandleId(s),"AttackEffectProcess"))then
call SBool(GetHandleId(s),"AttackEffectProcess",true)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_DAMAGED)
if IsUnitType(s,UNIT_TYPE_HERO)==false then
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_DEATH)
endif
call TriggerRegisterTimerEvent(t,10,true)
call SUnit(GetHandleId(t),"u",s)
call TriggerAddCondition(t,Condition(function AttackEffect))
endif
set s=null
set u=null
set t=null
endfunction
function PoisonStopCond takes nothing returns nothing
local unit s=GetTriggerUnit()
if GetIssuedOrderId()==852254 or GetIssuedOrderId()==852255 and(GetUnitAbilityLevel(s,'Abun')>0 or IsUnitType(s,UNIT_TYPE_ETHEREAL)or IsUnitType(s,UNIT_TYPE_SNARED))then
call IssueImmediateOrderById(s,851972)
endif
set s=null
endfunction
function PoisonWard_AddExp takes nothing returns nothing
call AddHeroXP(GetEnumUnit(),globalI,false)
endfunction
function PoisonWardDeath takes nothing returns nothing
local unit s=LUnit(GetT(),"s")
local group g=null
local group g2=null
local unit u=null
local integer i=0
local integer exp=0
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamage()>GetUnitState(s,UNIT_STATE_LIFE)then
call SBool(GetT(),"b",true)
call SetUnitInvulnerable(s,true)
call ShowUnit(s,false)
call PauseUnit(s,true)
call SetUnitScale(s,0,0,0)
call SetUnitPathing(s,false)
call UnitAddAbility(s,'Aloc')
call UnitAddAbility(s,'AZ2A')
call UnitAddAbility(s,'A04R')
call KillUnit(CreateUnit(Player(0),GetUnitTypeId(s),GetUnitX(s),GetUnitY(s),GetUnitFacing(s)))
if IsUnitEnemy(GetEventDamageSource(),GetOwningPlayer(s))then
call QO9(GetOwningPlayer(GetEventDamageSource()),GetRandomInt(14,17),s)
set g=CreateGroup()
set g2=CreateGroup()
call GroupEnumUnitsInRange(g,GetUnitX(s),GetUnitY(s),1325,null)
if GetUnitTypeId(s)=='o00T' then
set exp=20
elseif GetUnitTypeId(s)=='o00U' then
set exp=25
elseif GetUnitTypeId(s)=='o00V' then
set exp=30
elseif GetUnitTypeId(s)=='o00W' then
set exp=35
endif
loop
set u=FirstOfGroup(g)
exitwhen u==null
if IsUnitType(u,UNIT_TYPE_HERO)and IsUnitEnemy(u,GetOwningPlayer(s))and GetUnitAbilityLevel(u,'A04R')==0 then
set i=i+1
call GroupAddUnit(g2,u)
endif
call GroupRemoveUnit(g,u)
endloop
set globalI=exp/ i
call ForGroup(g2,function PoisonWard_AddExp)
endif
call TriggerRegisterVariableEvent(GetTriggeringTrigger(),"time",GREATER_THAN,time+17)
call DestroyGroup(g)
call DestroyGroup(g2)
set g=null
set g2=null
endif
elseif GetTriggerEventId()==EVENT_GAME_VARIABLE_LIMIT then
call RemoveUnit(s)
call TriggerOff()
elseif LBool(GetT(),"b")==false then
call SetUnitInvulnerable(s,true)
call ShowUnit(s,false)
call PauseUnit(s,true)
call SetUnitScale(s,0,0,0)
call SetUnitPathing(s,false)
call UnitAddAbility(s,'Aloc')
call UnitAddAbility(s,'A04R')
call UnitAddAbility(s,'AZ2A')
call KillUnit(CreateUnit(Player(0),GetUnitTypeId(s),GetUnitX(s),GetUnitY(s),GetUnitFacing(s)))
call TriggerRegisterVariableEvent(GetTriggeringTrigger(),"time",GREATER_THAN,time+17)
endif
set s=null
endfunction
function PoisonWardReg takes nothing returns nothing
local unit s=GetSummonedUnit()
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,40,false)
call TriggerAddCondition(t,Condition(function PoisonWardDeath))
call SUnit(GetHandleId(t),"s",s)
set s=null
set t=null
endfunction
function UnitINV0Func takes nothing returns nothing
local unit u=LUnit(GetHandleId(GetExpiredTimer()),"u")
call UnitRemoveAbility(u,'AZ2E')
call SetWidgetLife(u,LReal(GetHandleId(GetExpiredTimer()),"r"))
call TimerOff()
set u=null
endfunction
function UnitINV0 takes unit u returns nothing
local timer tm=CreateTimer()
call TimerStart(tm,0,false,function UnitINV0Func)
call SUnit(GetHandleId(tm),"u",u)
call SReal(GetHandleId(tm),"r",GetWidgetLife(u))
call UnitAddAbility(u,'AZ2E')
call SetWidgetLife(u,1000000)
set tm=null
endfunction
function ForgetWardFuncDamage takes nothing returns nothing
local unit s=GetTriggerUnit()
local real r=GetUnitState(s,UNIT_STATE_LIFE)
if GetEventDamage()<1 or GetUnitAbilityLevel(s,'AZ2E')>0 then
return
endif
if GetTriggerEventId()==EVENT_WIDGET_DEATH then
call TriggerOff()
else
if IsUnitType(GetEventDamageSource(),UNIT_TYPE_HERO)then
if r>4 then
call SetWidgetLife(s,r-4)
call UnitINV0(s)
endif
elseif r>1 then
call SetWidgetLife(s,r-1)
call UnitINV0(s)
endif
endif
set s=null
endfunction
function ForgetWardFunc takes unit s returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_DAMAGED)
call TriggerRegisterDeathEvent(t,s)
call TriggerAddCondition(t,Condition(function ForgetWardFuncDamage))
set t=null
endfunction
function SummonCond takes nothing returns nothing
local integer id=GetUnitTypeId(GetSummonedUnit())
if IsUnitIllusion(GetSummonedUnit())then
set lastCreatedIllusion=GetSummonedUnit()
elseif GetOwningPlayer(GetSummonedUnit())!=Player(0)and(id=='o00T' or id=='o00U' or id=='o00V' or id=='o00W')then
if GetUnitAbilityLevel(GetSummoningUnit(),'A0MY')>0 then
call UnitAddAbility(GetSummonedUnit(),'A0MY')
call SetUnitAbilityLevel(GetSummonedUnit(),'A0MY',GetUnitAbilityLevel(GetSummoningUnit(),'A0MY'))
call PoisonWardReg()
endif
elseif((id=='o00L')or(id=='o00M')or(id=='o00N')or(id=='o00O'))then
call ForgetWardFunc(GetSummonedUnit())
endif
endfunction
function A0FO_Effect takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
if(GetTriggerEventId()==EVENT_UNIT_DAMAGED and GetEventDamage()>0)or time>LReal(h,"r")then
call DestroyEffect(LEff(h,"e1"))
call DestroyEffect(LEff(h,"e2"))
call TriggerOff()
elseif GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
call SetUnitState(s,UNIT_STATE_LIFE,GetUnitState(s,UNIT_STATE_LIFE)+4.5)
call SetUnitState(s,UNIT_STATE_MANA,GetUnitState(s,UNIT_STATE_MANA)+2.5)
endif
set s=null
endfunction
function A0FO takes nothing returns nothing
local unit u=GetTriggerUnit()
local trigger t
local integer h
set t=LTrig(GetHandleId(u),"BottleRegen")
if t==null then
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function A0FO_Effect))
call STrig(GetHandleId(u),"BottleRegen",t)
set h=GetHandleId(t)
call SUnit(h,"s",u)
call SEff(h,"e1",AddSpecialEffectTarget("Abilities\\Spells\\Items\\ScrollOfRejuvenation\\ScrollManaHealth.mdl",u,"chest"))
call SEff(h,"e2",AddSpecialEffectTarget("Abilities\\Spells\\Items\\ScrollOfRejuvenation\\ScrollManaHealth.mdl",u,"chest"))
endif
set h=GetHandleId(t)
call SReal(h,"r",time+3.02)
set t=null
set u=null
endfunction
function A02X takes nothing returns nothing
local item it
local unit u=GetSpellTargetUnit()
if u!=null then
set it=CreateItem('I058',GetUnitX(u),GetUnitY(u))
call SetItemCharges(it,1)
call SetItemUserData(it,1)
call SetItemPlayer(it,GetOwningPlayer(u),true)
call UnitAddItem(u,it)
else
set u=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'o004',GetSpellTargetX(),GetSpellTargetY(),270.)
call UnitAddAbility(u,'AZ2B')
call UnitApplyTimedLife(u,'BTLF',420)
endif
set u=null
set it=null
endfunction
function UnitAddTimedAbilityTrig takes nothing returns nothing
local integer h=GetT()
call UnitRemoveAbility(LUnit(h,"s"),LInt(h,"id"))
call TriggerOff()
endfunction
function UnitAddTimedAbility takes unit s,integer id,real r returns nothing
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_DEATH)
call TriggerRegisterVariableEvent(t,"time",GREATER_THAN,time+r)
call TriggerAddCondition(t,Condition(function UnitAddTimedAbilityTrig))
call SUnit(h,"s",s)
call SInt(h,"id",id)
set t=null
endfunction
function AIsw takes nothing returns nothing
local item it
local unit u=GetSpellTargetUnit()
if u!=null then
set it=CreateItem('I059',GetUnitX(u),GetUnitY(u))
call SetItemCharges(it,1)
call SetItemPlayer(it,GetOwningPlayer(u),true)
call SetItemUserData(it,1)
call UnitAddItem(u,it)
else
set u=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'oeye',GetSpellTargetX(),GetSpellTargetY(),270.)
call UnitAddAbility(u,'AZ2B')
call UnitApplyTimedLife(u,'BTLF',180)
call UnitAddTimedAbility(u,'AZ01',12)
endif
set u=null
set it=null
endfunction
function AZ1U_Linkin takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
if GetTriggerEventId()==EVENT_GAME_VARIABLE_LIMIT or GetTriggerEventId()==EVENT_UNIT_DEATH or GetUnitAbilityLevel(s,'B0BI')==0 then
call UnitRemoveAbility(s,'B0BI')
call DestroyEffect(LEff(h,"e"))
call TriggerOff()
endif
set s=null
endfunction
function AZ1U takes nothing returns nothing
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
local unit u=GetSpellTargetUnit()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerRegisterVariableEvent(t,"time",GREATER_THAN,time+17)
call TriggerRegisterTimerEvent(t,.1,true)
call TriggerAddCondition(t,Condition(function AZ1U_Linkin))
call UnitRemoveAbility(GetTriggerUnit(),'B0BI')
call A8G(GetTriggerUnit())
call UseSkillWithProj(GetOwningPlayer(u),u,'A1A2',1,852572,18)
call SUnit(h,"s",u)
call SEff(h,"e",AddSpecialEffectTarget("effects\\Linkens_Main.mdx",u,"chest"))
set t=null
set u=null
endfunction
function AZ1X_EatTree takes nothing returns nothing
local unit s=LUnit(GetT(),"s")
call SetUnitState(s,UNIT_STATE_LIFE,GetUnitState(s,UNIT_STATE_LIFE)+7.1875)
if time>LReal(GetHandleId(s),"EatTreeTimeLimit")then
call SBool(GetHandleId(s),"EatingTree",false)
call UnitRemoveAbility(s,'AZ1Y')
call UnitRemoveAbility(s,'BZ1Y')
call TriggerOff()
endif
set s=null
endfunction
function RemoveBeatFunc takes nothing returns nothing
local unit s=LUnit(GetHandleId(GetExpiredTimer()),"s")
if GetUnitAbilityLevel(s,'Beat')==0 or UnitRemoveAbility(s,'Beat')then
call TimerOff()
endif
set s=null
endfunction
function RemoveBeat takes unit s returns nothing
local timer tm=CreateTimer()
call TimerStart(tm,0.01,true,function RemoveBeatFunc)
call SUnit(GetHandleId(tm),"s",s)
set tm=null
endfunction
function Aeat takes nothing returns nothing
local unit s=GetSpellTargetUnit()
local item it=null
if s!=null then
set it=CreateItem('IZ0F',GetUnitX(s),GetUnitY(s))
call SetItemPlayer(it,GetOwningPlayer(s),true)
call SetItemCharges(it,1)
call SetItemUserData(it,1)
call UnitAddItem(s,it)
set it=null
endif
set s=null
endfunction
function A1DA_DamageChange takes nothing returns nothing
local unit s=LUnit(GetT(),"s")
local unit u=GetTriggerUnit()
if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEventId()==EVENT_GAME_VARIABLE_LIMIT then
call TriggerOff()
elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED and GetEventDamage()<3000 and GetEventDamage()>2 and IsUnitInRange(s,u,900)and IsUnitType(s,UNIT_TYPE_DEAD)==false and IsUnitType(u,UNIT_TYPE_DEAD)==false then
call AddTimedLightningToUnitEx(s,u,0.3,"SPLK",false)
call AddLife(u,GetEventDamage()*.35)
call DisableTrigger(GetTriggeringTrigger())
call Dmg(GetEventDamageSource(),s,3,GetEventDamage()*.35)
call EnableTrigger(GetTriggeringTrigger())
endif
set s=null
set u=null
endfunction
function A1DA_Reg takes nothing returns nothing
local unit s=GetTriggerUnit()
local unit u=GetEnumUnit()
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_DEATH)
call TriggerRegisterVariableEvent(t,"time",GREATER_THAN,time+4+GetUnitAbilityLevel(s,'A1DA'))
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DAMAGED)
call SUnit(GetHandleId(t),"s",s)
call TriggerAddCondition(t,Condition(function A1DA_DamageChange))
set s=null
set u=null
set t=null
endfunction
function A1DA_Cond takes nothing returns boolean
return IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)
endfunction
function A1DA_Damage takes nothing returns nothing
local unit s=GetTriggerUnit()
local group g=CreateGroup()
call GroupEnumUnitsInRange(g,0,0,99999,Condition(function A1DA_Cond))
call GroupRemoveUnit(g,s)
call ForGroup(g,function A1DA_Reg)
call DestroyGroup(g)
set s=null
set g=null
endfunction
function A0EC_RefreshBuff takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
local unit u=LUnit(h,"u")
local integer i=GetUnitAbilityLevel(s,'A0EC')
if GetTriggerEventId()==EVENT_WIDGET_DEATH or GetTriggerEventId()==EVENT_GAME_TIMER_EXPIRED then
call UnitRemoveAbility(u,'B01X')
call TriggerOff()
elseif GetUnitAbilityLevel(u,'B01X')==0 then
set s=CreateUnit(GetOwningPlayer(s),'e00E',GetUnitX(u),GetUnitY(u),0)
call UnitAddAbility(s,'AZ2K')
call SetUnitAbilityLevel(s,'AZ2K',i)
call IssueTargetOrderById(s,852668,u)
call UnitApplyTimedLife(s,'BTLF',10)
endif
set s=null
set u=null
endfunction
function A0EC takes nothing returns nothing
local unit s=GetTriggerUnit()
local unit u=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
call TriggerRegisterDeathEvent(t,u)
call TriggerRegisterTimerEvent(t,5+GetUnitAbilityLevel(s,'A0EC'),false)
call TriggerRegisterTimer(t)
call TriggerAddCondition(t,Condition(function A0EC_RefreshBuff))
call SUnit(h,"s",s)
call SUnit(h,"u",u)
set s=null
set u=null
set t=null
endfunction
function A03O_ExtraMirror takes nothing returns nothing
local unit u=LUnit(GetT(),"s")
local unit s=CreateUnit(GetOwningPlayer(u),'e00E',0,0,0)
call UnitAddAbility(s,'AZ2T')
if IssueTargetOrderById(s,852274,u)or IsUnitType(u,UNIT_TYPE_DEAD)or u==null then
call TriggerOff()
endif
call KillUnit(s)
call RemoveUnit(s)
set s=null
set u=null
endfunction
function A03O takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterVariableEvent(t,"time",GREATER_THAN,time+.5)
call TriggerAddCondition(t,Condition(function A03O_ExtraMirror))
call SUnit(GetHandleId(t),"s",GetTriggerUnit())
set t=null
endfunction
function A06V_Cond takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(globalS))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(globalS))and IsUnitType(GetFilterUnit(),UNIT_TYPE_DEAD)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false and GetUnitAbilityLevel(GetFilterUnit(),'Aloc')+GetUnitAbilityLevel(GetFilterUnit(),'A04R')+GetUnitAbilityLevel(GetFilterUnit(),'Avul')==0 and LoadBoolean(R8,globalI,GetHandleId(GetFilterUnit()))==false
endfunction
function A06V_Jump takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
local unit u=LUnit(h,"u")
local group g=CreateGroup()
set globalS=s
set globalI=h
call GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),675,Condition(function A06V_Cond))
call GroupRemoveUnit(g,u)
set u=GroupPickRandomUnit(g)
if u!=null then
call SaveBoolean(R8,h,GetHandleId(u),true)
call Dmg(s,u,1,LReal(h,"d"))
call UseSkillWithProj(GetOwningPlayer(s),u,'AZ33',1,852075,1)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl",u,"origin"))
endif
if u==null or SAInt(h,"i",-1)<=0 then
call TriggerOff()
endif
call DestroyGroup(g)
set s=null
set u=null
set g=null
endfunction
function A06V takes nothing returns nothing
local unit s=GetTriggerUnit()
local unit u=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local integer i=GetUnitAbilityLevel(s,'A06V')
local integer h=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.3,true)
call SUnit(h,"s",s)
call SUnit(h,"u",u)
call SaveBoolean(R8,h,GetHandleId(u),true)
call SInt(h,"i",i+3)
call SReal(h,"d",i*60+20)
call TriggerAddCondition(t,Condition(function A06V_Jump))
call UseSkillWithProj(GetOwningPlayer(s),u,'AZ33',1,852075,1)
set s=null
set u=null
set t=null
endfunction
function A09Z takes nothing returns nothing
call Dmg(GetTriggerUnit(),GetSpellTargetUnit(),8,325*GetUnitAbilityLevel(GetTriggerUnit(),'A09Z')+275)
endfunction
function GeneralSpellCast takes nothing returns nothing
local unit s=GetTriggerUnit()
local unit u=GetSpellTargetUnit()
if GetSpellAbilityId()=='AIcy' and IsUnitType(u,UNIT_TYPE_MAGIC_IMMUNE)and s!=u then
call IssueImmediateOrderById(s,851972)
call ShowWarningToPlayer(GetOwningPlayer(s),GetObjectName('IMMU'))
endif
set s=null
set u=null
endfunction
function ImmStopFunc takes nothing returns nothing
call IssueImmediateOrderById(LUnit(GetHandleId(GetExpiredTimer()),"s"),852178)
call TimerOff()
endfunction
function StopImm takes unit s returns nothing
local timer tm=CreateTimer()
local integer h=GetHandleId(tm)
call SUnit(h,"s",s)
call TimerStart(tm,0,false,function ImmStopFunc)
set tm=null
endfunction
function GeneralSpellEffect takes nothing returns nothing
if GetSpellAbilityId()=='A0FO' then
call A0FO()
elseif GetSpellAbilityId()=='A02X' then
call A02X()
elseif GetSpellAbilityId()=='AIsw' then
call AIsw()
elseif GetSpellAbilityId()=='AZ1U' and HasLinkin(GetSpellTargetUnit())==false then
call AZ1U()
elseif GetSpellAbilityId()=='Aeat' then
call Aeat()
elseif GetSpellAbilityId()=='A1DA' then
call A1DA_Damage()
elseif GetSpellAbilityId()=='A0EC' then
call A0EC()
elseif GetSpellAbilityId()=='A03O' and GetRandomInt(0,99)<50 then
call A03O()
elseif GetSpellAbilityId()=='A06V' then
call A06V()
elseif GetSpellAbilityId()=='A09Z' and GU8(GetSpellTargetUnit())then
call A09Z()
elseif GetSpellAbilityId()=='A21N' or GetSpellAbilityId()=='AZ3J' then
call StopImm(GetTriggerUnit())
endif
endfunction
function A0BG_Attacked takes nothing returns nothing
call SReal(GetHandleId(GetTriggerUnit()),"LastAttacked",time)
endfunction
function A0BG_RegAttacked takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,GetLearningUnit(),EVENT_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function A0BG_Attacked))
call SBool(GetHandleId(GetLearningUnit()),"AttackedTrig",true)
set t=null
endfunction
function ACac_RevengeAura takes nothing returns nothing
local unit s=LUnit(GetT(),"s")
local location px=GetUnitLoc(GetKillingUnit())
if GetUnitAbilityLevel(s,'ACac')>0 and GetTriggerEventId()==EVENT_UNIT_DEATH and IsUnitEnemy(GetKillingUnit(),GetOwningPlayer(s))then
call UnitAddAbility(GetKillingUnit(),'AF6Y')
call SetUnitAbilityLevel(GetKillingUnit(),'AZ3D',GetUnitAbilityLevel(s,'ACac'))
call SetPlayerAbilityAvailable(GetOwningPlayer(GetKillingUnit()),'AF6Y',false)
call SUnit(GetT(),"u",GetKillingUnit())
elseif GetTriggerEventId()==EVENT_PLAYER_HERO_REVIVE_FINISH and GetTriggerUnit()==s and LUnit(GetT(),"u")!=s then
call UnitRemoveAbility(LUnit(GetT(),"u"),'AF6Y')
endif
set s=null
endfunction
function ACac_Reg takes nothing returns nothing
local trigger t=CreateTrigger()
local unit s=GetLearningUnit()
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_DEATH)
call TriggerRegisterPlayerUnitEvent(t,GetOwningPlayer(s),EVENT_PLAYER_HERO_REVIVE_FINISH,null)
call TriggerAddCondition(t,Condition(function ACac_RevengeAura))
call SUnit(GetHandleId(t),"s",s)
set s=null
set t=null
endfunction
function IgniteLearn takes unit s returns nothing
local integer i=GetUnitAbilityLevel(s,'A088')
local integer id
if i==0 then
set id='AZ4K'
elseif i==1 then
set id='AZ4L'
elseif i==2 then
set id='AZ4M'
elseif i==3 then
set id='AZ4N'
endif
if GetUnitAbilityLevel(s,id)>0 then
call IncUnitAbilityLevel(s,id)
else
call UnitAddAbility(s,id)
endif
endfunction
function MultiCastLearn takes unit s returns nothing
local integer i=GetUnitAbilityLevel(s,'A088')
local integer id
if i==1 then
set id='AZ4O'
elseif i==2 then
set id='AZ4P'
elseif i==3 then
set id='AZ4Q'
endif
call UnitAddAbility(s,id)
call SetPlayerAbilityAvailable(GetOwningPlayer(s),'AZ4O',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(s),'AZ4P',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(s),'AZ4Q',false)
if i==1 then
set id='AZ4V'
elseif i==2 then
set id='AZ4W'
elseif i==3 then
set id='AZ4X'
endif
call UnitAddAbility(s,id)
call SetPlayerAbilityAvailable(GetOwningPlayer(s),'AZ4V',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(s),'AZ4W',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(s),'AZ4X',false)
endfunction
function BloodlustLearn takes unit s returns nothing
local integer i=GetUnitAbilityLevel(s,'A088')
local integer id
if i==0 then
set id='AZ4R'
elseif i==1 then
set id='AZ4S'
elseif i==2 then
set id='AZ4T'
elseif i==3 then
set id='AZ4U'
endif
if GetUnitAbilityLevel(s,id)>0 then
call IncUnitAbilityLevel(s,id)
else
call UnitAddAbility(s,id)
endif
endfunction
function GeneralLearn takes nothing returns nothing
local unit s=GetLearningUnit()
local integer id=GetLearnedSkill()
local integer FYQ=-1
local integer array BMI
local integer array BFI
local integer EMZ
if id=='A0MX' and IsUnitIllusion(s)==false and LBool(GetHandleId(s),"A0MX_Trig")==false then
call SetPlayerAbilityAvailable(GetOwningPlayer(s),'AF4L',false)
call A0MX(s)
elseif id=='A0BG' and LBool(GetHandleId(GetTriggerUnit()),"AttackedTrig")==false then
call A0BG_RegAttacked()
elseif id=='ACac' and IsUnitIllusion(s)==false and LBool(GetHandleId(s),"ACac_Trig")==false then
call ACac_Reg()
elseif id=='A0CG' and IsUnitIllusion(s)==false then
call A0CG_RemoveVampire(s)
elseif id=='A11T' and IsUnitIllusion(s)==false and hblm_ok[GetPlayerId(GetOwningPlayer(s))]==false then
if GetUnitAbilityLevel(s,id)==1 and UnitHasItemOfTypeBJ(s,'I00D')==false and UnitHasItemOfTypeBJ(s,'I0AY')==false then
call UnitAddAbility(s,'AF8Y')
call UnitMakeAbilityPermanent(s,true,'AF8Y')
elseif GetUnitAbilityLevel(s,id)>1 and UnitHasItemOfTypeBJ(s,'I00D')==false and UnitHasItemOfTypeBJ(s,'I0AY')==false then
call SetUnitAbilityLevel(s,'AF8Y',GetUnitAbilityLevel(s,'A11T'))
elseif GetUnitAbilityLevel(s,id)==1 and UnitHasItemOfTypeBJ(s,'I00D')then
set hblm_ok[GetPlayerId(GetOwningPlayer(s))]=true
loop
exitwhen(FYQ>5)
set FYQ=FYQ+1
if UnitItemInSlot(s,FYQ)!=null then
set BFI[FYQ]=GetItemTypeId(UnitItemInSlot(s,FYQ))
set BMI[FYQ]=FYQ
call RemoveItem(UnitItemInSlot(s,FYQ))
endif
endloop
set EMZ=GetUnitAbilityLevel(s,'A0NR')
if EMZ>0 then
call UnitRemoveAbility(s,'A0NR')
endif
call UnitAddAbility(s,'AF1L')
call UnitMakeAbilityPermanent(s,true,'AF1L')
call UnitAddAbility(s,'AF7Y')
call ResetItems(BFI[0],BFI[1],BFI[2],BFI[3],BFI[4],BFI[5],s,0.01,BMI[0],BMI[1],BMI[2],BMI[3],BMI[4],BMI[5])
if EMZ>0 then
call ResetSkill('A0NR',EMZ,s,0.01)
endif
call SetBooleanHblm(1,s)
elseif GetUnitAbilityLevel(s,id)==2 and UnitHasItemOfTypeBJ(s,'I00D')then
set hblm_ok[GetPlayerId(GetOwningPlayer(s))]=true
loop
exitwhen(FYQ>5)
set FYQ=FYQ+1
if UnitItemInSlot(s,FYQ)!=null then
set BFI[FYQ]=GetItemTypeId(UnitItemInSlot(s,FYQ))
set BMI[FYQ]=FYQ
call RemoveItem(UnitItemInSlot(s,FYQ))
endif
endloop
set EMZ=GetUnitAbilityLevel(s,'A0NR')
if EMZ>0 then
call UnitRemoveAbility(s,'A0NR')
endif
call UnitAddAbility(s,'AF9Y')
call SetUnitAbilityLevel(s,'AF1L',2)
call ResetItems(BFI[0],BFI[1],BFI[2],BFI[3],BFI[4],BFI[5],s,0.01,BMI[0],BMI[1],BMI[2],BMI[3],BMI[4],BMI[5])
if EMZ>0 then
call ResetSkill('A0NR',EMZ,s,0.01)
endif
call SetBooleanHblm(1,s)
elseif GetUnitAbilityLevel(s,id)==3 and UnitHasItemOfTypeBJ(s,'I00D')then
set hblm_ok[GetPlayerId(GetOwningPlayer(s))]=true
loop
exitwhen(FYQ>5)
set FYQ=FYQ+1
if UnitItemInSlot(s,FYQ)!=null then
set BFI[FYQ]=GetItemTypeId(UnitItemInSlot(s,FYQ))
set BMI[FYQ]=FYQ
call RemoveItem(UnitItemInSlot(s,FYQ))
endif
endloop
set EMZ=GetUnitAbilityLevel(s,'A0NR')
if EMZ>0 then
call UnitRemoveAbility(s,'A0NR')
endif
call UnitAddAbility(s,'AF2Y')
call SetUnitAbilityLevel(s,'AF1L',3)
call ResetItems(BFI[0],BFI[1],BFI[2],BFI[3],BFI[4],BFI[5],s,0.01,BMI[0],BMI[1],BMI[2],BMI[3],BMI[4],BMI[5])
if EMZ>0 then
call ResetSkill('A0NR',EMZ,s,0.01)
endif
call SetBooleanHblm(1,s)
endif
elseif id=='AZ3A' then
set NotTimerExpired=true
call TriggerEvaluate(LTrig(GetHandleId(GetTriggerUnit()),"Shadow_Agha_Trigger"))
set NotTimerExpired=false
elseif id=='A011' or id=='A007' or id=='A01T' or id=='A00F' then
call IgniteLearn(s)
elseif(id=='A083' or id=='A08I' or id=='A08G' or id=='A08F')then
call BloodlustLearn(s)
elseif id=='A088' then
call MultiCastLearn(s)
endif
set s=null
endfunction
function StaticShoeBreak takes unit s returns nothing
local item it=null
local integer i=0
call DisableTrigger(GW4)
loop
exitwhen i>5
set it=UnitItemInSlot(s,i)
if it!=null and GetItemTypeId(it)=='I0OG' then
call RemoveItem(it)
set it=CreateItem('I0OI',0,0)
call SetItemPlayer(it,GetOwningPlayer(s),true)
call SetItemUserData(it,1)
call UnitAddItem(s,it)
endif
set i=i+1
endloop
call EnableTrigger(GW4)
set it=null
endfunction
function StaticShoeReturn takes unit s returns nothing
local item it=null
local integer i=0
call DisableTrigger(GW4)
loop
exitwhen i>5
set it=UnitItemInSlot(s,i)
if it!=null and GetItemTypeId(it)=='I0OI' then
call RemoveItem(it)
set it=CreateItem('I0OG',0,0)
call SetItemPlayer(it,GetOwningPlayer(s),true)
call SetItemUserData(it,1)
call UnitAddItem(s,it)
endif
set i=i+1
endloop
call EnableTrigger(GW4)
set it=null
endfunction
function StaticShoeChange takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
local timer tm=LTimer(h,"tm")
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if GetAttacker()==s or GetTriggerUnit()==s then
if(GetUnitTypeId(s)!='H00J')then
call StaticShoeBreak(s)
else
call StaticShoeBreak(Y7[GetPlayerId(GetOwningPlayer(s))])
endif
if HasItem(s,'I0OI')+HasItem(s,'I0OG')>0 then
call TimerStart(tm,13,false,null)
endif
endif
elseif GetTriggerEventId()==EVENT_UNIT_PICKUP_ITEM then
if(GetItemTypeId(GetManipulatedItem())=='I0OG')and IsUnitType(s,UNIT_TYPE_DEAD)==false and TimerGetRemaining(tm)<.01 then
call TimerStart(tm,.01,false,null)
endif
elseif GetTriggerEventId()==EVENT_UNIT_HERO_REVIVE_FINISH then
if TimerGetRemaining(tm)<.01 then
call TimerStart(tm,0.01,false,null)
endif
elseif IsUnitType(s,UNIT_TYPE_DEAD)==false then
if(GetUnitTypeId(s)!='H00J')then
call StaticShoeReturn(s)
else
call StaticShoeReturn(Y7[GetPlayerId(GetOwningPlayer(s))])
endif
endif
set s=null
set tm=null
endfunction
function StaticShoeTrigReg takes unit s returns nothing
local trigger t=CreateTrigger()
local timer tm=CreateTimer()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_HERO_REVIVE_FINISH)
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_PICKUP_ITEM)
call TriggerRegisterTimerExpireEvent(t,tm)
call TriggerAddCondition(t,Condition(function StaticShoeChange))
call SUnit(GetHandleId(t),"s",s)
call STimer(GetHandleId(t),"tm",tm)
set t=null
set tm=null
endfunction
function GeneralPickup takes nothing returns nothing
if GetItemTypeId(GetManipulatedItem())=='I0OG' and LBool(GetHandleId(GetTriggerUnit()),"StaticShoeTrig")==false and IsUnitIllusion(GetTriggerUnit())==false then
call SBool(GetHandleId(GetTriggerUnit()),"StaticShoeTrig",true)
call StaticShoeTrigReg(GetTriggerUnit())
elseif GetUnitAbilityLevel(GetTriggerUnit(),'A0CG')>0 and LBool(GetHandleId(GetTriggerUnit()),"MultiAttackDisabled")==false then
call A0CG_RemoveVampire(GetTriggerUnit())
elseif GetUnitAbilityLevel(GetTriggerUnit(),'AZ3A')>0 and GetItemTypeId(GetManipulatedItem())=='IZ0I' then
call AZ3A_RefreshDelay(GetTriggerUnit())
endif
endfunction
function IssueOrderDisplay takes nothing returns nothing
if TestMode and IsUnitOwnedByPlayer(GetTriggerUnit(),GetLocalPlayer())and GetIssuedOrderId()!=851972 and GetIssuedOrderId()!=851971 and GetIssuedOrderId()!=851983 and GetIssuedOrderId()!=851993 and GetIssuedOrderId()!=851986 then
call TestMsg("OrderId:"+I2S(GetIssuedOrderId())+" - "+OrderId2String(GetIssuedOrderId()))
endif
endfunction
function PickupItemDisplay takes nothing returns nothing
if GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM then
call TestMsg(GetUnitName(GetTriggerUnit())+" pick up item: "+I2S_ASCII(GetItemTypeId(GetManipulatedItem()))+" / "+GetItemName(GetManipulatedItem()))
else
call TestMsg(GetUnitName(GetTriggerUnit())+" drop item: "+I2S_ASCII(GetItemTypeId(GetManipulatedItem()))+" / "+GetItemName(GetManipulatedItem()))
endif
endfunction
function HeroSkillDisplay takes nothing returns nothing
call TestMsg(GetUnitName(GetTriggerUnit())+"learned ability:"+I2S_ASCII(GetLearnedSkill())+" / "+GetObjectName(GetLearnedSkill()))
endfunction
function HeroSpellEffectDisplay takes nothing returns nothing
call TestMsg(GetUnitName(GetTriggerUnit())+"used ability:"+I2S_ASCII(GetSpellAbilityId())+" / "+GetObjectName(GetSpellAbilityId()))
endfunction
function SubCheck takes string a,string b returns boolean
return SubString(a,0,StringLength(b))==b
endfunction
function Test_RU takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function S2I_ASCII takes string IG1 returns integer
local integer id=0
local integer i=1
local integer l=1
loop
exitwhen(i>StringLength(IG1))
loop
exitwhen(l>10)
if(SubString(IG1,i-1,i)==SubString("0123456789",l-1,l))then
set id=id+R2I((48+l-1)*Pow(256.,I2R(StringLength(IG1)-i)))
set l=l+1
else
set l=l+1
endif
endloop
set l=1
loop
exitwhen(l>26)
if(SubString(IG1,i-1,i)==SubString("ABCDEFGHIJKLMNOPQRSTUVWXYZ",l-1,l))then
set id=id+R2I(I2R(65+l-1)*Pow(256.,I2R(StringLength(IG1)-i)))
set l=l+1
else
set l=l+1
endif
endloop
set l=1
loop
exitwhen(l>26)
if(SubString(IG1,i-1,i)==SubString("abcdefghijklmnopqrstuvwxyz",l-1,l))then
set id=id+R2I((97+l-1)*Pow(256.,I2R(StringLength(IG1)-i)))
set l=l+1
else
set l=l+1
endif
endloop
set l=1
set i=i+1
endloop
return id
endfunction
function Test_DO takes nothing returns nothing
call SetUnitAnimationByIndex(GetEnumUnit(),globalI)
endfunction
function Test_SetPath takes nothing returns nothing
call SetUnitPathing(GetEnumUnit(),globalB)
endfunction
function ShowEffectDestroy takes nothing returns nothing
local timer tm=GetExpiredTimer()
call DestroyEffect(LEff(GetHandleId(tm),"Effect"))
call KillUnit(LUnit(GetHandleId(tm),"s"))
call FlushChildHashtable(R8,GetHandleId(tm))
call PauseTimer(tm)
call DestroyTimer(tm)
set tm=null
endfunction
function ShowEffectFunc takes nothing returns nothing
local string s=StringCase(GetEventPlayerChatString(),false)
local image i=null
local timer tm=CreateTimer()
call TimerStart(tm,5,true,function ShowEffectDestroy)
set s=SubString(s,4,StringLength(s))
set bj_lastCreatedUnit=CreateUnit(Player(0),'e0MJ',0,0,0)
call UnitAddAbility(bj_lastCreatedUnit,'Amrf')
call UnitRemoveAbility(bj_lastCreatedUnit,'Amrf')
call SetUnitFlyHeight(bj_lastCreatedUnit,250,0)
call SetUnitScale(bj_lastCreatedUnit,3,3,3)
call SUnit(GetHandleId(tm),"s",bj_lastCreatedUnit)
call SEff(GetHandleId(tm),"Effect",AddSpecialEffectTarget(s,bj_lastCreatedUnit,"origin"))
set i=null
set tm=null
endfunction
function BloodlustTest takes nothing returns nothing
call SetWidgetLife(GetEnumUnit(),2)
endfunction
function TestMode_Chat takes nothing returns nothing
local string s=GetEventPlayerChatString()
local group g=CreateGroup()
local integer i=0
local unit u=null
call GroupEnumUnitsSelected(g,GetTriggerPlayer(),null)
set u=FirstOfGroup(g)
if SubCheck(s,"-gtlv")then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,"Level:"+I2S(GetUnitAbilityLevel(u,S2I_ASCII(SubString(GetEventPlayerChatString(),6,10)))))
elseif s=="-ru" then
call ForGroup(g,function Test_RU)
elseif SubCheck(s,"-do")then
set globalI=S2I(SubString(s,3,StringLength(s)))
call ForGroup(g,function Test_DO)
elseif SubCheck(s,"-ci")then
call ForGroup(g,function BloodlustTest)
elseif s=="-pathon" or s=="-pathoff" then
if s=="-pathon" then
set globalB=true
else
set globalB=false
endif
call ForGroup(g,function Test_SetPath)
elseif SubCheck(s,"-add")then
if SubString(s,4,8)=="strw" then
elseif SubString(s,4,8)=="life" then
call SetUnitState(u,UNIT_STATE_LIFE,RMaxBJ(1,GetUnitState(u,UNIT_STATE_LIFE)+S2I(SubString(s,8,StringLength(s)))))
elseif SubString(s,4,8)=="mana" then
call SetUnitState(u,UNIT_STATE_MANA,RMaxBJ(1,GetUnitState(u,UNIT_STATE_MANA)+S2I(SubString(s,8,StringLength(s)))))
endif
set u=null
elseif SubCheck(s,"-spd")then
call TestMsg(R2S(GetUnitMoveSpeed(u)))
call TestMsg(R2S(GetUnitDefaultMoveSpeed(u)))
elseif SubCheck(s,"-ata")then
set s=SubString(s,StrStr(s," ")+1,StringLength(s))
set globalI=S2I_ASCII(SubString(s,0,4))
set s=SubString(s,5,StringLength(s))
if S2I(s)==0 and s!="0" then
set i=1
else
set i=S2I(s)
endif
if i>0 then
call UnitAddAbility(u,globalI)
call SetUnitAbilityLevel(u,globalI,i)
call UnitMakeAbilityPermanent(u,true,globalI)
else
call UnitRemoveAbility(u,globalI)
endif
elseif SubCheck(s,"-id")then
call TestMsg(I2S_ASCII(GetUnitTypeId(u))+" / "+I2S(GetUnitTypeId(u)))
elseif SubCheck(s,"-eff")then
call DestroyEffect(AddSpecialEffect(SubString(s,5,StringLength(s)),0,0))
elseif SubCheck(s,"-testoff")then
set TestMode=false
call TriggerOff()
elseif SubCheck(s,"-ef")then
call ShowEffectFunc()
elseif SubCheck(s,"-tf")then
call GroupEnumUnitsInRange(g,0,0,99999,null)
loop
set u=FirstOfGroup(g)
exitwhen u==null
if IsUnitType(u,UNIT_TYPE_HERO)then
call SetWidgetLife(u,2)
endif
call GroupRemoveUnit(g,u)
endloop
elseif SubCheck(s,"-ai")then
set bj_lastCreatedItem=CreateItem(S2I_ASCII(SubString(GetEventPlayerChatString(),4,8)),GetUnitX(u),GetUnitY(u))
call SetItemUserData(bj_lastCreatedItem,1)
call SetItemPlayer(bj_lastCreatedItem,GetTriggerPlayer(),true)
call UnitAddItem(u,bj_lastCreatedItem)
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60,GetPlayerName(GetTriggerPlayer())+" Use Test Code to Get Item: "+GetObjectName(S2I_ASCII(SubString(GetEventPlayerChatString(),4,8))))
endif
call DestroyGroup(g)
set u=null
set g=null
endfunction
function GetNearestEnemyHero takes unit s,real x,real y returns unit
local group g=CreateGroup()
local unit f=null
local unit u=null
local real r=999999
call GroupEnumUnitsInRange(g,0,0,99999,null)
loop
set f=FirstOfGroup(g)
exitwhen f==null
if IsUnitEnemy(f,GetOwningPlayer(s))and IsUnitType(f,UNIT_TYPE_HERO)and IsUnitType(f,UNIT_TYPE_DEAD)==false and GetUnitAbilityLevel(f,'Aloc')==0 and Dist_U(s,f)<r then
set r=Dist_U(s,f)
set u=f
endif
call GroupRemoveUnit(g,f)
endloop
call DestroyGroup(g)
set g=null
set f=null
set s=u
set u=null
return s
endfunction
function A0VG_CC_DelayCast takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
local unit u=LUnit(h,"u")
local real x=LReal(h,"x")
local real y=LReal(h,"y")
local real x1=GetUnitX(s)
local real y1=GetUnitY(s)
local real a=Angle(x,y,x1,y1)
local real d=Dist(x,y,x1,y1)
if IsUnitType(u,UNIT_TYPE_DEAD)then
call TriggerOff()
return
endif
if d>530*1.7 then
set a=GetUnitFacing(s)
if GetUnitCurrentOrder(s)==851971 or GetUnitCurrentOrder(s)==851983 or GetUnitCurrentOrder(s)==851986 then
set d=GetUnitMoveSpeed(s)*1.7
else
set d=0
endif
endif
call UWG(s,x1+Cos(a)*d,y1+Sin(a)*d)
call SReal(h,"x",x1)
call SReal(h,"y",y1)
if SAInt(h,"Repeat",-1)==0 then
call TriggerOff()
endif
set s=null
set u=null
endfunction
function A0VG_CC takes nothing returns nothing
local unit s=GetTriggerUnit()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
local unit u=GetNearestEnemyHero(s,x,y)
call TriggerRegisterTimerEvent(t,1.71,true)
call TriggerAddCondition(t,Condition(function A0VG_CC_DelayCast))
call SUnit(h,"s",s)
call SUnit(h,"u",u)
call SReal(h,"x",GetUnitX(u))
call SReal(h,"y",GetUnitY(u))
call SInt(h,"Repeat",5)
set s=null
set t=null
endfunction
function A0H0_CC_Recover takes nothing returns nothing
if GetUnitAbilityLevel(GetTriggerUnit(),'B04R')>0 then
call AddLife(GetTriggerUnit(),GetEventDamage()*.9)
endif
endfunction
function GetMaxLife takes unit u returns real
return GetUnitState(u,UNIT_STATE_MAX_LIFE)
endfunction
function GetMaxMana takes unit u returns real
return GetUnitState(u,UNIT_STATE_MAX_MANA)
endfunction
function A0H0_CC takes nothing returns nothing
local trigger t=CreateTrigger()
local unit s=GetTriggerUnit()
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function A0H0_CC_Recover))
set s=null
set t=null
endfunction
function A0LT_CC takes nothing returns nothing
local group g=CreateGroup()
local unit s=GetTriggerUnit()
local unit u=null
call GroupEnumUnitsInRange(g,0,0,99999,null)
loop
set u=FirstOfGroup(g)
exitwhen u==null
if IsUnitAlly(u,GetOwningPlayer(s))then
call SetWidgetLife(u,GetMaxLife(u))
call SetUnitState(u,UNIT_STATE_MAX_MANA,GetMaxMana(u))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",u,"chest"))
endif
call GroupRemoveUnit(g,u)
endloop
endfunction
function A0LV_CC takes nothing returns nothing
local unit u=GetSpellTargetUnit()
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",u,"chest"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",u,"chest"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",u,"chest"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",u,"chest"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",u,"chest"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",u,"chest"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",u,"chest"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",u,"chest"))
call SetWidgetLife(u,GetWidgetLife(u)*.4)
call GroupRemoveUnit(LGroup(GetHandleId(GetTriggerUnit()),"A0LV_CC_Group"),GetSpellTargetUnit())
set u=null
endfunction
function GetMana takes unit u returns real
return GetUnitState(u,UNIT_STATE_MANA)
endfunction
function A1TA_CC_Recover takes nothing returns nothing
local integer h=GetT()
local unit s=LUnit(h,"s")
local unit u=LUnit(h,"u")
local real r
if GetUnitAbilityLevel(s,'B0DH')==0 then
call TriggerOff()
return
endif
if GetWidgetLife(u)<GetWidgetLife(s)then
call SetWidgetLife(u,GetWidgetLife(s))
endif
if GetMana(u)<GetMana(s)then
call SetUnitState(s,UNIT_STATE_MANA,GetMana(u))
endif
set r=GetWidgetLife(s)/GetMaxLife(s)
if GetWidgetLife(u)/GetMaxLife(u)<r then
call SetWidgetLife(u,RMaxBJ(r*GetMaxLife(s),GetWidgetLife(s)))
endif
set r=GetMana(s)/GetMaxMana(s)
if GetMana(u)/GetMaxMana(u)<r then
call SetUnitState(s,UNIT_STATE_MANA,RMaxBJ(r*GetMaxMana(u),GetMana(u)))
endif
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetWidgetLife(s)>GetWidgetLife(s)/GetMaxLife(s)*GetMaxLife(u)and GetWidgetLife(u)-GetEventDamage()<GetWidgetLife(s)then
call SetWidgetLife(u,GetWidgetLife(s))
call AddLife(u,GetEventDamage())
elseif GetWidgetLife(u)-GetEventDamage()<GetWidgetLife(s)/GetMaxLife(s)*GetMaxLife(u)then
call SetWidgetLife(u,GetWidgetLife(s)/GetMaxLife(s)*GetMaxLife(u))
call AddLife(u,GetEventDamage())
endif
endif
set s=null
set u=null
endfunction
function A1TA_CC takes nothing returns nothing
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
local unit u=GetSpellTargetUnit()
call TriggerRegisterTimer(t)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function A1TA_CC_Recover))
call SUnit(h,"s",GetTriggerUnit())
call SUnit(h,"u",u)
set t=null
set u=null
endfunction
function A0O1_CC takes nothing returns nothing
local unit s=GetTriggerUnit()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local unit f=CreateUnit(GetOwningPlayer(s),'e00E',x,y,0)
local real a=Angle_Uxy(s,x,y)
local real d=Dist_Uxy(s,x,y)*.5-100
call UnitAddAbility(f,'A0O1')
call SetUnitAbilityLevel(f,'A0O1',GetUnitAbilityLevel(s,'A0O1'))
call IssuePointOrderById(f,852218,GetUnitX(s),GetUnitY(s))
set f=CreateUnit(GetOwningPlayer(s),'e00E',GetUnitX(s)+Cos(a)*d+Cos(a+bj_PI*.5)*d,GetUnitY(s)+Sin(a)*d+Sin(a+bj_PI*.5)*d,0)
call UnitAddAbility(f,'A0O1')
call SetUnitAbilityLevel(f,'A0O1',GetUnitAbilityLevel(s,'A0O1'))
call IssuePointOrderById(f,852218,GetUnitX(s)+Cos(a)*d-Cos(a+bj_PI*.5)*d,GetUnitY(s)+Sin(a)*d-Sin(a+bj_PI*.5)*d)
set f=CreateUnit(GetOwningPlayer(s),'e00E',GetUnitX(s)+Cos(a)*d-Cos(a+bj_PI*.5)*d,GetUnitY(s)+Sin(a)*d-Sin(a+bj_PI*.5)*d,0)
call UnitAddAbility(f,'A0O1')
call SetUnitAbilityLevel(f,'A0O1',GetUnitAbilityLevel(s,'A0O1'))
call IssuePointOrderById(f,852218,GetUnitX(s)+Cos(a)*d+Cos(a+bj_PI*.5)*d,GetUnitY(s)+Sin(a)*d+Sin(a+bj_PI*.5)*d)
set s=null
set f=null
endfunction
function CC_SpellEffect_Func takes nothing returns nothing
local integer id=GetSpellAbilityId()
if TestMode==false or GetPlayerController(GetOwningPlayer(GetTriggerUnit()))!=MAP_CONTROL_COMPUTER then
return
endif
if id=='A0VG' then
call A0VG_CC()
elseif id=='A0H0' and LBool(GetHandleId(GetTriggerUnit()),"A0H0_CC_Trigger")==false then
call SBool(GetHandleId(GetTriggerUnit()),"A0H0_CC_Trigger",true)
call A0H0_CC()
elseif id=='A0LT' or id=='A1CS' then
call A0LT_CC()
elseif id=='A0LV' then
if IsUnitInGroup(GetSpellTargetUnit(),LGroup(GetHandleId(GetTriggerUnit()),"A0LV_CC_Group"))then
call A0LV_CC()
endif
elseif id=='A1TA' then
call A1TA_CC()
elseif id=='A0O1' then
if GetUnitAbilityLevel(GetTriggerUnit(),'Aloc')==0 then
call A0O1_CC()
endif
endif
endfunction
function A0LV_CC_DeathRecord takes nothing returns nothing
call GroupAddUnit(LGroup(GetHandleId(GetTriggerUnit()),"A0LV_CC_Group"),GetKillingUnit())
endfunction
function A0LV_CC_Reg takes nothing returns nothing
local unit s=GetTriggerUnit()
local trigger t=CreateTrigger()
local integer h=GetHandleId(t)
call SGroup(GetHandleId(s),"A0LV_CC_Group",CreateGroup())
call TriggerRegisterUnitEvent(t,s,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function A0LV_CC_DeathRecord))
set t=null
set s=null
endfunction
function CC_Learn_Func takes nothing returns nothing
local integer id=GetSpellAbilityId()
if GetSpellAbilityId()=='A0LV' then
call A0LV_CC_Reg()
endif
endfunction
function CCMode_Start takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function CC_SpellEffect_Func))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function CC_Learn_Func))
set t=null
endfunction
function SaveAchieve takes integer id,integer i returns nothing
call SaveInteger(achieveHT,'Achi',id,i)
endfunction
function AchieveTrigger takes nothing returns nothing
local unit s=GetTriggerUnit()
local unit u=null
local integer h
local integer i
local integer l
local player p
local player q
if GetTriggerEventId()==EVENT_PLAYER_UNIT_DEATH and GetUnitAbilityLevel(GetTriggerUnit(),'Aloc')==0 and(GetUnitAbilityLevel(GetTriggerUnit(),'Avul')+GetUnitAbilityLevel(GetTriggerUnit(),'A04R')==0 or IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))then
set u=s
set s=GetKillingUnit()
set p=GetOwningPlayer(s)
set q=GetOwningPlayer(u)
set h=GetHandleId(p)
set i=GetHandleId(q)
if IsUnitType(u,UNIT_TYPE_HERO)then
call SaveInteger(achieveHT,h,'AchP',LoadInteger(achieveHT,h,'AchP')+15)
call SaveInteger(achieveHT,i,'AchP',LoadInteger(achieveHT,i,'AchP')-5)
elseif IsUnitAlly(u,p)then
call SaveInteger(achieveHT,h,'AchP',LoadInteger(achieveHT,h,'AchP')+1)
endif
if s==null and GetUnitTypeId(u)=='Npbm' then
set s=BG4
set p=GetOwningPlayer(s)
endif
if IsPlayerAlly(p,q)and LState(s,"4328")and K27!=null then
set s=K27
set p=GetOwningPlayer(s)
endif
if LState(u,"4333")then
set s=PR4
set p=GetOwningPlayer(s)
endif
if IsUnitType(u,UNIT_TYPE_STRUCTURE)and GetPlayerState(Player(0),PLAYER_STATE_RESOURCE_LUMBER)<10 then
if IsJWPlayer(GetOwningPlayer(u))then
set l=LoadInteger(achieveHT,'JWTw','Kill')+1
call SaveInteger(achieveHT,'JWTw','Kill',l)
if l>4 then
call Achieve(G8[1],'CJ20')
call Achieve(G8[2],'CJ20')
call Achieve(G8[3],'CJ20')
call Achieve(G8[4],'CJ20')
call Achieve(G8[5],'CJ20')
endif
endif
if IsTZPlayer(GetOwningPlayer(u))then
set l=LoadInteger(achieveHT,'TZTw','Kill')+1
call SaveInteger(achieveHT,'TZTw','Kill',l)
if l>4 then
call Achieve(N8[1],'CJ20')
call Achieve(N8[2],'CJ20')
call Achieve(N8[3],'CJ20')
call Achieve(N8[4],'CJ20')
call Achieve(N8[5],'CJ20')
endif
endif
endif
if IsPlayer(p)then
if IsUnitType(u,UNIT_TYPE_HERO)then
set l=LoadInteger(achieveHT,'DEAD',GetPlayerId(p))
if IsUnitEnemy(u,p)then
call SaveInteger(achieveHT,'DEAD',GetPlayerId(p),0)
set l=LoadInteger(achieveHT,'KILL',GetPlayerId(p))+1
call SaveInteger(achieveHT,'KILL',GetPlayerId(p),l)
if l>=10 then
call Achieve(p,'CJ03')
endif
if Dist_U(u,s)>1000 then
call Achieve(p,'CJ16')
endif
if not IsUnitVisibleEx(u,p)then
call Achieve(p,'CJ17')
endif
endif
if IsUnitAlly(u,p)then
if s!=u then
call Achieve(q,'CJ13')
call Achieve(p,'CJ14')
else
call Achieve(p,'CJ15')
endif
endif
endif
if GetUnitTypeId(u)=='n00L' then
call Achieve(p,'CJ10')
endif
if GetUnitTypeId(u)=='nfoh' or GetUnitTypeId(u)=='ndfl' then
call Achieve(p,'CJ11')
endif
endif
if IsPlayer(q)and IsUnitType(u,UNIT_TYPE_HERO)then
if GetPlayerState(Player(0),PLAYER_STATE_RESOURCE_LUMBER)<15 then
set l=LoadInteger(achieveHT,'Dead',GetPlayerId(q))+1
call SaveInteger(achieveHT,'Dead',GetPlayerId(q),l)
if l>7 then
call Achieve(q,'CJ18')
endif
endif
set l=LoadInteger(achieveHT,'KILL',GetPlayerId(q))
if IsUnitEnemy(s,q)then
call SaveInteger(achieveHT,'KILL',GetPlayerId(q),0)
set l=LoadInteger(achieveHT,'DEAD',GetPlayerId(q))+1
call SaveInteger(achieveHT,'DEAD',GetPlayerId(q),l)
if l>=10 then
call Achieve(q,'CJ04')
endif
if(not IsPlayer(p))then
set l=LoadInteger(achieveHT,'Crps',GetPlayerId(q))+1
if l>4 then
call Achieve(q,'CJ08')
endif
endif
if GetUnitTypeId(s)=='n00L' then
call Achieve(q,'CJ09')
endif
endif
endif
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM then
set p=GetOwningPlayer(GetTriggerUnit())
if CountItem(GetTriggerUnit(),'I099')==6 then
call Achieve(p,'CJ21')
endif
if CountItem(GetTriggerUnit(),'I0AI')==6 then
call Achieve(p,'CJ22')
endif
elseif GetTriggerEventId()==EVENT_PLAYER_STATE_LIMIT then
set p=GetTriggerPlayer()
set i=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)
if i>10000 then
call Achieve(p,'CJ23')
endif
if i==12450 then
call Achieve(p,'CJ24')
endif
if i<2 then
call Achieve(p,'CJ25')
endif
endif
set s=null
set u=null
set p=null
set q=null
endfunction
function InitAchieve takes nothing returns nothing
local trigger t=CreateTrigger()
local integer i=1
loop
exitwhen i>11
if i==6 then
set i=7
endif
call TriggerRegisterPlayerStateEvent(t,Player(i),PLAYER_STATE_RESOURCE_GOLD,GREATER_THAN,50000)
call TriggerRegisterPlayerStateEvent(t,Player(i),PLAYER_STATE_RESOURCE_GOLD,GREATER_THAN,10000)
call TriggerRegisterPlayerStateEvent(t,Player(i),PLAYER_STATE_RESOURCE_GOLD,EQUAL,12450)
call TriggerRegisterPlayerStateEvent(t,Player(i),PLAYER_STATE_RESOURCE_GOLD,LESS_THAN,50)
call TriggerRegisterPlayerStateEvent(t,Player(i),PLAYER_STATE_RESOURCE_GOLD,LESS_THAN,2)
call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_PICKUP_ITEM,null)
call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_DEATH,null)
set i=i+1
endloop
call TriggerAddCondition(t,Condition(function AchieveTrigger))
call SaveAchieve('CJ01',35)
call SaveAchieve('CJ02',-5)
call SaveAchieve('CJ03',50)
call SaveAchieve('CJ04',-25)
call SaveAchieve('CJ05',50)
call SaveAchieve('CJ06',-15)
call SaveAchieve('CJ07',85)
call SaveAchieve('CJ08',15)
call SaveAchieve('CJ09',5)
call SaveAchieve('CJ10',25)
call SaveAchieve('CJ11',500)
call SaveAchieve('CJ12',50)
call SaveAchieve('CJ13',5)
call SaveAchieve('CJ14',5)
call SaveAchieve('CJ15',-5)
call SaveAchieve('CJ16',5)
call SaveAchieve('CJ17',5)
call SaveAchieve('CJ18',35)
call SaveAchieve('CJ19',25)
call SaveAchieve('CJ20',100)
call SaveAchieve('CJ21',200)
call SaveAchieve('CJ22',200)
call SaveAchieve('CJ23',100)
call SaveAchieve('CJ24',12)
call SaveAchieve('CJ25',5)
call SaveAchieve('CJ26',10)
set AchTrig=t
call DisableTrigger(AchTrig)
set t=null
endfunction
function main takes nothing returns nothing
local weathereffect we
local integer i
local player p
local unit u
local integer unitID
local trigger t
local real life
local integer QR8
local integer L4H
local version L7H
local integer X4G
local real L8H
local real L9H
local real LDH
local real LEH
local real LFH
local real LGH
local real LHH
local real LIH
local real LJH
local real LKH
local real LMH
local real LNH
local real LOH
local real LPH
local real LQH
local real LRH
local real LSH
local real LTH
local real LUH
local real LVH
local integer XQ8
local player j8
local real LWH
local real LXH
local real LYH
local real LZH
local real LAH
local real LBH
local real LCH
local real L3H
local real L6H
local real LLH
local real L1H
local real L0H
local real L5H
local real L2H
local real L_H
local real D4I
local real D7I
local real D8I
local real D9I
local real DDI
local real DEI
local real DFI
local real DII
local real DJI
local location YG9
local region HZE
local integer EC8
local integer x
local integer y
local timer tm=CreateTimer()
call InitAchieve()
set x=1
loop
exitwhen x>20
set LastNeutralType[x]=99
set x=x+1
endloop
set x=0
loop
exitwhen x>15
call SetPlayerAbilityAvailable(Player(x),'AZ3H',false)
set x=x+1
endloop
set CG_Values[1]=.5
set CG_Values[2]=.3
set CG_Values[3]=.05
set CG_Values[4]=10.
set CG_Values[5]=5
set CG_Values[6]=.3
set CG_Values[7]=.1
set CG_Values[8]='d'
set CG_Values[9]=60
set CG_Values[10]=60
set CG_Values[11]=.05
set CG_Values[12]=.25
set CG_Values[13]=2
set CG_Values[14]=1.1
set CG_Values[15]=8
set CG_Values[16]=40
set CG_Values[17]=70
set CG_Values[18]=110
call TimerStart(tm,.01,true,function GlobalTimerFunc)
if TestMode then
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(t,Condition(function IssueOrderDisplay))
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddCondition(t,Condition(function PickupItemDisplay))
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function HeroSkillDisplay))
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function HeroSpellEffectDisplay))
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,Player(0),"-",false)
call TriggerRegisterPlayerChatEvent(t,Player(1),"-",false)
call TriggerRegisterPlayerChatEvent(t,Player(2),"-",false)
call TriggerRegisterPlayerChatEvent(t,Player(3),"-",false)
call TriggerRegisterPlayerChatEvent(t,Player(4),"-",false)
call TriggerRegisterPlayerChatEvent(t,Player(5),"-",false)
call TriggerRegisterPlayerChatEvent(t,Player(6),"-",false)
call TriggerRegisterPlayerChatEvent(t,Player(7),"-",false)
call TriggerRegisterPlayerChatEvent(t,Player(8),"-",false)
call TriggerRegisterPlayerChatEvent(t,Player(9),"-",false)
call TriggerRegisterPlayerChatEvent(t,Player(10),"-",false)
call TriggerRegisterPlayerChatEvent(t,Player(11),"-",false)
call TriggerAddCondition(t,Condition(function TestMode_Chat))
set t=null
endif
set SY4[1]='A2PM'
set SY4[2]='A2PN'
set SY4[3]='A2PO'
set SY4[4]='A2PP'
set SY4[5]='A2PQ'
set SY4[6]='A2PJ'
set SY4[7]='A2PR'
set SY4[8]='A2PI'
set SY4[9]='A2PL'
set SY4[10]='A2PT'
set SY4[11]='A2Q1'
set SY4[12]='A2PU'
set SY4[13]='A2PH'
set SY4[14]='A2PV'
set SY4[15]='A2PW'
set SY4[16]='A2PX'
set SY4[17]='A2PY'
set SY4[18]='A2PZ'
set SY4[19]='A2Q0'
set SY4[20]='A2PK'
set SY4[21]='A2PS'
set SY4[22]='A2TA'
set SY4[23]='A2TB'
set SY4[24]='A2TC'
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(t,Condition(function AttackEffectCond))
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(t,Condition(function PoisonStopCond))
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function SummonCond))
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function GeneralSpellEffect))
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function GeneralSpellCast))
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function GeneralLearn))
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddCondition(t,Condition(function GeneralPickup))
call AQH()
call T2H()
set R17[0]=CreateTrigger()
set R07=GetHandleId(R17[0])
set i=1
loop
exitwhen i>9
set R17[i]=CreateTrigger()
set i=i+1
endloop
set i=0
call SetCameraBounds(-7552.+GetCameraMargin(CAMERA_MARGIN_LEFT),-7936.+GetCameraMargin(CAMERA_MARGIN_BOTTOM),7552.-GetCameraMargin(CAMERA_MARGIN_RIGHT),7424.-GetCameraMargin(CAMERA_MARGIN_TOP),-7552.+GetCameraMargin(CAMERA_MARGIN_LEFT),7424.-GetCameraMargin(CAMERA_MARGIN_TOP),7552.-GetCameraMargin(CAMERA_MARGIN_RIGHT),-7936.+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 yE=CreateSound("Abilities\\Spells\\Human\\Avatar\\Avatar.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(yE,"Avatar")
call SetSoundDuration(yE,3199)
set zE=CreateSound("Abilities\\Spells\\NightElf\\Blink\\BlinkArrival1.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(zE,"BlinkTarget")
call SetSoundDuration(zE,1466)
call SetSoundPitch(zE,1.6)
set vX=CreateSound("Abilities\\Spells\\Human\\Blizzard\\BlizzardLoop1.wav",true,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(vX,"BlizzardLoop")
call SetSoundDuration(vX,4000)
set AN=CreateSound("Buildings\\Undead\\TempleOfTheDamned\\TempleOfTheDamnedWhat.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(AN,"TempleOfTheDamnedWhat")
call SetSoundDuration(AN,3518)
call SetSoundDistanceCutoff(AN,2000.)
set BN=CreateSound("Abilities\\Spells\\Human\\Flare\\FlareTarget2.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(BN,"Flare2")
call SetSoundDuration(BN,1344)
call SetSoundDistanceCutoff(BN,2000.)
set CN=CreateSound("Sounds\\Dominating.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(CN,1802)
call SetSoundChannel(CN,0)
call SetSoundVolume(CN,127)
call SetSoundPitch(CN,1.)
set nX=CreateSound("Sounds\\Double_Kill.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(nX,2012)
call SetSoundChannel(nX,0)
call SetSoundVolume(nX,127)
call SetSoundPitch(nX,1.)
set EX=CreateSound("Sounds\\firstblood.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(EX,1567)
call SetSoundChannel(EX,0)
call SetSoundVolume(EX,127)
call SetSoundPitch(EX,1.)
set OX=CreateSound("Units\\Creeps\\GoblinSapper\\GoblinSapperPissed1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(OX,"GoblinSapperPissed")
call SetSoundDuration(OX,1515)
call SetSoundChannel(OX,0)
set DO=CreateSound("Units\\Creeps\\GoblinSapper\\GoblinSapperYesAttack1.wav",false,false,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(DO,"GoblinSapperYesAttack")
call SetSoundDuration(DO,813)
call SetSoundChannel(DO,0)
set JO=CreateSound("Sounds\\GodLike.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(JO,1828)
call SetSoundChannel(JO,0)
call SetSoundVolume(JO,127)
call SetSoundPitch(JO,1.)
set bX=CreateSound("Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed1.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(bX,"HEROGoblinALCHEMISTPissed")
call SetSoundDuration(bX,1948)
set BX=CreateSound("Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed2.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(BX,"HEROGoblinALCHEMISTPissed")
call SetSoundDuration(BX,1733)
set cX=CreateSound("Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed3.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(cX,"HEROGoblinALCHEMISTPissed")
call SetSoundDuration(cX,3570)
set CX=CreateSound("Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed4.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(CX,"HEROGoblinALCHEMISTPissed")
call SetSoundDuration(CX,3576)
set fX=CreateSound("Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed5.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(fX,"HEROGoblinALCHEMISTPissed")
call SetSoundDuration(fX,3558)
set kX=CreateSound("Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed6.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(kX,"HEROGoblinALCHEMISTPissed")
call SetSoundDuration(kX,10867)
set LX=CreateSound("Units\\Orc\\HeroBladeMaster\\HeroBladeMasterPissed1.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(LX,"HeroBladeMasterPissed")
call SetSoundDuration(LX,2235)
set mX=CreateSound("Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed1.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(mX,"HeroDreadLordPissed")
call SetSoundDuration(mX,2921)
set MX=CreateSound("Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed2.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(MX,"HeroDreadLordPissed")
call SetSoundDuration(MX,7125)
set PX=CreateSound("Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed3.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(PX,"HeroDreadLordPissed")
call SetSoundDuration(PX,3998)
set qX=CreateSound("Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed4.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(qX,"HeroDreadLordPissed")
call SetSoundDuration(qX,1727)
set QX=CreateSound("Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed5.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(QX,"HeroDreadLordPissed")
call SetSoundDuration(QX,8893)
set tX=CreateSound("Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed6.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(tX,"HeroDreadLordPissed")
call SetSoundDuration(tX,6066)
set TX=CreateSound("Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed7.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(TX,"HeroDreadLordPissed")
call SetSoundDuration(TX,1277)
set PO=CreateSound("Sounds\\HolyShit.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(PO,2325)
call SetSoundChannel(PO,0)
call SetSoundVolume(PO,127)
call SetSoundPitch(PO,1.)
set UX=CreateSound("Buildings\\NightElf\\MoonWell\\MoonWellWhat1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(UX,"MoonWellWhat")
call SetSoundDuration(UX,2972)
call SetSoundDistances(UX,600.,10000.)
call SetSoundDistanceCutoff(UX,2000.)
set TO=CreateSound("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaos.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(TO,"MarkOfChaos")
call SetSoundDuration(TO,4000)
set VO=CreateSound("Sounds\\Killing_Spree.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(VO,2377)
call SetSoundChannel(VO,0)
call SetSoundVolume(VO,127)
call SetSoundPitch(VO,1.)
set oO=CreateSound("Sound\\Buildings\\Death\\NightElfBuildingDeathSmall1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(oO,"DeathNightElfBuildingCancel")
call SetSoundDuration(oO,3675)
set YO=CreateSound("Sounds\\MegaKill.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(YO,2612)
call SetSoundChannel(YO,0)
call SetSoundVolume(YO,127)
call SetSoundPitch(YO,1.)
set aO=CreateSound("Abilities\\Spells\\NightElf\\ShadowMeld\\ShadowMeld1.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(aO,"ShadowMeld")
call SetSoundDuration(aO,941)
set ZO=CreateSound("Sounds\\MonsterKill.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(ZO,3344)
call SetSoundChannel(ZO,0)
call SetSoundVolume(ZO,127)
call SetSoundPitch(ZO,1.)
set EO=CreateSound("Units\\Creeps\\Ogre\\OgrePissed1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(EO,"OgrePissed")
call SetSoundDuration(EO,3309)
set XO=CreateSound("Sounds\\Ownage.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(XO,2586)
call SetSoundChannel(XO,0)
call SetSoundVolume(XO,127)
call SetSoundPitch(XO,1.)
set OO=CreateSound("Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed1.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(OO,"PandarenBrewmasterPissed")
call SetSoundDuration(OO,2316)
set AO=CreateSound("Abilities\\Spells\\Human\\Polymorph\\PolymorphDone.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(AO,"PolymorphDone")
call SetSoundDuration(AO,1498)
set NO=CreateSound("Buildings\\Naga\\TempleofTides\\TempleOfTidesWhat1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(NO,"TempleOfTidesWhat")
call SetSoundDuration(NO,3483)
call SetSoundDistanceCutoff(NO,2000.)
set bO=CreateSound("Buildings\\Undead\\TombOfRelics\\TombOfRelicsWhat1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(bO,"TombOfRelicsWhat")
call SetSoundDuration(bO,3065)
call SetSoundDistanceCutoff(bO,2000.)
set BO=CreateSound("Abilities\\Spells\\Orc\\Disenchant\\Disenchant.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(BO,"Disenchant")
call SetSoundDuration(BO,2043)
set cO=CreateSound("Sound\\Interface\\Rescue.wav",false,false,false,10,10,"")
call SetSoundParamsFromLabel(cO,"Rescue")
call SetSoundDuration(cO,3796)
set CO=CreateSound("Units\\Human\\Rifleman\\RiflemanPissed1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(CO,"RiflemanPissed")
call SetSoundDuration(CO,3158)
set fO=CreateSound("Units\\Human\\Rifleman\\RiflemanPissed2.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(fO,"RiflemanPissed")
call SetSoundDuration(fO,1306)
set FO=CreateSound("Units\\Human\\Rifleman\\RiflemanPissed3.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(FO,"RiflemanPissed")
call SetSoundDuration(FO,2624)
set gO=CreateSound("Units\\Human\\Rifleman\\RiflemanPissed4.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(gO,"RiflemanPissed")
call SetSoundDuration(gO,3785)
set hO=CreateSound("Units\\Human\\Rifleman\\RiflemanPissed5.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(hO,"RiflemanPissed")
call SetSoundDuration(hO,4168)
set HO=CreateSound("Units\\Human\\Rifleman\\RiflemanPissed6.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(HO,"RiflemanPissed")
call SetSoundDuration(HO,2810)
set kO=CreateSound("Units\\Human\\Rifleman\\RiflemanPissed7.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(kO,"RiflemanPissed")
call SetSoundDuration(kO,4609)
set lO=CreateSound("Units\\Human\\Rifleman\\RiflemanPissed8.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(lO,"RiflemanPissed")
call SetSoundDuration(lO,5480)
set mO=CreateSound("Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed1.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(mO,"HeroShadowHunterPissed")
call SetSoundDuration(mO,2293)
set pO=CreateSound("Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed2.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(pO,"HeroShadowHunterPissed")
call SetSoundDuration(pO,1789)
set qO=CreateSound("Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed3.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(qO,"HeroShadowHunterPissed")
call SetSoundDuration(qO,2301)
set QO=CreateSound("Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed4.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(QO,"HeroShadowHunterPissed")
call SetSoundDuration(QO,2752)
set tO=CreateSound("Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed5.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(tO,"HeroShadowHunterPissed")
call SetSoundDuration(tO,3129)
set UO=CreateSound("Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed6.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(UO,"HeroShadowHunterPissed")
call SetSoundDuration(UO,1666)
set wO=CreateSound("Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed7.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(wO,"HeroShadowHunterPissed")
call SetSoundDuration(wO,1187)
set WO=CreateSound("Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed8.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(WO,"HeroShadowHunterPissed")
call SetSoundDuration(WO,2148)
set zO=CreateSound("Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed9.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(zO,"HeroShadowHunterPissed")
call SetSoundDuration(zO,2026)
set vR=CreateSound("Abilities\\Spells\\Undead\\Sleep\\SleepBirth1.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(vR,"Sleep")
call SetSoundDuration(vR,3203)
set eR=CreateSound("Units\\Human\\BloodElfSpellThief\\SpellbreakerPissed1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(eR,"SpellBreakerPissed")
call SetSoundDuration(eR,3901)
set oR=CreateSound("Units\\Human\\BloodElfSpellThief\\SpellbreakerPissed2.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(oR,"SpellBreakerPissed")
call SetSoundDuration(oR,3367)
set rR=CreateSound("Units\\Human\\BloodElfSpellThief\\SpellbreakerPissed3.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(rR,"SpellBreakerPissed")
call SetSoundDuration(rR,3651)
set aR=CreateSound("Units\\Human\\BloodElfSpellThief\\SpellbreakerPissed4.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(aR,"SpellBreakerPissed")
call SetSoundDuration(aR,2490)
set RR=CreateSound("Units\\Human\\BloodElfSpellThief\\SpellbreakerPissed5.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(RR,"SpellBreakerPissed")
call SetSoundDuration(RR,14402)
set bR=CreateSound("Abilities\\Spells\\Undead\\DevourMagic\\DevourMagic.wav",false,true,true,10,10,"MissilesEAX")
call SetSoundParamsFromLabel(bR,"DevourMagicLaunch")
call SetSoundDuration(bR,1225)
set BR=CreateSound("Abilities\\Spells\\Other\\BlackArrow\\TheBlackArrow.wav",false,true,true,10,10,"MissilesEAX")
call SetSoundParamsFromLabel(BR,"BlackArrowHit")
call SetSoundDuration(BR,1776)
call SetSoundVolume(BR,50)
set LO=CreateSound("Sound\\Ambient\\DoodadEffects\\TheHornOfCenarius.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(LO,"HornOfCenariusSound")
call SetSoundDuration(LO,12121)
call SetSoundVolume(LO,'s')
set CR=CreateSound("Sounds\\triple_kill.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(CR,1907)
call SetSoundChannel(CR,0)
call SetSoundVolume(CR,127)
call SetSoundPitch(CR,1.)
set DP=CreateSound("Sounds\\Unstoppable.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(DP,2038)
call SetSoundChannel(DP,0)
call SetSoundVolume(DP,127)
call SetSoundPitch(DP,1.)
set EP=CreateSound("Abilities\\Spells\\Human\\DivineShield\\PaladinDivineShieldDeath1.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(EP,"DivineShieldDeath")
call SetSoundDuration(EP,1043)
call SetSoundDistanceCutoff(EP,1500.)
set hR=CreateSound("Abilities\\Spells\\Items\\AIso\\SoulGem.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(hR,"SoulGem")
call SetSoundDuration(hR,4474)
set GP=CreateSound("Sounds\\WhickedSick.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(GP,2612)
call SetSoundChannel(GP,0)
call SetSoundVolume(GP,127)
call SetSoundPitch(GP,1.)
set JR=CreateSound("Units\\Orc\\WitchDoctor\\WitchDoctorPissed1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(JR,"WitchDoctorPissed")
call SetSoundDuration(JR,1282)
set lR=CreateSound("Units\\Orc\\WitchDoctor\\WitchDoctorPissed2.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(lR,"WitchDoctorPissed")
call SetSoundDuration(lR,1248)
set LR=CreateSound("Units\\Orc\\WitchDoctor\\WitchDoctorPissed3.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(LR,"WitchDoctorPissed")
call SetSoundDuration(LR,1524)
set mR=CreateSound("Units\\Orc\\WitchDoctor\\WitchDoctorPissed4.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(mR,"WitchDoctorPissed")
call SetSoundDuration(mR,1200)
set pR=CreateSound("Units\\Orc\\WitchDoctor\\WitchDoctorPissed5.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(pR,"WitchDoctorPissed")
call SetSoundDuration(pR,2762)
set PR=CreateSound("Units\\Orc\\WitchDoctor\\WitchDoctorPissed6.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(PR,"WitchDoctorPissed")
call SetSoundDuration(PR,2849)
set qR=CreateSound("Units\\Creeps\\GoblinSapper\\GoblinSapperYesAttack4.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(qR,"GoblinSapperYesAttack")
call SetSoundDuration(qR,1091)
call SetSoundChannel(qR,0)
set QR=CreateSound("Abilities\\Spells\\NightElf\\shadowstrike\\ShadowStrikeBirth1.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(QR,"ShadowStrikeBirth")
call SetSoundDuration(QR,2194)
call SetSoundPitch(QR,1.2)
set sR=CreateSound("Abilities\\Spells\\NightElf\\CorrosiveBreath\\CorrosiveBreathMissileLaunch1.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(sR,"CorrosiveBreathMissileLaunch")
call SetSoundDuration(sR,1301)
call SetSoundPitch(sR,1.2)
set SR=CreateSound("Sound\\Interface\\Warning\\NightElf\\SentinelAllyHeroDies1.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(SR,"AllyHeroDiesNightElf")
call SetSoundDuration(SR,1963)
call SetSoundVolume(SR,127)
set UR=CreateSound("Sound\\Interface\\Warning\\Undead\\NecromancerAllyHeroDies1.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(UR,"AllyHeroDiesUndead")
call SetSoundDuration(UR,1933)
call SetSoundVolume(UR,127)
set WR=CreateSound("Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.wav",false,false,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(WR,"ReviveHuman")
call SetSoundDuration(WR,3196)
call SetSoundChannel(WR,8)
set zR=CreateSound("Sound\\Interface\\SecretFound.wav",false,false,false,10,10,"")
call SetSoundParamsFromLabel(zR,"SecretFound")
call SetSoundDuration(zR,2525)
set IP=CreateSound("Sounds\\UltraKill.mp3",false,false,false,10,10,"")
call SetSoundDuration(IP,1958)
call SetSoundChannel(IP,0)
call SetSoundVolume(IP,127)
call SetSoundPitch(IP,1.)
set JP=CreateSound("Sounds\\Rampage.mp3",false,false,false,10,10,"")
call SetSoundDuration(JP,1195)
call SetSoundChannel(JP,0)
call SetSoundVolume(JP,127)
call SetSoundPitch(JP,1.)
set eI=CreateSound("Units\\Orc\\AncestralGuardian\\AncestralGuardianAttack1.wav",false,true,true,10,10,"CombatSoundsEAX")
call SetSoundParamsFromLabel(eI,"AncestralGuardianAttack1")
call SetSoundDuration(eI,1181)
set oI=CreateSound("Abilities\\Spells\\Human\\Feedback\\Feedback.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(oI,"Feedback")
call SetSoundDuration(oI,1222)
set KP=CreateSound("Units\\Undead\\Abomination\\AbominationPissed5.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(KP,"AbominationPissed")
call SetSoundDuration(KP,1735)
set OP=CreateSound("Sound\\Units\\Death\\ArtilleryCorpseExplodeDeath1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(OP,"ArtilleryExplodeDeath")
call SetSoundDuration(OP,1486)
set RI=CreateSound("Units\\Undead\\CryptFiend\\CryptFiendPissed2.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(RI,"CryptFiendPissed")
call SetSoundDuration(RI,3541)
set PP=CreateSound("Units\\Undead\\Banshee\\BansheeDeath.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(PP,"BansheeDeath")
call SetSoundDuration(PP,2380)
set WI4=CreateSound("Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTargetWaveNonLoop1.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(WI4,"FlameStrikeTarget")
call SetSoundDuration(WI4,1927)
set WJ4=CreateSound("Abilities\\Spells\\Other\\Volcano\\VolcanoLoop.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(WJ4,"VolcanoLoop")
call SetSoundDuration(WJ4,7616)
set WK4=CreateSound("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.wav",false,false,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(WK4,"ThunderClap")
call SetSoundDuration(WK4,3451)
set WM4=CreateSound("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImage.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(WM4,"MirrorImage")
call SetSoundDuration(WM4,1756)
set WN4=CreateSound("Abilities\\Spells\\Human\\CloudOfFog\\CloudOfFogLoop1.wav",true,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(WN4,"CloudOfFogLoop")
call SetSoundDuration(WN4,2038)
call SetSoundPitch(WN4,.9)
set WU4=CreateSound("Units\\Human\\Gyrocopter\\GyrocopterPissed1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(WU4,"GyrocopterPissed")
call SetSoundDuration(WU4,3913)
set WV4="Sound\\Music\\mp3Music\\Tension.mp3"
set WW4="Sound\\Music\\mp3Music\\ArthasTheme.mp3"
set WX4="Sound\\Music\\mp3Music\\NightElfDefeat.mp3"
set WY4="Sound\\Music\\mp3Music\\NightElfVictory.mp3"
set WZ4=CreateSound("Sound\\Interface\\SecretFound.wav",false,false,false,10,10,"")
call SetSoundParamsFromLabel(WZ4,"SecretFound")
call SetSoundDuration(WZ4,2525)
set WA4=CreateSound("Sound\\Interface\\Hint.wav",false,false,false,10,10,"")
call SetSoundParamsFromLabel(WA4,"Hint")
call SetSoundDuration(WA4,2006)
set YZ4=CreateSound("war3mapImported\\pl_impact_stun.mp3",false,true,true,10,10,"SpellsEAX")
call SetSoundDuration(YZ4,1340)
call SetSoundChannel(YZ4,11)
call SetSoundVolume(YZ4,127)
call SetSoundPitch(YZ4,1.)
call SetSoundDistances(YZ4,600.,10000.)
call SetSoundDistanceCutoff(YZ4,2000.)
call SetSoundConeAngles(YZ4,.0,.0,127)
call SetSoundConeOrientation(YZ4,.0,.0,.0)
set YA4=CreateSound("Sound\\Buildings\\Fire\\OrcHumanLargeBuildingFire1.wav",true,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(YA4,"HumanFireLarge")
call SetSoundDuration(YA4,3471)
set YB4=CreateSound("Units\\Human\\Phoenix\\PhoenixEggWhat1.wav",false,false,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(YB4,"PhoenixEggWhat")
call SetSoundDuration(YB4,1579)
call SetSoundChannel(YB4,0)
set B64=CreateSound("Abilities\\Spells\\NightElf\\BattleRoar\\BattleRoar.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(B64,"BattleRoar")
call SetSoundDuration(B64,1991)
set BL4=CreateSound("Buildings\\Undead\\Ziggurat\\ZigguratUpgrade.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(BL4,"ZigguratUpgradeWhat")
call SetSoundDuration(BL4,4203)
call SetSoundDistances(BL4,600.,10000.)
call SetSoundDistanceCutoff(BL4,3000.)
set B14=CreateSound("Abilities\\Spells\\Human\\SpellSteal\\SpellStealMissile.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(B14,"SpellStealMissileLaunch")
call SetSoundDuration(B14,1541)
set B04=CreateSound("Abilities\\Spells\\Human\\SpellSteal\\SpellStealTarget.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(B04,"SpellStealTarget")
call SetSoundDuration(B04,984)
set B54=CreateSound("Abilities\\Spells\\Undead\\UndeadMine\\AcolyteMining.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(B54,"AcolyteMining")
call SetSoundDuration(B54,4233)
call SetSoundChannel(B54,0)
set B24=CreateSound("Abilities\\Weapons\\AvengerMissile\\DestroyerMissile.wav",false,true,true,10,10,"MissilesEAX")
call SetSoundParamsFromLabel(B24,"DestroyerMissileLaunch")
call SetSoundDuration(B24,817)
set B_4=CreateSound("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouch.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(B_4,"SpiritTouch")
call SetSoundDuration(B_4,2043)
call SetSoundChannel(B_4,11)
set CK4=CreateSound("Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTargetWaveNonLoop1.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(CK4,"FlameStrikeTarget")
call SetSoundDuration(CK4,1927)
set pH=Rect(6900,-7800,7600,-7000)
set go=Rect(6176.,3136.,6400.,3392.)
set jo=Rect(3616.,3584.,3872.,3872.)
set lo=Rect(2304.,5280.,2752.,5728.)
set PD=Rect(6176.,5952.,6624.,6240.)
set Qo=Rect(-4224.,-6848.,-3968.,-6592.)
set to=Rect(-6304.,-4384.,-6080.,-4224.)
set Uo=Rect(-4928.,-5760.,-4736.,-5536.)
set wo=Rect(6048.,3424.,6304.,3776.)
set zo=Rect(4128.,3776.,4352.,4032.)
set er=Rect(2752.,5408.,3040.,5632.)
set QD=Rect(-7040.,-6912.,-6688.,-6656.)
set ar=Rect(-3648.,-6880.,-3424.,-6688.)
set Er=Rect(-6336.,-4224.,-5984.,-3904.)
set Xr=Rect(-4896.,-5504.,-4608.,-5184.)
set TD=Rect(2912.,-2944.,3104.,-2720.)
set WD=Rect(5696.,5504.,7296.,7392.)
set XD=Rect(-7680.,-8032.,-6176.,-6240.)
set YD=Rect(-2464.,1536.,-2240.,1760.)
set Br=Rect(4288.,-2688.,4544.,-2400.)
set cr=Rect(-3328.,-416.,-3104.,-96.)
set Cr=Rect(1440.,-4096.,1728.,-3872.)
set fr=Rect(-4576.,3328.,-4448.,3488.)
set Fr=Rect(-3264.,4192.,-2912.,4320.)
set Hr=Rect(2848.,-5088.,3072.,-4928.)
set jr=Rect(-1824.,2240.,-1472.,2464.)
set Jr=Rect(3008.,-3776.,3136.,-3648.)
set lr=Rect(1184.,2976.,1280.,3104.)
set mr=Rect(-512.,-3648.,-320.,-3520.)
set ZD=Rect(-7104.,6656.,-6848.,6912.)
set qr=Rect(-7104.,6656.,-6880.,6880.)
set AD=Rect(2304.,-672.,2592.,-384.)
set Sr=Rect(3872.,-3008.,4928.,-1952.)
set Ur=Rect(-3552.,-768.,-2528.,320.)
set Wr=Rect(1056.,-5216.,2368.,-3744.)
set zr=Rect(-5120.,3008.,-3648.,4320.)
set Zr=Rect(-3456.,3808.,-2656.,4864.)
set vi=Rect(2272.,-6080.,3776.,-4928.)
set ei=Rect(-1888.,2208.,-992.,3040.)
set xi=Rect(416.,2624.,1632.,3648.)
set oi=Rect(2592.,-4800.,3744.,-3328.)
set ai=Rect(-1024.,-3808.,192.,-2752.)
set BD=Rect(-7936.,-7776.,-5920.,-5760.)
set LD=Rect(5504.,5184.,7744.,7136.)
set Ai=Rect(-800.,3072.,64.,4032.)
set Ni=Rect(-384.,3392.,-192.,3520.)
set bi=Rect(-1728.,-5056.,-768.,-3840.)
set Bi=Rect(-1152.,-4704.,-960.,-4480.)
set KE=Rect(-480.,-800.,-256.,-512.)
set RE=Rect(2112.,-736.,2752.,-160.)
set di=Rect(2112.,-960.,2720.,-640.)
set fi=Rect(2112.,-1088.,2720.,-864.)
set Fi=Rect(2656.,-1120.,2784.,-416.)
set Gi=Rect(2752.,-1248.,2880.,-544.)
set Ji=Rect(2848.,-1344.,2912.,-640.)
set li=Rect(2912.,-1408.,2976.,-704.)
set Li=Rect(2208.,-1216.,2816.,-992.)
set pi=Rect(2464.,-1472.,3200.,-1152.)
set SE=Rect(-8160.,-8192.,-3712.,-4352.)
set TE=Rect(-8192.,-4960.,-4640.,-3552.)
set WE=Rect(-4000.,-7744.,-3072.,-5152.)
set YE=Rect(2304.,4064.,8032.,7776.)
set ZE=Rect(4640.,1952.,8000.,4384.)
set EF=Rect(3136.,2816.,5216.,4960.)
set FF=Rect(-7968.,5216.,-7456.,5920.)
set GF=Rect(-8064.,2880.,-7648.,4512.)
set HF=Rect(-3296.,3712.,-2688.,3968.)
set JF=Rect(-2400.,2016.,-1952.,2624.)
set KF=Rect(-2016.,1600.,-1216.,2048.)
set MF=Rect(-2144.,2528.,-1888.,2944.)
set NF=Rect(-1280.,1728.,-736.,2176.)
set OF=Rect(-1696.,-768.,-1376.,-448.)
set PF=Rect(-576.,.0,-352.,256.)
set QF=Rect(3104.,-2784.,3680.,-2304.)
set RF=Rect(3264.,-3040.,3872.,-2656.)
set SF=Rect(4960.,-3104.,5632.,-2816.)
set TF=Rect(4896.,-3744.,5280.,-3456.)
set UF=Rect(7488.,-3520.,8192.,-2336.)
set WF=Rect(6656.,-3328.,7808.,-2656.)
set XF=Rect(7104.,-8192.,8192.,-5920.)
set YF=Rect(5952.,-8192.,7200.,-7712.)
set ZF=Rect(7168.,-6240.,8128.,-5184.)
set BF=Rect(5824.,-8032.,6400.,-7776.)
set CF=Rect(6976.,-6560.,7488.,-5920.)
set LF=Rect(-5856.,2944.,-5600.,3200.)
set DG=Rect(6784.,-7776.,7264.,-7456.)
set EG=Rect(-8128.,-8192.,5536.,-7744.)
set FG=Rect(2368.,-7904.,2688.,-7584.)
set GG=Rect(-1664.,-7808.,-1344.,-7552.)
set JG=Rect(-2944.,-8192.,-1664.,-7680.)
set MG=Rect(-4000.,-8192.,-3168.,-7616.)
set OG=Rect(-5760.,-8000.,-5184.,-7584.)
set PG=Rect(-3296.,3744.,-3104.,3872.)
set QG=Rect(-8192.,-8192.,-6720.,-7744.)
set RG=Rect(-8192.,-6432.,-7456.,-4928.)
set SG=Rect(-8192.,-8128.,-7904.,8160.)
set TG=Rect(-7744.,3936.,-7328.,5600.)
set UG=Rect(-7680.,1984.,-6560.,2816.)
set VG=Rect(-7776.,1696.,-6944.,2176.)
set WG=Rect(-8032.,-3040.,-7680.,-2720.)
set XG=Rect(-7904.,-2656.,-7552.,-2336.)
set ZG=Rect(-3936.,-2720.,-3584.,-2400.)
set AG=Rect(-3168.,-1952.,-2912.,-1696.)
set BG=Rect(-4128.,-1632.,-3776.,-1152.)
set CG=Rect(-4992.,-1792.,-3968.,-1440.)
set LG=Rect(-5536.,-1664.,-4832.,-1280.)
set DH=Rect(-2304.,3872.,-2048.,4096.)
set EH=Rect(-5664.,-1440.,-5344.,.0)
set FH=Rect(-5824.,-1504.,-5472.,-544.)
set GH=Rect(-5216.,-1216.,-4480.,-384.)
set HH=Rect(-5632.,448.,-5152.,1856.)
set JH=Rect(-5856.,1440.,-5248.,2592.)
set MH=Rect(-5408.,1888.,-4928.,2368.)
set NH=Rect(-5056.,1664.,-4064.,2144.)
set OH=Rect(-4320.,1344.,-3808.,1952.)
set PH=Rect(-4224.,1440.,-3200.,2016.)
set QH=Rect(-2112.,3424.,-1856.,3744.)
set RH=Rect(-2400.,640.,-2208.,896.)
set TH=Rect(-3392.,640.,-3200.,896.)
set UH=Rect(-3744.,-1024.,-3232.,384.)
set WH=Rect(-2016.,-5504.,-1664.,-4768.)
set XH=Rect(-1760.,-5248.,-1312.,-4800.)
set YH=Rect(896.,-3328.,1088.,-3072.)
set ZH=Rect(2368.,-3808.,2688.,-3360.)
set AH=Rect(1952.,-3744.,2208.,-3456.)
set CH=Rect(-768.,-1344.,-480.,-1024.)
set LH=Rect(1152.,-6560.,1376.,-6272.)
set DI=Rect(1216.,-6368.,1504.,-6176.)
set EI=Rect(-1376.,-6784.,-1184.,-6528.)
set GI=Rect(7616.,-6528.,8192.,8160.)
set HI=Rect(7072.,-2304.,7264.,-2048.)
set II=Rect(-7872.,7872.,8192.,8192.)
set JI=Rect(1792.,7776.,2112.,8192.)
set NI=Rect(-2656.,.0,-2496.,256.)
set PI=Rect(-768.,7232.,-416.,7424.)
set SI=Rect(-7968.,5472.,-7648.,5792.)
set TI=Rect(1120.,7904.,1312.,8160.)
set UI=Rect(736.,4480.,1120.,4800.)
set WI=Rect(2208.,4928.,2400.,5152.)
set XI=Rect(576.,4384.,1120.,4928.)
set YI=Rect(2560.,4160.,2784.,4576.)
set BI=Rect(-5984.,-3776.,-5504.,-3232.)
set CI=Rect(576.,4256.,1024.,4672.)
set LI=Rect(544.,4352.,992.,4768.)
set TJ=Rect(704.,2496.,1376.,2784.)
set XJ=Rect(-2240.,1792.,-1856.,2240.)
set MK=Rect(-1472.,1472.,-992.,1728.)
set UK=Rect(2368.,-3200.,2656.,-2880.)
set YK=Rect(2624.,-3584.,2816.,-2848.)
set SM=Rect(2464.,-3392.,2656.,-3136.)
set TM=Rect(2784.,-3232.,2976.,-2976.)
set UM=Rect(2784.,-3424.,2976.,-3168.)
set WM=Rect(7328.,7808.,8192.,8192.)
set YM=Rect(1984.,7584.,3296.,8192.)
set JN=Rect(2240.,7392.,2560.,8192.)
set MN=Rect(-1888.,416.,-1696.,576.)
set TN=Rect(7776.,2720.,8192.,3648.)
set UN=Rect(5280.,640.,5664.,1184.)
set WN=Rect(-3104.,2720.,-2624.,3232.)
set ZH=Rect(2816.,-3488.,3008.,-3232.)
set AH=Rect(1568.,-2976.,1760.,-2656.)
set UK=Rect(2368.,-3264.,2656.,-2944.)
set YK=Rect(2624.,-3648.,2816.,-2912.)
set SM=Rect(2464.,-3456.,2656.,-3200.)
set EG=Rect(-8192.,-8128.,5472.,-7648.)
set eE=Rect(-8192.,-3712.,-7008.,-2144.)
set oE=Rect(-3360.,-8192.,-1472.,-7648.)
set aE=Rect(-2528.,-7840.,-1696.,-7488.)
set nE=Rect(-2336.,-7584.,-1600.,-7456.)
set VE=Rect(-8192.,2016.,-6816.,2880.)
set EE=Rect(6880.,-3328.,8000.,-2624.)
set XE=Rect(3904.,2976.,4160.,3264.)
set OE=Rect(2336.,5952.,2592.,6240.)
set IE=Rect(6304.,1984.,6560.,2272.)
set AE=Rect(-3328.,-6912.,-3072.,-6624.)
set bE=Rect(-4384.,-4800.,-4128.,-4512.)
set BE=Rect(-6432.,-3840.,-6176.,-3552.)
set cE=Rect(-7584.,6176.,-6304.,7552.)
set CE=Rect(2208.,-1152.,2720.,-352.)
set dE=Rect(2560.,-1440.,2976.,-1024.)
set fE=Rect(-1088.,5376.,768.,6624.)
set FE=Rect(1600.,1024.,3456.,2432.)
set gE=Rect(5504.,-1056.,7200.,512.)
set GE=Rect(-6944.,-1792.,-5248.,-224.)
set JE=Rect(-1536.,-7424.,640.,-6048.)
set lE=Rect(-3328.,-7200.,-2464.,-6368.)
set LE=Rect(-4288.,-4544.,-3424.,-3712.)
set ME=Rect(-6784.,-3616.,-5920.,-2784.)
set pE=Rect(1472.,5440.,2336.,6272.)
set PE=Rect(2656.,2336.,3520.,3168.)
set qE=Rect(5984.,1152.,6848.,1984.)
set QE=Rect(-4128.,-3712.,-2496.,-2272.)
set YN=Rect(-8192.,-8128.,-5120.,-5536.)
set ZN=Rect(4608.,4352.,8192.,8192.)
set cz=Rect(3536.,3148.,6248.,5832.)
set Cz=Rect(-6348.,-6900.,-3628.,-4480.)
set He=Rect(.0,.0,.0,.0)
set R24=null
set iL=Condition(function LUF)
set R_4=Condition(function EAG)
set ip=Condition(function LVF)
set iP=Condition(function EMG)
set GP7=Condition(function F_G)
set Ha=Location(.0,.0)
set HA=Location(.0,.0)
set Hb=Location(.0,.0)
set HB=Location(.0,.0)
set p=Player(15)
set E47=CreateUnit(p,'u00Z',7360.,-4416.,270.)
call SetUnitColor(E47,ConvertPlayerColor(12))
set D_7=CreateUnit(p,'u00Z',-7296.,4224.,270.)
call SetUnitColor(D_7,ConvertPlayerColor(12))
set HZ4=CreateUnit(p,'n0EO',-7168.,6464.,270.)
call SetUnitColor(HZ4,ConvertPlayerColor(0))
set wJ=CreateUnit(p,'n01F',-7424.,-6976.,270.)
set SJ=CreateUnit(p,'n0EO',-7360.,6464.,270.)
call SetUnitColor(SJ,ConvertPlayerColor(0))
set WJ=CreateUnit(p,'n01F',-7424.,-6592.,270.)
set yJ=CreateUnit(p,'n01F',-7424.,-6464.,270.)
set qK=CreateUnit(p,'n0EO',-7360.,6784.,270.)
call SetUnitColor(qK,ConvertPlayerColor(0))
set LK=CreateUnit(p,'n0EO',-6848.,6784.,270.)
call SetUnitColor(LK,ConvertPlayerColor(0))
set zJ=CreateUnit(p,'n01F',-7424.,-6720.,270.)
set ZJ=CreateUnit(p,'n01F',-7424.,-6848.,270.)
set vk=CreateUnit(p,'nfoh',-7232.,-7136.,270.)
set u=CreateUnit(p,'uC74',3200.,-64.,270.)
set cJ=CreateUnit(p,'n0EO',-6848.,6464.,270.)
call SetUnitColor(cJ,ConvertPlayerColor(0))
set FK=CreateUnit(p,'n01F',7040.,6272.,270.)
set gK=CreateUnit(p,'n01F',7040.,5888.,270.)
set GK=CreateUnit(p,'n01F',7040.,5760.,270.)
set JK=CreateUnit(p,'n01F',7040.,6016.,270.)
set fK=CreateUnit(p,'n01F',7040.,6144.,270.)
set lK=CreateUnit(p,'ndfl',6784.,6368.,270.)
set gJ=CreateUnit(p,'n0EO',-7360.,7104.,270.)
call SetUnitColor(gJ,ConvertPlayerColor(0))
set PK=CreateUnit(p,'n0EO',-7168.,7104.,270.)
call SetUnitColor(PK,ConvertPlayerColor(0))
set u=CreateUnit(p,'uC74',-4544.,1152.,270.)
set tJ=CreateUnit(p,'n0EO',-7168.,6784.,270.)
call SetUnitColor(tJ,ConvertPlayerColor(0))
set Cl=CreateUnit(p,'n0EO',-6848.,7104.,270.)
call SetUnitColor(Cl,ConvertPlayerColor(0))
set E87=CreateUnit(p,'u010',-7296.,4416.,270.)
call SetUnitColor(E87,ConvertPlayerColor(12))
set E77=CreateUnit(p,'u010',7360.,-4224.,270.)
call SetUnitColor(E77,ConvertPlayerColor(12))
set Y34=CreateUnit(p,'n0EO',-6656.,7104.,270.)
call SetUnitColor(Y34,ConvertPlayerColor(0))
set Y64=CreateUnit(p,'n0EO',-6656.,6464.,270.)
call SetUnitColor(Y64,ConvertPlayerColor(0))
set YC4=CreateUnit(p,'n0EO',-6656.,6784.,270.)
call SetUnitColor(YC4,ConvertPlayerColor(0))
set p=Player(0)
set ek=CreateUnit(p,'nC38',-7264.,-6880.,270.)
call SetUnitColor(ek,ConvertPlayerColor(12))
set xk=CreateUnit(p,'n01K',-7264.,-6688.,270.)
call SetUnitColor(xk,ConvertPlayerColor(12))
set ak=CreateUnit(p,'n009',-6560.,-6432.,270.)
call SetUnitColor(ak,ConvertPlayerColor(12))
set LJ=CreateUnit(p,'n00X',-7072.,-6368.,270.)
call SetUnitColor(LJ,ConvertPlayerColor(1))
set JJ=CreateUnit(p,'n00V',-6816.,-6368.,270.)
call SetUnitColor(JJ,ConvertPlayerColor(12))
set GJ=CreateUnit(p,'n00W',-7200.,-6432.,270.)
call SetUnitColor(GJ,ConvertPlayerColor(12))
set dJ=CreateUnit(p,'n002',-6688.,-6368.,270.)
call SetUnitColor(dJ,ConvertPlayerColor(12))
set Wk=CreateUnit(p,'e025',-6624.,-7136.,270.)
set ik=CreateUnit(p,'hC95',-6880.,-7136.,270.)
call SetUnitColor(ik,ConvertPlayerColor(0))
set BJ=CreateUnit(p,'etol',-5632.,-6144.,270.)
set Ak=CreateUnit(p,'e00S',-4448.,-4960.,270.)
set bk=CreateUnit(p,'e00S',-5280.,-6112.,270.)
set Nk=CreateUnit(p,'e00S',-6368.,-4256.,270.)
set Bk=CreateUnit(p,'e00S',-5600.,-5728.,270.)
set ck=CreateUnit(p,'eaom',-6080.,-4480.,270.)
set Ck=CreateUnit(p,'eaoe',-6656.,-4480.,270.)
set fk=CreateUnit(p,'eaom',-4416.,-5312.,270.)
set Gk=CreateUnit(p,'eaoe',-4864.,-4992.,270.)
set Fk=CreateUnit(p,'e00S',-3744.,-6816.,270.)
set dk=CreateUnit(p,'eaom',-4032.,-7040.,270.)
set gk=CreateUnit(p,'eaoe',-4032.,-6528.,270.)
set lk=CreateUnit(p,'emow',-5792.,-5408.,270.)
set Jk=CreateUnit(p,'emow',-6624.,-5088.,270.)
set jk=CreateUnit(p,'emow',-5088.,-5536.,270.)
set Lk=CreateUnit(p,'emow',-5344.,-3936.,270.)
set pk=CreateUnit(p,'emow',-5088.,-4576.,270.)
set Pk=CreateUnit(p,'emow',-3936.,-5344.,270.)
set qk=CreateUnit(p,'emow',-4512.,-7072.,270.)
set Qk=CreateUnit(p,'emow',-4896.,-6240.,270.)
set Sk=CreateUnit(p,'emow',-3808.,-5856.,270.)
set tk=CreateUnit(p,'emow',-5472.,-4704.,270.)
set Uk=CreateUnit(p,'emow',-4512.,-5856.,270.)
set wk=CreateUnit(p,'eaow',-4544.,-6528.,270.)
set Rk=CreateUnit(p,'e00S',-6112.,-1248.,270.)
set ok=CreateUnit(p,'eaow',-6080.,-5120.,270.)
set Ok=CreateUnit(p,'e00S',-6112.,1568.,270.)
set Ek=CreateUnit(p,'e00S',-1504.,-1824.,270.)
set Vk=CreateUnit(p,'e00S',-544.,-6688.,270.)
set nk=CreateUnit(p,'e00S',4960.,-6752.,270.)
set MJ=CreateUnit(p,'e00S',-3488.,-3296.,270.)
set dl=CreateUnit(p,'n0HE',-6944.,-6368.,270.)
call SetUnitColor(dl,ConvertPlayerColor(12))
set QJ=CreateUnit(p,'n0HE',5920.,6176.,270.)
call SetUnitColor(QJ,ConvertPlayerColor(12))
set p=Player(1)
set zk=CreateUnit(p,'edob',-6400.,-5696.,270.)
set yk=CreateUnit(p,'edob',-5248.,-6848.,270.)
set p=Player(6)
set XK=CreateUnit(p,'n002',5920.,5920.,270.)
call SetUnitColor(XK,ConvertPlayerColor(12))
set OK=CreateUnit(p,'n00W',5984.,6432.,270.)
call SetUnitColor(OK,ConvertPlayerColor(12))
set AK=CreateUnit(p,'n00V',5920.,6048.,270.)
call SetUnitColor(AK,ConvertPlayerColor(12))
set NK=CreateUnit(p,'n00X',5920.,6304.,270.)
call SetUnitColor(NK,ConvertPlayerColor(1))
set dK=CreateUnit(p,'nC38',6496.,6368.,270.)
call SetUnitColor(dK,ConvertPlayerColor(12))
set CK=CreateUnit(p,'n01K',6304.,6368.,270.)
call SetUnitColor(CK,ConvertPlayerColor(12))
set QK=CreateUnit(p,'usep',4352.,3584.,270.)
set BK=CreateUnit(p,'n009',5984.,5792.,270.)
call SetUnitColor(BK,ConvertPlayerColor(12))
set cK=CreateUnit(p,'nC35',6816.,5984.,270.)
call SetUnitColor(cK,ConvertPlayerColor(12))
set bK=CreateUnit(p,'u00Q',6816.,5664.,270.)
set qJ=CreateUnit(p,'u00M',6048.,-2080.,270.)
set PJ=CreateUnit(p,'u00D',6304.,-96.,270.)
set ol=CreateUnit(p,'uzig',4384.,4256.,270.)
set WK=CreateUnit(p,'unpl',5184.,4864.,220.)
set zK=CreateUnit(p,'utod',3904.,3904.,270.)
set ZK=CreateUnit(p,'u00M',1056.,-96.,270.)
set vl=CreateUnit(p,'u00D',2528.,1824.,270.)
set el=CreateUnit(p,'u00N',3936.,3488.,270.)
set xl=CreateUnit(p,'u00T',4832.,4832.,270.)
set SK=CreateUnit(p,'u00T',5152.,4512.,270.)
set rl=CreateUnit(p,'uzig',3168.,4064.,270.)
set al=CreateUnit(p,'uzig',5728.,4000.,270.)
set EK=CreateUnit(p,'u00N',2976.,5792.,270.)
set VK=CreateUnit(p,'usep',3392.,5504.,270.)
set aK=CreateUnit(p,'utod',3392.,6080.,270.)
set xK=CreateUnit(p,'uzig',4128.,6240.,270.)
set eK=CreateUnit(p,'usap',3968.,5888.,270.)
set Vl=CreateUnit(p,'ubon',4992.,5952.,270.)
set El=CreateUnit(p,'uzig',2656.,4704.,270.)
set Xl=CreateUnit(p,'uzig',5536.,2464.,270.)
set Ol=CreateUnit(p,'uzig',4064.,5280.,270.)
set Rl=CreateUnit(p,'uzig',3488.,4832.,270.)
set Al=CreateUnit(p,'usap',6400.,3584.,270.)
set Nl=CreateUnit(p,'utod',6080.,2944.,270.)
set bl=CreateUnit(p,'usep',6656.,2880.,270.)
set Bl=CreateUnit(p,'u00N',6368.,2528.,270.)
set cl=CreateUnit(p,'uzig',5024.,3744.,270.)
set vK=CreateUnit(p,'uzig',6880.,3936.,270.)
set wK=CreateUnit(p,'ubon',6464.,4608.,270.)
set TK=CreateUnit(p,'uzig',4640.,2848.,270.)
set HJ=CreateUnit(p,'u00M',-4704.,5920.,270.)
set UJ=CreateUnit(p,'u00D',32.,5920.,270.)
set p=Player(15)
set DJ=CreateUnit(p,'e00D',-6005.1,5458.6,212.15)
set lJ=CreateUnit(p,'e00B',-561.7,-651.7,325.6)
set FJ=CreateUnit(p,'e00A',5717.5,-6070.9,64.)
set fJ=CreateUnit(p,'e008',-5467.9,-5891.1,307.304)
set CJ=CreateUnit(p,'e001',4901.8,4536.6,212.11)
call ConfigureNeutralVictim()
set bH=Filter(function KF8)
set filterIssueHauntOrderAtLocBJ=Filter(function IssueHauntOrderAtLocBJFilter)
set filterEnumDestructablesInCircleBJ=Filter(function L4)
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 QR8=0
loop
exitwhen QR8==16
set bj_FORCE_PLAYER[QR8]=CreateForce()
call ForceAddPlayer(bj_FORCE_PLAYER[QR8],Player(QR8))
set QR8=QR8+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 QR8=0
loop
exitwhen QR8>=bj_MAX_QUEUED_TRIGGERS
set bj_queuedExecTriggers[QR8]=null
set bj_queuedExecUseConds[QR8]=false
set QR8=QR8+1
endloop
set bj_isSinglePlayer=false
set L4H=0
set QR8=0
loop
exitwhen QR8>=12
if(GetPlayerController(Player(QR8))==MAP_CONTROL_USER and GetPlayerSlotState(Player(QR8))==PLAYER_SLOT_STATE_PLAYING)then
set L4H=L4H+1
endif
set QR8=QR8+1
endloop
set V84[0]=""
set V84[1]="Orange.Net"
set V84[2]="Orange.Mushi"
set V84[3]="Orange.XtincT"
set V84[4]="Orange.Ohaiyo"
set V84[5]="Orange.kYxY"
set V84[6]="Na`Vi.XBOCT"
set V84[7]="Na`Vi.Dendi"
set V84[8]="Na`Vi.Puppey"
set V84[9]="Na`Vi.Funn1k"
set V84[10]="Na`Vi.KuroKy"
set V84[11]="Fnatic.Fly"
set V84[12]="Fnatic.N0tail"
set V84[13]="Fnatic.Era"
set V84[14]="Fnatic.H4nn1"
set V84[15]="Fnatic.Trixi"
set V84[16]="Team Dignitas.Fogged"
set V84[17]="Team Dignitas.Aui_2000"
set V84[18]="Team Dignitas.WaytoSexy"
set V84[19]="Team Dignitas.UNiVeRsE"
set V84[20]="Team Dignitas.Sneyking"
set V84[21]="DK.Super!"
set V84[22]="DK.X!!"
set V84[23]="DK.QQQ"
set V84[24]="DK.Burning"
set V84[25]="DK.rOtk"
set V84[26]="IG.Ferrari_430"
set V84[27]="IG.Faith"
set V84[28]="IG.Zhou"
set V84[29]="IG.ChuaN"
set V84[30]="IG.YYF"
set V84[31]="TongFu.Banana"
set V84[32]="TongFu.SanSheng"
set V84[33]="TongFu.Mu"
set V84[34]="TongFu.Hao"
set V84[35]="TongFu.KingJ"
set V84[36]="RattleSnake.LaNm"
set V84[37]="RattleSnake.SagM "
set V84[38]="RattleSnake.Icy"
set V84[39]="RattleSnake.Kabu"
set V84[40]="RattleSnake.Luo"
set V84[41]="TZ.iceiceice"
set V84[42]="TZ.xFreedom"
set V84[43]="TZ.xy-"
set V84[44]="TZ.YamateH"
set V84[45]="TZ.Ice"
set V84[46]="Alliance.S4"
set V84[47]="Alliance.EGM"
set V84[48]="Alliance.AdmiralBulldog"
set V84[49]="Alliance.Akke"
set V84[50]="Alliance.Loda"
set V84[51]="MUFC.dabeliuteef"
set V84[52]="MUFC.WinteR"
set V84[53]="MUFC.fzfz"
set V84[54]="MUFC.Ling"
set V84[55]="MUFC.TFG"
set V84[56]="Team Liquid.huifutoujin"
set V84[57]="Team Liquid.ixmike88"
set V84[58]="Team Liquid.FLUFFNSTUFF"
set V84[59]="Team Liquid.BuLba"
set V84[60]="Team Liquid.Korok"
set V84[61]="LGD.xiao8"
set V84[62]="LGD.Sylar"
set V84[63]="LGD.Yao"
set V84[64]="LGD.DD"
set V84[65]="LGD.DDC"
set V84[66]="LGD.Int.Pajkatt"
set V84[67]="LGD.Int.God"
set V84[68]="LGD.Int.1437"
set V84[69]="LGD.Int.Brax"
set V84[70]="LGD.Int.MiSeRy"
set V84[71]="Virtus.Pro.NS"
set V84[72]="Virtus.Pro.ARS-ART"
set V84[73]="Virtus.Pro.KSi"
set V84[74]="Virtus.Pro.Illidan"
set V84[75]="Virtus.Pro.Crazy"
set V84[76]="13abyKnight"
set V84[77]="dLxYan"
set V84[78]="Green"
set V84[79]="Bane"
set V84[80]="Yrk"
set V84[81]="sExtasY"
set V84[82]="Tayschrenn"
set V84[83]="theCupofteA"
set V84[84]="idef!x"
set V84[85]="kEEper"
set V84[86]="nEKro"
set V84[87]="Tulex"
set V84[88]="Warlog"
set V84[89]="Radge"
set V84[90]="Bu1LD0z3R"
set V84[91]="r1sk"
set V84[92]="Toneeh"
set V84[93]="Mr.Escobar"
set V84[94]="Ghost0"
set V84[95]="Blackshatan"
set V84[96]="Ro-Coco"
set V84[97]="NozG"
set V84[98]="lacosteeeee"
set V84[99]="NlKE"
set V84['d']="Swoopie"
set V84['e']="Soundchaosdebug"
set V84['f']="Luck_Duck"
set V84['g']="Simba"
set V84['h']="AMXZAKU"
set V84['i']="HurDur"
set V84['j']="Zaetr"
set V84['k']="Dargon_Knight"
set V84['l']="Ciel"
set V84['m']="SaDJ0KeR"
set V84['n']="Phaselock"
set V84['o']="PleaseBugMeNot"
set V84['p']="changeling"
set V84['q']="Deel"
set V84['r']="xbox619"
set V84['s']="Uncle_Zhuge"
set V84['t']="Thedeath"
set V84['u']="gAmmAlysE"
set V84['v']="Ace_Tobi"
set V84['w']="RisingDemon"
set V84['x']="Harreke"
set V84['y']="cipd"
set V84['z']="Sebra"
set V84['{']="Simple-.-"
set V84['|']="gaibo1"
set V84['}']="Cloud_str"
set V84[126]="Ciel"
set V84[127]="JoyJ"
set V84[128]="YaphetS"
set V84[129]="Vigoss"
set V84[130]="Merlini"
set CNModeIndex=130
set bj_isSinglePlayer=(L4H==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 L7H=VersionGet()
if(L7H==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()
call V5()
set X4G=0
loop
set bj_stockAllowedPermanent[X4G]=false
set bj_stockAllowedCharged[X4G]=false
set bj_stockAllowedArtifact[X4G]=false
set X4G=X4G+1
exitwhen X4G>10
endloop
call SetAllItemTypeSlots(11)
call SetAllUnitTypeSlots(11)
set bj_stockUpdateTimer=CreateTimer()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INITIAL_DELAY,false,function XEG)
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 P[i]=0
set Q[i]=0
set H[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>'d')
set O[i]=false
set je[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>4)
set T[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>2)
set R4[i]=0
set B7[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>12)
set W[i]=""
set A[i]=CreateTimer()
set C[i]=0
set D4[i]=0
set GZ[i]=false
set GZ[256+i]=false
set GZ[272+i]=false
set GZ[304+i]=false
set G0[48+i]=false
set G0[i]=false
set hG[i]=0
set eY[80+i]=3
set eY[i]=0
set eY[544+i]=0
set h4[i]=null
set RJ7[i]=null
set hq[288+i]=.0
set hq[304+i]=.0
set hq[640+i]=.0
set hq[656+i]=.0
set HC[i]=Location(.0,.0)
set HC[16+i]=Location(.0,.0)
set HC[32+i]=Location(.0,.0)
set HC[48+i]=Location(.0,.0)
set HC[256+i]=Location(.0,.0)
set h9[i]=null
set h8[i]=null
set eY[208+i]=0
set eY[224+i]=0
set eY[240+i]=999999
set hG[192+i]=0
set hG[288+i]=0
set hq[624+i]=0
set E57[i]=true
set E57[16+i]=true
set E57[32+i]=false
set E57[48+i]=false
set E57[64+i]=true
set E57['p'+i]=true
set GM7[48+i]=-1
set GM7[64+i]=-1
set G0[224+i]=false
set h8[144+i]=null
set GZ[176+i]=false
set OJ7[i]=0
set OJ7[16+i]=0
set OJ7[32+i]=0
set OJ7[48+i]=0
set OJ7[96+i]=0
set OJ7['p'+i]=0
set OJ7[160+i]=0
set OJ7[176+i]=0
set OJ7[240+i]=0
set OJ7[272+i]=0
set OJ7[288+i]=0
set OJ7[464+i]=0
set OM7[48+i]=false
set OM7[320+i]=true
set OJ7[208+i]=StringHash("aiBuy|"+I2S(i))
set OJ7[224+i]=StringHash("aiBuyS|"+I2S(i))
set OJ7[256+i]=StringHash("aiBuyBear|"+I2S(i))
set OJ7[352+i]=StringHash("aiIt#|"+I2S(i))
set OJ7[368+i]=StringHash("aiIt#copy|"+I2S(i))
set OJ7[448+i]=StringHash("aiBuyLux|"+I2S(i))
set i=i+1
endloop
set i=0
loop
exitwhen(i>13)
set B[i]=false
set L[i]=CreateTimer()
set D7[i]=false
set C7[i]=0
set L7[i]=0
set Be[i]=0
set oo[i]=false
set i=i+1
endloop
set E4=CreateTimer()
set i=0
loop
exitwhen(i>1)
set F[i]=0
set mx[i]=false
set P9[i]=0
set eo[i]=false
set i=i+1
endloop
set E7=150
set av=true
set Ev=true
set Ov=true
set Rv=true
set Av=true
set Nv=true
set O7=true
set Bv=true
set P7=true
set Cv=true
set Dv=true
set fv=true
set S7=3
set T7=1
set i=0
loop
exitwhen(i>17)
set Y7[i]=null
set i=i+1
endloop
set E8=CreateForce()
set F8=CreateForce()
set C8=CreateGroup()
set T9=CreateForce()
set V9=.0
set W9=true
set X9=true
set i=0
loop
exitwhen(i>14)
set Z9[i]=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>15)
set OD[i]="Here"
set i=i+1
endloop
call OB8()
call ExecuteFunc("RV8")
call ExecuteFunc("ST8")
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,15.,true)
call TriggerAddCondition(t,Condition(function l8))
set t=null
set HA4[0]=false
set HA4[1]=false
set HA4[2]=false
set HA4[3]=false
set HA4[4]=false
set HA4[5]=false
set HA4[6]=false
set HA4[7]=false
set HA4[8]=false
set HA4[9]=false
set HA4[10]=false
set HA4[11]=false
set HA4[12]=false
set HA4[13]=false
set HA4[14]=false
set HA4[15]=false
set HA4[16]=false
call CAH()
call TE9('B06Z')
call TE9('BPSE')
call TE9('B06Q')
call TE9('BSTN')
call TE9('BHtc')
call TE9('B0BM')
call TE9('B0BR')
call TE9('B0C1')
call TE9('BEer')
call TE9('B02U')
call TE9('B07E')
call TE9('B0CF')
call TE9('B06M')
call TE9('B07N')
call TE9('B08S')
call TE9('B00Q')
call TE9('B072')
call TE9('BUan')
call TE9('B095')
call TE9('B083')
call TE9('B02V')
call TE9('B01Y')
call TE9('BNab')
call TE9('B08R')
call TE9('B066')
call TE9('B03I')
call TE9('B063')
call TE9('Bena')
call TE9('Beng')
call TE9('B03C')
call TE9('B00L')
call TE9('BHca')
call TE9('Bcsd')
call TE9('B079')
call TE9('B0BQ')
call TE9('B0B9')
call TE9('Bprg')
call TE9('B08M')
call TE9('B02G')
call TE9('B01X')
call TE9('B01D')
call TE9('B092')
call TE9('B0AQ')
call TE9('BEsh')
call TE9('B017')
call TE9('B0AE')
call TE9('B0AD')
call TE9('B08O')
call TE9('Bfro')
call TE9('B027')
call TE9('B028')
call TE9('B05H')
call TE9('B0BS')
call TE9('Bcri')
call TE9('B0BF')
call TE9('B0BE')
call TE9('B090')
call TE9('B008')
call TE9('B04B')
call TE9('B02F')
call TE9('BUsp')
call TE9('Bust')
call TE9('B0CC')
call TE9('BCri')
call TE9('B03J')
call TE9('BEsh')
call TE9('B0AQ')
call TE9('Bena')
call TE9('Beng')
call TE9('B078')
call TE9('Bdet')
call TE9('B00T')
call TE9('Bslo')
call TE9('BNdh')
call TE9('A1LD')
call TE9('B0CD')
call TE9('A1JA')
call TE9('B043')
call TE9('BNpa')
call TE9('B01N')
call TE9('BIcb')
call TE9('B04Q')
call TE9('B00C')
call TE9('B09K')
call TE9('B033')
call TE9('B08F')
call TE9('B08E')
call TE9('Bpoi')
call TE9('B0AM')
call TE9('BNrd')
call TE9('B00H')
call TE9('BOhx')
call TE9('B03F')
call TE9('B02N')
call TE9('B0E7')
call TE9('B06D')
call TE9('B0BN')
call TE9('B09Q')
call TE9('B0DI')
call TE9('B0BB')
call TE9('B09J')
call TE9('B0AF')
call TE9('B08B')
call TE9('B071')
call TE9('B08N')
call TE9('B02I')
call TE9('B08Q')
call TE9('B0C2')
call TE9('B06S')
call TE9('B02S')
call TE9('B02W')
call TE9('B05Q')
call TE9('B02D')
call TE9('B0BY')
call TE9('B02P')
call TE9('B05F')
call TE9('B0EP')
call TE9('B0ER')
call TE9('B0ET')
call TE9('B0FN')
call TE9('B0FY')
call TE9('B0FT')
call TE9('B0FZ')
call TE9('B0G0')
call TE9('B0GT')
call TE9('B0F5')
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function TI9))
set t=null
call FlushGameCache(InitGameCache("dr.x"))
set IG4=InitGameCache("dr.x")
set HP4[0]='A17F'
set HP4[1]='A17G'
set HP4[2]='A17H'
set HP4[3]='A17C'
set HP4[4]='A17D'
set HP4[5]='A17E'
set HP4[6]='A17J'
set HP4[7]='A17I'
set HP4[8]='A17L'
set UU4[0]='A1QE'
set UU4[1]='A1QF'
set UU4[2]='A1QI'
set UU4[3]='A1QK'
set UU4[4]='A1QJ'
set UU4[5]='A1QH'
set UU4[6]='A1QO'
set UU4[7]='A1QN'
set UU4[8]='A1QM'
set UU4[9]='A1QG'
set UU4[10]='A1QQ'
set HQ4[0]='A1GK'
set HQ4[1]='A1GL'
set HQ4[2]='A1GJ'
set HQ4[3]='A1GP'
set HQ4[4]='A1GM'
set HQ4[5]='A1GN'
set HQ4[6]='A1GO'
set HQ4[7]='A1GI'
set HQ4[8]='A1GQ'
set HR4[0]='A1CM'
set HR4[1]='A1CK'
set HR4[2]='A1CF'
set HR4[3]='A1CI'
set HR4[4]='A1CG'
set HR4[5]='A1CH'
set C9=CreateTrigger()
call TriggerAddCondition(C9,Condition(function WZ8))
set L9[0]='h09G'
set FD[0]=50
set L9[1]='h09T'
set FD[1]='d'
set L9[2]='h09F'
set FD[2]=150
set L9[3]='h09H'
set FD[3]=200
set L9[4]='h09E'
set FD[4]=250
set L9[5]='h09D'
set FD[5]=300
set L9[6]='h09C'
set FD[6]=350
set L9[7]='h09B'
set FD[7]=400
set L9[8]='h099'
set FD[8]=450
set L9[9]='h09A'
set FD[9]=500
set L9[10]='h09J'
set FD[10]=550
set L9[11]='h09K'
set FD[11]=600
set L9[12]='h09L'
set FD[12]=650
set L9[13]='h09M'
set FD[13]=700
set L9[14]='h09N'
set FD[14]=750
set L9[15]='h09O'
set FD[15]=800
set L9[16]='h09P'
set FD[16]=850
set L9[17]='h09Q'
set FD[17]=900
set L9[18]='h09R'
set FD[18]=950
set L9[19]='h09S'
set FD[19]=1000
set L9[20]='h09I'
set FD[20]=1050
set L9[21]='h09Z'
set FD[21]=1100
set L9[22]='h09X'
set FD[22]=1150
set L9[23]='h0A1'
set FD[23]=1200
set L9[24]='h0A2'
set FD[24]=1250
set L9[25]='h0A6'
set FD[25]=1300
set L9[26]='h0A3'
set FD[26]=1350
set L9[27]='h0A4'
set FD[27]=1400
set L9[28]='h09Y'
set FD[28]=1450
set L9[29]='h09V'
set FD[29]=1500
set L9[30]='h0A0'
set FD[30]=1550
set L9[31]='h09U'
set FD[31]=1600
set L9[32]='h0AF'
set FD[32]=1650
set L9[33]='h0AD'
set FD[33]=1700
set L9[34]='h0AE'
set FD[34]=1750
set L9[35]='h0AC'
set FD[35]=1800
set L9[36]='h0AB'
set FD[36]=1850
set L9[37]='h0AA'
set FD[37]=1900
set L9[38]='h0A9'
set FD[38]=1950
set L9[39]='h0AG'
set FD[39]=2000
set L9[40]='h0A7'
set FD[40]=2050
set L9[41]='h0AO'
set FD[41]=2100
set L9[42]='h0AY'
set FD[42]=2150
set L9[43]='h0AH'
set FD[43]=2200
set L9[44]='h0AI'
set FD[44]=2250
set L9[45]='h0AJ'
set FD[45]=2300
set L9[46]='h0AP'
set FD[46]=2350
set L9[47]='h0AQ'
set FD[47]=2400
set L9[48]='h0AK'
set FD[48]=2450
set L9[49]='h0AR'
set FD[49]=2500
set L9[50]='h0AL'
set FD[50]=2550
set L9[51]='h0AS'
set FD[51]=2600
set L9[52]='h09W'
set FD[52]=2650
set L9[53]='h0AM'
set FD[53]=2700
set L9[54]='h0A8'
set FD[54]=2750
set L9[55]='h0AT'
set FD[55]=2800
set L9[56]='h0AU'
set FD[56]=2850
set L9[57]='h0AN'
set FD[57]=2900
set L9[58]='h0AV'
set FD[58]=2950
set L9[59]='h0AW'
set FD[59]=3000
set ED[0]=L9[WQ8(1)]
set ED[1]=L9[WQ8(1)]
set ED[2]=L9[WQ8(1)]
set ED[3]=L9[WQ8(1)]
set ED[4]=L9[WQ8(1)]
set ED[5]=L9[WQ8(1)]
set ED[6]=L9[WQ8(1)]
set ED[7]=L9[WQ8(1)]
set ED[8]=L9[WQ8(1)]
set ED[9]=L9[WQ8(1)]
set ED[10]=L9[WQ8(1)]
set ED[11]=L9[WQ8(1)]
set ED[12]=L9[WQ8(1)]
set ED[13]=L9[WQ8(1)]
set ED[14]=L9[WQ8(1)]
set IH4[0]=false
set IH4[1]=false
set IH4[2]=false
set IH4[3]=false
set IH4[4]=false
set IH4[5]=false
set IH4[6]=false
set IH4[7]=false
set IH4[8]=false
set IH4[9]=false
set IH4[10]=false
set IH4[11]=false
set IH4[12]=false
set IH4[13]=false
set IH4[14]=false
set R8=InitHashtable()
set IJ4=Rect(-7040,-7680,7040,7168)
call SetFloatGameState(GAME_STATE_TIME_OF_DAY,10.)
call SuspendTimeOfDay(false)
call SetTimeOfDayScale(.625)
call SetSkyModel("Environment\\Sky\\FoggedSky\\FoggedSky.mdl")
call SetCreepCampFilterState(true)
set vo="Normal Mode"
call TimerStart(E4,99999.,false,null)
set Bo=AddWeatherEffect(bj_mapInitialPlayableArea,'RAhr')
set bo=AddWeatherEffect(bj_mapInitialPlayableArea,'SNbs')
set fL=AddWeatherEffect(bj_mapInitialPlayableArea,'LRma')
set FL=AddWeatherEffect(bj_mapInitialPlayableArea,'WOlw')
set G8[0]=Player(0)
set G8[1]=Player(1)
set G8[2]=Player(2)
set G8[3]=Player(3)
set G8[4]=Player(4)
set G8[5]=Player(5)
set N8[0]=Player(6)
set N8[1]=Player(7)
set N8[2]=Player(8)
set N8[3]=Player(9)
set N8[4]=Player(10)
set N8[5]=Player(11)
set O8=Player(12)
set P8=Player(15)
call SetUnitPathing(fJ,false)
call SetUnitPathing(FJ,false)
call SetUnitPathing(lJ,false)
call SetUnitPathing(DJ,false)
call SetUnitPathing(CJ,false)
call T49(CJ,true)
call T49(DJ,true)
call T49(lJ,true)
call T49(FJ,true)
call T49(fJ,true)
set Z=GetUnitLoc(CJ)
set vv=GetUnitLoc(fJ)
set ev=GetUnitLoc(lJ)
set ov=GetUnitLoc(DJ)
set rv=GetUnitLoc(FJ)
set A8='A06G'
set B8[1]=vv
set B8[2]=ov
set B8[3]=ev
set B8[4]=rv
set B8[5]=Z
set Jv=GetRectCenter(jo)
set lv=GetRectCenter(lo)
set Lv=GetRectCenter(go)
set mv=GetRectCenter(zo)
set qv=GetRectCenter(er)
set pv=GetRectCenter(wo)
set Qv=GetRectCenter(Xr)
set tv=GetRectCenter(Er)
set sv=GetRectCenter(ar)
set Tv=GetRectCenter(Uo)
set U7=GetRectCenter(to)
set Uv=GetRectCenter(Qo)
set W7=GetRectCenter(YD)
set X7=GetRectCenter(TD)
set F9=true
set IK4=GetUnitX(vk)
set IM4=GetUnitY(vk)
set ML=GetUnitX(ik)
set PL=GetUnitY(ik)
set QL=GetUnitX(xk)
set SL=GetUnitY(xk)
set tL=GetUnitX(ek)
set TL=GetUnitY(ek)
set UL=GetUnitX(Wk)
set wL=GetUnitY(Wk)
set zL=GetUnitX(JJ)
set vm=GetUnitY(JJ)
set em=GetUnitX(GJ)
set xm=GetUnitY(GJ)
set om=GetUnitX(dJ)
set rm=GetUnitY(dJ)
set im=GetUnitX(LJ)
set am=GetUnitY(LJ)
set Vm=GetUnitX(ak)
set Em=GetUnitY(ak)
set Xm=GetUnitX(dl)
set Om=GetUnitY(dl)
set Am=GetUnitX(BJ)
set Nm=GetUnitY(BJ)
set bm=GetUnitX(Ok)
set Bm=GetUnitY(Ok)
set cm=GetUnitX(Ek)
set Cm=GetUnitY(Ek)
set dm=GetUnitX(nk)
set fm=GetUnitY(nk)
set Fm=GetUnitX(Rk)
set hm=GetUnitY(Rk)
set Jm=GetUnitX(MJ)
set lm=GetUnitY(MJ)
set Mm=GetUnitX(Vk)
set pm=GetUnitY(Vk)
set Pm=GetUnitX(Nk)
set Qm=GetUnitY(Nk)
set Tm=GetUnitX(Ak)
set Um=GetUnitY(Ak)
set wm=GetUnitX(Fk)
set Wm=GetUnitY(Fk)
set zm=GetUnitX(Bk)
set vM=GetUnitY(Bk)
set eM=GetUnitX(bk)
set oM=GetUnitY(bk)
set rM=GetUnitX(ck)
set iM=GetUnitY(ck)
set aM=GetUnitX(fk)
set nM=GetUnitY(fk)
set VM=GetUnitX(dk)
set XM=GetUnitY(dk)
set AM=GetUnitX(Ck)
set bM=GetUnitY(Ck)
set BM=GetUnitX(Gk)
set cM=GetUnitY(Gk)
set dM=GetUnitX(gk)
set fM=GetUnitY(gk)
set gM=GetUnitX(lk)
set hM=GetUnitY(lk)
set HM=GetUnitX(Jk)
set JM=GetUnitY(Jk)
set kM=GetUnitX(Lk)
set lM=GetUnitY(Lk)
set pM=GetUnitX(pk)
set sM=GetUnitY(pk)
set tM=GetUnitX(Pk)
set wM=GetUnitY(Pk)
set zM=GetUnitX(jk)
set vp=GetUnitY(jk)
set ep=GetUnitX(Qk)
set op=GetUnitY(Qk)
set rp=GetUnitX(Sk)
set ap=GetUnitY(Sk)
set Vp=GetUnitX(qk)
set Ep=GetUnitY(qk)
set Xp=GetUnitX(tk)
set Rp=GetUnitY(tk)
set Ap=GetUnitX(Uk)
set bp=GetUnitY(Uk)
set Bp=GetUnitX(ok)
set cp=GetUnitY(ok)
set Cp=GetUnitX(wk)
set dp=GetUnitY(wk)
set fp=GetUnitX(zk)
set Fp=GetUnitY(zk)
set gp=GetUnitX(yk)
set Hp=GetUnitY(yk)
call RemoveUnit(Nk)
call RemoveUnit(Ck)
call RemoveUnit(ck)
call RemoveUnit(Ak)
call RemoveUnit(Gk)
call RemoveUnit(fk)
call RemoveUnit(Fk)
call RemoveUnit(gk)
call RemoveUnit(dk)
call RemoveUnit(ok)
call RemoveUnit(wk)
call RemoveUnit(BJ)
call RemoveUnit(Bk)
call RemoveUnit(bk)
call RemoveUnit(lk)
call RemoveUnit(Jk)
call RemoveUnit(Lk)
call RemoveUnit(pk)
call RemoveUnit(Pk)
call RemoveUnit(jk)
call RemoveUnit(Qk)
call RemoveUnit(Sk)
call RemoveUnit(qk)
call RemoveUnit(tk)
call RemoveUnit(Uk)
call RemoveUnit(ak)
call RemoveUnit(dl)
call RemoveUnit(LJ)
call RemoveUnit(dJ)
call RemoveUnit(GJ)
call RemoveUnit(JJ)
call RemoveUnit(xk)
call RemoveUnit(ek)
call RemoveUnit(vk)
call RemoveUnit(ik)
call RemoveUnit(Wk)
call RemoveUnit(Ok)
call RemoveUnit(Ek)
call RemoveUnit(nk)
call RemoveUnit(Rk)
call RemoveUnit(MJ)
call RemoveUnit(Vk)
call RemoveUnit(zk)
call RemoveUnit(yk)
set IN4=CreateUnit(G8[0],'nfoh',IK4,IM4,270)
set IO4=CreateUnit(P8,'hC95',ML,PL,270)
set IP4=CreateUnit(P8,'n01K',QL,SL,270)
set IQ4=CreateUnit(P8,'nC38',tL,TL,270)
set IR4=CreateUnit(P8,'e025',UL,wL,270)
set IS4=CreateUnit(P8,'n00V',zL,vm,270)
set IT4=CreateUnit(P8,'n00W',em,xm,270)
set IU4=CreateUnit(P8,'n002',om,rm,270)
set IV4=CreateUnit(P8,'n00X',im,am,270)
set IW4=CreateUnit(P8,'n009',Vm,Em,270)
set IX4=CreateUnit(P8,'n0HE',Xm,Om,270)
set IY4=CreateUnit(G8[0],'etol',Am,Nm,270)
set IZ4=CreateUnit(G8[0],'e00R',bm,Bm,90)
set I34=CreateUnit(G8[0],'e00R',cm,Cm,45)
set IL4=CreateUnit(G8[0],'e00R',dm,fm,0)
set I04=CreateUnit(G8[0],'e011',Fm,hm,90)
set I24=CreateUnit(G8[0],'e011',Jm,lm,45)
set I_4=CreateUnit(G8[0],'e011',Mm,pm,0)
set J44=CreateUnit(G8[0],'e00S',Pm,Qm,90)
set J74=CreateUnit(G8[0],'e00S',Tm,Um,45)
set J84=CreateUnit(G8[0],'e00S',wm,Wm,0)
set J94=CreateUnit(G8[0],'e019',zm,vM,45)
set JD4=CreateUnit(G8[0],'e019',eM,oM,45)
set JE4=CreateUnit(G8[0],'eaom',rM,iM,90)
set JF4=CreateUnit(G8[0],'eaom',aM,nM,45)
set JG4=CreateUnit(G8[0],'eaom',VM,XM,0)
set JH4=CreateUnit(G8[0],'eaoe',AM,bM,90)
set JI4=CreateUnit(G8[0],'eaoe',BM,cM,45)
set JJ4=CreateUnit(G8[0],'eaoe',dM,fM,0)
set fP=CreateUnit(G8[0],'emow',gM,hM,270)
set FP=CreateUnit(G8[0],'emow',HM,JM,270)
set lP=CreateUnit(G8[0],'emow',kM,lM,270)
set LP=CreateUnit(G8[0],'emow',pM,sM,270)
set MP=CreateUnit(G8[0],'emow',tM,wM,270)
set pP=CreateUnit(G8[0],'emow',zM,vp,270)
set JK4=CreateUnit(G8[0],'emow',ep,op,270)
set JM4=CreateUnit(G8[0],'emow',rp,ap,270)
set JN4=CreateUnit(G8[0],'emow',Vp,Ep,270)
set JO4=CreateUnit(G8[0],'emow',Xp,Rp,270)
set JP4=CreateUnit(G8[0],'emow',Ap,bp,270)
set WP=CreateUnit(G8[0],'eaow',Bp,cp,270)
set zP=CreateUnit(G8[0],'eaow',Cp,dp,270)
set vq=CreateUnit(G8[0],'edob',fp,Fp,270)
set eq=CreateUnit(G8[0],'edob',gp,Hp,270)
set RQ4=Rect(GetRectMinX(bj_mapInitialPlayableArea),GetRectMinY(bj_mapInitialPlayableArea),GetUnitX(J44)+800,GetUnitY(J44)+800)
set RR4=Rect(GetRectMinX(bj_mapInitialPlayableArea),GetRectMinY(bj_mapInitialPlayableArea),GetUnitX(J74)+1132,GetUnitY(J74)+1132)
set RS4=Rect(GetRectMinX(bj_mapInitialPlayableArea),GetRectMinY(bj_mapInitialPlayableArea),GetUnitX(J84)+800,GetUnitY(J84)+800)
call SetPlayerAbilityAvailable(P8,'Aro1',false)
call SetUnitColor(IO4,gL)
call SetUnitColor(IR4,gL)
call SetUnitColor(IQ4,JL)
call SetUnitColor(IP4,JL)
call SetUnitColor(IS4,JL)
call SetUnitColor(IT4,JL)
call SetUnitColor(IU4,JL)
call SetUnitColor(IV4,JL)
call SetUnitColor(IW4,JL)
call T49(IZ4,true)
call T49(I34,true)
call T49(IL4,true)
call T49(I04,true)
call T49(I24,true)
call T49(I_4,true)
call T49(J44,true)
call T49(J74,true)
call T49(J84,true)
call T49(J94,true)
call T49(JD4,true)
call T49(IY4,true)
call T49(JE4,true)
call T49(JF4,true)
call T49(JG4,true)
call T49(JH4,true)
call T49(JI4,true)
call T49(JJ4,true)
call T49(WP,true)
call T49(zP,true)
call T49(vq,true)
call T49(eq,true)
call T49(fP,true)
call T49(FP,true)
call T49(lP,true)
call T49(LP,true)
call T49(MP,true)
call T49(pP,true)
call T49(JK4,true)
call T49(JM4,true)
call T49(JN4,true)
call T49(JO4,true)
call T49(JP4,true)
call AddUnitToStock(IR4,'h02C',0,0)
set JQ4=GetUnitX(lK)
set JR4=GetUnitY(lK)
set rq=GetUnitX(cK)
set iq=GetUnitY(cK)
set aq=GetUnitX(CK)
set Eq=GetUnitY(CK)
set Rq=GetUnitX(dK)
set Aq=GetUnitY(dK)
set Nq=GetUnitX(bK)
set bq=GetUnitY(bK)
set Bq=GetUnitX(AK)
set cq=GetUnitY(AK)
set Cq=GetUnitX(OK)
set Dq=GetUnitY(OK)
set fq=GetUnitX(XK)
set Fq=GetUnitY(XK)
set Hq=GetUnitX(NK)
set jq=GetUnitY(NK)
set Jq=GetUnitX(BK)
set Mq=GetUnitY(BK)
set qq=GetUnitX(QJ)
set Qq=GetUnitY(QJ)
set Sq=GetUnitX(WK)
set tq=GetUnitY(WK)
set Uq=GetUnitX(HJ)
set zq=GetUnitY(HJ)
set Zq=GetUnitX(ZK)
set vQ=GetUnitY(ZK)
set eQ=GetUnitX(qJ)
set xQ=GetUnitY(qJ)
set oQ=GetUnitX(UJ)
set iQ=GetUnitY(UJ)
set aQ=GetUnitX(vl)
set EQ=GetUnitY(vl)
set OQ=GetUnitX(PJ)
set RQ=GetUnitY(PJ)
set AQ=GetUnitX(EK)
set NQ=GetUnitY(EK)
set bQ=GetUnitX(el)
set BQ=GetUnitY(el)
set cQ=GetUnitX(Bl)
set CQ=GetUnitY(Bl)
set fQ=GetUnitX(xl)
set FQ=GetUnitY(xl)
set hQ=GetUnitX(SK)
set HQ=GetUnitY(SK)
set lQ=GetUnitX(VK)
set LQ=GetUnitY(VK)
set mQ=GetUnitX(QK)
set MQ=GetUnitY(QK)
set PQ=GetUnitX(bl)
set QQ=GetUnitY(bl)
set SQ=GetUnitX(aK)
set UQ=GetUnitY(aK)
set WQ=GetUnitX(zK)
set zQ=GetUnitY(zK)
set ZQ=GetUnitX(Nl)
set vs=GetUnitY(Nl)
set es=GetUnitX(El)
set os=GetUnitY(El)
set rs=GetUnitX(rl)
set as=GetUnitY(rl)
set ns=GetUnitX(Rl)
set Vs=GetUnitY(Rl)
set Es=GetUnitX(xK)
set Xs=GetUnitY(xK)
set Rs=GetUnitX(Ol)
set As=GetUnitY(Ol)
set Ns=GetUnitX(ol)
set bs=GetUnitY(ol)
set Bs=GetUnitX(al)
set cs=GetUnitY(al)
set Cs=GetUnitX(Xl)
set Ds=GetUnitY(Xl)
set fs=GetUnitX(cl)
set Fs=GetUnitY(cl)
set Hs=GetUnitX(vK)
set js=GetUnitY(vK)
set Js=GetUnitX(TK)
set Ks=GetUnitY(TK)
set ls=GetUnitX(eK)
set Ls=GetUnitY(eK)
set ms=GetUnitX(Al)
set Ms=GetUnitY(Al)
set ps=GetUnitX(Vl)
set Ps=GetUnitY(Vl)
set Qs=GetUnitX(wK)
set Ss=GetUnitY(wK)
call RemoveUnit(El)
call RemoveUnit(rl)
call RemoveUnit(Rl)
call RemoveUnit(xK)
call RemoveUnit(Ol)
call RemoveUnit(ol)
call RemoveUnit(al)
call RemoveUnit(Xl)
call RemoveUnit(cl)
call RemoveUnit(vK)
call RemoveUnit(TK)
call RemoveUnit(HJ)
call RemoveUnit(UJ)
call RemoveUnit(EK)
call RemoveUnit(ZK)
call RemoveUnit(vl)
call RemoveUnit(el)
call RemoveUnit(qJ)
call RemoveUnit(PJ)
call RemoveUnit(Bl)
call RemoveUnit(xl)
call RemoveUnit(SK)
call RemoveUnit(VK)
call RemoveUnit(QK)
call RemoveUnit(bl)
call RemoveUnit(aK)
call RemoveUnit(zK)
call RemoveUnit(Nl)
call RemoveUnit(eK)
call RemoveUnit(Al)
call RemoveUnit(Vl)
call RemoveUnit(wK)
call RemoveUnit(WK)
call RemoveUnit(AK)
call RemoveUnit(OK)
call RemoveUnit(XK)
call RemoveUnit(NK)
call RemoveUnit(BK)
call RemoveUnit(QJ)
call RemoveUnit(dK)
call RemoveUnit(CK)
call RemoveUnit(lK)
call RemoveUnit(cK)
call RemoveUnit(bK)
set JS4=CreateUnit(N8[0],'ndfl',JQ4,JR4,270)
set JT4=CreateUnit(P8,'nC35',rq,iq,270)
set zs=CreateUnit(P8,'n01K',aq,Eq,270)
set Zs=CreateUnit(P8,'nC38',Rq,Aq,270)
set JU4=CreateUnit(P8,'u00Q',Nq,bq,270)
set eS=CreateUnit(P8,'n00V',Bq,cq,0)
set oS=CreateUnit(P8,'n00W',Cq,Dq,0)
set rS=CreateUnit(P8,'n002',fq,Fq,0)
set aS=CreateUnit(P8,'n00X',Hq,jq,0)
set nS=CreateUnit(P8,'n009',Jq,Mq,0)
set VS=CreateUnit(P8,'n0HE',qq,Qq,0)
set JV4=CreateUnit(N8[0],'unpl',Sq,tq,220)
set JW4=CreateUnit(N8[0],'u00M',Uq,zq,270)
set JX4=CreateUnit(N8[0],'u00M',Zq,vQ,270)
set JY4=CreateUnit(N8[0],'u00M',eQ,xQ,270)
set JZ4=CreateUnit(N8[0],'u00D',oQ,iQ,270)
set JA4=CreateUnit(N8[0],'u00D',aQ,EQ,270)
set JB4=CreateUnit(N8[0],'u00D',OQ,RQ,270)
set JC4=CreateUnit(N8[0],'u00N',AQ,NQ,270)
set J34=CreateUnit(N8[0],'u00N',bQ,BQ,270)
set J64=CreateUnit(N8[0],'u00N',cQ,CQ,270)
set JL4=CreateUnit(N8[0],'u00T',fQ,FQ,270)
set J14=CreateUnit(N8[0],'u00T',hQ,HQ,270)
set J04=CreateUnit(N8[0],'usep',lQ,LQ,270)
set J54=CreateUnit(N8[0],'usep',mQ,MQ,270)
set J24=CreateUnit(N8[0],'usep',PQ,QQ,270)
set J_4=CreateUnit(N8[0],'utod',SQ,UQ,270)
set K44=CreateUnit(N8[0],'utod',WQ,zQ,270)
set K74=CreateUnit(N8[0],'utod',ZQ,vs,270)
call XI7()
set PS=CreateUnit(N8[0],'uzig',es,os,270)
set QS=CreateUnit(N8[0],'uzig',rs,as,270)
set SS=CreateUnit(N8[0],'uzig',ns,Vs,270)
set tS=CreateUnit(N8[0],'uzig',Es,Xs,270)
set TS=CreateUnit(N8[0],'uzig',Rs,As,270)
set US=CreateUnit(N8[0],'uzig',Ns,bs,270)
set K84=CreateUnit(N8[0],'uzig',Bs,cs,270)
set K94=CreateUnit(N8[0],'uzig',Cs,Ds,270)
set KD4=CreateUnit(N8[0],'uzig',fs,Fs,270)
set KE4=CreateUnit(N8[0],'uzig',Hs,js,270)
set KF4=CreateUnit(N8[0],'uzig',Js,Ks,270)
set ot=CreateUnit(N8[0],'usap',ls,Ls,270)
set rt=CreateUnit(N8[0],'usap',ms,Ms,270)
set at=CreateUnit(N8[0],'ubon',ps,Ps,270)
set Vt=CreateUnit(N8[0],'ubon',Qs,Ss,270)
set RN4=Rect(GetUnitX(JC4)-800,GetUnitY(JC4)-800,GetRectMaxX(bj_mapInitialPlayableArea),GetRectMaxY(bj_mapInitialPlayableArea))
set RO4=Rect(GetUnitX(J34)-1132,GetUnitY(J34)-1132,GetRectMaxX(bj_mapInitialPlayableArea),GetRectMaxY(bj_mapInitialPlayableArea))
set RP4=Rect(GetUnitX(J64)-800,GetUnitY(J64)-800,GetRectMaxX(bj_mapInitialPlayableArea),GetRectMaxY(bj_mapInitialPlayableArea))
call SetUnitColor(JT4,hL)
call SetUnitColor(Zs,JL)
call SetUnitColor(zs,JL)
call SetUnitColor(eS,JL)
call SetUnitColor(oS,JL)
call SetUnitColor(rS,JL)
call SetUnitColor(aS,JL)
call SetUnitColor(nS,JL)
call T49(JW4,true)
call T49(JX4,true)
call T49(JY4,true)
call T49(JZ4,true)
call T49(JA4,true)
call T49(JB4,true)
call T49(JC4,true)
call T49(J34,true)
call T49(J64,true)
call T49(JL4,true)
call T49(J14,true)
call T49(JV4,true)
call T49(J04,true)
call T49(J54,true)
call T49(J24,true)
call T49(J_4,true)
call T49(K44,true)
call T49(K74,true)
call T49(ot,true)
call T49(rt,true)
call T49(at,true)
call T49(Vt,true)
call T49(PS,true)
call T49(QS,true)
call T49(SS,true)
call T49(tS,true)
call T49(TS,true)
call T49(US,true)
call T49(K84,true)
call T49(K94,true)
call T49(KD4,true)
call T49(KE4,true)
call T49(KF4,true)
call AddUnitToStock(JU4,'h02C',0,0)
set L8H=GetUnitX(wJ)
set L9H=GetUnitY(wJ)
set LDH=GetUnitX(ZJ)
set LEH=GetUnitY(ZJ)
set LFH=GetUnitX(zJ)
set LGH=GetUnitY(zJ)
set LHH=GetUnitX(WJ)
set LIH=GetUnitY(WJ)
set LJH=GetUnitX(yJ)
set LKH=GetUnitY(yJ)
set LMH=GetUnitX(FK)
set LNH=GetUnitY(FK)
set LOH=GetUnitX(fK)
set LPH=GetUnitY(fK)
set LQH=GetUnitX(JK)
set LRH=GetUnitY(JK)
set LSH=GetUnitX(gK)
set LTH=GetUnitY(gK)
set LUH=GetUnitX(GK)
set LVH=GetUnitY(GK)
set XQ8='}'
call RemoveUnit(wJ)
call RemoveUnit(ZJ)
call RemoveUnit(zJ)
call RemoveUnit(WJ)
call RemoveUnit(yJ)
call RemoveUnit(FK)
call RemoveUnit(fK)
call RemoveUnit(JK)
call RemoveUnit(gK)
call RemoveUnit(GK)
set KG4=CreateUnit(Player(1),'ncop',L8H,L9H,270)
call UnitAddAbility(KG4,'A141')
call ClearSelectionForPlayer(Player(1))
call SelectUnitAddForPlayer(KG4,Player(1))
if GetLocalPlayer()==Player(1)then
call SetUnitVertexColor(KG4,255,255,255,255)
else
call SetUnitVertexColor(KG4,255,255,255,XQ8)
endif
set KH4=CreateUnit(Player(2),'ncop',LDH,LEH,270)
call UnitAddAbility(KH4,'A141')
call ClearSelectionForPlayer(Player(2))
call SelectUnitAddForPlayer(KH4,Player(2))
if GetLocalPlayer()==Player(2)then
call SetUnitVertexColor(KH4,255,255,255,255)
else
call SetUnitVertexColor(KH4,255,255,255,XQ8)
endif
set KI4=CreateUnit(Player(3),'ncop',LFH,LGH,270)
call UnitAddAbility(KI4,'A141')
call ClearSelectionForPlayer(Player(3))
call SelectUnitAddForPlayer(KI4,Player(3))
if GetLocalPlayer()==Player(3)then
call SetUnitVertexColor(KI4,255,255,255,255)
else
call SetUnitVertexColor(KI4,255,255,255,XQ8)
endif
set KJ4=CreateUnit(Player(4),'ncop',LHH,LIH,270)
call UnitAddAbility(KJ4,'A141')
call ClearSelectionForPlayer(Player(4))
call SelectUnitAddForPlayer(KJ4,Player(4))
if GetLocalPlayer()==Player(4)then
call SetUnitVertexColor(KJ4,255,255,255,255)
else
call SetUnitVertexColor(KJ4,255,255,255,XQ8)
endif
set KK4=CreateUnit(Player(5),'ncop',LJH,LKH,270)
call UnitAddAbility(KK4,'A141')
call ClearSelectionForPlayer(Player(5))
call SelectUnitAddForPlayer(KK4,Player(5))
if GetLocalPlayer()==Player(5)then
call SetUnitVertexColor(KK4,255,255,255,255)
else
call SetUnitVertexColor(KK4,255,255,255,XQ8)
endif
set KM4=CreateUnit(Player(7),'ncop',LMH,LNH,270)
call UnitAddAbility(KM4,'A1WI')
call ClearSelectionForPlayer(Player(7))
call SelectUnitAddForPlayer(KM4,Player(7))
if GetLocalPlayer()==Player(7)then
call SetUnitVertexColor(KM4,255,255,255,255)
else
call SetUnitVertexColor(KM4,255,255,255,XQ8)
endif
set KN4=CreateUnit(Player(8),'ncop',LOH,LPH,270)
call UnitAddAbility(KN4,'A1WI')
call ClearSelectionForPlayer(Player(8))
call SelectUnitAddForPlayer(KN4,Player(8))
if GetLocalPlayer()==Player(8)then
call SetUnitVertexColor(KN4,255,255,255,255)
else
call SetUnitVertexColor(KN4,255,255,255,XQ8)
endif
set KO4=CreateUnit(Player(9),'ncop',LQH,LRH,270)
call UnitAddAbility(KO4,'A1WI')
call ClearSelectionForPlayer(Player(9))
call SelectUnitAddForPlayer(KO4,Player(9))
if GetLocalPlayer()==Player(9)then
call SetUnitVertexColor(KO4,255,255,255,255)
else
call SetUnitVertexColor(KO4,255,255,255,XQ8)
endif
set KP4=CreateUnit(Player(10),'ncop',LSH,LTH,270)
call UnitAddAbility(KP4,'A1WI')
call ClearSelectionForPlayer(Player(10))
call SelectUnitAddForPlayer(KP4,Player(10))
if GetLocalPlayer()==Player(10)then
call SetUnitVertexColor(KP4,255,255,255,255)
else
call SetUnitVertexColor(KP4,255,255,255,XQ8)
endif
set KQ4=CreateUnit(Player(11),'ncop',LUH,LVH,270)
call UnitAddAbility(KQ4,'A1WI')
call ClearSelectionForPlayer(Player(11))
call SelectUnitAddForPlayer(KQ4,Player(11))
if GetLocalPlayer()==Player(11)then
call SetUnitVertexColor(KQ4,255,255,255,255)
else
call SetUnitVertexColor(KQ4,255,255,255,XQ8)
endif
set KR4[1]=KG4
set KR4[2]=KH4
set KR4[3]=KI4
set KR4[4]=KJ4
set KR4[5]=KK4
set KR4[7]=KM4
set KR4[8]=KN4
set KR4[9]=KO4
set KR4[10]=KP4
set KR4[11]=KQ4
set KS4[1]=GetUnitX(KG4)
set KS4[2]=GetUnitX(KH4)
set KS4[3]=GetUnitX(KI4)
set KS4[4]=GetUnitX(KJ4)
set KS4[5]=GetUnitX(KK4)
set KS4[7]=GetUnitX(KM4)
set KS4[8]=GetUnitX(KN4)
set KS4[9]=GetUnitX(KO4)
set KS4[10]=GetUnitX(KP4)
set KS4[11]=GetUnitX(KQ4)
set KT4[1]=GetUnitY(KG4)
set KT4[2]=GetUnitY(KH4)
set KT4[3]=GetUnitY(KI4)
set KT4[4]=GetUnitY(KJ4)
set KT4[5]=GetUnitY(KK4)
set KT4[7]=GetUnitY(KM4)
set KT4[8]=GetUnitY(KN4)
set KT4[9]=GetUnitY(KO4)
set KT4[10]=GetUnitY(KP4)
set KT4[11]=GetUnitY(KQ4)
call XU8()
call XZ8()
call PH8('esen',"stand 4")
call PH8('e00V',"stand 4")
call PH8('edry',"spell")
call PH8('e00W',"spell")
call PH8('ugho',"stand victory")
call PH8('u001',"stand victory")
call PH8('unec',"stand channel")
call PH8('u002',"stand channel")
call PD8(XG4,.4,XG4)
call PD8(XI4,.5,XI4)
call PD8(XD4,1.2,XD4)
call PD8(XE4,.5,XE4)
call PD8(XF4,.5,XF4)
call PD8(XJ4,1,XJ4)
set t=CreateTrigger()
set j8=Player(15)
set LWH=GetUnitX(qK)
set LXH=GetUnitY(qK)
set LYH=GetUnitX(tJ)
set LZH=GetUnitY(tJ)
set LAH=GetUnitX(LK)
set LBH=GetUnitY(LK)
set LCH=GetUnitX(SJ)
set L3H=GetUnitY(SJ)
set L6H=GetUnitX(HZ4)
set LLH=GetUnitY(HZ4)
set L1H=GetUnitX(cJ)
set L0H=GetUnitY(cJ)
set L5H=GetUnitX(gJ)
set L2H=GetUnitY(gJ)
set L_H=GetUnitX(PK)
set D4I=GetUnitY(PK)
set D7I=GetUnitX(Cl)
set D8I=GetUnitY(Cl)
set DEI=GetUnitX(YC4)
set DFI=GetUnitY(YC4)
set D9I=GetUnitX(Y64)
set DDI=GetUnitY(Y64)
set DII=GetUnitX(Y34)
set DJI=GetUnitY(Y34)
call RemoveUnit(qK)
call RemoveUnit(HZ4)
call RemoveUnit(tJ)
call RemoveUnit(SJ)
call RemoveUnit(LK)
call RemoveUnit(cJ)
call RemoveUnit(gJ)
call RemoveUnit(PK)
call RemoveUnit(Cl)
call RemoveUnit(YC4)
call RemoveUnit(Y64)
call RemoveUnit(Y34)
set MM4=CreateUnit(j8,'n008',LCH,L3H,270)
set MN4=CreateUnit(j8,'n0GJ',L6H,LLH,270)
set MO4=CreateUnit(j8,'n01D',L1H,L0H,270)
set MP4=CreateUnit(j8,'n0LH',D9I,DDI,270)
set MQ4=CreateUnit(j8,'n01N',LWH,LXH,270)
set MR4=CreateUnit(j8,'n007',LYH,LZH,270)
set MS4=CreateUnit(j8,'n005',LAH,LBH,270)
set MT4=CreateUnit(j8,'n0LI',DEI,DFI,270)
set MU4=CreateUnit(j8,'n01B',L5H,L2H,270)
set MV4=CreateUnit(j8,'n01P',L_H,D4I,270)
set MW4=CreateUnit(j8,'n0GK',D7I,D8I,270)
set MX4=CreateUnit(j8,'n0LJ',DII,DJI,270)
call SetUnitColor(MM4,ConvertPlayerColor(1))
call SetUnitColor(MN4,ConvertPlayerColor(1))
call SetUnitColor(MO4,ConvertPlayerColor(9))
call SetUnitColor(MP4,ConvertPlayerColor(9))
call SetUnitColor(MQ4,ConvertPlayerColor(6))
call SetUnitColor(MR4,ConvertPlayerColor(6))
call SetUnitColor(MS4,ConvertPlayerColor(10))
call SetUnitColor(MT4,ConvertPlayerColor(10))
call SetUnitColor(MU4,ConvertPlayerColor(0))
call SetUnitColor(MV4,ConvertPlayerColor(0))
call SetUnitColor(MW4,ConvertPlayerColor(11))
call SetUnitColor(MX4,ConvertPlayerColor(11))
set EU7[1]=MM4
set EU7[2]=MN4
set EU7[3]=MO4
set EU7[4]=MP4
set EU7[5]=MQ4
set EU7[6]=MR4
set EU7[7]=MS4
set EU7[8]=MT4
set EU7[9]=MU4
set EU7[10]=MV4
set EU7[11]=MW4
set EU7[12]=MX4
call JBD()
call JAD()
set t=null
call XB8()
call X28()
set ZR=CreateTrigger()
call TriggerRegisterTimerEventSingle(ZR,.01)
call TriggerAddAction(ZR,function X_8)
set t=CreateTrigger()
call TriggerRegisterPlayerEventLeave(t,G8[1])
call TriggerRegisterPlayerEventLeave(t,G8[2])
call TriggerRegisterPlayerEventLeave(t,G8[3])
call TriggerRegisterPlayerEventLeave(t,G8[4])
call TriggerRegisterPlayerEventLeave(t,G8[5])
call TriggerRegisterPlayerEventLeave(t,N8[1])
call TriggerRegisterPlayerEventLeave(t,N8[2])
call TriggerRegisterPlayerEventLeave(t,N8[3])
call TriggerRegisterPlayerEventLeave(t,N8[4])
call TriggerRegisterPlayerEventLeave(t,N8[5])
call TriggerAddAction(t,function YJ8)
if L8 then
call Y78()
set t=CreateTrigger()
if IsPlayerObserver(KU4)then
call TriggerRegisterPlayerEventLeave(t,KU4)
endif
if IsPlayerObserver(KV4)then
call TriggerRegisterPlayerEventLeave(t,KV4)
endif
call TriggerAddAction(t,function YD8)
endif
set U2[0]=false
set U2[1]=false
set U2[2]=false
set U2[3]=false
set U2[4]=false
set U2[5]=false
set U2[6]=false
set U2[7]=false
set U2[8]=false
set U2[9]=false
set U2[10]=false
set U2[11]=false
set U2[12]=false
set U2[13]=false
set U2[14]=false
set U2[15]=false
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_HERO_REVIVE_FINISH)
call TriggerAddAction(t,function OXH)
set t=CreateTrigger()
call TriggerRegisterEnterRectSimple(t,bj_mapInitialPlayableArea)
call TriggerAddCondition(t,Condition(function J89))
call TriggerAddAction(t,function JZ9)
set MC4=t
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerAddAction(t,function JL9)
call TriggerAddCondition(t,Condition(function J69))
set M64=t
set ML4=CreateTrigger()
call TriggerRegisterTimerEvent(ML4,.6,true)
call TriggerAddCondition(ML4,Condition(function J19))
call DisableTrigger(ML4)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddAction(t,function TM9)
set M14=t
call S09(0,0,false)
call J29()
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELL)
call TriggerAddCondition(t,Condition(function J_9))
set t=null
call PU8('A27F')
call PU8('A27X')
call PU8('A27H')
call PU8('AZ1H')
call PU8('A27V')
call PU8('A27G')
call PU8('A27I')
call PU8('A27K')
call PU8('A27J')
set DS=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(DS,G8[0],EVENT_PLAYER_UNIT_DEATH,Condition(function KF8))
call TriggerRegisterPlayerUnitEvent(DS,N8[0],EVENT_PLAYER_UNIT_DEATH,Condition(function KF8))
call TriggerRegisterPlayerUnitEvent(DS,O8,EVENT_PLAYER_UNIT_DEATH,Condition(function KF8))
call TriggerAddAction(DS,function K89)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function PA9))
set t=null
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function Q39))
call TriggerAddAction(t,function R49)
set ES=t
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function R39))
set t=null
set NW4=CreateTrigger()
call TriggerAddCondition(NW4,Condition(function R59))
set ZI=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(ZI,O8,EVENT_PLAYER_UNIT_DEATH,Condition(function KF8))
call TriggerAddCondition(ZI,Condition(function S89))
call TriggerAddAction(ZI,function SE9)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,G8[0],EVENT_PLAYER_UNIT_DEATH,Condition(function KF8))
call TriggerRegisterPlayerUnitEvent(t,N8[0],EVENT_PLAYER_UNIT_DEATH,Condition(function KF8))
call TriggerAddCondition(t,Condition(function SN9))
set t=CreateTrigger()
call TriggerAddCondition(t,Condition(function SZ9))
call TriggerRegisterTimerEvent(t,6,false)
set t=null
set JV=JV+1
set AU[JV]='I0FF'
set BU[JV]='I0FG'
set CU[JV]=0
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSelectHeroOn.blp"
set EV[JV]=0
set JV=JV+1
set AU[JV]='I02Q'
set BU[JV]='I02O'
set CU[JV]='h011'
set LU[JV]='I00A'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBootsOfSpeed.blp"
set EV[JV]=0
set suduzhixue=JV
set JV=JV+1
set AU[JV]='I02S'
set BU[JV]='I02P'
set CU[JV]='h012'
set LU[JV]='I0CA'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNGlove.blp"
set EV[JV]=0
set jiasushoutao=JV
set JV=JV+1
set AU[JV]='I02N'
set BU[JV]='I02R'
set CU[JV]='h013'
set LU[JV]='I0CS'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBoots.blp"
set EV[JV]=0
set jinglingpixue=JV
set JV=JV+1
set AU[JV]='I02X'
set BU[JV]='I02Y'
set CU[JV]='h015'
set LU[JV]='I0D4'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNCirclet.blp"
set EV[JV]=0
set guizuyuanhuan=JV
set JV=JV+1
set AU[JV]='I02Z'
set BU[JV]='I043'
set CU[JV]='h016'
set LU[JV]='I0CV'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBelt.blp"
set EV[JV]=0
set jurenliliangyaodai=JV
set JV=JV+1
set AU[JV]='I030'
set BU[JV]='I044'
set CU[JV]='h017'
set LU[JV]='I0D2'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingKnife_03.blp"
set EV[JV]=0
set huanxinzhiren=JV
set JV=JV+1
set AU[JV]='I031'
set BU[JV]='I045'
set CU[JV]='h018'
set LU[JV]='I0D5'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNClawsOfAttack.blp"
set EV[JV]=0
set gongjizhizhao=JV
set JV=JV+1
set AU[JV]='I032'
set BU[JV]='I046'
set CU[JV]='h019'
set LU[JV]='I0CZ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSteelMelee.blp"
set EV[JV]=0
set kuojian=JV
set JV=JV+1
set AU[JV]='I033'
set BU[JV]='I047'
set CU[JV]='h01A'
set LU[JV]='I0D7'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Chain_12.blp"
set EV[JV]=0
set suozijia=JV
set JV=JV+1
set AU[JV]='I034'
set BU[JV]='I048'
set CU[JV]='h01B'
set LU[JV]='I0CX'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Sword_19.blp"
set EV[JV]=0
set dajian=JV
set JV=JV+1
set AU[JV]='I035'
set BU[JV]='I049'
set CU[JV]='h01C'
set LU[JV]='I0CI'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNFrostMourne.blp"
set EV[JV]=0
set emodaofeng=JV
set JV=JV+1
set AU[JV]='I036'
set BU[JV]='I04A'
set CU[JV]='h01D'
set LU[JV]='I0CH'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Weapon_Bow_06.blp"
set EV[JV]=0
set yingjiaogong=JV
set JV=JV+1
set AU[JV]='I037'
set BU[JV]='I04B'
set CU[JV]='h01E'
set LU[JV]='I0CR'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNEnchantedGemstone.blp"
set EV[JV]=0
set nengliangzhiqiu=JV
set JV=JV+1
set AU[JV]='I038'
set BU[JV]='I04C'
set CU[JV]='h01F'
set LU[JV]='I0CJ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNGauntletsOfOgrePower.blp"
set EV[JV]=0
set liliangshoutao=JV
set JV=JV+1
set AU[JV]='I039'
set BU[JV]='I04D'
set CU[JV]='h01G'
set LU[JV]='I0DG'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNGem.blp"
set EV[JV]=0
set zhenshibaoshi=JV
set JV=JV+1
set AU[JV]='I0MS'
set BU[JV]='I0MR'
set CU[JV]=0
set LU[JV]='I0MT'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNGem.blp"
set EV[JV]=0
set OW=JV
set JV=JV+1
set AU[JV]='I03B'
set BU[JV]='I04E'
set CU[JV]='h01H'
set LU[JV]='I0DA'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNHelmutPurple.blp"
set EV[JV]=0
set tieyitoukui=JV
set JV=JV+1
set AU[JV]='I03C'
set BU[JV]='I04F'
set CU[JV]='h01I'
set LU[JV]='I0CQ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNPeriapt1.blp"
set EV[JV]=0
set zhenfenbaoshi=JV
set JV=JV+1
set AU[JV]='I03D'
set BU[JV]='I04G'
set CU[JV]='h01J'
set LU[JV]='I0CU'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNNatureTouchGrow.blp"
set EV[JV]=0
set tieshuzhigan=JV
set JV=JV+1
set AU[JV]='I03E'
set BU[JV]='I04H'
set CU[JV]='h01K'
set LU[JV]='I0C7'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNDaggerOfEscape.blp"
set EV[JV]=12
set keledebishou=JV
set JV=JV+1
set AU[JV]='I03E'
set BU[JV]='I04I'
set CU[JV]='h01K'
set LU[JV]='I0DH'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNDaggerOfEscape.blp"
set EV[JV]=0
set keledebishou2=JV
set JV=JV+1
set AU[JV]='I03F'
set BU[JV]='I04J'
set CU[JV]='h01L'
set LU[JV]='I0CM'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNMantleOfIntelligence.blp"
set EV[JV]=0
set zhilidoupeng=JV
set JV=JV+1
set AU[JV]='I03G'
set BU[JV]='I04K'
set CU[JV]='h01M'
set LU[JV]='I0CD'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNUndeadShrine.blp"
set EV[JV]=0
set siwangmianju=JV
set JV=JV+1
set AU[JV]='I03H'
set BU[JV]='I04L'
set CU[JV]='h01N'
set LU[JV]='I0CG'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSpiritWalkerMasterTraining.blp"
set EV[JV]=0
set ximeisitedelveduo=JV
set JV=JV+1
set AU[JV]='I03I'
set BU[JV]='I04M'
set CU[JV]='h01O'
set LU[JV]='I0D0'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNHammer.blp"
set EV[JV]=0
set miyinchui=JV
set JV=JV+1
set AU[JV]='I03J'
set BU[JV]='I04N'
set CU[JV]='h01P'
set LU[JV]='I0CN'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNStaffOfNegation.blp"
set EV[JV]=0
set shenmifazhang=JV
set JV=JV+1
set AU[JV]='I03K'
set BU[JV]='I04O'
set CU[JV]='h01Q'
set LU[JV]='I0D8'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSpiritWalkerAdeptTraining.tga"
set EV[JV]=0
set shirenmozhifu=JV
set JV=JV+1
set AU[JV]='I03L'
set BU[JV]='I04P'
set CU[JV]='h01R'
set LU[JV]='I0CE'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Misc_Cape_08.blp"
set EV[JV]=0
set liulangfashidoupeng=JV
set JV=JV+1
set AU[JV]='I03M'
set BU[JV]='I04Q'
set CU[JV]='h01S'
set LU[JV]='I0DB'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Plate13.blp"
set EV[JV]=0
set banjia=JV
set JV=JV+1
set AU[JV]='I03N'
set BU[JV]='I04R'
set CU[JV]='h01T'
set LU[JV]='I0CL'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNUsedSoulGem.blp"
set EV[JV]=0
set jingqizhiqiu=JV
set JV=JV+1
set AU[JV]='I03P'
set BU[JV]='I04S'
set CU[JV]='h01U'
set LU[JV]='I0CY'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNAlleriaFlute.blp"
set EV[JV]=0
set duangun=JV
set JV=JV+1
set AU[JV]='I03Q'
set BU[JV]='I04T'
set CU[JV]='h01V'
set LU[JV]='I0DI'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNGoldRing.blp"
set EV[JV]=0
set zhiliaozhihuan=JV
set JV=JV+1
set AU[JV]='I03R'
set BU[JV]='I04U'
set CU[JV]='h01W'
set LU[JV]='I0CW'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRingPurple.blp"
set EV[JV]=0
set shouhuzhihuan=JV
set JV=JV+1
set AU[JV]='I03S'
set BU[JV]='I04V'
set CU[JV]='h01X'
set LU[JV]='I0DJ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRingSkull.blp"
set EV[JV]=0
set huifujiezhi=JV
set JV=JV+1
set AU[JV]='I03T'
set BU[JV]='I04W'
set CU[JV]='h01Y'
set LU[JV]='I0CP'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRobeOfTheMagi.blp"
set EV[JV]=0
set fashichangpao=JV
set JV=JV+1
set AU[JV]='I03U'
set BU[JV]='I04X'
set CU[JV]='h01Z'
set LU[JV]='I0CC'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNStaffOfTeleportation.blp"
set EV[JV]=0
set shengzheyiwu=JV
set JV=JV+1
set AU[JV]='I03V'
set BU[JV]='I04Y'
set CU[JV]='h020'
set LU[JV]='I0C5'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSlippersOfAgility.blp"
set EV[JV]=0
set minjiebianxie=JV
set JV=JV+1
set AU[JV]='I03W'
set BU[JV]='I04Z'
set CU[JV]='h021'
set LU[JV]='I0DK'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSobiMask.blp"
set EV[JV]=0
set yirenmianzhao=JV
set JV=JV+1
set AU[JV]='I03X'
set BU[JV]='I050'
set CU[JV]='h022'
set LU[JV]='I0D1'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNWandOfCyclone.blp"
set EV[JV]=0
set molifazhang=JV
set JV=JV+1
set AU[JV]='I03A'
set BU[JV]='I051'
set CU[JV]='h023'
set LU[JV]='I0D9'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSteelArmor.blp"
set EV[JV]=0
set yuandun=JV
set JV=JV+1
set AU[JV]='I0KB'
set BU[JV]='I0KA'
set CU[JV]=0
set LU[JV]='I0KC'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSteelArmor.blp"
set EV[JV]=0
set yuandun2=JV
set JV=JV+1
set AU[JV]='I03Y'
set BU[JV]='I052'
set CU[JV]='h024'
set LU[JV]='I0C9'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNOrbofSlowness.blp"
set EV[JV]=0
set jixianfaqiu=JV
set JV=JV+1
set AU[JV]='I03Z'
set BU[JV]='I053'
set CU[JV]='h025'
set LU[JV]='I0CK'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSoulGem.blp"
set EV[JV]=0
set huolizhiqiu=JV
set JV=JV+1
set AU[JV]='I040'
set BU[JV]='I054'
set CU[JV]='h026'
set LU[JV]='I0DL'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNPeriapt.blp"
set EV[JV]=0
set xuwubaoshi=JV
set JV=JV+1
set AU[JV]='I041'
set BU[JV]='I055'
set CU[JV]='h027'
set LU[JV]='I0D6'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSteelRanged.blp"
set EV[JV]=0
set biaoqiang=JV
set JV=JV+1
set AU[JV]='I00L'
set BU[JV]='I0AV'
set CU[JV]='h02B'
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBottle0.blp"
set EV[JV]=0
set UY=JV
set JV=JV+1
set AU[JV]='I05E'
set BU[JV]='I0AM'
set CU[JV]=0
set LU[JV]='I0DN'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBottle0.blp"
set EV[JV]=0
set VY=JV
set JV=JV+1
set AU[JV]='I0AU'
set BU[JV]='I0AN'
set CU[JV]=0
set LU[JV]='I0DO'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBottle1.blp"
set EV[JV]=0
set XY=JV
set JV=JV+1
set AU[JV]='I0AS'
set BU[JV]='I0AO'
set CU[JV]=0
set LU[JV]='I0DP'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBottle2.blp"
set EV[JV]=0
set YY=JV
set JV=JV+1
set AU[JV]='I0AT'
set BU[JV]='I0AP'
set CU[JV]=0
set LU[JV]='I0DQ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBottle3.blp"
set EV[JV]=0
set ZY=JV
set JV=JV+1
set AU[JV]='I0GW'
set BU[JV]='I0GY'
set CU[JV]=0
set LU[JV]='I0H3'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBottle_Illusion.blp"
set EV[JV]=0
set EZ=JV
set JV=JV+1
set AU[JV]='I0H2'
set BU[JV]='I0GX'
set CU[JV]=0
set LU[JV]='I0DR'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBottle_Regeneration.blp"
set EV[JV]=0
set DZ=JV
set JV=JV+1
set AU[JV]='I0GV'
set BU[JV]='I0H1'
set CU[JV]=0
set LU[JV]='I0H4'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBottle_Haste.blp"
set EV[JV]=0
set CY=JV
set JV=JV+1
set AU[JV]='I0AR'
set BU[JV]='I0H0'
set CU[JV]=0
set LU[JV]='I0H6'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBottle_DoubleDamage.blp"
set EV[JV]=0
set BY=JV
set JV=JV+1
set AU[JV]='I0AQ'
set BU[JV]='I0GZ'
set CU[JV]=0
set LU[JV]='I0H5'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBottle_Invisibility.blp"
set EV[JV]=0
set AY=JV
set JV=JV+1
set AU[JV]='I0GD'
set BU[JV]='I0GC'
set CU[JV]='h074'
set LU[JV]='I0GE'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNWand.blp"
set EV[JV]=17
set mobang=JV
set JV=JV+1
set AU[JV]='I0HC'
set BU[JV]='I0HB'
set CU[JV]=0
set LU[JV]='I0HA'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNStarWand.blp"
set EV[JV]=17
set mozhang=JV
set JV=JV+1
set AU[JV]='I0HT'
set BU[JV]='I0HR'
set CU[JV]='h07W'
set LU[JV]='I0HV'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNOrcMeleeUpTwo.blp"
set EV[JV]=5
set yazhizhiren=JV
set JV=JV+1
set AU[JV]='I0HU'
set BU[JV]='I0HP'
set CU[JV]=0
set LU[JV]='I0HW'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNOrcMeleeUpTwo.blp"
set EV[JV]=5
set yazhizhiren2=JV
set JV=JV+1
set AU[JV]='I0N4'
set BU[JV]='I0N3'
set CU[JV]=0
set LU[JV]='I0N5'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNPoisonBlade.blp"
set EV[JV]=30
set UZ=JV
set JV=JV+1
set AU[JV]='I0N7'
set BU[JV]='I0N6'
set CU[JV]=0
set LU[JV]='I0N8'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNPoisonBlade.blp"
set EV[JV]=30
set XZ=JV
set JV=JV+1
set AU[JV]='I0J7'
set BU[JV]='I0J6'
set CU[JV]='h083'
set LU[JV]='I0J8'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNAmulet.blp"
set EV[JV]=0
set shanbihufu=JV
set JV=JV+1
set AU[JV]='I0JJ'
set BU[JV]='I0JI'
set CU[JV]='h087'
set LU[JV]='I0JK'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNGreenStaff.blp"
set EV[JV]=30
set youhunquanzhang=JV
set JV=JV+1
set AU[JV]='I0P9'
set BU[JV]='I0PB'
set CU[JV]='h0EI'
set LU[JV]='I0PA'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNPendantOfMana.blp"
set EV[JV]=0
set OC=JV
set JV=JV+1
set AU[JV]='I0PN'
set BU[JV]='I0PM'
set CU[JV]=0
set LU[JV]='I0PO'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNPendantOfMana.blp"
set EV[JV]=10
set PC=JV
set JV=JV+1
set AU[JV]='I0MA'
set BU[JV]='I0M9'
set CU[JV]='h0CM'
set LU[JV]='I0MB'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNOrbOfVenom.blp"
set EV[JV]=0
set zuduzhiqiu=JV
set JV=JV+1
set AU[JV]='I0MD'
set BU[JV]='I0ME'
set CU[JV]=0
set LU[JV]='I0MC'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNOrbOfVenom.blp"
set EV[JV]=0
set ES4=JV
set JV=JV+1
set AU[JV]='I057'
set BU[JV]='I05C'
set CU[JV]='h02A'
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNAncientOfTheEarth.blp"
set EV[JV]=0
set BA=JV
set JV=JV+1
set AU[JV]='I042'
set BU[JV]='I05D'
set CU[JV]='h028'
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNLesserClarityPotion.blp"
set EV[JV]=0
set WA=JV
set JV=JV+1
set AU[JV]='I0HO'
set BU[JV]='I0HN'
set CU[JV]='h07V'
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNVialFull.blp"
set EV[JV]=0
set YA=JV
set JV=JV+1
set AU[JV]='I056'
set BU[JV]='I05F'
set CU[JV]='h029'
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNHealingSalve.blp"
set EV[JV]=0
set ZA=JV
set JV=JV+1
set AU[JV]='I058'
set BU[JV]='I05G'
set CU[JV]='h02C'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSentryWard.blp"
set EV[JV]=0
set FB=JV
set JV=JV+1
set AU[JV]='I059'
set BU[JV]='I05H'
set CU[JV]='h02D'
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBlueSentryWard.blp"
set EV[JV]=0
set GB=JV
set JV=JV+1
set AU[JV]='I05A'
set BU[JV]='I05I'
set CU[JV]='h02E'
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNScrollUber.blp"
set EV[JV]=0
set JB=JV
set JV=JV+1
set AU[JV]='I05B'
set BU[JV]='I05J'
set CU[JV]='h02F'
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNCritterChicken.blp"
set EV[JV]=0
set RB=JV
set JV=JV+1
set AU[JV]='I0B0'
set BU[JV]='I0B1'
set CU[JV]=0
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNCheese.blp"
set EV[JV]=0
set VB=JV
set JV=JV+1
set AU[JV]='I0GG'
set BU[JV]='I0GF'
set CU[JV]='h075'
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNPotionOfDivinity.blp"
set EV[JV]=30
set WB=JV
set JV=JV+1
set AU[JV]='I0GI'
set BU[JV]='I0GH'
set CU[JV]='h076'
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNDustOfAppearance.blp"
set EV[JV]=60
set YB=JV
set JV=JV+1
set AU[JV]='I0KT'
set BU[JV]='I0KS'
set CU[JV]='h0B9'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNWandOfManaSteal.blp"
set EV[JV]=0
set LB=JV
set JV=JV+1
set AU[JV]='I0NF'
set BU[JV]='I0NG'
set CU[JV]='h0D3'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSmokePotion.blp"
set EV[JV]=90
set EC=JV
set JV=JV+1
set AU[JV]='I061'
set BU[JV]='I062'
set CU[JV]=0
set LU[JV]='I01J'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNOrbOfFire.blp"
set EV[JV]=0
set jianrenqiu=JV
set JV=JV+1
set AU[JV]='I064'
set BU[JV]='I063'
set CU[JV]=0
set LU[JV]='I01K'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Helmet_17.blp"
set EV[JV]=0
set huifutoujin=JV
set JV=JV+1
set AU[JV]='I065'
set BU[JV]='I066'
set CU[JV]=0
set LU[JV]='I01L'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNThoriumArmor.blp"
set EV[JV]=25
set xuanmingdunpai=JV
set JV=JV+1
set AU[JV]='I068'
set BU[JV]='I067'
set CU[JV]=0
set LU[JV]='I01M'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRingVioletSpider.tga"
set EV[JV]=0
set shengdianzhihuan=JV
set JV=JV+1
set AU[JV]='I069'
set BU[JV]='I06A'
set CU[JV]=0
set LU[JV]='I0C6'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRingVioletSpider.tga"
set EV[JV]=0
set shengdianzhihuan2=JV
set JV=JV+1
set AU[JV]='I06C'
set BU[JV]='I06B'
set CU[JV]=0
set LU[JV]='I01P'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNAbility_Rogue_Sprint.blp"
set EV[JV]=60
set yuanxingxie=JV
set JV=JV+1
set AU[JV]='I03O'
set BU[JV]='I02T'
set CU[JV]=0
set LU[JV]='I01R'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNWirtsLegGreen.blp"
set EV[JV]=0
set donglixie1=JV
set JV=JV+1
set AU[JV]='I02U'
set BU[JV]='I05Y'
set CU[JV]=0
set LU[JV]='I01Q'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNWirtsLeg.blp"
set EV[JV]=0
set donglixie2=JV
set JV=JV+1
set AU[JV]='I060'
set BU[JV]='I05Z'
set CU[JV]=0
set LU[JV]='I01S'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNWirtsLegBlue.blp"
set EV[JV]=0
set donglixie3=JV
set JV=JV+1
set AU[JV]='I06E'
set BU[JV]='I06D'
set CU[JV]=0
set LU[JV]='I01T'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNGoldGloves.BLP"
set EV[JV]='d'
set maidasizhishou=JV
set JV=JV+1
set AU[JV]='I0NO'
set BU[JV]='I0NN'
set CU[JV]=0
set LU[JV]='I0NP'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNGoldGloves.BLP"
set EV[JV]='d'
set maidasizhishou2=JV
set JV=JV+1
set AU[JV]='I06G'
set BU[JV]='I06F'
set CU[JV]=0
set LU[JV]='I01U'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Mace_10.blp"
set EV[JV]=0
set kongmingzhang=JV
set JV=JV+1
set AU[JV]='I06I'
set BU[JV]='I06H'
set CU[JV]=0
set LU[JV]='I01V'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRunedBracers.blp"
set EV[JV]=0
set huwan=JV
set JV=JV+1
set AU[JV]='I06K'
set BU[JV]='I06J'
set CU[JV]=0
set LU[JV]='I01W'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRevenant.blp"
set EV[JV]=0
set youlingxidai=JV
set JV=JV+1
set AU[JV]='I06M'
set BU[JV]='I06L'
set CU[JV]=0
set LU[JV]='I01X'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNTalisman.tga"
set EV[JV]=0
set wuyongguajian=JV
set JV=JV+1
set AU[JV]='I08F'
set BU[JV]='I08G'
set CU[JV]=0
set LU[JV]='I01Y'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Sword_10.blp"
set EV[JV]=0
set yecha=JV
set JV=JV+1
set AU[JV]='I08I'
set BU[JV]='I08H'
set CU[JV]=0
set LU[JV]='I01Z'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNJapaneseSword.BLP"
set EV[JV]=0
set sanhua=JV
set JV=JV+1
set AU[JV]='I08J'
set BU[JV]='I08K'
set CU[JV]=0
set LU[JV]='I020'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Hammer_10.blp"
set EV[JV]=0
set suiguchui=JV
set JV=JV+1
set AU[JV]='I08M'
set BU[JV]='I08L'
set CU[JV]=0
set LU[JV]='I0C8'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Hammer_10.blp"
set EV[JV]=0
set suiguchui2=JV
set JV=JV+1
set AU[JV]='I08N'
set BU[JV]='I08O'
set CU[JV]=0
set LU[JV]='I021'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Plate06.blp"
set EV[JV]=17
set renjia=JV
set JV=JV+1
set AU[JV]='I08Q'
set BU[JV]='I08P'
set CU[JV]=0
set LU[JV]='I022'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNStormHammer.blp"
set EV[JV]=0
set xuanwo=JV
set JV=JV+1
set AU[JV]='I08S'
set BU[JV]='I08R'
set CU[JV]=0
set LU[JV]='I023'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Sword_11.blp"
set EV[JV]=12
set sanshizhiren=JV
set JV=JV+1
set AU[JV]='I0JB'
set BU[JV]='I0J9'
set CU[JV]=0
set LU[JV]='I0JD'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNDiffusal2.blp"
set EV[JV]=12
set sanshizhiren2=JV
set JV=JV+1
set AU[JV]='I0EW'
set BU[JV]='I0EV'
set CU[JV]=0
set LU[JV]='I0EX'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Sword_11.blp"
set EV[JV]=0
set sanshizhiren3=JV
set JV=JV+1
set AU[JV]='I0JC'
set BU[JV]='I0JA'
set CU[JV]=0
set LU[JV]='I0JE'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNDiffusal2.blp"
set EV[JV]=0
set sanshizhiren4=JV
set JV=JV+1
set AU[JV]='I08U'
set BU[JV]='I08T'
set CU[JV]=0
set LU[JV]='I024'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Helmet_13.blp"
set EV[JV]=60
set zhipeitoukui=JV
set JV=JV+1
set AU[JV]='I08W'
set BU[JV]='I08V'
set CU[JV]=0
set LU[JV]='I0CO'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Helmet_13.blp"
set EV[JV]=0
set zhipeitoukui2=JV
set JV=JV+1
set AU[JV]='I08X'
set BU[JV]='I08Y'
set CU[JV]=0
set LU[JV]='I025'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNHelmOfValor.blp"
set EV[JV]=22
set fengkuangmianju=JV
set JV=JV+1
set AU[JV]='I090'
set BU[JV]='I08Z'
set CU[JV]=0
set LU[JV]='I026'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNStaffofpurification.blp"
set EV[JV]=30
set euldeshenshengfazhang=JV
set JV=JV+1
set AU[JV]='I092'
set BU[JV]='I091'
set CU[JV]=0
set LU[JV]='I027'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNPhilosophersStone.blp"
set EV[JV]=0
set zhenhunshi=JV
set JV=JV+1
set AU[JV]='I094'
set BU[JV]='I093'
set CU[JV]=0
set LU[JV]='I028'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSpellShieldAmulet.blp"
set EV[JV]=45
set meikensimu=JV
set JV=JV+1
set AU[JV]='I096'
set BU[JV]='I095'
set CU[JV]=0
set LU[JV]='I029'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSpell_Holy_BlessingOfStrength.blp"
set EV[JV]=0
set sanyeduijian=JV
set JV=JV+1
set AU[JV]='I098'
set BU[JV]='I097'
set CU[JV]=0
set LU[JV]='I02A'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNAbility_Gouge.blp"
set EV[JV]=0
set anmie=JV
set JV=JV+1
set AU[JV]='I09A'
set BU[JV]='I099'
set CU[JV]=0
set LU[JV]='I02B'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingAxe_06.blp"
set EV[JV]=0
set kuangzhanfu=JV
set JV=JV+1
set AU[JV]='I09B'
set BU[JV]='I09C'
set CU[JV]=0
set LU[JV]='I02C'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNThoriumMelee.blp"
set EV[JV]=0
set shuijingjian=JV
set JV=JV+1
set AU[JV]='I0G2'
set BU[JV]='I0FZ'
set CU[JV]=0
set LU[JV]='I0G8'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp"
set EV[JV]=80
set heihuangzhang=JV
set JV=JV+1
set AU[JV]='I0G6'
set BU[JV]='I0G0'
set CU[JV]=0
set LU[JV]='I0G9'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp"
set EV[JV]=75
set WL=JV
set JV=JV+1
set AU[JV]='I09E'
set BU[JV]='I0FY'
set CU[JV]=0
set LU[JV]='I0G7'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp"
set EV[JV]=70
set ZL=JV
set JV=JV+1
set AU[JV]='I0G5'
set BU[JV]='I0FS'
set CU[JV]=0
set LU[JV]='I02D'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp"
set EV[JV]=65
set AL=JV
set JV=JV+1
set AU[JV]='I0G3'
set BU[JV]='I09D'
set CU[JV]=0
set LU[JV]='I0GB'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp"
set EV[JV]=60
set LL=JV
set JV=JV+1
set AU[JV]='I0G4'
set BU[JV]='I0G1'
set CU[JV]=0
set LU[JV]='I0GA'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp"
set EV[JV]=55
set D1=JV
set JV=JV+1
set AU[JV]='I0P6'
set BU[JV]='I0P8'
set CU[JV]=0
set LU[JV]='I0P7'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp"
set EV[JV]=50
set E1=JV
set JV=JV+1
set AU[JV]='I0AX'
set BU[JV]='I0AW'
set CU[JV]=0
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNArcaniteArmor.blp"
set EV[JV]=0
set F1=JV
set JV=JV+1
set AU[JV]='I09G'
set BU[JV]='I09F'
set CU[JV]=0
set LU[JV]='I02E'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingAxe_02.blp"
set EV[JV]=35
set huanyingfu=JV
set JV=JV+1
set AU[JV]='I0MV'
set BU[JV]='I0MU'
set CU[JV]=0
set LU[JV]='I0MW'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingAxe_02.blp"
set EV[JV]=50
set huanyingfu2=JV
set JV=JV+1
set AU[JV]='I09I'
set BU[JV]='I09H'
set CU[JV]=0
set LU[JV]='I02F'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNLothars.BLP"
set EV[JV]=22
set luosazhifeng=JV
set JV=JV+1
set AU[JV]='I09K'
set BU[JV]='I09M'
set CU[JV]=0
set LU[JV]='I01G'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp"
set EV[JV]=40
set dagongzhishenli=JV
set JV=JV+1
set AU[JV]='I09J'
set BU[JV]='I09P'
set CU[JV]=0
set LU[JV]='I02G'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp"
set EV[JV]=36
set dagongzhishenli2=JV
set JV=JV+1
set AU[JV]='I09Q'
set BU[JV]='I09N'
set CU[JV]=0
set LU[JV]='I0DC'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp"
set EV[JV]=32
set dagongzhishenli3=JV
set JV=JV+1
set AU[JV]='I09S'
set BU[JV]='I09O'
set CU[JV]=0
set LU[JV]='I0DD'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp"
set EV[JV]=28
set dagongzhishenli4=JV
set JV=JV+1
set AU[JV]='I09R'
set BU[JV]='I09L'
set CU[JV]=0
set LU[JV]='I0D3'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp"
set EV[JV]=24
set dagongzhishenli5=JV
set JV=JV+1
set AU[JV]='I09U'
set BU[JV]='I09T'
set CU[JV]=0
set LU[JV]='I02H'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNNecromancerAdept.blp"
set EV[JV]=90
set silingshu=JV
set JV=JV+1
set AU[JV]='I09V'
set BU[JV]='I09X'
set CU[JV]=0
set LU[JV]='I02I'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBookOfTheDead.blp"
set EV[JV]=90
set silingshu2=JV
set JV=JV+1
set AU[JV]='I09W'
set BU[JV]='I09Y'
set CU[JV]=0
set LU[JV]='I02J'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNNecromancerMaster.blp"
set EV[JV]=90
set silingshu3=JV
set JV=JV+1
set AU[JV]='I0A0'
set BU[JV]='I09Z'
set CU[JV]=0
set LU[JV]='I0BO'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNOrb of Water.blp"
set EV[JV]=0
set linkenfaqiu=JV
set JV=JV+1
set AU[JV]='I0HK'
set BU[JV]='I0HJ'
set CU[JV]=0
set LU[JV]='I0HL'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNOrb of Water.blp"
set EV[JV]=0
set linkenfaqiu2=JV
set JV=JV+1
set AU[JV]='I0A2'
set BU[JV]='I0A1'
set CU[JV]=0
set LU[JV]='I0BP'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Sword_25.blp"
set EV[JV]=0
set J0=JV
set JV=JV+1
set AU[JV]='I0LI'
set BU[JV]='I0LJ'
set CU[JV]=0
set LU[JV]='I0LK'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Sword_25.blp"
set EV[JV]=0
set N0=JV
set JV=JV+1
set AU[JV]='I0A4'
set BU[JV]='I0A3'
set CU[JV]=0
set LU[JV]='I0BQ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Weapon_Crossbow_10.blp"
set EV[JV]=0
set dapao=JV
set JV=JV+1
set AU[JV]='I0A6'
set BU[JV]='I0A5'
set CU[JV]=0
set LU[JV]='I0BR'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Weapon_Halberd_10.blp"
set EV[JV]=0
set jingubang=JV
set JV=JV+1
set AU[JV]='I0K8'
set BU[JV]='I0K7'
set CU[JV]=0
set LU[JV]='I0K9'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Weapon_Halberd_10.blp"
set EV[JV]=0
set jingubang2=JV
set JV=JV+1
set AU[JV]='I0A7'
set BU[JV]='I0A8'
set CU[JV]=0
set LU[JV]='I0BS'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNTransmute.blp"
set EV[JV]=0
set huiyao=JV
set JV=JV+1
set AU[JV]='I0KQ'
set BU[JV]='I0KP'
set CU[JV]=0
set LU[JV]='I0KR'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNTransmute.blp"
set EV[JV]=0
set huiyao2=JV
set JV=JV+1
set AU[JV]='I0AA'
set BU[JV]='I0A9'
set CU[JV]=0
set LU[JV]='I0BT'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNHeartOfAszune.blp"
set EV[JV]=0
set molongzhixin=JV
set JV=JV+1
set AU[JV]='I0AA'
set BU[JV]='I0KL'
set LU[JV]='I0KM'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNHeartOfAszune.blp"
set EV[JV]=0
set molongzhixin2=JV
set JV=JV+1
set AU[JV]='I0AC'
set BU[JV]='I0AB'
set CU[JV]=0
set LU[JV]='I0BU'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNHornOfDoom.blp"
set EV[JV]=35
set sadanzhixieli=JV
set JV=JV+1
set AU[JV]='I0AD'
set BU[JV]='I0AE'
set CU[JV]=0
set LU[JV]='I0BV'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNIceShard.blp"
set EV[JV]=0
set sijiadizhiyan=JV
set JV=JV+1
set AU[JV]='I0AG'
set BU[JV]='I0AF'
set CU[JV]=0
set LU[JV]='I0CT'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNIceShard.blp"
set EV[JV]=0
set sijiadizhiyan2=JV
set JV=JV+1
set AU[JV]='I0AH'
set BU[JV]='I0AI'
set CU[JV]=0
set LU[JV]='I0BW'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingKnife_04.blp"
set EV[JV]=0
set hudie=JV
set JV=JV+1
set AU[JV]='I0B8'
set BU[JV]='I0AY'
set CU[JV]=0
set LU[JV]='I00B'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set Agha=JV
set JV=JV+1
set AU[JV]='I0AK'
set BU[JV]='I0AJ'
set CU[JV]=0
set LU[JV]='I0BX'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNHeartOfSearinox.blp"
set EV[JV]=210
set shuaxinqiu=JV
set JV=JV+1
set AU[JV]='I07K'
set BU[JV]='I0AL'
set CU[JV]=0
set LU[JV]='I0BY'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Sword_09.blp"
set EV[JV]=35
set xieeliandao=JV
set JV=JV+1
set AU[JV]='I0BB'
set BU[JV]='I0BA'
set CU[JV]=0
set LU[JV]='I0BZ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNAdvancedUnholyArmor.blp"
set EV[JV]=0
set xianfengdun=JV
set JV=JV+1
set AU[JV]='I0LE'
set BU[JV]='I0LC'
set CU[JV]=0
set LU[JV]='I0LD'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNAdvancedUnholyArmor.blp"
set EV[JV]=0
set xianfengdun2=JV
set JV=JV+1
set AU[JV]='I0BC'
set BU[JV]='I0BD'
set CU[JV]=0
set LU[JV]='I00C'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNArcaneRing.blp"
set EV[JV]=33
set W5=JV
set JV=JV+1
set AU[JV]='I0BF'
set BU[JV]='I0BE'
set CU[JV]=0
set LU[JV]='I0C0'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNThunderMallet.blp"
set EV[JV]=35
set leishenzhichui=JV
set JV=JV+1
set AU[JV]='I014'
set BU[JV]='I01D'
set CU[JV]=0
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRavenForm.blp"
set EV[JV]=0
set B5=JV
set JV=JV+1
set AU[JV]='I0BH'
set BU[JV]='I0BG'
set CU[JV]=0
set LU[JV]='I0C1'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNCloakOfFlames.blp"
set EV[JV]=0
set jipin=JV
set JV=JV+1
set AU[JV]='I0BI'
set BU[JV]='I0BJ'
set CU[JV]=0
set LU[JV]='I0C2'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Chain_14.blp"
set EV[JV]=0
set qiangxizhuangjia=JV
set JV=JV+1
set AU[JV]='I0BL'
set BU[JV]='I0BK'
set CU[JV]=0
set LU[JV]='I0C3'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Misc_Gem_Bloodstone_02.blp"
set EV[JV]=300
set xuejingshi=JV
set JV=JV+1
set AU[JV]='I0BN'
set BU[JV]='I0BM'
set CU[JV]=0
set LU[JV]='I0C4'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNHoodOfCunning.blp"
set EV[JV]=0
set tiaozhantoujin=JV
set JV=JV+1
set AU[JV]='I00S'
set BU[JV]='I00M'
set CU[JV]=0
set LU[JV]='I01C'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNImprovedUnholyStrength.blp"
set EV[JV]=0
set bizhang=JV
set JV=JV+1
set AU[JV]='I00T'
set BU[JV]='I00Q'
set CU[JV]=0
set LU[JV]='I01E'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNUnholyStrength.blp"
set EV[JV]=0
set bizhang2=JV
set JV=JV+1
set AU[JV]='I00V'
set BU[JV]='I00N'
set CU[JV]=0
set LU[JV]='I01F'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNImprovedUnholyStrength.blp"
set EV[JV]=0
set bizhang3=JV
set JV=JV+1
set AU[JV]='I00W'
set BU[JV]='I00R'
set CU[JV]=0
set LU[JV]='I0DE'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNUnholyStrength.blp"
set EV[JV]=0
set bizhang4=JV
set JV=JV+1
set AU[JV]='I00X'
set BU[JV]='I00Z'
set CU[JV]=0
set LU[JV]='I0CF'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNAdvancedMoonArmor.blp"
set EV[JV]=30
set xiwadeshouhu=JV
set JV=JV+1
set AU[JV]='I00Y'
set BU[JV]='I010'
set CU[JV]=0
set LU[JV]='I0DF'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNAdvancedMoonArmor.blp"
set EV[JV]=0
set xiwadshouhu2=JV
set JV=JV+1
set AU[JV]='I013'
set BU[JV]='I012'
set CU[JV]=0
set LU[JV]='I0CB'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNStaffOfSilence.blp"
set EV[JV]=18
set ziyuan=JV
set JV=JV+1
set AU[JV]='I0GK'
set BU[JV]='I0GJ'
set CU[JV]=0
set LU[JV]='I0GL'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNPhaseBoots.blp"
set EV[JV]=8
set xiangweixie=JV
set JV=JV+1
set AU[JV]='I0HG'
set BU[JV]='I0HI'
set CU[JV]=0
set LU[JV]='I0HH'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNForceStaff.blp"
set EV[JV]=25
set yuanlifazhang=JV
set JV=JV+1
set AU[JV]='I0I0'
set BU[JV]='I0K6'
set CU[JV]=0
set LU[JV]='I0I2'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNPipeOfInsight.blp"
set EV[JV]=25
set dongchayandou=JV
set JV=JV+1
set AU[JV]='I0JG'
set BU[JV]='I0JF'
set CU[JV]=0
set LU[JV]='I0JH'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNImprovedUnholyArmor.blp"
set EV[JV]=12
set qiongguidun=JV
set JV=JV+1
set AU[JV]='I0KD'
set BU[JV]='I0KF'
set CU[JV]=0
set LU[JV]='I0KE'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNImprovedUnholyArmor.blp"
set EV[JV]=12
set qiongguidun2=JV
set JV=JV+1
set AU[JV]='I0KX'
set BU[JV]='I0KY'
set CU[JV]=0
set LU[JV]='I0KZ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNUrnOfKelThuzad.blp"
set EV[JV]=8
set yingzhilingkan=JV
set JV=JV+1
set AU[JV]='I0LG'
set BU[JV]='I0LF'
set CU[JV]=0
set LU[JV]='I0LH'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNUrnOfKelThuzad.blp"
set EV[JV]=0
set yingzhilingkan2=JV
set JV=JV+1
set AU[JV]='I0LP'
set BU[JV]='I0LL'
set CU[JV]=0
set LU[JV]='I0LQ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSoulRing.blp"
set EV[JV]=30
set linghunzhijie=JV
set JV=JV+1
set AU[JV]='I0LR'
set BU[JV]='I0LT'
set CU[JV]=0
set LU[JV]='I0LS'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNGhostBlade.blp"
set EV[JV]=30
set xulingzhiren=JV
set JV=JV+1
set AU[JV]='I0MJ'
set BU[JV]='I0MI'
set CU[JV]=0
set LU[JV]='I0MK'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNArcaneBoots.blp"
set EV[JV]=45
set mifaxie=JV
set JV=JV+1
set AU[JV]='I0N1'
set BU[JV]='I0N0'
set CU[JV]=0
set LU[JV]='I0N2'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNMedalionOfCourage.blp"
set EV[JV]=7
set yongqixunzhang=JV
set JV=JV+1
set AU[JV]='I0ND'
set BU[JV]='I0NE'
set CU[JV]=0
set LU[JV]='I0NC'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNJanggo.blp"
set EV[JV]=30
set zhangu=JV
set JV=JV+1
set AU[JV]='I0NL'
set BU[JV]='I0NK'
set CU[JV]=0
set LU[JV]='I0NM'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNJanggo.blp"
set EV[JV]=0
set zhangu2=JV
set JV=JV+1
set AU[JV]='I0O2'
set BU[JV]='I0O3'
set CU[JV]=0
set LU[JV]='I0O4'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBoneChimes.blp"
set EV[JV]=30
set fenzhengmiansha=JV
set JV=JV+1
set AU[JV]='I0OC'
set BU[JV]='I0OE'
set CU[JV]=0
set LU[JV]='I0OD'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBoneChimes.blp"
set EV[JV]=30
set fenzhengmiansha2=JV
set JV=JV+1
set AU[JV]='I0OF'
set BU[JV]='I0OG'
set CU[JV]=0
set LU[JV]='I0OH'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNTranquilBoots.blp"
set EV[JV]=30
set jingmizhixie=JV
set JV=JV+1
set AU[JV]='I0OJ'
set BU[JV]='I0OI'
set CU[JV]=0
set LU[JV]='I0OK'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNTranquilBoots.blp"
set EV[JV]=30
set jingmizhixie2=JV
set JV=JV+1
set AU[JV]='I0OM'
set BU[JV]='I0OL'
set CU[JV]=0
set LU[JV]='I0ON'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNWitchDoctorMaster.blp"
set EV[JV]=16
set atuosizhigun=JV
set JV=JV+1
set AU[JV]='I0OP'
set BU[JV]='I0OO'
set CU[JV]=0
set LU[JV]='I0OQ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNPendantOfMana.blp"
set EV[JV]=20
set NA=JV
set JV=JV+1
set AU[JV]='I0OU'
set BU[JV]='I0OV'
set CU[JV]=0
set LU[JV]='I0OW'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNHalberd.blp"
set EV[JV]=30
set tiantangzhiji=JV
set JV=JV+1
set AU[JV]='I0OY'
set BU[JV]='I0OX'
set CU[JV]=0
set LU[JV]='I0OZ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNAnnihilator.blp"
set EV[JV]=60
set shenyuanzhiren=JV
set JV=JV+1
set AU[JV]='I0P0'
set BU[JV]='I0P1'
set CU[JV]=0
set LU[JV]='I0P2'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRingJadeFalcon.blp"
set EV[JV]=0
set tianyingzhijie=JV
set JV=JV+1
set AU[JV]='I0P3'
set BU[JV]='I0P4'
set CU[JV]=0
set LU[JV]='I0P5'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRingJadeFalcon.blp"
set EV[JV]=0
set tianyingzhijie2=JV
set JV=JV+1
set AU[JV]='PBMM'
set BU[JV]='PBMN'
set CU[JV]=0
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNScrollUber.blp"
set EV[JV]=0
set QB=JV
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h02G'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h086'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]='I05L'
set BU[JV]='I05R'
set CU[JV]='h02H'
set LU[JV]='I0DS'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DH4=JV
set JV=JV+1
set AU[JV]='I05M'
set BU[JV]='I05S'
set CU[JV]='h02I'
set LU[JV]='I0DT'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DI4=JV
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h02J'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]='I05O'
set BU[JV]='I05T'
set CU[JV]='h02K'
set LU[JV]='I0DU'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DJ4=JV
set JV=JV+1
set CU[JV]='h014'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DK4=JV
set JV=JV+1
set AU[JV]='I05P'
set BU[JV]='I05U'
set CU[JV]='h02L'
set LU[JV]='I0DW'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DM4=JV
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h02M'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]='I05K'
set BU[JV]='I05V'
set CU[JV]='h02N'
set LU[JV]='I0DX'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DN4=JV
set JV=JV+1
set AU[JV]='I05N'
set BU[JV]='I05W'
set CU[JV]='h02O'
set LU[JV]='I0DY'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DO4=JV
set JV=JV+1
set AU[JV]='I05Q'
set BU[JV]='I05X'
set CU[JV]='h02P'
set LU[JV]='I0DZ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DP4=JV
set JV=JV+1
set AU[JV]='I06N'
set BU[JV]='I06O'
set CU[JV]='h02Q'
set LU[JV]='I0E0'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DQ4=JV
set JV=JV+1
set AU[JV]='I06Q'
set BU[JV]='I06P'
set CU[JV]='h02R'
set LU[JV]='I0E1'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DR4=JV
set JV=JV+1
set AU[JV]='I06R'
set BU[JV]='I06S'
set CU[JV]='h02S'
set LU[JV]='I0E2'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DS4=JV
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h02T'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]='I06W'
set BU[JV]='I06V'
set CU[JV]='h02U'
set LU[JV]='I0E4'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DT4=JV
set JV=JV+1
set AU[JV]='I06X'
set BU[JV]='I06Y'
set CU[JV]='h02V'
set LU[JV]='I0E5'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DU4=JV
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h02W'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]='I070'
set BU[JV]='I06Z'
set CU[JV]='h02X'
set LU[JV]='I0E6'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DV4=JV
set JV=JV+1
set AU[JV]='I071'
set BU[JV]='I072'
set CU[JV]='h02Y'
set LU[JV]='I0E7'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DW4=JV
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h02Z'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]='I074'
set BU[JV]='I073'
set CU[JV]='h030'
set LU[JV]='I0E8'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DX4=JV
set JV=JV+1
set CU[JV]='h031'
set DV[JV]=""
set EV[JV]=0
set DY4=JV
set JV=JV+1
set AU[JV]='I076'
set BU[JV]='I07V'
set CU[JV]='h032'
set LU[JV]='I0EA'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DZ4=JV
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h033'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]='I077'
set BU[JV]='I07W'
set CU[JV]='h034'
set LU[JV]='I0EB'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DA4=JV
set JV=JV+1
set AU[JV]='I078'
set BU[JV]='I07X'
set CU[JV]='h035'
set LU[JV]='I0EC'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DB4=JV
set JV=JV+1
set AU[JV]='I079'
set BU[JV]='I07Y'
set CU[JV]='h036'
set LU[JV]='I0ED'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DC4=JV
set JV=JV+1
set AU[JV]='I07A'
set BU[JV]='I07Z'
set CU[JV]=0
set LU[JV]='I0EE'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set D34=JV
set JV=JV+1
set AU[JV]='I07B'
set BU[JV]='I080'
set CU[JV]='h038'
set LU[JV]='I0EF'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set D64=JV
set JV=JV+1
set AU[JV]='I07C'
set BU[JV]='I081'
set CU[JV]='h039'
set LU[JV]='I0EG'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set DL4=JV
set JV=JV+1
set AU[JV]='I07D'
set BU[JV]='I082'
set CU[JV]='h03A'
set LU[JV]='I0EH'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set D04=JV
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h03C'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]='I07E'
set BU[JV]='I083'
set CU[JV]='h03D'
set LU[JV]='I0EI'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set D54=JV
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h03E'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]='I07G'
set BU[JV]='I07F'
set CU[JV]='h03F'
set LU[JV]='I0EJ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set D24=JV
set JV=JV+1
set AU[JV]='I07H'
set BU[JV]='I084'
set CU[JV]='h03G'
set LU[JV]='I0EK'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set D_4=JV
set JV=JV+1
set AU[JV]='I07O'
set BU[JV]='I085'
set CU[JV]='h03H'
set LU[JV]='I0EL'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set E44=JV
set JV=JV+1
set CU[JV]='h03J'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set E74=JV
set JV=JV+1
set AU[JV]='I07J'
set BU[JV]='I088'
set CU[JV]='h03L'
set LU[JV]='I0EO'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set E84=JV
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h03M'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h03N'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]='I07M'
set BU[JV]='I089'
set CU[JV]='h03O'
set LU[JV]='I0EP'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set E94=JV
set JV=JV+1
set AU[JV]='I07P'
set BU[JV]='I08A'
set CU[JV]='h03Q'
set LU[JV]='I0EQ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set ED4=JV
set JV=JV+1
set AU[JV]='I07Q'
set BU[JV]='I08B'
set CU[JV]='h03R'
set LU[JV]='I0ER'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set EE4=JV
set JV=JV+1
set AU[JV]='I07R'
set BU[JV]='I08C'
set CU[JV]='h03S'
set LU[JV]='I0ES'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set EF4=JV
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h03T'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h03U'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]='I07S'
set BU[JV]='I08D'
set CU[JV]='h03V'
set LU[JV]='I0ET'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set EG4=JV
set JV=JV+1
set AU[JV]='I07T'
set BU[JV]='I08E'
set CU[JV]='h03W'
set LU[JV]='I0EU'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set EH4=JV
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h079'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]='I0H8'
set BU[JV]='I0H7'
set CU[JV]='h07S'
set LU[JV]='I0H9'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set EI4=JV
set JV=JV+1
set AU[JV]='I0HD'
set BU[JV]='I0HF'
set CU[JV]='h07T'
set LU[JV]='I0HE'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set EJ4=JV
set JV=JV+1
set AU[JV]='I0PD'
set BU[JV]='I0PE'
set CU[JV]=0
set LU[JV]='I0PF'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set EA4=JV
set JV=JV+1
set AU[JV]='I0HX'
set BU[JV]='I0HZ'
set CU[JV]='h07X'
set LU[JV]='I0HY'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set EK4=JV
set JV=JV+1
set AU[JV]='I07L'
set BU[JV]='I0KN'
set CU[JV]='h03P'
set LU[JV]='I0KO'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set EM4=JV
set JV=JV+1
set AU[JV]='I0KW'
set BU[JV]='I0KV'
set CU[JV]='h0BA'
set LU[JV]='I0KU'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set EN4=JV
set JV=JV+1
set AU[JV]='I0LM'
set BU[JV]='I0LN'
set CU[JV]='h0BQ'
set LU[JV]='I0LO'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set EO4=JV
set JV=JV+1
set AU[JV]='I0N9'
set BU[JV]='I0NA'
set CU[JV]='h0D1'
set LU[JV]='I0NB'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set EU4=JV
set JV=JV+1
set AU[JV]='I0NH'
set BU[JV]='I0NI'
set CU[JV]='h0CY'
set LU[JV]='I0NJ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set EV4=JV
set JV=JV+1
set AU[JV]='I0O5'
set BU[JV]='I0O6'
set CU[JV]='h0DD'
set LU[JV]='I0O7'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set EW4=JV
set JV=JV+1
set AU[JV]='I0OB'
set BU[JV]='I0OA'
set CU[JV]='h03X'
set LU[JV]='I0O9'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
set EV[JV]=0
set EX4=JV
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h0DT'
set DV[JV]=""
set EV[JV]=0
set EY4=JV
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h0DU'
set DV[JV]=""
set EV[JV]=0
set EZ4=JV
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h0E9'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h0EA'
set DV[JV]=""
set EV[JV]=0
set JV=JV+1
set AU[JV]=0
set BU[JV]=0
set CU[JV]='h0EC'
set DV[JV]=""
set EV[JV]=0
set t=CreateTrigger()
call TriggerAddCondition(t,Condition(function BM9))
set HS4=t
set t=null
set E54=E54+1
set EC4[E54]=zhiliaozhihuan
set E34[E54]=xuwubaoshi
set E04[E54]=jianrenqiu
set E54=E54+1
set EC4[E54]=huifujiezhi
set E34[E54]=tieshuzhigan
set E64[E54]=DH4
set E04[E54]=huifutoujin
set E54=E54+1
set EC4[E54]=suozijia
set E34[E54]=tieshuzhigan
set E64[E54]=DI4
set E04[E54]=xuanmingdunpai
set E54=E54+1
set EC4[E54]=shouhuzhihuan
set E34[E54]=yirenmianzhao
set E04[E54]=shengdianzhihuan
set E54=E54+1
set EC4[E54]=suduzhixue
set E34[E54]=DJ4
set E04[E54]=yuanxingxie
set E54=E54+1
set EC4[E54]=suduzhixue
set E34[E54]=jinglingpixue
set E64[E54]=jiasushoutao
set E04[E54]=donglixie1
set E54=E54+1
set EC4[E54]=suduzhixue
set E34[E54]=jurenliliangyaodai
set E64[E54]=jiasushoutao
set E04[E54]=donglixie2
set E54=E54+1
set EC4[E54]=suduzhixue
set E34[E54]=fashichangpao
set E64[E54]=jiasushoutao
set E04[E54]=donglixie3
set E54=E54+1
set EC4[E54]=jiasushoutao
set E34[E54]=DM4
set E04[E54]=maidasizhishou
set E54=E54+1
set EC4[E54]=duangun
set E34[E54]=fashichangpao
set E64[E54]=yirenmianzhao
set E04[E54]=kongmingzhang
set E54=E54+1
set EC4[E54]=guizuyuanhuan
set E34[E54]=liliangshoutao
set E64[E54]=DN4
set E04[E54]=huwan
set E54=E54+1
set EC4[E54]=guizuyuanhuan
set E34[E54]=minjiebianxie
set E64[E54]=DO4
set E04[E54]=youlingxidai
set E54=E54+1
set EC4[E54]=guizuyuanhuan
set E34[E54]=zhilidoupeng
set E64[E54]=DP4
set E04[E54]=wuyongguajian
set E54=E54+1
set EC4[E54]=huanxinzhiren
set E34[E54]=jinglingpixue
set E64[E54]=DQ4
set E04[E54]=yecha
set E54=E54+1
set EC4[E54]=shirenmozhifu
set E34[E54]=jurenliliangyaodai
set E64[E54]=DR4
set E04[E54]=sanhua
set E54=E54+1
set EC4[E54]=biaoqiang
set E34[E54]=jurenliliangyaodai
set E64[E54]=DS4
set E04[E54]=suiguchui
set E54=E54+1
set EC4[E54]=kuojian
set E34[E54]=suozijia
set E64[E54]=fashichangpao
set E04[E54]=renjia
set E54=E54+1
set EC4[E54]=miyinchui
set E34[E54]=jiasushoutao
set E64[E54]=DT4
set E04[E54]=xuanwo
set E54=E54+1
set EC4[E54]=huanxinzhiren
set E34[E54]=huanxinzhiren
set E64[E54]=fashichangpao
set EL4[E54]=DU4
set E04[E54]=sanshizhiren
set E54=E54+1
set EC4[E54]=sanshizhiren
set E34[E54]=DU4
set E04[E54]=sanshizhiren2
set E54=E54+1
set EC4[E54]=sanshizhiren3
set E34[E54]=DU4
set E04[E54]=sanshizhiren2
set E54=E54+1
set EC4[E54]=tieyitoukui
set E34[E54]=siwangmianju
set E04[E54]=zhipeitoukui
set E54=E54+1
set EC4[E54]=siwangmianju
set E34[E54]=DV4
set E04[E54]=fengkuangmianju
set E54=E54+1
set EC4[E54]=xuwubaoshi
set E34[E54]=molifazhang
set E64[E54]=yirenmianzhao
set EL4[E54]=DW4
set E04[E54]=euldeshenshengfazhang
set E54=E54+1
set EC4[E54]=jingqizhiqiu
set E34[E54]=nengliangzhiqiu
set E64[E54]=huolizhiqiu
set E04[E54]=zhenhunshi
set E54=E54+1
set EC4[E54]=huifutoujin
set E34[E54]=xuanmingdunpai
set E64[E54]=DX4
set E04[E54]=meikensimu
set E54=E54+1
set EC4[E54]=sanhua
set E34[E54]=yecha
set E04[E54]=sanyeduijian
set E54=E54+1
set EC4[E54]=miyinchui
set E34[E54]=miyinchui
set E64[E54]=DZ4
set E04[E54]=anmie
set E54=E54+1
set EC4[E54]=jianrenqiu
set E34[E54]=kuojian
set E64[E54]=dajian
set E04[E54]=kuangzhanfu
set E54=E54+1
set EC4[E54]=gongjizhizhao
set E34[E54]=kuojian
set E64[E54]=DA4
set E04[E54]=shuijingjian
set E54=E54+1
set EC4[E54]=miyinchui
set E34[E54]=shirenmozhifu
set E64[E54]=DB4
set E04[E54]=heihuangzhang
set E54=E54+1
set EC4[E54]=yecha
set E34[E54]=jixianfaqiu
set E64[E54]=DC4
set E04[E54]=huanyingfu2
set E54=E54+1
set EC4[E54]=dajian
set E34[E54]=OC
set E04[E54]=luosazhifeng
set E54=E54+1
set EC4[E54]=molifazhang
set E34[E54]=wuyongguajian
set E64[E54]=D64
set E04[E54]=dagongzhishenli
set E54=E54+1
set EC4[E54]=dagongzhishenli
set E34[E54]=D64
set E04[E54]=dagongzhishenli2
set E54=E54+1
set EC4[E54]=dagongzhishenli2
set E34[E54]=D64
set E04[E54]=dagongzhishenli3
set E54=E54+1
set EC4[E54]=dagongzhishenli3
set E34[E54]=D64
set E04[E54]=dagongzhishenli4
set E54=E54+1
set EC4[E54]=dagongzhishenli4
set E34[E54]=D64
set E04[E54]=dagongzhishenli5
set E54=E54+1
set EC4[E54]=molifazhang
set E34[E54]=jurenliliangyaodai
set E64[E54]=DL4
set E04[E54]=silingshu
set E54=E54+1
set EC4[E54]=silingshu
set E34[E54]=DL4
set E04[E54]=silingshu2
set E54=E54+1
set EC4[E54]=silingshu2
set E34[E54]=DL4
set E04[E54]=silingshu3
set E54=E54+1
set EC4[E54]=jixianfaqiu
set E34[E54]=jianrenqiu
set E64[E54]=D04
set E04[E54]=linkenfaqiu
set E54=E54+1
set EC4[E54]=emodaofeng
set E34[E54]=shengzheyiwu
set E04[E54]=J0
set E54=E54+1
set EC4[E54]=shuijingjian
set E34[E54]=emodaofeng
set E64[E54]=D54
set E04[E54]=dapao
set E54=E54+1
set EC4[E54]=emodaofeng
set E34[E54]=biaoqiang
set E64[E54]=biaoqiang
set E04[E54]=jingubang
set E54=E54+1
set EC4[E54]=shengzheyiwu
set E34[E54]=D24
set E04[E54]=huiyao
set E54=E54+1
set EC4[E54]=ximeisitedelveduo
set E34[E54]=huolizhiqiu
set E64[E54]=D_4
set E04[E54]=molongzhixin
set E54=E54+1
set EC4[E54]=ximeisitedelveduo
set E34[E54]=zhipeitoukui
set E64[E54]=E44
set E04[E54]=sadanzhixieli
set E54=E54+1
set EC4[E54]=ximeisitedelveduo
set E34[E54]=zhipeitoukui2
set E64[E54]=E44
set E04[E54]=sadanzhixieli
set E54=E54+1
set EC4[E54]=jixianfaqiu
set E34[E54]=jixianfaqiu
set E64[E54]=jingqizhiqiu
set EL4[E54]=zuduzhiqiu
set E04[E54]=sijiadizhiyan
set E54=E54+1
set EC4[E54]=jixianfaqiu
set E34[E54]=jixianfaqiu
set E64[E54]=jingqizhiqiu
set EL4[E54]=ES4
set E04[E54]=sijiadizhiyan
set E54=E54+1
set EC4[E54]=yingjiaogong
set E34[E54]=duangun
set E64[E54]=shanbihufu
set E04[E54]=hudie
set E54=E54+1
set EC4[E54]=yirenmianzhao
set E34[E54]=suozijia
set E64[E54]=EV4
set E04[E54]=yongqixunzhang
set E54=E54+1
set EC4[E54]=huanxinzhiren
set E34[E54]=shirenmozhifu
set E64[E54]=jingqizhiqiu
set EL4[E54]=molifazhang
set E04[E54]=Agha
set E54=E54+1
set EC4[E54]=jianrenqiu
set E34[E54]=kongmingzhang
set E64[E54]=E84
set E04[E54]=shuaxinqiu
set E54=E54+1
set EC4[E54]=jixianfaqiu
set E34[E54]=shenmifazhang
set E64[E54]=xuwubaoshi
set E04[E54]=xieeliandao
set E54=E54+1
set EC4[E54]=huolizhiqiu
set E34[E54]=zhiliaozhihuan
set E64[E54]=yuandun
set E04[E54]=xianfengdun
set E54=E54+1
set EC4[E54]=huolizhiqiu
set E34[E54]=zhiliaozhihuan
set E64[E54]=yuandun2
set E04[E54]=xianfengdun
set E54=E54+1
set EC4[E54]=nengliangzhiqiu
set E34[E54]=shouhuzhihuan
set E64[E54]=E94
set E04[E54]=W5
set E54=E54+1
set EC4[E54]=zhenfenbaoshi
set E34[E54]=xuanwo
set E64[E54]=EM4
set E04[E54]=leishenzhichui
set E54=E54+1
set EC4[E54]=RB
set E64[E54]=ED4
set E04[E54]=B5
set E54=E54+1
set EC4[E54]=huifujiezhi
set E34[E54]=shengdianzhihuan
set E64[E54]=siwangmianju
set EL4[E54]=EE4
set E04[E54]=jipin
set E54=E54+1
set EC4[E54]=huifujiezhi
set E34[E54]=shengdianzhihuan2
set E64[E54]=siwangmianju
set EL4[E54]=EE4
set E04[E54]=jipin
set E54=E54+1
set EC4[E54]=zhenfenbaoshi
set E34[E54]=suozijia
set E64[E54]=banjia
set EL4[E54]=EF4
set E04[E54]=qiangxizhuangjia
set E54=E54+1
set EC4[E54]=zhenhunshi
set E34[E54]=jianrenqiu
set E04[E54]=xuejingshi
set E54=E54+1
set EC4[E54]=huifujiezhi
set E34[E54]=huifujiezhi
set E64[E54]=zhiliaozhihuan
set EL4[E54]=liulangfashidoupeng
set E04[E54]=tiaozhantoujin
set E54=E54+1
set EC4[E54]=jiasushoutao
set E34[E54]=tieyitoukui
set E64[E54]=gongjizhizhao
set EL4[E54]=EG4
set E04[E54]=bizhang2
set E54=E54+1
set EC4[E54]=shenmifazhang
set E34[E54]=banjia
set E64[E54]=EH4
set E04[E54]=xiwadeshouhu
set E54=E54+1
set EC4[E54]=kongmingzhang
set E34[E54]=kongmingzhang
set E64[E54]=EX4
set E04[E54]=ziyuan
set E54=E54+1
set EC4[E54]=suduzhixue
set E34[E54]=gongjizhizhao
set E64[E54]=gongjizhizhao
set E04[E54]=xiangweixie
set E54=E54+1
set EC4[E54]=mobang
set E34[E54]=tieshuzhigan
set E64[E54]=tieshuzhigan
set EL4[E54]=tieshuzhigan
set E14[E54]=EI4
set E04[E54]=mozhang
set E54=E54+1
set EC4[E54]=molifazhang
set E34[E54]=huifujiezhi
set E64[E54]=EJ4
set E04[E54]=yuanlifazhang
set E54=E54+1
set EC4[E54]=tiaozhantoujin
set E34[E54]=huifutoujin
set E64[E54]=EK4
set E04[E54]=dongchayandou
set E54=E54+1
set EC4[E54]=yuandun
set E34[E54]=minjiebianxie
set E64[E54]=minjiebianxie
set E04[E54]=qiongguidun
set E54=E54+1
set EC4[E54]=yuandun2
set E34[E54]=minjiebianxie
set E64[E54]=minjiebianxie
set E04[E54]=qiongguidun
set E54=E54+1
set EC4[E54]=yirenmianzhao
set E34[E54]=liliangshoutao
set E64[E54]=liliangshoutao
set EL4[E54]=EN4
set E04[E54]=yingzhilingkan
set E54=E54+1
set EC4[E54]=yirenmianzhao
set E34[E54]=huifujiezhi
set E64[E54]=EO4
set E04[E54]=linghunzhijie
set E54=E54+1
set EC4[E54]=yingjiaogong
set E34[E54]=youhunquanzhang
set E04[E54]=xulingzhiren
set E54=E54+1
set EC4[E54]=suduzhixue
set E34[E54]=nengliangzhiqiu
set E04[E54]=mifaxie
set E54=E54+1
set EC4[E54]=fashichangpao
set E34[E54]=huwan
set E64[E54]=EU4
set E04[E54]=zhangu
set E54=E54+1
set EC4[E54]=zhangu
set E34[E54]=EU4
set E04[E54]=zhangu
set E54=E54+1
set EC4[E54]=zhangu2
set E34[E54]=EU4
set E04[E54]=zhangu
set E54=E54+1
set EC4[E54]=tieyitoukui
set E34[E54]=wuyongguajian
set E64[E54]=EW4
set E04[E54]=fenzhengmiansha
set E54=E54+1
set EC4[E54]=suduzhixue
set E34[E54]=shouhuzhihuan
set E64[E54]=huifujiezhi
set E04[E54]=jingmizhixie
set E54=E54+1
set EC4[E54]=molifazhang
set E34[E54]=molifazhang
set E64[E54]=huolizhiqiu
set E04[E54]=atuosizhigun
set E54=E54+1
set EC4[E54]=sanhua
set E34[E54]=shanbihufu
set E04[E54]=tiantangzhiji
set E54=E54+1
set EC4[E54]=suiguchui
set E34[E54]=shengzheyiwu
set E04[E54]=shenyuanzhiren
set E54=E54+1
set EC4[E54]=youlingxidai
set E34[E54]=shengdianzhihuan
set E04[E54]=tianyingzhijie
set E54=E54+1
set EC4[E54]=youlingxidai
set E34[E54]=shengdianzhihuan2
set E04[E54]=tianyingzhijie2
set JV=JV+1
set AU[JV]='I0AZ'
set BU[JV]='I011'
set CU[JV]=0
set LU[JV]='I0EY'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set E_4=JV
set JV=JV+1
set AU[JV]='I00F'
set BU[JV]='I00D'
set CU[JV]=0
set LU[JV]='I0EZ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set F44=JV
set JV=JV+1
set AU[JV]='I018'
set BU[JV]='I009'
set CU[JV]=0
set LU[JV]='I0F0'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set F74=JV
set JV=JV+1
set AU[JV]='I019'
set BU[JV]='I005'
set CU[JV]=0
set LU[JV]='I0F6'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set F84=JV
set JV=JV+1
set AU[JV]='I01A'
set BU[JV]='I00G'
set CU[JV]=0
set LU[JV]='I0F1'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set F94=JV
set JV=JV+1
set AU[JV]='I01B'
set BU[JV]='I004'
set CU[JV]=0
set LU[JV]='I0F2'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FD4=JV
set JV=JV+1
set AU[JV]='I01H'
set BU[JV]='I003'
set CU[JV]=0
set LU[JV]='I0F3'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FE4=JV
set JV=JV+1
set AU[JV]='I01I'
set BU[JV]='I002'
set CU[JV]=0
set LU[JV]='I0F5'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FF4=JV
set JV=JV+1
set AU[JV]='I02K'
set BU[JV]='I001'
set CU[JV]=0
set LU[JV]='I0F4'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FG4=JV
set JV=JV+1
set AU[JV]='I02L'
set BU[JV]='I00I'
set CU[JV]=0
set LU[JV]='I0FE'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FH4=JV
set JV=JV+1
set AU[JV]='I0B2'
set BU[JV]='I00H'
set CU[JV]=0
set LU[JV]='I0F9'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FJ4=JV
set JV=JV+1
set AU[JV]='I0B3'
set BU[JV]='I00P'
set CU[JV]=0
set LU[JV]='I0FA'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FK4=JV
set JV=JV+1
set AU[JV]='I0B4'
set BU[JV]='I00U'
set CU[JV]=0
set LU[JV]='I0F7'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FM4=JV
set JV=JV+1
set AU[JV]='I0B7'
set BU[JV]='I000'
set CU[JV]=0
set LU[JV]='I0FD'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FN4=JV
set JV=JV+1
set AU[JV]='I0B6'
set BU[JV]='I016'
set CU[JV]=0
set LU[JV]='I0FC'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FO4=JV
set JV=JV+1
set AU[JV]='I0B5'
set BU[JV]='I017'
set CU[JV]=0
set LU[JV]='I0FB'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FP4=JV
set JV=JV+1
set AU[JV]='I0B9'
set BU[JV]='I00O'
set CU[JV]=0
set LU[JV]='I0F8'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FQ4=JV
set JV=JV+1
set AU[JV]='I0J5'
set BU[JV]='I0IT'
set CU[JV]=0
set LU[JV]='I0IJ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FR4=JV
set JV=JV+1
set AU[JV]='I0IV'
set BU[JV]='I0IU'
set CU[JV]=0
set LU[JV]='I0I9'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FS4=JV
set JV=JV+1
set AU[JV]='I0IW'
set BU[JV]='I0IS'
set CU[JV]=0
set LU[JV]='I0II'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FT4=JV
set JV=JV+1
set AU[JV]='I0IX'
set BU[JV]='I0IR'
set CU[JV]=0
set LU[JV]='I0IA'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FU4=JV
set JV=JV+1
set AU[JV]='I0IY'
set BU[JV]='I0IQ'
set CU[JV]=0
set LU[JV]='I0IH'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FV4=JV
set JV=JV+1
set AU[JV]='I0IZ'
set BU[JV]='I0IK'
set CU[JV]=0
set LU[JV]='I0IG'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FW4=JV
set JV=JV+1
set AU[JV]='I0J0'
set BU[JV]='I0IL'
set CU[JV]=0
set LU[JV]='I0IF'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FX4=JV
set JV=JV+1
set AU[JV]='I0J1'
set BU[JV]='I0IM'
set CU[JV]=0
set LU[JV]='I0IE'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FY4=JV
set JV=JV+1
set AU[JV]='I0J2'
set BU[JV]='I0IP'
set CU[JV]=0
set LU[JV]='I0ID'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FZ4=JV
set JV=JV+1
set AU[JV]='I0J3'
set BU[JV]='I0IO'
set CU[JV]=0
set LU[JV]='I0IC'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FA4=JV
set JV=JV+1
set AU[JV]='I0J4'
set BU[JV]='I0IN'
set CU[JV]=0
set LU[JV]='I0IB'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FB4=JV
set JV=JV+1
set AU[JV]='I0I6'
set BU[JV]='I0I7'
set CU[JV]=0
set LU[JV]='I0I8'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FC4=JV
set JV=JV+1
set AU[JV]='I0JZ'
set BU[JV]='I0JS'
set CU[JV]=0
set LU[JV]='I0JR'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set F34=JV
set JV=JV+1
set AU[JV]='I0K0'
set BU[JV]='I0JT'
set CU[JV]=0
set LU[JV]='I0JL'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set F64=JV
set JV=JV+1
set AU[JV]='I0K1'
set BU[JV]='I0JU'
set CU[JV]=0
set LU[JV]='I0JM'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FL4=JV
set JV=JV+1
set AU[JV]='I0K2'
set BU[JV]='I0JW'
set CU[JV]=0
set LU[JV]='I0JN'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set F14=JV
set JV=JV+1
set AU[JV]='I0K3'
set BU[JV]='I0JV'
set CU[JV]=0
set LU[JV]='I0JQ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set F04=JV
set JV=JV+1
set AU[JV]='I0K4'
set BU[JV]='I0JY'
set CU[JV]=0
set LU[JV]='I0JP'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set F54=JV
set JV=JV+1
set AU[JV]='I0K5'
set BU[JV]='I0JX'
set CU[JV]=0
set LU[JV]='I0JO'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set F24=JV
set JV=JV+1
set AU[JV]='I0KI'
set BU[JV]='I0KH'
set CU[JV]=0
set LU[JV]='I0KJ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set F_4=JV
set JV=JV+1
set AU[JV]='I0L4'
set BU[JV]='I0L5'
set CU[JV]=0
set LU[JV]='I0L8'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set FI4=JV
set JV=JV+1
set AU[JV]='I0L3'
set BU[JV]='I0L0'
set CU[JV]=0
set LU[JV]='I0L9'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set G44=JV
set JV=JV+1
set AU[JV]='I0L2'
set BU[JV]='I0L7'
set CU[JV]=0
set LU[JV]='I0LA'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set G74=JV
set JV=JV+1
set AU[JV]='I0LU'
set BU[JV]='I0LV'
set CU[JV]=0
set LU[JV]='I0LW'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set G84=JV
set JV=JV+1
set AU[JV]='I0M1'
set BU[JV]='I0M0'
set CU[JV]=0
set LU[JV]='I0M2'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set G94=JV
set JV=JV+1
set AU[JV]='I0M5'
set BU[JV]='I0M4'
set CU[JV]=0
set LU[JV]='I0M3'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set GD4=JV
set JV=JV+1
set AU[JV]='I0M6'
set BU[JV]='I0M7'
set CU[JV]=0
set LU[JV]='I0M8'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set GE4=JV
set JV=JV+1
set AU[JV]='I0MF'
set BU[JV]='I0MG'
set CU[JV]=0
set LU[JV]='I0MH'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set GG4=JV
set JV=JV+1
set AU[JV]='I0MM'
set BU[JV]='I0ML'
set CU[JV]=0
set LU[JV]='I0MN'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set GH4=JV
set JV=JV+1
set AU[JV]='I0MO'
set BU[JV]='I0MP'
set CU[JV]=0
set LU[JV]='I0MQ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set GI4=JV
set JV=JV+1
set AU[JV]='I0NQ'
set BU[JV]='I0NR'
set CU[JV]=0
set LU[JV]='I0NS'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set GJ4=JV
set JV=JV+1
set AU[JV]='I0NT'
set BU[JV]='I0NU'
set CU[JV]=0
set LU[JV]='I0NV'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set GK4=JV
set JV=JV+1
set AU[JV]='I0NW'
set BU[JV]='I0NX'
set CU[JV]=0
set LU[JV]='I0NY'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set GM4=JV
set JV=JV+1
set AU[JV]='I0NZ'
set BU[JV]='I0O0'
set CU[JV]=0
set LU[JV]='I0O1'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set GN4=JV
set JV=JV+1
set AU[JV]='I0OR'
set BU[JV]='I0OS'
set CU[JV]=0
set LU[JV]='I0OT'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set GO4=JV
set JV=JV+1
set AU[JV]='I0PG'
set BU[JV]='I0PH'
set CU[JV]=0
set LU[JV]='I0PI'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set GP4=JV
set JV=JV+1
set AU[JV]='I0PJ'
set BU[JV]='I0PK'
set CU[JV]=0
set LU[JV]='I0PL'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set GQ4=JV
set JV=JV+1
set AU[JV]='I0PP'
set BU[JV]='I0PQ'
set CU[JV]=0
set LU[JV]='I0PR'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set GR4=JV
set JV=JV+1
set AU[JV]='IZ00'
set BU[JV]='IZ01'
set CU[JV]=0
set LU[JV]='IZ02'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set Saar_Agha=JV
set JV=JV+1
set AU[JV]='IZ03'
set BU[JV]='IZ04'
set CU[JV]=0
set LU[JV]='IZ05'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=60
set Puzzle_Agha=JV
set JV=JV+1
set AU[JV]='IZ06'
set BU[JV]='IZ07'
set CU[JV]=0
set LU[JV]='IZ08'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=0
set Goblin_Agha=JV
set JV=JV+1
set AU[JV]='IZ09'
set BU[JV]='IZ0A'
set CU[JV]=0
set LU[JV]='IZ0B'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=0
set DragonHawk_Agha=JV
set JV=JV+1
set AU[JV]='IZ0C'
set BU[JV]='IZ0D'
set CU[JV]=0
set LU[JV]='IZ0E'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=0
set Medivh_Agha=JV
set JV=JV+1
set AU[JV]='IZ0H'
set BU[JV]='IZ0I'
set CU[JV]=0
set LU[JV]='IZ0J'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=0
set ShadowFiend_Agha=JV
set JV=JV+1
set AU[JV]='IZ0K'
set BU[JV]='IZ0L'
set CU[JV]=0
set LU[JV]='IZ0M'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=0
set JV=JV+1
set AU[JV]='IZ0F'
set BU[JV]='IZ0G'
set CU[JV]=0
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNAncientOfTheEarth.blp"
set EV[JV]=0
set EatTree_Share=JV
set JV=JV+1
set AU[JV]='I03A'
set BU[JV]='I051'
set CU[JV]='h08K'
set LU[JV]='I0D9'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSteelArmor.blp"
set EV[JV]=0
set FV[JV]=yuandun
set JV=JV+1
set AU[JV]='I03Y'
set BU[JV]='I052'
set CU[JV]='h08X'
set LU[JV]='I0C9'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNOrbofSlowness.blp"
set EV[JV]=0
set FV[JV]=jixianfaqiu
set JV=JV+1
set AU[JV]='I02S'
set BU[JV]='I02P'
set CU[JV]='h08S'
set LU[JV]='I0CA'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNGlove.blp"
set EV[JV]=0
set FV[JV]=jiasushoutao
set JV=JV+1
set AU[JV]='I02N'
set BU[JV]='I02R'
set CU[JV]='h08P'
set LU[JV]='I0CS'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBoots.blp"
set EV[JV]=0
set FV[JV]=jinglingpixue
set JV=JV+1
set AU[JV]='I02Z'
set BU[JV]='I043'
set CU[JV]='h08Q'
set LU[JV]='I0CV'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNBelt.blp"
set EV[JV]=0
set FV[JV]=jurenliliangyaodai
set JV=JV+1
set AU[JV]='I031'
set BU[JV]='I045'
set CU[JV]='h08T'
set LU[JV]='I0D5'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNClawsOfAttack.blp"
set EV[JV]=0
set FV[JV]=gongjizhizhao
set JV=JV+1
set AU[JV]='I03B'
set BU[JV]='I04E'
set CU[JV]='h08N'
set LU[JV]='I0DA'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNHelmutPurple.blp"
set EV[JV]=0
set FV[JV]=tieyitoukui
set JV=JV+1
set AU[JV]='I03E'
set BU[JV]='I04H'
set CU[JV]='h08W'
set LU[JV]='I0C7'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNDaggerOfEscape.blp"
set EV[JV]=14
set FV[JV]=keledebishou
set JV=JV+1
set AU[JV]='I03G'
set BU[JV]='I04K'
set CU[JV]='h08O'
set LU[JV]='I0CD'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNUndeadShrine.blp"
set EV[JV]=0
set FV[JV]=siwangmianju
set JV=JV+1
set AU[JV]='I03P'
set BU[JV]='I04S'
set CU[JV]='h08U'
set LU[JV]='I0CY'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNAlleriaFlute.blp"
set EV[JV]=0
set FV[JV]=duangun
set JV=JV+1
set AU[JV]='I03Q'
set BU[JV]='I04T'
set CU[JV]='h08G'
set LU[JV]='I0DI'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNGoldRing.blp"
set EV[JV]=0
set FV[JV]=zhiliaozhihuan
set JV=JV+1
set AU[JV]='I03S'
set BU[JV]='I04V'
set CU[JV]='h08L'
set LU[JV]='I0DJ'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRingSkull.blp"
set EV[JV]=0
set FV[JV]=huifujiezhi
set JV=JV+1
set AU[JV]='I03T'
set BU[JV]='I04W'
set CU[JV]='h08R'
set LU[JV]='I0CP'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNRobeOfTheMagi.blp"
set EV[JV]=0
set FV[JV]=fashichangpao
set JV=JV+1
set AU[JV]='I03V'
set BU[JV]='I04Y'
set CU[JV]='h08E'
set LU[JV]='I0C5'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSlippersOfAgility.blp"
set EV[JV]=0
set FV[JV]=minjiebianxie
set JV=JV+1
set AU[JV]='I03W'
set BU[JV]='I04Z'
set CU[JV]='h08J'
set LU[JV]='I0DK'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNSobiMask.blp"
set EV[JV]=0
set FV[JV]=yirenmianzhao
set JV=JV+1
set AU[JV]='I0GD'
set BU[JV]='I0GC'
set CU[JV]='h08I'
set LU[JV]='I0GE'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNWand.blp"
set EV[JV]=0
set FV[JV]=mobang
set JV=JV+1
set AU[JV]='I0HT'
set BU[JV]='I0HR'
set CU[JV]='h08F'
set LU[JV]='I0HW'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNOrcMeleeUpTwo.blp"
set EV[JV]=0
set FV[JV]=yazhizhiren
set JV=JV+1
set AU[JV]='I0J7'
set BU[JV]='I0J6'
set CU[JV]='h08V'
set LU[JV]='I0J8'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNAmulet.blp"
set EV[JV]=0
set FV[JV]=shanbihufu
set JV=JV+1
set AU[JV]='I03L'
set BU[JV]='I04P'
set CU[JV]='h08M'
set LU[JV]='I0CE'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Misc_Cape_08.blp"
set EV[JV]=0
set FV[JV]=liulangfashidoupeng
set JV=JV+1
set AU[JV]='I05A'
set BU[JV]='I05I'
set CU[JV]='h08H'
set LU[JV]=0
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNScrollUber.blp"
set EV[JV]=0
set FV[JV]=JB
set JV=JV+1
set AU[JV]='I037'
set BU[JV]='I04B'
set CU[JV]='h093'
set LU[JV]='I0CR'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNEnchantedGemstone.blp"
set EV[JV]=0
set FV[JV]=nengliangzhiqiu
set JV=JV+1
set AU[JV]='I02Q'
set BU[JV]='I02O'
set CU[JV]='h0BO'
set LU[JV]='I00A'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Misc_Cape_08.blp"
set EV[JV]=0
set FV[JV]=suduzhixue
set JV=JV+1
set AU[JV]='I0MA'
set BU[JV]='I0M9'
set CU[JV]='h0CN'
set LU[JV]='I0MB'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNOrbOfVenom.blp"
set EV[JV]=0
set FV[JV]=zuduzhiqiu
set JV=JV+1
set AU[JV]='I033'
set BU[JV]='I047'
set CU[JV]='h0D0'
set LU[JV]='I0D7'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNGlove.blp"
set EV[JV]=0
set FV[JV]=suozijia
set JV=JV+1
set AU[JV]='I501'
set BU[JV]='I500'
set CU[JV]=0
set LU[JV]='I502'
set DV[JV]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"
set EV[JV]=0
set UG7=JV
call E5()
set FY7=InitHashtable()
call CBH()
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_PAWN_ITEM)
call TriggerAddCondition(t,Condition(function ZKG))
set GW4=t
set t=null
call CCH()
call C3H()
call LHG()
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(t,Condition(function BS9))
set BH=t
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1.,true)
call TriggerAddCondition(t,Condition(function BQ9))
if MA4 then
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerAddCondition(t,Condition(function ZWG))
endif
set t=null
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function QCG))
set t=null
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddCondition(t,Condition(function ZZG))
set cH=t
set t=null
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(t,function ZK9)
call TriggerAddCondition(t,Condition(function ZG9))
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1.,true)
call TriggerAddCondition(t,Condition(function ZO9))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddAction(t,function V79)
call TriggerAddCondition(t,Condition(function U09))
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.33,true)
call TriggerAddCondition(t,Condition(function VX9))
set t=null
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.75,true)
call TriggerAddCondition(t,Condition(function VB9))
set t=null
call SetPlayerAbilityAvailable(G8[1],'A174',false)
call SetPlayerAbilityAvailable(G8[2],'A174',false)
call SetPlayerAbilityAvailable(G8[3],'A174',false)
call SetPlayerAbilityAvailable(G8[4],'A174',false)
call SetPlayerAbilityAvailable(G8[5],'A174',false)
call SetPlayerAbilityAvailable(N8[1],'A174',false)
call SetPlayerAbilityAvailable(N8[2],'A174',false)
call SetPlayerAbilityAvailable(N8[3],'A174',false)
call SetPlayerAbilityAvailable(N8[4],'A174',false)
call SetPlayerAbilityAvailable(N8[5],'A174',false)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function V39))
set t=null
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(t,Condition(function ZBG))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddCondition(t,Condition(function ZAG))
set t=null
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddCondition(t,Condition(function Z3G))
set t=null
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(t,Condition(function Z1G))
set t=null
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function ADG))
set t=null
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddAction(t,function BTG)
call SetAltMinimapIcon("war3mapImported\\black.blp")
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function L6G))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function EPH))
call SetPlayerAbilityAvailable(G8[1],'A1VV',false)
call SetPlayerAbilityAvailable(G8[2],'A1VV',false)
call SetPlayerAbilityAvailable(G8[3],'A1VV',false)
call SetPlayerAbilityAvailable(G8[4],'A1VV',false)
call SetPlayerAbilityAvailable(G8[5],'A1VV',false)
call SetPlayerAbilityAvailable(N8[1],'A1VV',false)
call SetPlayerAbilityAvailable(N8[2],'A1VV',false)
call SetPlayerAbilityAvailable(N8[3],'A1VV',false)
call SetPlayerAbilityAvailable(N8[4],'A1VV',false)
call SetPlayerAbilityAvailable(N8[5],'A1VV',false)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(t,Condition(function EQH))
set t=null
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(t,function X79)
call TriggerAddCondition(t,Condition(function X49))
call C5H()
set t=CreateTrigger()
call TriggerRegisterUnitInRange(t,FJ,300,Condition(function KF8))
call TriggerRegisterUnitInRange(t,lJ,300,Condition(function KF8))
call TriggerRegisterUnitInRange(t,DJ,300,Condition(function KF8))
call TriggerAddCondition(t,Condition(function X89))
set t=null
set GS=CreateTrigger()
call TriggerAddAction(GS,function X99)
set HS=CreateTrigger()
call TriggerAddAction(HS,function XD9)
set t=CreateTrigger()
set HZE=CreateRegion()
call RegionAddRect(HZE,Xr)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
set HZE=CreateRegion()
call RegionAddRect(HZE,Uo)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
set HZE=CreateRegion()
call RegionAddRect(HZE,bE)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
call TriggerAddCondition(t,Condition(function XE9))
set t=null
set HZE=null
set t=CreateTrigger()
set HZE=CreateRegion()
call RegionAddRect(HZE,zo)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
set HZE=CreateRegion()
call RegionAddRect(HZE,jo)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
set HZE=CreateRegion()
call RegionAddRect(HZE,XE)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
call TriggerAddCondition(t,Condition(function XF9))
set t=null
set HZE=null
set t=CreateTrigger()
set HZE=CreateRegion()
call RegionAddRect(HZE,Er)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
set HZE=CreateRegion()
call RegionAddRect(HZE,to)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
set HZE=CreateRegion()
call RegionAddRect(HZE,BE)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
call TriggerAddCondition(t,Condition(function XG9))
set t=null
set HZE=null
set t=CreateTrigger()
set HZE=CreateRegion()
call RegionAddRect(HZE,er)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
set HZE=CreateRegion()
call RegionAddRect(HZE,lo)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
set HZE=CreateRegion()
call RegionAddRect(HZE,OE)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
call TriggerAddCondition(t,Condition(function XH9))
set t=null
set HZE=null
set t=CreateTrigger()
set HZE=CreateRegion()
call RegionAddRect(HZE,Qo)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
set HZE=CreateRegion()
call RegionAddRect(HZE,ar)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
set HZE=CreateRegion()
call RegionAddRect(HZE,AE)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
call TriggerAddCondition(t,Condition(function XI9))
set t=null
set HZE=null
set t=CreateTrigger()
set HZE=CreateRegion()
call RegionAddRect(HZE,wo)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
set HZE=CreateRegion()
call RegionAddRect(HZE,go)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
set HZE=CreateRegion()
call RegionAddRect(HZE,IE)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
call TriggerAddCondition(t,Condition(function XJ9))
set t=null
set HZE=null
set JS=CreateTrigger()
call TriggerAddAction(JS,function XV9)
set cA=CreateTrigger()
call TriggerRegisterUnitEvent(cA,JH4,EVENT_UNIT_DEATH)
call TriggerAddAction(cA,function XX9)
set CA=CreateTrigger()
call TriggerRegisterUnitEvent(CA,JI4,EVENT_UNIT_DEATH)
call TriggerAddAction(CA,function XY9)
set dA=CreateTrigger()
call TriggerRegisterUnitEvent(dA,JJ4,EVENT_UNIT_DEATH)
call TriggerAddAction(dA,function XZ9)
set DA=CreateTrigger()
call TriggerRegisterUnitEvent(DA,JE4,EVENT_UNIT_DEATH)
call TriggerAddAction(DA,function XA9)
set fA=CreateTrigger()
call TriggerRegisterUnitEvent(fA,JF4,EVENT_UNIT_DEATH)
call TriggerAddAction(fA,function XB9)
set FA=CreateTrigger()
call TriggerRegisterUnitEvent(FA,JG4,EVENT_UNIT_DEATH)
call TriggerAddAction(FA,function XC9)
set gA=CreateTrigger()
call TriggerRegisterUnitEvent(gA,J_4,EVENT_UNIT_DEATH)
call TriggerAddAction(gA,function X39)
set GA=CreateTrigger()
call TriggerRegisterUnitEvent(GA,K44,EVENT_UNIT_DEATH)
call TriggerAddAction(GA,function X69)
set LA=CreateTrigger()
call TriggerRegisterUnitEvent(LA,K74,EVENT_UNIT_DEATH)
call TriggerAddAction(LA,function XL9)
set mA=CreateTrigger()
call TriggerRegisterUnitEvent(mA,J04,EVENT_UNIT_DEATH)
call TriggerAddAction(mA,function X19)
set MA=CreateTrigger()
call TriggerRegisterUnitEvent(MA,J54,EVENT_UNIT_DEATH)
call TriggerAddAction(MA,function X09)
set PA=CreateTrigger()
call TriggerRegisterUnitEvent(PA,J24,EVENT_UNIT_DEATH)
call TriggerAddAction(PA,function X59)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,IY4,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function X29))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,JV4,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function Y49))
set t=null
set SA=CreateTrigger()
call TriggerRegisterAllPlayersEvent(SA,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(SA,Condition(function Y79))
call TriggerAddAction(SA,function Y89)
set TA=CreateTrigger()
call TriggerRegisterAllPlayersEvent(TA,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(TA,Condition(function Y99))
call TriggerAddAction(TA,function YD9)
set KS=CreateTrigger()
call TriggerAddAction(KS,function YE9)
set wA=CreateTrigger()
call TriggerRegisterTimerEventSingle(wA,75.)
call TriggerAddAction(wA,function YF9)
set MS=CreateTrigger()
call TriggerAddCondition(MS,Condition(function ZE9))
set OS=CreateTrigger()
call TriggerAddAction(OS,function ZF9)
set vA=CreateTrigger()
call TriggerAddAction(vA,function KI9)
set eA=CreateTrigger()
call TriggerRegisterAllPlayersEvent(eA,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(eA,Condition(function KK9))
call TriggerAddAction(eA,function KM9)
set xA=CreateTrigger()
call TriggerRegisterAllPlayersEvent(xA,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(xA,Condition(function KN9))
call TriggerAddAction(xA,function KO9)
set FS=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(FS,1.)
call TriggerAddAction(FS,function KT9)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SELECTED)
call TriggerAddCondition(t,Condition(function NOD))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DESELECTED)
call TriggerAddCondition(t,Condition(function NMD))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,I04,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,I04,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MO9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,I24,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,I24,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MP9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,I_4,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,I_4,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MQ9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,J44,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,J44,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MR9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,J74,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,J74,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MS9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,J84,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,J84,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MT9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,J94,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,J94,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MU9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,JD4,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,JD4,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MV9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,JE4,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,JE4,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MW9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,JF4,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,JF4,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MX9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,JG4,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,JG4,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MY9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,JH4,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,JH4,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MZ9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,JI4,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,JI4,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MA9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,JJ4,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,JJ4,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MB9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,IY4,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,IY4,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MC9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,JZ4,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,JZ4,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function K_9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,JA4,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,JA4,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function M49))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,JB4,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,JB4,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function M79))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,JC4,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,JC4,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function M89))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,J34,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,J34,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function M99))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,J64,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,J64,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MD9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,JL4,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,JL4,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function ME9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,J14,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,J14,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MF9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,J04,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,J04,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MG9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,J54,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,J54,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MH9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,J24,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,J24,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MI9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,J_4,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,J_4,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MJ9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,K44,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,K44,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MK9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,K74,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,K74,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MM9))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,JV4,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,JV4,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MN9))
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1.,true)
call TriggerAddCondition(t,Condition(function K09))
set t=null
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,5.,true)
call TriggerAddCondition(t,Condition(function N49))
set t=null
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,4.,true)
call TriggerAddCondition(t,Condition(function NE9))
set t=null
set KU=OG8()
set t=CreateTrigger()
set HZE=CreateRegion()
call RegionAddRect(HZE,bj_mapInitialPlayableArea)
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
call TriggerAddCondition(t,Condition(function NK9))
set t=null
set HZE=null
set t=CreateTrigger()
call TriggerAddCondition(t,Condition(function NM9))
call TriggerRegisterTimerEvent(t,5.,true)
set t=null
call DestroyFogModifier(CreateFogModifierRadius(G8[0],FOG_OF_WAR_VISIBLE,-4550,1250,300,true,true))
call DestroyFogModifier(CreateFogModifierRadius(N8[0],FOG_OF_WAR_VISIBLE,-4550,1250,300,true,true))
call DestroyFogModifier(CreateFogModifierRadius(G8[0],FOG_OF_WAR_VISIBLE,3200,1,300,true,true))
call DestroyFogModifier(CreateFogModifierRadius(N8[0],FOG_OF_WAR_VISIBLE,3200,1,300,true,true))
call DestroyFogModifier(CreateFogModifierRadius(G8[0],FOG_OF_WAR_VISIBLE,-7292,4186,450,true,true))
call DestroyFogModifier(CreateFogModifierRadius(N8[0],FOG_OF_WAR_VISIBLE,-7292,4186,450,true,true))
call DestroyFogModifier(CreateFogModifierRadius(G8[0],FOG_OF_WAR_VISIBLE,7348,-4334,450,true,true))
call DestroyFogModifier(CreateFogModifierRadius(N8[0],FOG_OF_WAR_VISIBLE,7348,-4334,450,true,true))
call DestroyFogModifier(CreateFogModifierRect(G8[0],FOG_OF_WAR_VISIBLE,IJ4,true,true))
call DestroyFogModifier(CreateFogModifierRect(N8[0],FOG_OF_WAR_VISIBLE,IJ4,true,true))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function EBH))
set t=null
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,3.5,true)
call TriggerAddCondition(t,Condition(function S39))
set t=null
set O84=CreateTrigger()
call TriggerRegisterUnitEvent(O84,JV4,EVENT_UNIT_DEATH)
call TriggerAddAction(O84,function T19)
set O94=CreateTrigger()
call TriggerRegisterUnitEvent(O94,IY4,EVENT_UNIT_DEATH)
call TriggerAddAction(O94,function T69)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function UT9))
set t=null
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function UW9))
set t=null
set OE4=CreateTrigger()
call TriggerAddAction(OE4,function UA9)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,O8,EVENT_PLAYER_UNIT_ATTACKED,Condition(function KF8))
call TriggerAddCondition(t,Condition(function UC9))
set t=null
set ow=CreateRegion()
call RegionAddRect(ow,RE)
call RegionAddRect(ow,di)
call RegionAddRect(ow,fi)
call RegionAddRect(ow,Fi)
call RegionAddRect(ow,Gi)
call RegionAddRect(ow,Ji)
call RegionAddRect(ow,li)
call RegionAddRect(ow,Li)
call RegionAddRect(ow,pi)
set UM4=CreateRegion()
call RegionAddRect(UM4,YN)
call RegionAddRect(UM4,ZN)
set EA=CreateTrigger()
call TriggerRegisterEnterRectSimple(EA,bj_mapInitialPlayableArea)
call TriggerAddCondition(EA,Condition(function V69))
call TriggerAddAction(EA,function VL9)
set OA=CreateTrigger()
call TriggerRegisterAllPlayersEvent(OA,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(OA,Condition(function V19))
call TriggerAddAction(OA,function V09)
set RA=CreateTrigger()
call TriggerRegisterAllPlayersEvent(RA,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(RA,Condition(function V59))
call TriggerAddAction(RA,function V29)
if(bj_isSinglePlayer and V_9())then
call W19()
endif
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,V8,"-wtf",true)
call TriggerAddAction(t,function W59)
call TriggerAddCondition(t,Condition(function W09))
call PP8("HSD",T07)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,G8[1],EVENT_PLAYER_HERO_LEVEL,Condition(function KF8))
call TriggerRegisterPlayerUnitEvent(t,G8[2],EVENT_PLAYER_HERO_LEVEL,Condition(function KF8))
call TriggerRegisterPlayerUnitEvent(t,G8[3],EVENT_PLAYER_HERO_LEVEL,Condition(function KF8))
call TriggerRegisterPlayerUnitEvent(t,G8[4],EVENT_PLAYER_HERO_LEVEL,Condition(function KF8))
call TriggerRegisterPlayerUnitEvent(t,G8[5],EVENT_PLAYER_HERO_LEVEL,Condition(function KF8))
call TriggerRegisterPlayerUnitEvent(t,N8[1],EVENT_PLAYER_HERO_LEVEL,Condition(function KF8))
call TriggerRegisterPlayerUnitEvent(t,N8[2],EVENT_PLAYER_HERO_LEVEL,Condition(function KF8))
call TriggerRegisterPlayerUnitEvent(t,N8[3],EVENT_PLAYER_HERO_LEVEL,Condition(function KF8))
call TriggerRegisterPlayerUnitEvent(t,N8[4],EVENT_PLAYER_HERO_LEVEL,Condition(function KF8))
call TriggerRegisterPlayerUnitEvent(t,N8[5],EVENT_PLAYER_HERO_LEVEL,Condition(function KF8))
call TriggerAddCondition(t,Condition(function W29))
set t=null
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,V8,"-test",true)
call TriggerAddCondition(t,Condition(function W_9))
set t=null
set t=CreateTrigger()
set HZE=CreateRegion()
call RegionAddRect(HZE,GetWorldBounds())
call TriggerRegisterEnterRegion(t,HZE,null)
call TriggerAddCondition(t,Condition(function CH9))
call TriggerAddAction(t,function WBF)
set t=null
set HZE=null
call DGG(I34,14,0)
call DGG(I24,12,0)
call DGG(IZ4,34,1)
call DGG(I04,33,1)
call DGG(IL4,55,2)
call DGG(I_4,52,2)
call DGG(JX4,14,0)
call DGG(JA4,16,0)
call DGG(JW4,35,1)
call DGG(JZ4,37,1)
call DGG(JY4,57,2)
call DGG(JB4,58,2)
set t=CreateTrigger()
call TriggerRegisterUnitInRange(t,FJ,300,Condition(function KF8))
call TriggerRegisterUnitInRange(t,lJ,300,Condition(function KF8))
call TriggerRegisterUnitInRange(t,DJ,300,Condition(function KF8))
call TriggerAddCondition(t,Condition(function CI9))
set t=null
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,25.,false)
call TriggerAddAction(t,function CS9)
set t=null
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,2.,false)
call TriggerAddCondition(t,Condition(function CG9))
set t=null
set U44=CreateRegion()
call RegionAddRect(U44,XD)
call RegionAddRect(U44,WD)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,25.,false)
call TriggerAddAction(t,function CQ9)
set t=null
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,G8[1],"-",false)
call TriggerRegisterPlayerChatEvent(t,G8[2],"-",false)
call TriggerRegisterPlayerChatEvent(t,G8[3],"-",false)
call TriggerRegisterPlayerChatEvent(t,G8[4],"-",false)
call TriggerRegisterPlayerChatEvent(t,G8[5],"-",false)
call TriggerRegisterPlayerChatEvent(t,N8[1],"-",false)
call TriggerRegisterPlayerChatEvent(t,N8[2],"-",false)
call TriggerRegisterPlayerChatEvent(t,N8[3],"-",false)
call TriggerRegisterPlayerChatEvent(t,N8[4],"-",false)
call TriggerRegisterPlayerChatEvent(t,N8[5],"-",false)
call TriggerAddAction(t,function CZ9)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(t,Condition(function FOD))
call TriggerAddAction(t,function FSD)
set AW[0]=false
set AW[1]=false
set AW[2]=false
set AW[3]=false
set AW[4]=false
set AW[5]=false
set AW[6]=false
set AW[7]=false
set AW[8]=false
set AW[9]=false
set AW[10]=false
set AW[11]=false
set AW[12]=false
set AW[13]=false
set AW[14]=false
set AW[15]=false
set AW[16]=false
set OC4[0]=false
set OC4[1]=false
set OC4[2]=false
set OC4[3]=false
set OC4[4]=false
set OC4[5]=false
set OC4[6]=false
set OC4[7]=false
set OC4[8]=false
set OC4[9]=false
set OC4[10]=false
set OC4[11]=false
set OC4[12]=false
set OC4[13]=false
set OC4[14]=false
set OC4[15]=false
set OC4[16]=false
set OC4[GetPlayerId(G8[1])]=true
set OC4[GetPlayerId(G8[2])]=true
set OC4[GetPlayerId(G8[3])]=true
set OC4[GetPlayerId(G8[4])]=true
set OC4[GetPlayerId(G8[5])]=true
set OC4[GetPlayerId(N8[1])]=true
set OC4[GetPlayerId(N8[2])]=true
set OC4[GetPlayerId(N8[3])]=true
set OC4[GetPlayerId(N8[4])]=true
set OC4[GetPlayerId(N8[5])]=true
call FLD()
set MT[0]=true
set MT[1]=true
set MT[2]=true
set MT[3]=true
set MT[4]=true
set MT[5]=true
set MT[6]=true
set MT[7]=true
set MT[8]=true
set MT[9]=true
set MT[10]=true
set MT[11]=true
set MT[12]=true
set MT[13]=true
set MT[14]=true
set MT[15]=true
set ib[0]=false
set ib[1]=false
set ib[2]=false
set ib[3]=false
set ib[4]=false
set ib[5]=false
set ib[6]=false
set ib[7]=false
set ib[8]=false
set ib[9]=false
set ib[10]=false
set ib[11]=false
set ib[12]=false
set ib[13]=false
set ib[14]=false
set CW[GetPlayerId(G8[1])]=false
set CW[GetPlayerId(G8[2])]=false
set CW[GetPlayerId(G8[3])]=false
set CW[GetPlayerId(G8[4])]=false
set CW[GetPlayerId(G8[5])]=false
set CW[GetPlayerId(N8[1])]=false
set CW[GetPlayerId(N8[2])]=false
set CW[GetPlayerId(N8[3])]=false
set CW[GetPlayerId(N8[4])]=false
set CW[GetPlayerId(N8[5])]=false
set ab[GetPlayerId(G8[1])]=false
set ab[GetPlayerId(G8[2])]=false
set ab[GetPlayerId(G8[3])]=false
set ab[GetPlayerId(G8[4])]=false
set ab[GetPlayerId(G8[5])]=false
set ab[GetPlayerId(N8[1])]=false
set ab[GetPlayerId(N8[2])]=false
set ab[GetPlayerId(N8[3])]=false
set ab[GetPlayerId(N8[4])]=false
set ab[GetPlayerId(N8[5])]=false
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerAddCondition(t,Condition(function CY9))
set PT[GetPlayerId(G8[1])]=false
set PT[GetPlayerId(G8[2])]=false
set PT[GetPlayerId(G8[3])]=false
set PT[GetPlayerId(G8[4])]=false
set PT[GetPlayerId(G8[5])]=false
set PT[GetPlayerId(N8[1])]=false
set PT[GetPlayerId(N8[2])]=false
set PT[GetPlayerId(N8[3])]=false
set PT[GetPlayerId(N8[4])]=false
set PT[GetPlayerId(N8[5])]=false
set Ob[0]=false
set Ob[1]=false
set Ob[2]=false
set Ob[3]=false
set Ob[4]=false
set Ob[5]=false
set Ob[6]=false
set Ob[7]=false
set Ob[8]=false
set Ob[9]=false
set Ob[10]=false
set Ob[11]=false
set Ob[12]=false
set Ob[13]=false
set Ob[14]=false
set Ob[15]=false
set Ob[16]=false
set Ab[0]=true
set Ab[1]=true
set Ab[2]=true
set Ab[3]=true
set Ab[4]=true
set Ab[5]=true
set Ab[6]=true
set Ab[7]=true
set Ab[8]=true
set Ab[9]=true
set Ab[10]=true
set Ab[11]=true
set Ab[12]=true
set Ab[13]=true
set Ab[14]=true
set Ab[15]=true
set Ab[16]=true
set KT[GetPlayerId(G8[1])]=false
set KT[GetPlayerId(G8[2])]=false
set KT[GetPlayerId(G8[3])]=false
set KT[GetPlayerId(G8[4])]=false
set KT[GetPlayerId(G8[5])]=false
set KT[GetPlayerId(N8[1])]=false
set KT[GetPlayerId(N8[2])]=false
set KT[GetPlayerId(N8[3])]=false
set KT[GetPlayerId(N8[4])]=false
set KT[GetPlayerId(N8[5])]=false
call G4D()
set Nb[0]=false
set Nb[1]=false
set Nb[2]=false
set Nb[3]=false
set Nb[4]=false
set Nb[5]=false
set Nb[6]=false
set Nb[7]=false
set Nb[8]=false
set Nb[9]=false
set Nb[10]=false
set Nb[11]=false
set Nb[12]=false
set Nb[13]=false
set Nb[14]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Orc\\WitchDoctor\\WitchDoctorPissed1.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Orc\\WitchDoctor\\WitchDoctorPissed2.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Orc\\WitchDoctor\\WitchDoctorPissed3.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Orc\\WitchDoctor\\WitchDoctorPissed4.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Orc\\WitchDoctor\\WitchDoctorPissed5.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Orc\\WitchDoctor\\WitchDoctorPissed6.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed1.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed2.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed3.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed4.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed5.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed6.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed7.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed1.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed2.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed3.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed4.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed5.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed6.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Human\\BloodElfSpellThief\\SpellbreakerPissed1.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Human\\BloodElfSpellThief\\SpellbreakerPissed2.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Human\\BloodElfSpellThief\\SpellbreakerPissed3.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Human\\BloodElfSpellThief\\SpellbreakerPissed4.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Human\\BloodElfSpellThief\\SpellbreakerPissed5.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Human\\Rifleman\\RiflemanPissed1.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Human\\Rifleman\\RiflemanPissed2.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Human\\Rifleman\\RiflemanPissed3.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Human\\Rifleman\\RiflemanPissed4.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Human\\Rifleman\\RiflemanPissed5.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Human\\Rifleman\\RiflemanPissed6.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Human\\Rifleman\\RiflemanPissed7.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Human\\Rifleman\\RiflemanPissed8.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed1.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed2.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed3.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed4.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed5.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed6.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed7.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed8.wav"
set db[Fb]=false
set Fb=Fb+1
set Cb[Fb]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed9.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\Ogre\\OgrePissed1.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\Ogre\\OgrePissed2.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\Ogre\\OgrePissed3.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\Ogre\\OgrePissed4.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\Ogre\\OgrePissed5.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\GoblinSapper\\GoblinSapperPissed1.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\GoblinSapper\\GoblinSapperPissed2.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\GoblinSapper\\GoblinSapperPissed3.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\GoblinSapper\\GoblinSapperPissed4.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\GoblinSapper\\GoblinSapperPissed5.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\GoblinSapper\\GoblinSapperPissed6.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\GoblinSapper\\GoblinSapperPissed7.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Orc\\HeroBladeMaster\\HeroBladeMasterPissed1.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Orc\\HeroBladeMaster\\HeroBladeMasterPissed2.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Orc\\HeroBladeMaster\\HeroBladeMasterPissed3.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Orc\\HeroBladeMaster\\HeroBladeMasterPissed4.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed1.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed2.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed3.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed4.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed5.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed6.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed7.wav"
set db[Fb]=false
set Cb[Fb]="Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed8.wav"
set db[Fb]=false
set QT[0]=false
set QT[1]=false
set QT[2]=false
set QT[3]=false
set QT[4]=false
set QT[5]=false
set QT[6]=false
set QT[7]=false
set QT[8]=false
set QT[9]=false
set QT[10]=false
set QT[11]=false
set QT[12]=false
set QT[13]=false
set t=CreateTrigger()
set EC8=GetHandleId(t)
call TriggerRegisterTimerEvent(t,.02,true)
call TriggerAddCondition(t,Condition(function HTD))
call SReal(EC8,"T_CurrentX",(0)*1.)
call SReal(EC8,"T_CurrentY",(0)*1.)
call SReal(EC8,"T_MaxX",(160)*1.)
set fb[0]=false
set fb[1]=false
set fb[2]=false
set fb[3]=false
set fb[4]=false
set fb[5]=false
set fb[6]=false
set fb[7]=false
set fb[8]=false
set fb[9]=false
set fb[10]=false
set fb[11]=false
set fb[12]=false
set t=null
set t=CreateTrigger()
call TriggerAddAction(t,function JND)
call TriggerAddCondition(t,Condition(function HAD))
set BD4=t
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.01,false)
call TriggerAddCondition(t,Condition(function JOD))
set t=null
if L8 then
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1.,true)
call TriggerAddCondition(t,Condition(function NKD))
endif
set t=null
set Tj=CreateTrigger()
call TriggerRegisterTimerExpireEvent(Tj,A[1])
call TriggerAddAction(Tj,function NRD)
set Uj=CreateTrigger()
call TriggerRegisterTimerExpireEvent(Uj,A[2])
call TriggerAddAction(Uj,function NSD)
set wj=CreateTrigger()
call TriggerRegisterTimerExpireEvent(wj,A[3])
call TriggerAddAction(wj,function NTD)
set zj=CreateTrigger()
call TriggerRegisterTimerExpireEvent(zj,A[4])
call TriggerAddAction(zj,function NUD)
set Zj=CreateTrigger()
call TriggerRegisterTimerExpireEvent(Zj,A[5])
call TriggerAddAction(Zj,function NVD)
set vJ=CreateTrigger()
call TriggerRegisterTimerExpireEvent(vJ,A[7])
call TriggerAddAction(vJ,function NWD)
set eJ=CreateTrigger()
call TriggerRegisterTimerExpireEvent(eJ,A[8])
call TriggerAddAction(eJ,function NXD)
set xJ=CreateTrigger()
call TriggerRegisterTimerExpireEvent(xJ,A[9])
call TriggerAddAction(xJ,function NYD)
set oJ=CreateTrigger()
call TriggerRegisterTimerExpireEvent(oJ,A[10])
call TriggerAddAction(oJ,function NZD)
set iJ=CreateTrigger()
call TriggerRegisterTimerExpireEvent(iJ,A[11])
call TriggerAddAction(iJ,function NAD)
call C6H()
call CLH()
call C1H()
call C0H()
set OJ=CreateTrigger()
call TriggerRegisterAllPlayersEvent(OJ,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(OJ,Condition(function MCE))
call TriggerAddAction(OJ,function M3E)
set t=CreateTrigger()
set HZE=CreateRegion()
call RegionAddRect(HZE,GetWorldBounds())
call TriggerRegisterEnterRegion(t,HZE,Condition(function KF8))
call TriggerAddCondition(t,Condition(function SDG))
set YS[1]='A0VS'
set YS[2]='A0VK'
set YS[3]='A0VQ'
set YS[4]='A0XL'
set YS[5]='A0VM'
set YS[6]='A0VN'
set YS[7]='A0VO'
set YS[8]='A0VP'
set YS[9]='A0VG'
set YS[10]='A0VZ'
set t=null
set HZE=null
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function NBH))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function FrostArmor_RangedAttackerFunc))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(t,function VJF)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_PAWN_ITEM)
call TriggerAddCondition(t,Condition(function N3H))
set T34=t
set t=null
set UC7[GetPlayerId(G8[1])]=false
set UC7[GetPlayerId(G8[2])]=false
set UC7[GetPlayerId(G8[3])]=false
set UC7[GetPlayerId(G8[4])]=false
set UC7[GetPlayerId(G8[5])]=false
set UC7[GetPlayerId(N8[1])]=false
set UC7[GetPlayerId(N8[2])]=false
set UC7[GetPlayerId(N8[3])]=false
set UC7[GetPlayerId(N8[4])]=false
set UC7[GetPlayerId(N8[5])]=false
set NU[0]=GetRandomInt(1,2)
set NU[1]=GetRandomInt(1,2)
set NU[2]=GetRandomInt(1,2)
set NU[3]=GetRandomInt(1,2)
set NU[4]=GetRandomInt(1,2)
set NU[5]=GetRandomInt(1,2)
set NU[6]=GetRandomInt(1,2)
set NU[7]=GetRandomInt(1,2)
set NU[8]=GetRandomInt(1,2)
set NU[9]=GetRandomInt(1,2)
set NU[10]=GetRandomInt(1,2)
set NU[11]=GetRandomInt(1,2)
set NU[12]=GetRandomInt(1,2)
set NU[13]=GetRandomInt(1,2)
set NU[14]=GetRandomInt(1,2)
set NU[15]=GetRandomInt(1,2)
set GQ7[0]=254
set GQ7[1]=255
set GQ7[2]=257
set GQ7[3]=261
set GQ7[4]=259
set GQ7[5]=262
set GQ7[6]=260
set GQ7[7]=253
set GQ7[8]=256
set GQ7[9]=258
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,15.,false)
call TriggerAddAction(t,function KLD)
set GD7=CreateTrigger()
call DisableTrigger(GD7)
call TriggerRegisterTimerEvent(GD7,H97,true)
call TriggerAddAction(GD7,function B4F)
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddAction(t,function IIH)
call TriggerRegisterTimerEventPeriodic(HK,5.)
call TriggerAddAction(HK,function X9F)
call TriggerRegisterTimerEventPeriodic(RZ4,5.)
call TriggerAddAction(RZ4,function L3F)
call DisableTrigger(RZ4)
call TriggerRegisterTimerEventPeriodic(Hn,1.)
call TriggerAddAction(Hn,function G5G)
call TriggerRegisterTimerEventPeriodic(HN,1.)
call TriggerAddAction(HN,function H4G)
call TriggerRegisterTimerEventPeriodic(Ho,2.)
call TriggerAddAction(Ho,function HFG)
call DisableTrigger(RB4)
call TriggerRegisterTimerEventPeriodic(RB4,2.)
call TriggerAddAction(RB4,function NHG)
set t=CreateTrigger()
call ky(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddAction(t,function B8F)
set t=CreateTrigger()
call TriggerRegisterUnitInRange(t,JS4,700.,null)
call TriggerAddCondition(t,Condition(function D6))
call TriggerAddAction(t,function CQF)
set t=CreateTrigger()
call TriggerRegisterUnitInRange(t,IN4,700.,null)
call TriggerAddCondition(t,Condition(function C6))
call TriggerAddAction(t,function CTF)
call DisableTrigger(RC4)
call TriggerRegisterTimerEventPeriodic(RC4,120.)
call TriggerAddAction(RC4,function P_G)
set PA4=12
set PB4=12
call BLF()
if GetPlayerController(G8[1])==MAP_CONTROL_COMPUTER or GetPlayerController(G8[2])==MAP_CONTROL_COMPUTER or GetPlayerController(G8[3])==MAP_CONTROL_COMPUTER or GetPlayerController(G8[4])==MAP_CONTROL_COMPUTER or GetPlayerController(G8[5])==MAP_CONTROL_COMPUTER or GetPlayerController(N8[1])==MAP_CONTROL_COMPUTER or GetPlayerController(N8[2])==MAP_CONTROL_COMPUTER or GetPlayerController(N8[3])==MAP_CONTROL_COMPUTER or GetPlayerController(N8[4])==MAP_CONTROL_COMPUTER or GetPlayerController(N8[5])==MAP_CONTROL_COMPUTER then
call DisplayTimedTextToPlayer(V8,0,0,10.,HS7+GetObjectName('Y098'))
call DisplayTimedTextToPlayer(V8,0,0,10.,HS7+GetObjectName('Y099'))
call DisplayTimedTextToPlayer(V8,0,0,10," ")
if PI7 then
call Z09()
endif
endif
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t,Condition(function R_G))
set t=CreateTrigger()
call TriggerRegisterAllPlayersEvent(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(t,Condition(function NYH))
call ExecuteFunc("X98")
set t=CreateTrigger()
loop
exitwhen i>15
call TriggerRegisterPlayerChatEvent(t,Player(i),"-debugging ",false)
set i=i+1
endloop
call TriggerRegisterTimerEvent(t,30,false)
call TriggerAddCondition(t,Condition(function CYH))
set t=null
call PP8("CZH",E)
call ExecuteFunc("XH7")
call V27()
call SpellCastsInit()
call LearnFixA()
call MeepoInit()
endfunction
function config takes nothing returns nothing
call SetMapName("TRIGSTR_50000")
call SetMapDescription("TRIGSTR_50001")
call SetPlayers(10)
call SetTeams(10)
if E then
call SetPlayers(11)
call SetTeams(11)
endif
call SetGamePlacement(MAP_PLACEMENT_TEAMS_TOGETHER)
call DefineStartLocation(0,-6990.,6840.)
call DefineStartLocation(1,-6990.,6840.)
call DefineStartLocation(2,-6990.,6840.)
call DefineStartLocation(3,-6990.,6840.)
call DefineStartLocation(4,-6990.,6840.)
call DefineStartLocation(5,-6990.,6840.)
call DefineStartLocation(6,-6990.,6840.)
call DefineStartLocation(7,-6990.,6840.)
call DefineStartLocation(8,-6990.,6840.)
call DefineStartLocation(9,-6990.,6840.)
if E then
call SetPlayerStartLocation(Player(0),0)
call ForcePlayerStartLocation(Player(0),0)
call SetPlayerColor(Player(0),ConvertPlayerColor(0))
call SetPlayerRacePreference(Player(0),RACE_PREF_NIGHTELF)
call SetPlayerRaceSelectable(Player(0),false)
call SetPlayerController(Player(0),MAP_CONTROL_USER)
call SetPlayerTeam(Player(0),0)
endif
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)
call PlayMusic("Sound\\Music\\mp3Music\\OrcTheme.mp3")
endfunction

