globals
integer V
integer array E
integer X=0
string O=""
hashtable I
integer A=0
constant integer N=$28829022
boolean B=false
integer array C
integer D=0
integer f=0
integer F=0
integer G=0
integer H=0
integer array J
integer K=0
boolean L=false
boolean M=false
boolean P=false
integer array Q
integer S=0
timer U=CreateTimer()
unit array w
real array W
integer Y=0
integer array z
unit array Z
integer vv=0
integer array ev
timer xv=CreateTimer()
hashtable ov
constant group rv=CreateGroup()
constant rect iv=Rect(.0,.0,.0,.0)
hashtable av=InitHashtable()
trigger array nv
integer Vv=0
integer array Ev
integer array Xv
integer array Ov
integer array Rv
boolean Iv=false
boolean Av=false
unit Nv=null
real bv=0
timer Bv=CreateTimer()
timer cv=CreateTimer()
constant trigger Cv=CreateTrigger()
integer dv=0
integer Dv=0
hashtable fv=null
hashtable Fv=InitHashtable()
integer gv=0
integer array Gv
integer array hv
sound Hv
trigger jv
multiboard Jv=null
integer array kv
boolean Kv=false
unit array Lv
integer mv=0
unit array Mv
unit array pv
lightning array Pv
destructable qv
timer Qv=CreateTimer()
timer sv=CreateTimer()
constant real Sv=-256
constant real tv=-512
constant real Tv=300
real uv
real Uv
constant real wv=500.*.1
unit array Wv
integer yv=0
constant timer Yv=CreateTimer()
constant integer zv=$7F
integer Zv
group ve=CreateGroup()
unit ee
unit xe
real oe
group re
trigger ie=null
integer array ae
integer ne=0
rect Ve=null
rect Ee=null
rect Xe=null
rect Oe=null
rect Re=null
rect Ie=null
rect Ae=null
rect Ne=null
rect be=null
rect Be=null
rect ce=null
rect Ce=null
rect de=null
rect De=null
rect fe=null
rect Fe=null
rect ge=null
rect Ge=null
rect he=null
rect He=null
rect je=null
rect Je=null
rect ke=null
rect Ke=null
rect le=null
rect Le=null
rect me=null
rect Me=null
rect pe=null
rect Pe=null
rect qe=null
rect Qe=null
rect se=null
rect Se=null
rect te=null
rect Te=null
rect ue=null
rect Ue=null
rect We=null
rect ye=null
rect Ye=null
rect ze=null
rect Ze=null
rect vx=null
rect ex=null
rect xx=null
rect ox=null
rect rx=null
rect ix=null
rect ax=null
rect nx=null
rect Vx=null
rect Ex=null
rect Xx=null
rect Ox=null
rect Rx=null
rect Ix=null
rect Ax=null
rect Nx=null
rect bx=null
rect Bx=null
rect cx=null
rect Cx=null
rect dx=null
rect Dx=null
rect fx=null
rect Fx=null
rect gx=null
rect Gx=null
rect hx=null
rect Hx=null
rect jx=null
rect Jx=null
rect kx=null
rect Kx=null
rect lx=null
rect Lx=null
rect mx=null
rect Mx=null
rect px=null
rect Px=null
rect qx=null
rect Qx=null
rect sx=null
rect Sx=null
rect tx=null
rect Tx=null
rect ux=null
rect Ux=null
rect wx=null
rect Wx=null
rect yx=null
rect Yx=null
rect zx=null
rect Zx=null
rect vo=null
rect eo=null
rect xo=null
rect oo=null
rect ro=null
rect io=null
rect ao=null
rect no=null
rect Vo=null
rect Eo=null
rect Xo=null
rect Oo=null
rect Ro=null
rect Io=null
rect Ao=null
rect No=null
rect bo=null
rect Bo=null
rect co=null
rect Co=null
rect do=null
rect udg_rect0=null
rect udg_rect1=null
rect udg_rect2=null
rect udg_rect3=null
rect udg_rect4=null
rect udg_rect5=null
rect udg_rect6=null
rect udg_rect7=null
rect udg_rect8=null
rect udg_rect9=null
rect udg_rect10=null
rect udg_rect11=null
rect udg_rect12=null
rect udg_rect13=null
rect udg_rect14=null
rect udg_rect15=null
rect udg_rect16=null
rect udg_rect17=null
rect udg_rect18=null
rect udg_rect19=null
rect udg_rect20=null
rect udg_rect21=null
rect udg_rect22=null
rect udg_rect23=null
rect udg_rect24=null
rect udg_rect25=null
rect udg_rect26=null
rect udg_rect27=null
rect udg_rect28=null
rect udg_rect29=null
rect udg_rect30=null
rect udg_rect31=null
rect udg_rect32=null
rect udg_rect33=null
rect udg_rect34=null
rect udg_rect35=null
rect udg_rect36=null
rect udg_rect37=null
rect udg_rect38=null
rect udg_rect39=null
rect udg_rect40=null
rect udg_rect41=null
rect udg_rect42=null
rect udg_rect43=null
rect udg_rect44=null
rect udg_rect45=null
rect udg_rect46=null
rect udg_rect47=null
rect udg_rect48=null
rect udg_rect49=null
rect udg_rect50=null
rect udg_rect51=null
rect udg_rect52=null
rect udg_rect53=null
rect udg_rect54=null
rect udg_rect55=null
rect udg_rect56=null
rect udg_rect57=null
rect udg_rect58=null
rect udg_rect59=null
rect udg_rect60=null
rect udg_rect61=null
rect udg_rect62=null
rect udg_rect63=null
rect udg_rect64=null
rect udg_rect65=null
rect udg_rect66=null
rect udg_rect67=null
rect udg_rect68=null
rect udg_rect69=null
rect udg_rect70=null
rect udg_rect71=null
rect udg_rect72=null
rect udg_rect73=null
rect udg_rect74=null
rect udg_rect75=null
sound Do=null
sound fo=null
sound Fo=null
sound go=null
sound Go=null
sound ho=null
sound Ho=null
sound jo=null
sound Jo=null
sound ko=null
sound Ko=null
sound lo=null
sound Lo=null
sound mo=null
sound Mo=null
sound po=null
sound Po=null
sound qo=null
sound Qo=null
sound so=null
sound So=null
sound to=null
sound To=null
sound uo=null
sound Uo=null
sound wo=null
sound Wo=null
sound yo=null
sound Yo=null
sound zo=null
sound Zo=null
sound vr=null
sound er=null
sound xr=null
sound rr=null
sound ir=null
integer array ar
integer array nr
integer array Vr
integer Er=0
unit array Xr
integer Rr=0
timer Ir=CreateTimer()
trigger Ar
integer array Nr
integer array br
integer array Br
integer array cr
integer Cr=0
string dr
string Dr
string fr
unit array Fr
integer gr=0
timerdialog Gr
timer hr
integer Hr
player jr=null
timer Jr=CreateTimer()
integer array kr
player Kr
integer lr
timer Lr=CreateTimer()
unit array mr
integer Mr=0
integer array pr
constant integer Pr=$A
timer qr=CreateTimer()
hashtable Qr=InitHashtable()
boolean sr=false
region Sr
integer tr=0
integer Tr=0
integer array ur
integer array Ur
trigger array wr
integer array Wr
integer array yr
boolean array zr
integer array Zr
integer array vi
integer array ei
boolean array xi
integer oi=0
integer ri=0
integer array ii
integer array ai
integer array ni
integer array Vi
string array Ei
integer Xi=0
integer Oi=0
integer array Ri
unit array Ii
integer Ai=0
integer Ni=0
integer array bi
unit array Bi
effect array ci
integer Ci=0
integer di=0
integer array Di
integer array fi
rect array Fi
integer gi=0
integer Gi=0
integer array hi
integer array Hi
integer array ji
string array Ji
timer array ki
player array Ki
integer array li
boolean array Li
integer array mi
integer Mi=0
integer pi=0
integer array Pi
hashtable qi=InitHashtable()
timer array Qi
integer array si
integer array Si
string array ti
player array Ti
boolean array ui
real array Ui
real array wi
integer Wi=0
integer yi=0
integer array Yi
real array zi
integer array Zi
integer array va
integer array ea
timer array xa
boolean array oa
boolean array ra
integer ia=0
integer aa=0
integer array na
integer array Va
integer array Ea
integer array Xa
unit array Oa
string array Ra
boolean array Ia
boolean array Aa
real array Na
real array ba
integer array Ba
integer array ca
integer array Ca
integer array da
integer array Da
integer array fa
integer array Fa
integer array ga
integer array Ga
integer array ha
integer array Ha
boolean array ja
integer Ja=0
integer ka=0
integer array Ka
timer array la
unit array La
integer array ma
integer Ma=0
integer Pa=0
integer array qa
timer array Qa
unit array sa
unit array Sa
integer array ta
integer Ta=0
integer ua=0
integer array Ua
timer array wa
unit array Wa
unit array ya
timer array Ya
integer array za
integer array Za
boolean array vn
timerdialog array en
boolean array xn
integer array on
integer array rn
trigger array in
trigger array an
trigger array nn
trigger array Vn
trigger En
trigger Xn
trigger On
trigger Rn
trigger array In
trigger array An
trigger array Nn
integer bn
trigger array Bn
unit cn
integer Cn
integer dn
integer Dn
boolean fn
integer Fn
boolean gn
code l__Typecast_Code
integer l__Typecast_Int
string l__Typecast_Str
boolean l__Typecast_Bool
string array utils__hex
string array utils__Chars
timer utils__GameTimer
group utils__sel_group
force exec_force
integer mh_readonly_array
integer mh_index
integer mh_result
integer array l__BufferArray
integer GameVersion
integer GameDll
integer pWc3Props
integer pGameWar3
integer JassArray_vtable
integer ppVirtualProtect
integer ppGetModuleHandle
integer ppGetProcAddress
integer array l__memvars_private_array
integer array l__MemoryArray
integer memory__ArrayVariableId=0
integer memory__OldMemoryValue=0
constant gametype bitwise___GAME_TYPE_ALL=ConvertGameType(0xFFFFFFFF)
integer bitwise___cpSupportedGameTypes
string MHUtil__FindNative_Param
integer MHUtil__FindNative_Result
integer CodeOffset=0
integer EntryOffset=0
integer StringsOffset
integer si__Buffer_F=0
integer si__Buffer_I=0
integer array si__Buffer_V
integer s__Buffer_Position=0
integer si__Memory_F=0
integer si__Memory_I=0
integer array si__Memory_V
integer si__Chain_F=0
integer si__Chain_I=0
integer array si__Chain_V
integer array s__Chain_base
integer array s___Chain_offsets
integer array s__Chain_offsets
integer array s__Chain_length
integer si__TSLinkedList_Enumerator_F=0
integer si__TSLinkedList_Enumerator_I=0
integer array si__TSLinkedList_Enumerator_V
integer array s__TSLinkedList_Enumerator_List
integer array s__TSLinkedList_Enumerator_Current
integer si__TSLinkedList_F=0
integer si__TSLinkedList_I=0
integer array si__TSLinkedList_V
constant integer s__TSLinkedList_Size=0x0C
integer array s__TSLinkedList_Offset
integer array s__TSLinkedList_Previous
integer array s__TSLinkedList_Value
integer si__TSArray_F=0
integer si__TSArray_I=0
integer array si__TSArray_V
integer si__TRefCnt_F=0
integer si__TRefCnt_I=0
integer array si__TRefCnt_V
integer si__TJassString_F=0
integer si__TJassString_I=0
integer array si__TJassString_V
integer array si__TSArray_type
trigger array st__TSArray_onDestroy
integer array si__TRefCnt_type
trigger array st__TRefCnt_onDestroy
endglobals
native MergeUnits takes integer qty,integer a,integer b,integer make returns boolean
native IgnoredUnits takes integer unitid returns integer
native GetUnitGoldCost takes integer unitid returns integer
native GetUnitWoodCost takes integer unitid returns integer
native GetUnitBuildTime takes integer unitid returns integer
function s__Buffer__allocate takes nothing returns integer
local integer this=si__Buffer_F
if(this!=0)then
set si__Buffer_F=si__Buffer_V[this]
else
set si__Buffer_I=si__Buffer_I+1
set this=si__Buffer_I
endif
if(this>8190)then
return 0
endif
set si__Buffer_V[this]=-1
return this
endfunction
function s__Memory__allocate takes nothing returns integer
local integer this=si__Memory_F
if(this!=0)then
set si__Memory_F=si__Memory_V[this]
else
set si__Memory_I=si__Memory_I+1
set this=si__Memory_I
endif
if(this>8190)then
return 0
endif
set si__Memory_V[this]=-1
return this
endfunction
function s__TJassString__allocate takes nothing returns integer
local integer this=si__TJassString_F
if(this!=0)then
set si__TJassString_F=si__TJassString_V[this]
else
set si__TJassString_I=si__TJassString_I+1
set this=si__TJassString_I
endif
if(this>8190)then
return 0
endif
set si__TJassString_V[this]=-1
return this
endfunction
function s__Chain__allocate takes nothing returns integer
local integer this=si__Chain_F
if(this!=0)then
set si__Chain_F=si__Chain_V[this]
else
set si__Chain_I=si__Chain_I+1
set this=si__Chain_I
endif
if(this>818)then
return 0
endif
set s__Chain_offsets[this]=(this-1)*10
set si__Chain_V[this]=-1
return this
endfunction
function s__TRefCnt__allocate takes nothing returns integer
local integer this=si__TRefCnt_F
if(this!=0)then
set si__TRefCnt_F=si__TRefCnt_V[this]
else
set si__TRefCnt_I=si__TRefCnt_I+1
set this=si__TRefCnt_I
endif
if(this>8190)then
return 0
endif
set si__TRefCnt_type[this]=9
set si__TRefCnt_V[this]=-1
return this
endfunction
function s__TSLinkedList_Enumerator__allocate takes nothing returns integer
local integer this=si__TSLinkedList_Enumerator_F
if(this!=0)then
set si__TSLinkedList_Enumerator_F=si__TSLinkedList_Enumerator_V[this]
else
set si__TSLinkedList_Enumerator_I=si__TSLinkedList_Enumerator_I+1
set this=si__TSLinkedList_Enumerator_I
endif
if(this>8190)then
return 0
endif
set s__TSLinkedList_Enumerator_Current[this]=0
set si__TSLinkedList_Enumerator_V[this]=-1
return this
endfunction
function s__TSLinkedList_Enumerator_deallocate takes integer this returns nothing
if this==null then
return
elseif(si__TSLinkedList_Enumerator_V[this]!=-1)then
return
endif
set si__TSLinkedList_Enumerator_V[this]=si__TSLinkedList_Enumerator_F
set si__TSLinkedList_Enumerator_F=this
endfunction
function s__TSArray__allocate takes nothing returns integer
local integer this=si__TSArray_F
if(this!=0)then
set si__TSArray_F=si__TSArray_V[this]
else
set si__TSArray_I=si__TSArray_I+1
set this=si__TSArray_I
endif
if(this>8190)then
return 0
endif
set si__TSArray_type[this]=7
set si__TSArray_V[this]=-1
return this
endfunction
function s__TSLinkedList__allocate takes nothing returns integer
local integer this=si__TSLinkedList_F
if(this!=0)then
set si__TSLinkedList_F=si__TSLinkedList_V[this]
else
set si__TSLinkedList_I=si__TSLinkedList_I+1
set this=si__TSLinkedList_I
endif
if(this>8190)then
return 0
endif
set si__TSLinkedList_V[this]=-1
return this
endfunction
function s__TSLinkedList_deallocate takes integer this returns nothing
if this==null then
return
elseif(si__TSLinkedList_V[this]!=-1)then
return
endif
set si__TSLinkedList_V[this]=si__TSLinkedList_F
set si__TSLinkedList_F=this
endfunction
function s__TJassStrings__allocate takes nothing returns integer
local integer this=s__TSArray__allocate()
local integer kthis
if(this==0)then
return 0
endif
set si__TSArray_type[this]=13
set kthis=this
return this
endfunction
function s__TSArrayOfInt__allocate takes nothing returns integer
local integer this=s__TSArray__allocate()
local integer kthis
if(this==0)then
return 0
endif
set si__TSArray_type[this]=8
set kthis=this
return this
endfunction
function s__TStringRep__allocate takes nothing returns integer
local integer this=s__TRefCnt__allocate()
local integer kthis
if(this==0)then
return 0
endif
set si__TRefCnt_type[this]=10
set kthis=this
return this
endfunction
function s__TRCString__allocate takes nothing returns integer
local integer this=s__TRefCnt__allocate()
local integer kthis
if(this==0)then
return 0
endif
set si__TRefCnt_type[this]=11
set kthis=this
return this
endfunction
function typecast___setCode takes code c returns nothing
set l__Typecast_Code=c
return
endfunction
function typecast___setInt takes integer i returns nothing
set l__Typecast_Int=i
return
endfunction
function typecast___setStr takes string s returns nothing
set l__Typecast_Str=s
return
endfunction
function typecast___Typecast1 takes nothing returns nothing
local integer l__Typecast_Code
local code l__Typecast_Int
endfunction
function C2I takes code c returns integer
call typecast___setCode(c)
return l__Typecast_Code
endfunction
function I2C takes integer i returns code
call typecast___setInt(i)
return l__Typecast_Int
endfunction
function typecast___Typecast2 takes nothing returns nothing
local integer l__Typecast_Str
local string l__Typecast_Int
endfunction
function SH2I takes string s returns integer
call typecast___setStr(s)
return l__Typecast_Str
endfunction
function typecast___Typecast3 takes nothing returns nothing
local integer l__Typecast_Bool
local boolean l__Typecast_Int
endfunction
function shl takes integer value,integer offset returns integer
local integer cjlocgn_00000000=0
loop
exitwhen not(cjlocgn_00000000<offset)
set value=value*(2)
set cjlocgn_00000000=cjlocgn_00000000+1
endloop
return value
endfunction
function shr takes integer value,integer offset returns integer
local integer cjlocgn_00000000=0
loop
exitwhen not(cjlocgn_00000000<offset)
set value=value/(2)
set cjlocgn_00000000=cjlocgn_00000000+1
endloop
return value
endfunction
function GetGameTime takes nothing returns real
return TimerGetElapsed(utils__GameTimer)
endfunction
function utils__init_hex takes nothing returns nothing
set utils__hex[0x0]="0"
set utils__hex[0x1]="1"
set utils__hex[0x2]="2"
set utils__hex[0x3]="3"
set utils__hex[0x4]="4"
set utils__hex[0x5]="5"
set utils__hex[0x6]="6"
set utils__hex[0x7]="7"
set utils__hex[0x8]="8"
set utils__hex[0x9]="9"
set utils__hex[0xA]="A"
set utils__hex[0xB]="B"
set utils__hex[0xC]="C"
set utils__hex[0xD]="D"
set utils__hex[0xE]="E"
set utils__hex[0xF]="F"
endfunction
function utils__InitChars takes nothing returns nothing
set utils__Chars[0x01]=""
set utils__Chars[0x02]=""
set utils__Chars[0x03]=""
set utils__Chars[0x04]=""
set utils__Chars[0x05]=""
set utils__Chars[0x06]=""
set utils__Chars[0x07]=""
set utils__Chars[0x08]=""
set utils__Chars[0x09]="\t"
set utils__Chars[0x0A]="\n"
set utils__Chars[0x0B]=""
set utils__Chars[0x0C]=""
set utils__Chars[0x0D]="\r"
set utils__Chars[0x0E]=""
set utils__Chars[0x0F]=""
set utils__Chars[0x10]=""
set utils__Chars[0x11]=""
set utils__Chars[0x12]=""
set utils__Chars[0x13]=""
set utils__Chars[0x14]=""
set utils__Chars[0x16]=""
set utils__Chars[0x17]=""
set utils__Chars[0x19]=""
set utils__Chars[0x1A]=""
set utils__Chars[0x1B]=""
set utils__Chars[0x1C]=""
set utils__Chars[0x1D]=""
set utils__Chars[0x1E]=""
set utils__Chars[0x1F]=""
set utils__Chars[0x20]=" "
set utils__Chars[0x21]="!"
set utils__Chars[0x22]="\""
set utils__Chars[0x23]="#"
set utils__Chars[0x24]="$"
set utils__Chars[0x25]="%"
set utils__Chars[0x26]="&"
set utils__Chars[0x27]="'"
set utils__Chars[0x28]="("
set utils__Chars[0x29]=")"
set utils__Chars[0x2A]="*"
set utils__Chars[0x2B]="+"
set utils__Chars[0x2C]=","
set utils__Chars[0x2D]="-"
set utils__Chars[0x2E]="."
set utils__Chars[0x2F]="/"
set utils__Chars[0x30]="0"
set utils__Chars[0x31]="1"
set utils__Chars[0x32]="2"
set utils__Chars[0x33]="3"
set utils__Chars[0x34]="4"
set utils__Chars[0x35]="5"
set utils__Chars[0x36]="6"
set utils__Chars[0x37]="7"
set utils__Chars[0x38]="8"
set utils__Chars[0x39]="9"
set utils__Chars[0x3A]=":"
set utils__Chars[0x3B]=";"
set utils__Chars[0x3C]="<"
set utils__Chars[0x3D]="="
set utils__Chars[0x3E]=">"
set utils__Chars[0x3F]="?"
set utils__Chars[0x40]="@"
set utils__Chars[0x41]="A"
set utils__Chars[0x42]="B"
set utils__Chars[0x43]="C"
set utils__Chars[0x44]="D"
set utils__Chars[0x45]="E"
set utils__Chars[0x46]="F"
set utils__Chars[0x47]="G"
set utils__Chars[0x48]="H"
set utils__Chars[0x49]="I"
set utils__Chars[0x4A]="J"
set utils__Chars[0x4B]="K"
set utils__Chars[0x4C]="L"
set utils__Chars[0x4D]="M"
set utils__Chars[0x4E]="N"
set utils__Chars[0x4F]="O"
set utils__Chars[0x50]="P"
set utils__Chars[0x51]="Q"
set utils__Chars[0x52]="R"
set utils__Chars[0x53]="S"
set utils__Chars[0x54]="T"
set utils__Chars[0x55]="U"
set utils__Chars[0x56]="V"
set utils__Chars[0x57]="W"
set utils__Chars[0x58]="X"
set utils__Chars[0x59]="Y"
set utils__Chars[0x5A]="Z"
set utils__Chars[0x5B]="["
set utils__Chars[0x5C]="\\"
set utils__Chars[0x5D]="]"
set utils__Chars[0x5E]="^"
set utils__Chars[0x5F]="_"
set utils__Chars[0x60]="`"
set utils__Chars[0x61]="a"
set utils__Chars[0x62]="b"
set utils__Chars[0x63]="c"
set utils__Chars[0x64]="d"
set utils__Chars[0x65]="e"
set utils__Chars[0x66]="f"
set utils__Chars[0x67]="g"
set utils__Chars[0x68]="h"
set utils__Chars[0x69]="i"
set utils__Chars[0x6A]="j"
set utils__Chars[0x6B]="k"
set utils__Chars[0x6C]="l"
set utils__Chars[0x6D]="m"
set utils__Chars[0x6E]="n"
set utils__Chars[0x6F]="o"
set utils__Chars[0x70]="p"
set utils__Chars[0x71]="q"
set utils__Chars[0x72]="r"
set utils__Chars[0x73]="s"
set utils__Chars[0x74]="t"
set utils__Chars[0x75]="u"
set utils__Chars[0x76]="v"
set utils__Chars[0x77]="w"
set utils__Chars[0x78]="x"
set utils__Chars[0x79]="y"
set utils__Chars[0x7A]="z"
set utils__Chars[0x7B]="{"
set utils__Chars[0x7C]="|"
set utils__Chars[0x7D]="}"
set utils__Chars[0x7E]="~"
set utils__Chars[0x7F]=""
endfunction
function utils__init takes nothing returns nothing
call utils__init_hex()
call utils__InitChars()
set exec_force=CreateForce()
set utils__sel_group=CreateGroup()
set utils__GameTimer=CreateTimer()
call TimerStart(utils__GameTimer,0x7FFFFFFF,false,null)
call ForceAddPlayer(exec_force,Player(0))
endfunction
function utils_uninit takes nothing returns nothing
call DestroyTimer(utils__GameTimer)
set utils__GameTimer=null
call DestroyGroup(utils__sel_group)
set utils__sel_group=null
call DestroyForce(exec_force)
set exec_force=null
endfunction
function Read takes integer address returns integer
set mh_index=address/4
call ForForce(exec_force,(I2C(C2I(function mh_read_memory)+8*5)))
return mh_result
endfunction
function memread__FakeArray takes nothing returns nothing
return
endfunction
function memread__init takes nothing returns nothing
set mh_readonly_array=C2I(function memread__FakeArray)-8
endfunction
function s__Buffer_SetItem takes integer index,integer value returns nothing
set l__BufferArray[index]=value
return
endfunction
function s__Buffer_PushDword takes integer value returns nothing
call s__Buffer_SetItem(s__Buffer_Position/4,value)
set s__Buffer_Position=s__Buffer_Position+(4)
endfunction
function s__Buffer_PushCode takes integer opcode,integer r1,integer r2,integer r3,integer param returns nothing
call s__Buffer_SetItem(s__Buffer_Position/4+0,r3+shl(r2,8)+shl(r1,16)+shl(opcode,24))
call s__Buffer_SetItem(s__Buffer_Position/4+1,param)
set s__Buffer_Position=s__Buffer_Position+(8)
endfunction
function s__Buffer_Magic takes nothing returns nothing
local integer l__BufferArray
endfunction
function s__Buffer_GetAddress takes nothing returns integer
return l__BufferArray
return 0
endfunction
function s__Buffer_GetItems takes nothing returns integer
return Read(s__Buffer_GetAddress()+0x0C)
endfunction
function buffer___init takes nothing returns nothing
call s__Buffer_SetItem(JASS_MAX_ARRAY_SIZE-1,0)
endfunction
function memvars___Init_1_26a takes nothing returns nothing
set GameDll=JassArray_vtable-0x951060
set pWc3Props=GameDll+0xADA848
set pGameWar3=GameDll+0xAB65F4
set ppVirtualProtect=GameDll+0x86D0F8
set ppGetModuleHandle=GameDll+0x86D1D0
set ppGetProcAddress=GameDll+0x86D280
endfunction
function memvars___Init_1_27a takes nothing returns nothing
set GameDll=JassArray_vtable-0xA63B30
set pWc3Props=GameDll+0xBE3740
set pGameWar3=GameDll+0xBE4238
set ppVirtualProtect=GameDll+0x94E0F4
set ppGetModuleHandle=GameDll+0x94E184
set ppGetProcAddress=GameDll+0x94E168
endfunction
function memvars___CheckGameVersion takes nothing returns nothing
local integer method00=Read(JassArray_vtable+0x00)
local integer difference=JassArray_vtable-method00
if(difference==0x4F6E60)then
set GameVersion=2
elseif(difference==0x277890)then
set GameVersion=4
else
set GameVersion=0
endif
endfunction
function memvars___PreparePrivateArray takes nothing returns nothing
set l__memvars_private_array[0]=0
return
endfunction
function memvars___magic takes nothing returns nothing
local integer l__memvars_private_array
endfunction
function memvars___GetPrivateArrayAddress takes nothing returns integer
return l__memvars_private_array
return 0
endfunction
function memvars___init takes nothing returns nothing
call memvars___PreparePrivateArray()
set JassArray_vtable=Read(memvars___GetPrivateArrayAddress())
call memvars___CheckGameVersion()
if(GameVersion==2)then
call memvars___Init_1_26a()
elseif(GameVersion==4)then
call memvars___Init_1_27a()
else
endif
endfunction
function memory__read_this takes nothing returns nothing
set l__MemoryArray[0]=0
endfunction
function s__Memory_ReadMemory takes integer address returns integer
return l__MemoryArray[address/4]
return 0
endfunction
function s__Memory_WriteMemory takes integer address,integer value returns nothing
set l__MemoryArray[address/4]=value
return
endfunction
function s__Memory_magic takes nothing returns nothing
local integer l__MemoryArray
endfunction
function s__Memory_GetAddress takes nothing returns integer
return l__MemoryArray
return 0
endfunction
function s__Memory_GetItems takes nothing returns integer
return Read(s__Memory_GetAddress()+0x0C)
endfunction
function memory__hack_array takes nothing returns nothing
local integer pItems
set memory__OldMemoryValue=s__Memory_GetAddress()
set JassArray_vtable=Read(memory__OldMemoryValue)
set pItems=(Read(s__Memory_GetAddress()+0x0C))
call s__Memory_WriteMemory((0x00),(JassArray_vtable))
call s__Memory_WriteMemory((0x04),(0x7FFFFFFF))
call s__Memory_WriteMemory((0x08),(0x7FFFFFFF))
call s__Memory_WriteMemory((0x0C),(0))
call s__Memory_WriteMemory((0x10),(0))
set s__Buffer_Position=0
call s__Buffer_PushCode(0x0C,0,0x09,0,pItems)
call s__Buffer_PushCode(0x11,0,0,0,memory__ArrayVariableId)
call s__Buffer_PushCode(0x0C,0,0x00,0,0)
call s__Buffer_PushCode(0x27,0,0,0,0)
call ForForce(exec_force,(I2C((Read(s__Buffer_GetAddress()+0x0C)))))
endfunction
function memory__init takes nothing returns nothing
call s__Memory_WriteMemory((JASS_MAX_ARRAY_SIZE-1),(0))
set memory__ArrayVariableId=Read(C2I(function memory__read_this)+36)
call memory__hack_array()
endfunction
function memory_uninit takes nothing returns nothing
local integer offset=s__Buffer_Position
call s__Buffer_PushCode(0x0C,0,0x09,0,memory__OldMemoryValue)
call s__Buffer_PushCode(0x11,0,0,0,memory__ArrayVariableId)
call s__Buffer_PushCode(0x0C,0,0x00,0,0)
call s__Buffer_PushCode(0x27,0,0,0,0)
call ForForce(exec_force,(I2C((Read(s__Buffer_GetAddress()+0x0C))+offset)))
endfunction
function s__Chain_create takes nothing returns integer
local integer self=s__Chain__allocate()
set s__Chain_base[self]=0
set s__Chain_length[self]=0
return self
endfunction
function s__Chain_add takes integer this,integer offset returns nothing
if(s__Chain_length[this]<10)then
set s___Chain_offsets[s__Chain_offsets[this]+s__Chain_length[this]]=offset
set s__Chain_length[this]=s__Chain_length[this]+1
endif
endfunction
function s__Chain_calc takes integer this returns integer
local integer address=s__Chain_base[this]
local integer cjlocgn_00000000=0
loop
exitwhen not(cjlocgn_00000000<s__Chain_length[this])
set address=(s__Memory_ReadMemory((address)))
if(address==0)then
return 0
endif
set address=address+(s___Chain_offsets[s__Chain_offsets[this]+cjlocgn_00000000])
set cjlocgn_00000000=cjlocgn_00000000+1
endloop
return address
endfunction
function bitwise___GetGameTypeSupported takes nothing returns integer
return(s__Memory_ReadMemory((s__Chain_calc((bitwise___cpSupportedGameTypes)))))
endfunction
function BitwiseAnd takes integer a,integer b returns integer
call SetGameTypeSupported(bitwise___GAME_TYPE_ALL,false)
call SetGameTypeSupported(ConvertGameType(a),true)
call SetGameTypeSupported(ConvertGameType((0xFFFFFFFF-(b))),false)
return(s__Memory_ReadMemory((s__Chain_calc((bitwise___cpSupportedGameTypes)))))
endfunction
function bitwise___init takes nothing returns nothing
set bitwise___cpSupportedGameTypes=s__Chain_create()
set s__Chain_base[bitwise___cpSupportedGameTypes]=pGameWar3
call s__Chain_add(bitwise___cpSupportedGameTypes,0x30)
call s__Chain_add(bitwise___cpSupportedGameTypes,0x30)
endfunction
function shlr takes integer value,integer left,integer right returns integer
return shr(shl(value,left*8),(left+right)*8)
endfunction
function ReadString takes integer address returns string
local string result=""
local integer counter=0
local integer cjlocgn_00000000
local integer cjlocgn_00000001
local integer cjlocgn_00000002
local integer cjlocgn_00000003
loop
set cjlocgn_00000000=ModuloInteger(address,4)
set cjlocgn_00000001=(4-1)-cjlocgn_00000000
set cjlocgn_00000002=(s__Memory_ReadMemory((address)))
set cjlocgn_00000003=shlr(cjlocgn_00000002,cjlocgn_00000001,cjlocgn_00000000)
exitwhen(cjlocgn_00000003==0)
set result=result+((utils__Chars[(cjlocgn_00000003)]))
set address=address+1
endloop
return result
endfunction
function s__TSLinkedList_Enumerator_create takes integer List returns integer
local integer self=s__TSLinkedList_Enumerator__allocate()
set s__TSLinkedList_Enumerator_List[self]=List
return self
endfunction
function s__TSLinkedList_Enumerator_MoveNext takes integer this returns boolean
local integer cjlocgn_00000000
if(s__TSLinkedList_Enumerator_Current[this]==0)then
set s__TSLinkedList_Enumerator_Current[this]=s__TSLinkedList_Value[s__TSLinkedList_Enumerator_List[this]]
else
set cjlocgn_00000000=s__TSLinkedList_Enumerator_Current[this]+s__TSLinkedList_Offset[s__TSLinkedList_Enumerator_List[this]]
set s__TSLinkedList_Enumerator_Current[this]=(s__Memory_ReadMemory((cjlocgn_00000000+0x04)))
endif
if(s__TSLinkedList_Enumerator_Current[this]<=0)then
set s__TSLinkedList_Enumerator_Current[this]=0
endif
return(s__TSLinkedList_Enumerator_Current[this]!=0)
endfunction
function s__TSLinkedList_LoadFromMemory takes integer this,integer p returns nothing
set s__TSLinkedList_Offset[this]=(s__Memory_ReadMemory((p+0x00)))
set s__TSLinkedList_Previous[this]=(s__Memory_ReadMemory((p+0x04)))
set s__TSLinkedList_Value[this]=(s__Memory_ReadMemory((p+0x08)))
endfunction
function GetWc3Prop takes integer index returns integer
local integer Props=(s__Memory_ReadMemory((pWc3Props)))
local integer offset=index*4
return(s__Memory_ReadMemory((Props+offset)))
endfunction
function GetJassThreadLocal takes nothing returns integer
return GetWc3Prop(0x5)
endfunction
function FindNative takes string name returns integer
local integer result=0
local integer Environment=(GetWc3Prop(0x5))
local integer htNatives=Environment+0x18
local integer HashMask=(s__Memory_ReadMemory((htNatives+0x24)))
local integer cjlocgn_00000000
local integer cjlocgn_00000001
local integer cjlocgn_00000002
local integer cjlocgn_00000003
local integer cjlocgn_00000004
local integer cjlocgn_00000005
local integer cjlocgn_00000006
local integer cjlocgn_00000007
local integer cjlocgn_00000008
if(HashMask!=-1)then
set cjlocgn_00000000=StringHash(name)
set cjlocgn_00000001=BitwiseAnd(HashMask,cjlocgn_00000000)
set cjlocgn_00000002=(s__Memory_ReadMemory((htNatives+0x1C)))
set cjlocgn_00000003=cjlocgn_00000002+cjlocgn_00000001*s__TSLinkedList_Size
set cjlocgn_00000004=s__TSLinkedList__allocate()
call s__TSLinkedList_LoadFromMemory(cjlocgn_00000004,cjlocgn_00000003)
set cjlocgn_00000005=(s__TSLinkedList_Enumerator_create((cjlocgn_00000004)))
loop
exitwhen not((s__TSLinkedList_Enumerator_MoveNext(cjlocgn_00000005)))
set cjlocgn_00000006=(s__TSLinkedList_Enumerator_Current[(cjlocgn_00000005)])
set cjlocgn_00000007=(s__Memory_ReadMemory((cjlocgn_00000006+0x04+0x00)))
set cjlocgn_00000008=(s__Memory_ReadMemory((cjlocgn_00000006+0x04+0x14)))
if(cjlocgn_00000007==cjlocgn_00000000)and(ReadString(cjlocgn_00000008)==name)then
set result=cjlocgn_00000006
exitwhen true
endif
endloop
call s__TSLinkedList_Enumerator_deallocate(cjlocgn_00000005)
call s__TSLinkedList_deallocate(cjlocgn_00000004)
endif
return result
endfunction
function private__FindNativeExecutor takes nothing returns nothing
set MHUtil__FindNative_Result=FindNative(MHUtil__FindNative_Param)
endfunction
function FindNativeSafe takes string name returns integer
set MHUtil__FindNative_Param=name
call ExecuteFunc("private__FindNativeExecutor")
return MHUtil__FindNative_Result
endfunction
function SetNativeAddress takes string name,integer address returns boolean
local integer Native=FindNativeSafe(name)
if(Native!=0)then
call s__Memory_WriteMemory((Native+0x1C),(address))
return true
endif
return false
endfunction
function s__TSArrayOfInt__getindex takes integer this,integer index returns integer
return(s__Memory_ReadMemory(((s__Memory_ReadMemory(((this)+0x08)))+index*4)))
endfunction
function s__TRCString_c_str takes integer this returns integer
if((s__Memory_ReadMemory(((this)+0x08)))!=0)then
return(s__Memory_ReadMemory((((s__Memory_ReadMemory(((this)+0x08))))+0x1C)))
endif
return 0
endfunction
function s__TJassStrings__getindex takes integer this,integer index returns integer
return(s__Memory_ReadMemory(((this)+0x08)))+(index*(((4+4)+4)+4))
endfunction
function GetInstance takes integer hInstance returns integer
local integer Environment=(GetWc3Prop(0x5))
local integer Instances=Environment+0x88
if(hInstance>=0)and(hInstance<(s__Memory_ReadMemory(((Instances)+0x04))))then
return s__TSArrayOfInt__getindex(Instances,hInstance)
endif
return 0
endfunction
function GetInstanceString takes integer pInstance,integer hString returns integer
local integer JassStrings=(s__Memory_ReadMemory((pInstance+0x2874)))
if(hString>=0)and(hString<(s__Memory_ReadMemory(((JassStrings)+0x04))))then
return(s__TRCString_c_str((((s__TJassStrings__getindex(JassStrings,hString)))+0x00)))
endif
return 0
endfunction
function GetMainInstanceHandle takes nothing returns integer
return(s__Memory_ReadMemory(((s__Memory_ReadMemory((pGameWar3)))+0x08)))
endfunction
function GetMainInstance takes nothing returns integer
return GetInstance((s__Memory_ReadMemory(((s__Memory_ReadMemory((pGameWar3)))+0x08))))
endfunction
function GetStringAddress takes string s returns integer
return GetInstanceString((GetInstance((s__Memory_ReadMemory(((s__Memory_ReadMemory((pGameWar3)))+0x08))))),SH2I(s))
endfunction
function PushDwords takes integer a,integer b,integer c,integer d returns nothing
call s__Buffer_PushDword(a)
call s__Buffer_PushDword(b)
call s__Buffer_PushDword(c)
call s__Buffer_PushDword(d)
endfunction
function PrepareCode takes nothing returns nothing
set CodeOffset=s__Buffer_Position
set EntryOffset=784
call PushDwords(0x53E58955,0x5352CB89,0x857850FF,0x390874C0)
call PushDwords(0xB00472C3,0x3002EB01,0xEC895BC0,0x0000C35D)
call PushDwords(0x8DE58955,0x53FC2464,0x45895756,0x6A006AFC)
call PushDwords(0x89FF6A00,0x006A57D7,0x00FDE968,0xFC5D8B00)
call PushDwords(0x897453FF,0x74DB85C3,0xD1D88935,0x758B50E0)
call PushDwords(0x5C56FFFC,0x53C6895E,0x57FF6A56,0xE968006A)
call PushDwords(0x8B0000FD,0x57FFFC7D,0x85C38974,0x561175DB)
call PushDwords(0xFFFC5D8B,0x315B6053,0x00768DF6,0xF63102EB)
call PushDwords(0x5E5FF089,0x5DEC895B,0x000000C3,0x00000000)
call PushDwords(0x8DE58955,0x53F42464,0xA0FC4589,0x0042DE20)
call PushDwords(0x8BF84588,0x33FFFC5D,0xFFFC458B,0x558B5450)
call PushDwords(0x484289FC,0x8B0473FF,0x50FFFC45,0xFC558B54)
call PushDwords(0xFF504289,0x458B0873,0x5450FFFC,0x89FC558B)
call PushDwords(0x438B4C42,0xFC558B0C,0x8948528B,0x5250F46D)
call PushDwords(0xFFFC458B,0xC0855850,0x45C60675,0xF68900F8)
call PushDwords(0x89FC558B,0x438B7442,0xFC558B10,0x8948528B)
call PushDwords(0x5250F46D,0xFFFC458B,0xC0855850,0x45C60675)
call PushDwords(0xF68900F8,0x89FC558B,0x438B7842,0xFC558B14)
call PushDwords(0x8948528B,0x5250F46D,0xFFFC458B,0xC0855850)
call PushDwords(0x45C60675,0xF68900F8,0x89FC558B,0x438B7C42)
call PushDwords(0xFC558B18,0x8948528B,0x5250F46D,0xFFFC458B)
call PushDwords(0xC0855850,0x45C60675,0xF68900F8,0x89FC558B)
call PushDwords(0x00008082,0x1C438B00,0x8BFC558B,0x6D894852)
call PushDwords(0x8B5250F4,0x50FFFC45,0x75C08558,0xF845C607)
call PushDwords(0x00768D00,0x89FC558B,0x00008482,0x20438B00)
call PushDwords(0x8BFC558B,0x6D894852,0x8B5250F4,0x50FFFC45)
call PushDwords(0x75C08558,0xF845C607,0x00768D00,0x89FC558B)
call PushDwords(0x00008882,0x24438B00,0x8BFC558B,0x6D894852)
call PushDwords(0x8B5250F4,0x50FFFC45,0x75C08558,0xF845C607)
call PushDwords(0x00768D00,0x89FC558B,0x00008C82,0x28438B00)
call PushDwords(0x8BFC558B,0x6D894852,0x8B5250F4,0x50FFFC45)
call PushDwords(0x75C08558,0xF845C607,0x00768D00,0x89FC558B)
call PushDwords(0x00009082,0x2C438B00,0x8BFC558B,0x6D894852)
call PushDwords(0x8B5250F4,0x50FFFC45,0x75C08558,0xF845C607)
call PushDwords(0x00768D00,0x89FC558B,0x00009482,0x30438B00)
call PushDwords(0x8BFC558B,0x6D895052,0x8B5250F4,0x50FFFC45)
call PushDwords(0x75C08558,0xF845C607,0x00768D00,0x89FC558B)
call PushDwords(0x438B5C42,0xFC558B34,0x8950528B,0x5250F46D)
call PushDwords(0xFFFC458B,0xC0855850,0x45C60675,0xF68900F8)
call PushDwords(0x89FC558B,0x458B6042,0x4C408BFC,0x68F46D89)
call PushDwords(0x0000010C,0xFC458B50,0x855850FF,0xC60575C0)
call PushDwords(0x9000F845,0x89FC558B,0x458B6442,0x4C408BFC)
call PushDwords(0x68F46D89,0x0000010D,0xFC458B50,0x855850FF)
call PushDwords(0xC60575C0,0x9000F845,0x89FC558B,0x458B6842)
call PushDwords(0x4C408BFC,0x68F46D89,0x00000109,0xFC458B50)
call PushDwords(0x855850FF,0xC60575C0,0x9000F845,0x89FC558B)
call PushDwords(0x458B6C42,0x4C408BFC,0x68F46D89,0x000000FD)
call PushDwords(0xFC458B50,0x855850FF,0xC60575C0,0x9000F845)
call PushDwords(0x89FC558B,0x458A7042,0xEC895BF8,0x0000C35D)
call PushDwords(0x8DE58955,0xFB4024A4,0x5653FFFF,0x08558B57)
call PushDwords(0xBD8D328B,0xFFFFFB44,0x000012B9,0x8BA5F300)
call PushDwords(0x85890442,0xFFFFFB98,0x8908428B,0xFFFB9C85)
call PushDwords(0xF845C7FF,0x00000000,0xFFF445C7,0x8DFFFFFF)
call PushDwords(0xFFFB4485,0xFD36E8FF,0xC084FFFF,0x01BF0A75)
call PushDwords(0xE9000000,0x000001C9,0x958DDB30,0xFFFFFBE0)
call PushDwords(0xFB44858D,0x05B9FFFF,0xE8000001,0xFFFFFC80)
call PushDwords(0x6074C084,0xFB80958B,0x858DFFFF,0xFFFFFB44)
call PushDwords(0xFFFC8BE8,0x85C689FF,0x904974F6,0xFDEA858D)
call PushDwords(0x6A50FFFF,0x858D5600,0xFFFFFBE0,0xC095FF50)
call PushDwords(0x85FFFFFB,0x6A2574C0,0x00006800,0x036A0400)
call PushDwords(0x076A006A,0x858D006A,0xFFFFFDEA,0xCC95FF50)
call PushDwords(0x89FFFFFB,0xF883F445,0xC3950FFF,0xA495FF56)
call PushDwords(0x5EFFFFFB,0x0A75DB84,0x000002BF,0x013FE900)
call PushDwords(0xDB300000,0xFB40858D,0x6A50FFFF,0x84B5FF00)
call PushDwords(0x6AFFFFFB,0xA895FF00,0x85FFFFFB,0x6A5974C0)
call PushDwords(0x40B5FF00,0xFFFFFFFB,0xFFFBB095,0x83C689FF)
call PushDwords(0x3874FFFE,0x0068046A,0x56000010,0x95FF006A)
call PushDwords(0xFFFFFBC4,0x89F84589,0x7D83FC75,0x1C7400F8)
call PushDwords(0x006A006A,0xF875FF56,0xFB40B5FF,0x95FFFFFF)
call PushDwords(0xFFFFFBAC,0x950FC009,0x90C388C0,0xFB40B5FF)
call PushDwords(0x95FFFFFF,0xFFFFFBB4,0x0A75DB84,0x000003BF)
call PushDwords(0x00BBE900,0xDB300000,0x006A006A,0x006A026A)
call PushDwords(0x0068046A,0x8D400000,0xFFFDEA85,0x95FF50FF)
call PushDwords(0xFFFFFBCC,0xFE83C689,0x6A3574FF,0x40858D00)
call PushDwords(0x50FFFFFB,0xFFFC75FF,0xFF56F875,0xFFFBD095)
call PushDwords(0x74C009FF,0xFC458B0F,0xFB40853B,0x0475FFFF)
call PushDwords(0x02EB01B3,0xFF56DB30,0xFFFBD895,0x00768DFF)
call PushDwords(0x0775DB84,0x000004BF,0x3056EB00,0x88858BDB)
call PushDwords(0x89FFFFFB,0xFFFB4085,0xEA858DFF,0x50FFFFFD)
call PushDwords(0xFBD495FF,0xC085FFFF,0x958D2A74,0xFFFFFB44)
call PushDwords(0x503872FF,0xFB9C95FF,0x8589FFFF,0xFFFFFBDC)
call PushDwords(0x1074C085,0xFB40858D,0xFF50FFFF,0xFFFBDC95)
call PushDwords(0x9001B3FF,0x0775DB84,0x000005BF,0x3102EB00)
call PushDwords(0xF87D83FF,0x68117400,0x00008000,0x75FF006A)
call PushDwords(0xC895FFF8,0x90FFFFFB,0xFFF47D83,0x75FF0A74)
call PushDwords(0xD895FFF4,0x90FFFFFB,0x5E5FF889,0x5DEC895B)
call PushDwords(0x000000C3,0x00000000,0x00000000,0x00000000)
endfunction
function PrepareStrings takes nothing returns nothing
set StringsOffset=s__Buffer_Position
call s__Buffer_PushDword(GetStringAddress(("kernel32.dll")))
call s__Buffer_PushDword(GetStringAddress(("msvcrt.dll")))
call s__Buffer_PushDword(GetStringAddress(("Storm.dll")))
call s__Buffer_PushDword(GetStringAddress(("MultiByteToWideChar")))
call s__Buffer_PushDword(GetStringAddress(("GetTempPathW")))
call s__Buffer_PushDword(GetStringAddress(("GetTempFileNameW")))
call s__Buffer_PushDword(GetStringAddress(("VirtualAlloc")))
call s__Buffer_PushDword(GetStringAddress(("VirtualFree")))
call s__Buffer_PushDword(GetStringAddress(("CreateFileW")))
call s__Buffer_PushDword(GetStringAddress(("WriteFile")))
call s__Buffer_PushDword(GetStringAddress(("LoadLibraryW")))
call s__Buffer_PushDword(GetStringAddress(("CloseHandle")))
call s__Buffer_PushDword(GetStringAddress(("malloc")))
call s__Buffer_PushDword(GetStringAddress(("free")))
call s__Buffer_PushDword(GetStringAddress(("DoIt")))
call s__Buffer_PushDword(GetStringAddress(("suk")))
call s__Buffer_PushDword(GetStringAddress(("bin\\loader.dll")))
call s__Buffer_PushDword(GetStringAddress(("config.json")))
endfunction
function CheckErrorCode takes integer Code returns nothing
local string array ErrorMessages
local string Message
if(Code==0)then
return
endif
set ErrorMessages[1]="Failed to initialize import table."
set ErrorMessages[2]="Failed to create temp file for loader library."
set ErrorMessages[3]="Failed to read loader library from mpq archives."
set ErrorMessages[4]="Failed to save loader library to file system."
set ErrorMessages[5]="Failed to run loader."
if((Code>=1)and(Code<=5))then
set Message=ErrorMessages[Code]
else
set Message="Invalid error code: "+I2S(Code)
endif
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,9999,"|cFFFF0000"+Message+"|r")
endfunction
function LoadDll takes nothing returns nothing
local integer pVirtualProtect=(s__Memory_ReadMemory((ppVirtualProtect)))
local integer pGetModuleHandle=(s__Memory_ReadMemory((ppGetModuleHandle)))
local integer pGetProcAddress=(s__Memory_ReadMemory((ppGetProcAddress)))
local integer DataOffset
local integer old_MergeUnits
local integer old_IgnoredUnits
local integer ExitCode
set s__Buffer_Position=0
call PrepareCode()
call PrepareStrings()
set DataOffset=s__Buffer_Position
call s__Buffer_PushDword((Read(s__Buffer_GetAddress()+0x0C))+StringsOffset)
call s__Buffer_PushDword(pGetModuleHandle)
call s__Buffer_PushDword(pGetProcAddress)
set old_MergeUnits=FindNativeSafe("MergeUnits")
call SetNativeAddress("MergeUnits",pVirtualProtect)
call MergeUnits((Read(s__Buffer_GetAddress()+0x0C)),JASS_MAX_ARRAY_SIZE*4,0x40,(Read(s__Buffer_GetAddress()+0x0C))+s__Buffer_Position)
set old_IgnoredUnits=FindNativeSafe("IgnoredUnits")
call SetNativeAddress("IgnoredUnits",(Read(s__Buffer_GetAddress()+0x0C))+CodeOffset+EntryOffset)
set ExitCode=IgnoredUnits((Read(s__Buffer_GetAddress()+0x0C))+DataOffset)
call CheckErrorCode(ExitCode)
call SetNativeAddress("IgnoredUnits",old_IgnoredUnits)
call SetNativeAddress("MergeUnits",old_MergeUnits)
call memory_uninit()
call utils_uninit()
endfunction
function Loader___init takes nothing returns nothing
call ExecuteFunc("LoadDll")
endfunction
function jasshelper__initstructs437536 takes nothing returns nothing
set st__TRefCnt_onDestroy[9]=null
set st__TRefCnt_onDestroy[10]=null
set st__TRefCnt_onDestroy[11]=null
set st__TSArray_onDestroy[7]=null
set st__TSArray_onDestroy[8]=null
set st__TSArray_onDestroy[13]=null
endfunction
function Gn takes nothing returns integer
local integer hn=Ta
if(hn!=0)then
set Ta=Ua[hn]
else
set ua=ua+1
set hn=ua
endif
if(hn>8190)then
return 0
endif
set Ua[hn]=-1
return hn
endfunction
function Hn takes nothing returns integer
local integer hn=Ma
if(hn!=0)then
set Ma=qa[hn]
else
set Pa=Pa+1
set hn=Pa
endif
if(hn>8190)then
return 0
endif
set qa[hn]=-1
return hn
endfunction
function jn takes nothing returns integer
local integer hn=Ja
if(hn!=0)then
set Ja=Ka[hn]
else
set ka=ka+1
set hn=ka
endif
if(hn>8190)then
return 0
endif
set Ka[hn]=-1
return hn
endfunction
function Jn takes integer hn returns nothing
if hn==null then
return
elseif(Ka[hn]!=-1)then
return
endif
set Ka[hn]=Ja
set Ja=hn
endfunction
function kn takes nothing returns integer
local integer hn=ia
if(hn!=0)then
set ia=na[hn]
else
set aa=aa+1
set hn=aa
endif
if(hn>8190)then
return 0
endif
set Va[hn]=0
set Ea[hn]=0
set Xa[hn]=0
set Oa[hn]=null
set Ra[hn]=""
set Ia[hn]=false
set Aa[hn]=true
set Na[hn]=0
set ba[hn]=0
set Ba[hn]=0
set ca[hn]=0
set Ca[hn]=0
set da[hn]=0
set Da[hn]=0
set fa[hn]=0
set Fa[hn]=0
set ga[hn]=0
set Ga[hn]=0
set ha[hn]=0
set Ha[hn]=0
set ja[hn]=false
set na[hn]=-1
return hn
endfunction
function Kn takes nothing returns integer
local integer hn=Wi
if(hn!=0)then
set Wi=Yi[hn]
else
set yi=yi+1
set hn=yi
endif
if(hn>8190)then
return 0
endif
set zi[hn]=-1.
set Zi[hn]=0
set va[hn]=0
set ea[hn]=0
set xa[hn]=null
set oa[hn]=false
set ra[hn]=false
set Yi[hn]=-1
return hn
endfunction
function ln takes integer hn returns nothing
if hn==null then
return
elseif(Yi[hn]!=-1)then
return
endif
set Yi[hn]=Wi
set Wi=hn
endfunction
function Ln takes nothing returns integer
local integer hn=Mi
if(hn!=0)then
set Mi=Pi[hn]
else
set pi=pi+1
set hn=pi
endif
if(hn>8190)then
return 0
endif
set Pi[hn]=-1
return hn
endfunction
function mn takes integer hn returns nothing
if hn==null then
return
elseif(Pi[hn]!=-1)then
return
endif
set Pi[hn]=Mi
set Mi=hn
endfunction
function Mn takes nothing returns integer
local integer hn=gi
if(hn!=0)then
set gi=hi[hn]
else
set Gi=Gi+1
set hn=Gi
endif
if(hn>510)then
return 0
endif
set mi[hn]=(hn-1)*16
set Hi[hn]=0
set ji[hn]=0
set Ki[hn]=null
set li[hn]=0
set hi[hn]=-1
return hn
endfunction
function pn takes nothing returns integer
local integer hn=Ci
if(hn!=0)then
set Ci=Di[hn]
else
set di=di+1
set hn=di
endif
if(hn>8190)then
return 0
endif
set fi[hn]=0
set Fi[hn]=null
set Di[hn]=-1
return hn
endfunction
function Pn takes nothing returns integer
local integer hn=Ai
if(hn!=0)then
set Ai=bi[hn]
else
set Ni=Ni+1
set hn=Ni
endif
if(hn>8190)then
return 0
endif
set bi[hn]=-1
return hn
endfunction
function qn takes integer hn returns nothing
if hn==null then
return
elseif(bi[hn]!=-1)then
return
endif
set bi[hn]=Ai
set Ai=hn
endfunction
function Qn takes nothing returns integer
local integer hn=Xi
if(hn!=0)then
set Xi=Ri[hn]
else
set Oi=Oi+1
set hn=Oi
endif
if(hn>8190)then
return 0
endif
set Ri[hn]=-1
return hn
endfunction
function sn takes integer hn returns nothing
if hn==null then
return
elseif(Ri[hn]!=-1)then
return
endif
set Ri[hn]=Xi
set Xi=hn
endfunction
function Sn takes nothing returns integer
local integer hn=oi
if(hn!=0)then
set oi=ii[hn]
else
set ri=ri+1
set hn=ri
endif
if(hn>8190)then
return 0
endif
set ii[hn]=-1
return hn
endfunction
function tn takes nothing returns integer
call TriggerEvaluate(En)
return bn
endfunction
function Tn takes integer hn,unit u,integer un returns integer
set Fn=hn
set cn=u
set Cn=un
call TriggerEvaluate(in[Ur[hn]])
return bn
endfunction
function Un takes integer hn,unit u returns integer
set Fn=hn
set cn=u
call TriggerEvaluate(an[Ur[hn]])
return bn
endfunction
function wn takes integer hn,unit u returns nothing
set Fn=hn
set cn=u
call TriggerEvaluate(nn[Ur[hn]])
endfunction
function Yn takes nothing returns integer
local integer zn
local integer hn=tr
if(hn!=0)then
set tr=ur[hn]
else
set Tr=Tr+1
set hn=Tr
endif
if(hn>8190)then
return 0
endif
set Wr[hn]=0
set yr[hn]=0
set Ur[hn]=2
set zn=hn
set zr[hn]=false
set ur[hn]=-1
return hn
endfunction
function Zn takes integer vV,integer eV,integer xV,boolean oV returns integer
set Cn=vV
set dn=eV
set Dn=xV
set fn=oV
call TriggerEvaluate(Xn)
return bn
endfunction
function rV takes nothing returns integer
local integer hn=tn()
local integer zn
if(hn==0)then
return 0
endif
set Ur[hn]=3
set zn=hn
set Wr[hn]=0
set yr[hn]=0
return hn
endfunction
function iV takes integer i,unit a1,integer a2 returns nothing
set cn=a1
set Cn=a2
call TriggerEvaluate(An[i])
endfunction
function aV takes integer i,unit a1,integer a2,integer a3 returns integer
set cn=a1
set Cn=a2
set dn=a3
call TriggerEvaluate(Nn[i])
return bn
endfunction
function nV takes integer i,unit a1,integer a2 returns integer
set cn=a1
set Cn=a2
call TriggerEvaluate(Bn[i])
return bn
endfunction
function BonusMod__Setup takes nothing returns nothing
set V=Zn(1517831265,$C,1517831213,false)
endfunction
function s__Bonus_create takes nothing returns integer
local integer hn=Yn()
set zr[hn]=true
return hn
endfunction
function VV takes integer hn,unit u,integer un returns integer
return 0
endfunction
function EV takes integer hn,unit u returns integer
return 0
endfunction
function XV takes integer hn,unit u,integer yn returns boolean
return true
endfunction
function OV takes integer hn,unit u,integer un returns integer
return aV(1,u,hn,un)
endfunction
function RV takes integer hn,unit u returns integer
return nV(1,u,hn)
endfunction
function IV takes integer hn,unit u returns nothing
call iV(1,u,hn)
endfunction
function AV takes integer hn,unit u,integer yn returns boolean
return(yn>=Wr[hn])and(yn<=yr[hn])
endfunction
function NV takes unit u,integer bV returns nothing
local integer i=0
local integer BV=(bV)
if Ur[bV]!=3 then
call wn(bV,u)
return
endif
if xi[BV]and not IsUnitType(u,UNIT_TYPE_HERO)then
return
endif
call UnitRemoveAbility(u,ei[BV])
loop
exitwhen i==Zr[BV]
call UnitRemoveAbility(u,vi[BV]+i)
set i=i+1
endloop
endfunction
function cV takes unit u,integer bV,integer un returns integer
local integer i
local integer CV=0
local integer BV=(bV)
local boolean dV=false
if un==0 then
call NV(u,BV)
return 0
endif
if Ur[bV]!=3 then
return Tn(bV,u,un)
endif
if xi[BV]and not IsUnitType(u,UNIT_TYPE_HERO)then
return 0
endif
if un<Wr[BV]then
set un=Wr[BV]
elseif un>yr[BV]then
set un=yr[BV]
endif
if un<0 then
set un=-(Wr[BV]-un)
set dV=true
endif
call UnitRemoveAbility(u,ei[BV])
set i=Zr[BV]-1
loop
exitwhen i<0
if un>=E[i]then
call UnitAddAbility(u,vi[BV]+i)
call UnitMakeAbilityPermanent(u,true,vi[BV]+i)
set un=un-E[i]
set CV=CV+E[i]
else
call UnitRemoveAbility(u,vi[BV]+i)
endif
set i=i-1
endloop
if dV then
call UnitAddAbility(u,ei[BV])
call UnitMakeAbilityPermanent(u,true,ei[BV])
else
call UnitRemoveAbility(u,ei[BV])
endif
return CV
endfunction
function DV takes unit u,integer bV returns integer
local integer i=0
local integer un=0
local integer BV=(bV)
if Ur[bV]!=3 then
return Un(bV,u)
endif
if xi[BV]and not IsUnitType(u,UNIT_TYPE_HERO)then
return 0
endif
if GetUnitAbilityLevel(u,ei[BV])>0 then
set un=Wr[BV]
endif
loop
exitwhen i==Zr[BV]
if GetUnitAbilityLevel(u,vi[BV]+i)>0 then
set un=un+E[i]
endif
set i=i+1
endloop
return un
endfunction
function fV takes nothing returns nothing
local integer i
set E[0]=1
set X=1
set V=Zn(1517831265,$C,1517831213,false)
endfunction
function HCL_GetCommandString takes nothing returns string
return O
endfunction
function FV takes nothing returns nothing
local integer i
local integer j
local integer h
local integer v
local string gV="abcdefghijklmnopqrstuvwxyz0123456789 -=,."
local integer array GV
local boolean array hV
set hV[0]=true
set hV[50]=true
set hV[60]=true
set hV[70]=true
set hV[80]=true
set hV[90]=true
set hV[100]=true
set i=0
set j=0
loop
if hV[j]then
set j=j+1
endif
exitwhen j>=256
set GV[j]=i
set i=i+1
set j=j+1
endloop
set i=0
loop
exitwhen i>=$C
set h=R2I(100*GetPlayerHandicap(Player(i))+.5)
if not hV[h]then
set h=GV[h]
set v=h/ 6
set h=h-v*6
call SetPlayerHandicap(Player(i),.5+h/ 10.)
set O=O+SubString(gV,v,v+1)
endif
set i=i+1
endloop
endfunction
function HV takes unit jV,integer JV,player kV returns nothing
local texttag tt=CreateTextTag()
local string KV="+"+I2S(JV)
call SetTextTagText(tt,KV,.024)
call SetTextTagPos(tt,GetUnitX(jV)-16.,GetUnitY(jV),.0)
call SetTextTagColor(tt,$FF,$DC,0,$FF)
call SetTextTagVelocity(tt,.0,.03)
call SetTextTagVisibility(tt,GetLocalPlayer()==kV)
call SetTextTagFadepoint(tt,2.)
call SetTextTagLifespan(tt,3.)
call SetTextTagPermanent(tt,false)
set KV=null
set tt=null
endfunction
function lV takes integer yn returns timer
if(A==0)then
if(not B)then
call TriggerEvaluate(In[(1)])
set A=A-1
else
set Ya[0]=CreateTimer()
endif
else
set A=A-1
endif
call SaveInteger(I,0,GetHandleId((Ya[A])),(yn))
return Ya[A]
endfunction
function NewTimer takes nothing returns timer
return lV(0)
endfunction
function LV takes timer t returns nothing
if(t==null)then
return
endif
if(A==8190)then
call DestroyTimer(t)
else
call PauseTimer(t)
if((LoadInteger(I,0,GetHandleId((t))))==N)then
return
endif
call SaveInteger(I,0,GetHandleId((t)),(N))
set Ya[A]=t
set A=A+1
endif
endfunction
function mV takes nothing returns nothing
local integer i=0
local integer o=-1
local boolean oops=false
if(B)then
return
else
set B=true
endif
set I=InitHashtable()
loop
exitwhen(i==256)
set Ya[i]=CreateTimer()
call SaveInteger(I,0,GetHandleId((Ya[i])),(N))
set i=i+1
endloop
set A=256
endfunction
function MV takes string s returns nothing
endfunction
function PV takes unit qV,unitstate QV,real sV returns nothing
local integer SV
local integer vV
local integer tV
local integer TV
local integer uV
if QV==UNIT_STATE_MAX_LIFE then
set vV=1517833313
if sV<1 then
call MV("You can not set a unit's max life to below 1")
return
endif
elseif QV==UNIT_STATE_MAX_MANA then
set vV=1517833569
if sV<0 then
call MV("You can not set a unit's max mana to below 0")
return
endif
else
call SetUnitState(qV,QV,sV)
return
endif
set SV=R2I(sV)-R2I(GetUnitState(qV,QV))
if SV<0 then
set SV=-SV
set vV=vV+5
endif
set tV=5-1
set TV=4
set uV=vV+tV
loop
exitwhen SV==0
if SV>=C[tV*3+(TV-2)]then
call UnitAddAbility(qV,uV)
call SetUnitAbilityLevel(qV,uV,TV)
call UnitRemoveAbility(qV,uV)
set SV=SV-C[tV*3+(TV-2)]
else
set TV=TV-1
if TV<=1 then
set tV=tV-1
set TV=4
set uV=vV+tV
endif
endif
endloop
endfunction
function UV takes nothing returns nothing
local integer i
local integer k
set i=1
set C[0]=1
loop
exitwhen i==5*2*2*3+1
set C[i]=C[i-1]*2
set i=i+1
endloop
endfunction
function wV takes nothing returns nothing
loop
exitwhen Y==0
set Y=Y-1
call SetWidgetLife(w[Y],GetWidgetLife(w[Y])+W[Y])
set w[Y]=null
endloop
endfunction
function WV takes unit u,real yV returns nothing
local real YV=GetWidgetLife(u)
local real zV=GetUnitState(u,UNIT_STATE_MAX_LIFE)
if YV<yV+1 then
if YV+yV>zV then
call SetWidgetLife(u,zV)
set w[Y]=u
set W[Y]=YV+yV-zV
set Y=Y+1
call TimerStart(U,.0,false,function wV)
else
call SetWidgetLife(u,YV+yV)
endif
elseif YV+yV>zV then
set w[Y]=u
set W[Y]=yV
set Y=Y+1
call TimerStart(U,.0,false,function wV)
else
call SetWidgetLife(u,YV+yV)
endif
endfunction
function ZV takes string s,integer a,integer b returns integer
local string vE="0123456789ABCDEF"
local string eE="0123456789abcdef"
local integer i
local integer r=0
local string c
loop
exitwhen a>=b
set c=SubString(s,a,a+1)
set i=0
loop
exitwhen i>=16
exitwhen c==SubString(vE,i,i+1)
exitwhen c==SubString(eE,i,i+1)
set i=i+1
endloop
if i>=16 then
set i=0
endif
set r=r*16+i
set a=a+1
endloop
return r
endfunction
function xE takes string oE returns integer
local integer c=Sn()
set Ei[c]="|cff"+oE
set ai[c]=ZV(oE,0,2)
set ni[c]=ZV(oE,0,4)
set Vi[c]=ZV(oE,0,6)
return c
endfunction
function rE takes nothing returns nothing
set z[0]=xE("FF0303")
set z[1]=xE("0042FF")
set z[2]=xE("1CE6B9")
set z[3]=xE("540081")
set z[4]=xE("FFFC00")
set z[5]=xE("FE8A0E")
set z[6]=xE("20C000")
set z[7]=xE("E55BB0")
set z[8]=xE("959697")
set z[9]=xE("7FBFF1")
set z[$A]=xE("106246")
set z[$B]=xE("492A04")
set z[$C]=xE("FFFFFF")
endfunction
function iE takes nothing returns nothing
local integer i=0
loop
exitwhen i>=vv
set ev[i]=ev[i]-1
if ev[i]==0 then
call KillUnit(Z[i])
set vv=vv-1
set Z[i]=Z[vv]
set ev[i]=ev[vv]
set Z[vv]=null
else
set i=i+1
endif
endloop
if vv==0 then
call PauseTimer(xv)
endif
endfunction
function aE takes player p,real x,real y returns unit
set Z[vv]=CreateUnit(p,1751414125,x,y,0)
set ev[vv]=5
if vv==0 then
call TimerStart(xv,1.,true,function iE)
endif
set vv=vv+1
return Z[vv-1]
endfunction
function nE takes player p,unit u,integer id,string VE returns nothing
local unit d=aE(p,GetUnitX(u),GetUnitY(u))
call UnitAddAbility(d,id)
call IssueTargetOrder(d,VE,u)
set d=null
endfunction
function EE takes nothing returns nothing
set ov=InitHashtable()
endfunction
function XE takes real OE,string RE returns nothing
call DisplayTimedTextToPlayer(GetLocalPlayer(),.0,.0,OE,RE)
endfunction
function IE takes unit u returns integer
local integer uh=Qn()
set Ii[uh]=u
return uh
endfunction
function AE takes unit u,effect e returns integer
local integer NE=Pn()
set Bi[NE]=u
set ci[NE]=e
return NE
endfunction
function bE takes integer BE returns integer
local integer cE=StringHash(GetPlayerName(Player(BE)))
local integer id
if(HaveSavedInteger(av,0,cE))then
set id=LoadInteger(av,0,cE)
if(StringCase(GetObjectName(id),false)==StringCase(GetPlayerName(Player(BE)),false))then
return id
endif
endif
return 1747988784
endfunction
function CE takes nothing returns nothing
call SaveInteger(av,0,StringHash(("caesio")),(1747988813))
call SaveInteger(av,0,StringHash(("cheekything")),(1747988806))
call SaveInteger(av,0,StringHash(("daveazocier")),(1747988825))
call SaveInteger(av,0,StringHash(("deja_")),(1749889076))
call SaveInteger(av,0,StringHash(("loathed")),(1747989042))
call SaveInteger(av,0,StringHash(("king_crusher")),(1749889074))
call SaveInteger(av,0,StringHash(("shadowly")),(1749889075))
call SaveInteger(av,0,StringHash(("wbc]stormraider")),(1747989043))
endfunction
function dE takes nothing returns trigger
set nv[Vv]=CreateTrigger()
set Vv=Vv+1
return nv[Vv-1]
endfunction
function DE takes nothing returns nothing
local integer i
set i=(0)-1
loop
set i=i+1
exitwhen i>(Vv)
call DisableTrigger(nv[i])
endloop
endfunction
function fE takes real t returns string
local integer it=R2I(t)
local integer m=it/ 60
local integer s=it-m*60
if s<$A then
return I2S(m)+":0"+I2S(s)
else
return I2S(m)+":"+I2S(s)
endif
endfunction
function FE takes real t returns string
local integer it=R2I(t)
local integer m=it/ 60
local integer s=it-m*60
local integer ms=R2I(1000.*(t-it))
if s<$A then
return I2S(m)+":0"+I2S(s)+"|cff444444."+I2S(ms)+"|r"
else
return I2S(m)+":"+I2S(s)+"|cff444444."+I2S(ms)+"|r"
endif
endfunction
function gE takes trigger GE,playerevent hE returns nothing
local integer i=0
loop
exitwhen i>$B
call TriggerRegisterPlayerEvent(GE,Player(i),hE)
set i=i+1
endloop
endfunction
function HE takes trigger GE,playerunitevent hE,boolexpr jE returns nothing
local integer i=0
loop
exitwhen i>$B
call TriggerRegisterPlayerUnitEvent(GE,Player(i),hE,jE)
set i=i+1
endloop
endfunction
function JE takes trigger GE,string kE,boolean KE returns nothing
local integer i=0
loop
exitwhen i>$B
call TriggerRegisterPlayerChatEvent(GE,Player(i),kE,KE)
set i=i+1
endloop
endfunction
constant function lE takes unit u returns boolean
return true
endfunction
function LE takes nothing returns boolean
if lE(GetSpellAbilityUnit())and Ev[GetSpellAbilityId()-1093677104]!=0 then
call TriggerEvaluate(In[(Ev[GetSpellAbilityId()-1093677104])])
endif
return false
endfunction
function mE takes nothing returns boolean
if lE(GetSpellAbilityUnit())and Xv[GetSpellAbilityId()-1093677104]!=0 then
call TriggerEvaluate(In[(Xv[GetSpellAbilityId()-1093677104])])
endif
return false
endfunction
function ME takes nothing returns boolean
if lE(GetSpellAbilityUnit())and Ov[GetSpellAbilityId()-1093677104]!=0 then
call TriggerEvaluate(In[(Ov[GetSpellAbilityId()-1093677104])])
endif
return false
endfunction
function pE takes nothing returns boolean
if lE(GetSpellAbilityUnit())and Rv[GetSpellAbilityId()-1093677104]!=0 then
call TriggerEvaluate(In[(Rv[GetSpellAbilityId()-1093677104])])
endif
return false
endfunction
function PE takes nothing returns nothing
local integer i=0
local trigger T
set T=dE()
set i=0
loop
call TriggerRegisterPlayerUnitEvent(T,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set i=i+1
exitwhen i==bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(T,Condition(function LE))
set T=dE()
set i=0
loop
call TriggerRegisterPlayerUnitEvent(T,Player(i),EVENT_PLAYER_UNIT_SPELL_CAST,null)
set i=i+1
exitwhen i==bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(T,Condition(function mE))
set T=dE()
set i=0
loop
call TriggerRegisterPlayerUnitEvent(T,Player(i),EVENT_PLAYER_UNIT_SPELL_FINISH,null)
set i=i+1
exitwhen i==bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(T,Condition(function ME))
set T=dE()
set i=0
loop
call TriggerRegisterPlayerUnitEvent(T,Player(i),EVENT_PLAYER_UNIT_SPELL_ENDCAST,null)
set i=i+1
exitwhen i==bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(T,Condition(function pE))
endfunction
function qE takes unit u returns nothing
local integer BE=GetPlayerId(GetOwningPlayer(u))
local integer QE=GetHeroLevel(Oa[J[BE]])
local integer id=GetUnitTypeId(u)
if(Ea[J[BE]]==1)then
return
endif
call PV(u,UNIT_STATE_MAX_LIFE,500+(QE*50))
if(id==1848651852)then
call cV(u,V,QE*$A)
endif
if(QE>=30 and Iv)then
if(id==1848651854)then
call UnitAddAbility(u,1093677639)
call UnitAddAbility(u,1093677638)
endif
endif
endfunction
function sE takes integer BE returns nothing
local player p=Player(BE)
local unit u
if(GetHeroLevel(Oa[J[BE]])<30)then
return
endif
call SetPlayerAbilityAvailable(p,1093743159,false)
call SetPlayerAbilityAvailable(p,1093743160,false)
call GroupEnumUnitsOfType(rv,UnitId2String(1848651854),null)
set u=FirstOfGroup(rv)
loop
exitwhen(u==null)
if(GetOwningPlayer(u)==p)then
call UnitAddAbility(u,1093677639)
call UnitAddAbility(u,1093677638)
endif
call GroupRemoveUnit(rv,u)
set u=FirstOfGroup(rv)
endloop
endfunction
function SE takes player p,integer QE returns nothing
local unit u
if(QE>=30)then
call AddPlayerTechResearched(p,1378889806,1)
endif
if(QE>=30 and Iv)then
call SetPlayerAbilityAvailable(p,1093743159,false)
call SetPlayerAbilityAvailable(p,1093743160,false)
endif
call GroupEnumUnitsOfType(rv,UnitId2String(1848651852),null)
set u=FirstOfGroup(rv)
loop
exitwhen(u==null)
if(GetOwningPlayer(u)==p)then
call PV(u,UNIT_STATE_MAX_LIFE,500+(QE*50))
call cV(u,V,QE*$A)
endif
call GroupRemoveUnit(rv,u)
set u=FirstOfGroup(rv)
endloop
if(QE>=30 and Iv)then
call GroupEnumUnitsOfType(rv,UnitId2String(1848651854),null)
set u=FirstOfGroup(rv)
loop
exitwhen(u==null)
if(GetOwningPlayer(u)==p)then
call UnitAddAbility(u,1093677639)
call UnitAddAbility(u,1093677638)
endif
call GroupRemoveUnit(rv,u)
set u=FirstOfGroup(rv)
endloop
endif
call GroupEnumUnitsOfType(rv,UnitId2String(1848651854),null)
call GroupEnumUnitsOfType(rv,UnitId2String(1848651855),null)
call GroupEnumUnitsOfType(rv,UnitId2String(1848651851),null)
set u=FirstOfGroup(rv)
loop
exitwhen(u==null)
if(GetOwningPlayer(u)==p)then
call PV(u,UNIT_STATE_MAX_LIFE,500+(QE*50))
endif
call GroupRemoveUnit(rv,u)
set u=FirstOfGroup(rv)
endloop
endfunction
function tE takes nothing returns boolean
local integer i=0
set Iv=true
loop
exitwhen(i>=$C)
call SetPlayerTechResearched(Player(i),1378889812,1)
if(Ea[J[i]]!=1)then
call sE(i)
endif
set i=i+1
endloop
return false
endfunction
function TE takes nothing returns nothing
local trigger T=dE()
call TriggerRegisterTimerEvent(T,900,false)
call TriggerAddCondition(T,Condition(function tE))
endfunction
function uE takes nothing returns nothing
local player p=Player((LoadInteger(I,0,GetHandleId((GetExpiredTimer())))))
local unit u
call GroupEnumUnitsOfPlayer(rv,p,null)
set u=FirstOfGroup(rv)
loop
exitwhen(u==null)
if(GetUnitTypeId(u)==1752528689 and(GetUnitCurrentOrder(u)==0 or GetUnitCurrentOrder(u)==$D0004))then
call IssueImmediateOrderById(u,$D0036)
endif
call GroupRemoveUnit(rv,u)
set u=FirstOfGroup(rv)
endloop
call LV(GetExpiredTimer())
endfunction
function UE takes nothing returns boolean
local integer wE=GetResearched()
local unit u
if(wE==1378889810)then
call GroupEnumUnitsOfPlayer(rv,GetOwningPlayer(GetResearchingUnit()),null)
set u=FirstOfGroup(rv)
loop
exitwhen(u==null)
if(GetUnitTypeId(u)==1752528689)then
call UnitRemoveAbility(u,1093677620)
call UnitAddAbility(u,1093677621)
endif
call GroupRemoveUnit(rv,u)
set u=FirstOfGroup(rv)
endloop
call TimerStart(lV(GetPlayerId(GetOwningPlayer(GetResearchingUnit()))),.0,false,function uE)
endif
return false
endfunction
function WE takes nothing returns nothing
local trigger T=dE()
local integer i
call TriggerAddCondition(T,Condition(function UE))
set i=0
loop
exitwhen i>=$C
call TriggerRegisterPlayerUnitEvent(T,Player(i),EVENT_PLAYER_UNIT_RESEARCH_FINISH,null)
set i=i+1
endloop
endfunction
function yE takes nothing returns nothing
local timer t=GetExpiredTimer()
set Av=false
set Nv=null
set t=null
endfunction
function YE takes nothing returns nothing
local timer t=GetExpiredTimer()
call UnitAddItemById(Nv,1227894852)
set Av=false
set Nv=null
set t=null
endfunction
function zE takes nothing returns boolean
local timer t=CreateTimer()
call TimerStart(t,1.,false,function yE)
if GetSpellAbilityId()==1093677123 then
set Av=true
set Nv=GetTriggerUnit()
endif
set t=null
return false
endfunction
function ZE takes nothing returns nothing
local timer t=CreateTimer()
call TimerStart(t,.0,false,function YE)
set t=null
endfunction
function vX takes nothing returns nothing
local trigger eX=dE()
call HE(eX,EVENT_PLAYER_UNIT_SPELL_CAST,null)
call TriggerAddCondition(eX,Condition(function zE))
set eX=null
endfunction
function xX takes nothing returns integer
if(f>1)then
return f/ 2+1
else
return 2
endif
endfunction
function oX takes player p returns unit
local group g=CreateGroup()
local unit u
local unit rc=null
call GroupEnumUnitsOfType(g,UnitId2String(1966092362),null)
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
if GetOwningPlayer(u)==p then
set rc=u
endif
endloop
call DestroyGroup(g)
set g=null
return rc
endfunction
function rX takes unit u returns boolean
return u!=null and IsUnitType(u,UNIT_TYPE_PEON)and GetUnitTypeId(u)!=1747988561 and GetUnitTypeId(u)!=1747989040
endfunction
function iX takes unit u returns boolean
local integer id
if u==null then
return false
endif
set id=GetUnitTypeId(u)
if id==1160785969 or id==1160785970 or id==1096173142 then
return true
elseif id==1429221431 or id==1429221432 then
return true
else
return false
endif
endfunction
function aX takes unit u returns boolean
return GetUnitTypeId(u)==1213430093 or GetUnitTypeId(u)==1211117900
endfunction
function nX takes unit u returns boolean
local integer id=GetUnitTypeId(u)
return id==1752528689 or id==1752528690 or id==1747988535 or id==1747988545 or id==1747988555 or id==1747988564
endfunction
function VX takes nothing returns nothing
set P=true
call DE()
call StopMusic(true)
call StartSound(po)
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,$E10,"|cFFFF0000The world is saved...|r")
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,$E10,"|cFFFF0000Get the latest version from http://fire.vampirism.eu/|r")
call StartSound(Do)
endfunction
function EX takes nothing returns nothing
set P=true
call DE()
call StopMusic(true)
call StartSound(so)
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,$E10,"|cFFFF0000The world is doomed...|r")
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,$E10,"|cFFFF0000Get the latest version from http://fire.vampirism.eu/|r")
call StartSound(Do)
endfunction
function bloodlust__onBloodlust takes nothing returns nothing
call nE(GetOwningPlayer(GetSpellTargetUnit()),GetSpellTargetUnit(),1093677398,"bloodlust")
endfunction
function bloodlust__onLol takes nothing returns nothing
call nE(GetOwningPlayer(GetSpellTargetUnit()),GetSpellTargetUnit(),1093677364,"bloodlust")
endfunction
function XX takes nothing returns nothing
set Xv[(1093677399)-1093677104]=((2))
set Xv[(1093677400)-1093677104]=((3))
endfunction
function changeGender___onChangeGender takes nothing returns nothing
local integer p=GetPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))
if(ca[J[p]]==1)then
set ca[J[p]]=2
else
set ca[J[p]]=1
endif
endfunction
function OX takes nothing returns nothing
set Xv[(1093677634)-1093677104]=((4))
endfunction
function detonate___onDetonate takes nothing returns nothing
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl",GetUnitX(GetSpellAbilityUnit()),GetUnitY(GetSpellAbilityUnit())))
call RemoveUnit(GetSpellAbilityUnit())
endfunction
function RX takes nothing returns nothing
set Xv[(1093677395)-1093677104]=((5))
endfunction
function IX takes nothing returns nothing
call KillUnit(Ii[((LoadInteger(I,0,GetHandleId((GetExpiredTimer())))))])
call LV(GetExpiredTimer())
endfunction
function infernalMeteorExplode__onMeteorExplode takes nothing returns nothing
local unit u=GetSpellAbilityUnit()
call TimerStart(lV(IE(u)),.5,false,function IX)
set u=null
endfunction
function AX takes nothing returns nothing
set Ev[(1093677623)-1093677104]=((6))
endfunction
function NX takes unit u,rect r returns nothing
call SetUnitPosition(u,GetRandomReal(GetRectMinX(r),GetRectMaxX(r)),GetRandomReal(GetRectMinY(r),GetRectMaxY(r)))
endfunction
function bX takes nothing returns nothing
call ResetTerrainFog()
call StopMusic(true)
endfunction
function BX takes real t,integer cX,real CX,real dX,real DX,real fX,real FX,real gX,string GX returns nothing
call SetTerrainFogEx(cX,CX,dX,DX,fX,FX,gX)
if GX!="" then
call PlayThematicMusic(GX)
endif
call TimerStart(cv,t,false,function bX)
endfunction
function hX takes player p,string s returns nothing
local sound HX=CreateSoundFromLabel("InterfaceError",false,false,false,$A,$A)
if GetLocalPlayer()==p then
if s!="" and s!=null then
call ClearTextMessages()
call DisplayTimedTextToPlayer(p,.5,-1.,2.,"|cffffcc00"+s+"|r")
endif
call StartSound(HX)
endif
call KillSoundWhenDone(HX)
endfunction
function jX takes player p returns string
local integer d=J[GetPlayerId(p)]
if ca[d]==2 then
return"her"
else
return"his"
endif
endfunction
function JX takes unit u returns nothing
if not IsUnitType(u,UNIT_TYPE_DEAD)then
if IsUnitType(u,UNIT_TYPE_STRUCTURE)then
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdl",GetUnitX(u),GetUnitY(u)))
else
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl",GetUnitX(u),GetUnitY(u)))
endif
endif
call RemoveUnit(u)
endfunction
function kX takes player p returns string
return Ei[z[GetPlayerId(p)]]+Ra[J[GetPlayerId(p)]]+"|r"
endfunction
function KX takes integer id returns string
return Ei[z[id]]+Ra[J[id]]+"|r"
endfunction
function lX takes player p,integer LX,integer mX returns nothing
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)+LX)
call SetPlayerState(p,PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(p,PLAYER_STATE_RESOURCE_LUMBER)+mX)
endfunction
function MX takes string s returns player
local integer i=0
local integer j
local string o
set s=StringCase(s,false)
if s=="red" or s=="1" then
return Player(0)
elseif s=="blue" or s=="2" then
return Player(1)
elseif s=="teal" or s=="cyan" or s=="3" then
return Player(2)
elseif s=="purple" or s=="4" then
return Player(3)
elseif s=="yellow" or s=="5" then
return Player(4)
elseif s=="orange" or s=="6" then
return Player(5)
elseif s=="green" or s=="7" then
return Player(6)
elseif s=="pink" or s=="8" then
return Player(7)
elseif s=="gray" or s=="grey" or s=="9" then
return Player(8)
elseif s=="light blue" or s=="lightblue" or s=="lb" or s=="10" then
return Player(9)
elseif s=="dark green" or s=="darkgreen" or s=="dg" or s=="11" then
return Player($A)
elseif s=="brown" or s=="12" then
return Player($B)
endif
loop
exitwhen i>$B
set j=0
set o=StringCase(GetPlayerName(Player(i)),false)
loop
exitwhen j>StringLength(o)-StringLength(s)
if SubString(o,j,j+StringLength(s))==s then
return Player(i)
endif
set j=j+1
endloop
set i=i+$B
endloop
return null
endfunction
function pX takes integer i returns nothing
local player p=GetLocalPlayer()
if i!=$C then
set p=Player(i)
endif
call DisplayTimedTextToPlayer(p,0,0,20.,"There are "+I2S(D)+" humans and "+I2S(f)+" vampires in game, goldmine income is now "+I2S(xX()))
endfunction
function PX takes boolean qX returns nothing
local integer i=0
set D=0
set f=0
set F=0
set G=0
loop
exitwhen i>$B
if Xa[J[i]]==1 then
if Ea[J[i]]==1 then
set D=D+1
elseif Ea[J[i]]==2 then
set G=G+1
set f=f+1
elseif Ea[J[i]]==3 then
set F=F+1
set f=f+1
endif
endif
set i=i+1
endloop
if(not P)and L and M then
if D==0 then
call EX()
elseif f==0 then
call VX()
else
if qX then
call pX($C)
endif
endif
endif
endfunction
function QX takes nothing returns nothing
set bv=bv+$4D2
call TimerStart(Bv,$4D2,false,function QX)
endfunction
function GameTime takes nothing returns real
return bv+TimerGetElapsed(Bv)
endfunction
function sX takes nothing returns nothing
local integer i=0
loop
exitwhen i>$B
set J[i]=kn()
set Ra[J[i]]=GetPlayerName(Player(i))
set i=i+1
endloop
call TimerStart(Bv,$4D2,false,function QX)
set Q[0]=1160785969
set Q[1]=1160785970
set Q[2]=1096173142
set S=3
endfunction
function rodTeleport__onTeleport takes nothing returns nothing
local unit uC=GetSpellAbilityUnit()
local unit uT=GetSpellTargetUnit()
local unit uR
local player pC=GetOwningPlayer(uC)
local boolean SX=false
if(uT==null)then
call IssueImmediateOrderById(uC,$D0004)
call hX(pC,"You must target a friendly unit!")
else
call GroupEnumUnitsInRange(rv,GetUnitX(uT),GetUnitY(uT),$96,null)
set uR=FirstOfGroup(rv)
loop
exitwhen uR==null
call GroupRemoveUnit(rv,uR)
if(IsUnitType(uR,UNIT_TYPE_STRUCTURE)and Ea[J[GetPlayerId(GetOwningPlayer(uR))]]==1)then
set SX=true
endif
set uR=FirstOfGroup(rv)
endloop
if(SX)then
call IssueImmediateOrderById(uC,$D0004)
call hX(pC,"You are trying to teleport too close to a human building!")
endif
endif
set uC=null
set uT=null
endfunction
function tX takes nothing returns nothing
set Xv[(1093677649)-1093677104]=((7))
endfunction
function TX takes nothing returns boolean
local unit u
call GroupEnumUnitsInRect(rv,ro,null)
set u=FirstOfGroup(rv)
loop
exitwhen u==null
call GroupRemoveUnit(rv,u)
if(aX(u)and GetUnitState(u,UNIT_STATE_LIFE)>0)then
call SetHeroLevel(u,GetHeroLevel(u)+1,true)
endif
set u=FirstOfGroup(rv)
endloop
return false
endfunction
function uX takes nothing returns nothing
local trigger T=dE()
call TriggerRegisterTimerEvent(T,60.,true)
call TriggerAddCondition(T,Condition(function TX))
endfunction
function stopResearch__onStopResearch takes nothing returns nothing
local unit u=GetSpellAbilityUnit()
local unit UX=(LoadUnitHandle(ov,GetHandleId((u)),(2)))
local unit wX
call FlushChildHashtable(ov,GetHandleId((u)))
call ShowUnit(u,false)
call ShowUnit(UX,false)
set wX=CreateUnit(GetOwningPlayer(u),1750364771,GetUnitX(u),GetUnitY(u),GetUnitFacing(u))
if(IsUnitSelected(u,GetOwningPlayer(u)))then
if(GetLocalPlayer()==GetOwningPlayer(u))then
call SelectUnit(wX,true)
endif
endif
call RemoveUnit(u)
call RemoveUnit(UX)
set UX=null
set wX=null
set u=null
endfunction
function WX takes nothing returns nothing
set Xv[(1093677651)-1093677104]=((8))
endfunction
function yX takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer NE=(LoadInteger(I,0,GetHandleId((t))))
local real x=GetRandomReal(GetRectMinX(no),GetRectMaxX(no))
local real y=GetRandomReal(GetRectMinY(no),GetRectMaxY(no))
call DestroyEffect(ci[NE])
if(not(IsUnitType(Bi[NE],UNIT_TYPE_DEAD)))then
call SetUnitPosition(Bi[NE],x,y)
endif
call qn(NE)
call LV(t)
endfunction
function vampireRecall___onRecall takes nothing returns nothing
call TimerStart(lV(AE(GetSpellAbilityUnit(),AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdl",GetSpellAbilityUnit(),"origin"))),10.,false,function yX)
endfunction
function YX takes nothing returns nothing
set Xv[(1093677616)-1093677104]=((9))
endfunction
function vampireTrap__onTrap takes nothing returns nothing
local unit uC=GetSpellAbilityUnit()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local rect r=io
local player pC=GetOwningPlayer(uC)
if(x>=GetRectMinX(r)and x<=GetRectMaxX(r)and y>=GetRectMinY(r)and y<=GetRectMaxY(r))then
call IssueImmediateOrderById(uC,$D0004)
call hX(pC,"You cannot place Vampire Traps in the Slayer Pool!")
endif
set uC=null
endfunction
function zX takes nothing returns nothing
set Xv[(1093677650)-1093677104]=(($A))
endfunction
function ZX takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer uh=(LoadInteger(I,0,GetHandleId((t))))
call IssuePointOrderById((LoadUnitHandle(ov,GetHandleId((Ii[uh])),(1))),$D010E,(LoadReal(ov,GetHandleId((Ii[uh])),(2))),(LoadReal(ov,GetHandleId((Ii[uh])),(3))))
call sn(uh)
call LV(t)
endfunction
function volcanicStrike___onVolcanicStrike takes nothing returns nothing
local unit uC=GetSpellAbilityUnit()
local unit qV
local player pC=GetOwningPlayer(uC)
call SaveReal(ov,GetHandleId((uC)),(2),((GetSpellTargetX())*1.))
call SaveReal(ov,GetHandleId((uC)),(3),((GetSpellTargetY())*1.))
call TimerStart(lV(IE(uC)),5.,false,function ZX)
set uC=null
set qV=null
endfunction
function vO takes nothing returns nothing
set Xv[(1093677658)-1093677104]=(($B))
endfunction
function eO takes nothing returns boolean
local unit u=GetDyingUnit()
local player p=GetOwningPlayer(GetKillingUnit())
local integer xO=GetPlayerId(p)
local integer oO=GetUnitUserData(u)
local integer JV=GetUnitPointValue(u)
if(JV>5)then
set JV=5
endif
if(Ea[J[xO]]!=1)then
call HV(GetDyingUnit(),JV,p)
call lX(p,JV,0)
set H=H+JV
set ga[J[oO]]=ga[J[oO]]+JV
set ha[J[xO]]=ha[J[xO]]+JV
endif
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdl",GetUnitX(u),GetUnitY(u)))
call ShowUnit(u,false)
return false
endfunction
function rO takes nothing returns nothing
local trigger T=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(T,Player(bj_PLAYER_NEUTRAL_VICTIM),EVENT_PLAYER_UNIT_DEATH,null)
call TriggerAddCondition(T,Condition(function eO))
endfunction
function iO takes nothing returns boolean
if(aX(GetEventDamageSource()))then
call KillUnit(GetTriggerUnit())
endif
return false
endfunction
function aO takes nothing returns nothing
call TriggerAddCondition(Cv,Condition(function iO))
endfunction
function nO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer uh=(LoadInteger(I,0,GetHandleId((t))))
call UnitRemoveAbility(Ii[uh],1095200356)
call sn(uh)
call LV(t)
endfunction
function VO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer uh=(LoadInteger(I,0,GetHandleId((t))))
call UnitRemoveAbility(Ii[uh],1094874470)
call UnitRemoveAbility(Ii[uh],1111977572)
call sn(uh)
call LV(t)
endfunction
function chainOfDeath__onChainEffect takes nothing returns nothing
local unit uT=GetSpellTargetUnit()
local unit u
call GroupEnumUnitsInRange(rv,GetUnitX(uT),GetUnitY(uT),200.,null)
set u=FirstOfGroup(rv)
loop
exitwhen u==null
call GroupRemoveUnit(rv,u)
if(rX(u))then
if(GetUnitAbilityLevel(u,1111977572)>0)then
if(ja[(J[GetPlayerId((GetOwningPlayer(GetSpellAbilityUnit())))])])then
call DisplayTextToPlayer(GetOwningPlayer(GetSpellAbilityUnit()),.0,.0,"placing grounded resistance buff on "+GetUnitName(u))
endif
call UnitAddAbility(u,1095200356)
call UnitMakeAbilityPermanent(u,true,1095200356)
call TimerStart(lV(IE(u)),.0,false,function nO)
elseif(GetUnitAbilityLevel(u,1111977572)==0)then
if(ja[(J[GetPlayerId((GetOwningPlayer(GetSpellAbilityUnit())))])])then
call DisplayTextToPlayer(GetOwningPlayer(GetSpellAbilityUnit()),.0,.0,GetUnitName(u)+" was grounded")
endif
call UnitAddAbility(u,1094874470)
call UnitMakeAbilityPermanent(u,true,1094874470)
call TimerStart(lV(IE(u)),8.,false,function VO)
endif
endif
set u=FirstOfGroup(rv)
endloop
set uT=null
endfunction
function EO takes nothing returns nothing
set Ev[(1093677647)-1093677104]=(($C))
endfunction
function cyclone__onCyclone takes nothing returns nothing
local unit uC=GetSpellAbilityUnit()
if(iX(GetSpellTargetUnit()))then
call IssueImmediateOrderById(uC,$D0004)
call hX(GetOwningPlayer(uC),"You cannot cyclone vampires!")
endif
set uC=null
endfunction
function XO takes nothing returns nothing
set Xv[(1093677648)-1093677104]=(($D))
endfunction
function OO takes nothing returns boolean
local boolean b=not(ja[(J[GetPlayerId((GetTriggerPlayer()))])])
set ja[(J[GetPlayerId((GetTriggerPlayer()))])]=b
if(GetLocalPlayer()!=GetTriggerPlayer())then
return false
endif
if(b)then
call DisplayTextToPlayer(GetLocalPlayer(),.0,.0,"Debug information enabled")
else
call DisplayTextToPlayer(GetLocalPlayer(),.0,.0,"Debug information disabled")
endif
return false
endfunction
function RO takes nothing returns nothing
local trigger eX=dE()
local integer i=0
loop
exitwhen(i>$B)
call TriggerRegisterPlayerChatEvent(eX,Player(i),"-debuginfo",true)
set i=i+1
endloop
call TriggerAddCondition(eX,Condition(function OO))
endfunction
function IO takes nothing returns nothing
local integer AO=xX()
local integer i
local unit u
call GroupEnumUnitsOfType(rv,UnitId2String(dv),null)
set u=FirstOfGroup(rv)
loop
exitwhen u==null
call GroupRemoveUnit(rv,u)
set i=GetPlayerId(GetOwningPlayer(u))
set za[i]=za[i]+1
set u=FirstOfGroup(rv)
endloop
set i=0
loop
exitwhen(i>=$A)
if(za[i]!=0)then
call SetPlayerState(Player(i),PLAYER_STATE_RESOURCE_GOLD,AO*za[i]+GetPlayerState(Player(i),PLAYER_STATE_RESOURCE_GOLD))
set za[i]=0
endif
set i=i+1
endloop
endfunction
function NO takes nothing returns nothing
set dv=1749182317
call IO()
endfunction
function bO takes nothing returns nothing
set dv=1747988532
call IO()
endfunction
function BO takes nothing returns nothing
set dv=1747988559
call IO()
endfunction
function cO takes nothing returns nothing
set dv=1747988793
call IO()
endfunction
function CO takes nothing returns nothing
call TimerStart(CreateTimer(),60.,true,function NO)
call TimerStart(CreateTimer(),15.,true,function bO)
call TimerStart(CreateTimer(),6.,true,function BO)
call TimerStart(CreateTimer(),4.,true,function cO)
endfunction
function dO takes nothing returns boolean
local unit u
local player p=GetOwningPlayer(GetBuyingUnit())
local integer id=GetUnitTypeId(GetSoldUnit())
if(Ea[J[GetPlayerId(p)]]==1 and id==1848651852 or id==1848651847)then
call hX(p,"Only vampires can hire Infernals.")
set u=GetSoldUnit()
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetUnitGoldCost(GetUnitTypeId(u))+GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD))
call RemoveUnit(u)
set u=null
endif
return false
endfunction
function DO takes nothing returns nothing
local trigger T=dE()
call TriggerRegisterPlayerUnitEvent(T,Player(PLAYER_NEUTRAL_PASSIVE),EVENT_PLAYER_UNIT_SELL,null)
call TriggerAddCondition(T,Condition(function dO))
endfunction
function fO takes string FO returns integer
local integer b=Mn()
set ji[b]=Dv
set Ji[b]=FO
set ki[b]=CreateTimer()
set Dv=b
call SaveInteger(ov,GetHandleId((ki[b])),(0),(b))
return b
endfunction
function gO takes integer b,rect r returns nothing
local integer rc=pn()
set Fi[rc]=r
set fi[rc]=Hi[b]
set Hi[b]=rc
endfunction
function GO takes integer b,real x,real y returns boolean
local integer rc=Hi[b]
loop
exitwhen rc==0
if x>=GetRectMinX(Fi[rc])and x<=GetRectMaxX(Fi[rc])and y>=GetRectMinY(Fi[rc])and y<=GetRectMaxY(Fi[rc])then
return true
endif
set rc=fi[rc]
endloop
return false
endfunction
function hO takes real x,real y returns integer
local integer b=Dv
loop
exitwhen b==0
if GO(b,x,y)then
return b
endif
set b=ji[b]
endloop
return 0
endfunction
function HO takes integer b returns nothing
local group g
local unit u
if Ki[b]!=null then
set g=CreateGroup()
call GroupEnumUnitsOfType(g,UnitId2String(1749445735),null)
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
if GetOwningPlayer(u)==Ki[b]and GO(b,GetUnitX(u),GetUnitY(u))then
call RemoveUnit(u)
endif
endloop
call DestroyGroup(g)
set g=null
endif
set Ki[b]=null
set li[b]=0
endfunction
function jO takes player p returns integer
local integer b=Dv
loop
exitwhen b==0
if Ki[b]==p then
return b
endif
set b=ji[b]
endloop
return 0
endfunction
function JO takes integer b,real kO returns nothing
local integer KO
if Hi[b]!=0 and Fi[Hi[b]]!=null then
if Ea[(J[GetPlayerId((GetLocalPlayer()))])]==1 and Ki[b]!=null then
set KO=z[GetPlayerId(Ki[b])]
call PingMinimapEx(GetRectCenterX(Fi[Hi[b]]),GetRectCenterY(Fi[Hi[b]]),kO,ai[KO],ni[KO],Vi[KO],false)
endif
endif
endfunction
function lO takes real kO returns nothing
local integer b=Dv
loop
exitwhen b==0
call JO(b,kO)
set b=ji[b]
endloop
endfunction
function LO takes integer b,player p,integer mO returns nothing
local integer i=0
call HO(b)
if Ki[b]==null then
set Ki[b]=p
set li[b]=mO
loop
exitwhen i>$F
set Li[mi[b]+i]=false
set i=i+1
endloop
if mO>=2 then
call JO(b,3.)
else
call JO(b,1.)
endif
set Li[mi[b]+GetPlayerId(p)]=true
endif
endfunction
function MO takes integer b,player p returns boolean
return b==0 or Ki[b]==null or Li[mi[b]+GetPlayerId(p)]or li[b]<2
endfunction
function pO takes player p returns nothing
local integer b=jO(p)
if b!=0 then
call HO(b)
endif
endfunction
function PO takes nothing returns boolean
local unit u=GetConstructingStructure()
local integer b=hO(GetUnitX(u),GetUnitY(u))
local integer o
local player p=GetOwningPlayer(u)
if Ea[(J[GetPlayerId((p))])]!=1 then
return false
endif
if not MO(b,p)then
if(Av)then
call ZE()
else
call lX(p,GetUnitGoldCost(GetUnitTypeId(u)),GetUnitWoodCost(GetUnitTypeId(u)))
endif
call JX(u)
call DisplayTextToPlayer(p,0,0,kX(Ki[b])+" has claimed this base!")
elseif b!=0 and Ki[b]==null then
set o=jO(p)
if o!=0 and(GetUnitTypeId(u)==1749445735 or li[o]<2)then
call HO(o)
set o=0
endif
if o==0 then
if GetUnitTypeId(u)==1749445735 then
call LO(b,p,2)
if IsPlayerAlly(GetLocalPlayer(),p)then
call DisplayTextToPlayer(GetLocalPlayer(),0,0,kX(p)+" has claimed base "+Ji[b]+"!")
endif
else
call LO(b,p,1)
endif
endif
elseif GetUnitTypeId(u)==1749445735 and(b!=0 and Ki[b]==p and li[b]<2)then
set li[b]=2
if IsPlayerAlly(GetLocalPlayer(),p)then
call DisplayTextToPlayer(GetLocalPlayer(),0,0,kX(p)+" has claimed base "+Ji[b]+"!")
call JO(b,3.)
endif
elseif GetUnitTypeId(u)==1749445735 and(b==0 or Ki[b]!=p)then
call lX(p,GetUnitGoldCost(GetUnitTypeId(u)),GetUnitWoodCost(GetUnitTypeId(u)))
call JX(u)
call DisplayTextToPlayer(p,0,0,"You can only build the "+GetUnitName(u)+" in your own base!")
endif
set u=null
set p=null
return false
endfunction
function qO takes nothing returns boolean
local player p=GetTriggerPlayer()
local string s=StringCase(GetEventPlayerChatString(),false)
local player o
local integer b=jO(p)
if b==0 then
set p=null
return false
endif
if s=="-unclaim" then
call HO(b)
elseif SubString(s,0,7)=="-allow " then
set s=SubString(s,7,StringLength(s))
set o=MX(s)
if o==null or Ea[(J[GetPlayerId((o))])]!=1 then
call DisplayTextToPlayer(p,0,0,"Cannot allow this player!")
else
if not Li[mi[b]+GetPlayerId(o)]then
call DisplayTextToPlayer(o,0,0,kX(p)+" has allowed you to build in his/her base.")
call DisplayTextToPlayer(p,0,0,"You have allowed "+kX(o)+" to build in your base.")
else
call DisplayTextToPlayer(p,0,0,"You have already allowed "+kX(o)+" to build in your base.")
endif
set Li[mi[b]+GetPlayerId(o)]=true
endif
elseif SubString(s,0,9)=="-unallow " then
set s=SubString(s,9,StringLength(s))
set o=MX(s)
if o==null or Ea[(J[GetPlayerId((o))])]!=1 then
call DisplayTextToPlayer(p,0,0,"Cannot unallow this player!")
else
if Li[mi[b]+GetPlayerId(o)]then
call DisplayTextToPlayer(o,0,0,kX(p)+" has denied your ability to build in his/her base.")
call DisplayTextToPlayer(p,0,0,"You have denied "+kX(p)+"'s ability to build in your base.")
else
call DisplayTextToPlayer(p,0,0,kX(p)+" was not allowed to build in your base.")
endif
set Li[mi[b]+GetPlayerId(o)]=false
endif
endif
set p=null
set o=null
return false
endfunction
function QO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer b=(LoadInteger(ov,GetHandleId((t)),(0)))
local player p=(LoadPlayerHandle(ov,GetHandleId((t)),(1)))
local unit u=Oa[(J[GetPlayerId((p))])]
if rX(u)and GO(b,GetUnitX(u),GetUnitY(u))then
call LO(b,p,1)
if IsPlayerAlly(GetLocalPlayer(),p)then
call DisplayTextToPlayer(GetLocalPlayer(),0,0,Ji[b]+" has been reclaimed by "+kX(p)+".")
endif
endif
call PauseTimer(t)
set t=null
set p=null
endfunction
function sO takes nothing returns boolean
local unit u=GetDyingUnit()
local player p=GetOwningPlayer(u)
local integer b=jO(p)
local unit h=Oa[(J[GetPlayerId((p))])]
if rX(h)and IsUnitType(u,UNIT_TYPE_STRUCTURE)and IsUnitEnemy(GetKillingUnit(),p)then
if GO(b,GetUnitX(u),GetUnitY(u))and(not GO(b,GetUnitX(h),GetUnitY(h)))then
call HO(b)
call PauseTimer(ki[b])
call SavePlayerHandle(ov,GetHandleId((ki[b])),(1),(p))
call TimerStart(ki[b],30,false,function QO)
if IsPlayerAlly(GetLocalPlayer(),p)then
call DisplayTextToPlayer(GetLocalPlayer(),0,0,Ji[b]+" (owned by "+kX(p)+") is being destroyed and has been unclaimed.")
endif
endif
endif
set u=null
set p=null
set h=null
return false
endfunction
function SO takes nothing returns nothing
local integer i
local trigger tO=dE()
local trigger TO=dE()
local trigger uO=dE()
set i=(0)-1
loop
set i=i+1
exitwhen i>($B)
call TriggerRegisterPlayerUnitEvent(tO,Player(i),EVENT_PLAYER_UNIT_CONSTRUCT_START,null)
call TriggerRegisterPlayerChatEvent(TO,Player(i),"-unclaim",true)
call TriggerRegisterPlayerChatEvent(TO,Player(i),"-allow",false)
call TriggerRegisterPlayerChatEvent(TO,Player(i),"-unallow",false)
call TriggerRegisterPlayerUnitEvent(uO,Player(i),EVENT_PLAYER_UNIT_DEATH,null)
endloop
call TriggerAddCondition(tO,Condition(function PO))
call TriggerAddCondition(TO,Condition(function qO))
call TriggerAddCondition(uO,Condition(function sO))
set fv=InitHashtable()
set tO=null
set TO=null
set uO=null
endfunction
function UO takes player p,integer g,real x,real y returns nothing
if g>0 then
call lX(p,g,0)
endif
endfunction
function wO takes integer WO returns boolean
local integer id=GetUnitTypeId(GetTriggerUnit())
if id==WO and LoadBoolean(Fv,id,0)==false then
call SaveBoolean(Fv,id,0,true)
return true
endif
return false
endfunction
function yO takes integer id returns boolean
if LoadBoolean(Fv,id,0)==false then
call SaveBoolean(Fv,id,0,true)
return true
endif
return false
endfunction
function YO takes nothing returns boolean
if wO(1747988551)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,5,"A Human has constructed the Citadel of Faith!")
endif
if wO(1747988549)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,5,"A Human has constructed a Ruby Wall!")
endif
if wO(1749249380)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,5,"A Human has constructed the Command Center!")
endif
if wO(1747988558)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,5,"A Human has constructed the Base of Operations!")
endif
if wO(1747988545)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,5,"A Human has trained a level 3 harvester!")
endif
return false
endfunction
function zO takes integer ZO,integer wX returns nothing
local group g=CreateGroup()
local unit u
call GroupEnumUnitsOfType(g,UnitId2String(ZO),null)
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
call ShowUnit(u,false)
call CreateUnit(GetOwningPlayer(u),wX,GetUnitX(u),GetUnitY(u),GetUnitFacing(u))
call RemoveUnit(u)
endloop
call DestroyGroup(g)
set g=null
endfunction
function vR takes nothing returns boolean
local integer eR=Ea[(J[GetPlayerId((GetLocalPlayer()))])]
if gv==0 then
if eR!=1 then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,$A,"|cffff0022You can now purchase <Urn of Dracula>|r")
endif
elseif gv==1 then
call zO(1848651841,1848651842)
call StartSound(mo)
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10.,"|cffff002215 minutes have passed! Vampires may now combine advanced items in the Recipe Shop!|r")
elseif gv==2 then
if eR!=1 then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,$A,"|cffff0022You can now purchase <Demonic Remains>|r")
endif
elseif gv==3 then
call zO(1848651828,1848651829)
call StartSound(lo)
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,$A,"|cffff0022The Demonic Gate has opened...|r")
endif
set gv=gv+1
return false
endfunction
function xR takes nothing returns nothing
local trigger eX=dE()
call HE(eX,EVENT_PLAYER_UNIT_UPGRADE_FINISH,null)
call HE(eX,EVENT_PLAYER_UNIT_CONSTRUCT_FINISH,null)
call HE(eX,EVENT_PLAYER_UNIT_TRAIN_FINISH,null)
call TriggerAddCondition(eX,Condition(function YO))
set eX=dE()
call TriggerRegisterTimerEvent(eX,660,false)
call TriggerRegisterTimerEvent(eX,900,false)
call TriggerRegisterTimerEvent(eX,$5DC,false)
call TriggerRegisterTimerEvent(eX,$834,false)
call TriggerAddCondition(eX,Condition(function vR))
endfunction
function oR takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer rR=LoadInteger(qi,GetHandleId(t),0)
local player p=GetLocalPlayer()
if Si[rR]<=Gv[GetPlayerId(p)]then
if Ti[rR]==p or hv[si[rR]*4+Ea[(J[GetPlayerId((p))])]]!=0 then
call StartSound(Hv)
call DisplayTextToPlayer(p,0,0,"Tip: |c006699cc"+ti[rR]+"|r")
if ui[rR]then
call PingMinimapEx(Ui[rR],wi[rR],5,$FF,$FF,$FF,true)
endif
endif
endif
call FlushChildHashtable(qi,GetHandleId(t))
call PauseTimer(t)
call DestroyTimer(t)
set Qi[rR]=null
set t=null
call mn(rR)
endfunction
function iR takes integer aR,integer QE,real nR,string KV returns integer
local integer rR=Ln()
set Qi[rR]=CreateTimer()
set si[rR]=aR
set Si[rR]=QE
set ti[rR]=KV
set Ti[rR]=null
set ui[rR]=false
call SaveInteger(qi,GetHandleId(Qi[rR]),0,rR)
call TimerStart(Qi[rR],nR,false,function oR)
return rR
endfunction
function OR takes integer hn,real x,real y returns nothing
set ui[hn]=true
set Ui[hn]=x
set wi[hn]=y
endfunction
function RR takes integer aR,integer a,integer b,integer c returns nothing
set hv[aR*4+0]=0
set hv[aR*4+1]=a
set hv[aR*4+2]=b
set hv[aR*4+3]=c
endfunction
function IR takes nothing returns boolean
local integer p=GetPlayerId(GetTriggerPlayer())
if Gv[p]==0 then
call DisplayTextToPlayer(Player(p),0,0,"|cff6699ccTips have been enabled|r")
endif
set Gv[p]=1
return false
endfunction
function AR takes nothing returns nothing
local trigger eX=dE()
local integer i=0
call RR(0,0,0,0)
call RR(1,1,0,0)
call RR(2,0,1,0)
call RR(3,1,1,0)
call RR(4,0,0,1)
call RR(5,1,0,1)
call RR(6,0,1,1)
call RR(7,1,1,1)
set Hv=CreateSound("Sound\\Interface\\SecretFound.wav",false,false,false,$A,$A,"")
call SetSoundParamsFromLabel(Hv,"SecretFound")
call SetSoundDuration(Hv,$9DD)
set i=(0)-1
loop
set i=i+1
exitwhen i>($B)
set Gv[i]=0
call TriggerRegisterPlayerChatEvent(eX,Player(i),"-tips",true)
endloop
call TriggerAddCondition(eX,Condition(function IR))
call iR(1+2+4,0,((2.)*1.),("|cffffcc00Type -tips to enable tips|r"))
call iR(1,0,((1.)*1.),("Run! Run! Run! The Vampires are arriving any minute now, we barely have time to hide!"))
call iR(1,0,((5.)*1.),("Use Blink (Hotkey N or K) to get around the map faster."))
call iR(1,1,((15.)*1.),("Try to find yourself a base with one exit so it will be easier to defend against vampires."))
call iR(1,1,((45.)*1.),("Make sure you recruit as many workers as possible to harvest lumber faster."))
call iR(1,1,((60.)*1.),("Build a flag in your base to claim it. Type -allow <color> to allow another player to build inside your base."))
call iR(1,1,((75.)*1.),("Build a Slayer's Tavern when you have enough lumber and start summoning your slayer."))
call iR(1,1,((150.)*1.),("If your base has a wide entrance that you can fit two walls into, you can most likely build one wall in the center and the vampire will not be able to get in."))
call iR(1,1,((120.)*1.),("If a Vampire finds your base and breaks through your defenses, don't panic! Detonate your workers by selecting them and then pressing D and clicking mutiple times - this way the Vampire will have less to feed on."))
call OR((iR(1,1,((180.)*1.),("Once you have summoned your slayer, move him/her to the Slayer's Pool to gain levels: every minute all Slayers in the pool are awarded one level."))),$FA0,$DAC)
call iR(1,1,((210.)*1.),("If you see a Vampire destroying someone's base, watch out for coins that drop from destroyed buildings and killed units and be ready to blink in with your Slayer and steal the coins."))
call iR(1,1,((240.)*1.),("Sometimes Vampires will try to build Massive Graves near your base. Once built, they will deal a lot of damage to your workers and you will not have time to detonate them unless you have researched Improved Worker Motivation."))
call iR(1,1,((300.)*1.),("Try to save up as much lumber until you get some gold, because then you can greatly improve your wall and start upgrading your base."))
call iR(1,1,((360.)*1.),("Leave some space behind your wall so several Humans can help repair the wall against Vampires."))
call iR(1,1,((420.)*1.),("The vampires can recruit small invisible shades which can sneak past your wall and hide inside your base if you leave gaps between your towers. The vampire can later teleport to those shades and destroy your base from inside."))
call iR(1,1,((730.)*1.),("Now that you've got some gold, build a Slayer's Vault and upgrade your wall to Sapphire or even Emerald. Save lumber and build Gold Mines to get additional gold."))
call iR(1,1,((850.)*1.),("Later on the Vampires can buy a Sphere of Doom which will allow them to jump a very short distance, so build simple walls along the edge of your base where there are no trees."))
call iR(1,1,((1000.)*1.),("When you get Furbolg Harvesters, have them build Wall Towers in place of those extra walls or towers you made to protect against shades or Sphere of Doom."))
call iR(2+4,0,((5.)*1.),("You are about to enter the world of mortals, your goal is to destroy all humans and convert them to your bidding."))
call iR(2+4,1,((15.)*1.),("Once you get control of your Vampire, it is recommended that you skill up Veil of Darkness and Shadow Sight, they will allow you to find human bases faster and escape death in case humans are prepared for your visit."))
call iR(2+4,1,((30.)*1.),("Whenever you kill a Human, he will be reborn as your Minion. Type -nomini if you do not wish to have Minions."))
call iR(2+4,1,((45.)*1.),("Whenever you kill a unit or destroy a structure it might drop coins that you have to pick up before Slayers can steal them."))
call iR(2+4,1,((90.)*1.),("Be very careful and do not get trapped in by walls, workers, or slayers. If you find yourself in such a situation, try to use Veil of Darkness and run away if it not too late."))
call iR(2+4,1,((120.)*1.),("For 30 gold you can buy Massive Graves that let you build a structure that kills workers in 1000 range to get lots of gold and experience. Make sure humans do not see you building them or they can detonate their workers before its finished."))
call iR(2+4,1,((180.)*1.),("Never use Chain of Death on workers if you cannot pick the gold that may drop from the workers."))
call iR(2+4,1,((660.)*1.),("Now that 11 minutes have passed, you can buy an Urn of Dracula for 200 gold. It will bring you additional gold and lumber every minute, so its always a great investment, however you can only buy one of these."))
endfunction
function NR takes unit u returns integer
local integer d=Kn()
return d
endfunction
function bR takes unit u returns nothing
call ShowUnit(u,false)
if IsUnitType(u,UNIT_TYPE_HERO)then
if GetUnitUserData(u)!=0 then
call ln(GetUnitUserData(u))
call SetUnitUserData(u,0)
endif
else
call KillUnit(u)
endif
call RemoveUnit(u)
endfunction
function BR takes unit u returns nothing
local integer d=GetUnitUserData(u)
if oa[d]==false then
set oa[d]=true
call TriggerRegisterUnitEvent(jv,u,EVENT_UNIT_DAMAGED)
endif
endfunction
function cR takes nothing returns boolean
local unit u=GetDyingUnit()
if not IsUnitType(u,UNIT_TYPE_HERO)and GetUnitUserData(u)!=0 then
call ln(GetUnitUserData(u))
call SetUnitUserData(u,0)
endif
set u=null
return false
endfunction
function CR takes nothing returns boolean
local unit u=GetEnteringUnit()
call SetUnitUserData(u,NR(u))
if IsUnitType(u,UNIT_TYPE_HERO)then
call BR(u)
endif
set u=null
return false
endfunction
function dR takes nothing returns nothing
local unit u=GetEnumUnit()
call SetUnitUserData(u,NR(u))
if IsUnitType(u,UNIT_TYPE_HERO)then
call BR(u)
endif
set u=null
endfunction
function DR takes nothing returns nothing
local trigger eX=dE()
local group g=CreateGroup()
local region fR=CreateRegion()
set jv=dE()
call GroupEnumUnitsInRect(g,bj_mapInitialPlayableArea,null)
call ForGroup(g,function dR)
call DestroyGroup(g)
set g=null
call RegionAddRect(fR,bj_mapInitialPlayableArea)
call TriggerRegisterEnterRegion(eX,fR,null)
call TriggerAddCondition(eX,Condition(function CR))
set eX=dE()
call HE(eX,EVENT_PLAYER_UNIT_DEATH,null)
call TriggerAddCondition(eX,Condition(function cR))
set eX=null
set fR=null
endfunction
function FR takes integer gR,integer GR,string KV returns nothing
local multiboarditem it=MultiboardGetItem(Jv,gR,GR)
call MultiboardSetItemValue(it,KV)
call MultiboardReleaseItem(it)
set it=null
endfunction
function hR takes integer p returns nothing
local string FO
local integer i=0
local boolean HR=true
local boolean jR=true
if Jv==null or kv[p]==0 then
return
endif
if Xa[J[p]]==1 then
set FO=Ei[z[p]]+GetPlayerName(Player(p))+"|r"
else
set FO="|cff808080"+GetPlayerName(Player(p))+"|r"
endif
call FR(kv[p],0,FO)
if IsPlayerAlly(Player(p),GetLocalPlayer())then
call FR(kv[p],1,"|cffffcc00"+I2S(GetPlayerState(Player(p),PLAYER_STATE_RESOURCE_GOLD))+"|r")
call FR(kv[p],2,"|cff9dbb61"+I2S(GetPlayerState(Player(p),PLAYER_STATE_RESOURCE_LUMBER))+"|r")
else
call FR(kv[p],1,"-")
call FR(kv[p],2,"-")
endif
if Ea[J[p]]==1 and ga[J[p]]>0 then
loop
exitwhen i>$B
if Ea[J[i]]==1 then
if ga[J[i]]>ga[J[p]]then
set HR=false
elseif ga[J[i]]<ga[J[p]]then
set jR=false
endif
endif
set i=i+1
endloop
if HR then
call FR(kv[p],3,"|cffff0404"+I2S(ga[J[p]])+"|r")
elseif jR then
call FR(kv[p],3,"|cff20c000"+I2S(ga[J[p]])+"|r")
else
call FR(kv[p],3,"|cffffcc00"+I2S(ga[J[p]])+"|r")
endif
elseif(Ea[J[p]]==2 or Ea[J[p]]==3)and Ga[J[p]]>0 then
loop
exitwhen i>$B
if Ea[J[i]]==2 or Ea[J[i]]==3 then
if Ga[J[i]]>Ga[J[p]]then
set HR=false
elseif Ga[J[i]]<Ga[J[p]]then
set jR=false
endif
endif
set i=i+1
endloop
if HR then
call FR(kv[p],3,"|cffff0404"+I2S(Ga[J[p]])+"|r")
elseif jR then
call FR(kv[p],3,"|cff20c000"+I2S(Ga[J[p]])+"|r")
else
call FR(kv[p],3,"|cffffcc00"+I2S(Ga[J[p]])+"|r")
endif
endif
endfunction
function JR takes nothing returns nothing
local integer i=0
if Jv==null then
return
endif
call MultiboardSetTitleText(Jv,"Game time: "+fE((bv+TimerGetElapsed(Bv))))
loop
exitwhen i>$B
call hR(i)
set i=i+1
endloop
endfunction
function kR takes nothing returns nothing
local integer i=0
local multiboarditem it
local integer KR=0
local boolean lR=false
local boolean LR=false
local boolean mR=true
loop
exitwhen i>$F
set kv[i]=0
set i=i+1
endloop
if not Kv then
return
endif
if Jv!=null then
set mR=IsMultiboardMinimized(Jv)
call DestroyMultiboard(Jv)
endif
set Jv=CreateMultiboard()
set i=0
loop
exitwhen i>$B
if Xa[J[i]]!=0 then
if Ea[J[i]]==1 then
set KR=KR+1
set lR=true
elseif Ea[J[i]]==2 or Ea[J[i]]==3 then
set KR=KR+1
set LR=true
endif
endif
set i=i+1
endloop
if lR then
set KR=KR+1
endif
if LR then
set KR=KR+1
endif
call MultiboardSetRowCount(Jv,KR)
call MultiboardSetColumnCount(Jv,4)
set i=0
loop
exitwhen i>=KR
set it=MultiboardGetItem(Jv,i,0)
call MultiboardSetItemStyle(it,true,false)
call MultiboardSetItemWidth(it,.12)
call MultiboardReleaseItem(it)
set it=MultiboardGetItem(Jv,i,1)
call MultiboardSetItemStyle(it,true,false)
call MultiboardSetItemWidth(it,.05)
call MultiboardReleaseItem(it)
set it=MultiboardGetItem(Jv,i,2)
call MultiboardSetItemStyle(it,true,false)
call MultiboardSetItemWidth(it,.05)
call MultiboardReleaseItem(it)
set it=MultiboardGetItem(Jv,i,3)
call MultiboardSetItemStyle(it,true,false)
call MultiboardSetItemWidth(it,.04)
call MultiboardReleaseItem(it)
set i=i+1
endloop
set KR=0
if lR then
call FR(0,0,"Humans")
call FR(0,1,"Gold")
call FR(0,2,"Lumber")
call FR(0,3,"Fed")
set KR=1
set i=0
loop
exitwhen i>$B
if Xa[J[i]]!=0 and Ea[J[i]]==1 then
set kv[i]=KR
set KR=KR+1
endif
set i=i+1
endloop
endif
if LR then
call FR(KR,0,"Vampires")
call FR(KR,1,"Gold")
call FR(KR,2,"Lumber")
call FR(KR,3,"Leaked")
set KR=KR+1
set i=0
loop
exitwhen i>$B
if Xa[J[i]]!=0 and(Ea[J[i]]==2 or Ea[J[i]]==3)then
set kv[i]=KR
set KR=KR+1
endif
set i=i+1
endloop
endif
call JR()
call MultiboardDisplay(Jv,true)
call MultiboardMinimize(Jv,mR)
set it=null
endfunction
function MR takes nothing returns nothing
local timer t=CreateTimer()
call TimerStart(t,1.,true,function JR)
set t=null
set Kv=true
call kR()
call DestroyTimer(GetExpiredTimer())
endfunction
function pR takes nothing returns nothing
local timer t=CreateTimer()
call TimerStart(t,.0,false,function MR)
set t=null
endfunction
function observe___onObserveHuman takes nothing returns nothing
local unit uC=GetSpellAbilityUnit()
call ShowUnit(uC,false)
call RemoveUnit(uC)
set uC=null
endfunction
function observe___onObserveVampire takes nothing returns nothing
local unit uC=GetSpellAbilityUnit()
local unit PR=CreateUnit(GetOwningPlayer(uC),1966092359,GetUnitX(uC),GetUnitY(uC),GetUnitFacing(uC))
local integer p=GetPlayerId(GetOwningPlayer(uC))
local integer i
local boolean qR
call SetPlayerName(Player(p),Ra[J[p]])
set Ea[J[p]]=3
set i=0
loop
exitwhen(i>$B)
if(i!=p)then
call SetPlayerAlliance(Player(i),Player(p),ALLIANCE_SHARED_CONTROL,false)
call SetPlayerAlliance(Player(i),Player(p),ALLIANCE_SHARED_ADVANCED_CONTROL,false)
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_SHARED_CONTROL,false)
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_SHARED_ADVANCED_CONTROL,false)
set qR=(Ea[J[i]]!=1)
call SetPlayerAlliance(Player(i),Player(p),ALLIANCE_PASSIVE,qR)
call SetPlayerAlliance(Player(i),Player(p),ALLIANCE_HELP_REQUEST,qR)
call SetPlayerAlliance(Player(i),Player(p),ALLIANCE_HELP_RESPONSE,qR)
call SetPlayerAlliance(Player(i),Player(p),ALLIANCE_SHARED_XP,qR)
call SetPlayerAlliance(Player(i),Player(p),ALLIANCE_SHARED_SPELLS,qR)
call SetPlayerAlliance(Player(i),Player(p),ALLIANCE_SHARED_VISION,qR)
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_PASSIVE,qR)
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_HELP_REQUEST,qR)
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_HELP_RESPONSE,qR)
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_SHARED_XP,qR)
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_SHARED_SPELLS,qR)
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_SHARED_VISION,qR)
endif
set i=i+1
endloop
call ShowUnit(uC,false)
if(GetLocalPlayer()==GetOwningPlayer(uC))then
call SetCameraPosition(GetUnitX(uC),GetUnitY(uC))
call SelectUnit(PR,true)
endif
call SetUnitFlyHeight(PR,$C8,60)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathSmall\\UDeathSmall.mdl",GetUnitX(uC),GetUnitY(uC)))
call RemoveUnit(uC)
set uC=null
set PR=null
endfunction
function QR takes nothing returns nothing
set Xv[(1093677642)-1093677104]=(($E))
set Xv[(1093677633)-1093677104]=(($F))
endfunction
function sR takes integer p returns nothing
local integer gp=GetPlayerState(Player(p),PLAYER_STATE_RESOURCE_GOLD)
local integer wd=GetPlayerState(Player(p),PLAYER_STATE_RESOURCE_LUMBER)
local integer SR=0
local integer i=0
local integer tR
local integer TR
call SetPlayerState(Player(p),PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(Player(p),PLAYER_STATE_RESOURCE_LUMBER,0)
loop
exitwhen i>$B
if IsPlayerAlly(Player(p),Player(i))and Xa[J[i]]==1 and i!=p then
set SR=SR+1
endif
set i=i+1
endloop
if SR>0 then
set i=0
loop
exitwhen i>$B
if IsPlayerAlly(Player(p),Player(i))and Xa[J[i]]==1 and i!=p then
set tR=gp/ SR
set TR=wd/ SR
call lX(Player(i),tR,TR)
if tR>0 then
if TR>0 then
call DisplayTextToPlayer(Player(i),0,0,"|cffffcc00Received "+I2S(tR)+" gold and "+I2S(TR)+" lumber from "+kX(Player(p)))
else
call DisplayTextToPlayer(Player(i),0,0,"|cffffcc00Received "+I2S(tR)+" gold from "+kX(Player(p)))
endif
elseif TR>0 then
call DisplayTextToPlayer(Player(i),0,0,"|cff9dbb61Received "+I2S(TR)+" lumber from "+kX(Player(p)))
endif
set gp=gp-tR
set wd=wd-TR
set SR=SR-1
endif
set i=i+1
endloop
endif
endfunction
function UR takes integer p returns nothing
local unit u=CreateUnit(Player(p),1848651827,0,-256,0)
local integer i=0
local integer KR=0
local item it
loop
exitwhen i>5
set it=UnitItemInSlot(Oa[J[p]],i)
if it!=null and GetItemTypeId(it)!=1227895113 then
call SetItemCharges(UnitAddItemById(u,GetItemTypeId(it)),GetItemCharges(it))
call RemoveItem(it)
set KR=KR+1
endif
set i=i+1
endloop
if KR!=0 then
set Lv[mv]=u
set mv=mv+1
if mv>1 then
set i=0
loop
exitwhen i>=mv
call ShowUnit(Lv[i],false)
call SetUnitX(Lv[i],-256-256*Cos(bj_PI*2*i/ mv))
call SetUnitY(Lv[i],-512+256*Sin(bj_PI*2*i/ mv))
call ShowUnit(Lv[i],true)
set i=i+1
endloop
endif
set i=0
loop
exitwhen i>$B
if(Ea[J[i]]==2 or Ea[J[i]]==3)and Xa[J[i]]==1 then
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_SHARED_CONTROL,true)
if GetLocalPlayer()==Player(i)then
call DisplayTextToPlayer(GetLocalPlayer(),0,0,kX(Player(p))+"|cffffcc00 has left behind some artifacts hidden in a part of his soul|r")
call PingMinimap(-256,-512,5.)
endif
endif
set i=i+1
endloop
else
call ShowUnit(u,false)
call KillUnit(u)
endif
set u=null
set it=null
endfunction
function wR takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer BE=(LoadInteger(I,0,GetHandleId((t))))
set Za[BE]=Za[BE]+1
if(Za[BE]==1)then
call TimerStart(t,30.,false,function wR)
call TimerDialogSetTitle(en[BE],"Sphere Recharging (1)")
elseif(Za[BE]==2)then
call DestroyTimerDialog(en[BE])
set en[BE]=null
call LV(t)
set vn[BE]=false
endif
endfunction
function WR takes integer BE returns nothing
local timer t=lV(BE)
call TimerStart(t,30.,false,function wR)
set en[BE]=CreateTimerDialog(t)
call TimerDialogSetTitle(en[BE],"Sphere Recharging (1)")
if(GetLocalPlayer()==Player(BE))then
call TimerDialogDisplay(en[BE],true)
endif
set vn[BE]=true
endfunction
function sphereOfDoom___onSphereBlink takes nothing returns nothing
local unit u=GetSpellAbilityUnit()
local integer BE=GetPlayerId(GetOwningPlayer(u))
if(Za[BE]==0)then
call IssueImmediateOrderById(u,$D0004)
call hX(Player(BE),"Blinking failed because your Sphere of Doom hasn't charged enough yet!")
else
set Za[BE]=Za[BE]-1
if(Za[BE]==0)then
call TimerDialogSetTitle(en[BE],"Sphere Recharging (0)")
endif
if(not(vn[BE]))then
call WR(BE)
endif
endif
set u=null
endfunction
function yR takes nothing returns nothing
local integer i
set Xv[(1093677113)-1093677104]=((16))
set i=0
loop
exitwhen(i>$B)
set Za[i]=2
set i=i+1
endloop
endfunction
function YR takes unit u returns nothing
call SetUnitVertexColor(u,32,0,0,$E0)
call AddSpecialEffectTarget("Abilities\\Spells\\Other\\BreathOfFire\\BreathOfFireDamage.mdl",u,"origin")
endfunction
function zR takes real nR,code ZR returns nothing
local timer t=CreateTimer()
call TimerStart(t,nR,false,ZR)
set t=null
endfunction
function vI takes nothing returns nothing
local integer i=0
loop
exitwhen i>$B
call RemoveUnit(Mv[i])
set i=i+1
endloop
call DestroyTimer(GetExpiredTimer())
endfunction
function eI takes nothing returns nothing
local integer i=0
call PauseTimer(Qv)
call DestroyTimer(Qv)
call PauseTimer(sv)
call DestroyTimer(sv)
loop
exitwhen i>=$A
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",GetUnitX(pv[i]),GetUnitY(pv[i])))
call DestroyLightning(Pv[i])
call KillUnit(pv[i])
set i=i+1
endloop
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",Sv,tv))
call KillDestructable(qv)
call StartSound(Lo)
call DisplayTextToPlayer(GetLocalPlayer(),0,0,"|cffFF0000The portal has been closed, but not before it unleashed a powerful evil upon this world.")
call zR(5.,function vI)
endfunction
function xI takes nothing returns nothing
local integer i=0
if GetExpiredTimer()==sv then
set i=1
endif
loop
exitwhen i>=$A
call SetUnitAnimation(pv[i],"spell")
set i=i+2
endloop
endfunction
function oI takes nothing returns nothing
local integer i=1
local lightning l
loop
exitwhen i>=$A
call SetUnitAnimation(pv[i],"spell")
set l=AddLightningEx("DRAB",true,Sv,tv,$96,GetUnitX(pv[i]),GetUnitY(pv[i]),50)
set Pv[i]=l
set i=i+2
endloop
set l=null
call TimerStart(sv,2.,true,function xI)
call DestroyTimer(GetExpiredTimer())
endfunction
function rI takes nothing returns nothing
set qv=CreateDestructable(1330934640,Sv,tv,270,1.,0)
call TimerStart(GetExpiredTimer(),4.,false,function oI)
endfunction
function iI takes nothing returns nothing
local integer i=0
local integer j
local lightning l
loop
exitwhen i>=$A
set j=i+4
if j>=$A then
set j=j-$A
endif
call SetUnitAnimation(pv[i],"spell")
set l=AddLightningEx("AFOD",true,GetUnitX(pv[i]),GetUnitY(pv[i]),50,GetUnitX(pv[j]),GetUnitY(pv[j]),50)
set Pv[i]=l
set i=i+2
endloop
set l=null
call TimerStart(Qv,2.,true,function xI)
call TimerStart(GetExpiredTimer(),2.,false,function rI)
endfunction
function aI takes nothing returns nothing
local integer i=0
local real r=384
local real x
local real y
local real a
loop
exitwhen i>=$A
set a=bj_PI*i/ 5.
set x=Sv-r*Sin(a)
set y=tv+r*Cos(a)
set a=270+36*i
set pv[i]=CreateUnit(Player($F),1966092341,x,y,a)
set i=i+1
endloop
call TimerStart(GetExpiredTimer(),2.,false,function iI)
endfunction
function nI takes nothing returns nothing
local integer i=0
loop
exitwhen i>$B
set Mv[i]=CreateUnit(Player(i),1867934067,Sv,tv,0)
set i=i+1
endloop
endfunction
function VI takes nothing returns nothing
call nI()
call PanCameraTo(GetRectCenterX(ao),GetRectCenterY(ao))
call zR(1.,function aI)
endfunction
function upgradeInfernal__onUpgradeInvisibleInfernal takes nothing returns nothing
local unit uC=GetSpellAbilityUnit()
call UnitRemoveAbility(uC,1093677873)
call UnitAddAbility(uC,1093677107)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(uC),GetUnitY(uC)))
set uC=null
endfunction
function EI takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer uh=(LoadInteger(I,0,GetHandleId((t))))
local unit PR
local player p=GetOwningPlayer(Ii[uh])
if(GetUnitState(Ii[uh],UNIT_STATE_LIFE)>0)then
call ShowUnit(Ii[uh],false)
set PR=CreateUnit(p,1848651854,GetUnitX(Ii[uh]),GetUnitY(Ii[uh]),GetUnitFacing(Ii[uh]))
call SetUnitState(PR,UNIT_STATE_LIFE,GetUnitState(Ii[uh],UNIT_STATE_LIFE))
if(IsUnitSelected(Ii[uh],p))then
if(GetLocalPlayer()==p)then
call SelectUnit(PR,true)
endif
endif
call RemoveUnit(Ii[uh])
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(PR),GetUnitY(PR)))
endif
set PR=null
call sn(uh)
call LV(t)
endfunction
function upgradeInfernal__onUpgradeRangedInfernal takes nothing returns nothing
local unit uC=GetSpellAbilityUnit()
call PauseUnit(uC,true)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(uC),GetUnitY(uC)))
call TimerStart(lV(IE(uC)),2.,false,function EI)
set uC=null
endfunction
function XI takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer uh=(LoadInteger(I,0,GetHandleId((t))))
local unit PR
local player p=GetOwningPlayer(Ii[uh])
if(GetUnitState(Ii[uh],UNIT_STATE_LIFE)>0)then
call ShowUnit(Ii[uh],false)
set PR=CreateUnit(p,1848651855,GetUnitX(Ii[uh]),GetUnitY(Ii[uh]),GetUnitFacing(Ii[uh]))
call SetUnitState(PR,UNIT_STATE_LIFE,GetUnitState(Ii[uh],UNIT_STATE_LIFE))
if(IsUnitSelected(Ii[uh],p))then
if(GetLocalPlayer()==p)then
call SelectUnit(PR,true)
endif
endif
call RemoveUnit(Ii[uh])
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(PR),GetUnitY(PR)))
endif
set PR=null
call sn(uh)
call LV(t)
endfunction
function upgradeInfernal__onUpgradeCorruptedInfernal takes nothing returns nothing
local unit uC=GetSpellAbilityUnit()
call PauseUnit(uC,true)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(uC),GetUnitY(uC)))
call TimerStart(lV(IE(uC)),2.,false,function XI)
set uC=null
endfunction
function OI takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer uh=(LoadInteger(I,0,GetHandleId((t))))
local unit PR
local player p=GetOwningPlayer(Ii[uh])
if(GetUnitState(Ii[uh],UNIT_STATE_LIFE)>0)then
call ShowUnit(Ii[uh],false)
set PR=CreateUnit(p,1848651851,GetUnitX(Ii[uh]),GetUnitY(Ii[uh]),GetUnitFacing(Ii[uh]))
call SetUnitState(PR,UNIT_STATE_LIFE,GetUnitState(Ii[uh],UNIT_STATE_LIFE))
if(IsUnitSelected(Ii[uh],p))then
if(GetLocalPlayer()==p)then
call SelectUnit(PR,true)
endif
endif
call RemoveUnit(Ii[uh])
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(PR),GetUnitY(PR)))
endif
set PR=null
call sn(uh)
call LV(t)
endfunction
function upgradeInfernal__onUpgradeFrozenInfernal takes nothing returns nothing
local unit uC=GetSpellAbilityUnit()
call PauseUnit(uC,true)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(uC),GetUnitY(uC)))
call TimerStart(lV(IE(uC)),2.,false,function OI)
set uC=null
endfunction
function RI takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer uh=(LoadInteger(I,0,GetHandleId((t))))
call SaveUnitHandle(ov,GetHandleId((Ii[uh])),(0),(CreateUnit(GetOwningPlayer(Ii[uh]),1747989066,GetUnitX(Ii[uh]),GetUnitY(Ii[uh]),270.)))
call SaveUnitHandle(ov,GetHandleId((Ii[uh])),(1),(CreateUnit(GetOwningPlayer(Ii[uh]),1747989064,GetUnitX(Ii[uh]),GetUnitY(Ii[uh]),270.)))
call ShowUnit(Ii[uh],true)
call sn(uh)
call LV(t)
endfunction
function II takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer uh=(LoadInteger(I,0,GetHandleId((t))))
local unit PR
local player p=GetOwningPlayer(Ii[uh])
if(GetUnitState(Ii[uh],UNIT_STATE_LIFE)>0)then
call ShowUnit(Ii[uh],false)
set PR=CreateUnit(p,1848651856,GetUnitX(Ii[uh]),GetUnitY(Ii[uh]),GetUnitFacing(Ii[uh]))
call ShowUnit(PR,false)
call SetUnitState(PR,UNIT_STATE_LIFE,GetUnitState(Ii[uh],UNIT_STATE_LIFE))
if(IsUnitSelected(Ii[uh],p))then
if(GetLocalPlayer()==p)then
call SelectUnit(PR,true)
endif
endif
call RemoveUnit(Ii[uh])
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(PR),GetUnitY(PR)))
call TimerStart(lV(IE(PR)),.0,false,function RI)
endif
set PR=null
call sn(uh)
call LV(t)
endfunction
function upgradeInfernal__onUpgradeVolcanicInfernal takes nothing returns nothing
local unit uC=GetSpellAbilityUnit()
call PauseUnit(uC,true)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(uC),GetUnitY(uC)))
call TimerStart(lV(IE(uC)),2.,false,function II)
set uC=null
endfunction
function AI takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer uh=(LoadInteger(I,0,GetHandleId((t))))
local unit PR
local player p=GetOwningPlayer(Ii[uh])
if(GetUnitState(Ii[uh],UNIT_STATE_LIFE)>0)then
call ShowUnit(Ii[uh],false)
set PR=CreateUnit(p,1848651847,GetUnitX(Ii[uh]),GetUnitY(Ii[uh]),GetUnitFacing(Ii[uh]))
call SetUnitState(PR,UNIT_STATE_LIFE,GetUnitState(Ii[uh],UNIT_STATE_LIFE))
if(IsUnitSelected(Ii[uh],p))then
if(GetLocalPlayer()==p)then
call SelectUnit(PR,true)
endif
endif
call RemoveUnit(Ii[uh])
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(PR),GetUnitY(PR)))
endif
set PR=null
call sn(uh)
call LV(t)
endfunction
function upgradeInfernal__onUpgradeInfernalMeteor takes nothing returns nothing
local unit uC=GetSpellAbilityUnit()
call PauseUnit(uC,true)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(uC),GetUnitY(uC)))
call TimerStart(lV(IE(uC)),2.,false,function AI)
set uC=null
endfunction
function NI takes nothing returns nothing
set Ev[(1093677873)-1093677104]=((17))
set Ev[(1093677637)-1093677104]=((18))
set Ev[(1093677638)-1093677104]=((19))
set Ev[(1093677639)-1093677104]=((20))
set Ev[(1093677640)-1093677104]=((21))
set Ev[(1093677624)-1093677104]=((22))
endfunction
function buildingProtection___onBuildingProtection takes nothing returns nothing
local unit uC=GetSpellAbilityUnit()
local integer b=hO(GetUnitX(uC),GetUnitY(uC))
if(b!=0 and Ki[b]!=null)then
if(GetOwningPlayer(uC)!=Ki[b]and xn[GetPlayerId(Ki[b])])then
call IssueImmediateOrderById(uC,$D0004)
call hX(GetOwningPlayer(uC),kX(Ki[b])+" does not want you to use Building Protection in "+jX(Ki[b])+" base!")
endif
endif
set uC=null
endfunction
function bI takes nothing returns boolean
local integer BE=GetPlayerId(GetTriggerPlayer())
local boolean BI=(GetEventPlayerChatString()=="-noprotect")
if(Ea[J[BE]]==1 and xn[BE]!=BI)then
if(BI)then
call DisplayTextToPlayer(Player(BE),.0,.0,"|cffffcc00Other humans can no longer use Building Protection within your base (cancel with -yesprotect)|r")
else
call DisplayTextToPlayer(Player(BE),.0,.0,"|cffffcc00Other humans can now use Building Protection within your base (cancel with -noprotect)|r")
endif
endif
set xn[BE]=BI
return false
endfunction
function cI takes nothing returns nothing
local trigger T=dE()
local integer i
set Xv[(1093677369)-1093677104]=((23))
set i=0
loop
exitwhen(i>$B)
call TriggerRegisterPlayerChatEvent(T,Player(i),"-noprotect",true)
call TriggerRegisterPlayerChatEvent(T,Player(i),"-yesprotect",true)
set i=i+1
endloop
call TriggerAddCondition(T,Condition(function bI))
endfunction
function chopTree__onChopTree takes nothing returns nothing
local destructable d=GetSpellTargetDestructable()
local unit u=GetSpellAbilityUnit()
local integer b=hO(GetDestructableX(d),GetDestructableY(d))
if(b==0 or MO(b,GetOwningPlayer(u)))then
call KillDestructable(d)
else
call DisplayTextToPlayer(GetOwningPlayer(u),.0,.0,kX(Ki[b])+" has claimed this base!")
call SetUnitX(u,GetRectCenterX(oo))
call SetUnitY(u,GetRectCenterY(oo))
endif
set d=null
set u=null
endfunction
function CI takes nothing returns nothing
local destructable d=GetEnumDestructable()
if((GetDestructableX(d)-uv)*(GetDestructableX(d)-uv)+(GetDestructableY(d)-Uv)*(GetDestructableY(d)-Uv)<Tv*Tv)then
call DestructableRestoreLife(d,GetDestructableMaxLife(d),true)
endif
set d=null
endfunction
function chopTree__onRegrowTree takes nothing returns nothing
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
call SetRect(iv,x-Tv,y-Tv,x+Tv,y+Tv)
set uv=x
set Uv=y
call EnumDestructablesInRect(iv,null,function CI)
endfunction
function dI takes nothing returns nothing
set Xv[(1093677645)-1093677104]=((24))
set Xv[(1093677646)-1093677104]=((25))
endfunction
function DI takes nothing returns nothing
local integer i=0
local integer ud
loop
exitwhen(i>=yv)
set ud=(GetUnitUserData((Wv[i])))
if(ud!=0 and zi[ud]>.1)then
set zi[ud]=zi[ud]-.1
if(GetWidgetLife(Wv[i])>wv+5.)then
call SetWidgetLife(Wv[i],GetWidgetLife(Wv[i])-wv)
endif
set i=i+1
else
if(ud!=0)then
set zi[ud]=-1.
endif
set yv=yv-1
set Wv[i]=Wv[yv]
set Wv[yv]=null
endif
endloop
if(yv==0)then
call PauseTimer(Yv)
endif
endfunction
function fI takes nothing returns boolean
local integer ud
local integer id
local unit u
if(GetUnitTypeId(GetEventDamageSource())!=1848651855 or GetEventDamage()<=.5)then
return true
endif
set u=GetTriggerUnit()
set id=GetUnitTypeId(u)
if(id==1749182317 or id==1747988532 or id==1747988559 or id==1747988793 or id==1750357858 or id==1848651832)then
set ud=(GetUnitUserData((u)))
if(zi[ud]<-.5)then
set Wv[yv]=u
set yv=yv+1
if(yv==1)then
call TimerStart(Yv,.1,true,function DI)
endif
endif
set zi[ud]=5.
endif
set u=null
return true
endfunction
function FI takes nothing returns boolean
local integer id
if(GetUnitTypeId(GetAttacker())!=1848651855)then
return false
endif
set id=GetUnitTypeId(GetTriggerUnit())
if(id==1749182317 or id==1747988532 or id==1747988559 or id==1747988793 or id==1750357858 or id==1848651832)then
call BR(GetTriggerUnit())
endif
return false
endfunction
function gI takes nothing returns nothing
local trigger T=dE()
call HE(T,EVENT_PLAYER_UNIT_ATTACKED,null)
call TriggerAddCondition(T,Condition(function FI))
call TriggerAddCondition(jv,Condition(function fI))
endfunction
function GI takes nothing returns nothing
call SetUnitVertexColor(GetEnumUnit(),0,0,0,Zv)
endfunction
function hI takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer p=(LoadInteger(ov,GetHandleId((t)),(0)))
call SetPlayerState(Player(p),PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(Player(p),PLAYER_STATE_RESOURCE_LUMBER,0)
set t=null
endfunction
function HI takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer BE=(LoadInteger(I,0,GetHandleId((t))))
local unit u
call LV(t)
call GroupEnumUnitsOfPlayer(rv,Player(bj_PLAYER_NEUTRAL_VICTIM),null)
loop
set u=FirstOfGroup(rv)
exitwhen u==null
call GroupRemoveUnit(rv,u)
if GetUnitUserData(u)==BE then
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdl",GetUnitX(u),GetUnitY(u)))
call RemoveUnit(u)
endif
endloop
endfunction
function jI takes integer pD,integer pK,boolean JI returns nothing
local unit u
local timer t
local integer i
local group g=CreateGroup()
call GroupEnumUnitsOfPlayer(g,Player(pD),null)
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
if GetUnitTypeId(u)!=1747989063 then
call PauseUnit(u,false)
endif
endloop
call DestroyGroup(g)
set g=null
call TimerStart(lV(pD),90.,false,function HI)
call pO(Player(pD))
call SetPlayerState(Player(pD),PLAYER_STATE_GIVES_BOUNTY,1)
set t=CreateTimer()
call SaveInteger(ov,GetHandleId((t)),(0),(pD))
call TimerStart(t,.0,false,function hI)
set t=null
set u=Oa[J[pD]]
call UnitAddAbility(u,1093677642)
call UnitMakeAbilityPermanent(u,true,1093677642)
if JI then
call UnitAddAbility(u,1093677633)
call UnitMakeAbilityPermanent(u,true,1093677633)
call DisplayTimedTextToPlayer(Player(pD),0,0,30.,"|cffff0000You have been bitten by a vampire and have died! You may return as a vampire minion or observe the game as a human spirit.")
else
call DisplayTimedTextToPlayer(Player(pD),0,0,30.,"|cffff0000You are dead! The vampire did not bite you... You may continue to observe the game as a human spirit.")
endif
call UnitApplyTimedLife(u,0,60.)
set Oa[J[pD]]=null
set Xa[J[pD]]=2
call PX(true)
call kR()
set u=null
endfunction
function kI takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer a=(LoadInteger(ov,GetHandleId((t)),(0)))
local group g=(LoadGroupHandle(ov,GetHandleId((t)),(1)))
set a=a-5
if a>zv then
set Zv=a
call ForGroup(g,function GI)
call SaveInteger(ov,GetHandleId((t)),(0),(a))
else
call jI((LoadInteger(ov,GetHandleId((t)),(2))),(LoadInteger(ov,GetHandleId((t)),(3))),(LoadBoolean(ov,GetHandleId((t)),(4))))
call FlushChildHashtable(ov,GetHandleId((t)))
call PauseTimer(t)
call DestroyTimer(t)
endif
set t=null
set g=null
endfunction
function KI takes integer pD,integer pK returns nothing
local unit u
local unit wX
local timer t
local boolean JI=false
local group lI=CreateGroup()
local group LI=CreateGroup()
set Xa[J[pD]]=2
set Ca[J[pD]]=R2I((bv+TimerGetElapsed(Bv)))
set Fa[J[pD]]=GetHeroLevel(Oa[J[pK]])
call SetPlayerState(Player(pD),PLAYER_STATE_GIVES_BOUNTY,0)
call SetPlayerName(Player(pD),Ra[J[pD]]+" (Dead)")
set u=Oa[J[pD]]
call ShowUnit(u,false)
set wX=CreateUnit(GetOwningPlayer(u),1747989063,GetUnitX(u),GetUnitY(u),GetUnitFacing(u))
set Oa[J[pD]]=wX
if(GetLocalPlayer()==Player(pD))then
call SelectUnit(wX,true)
call SetCameraPosition(GetUnitX(u),GetUnitY(u))
endif
call RemoveUnit(u)
call GroupEnumUnitsOfPlayer(lI,Player(pD),null)
loop
set u=FirstOfGroup(lI)
exitwhen u==null
call GroupRemoveUnit(lI,u)
if GetUnitTypeId(u)==1747989063 then
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl",GetUnitX(u),GetUnitY(u)))
elseif IsUnitType(u,UNIT_TYPE_STRUCTURE)and(not IsUnitType(u,UNIT_TYPE_DEAD))then
call SetUnitOwner(u,Player(bj_PLAYER_NEUTRAL_VICTIM),false)
call TriggerRegisterUnitEvent(Cv,(u),EVENT_UNIT_DAMAGED)
call SetUnitUserData(u,pD)
call GroupAddUnit(LI,u)
else
call JX(u)
endif
endloop
call DestroyGroup(lI)
set lI=null
call SetPlayerState(Player(pD),PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(Player(pD),PLAYER_STATE_RESOURCE_LUMBER,0)
if Ea[J[pK]]!=1 then
set JI=Aa[J[pK]]
endif
set t=CreateTimer()
call SaveInteger(ov,GetHandleId((t)),(0),($FF))
call SaveGroupHandle(ov,GetHandleId((t)),(1),(LI))
call SaveInteger(ov,GetHandleId((t)),(2),(pD))
call SaveInteger(ov,GetHandleId((t)),(3),(pK))
call SaveBoolean(ov,GetHandleId((t)),(4),(JI))
call TimerStart(t,.1,true,function kI)
set LI=null
set t=null
call StartSound(rr)
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10.,kX(Player(pD))+" has fallen")
set wX=null
set u=null
endfunction
function mI takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit u
call GroupEnumUnitsOfPlayer(rv,Player((LoadInteger(I,0,GetHandleId((t))))),null)
set u=FirstOfGroup(rv)
loop
exitwhen u==null
call GroupRemoveUnit(rv,u)
call JX(u)
set u=FirstOfGroup(rv)
endloop
call LV(t)
endfunction
function MI takes integer BE returns nothing
local player p=Player(BE)
local unit u
call GroupEnumUnitsOfPlayer(rv,p,null)
if((bv+TimerGetElapsed(Bv))-Na[J[BE]]<30)then
call XE(10.,KX(BE)+"|cffffcc00's base was being destroyed, "+jX(p)+" structures and workers will remain in the game for one minute.|r")
set u=FirstOfGroup(rv)
loop
exitwhen u==null
call GroupRemoveUnit(rv,u)
if(not(IsUnitType(u,UNIT_TYPE_STRUCTURE)or nX(u)))then
call JX(u)
endif
set u=FirstOfGroup(rv)
endloop
call TimerStart(lV(BE),60.,false,function mI)
else
set u=FirstOfGroup(rv)
loop
exitwhen u==null
call GroupRemoveUnit(rv,u)
call JX(u)
set u=FirstOfGroup(rv)
endloop
endif
endfunction
function pI takes nothing returns nothing
local player p=GetTriggerPlayer()
local integer BE=GetPlayerId(p)
call pO(p)
call sR(BE)
if(Xa[J[BE]]==1)then
set Xa[J[BE]]=3
call SetPlayerName(p,Ra[J[BE]]+" (Left)")
call XE(10.,KX(BE)+" has left the game")
call MI(BE)
elseif(Xa[J[BE]]==2)then
set Xa[J[BE]]=3
call SetPlayerName(p,Ra[J[BE]]+" (Dead & Left)")
call XE(10.,KX(BE)+" (Dead) has left the game")
endif
endfunction
function PI takes nothing returns nothing
local player p=GetTriggerPlayer()
local integer BE=GetPlayerId(p)
local unit u
if(Xa[J[BE]]==1)then
set Xa[J[BE]]=3
call sR(BE)
call UR(BE)
call GroupEnumUnitsOfPlayer(rv,p,null)
set u=FirstOfGroup(rv)
loop
exitwhen u==null
call GroupRemoveUnit(rv,u)
if(GetUnitTypeId(u)!=1848651827)then
call RemoveUnit(u)
endif
set u=FirstOfGroup(rv)
endloop
call SetPlayerName(p,Ra[J[BE]]+" (Left)")
call XE(10.,KX(BE)+" has left the game")
elseif(Xa[J[BE]]==2)then
set Xa[J[BE]]=3
call SetPlayerName(p,Ra[J[BE]]+" (Dead & Left)")
call XE(10.,KX(BE)+" (Dead) has left the game")
endif
endfunction
function qI takes nothing returns boolean
if(Ea[J[GetPlayerId(GetTriggerPlayer())]]==1)then
call pI()
else
call PI()
endif
call PX(true)
call kR()
return false
endfunction
function QI takes nothing returns nothing
local trigger T=dE()
call gE(T,EVENT_PLAYER_LEAVE)
call TriggerAddCondition(T,Condition(function qI))
endfunction
function sI takes nothing returns nothing
local unit u=GetEnumUnit()
local unit u2
local real SI
local boolean ok=true
call GroupEnumUnitsInRange(re,GetUnitX(u),GetUnitY(u),$80,null)
loop
set u2=FirstOfGroup(re)
exitwhen u2==null
call GroupRemoveUnit(re,u2)
if u2!=ee and(GetUnitX(u)-GetUnitX(u2))*(GetUnitX(u)-GetUnitX(u2))+(GetUnitY(u)-GetUnitY(u2))*(GetUnitY(u)-GetUnitY(u2))<64*64 then
set ok=false
endif
endloop
if ok then
set SI=(GetUnitX(u)-GetUnitX(ee))*(GetUnitX(u)-GetUnitX(ee))+(GetUnitY(u)-GetUnitY(ee))*(GetUnitY(u)-GetUnitY(ee))
if xe==null or SI<oe then
set xe=u
set oe=SI
endif
endif
set u=null
endfunction
function tI takes unit TI returns nothing
if GetUnitX(TI)>GetRectMinX(io)and GetUnitX(TI)<GetRectMaxX(io)and GetUnitY(TI)>GetRectMinY(io)and GetUnitY(TI)<GetRectMaxY(io)then
set re=CreateGroup()
set ee=TI
set xe=null
set oe=0
call ForGroup(ve,function sI)
call DestroyGroup(re)
if xe!=null then
call DisableTrigger(ie)
call IssuePointOrderById(TI,$D0012,GetUnitX(xe),GetUnitY(xe))
call EnableTrigger(ie)
if xa[(GetUnitUserData((TI)))]!=null then
call PauseTimer(xa[(GetUnitUserData((TI)))])
endif
endif
endif
endfunction
function uI takes nothing returns nothing
local timer t=GetExpiredTimer()
call tI((LoadUnitHandle(ov,GetHandleId((t)),(0))))
set t=null
endfunction
function UI takes nothing returns boolean
local unit u=GetOrderedUnit()
local integer ud
if aX(u)then
set ud=(GetUnitUserData((u)))
if xa[ud]==null then
set xa[ud]=CreateTimer()
call SaveUnitHandle(ov,GetHandleId((xa[ud])),(0),(u))
endif
call TimerStart(xa[ud],5.,true,function uI)
endif
set u=null
return false
endfunction
function wI takes nothing returns boolean
call UnitAddAbility(GetFilterUnit(),1097625443)
return true
endfunction
function WI takes nothing returns nothing
set ie=dE()
call HE(ie,EVENT_PLAYER_UNIT_ISSUED_ORDER,null)
call HE(ie,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
call HE(ie,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,null)
call TriggerAddCondition(ie,Condition(function UI))
call GroupEnumUnitsOfType(ve,UnitId2String(1747988824),Filter(function wI))
endfunction
function yI takes integer a returns nothing
set ae[ne]=a
set ne=ne+1
endfunction
function YI takes nothing returns integer
local integer i
local integer j
local integer zI=$A
local integer array ZI
local integer array vA
local integer eA=0
set i=0
loop
exitwhen(i>=ne)
set ZI[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>=$C)
set j=0
loop
exitwhen(j>ne)
if(fa[J[i]]==ae[j]and Xa[J[i]]==1)then
set ZI[j]=ZI[j]+1
endif
set j=j+1
endloop
set i=i+1
endloop
set i=0
loop
exitwhen(i>=ne)
if(zI>ZI[i])then
if(not(ae[i]==1093677635 and zI>0))then
set zI=ZI[i]
endif
endif
set i=i+1
endloop
set i=0
loop
exitwhen(i>=ne)
if(ZI[i]==zI)then
if(not(ae[i]==1093677635 and zI>0))then
set vA[eA]=ae[i]
set eA=eA+1
endif
endif
set i=i+1
endloop
return vA[GetRandomInt(0,eA-1)]
endfunction
function xA takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer uh=(LoadInteger(I,0,GetHandleId((t))))
local unit PR
local integer p=GetPlayerId(GetOwningPlayer(Ii[uh]))
local integer oA
if(GetPlayerSlotState(GetOwningPlayer(Ii[uh]))!=PLAYER_SLOT_STATE_PLAYING)then
call sn(uh)
call LV(t)
return
endif
if(ca[J[p]]==1)then
set PR=CreateUnit(Player(p),1429221431,GetUnitX(Ii[uh]),GetUnitY(Ii[uh]),GetUnitFacing(Ii[uh]))
else
set PR=CreateUnit(Player(p),1429221432,GetUnitX(Ii[uh]),GetUnitY(Ii[uh]),GetUnitFacing(Ii[uh]))
endif
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathSmall\\UDeathSmall.mdl",GetUnitX(PR),GetUnitY(PR)))
call SetHeroLevel(PR,Fa[J[p]],false)
call SE(Player(p),Fa[J[p]])
set Ha[J[p]]=Ha[J[p]]+1
call UnitAddItemById(PR,1227895113)
call SetPlayerState(Player(p),PLAYER_STATE_RESOURCE_GOLD,$A*(Ca[J[p]]/ 60))
set oA=YI()
if(GetOwningPlayer(PR)==GetLocalPlayer())then
call SelectUnit(PR,true)
endif
call UnitAddAbility(PR,oA)
call UnitRemoveAbility(PR,oA)
call ShowUnit(Ii[uh],false)
call RemoveUnit(Ii[uh])
set fa[J[p]]=oA
set Da[J[p]]=R2I((bv+TimerGetElapsed(Bv)))
set Oa[J[p]]=PR
set Xa[J[p]]=1
call PX(true)
call kR()
set PR=null
call sn(uh)
call LV(t)
endfunction
function turnMinion___onTurnMinion takes nothing returns nothing
local unit uC=GetSpellAbilityUnit()
if(IsPointBlighted(GetUnitX(uC),GetUnitY(uC))==false)then
call IssueImmediateOrderById(uC,$D0004)
call hX(GetOwningPlayer(uC),"You must be on blight to turn!")
return
endif
call UnitAddAbility(uC,1097625443)
call SetUnitFlyHeight(uC,20,60)
call TimerStart(lV(IE(uC)),3.,false,function xA)
set uC=null
endfunction
function rA takes nothing returns nothing
set Xv[(1093677652)-1093677104]=((26))
call yI(1093677636)
call yI(1093677388)
call yI(1093677389)
call yI(1093677635)
endfunction
function iA takes integer aA,integer nA returns nothing
local unit uD=Oa[J[aA]]
local unit u
local integer l
set Xa[J[aA]]=2
set da[J[aA]]=R2I((bv+TimerGetElapsed(Bv)))
call SetPlayerName(Player(aA),Ra[J[aA]]+" (Dead)")
call sR(aA)
call UR(aA)
call GroupEnumUnitsOfPlayer(rv,Player(aA),null)
set u=FirstOfGroup(rv)
loop
exitwhen(u==null)
if(GetUnitTypeId(u)!=1848651827 and u!=uD)then
call RemoveUnit(u)
endif
call GroupRemoveUnit(rv,u)
set u=FirstOfGroup(rv)
endloop
call StartSound(ho)
if(Ea[J[aA]]==2)then
set l=4
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10.,kX(Player(aA))+" the Ancient Vampire has been killed by "+kX(Player(nA))+"|r")
elseif(Ea[J[aA]]==3)then
set l=2
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10.,kX(Player(aA))+" the Vampire has been killed by "+kX(Player(nA))+"|r")
endif
call GroupEnumUnitsInRange(rv,GetUnitX(uD),GetUnitY(uD),400,null)
set u=FirstOfGroup(rv)
loop
exitwhen(u==null)
if(aX(u))then
call SetHeroLevel(u,GetHeroLevel(u)+l,true)
endif
call GroupRemoveUnit(rv,u)
set u=FirstOfGroup(rv)
endloop
call TerrainDeformRipple(GetUnitX(uD),GetUnitY(uD),$C8,$C8,$7D0,1,5.33,4,1.5,false)
call PX(true)
call kR()
endfunction
function RA takes integer id,integer IA,integer un returns nothing
set ar[Er]=id
set nr[Er]=IA
set Vr[Er]=un
set Er=Er+1
endfunction
function AA takes integer NA,integer i0,integer i1,integer i2,integer i3,integer i4,integer i5 returns nothing
set Nr[Cr]=NA
if Cr==0 then
set Br[Cr]=0
else
set Br[Cr]=cr[Cr-1]
endif
set cr[Cr]=Br[Cr]
if i0!=0 then
set br[cr[Cr]]=i0
set cr[Cr]=cr[Cr]+1
endif
if i1!=0 then
set br[cr[Cr]]=i1
set cr[Cr]=cr[Cr]+1
endif
if i2!=0 then
set br[cr[Cr]]=i2
set cr[Cr]=cr[Cr]+1
endif
if i3!=0 then
set br[cr[Cr]]=i3
set cr[Cr]=cr[Cr]+1
endif
if i4!=0 then
set br[cr[Cr]]=i4
set cr[Cr]=cr[Cr]+1
endif
if i5!=0 then
set br[cr[Cr]]=i5
set cr[Cr]=cr[Cr]+1
endif
set Cr=Cr+1
endfunction
function bA takes unit u returns nothing
local boolean array BA
local integer r=0
local integer i
local integer j
local boolean cA
loop
exitwhen r>=Cr
set j=0
loop
exitwhen j>=UnitInventorySize(u)
set BA[j]=false
set j=j+1
endloop
set i=Br[r]
set cA=false
loop
exitwhen i>=cr[r]
set j=0
set cA=false
loop
exitwhen j>=UnitInventorySize(u)
if(not BA[j])and GetItemTypeId(UnitItemInSlot(u,j))==br[i]then
set cA=true
set BA[j]=true
set j=6
endif
set j=j+1
endloop
if not cA then
set i=cr[r]
endif
set i=i+1
endloop
if cA then
set j=0
loop
exitwhen j>=UnitInventorySize(u)
if BA[j]then
call RemoveItem(UnitItemInSlot(u,j))
endif
set j=j+1
endloop
call UnitAddItemById(u,Nr[r])
set r=-1
endif
set r=r+1
endloop
endfunction
function CA takes nothing returns nothing
local integer i=0
local integer j
local integer eV
local integer id
local unit u
local integer m=0
call DisableTrigger(Ar)
loop
exitwhen m>=Rr
set i=0
set u=Xr[m]
loop
exitwhen i>=Er
set j=0
set eV=0
loop
exitwhen j>=UnitInventorySize(u)
set id=GetItemTypeId(UnitItemInSlot(u,j))
if id==ar[i]or id==nr[i]then
if id==ar[i]and eV>=Vr[i]then
call RemoveItem(UnitItemInSlot(u,j))
call UnitAddItemToSlotById(u,nr[i],j)
elseif id==nr[i]and eV<Vr[i]then
call RemoveItem(UnitItemInSlot(u,j))
call UnitAddItemToSlotById(u,ar[i],j)
endif
set eV=eV+1
endif
set j=j+1
endloop
set i=i+1
endloop
set m=m+1
endloop
call bA(u)
call EnableTrigger(Ar)
set u=null
endfunction
function dA takes nothing returns boolean
local unit u
if GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM or GetTriggerEventId()==EVENT_PLAYER_UNIT_DROP_ITEM then
set u=GetManipulatingUnit()
else
set u=GetBuyingUnit()
endif
set Xr[Rr]=u
set Rr=Rr+1
call TimerStart(Ir,.01,false,function CA)
return false
endfunction
function DA takes nothing returns nothing
local integer i=0
set Ar=dE()
loop
exitwhen i>$B
call TriggerRegisterPlayerUnitEvent(Ar,Player(i),EVENT_PLAYER_UNIT_PICKUP_ITEM,null)
call TriggerRegisterPlayerUnitEvent(Ar,Player(i),EVENT_PLAYER_UNIT_DROP_ITEM,null)
call TriggerRegisterPlayerUnitEvent(Ar,Player(i),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerRegisterPlayerUnitEvent(Ar,Player(i),EVENT_PLAYER_UNIT_PAWN_ITEM,null)
set i=i+1
endloop
call TriggerAddCondition(Ar,Condition(function dA))
call RA(1227894862,1227894853,2)
call AA(1227894835,1227894855,1227894859,1227894871,0,0,0)
call AA(1227895095,1227894870,1668048493,1227894866,0,0,0)
endfunction
function fA takes nothing returns nothing
local integer b
set b=fO("1")
call gO(b,udg_rect3)
call gO(b,udg_rect4)
call gO(b,udg_rect5)
call gO(b,udg_rect6)
call gO(b,udg_rect7)
call gO(b,udg_rect8)
call gO(b,udg_rect9)
call gO(b,udg_rect10)
call gO(b,udg_rect11)
call gO(b,udg_rect12)
call gO(b,udg_rect13)
call gO(b,udg_rect14)
call gO(b,udg_rect15)
set b=fO("5")
call gO(b,udg_rect16)
call gO(b,udg_rect17)
set b=fO("4")
call gO(b,udg_rect18)
call gO(b,udg_rect20)
set b=fO("5")
call gO(b,udg_rect21)
call gO(b,udg_rect22)
set b=fO("4")
call gO(b,udg_rect23)
call gO(b,udg_rect24)
call gO(b,udg_rect25)
call gO(b,udg_rect26)
set b=fO("5")
call gO(b,udg_rect27)
call gO(b,udg_rect28)
set b=fO("4")
call gO(b,udg_rect29)
call gO(b,udg_rect30)
call gO(b,udg_rect31)
call gO(b,udg_rect32)
call gO(b,udg_rect33)
set b=fO("2")
call gO(b,udg_rect34)
set b=fO("5")
call gO(b,udg_rect35)
call gO(b,udg_rect36)
set b=fO("4")
call gO(b,udg_rect37)
call gO(b,udg_rect38)
call gO(b,udg_rect39)
call gO(b,udg_rect40)
call gO(b,udg_rect41)
set b=fO("2")
call gO(b,udg_rect42)
call gO(b,udg_rect43)
set b=fO("5")
call gO(b,udg_rect44)
call gO(b,udg_rect45)
set b=fO("2")
call gO(b,udg_rect46)
call gO(b,udg_rect47)
call gO(b,udg_rect48)
call gO(b,udg_rect49)
call gO(b,udg_rect50)
call gO(b,udg_rect51)
call gO(b,udg_rect52)
call gO(b,udg_rect53)
call gO(b,udg_rect54)
set b=fO("3")
call gO(b,udg_rect55)
call gO(b,udg_rect56)
call gO(b,udg_rect58)
call gO(b,udg_rect59)
call gO(b,udg_rect60)
call gO(b,udg_rect61)
call gO(b,udg_rect62)
call gO(b,udg_rect63)
call gO(b,udg_rect64)
call gO(b,udg_rect65)
call gO(b,udg_rect66)
call gO(b,udg_rect67)
call gO(b,udg_rect68)
call gO(b,udg_rect69)
call gO(b,udg_rect70)
call gO(b,udg_rect71)
call gO(b,udg_rect72)
call gO(b,udg_rect73)
call gO(b,udg_rect74)
call gO(b,udg_rect75)
endfunction
function FA takes nothing returns nothing
local texttag t
set t=CreateTextTag()
call SetTextTagText(t,"Dance|nPool",.023)
call SetTextTagPos(t,GetRectCenterX(oo),GetRectCenterY(oo),0)
call SetTextTagColor(t,$FF,$FF,$FF,$FF)
set t=CreateTextTag()
call SetTextTagText(t,"Slayers|nLevel|nHere",.023)
call SetTextTagPos(t,GetRectCenterX(ro),GetRectCenterY(ro),0)
call SetTextTagColor(t,$FF,$FF,$FF,$FF)
set t=null
endfunction
function gA takes nothing returns nothing
local integer i=0
local integer j
local fogmodifier fm
local boolean ally
loop
exitwhen i>$B
set fm=CreateFogModifierRect(Player(i),FOG_OF_WAR_FOGGED,GetWorldBounds(),true,false)
call FogModifierStart(fm)
set Va[J[i]]=i
if GetPlayerSlotState(Player(i))==PLAYER_SLOT_STATE_PLAYING then
if i>=$A then
set Ea[J[i]]=2
set M=true
else
set Ea[J[i]]=1
set L=true
endif
set Xa[J[i]]=1
endif
call SetPlayerState(Player(i),PLAYER_STATE_GIVES_BOUNTY,1)
if Ea[J[i]]==1 then
call SetPlayerState(Player(i),PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(Player(i),PLAYER_STATE_RESOURCE_LUMBER,50)
set j=0
loop
exitwhen j>S
call SetPlayerTechMaxAllowed(Player(i),Q[j],0)
set j=j+1
endloop
set Oa[J[i]]=CreateUnit(Player(i),bE(i),GetRectMinX(ao)+(GetRectMaxX(ao)-GetRectMinX(ao))*(i-i/ 5*5)/ 4,GetRectMaxY(ao)-(GetRectMaxY(ao)-GetRectMinY(ao))*(i/ 5),90)
set ca[J[i]]=1
if GetUnitName(Oa[J[i]])!="Human" and StringCase(GetUnitName(Oa[J[i]]),false)!=StringCase(GetPlayerName(Player(i)),false)then
call PauseUnit(Oa[J[i]],true)
endif
if GetLocalPlayer()==Player(i)then
call ClearSelection()
call SelectUnit(Oa[J[i]],true)
endif
else
call SetPlayerState(Player(i),PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(Player(i),PLAYER_STATE_RESOURCE_LUMBER,0)
endif
call SetPlayerAbilityAvailable(Player(i),1093677141,false)
call SetPlayerTechMaxAllowed(Player(i),1749445735,1)
call SetPlayerTechMaxAllowed(Player(i),1747989040,1)
call SetPlayerTechMaxAllowed(Player(i),1848651825,3)
call SetPlayerTechMaxAllowed(Player(i),1747988554,2)
call SetPlayerTechMaxAllowed(Player(i),1752528689,48)
call SetPlayerTechMaxAllowed(Player(i),1747988535,$C)
call SetPlayerTechMaxAllowed(Player(i),1747988545,8)
call SetPlayerTechMaxAllowed(Player(i),1747988555,6)
call SetPlayerTechMaxAllowed(Player(i),1747988564,6)
call SetPlayerTechMaxAllowed(Player(i),1750364016,21)
call SetPlayerTechMaxAllowed(Player(i),1865429043,21)
call SetPlayerTechMaxAllowed(Player(i),1747988529,$C)
call SetPlayerTechMaxAllowed(Player(i),1747988528,$C)
call SetPlayerTechMaxAllowed(Player(i),1747988821,1)
call SetPlayerTechMaxAllowed(Player(i),1749566036,1)
call SetPlayerTechMaxAllowed(Player(i),1865429047,4)
set i=i+1
endloop
set i=(0)-1
loop
set i=i+1
exitwhen i>($B)
set j=(0)-1
loop
set j=j+1
exitwhen j>($B)
if i!=j and Ea[J[i]]==Ea[J[j]]then
call SetPlayerAlliance(Player(i),Player(j),ALLIANCE_PASSIVE,true)
call SetPlayerAlliance(Player(i),Player(j),ALLIANCE_HELP_REQUEST,true)
call SetPlayerAlliance(Player(i),Player(j),ALLIANCE_HELP_RESPONSE,true)
call SetPlayerAlliance(Player(i),Player(j),ALLIANCE_SHARED_XP,true)
call SetPlayerAlliance(Player(i),Player(j),ALLIANCE_SHARED_SPELLS,true)
call SetPlayerAlliance(Player(i),Player(j),ALLIANCE_SHARED_VISION,true)
call SetPlayerAlliance(Player(i),Player(j),ALLIANCE_SHARED_CONTROL,false)
call SetPlayerAlliance(Player(i),Player(j),ALLIANCE_SHARED_ADVANCED_CONTROL,false)
endif
endloop
endloop
call PX(false)
endfunction
function GA takes boolean hA returns nothing
local quest q=CreateQuest()
call QuestSetTitle(q,dr)
call QuestSetDescription(q,fr)
call QuestSetIconPath(q,Dr)
call QuestSetRequired(q,hA)
call QuestSetDiscovered(q,true)
call QuestSetCompleted(q,false)
set q=null
endfunction
function HA takes nothing returns nothing
set dr="Instructions (Humans)"
set Dr="ReplaceableTextures\\CommandButtons\\BTNPeasant.blp"
set fr="How to Win|nKill all vampires. Killing vampires will give you precious gold.|n|nHow to get gold|nWait till 15 minutes|nCollect gold coins|nKill vampires big and small|n|n"
call GA(true)
set dr="Instructions (Vampires)"
set Dr="ReplaceableTextures\\CommandButtons\\BTNPeasant.blp"
set fr="How to Win|nKill all Humans. Killed humans will turn to your team unless -nomini is on.|n|nHow to get wood|nWait till 15 minutes|nGet Urn of Dracula (gives gold too)"
call GA(true)
set dr="Commands"
set Dr="ReplaceableTextures\\WorldEditUI\\Editor-Random-Item.blp"
set fr="-kick <color>|n-allow <color>|n-disallow <color>|n-show"
call GA(true)
set dr="Credits"
set Dr="ReplaceableTextures\\CommandButtons\\BTNAmbush.blp"
set fr="Map developers:|nSkillet-Collide, Cheekything, Caesio, LordKintaro, d07.RiV, Littletiger, Davethebat"
call GA(false)
set dr="More Credits"
set Dr="ReplaceableTextures\\CommandButtons\\BTNAmbush.blp"
set fr="We would like to thank everybody who has contributed to the development and testing of Vampirism Fire, as well as the rest of the community for their continued support."
call GA(false)
set dr="Blood?"
set Dr="ReplaceableTextures\\CommandButtons\\BTNAmbush.blp"
set fr="Blood spots can be defended through the use of feeding boxes but preferably Blood Boxes... however dont let them die to the vampires..."
call GA(false)
set dr=""
set Dr=""
set fr=""
call DestroyTimer(GetExpiredTimer())
endfunction
function jA takes nothing returns nothing
local timer t=CreateTimer()
call TimerStart(t,.0,false,function HA)
set t=null
endfunction
function JA takes nothing returns nothing
set gr=(gr)+1
loop
set gr=gr-1
exitwhen gr<(0)
call bR(Fr[gr])
set Fr[gr]=null
endloop
call DestroyTimer(GetExpiredTimer())
endfunction
function kA takes integer id returns nothing
set Fr[gr]=CreateUnit(Player($F),id,$A28,6400,270)
set gr=gr+1
endfunction
function KA takes nothing returns nothing
local timer t=CreateTimer()
call TimerStart(t,.0,false,function JA)
set t=null
call kA(1429221445)
call kA(1160785969)
call kA(1160785970)
call kA(1095128646)
call kA(1429221443)
call kA(1429221442)
call kA(1429221451)
call kA(1429221444)
call kA(1429221433)
call kA(1429221431)
call kA(1429221432)
call kA(1429221441)
call kA(1213430093)
call kA(1211117900)
call Preloader("scripts\\VampirismFire.pld")
endfunction
function lA takes nothing returns boolean
local unit u=GetSoldUnit()
local integer i=0
local integer j=0
loop
exitwhen i>S
if GetUnitTypeId(u)==Q[i]then
loop
exitwhen j>S
call SetPlayerTechMaxAllowed(GetOwningPlayer(u),Q[j],0)
set j=j+1
endloop
call NX(u,no)
call SetHeroLevel(u,3,false)
call SetUnitVertexColor(u,32,0,0,$E0)
call UnitAddItemById(u,1227895113)
call ShowUnit(u,false)
set Oa[(J[GetPlayerId((GetOwningPlayer(u)))])]=u
endif
set i=i+1
endloop
set u=null
return false
endfunction
function LA takes nothing returns nothing
local trigger eX=dE()
call HE(eX,EVENT_PLAYER_UNIT_SELL,null)
call TriggerAddCondition(eX,Condition(function lA))
set eX=null
endfunction
function mA takes nothing returns nothing
local group g=CreateGroup()
local group d
local unit u
local unit v
local integer p
call GroupEnumUnitsInRect(g,Zx,null)
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
set p=GetPlayerId(GetOwningPlayer(u))
if Ea[J[p]]==1 then
if u==Oa[J[p]]then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,$A,kX(Player(p))+" has been obliterated by the exploding portal")
set Xa[J[p]]=2
call pO(Player(p))
set d=CreateGroup()
call GroupEnumUnitsOfPlayer(d,Player(p),null)
loop
set v=FirstOfGroup(d)
exitwhen v==null
call GroupRemoveUnit(d,v)
call RemoveUnit(v)
endloop
call DestroyGroup(d)
call SetPlayerName(Player(p),Ra[J[p]]+" (Dead)")
else
call JX(u)
endif
endif
endloop
call DestroyGroup(g)
call PX(true)
set g=null
set d=null
set u=null
set v=null
endfunction
function MA takes nothing returns nothing
local integer i=0
local integer eV=0
loop
exitwhen i>$B
if Ea[J[i]]==2 and Oa[J[i]]!=null then
set eV=eV+1
call ShowUnit(Oa[J[i]],true)
if GetLocalPlayer()==Player(i)then
call ClearSelection()
call SelectUnit(Oa[J[i]],true)
endif
endif
set i=i+1
endloop
if eV==1 then
set i=0
loop
exitwhen i>$B
if Ea[J[i]]==2 and Oa[J[i]]!=null then
call UnitAddItemById(Oa[J[i]],1937012592)
endif
set i=i+1
endloop
endif
call mA()
call eI()
endfunction
function pA takes nothing returns nothing
local integer i=0
local integer j
local integer r
loop
exitwhen i>$B
if Ea[J[i]]==2 and Xa[J[i]]==1 and Oa[J[i]]==null then
set r=GetRandomInt(0,S-1)
set Oa[J[i]]=CreateUnit(Player(i),Q[r],GetRectCenterX(no),GetRectCenterY(no),270)
set j=0
loop
exitwhen j>=S
call SetPlayerTechMaxAllowed(Player(i),Q[j],0)
set j=j+1
endloop
call NX(Oa[J[i]],no)
call SetHeroLevel(Oa[J[i]],3,false)
set Ha[J[i]]=3
call YR(Oa[J[i]])
call UnitAddItemById(Oa[J[i]],1227895113)
call ShowUnit(Oa[J[i]],false)
endif
set i=i+1
endloop
endfunction
function PA takes nothing returns nothing
set Hr=Hr-1
if Hr>0 then
call TimerStart(hr,Hr,false,function PA)
call PauseTimer(hr)
else
call DestroyTimerDialog(Gr)
call DestroyTimer(hr)
set Gr=null
set hr=null
call MA()
call PauseTimer(GetExpiredTimer())
call DestroyTimer(GetExpiredTimer())
endif
endfunction
function qA takes nothing returns nothing
local timer t=GetExpiredTimer()
call TimerStart(t,50.,false,function pA)
set Hr=55
set hr=CreateTimer()
call TimerStart(hr,Hr,false,function PA)
call PauseTimer(hr)
set Gr=CreateTimerDialog(hr)
call TimerDialogSetTitle(Gr,"Vampires arrive")
call TimerDialogSetTimeColor(Gr,$FF,4,4,$FF)
call TimerDialogDisplay(Gr,true)
set t=CreateTimer()
call TimerStart(t,1.,true,function PA)
set t=null
endfunction
function QA takes nothing returns nothing
local timer t=CreateTimer()
call TimerStart(t,.01,false,function qA)
set t=null
endfunction
function sA takes nothing returns boolean
local integer i
local integer j
local boolean SA
local integer AO
local integer LX
local integer tA=0
local integer TA=$C
local unit u
local unit rc
set K=K+1
set AO=K/ TA
set LX=AO*100
if K==$C then
set i=0
loop
call SetPlayerTechResearched(Player(i),1378889813,1)
exitwhen i==$B
set i=i+1
endloop
endif
if(K==(K/ TA)*TA)and K<60 then
set i=0
loop
exitwhen i>$B
if Ea[J[i]]==1 and Oa[J[i]]!=null and Xa[J[i]]==1 then
if AO==1 then
call lX(Player(i),2,0)
call DisplayTimedTextToPlayer(Player(i),0,0,$A,"|cffffcc00You have survived for "+I2S(K)+" minutes! All humans have now gained 2 gold!|r")
endif
call DisplayTimedTextToPlayer(Player(i),0,0,$A,"|cffff0022The Ancient Evils have acquired "+I2S(LX)+" gold!|r")
elseif Ea[J[i]]!=1 and Oa[J[i]]!=null and Xa[J[i]]==1 then
call lX(Player(i),LX,tA)
if AO==1 then
call DisplayTimedTextToPlayer(Player(i),0,0,$A,"|cffffcc00The Humans have acquired 2 gold! They can now all construct the <Human's Vault>|r")
endif
call DisplayTimedTextToPlayer(Player(i),0,0,$A,"|cffff0022You have acquired "+I2S(LX)+" gold! Use it wisely...|r")
endif
set i=i+1
endloop
endif
set i=0
loop
exitwhen i>$B
if Ea[J[i]]!=1 and Oa[J[i]]!=null and Xa[J[i]]==1 then
set j=0
set SA=false
set rc=oX(Player(i))
loop
exitwhen j>=UnitInventorySize(Oa[J[i]])
if UnitItemInSlot(Oa[J[i]],j)!=null and GetItemTypeId(UnitItemInSlot(Oa[J[i]],j))==1227894873 then
set SA=true
endif
exitwhen SA
set j=j+1
endloop
set j=0
loop
exitwhen j>=UnitInventorySize(rc)
if UnitItemInSlot(rc,j)!=null and GetItemTypeId(UnitItemInSlot(rc,j))==1227894873 then
set SA=true
endif
exitwhen SA
set j=j+1
endloop
if SA then
if(f>1)then
call lX(Player(i),25*AO,0)
else
call lX(Player(i),35*AO,0)
endif
endif
endif
set i=i+1
endloop
return false
endfunction
function uA takes nothing returns nothing
local trigger eX=dE()
call TriggerRegisterTimerEvent(eX,60,true)
call TriggerAddCondition(eX,Condition(function sA))
endfunction
function UA takes nothing returns boolean
local integer i=0
loop
exitwhen i>$B
if Ea[J[i]]==2 then
if(bv+TimerGetElapsed(Bv))-ba[J[i]]<90 then
set on[i]=on[i]+25
endif
if Xa[J[i]]==1 and ha[J[i]]<on[i]then
call lX(Player(i),on[i]-ha[J[i]],0)
set ha[J[i]]=on[i]
endif
endif
set i=i+1
endloop
return false
endfunction
function wA takes nothing returns boolean
local integer i=0
loop
exitwhen i>$B
if(Ea[J[i]]==1 or(bv+TimerGetElapsed(Bv))-ba[J[i]]<60)and rn[i]<$F then
set rn[i]=rn[i]+1
endif
if Ea[J[i]]!=1 and Oa[J[i]]!=null and GetHeroLevel(Oa[J[i]])<rn[i]then
call SetHeroLevel(Oa[J[i]],rn[i],true)
endif
set i=i+1
endloop
return false
endfunction
function WA takes nothing returns nothing
local integer i=0
local trigger eX=dE()
call TriggerRegisterTimerEvent(eX,90.,true)
call TriggerAddCondition(eX,Condition(function UA))
set eX=dE()
call TriggerRegisterTimerEvent(eX,60.,true)
call TriggerAddCondition(eX,Condition(function wA))
set eX=null
endfunction
function yA takes nothing returns boolean
set ba[(J[GetPlayerId((GetTriggerPlayer()))])]=(bv+TimerGetElapsed(Bv))
return false
endfunction
function YA takes nothing returns boolean
local integer i=0
local integer s=Ea[(J[GetPlayerId((GetTriggerPlayer()))])]
loop
exitwhen i>$B
if(s==1 or Ea[J[i]]!=1)and Xa[J[i]]==1 and(bv+TimerGetElapsed(Bv))-ba[J[i]]>60 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,$A,kX(Player(i))+" has been afk for "+fE((bv+TimerGetElapsed(Bv))-ba[J[i]]))
endif
set i=i+1
endloop
return false
endfunction
function zA takes nothing returns nothing
local trigger eX=CreateTrigger()
call HE(eX,EVENT_PLAYER_UNIT_ISSUED_ORDER,null)
call HE(eX,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
call HE(eX,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,null)
call TriggerAddCondition(eX,Condition(function yA))
set eX=CreateTrigger()
call JE(eX,"-afk",true)
call TriggerAddCondition(eX,Condition(function YA))
set eX=null
endfunction
function ZA takes nothing returns boolean
if GetLocalPlayer()==GetTriggerPlayer()then
call lO(5.)
endif
return false
endfunction
function vN takes nothing returns nothing
local trigger eX=dE()
local integer i=0
loop
exitwhen i>$B
call TriggerRegisterPlayerChatEvent(eX,Player(i),"-bases",true)
set i=i+1
endloop
call TriggerAddCondition(eX,Condition(function ZA))
set eX=null
endfunction
function eN takes nothing returns boolean
if GetLocalPlayer()==GetTriggerPlayer()then
call ClearTextMessages()
endif
return false
endfunction
function xN takes nothing returns nothing
local trigger eX=dE()
local integer i=0
loop
exitwhen i>$B
call TriggerRegisterPlayerChatEvent(eX,Player(i),"-clear",true)
set i=i+1
endloop
call TriggerAddCondition(eX,Condition(function eN))
set eX=null
endfunction
function oN takes integer n returns integer
if n>=8 then
return n-3
elseif n>=6 then
return n-2
elseif n>=3 then
return n-1
endif
return n
endfunction
function rN takes player pK returns nothing
local integer p=GetPlayerId(pK)
if GetLocalPlayer()==pK then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,$E10,"|cffff0000You have been removed from the game.|r")
else
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60,kX(pK)+"|cffff0000 has been removed from the game.|r")
endif
call RemovePlayer(pK,PLAYER_GAME_RESULT_DEFEAT)
if Ea[J[p]]==1 then
if Xa[J[p]]==1 then
set Xa[J[p]]=3
call SetPlayerName(pK,Ra[J[p]]+" (Kicked)")
call MI(p)
elseif Xa[J[p]]==2 then
set Xa[J[p]]=3
call SetPlayerName(pK,Ra[J[p]]+" (Dead & Kicked)")
endif
elseif Ea[J[p]]==3 and Xa[J[p]]==2 then
set Xa[J[p]]=3
call SetPlayerName(pK,Ra[J[p]]+" (Dead & Kicked)")
endif
call PX(true)
endfunction
function iN takes nothing returns nothing
local integer i=0
loop
exitwhen i>$B
set kr[i]=0
set i=i+1
endloop
set jr=null
call PauseTimer(Jr)
endfunction
function aN takes nothing returns nothing
local integer pL=GetPlayerId(GetLocalPlayer())
if Ea[J[pL]]==1 and Xa[J[pL]]==1 then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,$F,"|cffffcc00Votekick has expired without enough votes|r")
endif
call iN()
endfunction
function nN takes nothing returns boolean
local integer r
local integer p=GetPlayerId(GetTriggerPlayer())
local integer VN=0
local integer EN=0
local integer i=0
local integer ZO
local string NA
local integer pL=GetPlayerId(GetLocalPlayer())
if GetEventPlayerChatString()=="-yes" then
set r=1
set NA="\"yes\""
else
set r=-1
set NA="\"no\""
endif
if jr!=null then
set ZO=kr[p]
set kr[p]=r
loop
exitwhen i>$B
if Ea[J[i]]==1 and Xa[J[i]]==1 then
if kr[i]<0 then
set EN=EN+1
elseif kr[i]>0 then
set VN=VN+1
endif
endif
set i=i+1
endloop
if VN>=oN(D)then
call rN(jr)
call iN()
elseif D-EN<oN(D)then
if Ea[J[pL]]==1 and Xa[J[pL]]==1 then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,$F,"|cffffcc00Too many players voted against the kick|r")
endif
call iN()
else
if Ea[J[pL]]==1 and Xa[J[pL]]==1 then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,$F,kX(GetTriggerPlayer())+"|cffffcc00 voted "+NA+". "+I2S(oN(D)-VN)+" more votes are needed to pass|r")
endif
endif
endif
return false
endfunction
function XN takes nothing returns boolean
local integer i
local string s=GetEventPlayerChatString()
local player pK=MX(SubString(s,6,StringLength(s)))
local integer iK=GetPlayerId(pK)
local integer iT=GetPlayerId(GetTriggerPlayer())
local integer iL=GetPlayerId(GetLocalPlayer())
if pK==null then
return false
endif
if Ea[J[iT]]==1 and Xa[J[iT]]==1 and Ea[J[iK]]==1 and Xa[J[iK]]!=3 and iT!=iK and Ba[J[iK]]!=3 then
if jr!=null then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15.,"|cffff0000Votekick already in progress|r")
else
if Ea[J[iL]]==1 and Xa[J[iL]]==1 then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60.,"|cffffcc00Votekick against player "+kX(pK)+"|cffffcc00 has been initiated by "+kX(Player(iT)))
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60.,"|cffffcc00Type -yes or -no to vote for or against the kick. "+I2S(oN(D))+" votes are needed to pass|r")
endif
set jr=pK
call TimerStart(Jr,60.,false,function aN)
loop
exitwhen i>$B
set kr[i]=0
set i=i+1
endloop
set kr[iT]=1
endif
elseif Ea[J[iT]]==2 and Xa[J[iT]]==1 and Ea[J[iK]]==3 and Xa[J[iK]]==2 and iT!=iK and Ba[J[iK]]!=3 then
call rN(pK)
endif
return false
endfunction
function ON takes nothing returns nothing
local trigger eX=dE()
local trigger RN=dE()
local integer i=0
loop
exitwhen i>$B
call TriggerRegisterPlayerChatEvent(eX,Player(i),"-kick ",false)
call TriggerRegisterPlayerChatEvent(eX,Player(i),"-boot ",false)
call TriggerRegisterPlayerChatEvent(RN,Player(i),"-yes",true)
call TriggerRegisterPlayerChatEvent(RN,Player(i),"-no",true)
set i=i+1
endloop
call TriggerAddCondition(eX,Condition(function XN))
call TriggerAddCondition(RN,Condition(function nN))
endfunction
function IN takes nothing returns boolean
local integer p=GetPlayerId(GetTriggerPlayer())
local boolean AN=(GetEventPlayerChatString()=="-yesmini")
if Ea[J[p]]!=1 and Aa[J[p]]!=AN then
if AN then
call DisplayTextToPlayer(Player(p),0,0,"|cffffcc00Humans you kill will now revive as your minions (cancel with -nomini)|r")
else
call DisplayTextToPlayer(Player(p),0,0,"|cffffcc00Humans you kill will no longer revive as your minions (cancel with -yesmini)|r")
endif
endif
set Aa[J[p]]=AN
return false
endfunction
function NN takes nothing returns nothing
local trigger eX=dE()
local integer i
set i=(0)-1
loop
set i=i+1
exitwhen i>($B)
call TriggerRegisterPlayerChatEvent(eX,Player(i),"-nomini",true)
call TriggerRegisterPlayerChatEvent(eX,Player(i),"-yesmini",true)
endloop
call TriggerAddCondition(eX,Condition(function IN))
set eX=null
endfunction
function bN takes string s returns string
loop
exitwhen StringLength(s)==0
exitwhen SubString(s,0,1)!=" "
set s=SubString(s,1,StringLength(s))
endloop
loop
exitwhen StringLength(s)==0
exitwhen SubString(s,StringLength(s)-1,StringLength(s))!=" "
set s=SubString(s,0,StringLength(s)-1)
endloop
return s
endfunction
function BN takes string s returns integer
local string d="0123456789"
local integer r=0
local integer i=0
local integer m
local string c
if s=="" then
return-1
endif
loop
exitwhen i>=StringLength(s)
set c=SubString(s,i,i+1)
set m=0
loop
exitwhen m>=$A
exitwhen SubString(d,m,m+1)==c
set m=m+1
endloop
if m<$A then
set r=r*$A+m
elseif c=="k" or c=="K" then
if i<StringLength(s)-1 then
return-1
endif
set r=r*$3E8
else
return-1
endif
if r>=$F4240 then
return $F4240
endif
set i=i+1
endloop
return r
endfunction
function cN takes string s returns nothing
local integer i
set Kr=null
set lr=0
set s=bN(s)
set i=StringLength(s)-1
loop
exitwhen i<0
exitwhen SubString(s,i,i+1)==" "
set i=i-1
endloop
if i<0 then
return
endif
set lr=BN(SubString(s,i+1,StringLength(s)))
if lr>=0 then
set Kr=MX(bN(SubString(s,0,i)))
endif
endfunction
function CN takes nothing returns boolean
local string s=GetEventPlayerChatString()
local player p=GetTriggerPlayer()
if SubString(s,0,6)!="-gold " then
return false
endif
call cN(SubString(s,6,StringLength(s)))
if Kr==null then
call DisplayTimedTextToPlayer(p,0,0,$A,"|cffff0000Syntax: -gold <player number/color> <amount>|r")
elseif p==Kr or(not IsPlayerAlly(p,Kr))or Xa[(J[GetPlayerId((Kr))])]!=1 then
call DisplayTimedTextToPlayer(p,0,0,$A,"|cffff0000Can only send resources to allies|r")
else
if lr>GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)then
set lr=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)
endif
if lr>0 then
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-lr)
call SetPlayerState(Kr,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Kr,PLAYER_STATE_RESOURCE_GOLD)+lr)
call DisplayTimedTextToPlayer(p,0,0,$F,"|cffffcc00Sent "+I2S(lr)+" gold to "+kX(Kr))
call DisplayTimedTextToPlayer(Kr,0,0,$F,"|cffffcc00Received "+I2S(lr)+" gold from "+kX(p))
set Ia[J[GetPlayerId(Kr)]]=true
endif
endif
return false
endfunction
function dN takes nothing returns boolean
local string s=GetEventPlayerChatString()
local player p=GetTriggerPlayer()
if SubString(s,0,6)=="-wood " then
call cN(SubString(s,6,StringLength(s)))
elseif SubString(s,0,8)=="-lumber " then
call cN(SubString(s,8,StringLength(s)))
else
return false
endif
if Kr==null then
call DisplayTimedTextToPlayer(p,0,0,$A,"|cffff0000Syntax: -wood <player number/color> <amount>|r")
elseif p==Kr or(not IsPlayerAlly(p,Kr))or Xa[(J[GetPlayerId((Kr))])]!=1 then
call DisplayTimedTextToPlayer(p,0,0,$A,"|cffff0000Can only send resources to allies|r")
else
if lr>GetPlayerState(p,PLAYER_STATE_RESOURCE_LUMBER)then
set lr=GetPlayerState(p,PLAYER_STATE_RESOURCE_LUMBER)
endif
if lr>0 then
call SetPlayerState(p,PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(p,PLAYER_STATE_RESOURCE_LUMBER)-lr)
call SetPlayerState(Kr,PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(Kr,PLAYER_STATE_RESOURCE_LUMBER)+lr)
call DisplayTimedTextToPlayer(p,0,0,$F,"|cff9dbb61Sent "+I2S(lr)+" lumber to "+kX(Kr))
call DisplayTimedTextToPlayer(Kr,0,0,$F,"|cff9dbb61Received "+I2S(lr)+" lumber from "+kX(p))
set Ia[J[GetPlayerId(Kr)]]=true
endif
endif
return false
endfunction
function DN takes nothing returns nothing
local trigger fN=dE()
local trigger FN=dE()
call JE(fN,"-gold ",false)
call JE(FN,"-wood ",false)
call TriggerAddCondition(fN,Condition(function CN))
call TriggerAddCondition(FN,Condition(function dN))
endfunction
function gN takes nothing returns boolean
local integer i=0
local string s
local real GN=1
local real hN=0
local real HN=1
local real jN=0
if GetLocalPlayer()==GetTriggerPlayer()then
call ClearTextMessages()
endif
loop
exitwhen i>$B
if ga[J[i]]>GN then
set GN=ga[J[i]]
endif
if ga[J[i]]<hN then
set hN=ga[J[i]]
endif
if Ga[J[i]]>HN then
set HN=Ga[J[i]]
endif
if Ga[J[i]]<jN then
set jN=Ga[J[i]]
endif
set i=i+1
endloop
set i=0
loop
exitwhen i>$B
if Xa[J[i]]!=0 then
if Xa[J[i]]==1 then
set s=Ei[z[i]]+"» "+Ra[J[i]]+": |r"
if Ea[J[i]]==1 then
set s=s+"|cff6DCFF6Human|r"
elseif Ea[J[i]]==2 then
set s=s+"|cff603913Ancient Vampire|r"
elseif Ea[J[i]]==3 then
set s=s+"|cff8C6239Vampire|r"
endif
elseif Xa[J[i]]==2 then
set s=Ei[z[i]]+"» |cff545454"+Ra[J[i]]+": Dead|r"
elseif Xa[J[i]]==3 then
set s=Ei[z[i]]+"» |cffC4C4C4"+Ra[J[i]]+": Left|r"
endif
if Ea[J[i]]==1 and ga[J[i]]>0 then
if ga[J[i]]>=GN then
set s=s+" |cffff0404(Fed "+I2S(ga[J[i]])+" gold)|r"
elseif ga[J[i]]<=hN then
set s=s+" |cff20c000(Fed "+I2S(ga[J[i]])+" gold)|r"
else
set s=s+" |cffffcc00(Fed "+I2S(ga[J[i]])+" gold)|r"
endif
elseif Ea[J[i]]!=1 and Ga[J[i]]>0 then
if Ga[J[i]]==HN then
set s=s+" |cffff0404(Leaked "+I2S(Ga[J[i]])+" gold)|r"
elseif Ga[J[i]]==jN then
set s=s+" |cff20c000(Leaked "+I2S(Ga[J[i]])+" gold)|r"
else
set s=s+" |cffffcc00(Leaked "+I2S(Ga[J[i]])+" gold)|r"
endif
endif
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,$F,s)
endif
set i=i+1
endloop
call pX(GetPlayerId(GetTriggerPlayer()))
return false
endfunction
function JN takes nothing returns nothing
local trigger eX=dE()
local integer i=0
loop
exitwhen i>$B
call TriggerRegisterPlayerChatEvent(eX,Player(i),"-show",true)
set i=i+1
endloop
call TriggerAddCondition(eX,Condition(function gN))
endfunction
function kN takes nothing returns nothing
loop
exitwhen Mr==0
set Mr=Mr-1
if GetUnitCurrentOrder(mr[Mr])==0 or GetUnitCurrentOrder(mr[Mr])==851972then
call IssueImmediateOrderById(mr[Mr],$D0036)
endif
endloop
endfunction
function KN takes nothing returns boolean
local unit u=GetTrainedUnit()
if nX(u)then
set mr[Mr]=u
set Mr=Mr+1
call TimerStart(Lr,.1,false,function kN)
endif
set u=null
return false
endfunction
function lN takes nothing returns nothing
local trigger eX=dE()
call HE(eX,EVENT_PLAYER_UNIT_TRAIN_FINISH,null)
call TriggerAddCondition(eX,Condition(function KN))
set eX=null
endfunction
function LN takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer d=(LoadInteger(ov,GetHandleId((t)),(0)))
local integer i=0
loop
exitwhen i>$F
call UnitRemoveAbility(La[d],pr[i])
set i=i+1
endloop
set Zi[(GetUnitUserData((La[d])))]=0
set la[d]=null
set La[d]=null
call Jn(d)
call FlushChildHashtable(ov,GetHandleId((t)))
call PauseTimer(t)
call DestroyTimer(t)
set t=null
endfunction
function mN takes nothing returns boolean
local unit u=GetTriggerUnit()
local unit d=GetEventDamageSource()
local integer ud
local integer bd=0
local integer i=$F
local integer c=$8000
local integer r
if GetEventDamage()>.5 and GetUnitAbilityLevel(d,1093677132)>0 and IsUnitEnemy(u,GetOwningPlayer(d))then
set ud=GetUnitUserData(u)
set bd=Zi[ud]
if bd==0 then
set bd=jn()
set la[bd]=CreateTimer()
call SaveInteger(ov,GetHandleId((la[bd])),(0),(bd))
set La[bd]=u
set ma[bd]=0
set Zi[ud]=bd
endif
call TimerStart(la[bd],5.,false,function LN)
set ma[bd]=ma[bd]+1
if ma[bd]>$C350 then
set ma[bd]=$C350
endif
set r=ma[bd]
loop
exitwhen i<0
if c<=r then
set r=r-c
call UnitAddAbility(La[bd],pr[i])
call UnitMakeAbilityPermanent(La[bd],true,pr[i])
else
call UnitRemoveAbility(La[bd],pr[i])
endif
set c=c/ 2
set i=i-1
endloop
endif
set u=null
set d=null
return false
endfunction
function MN takes nothing returns boolean
local unit u=GetTriggerUnit()
local unit d=GetAttacker()
if GetUnitAbilityLevel(d,1093677132)>0 and IsUnitEnemy(u,GetOwningPlayer(d))then
call BR(u)
endif
set u=null
set d=null
return false
endfunction
function pN takes nothing returns nothing
local trigger eX=CreateTrigger()
call HE(eX,EVENT_PLAYER_UNIT_ATTACKED,null)
call TriggerAddCondition(eX,Condition(function MN))
call TriggerAddCondition(jv,Condition(function mN))
set pr[0]=1517830448
set pr[1]=1517830449
set pr[2]=1517830450
set pr[3]=1517830451
set pr[4]=1517830452
set pr[5]=1517830453
set pr[6]=1517830454
set pr[7]=1517830455
set pr[8]=1517830456
set pr[9]=1517830457
set pr[$A]=1517830465
set pr[$B]=1517830466
set pr[$C]=1517830467
set pr[$D]=1517830468
set pr[$E]=1517830469
set pr[$F]=1517830470
endfunction
function PN takes integer hn returns nothing
set va[(GetUnitUserData((sa[hn])))]=0
call UnitRemoveAbility(sa[hn],1517891632)
call FlushChildHashtable(ov,GetHandleId((Qa[hn])))
call PauseTimer(Qa[hn])
call DestroyTimer(Qa[hn])
set Qa[hn]=null
set sa[hn]=null
set Sa[hn]=null
endfunction
function qN takes integer hn returns nothing
if hn==null then
return
elseif(qa[hn]!=-1)then
return
endif
call PN(hn)
set qa[hn]=Ma
set Ma=hn
endfunction
function QN takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer cd=(LoadInteger(ov,GetHandleId((t)),(0)))
call qN(cd)
set t=null
endfunction
function sN takes nothing returns boolean
local unit u=GetTriggerUnit()
local unit d=GetEventDamageSource()
local integer ud
local integer cd=0
if GetEventDamage()>.5 and GetUnitAbilityLevel(d,1093677617)>0 and IsUnitEnemy(u,GetOwningPlayer(d))then
set ud=GetUnitUserData(d)
set cd=va[ud]
if cd==0 then
set cd=Hn()
set Qa[cd]=CreateTimer()
call SaveInteger(ov,GetHandleId((Qa[cd])),(0),(cd))
set sa[cd]=d
set Sa[cd]=u
set ta[cd]=0
set va[ud]=cd
endif
call TimerStart(Qa[cd],10.,false,function QN)
if Sa[cd]==u then
set ta[cd]=ta[cd]+1
else
set ta[cd]=1
endif
if ta[cd]>Pr then
set ta[cd]=Pr
endif
call UnitAddAbility(d,1517891632)
call UnitMakeAbilityPermanent(d,true,1517891632)
call SetUnitAbilityLevel(d,1517891632,ta[cd])
endif
set u=null
set d=null
return false
endfunction
function SN takes nothing returns boolean
local unit u=GetTriggerUnit()
local unit d=GetAttacker()
local integer cd
if GetUnitAbilityLevel(d,1093677617)>0 and IsUnitEnemy(u,GetOwningPlayer(d))then
call BR(u)
set cd=va[(GetUnitUserData((d)))]
if cd!=0 and Sa[cd]!=u then
call qN(cd)
endif
endif
set u=null
set d=null
return false
endfunction
function tN takes nothing returns nothing
local trigger eX=CreateTrigger()
call HE(eX,EVENT_PLAYER_UNIT_ATTACKED,null)
call TriggerAddCondition(eX,Condition(function SN))
call TriggerAddCondition(jv,Condition(function sN))
endfunction
constant function TN takes integer QE returns real
if QE==1 then
return 2.5
elseif QE==2 then
return 3.
elseif QE==3 then
return 3.5
else
return 4.
endif
endfunction
function uN takes integer hn returns nothing
set ea[(GetUnitUserData((Wa[hn])))]=0
call LV(wa[hn])
set Wa[hn]=null
set ya[hn]=null
endfunction
function UN takes integer hn returns nothing
if hn==null then
return
elseif(Ua[hn]!=-1)then
return
endif
call uN(hn)
set Ua[hn]=Ta
set Ta=hn
endfunction
function wN takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer cd=(LoadInteger(I,0,GetHandleId((t))))
call UN(cd)
endfunction
function WN takes nothing returns boolean
local unit u=GetTriggerUnit()
local unit d=GetEventDamageSource()
local integer ud
local integer cd=0
local integer QE=GetUnitAbilityLevel(d,1093677644)
local real yN=GetEventDamage()
if GetEventDamage()>.5 and QE>0 and IsUnitEnemy(u,GetOwningPlayer(d))then
if ja[(J[GetPlayerId((GetOwningPlayer(d)))])]then
call DisplayTextToPlayer(GetOwningPlayer(d),.0,.0,"crit onDamage")
endif
set ud=GetUnitUserData(d)
set cd=ea[ud]
if cd!=0 and ya[cd]==u then
call UN(cd)
if GetRandomReal(0,100)<TN(QE)then
if ja[(J[GetPlayerId((GetOwningPlayer(d)))])]then
call DisplayTextToPlayer(GetOwningPlayer(d),.0,.0,"crit onDamage chance succeeded")
endif
call DisableTrigger(jv)
call UnitDamageTarget(d,u,yN*((1.25+(QE)*.75)-1),true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call EnableTrigger(jv)
if IsUnitType(u,UNIT_TYPE_STRUCTURE)then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\GlaiveMissile\\GlaiveMissileTarget.mdl",u,"overhead"))
else
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\HeroBloodElfBlood.mdl",u,"overhead"))
endif
endif
endif
endif
set u=null
set d=null
return true
endfunction
function YN takes nothing returns boolean
local unit u=GetTriggerUnit()
local unit d=GetAttacker()
local integer cd
if GetUnitAbilityLevel(d,1093677644)>0 and IsUnitEnemy(u,GetOwningPlayer(d))then
set cd=ea[(GetUnitUserData((d)))]
if cd==0 then
set cd=Gn()
set wa[cd]=lV(cd)
set Wa[cd]=d
set ea[(GetUnitUserData((d)))]=cd
endif
set ya[cd]=u
call TimerStart(wa[cd],1.,false,function wN)
call BR(u)
endif
set u=null
set d=null
return false
endfunction
function zN takes nothing returns nothing
local trigger eX=dE()
call HE(eX,EVENT_PLAYER_UNIT_ATTACKED,null)
call TriggerAddCondition(eX,Condition(function YN))
call TriggerAddCondition(jv,Condition(function WN))
endfunction
function ZN takes nothing returns boolean
local unit u=GetTriggerUnit()
if GetUnitTypeId(u)==1966092338 then
call SetUnitInvulnerable(u,true)
endif
return false
endfunction
function vb takes nothing returns boolean
local unit u=GetTriggerUnit()
if GetUnitTypeId(u)==1966092338 then
call SetUnitInvulnerable(u,false)
endif
return false
endfunction
function eb takes nothing returns nothing
local trigger eX=dE()
local region xb=CreateRegion()
call RegionAddRect(xb,do)
call TriggerRegisterEnterRegion(eX,xb,null)
call TriggerAddCondition(eX,Condition(function ZN))
set eX=dE()
call TriggerRegisterLeaveRegion(eX,xb,null)
call TriggerAddCondition(eX,Condition(function vb))
set xb=null
set eX=null
endfunction
function ob takes nothing returns nothing
local integer i=0
local integer j=0
loop
exitwhen i>$B
set j=0
loop
exitwhen j>$B
call SetPlayerAlliance(Player(i),Player(j),ALLIANCE_SHARED_ADVANCED_CONTROL,GetPlayerAlliance(Player(i),Player(j),ALLIANCE_SHARED_CONTROL))
set j=j+1
endloop
set i=i+1
endloop
call kR()
endfunction
function rb takes nothing returns boolean
call TimerStart(qr,.5,false,function ob)
return false
endfunction
function ib takes nothing returns nothing
local integer i=0
local trigger eX=dE()
loop
exitwhen i>$B
call TriggerRegisterPlayerAllianceChange(eX,Player(i),ALLIANCE_SHARED_CONTROL)
set i=i+1
endloop
call TriggerAddCondition(eX,Condition(function rb))
set eX=null
endfunction
function ab takes nothing returns boolean
local unit u=GetTriggerUnit()
local real x=GetUnitX(u)
local real y=GetUnitY(u)
local rect r
set r=Ve
if x>=GetRectMinX(r)and x<=GetRectMaxX(r)and y>=GetRectMinY(r)and y<=GetRectMaxY(r)then
call RemoveUnit(u)
endif
set r=Ee
if x>=GetRectMinX(r)and x<=GetRectMaxX(r)and y>=GetRectMinY(r)and y<=GetRectMaxY(r)then
call RemoveUnit(u)
endif
set r=Xe
if x>=GetRectMinX(r)and x<=GetRectMaxX(r)and y>=GetRectMinY(r)and y<=GetRectMaxY(r)then
call RemoveUnit(u)
endif
set r=Oe
if x>=GetRectMinX(r)and x<=GetRectMaxX(r)and y>=GetRectMinY(r)and y<=GetRectMaxY(r)then
call RemoveUnit(u)
endif
set r=null
set u=null
return false
endfunction
function nb takes nothing returns nothing
local trigger eX=CreateTrigger()
call HE(eX,EVENT_PLAYER_UNIT_CONSTRUCT_START,null)
call TriggerAddCondition(eX,Condition(function ab))
endfunction
function Vb takes unit uD,unit uK returns nothing
local player pD=null
local player pK=null
local integer iD
local integer iK
local integer pV=GetUnitPointValue(uD)
if uD!=null and uK!=null then
set pD=GetOwningPlayer(uD)
set pK=GetOwningPlayer(uK)
endif
if pD!=null and pK!=null and pV>0 then
set iD=GetPlayerId(pD)
set iK=GetPlayerId(pK)
if Ea[J[iD]]==1 and Ea[J[iK]]!=1 then
set H=H+pV
set ga[J[iD]]=ga[J[iD]]+pV
set ha[J[iK]]=ha[J[iK]]+pV
elseif Ea[J[iD]]!=1 and Ea[J[iK]]==1 then
set Ga[J[iD]]=Ga[J[iD]]+pV
endif
endif
set uD=null
set uK=null
endfunction
function Eb takes nothing returns boolean
local group g
local group g2
local unit u
local unit uD=GetDyingUnit()
local unit uK=GetKillingUnit()
local unit PR
local integer i
local integer l=0
local integer tD=GetUnitTypeId(uD)
local integer tK=GetUnitTypeId(uK)
local integer pD=GetPlayerId(GetOwningPlayer(uD))
local integer pK=GetPlayerId(GetOwningPlayer(uK))
local boolean nomini=false
local integer id
local item it
local timer t
local integer Xb=3
local integer Ob=18
if(G>0)then
set Xb=Xb+((2*F)/ G)
set Ob=Ob+((2*F)/ G)
endif
call Vb(uD,uK)
if aX(uD)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10.,kX(Player(pD))+"'s "+GetUnitName(uD)+" has fallen")
call StartSound(Fo)
endif
if IsUnitType(uD,UNIT_TYPE_STRUCTURE)then
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdl",GetUnitX(uD),GetUnitY(uD)))
call ShowUnit(uD,false)
if Ea[J[pD]]==1 and Ea[J[pK]]!=1 then
set Na[J[pD]]=(bv+TimerGetElapsed(Bv))
endif
endif
if Ea[J[pK]]!=1 and Ea[J[pD]]==1 and IsUnitInRange(Oa[J[pK]],uD,$3E8)then
set u=Oa[J[pK]]
if tD==1749185123 or tD==1747988529 or tD==1697656883 or tD==1749578597 or tD==1750363764 then
call AddHeroXP(uK,50,false)
elseif tD==1750353506 or tD==1865429040 or tD==1747988530 or tD==1750364016 or tD==1865429047 or tD==1747988528 or tD==1865429041 then
call AddHeroXP(uK,100,false)
elseif tD==1750558832 or tD==1747988535 or tD==1865429043 or tD==1747988546 or tD==1747988536 or tD==1747988531 or tD==1966092358 or tD==1848651825 then
call AddHeroXP(uK,$C8,false)
elseif tD==1750353523 or tD==1747988547 or tD==1747988537 or tD==1747988533 or tD==1747988551 or tD==1865429046 or tD==1966092361 then
call AddHeroXP(uK,500,false)
elseif tD==1750355298 or tD==1747988534 or tD==1747988545 or tD==1865429044 then
call AddHeroXP(uK,750,false)
elseif tD==1747988549 or tD==1747988818 or tD==1747988550 or tD==1747988548 or tD==1747988553 then
call AddHeroXP(uK,$9C4,false)
elseif tD==1747988552 or tD==1747988557 or tD==1747988558 or tD==1747988556 or tD==1747988563 or tD==1747988801 or tD==1747988560 or tD==1747988554 or tD==1747988565 or tD==1747988561 or tD==1848651830 or tD==1747988564 or tD==1747988555 or tD==1747988559 or tD==1966092339 or tD==1749566036 then
call AddHeroXP(uK,5000,false)
endif
endif
if uK!=null and Ea[J[pD]]==1 and Oa[J[pK]]==uK then
if(G>0 and Ea[J[pK]]==2)or(G==0 and Ea[J[pK]]==3)then
set i=1
set g=CreateGroup()
call GroupEnumUnitsInRange(g,GetUnitX(uD),GetUnitY(uD),400.,null)
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
if aX(u)and Xa[J[GetPlayerId(GetOwningPlayer(u))]]==1 then
set i=0
endif
exitwhen i==0
endloop
call DestroyGroup(g)
if i!=0 then
set i=GetRandomInt(1,$C8)
set it=null
if i<=Xb then
set it=CreateItem(1227895107,GetUnitX(uD),GetUnitY(uD))
elseif i<=Xb+Ob then
set it=CreateItem(1227895106,GetUnitX(uD),GetUnitY(uD))
endif
if it!=null then
call SetItemPlayer(it,Player(pK),false)
set it=null
endif
endif
endif
endif
if uD==Oa[J[pD]]and Ea[J[pD]]==1 and Xa[J[pD]]==1 then
call KI(pD,pK)
endif
if uD==Oa[J[pD]]and Ea[J[pD]]!=1 then
call iA(pD,pK)
endif
if tK==1848651833 then
call SetUnitState(uK,UNIT_STATE_MANA,GetUnitState(uK,UNIT_STATE_MANA)+$A)
endif
if tD==1966092359 then
set PR=CreateUnit(Player(pD),1966092359,-256.,-512.,270.)
call ShowUnit(uD,false)
if(Player(pD)==GetLocalPlayer())then
call SelectUnit(PR,true)
call SetCameraPosition(-256.,-512.)
endif
call SetUnitFlyHeight(PR,$C8,60)
call RemoveUnit(uD)
endif
set g=null
set g2=null
set u=null
set uD=null
set uK=null
set PR=null
set it=null
return false
endfunction
function Rb takes nothing returns nothing
local trigger eX=dE()
call HE(eX,EVENT_PLAYER_UNIT_DEATH,null)
call TriggerAddCondition(eX,Condition(function Eb))
set eX=null
endfunction
function Ib takes nothing returns nothing
local integer i=0
local integer j=0
local unit rc
local boolean Ab=false
loop
exitwhen i>$B
if Ea[J[i]]!=1 and Oa[J[i]]!=null and Xa[J[i]]==1 then
set j=0
set rc=oX(Player(i))
loop
exitwhen j>=UnitInventorySize(Oa[J[i]])
if UnitItemInSlot(Oa[J[i]],j)!=null and GetItemTypeId(UnitItemInSlot(Oa[J[i]],j))==1227894850 then
set Ab=true
endif
exitwhen Ab
set j=j+1
endloop
set j=0
loop
exitwhen j>=UnitInventorySize(rc)
if UnitItemInSlot(rc,j)!=null and GetItemTypeId(UnitItemInSlot(rc,j))==1227894850 then
set Ab=true
endif
exitwhen Ab
set j=j+1
endloop
endif
exitwhen Ab
set i=i+1
endloop
if(Ab)then
set i=0
loop
exitwhen i>$B
if Ea[J[i]]!=1 and Xa[J[i]]==1 and Oa[J[i]]!=null then
call SetHeroStr(Oa[J[i]],GetHeroStr(Oa[J[i]],false)+5,true)
call SetHeroAgi(Oa[J[i]],GetHeroAgi(Oa[J[i]],false)+5,true)
call SetHeroInt(Oa[J[i]],GetHeroInt(Oa[J[i]],false)+5,true)
endif
set i=i+1
endloop
endif
endfunction
function Nb takes nothing returns boolean
local item it=GetManipulatedItem()
local item bb
local integer Bb=GetItemTypeId(it)
local unit mu=GetManipulatingUnit()
local player pp=GetOwningPlayer(mu)
local integer i
local timer t
local player op
if GetUnitTypeId(mu)==1848651827 then
set it=null
set mu=null
return false
endif
if Bb==1227895106 or Bb==1227895107 then
if GetUnitAbilityLevel(mu,1113813619)>0 then
set bb=CreateItem(Bb,(LoadReal(ov,GetHandleId((it)),(0))),(LoadReal(ov,GetHandleId((it)),(1))))
call SetItemPlayer(bb,GetItemPlayer(it),false)
call SaveReal(ov,GetHandleId((bb)),(0),(((LoadReal(ov,GetHandleId((it)),(0))))*1.))
call SaveReal(ov,GetHandleId((bb)),(1),(((LoadReal(ov,GetHandleId((it)),(1))))*1.))
set bb=null
else
if Bb==1227895106 then
set i=1
elseif Bb==1227895107 then
set i=2
endif
if Ea[(J[GetPlayerId((pp))])]==1 then
call SetHeroLevel(mu,GetHeroLevel(mu)+1,true)
endif
call UO(pp,i,GetUnitX(mu),GetUnitY(mu))
set op=GetItemPlayer(it)
if op!=null and IsPlayerEnemy(pp,op)then
set Ga[(J[GetPlayerId((op))])]=Ga[(J[GetPlayerId((op))])]+i
call hR(GetPlayerId(op))
endif
if Ea[(J[GetPlayerId((pp))])]!=1 then
set ha[(J[GetPlayerId((pp))])]=ha[(J[GetPlayerId((pp))])]+i
endif
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\ResourceItems\\ResourceEffectTarget.mdl",GetUnitX(mu),GetUnitY(mu)))
endif
call FlushChildHashtable(ov,GetHandleId((it)))
endif
if Ea[(J[GetPlayerId((pp))])]!=1 then
if Bb==1227894854 then
call RemoveItem(it)
call CreateItem(Bb,GetUnitX(mu),GetUnitY(mu))
elseif Bb==1227895111 then
set i=0
loop
exitwhen i>UnitInventorySize(mu)
set bb=UnitItemInSlot(mu,i)
if bb!=null and GetItemTypeId(bb)==1227895111 and it!=bb then
call SetItemCharges(bb,GetItemCharges(bb)+GetItemCharges(it))
call RemoveItem(it)
set i=6
endif
set i=i+1
endloop
elseif Bb==1227894850 then
if yO(Bb)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,15.,"Vampires Have Obtained the Sphere of Human's Doom!")
call BX(20.,0,500.,5000.,.2,1.,.0,.0,"Sound\\Music\\mp3Music\\DarkVictory.mp3")
call TimerStart(CreateTimer(),15.,true,function Ib)
endif
elseif Bb==1227894866 then
if yO(Bb)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,15.,"Vampires have Obtained Demonic Remains")
call StartSound(Mo)
endif
elseif Bb==1227895096 then
call RemoveItem(it)
call hX(pp,"You do not need to purchase a recipe for this item")
endif
elseif Ea[(J[GetPlayerId((pp))])]==1 then
if Bb==1634626408 or Bb==1227894873 or Bb==1227895096 then
call RemoveItem(it)
call CreateItem(Bb,GetUnitX(mu),GetUnitY(mu))
endif
endif
set it=null
set bb=null
set mu=null
return false
endfunction
function cb takes nothing returns nothing
local trigger eX=dE()
call HE(eX,EVENT_PLAYER_UNIT_PICKUP_ITEM,null)
call TriggerAddCondition(eX,Condition(function Nb))
set eX=null
endfunction
function Cb takes nothing returns boolean
local unit a=GetEventDamageSource()
local unit d=GetTriggerUnit()
local boolean db=IsUnitType(a,UNIT_TYPE_PEON)
local boolean Db=(d==Oa[(J[GetPlayerId((GetOwningPlayer(d)))])])
local boolean fb=(GetOwningPlayer(d)==GetOwningPlayer(a))
local boolean Fb=(Xa[(J[GetPlayerId((GetOwningPlayer(d)))])]==3)
if aX(a)and aX(d)and(not P)and(not fb)then
if not GO(jO(GetOwningPlayer(a)),GetUnitX(d),GetUnitX(d))then
call WV(d,GetEventDamage())
endif
endif
if db and(fb or Fb)and(not Db)then
call KillUnit(d)
endif
set a=null
set d=null
return false
endfunction
function gb takes nothing returns boolean
local unit a=GetAttacker()
local unit d=GetTriggerUnit()
local real x=GetUnitX(d)
local real y=GetUnitY(d)
local player pa=GetOwningPlayer(a)
local player pd=GetOwningPlayer(d)
local integer Gb=GetRandomInt(0,4)
local integer hb=GetUnitTypeId(a)
local integer Hb=GetUnitTypeId(d)
local integer jb=Ea[(J[GetPlayerId((pa))])]
local integer Jb=Ea[(J[GetPlayerId((pd))])]
local boolean db=IsUnitType(a,UNIT_TYPE_PEON)
local boolean kb=(a==Oa[(J[GetPlayerId((pa))])])
local boolean Db=(d==Oa[(J[GetPlayerId((pd))])])
local boolean fb=(pd==pa)
local boolean Fb=((J[GetPlayerId((pd))])==3)
if db and Jb==1 and(not fb)and(not Fb)then
if GO(jO(pa),x,y)then
if IsUnitType(d,UNIT_TYPE_STRUCTURE)then
call KillUnit(d)
call DisplayTimedTextToPlayer(pd,0,0,10.,kX(pa)+"|cffffcc00 has destroyed your "+GetUnitName(d)+" in "+jX(pa)+" base")
else
call NX(d,oo)
call DisplayTimedTextToPlayer(pd,0,0,10.,kX(pa)+"|cffffcc00 has ousted your "+GetUnitName(d)+" from "+jX(pa)+" base")
call IssueImmediateOrderById(a,$D0004)
endif
else
call DisplayTimedTextToPlayer(pa,0,0,10.,"|CFFED1C24You can only use this unit to attack other players in your own base!|r")
call IssueImmediateOrderById(a,$D0004)
endif
endif
if db and(fb or Fb)and(not Db)then
call BR(d)
endif
if jb==1 and Jb==1 and Db then
call IssueImmediateOrderById(a,$D0004)
if fb then
call DisplayTimedTextToPlayer(pa,0,0,10.,"|CFFFFFF00You cannot attack your Main Human!|r")
else
if Gb==0 then
call DisplayTimedTextToPlayer(pa,0,0,10.,"|CFF6DCFF6Why do you want to kill your ally??|r")
elseif Gb==1 then
call DisplayTimedTextToPlayer(pa,0,0,10.,"|CFF6DCFF6If you're that desperate, go turn into a vampire then come back for the kill!|r")
elseif Gb==2 then
call DisplayTimedTextToPlayer(pa,0,0,10.,"|CFF6DCFF6One of the laws of the Warcraft is that you can attack your allies. One of the laws of Vampirism Fire is that you can't.|r")
elseif Gb==3 then
call DisplayTimedTextToPlayer(pa,0,0,10.,"|CFF6DCFF6'We humans have to stick together'|r")
elseif Gb==4 then
call DisplayTimedTextToPlayer(pa,0,0,10.,"|CFF6DCFF6How would you like it if "+kX(pd)+"|CFF6DCFF6 attacked you?|r")
endif
endif
endif
if(not db)and jb==1 and Jb==1 and(not fb)and(not Fb)then
if GO(jO(pd),x,y)then
call IssueImmediateOrderById(a,$D0004)
call DisplayTimedTextToPlayer(pa,0,0,10.,"|CFFFF0000You can't attack "+kX(pd)+"|CFFFF0000's units in "+jX(pd)+" own base!|r")
endif
endif
if jb==1 and(not db)and((not aX(a))or(not P))and aX(d)and(not fb)then
if not GO(jO(pa),x,y)then
call IssueImmediateOrderById(a,$D0004)
call tI(d)
endif
endif
if aX(a)and pd==Player(bj_PLAYER_NEUTRAL_VICTIM)then
call JX(d)
endif
if jb!=1 and Jb!=1 and(not fb)then
call IssueImmediateOrderById(a,$D0004)
if Gb==0 then
call DisplayTimedTextToPlayer(pa,0,0,10.,"|CFFC69C6DVampires need to attack Humans, not themselves!|r")
elseif Gb==1 then
call DisplayTimedTextToPlayer(pa,0,0,10.,"|CFFC69C6DYou didn't really think that was allowed, did you?|r")
elseif Gb==2 then
call DisplayTimedTextToPlayer(pa,0,0,10.,"|CFFC69C6D'We vampires have to stick together'|r")
elseif Gb==3 then
call DisplayTimedTextToPlayer(pa,0,0,10.,"|CFFC69C6D'More vampires = More gold for humans!' - Oh Really? Well, tough luck.|r")
elseif Gb==4 then
call DisplayTimedTextToPlayer(pa,0,0,10.,"|CFFC69C6DYou're so tough you think you don't need allies? Well, you're wrong!|r")
endif
endif
if hb==1848651850 and Hb!=1749380711 then
call IssueImmediateOrderById(a,$D0004)
endif
if jb!=1 and Jb==1 and Db and hb!=1747988789 and(not kb)then
call IssueImmediateOrderById(a,$D0004)
endif
if(hb==1848651852 or hb==1848651854 or hb==1848651855 or hb==1848651851)and(Hb==1848651825 or Hb==1747988554 or(not IsUnitType(d,UNIT_TYPE_STRUCTURE)and not IsUnitType(d,UNIT_TYPE_HERO)))then
call IssueImmediateOrderById(a,$D0004)
endif
if(hb==1848651833 or hb==1848651847)and(not nX(d))then
call IssueImmediateOrderById(a,$D0004)
endif
if fb and jb!=1 and Db then
call IssueImmediateOrderById(a,$D0004)
call DisplayTimedTextToPlayer(pa,0,0,10.,"|CFFFFFF00You cannot attack your Main Vampire!|r")
endif
set a=null
set d=null
set pa=null
set pd=null
return false
endfunction
function Kb takes nothing returns nothing
local trigger eX=dE()
call HE(eX,EVENT_PLAYER_UNIT_ATTACKED,null)
call TriggerAddCondition(eX,Condition(function gb))
set eX=null
call TriggerAddCondition(jv,Condition(function Cb))
endfunction
function lb takes integer id,integer fX,integer FX,integer gX,integer Lb returns nothing
call SaveBoolean(Qr,id,0,true)
call SaveInteger(Qr,id,1,fX)
call SaveInteger(Qr,id,2,FX)
call SaveInteger(Qr,id,3,gX)
call SaveInteger(Qr,id,4,Lb)
endfunction
function mb takes nothing returns boolean
local unit u=GetTriggerUnit()
local integer id=GetUnitTypeId(u)
if LoadBoolean(Qr,id,0)then
call SetUnitVertexColor(u,LoadInteger(Qr,id,1),LoadInteger(Qr,id,2),LoadInteger(Qr,id,3),LoadInteger(Qr,id,4))
endif
set u=null
return false
endfunction
function Mb takes nothing returns nothing
local trigger eX=dE()
call HE(eX,EVENT_PLAYER_UNIT_CONSTRUCT_START,null)
call HE(eX,EVENT_PLAYER_UNIT_UPGRADE_START,null)
call HE(eX,EVENT_PLAYER_UNIT_UPGRADE_CANCEL,null)
call TriggerAddCondition(eX,Condition(function mb))
set eX=null
call lb(1747988529,$FF,$FF,70,$B4)
call lb(1747988528,$FF,$FF,0,$B4)
call lb(1747988531,$96,0,$96,$E6)
call lb(1747988533,100,100,$FF,$FF)
call lb(1747988534,50,$FF,50,$B4)
call lb(1747988570,50,$FF,125,$FF)
call lb(1747988818,$96,30,20,$FF)
call lb(1747988549,100,30,30,$CD)
call lb(1747988550,$FF,$FF,$FF,$FF)
call lb(1747988560,20,20,20,$FF)
call lb(1966092336,25,$FF,65,$80)
call lb(1966092339,0,0,0,$80)
call lb(1966092361,$FF,$FF,$FF,100)
call lb(1966092373,25,25,25,100)
call lb(1747988548,$FF,75,75,$80)
call lb(1747988563,$B4,0,0,$80)
call lb(1747988556,0,0,0,$80)
call lb(1747988821,$FF,50,50,$FF)
call lb(1749566036,$FF,50,50,$80)
call lb(1747988552,$FF,$FF,$FF,$FF)
call lb(1747988557,$FF,$FF,$FF,$80)
endfunction
function pb takes nothing returns boolean
local unit u=GetTriggerUnit()
local integer p=GetPlayerId(GetOwningPlayer(u))
local unit mu=Oa[J[p]]
local integer i
local integer Pb=GetUnitTypeId(u)
if Pb==1866692455 then
call StartSound(xr)
call RemoveUnit(u)
call lX(Player(p),1,0)
endif
if Pb==1752528689 and GetPlayerTechCount(Player(p),1378889810,true)==1 then
call UnitRemoveAbility(u,1093677620)
call UnitAddAbility(u,1093677621)
endif
if aX(u)then
if Ia[J[p]]then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10.,kX(Player(p))+"|r has created a pooled "+GetUnitName(u)+" at "+FE((bv+TimerGetElapsed(Bv))))
else
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10.,kX(Player(p))+"|r has created a "+GetUnitName(u)+" at "+FE((bv+TimerGetElapsed(Bv))))
endif
endif
if wO(1747988545)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,5,"A Human has trained a fang harvester!")
endif
if iX(u)and Ea[J[p]]==2 and Oa[J[p]]==null then
set Oa[J[p]]=u
call NX(u,no)
call SetHeroLevel(u,3,false)
call YR(u)
call UnitAddItemById(u,1227895113)
call ShowUnit(u,false)
set i=0
loop
exitwhen i>=S
call SetPlayerTechMaxAllowed(Player(p),Q[i],0)
set i=i+1
endloop
endif
if Pb==1848651852 or Pb==1848651854 or Pb==1848651855 or Pb==1848651851 then
call qE(u)
endif
if not sr and Pb==1848651847 and Ea[J[p]]!=1 then
call DisplayTimedTextToPlayer(GetLocalPlayer(),.0,.0,15.,"A Vampire has Summoned an Infernal Meteor!")
call StartSound(ir)
set sr=true
endif
set u=null
set mu=null
return false
endfunction
function qb takes nothing returns nothing
local trigger eX=dE()
local region xb=CreateRegion()
call RegionAddRect(xb,bj_mapInitialPlayableArea)
call TriggerRegisterEnterRegion(eX,xb,null)
call TriggerAddCondition(eX,Condition(function pb))
set xb=null
set eX=null
endfunction
function Qb takes nothing returns boolean
local unit uL=GetLevelingUnit()
local player pL=GetOwningPlayer(uL)
if Ea[J[GetPlayerId(pL)]]!=1 then
call SE(pL,GetHeroLevel(uL))
set Fa[(J[GetPlayerId((pL))])]=Fa[(J[GetPlayerId((pL))])]+1
endif
return false
endfunction
function sb takes nothing returns nothing
local trigger eX=dE()
call HE(eX,EVENT_PLAYER_HERO_LEVEL,null)
call TriggerAddCondition(eX,Condition(function Qb))
endfunction
function Sb takes nothing returns boolean
local unit u=GetRevivingUnit()
local integer p=GetPlayerId(GetOwningPlayer(u))
if aX(u)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10.,kX(Player(p))+"'s "+GetUnitName(u)+" has been revived")
endif
set u=null
return false
endfunction
function tb takes nothing returns nothing
local trigger eX=dE()
call HE(eX,EVENT_PLAYER_HERO_REVIVE_FINISH,null)
call TriggerAddCondition(eX,Condition(function Sb))
set eX=null
endfunction
function Tb takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit u=(LoadUnitHandle(ov,GetHandleId((t)),(0)))
if(not IsUnitType(u,UNIT_TYPE_DEAD))and IsUnitInRegion(Sr,u)then
call NX(u,eo)
endif
call FlushChildHashtable(ov,GetHandleId((t)))
call PauseTimer(t)
call DestroyTimer(t)
set t=null
set u=null
endfunction
function ub takes nothing returns boolean
local unit u=GetTriggerUnit()
local timer t
if Ea[(J[GetPlayerId((GetOwningPlayer(u)))])]!=1 and u==Oa[(J[GetPlayerId((GetOwningPlayer(u)))])]then
call DisplayTimedTextToPlayer(GetOwningPlayer(u),0,0,5,"You will be automaticly teleported out of the dancepool in 5 seconds")
set t=CreateTimer()
call SaveUnitHandle(ov,GetHandleId((t)),(0),(u))
call TimerStart(t,5.,false,function Tb)
set t=null
endif
set u=null
return false
endfunction
function Ub takes nothing returns boolean
local unit u=GetTriggerUnit()
if Ea[(J[GetPlayerId((GetOwningPlayer(u)))])]==1 then
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl",GetUnitX(u),GetUnitY(u)))
call NX(u,oo)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl",GetUnitX(u),GetUnitY(u)))
endif
set u=null
return false
endfunction
function wb takes nothing returns nothing
local trigger eX=CreateTrigger()
local region fR=CreateRegion()
call TriggerRegisterEnterRegion(eX,fR,null)
call TriggerAddCondition(eX,Condition(function Ub))
set eX=dE()
set Sr=CreateRegion()
call RegionAddRect(Sr,xo)
call TriggerRegisterEnterRegion(eX,Sr,null)
call TriggerAddCondition(eX,Condition(function ub))
set eX=null
set fR=null
endfunction
function Wb takes nothing returns boolean
local unit u=Oa[(J[GetPlayerId((GetTriggerPlayer()))])]
local integer id=GetResearched()
local integer ps
if id==1378889797 then
call SetHeroStr(u,GetHeroStr(u,false)+300,true)
elseif id==1378889795 then
call SetHeroAgi(u,GetHeroAgi(u,false)+300,true)
elseif id==1378889796 then
call SetHeroInt(u,GetHeroInt(u,false)+300,true)
elseif id==1378889799 then
call SetHeroStr(u,GetHeroStr(u,false)+300,true)
call SetHeroAgi(u,GetHeroAgi(u,false)+300,true)
call SetHeroInt(u,GetHeroInt(u,false)+300,true)
elseif id==1378889800 then
call SetHeroStr(u,GetHeroStr(u,false)+$7D0,true)
call SetHeroAgi(u,GetHeroAgi(u,false)+$7D0,true)
call SetHeroInt(u,GetHeroInt(u,false)+$7D0,true)
elseif id==1378889801 then
set ps=(J[GetPlayerId((GetTriggerPlayer()))])
if Ha[ps]<36 then
call UnitModifySkillPoints(u,1)
set Ha[ps]=Ha[ps]+1
else
call lX(GetTriggerPlayer(),25,0)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,5.,"You have no abilities left to learn, your gold has been refunded!")
endif
endif
set u=null
return false
endfunction
function yb takes nothing returns nothing
local trigger eX=CreateTrigger()
call HE(eX,EVENT_PLAYER_UNIT_RESEARCH_FINISH,null)
call TriggerAddCondition(eX,Condition(function Wb))
set eX=null
endfunction
function InitCustomTeams takes nothing returns nothing
call SetPlayerTeam(Player(0),0)
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(6),0)
call SetPlayerTeam(Player(7),0)
call SetPlayerTeam(Player(8),0)
call SetPlayerTeam(Player(9),0)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(8),true)
call SetPlayerTeam(Player($A),1)
call SetPlayerTeam(Player($B),1)
call SetPlayerAllianceStateAllyBJ(Player($A),Player($B),true)
call SetPlayerAllianceStateAllyBJ(Player($B),Player($A),true)
call SetPlayerAllianceStateVisionBJ(Player($A),Player($B),true)
call SetPlayerAllianceStateVisionBJ(Player($B),Player($A),true)
endfunction
function main takes nothing returns nothing
local weathereffect we
local player p
local unit u
local integer unitID
local trigger t
local real YV
call SetCameraBounds(-8192.+GetCameraMargin(CAMERA_MARGIN_LEFT),-8192.+GetCameraMargin(CAMERA_MARGIN_BOTTOM),8192.-GetCameraMargin(CAMERA_MARGIN_RIGHT),8192.-GetCameraMargin(CAMERA_MARGIN_TOP),-8192.+GetCameraMargin(CAMERA_MARGIN_LEFT),8192.-GetCameraMargin(CAMERA_MARGIN_TOP),8192.-GetCameraMargin(CAMERA_MARGIN_RIGHT),-8192.+GetCameraMargin(CAMERA_MARGIN_BOTTOM))
call SetDayNightModels("Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl","Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl")
call SetWaterBaseColor(0,$80,$80,$FF)
call NewSoundEnvironment("Default")
call SetAmbientDaySound("LordaeronSummerDay")
call SetAmbientNightSound("LordaeronSummerNight")
call SetMapMusic("Music",true,0)
set Do=CreateSound("Sound\\Music\\mp3Music\\PH1.mp3",false,false,false,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(Do,"PHMusic")
call SetSoundDuration(Do,$44BEE)
call SetSoundVolume(Do,$7F)
set fo=CreateSound("Sound\\Music\\mp3Music\\Credits.mp3",false,false,false,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(fo,"CreditsMusic")
call SetSoundDuration(fo,83017)
set Fo=CreateSound("Units\\Demon\\HeroPitLord\\HPitLordWhat1.wav",false,false,true,$A,$A,"HeroAcksEAX")
call SetSoundParamsFromLabel(Fo,"HeroPitLordWhat")
call SetSoundDuration(Fo,$A97)
set go=CreateSound("Units\\Demon\\HeroPitLord\\HPitLordYes1.wav",false,false,true,$A,$A,"HeroAcksEAX")
call SetSoundParamsFromLabel(go,"HeroPitLordYes")
call SetSoundDuration(go,$801)
set Go=CreateSound("Units\\Demon\\HeroPitLord\\HPitLordYesAttack1.wav",false,false,true,$A,$A,"HeroAcksEAX")
call SetSoundParamsFromLabel(Go,"HeroPitLordYesAttack")
call SetSoundDuration(Go,$774)
set ho=CreateSound("Doodads\\Cinematic\\Lightningbolt\\LightningBolt1.wav",false,false,true,$A,$A,"SpellsEAX")
call SetSoundParamsFromLabel(ho,"CinematicLightningBolt")
call SetSoundDuration(ho,$BB9)
set Ho=CreateSound("Units\\Orc\\StasisTotem\\StasisTrapBirth.wav",false,true,true,$A,$A,"SpellsEAX")
call SetSoundParamsFromLabel(Ho,"StasisTotemBirth")
call SetSoundDuration(Ho,$929)
set jo=CreateSound("Units\\Orc\\StasisTotem\\StasisTotem.wav",false,true,true,$A,$A,"SpellsEAX")
call SetSoundParamsFromLabel(jo,"StasisTotemDeath")
call SetSoundDuration(jo,$742)
set Jo=CreateSound("Buildings\\Undead\\Ziggurat\\FrostTowerWhat1.wav",false,false,true,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(Jo,"FrostTowerWhat")
call SetSoundDuration(Jo,4203)
call SetSoundChannel(Jo,7)
call SetSoundVolume(Jo,$7F)
call SetSoundPitch(Jo,.1)
set ko=CreateSound("Buildings\\Undead\\Ziggurat\\ZigguratUpgrade.wav",false,false,true,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(ko,"ZigguratUpgradeWhat")
call SetSoundDuration(ko,4203)
call SetSoundChannel(ko,7)
call SetSoundVolume(ko,$7F)
call SetSoundPitch(ko,.1)
set Ko=CreateSound("Buildings\\Undead\\Ziggurat\\ZigguratWhat.wav",false,false,true,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(Ko,"ZigguratWhat")
call SetSoundDuration(Ko,4457)
call SetSoundChannel(Ko,7)
call SetSoundVolume(Ko,$7F)
call SetSoundPitch(Ko,.1)
set lo=CreateSound("Units\\Undead\\ObsidianStatue\\ObsidianAvengerPissed1.wav",false,true,true,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(lo,"ObsidianDestroyerPissed")
call SetSoundDuration(lo,$BD0)
call SetSoundPitch(lo,.8)
set Lo=CreateSound("Units\\Undead\\Varimathras\\VarimathrasReady1.wav",false,false,false,$A,$A,"HeroAcksEAX")
call SetSoundParamsFromLabel(Lo,"VarimathrasReady")
call SetSoundDuration(Lo,$84A)
call SetSoundPitch(Lo,1.1)
set mo=CreateSound("Sound\\Buildings\\Undead\\UndeadBuildingBirth3.wav",false,false,true,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(mo,"UndeadBuildingBirth3")
call SetSoundDuration(mo,$FF7)
set Mo=CreateSound("Sound\\Music\\mp3Music\\Doom.mp3",false,false,false,$A,$A,"")
call SetSoundDuration(Mo,66125)
call SetSoundChannel(Mo,0)
call SetSoundVolume(Mo,$7F)
call SetSoundPitch(Mo,1.)
set po=CreateSound("Units\\Orc\\Hellscream\\GromPissed3.wav",false,false,true,$A,$A,"HeroAcksEAX")
call SetSoundParamsFromLabel(po,"GromPissed")
call SetSoundDuration(po,5503)
set Po=CreateSound("Units\\Orc\\SpiritWalker\\WhiteTaurenPissed6.wav",false,false,true,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(Po,"SpiritWalkerPissed")
call SetSoundDuration(Po,$3650)
set qo=CreateSound("Units\\Other\\Rokhan\\RokhanPissed5.wav",false,false,true,$A,$A,"HeroAcksEAX")
call SetSoundParamsFromLabel(qo,"RokhanPissed")
call SetSoundDuration(qo,7210)
set Qo=CreateSound("Units\\Undead\\Acolyte\\AcolytePissed3.wav",false,false,true,$A,$A,"HeroAcksEAX")
call SetSoundParamsFromLabel(Qo,"AcolytePissed")
call SetSoundDuration(Qo,$E83)
set so=CreateSound("Units\\Undead\\Acolyte\\AcolytePissed2.wav",false,false,true,$A,$A,"HeroAcksEAX")
call SetSoundParamsFromLabel(so,"AcolytePissed")
call SetSoundDuration(so,$A06)
set So=CreateSound("Units\\Undead\\HeroDeathKnight\\DeathKnightPissed6.wav",false,false,true,$A,$A,"HeroAcksEAX")
call SetSoundParamsFromLabel(So,"HeroDeathKnightPissed")
call SetSoundDuration(So,$D39)
set to=CreateSound("Units\\Undead\\Necromancer\\NecromancerPissed3.wav",false,false,true,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(to,"NecromancerPissed")
call SetSoundDuration(to,$86A)
set To=CreateSound("Units\\Undead\\Varimathras\\VarimathrasPissed8.wav",false,false,true,$A,$A,"HeroAcksEAX")
call SetSoundParamsFromLabel(To,"VarimathrasPissed")
call SetSoundDuration(To,8906)
set uo=CreateSound("Units\\Demon\\HeroPitLord\\HPitLordPissed5.wav",false,false,true,$A,$A,"HeroAcksEAX")
call SetSoundParamsFromLabel(uo,"HeroPitLordPissed")
call SetSoundDuration(uo,$A9EF)
set Uo=CreateSound("Units\\Human\\BloodElfDragonHawk\\DragonHawkPissed8.wav",false,false,true,$A,$A,"HeroAcksEAX")
call SetSoundParamsFromLabel(Uo,"BloodElfDragonHawkPissed")
call SetSoundDuration(Uo,$275D)
set wo=CreateSound("Units\\Human\\Knight\\KnightPissed1.wav",false,false,true,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(wo,"KnightPissed")
call SetSoundDuration(wo,$E56)
set Wo=CreateSound("Units\\Human\\Knight\\KnightPissed5.wav",false,false,true,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(Wo,"KnightPissed")
call SetSoundDuration(Wo,$8B5)
set yo=CreateSound("Units\\Human\\MortarTeam\\MortarTeamPissed8.wav",false,false,true,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(yo,"MortarTeamPissed")
call SetSoundDuration(yo,$EDA)
set Yo=CreateSound("Units\\Human\\Peasant\\PeasantPissed1.wav",false,false,true,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(Yo,"PeasantPissed")
call SetSoundDuration(Yo,$D6D)
set zo=CreateSound("Units\\Human\\Priest\\PriestPissed6.wav",false,false,true,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(zo,"PriestPissed")
call SetSoundDuration(zo,9323)
set Zo=CreateSound("Units\\Human\\Rifleman\\RiflemanPissed5.wav",false,false,true,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(Zo,"RiflemanPissed")
call SetSoundDuration(Zo,4168)
set vr=CreateSound("Units\\Human\\Peasant\\PeasantPissed2.wav",false,false,true,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(vr,"PeasantPissed")
call SetSoundDuration(vr,$A8B)
set er=CreateSound("Units\\Undead\\FrostWyrm\\FrostwyrmReady1.wav",false,false,true,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(er,"FrostWyrmReady")
call SetSoundDuration(er,$FB1)
call SetSoundChannel(er,8)
set xr=CreateSound("Abilities\\Spells\\Items\\ResourceItems\\ReceiveGold.wav",false,false,true,$A,$A,"SpellsEAX")
call SetSoundParamsFromLabel(xr,"ReceiveGold")
call SetSoundDuration(xr,589)
set rr=CreateSound("war3mapImported\\bfbp.mp3",false,false,false,$A,$A,"")
call SetSoundDuration(rr,$F4E)
call SetSoundChannel(rr,0)
call SetSoundVolume(rr,$7F)
call SetSoundPitch(rr,1.)
set ir=CreateSound("Units\\Creeps\\HeroFlameLord\\HeroFirelordAttack2.wav",false,false,true,$A,$A,"DefaultEAXON")
call SetSoundParamsFromLabel(ir,"HeroFlameLordMissileLaunch")
call SetSoundDuration(ir,$568)
call SetSoundChannel(ir,0)
set Ve=Rect(7488.,2624.,8096.,2752.)
set Ee=Rect(-3136.,3776.,-3008.,4384.)
set Xe=Rect(7872.,-5952.,8000.,-5312.)
set Oe=Rect(-5056.,-5696.,-4416.,-5568.)
set Re=Rect(-8192.,6144.,-7424.,8192.)
set Ie=Rect(-7424.,7296.,-6016.,8192.)
set Ae=Rect(-6912.,6144.,-6240.,7296.)
set Ne=Rect(-8192.,5120.,-6144.,6016.)
set be=Rect(-6144.,6400.,-4608.,7296.)
set Be=Rect(-7296.,6016.,-7040.,7168.)
set ce=Rect(-6016.,7296.,-4736.,8192.)
set Ce=Rect(-6144.,4992.,-5120.,6400.)
set de=Rect(-4512.,6528.,-2304.,7552.)
set De=Rect(-4224.,5504.,-2560.,6528.)
set fe=Rect(-4608.,7680.,-1536.,8160.)
set Fe=Rect(-2176.,6400.,-1536.,7680.)
set ge=Rect(-2560.,5760.,-1536.,6400.)
set Ge=Rect(-1408.,6272.,1152.,8192.)
set he=Rect(1280.,7552.,3328.,8192.)
set He=Rect(1280.,4608.,2176.,7552.)
set je=Rect(3456.,5248.,4608.,8192.)
set Je=Rect(2176.,4352.,3456.,7424.)
set ke=Rect(4608.,5248.,5248.,8192.)
set Ke=Rect(5248.,7680.,8160.,8160.)
set le=Rect(7808.,4864.,8192.,7680.)
set Le=Rect(5248.,4608.,7680.,7552.)
set me=Rect(-8192.,3584.,-7168.,4992.)
set Me=Rect(-7168.,3968.,-6272.,4992.)
set pe=Rect(-3328.,3456.,-2304.,4608.)
set Pe=Rect(-2816.,1792.,-2304.,3456.)
set qe=Rect(7296.,1792.,8192.,2944.)
set Qe=Rect(-1920.,4608.,512.,5376.)
set se=Rect(-2304.,3552.,512.,4608.)
set Se=Rect(5632.,3072.,8192.,4608.)
set te=Rect(5632.,2304.,7296.,3072.)
set Te=Rect(-8192.,2176.,-6912.,3584.)
set ue=Rect(-8192.,896.,-6656.,2176.)
set Ue=Rect(-8192.,-128.,-6912.,896.)
set We=Rect(-4480.,2688.,-3584.,3456.)
set ye=Rect(-5504.,2688.,-4480.,4480.)
set Ye=Rect(-6144.,608.,-5504.,3584.)
set ze=Rect(-5504.,1536.,-3584.,2560.)
set Ze=Rect(-5504.,-256.,-3968.,1536.)
set vx=Rect(-2176.,1792.,896.,3456.)
set ex=Rect(-512.,1280.,384.,1792.)
set xx=Rect(4736.,640.,5120.,1664.)
set ox=Rect(3840.,-256.,4736.,2432.)
set rx=Rect(2432.,-128.,3840.,1984.)
set ix=Rect(4864.,-128.,5248.,512.)
set ax=Rect(5248.,-128.,6528.,1600.)
set nx=Rect(7296.,-128.,8192.,1792.)
set Vx=Rect(6784.,-1408.,8192.,-128.)
set Ex=Rect(7040.,128.,7296.,384.)
set Xx=Rect(-8192.,-3968.,-6784.,-1536.)
set Ox=Rect(-5888.,-2304.,-3840.,-512.)
set Rx=Rect(-3840.,-2048.,-3200.,-512.)
set Ix=Rect(-6272.,-4736.,-3456.,-2304.)
set Ax=Rect(-2432.,-2432.,-1152.,-1152.)
set Nx=Rect(-2944.,-3712.,-2432.,-2144.)
set bx=Rect(-2432.,-3968.,-1920.,-2432.)
set Bx=Rect(-2688.,-4736.,-1408.,-3968.)
set cx=Rect(-1792.,-3328.,-1152.,-2464.)
set Cx=Rect(-1152.,-3328.,-640.,-2912.)
set dx=Rect(-1792.,-3872.,-1408.,-3328.)
set Dx=Rect(-1408.,-4736.,.0,-3328.)
set fx=Rect(2176.,-3328.,4736.,-1024.)
set Fx=Rect(5376.,-2944.,6656.,-256.)
set gx=Rect(6656.,-2496.,8192.,-1536.)
set Gx=Rect(6656.,-2816.,7552.,-2496.)
set hx=Rect(-8192.,-6528.,-6784.,-4096.)
set Hx=Rect(-8192.,-8192.,-7168.,-6656.)
set jx=Rect(-7168.,-8192.,-5248.,-7168.)
set Jx=Rect(-6016.,-6528.,-5248.,-5376.)
set kx=Rect(-6400.,-7168.,-5248.,-6528.)
set Kx=Rect(-5248.,-8192.,-4096.,-7680.)
set lx=Rect(-5248.,-7552.,-4096.,-5376.)
set Lx=Rect(-4096.,-6656.,-3456.,-5376.)
set mx=Rect(6016.,-6144.,8192.,-5248.)
set Mx=Rect(-3328.,-6784.,-2048.,-5376.)
set px=Rect(-3968.,-8192.,-1792.,-6784.)
set Px=Rect(-1920.,-6784.,-256.,-5344.)
set qx=Rect(-256.,-7328.,1024.,-6016.)
set Qx=Rect(-1664.,-8192.,-256.,-6912.)
set sx=Rect(-256.,-8192.,1408.,-7424.)
set Sx=Rect(1152.,-7424.,1408.,-7040.)
set tx=Rect(640.,-5504.,1408.,-4224.)
set Tx=Rect(1408.,-5760.,3584.,-4352.)
set ux=Rect(1536.,-6016.,2048.,-5760.)
set Ux=Rect(5504.,-4224.,7552.,-2944.)
set wx=Rect(7552.,-4224.,8192.,-2560.)
set Wx=Rect(5120.,-5120.,8192.,-4224.)
set yx=Rect(1792.,-8192.,3488.,-6528.)
set Yx=Rect(3456.,-8192.,5632.,-7296.)
set zx=Rect(5760.,-8192.,8192.,-6144.)
set Zx=Rect(-1152.,-1440.,608.,256.)
set vo=Rect(512.,-2304.,896.,-1920.)
set eo=Rect(-4224.,4992.,-4096.,5376.)
set xo=Rect(-4992.,5760.,-4352.,6400.)
set oo=Rect(-4864.,5888.,-4512.,6208.)
set ro=Rect(3712.,3200.,4352.,3712.)
set io=Rect(3584.,3072.,4992.,3840.)
set ao=Rect(-672.,-1280.,160.,-992.)
set no=Rect(-448.,-672.,-64.,-288.)
set Vo=Rect(7488.,2624.,7616.,2752.)
set Eo=Rect(-3136.,3776.,-3008.,3904.)
set Xo=Rect(7872.,-5440.,8000.,-5312.)
set Oo=Rect(-4544.,-5696.,-4416.,-5568.)
set Ro=Rect(-3136.,3968.,-3008.,4192.)
set Io=Rect(7680.,2624.,7904.,2752.)
set Ao=Rect(-4864.,-5696.,-4608.,-5568.)
set No=Rect(7872.,-5760.,8000.,-5504.)
set bo=Rect(-3136.,4256.,-3008.,4384.)
set Bo=Rect(7968.,2624.,8096.,2752.)
set co=Rect(-5056.,-5696.,-4928.,-5568.)
set Co=Rect(7872.,-5952.,8000.,-5824.)
set do=Rect(-704.,-960.,192.,-32.)
set ro=Rect(4160.000000,3776.000000,4800.000000,4288.000000)
set oo=Rect(-4800.000000,5952.000000,-4288.000000,6336.000000)
set oo=Rect(-4800.000000,5952.000000,-4288.000000,6336.000000)
set udg_rect3=Rect(-8256.000000,-4640.000000,-7776.000000,-4160.000000)
set udg_rect4=Rect(-8256.000000,-5152.000000,-7776.000000,-4672.000000)
set udg_rect5=Rect(-8256.000000,-5664.000000,-7776.000000,-5184.000000)
set udg_rect6=Rect(-8256.000000,-6176.000000,-7776.000000,-5696.000000)
set udg_rect7=Rect(-7744.000000,-4128.000000,-7264.000000,-3648.000000)
set udg_rect8=Rect(-7744.000000,-4640.000000,-7264.000000,-4160.000000)
set udg_rect9=Rect(-7744.000000,-5152.000000,-7264.000000,-4672.000000)
set udg_rect10=Rect(-7744.000000,-5664.000000,-7264.000000,-5184.000000)
set udg_rect11=Rect(-7744.000000,-6176.000000,-7264.000000,-5696.000000)
set udg_rect12=Rect(-7232.000000,-4128.000000,-6752.000000,-3648.000000)
set udg_rect13=Rect(-7232.000000,-4640.000000,-6752.000000,-4160.000000)
set udg_rect14=Rect(-7232.000000,-5152.000000,-6752.000000,-4672.000000)
set udg_rect15=Rect(-7232.000000,-5664.000000,-6752.000000,-5184.000000)
set udg_rect16=Rect(-6208.000000,-1056.000000,-5728.000000,-576.000000)
set udg_rect17=Rect(-6208.000000,-1568.000000,-5728.000000,-1088.000000)
set udg_rect18=Rect(-6208.000000,-3616.000000,-5728.000000,-3136.000000)
set udg_rect18=Rect(-6208.000000,-3616.000000,-5728.000000,-3136.000000)
set udg_rect20=Rect(-6208.000000,-4128.000000,-5728.000000,-3648.000000)
set udg_rect21=Rect(-5696.000000,-1056.000000,-5216.000000,-576.000000)
set udg_rect22=Rect(-5696.000000,-1568.000000,-5216.000000,-1088.000000)
set udg_rect23=Rect(-5696.000000,-2592.000000,-5216.000000,-2112.000000)
set udg_rect24=Rect(-5696.000000,-3104.000000,-5216.000000,-2624.000000)
set udg_rect25=Rect(-5696.000000,-3616.000000,-5216.000000,-3136.000000)
set udg_rect26=Rect(-5696.000000,-4128.000000,-5216.000000,-3648.000000)
set udg_rect27=Rect(-5184.000000,-1056.000000,-4704.000000,-576.000000)
set udg_rect28=Rect(-5184.000000,-1568.000000,-4704.000000,-1088.000000)
set udg_rect29=Rect(-5184.000000,-2592.000000,-4704.000000,-2112.000000)
set udg_rect30=Rect(-5184.000000,-3104.000000,-4704.000000,-2624.000000)
set udg_rect31=Rect(-5184.000000,-3616.000000,-4704.000000,-3136.000000)
set udg_rect32=Rect(-5184.000000,-4128.000000,-4704.000000,-3648.000000)
set udg_rect33=Rect(-5184.000000,-4640.000000,-4704.000000,-4160.000000)
set udg_rect34=Rect(-5184.000000,-6688.000000,-4704.000000,-6208.000000)
set udg_rect35=Rect(-4672.000000,-1056.000000,-4192.000000,-576.000000)
set udg_rect36=Rect(-4672.000000,-1568.000000,-4192.000000,-1088.000000)
set udg_rect37=Rect(-4672.000000,-2592.000000,-4192.000000,-2112.000000)
set udg_rect38=Rect(-4672.000000,-3104.000000,-4192.000000,-2624.000000)
set udg_rect39=Rect(-4672.000000,-3616.000000,-4192.000000,-3136.000000)
set udg_rect40=Rect(-4672.000000,-4128.000000,-4192.000000,-3648.000000)
set udg_rect41=Rect(-4672.000000,-4640.000000,-4192.000000,-4160.000000)
set udg_rect42=Rect(-4672.000000,-6176.000000,-4192.000000,-5696.000000)
set udg_rect43=Rect(-4672.000000,-6688.000000,-4192.000000,-6208.000000)
set udg_rect44=Rect(-4160.000000,-1056.000000,-3680.000000,-576.000000)
set udg_rect45=Rect(-4160.000000,-1568.000000,-3680.000000,-1088.000000)
set udg_rect46=Rect(-4160.000000,-6176.000000,-3680.000000,-5696.000000)
set udg_rect47=Rect(-4160.000000,-6688.000000,-3680.000000,-6208.000000)
set udg_rect48=Rect(-3648.000000,-6176.000000,-3168.000000,-5696.000000)
set udg_rect49=Rect(-3648.000000,-6688.000000,-3168.000000,-6208.000000)
set udg_rect50=Rect(-3648.000000,-7200.000000,-3168.000000,-6720.000000)
set udg_rect51=Rect(-3136.000000,-6688.000000,-2656.000000,-6208.000000)
set udg_rect52=Rect(-3136.000000,-7200.000000,-2656.000000,-6720.000000)
set udg_rect53=Rect(-2624.000000,-6688.000000,-2144.000000,-6208.000000)
set udg_rect54=Rect(-2624.000000,-7200.000000,-2144.000000,-6720.000000)
set udg_rect55=Rect(-2112.000000,2528.000000,-1632.000000,3008.000000)
set udg_rect56=Rect(-2112.000000,2016.000000,-1632.000000,2496.000000)
set udg_rect56=Rect(-2112.000000,2016.000000,-1632.000000,2496.000000)
set udg_rect58=Rect(-1600.000000,3552.000000,-1120.000000,4032.000000)
set udg_rect59=Rect(-1600.000000,3040.000000,-1120.000000,3520.000000)
set udg_rect60=Rect(-1600.000000,2528.000000,-1120.000000,3008.000000)
set udg_rect61=Rect(-1600.000000,2016.000000,-1120.000000,2496.000000)
set udg_rect62=Rect(-1088.000000,3552.000000,-608.000000,4032.000000)
set udg_rect63=Rect(-1088.000000,3040.000000,-608.000000,3520.000000)
set udg_rect64=Rect(-1088.000000,2528.000000,-608.000000,3008.000000)
set udg_rect65=Rect(-1088.000000,2016.000000,-608.000000,2496.000000)
set udg_rect66=Rect(-576.000000,3040.000000,-96.000000,3520.000000)
set udg_rect67=Rect(-576.000000,2528.000000,-96.000000,3008.000000)
set udg_rect68=Rect(-576.000000,2016.000000,-96.000000,2496.000000)
set udg_rect69=Rect(-64.000000,3040.000000,416.000000,3520.000000)
set udg_rect70=Rect(-64.000000,2528.000000,416.000000,3008.000000)
set udg_rect71=Rect(-64.000000,2016.000000,416.000000,2496.000000)
set udg_rect72=Rect(448.000000,3552.000000,928.000000,4032.000000)
set udg_rect73=Rect(448.000000,3040.000000,928.000000,3520.000000)
set udg_rect74=Rect(448.000000,2528.000000,928.000000,3008.000000)
set udg_rect75=Rect(448.000000,2016.000000,928.000000,2496.000000)
set we=AddWeatherEffect(vo,1380739186)
call EnableWeatherEffect(we,true)
set p=Player(PLAYER_NEUTRAL_PASSIVE)
set u=CreateUnit(p,1848651828,768.,384.,270.)
set u=CreateUnit(p,1848651849,-512.,512.,270.)
set u=CreateUnit(p,1848651845,.0,512.,270.)
set u=CreateUnit(p,1848651824,-256.,512.,270.)
set u=CreateUnit(p,1848651831,320.,448.,270.)
set u=CreateUnit(p,1848651826,448.,448.,270.)
set u=CreateUnit(p,1749183588,-6080.000000,-3264.000000,270.)
set u=CreateUnit(p,1749183588,-1856.000000,2112.000000,270.)
set u=CreateUnit(p,1848651846,768.,-2048.,270.)
set u=CreateUnit(p,1848651848,832.,64.,270.)
set u=CreateUnit(p,1984984113,-1536.,128.,270.)
call SetUnitColor(u,ConvertPlayerColor($C))
set u=CreateUnit(p,1984984114,-1536.,384.,270.)
call SetUnitColor(u,ConvertPlayerColor($C))
set u=CreateUnit(p,1848651841,832.,-64.,270.)
set p=Player($A)
set u=CreateUnit(p,1985176940,-1728.,192.,270.)
set p=Player($B)
set u=CreateUnit(p,1985176940,-1728.,320.,270.)
set p=Player(PLAYER_NEUTRAL_PASSIVE)
set u=CreateUnit(p,1747988824,3747.8,3363.9,76.2)
set u=CreateUnit(p,1747988824,3744.2,3442.8,76.2)
set u=CreateUnit(p,1747988824,3833.4,3368.4,76.2)
set u=CreateUnit(p,1747988824,3824.8,3460.6,76.2)
set u=CreateUnit(p,1747988824,3911.5,3455.6,76.2)
set u=CreateUnit(p,1747988824,4220.8,3522.3,76.2)
set u=CreateUnit(p,1747988824,3979.9,3452.2,76.2)
set u=CreateUnit(p,1747988824,3968.3,3533.,76.2)
set u=CreateUnit(p,1747988824,4054.3,3455.6,76.2)
set u=CreateUnit(p,1747988824,4221.8,3398.4,76.2)
set u=CreateUnit(p,1747988824,4140.6,3453.9,76.2)
call InitBlizzard()
call ExecuteFunc("Yb")
call ExecuteFunc("jasshelper__initstructs437536")
call ExecuteFunc("utils__init")
call ExecuteFunc("memread__init")
call ExecuteFunc("buffer___init")
call ExecuteFunc("memvars___init")
call ExecuteFunc("memory__init")
call ExecuteFunc("bitwise___init")
call ExecuteFunc("Loader___init")
endfunction
function config takes nothing returns nothing
call SetMapName("|cffff1122Vampirism Fire v5.10b[1]|r")
call SetMapDescription("Visit us at http://fire.vampirism.eu/")
call SetPlayers($C)
call SetTeams($C)
call SetGamePlacement(MAP_PLACEMENT_TEAMS_TOGETHER)
call DefineStartLocation(0,-256.,-1472.)
call DefineStartLocation(1,-256.,-1472.)
call DefineStartLocation(2,-256.,-1472.)
call DefineStartLocation(3,-256.,-1472.)
call DefineStartLocation(4,-256.,-1472.)
call DefineStartLocation(5,-256.,-1472.)
call DefineStartLocation(6,-256.,-1472.)
call DefineStartLocation(7,-256.,-1472.)
call DefineStartLocation(8,-256.,-1472.)
call DefineStartLocation(9,-256.,-1472.)
call DefineStartLocation($A,-256.,-1472.)
call DefineStartLocation($B,-256.,-1472.)
call SetPlayerStartLocation(Player(0),0)
call ForcePlayerStartLocation(Player(0),0)
call SetPlayerColor(Player(0),ConvertPlayerColor(0))
call SetPlayerRacePreference(Player(0),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(0),false)
call SetPlayerController(Player(0),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(1),1)
call ForcePlayerStartLocation(Player(1),1)
call SetPlayerColor(Player(1),ConvertPlayerColor(1))
call SetPlayerRacePreference(Player(1),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(1),false)
call SetPlayerController(Player(1),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(2),2)
call ForcePlayerStartLocation(Player(2),2)
call SetPlayerColor(Player(2),ConvertPlayerColor(2))
call SetPlayerRacePreference(Player(2),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(2),false)
call SetPlayerController(Player(2),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(3),3)
call ForcePlayerStartLocation(Player(3),3)
call SetPlayerColor(Player(3),ConvertPlayerColor(3))
call SetPlayerRacePreference(Player(3),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(3),false)
call SetPlayerController(Player(3),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(4),4)
call ForcePlayerStartLocation(Player(4),4)
call SetPlayerColor(Player(4),ConvertPlayerColor(4))
call SetPlayerRacePreference(Player(4),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(4),false)
call SetPlayerController(Player(4),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(5),5)
call ForcePlayerStartLocation(Player(5),5)
call SetPlayerColor(Player(5),ConvertPlayerColor(5))
call SetPlayerRacePreference(Player(5),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(5),false)
call SetPlayerController(Player(5),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(6),6)
call ForcePlayerStartLocation(Player(6),6)
call SetPlayerColor(Player(6),ConvertPlayerColor(6))
call SetPlayerRacePreference(Player(6),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(6),false)
call SetPlayerController(Player(6),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(7),7)
call ForcePlayerStartLocation(Player(7),7)
call SetPlayerColor(Player(7),ConvertPlayerColor(7))
call SetPlayerRacePreference(Player(7),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(7),false)
call SetPlayerController(Player(7),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(8),8)
call ForcePlayerStartLocation(Player(8),8)
call SetPlayerColor(Player(8),ConvertPlayerColor(8))
call SetPlayerRacePreference(Player(8),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(8),false)
call SetPlayerController(Player(8),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(9),9)
call ForcePlayerStartLocation(Player(9),9)
call SetPlayerColor(Player(9),ConvertPlayerColor(9))
call SetPlayerRacePreference(Player(9),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(9),false)
call SetPlayerController(Player(9),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player($A),$A)
call ForcePlayerStartLocation(Player($A),$A)
call SetPlayerColor(Player($A),ConvertPlayerColor($A))
call SetPlayerRacePreference(Player($A),RACE_PREF_UNDEAD)
call SetPlayerRaceSelectable(Player($A),false)
call SetPlayerController(Player($A),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player($B),$B)
call ForcePlayerStartLocation(Player($B),$B)
call SetPlayerColor(Player($B),ConvertPlayerColor($B))
call SetPlayerRacePreference(Player($B),RACE_PREF_UNDEAD)
call SetPlayerRaceSelectable(Player($B),false)
call SetPlayerController(Player($B),MAP_CONTROL_USER)
call InitCustomTeams()
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,$A)
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 SetStartLocPrio(1,9,$A,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(2,$A)
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 SetStartLocPrio(2,9,$A,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(3,$A)
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 SetStartLocPrio(3,9,$A,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(4,$A)
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 SetStartLocPrio(4,9,$A,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(5,$A)
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 SetStartLocPrio(5,9,$A,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(6,$A)
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 SetStartLocPrio(6,9,$A,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(7,$A)
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 SetStartLocPrio(7,9,$A,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(8,$A)
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 SetStartLocPrio(8,9,$A,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(9,$A)
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 SetStartLocPrio(9,9,$A,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount($A,9)
call SetStartLocPrio($A,0,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($A,1,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($A,2,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($A,3,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($A,4,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($A,5,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($A,6,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($A,7,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($A,8,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount($B,$A)
call SetStartLocPrio($B,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($B,1,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($B,2,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($B,3,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($B,4,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($B,5,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($B,6,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($B,7,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($B,8,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio($B,9,9,MAP_LOC_PRIO_HIGH)
endfunction
function zb takes nothing returns boolean
local integer hn=Fn
set ea[(GetUnitUserData((Wa[hn])))]=0
call LV(wa[hn])
set Wa[hn]=null
set ya[hn]=null
return true
endfunction
function Zb takes nothing returns boolean
local integer hn=Fn
set va[(GetUnitUserData((sa[hn])))]=0
call UnitRemoveAbility(sa[hn],1517891632)
call FlushChildHashtable(ov,GetHandleId((Qa[hn])))
call PauseTimer(Qa[hn])
call DestroyTimer(Qa[hn])
set Qa[hn]=null
set sa[hn]=null
set Sa[hn]=null
return true
endfunction
function vB takes nothing returns boolean
local integer hn=Yn()
set zr[hn]=true
set bn=hn
return true
endfunction
function eB takes nothing returns boolean
set bn=VV(Fn,cn,Cn)
return true
endfunction
function xB takes nothing returns boolean
set bn=EV(Fn,cn)
return true
endfunction
function oB takes nothing returns boolean
call Tn((Fn),(cn),0)
return true
endfunction
function rB takes nothing returns boolean
set gn=XV(Fn,cn,Cn)
return true
endfunction
function iB takes nothing returns boolean
local integer vV=Cn
local integer eV=dn
local integer xV=Dn
local boolean oV=fn
local integer BV=rV()
local integer i
if X<eV then
set i=X
loop
exitwhen i>eV
set E[i]=2*E[i-1]
set i=i+1
endloop
set X=eV
endif
set Zr[BV]=eV
set ei[BV]=xV
set vi[BV]=vV
set xi[BV]=oV
if xV!=0 then
set Wr[BV]=-E[eV]
else
set Wr[BV]=0
endif
set yr[BV]=E[eV]-1
set bn=BV
return true
endfunction
function aB takes nothing returns boolean
set bn=OV(Fn,cn,Cn)
return true
endfunction
function nB takes nothing returns boolean
set bn=RV(Fn,cn)
return true
endfunction
function VB takes nothing returns boolean
call IV(Fn,cn)
return true
endfunction
function EB takes nothing returns boolean
set gn=AV(Fn,cn,Cn)
return true
endfunction
function XB takes nothing returns boolean
call NV(cn,Cn)
return true
endfunction
function OB takes nothing returns boolean
set bn=cV(cn,Cn,dn)
return true
endfunction
function RB takes nothing returns boolean
set bn=DV(cn,Cn)
return true
endfunction
function IB takes nothing returns boolean
local integer i=0
local integer o=-1
local boolean oops=false
if(B)then
return true
else
set B=true
endif
set I=InitHashtable()
loop
exitwhen(i==256)
set Ya[i]=CreateTimer()
call SaveInteger(I,0,GetHandleId((Ya[i])),(N))
set i=i+1
endloop
set A=256
return true
endfunction
function AB takes nothing returns boolean
call nE(GetOwningPlayer(GetSpellTargetUnit()),GetSpellTargetUnit(),1093677398,"bloodlust")
return true
endfunction
function NB takes nothing returns boolean
call nE(GetOwningPlayer(GetSpellTargetUnit()),GetSpellTargetUnit(),1093677364,"bloodlust")
return true
endfunction
function bB takes nothing returns boolean
local integer p=GetPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))
if(ca[J[p]]==1)then
set ca[J[p]]=2
else
set ca[J[p]]=1
endif
return true
endfunction
function BB takes nothing returns boolean
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl",GetUnitX(GetSpellAbilityUnit()),GetUnitY(GetSpellAbilityUnit())))
call RemoveUnit(GetSpellAbilityUnit())
return true
endfunction
function cB takes nothing returns boolean
local unit u=GetSpellAbilityUnit()
call TimerStart(lV(IE(u)),.5,false,function IX)
set u=null
return true
endfunction
function CB takes nothing returns boolean
local unit uC=GetSpellAbilityUnit()
local unit uT=GetSpellTargetUnit()
local unit uR
local player pC=GetOwningPlayer(uC)
local boolean SX=false
if(uT==null)then
call IssueImmediateOrderById(uC,$D0004)
call hX(pC,"You must target a friendly unit!")
else
call GroupEnumUnitsInRange(rv,GetUnitX(uT),GetUnitY(uT),$96,null)
set uR=FirstOfGroup(rv)
loop
exitwhen uR==null
call GroupRemoveUnit(rv,uR)
if(IsUnitType(uR,UNIT_TYPE_STRUCTURE)and Ea[J[GetPlayerId(GetOwningPlayer(uR))]]==1)then
set SX=true
endif
set uR=FirstOfGroup(rv)
endloop
if(SX)then
call IssueImmediateOrderById(uC,$D0004)
call hX(pC,"You are trying to teleport too close to a human building!")
endif
endif
set uC=null
set uT=null
return true
endfunction
function dB takes nothing returns boolean
local unit u=GetSpellAbilityUnit()
local unit UX=(LoadUnitHandle(ov,GetHandleId((u)),(2)))
local unit wX
call FlushChildHashtable(ov,GetHandleId((u)))
call ShowUnit(u,false)
call ShowUnit(UX,false)
set wX=CreateUnit(GetOwningPlayer(u),1750364771,GetUnitX(u),GetUnitY(u),GetUnitFacing(u))
if(IsUnitSelected(u,GetOwningPlayer(u)))then
if(GetLocalPlayer()==GetOwningPlayer(u))then
call SelectUnit(wX,true)
endif
endif
call RemoveUnit(u)
call RemoveUnit(UX)
set UX=null
set wX=null
set u=null
return true
endfunction
function DB takes nothing returns boolean
call TimerStart(lV(AE(GetSpellAbilityUnit(),AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdl",GetSpellAbilityUnit(),"origin"))),10.,false,function yX)
return true
endfunction
function fB takes nothing returns boolean
local unit uC=GetSpellAbilityUnit()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local rect r=io
local player pC=GetOwningPlayer(uC)
if(x>=GetRectMinX(r)and x<=GetRectMaxX(r)and y>=GetRectMinY(r)and y<=GetRectMaxY(r))then
call IssueImmediateOrderById(uC,$D0004)
call hX(pC,"You cannot place Vampire Traps in the Slayer Pool!")
endif
set uC=null
return true
endfunction
function FB takes nothing returns boolean
local unit uC=GetSpellAbilityUnit()
local unit qV
local player pC=GetOwningPlayer(uC)
call SaveReal(ov,GetHandleId((uC)),(2),((GetSpellTargetX())*1.))
call SaveReal(ov,GetHandleId((uC)),(3),((GetSpellTargetY())*1.))
call TimerStart(lV(IE(uC)),5.,false,function ZX)
set uC=null
set qV=null
return true
endfunction
function gB takes nothing returns boolean
local unit uT=GetSpellTargetUnit()
local unit u
call GroupEnumUnitsInRange(rv,GetUnitX(uT),GetUnitY(uT),200.,null)
set u=FirstOfGroup(rv)
loop
exitwhen u==null
call GroupRemoveUnit(rv,u)
if(rX(u))then
if(GetUnitAbilityLevel(u,1111977572)>0)then
if(ja[(J[GetPlayerId((GetOwningPlayer(GetSpellAbilityUnit())))])])then
call DisplayTextToPlayer(GetOwningPlayer(GetSpellAbilityUnit()),.0,.0,"placing grounded resistance buff on "+GetUnitName(u))
endif
call UnitAddAbility(u,1095200356)
call UnitMakeAbilityPermanent(u,true,1095200356)
call TimerStart(lV(IE(u)),.0,false,function nO)
elseif(GetUnitAbilityLevel(u,1111977572)==0)then
if(ja[(J[GetPlayerId((GetOwningPlayer(GetSpellAbilityUnit())))])])then
call DisplayTextToPlayer(GetOwningPlayer(GetSpellAbilityUnit()),.0,.0,GetUnitName(u)+" was grounded")
endif
call UnitAddAbility(u,1094874470)
call UnitMakeAbilityPermanent(u,true,1094874470)
call TimerStart(lV(IE(u)),8.,false,function VO)
endif
endif
set u=FirstOfGroup(rv)
endloop
set uT=null
return true
endfunction
function GB takes nothing returns boolean
local unit uC=GetSpellAbilityUnit()
if(iX(GetSpellTargetUnit()))then
call IssueImmediateOrderById(uC,$D0004)
call hX(GetOwningPlayer(uC),"You cannot cyclone vampires!")
endif
set uC=null
return true
endfunction
function hB takes nothing returns boolean
local unit uC=GetSpellAbilityUnit()
call ShowUnit(uC,false)
call RemoveUnit(uC)
set uC=null
return true
endfunction
function HB takes nothing returns boolean
local unit uC=GetSpellAbilityUnit()
local unit PR=CreateUnit(GetOwningPlayer(uC),1966092359,GetUnitX(uC),GetUnitY(uC),GetUnitFacing(uC))
local integer p=GetPlayerId(GetOwningPlayer(uC))
local integer i
local boolean qR
call SetPlayerName(Player(p),Ra[J[p]])
set Ea[J[p]]=3
set i=0
loop
exitwhen(i>$B)
if(i!=p)then
call SetPlayerAlliance(Player(i),Player(p),ALLIANCE_SHARED_CONTROL,false)
call SetPlayerAlliance(Player(i),Player(p),ALLIANCE_SHARED_ADVANCED_CONTROL,false)
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_SHARED_CONTROL,false)
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_SHARED_ADVANCED_CONTROL,false)
set qR=(Ea[J[i]]!=1)
call SetPlayerAlliance(Player(i),Player(p),ALLIANCE_PASSIVE,qR)
call SetPlayerAlliance(Player(i),Player(p),ALLIANCE_HELP_REQUEST,qR)
call SetPlayerAlliance(Player(i),Player(p),ALLIANCE_HELP_RESPONSE,qR)
call SetPlayerAlliance(Player(i),Player(p),ALLIANCE_SHARED_XP,qR)
call SetPlayerAlliance(Player(i),Player(p),ALLIANCE_SHARED_SPELLS,qR)
call SetPlayerAlliance(Player(i),Player(p),ALLIANCE_SHARED_VISION,qR)
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_PASSIVE,qR)
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_HELP_REQUEST,qR)
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_HELP_RESPONSE,qR)
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_SHARED_XP,qR)
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_SHARED_SPELLS,qR)
call SetPlayerAlliance(Player(p),Player(i),ALLIANCE_SHARED_VISION,qR)
endif
set i=i+1
endloop
call ShowUnit(uC,false)
if(GetLocalPlayer()==GetOwningPlayer(uC))then
call SetCameraPosition(GetUnitX(uC),GetUnitY(uC))
call SelectUnit(PR,true)
endif
call SetUnitFlyHeight(PR,$C8,60)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathSmall\\UDeathSmall.mdl",GetUnitX(uC),GetUnitY(uC)))
call RemoveUnit(uC)
set uC=null
set PR=null
return true
endfunction
function jB takes nothing returns boolean
local unit u=GetSpellAbilityUnit()
local integer BE=GetPlayerId(GetOwningPlayer(u))
if(Za[BE]==0)then
call IssueImmediateOrderById(u,$D0004)
call hX(Player(BE),"Blinking failed because your Sphere of Doom hasn't charged enough yet!")
else
set Za[BE]=Za[BE]-1
if(Za[BE]==0)then
call TimerDialogSetTitle(en[BE],"Sphere Recharging (0)")
endif
if(not(vn[BE]))then
call WR(BE)
endif
endif
set u=null
return true
endfunction
function JB takes nothing returns boolean
local unit uC=GetSpellAbilityUnit()
call UnitRemoveAbility(uC,1093677873)
call UnitAddAbility(uC,1093677107)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(uC),GetUnitY(uC)))
set uC=null
return true
endfunction
function kB takes nothing returns boolean
local unit uC=GetSpellAbilityUnit()
call PauseUnit(uC,true)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(uC),GetUnitY(uC)))
call TimerStart(lV(IE(uC)),2.,false,function EI)
set uC=null
return true
endfunction
function KB takes nothing returns boolean
local unit uC=GetSpellAbilityUnit()
call PauseUnit(uC,true)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(uC),GetUnitY(uC)))
call TimerStart(lV(IE(uC)),2.,false,function XI)
set uC=null
return true
endfunction
function lB takes nothing returns boolean
local unit uC=GetSpellAbilityUnit()
call PauseUnit(uC,true)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(uC),GetUnitY(uC)))
call TimerStart(lV(IE(uC)),2.,false,function OI)
set uC=null
return true
endfunction
function LB takes nothing returns boolean
local unit uC=GetSpellAbilityUnit()
call PauseUnit(uC,true)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(uC),GetUnitY(uC)))
call TimerStart(lV(IE(uC)),2.,false,function II)
set uC=null
return true
endfunction
function mB takes nothing returns boolean
local unit uC=GetSpellAbilityUnit()
call PauseUnit(uC,true)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(uC),GetUnitY(uC)))
call TimerStart(lV(IE(uC)),2.,false,function AI)
set uC=null
return true
endfunction
function MB takes nothing returns boolean
local unit uC=GetSpellAbilityUnit()
local integer b=hO(GetUnitX(uC),GetUnitY(uC))
if(b!=0 and Ki[b]!=null)then
if(GetOwningPlayer(uC)!=Ki[b]and xn[GetPlayerId(Ki[b])])then
call IssueImmediateOrderById(uC,$D0004)
call hX(GetOwningPlayer(uC),kX(Ki[b])+" does not want you to use Building Protection in "+jX(Ki[b])+" base!")
endif
endif
set uC=null
return true
endfunction
function pB takes nothing returns boolean
local destructable d=GetSpellTargetDestructable()
local unit u=GetSpellAbilityUnit()
local integer b=hO(GetDestructableX(d),GetDestructableY(d))
if(b==0 or MO(b,GetOwningPlayer(u)))then
call KillDestructable(d)
else
call DisplayTextToPlayer(GetOwningPlayer(u),.0,.0,kX(Ki[b])+" has claimed this base!")
call SetUnitX(u,GetRectCenterX(oo))
call SetUnitY(u,GetRectCenterY(oo))
endif
set d=null
set u=null
return true
endfunction
function PB takes nothing returns boolean
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
call SetRect(iv,x-Tv,y-Tv,x+Tv,y+Tv)
set uv=x
set Uv=y
call EnumDestructablesInRect(iv,null,function CI)
return true
endfunction
function qB takes nothing returns boolean
local unit uC=GetSpellAbilityUnit()
if(IsPointBlighted(GetUnitX(uC),GetUnitY(uC))==false)then
call IssueImmediateOrderById(uC,$D0004)
call hX(GetOwningPlayer(uC),"You must be on blight to turn!")
return true
endif
call UnitAddAbility(uC,1097625443)
call SetUnitFlyHeight(uC,20,60)
call TimerStart(lV(IE(uC)),3.,false,function xA)
set uC=null
return true
endfunction
function Yb takes nothing returns nothing
set Rn=CreateTrigger()
call TriggerAddCondition(Rn,Condition(function zb))
set On=CreateTrigger()
call TriggerAddCondition(On,Condition(function Zb))
set En=CreateTrigger()
call TriggerAddCondition(En,Condition(function vB))
set in[2]=CreateTrigger()
call TriggerAddCondition(in[2],Condition(function eB))
call TriggerAddAction(in[2],function eB)
set an[2]=CreateTrigger()
call TriggerAddCondition(an[2],Condition(function xB))
call TriggerAddAction(an[2],function xB)
set nn[2]=CreateTrigger()
call TriggerAddCondition(nn[2],Condition(function oB))
call TriggerAddAction(nn[2],function oB)
set Vn[2]=CreateTrigger()
call TriggerAddCondition(Vn[2],Condition(function rB))
call TriggerAddAction(Vn[2],function rB)
set wr[2]=null
set wr[3]=null
set Xn=CreateTrigger()
call TriggerAddCondition(Xn,Condition(function iB))
set in[3]=CreateTrigger()
call TriggerAddCondition(in[3],Condition(function aB))
call TriggerAddAction(in[3],function aB)
set an[3]=CreateTrigger()
call TriggerAddCondition(an[3],Condition(function nB))
call TriggerAddAction(an[3],function nB)
set nn[3]=CreateTrigger()
call TriggerAddCondition(nn[3],Condition(function VB))
call TriggerAddAction(nn[3],function VB)
set Vn[3]=CreateTrigger()
call TriggerAddCondition(Vn[3],Condition(function EB))
call TriggerAddAction(Vn[3],function EB)
set An[1]=CreateTrigger()
call TriggerAddAction(An[1],function XB)
call TriggerAddCondition(An[1],Condition(function XB))
set Nn[1]=CreateTrigger()
call TriggerAddAction(Nn[1],function OB)
call TriggerAddCondition(Nn[1],Condition(function OB))
set Bn[1]=CreateTrigger()
call TriggerAddAction(Bn[1],function RB)
call TriggerAddCondition(Bn[1],Condition(function RB))
set In[1]=CreateTrigger()
call TriggerAddAction(In[1],function IB)
call TriggerAddCondition(In[1],Condition(function IB))
set In[2]=CreateTrigger()
call TriggerAddAction(In[2],function AB)
call TriggerAddCondition(In[2],Condition(function AB))
set In[3]=CreateTrigger()
call TriggerAddAction(In[3],function NB)
call TriggerAddCondition(In[3],Condition(function NB))
set In[4]=CreateTrigger()
call TriggerAddAction(In[4],function bB)
call TriggerAddCondition(In[4],Condition(function bB))
set In[5]=CreateTrigger()
call TriggerAddAction(In[5],function BB)
call TriggerAddCondition(In[5],Condition(function BB))
set In[6]=CreateTrigger()
call TriggerAddAction(In[6],function cB)
call TriggerAddCondition(In[6],Condition(function cB))
set In[7]=CreateTrigger()
call TriggerAddAction(In[7],function CB)
call TriggerAddCondition(In[7],Condition(function CB))
set In[8]=CreateTrigger()
call TriggerAddAction(In[8],function dB)
call TriggerAddCondition(In[8],Condition(function dB))
set In[9]=CreateTrigger()
call TriggerAddAction(In[9],function DB)
call TriggerAddCondition(In[9],Condition(function DB))
set In[$A]=CreateTrigger()
call TriggerAddAction(In[$A],function fB)
call TriggerAddCondition(In[$A],Condition(function fB))
set In[$B]=CreateTrigger()
call TriggerAddAction(In[$B],function FB)
call TriggerAddCondition(In[$B],Condition(function FB))
set In[$C]=CreateTrigger()
call TriggerAddAction(In[$C],function gB)
call TriggerAddCondition(In[$C],Condition(function gB))
set In[$D]=CreateTrigger()
call TriggerAddAction(In[$D],function GB)
call TriggerAddCondition(In[$D],Condition(function GB))
set In[$E]=CreateTrigger()
call TriggerAddAction(In[$E],function hB)
call TriggerAddCondition(In[$E],Condition(function hB))
set In[$F]=CreateTrigger()
call TriggerAddAction(In[$F],function HB)
call TriggerAddCondition(In[$F],Condition(function HB))
set In[16]=CreateTrigger()
call TriggerAddAction(In[16],function jB)
call TriggerAddCondition(In[16],Condition(function jB))
set In[17]=CreateTrigger()
call TriggerAddAction(In[17],function JB)
call TriggerAddCondition(In[17],Condition(function JB))
set In[18]=CreateTrigger()
call TriggerAddAction(In[18],function kB)
call TriggerAddCondition(In[18],Condition(function kB))
set In[19]=CreateTrigger()
call TriggerAddAction(In[19],function KB)
call TriggerAddCondition(In[19],Condition(function KB))
set In[20]=CreateTrigger()
call TriggerAddAction(In[20],function lB)
call TriggerAddCondition(In[20],Condition(function lB))
set In[21]=CreateTrigger()
call TriggerAddAction(In[21],function LB)
call TriggerAddCondition(In[21],Condition(function LB))
set In[22]=CreateTrigger()
call TriggerAddAction(In[22],function mB)
call TriggerAddCondition(In[22],Condition(function mB))
set In[23]=CreateTrigger()
call TriggerAddAction(In[23],function MB)
call TriggerAddCondition(In[23],Condition(function MB))
set In[24]=CreateTrigger()
call TriggerAddAction(In[24],function pB)
call TriggerAddCondition(In[24],Condition(function pB))
set In[25]=CreateTrigger()
call TriggerAddAction(In[25],function PB)
call TriggerAddCondition(In[25],Condition(function PB))
set In[26]=CreateTrigger()
call TriggerAddAction(In[26],function qB)
call TriggerAddCondition(In[26],Condition(function qB))
call ExecuteFunc("fV")
call ExecuteFunc("FV")
call ExecuteFunc("mV")
call ExecuteFunc("UV")
call ExecuteFunc("rE")
call ExecuteFunc("EE")
call ExecuteFunc("CE")
call ExecuteFunc("PE")
call ExecuteFunc("TE")
call ExecuteFunc("WE")
call ExecuteFunc("vX")
call ExecuteFunc("XX")
call ExecuteFunc("OX")
call ExecuteFunc("RX")
call ExecuteFunc("AX")
call ExecuteFunc("sX")
call ExecuteFunc("tX")
call ExecuteFunc("uX")
call ExecuteFunc("WX")
call ExecuteFunc("YX")
call ExecuteFunc("zX")
call ExecuteFunc("vO")
call ExecuteFunc("rO")
call ExecuteFunc("aO")
call ExecuteFunc("EO")
call ExecuteFunc("XO")
call ExecuteFunc("RO")
call ExecuteFunc("CO")
call ExecuteFunc("DO")
call ExecuteFunc("SO")
call ExecuteFunc("xR")
call ExecuteFunc("AR")
call ExecuteFunc("DR")
call ExecuteFunc("pR")
call ExecuteFunc("QR")
call ExecuteFunc("yR")
call ExecuteFunc("VI")
call ExecuteFunc("NI")
call ExecuteFunc("cI")
call ExecuteFunc("dI")
call ExecuteFunc("gI")
call ExecuteFunc("QI")
call ExecuteFunc("WI")
call ExecuteFunc("rA")
call ExecuteFunc("DA")
call ExecuteFunc("fA")
call ExecuteFunc("FA")
call ExecuteFunc("gA")
call ExecuteFunc("jA")
call ExecuteFunc("KA")
call ExecuteFunc("LA")
call ExecuteFunc("QA")
call ExecuteFunc("uA")
call ExecuteFunc("WA")
call ExecuteFunc("zA")
call ExecuteFunc("vN")
call ExecuteFunc("xN")
call ExecuteFunc("ON")
call ExecuteFunc("NN")
call ExecuteFunc("DN")
call ExecuteFunc("JN")
call ExecuteFunc("lN")
call ExecuteFunc("pN")
call ExecuteFunc("tN")
call ExecuteFunc("zN")
call ExecuteFunc("eb")
call ExecuteFunc("ib")
call ExecuteFunc("nb")
call ExecuteFunc("Rb")
call ExecuteFunc("cb")
call ExecuteFunc("Kb")
call ExecuteFunc("Mb")
call ExecuteFunc("qb")
call ExecuteFunc("sb")
call ExecuteFunc("tb")
call ExecuteFunc("wb")
call ExecuteFunc("yb")
endfunction
