// Map deprotected by X-deprotect (version 2006-10-02) by zibada
// http://dimon.xgm.ru/xdep/
// Visit our modmaking community at http://xgm.ru/
Name | Type | is_array | initial_value |
boolean01 | boolean | No | |
boolean02 | boolean | No | |
boolean03 | boolean | No | |
boolean04 | boolean | No | |
boolean05 | boolean | No | |
boolean06 | boolean | No | |
boolean07 | boolean | No | |
boolean08 | boolean | No | |
boolean09 | boolean | No | |
boolean10 | boolean | No | |
boolean11 | boolean | No | |
boolean12 | boolean | No | |
boolean13 | boolean | No | |
boolean14 | boolean | No | |
boolean15 | boolean | No | |
boolean16 | boolean | No | |
boolean17 | boolean | No | |
boolean18 | boolean | No | |
boolean19 | boolean | No | |
boolean20 | boolean | No | |
boolean21 | boolean | No | |
boolean22 | boolean | No | |
boolean23 | boolean | No | |
boolean24 | boolean | No | |
boolean25 | boolean | No | |
boolean26 | boolean | No | |
boolean27 | boolean | No | |
boolean28 | boolean | No | |
boolean29 | boolean | No | |
boolean30 | boolean | No | |
boolean31 | boolean | No | |
boolean32 | boolean | No | |
boolean33 | boolean | No | |
boolean34 | boolean | No | |
boolean35 | boolean | No | |
boolean36 | boolean | No | |
boolean37 | boolean | No | |
boolean38 | boolean | No | |
boolean39 | boolean | No | |
boolean40 | boolean | No | |
boolean41 | boolean | No | |
boolean42 | boolean | No | |
boolean43 | boolean | No | |
boolean44 | boolean | No | |
boolean45 | boolean | No | |
boolean46 | boolean | No | true |
boolean47 | boolean | No | |
boolean48 | boolean | No | |
boolean49 | boolean | No | |
boolean50 | boolean | No | |
boolean51 | boolean | No | |
boolean52 | boolean | No | |
boolean53 | boolean | No | |
boolean54 | boolean | No | |
boolean55 | boolean | No | |
boolean56 | boolean | No | |
boolean57 | boolean | No | |
boolean58 | boolean | No | |
boolean59 | boolean | No | |
booleans01 | boolean | Yes | |
booleans02 | boolean | Yes | |
booleans03 | boolean | Yes | |
booleans04 | boolean | Yes | |
booleans05 | boolean | Yes | |
booleans06 | boolean | Yes | |
booleans07 | boolean | Yes | |
booleans08 | boolean | Yes | |
booleans09 | boolean | Yes | |
booleans10 | boolean | Yes | |
booleans11 | boolean | Yes | |
booleans12 | boolean | Yes | |
booleans13 | boolean | Yes | |
booleans14 | boolean | Yes | |
booleans15 | boolean | Yes | |
boolexpr01 | boolexpr | No | |
effects01 | effect | Yes | |
force01 | force | No | |
force02 | force | No | |
force03 | force | No | |
force04 | force | No | |
gamecache01 | gamecache | No | |
group01 | group | No | |
group02 | group | No | |
group03 | group | No | |
group04 | group | No | |
integer01 | integer | No | |
integer02 | integer | No | |
integer03 | integer | No | |
integer04 | integer | No | |
integer05 | integer | No | |
integer06 | integer | No | |
integer07 | integer | No | |
integer08 | integer | No | |
integer09 | integer | No | |
integer10 | integer | No | |
integer11 | integer | No | |
integer12 | integer | No | |
integer13 | integer | No | |
integer14 | integer | No | |
integer15 | integer | No | |
integer16 | integer | No | |
integer17 | integer | No | |
integer18 | integer | No | |
integer19 | integer | No | |
integer20 | integer | No | |
integer21 | integer | No | |
integer22 | integer | No | |
integer23 | integer | No | |
integer24 | integer | No | |
integer25 | integer | No | |
integer26 | integer | No | |
integer27 | integer | No | |
integer28 | integer | No | |
integer29 | integer | No | |
integer30 | integer | No | |
integer31 | integer | No | |
integer32 | integer | No | 1093683285 |
integer33 | integer | No | 1093683288 |
integer34 | integer | No | 1093686067 |
integer35 | integer | No | 1093686066 |
integer36 | integer | No | 1093682777 |
integer37 | integer | No | |
integer38 | integer | No | |
integer39 | integer | No | |
integer40 | integer | No | |
integer41 | integer | No | |
integer42 | integer | No | |
integer43 | integer | No | |
integer44 | integer | No | |
integer45 | integer | No | |
integer46 | integer | No | 1697656883 |
integer47 | integer | No | 1093685831 |
integer48 | integer | No | 1093682487 |
integer49 | integer | No | 1093677369 |
integer50 | integer | No | 1093686064 |
integer51 | integer | No | 1093686065 |
integer52 | integer | No | |
integer53 | integer | No | 1093678422 |
integers01 | integer | Yes | |
integers02 | integer | Yes | |
integers03 | integer | Yes | |
integers04 | integer | Yes | |
integers05 | integer | Yes | |
integers06 | integer | Yes | |
integers07 | integer | Yes | |
integers08 | integer | Yes | |
integers09 | integer | Yes | |
integers10 | integer | Yes | |
integers11 | integer | Yes | |
integers12 | integer | Yes | |
integers13 | integer | Yes | |
integers14 | integer | Yes | |
integers15 | integer | Yes | |
integers16 | integer | Yes | |
integers17 | integer | Yes | |
integers18 | integer | Yes | |
integers19 | integer | Yes | |
integers20 | integer | Yes | |
integers21 | integer | Yes | |
integers22 | integer | Yes | |
integers23 | integer | Yes | |
integers24 | integer | Yes | |
integers25 | integer | Yes | |
integers26 | integer | Yes | |
integers27 | integer | Yes | |
integers28 | integer | Yes | |
integers29 | integer | Yes | |
integers30 | integer | Yes | |
integers31 | integer | Yes | |
integers32 | integer | Yes | |
integers33 | integer | Yes | |
integers34 | integer | Yes | |
integers35 | integer | Yes | |
integers36 | integer | Yes | |
integers37 | integer | Yes | |
integers38 | integer | Yes | |
integers39 | integer | Yes | |
integers40 | integer | Yes | |
integers41 | integer | Yes | |
integers42 | integer | Yes | |
integers43 | integer | Yes | |
integers44 | integer | Yes | |
integers45 | integer | Yes | |
integers46 | integer | Yes | |
integers47 | integer | Yes | |
integers48 | integer | Yes | |
integers49 | integer | Yes | |
integers50 | integer | Yes | |
integers51 | integer | Yes | |
integers52 | integer | Yes | |
integers53 | integer | Yes | |
integers54 | integer | Yes | |
integers55 | integer | Yes | |
integers56 | integer | Yes | |
integers57 | integer | Yes | |
item01 | item | No | |
item02 | item | No | |
items01 | item | Yes | |
items02 | item | Yes | |
items03 | item | Yes | |
items04 | item | Yes | |
items05 | item | Yes | |
items06 | item | Yes | |
items07 | item | Yes | |
leaderboard01 | leaderboard | No | |
leaderboard02 | leaderboard | No | |
leaderboard03 | leaderboard | No | |
leaderboards01 | leaderboard | Yes | |
leaderboards02 | leaderboard | Yes | |
location01 | location | No | |
location02 | location | No | |
location03 | location | No | |
location04 | location | No | |
location05 | location | No | |
location06 | location | No | |
location07 | location | No | |
location08 | location | No | |
location09 | location | No | |
location10 | location | No | |
location11 | location | No | |
location12 | location | No | |
location13 | location | No | |
location14 | location | No | |
location15 | location | No | |
location16 | location | No | |
location17 | location | No | |
location18 | location | No | |
location19 | location | No | |
location20 | location | No | |
locations01 | location | Yes | |
multiboard01 | multiboard | No | |
multiboard02 | multiboard | No | |
multiboard03 | multiboard | No | |
player01 | player | No | |
player02 | player | No | |
player03 | player | No | |
player04 | player | No | |
player05 | player | No | |
player06 | player | No | |
player07 | player | No | |
players01 | player | Yes | |
players02 | player | Yes | |
players03 | player | Yes | |
players04 | player | Yes | |
players05 | player | Yes | |
real01 | real | No | |
real02 | real | No | |
real03 | real | No | |
real04 | real | No | |
real05 | real | No | |
real06 | real | No | |
real07 | real | No | |
real08 | real | No | |
real09 | real | No | |
real10 | real | No | |
real11 | real | No | |
real12 | real | No | |
real13 | real | No | |
real14 | real | No | |
real15 | real | No | 0. |
real16 | real | No | 0. |
reals01 | real | Yes | |
reals02 | real | Yes | |
reals03 | real | Yes | |
reals04 | real | Yes | |
reals05 | real | Yes | |
reals06 | real | Yes | |
reals07 | real | Yes | |
reals08 | real | Yes | |
rect01 | rect | No | |
rect02 | rect | No | |
rect03 | rect | No | |
rect04 | rect | No | |
rect05 | rect | No | |
rect06 | rect | No | |
rect07 | rect | No | |
rect08 | rect | No | |
rect09 | rect | No | |
rect10 | rect | No | |
rect100 | rect | No | |
rect101 | rect | No | |
rect102 | rect | No | |
rect103 | rect | No | |
rect104 | rect | No | |
rect105 | rect | No | |
rect106 | rect | No | |
rect107 | rect | No | |
rect108 | rect | No | |
rect109 | rect | No | |
rect11 | rect | No | |
rect110 | rect | No | |
rect111 | rect | No | |
rect112 | rect | No | |
rect113 | rect | No | |
rect114 | rect | No | |
rect115 | rect | No | |
rect116 | rect | No | |
rect117 | rect | No | |
rect118 | rect | No | |
rect119 | rect | No | |
rect12 | rect | No | |
rect120 | rect | No | |
rect121 | rect | No | |
rect122 | rect | No | |
rect123 | rect | No | |
rect124 | rect | No | |
rect125 | rect | No | |
rect126 | rect | No | |
rect127 | rect | No | |
rect128 | rect | No | |
rect129 | rect | No | |
rect13 | rect | No | |
rect130 | rect | No | |
rect131 | rect | No | |
rect132 | rect | No | |
rect133 | rect | No | |
rect134 | rect | No | |
rect135 | rect | No | |
rect136 | rect | No | |
rect137 | rect | No | |
rect138 | rect | No | |
rect139 | rect | No | |
rect14 | rect | No | |
rect140 | rect | No | |
rect141 | rect | No | |
rect142 | rect | No | |
rect143 | rect | No | |
rect144 | rect | No | |
rect145 | rect | No | |
rect146 | rect | No | |
rect147 | rect | No | |
rect148 | rect | No | |
rect149 | rect | No | |
rect15 | rect | No | |
rect150 | rect | No | |
rect151 | rect | No | |
rect152 | rect | No | |
rect153 | rect | No | |
rect154 | rect | No | |
rect155 | rect | No | |
rect156 | rect | No | |
rect157 | rect | No | |
rect158 | rect | No | |
rect159 | rect | No | |
rect16 | rect | No | |
rect160 | rect | No | |
rect161 | rect | No | |
rect162 | rect | No | |
rect163 | rect | No | |
rect164 | rect | No | |
rect17 | rect | No | |
rect18 | rect | No | |
rect19 | rect | No | |
rect20 | rect | No | |
rect21 | rect | No | |
rect22 | rect | No | |
rect23 | rect | No | |
rect24 | rect | No | |
rect25 | rect | No | |
rect26 | rect | No | |
rect27 | rect | No | |
rect28 | rect | No | |
rect29 | rect | No | |
rect30 | rect | No | |
rect31 | rect | No | |
rect32 | rect | No | |
rect33 | rect | No | |
rect34 | rect | No | |
rect35 | rect | No | |
rect36 | rect | No | |
rect37 | rect | No | |
rect38 | rect | No | |
rect39 | rect | No | |
rect40 | rect | No | |
rect41 | rect | No | |
rect42 | rect | No | |
rect43 | rect | No | |
rect44 | rect | No | |
rect45 | rect | No | |
rect46 | rect | No | |
rect47 | rect | No | |
rect48 | rect | No | |
rect49 | rect | No | |
rect50 | rect | No | |
rect51 | rect | No | |
rect52 | rect | No | |
rect53 | rect | No | |
rect54 | rect | No | |
rect55 | rect | No | |
rect56 | rect | No | |
rect57 | rect | No | |
rect58 | rect | No | |
rect59 | rect | No | |
rect60 | rect | No | |
rect61 | rect | No | |
rect62 | rect | No | |
rect63 | rect | No | |
rect64 | rect | No | |
rect65 | rect | No | |
rect66 | rect | No | |
rect67 | rect | No | |
rect68 | rect | No | |
rect69 | rect | No | |
rect70 | rect | No | |
rect71 | rect | No | |
rect72 | rect | No | |
rect73 | rect | No | |
rect74 | rect | No | |
rect75 | rect | No | |
rect76 | rect | No | |
rect77 | rect | No | |
rect78 | rect | No | |
rect79 | rect | No | |
rect80 | rect | No | |
rect81 | rect | No | |
rect82 | rect | No | |
rect83 | rect | No | |
rect84 | rect | No | |
rect85 | rect | No | |
rect86 | rect | No | |
rect87 | rect | No | |
rect88 | rect | No | |
rect89 | rect | No | |
rect90 | rect | No | |
rect91 | rect | No | |
rect92 | rect | No | |
rect93 | rect | No | |
rect94 | rect | No | |
rect95 | rect | No | |
rect96 | rect | No | |
rect97 | rect | No | |
rect98 | rect | No | |
rect99 | rect | No | |
region01 | region | No | |
region02 | region | No | |
region03 | region | No | |
region04 | region | No | |
region05 | region | No | |
region06 | region | No | |
sound01 | sound | No | |
sound02 | sound | No | |
sound03 | sound | No | |
sound04 | sound | No | |
sound05 | sound | No | |
sound06 | sound | No | |
sound07 | sound | No | |
sound08 | sound | No | |
sound09 | sound | No | |
sound10 | sound | No | |
sound11 | sound | No | |
sound12 | sound | No | |
sound13 | sound | No | |
sound14 | sound | No | |
sound15 | sound | No | |
sound16 | sound | No | |
sound17 | sound | No | |
sound18 | sound | No | |
sound19 | sound | No | |
sound20 | sound | No | |
sound21 | sound | No | |
sound22 | sound | No | |
sound23 | sound | No | |
sound24 | sound | No | |
sound25 | sound | No | |
sound26 | sound | No | |
sound27 | sound | No | |
string01 | string | No | |
string02 | string | No | |
string03 | string | No | |
string04 | string | No | |
string05 | string | No | |
string06 | string | No | |c00FF6600 |
string07 | string | No | No Mode |
string08 | string | No | |c008A2BE2Option 1: |r |
string09 | string | No | |c008A2BE2Option 2: |r |
string10 | string | No | |c008A2BE2Option 3: |r |
strings01 | string | Yes | |
strings02 | string | Yes | |
strings03 | string | Yes | |
strings04 | string | Yes | |
strings05 | string | Yes | |
strings06 | string | Yes | |
strings07 | string | Yes | |
timer01 | timer | No | |
timer02 | timer | No | |
timers01 | timer | Yes | |
timers02 | timer | Yes | |
timers03 | timer | Yes | |
trigger01 | trigger | No | |
trigger02 | trigger | No | |
trigger03 | trigger | No | |
trigger04 | trigger | No | |
trigger05 | trigger | No | |
trigger06 | trigger | No | |
trigger07 | trigger | No | |
trigger08 | trigger | No | |
trigger09 | trigger | No | |
trigger10 | trigger | No | |
trigger100 | trigger | No | |
trigger101 | trigger | No | |
trigger102 | trigger | No | |
trigger103 | trigger | No | |
trigger104 | trigger | No | |
trigger105 | trigger | No | |
trigger106 | trigger | No | |
trigger107 | trigger | No | |
trigger108 | trigger | No | |
trigger109 | trigger | No | |
trigger11 | trigger | No | |
trigger110 | trigger | No | |
trigger111 | trigger | No | |
trigger112 | trigger | No | |
trigger113 | trigger | No | |
trigger114 | trigger | No | |
trigger115 | trigger | No | |
trigger116 | trigger | No | |
trigger117 | trigger | No | |
trigger118 | trigger | No | |
trigger119 | trigger | No | |
trigger12 | trigger | No | |
trigger120 | trigger | No | |
trigger121 | trigger | No | |
trigger122 | trigger | No | |
trigger123 | trigger | No | |
trigger124 | trigger | No | |
trigger125 | trigger | No | |
trigger126 | trigger | No | |
trigger127 | trigger | No | |
trigger128 | trigger | No | |
trigger129 | trigger | No | |
trigger13 | trigger | No | |
trigger130 | trigger | No | |
trigger131 | trigger | No | |
trigger132 | trigger | No | |
trigger133 | trigger | No | |
trigger134 | trigger | No | |
trigger135 | trigger | No | |
trigger136 | trigger | No | |
trigger137 | trigger | No | |
trigger138 | trigger | No | |
trigger139 | trigger | No | |
trigger14 | trigger | No | |
trigger140 | trigger | No | |
trigger141 | trigger | No | |
trigger142 | trigger | No | |
trigger143 | trigger | No | |
trigger144 | trigger | No | |
trigger145 | trigger | No | |
trigger146 | trigger | No | |
trigger147 | trigger | No | |
trigger148 | trigger | No | |
trigger149 | trigger | No | |
trigger15 | trigger | No | |
trigger150 | trigger | No | |
trigger151 | trigger | No | |
trigger152 | trigger | No | |
trigger153 | trigger | No | |
trigger16 | trigger | No | |
trigger17 | trigger | No | |
trigger18 | trigger | No | |
trigger19 | trigger | No | |
trigger20 | trigger | No | |
trigger21 | trigger | No | |
trigger22 | trigger | No | |
trigger23 | trigger | No | |
trigger24 | trigger | No | |
trigger25 | trigger | No | |
trigger26 | trigger | No | |
trigger27 | trigger | No | |
trigger28 | trigger | No | |
trigger29 | trigger | No | |
trigger30 | trigger | No | |
trigger31 | trigger | No | |
trigger32 | trigger | No | |
trigger33 | trigger | No | |
trigger34 | trigger | No | |
trigger35 | trigger | No | |
trigger36 | trigger | No | |
trigger37 | trigger | No | |
trigger38 | trigger | No | |
trigger39 | trigger | No | |
trigger40 | trigger | No | |
trigger41 | trigger | No | |
trigger42 | trigger | No | |
trigger43 | trigger | No | |
trigger44 | trigger | No | |
trigger45 | trigger | No | |
trigger46 | trigger | No | |
trigger47 | trigger | No | |
trigger48 | trigger | No | |
trigger49 | trigger | No | |
trigger50 | trigger | No | |
trigger51 | trigger | No | |
trigger52 | trigger | No | |
trigger53 | trigger | No | |
trigger54 | trigger | No | |
trigger55 | trigger | No | |
trigger56 | trigger | No | |
trigger57 | trigger | No | |
trigger58 | trigger | No | |
trigger59 | trigger | No | |
trigger60 | trigger | No | |
trigger61 | trigger | No | |
trigger62 | trigger | No | |
trigger63 | trigger | No | |
trigger64 | trigger | No | |
trigger65 | trigger | No | |
trigger66 | trigger | No | |
trigger67 | trigger | No | |
trigger68 | trigger | No | |
trigger69 | trigger | No | |
trigger70 | trigger | No | |
trigger71 | trigger | No | |
trigger72 | trigger | No | |
trigger73 | trigger | No | |
trigger74 | trigger | No | |
trigger75 | trigger | No | |
trigger76 | trigger | No | |
trigger77 | trigger | No | |
trigger78 | trigger | No | |
trigger79 | trigger | No | |
trigger80 | trigger | No | |
trigger81 | trigger | No | |
trigger82 | trigger | No | |
trigger83 | trigger | No | |
trigger84 | trigger | No | |
trigger85 | trigger | No | |
trigger86 | trigger | No | |
trigger87 | trigger | No | |
trigger88 | trigger | No | |
trigger89 | trigger | No | |
trigger90 | trigger | No | |
trigger91 | trigger | No | |
trigger92 | trigger | No | |
trigger93 | trigger | No | |
trigger94 | trigger | No | |
trigger95 | trigger | No | |
trigger96 | trigger | No | |
trigger97 | trigger | No | |
trigger98 | trigger | No | |
trigger99 | trigger | No | |
triggers01 | trigger | Yes | |
unit01 | unit | No | |
unit02 | unit | No | |
unit03 | unit | No | |
unit04 | unit | No | |
unit05 | unit | No | |
unit06 | unit | No | |
unit07 | unit | No | |
unit08 | unit | No | |
unit09 | unit | No | |
unit10 | unit | No | |
unit100 | unit | No | |
unit101 | unit | No | |
unit102 | unit | No | |
unit103 | unit | No | |
unit104 | unit | No | |
unit105 | unit | No | |
unit106 | unit | No | |
unit107 | unit | No | |
unit108 | unit | No | |
unit109 | unit | No | |
unit11 | unit | No | |
unit110 | unit | No | |
unit111 | unit | No | |
unit112 | unit | No | |
unit113 | unit | No | |
unit114 | unit | No | |
unit115 | unit | No | |
unit12 | unit | No | |
unit13 | unit | No | |
unit14 | unit | No | |
unit15 | unit | No | |
unit16 | unit | No | |
unit17 | unit | No | |
unit18 | unit | No | |
unit19 | unit | No | |
unit20 | unit | No | |
unit21 | unit | No | |
unit22 | unit | No | |
unit23 | unit | No | |
unit24 | unit | No | |
unit25 | unit | No | |
unit26 | unit | No | |
unit27 | unit | No | |
unit28 | unit | No | |
unit29 | unit | No | |
unit30 | unit | No | |
unit31 | unit | No | |
unit32 | unit | No | |
unit33 | unit | No | |
unit34 | unit | No | |
unit35 | unit | No | |
unit36 | unit | No | |
unit37 | unit | No | |
unit38 | unit | No | |
unit39 | unit | No | |
unit40 | unit | No | |
unit41 | unit | No | |
unit42 | unit | No | |
unit43 | unit | No | |
unit44 | unit | No | |
unit45 | unit | No | |
unit46 | unit | No | |
unit47 | unit | No | |
unit48 | unit | No | |
unit49 | unit | No | |
unit50 | unit | No | |
unit51 | unit | No | |
unit52 | unit | No | |
unit53 | unit | No | |
unit54 | unit | No | |
unit55 | unit | No | |
unit56 | unit | No | |
unit57 | unit | No | |
unit58 | unit | No | |
unit59 | unit | No | |
unit60 | unit | No | |
unit61 | unit | No | |
unit62 | unit | No | |
unit63 | unit | No | |
unit64 | unit | No | |
unit65 | unit | No | |
unit66 | unit | No | |
unit67 | unit | No | |
unit68 | unit | No | |
unit69 | unit | No | |
unit70 | unit | No | |
unit71 | unit | No | |
unit72 | unit | No | |
unit73 | unit | No | |
unit74 | unit | No | |
unit75 | unit | No | |
unit76 | unit | No | |
unit77 | unit | No | |
unit78 | unit | No | |
unit79 | unit | No | |
unit80 | unit | No | |
unit81 | unit | No | |
unit82 | unit | No | |
unit83 | unit | No | |
unit84 | unit | No | |
unit85 | unit | No | |
unit86 | unit | No | |
unit87 | unit | No | |
unit88 | unit | No | |
unit89 | unit | No | |
unit90 | unit | No | |
unit91 | unit | No | |
unit92 | unit | No | |
unit93 | unit | No | |
unit94 | unit | No | |
unit95 | unit | No | |
unit96 | unit | No | |
unit97 | unit | No | |
unit98 | unit | No | |
unit99 | unit | No | |
units01 | unit | Yes | |
units02 | unit | Yes | |
units03 | unit | Yes | |
units04 | unit | Yes | |
units05 | unit | Yes | |
units06 | unit | Yes | |
units07 | unit | Yes | |
weathereffect01 | weathereffect | No | |
weathereffect02 | weathereffect | No | |
weathereffect03 | weathereffect | No | |
weathereffect04 | weathereffect | No | |
weathereffect05 | weathereffect | No |
// Map deprotected by X-deprotect (version 2006-10-02) by zibada
// http://dimon.xgm.ru/xdep/
// Visit our modmaking community at http://xgm.ru/
function I0011O takes location I0IOOO,real I0IO0O,real I0IOIO returns location
return Location(GetLocationX(I0IOOO)+I0IO0O*Cos(I0IOIO*bj_DEGTORAD),GetLocationY(I0IOOO)+I0IO0O*Sin(I0IOIO*bj_DEGTORAD))
endfunction
function I0IO1O takes nothing returns boolean
local destructable d=GetFilterDestructable()
local real dx=GetDestructableX(d)-udg_real15
local real dy=GetDestructableY(d)-udg_real16
return(dx*dx+dy*dy<=bj_enumDestructableRadius)
endfunction
function I0I0OO takes rect r,boolexpr I0I00O returns group
set udg_group04=CreateGroup()
call GroupEnumUnitsInRect(udg_group04,r,I0I00O)
call DestroyBoolExpr(I0I00O)
return udg_group04
endfunction
function I0I0IO takes rect r returns group
set udg_group04=CreateGroup()
call GroupEnumUnitsInRect(udg_group04,r,udg_boolexpr01)
return udg_group04
endfunction
function I0I01O takes rect r,player I0IIOO returns group
set udg_group04=CreateGroup()
set bj_groupEnumOwningPlayer=I0IIOO
call GroupEnumUnitsInRect(udg_group04,r,filterGetUnitsInRectOfPlayer)
return udg_group04
endfunction
function I0II0O takes real I0IIIO,location I0II1O,boolexpr I0I00O returns group
set udg_group04=CreateGroup()
call GroupEnumUnitsInRangeOfLoc(udg_group04,I0II1O,I0IIIO,I0I00O)
return udg_group04
endfunction
function I0I1OO takes player I0IIOO,boolexpr I0I00O returns group
set udg_group04=CreateGroup()
call GroupEnumUnitsOfPlayer(udg_group04,I0IIOO,I0I00O)
call DestroyBoolExpr(I0I00O)
return udg_group04
endfunction
function I0I10O takes player I0IIOO returns group
set udg_group04=CreateGroup()
call GroupEnumUnitsOfPlayer(udg_group04,I0IIOO,udg_boolexpr01)
return udg_group04
endfunction
function I0I1IO takes player I0IIOO,integer I0I11O returns group
set udg_group04=CreateGroup()
set bj_groupEnumTypeId=I0I11O
call GroupEnumUnitsOfPlayer(udg_group04,I0IIOO,filterGetUnitsOfPlayerAndTypeId)
return udg_group04
endfunction
function I01OOO takes player I0IIOO returns force
set udg_force04=CreateForce()
call ForceEnumEnemies(udg_force04,I0IIOO,udg_boolexpr01)
return udg_force04
endfunction
function I01O0O takes itemtype I01OIO,integer I01O1O returns nothing
local group g
set bj_stockPickedItemType=I01OIO
set bj_stockPickedItemLevel=I01O1O
set g=CreateGroup()
call GroupEnumUnitsOfType(g,"marketplace",udg_boolexpr01)
call ForGroup(g,function UpdateEachStockBuildingEnum)
call DestroyGroup(g)
set g=null
endfunction
function I010OO takes nothing returns nothing
local integer pickedItemId
local itemtype I0100O
local integer I010IO=0
local integer I0101O=0
local integer I01O1O
set I01O1O=1
loop
if(bj_stockAllowedPermanent[I01O1O])then
set I0101O=I0101O+1
if(GetRandomInt(1,I0101O)==1)then
set I0100O=ITEM_TYPE_PERMANENT
set I010IO=I01O1O
endif
endif
if(bj_stockAllowedCharged[I01O1O])then
set I0101O=I0101O+1
if(GetRandomInt(1,I0101O)==1)then
set I0100O=ITEM_TYPE_CHARGED
set I010IO=I01O1O
endif
endif
if(bj_stockAllowedArtifact[I01O1O])then
set I0101O=I0101O+1
if(GetRandomInt(1,I0101O)==1)then
set I0100O=ITEM_TYPE_ARTIFACT
set I010IO=I01O1O
endif
endif
set I01O1O=I01O1O+1
exitwhen I01O1O>10
endloop
if(I0101O==0)then
set I0100O=null
return
endif
call I01O0O(I0100O,I010IO)
set I0100O=null
endfunction
function I01IOO takes nothing returns nothing
call I010OO()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INTERVAL,true,function I010OO)
endfunction
function I01I0O takes nothing returns boolean
return true
endfunction
function I01IIO takes handle h returns integer
return h
return 0
endfunction
function I011OO takes handle h returns string
return I2S(I01IIO(h))
endfunction
function I0110O takes string I011IO returns nothing
call FlushStoredMission(udg_gamecache01,I011IO)
endfunction
function I0111O takes string I011IO returns nothing
call FlushStoredMission(udg_gamecache01,I011IO)
endfunction
function IIOOOO takes string I011IO,string IIOO0O returns nothing
call FlushStoredInteger(udg_gamecache01,I011IO,IIOO0O)
endfunction
function IIOOIO takes string I011IO,string IIOO1O,handle IIO0OO returns nothing
call StoreInteger(udg_gamecache01,I011IO,IIOO1O,I01IIO(IIO0OO))
endfunction
function IIO00O takes string I011IO,string IIOO1O,integer IIO0IO returns nothing
call StoreInteger(udg_gamecache01,I011IO,IIOO1O,IIO0IO)
endfunction
function IIO01O takes string I011IO,string IIOO1O,real IIO0IO returns nothing
call StoreReal(udg_gamecache01,I011IO,IIOO1O,IIO0IO)
endfunction
function IIOIOO takes string I011IO,string IIOO1O,string IIO0IO returns nothing
call StoreString(udg_gamecache01,I011IO,IIOO1O,IIO0IO)
endfunction
function IIOI0O takes string I011IO,string IIOO1O,boolean IIO0IO returns nothing
call StoreBoolean(udg_gamecache01,I011IO,IIOO1O,IIO0IO)
endfunction
function IIOIIO takes string I011IO,string IIOO1O returns fogmodifier
return GetStoredInteger(udg_gamecache01,I011IO,IIOO1O)
return null
endfunction
function IIOI1O takes string I011IO,string IIOO1O returns destructable
return GetStoredInteger(udg_gamecache01,I011IO,IIOO1O)
return null
endfunction
function IIO1OO takes string I011IO,string IIOO1O returns unit
return GetStoredInteger(udg_gamecache01,I011IO,IIOO1O)
return null
endfunction
function IIO10O takes string I011IO,string IIOO1O returns player
return GetStoredInteger(udg_gamecache01,I011IO,IIOO1O)
return null
endfunction
function IIO1IO takes string I011IO,string IIOO1O returns timer
return GetStoredInteger(udg_gamecache01,I011IO,IIOO1O)
return null
endfunction
function IIO11O takes string I011IO,string IIOO1O returns trigger
return GetStoredInteger(udg_gamecache01,I011IO,IIOO1O)
return null
endfunction
function II0OOO takes string I011IO,string IIOO1O returns group
return GetStoredInteger(udg_gamecache01,I011IO,IIOO1O)
return null
endfunction
function II0O0O takes string I011IO,string IIOO1O returns effect
return GetStoredInteger(udg_gamecache01,I011IO,IIOO1O)
return null
endfunction
function II0OIO takes string I011IO,string IIOO1O returns lightning
return GetStoredInteger(udg_gamecache01,I011IO,IIOO1O)
return null
endfunction
function II0O1O takes string I011IO,string IIOO1O returns location
return GetStoredInteger(udg_gamecache01,I011IO,IIOO1O)
return null
endfunction
function II00OO takes string I011IO,string IIOO1O returns item
return GetStoredInteger(udg_gamecache01,I011IO,IIOO1O)
return null
endfunction
function II000O takes string I011IO,string IIOO1O returns integer
return GetStoredInteger(udg_gamecache01,I011IO,IIOO1O)
endfunction
function II00IO takes string I011IO,string IIOO1O returns real
return GetStoredReal(udg_gamecache01,I011IO,IIOO1O)
endfunction
function II001O takes string I011IO,string IIOO1O returns boolean
return GetStoredBoolean(udg_gamecache01,I011IO,IIOO1O)
endfunction
function II0IOO takes string I011IO,string IIOO1O returns string
return GetStoredString(udg_gamecache01,I011IO,IIOO1O)
endfunction
function II0I0O takes player II0IIO returns boolean
if(II0IIO==udg_players03[0])then
return true
endif
if(II0IIO==udg_players03[1])then
return true
endif
if(II0IIO==udg_players03[2])then
return true
endif
if(II0IIO==udg_players03[3])then
return true
endif
if(II0IIO==udg_players03[4])then
return true
endif
if(II0IIO==udg_players03[5])then
return true
endif
return false
endfunction
function II0I1O takes player II0IIO returns boolean
if(II0IIO==udg_players04[0])then
return true
endif
if(II0IIO==udg_players04[1])then
return true
endif
if(II0IIO==udg_players04[2])then
return true
endif
if(II0IIO==udg_players04[3])then
return true
endif
if(II0IIO==udg_players04[4])then
return true
endif
if(II0IIO==udg_players04[5])then
return true
endif
return false
endfunction
function II01OO takes player p returns boolean
return p==udg_players03[1]or p==udg_players03[2]or p==udg_players03[3]or p==udg_players03[4]or p==udg_players03[5]or p==udg_players04[1]or p==udg_players04[2]or p==udg_players04[3]or p==udg_players04[4]or p==udg_players04[5]
endfunction
function II010O takes player II01IO returns boolean
if(GetPlayerSlotState(II01IO)==PLAYER_SLOT_STATE_PLAYING)then
if(GetPlayerController(II01IO)==MAP_CONTROL_USER)then
return true
endif
endif
return false
endfunction
function II011O takes player II01IO returns boolean
return GetPlayerSlotState(II01IO)==PLAYER_SLOT_STATE_EMPTY
endfunction
function IIIOOO takes nothing returns nothing
if(II010O(GetEnumPlayer())==true)then
set bj_forceCountPlayers=bj_forceCountPlayers+1
endif
endfunction
function IIIO0O takes force f returns integer
set bj_forceCountPlayers=0
call ForForce(f,function IIIOOO)
return bj_forceCountPlayers
endfunction
function IIIOIO takes nothing returns nothing
if GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_PLAYING then
if GetEnumPlayer()!=Player(13)and GetEnumPlayer()!=Player(14)then
set bj_forceCountPlayers=bj_forceCountPlayers+1
endif
endif
endfunction
function IIIO1O takes force f returns integer
set bj_forceCountPlayers=0
call ForForce(f,function IIIOIO)
return bj_forceCountPlayers
endfunction
function III0OO takes integer III00O,player II01IO returns nothing
call SetPlayerTechMaxAllowed(II01IO,III00O,0)
set udg_booleans01[GetUnitPointValueByType(III00O)]=true
endfunction
function III0IO takes integer III00O returns nothing
call III0OO(III00O,udg_players03[1])
call III0OO(III00O,udg_players03[2])
call III0OO(III00O,udg_players03[3])
call III0OO(III00O,udg_players03[4])
call III0OO(III00O,udg_players03[5])
call III0OO(III00O,udg_players04[1])
call III0OO(III00O,udg_players04[2])
call III0OO(III00O,udg_players04[3])
call III0OO(III00O,udg_players04[4])
call III0OO(III00O,udg_players04[5])
endfunction
function III01O takes integer III00O returns nothing
call SetPlayerTechMaxAllowed(udg_players03[1],III00O,0)
call SetPlayerTechMaxAllowed(udg_players03[2],III00O,0)
call SetPlayerTechMaxAllowed(udg_players03[3],III00O,0)
call SetPlayerTechMaxAllowed(udg_players03[4],III00O,0)
call SetPlayerTechMaxAllowed(udg_players03[5],III00O,0)
call SetPlayerTechMaxAllowed(udg_players04[1],III00O,0)
call SetPlayerTechMaxAllowed(udg_players04[2],III00O,0)
call SetPlayerTechMaxAllowed(udg_players04[3],III00O,0)
call SetPlayerTechMaxAllowed(udg_players04[4],III00O,0)
call SetPlayerTechMaxAllowed(udg_players04[5],III00O,0)
endfunction
function IIIIOO takes player II01IO returns nothing
local integer IIII0O=udg_integer21
local integer IIIIIO=udg_integer22
loop
exitwhen IIII0O>IIIIIO
call SetPlayerTechMaxAllowed(II01IO,udg_integers30[IIII0O],0)
set IIII0O=IIII0O+1
endloop
set IIII0O=udg_integer23
set IIIIIO=udg_integer24
loop
exitwhen IIII0O>IIIIIO
call SetPlayerTechMaxAllowed(II01IO,udg_integers30[IIII0O],0)
set IIII0O=IIII0O+1
endloop
endfunction
function IIII1O takes nothing returns nothing
call IIIIOO(udg_players03[1])
call IIIIOO(udg_players03[2])
call IIIIOO(udg_players03[3])
call IIIIOO(udg_players03[4])
call IIIIOO(udg_players03[5])
call IIIIOO(udg_players04[1])
call IIIIOO(udg_players04[2])
call IIIIOO(udg_players04[3])
call IIIIOO(udg_players04[4])
call IIIIOO(udg_players04[5])
endfunction
function III1OO takes nothing returns boolean
return IsUnitAlly(GetFilterUnit(),GetOwningPlayer(udg_unit02))and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0 and(GetOwningPlayer(GetFilterUnit())==udg_players03[0])or(GetOwningPlayer(GetFilterUnit())==udg_players04[0])
endfunction
function III10O takes unit III1IO,real III11O,real II1OOO returns boolean
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function III1OO)
local real x
local real y
if II0I0O(GetOwningPlayer(III1IO))then
set x=4575
set y=4375
else
set x=-5000
set y=-5500
endif
if(x-III11O)*(x-III11O)+(y-II1OOO)*(y-II1OOO)>9000000 then
return false
endif
set udg_unit02=III1IO
call GroupEnumUnitsInRange(II1O0O,x,y,3000,II1OIO)
call DestroyBoolExpr(II1OIO)
if CountUnitsInGroup(II1O0O)>0 then
call DestroyGroup(II1O0O)
return false
endif
call DestroyGroup(II1O0O)
return true
endfunction
function II1O1O takes nothing returns nothing
local integer IIII0O
local integer IIIIIO
local integer II10OO=0
set udg_integer10=udg_integer21
set IIII0O=udg_integer21
set IIIIIO=udg_integer22
loop
exitwhen IIII0O>IIIIIO
set II10OO=II10OO+1
set udg_integers23[II10OO]=IIII0O
set IIII0O=IIII0O+1
endloop
set IIII0O=udg_integer23
set IIIIIO=udg_integer24
loop
exitwhen IIII0O>IIIIIO
set II10OO=II10OO+1
set udg_integers23[II10OO]=IIII0O
set IIII0O=IIII0O+1
endloop
set udg_integer11=II10OO
endfunction
function II100O takes nothing returns integer
local integer II10IO=GetRandomInt(udg_integer10,udg_integer11)
local integer II101O=udg_integers23[II10IO]
set II101O=udg_integers23[II10IO]
if(udg_integer10==udg_integer11)then
set udg_integers23[II10IO]=0
return II101O
endif
if(II10IO==udg_integer11)then
set udg_integer11=udg_integer11-1
return II101O
endif
set udg_integers23[II10IO]=udg_integers23[udg_integer11]
set udg_integer11=udg_integer11-1
return II101O
endfunction
function II1IOO takes unit III1IO returns boolean
return GetUnitAbilityLevel(III1IO,1110454612)>0 or GetUnitAbilityLevel(III1IO,1112437609)>0 or GetUnitAbilityLevel(III1IO,1110454616)>0 or GetUnitAbilityLevel(III1IO,1112433775)>0 or GetUnitAbilityLevel(III1IO,1110454861)>0 or GetUnitAbilityLevel(III1IO,1114137953)>0 or GetUnitAbilityLevel(III1IO,1110455638)>0
endfunction
function II1I0O takes string II1IIO returns integer
if II1IIO=="a"then
return 10
elseif II1IIO=="b"then
return 11
elseif II1IIO=="c"then
return 12
elseif II1IIO=="d"then
return 13
elseif II1IIO=="e"then
return 14
elseif II1IIO=="f"then
return 15
else
return S2I(II1IIO)
endif
endfunction
function II1I1O takes string II11OO returns integer
return II1I0O(SubString(II11OO,0,1))*16+II1I0O(SubString(II11OO,1,2))
endfunction
function II110O takes player I0IIOO returns integer
return II1I1O(SubString(udg_strings01[GetPlayerId(I0IIOO)],4,6))
endfunction
function II11IO takes player I0IIOO returns integer
return II1I1O(SubString(udg_strings01[GetPlayerId(I0IIOO)],6,8))
endfunction
function II111O takes player I0IIOO returns integer
return II1I1O(SubString(udg_strings01[GetPlayerId(I0IIOO)],8,10))
endfunction
function I1OOOO takes integer I1OO0O returns boolean
local integer i=1
loop
exitwhen i>udg_integer14
if I1OO0O==udg_integers24[i]then
return false
endif
set i=i+1
endloop
return true
endfunction
function I1OOIO takes player I0IIOO,integer I1OO1O returns nothing
local texttag t=CreateTextTag()
call SetPlayerState(I0IIOO,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(I0IIOO,PLAYER_STATE_RESOURCE_GOLD)+I1OO1O)
call SetTextTagText(t,"+"+I2S(I1OO1O),0.025)
call SetTextTagPosUnit(t,udg_units01[GetPlayerId(I0IIOO)],0)
call SetTextTagColor(t,255,220,0,255)
call SetTextTagVelocity(t,0,0.03)
if GetLocalPlayer()==I0IIOO then
call SetTextTagVisibility(t,true)
else
call SetTextTagVisibility(t,false)
endif
call SetTextTagFadepoint(t,2)
call SetTextTagLifespan(t,3)
call SetTextTagPermanent(t,false)
endfunction
function I1O0OO takes player I0IIOO returns nothing
local integer x=1
if IsPlayerAlly(I0IIOO,udg_players03[0])then
loop
exitwhen x>5
if udg_players03[x]!=I0IIOO then
call I1OOIO(udg_players03[x],200)
endif
set x=x+1
endloop
endif
set x=1
if IsPlayerAlly(I0IIOO,udg_players04[0])then
loop
exitwhen x>5
if udg_players04[x]!=I0IIOO then
call I1OOIO(udg_players04[x],200)
endif
set x=x+1
endloop
endif
endfunction
function I1O00O takes unit III1IO returns nothing
if IsUnitAlly(GetDyingUnit(),GetOwningPlayer(GetKillingUnit()))then
return
endif
if GetOwningPlayer(III1IO)==udg_players03[0]then
call I1OOIO(udg_players03[1],200)
call I1OOIO(udg_players03[2],200)
call I1OOIO(udg_players03[3],200)
call I1OOIO(udg_players03[4],200)
call I1OOIO(udg_players03[5],200)
elseif IsUnitAlly(III1IO,udg_players03[0])then
call I1O0OO(GetOwningPlayer(III1IO))
endif
if GetOwningPlayer(III1IO)==udg_players04[0]then
call I1OOIO(udg_players04[1],200)
call I1OOIO(udg_players04[2],200)
call I1OOIO(udg_players04[3],200)
call I1OOIO(udg_players04[4],200)
call I1OOIO(udg_players04[5],200)
elseif IsUnitAlly(III1IO,udg_players04[0])then
call I1O0OO(GetOwningPlayer(III1IO))
endif
endfunction
function I1O0IO takes player II01IO returns nothing
local integer I1O01O
local integer I1OIOO
local location I1OI0O
local integer II10IO
local boolean GotHero=false
set udg_booleans04[GetPlayerId(II01IO)]=true
if II0I0O(II01IO)==true then
set I1O01O=udg_integer21
set I1OIOO=udg_integer22
set I1OI0O=GetRectCenter(udg_rect17)
else
set I1O01O=udg_integer23
set I1OIOO=udg_integer24
set I1OI0O=GetRectCenter(udg_rect16)
endif
if udg_boolean06 then
if(GetRandomInt(1,2)==1)then
set I1O01O=udg_integer21
set I1OIOO=udg_integer22
else
set I1O01O=udg_integer23
set I1OIOO=udg_integer24
endif
endif
loop
set II10IO=GetRandomInt(I1O01O,I1OIOO)
exitwhen udg_booleans01[II10IO]==false
endloop
if udg_boolean29==false then
call III01O(udg_integers30[II10IO])
set udg_booleans01[II10IO]=true
endif
call CreateUnitAtLoc(II01IO,udg_integers30[II10IO],I1OI0O,0)
call RemoveLocation(I1OI0O)
endfunction
function I1OIIO takes boolean I1OI1O,boolean I1O1OO returns integer
local integer I1O01O
local integer I1OIOO
if I1OI1O and I1O1OO then
if(GetRandomInt(1,2)==1)then
set I1O01O=udg_integer21
set I1OIOO=udg_integer22
else
set I1O01O=udg_integer23
set I1OIOO=udg_integer24
endif
elseif I1OI1O then
set I1O01O=udg_integer21
set I1OIOO=udg_integer22
else
set I1O01O=udg_integer23
set I1OIOO=udg_integer24
endif
return GetRandomInt(I1O01O,I1OIOO)
endfunction
function I1O10O takes unit III1IO returns boolean
return GetUnitTypeId(III1IO)==1848651849 or GetUnitTypeId(III1IO)==1848652338 or GetUnitTypeId(III1IO)==1848652337 or GetUnitTypeId(III1IO)==1848652339 or GetUnitTypeId(III1IO)==1848652340 or GetUnitTypeId(III1IO)==1848652341 or GetUnitTypeId(III1IO)==1697657160 or GetUnitTypeId(III1IO)==1697657178 or GetUnitTypeId(III1IO)==1848651853
endfunction
function I1O1IO takes destructable d returns boolean
return GetDestructableTypeId(d)==1314157667 or GetDestructableTypeId(d)==1314157687 or GetDestructableTypeId(d)==1096053874
endfunction
function I1O11O takes unit u returns boolean
return GetUnitAbilityLevel(u,1113815395)>0
endfunction
function I10OOO takes unit u returns boolean
return GetUnitAbilityLevel(u,1093686070)>0
endfunction
function I10O0O takes unit u returns boolean
return GetPlayerSlotState(GetOwningPlayer(u))==PLAYER_SLOT_STATE_LEFT
endfunction
function I10OIO takes player p returns string
return udg_strings05[GetPlayerId(p)]
endfunction
function I10O1O takes unit u returns boolean
return GetUnitTypeId(u)==1211117642
endfunction
function I100OO takes unit I1000O returns boolean
return GetUnitAbilityLevel(I1000O,1093678162)>0 and II01OO(GetOwningPlayer(I1000O))
endfunction
function I100IO takes unit I1000O returns unit
return udg_units01[GetPlayerId(GetOwningPlayer(I1000O))]
endfunction
function I1001O takes unit III1IO returns boolean
return GetOwningPlayer(III1IO)==udg_player01
endfunction
function I10IOO takes nothing returns real
return TimerGetElapsed(udg_timer01)
endfunction
function I10I0O takes nothing returns nothing
local integer i=0
if udg_boolean37==false then
loop
call DisplayTimedTextToPlayer(Player(i),0,0,120,"|c00ff0303An internal checksum has failed|r")
call DisplayTimedTextToPlayer(Player(i),0,0,120,"|c00ff0303This might not be a serious glitch, but it is importat for me to get it|r")
call DisplayTimedTextToPlayer(Player(i),0,0,120,"|c00ff0303Please send me the replay for this game to [email protected]|r")
set i=i+1
exitwhen i==12
endloop
endif
endfunction
function I10IIO takes nothing returns real
return TimerGetElapsed(udg_timer01)
endfunction
function I10I1O takes trigger t returns nothing
call DisableTrigger(t)
set udg_integer15=udg_integer15+1
set udg_triggers01[udg_integer15]=t
set udg_reals01[udg_integer15]=I10IIO()+60
if udg_integer15>8000 then
call I10I0O()
endif
endfunction
function I101OO takes integer i returns nothing
if i!=udg_integer15 then
set udg_triggers01[i]=udg_triggers01[udg_integer15]
set udg_reals01[i]=udg_reals01[udg_integer15]
endif
set udg_triggers01[udg_integer15]=null
set udg_reals01[udg_integer15]=0
set udg_integer15=udg_integer15-1
endfunction
function I1010O takes nothing returns boolean
local real I101IO=I10IIO()
local integer i
set i=1
loop
exitwhen i>udg_integer15
if udg_reals01[i]<I101IO then
if udg_triggers01[i]==null or IsTriggerEnabled(udg_triggers01[i])==true then
call I10I0O()
else
call DestroyTrigger(udg_triggers01[i])
endif
call I101OO(i)
else
set i=i+1
endif
endloop
return false
endfunction
function I1011O takes unit u returns string
if u==null then
return"No Hero"
endif
return udg_strings06[GetUnitPointValue(u)]
endfunction
function I1IOOO takes unit u returns string
if u==null then
return"UI\\Widgets\\Console\\Undead\\undead-inventory-slotfiller.blp"
endif
return udg_strings07[GetUnitPointValue(u)]
endfunction
function I1IO0O takes unit III00O,string I1IOIO returns boolean
return II000O(I011OO(III00O),"state"+I1IOIO)==1
endfunction
function I1IO1O takes unit III00O,string I1IOIO returns nothing
call IIO00O(I011OO(III00O),"state"+I1IOIO,1)
endfunction
function I1I0OO takes unit III00O,string I1IOIO returns nothing
call IIO00O(I011OO(III00O),"state"+I1IOIO,2)
endfunction
function I1I00O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
call I1I0OO(IIO1OO(I1I0IO,"hero"),II0IOO(I1I0IO,"state"))
call I0110O(I1I0IO)
call I10I1O(t)
set t=null
return false
endfunction
function I1I01O takes unit III00O,string I1IOIO,real I1IIOO returns nothing
local trigger t=CreateTrigger()
call TriggerAddCondition(t,Condition(function I1I00O))
call TriggerRegisterTimerEvent(t,I1IIOO,false)
call I1IO1O(III00O,I1IOIO)
call IIOOIO(I011OO(t),"hero",III00O)
call IIOIOO(I011OO(t),"state",I1IOIO)
set t=null
endfunction
function I1II0O takes unit I1IIIO returns integer
local integer x
local integer id=GetUnitTypeId(I1IIIO)
set x=1
loop
exitwhen x>udg_integer25
if id==udg_integers31[x]then
return 2
endif
set x=x+1
endloop
set x=1
loop
exitwhen x>udg_integer26
if id==udg_integers32[x]then
return 3
endif
set x=x+1
endloop
set x=1
loop
exitwhen x>udg_integer27
if id==udg_integers33[x]then
return 1
endif
set x=x+1
endloop
return 0
endfunction
function I1II1O takes unit I1IIIO returns integer
local integer I1I1OO=I1II0O(I1IIIO)
if I1I1OO==1 then
return GetHeroInt(I1IIIO,true)
endif
if I1I1OO==2 then
return GetHeroAgi(I1IIIO,true)
endif
if I1I1OO==3 then
return GetHeroStr(I1IIIO,true)
endif
return 0
endfunction
function I1I10O takes unit III1IO returns nothing
set udg_booleans09[GetPlayerId(GetOwningPlayer(III1IO))]=true
endfunction
function I1I1IO takes unit III1IO returns nothing
set udg_booleans09[GetPlayerId(GetOwningPlayer(III1IO))]=false
endfunction
function I1I11O takes unit III1IO returns boolean
return GetUnitState(III1IO,UNIT_STATE_LIFE)<1 or udg_booleans09[GetPlayerId(GetOwningPlayer(III1IO))]==true
endfunction
function I11OOO takes integer I11O0O,real I11OIO returns nothing
set udg_integer16=udg_integer16+1
set udg_reals02[udg_integer16]=I11OIO
set udg_integers25[udg_integer16]=I11O0O
endfunction
function I11O1O takes unit u returns real
local integer I11O0O=GetUnitTypeId(u)
local integer i=1
loop
exitwhen i>udg_integer16
if udg_integers25[i]==I11O0O then
return udg_reals02[i]
endif
set i=i+1
endloop
return 1.0
endfunction
function I110OO takes integer I0I11O,string I1100O returns nothing
set udg_integer17=udg_integer17+1
set udg_strings04[udg_integer17]=I1100O
set udg_integers26[udg_integer17]=I0I11O
endfunction
function I110IO takes unit u returns string
local integer I0I11O=GetUnitTypeId(u)
local integer i=1
loop
exitwhen i>udg_integer17
if udg_integers26[i]==I0I11O then
return udg_strings04[i]
endif
set i=i+1
endloop
return"stand"
endfunction
function I1101O takes unit u returns nothing
call SetUnitAnimation(u,I110IO(u))
endfunction
function I11IOO takes player I0IIOO,string I11I0O returns nothing
local sound I11IIO=CreateSound(I11I0O,false,false,false,10,10,"DefaultEAXON")
if(GetLocalPlayer()==I0IIOO)then
call StartSound(I11IIO)
endif
call KillSoundWhenDone(I11IIO)
endfunction
function I11I1O takes player I111OO,string I1110O returns nothing
local sound I111IO=CreateSoundFromLabel("InterfaceError",false,false,false,10,10)
if(GetLocalPlayer()==I111OO)then
if(I1110O!="")and(I1110O!=null)then
call ClearTextMessages()
call DisplayTimedTextToPlayer(I111OO,0.50,-1.00,2.00,"|cffffcc00"+I1110O+"|r")
endif
call StartSound(I111IO)
endif
call KillSoundWhenDone(I111IO)
endfunction
function I1111O takes player I111OO,string I1110O returns nothing
local sound I111IO=CreateSoundFromLabel("InterfaceError",false,false,false,10,10)
if(GetLocalPlayer()==I111OO)then
if(I1110O!="")and(I1110O!=null)then
call DisplayTimedTextToPlayer(I111OO,0,0,5.00,"|cffffcc00"+I1110O+"|r")
endif
call StartSound(I111IO)
endif
call KillSoundWhenDone(I111IO)
endfunction
function OOOOO0 takes string OOOO00,unit OOOOI0,real I1IIOO,integer OOOO10,integer OOO0O0,integer OOO000,integer OOO0I0 returns nothing
local texttag t=CreateTextTag()
call SetTextTagText(t,OOOO00,0.02)
call SetTextTagPosUnit(t,OOOOI0,0.00)
call SetTextTagColor(t,OOOO10,OOO0O0,OOO000,OOO0I0)
call SetTextTagVelocity(t,0,0.01)
call SetTextTagVisibility(t,true)
call SetTextTagFadepoint(t,2.0)
call SetTextTagLifespan(t,I1IIOO)
call SetTextTagPermanent(t,false)
endfunction
function OOO010 takes unit OOOIO0 returns nothing
call PauseUnit(OOOIO0,true)
call IssueImmediateOrder(OOOIO0,"stop")
call PauseUnit(OOOIO0,false)
endfunction
function OOOI00 takes nothing returns boolean
if(GetTimeOfDay()>6.00 and GetTimeOfDay()<18.00)then
return true
else
return false
endif
endfunction
function OOOII0 takes string OOOI10,boolean OOO1O0 returns nothing
if OOO1O0 then
call ExecuteFunc(OOOI10)
endif
endfunction
function OOO100 takes real x returns real
local real OOO1I0=GetRectMinX(bj_mapInitialPlayableArea)+50
if(x<OOO1I0)then
return OOO1I0
endif
set OOO1I0=GetRectMaxX(bj_mapInitialPlayableArea)-50
if(x>OOO1I0)then
return OOO1I0
endif
return x
endfunction
function OOO110 takes real y returns real
local real OOO1I0=GetRectMinY(bj_mapInitialPlayableArea)+50
if(y<OOO1I0)then
return OOO1I0
endif
set OOO1I0=GetRectMaxY(bj_mapInitialPlayableArea)-50
if(y>OOO1I0)then
return OOO1I0
endif
return y
endfunction
function OO0OO0 takes integer OO0O00 returns nothing
local unit u=CreateUnit(Player(15),1697657175,0,0,270)
call UnitAddAbility(u,OO0O00)
call UnitRemoveAbility(u,OO0O00)
call RemoveUnit(u)
endfunction
function Tree_Killer takes nothing returns nothing
call KillDestructable(GetEnumDestructable())
endfunction
function OO0OI0 takes unit I1IIIO returns nothing
call I0110O(I011OO(I1IIIO))
call RemoveUnit(I1IIIO)
endfunction
function OO0O10 takes unit III1IO,integer OO00O0,integer OO0000 returns nothing
if GetUnitAbilityLevel(III1IO,OO00O0)==0 then
call UnitAddAbility(III1IO,OO00O0)
endif
call SetUnitAbilityLevel(III1IO,OO00O0,OO0000)
endfunction
function OO00I0 takes unit III1IO,integer OO0010 returns item
local integer OO0IO0
local item OO0I00
set OO0IO0=0
loop
exitwhen OO0IO0>5
set OO0I00=UnitItemInSlot(III1IO,OO0IO0)
if(OO0I00!=null)and(GetItemTypeId(OO0I00)==OO0010)then
return UnitItemInSlot(III1IO,OO0IO0)
endif
set OO0IO0=OO0IO0+1
endloop
return null
endfunction
function OO0II0 takes integer a,integer b returns integer
if(a<b)then
return a
else
return b
endif
endfunction
function OO0I10 takes integer a,integer b returns integer
if(a<b)then
return b
else
return a
endif
endfunction
function OO01O0 takes integer I0IOOO,integer a,integer b returns integer
return OO0I10(OO0II0(I0IOOO,b),a)
endfunction
function OO0100 takes real a,real b returns real
if(a<b)then
return a
else
return b
endif
endfunction
function OO01I0 takes real a,real b returns real
if(a<b)then
return b
else
return a
endif
endfunction
function OO0110 takes nothing returns nothing
local string I1I0IO=I011OO(GetExpiredTimer())
local unit III1IO=IIO1OO(I1I0IO,"Unit")
call SetUnitState(III1IO,UNIT_STATE_LIFE,GetUnitState(III1IO,UNIT_STATE_LIFE)+II00IO(I1I0IO,"Damage"))
endfunction
function OOIOO0 takes unit III1IO,real OOIO00 returns nothing
local timer t=CreateTimer()
local string I1I0IO=I011OO(t)
call IIO01O(I1I0IO,"Damage",OOIO00)
call IIOOIO(I1I0IO,"Unit",III1IO)
call TimerStart(t,0,false,function OO0110)
endfunction
function OOIOI0 takes unit III1IO,real OOIO00 returns nothing
local real OOIO10=GetUnitState(III1IO,UNIT_STATE_MAX_LIFE)
local real OOI0O0=GetUnitState(III1IO,UNIT_STATE_LIFE)
if(GetUnitState(III1IO,UNIT_STATE_LIFE)>1)then
if OOIO00>(OOIO10-OOI0O0)then
if OOIO00>=OOI0O0 then
call SetUnitState(III1IO,UNIT_STATE_LIFE,OOIO10)
call OOIOO0(III1IO,OOIO00-(OOIO10-OOI0O0))
else
call OOIOO0(III1IO,OOIO00)
endif
else
call SetUnitState(III1IO,UNIT_STATE_LIFE,GetUnitState(III1IO,UNIT_STATE_LIFE)+OOIO00)
endif
endif
endfunction
function OOI000 takes unit OOI0I0,unit OOI010,real OOIIO0 returns boolean
local real OOII00=GetUnitX(OOI0I0)
local real OOIII0=GetUnitY(OOI0I0)
local real III11O=GetUnitX(OOI010)
local real II1OOO=GetUnitY(OOI010)
if((OOII00-III11O)*(OOII00-III11O)+(OOIII0-II1OOO)*(OOIII0-II1OOO))<OOIIO0*OOIIO0 then
return true
else
return false
endif
endfunction
function OOII10 takes unit OOI0I0,unit OOI010 returns real
local real OOII00=GetUnitX(OOI0I0)
local real OOIII0=GetUnitY(OOI0I0)
local real III11O=GetUnitX(OOI010)
local real II1OOO=GetUnitY(OOI010)
if OOI0I0==null or OOI010==null then
return 9999999999
else
return SquareRoot((OOII00-III11O)*(OOII00-III11O)+(OOIII0-II1OOO)*(OOIII0-II1OOO))
endif
endfunction
function OOI1O0 takes unit OOI0I0,location OOI010 returns real
local real OOII00=GetUnitX(OOI0I0)
local real OOIII0=GetUnitY(OOI0I0)
local real III11O=GetLocationX(OOI010)
local real II1OOO=GetLocationY(OOI010)
if OOI0I0==null then
return 9999999999
else
return SquareRoot((OOII00-III11O)*(OOII00-III11O)+(OOIII0-II1OOO)*(OOIII0-II1OOO))
endif
endfunction
function OOI100 takes real x1,real y1,real x2,real y2 returns real
return SquareRoot(((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)))
endfunction
function OOI1I0 takes unit III1IO returns nothing
call SetUnitState(III1IO,UNIT_STATE_MANA,GetUnitState(III1IO,UNIT_STATE_MAX_MANA))
endfunction
function OOI110 takes force OO1OO0,real I1IIOO,string OO1O00 returns nothing
if(IsPlayerInForce(GetLocalPlayer(),OO1OO0))then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,udg_real02,I1IIOO,OO1O00)
endif
endfunction
function OO1OI0 takes unit III1IO,real OO1O10 returns nothing
call SetUnitState(III1IO,UNIT_STATE_LIFE,GetUnitState(III1IO,UNIT_STATE_LIFE)+OO1O10)
endfunction
function OO10O0 takes trigger t returns nothing
call I10I1O(t)
endfunction
function OO1000 takes nothing returns nothing
call PauseAllUnitsBJ(true)
endfunction
function RepeatedPauseAll takes nothing returns nothing
local timer t=CreateTimer()
call TimerStart(t,1,true,function OO1000)
endfunction
function OO10I0 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
call DestroyEffect(II0O0O(I1I0IO,"fx"))
call I0110O(I1I0IO)
call OO10O0(t)
set t=null
return false
endfunction
function OO1010 takes string OO1IO0,unit III1IO,string OO1I00,integer I1IIOO returns nothing
local effect fx=AddSpecialEffectTarget(OO1IO0,III1IO,OO1I00)
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"fx",fx)
call TriggerRegisterUnitEvent(t,III1IO,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,I1IIOO,false)
call TriggerAddCondition(t,Condition(function OO10I0))
set fx=null
set t=null
endfunction
function OO1II0 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
call DestroyEffect(II0O0O(I1I0IO,"fx"))
call I0110O(I1I0IO)
call OO10O0(t)
set t=null
return false
endfunction
function OO1I10 takes string OO1IO0,real x,real y,real I1IIOO returns nothing
local effect fx=AddSpecialEffect(OO1IO0,x,y)
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"fx",fx)
call TriggerRegisterTimerEvent(t,I1IIOO,false)
call TriggerAddCondition(t,Condition(function OO1II0))
set fx=null
set t=null
endfunction
function OO11O0 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
local string OO1IO0=II0IOO(I1I0IO,"Effect")
local string OO1I00=II0IOO(I1I0IO,"Attach")
local integer OO1100=II000O(I1I0IO,"Count")
call OO1010(OO1IO0,OOI010,OO1I00,2)
if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>OO1100 then
call I0110O(I1I0IO)
call I10I1O(t)
endif
set t=null
set OOI010=null
return false
endfunction
function OO11I0 takes string OO1IO0,unit III1IO,string OO1I00,real OO1110,integer O0OOO0 returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Target",III1IO)
call IIOIOO(I1I0IO,"Effect",OO1IO0)
call IIOIOO(I1I0IO,"Attach",OO1I00)
call IIO00O(I1I0IO,"Count",O0OOO0)
call TriggerRegisterTimerEvent(t,OO1110,true)
call TriggerRegisterUnitEvent(t,III1IO,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function OO11O0))
set t=null
endfunction
function O0OO00 takes unit III1IO,integer OO0010 returns item
local integer OO0IO0=0
local item OO0I00
loop
exitwhen OO0IO0==6
set OO0I00=UnitItemInSlot(III1IO,OO0IO0)
if OO0I00!=null and GetItemTypeId(OO0I00)==OO0010 then
return OO0I00
endif
set OO0IO0=OO0IO0+1
endloop
return null
endfunction
function O0OOI0 takes timer t returns nothing
call PauseTimer(t)
call I0110O(I011OO(t))
call DestroyTimer(t)
endfunction
function O0OO10 takes real x1,real y1,real x2,real y2 returns real
return SquareRoot((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
endfunction
function O0O0O0 takes unit a,unit b returns real
return bj_RADTODEG*Atan2(GetUnitY(b)-GetUnitY(a),GetUnitX(b)-GetUnitX(a))
endfunction
function O0O000 takes real x1,real y1,real x2,real y2 returns real
return bj_RADTODEG*Atan2(y2-y1,x2-x1)
endfunction
function O0O0I0 takes nothing returns nothing
call DestroyLightning(II0OIO(I011OO(GetExpiredTimer()),"Lightning"))
endfunction
function O0O010 takes string O0OIO0,real x1,real y1,real x2,real y2,real r,real g,real b,real a,real I1IIOO returns nothing
local timer t=CreateTimer()
local lightning O0OI00=AddLightning(O0OIO0,true,x1,y1,x2,y2)
call SetLightningColor(O0OI00,r,g,b,a)
call IIOOIO(I011OO(t),"Lightning",O0OI00)
call TimerStart(t,I1IIOO,false,function O0O0I0)
endfunction
function O0OII0 takes string OOOO00,integer I1IIOO,unit OOOOI0,integer r,integer g,integer b returns nothing
local texttag tt=CreateTextTag()
call SetTextTagText(tt,OOOO00,0.03)
call SetTextTagPosUnit(tt,OOOOI0,0)
call SetTextTagColor(tt,r,g,b,255)
call SetTextTagVelocity(tt,0,0.0355)
call SetTextTagFadepoint(tt,2)
call SetTextTagPermanent(tt,false)
call SetTextTagLifespan(tt,I1IIOO)
set tt=null
endfunction
function O0OI10 takes string OOOO00,real I1IIOO,unit OOOOI0,real O0O1O0,integer r,integer g,integer b,integer a returns nothing
local texttag tt=CreateTextTag()
call SetTextTagText(tt,OOOO00,O0O1O0)
call SetTextTagPosUnit(tt,OOOOI0,64)
call SetTextTagColor(tt,r,g,b,a)
call SetTextTagVelocity(tt,0,0.0355)
call SetTextTagFadepoint(tt,2)
call SetTextTagPermanent(tt,false)
call SetTextTagLifespan(tt,I1IIOO)
set tt=null
endfunction
function O0O100 takes trigger t,playerunitevent O0O1I0 returns nothing
local integer OO0IO0=0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(OO0IO0),O0O1I0,null)
set OO0IO0=OO0IO0+1
exitwhen OO0IO0==16
endloop
endfunction
function O0O110 takes real x1,real y1,real x2,real y2 returns real
return SquareRoot(((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)))
endfunction
function O00OO0 takes nothing returns nothing
if I1O1IO(GetEnumDestructable())then
call KillDestructable(GetEnumDestructable())
endif
endfunction
function O00O00 takes real x,real y,real d returns nothing
local rect r=Rect(x-d,y-d,x+d,y+d)
call EnumDestructablesInRect(r,null,function O00OO0)
call RemoveRect(r)
set r=null
endfunction
function O00OI0 takes real x,real y returns boolean
if IsTerrainPathable(x,y,PATHING_TYPE_WALKABILITY)then
return false
endif
return true
endfunction
function O00O10 takes sound O000O0,real x,real y returns nothing
call SetSoundPosition(O000O0,x,y,0)
call SetSoundVolume(O000O0,127)
set bj_lastPlayedSound=O000O0
if(O000O0!=null)then
call StartSound(O000O0)
endif
endfunction
function O00000 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local fogmodifier O000I0=IIOIIO(I1I0IO,"fog")
call FogModifierStop(O000I0)
call DestroyFogModifier(O000I0)
call I0110O(I1I0IO)
call I10I1O(t)
set t=null
set O000I0=null
return false
endfunction
function O00010 takes player p,real I1IIOO,real x,real y,real r returns nothing
local trigger t=CreateTrigger()
local fogmodifier O000I0=CreateFogModifierRadius(p,FOG_OF_WAR_VISIBLE,x,y,r,true,true)
call FogModifierStart(O000I0)
call IIOOIO(I011OO(t),"fog",O000I0)
call TriggerRegisterTimerEvent(t,I1IIOO,false)
call TriggerAddCondition(t,Condition(function O00000))
set O000I0=null
set t=null
endfunction
function O00IO0 takes nothing returns nothing
set bj_groupCountUnits=bj_groupCountUnits+1
endfunction
function O00I00 takes nothing returns nothing
if I1O1IO(GetEnumDestructable())and GetDestructableLife(GetEnumDestructable())>0 then
set udg_boolean45=true
endif
endfunction
function O00II0 takes real x,real y,real d returns boolean
local rect r=Rect(x-d,y-d,x+d,y+d)
set udg_boolean45=false
call EnumDestructablesInRect(r,null,function O00I00)
call RemoveRect(r)
set r=null
return udg_boolean45
endfunction
function O00I10 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
local real O001O0=II00IO(I1I0IO,"Speed")
local unit O00100=IIO1OO(I1I0IO,"Projectile")
local real x=GetUnitX(O00100)
local real y=GetUnitY(O00100)
local real III11O=GetUnitX(OOI010)
local real II1OOO=GetUnitY(OOI010)
local real O001I0=O001O0*0.03
local real O00110=O0O000(x,y,III11O,II1OOO)
local real O0IOO0=x+O001I0*Cos(O00110*bj_DEGTORAD)
local real O0IO00=y+O001I0*Sin(O00110*bj_DEGTORAD)
call SetUnitX(O00100,O0IOO0)
call SetUnitY(O00100,O0IO00)
call SetUnitFacing(O00100,O00110)
if O0O110(III11O,II1OOO,O0IOO0,O0IO00)<=O001I0 then
call KillUnit(O00100)
set udg_unit11=IIO1OO(I1I0IO,"Source")
set udg_unit12=OOI010
call ExecuteFunc(II0IOO(I1I0IO,"Callback"))
call I0110O(I1I0IO)
call I10I1O(t)
elseif I1I11O(OOI010)then
call KillUnit(O00100)
call I0110O(I1I0IO)
call I10I1O(t)
endif
set t=null
set OOI010=null
set O00100=null
return false
endfunction
function O0IOI0 takes unit OOI0I0,unit OOI010,integer O0IO10,string O0I0O0,real O001O0 returns trigger
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local real OOII00=GetUnitX(OOI0I0)
local real OOIII0=GetUnitY(OOI0I0)
local real O0I000=GetUnitFacing(OOI0I0)
call TriggerRegisterTimerEvent(t,0.03,true)
call TriggerAddCondition(t,Condition(function O00I10))
call IIO01O(I1I0IO,"Speed",O001O0)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIOIOO(I1I0IO,"Callback",O0I0O0)
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIOOIO(I1I0IO,"Projectile",CreateUnit(GetOwningPlayer(OOI0I0),O0IO10,OOII00,OOIII0,O0I000))
set udg_trigger143=t
set t=null
return udg_trigger143
endfunction
function O0I0I0 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
call UnitAddAbility(IIO1OO(I1I0IO,"Unit"),1097625443)
call I0110O(I1I0IO)
call I10I1O(t)
set t=null
return false
endfunction
function O0I010 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer OO1100=GetTriggerEvalCount(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local real O0IIO0=II00IO(I1I0IO,"curscale")
local real I11OIO=O0IIO0-(O0IIO0-I11O1O(I1IIIO))*OO1100/40
if OO1100>40 or I1I11O(I1IIIO)then
call I0110O(I1I0IO)
call I10I1O(t)
else
call SetUnitScale(I1IIIO,I11OIO,I11OIO,I11OIO)
endif
set t=null
set I1IIIO=null
return false
endfunction
function O0II00 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local real O0III0=II00IO(I1I0IO,"EndScale")
call I0110O(I1I0IO)
call I10I1O(t)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,0.025,true)
call TriggerAddCondition(t,Condition(function O0I010))
set I1I0IO=I011OO(t)
call IIO01O(I1I0IO,"curscale",O0III0)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
set t=null
set I1IIIO=null
return false
endfunction
function O0II10 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer OO1100=GetTriggerEvalCount(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local real O0I1O0=(II00IO(I1I0IO,"scale")-I11O1O(I1IIIO))*OO1100/40
local real I11OIO=I11O1O(I1IIIO)+O0I1O0
if OO1100>40 or I1I11O(I1IIIO)then
call I0110O(I1I0IO)
call I10I1O(t)
else
call SetUnitScale(I1IIIO,I11OIO,I11OIO,I11OIO)
endif
set t=null
set I1IIIO=null
return false
endfunction
function O0I100 takes unit I1IIIO,real I1IIOO,real I11OIO returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local real O0I1I0=I11OIO*I11O1O(I1IIIO)
local real O0III0=O0I1I0
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIO01O(I1I0IO,"EndScale",O0III0)
call TriggerRegisterTimerEvent(t,I1IIOO,false)
call TriggerAddCondition(t,Condition(function O0II00))
if I1IIOO>3 then
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,0.025,true)
call TriggerAddCondition(t,Condition(function O0II10))
set I1I0IO=I011OO(t)
call IIO01O(I1I0IO,"scale",O0I1I0)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
else
call SetUnitScale(I1IIIO,O0III0,O0III0,O0III0)
endif
set t=null
endfunction
function O0I110 takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local integer O01OO0=II000O(I1I0IO,"Ability")
if I1IIIO!=null then
call UnitRemoveAbility(I1IIIO,O01OO0)
endif
call I0110O(I1I0IO)
call I10I1O(t)
set t=null
set I1IIIO=null
endfunction
function O01O00 takes unit u,integer O01OO0,real I1IIOO returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call UnitAddAbility(u,O01OO0)
call TriggerRegisterTimerEvent(t,I1IIOO,false)
call TriggerAddCondition(t,Condition(function O0I110))
call IIOOIO(I1I0IO,"Hero",u)
call IIO00O(I1I0IO,"Ability",O01OO0)
set t=null
endfunction
function O01OI0 takes nothing returns nothing
set bj_groupCountUnits=bj_groupCountUnits+1
endfunction
function O01O10 takes group g returns integer
set bj_groupCountUnits=0
call ForGroup(g,function O01OI0)
return bj_groupCountUnits
endfunction
function O010O0 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local fogmodifier O000I0=IIOIIO(I1I0IO,"fog")
call FogModifierStop(O000I0)
call DestroyFogModifier(O000I0)
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
return false
endfunction
function O01000 takes fogmodifier O000I0,real I1IIOO returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call FogModifierStart(O000I0)
call IIOOIO(I1I0IO,"fog",O000I0)
call TriggerRegisterTimerEvent(t,I1IIOO,false)
call TriggerAddCondition(t,Condition(function O010O0))
set t=null
endfunction
function O010I0 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
call RemoveDestructable(IIOI1O(I1I0IO,"d"))
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
return false
endfunction
function O01010 takes destructable d,real I1IIOO returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,I1IIOO,false)
call TriggerAddCondition(t,Condition(function O010I0))
call IIOOIO(I1I0IO,"d",d)
set t=null
endfunction
function O01IO0 takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local integer O01OO0=II000O(I1I0IO,"Ability")
if I1IIIO!=null and GetUnitAbilityLevel(I1IIIO,O01OO0)>0 then
call UnitRemoveAbility(I1IIIO,O01OO0)
endif
call I0110O(I1I0IO)
call I10I1O(t)
set t=null
set I1IIIO=null
endfunction
function O01I00 takes unit u,integer O01OO0,real I1IIOO returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,I1IIOO,false)
call TriggerAddCondition(t,Condition(function O01IO0))
call IIOOIO(I1I0IO,"Hero",u)
call IIO00O(I1I0IO,"Ability",O01OO0)
set t=null
endfunction
function O01II0 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
call SetUnitAnimation(IIO1OO(I1I0IO,"Unit"),"stand")
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
return false
endfunction
function O01I10 takes unit u,real I1IIOO returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Unit",u)
call TriggerRegisterTimerEvent(t,I1IIOO,false)
call TriggerAddCondition(t,Condition(function O01II0))
set t=null
endfunction
function O011O0 takes real I1IIOO,boolean O01100,real x,real y,real O011I0,real O01110,real OIOOO0,real OIOO00,real OIOOI0 returns nothing
local real OIOO10
local real OIO0O0
local real OIO000
if(O01110<=0 or OIOOI0<=0 or OIOO00<=0)then
return
endif
set OIO0O0=2.0*I1IIOO/OIOO00
set OIOO10=2.0*O01110/OIOOI0
set OIO000=O011I0/O01110
call TerrainDeformRipple(x,y,O01110,OIOOO0,R2I(I1IIOO*1000),1,OIOO10,OIO0O0,OIO000,O01100)
endfunction
function OIO0I0 takes player I0IIOO,unit III1IO,integer I1OO1O returns nothing
local texttag t=CreateTextTag()
call SetPlayerState(I0IIOO,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(I0IIOO,PLAYER_STATE_RESOURCE_GOLD)+I1OO1O)
call SetTextTagText(t,"+"+I2S(I1OO1O),0.025)
call SetTextTagPosUnit(t,III1IO,0)
call SetTextTagColor(t,255,220,0,255)
call SetTextTagVelocity(t,0,0.03)
if GetLocalPlayer()==I0IIOO then
call SetTextTagVisibility(t,true)
else
call SetTextTagVisibility(t,false)
endif
call SetTextTagFadepoint(t,2)
call SetTextTagLifespan(t,3)
call SetTextTagPermanent(t,false)
endfunction
function OIO010 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
call RemoveUnit(IIO1OO(I1I0IO,"Unit"))
call I0111O(I1I0IO)
call I10I1O(t)
return false
endfunction
function OIOIO0 takes unit u,real d returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,d,false)
call TriggerAddCondition(t,Condition(function OIO010))
call IIOOIO(I1I0IO,"Unit",u)
set t=null
endfunction
function OIOI00 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
call RemoveUnit(IIO1OO(I1I0IO,"Unit"))
call I0111O(I1I0IO)
call I10I1O(t)
return false
endfunction
function OIOII0 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
call KillUnit(IIO1OO(I1I0IO,"Unit"))
call I0111O(I1I0IO)
call I10I1O(t)
return false
endfunction
function OIOI10 takes unit u,real d returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,d,false)
call TriggerAddCondition(t,Condition(function OIOII0))
call IIOOIO(I1I0IO,"Unit",u)
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,d+0.01,false)
call TriggerAddCondition(t,Condition(function OIOI00))
call IIOOIO(I1I0IO,"Unit",u)
set t=null
endfunction
function OIO1O0 takes sound O000O0 returns nothing
if O000O0!=null and udg_booleans15[GetPlayerId(GetLocalPlayer())]==false then
call StartSound(O000O0)
endif
endfunction
function OIO100 takes unit III1IO,item OIO1I0 returns integer
local integer i=0
loop
exitwhen i>5
if UnitItemInSlot(III1IO,i)==OIO1I0 then
return i
endif
set i=i+1
endloop
return-1
endfunction
function OIO110 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit III1IO=IIO1OO(I1I0IO,"whichUnit")
local real x=II00IO(I1I0IO,"x")
local real y=II00IO(I1I0IO,"y")
call SetUnitPosition(III1IO,x,y)
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set III1IO=null
return false
endfunction
function OI0OO0 takes unit III1IO returns integer
local integer O0OOO0=0
local integer x=0
loop
exitwhen x>5
if UnitItemInSlot(III1IO,x)==null then
set O0OOO0=O0OOO0+1
endif
set x=x+1
endloop
return O0OOO0
endfunction
function OI0O00 takes nothing returns boolean
return true
endfunction
function OI0OI0 takes unit III1IO returns boolean
local integer OI0O10=GetUnitTypeId(III1IO)
return OI0O10==1848651828 or OI0O10==1848652103 or OI0O10==1848652099 or OI0O10==1848652088
endfunction
function OI00O0 takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and I1I11O(GetFilterUnit())==false and I1O11O(GetFilterUnit())==false
endfunction
function OI0000 takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and I1I11O(GetFilterUnit())==false and I1O11O(GetFilterUnit())==false
endfunction
function OI00I0 takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and OI00O0()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or OI0OI0(GetFilterUnit()))
endfunction
function OI0010 takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and OI00O0()
endfunction
function OI0IO0 takes nothing returns boolean
return IsUnitEnemy(udg_unit11,GetOwningPlayer(GetFilterUnit()))and OI00O0()and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(udg_unit11))
endfunction
function OI0I00 takes nothing returns boolean
return IsUnitEnemy(udg_unit11,GetOwningPlayer(GetFilterUnit()))and OI00O0()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or OI0OI0(GetFilterUnit()))
endfunction
function OI0II0 takes nothing returns boolean
return IsUnitEnemy(udg_unit11,GetOwningPlayer(GetFilterUnit()))and OI00O0()
endfunction
function GenericCondition_EnemyUnitsAndStructureEx takes nothing returns boolean
return IsUnitEnemy(udg_unit11,GetOwningPlayer(GetFilterUnit()))and OI0000()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or OI0OI0(GetFilterUnit()))
endfunction
function OI0I10 takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and OI00O0()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or OI0OI0(GetFilterUnit()))
endfunction
function OI01O0 takes nothing returns boolean
return IsUnitEnemy(udg_unit11,GetOwningPlayer(GetFilterUnit()))==false and OI00O0()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or OI0OI0(GetFilterUnit()))
endfunction
function OI0100 takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and OI00O0()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or OI0OI0(GetFilterUnit()))
endfunction
function OI01I0 takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(udg_unit11,GetOwningPlayer(GetFilterUnit()))==false and OI00O0()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or OI0OI0(GetFilterUnit()))
endfunction
function OI0110 takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==true and OI00O0()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or OI0OI0(GetFilterUnit()))
endfunction
function OIIOO0 takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==true and OI00O0()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or OI0OI0(GetFilterUnit()))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function GenericCondition_EnemyHeroesEx takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(udg_unit11,GetOwningPlayer(GetFilterUnit()))==true and OI00O0()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or OI0OI0(GetFilterUnit()))
endfunction
function OIIO00 takes nothing returns boolean
return OI00O0()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or OI0OI0(GetFilterUnit()))
endfunction
function OIIOI0 takes nothing returns boolean
return OI00O0()
endfunction
function OIIO10 takes nothing returns boolean
return OI00O0()and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or OI0OI0(GetFilterUnit()))
endfunction
function OII0O0 takes nothing returns boolean
return OI00O0()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true or IsUnitIllusion(GetFilterUnit())==true)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or OI0OI0(GetFilterUnit()))
endfunction
function OII000 takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true
endfunction
function OII0I0 takes nothing returns boolean
return OI0I00()and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(udg_unit11))
endfunction
function OII010 takes nothing returns boolean
return OI00O0()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or OI0OI0(GetFilterUnit()))
endfunction
function OIIIO0 takes nothing returns boolean
return OII010()and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(udg_unit11))
endfunction
function OIII00 takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and I1I11O(GetFilterUnit())==true and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false
endfunction
function OIIII0 takes real x,real y returns boolean
return IsPointInRegion(udg_region05,x,y)
endfunction
function OIII10 takes nothing returns nothing
set udg_region02=CreateRegion()
call RegionAddRect(udg_region02,udg_rect44)
set udg_region04=CreateRegion()
call RegionAddRect(udg_region04,udg_rect45)
set udg_region01=CreateRegion()
call RegionAddRect(udg_region01,udg_rect63)
call RegionAddRect(udg_region01,udg_rect64)
call RegionAddRect(udg_region01,udg_rect65)
set udg_region03=CreateRegion()
call RegionAddRect(udg_region03,udg_rect66)
call RegionAddRect(udg_region03,udg_rect67)
call RegionAddRect(udg_region03,udg_rect68)
set udg_region05=CreateRegion()
call RegionAddRect(udg_region05,udg_rect69)
call RegionAddRect(udg_region05,udg_rect70)
call RegionAddRect(udg_region05,udg_rect71)
call RegionAddRect(udg_region05,udg_rect72)
call RegionAddRect(udg_region05,udg_rect73)
call RegionAddRect(udg_region05,udg_rect74)
call RegionAddRect(udg_region05,udg_rect75)
call RegionAddRect(udg_region05,udg_rect76)
call RegionAddRect(udg_region05,udg_rect77)
call RegionAddRect(udg_region05,udg_rect78)
call RegionAddRect(udg_region05,udg_rect79)
call RegionAddRect(udg_region05,udg_rect80)
call RegionAddRect(udg_region05,udg_rect81)
call RegionAddRect(udg_region05,udg_rect82)
call RegionAddRect(udg_region05,udg_rect83)
call RegionAddRect(udg_region05,udg_rect84)
call RegionAddRect(udg_region05,udg_rect85)
call RegionAddRect(udg_region05,udg_rect86)
call RegionAddRect(udg_region05,udg_rect87)
call RegionAddRect(udg_region05,udg_rect88)
call RegionAddRect(udg_region05,udg_rect89)
call RegionAddRect(udg_region05,udg_rect90)
call RegionAddRect(udg_region05,udg_rect91)
call RegionAddRect(udg_region05,udg_rect92)
call RegionAddRect(udg_region05,udg_rect93)
call RegionAddRect(udg_region05,udg_rect94)
call RegionAddRect(udg_region05,udg_rect95)
call RegionAddRect(udg_region05,udg_rect96)
call RegionAddRect(udg_region05,udg_rect97)
call RegionAddRect(udg_region05,udg_rect98)
call RegionAddRect(udg_region05,udg_rect99)
call RegionAddRect(udg_region05,udg_rect100)
call RegionAddRect(udg_region05,udg_rect101)
call RegionAddRect(udg_region05,udg_rect102)
call RegionAddRect(udg_region05,udg_rect103)
call RegionAddRect(udg_region05,udg_rect104)
call RegionAddRect(udg_region05,udg_rect105)
call RegionAddRect(udg_region05,udg_rect106)
call RegionAddRect(udg_region05,udg_rect107)
call RegionAddRect(udg_region05,udg_rect108)
call RegionAddRect(udg_region05,udg_rect109)
call RegionAddRect(udg_region05,udg_rect110)
call RegionAddRect(udg_region05,udg_rect111)
call RegionAddRect(udg_region05,udg_rect112)
call RegionAddRect(udg_region05,udg_rect113)
call RegionAddRect(udg_region05,udg_rect114)
call RegionAddRect(udg_region05,udg_rect115)
call RegionAddRect(udg_region05,udg_rect116)
call RegionAddRect(udg_region05,udg_rect117)
call RegionAddRect(udg_region05,udg_rect118)
call RegionAddRect(udg_region05,udg_rect119)
call RegionAddRect(udg_region05,udg_rect120)
call RegionAddRect(udg_region05,udg_rect121)
call RegionAddRect(udg_region05,udg_rect122)
call RegionAddRect(udg_region05,udg_rect123)
call RegionAddRect(udg_region05,udg_rect124)
call RegionAddRect(udg_region05,udg_rect125)
call RegionAddRect(udg_region05,udg_rect126)
call RegionAddRect(udg_region05,udg_rect127)
call RegionAddRect(udg_region05,udg_rect128)
call RegionAddRect(udg_region05,udg_rect129)
call RegionAddRect(udg_region05,udg_rect130)
call RegionAddRect(udg_region05,udg_rect131)
call RegionAddRect(udg_region05,udg_rect132)
call RegionAddRect(udg_region05,udg_rect133)
call RegionAddRect(udg_region05,udg_rect134)
call RegionAddRect(udg_region05,udg_rect135)
call RegionAddRect(udg_region05,udg_rect136)
call RegionAddRect(udg_region05,udg_rect137)
call RegionAddRect(udg_region05,udg_rect138)
call RegionAddRect(udg_region05,udg_rect139)
call RegionAddRect(udg_region05,udg_rect140)
call RegionAddRect(udg_region05,udg_rect141)
call RegionAddRect(udg_region05,udg_rect142)
call RegionAddRect(udg_region05,udg_rect143)
call RegionAddRect(udg_region05,udg_rect144)
call RegionAddRect(udg_region05,udg_rect145)
call RegionAddRect(udg_region05,udg_rect146)
call RegionAddRect(udg_region05,udg_rect147)
call RegionAddRect(udg_region05,udg_rect148)
call RegionAddRect(udg_region05,udg_rect149)
call RegionAddRect(udg_region05,udg_rect150)
call RegionAddRect(udg_region05,udg_rect151)
call RegionAddRect(udg_region05,udg_rect152)
call RegionAddRect(udg_region05,udg_rect153)
call RegionAddRect(udg_region05,udg_rect154)
call RegionAddRect(udg_region05,udg_rect155)
call RegionAddRect(udg_region05,udg_rect156)
call RegionAddRect(udg_region05,udg_rect157)
call RegionAddRect(udg_region05,udg_rect158)
call RegionAddRect(udg_region05,udg_rect159)
call RegionAddRect(udg_region05,udg_rect160)
call RegionAddRect(udg_region05,udg_rect161)
call RegionAddRect(udg_region05,udg_rect162)
call RegionAddRect(udg_region05,udg_rect163)
endfunction
function OII1O0 takes unit OOI0I0,unit OOI010,integer OII100,real OOIO00 returns nothing
if OII100==0 then
return
endif
if OII100==1 then
call UnitDamageTarget(OOI0I0,OOI010,OOIO00,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE,WEAPON_TYPE_WHOKNOWS)
elseif OII100==2 then
call UnitDamageTarget(OOI0I0,OOI010,OOIO00,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
elseif OII100==3 then
call UnitDamageTarget(OOI0I0,OOI010,OOIO00,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_FIRE,WEAPON_TYPE_WHOKNOWS)
endif
endfunction
function OII1I0 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local unit OOI010=IIO1OO(I1I0IO,"Target")
local integer OII100=II000O(I1I0IO,"DamageType")
local real OOIO00=II00IO(I1I0IO,"Damage")
call OII1O0(OOI0I0,OOI010,OII100,OOIO00)
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set OOI0I0=null
set OOI010=null
return false
endfunction
function OII110 takes unit OOI0I0,unit OOI010,integer OII100,real OOIO00,real I1IIOO returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIO00O(I1I0IO,"DamageType",OII100)
call IIO01O(I1I0IO,"Damage",OOIO00)
call TriggerRegisterTimerEvent(t,I1IIOO,false)
call TriggerAddCondition(t,Condition(function OII1I0))
set t=null
endfunction
function OI1OO0 takes nothing returns nothing
call FlushGameCache(InitGameCache("DotACache.x"))
set udg_gamecache01=InitGameCache("DotACache.x")
call SetFloatGameState(GAME_STATE_TIME_OF_DAY,6.00)
call SuspendTimeOfDay(false)
call SetTimeOfDayScale(0.5)
call SetSkyModel("Environment\\Sky\\FoggedSky\\FoggedSky.mdl")
call SetCreepCampFilterState(true)
set udg_string03="DotA Allstars"
call TimerStart(udg_timer01,99999.00,false,null)
set udg_weathereffect02=AddWeatherEffect(bj_mapInitialPlayableArea,1380018290)
set udg_weathereffect01=AddWeatherEffect(bj_mapInitialPlayableArea,1397645939)
set udg_weathereffect03=AddWeatherEffect(bj_mapInitialPlayableArea,1280470369)
set udg_weathereffect04=AddWeatherEffect(bj_mapInitialPlayableArea,1464822903)
set udg_players03[0]=Player(0)
set udg_players03[1]=Player(1)
set udg_players03[2]=Player(2)
set udg_players03[3]=Player(3)
set udg_players03[4]=Player(4)
set udg_players03[5]=Player(5)
set udg_players04[0]=Player(6)
set udg_players04[1]=Player(7)
set udg_players04[2]=Player(8)
set udg_players04[3]=Player(9)
set udg_players04[4]=Player(10)
set udg_players04[5]=Player(11)
set udg_player01=Player(12)
set udg_player02=Player(15)
call SetUnitPathing(udg_unit06,false)
call SetUnitPathing(udg_unit07,false)
call SetUnitPathing(udg_unit08,false)
call SetUnitPathing(udg_unit05,false)
call SetUnitPathing(udg_unit04,false)
call SetUnitInvulnerable(udg_unit04,true)
call SetUnitInvulnerable(udg_unit05,true)
call SetUnitInvulnerable(udg_unit08,true)
call SetUnitInvulnerable(udg_unit07,true)
call SetUnitInvulnerable(udg_unit06,true)
set udg_location01=GetUnitLoc(udg_unit04)
set udg_location02=GetUnitLoc(udg_unit06)
set udg_location03=GetUnitLoc(udg_unit08)
set udg_location04=GetUnitLoc(udg_unit05)
set udg_location05=GetUnitLoc(udg_unit07)
set udg_integer13=1093678663
set udg_locations01[1]=udg_location02
set udg_locations01[2]=udg_location04
set udg_locations01[3]=udg_location03
set udg_locations01[4]=udg_location05
set udg_locations01[5]=udg_location01
set udg_location06=GetRectCenter(udg_rect02)
set udg_location07=GetRectCenter(udg_rect03)
set udg_location08=GetRectCenter(udg_rect01)
set udg_location09=GetRectCenter(udg_rect09)
set udg_location11=GetRectCenter(udg_rect10)
set udg_location10=GetRectCenter(udg_rect08)
set udg_location12=GetRectCenter(udg_rect14)
set udg_location14=GetRectCenter(udg_rect13)
set udg_location13=GetRectCenter(udg_rect12)
set udg_location15=GetRectCenter(udg_rect07)
set udg_location17=GetRectCenter(udg_rect06)
set udg_location16=GetRectCenter(udg_rect05)
set udg_location18=GetRectCenter(udg_rect18)
set udg_location19=GetRectCenter(udg_rect15)
set udg_boolean35=true
endfunction
function OI1O00 takes nothing returns nothing
set udg_unit13=CreateUnit(udg_players03[0],1852206952,OO00OO,OO000O,270)
set udg_unit14=CreateUnit(udg_players03[0],1749236021,OO00IO,OO001O,270)
set udg_unit15=CreateUnit(udg_players03[0],1848652107,OO0IOO,OO0I0O,270)
set udg_unit16=CreateUnit(udg_players03[0],1849897784,OO0IIO,OO0I1O,270)
set udg_unit17=CreateUnit(udg_players03[0],1701080947,OO01OO,OO010O,270)
set udg_unit18=CreateUnit(udg_players03[0],1848651862,OO01IO,OO011O,270)
set udg_unit19=CreateUnit(udg_players03[0],1848651863,OOIOOO,OOIO0O,270)
set udg_unit20=CreateUnit(udg_players03[0],1848651826,OOIOIO,OOIO1O,270)
set udg_unit21=CreateUnit(udg_players03[0],1848651864,OOI0OO,OOI00O,270)
set udg_unit22=CreateUnit(udg_players03[0],1848651833,OOI0IO,OOI01O,270)
set udg_unit23=CreateUnit(udg_players03[0],1702129516,OOIIOO,OOII0O,270)
set udg_unit24=CreateUnit(udg_players03[0],1697656914,OOIIIO,1504,270)
set udg_unit25=CreateUnit(udg_players03[0],1697656914,OOII1O,OOI1OO,270)
set udg_unit26=CreateUnit(udg_players03[0],1697656914,4960,OOI10O,270)
set udg_unit27=CreateUnit(udg_players03[0],1697657137,OOI1IO,OOI11O,270)
set udg_unit28=CreateUnit(udg_players03[0],1697657137,OO1OOO,OO1O0O,270)
set udg_unit29=CreateUnit(udg_players03[0],1697657137,OO1OIO,OO1O1O,270)
set udg_unit30=CreateUnit(udg_players03[0],1697656915,OO10OO,OO100O,270)
set udg_unit31=CreateUnit(udg_players03[0],1697656915,OO10IO,OO101O,270)
set udg_unit32=CreateUnit(udg_players03[0],1697656915,OO1IOO,OO1I0O,270)
set udg_unit33=CreateUnit(udg_players03[0],1697657145,OO1IIO,OO1I1O,270)
set udg_unit34=CreateUnit(udg_players03[0],1697657145,OO11OO,OO110O,270)
set udg_unit35=CreateUnit(udg_players03[0],1700884333,OO11IO,OO111O,270)
set udg_unit36=CreateUnit(udg_players03[0],1700884333,O0OOOO,O0OO0O,270)
set udg_unit37=CreateUnit(udg_players03[0],1700884333,O0OOIO,O0OO1O,270)
set udg_unit38=CreateUnit(udg_players03[0],1700884325,O0O0OO,O0O00O,270)
set udg_unit39=CreateUnit(udg_players03[0],1700884325,O0O0IO,O0O01O,270)
set udg_unit40=CreateUnit(udg_players03[0],1700884325,O0OIOO,O0OI0O,270)
set udg_unit41=CreateUnit(udg_players03[0],1701670775,O0OIIO,O0OI1O,270)
set udg_unit42=CreateUnit(udg_players03[0],1701670775,O0O1OO,O0O10O,270)
set udg_unit43=CreateUnit(udg_players03[0],1701670775,O0O1IO,O0O11O,270)
set udg_unit44=CreateUnit(udg_players03[0],1701670775,O00OOO,O00O0O,270)
set udg_unit45=CreateUnit(udg_players03[0],1701670775,O00OIO,O00O1O,270)
set udg_unit46=CreateUnit(udg_players03[0],1701670775,O000OO,O0000O,270)
set udg_unit47=CreateUnit(udg_players03[0],1701670775,O000IO,O0001O,270)
set udg_unit48=CreateUnit(udg_players03[0],1701670775,O00IOO,O00I0O,270)
set udg_unit49=CreateUnit(udg_players03[0],1701670775,O00IIO,O00I1O,270)
set udg_unit50=CreateUnit(udg_players03[0],1701670775,O001OO,O0010O,270)
set udg_unit51=CreateUnit(udg_players03[0],1700884343,O001IO,O0011O,270)
set udg_unit52=CreateUnit(udg_players03[0],1701080930,O0IOOO,O0IO0O,270)
call SetUnitColor(udg_unit14,OO0OIO)
call SetUnitColor(udg_unit16,OO0O1O)
call SetUnitColor(udg_unit15,OO0O1O)
call SetUnitColor(udg_unit18,OO0O1O)
call SetUnitColor(udg_unit19,OO0O1O)
call SetUnitColor(udg_unit20,OO0O1O)
call SetUnitColor(udg_unit21,OO0O1O)
call SetUnitColor(udg_unit22,OO0O1O)
call SetUnitInvulnerable(udg_unit24,true)
call SetUnitInvulnerable(udg_unit25,true)
call SetUnitInvulnerable(udg_unit26,true)
call SetUnitInvulnerable(udg_unit27,true)
call SetUnitInvulnerable(udg_unit28,true)
call SetUnitInvulnerable(udg_unit29,true)
call SetUnitInvulnerable(udg_unit30,true)
call SetUnitInvulnerable(udg_unit31,true)
call SetUnitInvulnerable(udg_unit32,true)
call SetUnitInvulnerable(udg_unit33,true)
call SetUnitInvulnerable(udg_unit34,true)
call SetUnitInvulnerable(udg_unit23,true)
call SetUnitInvulnerable(udg_unit35,true)
call SetUnitInvulnerable(udg_unit36,true)
call SetUnitInvulnerable(udg_unit37,true)
call SetUnitInvulnerable(udg_unit38,true)
call SetUnitInvulnerable(udg_unit39,true)
call SetUnitInvulnerable(udg_unit40,true)
call SetUnitInvulnerable(udg_unit51,true)
call SetUnitInvulnerable(udg_unit52,true)
call SetUnitInvulnerable(udg_unit41,true)
call SetUnitInvulnerable(udg_unit42,true)
call SetUnitInvulnerable(udg_unit43,true)
call SetUnitInvulnerable(udg_unit44,true)
call SetUnitInvulnerable(udg_unit45,true)
call SetUnitInvulnerable(udg_unit46,true)
call SetUnitInvulnerable(udg_unit47,true)
call SetUnitInvulnerable(udg_unit48,true)
call SetUnitInvulnerable(udg_unit49,true)
call SetUnitInvulnerable(udg_unit50,true)
endfunction
function OI1OI0 takes nothing returns nothing
set udg_unit53=CreateUnit(udg_players04[0],1852073580,6272,5504,270)
set udg_unit54=CreateUnit(udg_players04[0],1849897781,6464,5120,270)
set udg_unit55=CreateUnit(udg_players04[0],1848652107,5952,5568,270)
set udg_unit56=CreateUnit(udg_players04[0],1849897784,6080,5568,270)
set udg_unit57=CreateUnit(udg_players04[0],1969713782,6464,4736,270)
set udg_unit58=CreateUnit(udg_players04[0],1848651862,5696,5120,270)
set udg_unit59=CreateUnit(udg_players04[0],1848651863,5568,5248,270)
set udg_unit60=CreateUnit(udg_players04[0],1848651826,5568,5376,270)
set udg_unit61=CreateUnit(udg_players04[0],1848651864,5696,5504,270)
set udg_unit62=CreateUnit(udg_players04[0],1848651833,5568,5696,270)
set udg_unit63=CreateUnit(udg_players04[0],1970172012,4992,4544,270)
set udg_unit64=CreateUnit(udg_players04[0],1966092365,OIO1OO,5920,270)
set udg_unit65=CreateUnit(udg_players04[0],1966092365,1056,OIO10O,270)
set udg_unit66=CreateUnit(udg_players04[0],1966092365,6048,OIO1IO,270)
set udg_unit67=CreateUnit(udg_players04[0],1966092356,32,5856,270)
set udg_unit68=CreateUnit(udg_players04[0],1966092356,2400,1696,270)
set udg_unit69=CreateUnit(udg_players04[0],1966092356,6112,OIO11O,270)
set udg_unit70=CreateUnit(udg_players04[0],1966092366,3168,5920,270)
set udg_unit71=CreateUnit(udg_players04[0],1966092366,3616,3296,270)
set udg_unit72=CreateUnit(udg_players04[0],1966092366,6048,2784,270)
set udg_unit73=CreateUnit(udg_players04[0],1966092372,4640,4576,270)
set udg_unit74=CreateUnit(udg_players04[0],1966092372,5088,4192,270)
set udg_unit75=CreateUnit(udg_players04[0],1970496880,3776,5888,270)
set udg_unit76=CreateUnit(udg_players04[0],1970496880,4096,3392,270)
set udg_unit77=CreateUnit(udg_players04[0],1970496880,6208,3264,270)
set udg_unit78=CreateUnit(udg_players04[0],1970564964,3520,5376,270)
set udg_unit79=CreateUnit(udg_players04[0],1970564964,3776,3840,270)
set udg_unit80=CreateUnit(udg_players04[0],1970564964,5696,3264,270)
set udg_unit81=CreateUnit(udg_players04[0],1970956647,3168,4000,270)
set udg_unit82=CreateUnit(udg_players04[0],1970956647,4192,5536,270)
set udg_unit83=CreateUnit(udg_players04[0],1970956647,4128,4512,270)
set udg_unit84=CreateUnit(udg_players04[0],1970956647,4640,3680,270)
set udg_unit85=CreateUnit(udg_players04[0],1970956647,4832,3104,270)
set udg_unit86=CreateUnit(udg_players04[0],1970956647,5408,2592,270)
set udg_unit87=CreateUnit(udg_players04[0],1970956647,5408,3296,270)
set udg_unit88=CreateUnit(udg_players04[0],1970956647,6112,4000,270)
set udg_unit89=CreateUnit(udg_players04[0],1970956647,3040,5088,270)
set udg_unit90=CreateUnit(udg_players04[0],1970956647,6304,3744,270)
set udg_unit91=CreateUnit(udg_players04[0],1970495856,3520,4608,270)
set udg_unit92=CreateUnit(udg_players04[0],1970498664,4096,2624,270)
call SetUnitColor(udg_unit54,OIOIIO)
call SetUnitColor(udg_unit56,OIOI1O)
call SetUnitColor(udg_unit55,OIOI1O)
call SetUnitColor(udg_unit58,OIOI1O)
call SetUnitColor(udg_unit59,OIOI1O)
call SetUnitColor(udg_unit60,OIOI1O)
call SetUnitColor(udg_unit61,OIOI1O)
call SetUnitColor(udg_unit62,OIOI1O)
call SetUnitInvulnerable(udg_unit64,true)
call SetUnitInvulnerable(udg_unit65,true)
call SetUnitInvulnerable(udg_unit66,true)
call SetUnitInvulnerable(udg_unit67,true)
call SetUnitInvulnerable(udg_unit68,true)
call SetUnitInvulnerable(udg_unit69,true)
call SetUnitInvulnerable(udg_unit70,true)
call SetUnitInvulnerable(udg_unit71,true)
call SetUnitInvulnerable(udg_unit72,true)
call SetUnitInvulnerable(udg_unit73,true)
call SetUnitInvulnerable(udg_unit74,true)
call SetUnitInvulnerable(udg_unit63,true)
call SetUnitInvulnerable(udg_unit75,true)
call SetUnitInvulnerable(udg_unit76,true)
call SetUnitInvulnerable(udg_unit77,true)
call SetUnitInvulnerable(udg_unit78,true)
call SetUnitInvulnerable(udg_unit79,true)
call SetUnitInvulnerable(udg_unit80,true)
call SetUnitInvulnerable(udg_unit91,true)
call SetUnitInvulnerable(udg_unit92,true)
call SetUnitInvulnerable(udg_unit81,true)
call SetUnitInvulnerable(udg_unit82,true)
call SetUnitInvulnerable(udg_unit83,true)
call SetUnitInvulnerable(udg_unit84,true)
call SetUnitInvulnerable(udg_unit85,true)
call SetUnitInvulnerable(udg_unit86,true)
call SetUnitInvulnerable(udg_unit87,true)
call SetUnitInvulnerable(udg_unit88,true)
call SetUnitInvulnerable(udg_unit89,true)
call SetUnitInvulnerable(udg_unit90,true)
endfunction
function OI1O10 takes nothing returns nothing
set udg_unit93=CreateUnit(Player(1),1852010352,-6528,-6848,270)
set udg_unit94=CreateUnit(Player(2),1852010352,-6400,-6848,270)
set udg_unit95=CreateUnit(Player(3),1852010352,-6272,-6848,270)
set udg_unit96=CreateUnit(Player(4),1852010352,-6144,-6848,270)
set udg_unit97=CreateUnit(Player(5),1852010352,-6016,-6848,270)
set udg_unit98=CreateUnit(Player(7),1852010352,5824,6464,270)
set udg_unit99=CreateUnit(Player(8),1852010352,5952,6464,270)
set udg_unit100=CreateUnit(Player(9),1852010352,6080,6464,270)
set udg_unit101=CreateUnit(Player(10),1852010352,6208,6464,270)
set udg_unit102=CreateUnit(Player(11),1852010352,6336,6464,270)
call UnitAddItemToSlotById(udg_unit93,1227895093,1)
call UnitAddItemToSlotById(udg_unit94,1227895093,1)
call UnitAddItemToSlotById(udg_unit95,1227895093,1)
call UnitAddItemToSlotById(udg_unit96,1227895093,1)
call UnitAddItemToSlotById(udg_unit97,1227895093,1)
call UnitAddItemToSlotById(udg_unit98,1227895093,1)
call UnitAddItemToSlotById(udg_unit99,1227895093,1)
call UnitAddItemToSlotById(udg_unit100,1227895093,1)
call UnitAddItemToSlotById(udg_unit101,1227895093,1)
call UnitAddItemToSlotById(udg_unit102,1227895093,1)
call UnitAddItemToSlotById(udg_unit93,1227895118,2)
call UnitAddItemToSlotById(udg_unit94,1227895118,2)
call UnitAddItemToSlotById(udg_unit95,1227895118,2)
call UnitAddItemToSlotById(udg_unit96,1227895118,2)
call UnitAddItemToSlotById(udg_unit97,1227895118,2)
call UnitAddItemToSlotById(udg_unit98,1227895118,2)
call UnitAddItemToSlotById(udg_unit99,1227895118,2)
call UnitAddItemToSlotById(udg_unit100,1227895118,2)
call UnitAddItemToSlotById(udg_unit101,1227895118,2)
call UnitAddItemToSlotById(udg_unit102,1227895118,2)
call UnitAddItemToSlotById(udg_unit93,1227895119,3)
call UnitAddItemToSlotById(udg_unit94,1227895119,3)
call UnitAddItemToSlotById(udg_unit95,1227895119,3)
call UnitAddItemToSlotById(udg_unit96,1227895119,3)
call UnitAddItemToSlotById(udg_unit97,1227895119,3)
call UnitAddItemToSlotById(udg_unit98,1227895119,3)
call UnitAddItemToSlotById(udg_unit99,1227895119,3)
call UnitAddItemToSlotById(udg_unit100,1227895119,3)
call UnitAddItemToSlotById(udg_unit101,1227895119,3)
call UnitAddItemToSlotById(udg_unit102,1227895119,3)
endfunction
function OI1000 takes nothing returns nothing
local integer IIII0O=1
set udg_player03=udg_players03[1]
loop
exitwhen II010O(udg_player03)or IIII0O>5
set IIII0O=IIII0O+1
set udg_player03=udg_players03[IIII0O]
endloop
if not II010O(udg_player03)then
set udg_player03=udg_players04[1]
set IIII0O=1
loop
exitwhen II010O(udg_player03)or IIII0O>5
set IIII0O=IIII0O+1
set udg_player03=udg_players04[IIII0O]
endloop
endif
endfunction
function OI10I0 takes nothing returns nothing
local integer IIII0O
local integer IIIIIO
set udg_strings01[GetPlayerId(udg_players03[0])]="|c00ff0303"
set udg_strings01[GetPlayerId(udg_players03[1])]="|c000042ff"
set udg_strings01[GetPlayerId(udg_players03[2])]="|c001ce6b9"
set udg_strings01[GetPlayerId(udg_players03[3])]="|c00540081"
set udg_strings01[GetPlayerId(udg_players03[4])]="|c00fffc01"
set udg_strings01[GetPlayerId(udg_players03[5])]="|c00ff8000"
set udg_strings01[GetPlayerId(udg_players04[0])]="|c0020c000"
set udg_strings01[GetPlayerId(udg_players04[1])]="|c00e55bb0"
set udg_strings01[GetPlayerId(udg_players04[2])]="|c00959697"
set udg_strings01[GetPlayerId(udg_players04[3])]="|c007ebff1"
set udg_strings01[GetPlayerId(udg_players04[4])]="|c00106246"
set udg_strings01[GetPlayerId(udg_players04[5])]="|c004e2a04"
call SetPlayerColor(udg_players03[0],PLAYER_COLOR_RED)
call SetPlayerColor(udg_players03[1],PLAYER_COLOR_BLUE)
call SetPlayerColor(udg_players03[2],PLAYER_COLOR_CYAN)
call SetPlayerColor(udg_players03[3],PLAYER_COLOR_PURPLE)
call SetPlayerColor(udg_players03[4],PLAYER_COLOR_YELLOW)
call SetPlayerColor(udg_players03[5],PLAYER_COLOR_ORANGE)
call SetPlayerColor(udg_players04[0],PLAYER_COLOR_GREEN)
call SetPlayerColor(udg_players04[1],PLAYER_COLOR_PINK)
call SetPlayerColor(udg_players04[2],PLAYER_COLOR_LIGHT_GRAY)
call SetPlayerColor(udg_players04[3],PLAYER_COLOR_LIGHT_BLUE)
call SetPlayerColor(udg_players04[4],PLAYER_COLOR_AQUA)
call SetPlayerColor(udg_players04[5],PLAYER_COLOR_BROWN)
set IIII0O=1
set IIIIIO=5
loop
if(II010O(udg_players03[IIII0O])==false)then
call SetPlayerName(udg_players03[IIII0O],"Player "+I2S(IIII0O))
endif
if(II010O(udg_players04[IIII0O])==false)then
call SetPlayerName(udg_players04[IIII0O],"Player "+I2S(5+IIII0O))
endif
set IIII0O=IIII0O+1
exitwhen IIII0O>IIIIIO
endloop
endfunction
function OI1IO0 takes unit OOOIO0 returns boolean
local integer ID=GetUnitTypeId(OOOIO0)
if ID==1848651862 or ID==1848651863 or ID==1848651826 or ID==1848651825 or ID==1848651864 or ID==1849897784 or ID==1848652107 or ID==1848651833 then
return true
endif
return false
endfunction
function OI1I00 takes nothing returns nothing
if(GetOwningPlayer(GetEnumUnit())==Player(0))then
call SetUnitOwner(GetEnumUnit(),udg_players03[0],false)
if OI1IO0(GetEnumUnit())==false then
call SetUnitColor(GetEnumUnit(),ConvertPlayerColor(0))
endif
else
call SetUnitOwner(GetEnumUnit(),udg_players04[0],false)
if OI1IO0(GetEnumUnit())==false then
call SetUnitColor(GetEnumUnit(),ConvertPlayerColor(6))
endif
endif
endfunction
function OI1II0 takes nothing returns nothing
local group II1O0O=CreateGroup()
call GroupEnumUnitsOfPlayer(II1O0O,Player(0),Condition(function OI0O00))
call ForGroup(II1O0O,function OI1I00)
call GroupClear(II1O0O)
call GroupEnumUnitsOfPlayer(II1O0O,Player(6),Condition(function OI0O00))
call ForGroup(II1O0O,function OI1I00)
call DestroyGroup(II1O0O)
endfunction
function OI1I10 takes player p returns nothing
local integer i=0
local string OI11O0=GetPlayerName(p)
local integer OI1100=StringLength(OI11O0)
local integer OI11I0=OI1100
loop
exitwhen i==OI1100
if SubString(OI11O0,i,i+1)=="("and SubString(OI11O0,i-1,i)==" "then
set OI11I0=i-1
call SetPlayerName(p,SubString(OI11O0,0,OI11I0))
set i=OI1100
else
set i=i+1
endif
endloop
endfunction
function OI1110 takes nothing returns nothing
local integer O1OOO0
local integer O1OO00
local integer IIII0O
local integer IIIIIO
local integer x=0
local integer y=0
local trigger t
local integer i
if GetPlayerState(udg_players03[0],PLAYER_STATE_OBSERVER)!=0 or GetPlayerState(udg_players04[0],PLAYER_STATE_OBSERVER)!=0 then
set udg_boolean26=true
set udg_players03[0]=Player(13)
set udg_players04[0]=Player(14)
set udg_player06=Player(0)
set udg_player07=Player(6)
call SetAllyColorFilterState(0)
loop
exitwhen x>5
call SetPlayerAlliance(Player(0),udg_players03[x],ConvertAllianceType(0),true)
call SetPlayerAlliance(Player(0),udg_players03[x],ConvertAllianceType(4),true)
call SetPlayerAlliance(Player(0),udg_players04[x],ConvertAllianceType(0),false)
call SetPlayerAlliance(Player(0),udg_players04[x],ConvertAllianceType(4),false)
set x=x+1
endloop
endif
call ForceAddPlayer(udg_force01,udg_players03[0])
call ForceAddPlayer(udg_force01,udg_players03[1])
call ForceAddPlayer(udg_force01,udg_players03[2])
call ForceAddPlayer(udg_force01,udg_players03[3])
call ForceAddPlayer(udg_force01,udg_players03[4])
call ForceAddPlayer(udg_force01,udg_players03[5])
call ForceAddPlayer(udg_force02,udg_players04[0])
call ForceAddPlayer(udg_force02,udg_players04[1])
call ForceAddPlayer(udg_force02,udg_players04[2])
call ForceAddPlayer(udg_force02,udg_players04[3])
call ForceAddPlayer(udg_force02,udg_players04[4])
call ForceAddPlayer(udg_force02,udg_players04[5])
call ForceAddPlayer(udg_force03,udg_players03[1])
call ForceAddPlayer(udg_force03,udg_players03[2])
call ForceAddPlayer(udg_force03,udg_players03[3])
call ForceAddPlayer(udg_force03,udg_players03[4])
call ForceAddPlayer(udg_force03,udg_players03[5])
call ForceAddPlayer(udg_force03,udg_players04[1])
call ForceAddPlayer(udg_force03,udg_players04[2])
call ForceAddPlayer(udg_force03,udg_players04[3])
call ForceAddPlayer(udg_force03,udg_players04[4])
call ForceAddPlayer(udg_force03,udg_players04[5])
if udg_boolean26 then
call ForceAddPlayer(udg_force03,Player(0))
call ForceAddPlayer(udg_force03,Player(6))
endif
set x=0
set y=0
loop
exitwhen x>5
loop
exitwhen y>5
if(x!=y)then
call SetPlayerAlliance(udg_players03[x],udg_players03[y],ConvertAllianceType(0),true)
call SetPlayerAlliance(udg_players03[x],udg_players03[y],ConvertAllianceType(1),true)
call SetPlayerAlliance(udg_players03[x],udg_players03[y],ConvertAllianceType(2),true)
call SetPlayerAlliance(udg_players03[x],udg_players03[y],ConvertAllianceType(3),true)
call SetPlayerAlliance(udg_players03[x],udg_players03[y],ConvertAllianceType(4),true)
call SetPlayerAlliance(udg_players03[x],udg_players03[y],ConvertAllianceType(5),true)
call SetPlayerAlliance(udg_players03[x],udg_players03[y],ConvertAllianceType(6),false)
call SetPlayerAlliance(udg_players03[x],udg_players03[y],ConvertAllianceType(7),false)
call SetPlayerAlliance(udg_players04[x],udg_players04[y],ConvertAllianceType(0),true)
call SetPlayerAlliance(udg_players04[x],udg_players04[y],ConvertAllianceType(1),true)
call SetPlayerAlliance(udg_players04[x],udg_players04[y],ConvertAllianceType(2),true)
call SetPlayerAlliance(udg_players04[x],udg_players04[y],ConvertAllianceType(3),true)
call SetPlayerAlliance(udg_players04[x],udg_players04[y],ConvertAllianceType(4),true)
call SetPlayerAlliance(udg_players04[x],udg_players04[y],ConvertAllianceType(5),true)
call SetPlayerAlliance(udg_players04[x],udg_players04[y],ConvertAllianceType(6),false)
call SetPlayerAlliance(udg_players04[x],udg_players04[y],ConvertAllianceType(7),false)
call SetPlayerAlliance(udg_players03[x],udg_players04[y],ConvertAllianceType(0),false)
call SetPlayerAlliance(udg_players03[x],udg_players04[y],ConvertAllianceType(1),false)
call SetPlayerAlliance(udg_players03[x],udg_players04[y],ConvertAllianceType(2),false)
call SetPlayerAlliance(udg_players03[x],udg_players04[y],ConvertAllianceType(3),false)
call SetPlayerAlliance(udg_players03[x],udg_players04[y],ConvertAllianceType(4),false)
call SetPlayerAlliance(udg_players03[x],udg_players04[y],ConvertAllianceType(5),false)
call SetPlayerAlliance(udg_players03[x],udg_players04[y],ConvertAllianceType(6),false)
call SetPlayerAlliance(udg_players03[x],udg_players04[y],ConvertAllianceType(7),false)
call SetPlayerAlliance(udg_players04[x],udg_players03[y],ConvertAllianceType(0),false)
call SetPlayerAlliance(udg_players04[x],udg_players03[y],ConvertAllianceType(1),false)
call SetPlayerAlliance(udg_players04[x],udg_players03[y],ConvertAllianceType(2),false)
call SetPlayerAlliance(udg_players04[x],udg_players03[y],ConvertAllianceType(3),false)
call SetPlayerAlliance(udg_players04[x],udg_players03[y],ConvertAllianceType(4),false)
call SetPlayerAlliance(udg_players04[x],udg_players03[y],ConvertAllianceType(5),false)
call SetPlayerAlliance(udg_players04[x],udg_players03[y],ConvertAllianceType(6),false)
call SetPlayerAlliance(udg_players04[x],udg_players03[y],ConvertAllianceType(7),false)
endif
set y=y+1
endloop
set y=0
set x=x+1
endloop
call SetPlayerTeam(udg_players03[0],0)
call SetPlayerTeam(udg_players03[1],0)
call SetPlayerTeam(udg_players03[2],0)
call SetPlayerTeam(udg_players03[3],0)
call SetPlayerTeam(udg_players03[4],0)
call SetPlayerTeam(udg_players03[5],0)
call SetPlayerTeam(udg_players04[0],1)
call SetPlayerTeam(udg_players04[1],1)
call SetPlayerTeam(udg_players04[2],1)
call SetPlayerTeam(udg_players04[3],1)
call SetPlayerTeam(udg_players04[4],1)
call SetPlayerTeam(udg_players04[5],1)
call SetPlayerName(udg_players03[0],"The Sentinel")
call SetPlayerName(udg_players04[0],"The Scourge")
call SetPlayerName(udg_player01,"Neutral Creeps")
call SetUnitOwner(udg_unit93,udg_players03[1],false)
call SetUnitOwner(udg_unit94,udg_players03[2],false)
call SetUnitOwner(udg_unit95,udg_players03[3],false)
call SetUnitOwner(udg_unit96,udg_players03[4],false)
call SetUnitOwner(udg_unit97,udg_players03[5],false)
call SetUnitOwner(udg_unit98,udg_players04[1],false)
call SetUnitOwner(udg_unit99,udg_players04[2],false)
call SetUnitOwner(udg_unit100,udg_players04[3],false)
call SetUnitOwner(udg_unit101,udg_players04[4],false)
call SetUnitOwner(udg_unit102,udg_players04[5],false)
if(udg_players03[0]!=Player(0)or udg_players04[0]!=Player(6))then
call OI1II0()
endif
call OI10I0()
set O1OO00=IIIO1O(udg_force01)
set O1OOO0=IIIO1O(udg_force02)
set IIII0O=1
set IIIIIO=5
loop
exitwhen IIII0O>IIIIIO
if(II010O(udg_players03[IIII0O]))then
call SetPlayerState(udg_players03[IIII0O],PLAYER_STATE_RESOURCE_GOLD,(3500/O1OO00))
call SetPlayerState(udg_players03[IIII0O],PLAYER_STATE_RESOURCE_LUMBER,0)
endif
if(II010O(udg_players04[IIII0O]))then
call SetPlayerState(udg_players04[IIII0O],PLAYER_STATE_RESOURCE_GOLD,(3500/O1OOO0))
call SetPlayerState(udg_players04[IIII0O],PLAYER_STATE_RESOURCE_LUMBER,0)
endif
set IIII0O=IIII0O+1
endloop
call SetPlayerHandicapXP(udg_players03[1],1)
call SetPlayerHandicapXP(udg_players03[2],1)
call SetPlayerHandicapXP(udg_players03[3],1)
call SetPlayerHandicapXP(udg_players03[4],1)
call SetPlayerHandicapXP(udg_players03[5],1)
call SetPlayerHandicapXP(udg_players04[1],1)
call SetPlayerHandicapXP(udg_players04[2],1)
call SetPlayerHandicapXP(udg_players04[3],1)
call SetPlayerHandicapXP(udg_players04[4],1)
call SetPlayerHandicapXP(udg_players04[5],1)
call SetPlayerState(udg_players03[0],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_players03[1],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_players03[2],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_players03[3],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_players03[4],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_players03[5],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_players04[0],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_players04[1],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_players04[2],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_players04[3],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_players04[4],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_players04[5],PLAYER_STATE_GIVES_BOUNTY,1)
call OI1000()
set udg_integers27[GetPlayerId(udg_players03[1])]=0
set udg_integers28[GetPlayerId(udg_players03[1])]=66
set udg_integers29[GetPlayerId(udg_players03[1])]=255
set udg_integers27[GetPlayerId(udg_players03[2])]=48
set udg_integers28[GetPlayerId(udg_players03[2])]=230
set udg_integers29[GetPlayerId(udg_players03[2])]=185
set udg_integers27[GetPlayerId(udg_players03[3])]=50
set udg_integers28[GetPlayerId(udg_players03[3])]=0
set udg_integers29[GetPlayerId(udg_players03[3])]=129
set udg_integers27[GetPlayerId(udg_players03[4])]=255
set udg_integers28[GetPlayerId(udg_players03[4])]=252
set udg_integers29[GetPlayerId(udg_players03[4])]=1
set udg_integers27[GetPlayerId(udg_players03[5])]=255
set udg_integers28[GetPlayerId(udg_players03[5])]=50
set udg_integers29[GetPlayerId(udg_players03[5])]=0
set udg_integers27[GetPlayerId(udg_players04[1])]=220
set udg_integers28[GetPlayerId(udg_players04[1])]=50
set udg_integers29[GetPlayerId(udg_players04[1])]=50
set udg_integers27[GetPlayerId(udg_players04[2])]=50
set udg_integers28[GetPlayerId(udg_players04[2])]=50
set udg_integers29[GetPlayerId(udg_players04[2])]=50
set udg_integers27[GetPlayerId(udg_players04[3])]=75
set udg_integers28[GetPlayerId(udg_players04[3])]=150
set udg_integers29[GetPlayerId(udg_players04[3])]=190
set udg_integers27[GetPlayerId(udg_players04[4])]=16
set udg_integers28[GetPlayerId(udg_players04[4])]=60
set udg_integers29[GetPlayerId(udg_players04[4])]=18
set udg_integers27[GetPlayerId(udg_players04[5])]=68
set udg_integers28[GetPlayerId(udg_players04[5])]=42
set udg_integers29[GetPlayerId(udg_players04[5])]=4
call OI1I10(udg_players03[1])
call OI1I10(udg_players03[2])
call OI1I10(udg_players03[3])
call OI1I10(udg_players03[4])
call OI1I10(udg_players03[5])
call OI1I10(udg_players04[1])
call OI1I10(udg_players04[2])
call OI1I10(udg_players04[3])
call OI1I10(udg_players04[4])
call OI1I10(udg_players04[5])
set i=0
loop
set udg_strings05[i]=GetPlayerName(Player(i))
set i=i+1
exitwhen i==16
endloop
endfunction
function O1OOI0 takes nothing returns nothing
set udg_integer21=1
set udg_integers30[1]=1215723364
set udg_strings06[1]="Vengeful Spirit"
set udg_strings07[1]="ReplaceableTextures\\CommandButtons\\BTNAvengingWatcher.blp"
call I110OO(udg_integers30[1],"stand 4")
call I11OOO(udg_integers30[1],1.35)
set udg_integers30[2]=1215128178
set udg_strings06[2]="Zeus"
set udg_strings07[2]="ReplaceableTextures\\CommandButtons\\BTNAvatar.blp"
call I110OO(udg_integers30[2],"attack slam alternate")
call I11OOO(udg_integers30[2],1.3)
set udg_integers30[3]=1164799855
set udg_strings06[3]="Enchantress"
set udg_strings07[3]="ReplaceableTextures\\CommandButtons\\BTNDryad.blp"
call I110OO(udg_integers30[3],"stand 4")
call I11OOO(udg_integers30[3],1)
set udg_integers30[4]=1328558160
set udg_strings06[4]="Morphling"
set udg_strings07[4]="ReplaceableTextures\\CommandButtons\\BTNSeaElemental.blp"
call I110OO(udg_integers30[4],"stand 2")
call I11OOO(udg_integers30[4],1)
set udg_integers30[5]=1214931305
set udg_strings06[5]="Rylai"
set udg_strings07[5]="ReplaceableTextures\\CommandButtons\\BTNJaina.blp"
call I110OO(udg_integers30[5],"stand victory")
call I11OOO(udg_integers30[5],1)
set udg_integers30[6]=1211117617
set udg_strings06[6]="Sven"
set udg_strings07[6]="ReplaceableTextures\\CommandButtons\\BTNFelGuardBlue.tga"
call I110OO(udg_integers30[6],"spell")
call I11OOO(udg_integers30[6],1)
set udg_integers30[7]=1212363833
set udg_strings06[7]="Slithice"
set udg_strings07[7]="ReplaceableTextures\\CommandButtons\\BTNSeaWitch.blp"
call I110OO(udg_integers30[7],"spell")
call I11OOO(udg_integers30[7],1)
set udg_integers30[8]=1333027688
set udg_strings06[8]="Earthshaker"
set udg_strings07[8]="ReplaceableTextures\\CommandButtons\\BTNTauren.blp"
call I110OO(udg_integers30[8],"attack slam")
call I11OOO(udg_integers30[8],1.1)
set udg_integers30[9]=1212365106
set udg_strings06[9]="Rikimaru"
set udg_strings07[9]="ReplaceableTextures\\CommandButtons\\BTNSatyrTrickster.blp"
call I110OO(udg_integers30[9],"stand 4")
call I11OOO(udg_integers30[9],1)
set udg_integers30[10]=1311781199
set udg_strings06[10]="Syllabear"
set udg_strings07[10]="ReplaceableTextures\\CommandButtons\\BTNDruidOfTheClaw.blp"
call I110OO(udg_integers30[10],"spell slam")
call I11OOO(udg_integers30[10],1)
call I11OOO(1848652083,1.1)
call I11OOO(1848652084,1.2)
call I11OOO(1848652085,1.3)
call I11OOO(1848651828,1)
call I11OOO(1848652088,1.1)
call I11OOO(1848652099,1.2)
call I11OOO(1848652103,1.3)
set udg_integers30[11]=1211117620
set udg_strings06[11]="Lina"
set udg_strings07[11]="ReplaceableTextures\\CommandButtons\\BTNSorceress.blp"
call I110OO(udg_integers30[11],"stand victory")
call I11OOO(udg_integers30[11],1.2)
set udg_integers30[12]=1315070563
set udg_strings06[12]="Yurnero"
set udg_strings07[12]="ReplaceableTextures\\CommandButtons\\BTNChaosBlademaster.blp"
call I110OO(udg_integers30[12],"stand victory")
call I11OOO(udg_integers30[12],1)
set udg_integers30[13]=1311781185
set udg_strings06[13]="Nortrom"
set udg_strings07[13]="ReplaceableTextures\\CommandButtons\\BTNSpellBreaker.blp"
call I110OO(udg_integers30[13],"stand ready")
call I11OOO(udg_integers30[13],1)
set udg_integers30[14]=1214344551
set udg_strings06[14]="Rooftrellen"
set udg_strings07[14]="ReplaceableTextures\\CommandButtons\\BTNTreant.blp"
call I110OO(udg_integers30[14],"stand 3")
call I11OOO(udg_integers30[14],0.72)
set udg_integers30[15]=1433105516
set udg_strings06[15]="Enigma"
set udg_strings07[15]="ReplaceableTextures\\CommandButtons\\BTNSpell_Shadow_SummonVoidWalker.blp"
call I110OO(udg_integers30[15],"stand")
call I11OOO(udg_integers30[15],1.5)
set udg_integers30[16]=1214409837
set udg_strings06[16]="Ezalor"
set udg_strings07[16]="ReplaceableTextures\\CommandButtons\\BTNGhostMage.blp"
call I110OO(udg_integers30[16],"stand victory")
call I11OOO(udg_integers30[16],1.2)
set udg_integers30[17]=1215657064
set udg_strings06[17]="Ursa"
set udg_strings07[17]="ReplaceableTextures\\CommandButtons\\BTNFurbolgTracker.blp"
call I110OO(udg_integers30[17],"attack spell")
call I11OOO(udg_integers30[17],1.2)
set udg_integers30[18]=1215130471
set udg_strings06[18]="Ogre Magi"
set udg_strings07[18]="ReplaceableTextures\\CommandButtons\\BTNOgreMagi.blp"
call I110OO(udg_integers30[18],"sleep")
call I11OOO(udg_integers30[18],1.4)
set udg_integers30[19]=1316252014
set udg_strings06[19]="Tinker"
set udg_strings07[19]="ReplaceableTextures\\CommandButtons\\BTNHeroTinker.blp"
call I110OO(udg_integers30[19],"stand 2")
call I11OOO(udg_integers30[19],1)
set udg_integers30[20]=1164799603
set udg_strings06[20]="Furion"
set udg_strings07[20]="ReplaceableTextures\\CommandButtons\\BTNFurion.blp"
call I110OO(udg_integers30[20],"spell")
call I11OOO(udg_integers30[20],1.2)
set udg_integers30[21]=1332179560
set udg_strings06[21]="Phantom Lancer"
set udg_strings07[21]="ReplaceableTextures\\CommandButtons\\BTNHellScream.blp"
call I110OO(udg_integers30[21],"stand victory")
call I11OOO(udg_integers30[21],1)
set udg_integers30[22]=1432580716
set udg_strings06[22]="Tiny"
set udg_strings07[22]="ReplaceableTextures\\CommandButtons\\BTNMountainGiant.blp"
call I110OO(udg_integers30[22],"spell")
call I11OOO(udg_integers30[22],0.5)
set udg_integers30[23]=1211117643
set udg_strings06[23]="Techies"
set udg_strings07[23]="ReplaceableTextures\\CommandButtons\\BTNGoblinSapper.blp"
call I110OO(udg_integers30[23],"stand 2")
call I11OOO(udg_integers30[23],1)
set udg_integers30[24]=1211117633
set udg_strings06[24]="Chen"
set udg_strings07[24]="ReplaceableTextures\\CommandButtons\\BTNHeroFarseer.blp"
call I110OO(udg_integers30[24],"spell chain lightning")
call I11OOO(udg_integers30[24],1)
set udg_integers30[25]=1160785973
set udg_strings06[25]="Luna"
set udg_strings07[25]="ReplaceableTextures\\CommandButtons\\BTNHuntress.blp"
call I110OO(udg_integers30[25],"spell")
call I11OOO(udg_integers30[25],1)
set udg_integers30[26]=1433631084
set udg_strings06[26]="Sniper"
set udg_strings07[26]="ReplaceableTextures\\CommandButtons\\BTNRifleman.blp"
call I110OO(udg_integers30[26],"spell")
call I11OOO(udg_integers30[26],1.1)
set udg_integers30[27]=1311781174
set udg_strings06[27]="Troll"
set udg_strings07[27]="ReplaceableTextures\\CommandButtons\\BTNForestTroll.blp"
call I110OO(udg_integers30[27],"stand 3")
call I11OOO(udg_integers30[27],1.25)
call I11OOO(1311781442,1.25)
call I11OOO(1311781175,1.25)
set udg_integers30[28]=1332898670
set udg_strings06[28]="Rhasta"
set udg_strings07[28]="ReplaceableTextures\\CommandButtons\\BTNShadowHunter.blp"
call I110OO(udg_integers30[28],"stand victory")
call I11OOO(udg_integers30[28],1)
set udg_integers30[29]=1211117624
set udg_strings06[29]="Bristleback"
set udg_strings07[29]="ReplaceableTextures\\CommandButtons\\BTNRazorManeChief.blp"
call I110OO(udg_integers30[29],"stand")
call I11OOO(udg_integers30[29],1.5)
set udg_integers30[30]=1315988077
set udg_strings06[30]="Panda"
set udg_strings07[30]="ReplaceableTextures\\CommandButtons\\BTNPandarenBrewmaster.blp"
call I110OO(udg_integers30[30],"stand ready")
call I11OOO(udg_integers30[30],1)
set udg_integers30[31]=1211117616
set udg_strings06[31]="Centaur"
set udg_strings07[31]="ReplaceableTextures\\CommandButtons\\BTNCentaurKhan.blp"
call I110OO(udg_integers30[31],"stand 3")
call I11OOO(udg_integers30[31],1.75)
set udg_integers30[32]=1315007329
set udg_strings06[32]="Gondar"
set udg_strings07[32]="ReplaceableTextures\\CommandButtons\\BTNakama.blp"
call I110OO(udg_integers30[32],"stand var4")
call I11OOO(udg_integers30[32],1.2)
set udg_integers30[33]=1215063922
set udg_strings06[33]="Knight Davion"
set udg_strings07[33]="ReplaceableTextures\\CommandButtons\\BTNTheCaptain.blp"
call I110OO(udg_integers30[33],"stand victory")
call I11OOO(udg_integers30[33],1.35)
call I11OOO(1211117638,1)
call I11OOO(1211117639,1)
call I11OOO(1211117637,1)
set udg_integers30[34]=1164207469
set udg_strings06[34]="Magina"
set udg_strings07[34]="ReplaceableTextures\\CommandButtons\\BTNHeroDemonHunter.blp"
call I110OO(udg_integers30[34],"stand channel")
call I11OOO(udg_integers30[34],1)
set udg_integers30[35]=1315074670
set udg_strings06[35]="Traxex"
set udg_strings07[35]="ReplaceableTextures\\CommandButtons\\BTNBansheeRanger.tga"
call I110OO(udg_integers30[35],"spell")
call I11OOO(udg_integers30[35],1)
set udg_integers30[36]=1214345830
set udg_strings06[36]="Omniknight"
set udg_strings07[36]="ReplaceableTextures\\CommandButtons\\BTNArthas.blp"
call I110OO(udg_integers30[36],"stand victory")
call I11OOO(udg_integers30[36],1.1)
set udg_integers30[37]=1211117636
set udg_strings06[37]="Rexxar"
set udg_strings07[37]="ReplaceableTextures\\CommandButtons\\BTNBeastMaster.blp"
call I110OO(udg_integers30[37],"spell slam")
call I11OOO(udg_integers30[37],1)
set udg_integers30[38]=1160786000
set udg_strings06[38]="Jakiro"
set udg_strings07[38]="ReplaceableTextures\\CommandButtons\\BTNChimaera.blp"
call I110OO(udg_integers30[38],"stand 3")
call I11OOO(udg_integers30[38],1)
set udg_integers30[39]=1311781193
set udg_strings06[39]="Alchemist"
set udg_strings07[39]="ReplaceableTextures\\CommandButtons\\BTNHeroAlchemist.blp"
call I110OO(udg_integers30[39],"stand 2")
call I11OOO(udg_integers30[39],1)
call I11OOO(1311781194,1)
call I11OOO(1311781192,1)
call I11OOO(1311781204,1)
set udg_integers30[40]=1311781206
set udg_strings06[40]="Mirana"
set udg_strings07[40]="ReplaceableTextures\\CommandButtons\\BTNPriestessOfTheMoon.blp"
call I110OO(udg_integers30[40],"stand ready")
call I11OOO(udg_integers30[40],1)
set udg_integers30[41]=1211117651
set udg_strings06[41]="Storm"
set udg_strings07[41]="ReplaceableTextures\\CommandButtons\\BTNStorm.blp"
call I110OO(udg_integers30[41],"spell")
call I11OOO(udg_integers30[41],1)
set udg_integers30[42]=1211117649
set udg_strings06[42]="Huskar"
set udg_strings07[42]="ReplaceableTextures\\CommandButtons\\BTNHeadHunterBerserker.blp"
call I110OO(udg_integers30[42],"stand alternate 3")
call I11OOO(udg_integers30[42],1.15)
set udg_integers30[43]=1160786265
set udg_strings06[43]="Lanaya"
set udg_strings07[43]="ReplaceableTextures\\CommandButtons\\BTNAssassin.blp"
call I110OO(udg_integers30[43],"stand victory")
call I11OOO(udg_integers30[43],1.2)
set udg_integers30[44]=1311780930
set udg_strings06[44]="Puck"
set udg_strings07[44]="ReplaceableTextures\\CommandButtons\\BTNFaerieDragon.blp"
call I110OO(udg_integers30[43],"attack spell")
call I11OOO(udg_integers30[43],1.1)
set udg_integer22=44
set udg_integer23=49
set udg_integers30[49]=1164277353
set udg_strings06[49]="Terrorblade"
set udg_strings07[49]="ReplaceableTextures\\CommandButtons\\BTNEvilIllidan.blp"
call I110OO(udg_integers30[49],"spell channel")
call I11OOO(udg_integers30[49],1)
call I11OOO(1164277357,1)
set udg_integers30[50]=1164666213
set udg_strings06[50]="Leshrac"
set udg_strings07[50]="ReplaceableTextures\\CommandButtons\\BTNKeeperGhostBlue.blp"
call I110OO(udg_integers30[50],"stand victory")
call I11OOO(udg_integers30[50],1)
set udg_integers30[51]=1433168227
set udg_strings06[51]="Lich"
set udg_strings07[51]="ReplaceableTextures\\CommandButtons\\BTNLichVersion2.blp"
call I110OO(udg_integers30[51],"stand channel")
call I11OOO(udg_integers30[51],1.3)
set udg_integers30[52]=1430468406
set udg_strings06[52]="Krobelus"
set udg_strings07[52]="ReplaceableTextures\\CommandButtons\\BTNBanshee.blp"
call I110OO(udg_integers30[52],"spell wail")
call I11OOO(udg_integers30[52],1.35)
set udg_integers30[53]=1430466872
set udg_strings06[53]="Lion"
set udg_strings07[53]="ReplaceableTextures\\CommandButtons\\BTNLion.BLP"
call I110OO(udg_integers30[53],"spell callstorm")
call I11OOO(udg_integers30[53],1.3)
set udg_integers30[54]=1162032439
set udg_strings06[54]="Venomancer"
set udg_strings07[54]="ReplaceableTextures\\CommandButtons\\BTNHydralisk.blp"
call I110OO(udg_integers30[54],"attack")
call I11OOO(udg_integers30[54],1.0)
set udg_integers30[55]=1430466865
set udg_strings06[55]="Magnus"
set udg_strings07[55]="ReplaceableTextures\\CommandButtons\\BTNBlueMagnataur.tga"
call I110OO(udg_integers30[55],"stand channel")
call I11OOO(udg_integers30[55],1)
set udg_integers30[56]=1430468144
set udg_strings06[56]="Visage"
set udg_strings07[56]="ReplaceableTextures\\CommandButtons\\BTNSpiritWyvern.blp"
call I110OO(udg_integers30[56],"stand victory")
call I11OOO(udg_integers30[56],1)
set udg_integers30[57]=1429221441
set udg_strings06[57]="Nessaj"
set udg_strings07[57]="ReplaceableTextures\\CommandButtons\\BTNChaosWarlord.blp"
call I110OO(udg_integers30[57],"stand victory")
call I11OOO(udg_integers30[57],1.05)
set udg_integers30[58]=1429221432
set udg_strings06[58]="Lycan"
set udg_strings07[58]="ReplaceableTextures\\CommandButtons\\BTNKiljaedin.blp"
call I110OO(udg_integers30[58],"spell")
call I11OOO(udg_integers30[58],1.2)
call I11OOO(1160786229,1)
set udg_integers30[59]=1429221430
set udg_strings06[59]="Broodmother"
set udg_strings07[59]="ReplaceableTextures\\CommandButtons\\BTNSpiderBlack.blp"
call I110OO(udg_integers30[59],"walk")
call I11OOO(udg_integers30[59],1.36)
set udg_integers30[60]=1165451634
set udg_strings06[60]="Mortred"
set udg_strings07[60]="ReplaceableTextures\\CommandButtons\\BTNHeroWarden.blp"
call I110OO(udg_integers30[60],"spell slam")
call I11OOO(udg_integers30[60],1)
set udg_integers30[61]=1211117654
set udg_strings06[61]="Medusa"
set udg_strings07[61]="ReplaceableTextures\\CommandButtons\\BTNNagaSeaWitch.blp"
call I110OO(udg_integers30[61],"stand ready")
call I11OOO(udg_integers30[61],1)
set udg_integers30[62]=1432646245
set udg_strings06[62]="Balanar"
set udg_strings07[62]="ReplaceableTextures\\CommandButtons\\BTNTichondrius.blp"
call I110OO(udg_integers30[62],"spell slam")
call I11OOO(udg_integers30[62],1)
set udg_integers30[63]=1313026096
set udg_strings06[63]="Leoric"
set udg_strings07[63]="ReplaceableTextures\\CommandButtons\\BTNSkeletonArcher.tga"
call I110OO(udg_integers30[63],"stand victory")
call I11OOO(udg_integers30[63],1.8)
set udg_integers30[64]=1430467634
set udg_strings06[64]="Lucifer"
set udg_strings07[64]="ReplaceableTextures\\CommandButtons\\BTNDoomGuard.blp"
call I110OO(udg_integers30[64],"stand victory")
call I11OOO(udg_integers30[64],1.1)
set udg_integers30[65]=1429221424
set udg_strings06[65]="Nerubian Assassin"
set udg_strings07[65]="ReplaceableTextures\\CommandButtons\\BTNHeroCryptLord.tga"
call I110OO(udg_integers30[65],"spell throw")
call I11OOO(udg_integers30[65],0.8)
set udg_integers30[66]=1430468913
set udg_strings06[66]="Slardar"
set udg_strings07[66]="ReplaceableTextures\\CommandButtons\\BTNNagaMyrmidon.tga"
call I110OO(udg_integers30[66],"spell")
call I11OOO(udg_integers30[66],1)
set udg_integers30[67]=1430466609
set udg_strings06[67]="Akasha"
set udg_strings07[67]="ReplaceableTextures\\CommandButtons\\BTNBlueDemoness.tga"
call I110OO(udg_integers30[67],"spell slam")
call I11OOO(udg_integers30[67],1.3)
set udg_integers30[68]=1160785972
set udg_strings06[68]="Clinkz"
set udg_strings07[68]="ReplaceableTextures\\CommandButtons\\BTNSkeletonMage.blp"
call I110OO(udg_integers30[68],"stand victory")
call I11OOO(udg_integers30[68],1)
set udg_integers30[69]=1162032181
set udg_strings06[69]="Void"
set udg_strings07[69]="ReplaceableTextures\\CommandButtons\\BTNFacelessOne.blp"
call I110OO(udg_integers30[69],"spell slam")
call I11OOO(udg_integers30[69],1.3)
set udg_integers30[70]=1162032951
set udg_strings06[70]="Viper"
set udg_strings07[70]="ReplaceableTextures\\CommandButtons\\BTNNetherDragon.blp"
call I110OO(udg_integers30[70],"spell slam")
call I11OOO(udg_integers30[70],1.2)
set udg_integers30[71]=1160785970
set udg_strings06[71]="Razor"
set udg_strings07[71]="ReplaceableTextures\\CommandButtons\\BTNRevenant.blp"
call I110OO(udg_integers30[71],"spell")
call I11OOO(udg_integers30[71],1)
set udg_integers30[72]=1429221443
set udg_strings06[72]="N'aix"
set udg_strings07[72]="ReplaceableTextures\\CommandButtons\\BTNGhoul.blp"
call I110OO(udg_integers30[72],"victory")
call I11OOO(udg_integers30[72],1.5)
set udg_integers30[73]=1211117640
set udg_strings06[73]="Pugna"
set udg_strings07[73]="ReplaceableTextures\\CommandButtons\\BTNPugna.BLP"
call I110OO(udg_integers30[73],"stand ready")
call I11OOO(udg_integers30[73],1)
set udg_integers30[74]=1332109682
set udg_strings06[74]="Tidehunter"
set udg_strings07[74]="ReplaceableTextures\\CommandButtons\\BTNSeaGiantGreen.blp"
call I110OO(udg_integers30[74],"attack slam")
call I11OOO(udg_integers30[74],1)
set udg_integers30[75]=1332963428
set udg_strings06[75]="Atropos"
set udg_strings07[75]="ReplaceableTextures\\CommandButtons\\BTNVoidWalker.blp"
call I110OO(udg_integers30[75],"spell")
call I11OOO(udg_integers30[75],1.5)
set udg_integers30[76]=1429221445
set udg_strings06[76]="Necrolyte"
set udg_strings07[76]="ReplaceableTextures\\CommandButtons\\BTNGhostOfKelThuzad.blp"
call I110OO(udg_integers30[76],"stand victory")
call I11OOO(udg_integers30[76],1.3)
set udg_integers30[77]=1429221446
set udg_strings06[77]="Pudge"
set udg_strings07[77]="ReplaceableTextures\\CommandButtons\\BTNAbomination.blp"
call I110OO(udg_integers30[77],"stand 3")
call I11OOO(udg_integers30[77],1.1)
set udg_integers30[78]=1328558154
set udg_strings06[78]="Barathrum"
set udg_strings07[78]="ReplaceableTextures\\CommandButtons\\BTNSpiritWalker.blp"
call I110OO(udg_integers30[78],"stand ready")
call I11OOO(udg_integers30[78],1.2)
set udg_integers30[79]=1432510828
set udg_strings06[79]="Weaver"
set udg_strings07[79]="ReplaceableTextures\\CommandButtons\\BTNNerubianQueen.blp"
call I110OO(udg_integers30[79],"attack")
call I11OOO(udg_integers30[79],1.0)
set udg_integers30[80]=1315334514
set udg_strings06[80]="Nevermore"
set udg_strings07[80]="ReplaceableTextures\\CommandButtons\\BTNShade.blp"
call I110OO(udg_integers30[80],"stand channel")
call I11OOO(udg_integers30[80],1.15)
set udg_integers30[81]=1429221451
set udg_strings06[81]="Crixalis"
set udg_strings07[81]="ReplaceableTextures\\CommandButtons\\BTNArachnathidGreen.blp"
call I110OO(udg_integers30[81],"attack 3")
call I11OOO(udg_integers30[81],1)
set udg_integers30[82]=1332766568
set udg_strings06[82]="Axe"
set udg_strings07[82]="ReplaceableTextures\\CommandButtons\\BTNChaosGrom.blp"
call I110OO(udg_integers30[82],"stand victory")
call I11OOO(udg_integers30[82],1)
set udg_integers30[83]=1215722344
set udg_strings06[83]="Strygwyr"
set udg_strings07[83]="ReplaceableTextures\\CommandButtons\\BTNShaman.blp"
call I110OO(udg_integers30[83],"stand victory")
call I11OOO(udg_integers30[83],1.25)
set udg_integers30[84]=1432642913
set udg_strings06[84]="Abaddon"
set udg_strings07[84]="ReplaceableTextures\\CommandButtons\\BTNHeroDeathKnight.blp"
call I110OO(udg_integers30[84],"stand ready")
call I11OOO(udg_integers30[84],1)
set udg_integers30[85]=1160786242
set udg_strings06[85]="Spectre"
set udg_strings07[85]="ReplaceableTextures\\CommandButtons\\BTNvengeanceincarnate.blp"
call I110OO(udg_integers30[85],"stand ready")
call I11OOO(udg_integers30[85],0.8)
set udg_integers30[86]=1160786241
set udg_strings06[86]="Witch Doctor"
set udg_strings07[86]="ReplaceableTextures\\CommandButtons\\BTNWitchDoctor.blp"
call I110OO(udg_integers30[86],"stand victory")
call I11OOO(udg_integers30[86],1.25)
set udg_integers30[87]=1429221456
set udg_strings06[87]="Destroyer"
set udg_strings07[87]="ReplaceableTextures\\CommandButtons\\BTNDestroyer.blp"
call I110OO(udg_integers30[87],"stand alternate 2")
call I11OOO(udg_integers30[87],0.85)
set udg_integers30[88]=1160786243
set udg_strings06[88]="Warlock"
set udg_strings07[88]="ReplaceableTextures\\CommandButtons\\BTNGuldan.blp"
call I110OO(udg_integers30[88],"spell")
call I11OOO(udg_integers30[88],1.5)
set udg_integers30[89]=1211117641
set udg_strings06[89]="Geomancer"
set udg_strings07[89]="ReplaceableTextures\\CommandButtons\\BTNKoboldGeomancer.blp"
call I110OO(udg_integers30[89],"spell")
call I11OOO(udg_integers30[89],1.4)
call I11OOO(1211117642,1.4)
set udg_integers30[90]=1311781207
set udg_strings06[90]="Dazzle"
set udg_strings07[90]="ReplaceableTextures\\CommandButtons\\BTNDarkTrollShadowPriest.blp"
call I110OO(udg_integers30[90],"spell")
call I11OOO(udg_integers30[90],1.2)
set udg_integers30[91]=1311780946
set udg_strings06[91]="Pit Lord"
set udg_strings07[91]="ReplaceableTextures\\CommandButtons\\BTNPitLord.blp"
call I110OO(udg_integers30[91],"stand channel")
call I11OOO(udg_integers30[91],1)
set udg_integers30[92]=1211117650
set udg_strings06[92]="Undying"
set udg_strings07[92]="ReplaceableTextures\\CommandButtons\\BTNZombie.blp"
call I110OO(udg_integers30[92],"stand")
call I11OOO(udg_integers30[92],2)
set udg_integers30[93]=1211117646
set udg_strings06[93]="Dark Seer"
set udg_strings07[93]="ReplaceableTextures\\CommandButtons\\BTNDranaiMage.blp"
call I110OO(udg_integers30[93],"spell")
call I11OOO(udg_integers30[93],1.15)
set udg_integer24=93
set udg_integers31[1]=1315074670
set udg_integers31[2]=1164207469
set udg_integers31[3]=1311781174
set udg_integers31[4]=1315070563
set udg_integers31[5]=1315007329
set udg_integers31[6]=1328558160
set udg_integers31[7]=1433631084
set udg_integers31[8]=1160785973
set udg_integers31[9]=1311781199
set udg_integers31[10]=1212365106
set udg_integers31[11]=1215723364
set udg_integers31[12]=1212363833
set udg_integers31[13]=1215657064
set udg_integers31[14]=1332179560
set udg_integers31[15]=1429221430
set udg_integers31[16]=1162032439
set udg_integers31[17]=1164277353
set udg_integers31[18]=1432510828
set udg_integers31[19]=1160785972
set udg_integers31[20]=1162032951
set udg_integers31[21]=1215722344
set udg_integers31[22]=1315334514
set udg_integers31[23]=1160785970
set udg_integers31[24]=1162032181
set udg_integers31[25]=1165451634
set udg_integers31[26]=1429221424
set udg_integers31[27]=1211117654
set udg_integers31[28]=1160786242
set udg_integers31[29]=1311781206
set udg_integers31[30]=1211117641
set udg_integers31[31]=1160786265
set udg_integer25=31
set udg_integers32[1]=1315988077
set udg_integers32[2]=1215063922
set udg_integers32[3]=1214345830
set udg_integers32[4]=1211117616
set udg_integers32[5]=1211117617
set udg_integers32[6]=1214344551
set udg_integers32[7]=1211117624
set udg_integers32[8]=1432580716
set udg_integers32[9]=1333027688
set udg_integers32[10]=1313026096
set udg_integers32[11]=1432646245
set udg_integers32[12]=1430466865
set udg_integers32[13]=1332109682
set udg_integers32[14]=1429221446
set udg_integers32[15]=1429221451
set udg_integers32[16]=1328558154
set udg_integers32[17]=1432642913
set udg_integers32[18]=1332766568
set udg_integers32[19]=1429221441
set udg_integers32[20]=1429221443
set udg_integers32[21]=1430468913
set udg_integers32[22]=1430467634
set udg_integers32[23]=1429221432
set udg_integers32[24]=1211117636
set udg_integers32[25]=1311781193
set udg_integers32[26]=1211117649
set udg_integers32[27]=1311780946
set udg_integer26=27
set udg_integers33[1]=1332898670
set udg_integers33[2]=1164799855
set udg_integers33[3]=1164799603
set udg_integers33[4]=1211117620
set udg_integers33[5]=1214931305
set udg_integers33[6]=1433105516
set udg_integers33[7]=1215128178
set udg_integers33[8]=1211117643
set udg_integers33[9]=1316252014
set udg_integers33[10]=1215130471
set udg_integers33[11]=1214409837
set udg_integers33[12]=1311781185
set udg_integers33[13]=1211117633
set udg_integers33[14]=1433168227
set udg_integers33[15]=1164666213
set udg_integers33[16]=1430468406
set udg_integers33[17]=1430466872
set udg_integers33[18]=1430466609
set udg_integers33[19]=1430468144
set udg_integers33[20]=1211117640
set udg_integers33[21]=1332963428
set udg_integers33[22]=1429221445
set udg_integers33[23]=1160786241
set udg_integers33[24]=1429221456
set udg_integers33[25]=1160786000
set udg_integers33[26]=1160786243
set udg_integers33[27]=1311781207
set udg_integers33[28]=1211117646
set udg_integers33[29]=1211117650
set udg_integers33[30]=1211117651
set udg_integers33[31]=1311780930
set udg_integer27=31
call II1O1O()
endfunction
function O1OO10 takes nothing returns nothing
call I110OO(1702061422,"stand 4")
call I110OO(1697656918,"stand 4")
call I110OO(1701081721,"spell")
call I110OO(1697656919,"spell")
call I110OO(1969711215,"stand victory")
call I110OO(1966092337,"stand victory")
call I110OO(1970169187,"stand channel")
call I110OO(1966092338,"stand channel")
call I11OOO(1848651853,0.4)
endfunction
function O1O0O0 takes integer ID returns unit
if ID<=11 then
return udg_unit103
elseif ID<=22 then
return udg_unit104
elseif ID<=33 then
return udg_unit105
elseif ID<=44 then
return udg_unit106
elseif ID<=59 then
return udg_unit107
elseif ID<=70 then
return udg_unit108
elseif ID<=81 then
return udg_unit109
elseif ID<=92 then
return udg_unit110
endif
return null
endfunction
function Tavern_RemoveAllHeroes takes nothing returns nothing
local integer i=udg_integer21
loop
exitwhen i>udg_integer22
call RemoveUnitFromStock(O1O0O0(i),udg_integers30[i])
set i=i+1
endloop
set i=udg_integer23
loop
exitwhen i>udg_integer24
call RemoveUnitFromStock(O1O0O0(i),udg_integers30[i])
set i=i+1
endloop
endfunction
function Tavern_AddAllHeroes takes nothing returns nothing
local integer i=udg_integer21
loop
exitwhen i>udg_integer22
call AddUnitToStock(O1O0O0(i),udg_integers30[i],0,1)
set i=i+1
endloop
set i=udg_integer23
loop
exitwhen i>udg_integer24
call AddUnitToStock(O1O0O0(i),udg_integers30[i],0,1)
set i=i+1
endloop
endfunction
function O1O000 takes nothing returns nothing
local player II01IO=Player(15)
set udg_unit103=CreateUnit(II01IO,1848651832,-6464,-6592,270)
set udg_unit104=CreateUnit(II01IO,1848652100,-6080,-6592,270)
set udg_unit105=CreateUnit(II01IO,1853120886,-6464,-7104,270)
set udg_unit106=CreateUnit(II01IO,1848652110,-6080,-7104,270)
set udg_unit107=CreateUnit(II01IO,1848651829,5888,6208,270)
set udg_unit108=CreateUnit(II01IO,1848652112,6272,6208,270)
set udg_unit109=CreateUnit(II01IO,1848651831,5888,6720,270)
set udg_unit110=CreateUnit(II01IO,1848652098,6272,6720,270)
call SetUnitColor(udg_unit103,ConvertPlayerColor(0))
call SetUnitColor(udg_unit104,ConvertPlayerColor(0))
call SetUnitColor(udg_unit105,ConvertPlayerColor(0))
call SetUnitColor(udg_unit106,ConvertPlayerColor(0))
call SetUnitColor(udg_unit107,ConvertPlayerColor(0))
call SetUnitColor(udg_unit108,ConvertPlayerColor(0))
call SetUnitColor(udg_unit109,ConvertPlayerColor(0))
call SetUnitColor(udg_unit110,ConvertPlayerColor(0))
endfunction
function O1O0I0 takes integer OO0010,string O1O010 returns nothing
call IIOIOO("ItemIcon",I2S(OO0010),O1O010)
endfunction
function O1OIO0 takes item O1OI00 returns string
if O1OI00==null then
return"UI\\Widgets\\Console\\Undead\\undead-inventory-slotfiller.blp"
endif
if GetItemType(O1OI00)==ITEM_TYPE_POWERUP then
return"ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
endif
return II0IOO("ItemIcon",I2S(GetItemTypeId(O1OI00)))
endfunction
function O1OII0 takes nothing returns nothing
call O1O0I0(1869375847,"ReplaceableTextures\\CommandButtons\\BTNArcaniteArmor.blp")
call O1O0I0(1936683571,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1936683574,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1936683573,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1936683572,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1735156847,"ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingAxe_06.blp")
call O1O0I0(1868984943,"ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp")
call O1O0I0(1918989366,"ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Plate06.blp")
call O1O0I0(1953265005,"ReplaceableTextures\\CommandButtons\\BTNAbility_Rogue_Sprint.blp")
call O1O0I0(1952866674,"ReplaceableTextures\\CommandButtons\\BTNRunedBracers.blp")
call O1O0I0(1868982642,"ReplaceableTextures\\CommandButtons\\BTNINV_Weapon_Crossbow_10.blp")
call O1O0I0(1853059177,"ReplaceableTextures\\CommandButtons\\BTNINV_Hammer_10.blp")
call O1O0I0(1868787570,"ReplaceableTextures\\CommandButtons\\BTNINV_Hammer_10.blp")
call O1O0I0(1819636325,"ReplaceableTextures\\CommandButtons\\BTNThoriumMelee.blp")
call O1O0I0(1919248949,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp")
call O1O0I0(1819177582,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp")
call O1O0I0(1835823988,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp")
call O1O0I0(1835955046,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp")
call O1O0I0(1919248945,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp")
call O1O0I0(2004055908,"ReplaceableTextures\\CommandButtons\\BTNINV_Sword_11.blp")
call O1O0I0(1919248946,"ReplaceableTextures\\CommandButtons\\BTNStaffofpurification.blp")
call O1O0I0(1952604523,"ReplaceableTextures\\CommandButtons\\BTNIceShard.blp")
call O1O0I0(1952998509,"ReplaceableTextures\\CommandButtons\\BTNIceShard.blp")
call O1O0I0(1936749157,"ReplaceableTextures\\CommandButtons\\BTNINV_Sword_09.blp")
call O1O0I0(1885628790,"ReplaceableTextures\\CommandButtons\\BTNGoldGloves.BLP")
call O1O0I0(1802268013,"ReplaceableTextures\\CommandButtons\\BTNINV_Helmet_17.blp")
call O1O0I0(1801937260,"ReplaceableTextures\\CommandButtons\\BTNHeartOfAszune.blp")
call O1O0I0(1919906931,"ReplaceableTextures\\CommandButtons\\BTNINV_Helmet_13.blp")
call O1O0I0(1803117164,"ReplaceableTextures\\CommandButtons\\BTNOrb of Water.blp")
call O1O0I0(1667460452,"ReplaceableTextures\\CommandButtons\\BTNLothars.BLP")
call O1O0I0(1919837539,"ReplaceableTextures\\CommandButtons\\BTNStormHammer.blp")
call O1O0I0(1935894636,"ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingAxe_02.blp")
call O1O0I0(1752134252,"ReplaceableTextures\\CommandButtons\\BTNHelmOfValor.blp")
call O1O0I0(1835955060,"ReplaceableTextures\\CommandButtons\\BTNSpellShieldAmulet.blp")
call O1O0I0(1920296820,"ReplaceableTextures\\CommandButtons\\BTNINV_Weapon_Halberd_10.blp")
call O1O0I0(1936093031,"ReplaceableTextures\\CommandButtons\\BTNThoriumArmor.blp")
call O1O0I0(1667786099,"ReplaceableTextures\\CommandButtons\\BTNNecromancerMaster.blp")
call O1O0I0(1735618421,"ReplaceableTextures\\CommandButtons\\BTNTalisman.tga")
call O1O0I0(1936684396,"ReplaceableTextures\\CommandButtons\\BTNINV_Mace_10.blp")
call O1O0I0(1918989414,"ReplaceableTextures\\CommandButtons\\BTNOrbOfFire.blp")
call O1O0I0(1751937908,"ReplaceableTextures\\CommandButtons\\BTNWirtsLeg.blp")
call O1O0I0(1227895127,"ReplaceableTextures\\CommandButtons\\BTNWirtsLeg.blp")
call O1O0I0(1227895126,"ReplaceableTextures\\CommandButtons\\BTNWirtsLeg.blp")
call O1O0I0(1918987572,"ReplaceableTextures\\CommandButtons\\BTNTransmute.blp")
call O1O0I0(1870030190,"ReplaceableTextures\\CommandButtons\\BTNHeartOfSearinox.blp")
call O1O0I0(1735553900,"ReplaceableTextures\\CommandButtons\\BTNRingVioletSpider.tga")
call O1O0I0(1918987569,"ReplaceableTextures\\CommandButtons\\BTNJapaneseSword.BLP")
call O1O0I0(1919841136,"ReplaceableTextures\\CommandButtons\\BTNSpell_Holy_BlessingOfStrength.blp")
call O1O0I0(1650878578,"ReplaceableTextures\\CommandButtons\\BTNHornOfDoom.blp")
call O1O0I0(1869835375,"ReplaceableTextures\\CommandButtons\\BTNPhilosophersStone.blp")
call O1O0I0(1952803955,"ReplaceableTextures\\CommandButtons\\BTNAbility_Gouge.blp")
call O1O0I0(1919182132,"ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingKnife_04.blp")
call O1O0I0(1936683577,"ReplaceableTextures\\CommandButtons\\BTNRevenant.blp")
call O1O0I0(1919182128,"ReplaceableTextures\\CommandButtons\\BTNINV_Sword_10.blp")
call O1O0I0(1886613604,"ReplaceableTextures\\CommandButtons\\BTNINV_Sword_25.blp")
call O1O0I0(1650946932,"ReplaceableTextures\\CommandButtons\\BTNBelt.blp")
call O1O0I0(1953328500,"ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingKnife_03.blp")
call O1O0I0(1953330019,"ReplaceableTextures\\CommandButtons\\BTNClawsOfAttack.blp")
call O1O0I0(1650814070,"ReplaceableTextures\\CommandButtons\\BTNBoots.blp")
call O1O0I0(1952938096,"ReplaceableTextures\\CommandButtons\\BTNBootsOfSpeed.blp")
call O1O0I0(1936683570,"ReplaceableTextures\\CommandButtons\\BTNSteelMelee.blp")
call O1O0I0(1952609133,"ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Chain_12.blp")
call O1O0I0(1952604530,"ReplaceableTextures\\CommandButtons\\BTNCirclet.blp")
call O1O0I0(1936683617,"ReplaceableTextures\\CommandButtons\\BTNINV_Sword_19.blp")
call O1O0I0(1936880748,"ReplaceableTextures\\CommandButtons\\BTNFrostMourne.blp")
call O1O0I0(1936876132,"ReplaceableTextures\\CommandButtons\\BTNINV_Weapon_Bow_06.blp")
call O1O0I0(1885825390,"ReplaceableTextures\\CommandButtons\\BTNEnchantedGemstone.blp")
call O1O0I0(1937012577,"ReplaceableTextures\\CommandButtons\\BTNGauntletsOfOgrePower.blp")
call O1O0I0(1868983399,"ReplaceableTextures\\CommandButtons\\BTNGem.blp")
call O1O0I0(1937011301,"ReplaceableTextures\\CommandButtons\\BTNGlove.blp")
call O1O0I0(1935897964,"ReplaceableTextures\\CommandButtons\\BTNHelmutPurple.blp")
call O1O0I0(1936749166,"ReplaceableTextures\\CommandButtons\\BTNPeriapt1.blp")
call O1O0I0(1769431666,"ReplaceableTextures\\CommandButtons\\BTNNatureTouchGrow.blp")
call O1O0I0(1684370275,"ReplaceableTextures\\CommandButtons\\BTNDaggerOfEscape.blp")
call O1O0I0(1935830891,"ReplaceableTextures\\CommandButtons\\BTNMantleOfIntelligence.blp")
call O1O0I0(1784967790,"ReplaceableTextures\\CommandButtons\\BTNUndeadShrine.blp")
call O1O0I0(1920298352,"ReplaceableTextures\\CommandButtons\\BTNSpiritWalkerMasterTraining.blp")
call O1O0I0(1718378855,"ReplaceableTextures\\CommandButtons\\BTNHammer.blp")
call O1O0I0(1918987570,"ReplaceableTextures\\CommandButtons\\BTNStaffOfNegation.blp")
call O1O0I0(1936421736,"ReplaceableTextures\\CommandButtons\\BTNSpiritWalkerAdeptTraining.tga")
call O1O0I0(1936683569,"ReplaceableTextures\\CommandButtons\\BTNINV_Misc_Cape_08.blp")
call O1O0I0(1918987571,"ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Plate13.blp")
call O1O0I0(1751282792,"ReplaceableTextures\\CommandButtons\\BTNUsedSoulGem.blp")
call O1O0I0(2003335012,"ReplaceableTextures\\CommandButtons\\BTNAlleriaFlute.blp")
call O1O0I0(1919248950,"ReplaceableTextures\\CommandButtons\\BTNGoldRing.blp")
call O1O0I0(1836016756,"ReplaceableTextures\\CommandButtons\\BTNRingGreen.blp")
call O1O0I0(1953197679,"ReplaceableTextures\\CommandButtons\\BTNRingSkull.blp")
call O1O0I0(1667854953,"ReplaceableTextures\\CommandButtons\\BTNRobeOfTheMagi.blp")
call O1O0I0(1936224883,"ReplaceableTextures\\CommandButtons\\BTNStaffOfTeleportation.blp")
call O1O0I0(1936221300,"ReplaceableTextures\\CommandButtons\\BTNSlippersOfAgility.blp")
call O1O0I0(1936222318,"ReplaceableTextures\\CommandButtons\\BTNSobiMask.blp")
call O1O0I0(1936225389,"ReplaceableTextures\\CommandButtons\\BTNWandOfCyclone.blp")
call O1O0I0(1919248948,"ReplaceableTextures\\CommandButtons\\BTNImprovedUnholyArmor.blp")
call O1O0I0(1735816045,"ReplaceableTextures\\CommandButtons\\BTNOrbofSlowness.blp")
call O1O0I0(1869375794,"ReplaceableTextures\\CommandButtons\\BTNSoulGem.blp")
call O1O0I0(1936221047,"ReplaceableTextures\\CommandButtons\\BTNPeriapt.blp")
call O1O0I0(1936288875,"ReplaceableTextures\\CommandButtons\\BTNAncientOfTheEarth.blp")
call O1O0I0(1936548206,"ReplaceableTextures\\CommandButtons\\BTNCritterChicken.blp")
call O1O0I0(1936221537,"ReplaceableTextures\\CommandButtons\\BTNCheese.blp")
call O1O0I0(1886151532,"ReplaceableTextures\\CommandButtons\\BTNLesserClarityPotion.blp")
call O1O0I0(1936683576,"ReplaceableTextures\\CommandButtons\\BTNPotionBlueBig.blp")
call O1O0I0(1936683575,"ReplaceableTextures\\CommandButtons\\BTNSentryWard.blp")
call O1O0I0(1937012592,"ReplaceableTextures\\CommandButtons\\BTNScrollUber.blp")
call O1O0I0(1952936552,"ReplaceableTextures\\CommandButtons\\BTNBlueSentryWard.blp")
call O1O0I0(1227895094,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227894838,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227894868,"ReplaceableTextures\\CommandButtons\\BTNArcaneRing.blp")
call O1O0I0(1227894857,"ReplaceableTextures\\CommandButtons\\BTNBottle1.blp")
call O1O0I0(1227894856,"ReplaceableTextures\\CommandButtons\\BTNBottle2.blp")
call O1O0I0(1227894858,"ReplaceableTextures\\CommandButtons\\BTNBottle3.blp")
call O1O0I0(1227894859,"ReplaceableTextures\\CommandButtons\\BTNBottle4.blp")
call O1O0I0(1227894855,"ReplaceableTextures\\CommandButtons\\BTNBottle0.blp")
call O1O0I0(1227894865,"ReplaceableTextures\\CommandButtons\\BTNThunderMallet.blp")
call O1O0I0(1227894834,"ReplaceableTextures\\CommandButtons\\BTNNecromancerMaster.blp")
call O1O0I0(1227894833,"ReplaceableTextures\\CommandButtons\\BTNNecromancerMaster.blp")
call O1O0I0(1227895095,"ReplaceableTextures\\CommandButtons\\BTNOrbOfFrost.blp")
call O1O0I0(1227894860,"ReplaceableTextures\\CommandButtons\\BTNAdvancedUnholyArmor.blp")
call O1O0I0(1227895090,"ReplaceableTextures\\CommandButtons\\BTNCloakOfFlames.blp")
call O1O0I0(1227895107,"ReplaceableTextures\\CommandButtons\\BTNNagaWeaponUp2.blp")
call O1O0I0(1227895114,"ReplaceableTextures\\CommandButtons\\BTNRingVioletSpider.tga")
call O1O0I0(1227895109,"ReplaceableTextures\\CommandButtons\\BTNINV_Misc_Gem_Bloodstone_02.blp")
call O1O0I0(1227895110,"ReplaceableTextures\\CommandButtons\\BTNHoodOfCunning.blp")
call O1O0I0(1227895112,"ReplaceableTextures\\CommandButtons\\BTNArcaniteArmor.blp")
call O1O0I0(1227895115,"ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Chain_14.blp")
call O1O0I0(1227894841,"ReplaceableTextures\\CommandButtons\\BTNOrcMeleeUpTwo.blp")
call O1O0I0(1227894874,"ReplaceableTextures\\CommandButtons\\BTNSteelRanged.blp")
call O1O0I0(1227895095,"ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Plate06.blp")
call O1O0I0(1227895096,"ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Plate06.blp")
call O1O0I0(1227895120,"ReplaceableTextures\\CommandButtons\\BTNUnholyStrength.blp")
call O1O0I0(1227895121,"ReplaceableTextures\\CommandButtons\\BTNImprovedUnholyStrength.blp")
call O1O0I0(1227895125,"ReplaceableTextures\\CommandButtons\\BTNAdvancedMoonArmor.blp")
call O1O0I0(1227894851,"ReplaceableTextures\\CommandButtons\\BTNStaffOfSilence.blp")
call O1O0I0(1227894838,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895345,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895346,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895348,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895349,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895350,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895351,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895352,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895353,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895361,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895362,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895363,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895364,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895365,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895366,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895367,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895368,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call O1O0I0(1227895369,"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
endfunction
function O1OI10 takes integer O1O1O0,integer O1O100,integer O1O1I0,integer O1O110,integer O10OO0 returns nothing
set udg_integers10[udg_integer07]=O1O1O0
set udg_integers11[udg_integer07]=O1O100
set udg_integers12[udg_integer07]=O1O1I0
set udg_integers13[udg_integer07]=O1O110
set udg_integers14[udg_integer07]=O10OO0
set udg_integers15[udg_integer07]=4
if(O1O1O0==0)then
set udg_integers15[udg_integer07]=udg_integers15[udg_integer07]-1
endif
if(O1O100==0)then
set udg_integers15[udg_integer07]=udg_integers15[udg_integer07]-1
endif
if(O1O1I0==0)then
set udg_integers15[udg_integer07]=udg_integers15[udg_integer07]-1
endif
if(O1O110==0)then
set udg_integers15[udg_integer07]=udg_integers15[udg_integer07]-1
endif
set udg_integer07=udg_integer07+1
set udg_integer06=udg_integer07
endfunction
function O10O00 takes nothing returns nothing
set udg_integer07=1
call O1OI10(1919906931,1920298352,1835233897,0,1650878578)
call O1OI10(1937012577,1952604530,1920168051,0,1952866674)
call O1OI10(1936221300,1952604530,1936880227,0,1936683577)
call O1OI10(1986290796,1936683569,1918987571,0,1869375847)
call O1OI10(1920298352,1869375794,1920428410,0,1801937260)
call O1OI10(1936876132,2003335012,1718055527,0,1919182132)
call O1OI10(1650946932,1936421736,1936749416,0,1918987569)
call O1OI10(1650814070,1953328500,1935765092,0,1919182128)
call O1OI10(1918987569,1919182128,2003007843,0,1919841136)
call O1OI10(1936880748,1819636325,1920099682,0,1868982642)
call O1OI10(1718378855,1937012577,1920099633,0,1868787570)
call O1OI10(1936684396,1919248946,1818784628,0,1936749157)
call O1OI10(1650814070,1952938096,1937011301,1920169009,1751937908)
call O1OI10(1650946932,1952938096,1937011301,1920169009,1227895126)
call O1OI10(1667854953,1952938096,1937011301,1920169009,1227895127)
call O1OI10(1952604530,1818715240,1935830891,0,1735618421)
call O1OI10(2003335012,1667854953,1936222318,0,1936684396)
call O1OI10(1936880748,1936224883,1936683617,0,1886613604)
call O1OI10(1769431666,1952609133,1835233141,0,1936093031)
call O1OI10(1919183219,1953328500,1667854953,0,2004055908)
call O1OI10(1836016756,1936222318,0,0,1735553900)
call O1OI10(1953328500,1936683617,1919707494,0,1667460452)
call O1OI10(1935897964,1784967790,0,0,1919906931)
call O1OI10(1918989414,1718378855,1936683617,0,1735156847)
call O1OI10(1919444274,1936683570,1953330019,0,1819636325)
call O1OI10(1936221047,1919248950,0,0,1918989414)
call O1OI10(1936221047,1936225389,1667854953,1735355758,1919248946)
call O1OI10(1784967790,1886549620,0,0,1752134252)
call O1OI10(1885825390,1751282792,1869375794,0,1869835375)
call O1OI10(1936684396,1918989414,1668048493,0,1870030190)
call O1OI10(1936683570,1936421736,1952807024,0,1868984943)
call O1OI10(1936224883,1668446579,0,0,1918987572)
call O1OI10(1936225389,1953330019,1919770930,0,1919248949)
call O1OI10(1919248949,1919770930,0,0,1819177582)
call O1OI10(1819177582,1919770930,0,0,1835823988)
call O1OI10(1835823988,1919770930,0,0,1835955046)
call O1OI10(1835955046,1919770930,0,0,1919248945)
call O1OI10(1952938096,1920168044,0,0,1953265005)
call O1OI10(1769431666,1953197679,1937007980,0,1802268013)
call O1OI10(1952609133,1953330019,1952736632,0,1918989366)
call O1OI10(1885826401,1937011301,0,0,1885628790)
call O1OI10(1885564018,1918989414,1735816045,0,1803117164)
call O1OI10(1768842867,1802268013,1936093031,0,1835955060)
call O1OI10(1650814070,1718378855,1885957750,0,1919837539)
call O1OI10(2004055908,1919182130,1869375794,0,1935894636)
call O1OI10(1650946932,1936225389,1651732580,0,1667786099)
call O1OI10(1667786099,1651732580,0,0,1227894834)
call O1OI10(1227894834,1651732580,0,0,1227894833)
call O1OI10(1919248948,1919248950,1869375794,0,1227894860)
call O1OI10(1227894870,1885825390,1836016756,0,1227894868)
call O1OI10(1936876132,1919837539,0,0,1227894865)
call O1OI10(1735553900,1784967790,1227895092,1953197679,1227895090)
call O1OI10(1227895114,1784967790,1227895092,1953197679,1227895090)
call O1OI10(1227895106,1819636325,2004055908,0,1227895107)
call O1OI10(1869835375,1918989414,0,0,1227895109)
call O1OI10(1227895117,1918987571,1952609133,1936749166,1227895115)
call O1OI10(1227895123,1937011301,1953330019,1935897964,1227895120)
call O1OI10(1918987571,1918987570,1227895344,0,1227895125)
call O1OI10(1918987570,1936684396,1227894850,0,1227894851)
call O1OI10(1869835375,1918987570,0,0,1227894838)
endfunction
function O10OI0 takes nothing returns nothing
set udg_integers24[1]=1095331188
set udg_integers24[2]=1095328865
set udg_integers24[3]=1095660653
set udg_integers24[4]=1094935400
set udg_integers24[5]=1095333995
set udg_integers24[6]=1093681995
set udg_integers24[7]=1093677367
set udg_integers24[8]=1093681720
set udg_integers24[9]=1093683266
set udg_integers24[10]=1093682227
set udg_integers24[10]=1093682246
set udg_integers24[11]=1093677655
set udg_integers24[12]=1095331954
set udg_integers24[13]=1095331948
set udg_integers24[14]=1093682767
set udg_integers24[15]=1093683255
set udg_integers24[16]=1093683254
set udg_integers24[17]=1093677656
set udg_integers24[18]=1095332727
set udg_integers24[19]=1093682008
set udg_integers24[20]=1093681718
set udg_integers24[21]=1097163124
set udg_integers24[22]=1093679180
set udg_integers24[23]=1095328633
set udg_integers24[24]=1093678426
set udg_integers24[25]=1095328363
set udg_integers24[26]=1093682265
set udg_integers24[27]=1093684314
set udg_integers24[28]=1093685065
set udg_integers24[29]=1093684056
set udg_integers24[30]=1093684055
set udg_integers24[31]=1093677622
set udg_integers24[32]=1093681972
set udg_integers24[33]=1093677362
set udg_integers24[34]=1093678667
set udg_integers24[35]=1093677652
set udg_integers24[36]=1095263841
set udg_integers24[37]=1093679446
set udg_integers24[38]=1093678425
set udg_integers24[39]=1093683513
set udg_integers24[40]=1093683265
set udg_integers24[41]=1093684021
set udg_integers24[42]=1093685337
set udg_integers24[43]=1093685582
set udg_integers24[44]=1093685844
set udg_integers24[45]=1093685840
set udg_integers24[46]=1093685593
set udg_integers24[47]=1093686081
set udg_integers24[48]=1093686328
set udg_integers24[49]=1093686327
set udg_integers24[50]=1093686340
set udg_integer14=50
endfunction
function O10O10 takes nothing returns nothing
call CreateQuestBJ(0,"Contacts","If you find any bugs or have suggestions or comments,please message me through www.getdota.com/contact
If you need to email,you may send to [email protected]","ReplaceableTextures\\CommandButtons\\BTNSpy.blp")
call CreateQuestBJ(0,"Useful Information","Game Modes:
-allpick(-ap),-allrandom(-ar),-leaguemode(-lm),-randomdraft(-rd),-extendedleague(-xl),-mirrormatch(-mm),-teamrandom(-tr),-deathmatch(-dm),-moderandom(-mr),-voterandom(-vr),-reverse(-rv),-duplicatemode(-du),-shuffleplayers(-sp),-samehero(-sh),-allagility(-aa),-allintelligence(-ai),-allstrength(-as),-itemdrop(-id),-easymode(-em),-nopowerups(-np),-supercreeps(-sc),-onlymid(-om),-notop(-nt),-nomid(-nm),-nobot(-nb),-noswap(-ns),-norepick(-nr),-terrainsnow(-ts)
Game Commands:
-ma,-ms,-cs,-cson,-csoff,-disablehelp,-enablehelp,-unstuck,-recreate,-swaphero,-showmsg,-hidemsg,-showdeny,-hidedeny,-weather rain,-weather snow,-weather moonlight,-weather wind,-weather random,-weather off,-denyinfo(-di),-deathon(-don),-deathoff(-doff),-roll,-hideheronames(-hhn),-test,-mute,-gameinfo
Found a bug?
www.getdota.com/contact
DM Commands:
-nd,-lives xx
For fun modes:
-wtf
Misc commands:
-fleshstr(-fs)","ReplaceableTextures\\CommandButtons\\BTNTome.blp")
call CreateQuestBJ(0,"Credits","TRIGSTR_7228","ReplaceableTextures\\CommandButtons\\BTNAmbush.blp")
call CreateQuestBJ(2,"League Rules","TRIGSTR_7232","ReplaceableTextures\\CommandButtons\\BTNBansheeMaster.blp")
call CreateQuestBJ(2,"TDA Rules","TRIGSTR_7244","ReplaceableTextures\\CommandButtons\\BTNBansheeMaster.blp")
endfunction
function O100O0 takes nothing returns nothing
call OOI110(bj_FORCE_ALL_PLAYERS,25.00,I10OIO(GetTriggerPlayer())+"|c00ff0303 has left the game.|r")
endfunction
function O10000 takes nothing returns nothing
local player O100I0=IIO10O(I011OO(GetExpiredTimer()),"Leaver")
local integer IIII0O=1
local integer O10010
local integer I1OO1O=GetPlayerState(O100I0,PLAYER_STATE_RESOURCE_GOLD)
call SetPlayerState(O100I0,PLAYER_STATE_RESOURCE_GOLD,0)
if II0I0O(O100I0)then
set O10010=IIIO0O(IIO0)
else
set O10010=IIIO0O(II00)
endif
if II0I0O(O100I0)then
loop
exitwhen IIII0O>5
if II010O(III0[IIII0O])then
call SetPlayerState(III0[IIII0O],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[IIII0O],PLAYER_STATE_RESOURCE_GOLD)+I1OO1O/ O10010)
endif
set IIII0O=IIII0O+1
endloop
else
loop
exitwhen IIII0O>5
if II010O(II10[IIII0O])then
call SetPlayerState(II10[IIII0O],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[IIII0O],PLAYER_STATE_RESOURCE_GOLD)+I1OO1O/ O10010)
endif
set IIII0O=IIII0O+1
endloop
endif
endfunction
function O10IO0 takes player O100I0 returns nothing
local timer t=CreateTimer()
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Leaver",O100I0)
call TimerStart(t,2,true,function O10000)
endfunction
function O10I00 takes player p returns nothing
local multiboarditem O10II0=MultiboardGetItem(O1I,O1IOOO[GetPlayerId(p)],O1011O[GetPlayerId(p)])
call MultiboardSetItemValue(O10II0,"|c00333333"+I10OIO(p)+"|r")
call MultiboardReleaseItem(O10II0)
endfunction
function O10I10 takes nothing returns nothing
local integer O1OO00=IIIO0O(IIO0)
local integer O1OOO0=IIIO0O(II00)
local integer IIII0O
local integer IIIIIO
local string O101O0
local string O1OI0O
local unit I1IIIO=OI10[GetPlayerId(GetTriggerPlayer())]
if I1IIIO==null then
set O1OI0O="No Hero"
else
set O1OI0O=GetUnitName(I1IIIO)
endif
if(OI0<10)then
set O101O0=I2S(O00)+":0"+I2S(OI0)
else
set O101O0=I2S(O00)+":"+I2S(OI0)
endif
if OOI0O==false then
set O01OO[GetPlayerId(GetTriggerPlayer())]="|c00555555"+O101O0+"|r"
call OOI110(bj_FORCE_ALL_PLAYERS,25.00,O0O[GetPlayerId(GetTriggerPlayer())]+I10OIO(GetTriggerPlayer())+"("+O1OI0O+")|r|c00ff0303 has left the game.|r")
if(II0I0O(GetTriggerPlayer())==true)then
set IIII0O=1
set IIIIIO=5
loop
exitwhen IIII0O>IIIIIO
if(III0[IIII0O]!=GetTriggerPlayer())then
if(II010O(III0[IIII0O])==true)then
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),III0[IIII0O],4)
endif
endif
set IIII0O=IIII0O+1
endloop
else
set IIII0O=1
set IIIIIO=5
loop
exitwhen IIII0O>IIIIIO
if(II10[IIII0O]!=GetTriggerPlayer())then
if(II010O(II10[IIII0O])==true)then
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),II10[IIII0O],4)
endif
endif
set IIII0O=IIII0O+1
endloop
endif
call O10I00(GetTriggerPlayer())
call O10IO0(GetTriggerPlayer())
else
set O01OO[GetPlayerId(GetTriggerPlayer())]="|c00555555End|r"
call ExecuteFunc("O10100")
endif
endfunction
function O101I0 takes unit I1IIIO returns nothing
call UnitRemoveAbility(I1IIIO,1093681498)
call UnitRemoveAbility(I1IIIO,1093679434)
call UnitRemoveAbility(I1IIIO,1093684052)
call UnitRemoveAbility(I1IIIO,1093684823)
call UnitRemoveAbility(I1IIIO,1093684821)
call UnitRemoveAbility(I1IIIO,1093685079)
call UnitRemoveAbility(I1IIIO,1093685078)
call UnitRemoveAbility(I1IIIO,1093685080)
call UnitRemoveAbility(I1IIIO,1093685081)
call UnitRemoveAbility(I1IIIO,1093685296)
call UnitRemoveAbility(I1IIIO,1093685334)
call UnitRemoveAbility(I1IIIO,1093685583)
call UnitRemoveAbility(I1IIIO,1093685594)
call UnitRemoveAbility(I1IIIO,1093685827)
call UnitRemoveAbility(I1IIIO,1093685830)
call UnitRemoveAbility(I1IIIO,I0O01O)
call UnitRemoveAbility(I1IIIO,IOOOOO)
call UnitRemoveAbility(I1IIIO,1093683509)
call UnitRemoveAbility(I1IIIO,1093681977)
call UnitRemoveAbility(I1IIIO,1093683528)
call UnitRemoveAbility(I1IIIO,1093686098)
call IIOI0O(I011OO(I1IIIO),"O10110",false)
call SetUnitPathing(I1IIIO,true)
call SetUnitScale(I1IIIO,I11O1O(I1IIIO),I11O1O(I1IIIO),I11O1O(I1IIIO))
endfunction
function O1IOO0 takes unit O1IO00 returns boolean
return GetUnitTypeId(O1IO00)==1211117641 or GetUnitTypeId(O1IO00)==1211117642
endfunction
function O1IOI0 takes unit O1IO10 returns nothing
if OO00I0(O1IO10,1227895109)!=null and GetUnitTypeId(O1IO10)!=1211117642 then
call SetItemCharges(OO00I0(O1IO10,1227895109),OO0I10(GetItemCharges(OO00I0(O1IO10,1227895109))-1,0))
call AddHeroXP(O1IO10,GetHeroXP(IOOO0O[GetPlayerId(GetOwningPlayer(O1IO10))]),true)
call RemoveUnit(IOOO0O[GetPlayerId(GetOwningPlayer(O1IO10))])
endif
endfunction
function O1I0O0 takes unit O1I000 returns nothing
local string I1I0IO=I011OO(GetOwningPlayer(O1I000))
local unit O1I0I0=IIO1OO(I1I0IO,"Kobold0")
local unit O1I010=IIO1OO(I1I0IO,"Kobold1")
local unit O1IIO0=IIO1OO(I1I0IO,"Kobold2")
local unit O1II00=IIO1OO(I1I0IO,"Kobold3")
local unit O1III0
set O1III0=O1I0I0
if O1III0!=null then
call RemoveUnit(O1III0)
endif
set O1III0=O1I010
if O1III0!=null then
call RemoveUnit(O1III0)
endif
set O1III0=O1IIO0
if O1III0!=null then
call RemoveUnit(O1III0)
endif
set O1III0=O1II00
if O1III0!=null then
call RemoveUnit(O1III0)
endif
endfunction
function O1II10 takes unit O1I1O0,real x,real y returns nothing
local string I1I0IO=I011OO(GetOwningPlayer(O1I1O0))
local unit O1I0I0=IIO1OO(I1I0IO,"Kobold0")
local unit O1I010=IIO1OO(I1I0IO,"Kobold1")
local unit O1IIO0=IIO1OO(I1I0IO,"Kobold2")
local unit O1II00=IIO1OO(I1I0IO,"Kobold3")
local unit O1III0
set O1III0=O1I0I0
if O1III0!=null and O1I1O0!=O1III0 then
call ReviveHero(O1III0,x,y,false)
call SetUnitX(O1III0,x)
call SetUnitY(O1III0,y)
call O101I0(O1III0)
call SetUnitPathing(O1III0,true)
endif
set O1III0=O1I010
if O1III0!=null and O1I1O0!=O1III0 then
call ReviveHero(O1III0,x,y,false)
call SetUnitX(O1III0,x)
call SetUnitY(O1III0,y)
call O101I0(O1III0)
call SetUnitPathing(O1III0,true)
endif
set O1III0=O1IIO0
if O1III0!=null and O1I1O0!=O1III0 then
call ReviveHero(O1III0,x,y,false)
call SetUnitX(O1III0,x)
call SetUnitY(O1III0,y)
call O101I0(O1III0)
call SetUnitPathing(O1III0,true)
endif
set O1III0=O1II00
if O1III0!=null and O1I1O0!=O1III0 then
call ReviveHero(O1III0,x,y,false)
call SetUnitX(O1III0,x)
call SetUnitY(O1III0,y)
call O101I0(O1III0)
call SetUnitPathing(O1III0,true)
endif
endfunction
function O1I100 takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local player II01IO=GetOwningPlayer(OOOIO0)
local real x
local real y
call I1I1IO(OOOIO0)
if II0I0O(GetOwningPlayer(OOOIO0))then
set x=GetRectCenterX(OI01O)
set y=GetRectCenterY(OI01O)
else
set x=GetRectCenterX(OIOOO)
set y=GetRectCenterY(OIOOO)
endif
call PanCameraToTimedForPlayer(II01IO,x,y,0)
call ClearSelectionForPlayer(II01IO)
call SelectUnitAddForPlayer(OOOIO0,II01IO)
call TimerStart(I0O[GetPlayerId(II01IO)],0.0,false,null)
if O1IOO0(OOOIO0)then
call O1II10(OOOIO0,x,y)
endif
call SetUnitX(OOOIO0,x)
call SetUnitY(OOOIO0,y)
call O101I0(OOOIO0)
call SetUnitPathing(OOOIO0,true)
if OO00I0(GetTriggerUnit(),1227895109)!=null and GetUnitTypeId(OOOIO0)!=1211117642 then
call SetItemCharges(OO00I0(GetTriggerUnit(),1227895109),OO0I10(GetItemCharges(OO00I0(GetTriggerUnit(),1227895109))-1,0))
call AddHeroXP(GetTriggerUnit(),GetHeroXP(IOOO0O[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]),true)
call RemoveUnit(IOOO0O[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))])
endif
endfunction
function O1I1I0 takes unit I1IIIO returns nothing
local integer O1I110=GetUnitPointValue(I1IIIO)
local unit O11OO0
if(O1I110==34)then
call ExecuteFunc("O11O00")
elseif(O1I110==37)then
call ExecuteFunc("O11OI0")
call ExecuteFunc("O11O10")
call ExecuteFunc("O110O0")
call ExecuteFunc("O11000")
elseif(O1I110==38)then
call ExecuteFunc("O110I0")
call ExecuteFunc("O11010")
call ExecuteFunc("O11IO0")
call ExecuteFunc("O11I00")
elseif(O1I110==32)then
call ExecuteFunc("O11II0")
call ExecuteFunc("O11I10")
elseif(O1I110==29)then
call ExecuteFunc("O111O0")
call ExecuteFunc("O11100")
call ExecuteFunc("O111I0")
call ExecuteFunc("O11110")
elseif(O1I110==31)then
call ExecuteFunc("IOOOO0")
call ExecuteFunc("IOOO00")
elseif(O1I110==24)then
call ExecuteFunc("IOOOI0")
call ExecuteFunc("IOOO10")
call ExecuteFunc("IOO0O0")
call ExecuteFunc("IOO000")
elseif(O1I110==5)then
call ExecuteFunc("IOO0I0")
elseif(O1I110==8)then
call ExecuteFunc("IOO010")
call ExecuteFunc("IOOIO0")
call ExecuteFunc("IOOI00")
call ExecuteFunc("IOOII0")
call ExecuteFunc("IOOI10")
elseif(O1I110==3)then
call ExecuteFunc("IOO1O0")
call ExecuteFunc("IOO100")
call ExecuteFunc("IOO1I0")
call ExecuteFunc("IOO110")
elseif(O1I110==15)then
call ExecuteFunc("IO0OO0")
call ExecuteFunc("IO0O00")
call ExecuteFunc("IO0OI0")
call ExecuteFunc("IO0O10")
elseif(O1I110==20)then
call ExecuteFunc("IO00O0")
call ExecuteFunc("IO0000")
elseif(O1I110==12)then
call ExecuteFunc("IO00I0")
call ExecuteFunc("IO0010")
elseif(O1I110==16)then
call ExecuteFunc("IO0IO0")
call ExecuteFunc("IO0I00")
call ExecuteFunc("IO0II0")
call ExecuteFunc("IO0I10")
elseif(O1I110==25)then
call ExecuteFunc("IO01O0")
call ExecuteFunc("IO0100")
elseif(O1I110==4)then
call ExecuteFunc("IO01I0")
call ExecuteFunc("IO0110")
call ExecuteFunc("IOIOO0")
call ExecuteFunc("IOIO00")
call ExecuteFunc("IOIOI0")
call SetUnitPathing(I1IIIO,false)
set O11OO0=CreateUnit(GetOwningPlayer(I1IIIO),GetUnitTypeId(I1IIIO),GetUnitX(I1IIIO),GetUnitY(I1IIIO),GetUnitFacing(I1IIIO))
call StoreBoolean(OO1I,I011OO(O11OO0),"EnteredAlready",true)
set OI10[GetPlayerId(GetOwningPlayer(I1IIIO))]=O11OO0
call SetUnitPathing(O11OO0,false)
call SetUnitPosition(O11OO0,GetUnitX(I1IIIO),GetUnitY(I1IIIO))
if II0 then
call SetHeroXP(O11OO0,GetHeroXP(I1IIIO),false)
call UnitAddItem(O11OO0,UnitItemInSlot(I1IIIO,0))
call UnitAddItem(O11OO0,UnitItemInSlot(I1IIIO,1))
call UnitAddItem(O11OO0,UnitItemInSlot(I1IIIO,2))
call UnitAddItem(O11OO0,UnitItemInSlot(I1IIIO,3))
call UnitAddItem(O11OO0,UnitItemInSlot(I1IIIO,4))
call UnitAddItem(O11OO0,UnitItemInSlot(I1IIIO,5))
endif
call OO0OI0(I1IIIO)
call SetUnitPathing(O11OO0,true)
call ClearSelectionForPlayer(GetOwningPlayer(O11OO0))
call SelectUnitAddForPlayer(O11OO0,GetOwningPlayer(O11OO0))
elseif(O1I110==7)then
call ExecuteFunc("IOIO10")
elseif(O1I110==18)then
call ExecuteFunc("IOI0O0")
call ExecuteFunc("IOI000")
elseif(O1I110==36)then
call ExecuteFunc("IOI0I0")
elseif(O1I110==21)then
call ExecuteFunc("IOI010")
call ExecuteFunc("IOIIO0")
call ExecuteFunc("IOII00")
call ExecuteFunc("DW")
elseif(O1I110==14)then
call ExecuteFunc("IOIII0")
call ExecuteFunc("IOII10")
elseif(O1I110==13)then
call ExecuteFunc("IOI1O0")
call ExecuteFunc("IOI100")
call ExecuteFunc("IOI1I0")
call ExecuteFunc("GS")
call ExecuteFunc("IOI110")
elseif(O1I110==26)then
call ExecuteFunc("SS")
call ExecuteFunc("IO1OO0")
call ExecuteFunc("IO1O00")
elseif(O1I110==9)then
call ExecuteFunc("II")
call ExecuteFunc("IO1OI0")
call ExecuteFunc("IO1O10")
elseif(O1I110==10)then
call ExecuteFunc("IO10O0")
call ExecuteFunc("IO1000")
call ExecuteFunc("IO10I0")
call ExecuteFunc("IO1010")
call ExecuteFunc("IO1IO0")
call ExecuteFunc("IO1I00")
call ExecuteFunc("IO1II0")
elseif(O1I110==23)then
call ExecuteFunc("IO1I10")
call ExecuteFunc("IO11O0")
call ExecuteFunc("IO1100")
elseif(O1I110==19)then
call ExecuteFunc("IO11I0")
call ExecuteFunc("IO1110")
call ExecuteFunc("I0OOO0")
elseif(O1I110==22)then
call ExecuteFunc("I0OO00")
call ExecuteFunc("I0OOI0")
call ExecuteFunc("I0OO10")
call ExecuteFunc("I0O0O0")
elseif(O1I110==17)then
call ExecuteFunc("I0O000")
call ExecuteFunc("I0O0I0")
call ExecuteFunc("I0O010")
elseif(O1I110==1)then
call ExecuteFunc("I0OIO0")
elseif(O1I110==2)then
call ExecuteFunc("I0OI00")
call ExecuteFunc("I0OII0")
call ExecuteFunc("I0OI10")
elseif(O1I110==27)then
call ExecuteFunc("I0O1O0")
call ExecuteFunc("I0O100")
elseif(O1I110==82)then
call ExecuteFunc("I0O1I0")
call ExecuteFunc("I0O110")
call ExecuteFunc("I00OO0")
call ExecuteFunc("I00O00")
elseif(O1I110==75)then
call ExecuteFunc("I00OI0")
call ExecuteFunc("I00O10")
elseif(O1I110==83)then
call ExecuteFunc("I000O0")
call ExecuteFunc("I00000")
call ExecuteFunc("I000I0")
elseif(O1I110==59)then
call ExecuteFunc("I00010")
call ExecuteFunc("I00IO0")
elseif(O1I110==57)then
call ExecuteFunc("I00I00")
elseif(O1I110==69)then
call ExecuteFunc("I00II0")
call ExecuteFunc("I00I10")
call ExecuteFunc("I001O0")
elseif(O1I110==50)then
call ExecuteFunc("I00100")
call ExecuteFunc("I001I0")
elseif(O1I110==51)then
call ExecuteFunc("I00110")
elseif(O1I110==64)then
call ExecuteFunc("I0IOO0")
call ExecuteFunc("I0IO00")
call ExecuteFunc("I0IOI0")
elseif(O1I110==55)then
call ExecuteFunc("RP")
elseif(O1I110==61)then
call ExecuteFunc("I0IO10")
elseif(O1I110==76)then
call ExecuteFunc("I0I0O0")
call ExecuteFunc("I0I000")
call ExecuteFunc("I0I0I0")
elseif(O1I110==80)then
call ExecuteFunc("I0I010")
call ExecuteFunc("I0IIO0")
call ExecuteFunc("I0II00")
call ExecuteFunc("I0III0")
call ExecuteFunc("NL")
elseif(O1I110==62)then
call ExecuteFunc("I0II10")
call ExecuteFunc("I0I1O0")
elseif(O1I110==60)then
call ExecuteFunc("I0I100")
elseif(O1I110==77)then
call ExecuteFunc("I0I1I0")
call ExecuteFunc("I0I110")
call ExecuteFunc("I01OO0")
elseif(O1I110==73)then
call ExecuteFunc("NW")
elseif(O1I110==81)then
call ExecuteFunc("I01O00")
call ExecuteFunc("I01OI0")
call ExecuteFunc("I01O10")
call ExecuteFunc("I010O0")
elseif(O1I110==66)then
call ExecuteFunc("I01000")
elseif(O1I110==78)then
call ExecuteFunc("I010I0")
call ExecuteFunc("I01010")
call ExecuteFunc("I01IO0")
call ExecuteFunc("I01I00")
elseif(O1I110==49)then
call ExecuteFunc("I01II0")
call ExecuteFunc("I01I10")
elseif(O1I110==74)then
call ExecuteFunc("I011O0")
call ExecuteFunc("I01100")
call ExecuteFunc("I011I0")
elseif(O1I110==54)then
call ExecuteFunc("I01110")
elseif(O1I110==70)then
call ExecuteFunc("IIOOO0")
elseif(O1I110==56)then
call ExecuteFunc("IIOO00")
call ExecuteFunc("IIOOI0")
call ExecuteFunc("IIOO10")
call ExecuteFunc("IIO0O0")
elseif(O1I110==79)then
call ExecuteFunc("IIO000")
call ExecuteFunc("IIO0I0")
call ExecuteFunc("IIO010")
elseif(O1I110==68)then
call ExecuteFunc("IIOIO0")
elseif(O1I110==84)then
call ExecuteFunc("IIOI00")
call ExecuteFunc("IIOII0")
call ExecuteFunc("IIOI10")
call ExecuteFunc("IIO1O0")
elseif(O1I110==85)then
call ExecuteFunc("IIO100")
call ExecuteFunc("IIO1I0")
call ExecuteFunc("IIO110")
call ExecuteFunc("II0OO0")
call ExecuteFunc("II0O00")
elseif(O1I110==86)then
call ExecuteFunc("II0OI0")
call ExecuteFunc("II0O10")
call ExecuteFunc("II00O0")
elseif(O1I110==87)then
call ExecuteFunc("II0000")
call ExecuteFunc("II00I0")
call ExecuteFunc("II0010")
call ExecuteFunc("II0IO0")
elseif(O1I110==33)then
call ExecuteFunc("II0I00")
elseif(O1I110==39)then
call ExecuteFunc("II0II0")
call ExecuteFunc("II0I10")
call ExecuteFunc("II01O0")
elseif(O1I110==88)then
call ExecuteFunc("II0100")
call ExecuteFunc("II01I0")
call ExecuteFunc("II0110")
elseif(O1I110==40)then
call ExecuteFunc("IIIOO0")
call ExecuteFunc("IIIO00")
call ExecuteFunc("IIIOI0")
call ExecuteFunc("IIIO10")
elseif O1I110==89 then
call ExecuteFunc("III0O0")
call ExecuteFunc("III000")
call ExecuteFunc("III0I0")
elseif O1I110==90 then
call ExecuteFunc("III010")
call ExecuteFunc("IIIIO0")
call ExecuteFunc("IIII00")
call ExecuteFunc("IIIII0")
elseif O1I110==71 then
call ExecuteFunc("IIII10")
elseif O1I110==93 then
call ExecuteFunc("III1O0")
call ExecuteFunc("III100")
call ExecuteFunc("III1I0")
call ExecuteFunc("III110")
elseif O1I110==42 then
call ExecuteFunc("II1OO0")
call ExecuteFunc("II1O00")
call ExecuteFunc("II1OI0")
call ExecuteFunc("II1O10")
elseif O1I110==91 then
call ExecuteFunc("II10O0")
call ExecuteFunc("II1000")
call ExecuteFunc("II10I0")
call ExecuteFunc("II1010")
elseif O1I110==92 then
call ExecuteFunc("II1IO0")
call ExecuteFunc("II1I00")
call ExecuteFunc("II1II0")
call ExecuteFunc("II1I10")
elseif O1I110==41 then
call ExecuteFunc("II11O0")
call ExecuteFunc("II1100")
call ExecuteFunc("II11I0")
call ExecuteFunc("II1110")
elseif O1I110==43 then
call ExecuteFunc("I1OOO0")
call ExecuteFunc("I1OO00")
call ExecuteFunc("I1OOI0")
call ExecuteFunc("I1OO10")
elseif O1I110==44 then
call ExecuteFunc("I1O0O0")
call ExecuteFunc("I1O000")
call ExecuteFunc("I1O0I0")
call ExecuteFunc("I1O010")
elseif O1I110==72 then
call ExecuteFunc("I1OIO0")
call ExecuteFunc("I1OI00")
call ExecuteFunc("I1OII0")
call ExecuteFunc("I1OI10")
endif
endfunction
function I1O1O0 takes player I0IIOO,string OO1O00 returns nothing
if IsPlayerInForce(GetLocalPlayer(),I01OOO(I0IIOO))then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,OOIIO,40,O0O[GetPlayerId(I0IIOO)]+I10OIO(I0IIOO)+"|r"+OO1O00)
endif
endfunction
function I1O100 takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit())!=1211117645 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true and IsUnitIllusion(GetTriggerUnit())==false and HaveStoredBoolean(OO1I,I011OO(GetTriggerUnit()),"EnteredAlready")==false and GetUnitTypeId(GetTriggerUnit())!=1211117642
endfunction
function I1O1I0 takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())==1848651843
endfunction
function I1O110 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function I10OO0 takes player II01IO returns nothing
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function I1O1I0)
call GroupEnumUnitsOfPlayer(II1O0O,II01IO,II1OIO)
call ForGroup(II1O0O,function I1O110)
call DestroyBoolExpr(II1OIO)
call DestroyGroup(II1O0O)
endfunction
function I10O00 takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local player II01IO=GetOwningPlayer(OOOIO0)
local real x
local real y
local region r=CreateRegion()
local player I10OI0=II01IO
call I1I1IO(OOOIO0)
call RegionAddRect(r,OI10O)
call RegionAddRect(r,OI1OO)
if OO1IO and O0O1O==false then
set O0O0O[GetPlayerId(II01IO)]=true
set II01IO=IIO10O("Global|ReverseMode",I10OIO(II01IO))
call SetUnitOwner(OOOIO0,II01IO,true)
endif
if II0I0O(GetOwningPlayer(OOOIO0))then
if IsUnitInRegion(r,OOOIO0)then
set x=GetRandomReal(GetRectMinX(OI01O),GetRectMaxX(OI01O))
set y=GetRandomReal(GetRectMinY(OI01O),GetRectMaxY(OI01O))
else
set x=GetUnitX(OOOIO0)
set y=GetUnitY(OOOIO0)
endif
else
if IsUnitInRegion(r,OOOIO0)then
set x=GetRandomReal(GetRectMinX(OIOOO),GetRectMaxX(OIOOO))
set y=GetRandomReal(GetRectMinY(OIOOO),GetRectMaxY(OIOOO))
else
set x=GetUnitX(OOOIO0)
set y=GetUnitY(OOOIO0)
endif
endif
set OO11O[GetPlayerId(II01IO)]=true
if not OO1IO or O0O1O then
call PanCameraToTimedForPlayer(II01IO,x,y,0)
call ClearSelectionForPlayer(II01IO)
call SelectUnitAddForPlayer(OOOIO0,II01IO)
endif
call SetUnitX(OOOIO0,x)
call SetUnitY(OOOIO0,y)
set OI10[GetPlayerId(II01IO)]=OOOIO0
if OO1IO and O0O1O==false then
call IIIIOO(I10OI0)
else
call IIIIOO(II01IO)
endif
call StoreBoolean(OO1I,I011OO(OOOIO0),"EnteredAlready",true)
if not I01I then
set I[GetUnitPointValue(OOOIO0)]=true
call III0IO(GetUnitTypeId(OOOIO0))
endif
if II0 then
if II0I0O(II01IO)then
set IOO0[0]=IOO0[0]+1
else
set IOO0[1]=IOO0[1]+1
endif
set I010[GetPlayerId(II01IO)]=I010[GetPlayerId(II01IO)]+1
if I010[GetPlayerId(GetOwningPlayer(OOOIO0))]>1 and OOOIO0!=I0I0[GetPlayerId(GetOwningPlayer(OOOIO0))]then
call O1IOI0(I0I0[GetPlayerId(GetOwningPlayer(OOOIO0))])
call SetHeroXP(OOOIO0,GetHeroXP(I0I0[GetPlayerId(GetOwningPlayer(OOOIO0))]),false)
call UnitAddItem(OOOIO0,UnitItemInSlot(I0I0[GetPlayerId(GetOwningPlayer(OOOIO0))],0))
call UnitAddItem(OOOIO0,UnitItemInSlot(I0I0[GetPlayerId(GetOwningPlayer(OOOIO0))],1))
call UnitAddItem(OOOIO0,UnitItemInSlot(I0I0[GetPlayerId(GetOwningPlayer(OOOIO0))],2))
call UnitAddItem(OOOIO0,UnitItemInSlot(I0I0[GetPlayerId(GetOwningPlayer(OOOIO0))],3))
call UnitAddItem(OOOIO0,UnitItemInSlot(I0I0[GetPlayerId(GetOwningPlayer(OOOIO0))],4))
call UnitAddItem(OOOIO0,UnitItemInSlot(I0I0[GetPlayerId(GetOwningPlayer(OOOIO0))],5))
if O1IOO0(I0I0[GetPlayerId(GetOwningPlayer(OOOIO0))])then
call O1I0O0(I0I0[GetPlayerId(GetOwningPlayer(OOOIO0))])
else
call OO0OI0(I0I0[GetPlayerId(GetOwningPlayer(OOOIO0))])
endif
endif
endif
if OO1IO then
if TimerGetElapsed(I1O)>60 then
call I1O1O0(II01IO,"has been automatically assigned"+GetUnitName(OOOIO0))
elseif I0I[GetPlayerId(I10OI0)]==true then
call I1O1O0(II01IO,"has been randomly given"+GetUnitName(OOOIO0)+"by"+I10OIO(I10OI0))
else
call SetPlayerState(I10OI0,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(I10OI0,PLAYER_STATE_RESOURCE_GOLD)+250)
call I1O1O0(II01IO,"has been given"+GetUnitName(OOOIO0)+"by"+I10OIO(I10OI0))
endif
elseif I1II==false or II01IO==O0OI then
if(OIO[GetPlayerId(GetOwningPlayer(OOOIO0))]==true and I1II==false)then
call I1O1O0(II01IO,"has repicked into"+GetUnitName(OOOIO0)+".")
elseif((I0I[GetPlayerId(II01IO)]==true and II0==false)or I10 or OOI or OO0OO)then
call I1O1O0(II01IO,"has randomed"+GetUnitName(OOOIO0)+".")
else
call I1O1O0(II01IO,"has chosen"+GetUnitName(OOOIO0)+".")
endif
endif
if O0I then
if OO1IO then
call I10OO0(I10OI0)
else
call I10OO0(II01IO)
endif
endif
if IO0I1O then
call I10OO0(II01IO)
endif
if(GetUnitTypeId(OOOIO0)==1160785973)then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,60.00,"")
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,60.00,"|c00ff0303Do not purchase items with Orb Effects(Sange,Stygian Desolator,etc)as they will cause Luna's attack to completely malfunction.|r")
endif
if(GetUnitTypeId(OOOIO0)==1160786242)then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,30.00,"")
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,30.00,"|c00ff0303Droppable Items do not drop while phased.Activated items on death(like aegis)will not trigger while phased on unpathable terrain.|r")
endif
if(I0I[GetPlayerId(II01IO)]==false)then
if(I11I)then
call SetPlayerState(II01IO,PLAYER_STATE_RESOURCE_GOLD,175+GetPlayerState(II01IO,PLAYER_STATE_RESOURCE_GOLD))
endif
endif
if HaveStoredBoolean(OO1I,"HeroInit:"+I2S(GetUnitPointValue(OOOIO0)),"Initialized")==false then
call StoreBoolean(OO1I,"HeroInit:"+I2S(GetUnitPointValue(OOOIO0)),"Initialized",true)
call O1I1I0(OOOIO0)
endif
call SetPlayerName(II01IO,I10OIO(II01IO)+"("+I1011O(OI10[GetPlayerId(II01IO)])+")")
call RemoveRegion(r)
endfunction
function I10O10 takes nothing returns boolean
return IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==true
endfunction
function I100O0 takes nothing returns nothing
local unit I1IIIO=GetSoldUnit()
local player II01IO=GetOwningPlayer(I1IIIO)
call IIIIOO(II01IO)
endfunction
function I10000 takes nothing returns nothing
call SetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(III0[2],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[2],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(III0[3],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[3],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(III0[4],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[4],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(III0[5],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[5],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[2],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[2],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[3],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[3],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[4],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[4],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[5],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[5],PLAYER_STATE_RESOURCE_GOLD)+8)
endfunction
function I100I0 takes nothing returns nothing
local integer IIII0O
local integer IIIIIO
local integer I10010
local integer I10IO0
set O1O0=IIIO0O(IIO0)
set IIII0O=1
set IIIIIO=5
set I10010=1
loop
exitwhen IIII0O>IIIIIO
if(II010O(III0[IIII0O]))then
set O1I0[I10010]=III0[IIII0O]
set I10010=I10010+1
endif
set IIII0O=IIII0O+1
endloop
set O100=IIIO0O(II00)
set IIII0O=1
set IIIIIO=5
set I10010=1
loop
exitwhen IIII0O>IIIIIO
if(II010O(II10[IIII0O]))then
set O110[I10010]=II10[IIII0O]
set I10010=I10010+1
endif
set IIII0O=IIII0O+1
endloop
if GetTriggerExecCount(I01I0)==1 then
set O1I=CreateMultiboardBJ(4,6+O100+O1O0,O0OOO)
call MultiboardMinimize(O1I,true)
endif
call MultiboardSetItemValueBJ(O1I,1,1,"Player")
call MultiboardSetItemValueBJ(O1I,2,1,"Dead?")
call MultiboardSetItemValueBJ(O1I,3,1,"Kills")
call MultiboardSetItemValueBJ(O1I,4,1,"Deaths")
call MultiboardSetItemValueBJ(O1I,1,2,"The Sentinel")
call MultiboardSetItemValueBJ(O1I,1,3+O1O0,"The Scourge")
call MultiboardSetItemValueBJ(O1I,3,3+O1O0,"0")
call MultiboardSetItemValueBJ(O1I,4,3+O1O0,"0")
call MultiboardSetItemValueBJ(O1I,3,2,"0")
call MultiboardSetItemValueBJ(O1I,4,2,"0")
call MultiboardSetItemColorBJ(O1I,1,2,II110O(III0[0])/ 255.0*100,II11IO(III0[0])/ 255.0*100,II111O(III0[0])/ 255.0*100,0)
call MultiboardSetItemColorBJ(O1I,1,3+O1O0,II110O(II10[0])/ 255.0*100,II11IO(II10[0])/ 255.0*100,II111O(II10[0])/ 255.0*100,0)
set IIII0O=1
set IIIIIO=6+O100+O1O0
loop
exitwhen IIII0O>IIIIIO
call MultiboardSetItemWidthBJ(O1I,1,IIII0O,9.80)
call MultiboardSetItemWidthBJ(O1I,2,IIII0O,4.20)
call MultiboardSetItemWidthBJ(O1I,3,IIII0O,4.00)
call MultiboardSetItemWidthBJ(O1I,4,IIII0O,4.60)
call MultiboardSetItemColorBJ(O1I,2,IIII0O,86.20,86.20,0.00,0)
call MultiboardSetItemColorBJ(O1I,3,IIII0O,100.00,0.00,0.00,0)
call MultiboardSetItemColorBJ(O1I,4,IIII0O,0.00,5.00,100.00,0)
set IIII0O=IIII0O+1
endloop
set IIII0O=1
set IIIIIO=4
loop
exitwhen IIII0O>IIIIIO
set I10010=1
set I10IO0=6+O100+O1O0
loop
exitwhen I10010>I10IO0
call MultiboardSetItemStyleBJ(O1I,IIII0O,I10010,true,false)
set I10010=I10010+1
endloop
set IIII0O=IIII0O+1
endloop
set IIII0O=1
set IIIIIO=O1O0
loop
exitwhen IIII0O>IIIIIO
call MultiboardSetItemStyleBJ(O1I,1,IIII0O+2,true,true)
set O1011O[GetPlayerId(O1I0[IIII0O])]=1-1
set O1IOOO[GetPlayerId(O1I0[IIII0O])]=IIII0O+2-1
call MultiboardSetItemValueBJ(O1I,1,IIII0O+2,I10OIO(O1I0[IIII0O]))
call MultiboardSetItemColorBJ(O1I,1,IIII0O+2,II110O(O1I0[IIII0O])/ 255.0*100,II11IO(O1I0[IIII0O])/ 255.0*100,II111O(O1I0[IIII0O])/ 255.0*100,0)
call MultiboardSetItemValueBJ(O1I,2,(IIII0O+2),"")
call MultiboardSetItemValueBJ(O1I,3,(IIII0O+2),"0")
call MultiboardSetItemValueBJ(O1I,4,(IIII0O+2),"0")
set IIII0O=IIII0O+1
endloop
set IIII0O=1
set IIIIIO=O100
loop
exitwhen IIII0O>IIIIIO
call MultiboardSetItemStyleBJ(O1I,1,IIII0O+3+O1O0,true,true)
set O1011O[GetPlayerId(O110[IIII0O])]=1-1
set O1IOOO[GetPlayerId(O110[IIII0O])]=IIII0O+3+O1O0-1
call MultiboardSetItemValueBJ(O1I,1,IIII0O+3+O1O0,I10OIO(O110[IIII0O]))
call MultiboardSetItemColorBJ(O1I,1,IIII0O+3+O1O0,II110O(O110[IIII0O])/ 255.0*100,II11IO(O110[IIII0O])/ 255.0*100,II111O(O110[IIII0O])/ 255.0*100,0)
call MultiboardSetItemValueBJ(O1I,2,(IIII0O+3+O1O0),"")
call MultiboardSetItemValueBJ(O1I,3,(IIII0O+3+O1O0),"0")
call MultiboardSetItemValueBJ(O1I,4,(IIII0O+3+O1O0),"0")
set IIII0O=IIII0O+1
endloop
call MultiboardSetItemValueBJ(O1I,1,6+O100+O1O0-2,"Time Elapsed")
call MultiboardSetItemColorBJ(O1I,3,6+O100+O1O0-2,100.00,100.00,100.00,0)
call MultiboardSetItemValueBJ(O1I,1,6+O100+O1O0-1,(O0O[GetPlayerId(III0[0])]+("Towers Lost|r")))
call MultiboardSetItemValueBJ(O1I,1,6+O100+O1O0,(O0O[GetPlayerId(II10[0])]+("Towers Lost|r")))
call MultiboardSetItemValueBJ(O1I,3,6+O100+O1O0-1,"0")
call MultiboardSetItemValueBJ(O1I,3,6+O100+O1O0,"0")
if GetTriggerExecCount(I01I0)==1 then
endif
if I0OI and(GetLocalPlayer()==O1OOIO or GetLocalPlayer()==O1OO1O)and GetTriggerExecCount(I01I0)==1 then
call MultiboardDisplay(O1I,false)
endif
endfunction
function I10I00 takes nothing returns nothing
local integer IIII0O
local integer IIIIIO
call MultiboardSetItemValueBJ(O1I,3,2,(""+I2S(IOO[GetPlayerId(III0[0])])))
call MultiboardSetItemValueBJ(O1I,4,2,(""+I2S(IIO[GetPlayerId(III0[0])])))
call MultiboardSetItemValueBJ(O1I,3,3+O1O0,(""+I2S(IOO[GetPlayerId(II10[0])])))
call MultiboardSetItemValueBJ(O1I,4,3+O1O0,(""+I2S(IIO[GetPlayerId(II10[0])])))
set IIII0O=1
set IIIIIO=O1O0
loop
exitwhen IIII0O>IIIIIO
call MultiboardSetItemValueBJ(O1I,3,(IIII0O+2),(""+I2S(IOO[GetPlayerId(O1I0[IIII0O])])))
call MultiboardSetItemValueBJ(O1I,4,(IIII0O+2),(""+I2S(IIO[GetPlayerId(O1I0[IIII0O])])))
set IIII0O=IIII0O+1
endloop
set IIII0O=1
set IIIIIO=O100
loop
exitwhen IIII0O>IIIIIO
call MultiboardSetItemValueBJ(O1I,3,(IIII0O+3+O1O0),(""+I2S(IOO[GetPlayerId(O110[IIII0O])])))
call MultiboardSetItemValueBJ(O1I,4,(IIII0O+3+O1O0),(""+I2S(IIO[GetPlayerId(O110[IIII0O])])))
set IIII0O=IIII0O+1
endloop
endfunction
function I10II0 takes nothing returns boolean
if(GetUnitTypeId(GetTriggerUnit())==1697656914)then
return true
endif
if(GetUnitTypeId(GetTriggerUnit())==1697657137)then
return true
endif
if(GetUnitTypeId(GetTriggerUnit())==1697656915)then
return true
endif
if(GetUnitTypeId(GetTriggerUnit())==1697657145)then
return true
endif
return false
endfunction
function I10I10 takes nothing returns nothing
set OO0[1]=(OO0[1]+1)
endfunction
function I101O0 takes nothing returns boolean
if(GetUnitTypeId(GetTriggerUnit())==1966092365)then
return true
endif
if(GetUnitTypeId(GetTriggerUnit())==1966092356)then
return true
endif
if(GetUnitTypeId(GetTriggerUnit())==1966092366)then
return true
endif
if(GetUnitTypeId(GetTriggerUnit())==1966092372)then
return true
endif
return false
endfunction
function I10100 takes nothing returns nothing
set OO0[2]=(OO0[2]+1)
endfunction
function I101I0 takes nothing returns nothing
local integer IIII0O
local integer IIIIIO
local string O101O0
if I0OI and(GetLocalPlayer()==O1OOIO or GetLocalPlayer()==O1OO1O)then
else
call MultiboardDisplay(O1I,true)
endif
call SetWaterBaseColor(0,0,255,255)
set IIII0O=1
set IIIIIO=O1O0
loop
exitwhen IIII0O>IIIIIO
call MultiboardSetItemIconBJ(O1I,1,IIII0O+2,I1IOOO(OI10[GetPlayerId(O1I0[IIII0O])]))
if(I1I11O(OI10[GetPlayerId(O1I0[IIII0O])])and OI10[GetPlayerId(O1I0[IIII0O])]!=null and TimerGetRemaining(I0O[GetPlayerId(O1I0[IIII0O])])>0)then
call MultiboardSetItemValueBJ(O1I,2,(IIII0O+2),(""+I2S(R2I(TimerGetRemaining(I0O[GetPlayerId(O1I0[IIII0O])])))))
else
call MultiboardSetItemValueBJ(O1I,2,(IIII0O+2),"")
endif
set IIII0O=IIII0O+1
endloop
set IIII0O=1
set IIIIIO=O100
loop
exitwhen IIII0O>IIIIIO
call MultiboardSetItemIconBJ(O1I,1,IIII0O+3+O1O0,I1IOOO(OI10[GetPlayerId(O110[IIII0O])]))
if(I1I11O(OI10[GetPlayerId(O110[IIII0O])])and OI10[GetPlayerId(O110[IIII0O])]!=null and TimerGetRemaining(I0O[GetPlayerId(O110[IIII0O])])>0)then
call MultiboardSetItemValueBJ(O1I,2,(IIII0O+3+O1O0),(""+I2S(R2I(TimerGetRemaining(I0O[GetPlayerId(O110[IIII0O])])))))
else
call MultiboardSetItemValueBJ(O1I,2,(IIII0O+3+O1O0),"")
endif
set IIII0O=IIII0O+1
endloop
set O00=((R2I(TimerGetElapsed(I1O))/ 60)-(1/ 2))
set OI0=ModuloInteger(R2I(TimerGetElapsed(I1O)),60)
if(OI0<10)then
set O101O0=I2S(O00)+":0"+I2S(OI0)
else
set O101O0=I2S(O00)+":"+I2S(OI0)
endif
call MultiboardSetItemValueBJ(O1I,3,6+O100+O1O0-2,""+O101O0)
call MultiboardSetItemValueBJ(O1I,3,6+O100+O1O0-1,O0O[GetPlayerId(III0[0])]+""+I2S(OO0[1]))
call MultiboardSetItemValueBJ(O1I,3,6+O100+O1O0,O0O[GetPlayerId(II10[0])]+""+I2S(OO0[2])+"|r")
endfunction
function Trig_CS_Board_Actions takes nothing returns nothing
set I110[GetPlayerId(III0[1])]=CreateLeaderboard()
set I110[GetPlayerId(III0[2])]=CreateLeaderboard()
set I110[GetPlayerId(III0[3])]=CreateLeaderboard()
set I110[GetPlayerId(III0[4])]=CreateLeaderboard()
set I110[GetPlayerId(III0[5])]=CreateLeaderboard()
set I110[GetPlayerId(II10[1])]=CreateLeaderboard()
set I110[GetPlayerId(II10[2])]=CreateLeaderboard()
set I110[GetPlayerId(II10[3])]=CreateLeaderboard()
set I110[GetPlayerId(II10[4])]=CreateLeaderboard()
set I110[GetPlayerId(II10[5])]=CreateLeaderboard()
call PlayerSetLeaderboard(III0[1],I110[GetPlayerId(III0[1])])
call PlayerSetLeaderboard(III0[2],I110[GetPlayerId(III0[2])])
call PlayerSetLeaderboard(III0[3],I110[GetPlayerId(III0[3])])
call PlayerSetLeaderboard(III0[4],I110[GetPlayerId(III0[4])])
call PlayerSetLeaderboard(III0[5],I110[GetPlayerId(III0[5])])
call PlayerSetLeaderboard(II10[1],I110[GetPlayerId(II10[1])])
call PlayerSetLeaderboard(II10[2],I110[GetPlayerId(II10[2])])
call PlayerSetLeaderboard(II10[3],I110[GetPlayerId(II10[3])])
call PlayerSetLeaderboard(II10[4],I110[GetPlayerId(II10[4])])
call PlayerSetLeaderboard(II10[5],I110[GetPlayerId(II10[5])])
call LeaderboardDisplay(I110[GetPlayerId(III0[1])],false)
call LeaderboardDisplay(I110[GetPlayerId(III0[2])],false)
call LeaderboardDisplay(I110[GetPlayerId(III0[3])],false)
call LeaderboardDisplay(I110[GetPlayerId(III0[4])],false)
call LeaderboardDisplay(I110[GetPlayerId(III0[5])],false)
call LeaderboardDisplay(I110[GetPlayerId(II10[1])],false)
call LeaderboardDisplay(I110[GetPlayerId(II10[2])],false)
call LeaderboardDisplay(I110[GetPlayerId(II10[3])],false)
call LeaderboardDisplay(I110[GetPlayerId(II10[4])],false)
call LeaderboardDisplay(I110[GetPlayerId(II10[5])],false)
call LeaderboardSetLabelBJ(I110[GetPlayerId(III0[1])],"Creep Kills:0 Denies:0")
call LeaderboardSetLabelBJ(I110[GetPlayerId(III0[2])],"Creep Kills:0 Denies:0")
call LeaderboardSetLabelBJ(I110[GetPlayerId(III0[3])],"Creep Kills:0 Denies:0")
call LeaderboardSetLabelBJ(I110[GetPlayerId(III0[4])],"Creep Kills:0 Denies:0")
call LeaderboardSetLabelBJ(I110[GetPlayerId(III0[5])],"Creep Kills:0 Denies:0")
call LeaderboardSetLabelBJ(I110[GetPlayerId(II10[1])],"Creep Kills:0 Denies:0")
call LeaderboardSetLabelBJ(I110[GetPlayerId(II10[2])],"Creep Kills:0 Denies:0")
call LeaderboardSetLabelBJ(I110[GetPlayerId(II10[3])],"Creep Kills:0 Denies:0")
call LeaderboardSetLabelBJ(I110[GetPlayerId(II10[4])],"Creep Kills:0 Denies:0")
call LeaderboardSetLabelBJ(I110[GetPlayerId(II10[5])],"Creep Kills:0 Denies:0")
endfunction
function I10110 takes nothing returns string
return IO00OO
endfunction
function I1IOO0 takes nothing returns string
return O0I1O
endfunction
function I1IO00 takes player II01IO returns string
return I1IOOO(OI10[GetPlayerId(II01IO)])
endfunction
function I1IOI0 takes player II01IO,integer I1IO10 returns string
return O1OIO0(UnitItemInSlot(OI10[GetPlayerId(II01IO)],I1IO10-1))
endfunction
function I1I0O0 takes player II01IO returns string
return O0O[GetPlayerId(II01IO)]+I10OIO(II01IO)+"|r"
endfunction
function I1I000 takes player II01IO returns string
return O01OO[GetPlayerId(II01IO)]
endfunction
function O10100 takes nothing returns nothing
local integer i=1
local multiboarditem O10II0
loop
exitwhen i>O1I00O
if I1I000(O1I0OO[i])!="Here" then
set O10II0=MultiboardGetItem(O1IO0O,O1IOIO[i],O1IO1O[i])
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,"|c00555555"+I1I000(O1I0OO[i])+"|r")
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
endif
set i=i+1
endloop
endfunction
function I1I0I0 takes player II01IO returns string
local string IIOO0O=I2S(GetPlayerState(II01IO,PLAYER_STATE_RESOURCE_GOLD))
local string I1I010=IIOO0O
if II01IO==GetLocalPlayer()then
set I1I010=O1I0IO+IIOO0O+"|r"
endif
return I1I010
endfunction
function I1IIO0 takes player II01IO returns string
local string IIOO0O=I2S(II000O("Stats"+I2S(GetPlayerId(II01IO)),"NumOfConsumables"))
local string I1I010=IIOO0O
if II01IO==GetLocalPlayer()then
set I1I010=O1I0IO+IIOO0O+"|r"
endif
return I1I010
endfunction
function I1II00 takes player II01IO returns string
local string IIOO0O=I2S(GetUnitLevel(OI10[GetPlayerId(II01IO)]))
local string I1I010=IIOO0O
if II01IO==GetLocalPlayer()then
set I1I010=O1I0IO+IIOO0O+"|r"
endif
return I1I010
endfunction
function I1III0 takes player II01IO returns string
local string IIOO0O=I2S(II000O("Stats"+I2S(GetPlayerId(II01IO)),"NumOfWards"))
local string I1I010=IIOO0O
if II01IO==GetLocalPlayer()then
set I1I010=O1I0IO+IIOO0O+"|r"
endif
return I1I010
endfunction
function I1II10 takes player II01IO returns string
local string IIOO0O=I2S(O11OIO[GetPlayerId(II01IO)])
local string I1I010=IIOO0O
if II01IO==GetLocalPlayer()then
set I1I010=O1I0IO+IIOO0O+"|r"
endif
return I1I010
endfunction
function I1I1O0 takes player II01IO returns string
local string IIOO0O=I2S(O1I10O[GetPlayerId(II01IO)])
local string I1I010=IIOO0O
if II01IO==GetLocalPlayer()then
set I1I010=O1I0IO+IIOO0O+"|r"
endif
return I1I010
endfunction
function I1I100 takes player II01IO returns string
local string IIOO0O=I2S(IOO[GetPlayerId(II01IO)])
local string I1I010=IIOO0O
if II01IO==GetLocalPlayer()then
set I1I010=O1I0IO+IIOO0O+"|r"
endif
return I1I010
endfunction
function I1I1I0 takes player II01IO returns string
local string IIOO0O=I2S(IIO[GetPlayerId(II01IO)])
local string I1I010=IIOO0O
if II01IO==GetLocalPlayer()then
set I1I010=O1I0IO+IIOO0O+"|r"
endif
return I1I010
endfunction
function I1I110 takes player II01IO returns string
local string IIOO0O=I2S(I0O0[GetPlayerId(II01IO)])
local string I1I010=IIOO0O
if II01IO==GetLocalPlayer()then
set I1I010=O1I0IO+IIOO0O+"|r"
endif
return I1I010
endfunction
function I11OO0 takes player II01IO returns string
local string IIOO0O=I2S(I000[GetPlayerId(II01IO)])
local string I1I010=IIOO0O
if II01IO==GetLocalPlayer()then
set I1I010=O1I0IO+IIOO0O+"|r"
endif
return I1I010
endfunction
function I11O00 takes player II01IO returns string
local string IIOO0O=I2S(II000O("Stats"+I2S(GetPlayerId(II01IO)),"NumOfNeutrals"))
local string I1I010=IIOO0O
if II01IO==GetLocalPlayer()then
set I1I010=O1I0IO+IIOO0O+"|r"
endif
return I1I010
endfunction
function I11OI0 takes player II01IO returns string
local string IIOO0O=I2S(O1I11O[GetPlayerId(II01IO)])
local string I1I010=IIOO0O
if II01IO==GetLocalPlayer()then
set I1I010=O1I0IO+IIOO0O+"|r"
endif
return I1I010
endfunction
function I11O10 takes player II01IO returns string
local string IIOO0O=I2S(O11OOO[GetPlayerId(II01IO)])
local string I1I010=IIOO0O
if II01IO==GetLocalPlayer()then
set I1I010=O1I0IO+IIOO0O+"|r"
endif
return I1I010
endfunction
function I110O0 takes player II01IO returns string
local string IIOO0O=I2S(O1I1IO[GetPlayerId(II01IO)])
local string I1I010=IIOO0O
if II01IO==GetLocalPlayer()then
set I1I010=O1I0IO+IIOO0O+"|r"
endif
return I1I010
endfunction
function I11000 takes player II01IO returns string
local string I110I0
local string I11010
local string I1I010
local integer k=O111OO[GetPlayerId(II01IO)]
local integer d=O110OO[GetPlayerId(II01IO)]
if k<1 then
set k=0
endif
if d<1 then
set d=0
endif
set I110I0=I2S(k)
set I11010=I2S(d)
set I1I010=I110I0+"/"+I11010
if II01IO==GetLocalPlayer()then
set I1I010=O1I0IO+I110I0+"|r/"+O1I0IO+I11010+"|r"
endif
return I1I010
endfunction
function I11IO0 takes player II01IO returns string
local integer I11I00=O11O0O[GetPlayerId(II01IO)]
local string O101O0
local integer I11II0
local integer I11I10
set I11II0=(I11I00/ 60)-(1/ 2)
set I11I10=ModuloInteger(I11I00,60)
if(I11I10<10)then
set O101O0=I2S(I11II0)+":0"+I2S(I11I10)
else
set O101O0=I2S(I11II0)+":"+I2S(I11I10)
endif
if II01IO==GetLocalPlayer()then
set O101O0=O1I0IO+O101O0+"|r"
endif
return O101O0
endfunction
function I111O0 takes player OOI0I0,player OOI010 returns string
local string I110I0
local string I11010
local string I1I010
local integer k=II000O("Stats"+I2S(GetPlayerId(OOI0I0)),"Killed"+I2S(GetPlayerId(OOI010)))
local integer d=II000O("Stats"+I2S(GetPlayerId(OOI0I0)),"Died To"+I2S(GetPlayerId(OOI010)))
if k<1 then
set k=0
endif
if d<1 then
set d=0
endif
set I110I0=I2S(k)
set I11010=I2S(d)
set I1I010=I110I0+"/"+I11010
if OOI0I0==GetLocalPlayer()then
set I1I010=O1I0IO+I110I0+"|r/"+O1I0IO+I11010+"|r"
endif
return I1I010
endfunction
function I11100 takes nothing returns string
return"|c00ff0303"+I2S(IOO[GetPlayerId(III0[0])])+"|r/|c0020c000"+I2S(IIO[GetPlayerId(III0[0])])+"|r"
endfunction
function I111I0 takes nothing returns nothing
local integer I11110=O1O0
local integer OOOOOI=O100
local player array OOOO0I
local player array OOOOII
local integer OOOO1I
local integer OOO0OI
local integer OOO00I=19+OO0I10(I11110,OOOOOI)+1
local integer OOO0II=1+(I11110+OOOOOI)*2
local multiboarditem O10II0
local integer i
local integer x
local integer curRow1
local integer curRow2
local string e="|r"
local string c0="|cff99ccff"
local integer OOO01I
local integer OOOIOI
call DisableTrigger(IIOI0)
call DestroyMultiboard(O1I)
if I11110>0 and OOOOOI>0 then
set OOO00I=OOO00I+2
endif
set O1IO0O=CreateMultiboard()
call MultiboardSetItemsWidth(O1IO0O,0)
call MultiboardSetRowCount(O1IO0O,OOO00I)
call MultiboardSetColumnCount(O1IO0O,OOO0II)
call MultiboardSetTitleText(O1IO0O,"DotA Allstars Scores"+"-"+I10110())
call MultiboardMinimize(O1IO0O,true)
call MultiboardSetItemsStyle(O1IO0O,false,false)
call MultiboardDisplay(O1IO0O,true)
call MultiboardMinimize(O1IO0O,false)
call MultiboardSetTitleText(O1IO0O,"DotA Allstars Scores"+"-"+I10110()+"-"+I11100())
set x=1
set i=1
loop
exitwhen i>5
if II010O(III0[i])or GetPlayerSlotState(III0[i])==PLAYER_SLOT_STATE_LEFT then
set OOOO0I[x]=III0[i]
set x=x+1
endif
set i=i+1
endloop
set x=1
set i=1
loop
exitwhen i>5
if II010O(II10[i])or GetPlayerSlotState(II10[i])==PLAYER_SLOT_STATE_LEFT then
set OOOOII[x]=II10[i]
set x=x+1
endif
set i=i+1
endloop
set i=0
set OOO0OI=0
loop
exitwhen i>OOO00I
set O10II0=MultiboardGetItem(O1IO0O,i,OOO0OI)
call MultiboardSetItemWidth(O10II0,0.075)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOOO1I=0
set OOO0OI=0
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,"")
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,false)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1I0O0(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1I0O0(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOOO1I=OOOO1I+1
set OOO0OI=0
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,false)
call MultiboardReleaseItem(O10II0)
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,true)
call MultiboardSetItemValue(O10II0,I1II00(OOOO0I[i]))
call MultiboardSetItemIcon(O10II0,I1IO00(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,true)
call MultiboardSetItemValue(O10II0,I1II00(OOOOII[i]))
call MultiboardSetItemIcon(O10II0,I1IO00(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOOO1I=OOOO1I+1
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Items"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,I1IOI0(OOOO0I[i],1))
call MultiboardSetItemWidth(O10II0,0.015)
call MultiboardReleaseItem(O10II0)
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,I1IOI0(OOOO0I[i],2))
call MultiboardSetItemWidth(O10II0,0.054)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,I1IOI0(OOOOII[i],1))
call MultiboardSetItemWidth(O10II0,0.015)
call MultiboardReleaseItem(O10II0)
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,I1IOI0(OOOOII[i],2))
call MultiboardSetItemWidth(O10II0,0.054)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOOO1I=OOOO1I+1
set OOO0OI=0
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+""+e)
call MultiboardReleaseItem(O10II0)
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,I1IOI0(OOOO0I[i],3))
call MultiboardSetItemWidth(O10II0,0.015)
call MultiboardReleaseItem(O10II0)
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,I1IOI0(OOOO0I[i],4))
call MultiboardSetItemWidth(O10II0,0.054)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,I1IOI0(OOOOII[i],3))
call MultiboardSetItemWidth(O10II0,0.015)
call MultiboardReleaseItem(O10II0)
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,I1IOI0(OOOOII[i],4))
call MultiboardSetItemWidth(O10II0,0.054)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOOO1I=OOOO1I+1
set OOO0OI=0
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+""+e)
call MultiboardReleaseItem(O10II0)
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,I1IOI0(OOOO0I[i],5))
call MultiboardSetItemWidth(O10II0,0.015)
call MultiboardReleaseItem(O10II0)
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,I1IOI0(OOOO0I[i],6))
call MultiboardSetItemWidth(O10II0,0.054)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,I1IOI0(OOOOII[i],5))
call MultiboardSetItemWidth(O10II0,0.015)
call MultiboardReleaseItem(O10II0)
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,I1IOI0(OOOOII[i],6))
call MultiboardSetItemWidth(O10II0,0.054)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Current Gold"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1I0I0(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1I0I0(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Hero K/D"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1I100(OOOO0I[i])+"/"+I1I1I0(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1I100(OOOOII[i])+"/"+I1I1I0(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Wards"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1III0(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1III0(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Tower Stats"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I11000(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I11000(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Creep Stats"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1I110(OOOO0I[i])+"/"+I11OO0(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1I110(OOOOII[i])+"/"+I11OO0(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Neutral Kills"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I11O00(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I11O00(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Hero Kill Gold"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1II10(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1II10(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Time Dead"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I11IO0(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I11IO0(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Gold Lost"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1I1O0(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1I1O0(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Consumables"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1IIO0(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1IIO0(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Double Kills"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I11OI0(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I11OI0(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Triple Kills"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I11O10(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I11O10(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Longest Spree"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I110O0(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I110O0(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
if I11110>0 and OOOOOI>0 then
set OOO0OI=0
set OOO01I=OOOO1I
set OOOIOI=OOO0OI
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Kill Details"+e)
call MultiboardReleaseItem(O10II0)
set OOOO1I=OOO01I
set x=1
loop
exitwhen x>I11110
set OOO0OI=0
set OOOO1I=OOO01I
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=x+(x-1)
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,I1IO00(OOOO0I[x]))
call MultiboardSetItemWidth(O10II0,0.01)
call MultiboardReleaseItem(O10II0)
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,true)
call MultiboardSetItemIcon(O10II0,I1IO00(OOOOII[i]))
call MultiboardSetItemValue(O10II0,""+I111O0(OOOO0I[x],OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.059)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set x=x+1
endloop
set x=I11110+1
loop
exitwhen x>(OOOOOI+I11110)
set OOO0OI=0
set OOOO1I=OOO01I
set i=1
loop
exitwhen i>I11110
set OOO0OI=x+(x-1)
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,I1IO00(OOOOII[x-I11110]))
call MultiboardSetItemWidth(O10II0,0.01)
call MultiboardReleaseItem(O10II0)
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,true)
call MultiboardSetItemIcon(O10II0,I1IO00(OOOO0I[i]))
call MultiboardSetItemValue(O10II0,""+I111O0(OOOOII[x-I11110],OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.059)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set x=x+1
endloop
endif
set OOOO1I=OOOO1I+1
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Left At"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1I000(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set O1I00O=O1I00O+1
set O1IOIO[O1I00O]=OOOO1I
set O1IO1O[O1I00O]=OOO0OI
set O1I0OO[O1I00O]=OOOO0I[i]
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1I000(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set O1I00O=O1I00O+1
set O1IOIO[O1I00O]=OOOO1I
set O1IO1O[O1I00O]=OOO0OI
set O1I0OO[O1I00O]=OOOOII[i]
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Winner"+e)
call MultiboardReleaseItem(O10II0)
set O10II0=MultiboardGetItem(O1IO0O,OOOO1I,OOO0OI+1)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,I1IOO0())
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
call MultiboardMinimize(O1IO0O,true)
call MultiboardMinimize(O1IO0O,false)
endfunction
function OOOI0I takes nothing returns string
return IO00OO
endfunction
function OOOIII takes player II01IO returns string
return I1IOOO(OI10[GetPlayerId(II01IO)])
endfunction
function OOOI1I takes player II01IO,integer I1IO10 returns string
return O1OIO0(UnitItemInSlot(OI10[GetPlayerId(II01IO)],I1IO10-1))
endfunction
function OOO1OI takes player II01IO returns string
return O0O[GetPlayerId(II01IO)]+I10OIO(II01IO)+"|r"
endfunction
function OOO10I takes player II01IO returns string
return I2S(GetPlayerState(II01IO,PLAYER_STATE_RESOURCE_GOLD))
endfunction
function OOO1II takes player p returns string
return I2S(II000O("Stats"+I2S(GetPlayerId(p)),"NumOfConsumables"))
endfunction
function OOO11I takes player p returns string
return I2S(GetUnitLevel(OI10[GetPlayerId(p)]))
endfunction
function OO0OOI takes player p returns string
return I2S(II000O("Stats"+I2S(GetPlayerId(p)),"NumOfWards"))
endfunction
function OO0O0I takes player II01IO returns string
return I2S(O11OIO[GetPlayerId(II01IO)])
endfunction
function OO0OII takes player II01IO returns string
return I2S(O1I10O[GetPlayerId(II01IO)])
endfunction
function OO0O1I takes player II01IO returns string
return I2S(IOO[GetPlayerId(II01IO)])
endfunction
function OO00OI takes player II01IO returns string
return I2S(IIO[GetPlayerId(II01IO)])
endfunction
function OO000I takes player II01IO returns string
return I2S(I0O0[GetPlayerId(II01IO)])
endfunction
function OO00II takes player II01IO returns string
return I2S(I000[GetPlayerId(II01IO)])
endfunction
function OO001I takes player p returns string
return I2S(II000O("Stats"+I2S(GetPlayerId(p)),"NumOfNeutrals"))
endfunction
function OO0IOI takes player II01IO returns string
return I2S(O1I11O[GetPlayerId(II01IO)])
endfunction
function OO0I0I takes player II01IO returns string
return I2S(O11OOO[GetPlayerId(II01IO)])
endfunction
function OO0III takes player II01IO returns string
return I2S(O1I1IO[GetPlayerId(II01IO)])
endfunction
function OO0I1I takes player II01IO returns string
local integer k=O111OO[GetPlayerId(II01IO)]
local integer d=O110OO[GetPlayerId(II01IO)]
if k<1 then
set k=0
endif
if d<1 then
set d=0
endif
return I2S(k)+"/"+I2S(d)
endfunction
function OO01OI takes player II01IO returns string
local integer I11I00=O11O0O[GetPlayerId(II01IO)]
local string O101O0
local integer I11II0
local integer I11I10
set I11II0=(I11I00/ 60)-(1/ 2)
set I11I10=ModuloInteger(I11I00,60)
if(I11I10<10)then
set O101O0=I2S(I11II0)+":0"+I2S(I11I10)
else
set O101O0=I2S(I11II0)+":"+I2S(I11I10)
endif
return O101O0
endfunction
function OO010I takes player OOI0I0,player OOI010 returns string
local integer k=II000O("Stats"+I2S(GetPlayerId(OOI0I0)),"Killed"+I2S(GetPlayerId(OOI010)))
local integer d=II000O("Stats"+I2S(GetPlayerId(OOI0I0)),"Died To"+I2S(GetPlayerId(OOI010)))
if k<1 then
set k=0
endif
if d<1 then
set d=0
endif
return I2S(k)+"/"+I2S(d)
endfunction
function OO01II takes player OOI0I0 returns string
local string OO011I
if I1I11O(OI10[GetPlayerId(OOI0I0)])then
set OO011I=I2S(R2I(TimerGetRemaining(I0O[GetPlayerId(OOI0I0)])))
else
set OO011I=""
endif
return OO011I
endfunction
function OOIOOI takes integer OOIO0I,integer OOIOII returns nothing
set O1I01O=CreateMultiboard()
call MultiboardSetItemsWidth(O1I01O,0)
call MultiboardSetRowCount(O1I01O,OOIO0I)
call MultiboardSetColumnCount(O1I01O,OOIOII)
call MultiboardSetTitleText(O1I01O,"DotA Allstars Scores"+"-"+OOOI0I())
call MultiboardMinimize(O1I01O,true)
call MultiboardSetItemsStyle(O1I01O,false,false)
if GetLocalPlayer()==O1OOIO or GetLocalPlayer()==O1OO1O then
call MultiboardDisplay(O1I01O,true)
endif
endfunction
function OOIO1I takes nothing returns string
return"|c00ff0303"+I2S(IOO[GetPlayerId(III0[0])])+"|r/|c0020c000"+I2S(IIO[GetPlayerId(III0[0])])+"|r"
endfunction
function OOI0OI takes nothing returns nothing
local integer I11110=O1O0
local integer OOOOOI=O100
local player array OOOO0I
local player array OOOOII
local integer OOOO1I
local integer OOO0OI
local integer OOO00I=19+OO0I10(I11110,OOOOOI)
local integer OOO0II=1+(I11110+OOOOOI)*2
local multiboarditem O10II0
local integer i
local integer x
local integer curRow1
local integer curRow2
local string e="|r"
local string c0="|cff99ccff"
local integer OOO01I
local integer OOOIOI
if I11110>0 and OOOOOI>0 then
set OOO00I=OOO00I+2
endif
if GetTriggerExecCount(GetTriggeringTrigger())==1 then
call OOIOOI(OOO00I,OOO0II)
endif
call MultiboardSetTitleText(O1I01O,"DotA Allstars Scores"+"-"+OOOI0I()+"-"+OOIO1I())
set x=1
set i=1
loop
exitwhen i>5
if II010O(III0[i])or GetPlayerSlotState(III0[i])==PLAYER_SLOT_STATE_LEFT then
set OOOO0I[x]=III0[i]
set x=x+1
endif
set i=i+1
endloop
set x=1
set i=1
loop
exitwhen i>5
if II010O(II10[i])or GetPlayerSlotState(II10[i])==PLAYER_SLOT_STATE_LEFT then
set OOOOII[x]=II10[i]
set x=x+1
endif
set i=i+1
endloop
set i=0
set OOO0OI=0
loop
exitwhen i>OOO00I
set O10II0=MultiboardGetItem(O1I01O,i,OOO0OI)
call MultiboardSetItemWidth(O10II0,0.075)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOOO1I=0
set OOO0OI=0
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,"")
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,false)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OOO1OI(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OOO1OI(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOOO1I=OOOO1I+1
set OOO0OI=0
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,false)
call MultiboardReleaseItem(O10II0)
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,true)
call MultiboardSetItemValue(O10II0,"("+OOO11I(OOOO0I[i])+")")
call MultiboardSetItemIcon(O10II0,OOOIII(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,true)
call MultiboardSetItemValue(O10II0,"("+OOO11I(OOOOII[i])+")")
call MultiboardSetItemIcon(O10II0,OOOIII(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOOO1I=OOOO1I+1
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Items"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,OOOI1I(OOOO0I[i],1))
call MultiboardSetItemWidth(O10II0,0.015)
call MultiboardReleaseItem(O10II0)
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,OOOI1I(OOOO0I[i],2))
call MultiboardSetItemWidth(O10II0,0.054)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,OOOI1I(OOOOII[i],1))
call MultiboardSetItemWidth(O10II0,0.015)
call MultiboardReleaseItem(O10II0)
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,OOOI1I(OOOOII[i],2))
call MultiboardSetItemWidth(O10II0,0.054)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOOO1I=OOOO1I+1
set OOO0OI=0
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+""+e)
call MultiboardReleaseItem(O10II0)
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,OOOI1I(OOOO0I[i],3))
call MultiboardSetItemWidth(O10II0,0.015)
call MultiboardReleaseItem(O10II0)
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,OOOI1I(OOOO0I[i],4))
call MultiboardSetItemWidth(O10II0,0.054)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,OOOI1I(OOOOII[i],3))
call MultiboardSetItemWidth(O10II0,0.015)
call MultiboardReleaseItem(O10II0)
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,OOOI1I(OOOOII[i],4))
call MultiboardSetItemWidth(O10II0,0.054)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOOO1I=OOOO1I+1
set OOO0OI=0
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+""+e)
call MultiboardReleaseItem(O10II0)
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,OOOI1I(OOOO0I[i],5))
call MultiboardSetItemWidth(O10II0,0.015)
call MultiboardReleaseItem(O10II0)
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,OOOI1I(OOOO0I[i],6))
call MultiboardSetItemWidth(O10II0,0.054)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,OOOI1I(OOOOII[i],5))
call MultiboardSetItemWidth(O10II0,0.015)
call MultiboardReleaseItem(O10II0)
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,OOOI1I(OOOOII[i],6))
call MultiboardSetItemWidth(O10II0,0.054)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Current Gold"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OOO10I(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OOO10I(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Hero K/D"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO0O1I(OOOO0I[i])+"/"+OO00OI(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO0O1I(OOOOII[i])+"/"+OO00OI(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Wards"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO0OOI(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO0OOI(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Towers Kills"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO0I1I(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO0I1I(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Creep Stats"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO000I(OOOO0I[i])+"/"+OO00II(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO000I(OOOOII[i])+"/"+OO00II(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Neutral Kills"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO001I(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO001I(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Hero Kill Gold"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO0O0I(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO0O0I(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Time Dead"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO01OI(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO01OI(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Gold Lost"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO0OII(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO0OII(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Consumables"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OOO1II(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OOO1II(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Double Kills"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO0IOI(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO0IOI(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Triple Kills"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO0I0I(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO0I0I(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Best Spree"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO0III(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,OO0III(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
if I11110>0 and OOOOOI>0 then
set OOO0OI=0
set OOO01I=OOOO1I
set OOOIOI=OOO0OI
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Kill Details"+e)
call MultiboardReleaseItem(O10II0)
set OOOO1I=OOO01I
set x=1
loop
exitwhen x>I11110
set OOO0OI=0
set OOOO1I=OOO01I
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=x+(x-1)
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,OOOIII(OOOO0I[x]))
call MultiboardSetItemWidth(O10II0,0.01)
call MultiboardReleaseItem(O10II0)
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,true)
call MultiboardSetItemIcon(O10II0,OOOIII(OOOOII[i]))
call MultiboardSetItemValue(O10II0,""+OO010I(OOOO0I[x],OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.059)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set x=x+1
endloop
set x=I11110+1
loop
exitwhen x>(OOOOOI+I11110)
set OOO0OI=0
set OOOO1I=OOO01I
set i=1
loop
exitwhen i>I11110
set OOO0OI=x+(x-1)
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,false,true)
call MultiboardSetItemIcon(O10II0,OOOIII(OOOOII[x-I11110]))
call MultiboardSetItemWidth(O10II0,0.01)
call MultiboardReleaseItem(O10II0)
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,true)
call MultiboardSetItemIcon(O10II0,OOOIII(OOOO0I[i]))
call MultiboardSetItemValue(O10II0,""+OO010I(OOOOII[x-I11110],OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.059)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set x=x+1
endloop
endif
set OOOO1I=OOOO1I+1
set OOO0OI=0
set OOOO1I=OOOO1I+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
call MultiboardSetItemStyle(O10II0,true,false)
call MultiboardSetItemValue(O10II0,c0+"Respawn"+e)
call MultiboardReleaseItem(O10II0)
set OOO0OI=0
set i=1
loop
exitwhen i>I11110
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
if OO01II(OOOO0I[i])=="" then
call MultiboardSetItemStyle(O10II0,true,false)
else
call MultiboardSetItemStyle(O10II0,true,true)
call MultiboardSetItemIcon(O10II0,OOOIII(OOOO0I[i]))
endif
call MultiboardSetItemValue(O10II0,OO01II(OOOO0I[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
set i=1
loop
exitwhen i>OOOOOI
set OOO0OI=OOO0OI+1
set O10II0=MultiboardGetItem(O1I01O,OOOO1I,OOO0OI)
if OO01II(OOOOII[i])=="" then
call MultiboardSetItemStyle(O10II0,true,false)
else
call MultiboardSetItemStyle(O10II0,true,true)
call MultiboardSetItemIcon(O10II0,OOOIII(OOOOII[i]))
endif
call MultiboardSetItemValue(O10II0,OO01II(OOOOII[i]))
call MultiboardSetItemWidth(O10II0,0.07)
call MultiboardReleaseItem(O10II0)
set i=i+1
endloop
endfunction
function OOI00I takes nothing returns nothing
local integer x=0
loop
exitwhen x>15
if GetLocalPlayer()==Player(x)then
if IOO1OO[x]then
call MultiboardSetTitleText(O1I,O0OOO+"-"+"CS:"+I2S(I0O0[x])+"/"+I2S(I000[x]))
else
call MultiboardSetTitleText(O1I,O0OOO)
endif
endif
set x=x+1
endloop
endfunction
function OOI0II takes nothing returns nothing
if(GetUnitTypeId(GetTriggerUnit())==1969711215)then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
if(GetUnitTypeId(GetTriggerUnit())==1966092337)then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
if(GetUnitTypeId(GetTriggerUnit())==1970169187)then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
if(GetUnitTypeId(GetTriggerUnit())==1966092338)then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
if(GetUnitTypeId(GetTriggerUnit())==1702061422)then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
if(GetUnitTypeId(GetTriggerUnit())==1697656918)then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
if(GetUnitTypeId(GetTriggerUnit())==1701081721)then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
if(GetUnitTypeId(GetTriggerUnit())==1697656919)then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
if(GetUnitTypeId(GetTriggerUnit())==1700946284)then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
if(GetUnitTypeId(GetTriggerUnit())==1970107511)then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I000[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=I0O0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
call OOI00I()
endfunction
function OOI01I takes unit O1IO00 returns boolean
return GetUnitTypeId(O1IO00)==1211117641 or GetUnitTypeId(O1IO00)==1211117642
endfunction
function OOIIOI takes unit O1IO00 returns boolean
local string I1I0IO=I011OO(GetOwningPlayer(O1IO00))
local unit O1I0I0=IIO1OO(I1I0IO,"Kobold0")
local unit O1I010=IIO1OO(I1I0IO,"Kobold1")
local unit O1IIO0=IIO1OO(I1I0IO,"Kobold2")
local unit O1II00=IIO1OO(I1I0IO,"Kobold3")
if GetUnitAbilityLevel(O1I0I0,1093685078)!=0 or GetUnitAbilityLevel(O1I010,1093685078)!=0 or GetUnitAbilityLevel(O1IIO0,1093685078)!=0 or GetUnitAbilityLevel(O1II00,1093685078)!=0 then
return true
endif
return false
endfunction
function OOII0I takes unit O1IO00 returns boolean
local integer i=0
local string I1I0IO=I011OO(GetOwningPlayer(O1IO00))
local unit O1I000=IIO1OO(I1I0IO,"Kobold0")
loop
exitwhen i>5
if GetItemTypeId(UnitItemInSlot(O1I000,i))==1227895112 and GetItemCharges(UnitItemInSlot(O1I000,i))>0 then
return true
endif
set i=i+1
endloop
return false
endfunction
function OOIIII takes unit O1IO00,location OOII1I returns nothing
local string I1I0IO=I011OO(GetOwningPlayer(O1IO00))
local unit O1I0I0=IIO1OO(I1I0IO,"Kobold0")
local unit O1I010=IIO1OO(I1I0IO,"Kobold1")
local unit O1IIO0=IIO1OO(I1I0IO,"Kobold2")
local unit O1II00=IIO1OO(I1I0IO,"Kobold3")
if O1I0I0!=null then
call ReviveHeroLoc(O1I0I0,OOII1I,true)
call O101I0(O1I0I0)
endif
if O1I010!=null then
call ReviveHeroLoc(O1I010,OOII1I,true)
call O101I0(O1I010)
endif
if O1IIO0!=null then
call ReviveHeroLoc(O1IIO0,OOII1I,true)
call O101I0(O1IIO0)
endif
if O1II00!=null then
call ReviveHeroLoc(O1II00,OOII1I,true)
call O101I0(O1II00)
endif
endfunction
function OOI1OI takes nothing returns real
return TimerGetElapsed(I1O)
endfunction
function OOI10I takes unit I1IIIO,real O101O0,boolean OOI1II returns nothing
set O1I1OO=O1I1OO+1
set O1II0O[O1I1OO]=I1IIIO
set O1IIIO[O1I1OO]=OOI1OI()+O101O0
set O1II1O[O1I1OO]=OOI1II
endfunction
function OOI11I takes integer i returns nothing
local unit O1IO00=O1II0O[i]
local boolean OOI1II=O1II1O[i]
local player OO1OOI=GetOwningPlayer(O1IO00)
local location OOII1I
if II0I1O(OO1OOI)then
set OOII1I=GetRectCenter(OIOOO)
else
set OOII1I=GetRectCenter(OI01O)
endif
if OOI0O==false and I1I11O(O1IO00)then
call PanCameraToTimedLocForPlayer(OO1OOI,OOII1I,1)
if OOI01I(O1IO00)==false or GetUnitAbilityLevel(O1IO00,1093684567)==0 then
call ReviveHeroLoc(O1IO00,OOII1I,true)
else
call OOIIII(O1IO00,OOII1I)
endif
if OOI1II then
call SetUnitState(O1IO00,UNIT_STATE_MANA,GetUnitState(O1IO00,UNIT_STATE_MAX_MANA))
endif
endif
call RemoveLocation(OOII1I)
set O1II0O[i]=null
set O1IIIO[i]=0
set O1II1O[i]=false
set O1IO00=null
set OO1OOI=null
set OOII1I=null
endfunction
function OO1O0I takes nothing returns boolean
local real I101IO=OOI1OI()
local integer i
set i=1
loop
exitwhen i>O1I1OO
if O1IIIO[i]<I101IO and O1IIIO[i]!=0 then
call OOI11I(i)
endif
if O1IIIO[i]!=0 and I1I11O(O1II0O[i])==false then
set O1II0O[i]=null
set O1IIIO[i]=0
set O1II1O[i]=false
endif
set i=i+1
endloop
return false
endfunction
function OO1OII takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer OO1O1I=II000O(I1I0IO,"soundIndex")
local string I1110O=II0IOO(I1I0IO,"msg")
if OO1O1I==1 then
call OIO1O0(IOOI0)
elseif OO1O1I==2 then
call OIO1O0(IOIO0)
else
call OIO1O0(IO010)
endif
call OOI110(OOIOO,10.00,I1110O)
call I0110O(I1I0IO)
call I10I1O(t)
set t=null
return false
endfunction
function OO10OI takes string I1110O,integer OO1O1I returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,1.5,false)
call TriggerAddCondition(t,Condition(function OO1OII))
call IIOIOO(I1I0IO,"msg",I1110O)
call IIO00O(I1I0IO,"soundIndex",OO1O1I)
set t=null
endfunction
function OO100I takes player OO10II,integer OO101I,unit O1IO00 returns nothing
local texttag t=CreateTextTag()
local string s
call SetPlayerState(OO10II,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(OO10II,PLAYER_STATE_RESOURCE_GOLD)+OO101I)
call SetTextTagText(t,"+"+I2S(OO101I),0.025)
call SetTextTagPosUnit(t,O1IO00,0)
call SetTextTagColor(t,255,220,0,255)
call SetTextTagVelocity(t,0,0.03)
if GetLocalPlayer()==OO10II then
call SetTextTagVisibility(t,true)
set s="UI\\Feedback\\GoldCredit\\GoldCredit.mdl"
else
call SetTextTagVisibility(t,false)
set s=""
endif
if GetUnitState(O1IO00,UNIT_STATE_LIFE)>0.5 then
call DestroyEffect(AddSpecialEffectTarget(s,O1IO00,"overhead"))
endif
call SetTextTagFadepoint(t,2)
call SetTextTagLifespan(t,3)
call SetTextTagPermanent(t,false)
endfunction
function OO1IOI takes player OO10II,integer OO101I returns nothing
local integer IIII0O=1
local integer O10010
if II0I0O(OO10II)then
set O10010=IIIO0O(IIO0)
else
set O10010=IIIO0O(II00)
endif
if II0I0O(OO10II)then
loop
exitwhen IIII0O>5
if II010O(III0[IIII0O])then
call OO100I(III0[IIII0O],OO101I/ O10010,OI10[GetPlayerId(III0[IIII0O])])
endif
set IIII0O=IIII0O+1
endloop
else
loop
exitwhen IIII0O>5
if II010O(II10[IIII0O])then
call OO100I(II10[IIII0O],OO101I/ O10010,OI10[GetPlayerId(II10[IIII0O])])
endif
set IIII0O=IIII0O+1
endloop
endif
endfunction
function OO1I0I takes unit O1IO00,integer OO1III returns nothing
local player OO1OOI=GetOwningPlayer(O1IO00)
call SetPlayerState(OO1OOI,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(OO1OOI,PLAYER_STATE_RESOURCE_GOLD)-OO1III)
endfunction
function OO1I1I takes nothing returns boolean
if GetUnitTypeId(GetFilterUnit())==1865429043 then
call KillUnit(GetFilterUnit())
return true
endif
return false
endfunction
function OO11OI takes nothing returns nothing
local boolexpr II1OIO=Condition(function OO1I1I)
local group II1O0O=I0I0OO(bj_mapInitialPlayableArea,II1OIO)
call DestroyBoolExpr(II1OIO)
call DestroyGroup(II1O0O)
endfunction
function OO110I takes unit I1IIIO returns nothing
local string I1I0IO=I011OO(GetOwningPlayer(I1IIIO))
local unit OO11II=IIO1OO(I1I0IO,"BearItemHolder")
local location OOII1I
if II0I0O(GetOwningPlayer(I1IIIO))then
set OOII1I=GetRectCenter(OI01O)
else
set OOII1I=GetRectCenter(OIOOO)
endif
if OO11II!=null then
call SetItemPositionLoc(UnitRemoveItemFromSlot(OO11II,0),OOII1I)
call SetItemPositionLoc(UnitRemoveItemFromSlot(OO11II,1),OOII1I)
call SetItemPositionLoc(UnitRemoveItemFromSlot(OO11II,2),OOII1I)
call SetItemPositionLoc(UnitRemoveItemFromSlot(OO11II,3),OOII1I)
call SetItemPositionLoc(UnitRemoveItemFromSlot(OO11II,4),OOII1I)
call SetItemPositionLoc(UnitRemoveItemFromSlot(OO11II,5),OOII1I)
endif
endfunction
function O0OOOI takes nothing returns boolean
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true then
if GetUnitTypeId(GetTriggerUnit())==1211117642 and OOII0I(GetTriggerUnit())then
return false
endif
return true
endif
return false
endfunction
function O0OO0I takes nothing returns nothing
local boolean O0OOII=false
local unit O1IO00=GetDyingUnit()
local unit O0OO1I=GetKillingUnit()
local player OO10II=GetOwningPlayer(O0OO1I)
local player OO1OOI=GetOwningPlayer(O1IO00)
local location OOII1I
local integer OO101I=0
local integer OO1III=0
local boolean O0O0OI=false
local string O0O00I=""
local string O0O0II=""
local string MidText
local integer x
local string O0O01I
local string O0OIOI
local string O0OI0I
local string O0OIII
local boolean OOI1II=false
local real O0OI1I=1
local real O0O1OI=1
local real O0O10I=1
local trigger t
local integer O0O1II
call I1I10O(O1IO00)
if GetUnitAbilityLevel(O1IO00,1093685078)!=0 or(OOI01I(O1IO00)and OOIIOI(O1IO00))then
set OOI1II=true
call UnitRemoveAbility(O1IO00,1093685078)
set O00I=O1IO00
set IOII=O0OO1I
if IsUnitType(O0OO1I,UNIT_TYPE_STRUCTURE)==false then
call ExecuteFunc("O0O11I")
endif
endif
if OO10II==null then
set OO10II=OO1OOI
endif
if OII and GetUnitTypeId(O1IO00)!=1211117642 then
set OOO0O=UnitRemoveItemFromSlot(O1IO00,GetRandomInt(0,5))
if GetItemTypeId(OOO0O)==1227894859 then
call CreateItem(1227894855,GetItemX(OOO0O),GetItemY(OOO0O))
call RemoveItem(OOO0O)
endif
endif
if II0I0O(OO1OOI)then
if II0I0O(OO10II)then
set O0OOII=true
if(OO10II==OO1OOI)then
call OOI110(OOIOO,10.00,(O0O[GetPlayerId(OO1OOI)]+I10OIO(OO1OOI)+"|r has killed himself!"))
else
call OOI110(OOIOO,10.00,O0O[GetPlayerId(OO1OOI)]+I10OIO(OO1OOI)+"|r has been killed by his teammate"+O0O[GetPlayerId(OO10II)]+I10OIO(OO10II)+"|r!")
endif
elseif II0I1O(OO10II)then
set O0O0OI=true
set IIO[GetPlayerId(III0[0])]=IIO[GetPlayerId(III0[0])]+1
set IOO[GetPlayerId(II10[0])]=IOO[GetPlayerId(II10[0])]+1
set O0[2]=O0[2]+1
set O0[1]=0
if OO10II!=II10[0]then
set IOO[GetPlayerId(OO10II)]=IOO[GetPlayerId(OO10II)]+1
set OO[GetPlayerId(OO10II)]=OO[GetPlayerId(OO10II)]+1
endif
endif
endif
if II0I1O(OO1OOI)then
if II0I1O(OO10II)then
set O0OOII=true
if(OO10II==OO1OOI)then
call OOI110(OOIOO,10.00,(O0O[GetPlayerId(OO1OOI)]+I10OIO(OO1OOI)+"|r has killed himself!"))
else
call OOI110(OOIOO,10.00,O0O[GetPlayerId(OO1OOI)]+I10OIO(OO1OOI)+"|r has been killed by his teammate"+O0O[GetPlayerId(OO10II)]+I10OIO(OO10II)+"|r!")
endif
elseif II0I0O(OO10II)then
set O0O0OI=true
set IIO[GetPlayerId(II10[0])]=IIO[GetPlayerId(II10[0])]+1
set IOO[GetPlayerId(III0[0])]=IOO[GetPlayerId(III0[0])]+1
set O0[1]=O0[1]+1
set O0[2]=0
if OO10II!=III0[0]then
set IOO[GetPlayerId(OO10II)]=IOO[GetPlayerId(OO10II)]+1
set OO[GetPlayerId(OO10II)]=OO[GetPlayerId(OO10II)]+1
endif
endif
endif
if OO10II==I1O0 then
set O0O0OI=false
if GetUnitTypeId(O0OO1I)==1848651852 then
call OOI110(OOIOO,10.00,(O0O[GetPlayerId(OO1OOI)]+I10OIO(OO1OOI)+"|r has been killed by Roshan"))
else
call OOI110(OOIOO,10.00,(O0O[GetPlayerId(OO1OOI)]+I10OIO(OO1OOI)+"|r has been killed by Neutral Creeps"))
endif
set O0OOII=true
endif
set x=OO[GetPlayerId(OO1OOI)]
if x>2 and O0OOII==false then
if x==3 then
set OO101I=50
set O0O00I="|c0000ff40killing spree|r"
elseif x==4 then
set OO101I=100
set O0O00I="|c00400080dominating|r"
elseif x==5 then
set OO101I=150
set O0O00I="|c00ff0080mega kill|r"
elseif x==6 then
set OO101I=200
set O0O00I="|c00ff8000unstoppable|r"
elseif x==7 then
set OO101I=250
set O0O00I="|c00808000wicked sick|r"
elseif x==8 then
set OO101I=300
set O0O00I="|c00ff80ffmonster kill|r"
elseif x==9 then
set OO101I=350
set O0O00I="|c00ff0000GODLIKE|r"
else
set OO101I=400
set O0O00I="|c00ff8000beyond GODLIKE|r"
endif
endif
set x=OO[GetPlayerId(OO10II)]
if x>O1I1IO[GetPlayerId(OO10II)]then
set O1I1IO[GetPlayerId(OO10II)]=x
endif
if x>2 and O0OOII==false then
if x==3 then
call OIO1O0(IO000)
set O0O0II="is on a|c0000ff40killing spree|r!"
elseif x==4 then
call OIO1O0(IOO00)
set O0O0II="is|c00400080dominating|r!"
elseif x==5 then
call OIO1O0(IO0I0)
set O0O0II="has a|c00ff0080mega kill|r!"
elseif x==6 then
call OIO1O0(IOI00)
set O0O0II="is|c00ff8000unstoppable|r!!"
elseif x==7 then
call OIO1O0(IOII0)
set O0O0II="is|c00808000wicked Sick|r!!"
elseif x==8 then
call OIO1O0(IOI10)
set O0O0II="has a|c00ff80ffmonster kill|r!!"
elseif x==9 then
call OIO1O0(IO0O0)
set O0O0II="is|c00ff0000GODLIKE|r!!!"
else
call OIO1O0(IO1O0)
set O0O0II="is|c00ff8000beyond GODLIKE|r.Someone KILL HIM!!!"
endif
endif
if O0OOII==false then
set OO101I=OO101I+100+GetHeroLevel(O1IO00)*5+100
set O0O01I=O0O[GetPlayerId(OO1OOI)]+I10OIO(OO1OOI)+"|r"
set O0OIOI=O0O[GetPlayerId(OO10II)]+I10OIO(OO10II)+"|r"
set O0OIII="|c00FFDC00"+I2S(OO101I)+"|r"
if OO10II==III0[0]then
set O0OI0I=O0OIOI+"pwned"+O0O01I+"'s head!"+O0OIII+"gold is split."
call OO1IOI(OO10II,OO101I)
elseif OO10II==II10[0]then
set O0OI0I=O0OIOI+"pwned"+O0O01I+"'s head!"+O0OIII+"gold is split."
call OO1IOI(OO10II,OO101I)
elseif O0O00I=="" and O0O0II=="" then
set O0OI0I=O0OIOI+"pwned"+O0O01I+"'s head for"+O0OIII+"gold!"
elseif O0O00I=="" and O0O0II!="" then
set O0OI0I=O0OIOI+"pwned"+O0O01I+"'s head for"+O0OIII+"gold!"
elseif O0O00I!="" and O0O0II=="" then
set O0OI0I=O0OIOI+"has just ended"+O0O01I+"'s"+O0O00I+"streak for"+O0OIII+"gold!"
elseif O0O00I!="" and O0O0II!="" then
set O0OI0I=O0OIOI+"has just ended"+O0O01I+"'s"+O0O00I+"streak for"+O0OIII+"gold!"
endif
call OOI110(OOIOO,10,O0OI0I)
if O0O0II!="" then
call OOI110(OOIOO,10,O0OIOI+O0O0II)
endif
call OO100I(OO10II,OO101I,O1IO00)
set O11OIO[GetPlayerId(OO10II)]=O11OIO[GetPlayerId(OO10II)]+OO101I
if O0[1]>4 then
call OO10OI(O0O[GetPlayerId(III0[0])]+"The Sentinel|r are"+O0O[GetPlayerId(III0[0])]+"OWNING!!!|r",3)
endif
if O0[2]>4 then
call OO10OI(O0O[GetPlayerId(II10[0])]+"The Scourge|r are"+O0O[GetPlayerId(II10[0])]+"OWNING!!!|r",3)
endif
endif
set OO1III=GetHeroLevel(O1IO00)*30
if OO00I0(O1IO00,1227895109)!=null then
if GetItemCharges(OO00I0(O1IO00,1227895109))>0 then
set O0O1OI=0.8
set OO1III=R2I(OO1III*0.6)
else
set O0O10I=0.9
set OO1III=R2I(OO1III*0.8)
endif
endif
if O0OOII==false and OO00I0(OI10[GetPlayerId(GetOwningPlayer(O0OO1I))],1227895109)!=null then
call SetItemCharges(OO00I0(OI10[GetPlayerId(GetOwningPlayer(O0OO1I))],1227895109),OO0I10(GetItemCharges(OO00I0(OI10[GetPlayerId(GetOwningPlayer(O0OO1I))],1227895109))+1,2))
endif
if OOI1II==false then
set O1I10O[GetPlayerId(OO1OOI)]=O1I10O[GetPlayerId(OO1OOI)]+OO1III
call OO1I0I(O1IO00,OO1III)
endif
call IIO00O("Stats"+I2S(GetPlayerId(OO10II)),"Killed"+I2S(GetPlayerId(OO1OOI)),II000O("Stats"+I2S(GetPlayerId(OO10II)),"Killed"+I2S(GetPlayerId(OO1OOI)))+1)
call IIO00O("Stats"+I2S(GetPlayerId(OO1OOI)),"Died To"+I2S(GetPlayerId(OO10II)),II000O("Stats"+I2S(GetPlayerId(OO1OOI)),"Died To"+I2S(GetPlayerId(OO10II)))+1)
call StartTimerBJ(O1O[GetPlayerId(OO10II)],false,11.50)
if O0OOII==false and OO10II!=III0[0]and OO10II!=II10[0]and OO10II!=I1O0 then
set IO[GetPlayerId(OO10II)]=IO[GetPlayerId(OO10II)]+1
if IO[GetPlayerId(OO10II)]==2 then
set O1I11O[GetPlayerId(OO10II)]=O1I11O[GetPlayerId(OO10II)]+1
call OO10OI(O0O[GetPlayerId(OO10II)]+I10OIO(OO10II)+"|r just got a|c000000ffDouble Kill|r!",1)
endif
if IO[GetPlayerId(OO10II)]>2 then
set O11OOO[GetPlayerId(OO10II)]=O11OOO[GetPlayerId(OO10II)]+1
call OO10OI(O0O[GetPlayerId(OO10II)]+I10OIO(OO10II)+"|r just got a|c0000ff40Triple Kill|r!!!",2)
endif
endif
if(O0OOII==false)then
set OO[GetPlayerId(OO1OOI)]=0
endif
set OO[0]=0
set OO[6]=0
set IIO[GetPlayerId(OO1OOI)]=IIO[GetPlayerId(OO1OOI)]+1
if OOI1II then
set O0OI1I=0.4
endif
set O0O1II=R2I(GetHeroLevel(O1IO00)*4*O0OI1I*O0O1OI*O0O10I)
if IO10IO then
set O11O0O[GetPlayerId(OO1OOI)]=0
call TimerStart(I0O[GetPlayerId(OO1OOI)],1.00,false,null)
else
set O11O0O[GetPlayerId(OO1OOI)]=O11O0O[GetPlayerId(OO1OOI)]+O0O1II
call TimerStart(I0O[GetPlayerId(OO1OOI)],O0O1II,false,null)
endif
call TriggerExecute(I0110)
if II0==false then
call OOI10I(O1IO00,O0O1II,OOI1II)
else
if(II0I0O(OO1OOI))then
set I00[0]=I00[0]+1
endif
if II0I1O(OO1OOI)then
set I00[1]=I00[1]+1
endif
set I0I0[GetPlayerId(OO1OOI)]=O1IO00
if GetUnitTypeId(O1IO00)==1211117642 then
set I0I0[GetPlayerId(OO1OOI)]=IIO1OO(I011OO(GetOwningPlayer(O1IO00)),"Kobold0")
endif
if I00[0]==IO101O then
call TriggerExecute(O11IOO)
endif
if I00[1]==IO101O then
call TriggerExecute(O1101O)
endif
if(GetUnitTypeId(O1IO00)==1429221430)then
call ExecuteFunc("OO11OI")
endif
endif
endfunction
function O00OOI takes nothing returns boolean
if(IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)==false)then
return false
endif
if(GetPlayerController(GetOwningPlayer(GetKillingUnit()))!=MAP_CONTROL_USER)then
return false
endif
if(GetDyingUnit()==GetKillingUnit())then
return false
endif
if(GetOwningPlayer(GetKillingUnit())==null)then
return false
endif
if(II0I0O(GetOwningPlayer(GetKillingUnit())))then
if(II0I0O(GetOwningPlayer(GetDyingUnit())))then
return false
endif
endif
if(II0I1O(GetOwningPlayer(GetKillingUnit())))then
if(II0I1O(GetOwningPlayer(GetDyingUnit())))then
return false
endif
endif
return true
endfunction
function O00O0I takes nothing returns nothing
call DisableTrigger(II000)
call OOI110(OOIOO,10.00,(O0O[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+(I10OIO(GetOwningPlayer(GetKillingUnit()))+("|r just drew"+("|c00ff0303first blood!|r(+200 gold)")))))
call AdjustPlayerStateBJ(200,GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
call OIO1O0(IOO10)
endfunction
function O00OII takes nothing returns boolean
return GetUnitTypeId(GetDyingUnit())==1848651852
endfunction
function IsHero takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true
endfunction
function O00O1I takes nothing returns nothing
local location O000OI=GetRectCenter(O110O)
local real I11OIO
set O11O1O=O11O1O+1
set IOI=CreateUnitAtLoc(Player(12),1848651852,O000OI,bj_UNIT_FACING)
call RemoveLocation(O000OI)
if O11O1O>1 then
call UnitRemoveAbility(IOI,1093684018)
call UnitAddAbility(IOI,1093685558)
call UnitAddItem(IOI,CreateItem(1936221537,0,0))
endif
call UnitAddItem(IOI,CreateItem(1227895112,0,0))
call SetPlayerTechResearched(GetOwningPlayer(IOI),1378889798,O11O1O)
set I11OIO=OO0100(175+50*O11O1O,300)
call SetUnitScale(IOI,0.01*I11OIO,0.01*I11OIO,0.01*I11OIO)
endfunction
function O0000I takes nothing returns nothing
local timer t=CreateTimer()
call TimerStart(t,600,false,function O00O1I)
if(II0I0O(GetOwningPlayer(GetKillingUnit())))then
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"Roshan has been slain by the|c00ff0000Sentinel|r!Each Sentinel player receives 200 bonus gold.")
call AdjustPlayerStateBJ(200,III0[1],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(200,III0[2],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(200,III0[3],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(200,III0[4],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(200,III0[5],PLAYER_STATE_RESOURCE_GOLD)
endif
if(II0I1O(GetOwningPlayer(GetKillingUnit())))then
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"Roshan has been slain by the|c00004000Scourge|r!Each Scourge player receives 200 bonus gold.")
call AdjustPlayerStateBJ(200,II10[1],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(200,II10[2],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(200,II10[3],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(200,II10[4],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(200,II10[5],PLAYER_STATE_RESOURCE_GOLD)
endif
endfunction
function O000II takes unit u,player p returns nothing
local texttag t=CreateTextTag()
call SetTextTagText(t,"!",0.03)
call SetTextTagPosUnit(t,u,0)
call SetTextTagColorBJ(t,O1O00O[GetPlayerId(p)],O1O0IO[GetPlayerId(p)],O1O01O[GetPlayerId(p)],15)
call SetTextTagVelocity(t,0,0.035)
call SetTextTagFadepoint(t,3)
call SetTextTagLifespan(t,1.5)
call SetTextTagPermanent(t,false)
call SetTextTagVisibility(t,false)
if IOO11O[GetPlayerId(GetLocalPlayer())]==true or(I0OI and(GetLocalPlayer()==O1OOIO or GetLocalPlayer()==O1OO1O))then
call SetTextTagVisibility(t,true)
endif
set t=null
endfunction
function O0001I takes nothing returns nothing
if IsUnitType(GetEnumUnit(),UNIT_TYPE_MELEE_ATTACKER)==true then
call AddHeroXP(GetEnumUnit(),I11OI/ I1III,true)
else
call AddHeroXP(GetEnumUnit(),I1I1I/ I1III,true)
endif
endfunction
function O00IOI takes nothing returns nothing
local group g=CreateGroup()
local integer O00I0I
local integer O00III=18
local integer O00I1I=O00III*2
call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),1000,Condition(function OI0110))
set O00I0I=O01O10(g)
set I1III=O00I0I
set I1I1I=O00III
set I11OI=O00I1I
call ForGroup(g,function O0001I)
call DestroyGroup(g)
call O000II(GetDyingUnit(),GetOwningPlayer(GetKillingUnit()))
set g=null
endfunction
function O001OI takes nothing returns boolean
if IsUnitAlly(GetKillingUnit(),GetOwningPlayer(GetTriggerUnit()))==true then
call O00IOI()
endif
return false
endfunction
function O0010I takes nothing returns nothing
if I1O10O(GetTriggerUnit())and IsUnitIllusion(GetTriggerUnit())==false then
call OOI110(OOIOO,10.00,O0O[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]+I10OIO(GetOwningPlayer(GetTriggerUnit()))+"'s|r courier has been killed by"+I10OIO(GetOwningPlayer(GetKillingUnit()))+"!")
endif
endfunction
function O001II takes nothing returns nothing
local integer id=GetUnitTypeId(GetTriggerUnit())
if IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit()))and(id==1697656914 or id==1697657137 or id==1697656915 or id==1697657145 or id==1966092365 or id==1966092356 or id==1966092366 or id==1966092372)then
set O110OO[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=O110OO[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
call OOI110(OOIOO,10,O0O[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+I10OIO(GetOwningPlayer(GetKillingUnit()))+"|r has denied a tower.")
endif
endfunction
function O0011I takes nothing returns nothing
if I1O10O(GetEnumUnit())and IsUnitAlly(GetEnumUnit(),III0[0])==false and GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)>0.5 then
call UnitRemoveAbility(GetEnumUnit(),1110456392)
call OII1O0(O0IOIO,GetEnumUnit(),3,200)
endif
endfunction
function O0IOOI takes nothing returns nothing
if I1O10O(GetEnumUnit())and IsUnitAlly(GetEnumUnit(),II10[0])==false and GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)>0.5 then
call UnitRemoveAbility(GetEnumUnit(),1110456392)
call OII1O0(OI0OOO,GetEnumUnit(),3,200)
endif
endfunction
function O0IO0I takes nothing returns boolean
local group g=CreateGroup()
call GroupEnumUnitsInRect(g,IOIOO,Condition(function OI0O00))
call ForGroup(g,function O0011I)
call DestroyGroup(g)
set g=CreateGroup()
call GroupEnumUnitsInRect(g,IOI0O,Condition(function OI0O00))
call ForGroup(g,function O0IOOI)
call DestroyGroup(g)
set g=null
return false
endfunction
function O0IOII takes integer I11II0,integer I11I10 returns nothing
local integer x=0
loop
exitwhen x>15
call SetPlayerState(Player(x),PLAYER_STATE_RESOURCE_LUMBER,I11II0)
call SetPlayerState(Player(x),PLAYER_STATE_RESOURCE_FOOD_USED,I11I10)
set x=x+1
endloop
endfunction
function O0IO1I takes nothing returns nothing
local integer OOIO10=R2I(TimerGetElapsed(I1O))
local integer I11II0=OOIO10/ 60-1/ 2
local integer I11I10=ModuloInteger(OOIO10,60)
call O0IOII(I11II0,I11I10)
endfunction
function O0I0OI takes player p returns integer
return IOO[GetPlayerId(p)]
endfunction
function O0I00I takes player p returns integer
return IIO[GetPlayerId(p)]
endfunction
function O0I0II takes player p returns integer
return I0O0[GetPlayerId(p)]
endfunction
function O0I01I takes player p returns integer
return I000[GetPlayerId(p)]
endfunction
function O0IIOI takes string winner returns nothing
local gamecache O0II0I
local integer i
local player p
local string id
call OI1000()
call FlushGameCache(InitGameCache("dr.x"))
set O0II0I=InitGameCache("dr.x")
set i=1
loop
exitwhen i>5
set p=III0[i]
set id=I2S(GetPlayerId(p))
call StoreInteger(O0II0I,id,"1",O0I0OI(p))
call StoreInteger(O0II0I,id,"2",O0I00I(p))
call StoreInteger(O0II0I,id,"3",O0I0II(p))
call StoreInteger(O0II0I,id,"4",O0I01I(p))
call StoreInteger(O0II0I,id,"id",i)
set p=II10[i]
set id=I2S(GetPlayerId(p))
call StoreInteger(O0II0I,id,"1",O0I0OI(p))
call StoreInteger(O0II0I,id,"2",O0I00I(p))
call StoreInteger(O0II0I,id,"3",O0I0II(p))
call StoreInteger(O0II0I,id,"4",O0I01I(p))
call StoreInteger(O0II0I,id,"id",i+5)
if GetLocalPlayer()==O0OI then
call SyncStoredInteger(O0II0I,I2S(GetPlayerId(III0[i])),"1")
call SyncStoredInteger(O0II0I,I2S(GetPlayerId(III0[i])),"2")
call SyncStoredInteger(O0II0I,I2S(GetPlayerId(III0[i])),"3")
call SyncStoredInteger(O0II0I,I2S(GetPlayerId(III0[i])),"4")
call SyncStoredInteger(O0II0I,I2S(GetPlayerId(III0[i])),"id")
call SyncStoredInteger(O0II0I,I2S(GetPlayerId(II10[i])),"1")
call SyncStoredInteger(O0II0I,I2S(GetPlayerId(II10[i])),"2")
call SyncStoredInteger(O0II0I,I2S(GetPlayerId(II10[i])),"3")
call SyncStoredInteger(O0II0I,I2S(GetPlayerId(II10[i])),"4")
call SyncStoredInteger(O0II0I,I2S(GetPlayerId(II10[i])),"id")
endif
set i=i+1
endloop
call StoreInteger(O0II0I,"Global","Winner",O110IO)
if GetLocalPlayer()==O0OI then
call SyncStoredInteger(O0II0I,"Global","Winner")
endif
endfunction
function O0IIII takes nothing returns boolean
call ExecuteFunc("I111I0")
call FlushGameCache(OO1I)
return false
endfunction
function O0II1I takes nothing returns nothing
call I1101O(GetEnumUnit())
endfunction
function O0I1OI takes nothing returns nothing
local group g=CreateGroup()
call GroupEnumUnitsInRange(g,0,0,9000,Condition(function OI00I0))
call ForGroup(g,function O0II1I)
call DestroyGroup(g)
set g=null
endfunction
function O0I10I takes nothing returns nothing
set bj_changeLevelShowScores=true
call DisableTrigger(O1101O)
call DisableTrigger(O11IOO)
call ExecuteFunc("O0I1II")
if I0OI then
call DisableTrigger(O1IIOO)
endif
call DisableTrigger(O1100O)
call ClearTextMessages()
call OOI110(bj_FORCE_ALL_PLAYERS,60,O0I1O+"has won!Get the latest version from www.getdota.com.")
set OOI0O=true
call PauseAllUnitsBJ(true)
call DisableTrigger(I1000)
call DisableTrigger(IIOI0)
call DisableTrigger(I0100)
if I1I then
call DisableTrigger(IO1IOO)
endif
endfunction
function O0I11I takes nothing returns nothing
local trigger t=CreateTrigger()
call PanCameraToTimed(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),0)
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerAddCondition(t,Condition(function O0IIII))
set O110IO=2
set O0I1O="|c0020c000The Scourge|r"
call O0I10I()
call O0I1OI()
call O0IIOI("2")
set t=null
endfunction
function O01OOI takes nothing returns nothing
local trigger t=CreateTrigger()
call PanCameraToTimed(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),0)
call TriggerRegisterTimerEvent(t,1.5,false)
call TriggerAddCondition(t,Condition(function O0IIII))
set O110IO=1
set O0I1O="|c00ff0303The Sentinel|r"
call O0I10I()
call O0I1OI()
call O0IIOI("1")
set t=null
endfunction
function O01O0I takes real OO1O10 returns boolean
return(100*GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)/ GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE))<OO1O10
endfunction
function O01OII takes nothing returns boolean
return O01O0I(10)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==true and GetUnitTypeId(GetTriggerUnit())!=1702129516 and GetUnitTypeId(GetTriggerUnit())!=1970172012
endfunction
function O01O1I takes nothing returns boolean
return O01O0I(25)and(GetUnitAbilityLevel(GetTriggerUnit(),1112433775)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1111847784)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110456115)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110455620)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110455629)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110455630)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110455631)>0)
endfunction
function O010OI takes nothing returns boolean
return O01O0I(50)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==false and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false or GetUnitTypeId(GetTriggerUnit())==1700946284 or GetUnitTypeId(GetTriggerUnit())==1970107511)
endfunction
function O0100I takes nothing returns nothing
if not(O01OII()or O01O1I()or O010OI())then
call IssueImmediateOrder(GetAttacker(),"stop")
endif
endfunction
function O010II takes nothing returns boolean
if IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))then
call O0100I()
endif
return false
endfunction
function O0101I takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local real x=II00IO(I1I0IO,"x")
local real y=II00IO(I1I0IO,"y")
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
if GetSpellTargetUnit()==I1IIIO and GetSpellAbilityId()==O11IIO and I10O0O(I1IIIO)and I1IO0O(I1IIIO,"Frozen")==true then
call I1I0OO(I1IIIO,"Frozen")
call UnitRemoveAbility(I1IIIO,1093678162)
call SetUnitInvulnerable(I1IIIO,false)
call PauseUnit(I1IIIO,false)
call I0111O(I1I0IO)
call I10I1O(t)
endif
elseif I1I11O(I1IIIO)==false then
call SetUnitX(I1IIIO,x)
call SetUnitY(I1IIIO,y)
call I1IO1O(I1IIIO,"Frozen")
call UnitAddAbility(I1IIIO,1093678162)
call SetUnitInvulnerable(I1IIIO,true)
call PauseUnit(I1IIIO,true)
endif
set I1IIIO=null
set t=null
return false
endfunction
function O01IOI takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=GetSpellTargetUnit()
call I1IO1O(I1IIIO,"Frozen")
call UnitAddAbility(I1IIIO,1093678162)
call SetUnitInvulnerable(I1IIIO,true)
call PauseUnit(I1IIIO,true)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIO01O(I1I0IO,"x",GetUnitX(I1IIIO))
call IIO01O(I1I0IO,"y",GetUnitY(I1IIIO))
call TriggerRegisterTimerEvent(t,1,true)
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O0101I))
set t=null
set I1IIIO=null
endfunction
function O01I0I takes nothing returns boolean
if GetSpellAbilityId()==O11I0O and I10O0O(GetSpellTargetUnit())and I1IO0O(GetSpellTargetUnit(),"Frozen")==false then
call O01IOI()
elseif(GetSpellAbilityId()==O11IIO or GetSpellAbilityId()==O11I0O)and I10O0O(GetSpellTargetUnit())==false then
call I11I1O(GetOwningPlayer(GetTriggerUnit()),"Can only target Heroes that have left the game.")
endif
return false
endfunction
function O01III takes destructable d returns boolean
local real x=GetDestructableX(d)
local real y=GetDestructableY(d)
local group g=CreateGroup()
local boolean O01I1I
call GroupEnumUnitsInRange(g,x,y,250,Condition(function OIIO10))
set O01I1I=FirstOfGroup(g)!=null
call DestroyGroup(g)
set g=null
return O01I1I
endfunction
function O011OI takes nothing returns nothing
if I1O1IO(GetEnumDestructable())then
if O01III(GetEnumDestructable())==false then
call DestructableRestoreLife(GetEnumDestructable(),GetDestructableMaxLife(GetEnumDestructable()),false)
endif
endif
endfunction
function O0110I takes nothing returns nothing
call EnumDestructablesInRectAll(bj_mapInitialPlayableArea,function O011OI)
endfunction
function O011II takes nothing returns boolean
if(GetTriggerUnit()!=IOI)then
return false
endif
if(IsUnitIllusion(GetAttacker())==true)then
call KillUnit(GetAttacker())
return false
endif
return true
endfunction
function O0111I takes nothing returns nothing
if(UnitHasBuffBJ(GetTriggerUnit(),1112560453)==true)then
call UnitRemoveAbility(GetTriggerUnit(),1112560453)
endif
endfunction
function OIOOOI takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit())==1848651852
endfunction
function OIOO0I takes nothing returns nothing
if IsUnitInRegion(O11I1O,GetAttacker())==false then
call I11I1O(GetOwningPlayer(GetAttacker()),"You cannot attack Roshan from here.")
call IssueImmediateOrder(GetAttacker(),"stop")
endif
endfunction
function OIOOII takes nothing returns boolean
return GetUnitTypeId(GetSummonedUnit())==1865429044 or GetUnitTypeId(GetSummonedUnit())==1868921189
endfunction
function OIOO1I takes unit I1IIIO,unit OIO0OI returns nothing
local integer OIO00I
local item OIO0II
if GetUnitTypeId(GetSummonedUnit())==1865429044 then
set OIO00I=1936683575
else
set OIO00I=1952936552
endif
call DisableTrigger(IOOO1O)
set OIO0II=OO00I0(I1IIIO,OIO00I)
if OIO0II==null then
call UnitAddItem(I1IIIO,CreateItem(OIO00I,0,0))
else
call SetItemCharges(OIO0II,GetItemCharges(OIO0II)+1)
endif
call EnableTrigger(IOOO1O)
endfunction
function OIO01I takes nothing returns nothing
local unit OIO0OI=GetSummonedUnit()
local unit I1IIIO=GetSummoningUnit()
if IsUnitInRegion(O11I1O,OIO0OI)then
call RemoveUnit(OIO0OI)
call OIOO1I(I1IIIO,OIO0OI)
endif
endfunction
function OIOIOI takes nothing returns boolean
if(GetUnitTypeId(GetAttacker())!=1848651852)then
return false
endif
if(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==true)then
return true
endif
return false
endfunction
function OIOI0I takes nothing returns nothing
local location OIOIII=GetRectCenter(O110O)
call SetUnitPositionLoc(GetAttacker(),OIOIII)
call RemoveLocation(OIOIII)
endfunction
function OIOI1I takes nothing returns boolean
return GetUnitTypeId(GetEnteringUnit())==1697656901 or GetUnitTypeId(GetEnteringUnit())==1697657394
endfunction
function OIO1OI takes nothing returns nothing
call ShowUnitHide(GetEnteringUnit())
call SetUnitPathing(GetEnteringUnit(),false)
call SetUnitInvulnerable(GetEnteringUnit(),true)
call UnitApplyTimedLifeBJ(20.00,1112820806,GetEnteringUnit())
endfunction
function OIO10I takes nothing returns boolean
if(GetUnitTypeId(GetDyingUnit())==1697656914)then
return true
endif
if(GetUnitTypeId(GetDyingUnit())==1697657137)then
return true
endif
if(GetUnitTypeId(GetDyingUnit())==1697656915)then
return true
endif
if(GetUnitTypeId(GetDyingUnit())==1697657145)then
return true
endif
return false
endfunction
function OIO1II takes nothing returns boolean
if(not(GetDyingUnit()==O010IO))then
return false
endif
if(not(IsUnitDeadBJ(O0101O)==true))then
return false
endif
return true
endfunction
function OIO11I takes nothing returns boolean
if(not(GetDyingUnit()==O0101O))then
return false
endif
if(not(IsUnitDeadBJ(O010IO)==true))then
return false
endif
return true
endfunction
function OI0OOI takes nothing returns nothing
if IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit()))then
set O111OO[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=O111OO[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
if(GetDyingUnit()==O0I10O)then
call SetUnitInvulnerable(O01OOO,false)
call I1O00O(GetKillingUnit())
endif
if(GetDyingUnit()==O0I1IO)then
call SetUnitInvulnerable(O01O0O,false)
call I1O00O(GetKillingUnit())
endif
if(GetDyingUnit()==O0I11O)then
call SetUnitInvulnerable(O01OIO,false)
call I1O00O(GetKillingUnit())
endif
if(GetDyingUnit()==O01OOO)then
call SetUnitInvulnerable(O01O1O,false)
call I1O00O(GetKillingUnit())
endif
if(GetDyingUnit()==O01O0O)then
call SetUnitInvulnerable(O010OO,false)
call I1O00O(GetKillingUnit())
endif
if(GetDyingUnit()==O01OIO)then
call SetUnitInvulnerable(O0100O,false)
call I1O00O(GetKillingUnit())
endif
if(GetDyingUnit()==O01O1O)then
call I1O00O(GetKillingUnit())
call SetUnitInvulnerable(O01IOO,false)
call SetUnitInvulnerable(O01I1O,false)
call SetUnitInvulnerable(O010IO,false)
call SetUnitInvulnerable(O0101O,false)
call SetUnitInvulnerable(OIOIOO,false)
call SetUnitInvulnerable(OIOI0O,false)
call SetUnitInvulnerable(O011IO,false)
call SetUnitInvulnerable(O0111O,false)
call SetUnitInvulnerable(OIOOOO,false)
call SetUnitInvulnerable(OIOO0O,false)
call SetUnitInvulnerable(OIOOIO,false)
call SetUnitInvulnerable(OIOO1O,false)
call SetUnitInvulnerable(OIO0OO,false)
call SetUnitInvulnerable(OIO00O,false)
call SetUnitInvulnerable(OIO0IO,false)
call SetUnitInvulnerable(OIO01O,false)
endif
if(GetDyingUnit()==O010OO)then
call I1O00O(GetKillingUnit())
call SetUnitInvulnerable(O01I0O,false)
call SetUnitInvulnerable(O011OO,false)
call SetUnitInvulnerable(O010IO,false)
call SetUnitInvulnerable(O0101O,false)
call SetUnitInvulnerable(OIOIOO,false)
call SetUnitInvulnerable(OIOI0O,false)
call SetUnitInvulnerable(O011IO,false)
call SetUnitInvulnerable(O0111O,false)
call SetUnitInvulnerable(OIOOOO,false)
call SetUnitInvulnerable(OIOO0O,false)
call SetUnitInvulnerable(OIOOIO,false)
call SetUnitInvulnerable(OIOO1O,false)
call SetUnitInvulnerable(OIO0OO,false)
call SetUnitInvulnerable(OIO00O,false)
call SetUnitInvulnerable(OIO0IO,false)
call SetUnitInvulnerable(OIO01O,false)
endif
if(GetDyingUnit()==O0100O)then
call I1O00O(GetKillingUnit())
call SetUnitInvulnerable(O01IIO,false)
call SetUnitInvulnerable(O0110O,false)
call SetUnitInvulnerable(O010IO,false)
call SetUnitInvulnerable(O0101O,false)
call SetUnitInvulnerable(OIOIOO,false)
call SetUnitInvulnerable(OIOI0O,false)
call SetUnitInvulnerable(O011IO,false)
call SetUnitInvulnerable(O0111O,false)
call SetUnitInvulnerable(OIOOOO,false)
call SetUnitInvulnerable(OIOO0O,false)
call SetUnitInvulnerable(OIOOIO,false)
call SetUnitInvulnerable(OIOO1O,false)
call SetUnitInvulnerable(OIO0OO,false)
call SetUnitInvulnerable(OIO00O,false)
call SetUnitInvulnerable(OIO0IO,false)
call SetUnitInvulnerable(OIO01O,false)
endif
if(OIO1II())then
call I1O00O(GetKillingUnit())
call SetUnitInvulnerable(O0I1OO,false)
endif
if(OIO11I())then
call I1O00O(GetKillingUnit())
call SetUnitInvulnerable(O0I1OO,false)
endif
endfunction
function OI0O0I takes nothing returns boolean
if(GetUnitTypeId(GetDyingUnit())==1966092365)then
return true
endif
if(GetUnitTypeId(GetDyingUnit())==1966092356)then
return true
endif
if(GetUnitTypeId(GetDyingUnit())==1966092366)then
return true
endif
if(GetUnitTypeId(GetDyingUnit())==1966092372)then
return true
endif
return false
endfunction
function OI0OII takes nothing returns boolean
if(not(GetDyingUnit()==OII0OO))then
return false
endif
if(not(IsUnitDeadBJ(OII00O)==true))then
return false
endif
return true
endfunction
function OI0O1I takes nothing returns boolean
if(not(GetDyingUnit()==OII00O))then
return false
endif
if(not(IsUnitDeadBJ(OII0OO)==true))then
return false
endif
return true
endfunction
function OI00OI takes nothing returns nothing
if IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit()))then
set O111OO[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=O111OO[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
if(GetDyingUnit()==OI0I1O)then
call SetUnitInvulnerable(OI01IO,false)
call I1O00O(GetKillingUnit())
endif
if(GetDyingUnit()==OI01OO)then
call SetUnitInvulnerable(OI011O,false)
call I1O00O(GetKillingUnit())
endif
if(GetDyingUnit()==OI010O)then
call SetUnitInvulnerable(OIIOOO,false)
call I1O00O(GetKillingUnit())
endif
if(GetDyingUnit()==OI01IO)then
call SetUnitInvulnerable(OIIO0O,false)
call I1O00O(GetKillingUnit())
endif
if(GetDyingUnit()==OI011O)then
call SetUnitInvulnerable(OIIOIO,false)
call I1O00O(GetKillingUnit())
endif
if(GetDyingUnit()==OIIOOO)then
call SetUnitInvulnerable(OIIO1O,false)
call I1O00O(GetKillingUnit())
endif
if(GetDyingUnit()==OIIO0O)then
call I1O00O(GetKillingUnit())
call SetUnitInvulnerable(OII0IO,false)
call SetUnitInvulnerable(OIII0O,false)
call SetUnitInvulnerable(OII0OO,false)
call SetUnitInvulnerable(OII00O,false)
call SetUnitInvulnerable(OI10IO,false)
call SetUnitInvulnerable(OI101O,false)
call SetUnitInvulnerable(OII1OO,false)
call SetUnitInvulnerable(OII10O,false)
call SetUnitInvulnerable(OII1IO,false)
call SetUnitInvulnerable(OII11O,false)
call SetUnitInvulnerable(OI1OOO,false)
call SetUnitInvulnerable(OI1O0O,false)
call SetUnitInvulnerable(OI1OIO,false)
call SetUnitInvulnerable(OI1O1O,false)
call SetUnitInvulnerable(OI10OO,false)
call SetUnitInvulnerable(OI100O,false)
endif
if(GetDyingUnit()==OIIOIO)then
call I1O00O(GetKillingUnit())
call SetUnitInvulnerable(OII01O,false)
call SetUnitInvulnerable(OIIIIO,false)
call SetUnitInvulnerable(OII0OO,false)
call SetUnitInvulnerable(OII00O,false)
call SetUnitInvulnerable(OI10IO,false)
call SetUnitInvulnerable(OI101O,false)
call SetUnitInvulnerable(OII1OO,false)
call SetUnitInvulnerable(OII10O,false)
call SetUnitInvulnerable(OII1IO,false)
call SetUnitInvulnerable(OII11O,false)
call SetUnitInvulnerable(OI1OOO,false)
call SetUnitInvulnerable(OI1O0O,false)
call SetUnitInvulnerable(OI1OIO,false)
call SetUnitInvulnerable(OI1O1O,false)
call SetUnitInvulnerable(OI10OO,false)
call SetUnitInvulnerable(OI100O,false)
endif
if(GetDyingUnit()==OIIO1O)then
call I1O00O(GetKillingUnit())
call SetUnitInvulnerable(OIIIOO,false)
call SetUnitInvulnerable(OIII1O,false)
call SetUnitInvulnerable(OII0OO,false)
call SetUnitInvulnerable(OII00O,false)
call SetUnitInvulnerable(OI10IO,false)
call SetUnitInvulnerable(OI101O,false)
call SetUnitInvulnerable(OII1OO,false)
call SetUnitInvulnerable(OII10O,false)
call SetUnitInvulnerable(OII1IO,false)
call SetUnitInvulnerable(OII11O,false)
call SetUnitInvulnerable(OI1OOO,false)
call SetUnitInvulnerable(OI1O0O,false)
call SetUnitInvulnerable(OI1OIO,false)
call SetUnitInvulnerable(OI1O1O,false)
call SetUnitInvulnerable(OI10OO,false)
call SetUnitInvulnerable(OI100O,false)
endif
if(OI0OII())then
call I1O00O(GetKillingUnit())
call SetUnitInvulnerable(OI0IIO,false)
endif
if(OI0O1I())then
call I1O00O(GetKillingUnit())
call SetUnitInvulnerable(OI0IIO,false)
endif
endfunction
function OI000I takes nothing returns boolean
local integer x=0
if GetPlayerSlotState(III0[1])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(III0[2])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(III0[3])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(III0[4])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(III0[5])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(II10[1])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(II10[2])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(II10[3])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(II10[4])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
if GetPlayerSlotState(II10[5])==PLAYER_SLOT_STATE_EMPTY then
set x=x+1
endif
return x==9
endfunction
function OI00II takes nothing returns boolean
return bj_isSinglePlayer and OI000I()
endfunction
function OI001I takes nothing returns nothing
call SetHeroLevel(OI10[GetPlayerId(GetTriggerPlayer())],GetHeroLevel(OI10[GetPlayerId(GetTriggerPlayer())])+1,true)
set O0IOO=true
endfunction
function OI0IOI takes nothing returns nothing
call TriggerExecute(I1000)
set O0IOO=true
endfunction
function OI0I0I takes nothing returns nothing
local unit I1IIIO=OI10[GetPlayerId(GetTriggerPlayer())]
call UnitResetCooldown(I1IIIO)
call SetUnitState(I1IIIO,UNIT_STATE_LIFE,GetUnitState(I1IIIO,UNIT_STATE_MAX_LIFE))
call SetUnitState(I1IIIO,UNIT_STATE_MANA,GetUnitState(I1IIIO,UNIT_STATE_MAX_MANA))
set O0IOO=true
endfunction
function OI0III takes nothing returns nothing
call KillUnit(OI10[GetPlayerId(GetTriggerPlayer())])
set O0IOO=true
endfunction
function OI0I1I takes nothing returns nothing
local string OI01OI=SubString(GetEventPlayerChatString(),5,StringLength(GetEventPlayerChatString()))
local integer I1OO1O=S2I(OI01OI)
call SetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD)+I1OO1O)
set O0IOO=true
endfunction
function OI010I takes nothing returns nothing
call TriggerExecute(O0O0I)
endfunction
function OI01II takes nothing returns nothing
call TriggerExecute(OO01I)
endfunction
function OI011I takes nothing returns nothing
local player OnlyPlayer=O0OI
local trigger t
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60,"Single player commands enabled.You may use commands like-lvlup,-refresh,-spawncreeps,-powerup,-neutrals,-kill and-gold xxxx")
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,III0[1],"-lvlup",true)
call TriggerRegisterPlayerChatEvent(t,III0[2],"-lvlup",true)
call TriggerRegisterPlayerChatEvent(t,III0[3],"-lvlup",true)
call TriggerRegisterPlayerChatEvent(t,III0[4],"-lvlup",true)
call TriggerRegisterPlayerChatEvent(t,III0[5],"-lvlup",true)
call TriggerRegisterPlayerChatEvent(t,II10[1],"-lvlup",true)
call TriggerRegisterPlayerChatEvent(t,II10[2],"-lvlup",true)
call TriggerRegisterPlayerChatEvent(t,II10[3],"-lvlup",true)
call TriggerRegisterPlayerChatEvent(t,II10[4],"-lvlup",true)
call TriggerRegisterPlayerChatEvent(t,II10[5],"-lvlup",true)
call TriggerAddAction(t,function OI001I)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,III0[1],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,III0[2],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,III0[3],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,III0[4],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,III0[5],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,II10[1],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,II10[2],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,II10[3],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,II10[4],"-spawncreeps",true)
call TriggerRegisterPlayerChatEvent(t,II10[5],"-spawncreeps",true)
call TriggerAddAction(t,function OI0IOI)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,III0[1],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,III0[2],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,III0[3],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,III0[4],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,III0[5],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,II10[1],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,II10[2],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,II10[3],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,II10[4],"-refresh",true)
call TriggerRegisterPlayerChatEvent(t,II10[5],"-refresh",true)
call TriggerAddAction(t,function OI0I0I)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,III0[1],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,III0[2],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,III0[3],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,III0[4],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,III0[5],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,II10[1],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,II10[2],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,II10[3],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,II10[4],"-kill",true)
call TriggerRegisterPlayerChatEvent(t,II10[5],"-kill",true)
call TriggerAddAction(t,function OI0III)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,III0[1],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,III0[2],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,III0[3],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,III0[4],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,III0[5],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,II10[1],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,II10[2],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,II10[3],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,II10[4],"-gold",false)
call TriggerRegisterPlayerChatEvent(t,II10[5],"-gold",false)
call TriggerAddAction(t,function OI0I1I)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,III0[1],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,III0[2],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,III0[3],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,III0[4],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,III0[5],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,II10[1],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,II10[2],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,II10[3],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,II10[4],"-powerup",false)
call TriggerRegisterPlayerChatEvent(t,II10[5],"-powerup",false)
call TriggerAddAction(t,function OI010I)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,III0[1],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,III0[2],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,III0[3],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,III0[4],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,III0[5],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,II10[1],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,II10[2],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,II10[3],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,II10[4],"-neutrals",false)
call TriggerRegisterPlayerChatEvent(t,II10[5],"-neutrals",false)
call TriggerAddAction(t,function OI01II)
endfunction
function OIIOOI takes nothing returns boolean
return not OOO
endfunction
function OIIO0I takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OIIOII=IIO1OO(I1I0IO,"Unit")
call UnitResetCooldown(OIIOII)
call SetUnitManaPercentBJ(OIIOII,100)
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set OIIOII=null
return false
endfunction
function OIIO1I takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function OIIO0I))
call IIOOIO(I1I0IO,"Unit",GetTriggerUnit())
set t=null
endfunction
function OII0OI takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local integer OII00I=IIIO0O(IIO0)+IIIO0O(II00)
local integer NumRequired=OO0II0(OII00I,OII00I/ 2+1)
local string I1I0IO=I011OO(t)
local integer OII0II=II000O(I1I0IO,"ExecCount")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60.00,"")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,90.00,"WTF mode activated.In this mode spells have no cooldown or manacost.")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,90.00,"This is a FOR FUN ONLY mode.")
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(t,function OIIO1I)
endfunction
function OII01I takes nothing returns nothing
call OI011I()
call I10I1O(GetTriggeringTrigger())
endfunction
function OIIIOI takes nothing returns boolean
if OOO==false and OI00II()==false then
call OII01I()
endif
return false
endfunction
function OIII0I takes nothing returns boolean
return GetOwningPlayer(GetTriggerUnit())==I1O0
endfunction
function OIIIII takes nothing returns nothing
call IIO00O("Stats"+I2S(GetPlayerId(GetOwningPlayer(GetKillingUnit()))),"NumOfNeutrals",II000O("Stats"+I2S(GetPlayerId(GetOwningPlayer(GetKillingUnit()))),"NumOfNeutrals")+1)
endfunction
function OIII1I takes nothing returns nothing
local location O000OI=GetRectCenter(O110O)
set IOI=CreateUnitAtLoc(Player(12),1848651852,O000OI,bj_UNIT_FACING)
call RemoveLocation(O000OI)
call UnitAddItem(IOI,CreateItem(1227895112,0,0))
set O000OI=GetRectCenter(OI11O)
call RemoveUnit(CreateUnitAtLoc(I1O0,1966092337,O000OI,0))
call RemoveLocation(O000OI)
set O000OI=GetRectCenter(O1OOO)
call RemoveUnit(CreateUnitAtLoc(I1O0,1966092337,O000OI,0))
call RemoveLocation(O000OI)
set O000OI=GetRectCenter(O1O0O)
call RemoveUnit(CreateUnitAtLoc(I1O0,1966092337,O000OI,0))
call RemoveLocation(O000OI)
set O000OI=GetRectCenter(O1OIO)
call RemoveUnit(CreateUnitAtLoc(I1O0,1966092337,O000OI,0))
call RemoveLocation(O000OI)
set O000OI=GetRectCenter(O1O1O)
call RemoveUnit(CreateUnitAtLoc(I1O0,1966092337,O000OI,0))
call RemoveLocation(O000OI)
set O000OI=GetRectCenter(O10OO)
call RemoveUnit(CreateUnitAtLoc(I1O0,1966092337,O000OI,0))
call RemoveLocation(O000OI)
set O000OI=GetRectCenter(O100O)
call RemoveUnit(CreateUnitAtLoc(I1O0,1966092337,O000OI,0))
call RemoveLocation(O000OI)
set O000OI=GetRectCenter(O10IO)
call RemoveUnit(CreateUnitAtLoc(I1O0,1966092337,O000OI,0))
call RemoveLocation(O000OI)
set O000OI=GetRectCenter(O101O)
call RemoveUnit(CreateUnitAtLoc(I1O0,1966092337,O000OI,0))
call RemoveLocation(O000OI)
set O000OI=GetRectCenter(O1IOO)
call RemoveUnit(CreateUnitAtLoc(I1O0,1966092337,O000OI,0))
call RemoveLocation(O000OI)
set O000OI=GetRectCenter(IOI1O)
call RemoveUnit(CreateUnitAtLoc(I1O0,1966092337,O000OI,0))
call RemoveLocation(O000OI)
set O000OI=GetRectCenter(IO10O)
call RemoveUnit(CreateUnitAtLoc(I1O0,1966092337,O000OI,0))
call RemoveLocation(O000OI)
endfunction
function OII1OI takes nothing returns boolean
if((GetOwningPlayer(GetTriggerUnit())==III0[0]))then
return true
endif
if((GetOwningPlayer(GetTriggerUnit())==II10[0]))then
return true
endif
return false
endfunction
function OII10I takes nothing returns nothing
if(GetOwningPlayer(GetTriggerUnit())==III0[0])then
call IssuePointOrderLoc(GetTriggerUnit(),"attack",OOIO)
else
call IssuePointOrderLoc(GetTriggerUnit(),"attack",OO1O)
endif
endfunction
function OII1II takes nothing returns nothing
set I0OO=I0OO+1
endfunction
function OII11I takes nothing returns nothing
set IO1O=IO1O+1
endfunction
function OI1OOI takes nothing returns boolean
if(not(GetOwningPlayer(GetTriggerUnit())==III0[0]))then
return false
endif
return true
endfunction
function OI1O0I takes nothing returns nothing
call IssuePointOrderLoc(GetTriggerUnit(),"attack",O0OO)
endfunction
function OI1OII takes nothing returns boolean
if(not(GetOwningPlayer(GetTriggerUnit())==II10[0]))then
return false
endif
return true
endfunction
function OI1O1I takes nothing returns nothing
call IssuePointOrderLoc(GetTriggerUnit(),"attack",O0OO)
endfunction
function OI10OI takes nothing returns boolean
if(not(GetOwningPlayer(GetTriggerUnit())==III0[0]))then
return false
endif
return true
endfunction
function OI100I takes nothing returns nothing
call IssuePointOrderLoc(GetTriggerUnit(),"attack",O00O)
endfunction
function OI10II takes nothing returns boolean
if(not(GetOwningPlayer(GetTriggerUnit())==II10[0]))then
return false
endif
return true
endfunction
function OI101I takes nothing returns nothing
call IssuePointOrderLoc(GetTriggerUnit(),"attack",O00O)
endfunction
function OI1IOI takes nothing returns boolean
if(not(GetOwningPlayer(GetTriggerUnit())==II10[0]))then
return false
endif
return true
endfunction
function OI1I0I takes nothing returns nothing
call IssuePointOrderLoc(GetTriggerUnit(),"attack",O0IO)
endfunction
function OI1III takes nothing returns boolean
if(not(GetOwningPlayer(GetTriggerUnit())==III0[0]))then
return false
endif
return true
endfunction
function OI1I1I takes nothing returns nothing
call IssuePointOrderLoc(GetTriggerUnit(),"attack",O0IO)
endfunction
function OI11OI takes nothing returns nothing
call PlaySoundBJ(IO110)
endfunction
function OI110I takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerAddAction(t,function OI11OI)
if IO0I1O==true then
call TriggerRegisterTimerEvent(t,180-20-12,false)
elseif IOI1IO==true then
call TriggerRegisterTimerEvent(t,180-20-12,false)
elseif IO1O1O==true then
call TriggerRegisterTimerEvent(t,180-20-12,false)
elseif I0II==true then
call TriggerRegisterTimerEvent(t,120-20-12,false)
else
call TriggerRegisterTimerEvent(t,90-20-12,false)
endif
endfunction
function OI11II takes nothing returns boolean
if(IOI1IO)then
return IOI11O
endif
if(IO1O1O)then
return IO10OO
endif
if(I0II)then
return I00I
endif
if IO0I1O then
return IO01OO
endif
if(OO0OO)then
return OOI1O
endif
return I0
endfunction
function OI111I takes group O1OOOI,integer O1OO0I returns nothing
local unit u
loop
set u=FirstOfGroup(O1OOOI)
exitwhen(u==null)
call GroupRemoveUnit(O1OOOI,u)
call SetUnitAbilityLevel(u,IOOI,O1OO0I)
endloop
endfunction
function O1OOII takes nothing returns nothing
local boolean O1OO1I=ModuloInteger(GetTriggerExecCount(I1000),7)==0
if GetTriggerExecCount(I1000)==1 and IO1I0O==false then
call SetUnitInvulnerable(O0I10O,false)
call SetUnitInvulnerable(O0I1IO,false)
call SetUnitInvulnerable(O0I11O,false)
call SetUnitInvulnerable(OI0I1O,false)
call SetUnitInvulnerable(OI01OO,false)
call SetUnitInvulnerable(OI010O,false)
elseif GetTriggerExecCount(I1000)==1 and IO1I0O==true then
call SetUnitInvulnerable(O0I1IO,false)
call SetUnitInvulnerable(OI01OO,false)
endif
if IO1I0O==false and IO11OO==false then
if(OIIO)then
call CreateNUnitsAtLoc(IO1O,1969711215,II10[0],I0IO,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(IO1O,1966092337,II10[0],I0IO,bj_UNIT_FACING)
endif
call OI111I(bj_lastCreatedGroup,2)
endif
if IO1I1O==false then
if(OI1O)then
call CreateNUnitsAtLoc(IO1O,1969711215,II10[0],I00O,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(IO1O,1966092337,II10[0],I00O,bj_UNIT_FACING)
endif
call OI111I(bj_lastCreatedGroup,3)
endif
if IO1I0O==false and IO1IIO==false then
if(O1OO)then
call CreateNUnitsAtLoc(IO1O,1969711215,II10[0],I01O,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(IO1O,1966092337,II10[0],I01O,bj_UNIT_FACING)
endif
call OI111I(bj_lastCreatedGroup,4)
endif
if IO1I0O==false and IO11OO==false then
if(O01O)then
call CreateNUnitsAtLoc(I0OO,1970169187,II10[0],IIIO,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(I0OO,1966092338,II10[0],IIIO,bj_UNIT_FACING)
endif
call OI111I(bj_lastCreatedGroup,2)
endif
if IO1I1O==false then
if(OIOO)then
call CreateNUnitsAtLoc(I0OO,1970169187,II10[0],IIOO,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(I0OO,1966092338,II10[0],IIOO,bj_UNIT_FACING)
endif
call OI111I(bj_lastCreatedGroup,3)
endif
if IO1I0O==false and IO1IIO==false then
if(OI0O)then
call CreateNUnitsAtLoc(I0OO,1970169187,II10[0],II0O,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(I0OO,1966092338,II10[0],II0O,bj_UNIT_FACING)
endif
call OI111I(bj_lastCreatedGroup,4)
endif
if O1OO1I==true then
if IO1I0O==false and IO11OO==false then
call CreateNUnitsAtLoc(I0OO,1970107511,II10[0],IIIO,bj_UNIT_FACING)
call OI111I(bj_lastCreatedGroup,2)
endif
if IO1I1O==false then
call CreateNUnitsAtLoc(I0OO,1970107511,II10[0],IIOO,bj_UNIT_FACING)
call OI111I(bj_lastCreatedGroup,3)
endif
if IO1I0O==false and IO1IIO==false then
call CreateNUnitsAtLoc(I0OO,1970107511,II10[0],II0O,bj_UNIT_FACING)
call OI111I(bj_lastCreatedGroup,4)
endif
endif
if IO1I0O==false and IO11OO==false then
if(IOOO)then
call CreateNUnitsAtLoc(IO1O,1702061422,III0[0],I10O,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(IO1O,1697656918,III0[0],I10O,bj_UNIT_FACING)
endif
call OI111I(bj_lastCreatedGroup,2)
endif
if IO1I1O==false then
if(IO0O)then
call CreateNUnitsAtLoc(IO1O,1702061422,III0[0],II1O,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(IO1O,1697656918,III0[0],II1O,bj_UNIT_FACING)
endif
call OI111I(bj_lastCreatedGroup,3)
endif
if IO1I0O==false and IO1IIO==false then
if(IOIO)then
call CreateNUnitsAtLoc(IO1O,1702061422,III0[0],I1OO,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(IO1O,1697656918,III0[0],I1OO,bj_UNIT_FACING)
endif
call OI111I(bj_lastCreatedGroup,4)
endif
if IO1I0O==false and IO11OO==false then
if(O10O)then
call CreateNUnitsAtLoc(I0OO,1701081721,III0[0],OOO0,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(I0OO,1697656919,III0[0],OOO0,bj_UNIT_FACING)
endif
call OI111I(bj_lastCreatedGroup,2)
endif
if IO1I1O==false then
if(O1IO)then
call CreateNUnitsAtLoc(I0OO,1701081721,III0[0],I1IO,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(I0OO,1697656919,III0[0],I1IO,bj_UNIT_FACING)
endif
call OI111I(bj_lastCreatedGroup,3)
endif
if IO1I0O==false and IO1IIO==false then
if(O11O)then
call CreateNUnitsAtLoc(I0OO,1701081721,III0[0],I11O,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(I0OO,1697656919,III0[0],I11O,bj_UNIT_FACING)
endif
call OI111I(bj_lastCreatedGroup,4)
endif
if O1OO1I==true then
if IO1I0O==false and IO11OO==false then
call CreateNUnitsAtLoc(I0OO,1700946284,III0[0],OOO0,bj_UNIT_FACING)
call OI111I(bj_lastCreatedGroup,2)
endif
if IO1I1O==false then
call CreateNUnitsAtLoc(I0OO,1700946284,III0[0],I1IO,bj_UNIT_FACING)
call OI111I(bj_lastCreatedGroup,3)
endif
if IO1I0O==false and IO1IIO==false then
call CreateNUnitsAtLoc(I0OO,1700946284,III0[0],I11O,bj_UNIT_FACING)
call OI111I(bj_lastCreatedGroup,4)
endif
endif
endfunction
function O1O0OI takes nothing returns nothing
set O01O=false
call DisableTrigger(I10I0)
endfunction
function O1O00I takes nothing returns nothing
set OIOO=false
call DisableTrigger(I1010)
endfunction
function O1O0II takes nothing returns nothing
set OI0O=false
call DisableTrigger(I1IO0)
endfunction
function O1O01I takes nothing returns nothing
set OIIO=false
call DisableTrigger(I1I00)
endfunction
function O1OIOI takes nothing returns nothing
set OI1O=false
call DisableTrigger(I1II0)
endfunction
function O1OI0I takes nothing returns nothing
set O1OO=false
call DisableTrigger(I1I10)
endfunction
function O1OIII takes nothing returns nothing
set O10O=false
call DisableTrigger(I11O0)
endfunction
function O1OI1I takes nothing returns nothing
set O1IO=false
call DisableTrigger(I1100)
endfunction
function O1O1OI takes nothing returns nothing
set O11O=false
call DisableTrigger(I11I0)
endfunction
function O1O10I takes nothing returns nothing
set IOOO=false
call DisableTrigger(I1110)
endfunction
function O1O1II takes nothing returns nothing
set IO0O=false
call DisableTrigger(OOOOI)
endfunction
function O1O11I takes nothing returns nothing
set IOIO=false
call DisableTrigger(OOO0I)
endfunction
function O10OOI takes nothing returns boolean
if(IOOO or IO0O or IOIO or O10O or O1IO or O11O)then
return false
endif
return true
endfunction
function O10O0I takes nothing returns nothing
call OOI110(bj_FORCE_ALL_PLAYERS,20.00,"The Sentinel has destroyed all of the Scourge's unit producing structures.The Sentinel now has Mega Creeps.")
call SetPlayerTechResearchedSwap(1378889796,(GetPlayerTechCountSimple(1378889796,III0[0])+30),III0[0])
call SetPlayerTechResearchedSwap(1378889795,(GetPlayerTechCountSimple(1378889795,III0[0])+30),III0[0])
call DisableTrigger(OOOII)
endfunction
function O10OII takes nothing returns boolean
if(OIIO or OI1O or O1OO or O01O or OIOO or OI0O)then
return false
endif
return true
endfunction
function O10O1I takes nothing returns nothing
call OOI110(bj_FORCE_ALL_PLAYERS,20.00,"The Scourge has destroyed all of the Sentinel's unit producing structures.The Scourge now has Mega Creeps.")
call SetPlayerTechResearchedSwap(1378889785,(GetPlayerTechCountSimple(1378889785,II10[0])+30),II10[0])
call SetPlayerTechResearchedSwap(1378889794,(GetPlayerTechCountSimple(1378889794,II10[0])+30),II10[0])
call DisableTrigger(OOO1I)
endfunction
function O100OI takes nothing returns nothing
call SetPlayerTechResearchedSwap(1378889783,(GetPlayerTechCountSimple(1378889783,III0[0])+1),III0[0])
call SetPlayerTechResearchedSwap(1378889795,(GetPlayerTechCountSimple(1378889795,III0[0])+1),III0[0])
call SetPlayerTechResearchedSwap(1378889784,(GetPlayerTechCountSimple(1378889784,III0[0])+1),III0[0])
call SetPlayerTechResearchedSwap(1378889796,(GetPlayerTechCountSimple(1378889796,III0[0])+1),III0[0])
call SetPlayerTechResearchedSwap(1378889785,(GetPlayerTechCountSimple(1378889785,II10[0])+1),II10[0])
call SetPlayerTechResearchedSwap(1378889779,(GetPlayerTechCountSimple(1378889779,II10[0])+1),II10[0])
call SetPlayerTechResearchedSwap(1378889793,(GetPlayerTechCountSimple(1378889793,II10[0])+1),II10[0])
call SetPlayerTechResearchedSwap(1378889794,(GetPlayerTechCountSimple(1378889794,II10[0])+1),II10[0])
endfunction
function O1000I takes nothing returns nothing
local location O000OI=GetRectCenter(IO1IO)
call RemoveUnit(CreateUnitAtLoc(I1O0,1851941999,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1851942003,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1852273524,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1848652342,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1852270450,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1851941995,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1851946861,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1852794733,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1852796263,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1852207203,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1852207221,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1853060200,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1853060204,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1853055348,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1853320295,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1852534636,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1852534626,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1852534644,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1852010091,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1852007790,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1852272243,O000OI,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(I1O0,1852208226,O000OI,bj_UNIT_FACING))
call RemoveLocation(O000OI)
endfunction
function O100II takes nothing returns boolean
call EnableTrigger(OO01I)
call DisableTrigger(OO0II)
call I10I1O(GetTriggeringTrigger())
return false
endfunction
function O1001I takes nothing returns nothing
local trigger t=CreateTrigger()
local real O10IOI=0
if(IOI1IO or OO0OO or I0II or IO1O1O)then
set O10IOI=100
endif
if IO0I1O then
set O10IOI=100
endif
call TriggerRegisterTimerEvent(t,O10IOI,false)
call TriggerAddCondition(t,Condition(function O100II))
set t=null
endfunction
function O10I0I takes nothing returns nothing
if GetUnitAbilityLevel(GetEnumUnit(),1093685300)!=0 then
call GroupRemoveUnit(IO1I,GetEnumUnit())
endif
if GetUnitTypeId(GetEnumUnit())==1865429043 then
call GroupRemoveUnit(IO1I,GetEnumUnit())
endif
endfunction
function O10III takes group II1O0O returns boolean
set IO1I=II1O0O
call ForGroup(II1O0O,function O10I0I)
return FirstOfGroup(II1O0O)==null
endfunction
function O10I1I takes nothing returns nothing
local integer O101OI
local group II1O0O
local location O000OI
set II1O0O=I0I0IO(O11IO)
set O000OI=GetRectCenter(OI11O)
if O10III(II1O0O)then
set O101OI=GetRandomInt(1,3)
if(O101OI==1)then
call CreateNUnitsAtLoc(2,1851941999,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1851942003,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==2)then
call CreateNUnitsAtLoc(2,1852273524,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852270450,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==3)then
call CreateNUnitsAtLoc(2,1851941995,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1851946861,I1O0,O000OI,bj_UNIT_FACING)
endif
endif
call DestroyGroup(II1O0O)
call RemoveLocation(O000OI)
set II1O0O=I0I0IO(O111O)
set O000OI=GetRectCenter(O1OOO)
if O10III(II1O0O)then
set O101OI=GetRandomInt(1,3)
if(O101OI==1)then
call CreateNUnitsAtLoc(2,1851941999,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1851942003,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==2)then
call CreateNUnitsAtLoc(2,1852273524,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852270450,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==3)then
call CreateNUnitsAtLoc(2,1851941995,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1851946861,I1O0,O000OI,bj_UNIT_FACING)
endif
endif
call DestroyGroup(II1O0O)
call RemoveLocation(O000OI)
set II1O0O=I0I0IO(IOOOO)
set O000OI=GetRectCenter(O1O0O)
if O10III(II1O0O)then
set O101OI=GetRandomInt(1,3)
if(O101OI==1)then
call CreateNUnitsAtLoc(2,1852794733,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852796263,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==2)then
call CreateNUnitsAtLoc(1,1852207203,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852207221,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==3)then
call CreateNUnitsAtLoc(1,1853060200,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1853060204,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1853055348,I1O0,O000OI,bj_UNIT_FACING)
endif
endif
call DestroyGroup(II1O0O)
call RemoveLocation(O000OI)
set II1O0O=I0I0IO(IOO0O)
set O000OI=GetRectCenter(O1OIO)
if O10III(II1O0O)then
set O101OI=GetRandomInt(1,3)
if(O101OI==1)then
call CreateNUnitsAtLoc(2,1852794733,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852796263,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==2)then
call CreateNUnitsAtLoc(1,1852207203,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852207221,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==3)then
call CreateNUnitsAtLoc(1,1853060200,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1853060204,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1853055348,I1O0,O000OI,bj_UNIT_FACING)
endif
endif
call DestroyGroup(II1O0O)
call RemoveLocation(O000OI)
set II1O0O=I0I0IO(IOOIO)
set O000OI=GetRectCenter(O1O1O)
if O10III(II1O0O)then
set O101OI=GetRandomInt(1,6)
if(O101OI==1)then
call CreateNUnitsAtLoc(3,1853320295,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==2)then
call CreateNUnitsAtLoc(2,1853060204,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(2,1853055348,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==3)then
call CreateNUnitsAtLoc(2,1848652342,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==4)then
call CreateNUnitsAtLoc(1,1852534636,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(3,1852534626,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852534644,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==5)then
call CreateNUnitsAtLoc(2,1852208226,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852207976,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==6)then
call CreateNUnitsAtLoc(1,1852010091,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852007790,I1O0,O000OI,bj_UNIT_FACING)
endif
endif
call DestroyGroup(II1O0O)
call RemoveLocation(O000OI)
set II1O0O=I0I0IO(IOO1O)
set O000OI=GetRectCenter(O10OO)
if O10III(II1O0O)then
set O101OI=GetRandomInt(1,6)
if(O101OI==1)then
call CreateNUnitsAtLoc(3,1853320295,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==2)then
call CreateNUnitsAtLoc(2,1853060204,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(2,1853055348,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==3)then
call CreateNUnitsAtLoc(2,1848652342,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==4)then
call CreateNUnitsAtLoc(1,1852534636,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(3,1852534626,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852534644,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==5)then
call CreateNUnitsAtLoc(2,1852208226,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852207976,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==6)then
call CreateNUnitsAtLoc(1,1852010091,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852007790,I1O0,O000OI,bj_UNIT_FACING)
endif
endif
call DestroyGroup(II1O0O)
call RemoveLocation(O000OI)
set II1O0O=I0I0IO(IO0OO)
set O000OI=GetRectCenter(O100O)
if O10III(II1O0O)then
set O101OI=GetRandomInt(1,6)
if(O101OI==1)then
call CreateNUnitsAtLoc(3,1853320295,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==2)then
call CreateNUnitsAtLoc(2,1853060204,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(2,1853055348,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==3)then
call CreateNUnitsAtLoc(2,1848652342,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==4)then
call CreateNUnitsAtLoc(1,1852534636,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(3,1852534626,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852534644,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==5)then
call CreateNUnitsAtLoc(2,1852208226,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852207976,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==6)then
call CreateNUnitsAtLoc(1,1852010091,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852007790,I1O0,O000OI,bj_UNIT_FACING)
endif
endif
call DestroyGroup(II1O0O)
call RemoveLocation(O000OI)
set II1O0O=I0I0IO(IO0IO)
set O000OI=GetRectCenter(O10IO)
if O10III(II1O0O)then
set O101OI=GetRandomInt(1,6)
if(O101OI==1)then
call CreateNUnitsAtLoc(3,1853320295,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==2)then
call CreateNUnitsAtLoc(2,1853060204,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(2,1853055348,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==3)then
call CreateNUnitsAtLoc(2,1848652342,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==4)then
call CreateNUnitsAtLoc(1,1852534636,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(3,1852534626,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852534644,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==5)then
call CreateNUnitsAtLoc(2,1852208226,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852207976,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==6)then
call CreateNUnitsAtLoc(1,1852010091,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852007790,I1O0,O000OI,bj_UNIT_FACING)
endif
endif
call DestroyGroup(II1O0O)
call RemoveLocation(O000OI)
set II1O0O=I0I0IO(IO00O)
set O000OI=GetRectCenter(O101O)
if O10III(II1O0O)then
call CreateNUnitsAtLoc(3,1852272243,I1O0,O000OI,bj_UNIT_FACING)
endif
call DestroyGroup(II1O0O)
call RemoveLocation(O000OI)
set II1O0O=I0I0IO(IO01O)
set O000OI=GetRectCenter(O1IOO)
if O10III(II1O0O)then
call CreateNUnitsAtLoc(2,1852208226,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852534636,I1O0,O000OI,bj_UNIT_FACING)
endif
call DestroyGroup(II1O0O)
call RemoveLocation(O000OI)
set II1O0O=I0I0IO(IOIIO)
set O000OI=GetRectCenter(IOI1O)
if O10III(II1O0O)then
set O101OI=GetRandomInt(1,6)
if(O101OI==1)then
call CreateNUnitsAtLoc(3,1853320295,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==2)then
call CreateNUnitsAtLoc(2,1853060204,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(2,1853055348,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==3)then
call CreateNUnitsAtLoc(2,1848652342,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==4)then
call CreateNUnitsAtLoc(1,1852534636,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(3,1852534626,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852534644,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==5)then
call CreateNUnitsAtLoc(2,1852208226,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852207976,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==6)then
call CreateNUnitsAtLoc(1,1852010091,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852007790,I1O0,O000OI,bj_UNIT_FACING)
endif
endif
call DestroyGroup(II1O0O)
call RemoveLocation(O000OI)
set II1O0O=I0I0IO(IO1OO)
set O000OI=GetRectCenter(IO10O)
if O10III(II1O0O)then
set O101OI=GetRandomInt(1,6)
if(O101OI==1)then
call CreateNUnitsAtLoc(3,1853320295,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==2)then
call CreateNUnitsAtLoc(2,1853060204,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(2,1853055348,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==3)then
call CreateNUnitsAtLoc(2,1848652342,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==4)then
call CreateNUnitsAtLoc(1,1852534636,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(3,1852534626,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852534644,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==5)then
call CreateNUnitsAtLoc(2,1852208226,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852207976,I1O0,O000OI,bj_UNIT_FACING)
endif
if(O101OI==6)then
call CreateNUnitsAtLoc(1,1852010091,I1O0,O000OI,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,1852007790,I1O0,O000OI,bj_UNIT_FACING)
endif
endif
call DestroyGroup(II1O0O)
call RemoveLocation(O000OI)
endfunction
function O1010I takes nothing returns nothing
local integer II10IO=GetRandomInt(1,9)
if IO1I0O then
set II10IO=GetRandomInt(1,3)
if II10IO==1 then
set II10IO=3
endif
if II10IO==2 then
set II10IO=6
endif
if II10IO==3 then
set II10IO=9
endif
endif
if(II10IO==1)then
call CreateNUnitsAtLoc(1,1848651827,III0[0],I11O,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"A|c000000ffSiege Golem|r has spawned for the|c00ff0000Sentinel|r and is taking the east path!")
call OI111I(bj_lastCreatedGroup,4)
endif
if(II10IO==2)then
call CreateNUnitsAtLoc(1,1848651827,III0[0],OOO0,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"A|c000000ffSiege Golem|r has spawned for the|c00ff0000Sentinel|r and is taking the west path!")
call OI111I(bj_lastCreatedGroup,2)
endif
if(II10IO==3)then
call CreateNUnitsAtLoc(1,1848651827,III0[0],I1IO,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"A|c000000ffSiege Golem|r has spawned for the|c00ff0000Sentinel|r and is taking the middle path!")
call OI111I(bj_lastCreatedGroup,3)
endif
if(II10IO==4)then
call CreateNUnitsAtLoc(1,1848651845,III0[0],I11O,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"A|c000000ffScary Fish|r has spawned for the|c00ff0000Sentinel|r and is taking the east path!")
call OI111I(bj_lastCreatedGroup,4)
endif
if(II10IO==5)then
call CreateNUnitsAtLoc(1,1848651845,III0[0],OOO0,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"A|c000000ffScary Fish|r has spawned for the|c00ff0000Sentinel|r and is taking the west path!")
call OI111I(bj_lastCreatedGroup,2)
endif
if(II10IO==6)then
call CreateNUnitsAtLoc(1,1848651845,III0[0],I1IO,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"A|c000000ffScary Fish|r has spawned for the|c00ff0000Sentinel|r and is taking the middle path!")
call OI111I(bj_lastCreatedGroup,3)
endif
if(II10IO==7)and IO1I0O==false then
call CreateNUnitsAtLoc(1,1848651844,III0[0],I11O,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"An|c000000ffAncient Hydra|r has spawned for the|c00ff0000Sentinel|r and is taking the east path!")
call OI111I(bj_lastCreatedGroup,4)
endif
if(II10IO==8)and IO1I0O==false then
call CreateNUnitsAtLoc(1,1848651844,III0[0],OOO0,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"An|c000000ffAncient Hydra|r has spawned for the|c00ff0000Sentinel|r and is taking the west path!")
call OI111I(bj_lastCreatedGroup,2)
endif
if(II10IO==9)then
call CreateNUnitsAtLoc(1,1848651844,III0[0],I1IO,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"An|c000000ffAncient Hydra|r has spawned for the|c00ff0000Sentinel|r and is taking the middle path!")
call OI111I(bj_lastCreatedGroup,3)
endif
set II10IO=GetRandomInt(1,9)
if IO1I0O then
set II10IO=GetRandomInt(1,3)
if II10IO==1 then
set II10IO=3
endif
if II10IO==2 then
set II10IO=6
endif
if II10IO==3 then
set II10IO=9
endif
endif
if(II10IO==1)then
call CreateNUnitsAtLoc(1,1848651827,II10[0],II0O,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"A|c000000ffSiege Golem|r has spawned for the|c00004000Scourge|r and is taking the east path!")
call OI111I(bj_lastCreatedGroup,4)
endif
if(II10IO==2)then
call CreateNUnitsAtLoc(1,1848651827,II10[0],IIIO,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"A|c000000ffSiege Golem|r has spawned for the|c00004000Scourge|r and is taking the west path!")
call OI111I(bj_lastCreatedGroup,2)
endif
if(II10IO==3)then
call CreateNUnitsAtLoc(1,1848651827,II10[0],IIOO,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"A|c000000ffSiege Golem|r has spawned for the|c00004000Scourge|r and is taking the middle path!")
call OI111I(bj_lastCreatedGroup,3)
endif
if(II10IO==4)then
call CreateNUnitsAtLoc(1,1848651845,II10[0],II0O,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"A|c000000ffScary Fish|r has spawned for the|c00004000Scourge|r and is taking the east path!")
call OI111I(bj_lastCreatedGroup,4)
endif
if(II10IO==5)then
call CreateNUnitsAtLoc(1,1848651845,II10[0],IIIO,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"A|c000000ffScary Fish|r has spawned for the|c00004000Scourge|r and is taking the west path!")
call OI111I(bj_lastCreatedGroup,2)
endif
if(II10IO==6)then
call CreateNUnitsAtLoc(1,1848651845,II10[0],IIOO,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"A|c000000ffScary Fish|r has spawned for the|c00004000Scourge|r and is taking the middle path!")
call OI111I(bj_lastCreatedGroup,3)
endif
if(II10IO==7)then
call CreateNUnitsAtLoc(1,1848651844,II10[0],II0O,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"An|c000000ffAncient Hydra|r has spawned for the|c00004000Scourge|r and is taking the east path!")
call OI111I(bj_lastCreatedGroup,4)
endif
if(II10IO==8)then
call CreateNUnitsAtLoc(1,1848651844,II10[0],IIIO,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"An|c000000ffAncient Hydra|r has spawned for the|c00004000Scourge|r and is taking the west path!")
call OI111I(bj_lastCreatedGroup,2)
endif
if(II10IO==9)then
call CreateNUnitsAtLoc(1,1848651844,II10[0],IIOO,bj_UNIT_FACING)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"An|c000000ffAncient Hydra|r has spawned for the|c00004000Scourge|r and is taking the middle path!")
call OI111I(bj_lastCreatedGroup,3)
endif
endfunction
function O101II takes item OIO1I0 returns boolean
return GetItemTypeId(OIO1I0)==1227895128 or GetItemTypeId(OIO1I0)==1227895125 or GetItemTypeId(OIO1I0)==1227895120 or GetItemTypeId(OIO1I0)==1227895121 or GetItemTypeId(OIO1I0)==1227895129 or GetItemTypeId(OIO1I0)==1227895130
endfunction
function O1011I takes nothing returns nothing
local integer O1IOOI=0
local item OIO1I0=GetManipulatedItem()
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true then
if GetItemTypeId(OIO1I0)==1227895128 then
set O1IOOI=1227895125
endif
if GetItemTypeId(OIO1I0)==1227895129 then
set O1IOOI=1227895120
endif
if GetItemTypeId(OIO1I0)==1227895130 then
set O1IOOI=1227895121
endif
if O1IOOI!=0 then
call RemoveItem(OIO1I0)
call UnitAddItemById(GetTriggerUnit(),O1IOOI)
endif
else
if GetItemTypeId(OIO1I0)==1227895125 then
set O1IOOI=1227895128
endif
if GetItemTypeId(OIO1I0)==1227895120 then
set O1IOOI=1227895129
endif
if GetItemTypeId(OIO1I0)==1227895121 then
set O1IOOI=1227895130
endif
if O1IOOI!=0 then
call RemoveItem(OIO1I0)
call UnitAddItemById(GetTriggerUnit(),O1IOOI)
endif
endif
set OIO1I0=null
endfunction
function O1IO0I takes nothing returns boolean
if O101II(GetManipulatedItem())then
call O1011I()
endif
return false
endfunction
function O1IOII takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED or GetUnitAbilityLevel(GetTriggerUnit(),1110455089)==0 then
call I10I1O(t)
elseif GetEventDamage()>5 then
call DisableTrigger(t)
call OII1O0(GetEventDamageSource(),GetTriggerUnit(),1,GetEventDamage()*0.15)
call EnableTrigger(t)
endif
set t=null
return false
endfunction
function O1IO1I takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
call I0111O(I1I0IO)
call I10I1O(t)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,4,false)
call TriggerAddCondition(t,Condition(function O1IOII))
set t=null
return false
endfunction
function O1I0OI takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function O1IO1I))
call IIOOIO(I1I0IO,"Target",GetSpellTargetUnit())
set t=null
endfunction
function O1I00I takes nothing returns boolean
if GetSpellAbilityId()==1093682756 then
call O1I0OI()
endif
return false
endfunction
function O1I0II takes nothing returns boolean
call SetUnitAnimation(GetTriggerUnit(),"Stand Work")
call O01I10(GetTriggerUnit(),8.5)
return false
endfunction
function O1I01I takes nothing returns boolean
local integer O1IIOI
local real O1II0I
if GetItemTypeId(GetManipulatedItem())==1227895120 then
set O1II0I=GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)-GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)
set O1IIOI=OIO100(GetTriggerUnit(),GetManipulatedItem())
call RemoveItem(GetManipulatedItem())
call UnitAddItemToSlotById(GetTriggerUnit(),1227895121,O1IIOI)
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,OO01I0(GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)-O1II0I,1))
endif
if GetItemTypeId(GetManipulatedItem())==1227895121 then
set O1II0I=GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)-GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)
set O1IIOI=OIO100(GetTriggerUnit(),GetManipulatedItem())
call RemoveItem(GetManipulatedItem())
call UnitAddItemToSlotById(GetTriggerUnit(),1227895120,O1IIOI)
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,OO01I0(GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)-O1II0I,1))
endif
return false
endfunction
function O1IIII takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local item O1II1I=II00OO(I1I0IO,"Item")
if GetTriggerEventId()==EVENT_UNIT_DROP_ITEM and GetManipulatedItem()==O1II1I then
call I0111O(I1I0IO)
call I10I1O(t)
else
call SetUnitState(I1IIIO,UNIT_STATE_LIFE,OO01I0(GetUnitState(I1IIIO,UNIT_STATE_LIFE)-O1110O,1))
endif
set t=null
set I1IIIO=null
set O1II1I=null
return false
endfunction
function O1I1OI takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_DROP_ITEM)
call TriggerAddCondition(t,Condition(function O1IIII))
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIOOIO(I1I0IO,"Item",GetManipulatedItem())
set t=null
set I1IIIO=null
endfunction
function O1I10I takes nothing returns boolean
if GetItemTypeId(GetManipulatedItem())==1227895121 then
call O1I1OI()
endif
return false
endfunction
function O1I1II takes unit III1IO,integer OO0010,item O1I11I returns item
local integer OO0IO0
local item OO0I00
set OO0IO0=0
loop
exitwhen OO0IO0>5
set OO0I00=UnitItemInSlot(III1IO,OO0IO0)
if OO0I00!=null and OO0I00!=O1I11I and GetItemTypeId(OO0I00)==OO0010 then
set OO0I00=null
return UnitItemInSlot(III1IO,OO0IO0)
endif
set OO0IO0=OO0IO0+1
endloop
set OO0I00=null
return null
endfunction
function O11OOI takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
if GetTriggerEventId()==EVENT_PLAYER_UNIT_DROP_ITEM then
if GetItemTypeId(GetManipulatedItem())==1227895120 then
call UnitRemoveAbility(I1IIIO,1093685331)
endif
if GetItemTypeId(GetManipulatedItem())==1227895121 then
call UnitRemoveAbility(I1IIIO,1093685331)
call UnitRemoveAbility(I1IIIO,1093686339)
call UnitRemoveAbility(I1IIIO,1093686603)
endif
endif
if GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM then
if GetItemTypeId(GetManipulatedItem())==1227895120 then
call UnitAddAbility(I1IIIO,1093685331)
endif
if GetItemTypeId(GetManipulatedItem())==1227895121 then
call UnitAddAbility(I1IIIO,1093685331)
call UnitAddAbility(I1IIIO,1093686339)
call UnitAddAbility(I1IIIO,1093686603)
endif
endif
set I1IIIO=null
endfunction
function O11O0I takes nothing returns boolean
if GetItemTypeId(GetManipulatedItem())==1227895120 or GetItemTypeId(GetManipulatedItem())==1227895121 then
call O11OOI()
endif
return false
endfunction
function O11OII takes unit OOI0I0,unit OOI010 returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(OOI0I0),1697656901,GetUnitX(OOI010),GetUnitY(OOI010),0)
call UnitAddAbility(O11O1I,1093686320)
call IssueTargetOrder(O11O1I,"slow",OOI010)
call OII1O0(OOI0I0,OOI010,1,200)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",OOI010,"origin"))
set O11O1I=null
endfunction
function O110OI takes nothing returns nothing
local unit OOI010=GetEnumUnit()
local group O1100I=OOO0IO
local unit OOI0I0=OOOO1O
if IsUnitInGroup(OOI010,O1100I)==false then
if IsUnitType(OOI010,UNIT_TYPE_HERO)==false then
call GroupAddUnit(O1100I,OOI010)
call O11OII(OOI0I0,OOI010)
endif
if IsUnitType(OOI010,UNIT_TYPE_HERO)==true then
if I1IO0O(OOI010,"O110II")==true then
call I11I1O(GetOwningPlayer(OOI010),"Arctic Hauberk failed to affect"+GetUnitName(OOI010)+"because it has been affected by Arctic Hauberk in the past 20 seconds")
else
call I1I01O(OOI010,"O110II",30)
call GroupAddUnit(O1100I,OOI010)
call O11OII(OOI0I0,OOI010)
endif
endif
endif
set OOI010=null
set O1100I=null
set OOI0I0=null
endfunction
function O1101I takes nothing returns nothing
local unit O11O1I=GetEnumUnit()
local real x=GetUnitX(OOOO1O)+18*GetTriggerEvalCount(GetTriggeringTrigger())*Cos(GetUnitFacing(O11O1I)*bj_DEGTORAD)
local real y=GetUnitY(OOOO1O)+18*GetTriggerEvalCount(GetTriggeringTrigger())*Sin(GetUnitFacing(O11O1I)*bj_DEGTORAD)
local group g=CreateGroup()
call SetUnitX(O11O1I,OOO100(x))
call SetUnitY(O11O1I,OOO110(y))
if I110I>32 then
call GroupEnumUnitsInRange(g,x,y,150,Condition(function OI0IO0))
else
call GroupEnumUnitsInRange(g,x,y,100,Condition(function OI0IO0))
endif
call ForGroup(g,function O110OI)
call DestroyGroup(g)
set g=null
set O11O1I=null
endfunction
function O11IOI takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit O11O1I=IIO1OO(I1I0IO,"Caster")
call I0111O(I1I0IO)
call I10I1O(t)
call RemoveUnit(O11O1I)
set t=null
set O11O1I=null
return false
endfunction
function O11I0I takes unit III1IO returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1.366,false)
call TriggerAddCondition(t,Condition(function O11IOI))
call IIOOIO(I011OO(t),"Caster",III1IO)
call SetUnitAnimation(III1IO,"Death")
set t=null
endfunction
function O11III takes nothing returns nothing
call O11I0I(GetEnumUnit())
endfunction
function O11I1I takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local group O111OI=II0OOO(I1I0IO,"CasterGroup")
local group O1100I=II0OOO(I1I0IO,"AlreadyDamaged")
if GetTriggerEvalCount(t)>33 then
call ForGroup(O111OI,function O11III)
call DestroyGroup(O111OI)
call DestroyGroup(O1100I)
call I0111O(I1I0IO)
call I10I1O(t)
else
set OOO0IO=O1100I
set OOOO1O=OOI0I0
set I110I=GetTriggerEvalCount(t)
call ForGroup(O111OI,function O1101I)
endif
set t=null
set O111OI=null
set O1100I=null
set OOI0I0=null
return false
endfunction
function O1110I takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local group g=CreateGroup()
local unit O11O1I
local real x=GetUnitX(I1IIIO)
local real y=GetUnitY(I1IIIO)
local integer i=0
local integer O0OOO0=48
local group O1100I=CreateGroup()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
loop
exitwhen i>O0OOO0
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1747988546,x,y,360*i/ O0OOO0)
call GroupAddUnit(g,O11O1I)
set i=i+1
endloop
call IIOOIO(I1I0IO,"AlreadyDamaged",O1100I)
call IIOOIO(I1I0IO,"CasterGroup",g)
call IIOOIO(I1I0IO,"Source",I1IIIO)
call TriggerRegisterTimerEvent(t,0.03,true)
call TriggerAddCondition(t,Condition(function O11I1I))
set t=null
set O11O1I=null
set I1IIIO=null
set g=null
endfunction
function O110II takes nothing returns boolean
if GetSpellAbilityId()==1093686329 then
call O1110I()
endif
return false
endfunction
function O111II takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit O1111I=IIO1OO(I1I0IO,"chicken")
local integer IOOOOI=II000O(I1I0IO,"newability")
if GetTriggerEvalCount(t)==1 then
call UnitAddAbility(O1111I,IOOOOI)
else
call UnitAddItem(O1111I,II00OO(I1I0IO,"item0"))
call UnitAddItem(O1111I,II00OO(I1I0IO,"item1"))
call UnitAddItem(O1111I,II00OO(I1I0IO,"item2"))
call UnitAddItem(O1111I,II00OO(I1I0IO,"item3"))
call UnitAddItem(O1111I,II00OO(I1I0IO,"item4"))
call UnitAddItem(O1111I,II00OO(I1I0IO,"item5"))
call I0111O(I1I0IO)
call I10I1O(t)
endif
set t=null
set O1111I=null
return false
endfunction
function IOOO0I takes nothing returns nothing
local unit IOOOII=GetTriggerUnit()
local integer IOOO1I=GetUnitTypeId(IOOOII)
local real x=GetUnitX(IOOOII)
local real y=GetUnitY(IOOOII)
local item IOO0OI
local item IOO00I
local item IOO0II
local item IOO01I
local item IOOIOI
local item IOOI0I
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local integer IOOOOI
set IOO0OI=UnitItemInSlot(IOOOII,0)
set IOO00I=UnitItemInSlot(IOOOII,1)
set IOO0II=UnitItemInSlot(IOOOII,2)
set IOO01I=UnitItemInSlot(IOOOII,3)
set IOOIOI=UnitItemInSlot(IOOOII,4)
set IOOI0I=UnitItemInSlot(IOOOII,5)
call SetItemPosition(IOO0OI,x,y)
call SetItemPosition(IOO00I,x,y)
call SetItemPosition(IOO0II,x,y)
call SetItemPosition(IOO01I,x,y)
call SetItemPosition(IOOIOI,x,y)
call SetItemPosition(IOOI0I,x,y)
if IOOO1I==1848651849 then
set IOOOOI=1395667001
elseif IOOO1I==1848652338 then
set IOOOOI=1395667012
elseif IOOO1I==1848652337 then
set IOOOOI=1395667011
elseif IOOO1I==1848652339 then
set IOOOOI=1395667013
elseif IOOO1I==1848652340 then
set IOOOOI=1395667010
elseif IOOO1I==1848652341 then
set IOOOOI=1395667014
endif
if GetRandomInt(1,10)==1 then
set IOOOOI=1395667015
endif
if IOOO1I==1848651853 then
set IOOOOI=1395667014
endif
call IIOOIO(I1I0IO,"item0",IOO0OI)
call IIOOIO(I1I0IO,"item1",IOO00I)
call IIOOIO(I1I0IO,"item2",IOO0II)
call IIOOIO(I1I0IO,"item3",IOO01I)
call IIOOIO(I1I0IO,"item4",IOOIOI)
call IIOOIO(I1I0IO,"item5",IOOI0I)
call IIOOIO(I1I0IO,"chicken",IOOOII)
call IIO00O(I1I0IO,"newability",IOOOOI)
call TriggerRegisterTimerEvent(t,0.05,true)
call TriggerAddCondition(t,Condition(function O111II))
set t=null
set IOOOII=null
set IOO0OI=null
set IOO00I=null
set IOO0II=null
set IOO01I=null
set IOOIOI=null
set IOOI0I=null
endfunction
function IOOIII takes nothing returns boolean
if GetSpellAbilityId()==1093685076 then
call IOOO0I()
endif
return false
endfunction
function IOOI1I takes nothing returns nothing
local unit IOO1OI=GetAttacker()
local integer IOO10I=UnitInventorySize(IOO1OI)
local integer x=0
local item i
loop
exitwhen x>IOO10I
set i=UnitItemInSlot(IOO1OI,x)
if GetItemTypeId(i)==1227894874 and GetRandomReal(0,1)<=0.15 then
call OII1O0(IOO1OI,GetTriggerUnit(),2,40)
endif
set x=x+1
endloop
set i=null
set IOO1OI=null
endfunction
function IOO1II takes nothing returns boolean
if IsUnitEnemy(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and UnitInventorySize(GetAttacker())>0 then
call IOOI1I()
endif
return false
endfunction
function IOO11I takes unit I1IIIO returns nothing
local integer IO0OOI
local integer IO0O0I
if GetUnitTypeId(I1IIIO)==1164207469 then
set IO0OOI=1093684057
elseif GetUnitTypeId(I1IIIO)==1429221446 then
set IO0OOI=1093678660
elseif GetUnitTypeId(I1IIIO)==1162032951 then
set IO0OOI=1093684557
else
return
endif
set IO0O0I=GetUnitAbilityLevel(I1IIIO,IO0OOI)
if IO0O0I>0 then
call UnitRemoveAbility(I1IIIO,IO0OOI)
call UnitAddAbility(I1IIIO,IO0OOI)
call SetUnitAbilityLevel(I1IIIO,IO0OOI,IO0O0I)
endif
endfunction
function IO0OII takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
if I1I11O(I1IIIO)==false and I1IIIO!=null then
call SetUnitScale(I1IIIO,I11O1O(I1IIIO),I11O1O(I1IIIO),I11O1O(I1IIIO))
endif
call I0110O(I1I0IO)
call I10I1O(t)
set t=null
set I1IIIO=null
return false
endfunction
function IO0O1I takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656901,GetUnitX(I1IIIO),GetUnitY(I1IIIO),0)
local trigger t=CreateTrigger()
call O01O00(I1IIIO,IOOOOO,10)
call SetPlayerAbilityAvailable(GetOwningPlayer(I1IIIO),IOOOOO,false)
call UnitAddAbility(O11O1I,O1111O)
call IssueTargetOrder(O11O1I,"antimagicshell",I1IIIO)
if I1O10O(I1IIIO)then
call O0I100(I1IIIO,10,6)
else
call O0I100(I1IIIO,10,1.4)
endif
call TriggerRegisterTimerEvent(t,16,false)
call TriggerAddCondition(t,Condition(function IO0OII))
call IIOOIO(I011OO(t),"Hero",I1IIIO)
set t=null
set I1IIIO=null
set O11O1I=null
endfunction
function IO00OI takes nothing returns boolean
if GetSpellAbilityId()==O111IO then
call IO0O1I()
endif
return false
endfunction
function IO000I takes integer IO00II returns boolean
return IO00II!=1886613604 and IO00II!=1868983399 and IO00II!=1227895109 and IO00II!=1227895112
endfunction
function IO001I takes nothing returns boolean
return IO000I(GetItemTypeId(GetManipulatedItem()))and I1O10O(GetTriggerUnit())
endfunction
function IO0IOI takes nothing returns nothing
call SetItemPawnable(GetManipulatedItem(),false)
endfunction
function IO0I0I takes nothing returns nothing
call SetItemPawnable(GetManipulatedItem(),true)
endfunction
function O0I1II takes nothing returns nothing
local integer x=1
local player p
loop
exitwhen x>16
if OO00I0(OI10[x],1227895109)!=null then
call RemoveUnit(IOOO0O[GetPlayerId(GetOwningPlayer(OI10[x]))])
endif
set x=x+1
endloop
endfunction
function Bloodstone_ItemCondition takes nothing returns boolean
return GetItemTypeId(GetManipulatedItem())==1227895109 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true
endfunction
function IO0III takes nothing returns boolean
return IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true and GetUnitTypeId(GetTriggerUnit())!=1211117642 and OO00I0(GetTriggerUnit(),1227895109)!=null
endfunction
function IO0I1I takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)!=1 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and I1IO0O(GetFilterUnit(),"Bloodstone")==false
endfunction
function IO01OI takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)!=1 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and I1IO0O(GetFilterUnit(),"Bloodstone")==true
endfunction
function IO010I takes nothing returns nothing
call I11I1O(GetOwningPlayer(GetEnumUnit()),"Bloodstone failed to heal"+GetUnitName(GetEnumUnit())+"because it has been healed by Bloodstone in the past 40 seconds")
endfunction
function IO01II takes nothing returns nothing
call SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)+O01I)
call SetUnitState(GetEnumUnit(),UNIT_STATE_MANA,GetUnitState(GetEnumUnit(),UNIT_STATE_MANA)+O0IIO)
call OO1010("Abilities\\Spells\\Orc\\TrollBerserk\\TrollBeserkerTarget.mdl",GetEnumUnit(),"overhead",2)
endfunction
function IO011I takes nothing returns nothing
call I1I01O(GetEnumUnit(),"Bloodstone",40)
endfunction
function IOIOOI takes nothing returns nothing
local group g=CreateGroup()
call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),1700,Condition(function IO01OI))
call ForGroup(g,function IO010I)
call DestroyGroup(g)
set g=CreateGroup()
call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),1700,Condition(function IO0I1I))
set O01I=450
set O0IIO=400
if GetItemCharges(OO00I0(GetTriggerUnit(),1227895109))<1 then
set O01I=300
set O0IIO=250
endif
call ForGroup(g,function IO01II)
call ForGroup(g,function IO011I)
call DestroyGroup(g)
set g=null
endfunction
function IOIO0I takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1211117645,GetUnitX(I1IIIO),GetUnitY(I1IIIO),GetUnitFacing(I1IIIO))
set IOOO0O[GetPlayerId(GetOwningPlayer(I1IIIO))]=O11O1I
call IOIOOI()
endfunction
function IOIOII takes nothing returns nothing
local integer IOIO1I=GetItemCharges(OO00I0(GetEnumUnit(),1227895109))
if IOIO1I>0 then
call SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)+IOIO1I*1.75)
call SetUnitState(GetEnumUnit(),UNIT_STATE_MANA,GetUnitState(GetEnumUnit(),UNIT_STATE_MANA)+IOIO1I*1.75)
endif
endfunction
function IOI0OI takes nothing returns boolean
local group g=CreateGroup()
call GroupEnumUnitsInRange(g,0,0,9000,Condition(function OIIO10))
call ForGroup(g,function IOIOII)
call DestroyGroup(g)
set g=null
return false
endfunction
function IOI00I takes nothing returns nothing
local player p=GetOwningPlayer(GetBuyingUnit())
local integer OO0010=GetItemTypeId(GetSoldItem())
if OO0010==1868850534 or OO0010==1751348590 or OO0010==1953525623 or OO0010==1953066612 or OO0010==1735751273 or OO0010==1651663203 or OO0010==2003791219 or OO0010==1227894867 or OO0010==1227894861 or OO0010==1734567276 or OO0010==1668181858 or OO0010==1227895108 or OO0010==1227895111 then
call RemoveItem(GetSoldItem())
call I11I1O(p,"You do not need to purchase a recipe for this item")
endif
if OO0010==1227895113 then
call RemoveItem(GetSoldItem())
call I11I1O(p,"You must kill Roshan to get this item!")
endif
endfunction
constant function IOI0II takes nothing returns integer
return 1097163124
endfunction
function IOI01I takes nothing returns boolean
return GetSpellAbilityId()==IOI0II()and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true
endfunction
function IOIIOI takes nothing returns nothing
set IOOOIO[0]=CreateTimer()
set IOOOIO[1]=CreateTimer()
set IOOOIO[2]=CreateTimer()
set IOOOIO[3]=CreateTimer()
set IOOOIO[4]=CreateTimer()
set IOOOIO[5]=CreateTimer()
set IOOOIO[6]=CreateTimer()
set IOOOIO[7]=CreateTimer()
set IOOOIO[8]=CreateTimer()
set IOOOIO[9]=CreateTimer()
set IOOOIO[10]=CreateTimer()
set IOOOIO[11]=CreateTimer()
set IOOOIO[12]=CreateTimer()
set IOOOIO[13]=CreateTimer()
set IOOOIO[14]=CreateTimer()
set IOOOIO[15]=CreateTimer()
endfunction
function IOII0I takes nothing returns nothing
local unit I1IIIO=IIO1OO(I011OO(GetExpiredTimer()),"Hero")
if GetUnitState(I1IIIO,UNIT_STATE_LIFE)>1 then
call UnitRemoveAbility(I1IIIO,1093685334)
endif
endfunction
function IOIIII takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
if GetTriggerExecCount(GetTriggeringTrigger())==1 then
call IOIIOI()
endif
call UnitAddAbility(I1IIIO,1093685334)
call IIOOIO(I011OO(IOOOIO[GetPlayerId(GetOwningPlayer(I1IIIO))]),"Hero",GetTriggerUnit())
call TimerStart(IOOOIO[GetPlayerId(GetOwningPlayer(I1IIIO))],25,false,function IOII0I)
endfunction
function IOII1I takes nothing returns nothing
local player p=GetOwningPlayer(GetBuyingUnit())
local integer OO0010=GetItemTypeId(GetSoldItem())
local integer IOI1OI=II000O("Stats"+I2S(GetPlayerId(p)),"NumOfConsumables")
local integer IOI10I=II000O("Stats"+I2S(GetPlayerId(p)),"NumOfVeggies")
local integer IOI1II=II000O("Stats"+I2S(GetPlayerId(p)),"NumOfWards")
if OO0010==1936683575 or OO0010==1952936552 then
set IOI1II=IOI1II+2
set IOI1OI=IOI1OI+2
endif
if OO0010==1936288875 then
set IOI10I=IOI10I+2
set IOI1OI=IOI1OI+2
endif
if OO0010==1936548206 or OO0010==1886151532 or OO0010==1937012592 or OO0010==1936683576 then
set IOI1OI=IOI1OI+1
endif
call IIO00O("Stats"+I2S(GetPlayerId(p)),"NumOfConsumables",IOI1OI)
call IIO00O("Stats"+I2S(GetPlayerId(p)),"NumOfVeggies",IOI10I)
call IIO00O("Stats"+I2S(GetPlayerId(p)),"NumOfWards",IOI1II)
endfunction
function IOI11I takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit O11O1I
local unit OOI0I0
if GetTriggerEventId()!=EVENT_UNIT_ATTACKED then
call DestroyEffect(II0O0O(I1I0IO,"FX"))
call I0110O(I1I0IO)
call I10I1O(t)
else
set OOI0I0=IIO1OO(I1I0IO,"Source")
set O11O1I=CreateUnit(GetOwningPlayer(OOI0I0),1697656901,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),0)
call UnitAddAbility(O11O1I,1093684022)
call IssueTargetOrder(O11O1I,"forkedlightning",GetAttacker())
call I1I01O(GetTriggerUnit(),"IO1OOI",1)
endif
set t=null
set O11O1I=null
set OOI0I0=null
endfunction
function IO1O0I takes nothing returns boolean
if(GetTriggerEventId()==EVENT_UNIT_ATTACKED and GetRandomInt(1,100)<21 and I1IO0O(GetTriggerUnit(),"IO1OOI")==false)or GetTriggerEventId()!=EVENT_UNIT_ATTACKED then
call IOI11I()
endif
return false
endfunction
function IO1OOI takes nothing returns nothing
local unit OOI0I0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,20,false)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function IO1O0I))
call IIOOIO(I1I0IO,"FX",AddSpecialEffectTarget("Abilities\\Spells\\Orc\\LightningShield\\LightningShieldTarget.mdl",OOI010,"origin"))
call IIOOIO(I1I0IO,"Source",OOI0I0)
set t=null
set OOI0I0=null
set OOI010=null
endfunction
function IO1OII takes nothing returns boolean
if GetSpellAbilityId()==1093683788 then
call IO1OOI()
endif
return false
endfunction
function IO1O1I takes nothing returns integer
return 1093683012
endfunction
function IO10OI takes player p returns integer
if II0I0O(p)then
return 1697657160
else
return 1697657178
endif
return 0
endfunction
function IO100I takes nothing returns boolean
return GetSpellAbilityId()==IO1O1I()
endfunction
function IO10II takes nothing returns nothing
local unit IO101I=GetTriggerUnit()
local real x=GetUnitX(IO101I)
local real y=GetUnitY(IO101I)
local real f=GetUnitFacing(IO101I)
local player II01IO=GetOwningPlayer(IO101I)
local unit IO1IOI
if O0OO00(IO101I,1227894873)!=null then
call RemoveItem(O0OO00(IO101I,1227894873))
set IO1IOI=CreateUnit(II01IO,IO10OI(II01IO),x,y,f)
call UnitAddItem(IO1IOI,UnitItemInSlot(IO101I,0))
call UnitAddItem(IO1IOI,UnitItemInSlot(IO101I,1))
call UnitAddItem(IO1IOI,UnitItemInSlot(IO101I,2))
call UnitAddItem(IO1IOI,UnitItemInSlot(IO101I,3))
call UnitAddItem(IO1IOI,UnitItemInSlot(IO101I,4))
call UnitAddItem(IO1IOI,UnitItemInSlot(IO101I,5))
call RemoveUnit(IO101I)
call DestroyEffect(AddSpecialEffectTargetUnitBJ("origin",IO1IOI,"Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl"))
else
call I11I1O(GetOwningPlayer(IO101I),"Recipe requirements not complete!")
endif
endfunction
function IO1I0I takes player p returns integer
local integer r=GetRandomInt(1,3)
if II0I0O(p)then
if r==1 then
return 1848651849
elseif r==2 then
return 1848652338
else
return 1848652337
endif
else
if r==1 then
return 1848652339
elseif r==2 then
return 1848652340
else
return 1848652341
endif
endif
return 0
endfunction
function IO1III takes player p returns integer
if II0I0O(p)then
return 1697657160
else
return 1697657178
endif
return 0
endfunction
function IO1I1I takes nothing returns nothing
call CreateUnit(GetOwningPlayer(GetTriggerUnit()),IO1I0I(GetOwningPlayer(GetTriggerUnit())),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetUnitFacing(GetTriggerUnit()))
endfunction
function IO11OI takes nothing returns nothing
call CreateUnit(GetOwningPlayer(GetTriggerUnit()),IO1III(GetOwningPlayer(GetTriggerUnit())),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetUnitFacing(GetTriggerUnit()))
endfunction
function IO110I takes nothing returns boolean
if GetSpellAbilityId()==1093681718 then
call IO1I1I()
endif
if GetSpellAbilityId()==1093683796 then
call IO11OI()
endif
return false
endfunction
function IO11II takes nothing returns nothing
local item IO111I=GetManipulatedItem()
local integer I0OOOI=GetItemTypeId(IO111I)
local unit I1IIIO=GetTriggerUnit()
local integer O1IIOI=OIO100(I1IIIO,IO111I)
if I0OOOI==1751937908 then
call RemoveItem(IO111I)
call UnitAddItemToSlotById(I1IIIO,1227895126,O1IIOI)
endif
if I0OOOI==1227895126 then
call RemoveItem(IO111I)
call UnitAddItemToSlotById(I1IIIO,1227895127,O1IIOI)
endif
if I0OOOI==1227895127 then
call RemoveItem(IO111I)
call UnitAddItemToSlotById(I1IIIO,1751937908,O1IIOI)
endif
if I0OOOI==1735553900 then
call RemoveItem(IO111I)
call UnitAddItemToSlotById(I1IIIO,1227895114,O1IIOI)
endif
if I0OOOI==1227895114 then
call RemoveItem(IO111I)
call UnitAddItemToSlotById(I1IIIO,1735553900,O1IIOI)
endif
set I1IIIO=null
set IO111I=null
endfunction
function I0OO0I takes nothing returns boolean
if GetUnitTypeId(GetTriggerUnit())!=1211117642 then
call IO11II()
endif
return false
endfunction
function I0OOII takes nothing returns boolean
return GetSpellAbilityId()==1093682008 and GetSpellTargetUnit()!=null
endfunction
function I0OO1I takes nothing returns nothing
local location O000OI=GetUnitLoc(GetTriggerUnit())
local unit O11O1I
local unit OOI010=GetSpellTargetUnit()
set O11O1I=CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),1697656899,O000OI,bj_UNIT_FACING)
call UnitAddAbility(O11O1I,1093684058)
call UnitApplyTimedLifeBJ(5.00,1112820806,O11O1I)
call IssueTargetOrder(O11O1I,"innerfire",OOI010)
call SetUnitPathing(O11O1I,false)
call SetUnitInvulnerable(O11O1I,true)
call UnitAddAbility(O11O1I,1097625443)
call RemoveLocation(O000OI)
endfunction
function I0O0OI takes nothing returns nothing
if I1IO0O(GetEnumUnit(),"I0O00I")==true then
call I11I1O(GetOwningPlayer(GetEnumUnit()),"Mekansm failed to heal"+GetUnitName(GetEnumUnit())+"because it has been healed by Mekansm in the past 25 seconds")
else
call I1I01O(GetEnumUnit(),"I0O00I",25)
call SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)+250)
endif
endfunction
function I0O00I takes nothing returns nothing
local unit OOI0I0=GetTriggerUnit()
local group g=CreateGroup()
call GroupEnumUnitsInRange(g,GetUnitX(OOI0I0),GetUnitY(OOI0I0),450,Condition(function OI0I10))
call ForGroup(g,function I0O0OI)
call DestroyGroup(g)
set OOI0I0=null
set g=null
endfunction
function I0O0II takes nothing returns boolean
if GetSpellAbilityId()==1093681995 then
call I0O00I()
endif
return false
endfunction
constant function I0O01I takes nothing returns integer
return 1227894858
endfunction
constant function I0OIOI takes nothing returns integer
return 1227894856
endfunction
constant function I0OI0I takes nothing returns integer
return 1227894857
endfunction
constant function I0OIII takes nothing returns integer
return 1227894855
endfunction
constant function I0OI1I takes nothing returns integer
return 1227894859
endfunction
constant function I0O1OI takes nothing returns integer
return 1227894874
endfunction
function I0O10I takes integer IO00II returns boolean
return IO00II==1886545267 or IO00II==1886350702 or IO00II==1886287477 or IO00II==1718055524 or IO00II==1227894839 or IO00II==1227894852
endfunction
function I0O1II takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local item O1II1I=II00OO(I1I0IO,"Item")
local unit OIIOII=IIO1OO(I1I0IO,"Unit")
local item I0O11I
local integer O1IIOI
if(GetItemTypeId(O1II1I)==I0OI1I()or GetItemTypeId(O1II1I)==I0O1OI())and GetUnitState(OIIOII,UNIT_STATE_LIFE)>1 then
set I0O11I=CreateItem(II000O(I011OO(O1II1I),I011OO(OIIOII)),GetUnitX(OIIOII),GetUnitY(OIIOII))
call I0110O(I011OO(O1II1I))
set O1IIOI=OIO100(OIIOII,O1II1I)
call RemoveItem(O1II1I)
call UnitAddItem(OIIOII,I0O11I)
call I0110O(I1I0IO)
call UnitAddItemToSlotById(OIIOII,I0OIOI(),O1IIOI)
call O0OOI0(t)
endif
endfunction
function I00OOI takes item I0O11I,unit OOOIO0 returns nothing
local timer t=CreateTimer()
call IIOOIO(I011OO(t),"Item",I0O11I)
call IIOOIO(I011OO(t),"Unit",OOOIO0)
if GetItemTypeId(I0O11I)==I0O1OI()then
call TimerStart(t,180,true,function I0O1II)
else
call TimerStart(t,120,true,function I0O1II)
endif
endfunction
function I00O0I takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
local effect FX=II0O0O(I1I0IO,"FX")
local real OOII00=II00IO(I1I0IO,"SourceX")
local real OOIII0=II00IO(I1I0IO,"SourceY")
if GetUnitState(OOI010,UNIT_STATE_LIFE)>1 then
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",GetUnitX(OOI010),GetUnitY(OOI010)))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl",OOII00,OOIII0))
call SetUnitPosition(OOI010,OOII00,OOIII0)
endif
call DestroyEffect(FX)
call O0OOI0(t)
endfunction
function Bottle_Recall takes nothing returns nothing
local unit OOI010=GetSpellTargetUnit()
local real OOII00=GetUnitX(OOI010)
local real OOIII0=GetUnitY(OOI010)
local effect FX=AddSpecialEffect("Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl",OOII00,OOIII0)
local timer t=CreateTimer()
local string I1I0IO=I011OO(t)
call OO1010("Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl",OOI010,"overhead",15)
call IIOOIO(I1I0IO,"FX",FX)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIO01O(I1I0IO,"SourceX",OOII00)
call IIO01O(I1I0IO,"SourceY",OOIII0)
call TimerStart(t,15,false,function I00O0I)
endfunction
function I00OII takes nothing returns nothing
if GetSpellAbilityId()==1093683254 then
call IIOOIO(I011OO(GetTriggerUnit()),"BottleTargetUnit",null)
call IIO00O(I011OO(GetTriggerUnit()),"BottleTargetItemId",0)
if GetUnitTypeId(GetSpellTargetUnit())==1852206952 or GetUnitTypeId(GetSpellTargetUnit())==1852073580 then
call IIOOIO(I011OO(GetTriggerUnit()),"BottleTargetUnit",GetSpellTargetUnit())
elseif I0O10I(GetItemTypeId(GetSpellTargetItem()))then
call IIO00O(I011OO(GetTriggerUnit()),"BottleTargetItemId",GetItemTypeId(GetSpellTargetItem()))
call RemoveItem(GetSpellTargetItem())
endif
endif
endfunction
function I00O1I takes nothing returns boolean
return GetItemTypeId(GetManipulatedItem())==I0O01I()or GetItemTypeId(GetManipulatedItem())==I0OIOI()or GetItemTypeId(GetManipulatedItem())==I0OI0I()or GetItemTypeId(GetManipulatedItem())==I0OIII()or GetItemTypeId(GetManipulatedItem())==I0OI1I()or GetItemTypeId(GetManipulatedItem())==I0O1OI()
endfunction
function I000OI takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local unit I0000I
local integer I000II
local item O1II1I=GetManipulatedItem()
local item I0O11I
local item I0001I
local integer IO00II=GetItemTypeId(O1II1I)
local item RuneTempItem1
local item RuneTempItem2
local integer O1IIOI
if IO00II==I0OIII()then
set O1IIOI=OIO100(OOOIO0,O1II1I)
set I0000I=IIO1OO(I011OO(OOOIO0),"BottleTargetUnit")
set I000II=II000O(I011OO(OOOIO0),"BottleTargetItemId")
if GetUnitTypeId(I0000I)==1852206952 or GetUnitTypeId(I0000I)==1852073580 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl",OOOIO0,"overhead"))
call I11IOO(GetOwningPlayer(OOOIO0),"Abilities\\Spells\\Human\\Heal\\HealTarget.wav")
call RemoveItem(O1II1I)
call UnitAddItemToSlotById(OOOIO0,I0O01I(),O1IIOI)
elseif I0O10I(I000II)then
set O1IIOI=OIO100(OOOIO0,O1II1I)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl",OOOIO0,"overhead"))
call RemoveItem(O1II1I)
call DisableTrigger(O0O1I)
call UnitAddItemToSlotById(OOOIO0,I0OI1I(),O1IIOI)
set I0O11I=UnitItemInSlot(OOOIO0,O1IIOI)
call EnableTrigger(O0O1I)
call IIO00O(I011OO(I0O11I),I011OO(OOOIO0),I000II)
call I00OOI(I0O11I,OOOIO0)
endif
elseif IO00II==I0O01I()then
set O1IIOI=OIO100(OOOIO0,O1II1I)
call RemoveItem(O1II1I)
call UnitAddItemToSlotById(OOOIO0,I0OIOI(),O1IIOI)
elseif IO00II==I0OIOI()then
set O1IIOI=OIO100(OOOIO0,O1II1I)
call RemoveItem(O1II1I)
call UnitAddItemToSlotById(OOOIO0,I0OI0I(),O1IIOI)
elseif IO00II==I0OI0I()then
set O1IIOI=OIO100(OOOIO0,O1II1I)
call RemoveItem(O1II1I)
call UnitAddItemToSlotById(OOOIO0,I0OIII(),O1IIOI)
elseif IO00II==I0OI1I()then
set O1IIOI=OIO100(OOOIO0,O1II1I)
set I0O11I=CreateItem(II000O(I011OO(O1II1I),I011OO(OOOIO0)),GetUnitX(OOOIO0),GetUnitY(OOOIO0))
call I0110O(I011OO(O1II1I))
call RemoveItem(O1II1I)
call UnitAddItem(OOOIO0,I0O11I)
call UnitAddItemToSlotById(OOOIO0,I0OIOI(),O1IIOI)
endif
endfunction
function I00IOI takes unit I1IIIO,real x,real y returns nothing
local string I1I0IO=I011OO(GetOwningPlayer(I1IIIO))
local unit O1I010=IIO1OO(I1I0IO,"Kobold1")
local unit O1IIO0=IIO1OO(I1I0IO,"Kobold2")
local unit O1II00=IIO1OO(I1I0IO,"Kobold3")
if O1I010!=null then
call ReviveHero(O1I010,x,y,true)
call O101I0(O1I010)
endif
if O1IIO0!=null then
call ReviveHero(O1IIO0,x,y,true)
call O101I0(O1IIO0)
endif
if O1II00!=null then
call ReviveHero(O1II00,x,y,true)
call O101I0(O1II00)
endif
set O1I010=null
set O1IIO0=null
set O1II00=null
endfunction
function I00I0I takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local real x=II00IO(I1I0IO,"x")
local real y=II00IO(I1I0IO,"y")
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
call PanCameraToTimedForPlayer(GetOwningPlayer(I1IIIO),x,y,0)
call SetUnitX(I1IIIO,x)
call SetUnitY(I1IIIO,y)
call O101I0(I1IIIO)
if GetUnitTypeId(I1IIIO)==1211117641 then
call I00IOI(I1IIIO,x,y)
endif
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set I1IIIO=null
return false
endfunction
function I00III takes unit I1IIIO,real x,real y returns nothing
local string I1I0IO=I011OO(GetOwningPlayer(I1IIIO))
local unit O1I010=IIO1OO(I1I0IO,"Kobold1")
local unit O1IIO0=IIO1OO(I1I0IO,"Kobold2")
local unit O1II00=IIO1OO(I1I0IO,"Kobold3")
if O1I010!=null then
call SetUnitX(O1I010,x)
call SetUnitY(O1I010,y)
endif
if O1IIO0!=null then
call SetUnitX(O1IIO0,x)
call SetUnitY(O1IIO0,y)
endif
if O1II00!=null then
call SetUnitX(O1II00,x)
call SetUnitY(O1II00,y)
endif
set O1I010=null
set O1IIO0=null
set O1II00=null
endfunction
function I00I1I takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local real x
local real y
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
if II0I0O(GetOwningPlayer(I1IIIO))then
set x=GetRectCenterX(OI01O)
set y=GetRectCenterY(OI01O)
else
set x=GetRectCenterX(OIOOO)
set y=GetRectCenterY(OIOOO)
endif
if GetUnitTypeId(I1IIIO)==1211117641 then
call I00III(I1IIIO,x,y)
endif
call TriggerRegisterTimerEvent(t,4,false)
call TriggerAddCondition(t,Condition(function I00I0I))
call IIO01O(I1I0IO,"x",x)
call IIO01O(I1I0IO,"y",y)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
set t=null
set I1IIIO=null
endfunction
function I001OI takes nothing returns boolean
if GetItemTypeId(GetManipulatedItem())==1227895112 then
call I00I1I()
endif
return false
endfunction
function I0010I takes nothing returns boolean
return GetItemType(GetManipulatedItem())==ITEM_TYPE_PURCHASABLE
endfunction
function I001II takes nothing returns nothing
local item O1O1O0=GetManipulatedItem()
local item O1O100
local unit I1IIIO=GetTriggerUnit()
call DisableTrigger(GetTriggeringTrigger())
call UnitRemoveItem(I1IIIO,O1O1O0)
set O1O100=OO00I0(I1IIIO,GetItemTypeId(O1O1O0))
call UnitRemoveItem(I1IIIO,O1O100)
call SetItemCharges(O1O1O0,GetItemCharges(O1O1O0)+GetItemCharges(O1O100))
call RemoveItem(O1O100)
call UnitAddItem(I1IIIO,O1O1O0)
call EnableTrigger(GetTriggeringTrigger())
endfunction
function I0011I takes nothing returns nothing
if I1O10O(GetTriggerUnit())then
if GetItemTypeId(GetManipulatedItem())==1869375847 or GetItemTypeId(GetManipulatedItem())==1936683571 or GetItemTypeId(GetManipulatedItem())==1936683574 or GetItemTypeId(GetManipulatedItem())==1936683573 or GetItemTypeId(GetManipulatedItem())==1936683572 then
call SetItemDroppable(GetManipulatedItem(),true)
endif
endif
endfunction
function I0IOOI takes nothing returns nothing
if I1O10O(GetTriggerUnit())then
if GetItemTypeId(GetManipulatedItem())==1869375847 or GetItemTypeId(GetManipulatedItem())==1936683571 or GetItemTypeId(GetManipulatedItem())==1936683574 or GetItemTypeId(GetManipulatedItem())==1936683573 or GetItemTypeId(GetManipulatedItem())==1936683572 then
call SetItemDroppable(GetManipulatedItem(),false)
endif
endif
endfunction
function I0IO0I takes nothing returns boolean
return GetSpellAbilityId()==1094935400
endfunction
function I0IOII takes nothing returns nothing
call UnitApplyTimedLifeBJ(1200.00,1112820806,GetSpellTargetUnit())
call UnitAddAbility(GetSpellTargetUnit(),1097167976)
call OOI1I0(GetSpellTargetUnit())
endfunction
function I0IO1I takes nothing returns boolean
return GetSpellAbilityId()==1093677655
endfunction
function I0I0OI takes nothing returns nothing
call UnitResetCooldown(GetTriggerUnit())
endfunction
function I0I00I takes nothing returns boolean
if(not(GetUnitTypeId(GetTriggerUnit())==1848651850))then
return false
endif
if(IsUnitType(GetKillingUnit(),UNIT_TYPE_STRUCTURE)==true)then
return false
endif
return true
endfunction
function I0I0II takes nothing returns nothing
if IsUnitAlly(GetDyingUnit(),GetOwningPlayer(GetKillingUnit()))==false then
call UnitDamageTargetBJ(GetDyingUnit(),GetKillingUnit(),200.00,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)
endif
endfunction
function I0I01I takes nothing returns boolean
if(not(GetUnitTypeId(GetTriggerUnit())==1848651841))then
return false
endif
if(IsUnitType(GetKillingUnit(),UNIT_TYPE_STRUCTURE)==true)then
return false
endif
return true
endfunction
function I0IIOI takes nothing returns nothing
if IsUnitAlly(GetDyingUnit(),GetOwningPlayer(GetKillingUnit()))==false then
call UnitDamageTargetBJ(GetDyingUnit(),GetKillingUnit(),400.00,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)
endif
endfunction
function I0II0I takes nothing returns boolean
if(not(GetUnitTypeId(GetTriggerUnit())==1848651830))then
return false
endif
if(IsUnitType(GetKillingUnit(),UNIT_TYPE_STRUCTURE)==true)then
return false
endif
return true
endfunction
function I0IIII takes nothing returns nothing
if IsUnitAlly(GetDyingUnit(),GetOwningPlayer(GetKillingUnit()))==false then
call UnitDamageTargetBJ(GetDyingUnit(),GetKillingUnit(),600.00,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)
endif
endfunction
function I0II1I takes nothing returns boolean
if(GetSpellAbilityId()==1093683266)then
return true
endif
if(GetSpellAbilityId()==1093682227)then
return true
endif
if(GetSpellAbilityId()==1093682246)then
return true
endif
return false
endfunction
function Trig_MultipleNecro_Func001002001 takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())==1848651848)
endfunction
function I0I1OI takes nothing returns nothing
if((GetUnitTypeId(GetEnumUnit())==1848651848)or(GetUnitTypeId(GetEnumUnit())==1848651847)or(GetUnitTypeId(GetEnumUnit())==1848651851)or(GetUnitTypeId(GetEnumUnit())==1848651850)or(GetUnitTypeId(GetEnumUnit())==1848651841)or(GetUnitTypeId(GetEnumUnit())==1848651830))then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function I0I10I takes nothing returns nothing
local group II1O0O=I0I10O(GetOwningPlayer(GetTriggerUnit()))
call ForGroupBJ(II1O0O,function I0I1OI)
call DestroyGroup(II1O0O)
endfunction
function I0I1II takes nothing returns boolean
if(GetItemTypeId(GetManipulatedItem())!=1227894839)then
return false
endif
return true
endfunction
function I0I11I takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local location O000OI=GetUnitLoc(OOOIO0)
local unit O11O1I
set O11O1I=CreateUnitAtLoc(GetOwningPlayer(OOOIO0),1697656899,O000OI,bj_UNIT_FACING)
call UnitAddAbility(O11O1I,1093683026)
call UnitApplyTimedLifeBJ(2.00,1112820806,O11O1I)
call IssueTargetOrderById(O11O1I,852274,OOOIO0)
call SetUnitPathing(O11O1I,false)
call SetUnitInvulnerable(O11O1I,true)
call UnitAddAbility(O11O1I,1097625443)
call RemoveLocation(O000OI)
endfunction
function I01OOI takes nothing returns nothing
set O10=GetEnumItem()
endfunction
function I01O0I takes nothing returns nothing
local integer II10IO=GetRandomInt(1,10)
set O10=null
call EnumItemsInRectBJ(OI1IO,function I01OOI)
if(O10==null)then
set OI[1]=true
else
set OI[1]=false
endif
set O10=null
call EnumItemsInRectBJ(OII1O,function I01OOI)
if(O10==null)then
set OI[2]=true
else
set OI[2]=false
endif
if(OI[1]and OI[2])then
if(II10IO==1)then
call CreateItemLoc(1718055524,OO00)
endif
if(II10IO==2)then
call CreateItemLoc(1886545267,OO00)
endif
if(II10IO==3)then
call CreateItemLoc(1886350702,OO00)
endif
if(II10IO==4)then
call CreateItemLoc(1886287477,OO00)
endif
if(II10IO==5)then
call CreateItemLoc(1718055524,OOI0)
endif
if(II10IO==6)then
call CreateItemLoc(1886545267,OOI0)
endif
if(II10IO==7)then
call CreateItemLoc(1886350702,OOI0)
endif
if(II10IO==8)then
call CreateItemLoc(1886287477,OOI0)
endif
if(II10IO==9)then
call CreateItemLoc(1227894839,OO00)
endif
if(II10IO==10)then
call CreateItemLoc(1227894839,OOI0)
endif
set OI[1]=false
set OI[2]=false
endif
endfunction
function I01OII takes nothing returns boolean
return GetItemType(GetManipulatedItem())==ITEM_TYPE_POWERUP
endfunction
function I01O1I takes unit III1IO,item OIO1I0,integer I010OI returns nothing
call RemoveItem(OIO1I0)
call UnitAddItemById(III1IO,I010OI)
endfunction
function I0100I takes nothing returns nothing
local item I010II=GetManipulatedItem()
local unit OOOIO0=GetTriggerUnit()
local integer I0101I=GetItemTypeId(I010II)
call DisableTrigger(GetTriggeringTrigger())
if(I0101I==1953719156)then
call I01O1I(OOOIO0,I010II,1835233897)
elseif(I0101I==1953723442)then
call I01O1I(OOOIO0,I010II,1986290796)
elseif(I0101I==1953525623)then
call I01O1I(OOOIO0,I010II,1953723506)
elseif(I0101I==1953066612)then
call I01O1I(OOOIO0,I010II,1953066546)
elseif(I0101I==1952741426)then
call I01O1I(OOOIO0,I010II,1952807024)
elseif(I0101I==1920426356)then
call I01O1I(OOOIO0,I010II,1952736632)
elseif(I0101I==1920168036)then
call I01O1I(OOOIO0,I010II,1920168044)
elseif(I0101I==1920099699)then
call I01O1I(OOOIO0,I010II,1920168051)
elseif(I0101I==1919770990)then
call I01O1I(OOOIO0,I010II,1920099682)
elseif(I0101I==1919444273)then
call I01O1I(OOOIO0,I010II,1920099633)
elseif(I0101I==1920099634)then
call I01O1I(OOOIO0,I010II,1919444274)
elseif(I0101I==1919444275)then
call I01O1I(OOOIO0,I010II,1919770930)
elseif(I0101I==1835101800)then
call I01O1I(OOOIO0,I010II,1919183219)
elseif(I0101I==1735751273)then
call I01O1I(OOOIO0,I010II,1735355492)
elseif(I0101I==1734766450)then
call I01O1I(OOOIO0,I010II,1735355758)
elseif(I0101I==1819107954)then
call I01O1I(OOOIO0,I010II,2002874980)
elseif(I0101I==1702261868)then
call I01O1I(OOOIO0,I010II,1818784628)
elseif(I0101I==1936943468)then
call I01O1I(OOOIO0,I010II,1937007980)
elseif(I0101I==1918986033)then
call I01O1I(OOOIO0,I010II,1920428410)
elseif(I0101I==1651663203)then
call I01O1I(OOOIO0,I010II,1935827816)
elseif(I0101I==1919182131)then
call I01O1I(OOOIO0,I010II,1919707494)
elseif(I0101I==1919182129)then
call I01O1I(OOOIO0,I010II,1919182130)
elseif(I0101I==1886219873)then
call I01O1I(OOOIO0,I010II,1886549620)
elseif(I0101I==1919512113)then
call I01O1I(OOOIO0,I010II,1835233141)
elseif(I0101I==1802529134)then
call I01O1I(OOOIO0,I010II,1818715240)
elseif(I0101I==1751348590)then
call I01O1I(OOOIO0,I010II,1919448168)
elseif(I0101I==1734567276)then
call I01O1I(OOOIO0,I010II,1752588652)
elseif(I0101I==1668051812)then
call I01O1I(OOOIO0,I010II,1668446579)
elseif(I0101I==1918989369)then
call I01O1I(OOOIO0,I010II,1668048493)
elseif(I0101I==1668181858)then
call I01O1I(OOOIO0,I010II,1918989411)
elseif(I0101I==1634362734)then
call I01O1I(OOOIO0,I010II,1651732580)
elseif(I0101I==1634099555)then
call I01O1I(OOOIO0,I010II,1936749416)
elseif(I0101I==2003596132)then
call I01O1I(OOOIO0,I010II,2003007843)
elseif(I0101I==2003791219)then
call I01O1I(OOOIO0,I010II,2004052083)
elseif(I0101I==1953461367)then
call I01O1I(OOOIO0,I010II,2003397740)
elseif(I0101I==1718052456)then
call I01O1I(OOOIO0,I010II,1718055527)
elseif(I0101I==1936876915)then
call I01O1I(OOOIO0,I010II,1936880227)
elseif(I0101I==1227894835)then
call I01O1I(OOOIO0,I010II,1935765092)
elseif(I0101I==1885825125)then
call I01O1I(OOOIO0,I010II,1885826401)
elseif(I0101I==1936220530)then
call I01O1I(OOOIO0,I010II,1768842867)
elseif(I0101I==1752394870)then
call I01O1I(OOOIO0,I010II,1885564018)
elseif(I0101I==1836019566)then
call I01O1I(OOOIO0,I010II,1885957750)
elseif(I0101I==1227894849)then
call I01O1I(OOOIO0,I010II,1227894850)
elseif(I0101I==1227894866)then
call I01O1I(OOOIO0,I010II,1227894870)
elseif(I0101I==1227894872)then
call I01O1I(OOOIO0,I010II,1227894873)
elseif(I0101I==1227895091)then
call I01O1I(OOOIO0,I010II,1227895092)
elseif(I0101I==1227895105)then
call I01O1I(OOOIO0,I010II,1227895106)
elseif(I0101I==1227895116)then
call I01O1I(OOOIO0,I010II,1227895117)
elseif(I0101I==1227895122)then
call I01O1I(OOOIO0,I010II,1227895123)
elseif(I0101I==1227894849)then
call I01O1I(OOOIO0,I010II,1227894850)
elseif(I0101I==1685288301)then
call I01O1I(OOOIO0,I010II,1920169009)
elseif(I0101I==1227895124)then
call I01O1I(OOOIO0,I010II,1227895344)
endif
call EnableTrigger(GetTriggeringTrigger())
endfunction
function I01IOI takes unit I1IIIO,item I0O11I returns nothing
local integer IO00II=GetItemTypeId(I0O11I)
local player II01IO=GetOwningPlayer(I1IIIO)
if IO00II==1919248950 or IO00II==1227894865 or IO00II==1735553900 or IO00II==1227895109 or IO00II==1919906931 then
call DisplayTimedTextToPlayer(II01IO,0,0,5,"|cffffcc00"+GetItemName(I0O11I)+"can be disassembled into its components from your circle of power near the hero taverns.|r")
endif
endfunction
function I01I0I takes unit OOOIO0,integer O1O1O0,integer O1O100,integer O1O1I0,integer O1O110,integer I0O11I,integer I01III returns boolean
local effect I01I1I
if(I01III==1)then
if(UnitHasItemOfTypeBJ(OOOIO0,O1O1O0))then
call RemoveItem(GetItemOfTypeFromUnitBJ(OOOIO0,O1O1O0))
set I01I1I=AddSpecialEffectTargetUnitBJ("origin",OOOIO0,"Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl")
call I01IOI(OOOIO0,UnitAddItemById(OOOIO0,I0O11I))
call DestroyEffect(I01I1I)
return true
endif
endif
if(I01III==2)then
if(UnitHasItemOfTypeBJ(OOOIO0,O1O1O0))then
if(UnitHasItemOfTypeBJ(OOOIO0,O1O100))then
call RemoveItem(GetItemOfTypeFromUnitBJ(OOOIO0,O1O1O0))
call RemoveItem(GetItemOfTypeFromUnitBJ(OOOIO0,O1O100))
set I01I1I=AddSpecialEffectTargetUnitBJ("origin",OOOIO0,"Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl")
call I01IOI(OOOIO0,UnitAddItemById(OOOIO0,I0O11I))
call DestroyEffect(I01I1I)
return true
endif
endif
endif
if(I01III==3)then
if(UnitHasItemOfTypeBJ(OOOIO0,O1O1O0))then
if(UnitHasItemOfTypeBJ(OOOIO0,O1O100))then
if(UnitHasItemOfTypeBJ(OOOIO0,O1O1I0))then
call RemoveItem(GetItemOfTypeFromUnitBJ(OOOIO0,O1O1O0))
call RemoveItem(GetItemOfTypeFromUnitBJ(OOOIO0,O1O100))
call RemoveItem(GetItemOfTypeFromUnitBJ(OOOIO0,O1O1I0))
set I01I1I=AddSpecialEffectTargetUnitBJ("origin",OOOIO0,"Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl")
call I01IOI(OOOIO0,UnitAddItemById(OOOIO0,I0O11I))
call DestroyEffect(I01I1I)
return true
endif
endif
endif
endif
if(I01III==4)then
if(UnitHasItemOfTypeBJ(OOOIO0,O1O1O0))then
if(UnitHasItemOfTypeBJ(OOOIO0,O1O100))then
if(UnitHasItemOfTypeBJ(OOOIO0,O1O1I0))then
if(UnitHasItemOfTypeBJ(OOOIO0,O1O110))then
call RemoveItem(GetItemOfTypeFromUnitBJ(OOOIO0,O1O1O0))
call RemoveItem(GetItemOfTypeFromUnitBJ(OOOIO0,O1O100))
call RemoveItem(GetItemOfTypeFromUnitBJ(OOOIO0,O1O1I0))
call RemoveItem(GetItemOfTypeFromUnitBJ(OOOIO0,O1O110))
set I01I1I=AddSpecialEffectTargetUnitBJ("origin",OOOIO0,"Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl")
call I01IOI(OOOIO0,UnitAddItemById(OOOIO0,I0O11I))
call DestroyEffect(I01I1I)
return true
endif
endif
endif
endif
endif
return false
endfunction
function I011OI takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local integer IIII0O=1
local integer IIIIIO=O010
loop
exitwhen IIII0O>IIIIIO
if(I01I0I(OOOIO0,OO10[IIII0O],O0O0[IIII0O],O000[IIII0O],O0I0[IIII0O],OIO0[IIII0O],OII0[IIII0O]))then
set IIII0O=IIIIIO+1
endif
set IIII0O=IIII0O+1
endloop
call IOO11I(OOOIO0)
endfunction
function I0110I takes nothing returns boolean
return GetItemType(GetManipulatedItem())==ITEM_TYPE_PERMANENT or GetItemType(GetManipulatedItem())==ITEM_TYPE_CHARGED
endfunction
function I011II takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local item I010II=GetManipulatedItem()
local integer I0111I=GetUnitTypeId(OOOIO0)
local integer IIOOOI=GetItemTypeId(I010II)
call DisableTrigger(GetTriggeringTrigger())
if IIOOOI==1227895097 then
call RemoveItem(I010II)
call UnitAddItemById(OOOIO0,1227894858)
endif
if IIOOOI==1227895370 then
call RemoveItem(I010II)
call UnitAddItemById(OOOIO0,1227894856)
endif
if(IsUnitType(OOOIO0,UNIT_TYPE_MELEE_ATTACKER)==true)then
if(IIOOOI==1952998509)then
call RemoveItem(I010II)
call UnitAddItemById(OOOIO0,1952604523)
endif
if(IIOOOI==1868787570)then
call RemoveItem(I010II)
call UnitAddItemById(OOOIO0,1853059177)
endif
else
if(IIOOOI==1952604523)then
call RemoveItem(I010II)
call UnitAddItemById(OOOIO0,1952998509)
endif
if(IIOOOI==1853059177)then
call RemoveItem(I010II)
call UnitAddItemById(OOOIO0,1868787570)
endif
endif
if(IIOOOI==1227895120 or IIOOOI==1227895121)and(O1I1II(OOOIO0,1227895120,I010II)!=null or O1I1II(OOOIO0,1227895121,I010II)!=null)then
call DisplayTimedTextToPlayer(GetOwningPlayer(OOOIO0),0,OOIIO,10,"|c00ff0303You are only allowed to carry one Armlet.|r")
call UnitRemoveItem(OOOIO0,I010II)
endif
if(IIOOOI==1227895127 or IIOOOI==1227895126 or IIOOOI==1751937908)and(O1I1II(OOOIO0,1227895127,I010II)!=null or O1I1II(OOOIO0,1227895126,I010II)!=null or O1I1II(OOOIO0,1751937908,I010II)!=null)then
call DisplayTimedTextToPlayer(GetOwningPlayer(OOOIO0),0,OOIIO,10,"|c00ff0303You are only allowed to carry one Power Treads.|r")
call UnitRemoveItem(OOOIO0,I010II)
endif
if IIOOOI==1684370275 and(I0111I==1215723364 or I0111I==1429221446)then
call DisplayTimedTextToPlayer(GetOwningPlayer(OOOIO0),0,OOIIO,10,"|c00ff0303Your hero is not allowed to wield this item|r")
call UnitRemoveItem(OOOIO0,I010II)
endif
if IIOOOI==1684370275 and(I0111I==1215723364 or I0111I==1429221446)then
call DisplayTimedTextToPlayer(GetOwningPlayer(OOOIO0),0,OOIIO,10,"|c00ff0303Your hero is not allowed to wield this item|r")
call UnitRemoveItem(OOOIO0,I010II)
endif
if IIOOOI==1868983399 and(I0111I==1697657160 or I0111I==1697657178)then
call DisplayTimedTextToPlayer(GetOwningPlayer(OOOIO0),0,OOIIO,10,"|c00ff0303Your crow is not allowed to wield this item.|r")
call UnitRemoveItem(OOOIO0,I010II)
endif
if IIOOOI==1868984943 and I0111I==1429221431 then
call DisplayTimedTextToPlayer(GetOwningPlayer(OOOIO0),0,OOIIO,10,"|c00ff0303Do not use two avatars in right after each other,there is a warcraft engine bug with this.|r")
endif
call EnableTrigger(GetTriggeringTrigger())
endfunction
function IIOO0I takes integer O1IOOI returns boolean
return O1IOOI==1227894838 or O1IOOI==1227895345 or O1IOOI==1227895346 or O1IOOI==1227895348 or O1IOOI==1227895349 or O1IOOI==1227895350 or O1IOOI==1227895351 or O1IOOI==1227895352 or O1IOOI==1227895353 or O1IOOI==1227895361 or O1IOOI==1227895362 or O1IOOI==1227895363 or O1IOOI==1227895364 or O1IOOI==1227895365 or O1IOOI==1227895366 or O1IOOI==1227895367 or O1IOOI==1227895368 or O1IOOI==1227895369
endfunction
function IIOOII takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local integer I0111I=GetUnitTypeId(I1IIIO)
local item IIOO1I=GetManipulatedItem()
local integer IIOOOI=GetItemTypeId(IIOO1I)
local integer I000II=0
local integer IIO0OI=0
call DisableTrigger(GetTriggeringTrigger())
if I0111I==1214409837 then
set I000II=1227895345
set IIO0OI=1093686350
elseif I0111I==1211117620 then
set I000II=1227895346
set IIO0OI=1093686352
elseif I0111I==1430466872 then
set I000II=1227895348
set IIO0OI=1093686354
elseif I0111I==1215130471 then
set I000II=1227895349
set IIO0OI=0
elseif I0111I==1211117640 then
set I000II=1227895350
set IIO0OI=1093686358
elseif I0111I==1430466609 then
set I000II=1227895351
set IIO0OI=1093686360
elseif I0111I==1332898670 then
set I000II=1227895352
set IIO0OI=1093686362
elseif I0111I==1215128178 then
set I000II=1227895353
set IIO0OI=1093686577
elseif I0111I==1214931305 then
set I000II=1227895361
set IIO0OI=1093686579
elseif I0111I==1433168227 then
set I000II=1227895362
set IIO0OI=1093686581
elseif I0111I==1164666213 then
set I000II=1227895363
set IIO0OI=1093686583
elseif I0111I==1164799603 then
set I000II=1227895364
set IIO0OI=1093686585
elseif I0111I==1162032439 then
set I000II=1227895365
set IIO0OI=1093686594
elseif I0111I==1429221445 then
set I000II=1227895366
set IIO0OI=1093686596
elseif I0111I==1160785973 then
set I000II=1227895367
set IIO0OI=1093686598
elseif I0111I==1160786241 then
set I000II=1227895368
set IIO0OI=1093686600
elseif I0111I==1430467634 then
set I000II=1227895369
set IIO0OI=1093686602
endif
if GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM then
if I000II==0 then
call RemoveItem(IIOO1I)
call UnitAddItemById(I1IIIO,1227894838)
else
call RemoveItem(IIOO1I)
call UnitAddItemById(I1IIIO,I000II)
if IIO0OI!=0 then
call UnitAddAbility(I1IIIO,IIO0OI)
call SetPlayerAbilityAvailable(GetOwningPlayer(I1IIIO),IIO0OI,false)
endif
endif
elseif O1I1II(I1IIIO,I000II,GetManipulatedItem())==null then
call UnitRemoveAbility(I1IIIO,IIO0OI)
endif
call EnableTrigger(GetTriggeringTrigger())
set I1IIIO=null
set IIOO1I=null
endfunction
function IIO00I takes nothing returns boolean
if IIOO0I(GetItemTypeId(GetManipulatedItem()))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true then
call IIOOII()
endif
return false
endfunction
function IIO0II takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
call DisableTrigger(O0OII)
if GetItemTypeId(GetManipulatedItem())==1918989414 then
call RemoveItem(GetManipulatedItem())
call UnitAddItemById(I1IIIO,1919248950)
call UnitAddItemById(I1IIIO,1936221047)
endif
call EnableTrigger(O0OII)
set I1IIIO=null
endfunction
function IIO01I takes nothing returns boolean
if GetItemTypeId(GetManipulatedItem())==1918989414 then
if OI0OO0(GetTriggerUnit())==0 then
call I11I1O(GetOwningPlayer(GetTriggerUnit()),"You must have an empty slot to disassemble this item.")
else
call IIO0II()
endif
endif
return false
endfunction
constant function IIOIOI takes nothing returns integer
return 1093684021
endfunction
function IIOI0I takes nothing returns boolean
return GetSpellAbilityId()==IIOIOI()
endfunction
function IIOIII takes nothing returns nothing
local unit IIOI1I=GetTriggerUnit()
local item O1II1I=UnitItemInSlot(IIOI1I,0)
if GetItemTypeId(O1II1I)==1227894865 then
call RemoveItem(O1II1I)
call CreateItem(1936876132,GetUnitX(IIOI1I),GetUnitY(IIOI1I))
call CreateItem(1919837539,GetUnitX(IIOI1I),GetUnitY(IIOI1I))
endif
if GetItemTypeId(O1II1I)==1735553900 or GetItemTypeId(O1II1I)==1227895114 then
call RemoveItem(O1II1I)
call CreateItem(1936222318,GetUnitX(IIOI1I),GetUnitY(IIOI1I))
call CreateItem(1836016756,GetUnitX(IIOI1I),GetUnitY(IIOI1I))
endif
if GetItemTypeId(O1II1I)==1227895109 then
call RemoveItem(O1II1I)
call CreateItem(1869835375,GetUnitX(IIOI1I),GetUnitY(IIOI1I))
call CreateItem(1918989414,GetUnitX(IIOI1I),GetUnitY(IIOI1I))
endif
if GetItemTypeId(O1II1I)==1919906931 then
call RemoveItem(O1II1I)
call CreateItem(1784967790,GetUnitX(IIOI1I),GetUnitY(IIOI1I))
call CreateItem(1935897964,GetUnitX(IIOI1I),GetUnitY(IIOI1I))
endif
if GetItemTypeId(O1II1I)==1227895125 then
call RemoveItem(O1II1I)
call CreateItem(1918987571,GetUnitX(IIOI1I),GetUnitY(IIOI1I))
call CreateItem(1918987570,GetUnitX(IIOI1I),GetUnitY(IIOI1I))
endif
if IIOO0I(GetItemTypeId(O1II1I))then
call RemoveItem(O1II1I)
call CreateItem(1869835375,GetUnitX(IIOI1I),GetUnitY(IIOI1I))
call CreateItem(1918987570,GetUnitX(IIOI1I),GetUnitY(IIOI1I))
endif
endfunction
function IIO1OI takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local integer IIII0O=0
local integer IIO10I=0
local item RuneTempItem1
local item RuneTempItem2
local item RuneTempItem3
local item I0001I
call DisableTrigger(GetTriggeringTrigger())
loop
exitwhen IIII0O>5
if(GetItemTypeId(UnitItemInSlot(OOOIO0,IIII0O))==1718378855)then
set IIO10I=IIO10I+1
endif
set IIII0O=IIII0O+1
endloop
if IIO10I>1 and OO00I0(OOOIO0,2003397740)!=null then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",OOOIO0,"origin"))
call RemoveItem(OO00I0(OOOIO0,2003397740))
call RemoveItem(OO00I0(OOOIO0,1718378855))
call RemoveItem(OO00I0(OOOIO0,1718378855))
call UnitAddItemById(OOOIO0,1952803955)
endif
set IIO10I=0
set IIII0O=0
loop
exitwhen IIII0O>5
if(GetItemTypeId(UnitItemInSlot(OOOIO0,IIII0O))==1227894874)then
set IIO10I=IIO10I+1
endif
set IIII0O=IIII0O+1
endloop
if IIO10I>1 and OO00I0(OOOIO0,1936880748)!=null then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",OOOIO0,"origin"))
call RemoveItem(OO00I0(OOOIO0,1227894874))
call RemoveItem(OO00I0(OOOIO0,1227894874))
call RemoveItem(OO00I0(OOOIO0,1936880748))
call UnitAddItemById(OOOIO0,1920296820)
endif
if O0OO00(OOOIO0,1936548206)!=null and O0OO00(OOOIO0,1227894873)!=null then
call RemoveItem(O0OO00(OOOIO0,1227894873))
set I0001I=O0OO00(OOOIO0,1936548206)
if GetItemCharges(I0001I)==1 then
call RemoveItem(I0001I)
else
call SetItemCharges(I0001I,GetItemCharges(I0001I)-1)
endif
call UnitAddItemById(OOOIO0,1227894871)
call DestroyEffect(AddSpecialEffectTargetUnitBJ("origin",OOOIO0,"Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl"))
endif
set IIO10I=0
set IIII0O=0
loop
exitwhen IIII0O>5
if(GetItemTypeId(UnitItemInSlot(OOOIO0,IIII0O))==1735816045)then
set IIO10I=IIO10I+1
endif
set IIII0O=IIII0O+1
endloop
if IIO10I>1 and OO00I0(OOOIO0,1751282792)!=null and OO00I0(OOOIO0,2002874980)!=null then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",OOOIO0,"origin"))
call RemoveItem(OO00I0(OOOIO0,1751282792))
call RemoveItem(OO00I0(OOOIO0,2002874980))
call RemoveItem(OO00I0(OOOIO0,1735816045))
call RemoveItem(OO00I0(OOOIO0,1735816045))
call UnitAddItemById(OOOIO0,1952998509)
endif
set IIO10I=0
set IIII0O=0
loop
exitwhen IIII0O>5
if(GetItemTypeId(UnitItemInSlot(OOOIO0,IIII0O))==1953197679)then
set IIO10I=IIO10I+1
endif
set IIII0O=IIII0O+1
endloop
if IIO10I>1 and OO00I0(OOOIO0,1935897964)!=null and OO00I0(OOOIO0,1936683569)!=null then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",OOOIO0,"origin"))
call RemoveItem(OO00I0(OOOIO0,1936683569))
call RemoveItem(OO00I0(OOOIO0,1935897964))
call RemoveItem(OO00I0(OOOIO0,1953197679))
call RemoveItem(OO00I0(OOOIO0,1953197679))
call UnitAddItemById(OOOIO0,1227895110)
endif
set IIO10I=0
set IIII0O=0
if OO00I0(OOOIO0,1935897964)!=null and OO00I0(OOOIO0,1936683569)!=null and OO00I0(OOOIO0,1919248950)!=null then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",OOOIO0,"origin"))
call RemoveItem(OO00I0(OOOIO0,1935897964))
call RemoveItem(OO00I0(OOOIO0,1936683569))
call RemoveItem(OO00I0(OOOIO0,1919248950))
call UnitAddItemById(OOOIO0,1227895110)
endif
call EnableTrigger(GetTriggeringTrigger())
endfunction
function IIO1II takes integer I0101I,real IIO11I returns nothing
set IOO0OO[IOO0IO]=I0101I
set IOO00O[IOO0IO]=IIO11I
set IOO0IO=IOO0IO+1
endfunction
function II0OOI takes nothing returns nothing
call IIO1II(1752134252,30)
call IIO1II(1870030190,210)
call IIO1II(1835955060,45)
call IIO1II(1227894834,60)
call IIO1II(1667786099,60)
call IIO1II(1885628790,100)
call IIO1II(1227894833,60)
call IIO1II(1650878578,50)
call IIO1II(2004055908,12)
call IIO1II(1919248946,20)
call IIO1II(1819177582,36)
call IIO1II(1936749157,13)
call IIO1II(1919906931,300)
call IIO1II(1953265005,60)
call IIO1II(1936093031,15)
call IIO1II(1835955046,28)
call IIO1II(1937012592,65)
call IIO1II(1935894636,70)
call IIO1II(1919248945,28)
call IIO1II(1803117164,120)
call IIO1II(1919248949,40)
call IIO1II(1667460452,26)
call IIO1II(1835823988,32)
call IIO1II(1684370275,25)
call IIO1II(1227894851,40)
call IIO1II(1227894865,45)
call IIO1II(1227894868,30)
call IIO1II(1868984943,85)
call IIO1II(1227895120,10)
call IIO1II(1227895125,30)
endfunction
function II0O0I takes integer I0101I returns real
local integer i=0
loop
exitwhen i>IOO0IO
if IOO0OO[i]==I0101I then
return IOO00O[i]
endif
set i=i+1
endloop
return 0.0
endfunction
function II0OII takes nothing returns boolean
local integer i
if IOOIIO>0 and IOOIOO[1]<1 then
set i=2
loop
exitwhen i>IOOIIO
set IOOIOO[i-1]=IOOIOO[i]
set IOOI0O[i-1]=IOOI0O[i]
set i=i+1
endloop
set IOOIIO=IOOIIO-1
endif
set i=1
loop
exitwhen i>IOOIIO
if IOOIOO[i]>=1 then
set IOOIOO[i]=IOOIOO[i]-1
if IOOIOO[i]<1 then
call SetItemDroppable(IOOI0O[i],true)
endif
endif
set i=i+1
endloop
return false
endfunction
function II0O1I takes nothing returns nothing
set IOOIIO=IOOIIO+1
set IOOI0O[IOOIIO]=GetManipulatedItem()
set IOOIOO[IOOIIO]=II0O0I(GetItemTypeId(GetManipulatedItem()))
call SetItemDroppable(GetManipulatedItem(),false)
endfunction
function II00OI takes nothing returns boolean
if II0O0I(GetItemTypeId(GetManipulatedItem()))>0 then
call II0O1I()
endif
return false
endfunction
function II000I takes unit III1IO returns location
return IO0I[GetUnitAbilityLevel(III1IO,IOOI)]
endfunction
function II00II takes unit III1IO returns boolean
return(GetOwningPlayer(III1IO)==III0[0])or(GetOwningPlayer(III1IO)==II10[0])
endfunction
function II001I takes unit III1IO returns boolean
if(GetOwningPlayer(III1IO)==III0[0])then
return true
endif
return false
endfunction
function II0IOI takes unit III1IO returns unit
return GetUnitUserData(III1IO)
return null
endfunction
function II0I0I takes unit III1IO returns nothing
call SetUnitUserData(III1IO,0)
call IssuePointOrderLoc(III1IO,"attack",II000I(III1IO))
endfunction
function II0III takes nothing returns nothing
call II0I0I(GetEnumUnit())
endfunction
function II0I1I takes group O1OOOI returns nothing
call ForGroup(O1OOOI,function II0III)
call GroupClear(O1OOOI)
endfunction
function II01OI takes nothing returns nothing
call IssueTargetOrder(GetEnumUnit(),"attack",O00I)
call GroupAddUnit(IO1I,GetEnumUnit())
call SetUnitUserData(GetEnumUnit(),I01IIO(O00I))
endfunction
function II010I takes nothing returns nothing
if GetUnitCurrentOrder(GetEnumUnit())==0 or not IsUnitInRange(GetEnumUnit(),O00I,GetUnitAcquireRange(GetEnumUnit()))then
call GroupRemoveUnit(IO1I,GetEnumUnit())
call SetUnitUserData(GetEnumUnit(),0)
call IssuePointOrderLoc(GetEnumUnit(),"attack",II000I(GetEnumUnit()))
endif
endfunction
function II01II takes unit III1IO,unit II011I returns boolean
if GetUnitTypeId(III1IO)==1700946284 or GetUnitTypeId(III1IO)==1970107511 then
return false
endif
if IsUnitEnemy(III1IO,GetOwningPlayer(II011I))then
if GetOwningPlayer(III1IO)==III0[0]or GetOwningPlayer(III1IO)==II10[0]then
if(GetUnitUserData(III1IO)==0)then
return true
endif
endif
endif
return false
endfunction
function IIIOOI takes nothing returns boolean
return II01II(GetFilterUnit(),O00I)
endfunction
function IIIO0I takes nothing returns nothing
local string I1I0IO=I011OO(IIO1OO(I011OO(GetExpiredTimer()),"Hero"))
call IIOOIO(I1I0IO,"Attacker",null)
call II0I1I(II0OOO(I1I0IO,"Defenders"))
endfunction
function IIIOII takes unit I1IIIO,unit IOO1OI returns boolean
local unit IIIO1I
if IsUnitEnemy(IOO1OI,GetOwningPlayer(I1IIIO))then
set IIIO1I=IIO1OO(I011OO(I1IIIO),"Attacker")
if IIIO1I==null or IIIO1I==IOO1OI or not IsUnitAliveBJ(IIIO1I)then
set IIIO1I=null
return true
endif
endif
set IIIO1I=null
return false
endfunction
function III0OI takes unit I1IIIO,unit IOO1OI returns nothing
local string I1I0IO=I011OO(I1IIIO)
local group III00I=II0OOO(I1I0IO,"Defenders")
local unit IIIO1I=IIO1OO(I1I0IO,"Attacker")
local boolexpr b
local group g
if(IIIO1I!=IOO1OI)and(IIIO1I!=null)then
call II0I1I(III00I)
endif
call IIOOIO(I1I0IO,"Attacker",IOO1OI)
set IO1I=III00I
set O00I=IOO1OI
call ForGroup(III00I,function II010I)
set b=Filter(function IIIOOI)
set g=CreateGroup()
call GroupEnumUnitsInRange(g,GetUnitX(IOO1OI),GetUnitY(IOO1OI),500,b)
call ForGroup(g,function II01OI)
call DestroyGroup(g)
call DestroyBoolExpr(b)
call TimerStart(IIO1IO(I1I0IO,"DefendTimer"),2,false,function IIIO0I)
endfunction
function III0II takes nothing returns boolean
return IIIOII(GetTriggerUnit(),GetAttacker())
endfunction
function III01I takes nothing returns nothing
call III0OI(GetTriggerUnit(),GetAttacker())
endfunction
function IIIIOI takes nothing returns boolean
if IsUnitType(GetOrderTargetUnit(),UNIT_TYPE_HERO)and not IsUnitIllusion(GetOrderTargetUnit())then
if GetIssuedOrderId()==851983 or GetIssuedOrderId()==851971 then
if IsUnitVisible(GetTriggerUnit(),GetOwningPlayer(GetOrderTargetUnit()))then
return IIIOII(GetOrderTargetUnit(),GetTriggerUnit())
endif
endif
endif
return false
endfunction
function IIII0I takes nothing returns nothing
call III0OI(GetOrderTargetUnit(),GetTriggerUnit())
endfunction
function IIIIII takes unit I1IIIO returns boolean
return II001O(I011OO(I1IIIO),"HeroAIManager")
endfunction
function IIII1I takes unit I1IIIO returns nothing
local group g
local trigger t
local timer tm
local string I1I0IO=I011OO(I1IIIO)
call IIOI0O(I1I0IO,"HeroAIManager",true)
set g=CreateGroup()
call IIOOIO(I1I0IO,"Defenders",g)
set t=CreateTrigger()
call IIOOIO(I1I0IO,"OnAttackOrder",t)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(t,Condition(function IIIIOI))
call TriggerAddAction(t,function IIII0I)
set t=CreateTrigger()
call IIOOIO(I1I0IO,"OnAttacked",t)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function III0II))
call TriggerAddAction(t,function III01I)
set tm=CreateTimer()
call IIOOIO(I011OO(I1IIIO),"DefendTimer",tm)
call IIOOIO(I011OO(tm),"Hero",I1IIIO)
endfunction
function III1OI takes nothing returns boolean
return IsUnitFogged(GetAttacker(),III0[1])or IsUnitFogged(GetAttacker(),II10[1])
endfunction
function III10I takes nothing returns nothing
local unit III1II=GetAttacker()
local fogmodifier III11I
local boolean b=false
if GetOwningPlayer(GetTriggerUnit())==III0[0]then
set III11I=CreateFogModifierRadius(III0[1],FOG_OF_WAR_VISIBLE,GetUnitX(III1II),GetUnitY(III1II),128,true,false)
elseif GetOwningPlayer(GetTriggerUnit())==II10[0]then
set III11I=CreateFogModifierRadius(II10[1],FOG_OF_WAR_VISIBLE,GetUnitX(III1II),GetUnitY(III1II),128,true,false)
endif
call O01000(III11I,1)
endfunction
function II1OOI takes nothing returns boolean
return GetIssuedOrderId()==851986
endfunction
function II1O0I takes nothing returns nothing
local unit II1OII=GetTriggerUnit()
local unit OOI010=II0IOI(II1OII)
call SetUnitPosition(II1OII,GetUnitX(II1OII),GetUnitY(II1OII))
if OOI010==null or not IsUnitVisible(OOI010,GetOwningPlayer(OOI010))then
call DisableTrigger(GetTriggeringTrigger())
call IssuePointOrderLoc(II1OII,"attack",II000I(II1OII))
call EnableTrigger(GetTriggeringTrigger())
else
call IssueTargetOrder(II1OII,"attack",II0IOI(II1OII))
endif
endfunction
function II1O1I takes nothing returns boolean
return II00II(GetTriggerUnit())
endfunction
function II10OI takes nothing returns nothing
local unit II1OII=GetTriggerUnit()
local unit OOI010=II0IOI(II1OII)
call SetUnitPosition(II1OII,GetUnitX(II1OII),GetUnitY(II1OII))
if OOI010==null or not IsUnitVisible(OOI010,GetOwningPlayer(OOI010))then
call DisableTrigger(GetTriggeringTrigger())
call IssuePointOrderLoc(II1OII,"attack",II000I(II1OII))
call EnableTrigger(GetTriggeringTrigger())
else
call IssueTargetOrder(II1OII,"attack",II0IOI(II1OII))
endif
endfunction
function II100I takes nothing returns nothing
local trigger t
local group g
local unit u
if I0OI then
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,III0[0],EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
call TriggerRegisterPlayerUnitEvent(t,II10[0],EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
call TriggerAddCondition(t,Condition(function II1OOI))
call TriggerAddAction(t,function II1O0I)
set t=CreateTrigger()
set g=CreateGroup()
call GroupEnumUnitsOfPlayer(g,III0[0],Condition(function OI0O00))
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
if GetUnitAcquireRange(u)!=0 then
call TriggerRegisterUnitInRange(t,u,600,null)
endif
endloop
call DestroyGroup(g)
set g=CreateGroup()
call GroupEnumUnitsOfPlayer(g,II10[0],Condition(function OI0O00))
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
if GetUnitAcquireRange(u)!=0 and IsUnitType(u,UNIT_TYPE_STRUCTURE)then
call TriggerRegisterUnitInRange(t,u,600,null)
endif
endloop
call DestroyGroup(g)
call TriggerAddCondition(t,Condition(function II1O1I))
call TriggerAddAction(t,function II10OI)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function III1OI))
call TriggerAddAction(t,function III10I)
endif
endfunction
function II10II takes nothing returns boolean
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and not IsUnitIllusion(GetTriggerUnit())then
if not IIIIII(GetTriggerUnit())then
return true
endif
endif
return false
endfunction
function II101I takes nothing returns nothing
call IIII1I(GetTriggerUnit())
endfunction
function II1IOI takes nothing returns boolean
return II00II(GetTriggerUnit())
endfunction
function II1I0I takes nothing returns nothing
if II001I(GetTriggerUnit())then
call SetUnitAbilityLevel(GetTriggerUnit(),IOOI,5)
else
call SetUnitAbilityLevel(GetTriggerUnit(),IOOI,1)
endif
if(II0IOI(GetTriggerUnit())==null)then
call II0I0I(GetTriggerUnit())
endif
endfunction
function II1III takes unit III1IO returns nothing
local integer i=0
loop
exitwhen(i==16)
if IsUnitAlly(III1IO,Player(i))then
call UnitShareVision(III1IO,Player(i),true)
endif
set i=i+1
endloop
endfunction
function II1I1I takes nothing returns nothing
call II1III(GetEnumUnit())
endfunction
function II11OI takes nothing returns nothing
local integer x
local group g
set x=1
loop
exitwhen x>5
call SetPlayerAlliance(III0[0],III0[x],ConvertAllianceType(5),false)
call SetPlayerAlliance(II10[0],II10[x],ConvertAllianceType(5),false)
set x=x+1
endloop
set g=CreateGroup()
call GroupEnumUnitsOfPlayer(g,III0[0],Condition(function OI0O00))
call ForGroup(g,function II1I1I)
call DestroyGroup(g)
set g=CreateGroup()
call GroupEnumUnitsOfPlayer(g,II10[0],Condition(function OI0O00))
call ForGroup(g,function II1I1I)
call DestroyGroup(g)
endfunction
function II110I takes nothing returns nothing
local integer x
set x=0
loop
exitwhen x>5
call SetPlayerAlliance(III0[x],I1O0,ConvertAllianceType(0),false)
call SetPlayerAlliance(III0[x],I1O0,ConvertAllianceType(1),false)
call SetPlayerAlliance(III0[x],I1O0,ConvertAllianceType(2),false)
call SetPlayerAlliance(III0[x],I1O0,ConvertAllianceType(3),false)
call SetPlayerAlliance(III0[x],I1O0,ConvertAllianceType(4),false)
call SetPlayerAlliance(III0[x],I1O0,ConvertAllianceType(5),false)
call SetPlayerAlliance(III0[x],I1O0,ConvertAllianceType(6),false)
call SetPlayerAlliance(III0[x],I1O0,ConvertAllianceType(7),false)
call SetPlayerAlliance(II10[x],I1O0,ConvertAllianceType(0),false)
call SetPlayerAlliance(II10[x],I1O0,ConvertAllianceType(1),false)
call SetPlayerAlliance(II10[x],I1O0,ConvertAllianceType(2),false)
call SetPlayerAlliance(II10[x],I1O0,ConvertAllianceType(3),false)
call SetPlayerAlliance(II10[x],I1O0,ConvertAllianceType(4),false)
call SetPlayerAlliance(II10[x],I1O0,ConvertAllianceType(5),false)
call SetPlayerAlliance(II10[x],I1O0,ConvertAllianceType(6),false)
call SetPlayerAlliance(II10[x],I1O0,ConvertAllianceType(7),false)
call SetPlayerAlliance(I1O0,III0[x],ConvertAllianceType(0),false)
call SetPlayerAlliance(I1O0,III0[x],ConvertAllianceType(1),false)
call SetPlayerAlliance(I1O0,III0[x],ConvertAllianceType(2),false)
call SetPlayerAlliance(I1O0,III0[x],ConvertAllianceType(3),false)
call SetPlayerAlliance(I1O0,III0[x],ConvertAllianceType(4),false)
call SetPlayerAlliance(I1O0,III0[x],ConvertAllianceType(5),false)
call SetPlayerAlliance(I1O0,III0[x],ConvertAllianceType(6),false)
call SetPlayerAlliance(I1O0,III0[x],ConvertAllianceType(7),false)
call SetPlayerAlliance(I1O0,II10[x],ConvertAllianceType(0),false)
call SetPlayerAlliance(I1O0,II10[x],ConvertAllianceType(1),false)
call SetPlayerAlliance(I1O0,II10[x],ConvertAllianceType(2),false)
call SetPlayerAlliance(I1O0,II10[x],ConvertAllianceType(3),false)
call SetPlayerAlliance(I1O0,II10[x],ConvertAllianceType(4),false)
call SetPlayerAlliance(I1O0,II10[x],ConvertAllianceType(5),false)
call SetPlayerAlliance(I1O0,II10[x],ConvertAllianceType(6),false)
call SetPlayerAlliance(I1O0,II10[x],ConvertAllianceType(7),false)
set x=x+1
endloop
endfunction
function II11II takes nothing returns boolean
return II00II(GetTriggerUnit())
endfunction
function II111I takes nothing returns nothing
call II1III(GetTriggerUnit())
endfunction
function I1OOOI takes nothing returns nothing
local trigger t
if not I0OI then
return
endif
call II11OI()
call II110I()
set t=CreateTrigger()
call TriggerRegisterEnterRectSimple(t,GetWorldBounds())
call TriggerAddCondition(t,Condition(function II11II))
call TriggerAddAction(t,function II111I)
endfunction
constant function I1OO0I takes nothing returns integer
return 1966092354
endfunction
function I1OOII takes nothing returns nothing
local unit I1OO1I=GetTriggerUnit()
local unit I1O0OI=IIO1OO(I011OO(I1OO1I),"Locust")
call RemoveUnit(I1O0OI)
endfunction
function I1O00I takes nothing returns nothing
local group g
local unit I1OO1I
local unit I1O0OI
local trigger t
local integer i
set t=CreateTrigger()
call TriggerAddAction(t,function I1OOII)
set g=CreateGroup()
call GroupEnumUnitsOfPlayer(g,III0[0],Condition(function OI0O00))
loop
set I1OO1I=FirstOfGroup(g)
exitwhen I1OO1I==null
call GroupRemoveUnit(g,I1OO1I)
if GetUnitAbilityLevel(I1OO1I,1097102451)>0 or GetUnitAbilityLevel(I1OO1I,1098150517)>0 then
call TriggerRegisterUnitEvent(t,I1OO1I,EVENT_UNIT_DEATH)
set I1O0OI=CreateUnit(III0[1],I1OO0I(),-5000,-5100,0)
call SetUnitScale(I1O0OI,0,0,0)
call SetUnitPathing(I1O0OI,false)
call SetUnitInvulnerable(I1O0OI,true)
call SetUnitX(I1O0OI,GetUnitX(I1OO1I))
call SetUnitY(I1O0OI,GetUnitY(I1OO1I))
call IIOOIO(I011OO(I1OO1I),"Locust",I1O0OI)
endif
endloop
call DestroyGroup(g)
set g=CreateGroup()
call GroupEnumUnitsOfPlayer(g,II10[0],Condition(function OI0O00))
loop
set I1OO1I=FirstOfGroup(g)
exitwhen I1OO1I==null
call GroupRemoveUnit(g,I1OO1I)
if GetUnitAbilityLevel(I1OO1I,1097102451)>0 or GetUnitAbilityLevel(I1OO1I,1098150517)>0 then
call TriggerRegisterUnitEvent(t,I1OO1I,EVENT_UNIT_DEATH)
set I1O0OI=CreateUnit(II10[1],I1OO0I(),3400,4400,0)
call SetUnitScale(I1O0OI,0,0,0)
call SetUnitPathing(I1O0OI,false)
call SetUnitInvulnerable(I1O0OI,true)
call SetUnitX(I1O0OI,GetUnitX(I1OO1I))
call SetUnitY(I1O0OI,GetUnitY(I1OO1I))
call IIOOIO(I011OO(I1OO1I),"Locust",I1O0OI)
endif
endloop
call DestroyGroup(g)
endfunction
function I1O0II takes unit I1OO1I returns unit
local string I1I0IO=I011OO(I1OO1I)
return IIO1OO(I1I0IO,"TowerAI|TowerTarget")
endfunction
function I1O01I takes unit I1OO1I,unit OOI010 returns nothing
local string I1I0IO=I011OO(I1OO1I)
call IIOOIO(I1I0IO,"TowerAI|TowerTarget",OOI010)
endfunction
function I1OIOI takes unit I1OO1I returns boolean
if IsUnitType(I1OO1I,UNIT_TYPE_STRUCTURE)==true and GetUnitAbilityLevel(I1OO1I,1097102451)>0 then
return true
endif
return false
endfunction
function I1OI0I takes nothing returns boolean
local unit I1OO1I=GetAttacker()
local unit I1OIII
if not(I1OIOI(I1OO1I))then
return false
endif
if GetUnitAbilityLevel(GetTriggerUnit(),1114665832)>0 then
call IssueImmediateOrder(GetAttacker(),"stop")
endif
if(II0IOI(I1OO1I)!=null)then
return false
endif
set I1OIII=I1O0II(I1OO1I)
if(I1OIII==null)then
return true
endif
if(GetUnitState(I1OIII,UNIT_STATE_LIFE)<1)then
return true
endif
if(IsUnitInRange(I1OO1I,I1OIII,GetUnitAcquireRange(I1OO1I)))then
return false
endif
return true
endfunction
function I1OI1I takes nothing returns nothing
local unit I1OO1I=GetAttacker()
local group g=CreateGroup()
local unit u
local real I1O1OI
local real I1O10I=151.0
local unit I1O1II=null
call GroupEnumUnitsInRange(g,GetUnitX(I1OO1I),GetUnitY(I1OO1I),GetUnitAcquireRange(I1OO1I),Condition(function OI0O00))
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
if IsUnitEnemy(u,GetOwningPlayer(I1OO1I))then
set I1O1OI=GetUnitState(u,UNIT_STATE_LIFE)
if I1O1OI<I1O10I and I1O1OI>1 and GetUnitTypeId(u)!=1865429059 and GetUnitAbilityLevel(u,1114665832)==0 then
set I1O10I=I1O1OI
set I1O1II=u
endif
endif
endloop
call I1O01I(I1OO1I,I1O1II)
if I1O1II!=null then
call DisableTrigger(GetTriggeringTrigger())
call IssueTargetOrder(I1OO1I,"attack",I1O1II)
if GetOwningPlayer(I1OO1I)==III0[0]then
call SetUnitAnimation(I1OO1I,"attack alternate")
endif
call EnableTrigger(GetTriggeringTrigger())
endif
call DestroyGroup(g)
endfunction
function I1O11I takes nothing returns boolean
return(GetUnitTypeId(GetAttacker())==1700946284 or GetUnitTypeId(GetAttacker())==1970107511)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false
endfunction
function I10OOI takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetAttacker()))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetAttacker()))and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false and GetOwningPlayer(GetFilterUnit())!=I1O0
endfunction
function I10O0I takes nothing returns nothing
if IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)==true then
set O00I=GetEnumUnit()
endif
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==false then
set IOII=GetEnumUnit()
endif
endfunction
function I10OII takes nothing returns nothing
local unit O1OO1I=GetAttacker()
local unit OOI010=GetTriggerUnit()
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function I10OOI)
local trigger t=GetTriggeringTrigger()
call DisableTrigger(t)
set O00I=null
set IOII=null
call GroupEnumUnitsInRange(II1O0O,GetUnitX(O1OO1I),GetUnitY(O1OO1I),1200,II1OIO)
call ForGroup(II1O0O,function I10O0I)
call DestroyGroup(II1O0O)
call DestroyBoolExpr(II1OIO)
if O00I!=null then
call IssueTargetOrder(O1OO1I,"attack",O00I)
call GroupAddUnit(IOOI1O,O1OO1I)
elseif IsUnitType(OOI010,UNIT_TYPE_HERO)==true and IOII!=null then
call IssueTargetOrder(O1OO1I,"attack",IOII)
call GroupAddUnit(IOOI1O,O1OO1I)
endif
call EnableTrigger(t)
endfunction
function I10O1I takes nothing returns nothing
if GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)<1 then
call GroupRemoveUnit(IOOI1O,GetEnumUnit())
endif
if GetUnitCurrentOrder(GetEnumUnit())!=OrderId("attack")then
call GroupRemoveUnit(IOOI1O,GetEnumUnit())
call IssuePointOrderLoc(GetEnumUnit(),"attack",II000I(GetEnumUnit()))
endif
endfunction
function I100OI takes nothing returns nothing
call ForGroup(IOOI1O,function I10O1I)
endfunction
function I1000I takes nothing returns nothing
local string I100II=StringCase(GetEventPlayerChatString(),false)
local boolean I1001I=I100II=="-random"
local boolean I10IOI=I100II=="-repick"
local boolean I10I0I=I100II=="-gameinfo"
local boolean I10III=SubString(I100II,0,5)=="-swap"
local boolean I10I1I=I100II=="-recreate"
local boolean I101OI=I100II=="-unstuck"
local boolean I1010I=I100II=="-matchup" or I100II=="-ma"
local boolean I101II=I100II=="-movespeed" or I100II=="-ms"
local boolean Attackspeed=I100II=="-attackspeed" or I100II=="-as"
local boolean I1011I=I100II=="-disablehelp"
local boolean I1IOOI=I100II=="-enablehelp"
local boolean I1IO0I=I100II=="-creepstats" or I100II=="-cs"
local boolean I1IOII=I100II=="-cson" or I100II=="-csoff"
local boolean I1IO1I=I100II=="-hidemsg"
local boolean I1I0OI=I100II=="-showmsg"
local boolean I1I00I=I100II=="-weather snow" or I100II=="-weather rain" or I100II=="-weather off" or I100II=="-weather random" or I100II=="-weather wind" or I100II=="-weather moonlight"
local boolean I1I0II=I100II=="-showdeny" or I100II=="-hidedeny"
local boolean I1I01I=I100II=="-denyinfo" or I100II=="-di"
local boolean I1IIOI=I100II=="-don" or I100II=="-deathon" or I100II=="-doff" or I100II=="-deathoff"
local boolean I1II0I=SubString(I100II,0,5)=="-roll"
local boolean I1IIII=I100II=="-hhn" or I100II=="-hideheronames"
local boolean IO0O1O=I100II=="-mute"
call OOOII0("I1II1I",I1001I)
call OOOII0("I1I1OI",I10IOI)
call OOOII0("I1I10I",I10I0I)
call OOOII0("I1I1II",I10III)
call OOOII0("I1I11I",I10I1I)
call OOOII0("I11OOI",I101OI)
call OOOII0("I11O0I",I1010I)
call OOOII0("I11OII",I101II)
call OOOII0("I11O1I",I1011I)
call OOOII0("I110OI",I1IOOI)
call OOOII0("I1100I",I1IO0I)
call OOOII0("I110II",I1IOII)
call OOOII0("I1101I",I1IO1I)
call OOOII0("I11IOI",I1I0OI)
call OOOII0("I11I0I",I1I00I)
call OOOII0("I11III",I1I0II)
call OOOII0("I11I1I",I1I01I)
call OOOII0("I111OI",I1IIOI)
call OOOII0("I1110I",I1II0I)
call OOOII0("I111II",I1IIII)
call OOOII0("I1111I",IO0O1O)
endfunction
function OOOOOOO takes nothing returns boolean
if OO1OO==false then
return false
endif
if I0I[GetPlayerId(OOOIO)]==true then
return false
endif
if OOO==false then
return false
endif
if OI10[GetPlayerId(OOOIO)]!=null and OO1IO==false then
return false
endif
if OIO[GetPlayerId(OOOIO)]==true then
return false
endif
if OO11O[GetPlayerId(OOOIO)]and OO1IO==false then
return false
endif
if OO1IO and O0O0O[GetPlayerId(OOOIO)]then
return false
endif
return true
endfunction
function OOOOO0O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local player p=IIO10O(I1I0IO,"p")
set OOOIO=p
if OOOOOOO()then
set I0I[GetPlayerId(p)]=true
call I1O0IO(p)
else
call DisplayTimedTextToPlayer(p,0,OOIIO,10,"You cannot be assigned a random hero.")
endif
set t=null
set p=null
return false
endfunction
function I1II1I takes nothing returns nothing
local player II01IO=GetTriggerPlayer()
local trigger t
set OOOIO=II01IO
if OOOOOOO()and O0OIO[GetPlayerId(II01IO)]==false then
set O0OIO[GetPlayerId(II01IO)]=true
call IIIIOO(II01IO)
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,10,"You will be given a random hero soon.")
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,6,false)
call TriggerAddCondition(t,Condition(function OOOOO0O))
call IIOOIO(I011OO(t),"p",II01IO)
endif
set t=null
endfunction
function OOOOOIO takes nothing returns boolean
local unit I1IIIO=OI10[GetPlayerId(GetTriggerPlayer())]
if IO11IO then
call I11I1O(GetTriggerPlayer(),"Repicking has been disabled by the host")
return false
endif
if OO10O==false then
if OO0OO==false and IO0I1O==false and IOI1IO==false and IO1O1O==false and OO1IO==false and I0II==false then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"-repick is disabled for a few seconds.")
endif
return false
endif
if(OIO[GetPlayerId(GetTriggerPlayer())]==true)then
return false
endif
if(OI10[GetPlayerId(GetTriggerPlayer())]==null)then
return false
endif
if II0 or OO0OO or OO1IO then
return false
endif
if(O00OO==true)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"Too late to repick.")
return false
endif
if(GetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD)<III)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"Not enough gold to repick.")
return false
endif
if GetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD)<350 and O0I or I11I then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"Not enough gold to repick and buy a new hero.")
return false
endif
if GetUnitState(I1IIIO,UNIT_STATE_MANA)!=GetUnitState(I1IIIO,UNIT_STATE_MAX_MANA)or GetUnitState(I1IIIO,UNIT_STATE_LIFE)!=GetUnitState(I1IIIO,UNIT_STATE_MAX_LIFE)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"You cannot repick without full hp and mana.")
return false
endif
return true
endfunction
function OOOOO1O takes nothing returns nothing
if(IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==true)then
if(GetUnitTypeId(GetEnumUnit())==1429221430)then
call ExecuteFunc("OO11OI")
endif
call OOI110(I01OOO(GetTriggerPlayer()),10.00,"An enemy player has repicked"+I1011O(GetEnumUnit())+".")
endif
if(GetUnitTypeId(GetEnumUnit())==1848651828)then
call RemoveUnit(GetEnumUnit())
endif
if(GetUnitTypeId(GetEnumUnit())==1848652088)then
call RemoveUnit(GetEnumUnit())
endif
if(GetUnitTypeId(GetEnumUnit())==1848652099)then
call RemoveUnit(GetEnumUnit())
endif
if(GetUnitTypeId(GetEnumUnit())==1848652103)then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function OOOO0OO takes nothing returns nothing
local player II01IO=GetTriggerPlayer()
local group II1O0O=I0I01O(GetWorldBounds(),II01IO)
local integer I1O01O
local integer I1OIOO
local location I1OI0O
local unit RepickedUnit
local integer II10IO
local integer IIII0O
local integer IIIIIO
local unit OOOO00O
local location OOOO0IO=GetRectCenter(OI10O)
local location OOOO01O=GetRectCenter(OI1OO)
if(II0I0O(II01IO)==true)then
set I1O01O=O1OIIO
set I1OIOO=O1OI1O
set I1OI0O=GetRectCenter(OI10O)
else
set I1O01O=O1O1OO
set I1OIOO=O1O10O
set I1OI0O=GetRectCenter(OI1OO)
endif
if I10 then
if(GetRandomInt(1,2)==1)then
set I1O01O=O1OIIO
set I1OIOO=O1OI1O
else
set I1O01O=O1O1OO
set I1OIOO=O1O10O
endif
endif
if O0I or I11I then
set III=100
endif
set OOOO00O=IIO1OO(I011OO(GetTriggerPlayer()),"ChargeUnit")
if OOOO00O!=null and GetUnitTypeId(OOOO00O)==1697656899 then
call RemoveUnit(OOOO00O)
endif
call AdjustPlayerStateBJ(-1*III,II01IO,PLAYER_STATE_RESOURCE_GOLD)
set OIO[GetPlayerId(II01IO)]=true
call ForGroup(II1O0O,function OOOOO1O)
call OO0OI0(OI10[GetPlayerId(II01IO)])
set OI10[GetPlayerId(GetTriggerPlayer())]=null
if O0I or I11I then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,60,"You can now pick a new hero.")
if O0I then
set IIII0O=O1OIIO
set IIIIIO=O1O10O
endif
if II0I0O(II01IO)then
if I11I then
set IIII0O=O1OIIO
set IIIIIO=O1OI1O
else
call CreateUnitAtLoc(II01IO,1848651843,OOOO01O,bj_UNIT_FACING)
endif
call PanCameraToTimedLocForPlayer(II01IO,OOOO0IO,0)
else
if I11I then
set IIII0O=O1O1OO
set IIIIIO=O1O10O
else
call CreateUnitAtLoc(II01IO,1848651843,OOOO0IO,bj_UNIT_FACING)
endif
call PanCameraToTimedLocForPlayer(II01IO,OOOO01O,0)
endif
loop
exitwhen IIII0O>IIIIIO
if I[IIII0O]==false then
call SetPlayerTechMaxAllowed(II01IO,O1OIOO[IIII0O],1)
endif
set IIII0O=IIII0O+1
endloop
call RemoveLocation(OOOO0IO)
call RemoveLocation(OOOO01O)
return
endif
loop
set II10IO=GetRandomInt(I1O01O,I1OIOO)
if(I[II10IO]==false)then
set I[II10IO]=true
set OI10[GetPlayerId(II01IO)]=CreateUnitAtLoc(II01IO,O1OIOO[II10IO],I1OI0O,bj_UNIT_FACING)
call III0IO(O1OIOO[II10IO])
endif
exitwhen OI10[GetPlayerId(GetTriggerPlayer())]!=null
endloop
call DestroyGroup(II1O0O)
call RemoveLocation(I1OI0O)
call RemoveLocation(OOOO0IO)
call RemoveLocation(OOOO01O)
endfunction
function I1I1OI takes nothing returns nothing
if OOOOOIO()then
call OOOO0OO()
endif
endfunction
function I1I10I takes nothing returns nothing
local player II01IO=GetTriggerPlayer()
local string OOOOIOO="|c006699CC"
if IOI1IO then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"League Mode|r:Both Sides will take turns picking heroes.")
endif
if IO1O1O then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"Extended League Mode|r:Both Sides will take turns picking heroes.")
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,"Each team captain can pick 3 heroes to remove from the pool.")
endif
if II0 then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"Death Match|r:When you die,you must pick a new hero.")
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,"You will lose when your team uses up all"+I2S(OO0II0(O1OI1O,O1O10O-O1O1OO+1))+"heroes.")
endif
if I0II then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"Mirror Match|r:After one minute,each team will have the same heroes.")
endif
if O0I then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"All Pick|r:You may pick a hero from any tavern.")
endif
if IO0I1O then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"Random Draft|r:You may pick a hero draft style from the heroes available.")
endif
if I10 then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"All Random|r:You will be given a random hero from any tavern.")
endif
if OO0OO then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"Vote Random|r:You will be given a random hero from the voted groupset.")
endif
if OOI then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"Team Random|r:You will be given a random hero from your taverns.")
endif
if OO1IO then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"Reverse|r:You pick a hero for your opponent.")
endif
if I1I0 then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"Shuffle Players|r:All players will be shuffled across both sides.")
endif
if II0I then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"All Agility|r:Only Agility heroes will be allowed.")
endif
if II1I then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"All Strength|r:Only Strength heroes will be allowed.")
endif
if IIII then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"All Intelligence|r:Only Intellgence heroes will be allowed.")
endif
if I01I then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"Duplicate Mode|r:The same heroes may be picked or randomed multiple times.")
endif
if OII then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"Item Drop|r:When you die,a random inventory slot will drop an item.")
endif
if OOOO then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"No Powerups|r:Powerups are disabled.")
endif
if OO0O then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"Super Creeps|r:Siege Golems,Scary Fish,and Ancient Hydras")
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,"can spawn randomly with creep spawns.")
endif
if I1I then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"Easy Mode|r:Towers are weaker.Heroes gain more xp and gold.")
endif
if I1II then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"Same Hero|r:All players will be given the same hero that"+I10OIO(O0OI)+"|r has.")
endif
if IO1I0O then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"Only Mid|r:Only middle towers can be destroyed")
endif
if IO1IIO then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"No Bot|r:Creeps won't spawn from the bottom lane")
endif
if IO1I1O then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"No Mid|r:Creeps won't spawn from the middle lane")
endif
if IO11OO then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"No Top|r:Creeps won't spawn from the top lane")
endif
if IO110O then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"No Swap|r:Swapping heroes is not allowed")
endif
if IO110O then
call DisplayTimedTextToPlayer(II01IO,0,OOIIO,20,OOOOIOO+"No Repick|r:Repicking heroes is not allowed")
endif
endfunction
function OOOOI0O takes nothing returns nothing
if GetUnitTypeId(GetEnumUnit())==1848651828 then
call RemoveUnit(GetEnumUnit())
endif
if GetUnitTypeId(GetEnumUnit())==1865429043 then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function OOOOIIO takes unit u1,unit u2 returns nothing
local player Me=GetOwningPlayer(u1)
local player OOOOI1O=GetOwningPlayer(u2)
local unit OOOO1OO=CreateUnit(Me,1697657158,0,0,0)
local group g
call I0110O("SwapHero|"+I2S(GetPlayerId(GetOwningPlayer(u1))))
call I0110O("SwapHero|"+I2S(GetPlayerId(GetOwningPlayer(u2))))
set g=I0I01O(GetWorldBounds(),Me)
call ForGroup(g,function OOOOI0O)
call DestroyGroup(g)
set g=I0I01O(GetWorldBounds(),OOOOI1O)
call ForGroup(g,function OOOOI0O)
call DestroyGroup(g)
call UnitAddItem(OOOO1OO,UnitItemInSlot(u2,0))
call UnitAddItem(OOOO1OO,UnitItemInSlot(u2,1))
call UnitAddItem(OOOO1OO,UnitItemInSlot(u2,2))
call UnitAddItem(OOOO1OO,UnitItemInSlot(u2,3))
call UnitAddItem(OOOO1OO,UnitItemInSlot(u2,4))
call UnitAddItem(OOOO1OO,UnitItemInSlot(u2,5))
call UnitAddItem(u2,UnitItemInSlot(u1,0))
call UnitAddItem(u2,UnitItemInSlot(u1,1))
call UnitAddItem(u2,UnitItemInSlot(u1,2))
call UnitAddItem(u2,UnitItemInSlot(u1,3))
call UnitAddItem(u2,UnitItemInSlot(u1,4))
call UnitAddItem(u2,UnitItemInSlot(u1,5))
call UnitAddItem(u1,UnitItemInSlot(OOOO1OO,0))
call UnitAddItem(u1,UnitItemInSlot(OOOO1OO,1))
call UnitAddItem(u1,UnitItemInSlot(OOOO1OO,2))
call UnitAddItem(u1,UnitItemInSlot(OOOO1OO,3))
call UnitAddItem(u1,UnitItemInSlot(OOOO1OO,4))
call UnitAddItem(u1,UnitItemInSlot(OOOO1OO,5))
call RemoveUnit(OOOO1OO)
call SetUnitOwner(u2,Me,true)
call SetUnitOwner(u1,OOOOI1O,true)
set OI10[GetPlayerId(Me)]=u2
set OI10[GetPlayerId(OOOOI1O)]=u1
call SetPlayerName(Me,I10OIO(Me)+"("+I1011O(OI10[GetPlayerId(Me)])+")")
call SetPlayerName(OOOOI1O,I10OIO(OOOOI1O)+"("+I1011O(OI10[GetPlayerId(OOOOI1O)])+")")
call ClearSelectionForPlayer(Me)
call SelectUnitAddForPlayer(u2,Me)
call ClearSelectionForPlayer(OOOOI1O)
call SelectUnitAddForPlayer(u1,OOOOI1O)
set Me=null
set OOOOI1O=null
set g=null
set OOOO1OO=null
endfunction
function OOOO10O takes unit u1,unit u2 returns boolean
return II001O("SwapHero|"+I2S(GetPlayerId(GetOwningPlayer(u2))),I2S(GetUnitTypeId(u2))+"|"+I2S(GetUnitTypeId(u1)))
endfunction
function OOOO1IO takes nothing returns nothing
call I0110O("SwapHero|"+I2S(GetPlayerId(GetTriggerPlayer())))
endfunction
function OOOO11O takes player p returns integer
local integer i=1
loop
exitwhen i>5
if III0[i]==p or II10[i]==p then
return i
endif
set i=i+1
endloop
return-1
endfunction
function OOO0OOO takes unit u1,unit u2 returns nothing
call IIOI0O("SwapHero|"+I2S(GetPlayerId(GetOwningPlayer(u1))),I2S(GetUnitTypeId(u1))+"|"+I2S(GetUnitTypeId(u2)),true)
if OOOO10O(u1,u2)then
call OOOOIIO(u1,u2)
else
call DisplayTimedTextToPlayer(GetOwningPlayer(u2),0,OOIIO,30,"")
call DisplayTimedTextToPlayer(GetOwningPlayer(u2),0,OOIIO,30,O0O[GetPlayerId(GetOwningPlayer(u1))]+GetUnitName(u1)+"|r|cff99ccffwants to swap with you.Type|r|c00ff0303-swap"+I2S(OOOO11O(GetOwningPlayer(u1)))+"|r|cff99ccffto accept|r")
call DisplayTimedTextToPlayer(GetOwningPlayer(u2),0,OOIIO,30,"")
call DisplayTimedTextToPlayer(GetOwningPlayer(u1),0,OOIIO,30,"")
call DisplayTimedTextToPlayer(GetOwningPlayer(u1),0,OOIIO,30,"|cff99ccffYou have requested to swap with|r"+O0O[GetPlayerId(GetOwningPlayer(u2))]+GetUnitName(u2)+"|r")
call DisplayTimedTextToPlayer(GetOwningPlayer(u1),0,OOIIO,30,"")
endif
endfunction
function OOO0O0O takes nothing returns nothing
local integer i=S2I(SubString(GetEventPlayerChatString(),6,StringLength(GetEventPlayerChatString())))
if i<1 or i>5 then
call I11I1O(GetTriggerPlayer(),"Invalid swap selection")
return
endif
set OOO0OO=OI10[GetPlayerId(GetTriggerPlayer())]
if II0I0O(GetTriggerPlayer())then
set OOO01O=III0[i]
else
set OOO01O=II10[i]
endif
set OOOO1O=OI10[GetPlayerId(OOO01O)]
if OOO0OO==null or GetOwningPlayer(OOO0OO)!=GetTriggerPlayer()or OOOO1O==null or GetOwningPlayer(OOOO1O)!=OOO01O or OOO01O==GetTriggerPlayer()then
call I11I1O(GetTriggerPlayer(),"Invalid swap selection")
return
endif
call OOO0OOO(OOO0OO,OOOO1O)
endfunction
function OOO0OIO takes nothing returns nothing
local integer i
local player p
local unit u
local string s
if GetLocalPlayer()==GetTriggerPlayer()then
call ClearTextMessages()
endif
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,45,"|cff99ccffSwap Hero Options:|r")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,45,"")
set i=1
loop
exitwhen i>5
set p=III0[i]
set u=OI10[GetPlayerId(p)]
if IsPlayerAlly(GetTriggerPlayer(),p)and GetTriggerPlayer()!=p and u!=null and GetOwningPlayer(u)==p then
set s=""
if OOOO10O(OI10[GetPlayerId(GetTriggerPlayer())],u)then
set s="|c00ff0303(Requested Swap With You)|r"
endif
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,45,O0O[GetPlayerId(p)]+I2S(i)+"|r"+"-"+"|cff99ccff"+GetUnitName(u)+"|r"+s)
endif
set p=II10[i]
set u=OI10[GetPlayerId(p)]
if IsPlayerAlly(GetTriggerPlayer(),p)and GetTriggerPlayer()!=p and u!=null and GetOwningPlayer(u)==p then
set s=""
if OOOO10O(OI10[GetPlayerId(GetTriggerPlayer())],u)then
set s="|c00ff0303(Requested Swap With You)|r"
endif
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,45,O0O[GetPlayerId(p)]+I2S(i)+"|r"+"-"+"|cff99ccff"+GetUnitName(u)+"|r"+s)
endif
set i=i+1
endloop
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,45,"")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,45,"|cff99ccffType|r|c00ff0303-swap#|r|cff99ccffto make a choice or-swapcancel to cancel swap requests|r")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,45,"")
endfunction
function OOO0O1O takes player I0IIOO returns boolean
local integer IIII0O=1
local integer OOO00OO=0
loop
exitwhen IIII0O>5
if II0I0O(I0IIOO)then
if OI10[GetPlayerId(III0[IIII0O])]!=null and III0[IIII0O]!=I0IIOO then
set OOO00OO=OOO00OO+1
endif
else
if OI10[GetPlayerId(II10[IIII0O])]!=null and II10[IIII0O]!=I0IIOO then
set OOO00OO=OOO00OO+1
endif
endif
set IIII0O=IIII0O+1
endloop
if OOO00OO>0 then
return true
else
return false
endif
endfunction
function OOO000O takes nothing returns boolean
if IO110O then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"-swaphero has been disabled.")
return false
endif
if O00OO and IOI1IO==false and IO0I1O==false and IO1O1O==false then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"You cannot use-swaphero after 120 seconds have elapsed.")
return false
endif
if GetUnitState(OI10[GetPlayerId(GetTriggerPlayer())],UNIT_STATE_LIFE)<1 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"You must have a living hero in order to swap with someone.")
return false
endif
if(IOI1IO and IOI11O)or(IO0I1O and IO01OO)or(IO1O1O and IO10OO)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"Too late to use-swaphero.")
return false
endif
if OOO0O1O(GetTriggerPlayer())==false then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"No hero available to swap with.")
return false
endif
return true
endfunction
function I1I1II takes nothing returns nothing
if OOO000O()then
if GetEventPlayerChatString()=="-swap" or GetEventPlayerChatString()=="-swaphero" then
call OOO0OIO()
elseif GetEventPlayerChatString()=="-swapcancel" then
call OOOO1IO()
else
call OOO0O0O()
endif
endif
endfunction
function OOO00IO takes nothing returns boolean
return GetSpellAbilityId()==1093682761
endfunction
function OOO001O takes integer IO0OOI,unit OOO0IOO,unit OOO0I0O returns nothing
local integer IIII0O=1
local integer IIIIIO=GetUnitAbilityLevel(OOO0IOO,IO0OOI)
loop
exitwhen IIII0O>IIIIIO
call SelectHeroSkill(OOO0I0O,IO0OOI)
set IIII0O=IIII0O+1
endloop
endfunction
function OOO0IIO takes nothing returns nothing
local integer IIII0O
local integer IIIIIO
local unit OOO0I1O
local location O000OI=GetUnitLoc(GetTriggerUnit())
set OOO0I1O=CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),GetUnitTypeId(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call SetHeroXP(OOO0I1O,GetHeroXP(GetTriggerUnit()),false)
set IIII0O=1
set IIIIIO=GetUnitAbilityLevel(GetTriggerUnit(),1096904043)
loop
exitwhen IIII0O>IIIIIO
call SelectHeroSkill(bj_lastCreatedUnit,1096904043)
set IIII0O=IIII0O+1
endloop
set IIII0O=0
set IIIIIO=5
loop
exitwhen IIII0O>IIIIIO
call UnitAddItem(OOO0I1O,UnitItemInSlot(GetTriggerUnit(),IIII0O))
set IIII0O=IIII0O+1
endloop
if(GetUnitTypeId(GetTriggerUnit())==1164277353)then
call OOO001O(1093678156,GetTriggerUnit(),OOO0I1O)
call OOO001O(1093683252,GetTriggerUnit(),OOO0I1O)
call OOO001O(1095071337,GetTriggerUnit(),OOO0I1O)
call OOO001O(1093678929,GetTriggerUnit(),OOO0I1O)
endif
if(GetUnitTypeId(GetTriggerUnit())==1429221432)then
call OOO001O(1093677892,GetTriggerUnit(),OOO0I1O)
call OOO001O(1093677639,GetTriggerUnit(),OOO0I1O)
call OOO001O(1093677893,GetTriggerUnit(),OOO0I1O)
call OOO001O(1093679411,GetTriggerUnit(),OOO0I1O)
endif
if(GetUnitTypeId(GetTriggerUnit())==1429221431)then
call OOO001O(1093682745,GetTriggerUnit(),OOO0I1O)
call OOO001O(1093678681,GetTriggerUnit(),OOO0I1O)
call OOO001O(1093677381,GetTriggerUnit(),OOO0I1O)
call OOO001O(1093677624,GetTriggerUnit(),OOO0I1O)
endif
if(GetUnitTypeId(GetTriggerUnit())==1215063922)then
call OOO001O(1093677895,GetTriggerUnit(),OOO0I1O)
call OOO001O(1093677894,GetTriggerUnit(),OOO0I1O)
call OOO001O(1093685043,GetTriggerUnit(),OOO0I1O)
call OOO001O(1095068013,GetTriggerUnit(),OOO0I1O)
endif
if(GetUnitTypeId(GetTriggerUnit())==1164666213)then
call OOO001O(1093677877,GetTriggerUnit(),OOO0I1O)
call OOO001O(1093678679,GetTriggerUnit(),OOO0I1O)
call OOO001O(1093678678,GetTriggerUnit(),OOO0I1O)
call OOO001O(1093678680,GetTriggerUnit(),OOO0I1O)
endif
call OO0OI0(GetTriggerUnit())
call RemoveLocation(O000OI)
set OI10[GetPlayerId(GetOwningPlayer(OOO0I1O))]=OOO0I1O
endfunction
function OOO01OO takes nothing returns boolean
local integer I1I1OO=GetUnitTypeId(OI10[GetPlayerId(GetTriggerPlayer())])
return(I1I1OO==1429221432 or I1I1OO==1429221431 or I1I1OO==1215063922 or I1I1OO==1164277353 or I1I1OO==1164666213)and(RectContainsUnit(IOIOO,OI10[GetPlayerId(GetTriggerPlayer())])or RectContainsUnit(IOI0O,OI10[GetPlayerId(GetTriggerPlayer())]))
endfunction
function OOO010O takes nothing returns nothing
local unit I1IIIO=OI10[GetPlayerId(GetTriggerPlayer())]
call UnitAddAbility(I1IIIO,1093682761)
call IssueImmediateOrder(I1IIIO,"chemicalrage")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,120.00,"|c00ff0303Recreate is being performed on"+I1011O(GetEnumUnit())+".Please wait about 2 minutes|r")
endfunction
function I1I11I takes nothing returns nothing
if OOO01OO()then
call OOO010O()
endif
endfunction
function OOO01IO takes nothing returns boolean
return GetSpellAbilityId()==1093681492 and OOI0O==false
endfunction
function OOO011O takes nothing returns nothing
local location O000OI
if(II0I0O(GetOwningPlayer(GetTriggerUnit())))then
set O000OI=GetRectCenter(OI01O)
else
set O000OI=GetRectCenter(OIOOO)
endif
call SetUnitPositionLoc(GetTriggerUnit(),O000OI)
call RemoveLocation(O000OI)
endfunction
function I11OOI takes nothing returns nothing
local unit I1IIIO=OI10[GetPlayerId(GetTriggerPlayer())]
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,30.00,"You are using unstuck.You will be sent to your base in 60 seconds.")
call UnitAddAbility(I1IIIO,1093681492)
call IssueImmediateOrder(I1IIIO,"militia")
endfunction
function OOOIOOO takes player p returns string
local string s=O01OO[GetPlayerId(p)]
if O01OO[GetPlayerId(p)]!="Here" then
return"|c00ff0303(Left at"+SubString(s,10,StringLength(s))+"|c00ff0303)|r"
endif
return""
endfunction
function I11O0I takes nothing returns nothing
local integer IIII0O=1
local integer IIIIIO=5
local integer OO0IO0
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,20,"")
if(II0I1O(GetTriggerPlayer())==true)then
loop
exitwhen IIII0O>IIIIIO
set OO0IO0=GetPlayerId(III0[IIII0O])
if(OI10[OO0IO0]!=null)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,20,O0O[OO0IO0]+I10OIO(III0[IIII0O])+"|r controls"+GetUnitName(OI10[OO0IO0])+"(Level"+I2S(GetUnitLevel(OI10[OO0IO0]))+")"+OOOIOOO(III0[IIII0O]))
endif
set IIII0O=IIII0O+1
endloop
else
loop
exitwhen IIII0O>IIIIIO
set OO0IO0=GetPlayerId(II10[IIII0O])
if(OI10[OO0IO0]!=null)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,20,O0O[OO0IO0]+I10OIO(II10[IIII0O])+"|r controls"+GetUnitName(OI10[OO0IO0])+"(Level"+I2S(GetUnitLevel(OI10[OO0IO0]))+")"+OOOIOOO(II10[IIII0O]))
endif
set IIII0O=IIII0O+1
endloop
endif
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,20,"")
endfunction
function I11OII takes nothing returns nothing
if(OI10[GetPlayerId(GetTriggerPlayer())]==null)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10.00,"No Hero is selected")
else
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10.00,GetUnitName(OI10[GetPlayerId(GetTriggerPlayer())])+"movespeed is"+I2S(R2I(GetUnitMoveSpeed(OI10[GetPlayerId(GetTriggerPlayer())]))))
endif
endfunction
function OOOIO0O takes unit I1IIIO returns real
return 0.0
endfunction
function OOOIOIO takes integer ID returns real
if ID==1164207469 then
return 1.45
endif
if ID==1215723364 then
return 1.77
endif
if ID==1164277353 then
return 1.5
endif
if ID==1164277357 then
return 1.6
endif
if ID==1311781192 then
return 1.45
endif
if ID==1311781204 then
return 1.35
endif
if ID==1311781194 then
return 1.25
endif
if ID==1311781172 or ID==1311781171 or ID==1311781173 then
return 1.6
endif
if ID==1311781175 then
return 1.55
endif
return 1.7
endfunction
function Command_Attackspeed takes nothing returns nothing
local real OOOIO1O
local real OOOI0OO
local real AS
local unit I1IIIO=OI10[GetPlayerId(GetTriggerPlayer())]
if I1IIIO==null then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10.00,"No Hero is selected")
return
endif
set OOOI0OO=OOOIOIO(GetUnitTypeId(I1IIIO))
set OOOIO1O=GetHeroAgi(I1IIIO,true)+OOOIO0O(I1IIIO)
set AS=(1+OOOIO1O)/ OOOI0OO
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10.00,I1011O(I1IIIO)+"attackspeed is"+R2S(AS)+"attacks per second("+R2S(1/ AS)+"seconds per attack)")
endfunction
function I11O1I takes nothing returns nothing
call IIOI0O(I011OO(GetTriggerPlayer()),"DisableHelp",true)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"Disallowing help from certain abilities.")
endfunction
function I110OI takes nothing returns nothing
call IIOI0O(I011OO(GetTriggerPlayer()),"DisableHelp",false)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"Allowing help from certain abilities.")
endfunction
function I1100I takes nothing returns nothing
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10.00,"Creeps Killed:"+I2S(I0O0[GetPlayerId(GetTriggerPlayer())])+"Creeps Denied:"+I2S(I000[GetPlayerId(GetTriggerPlayer())]))
endfunction
function I110II takes nothing returns nothing
local integer x=GetPlayerId(GetTriggerPlayer())
if(GetEventPlayerChatString()=="-cson")then
set IOO1OO[x]=true
else
set IOO1OO[x]=false
endif
if GetLocalPlayer()==Player(x)then
if IOO1OO[x]then
call MultiboardSetTitleText(O1I,O0OOO+"-"+"CS:"+I2S(I0O0[x])+"/"+I2S(I000[x]))
else
call MultiboardSetTitleText(O1I,O0OOO)
endif
endif
endfunction
function OOOI00O takes nothing returns nothing
local integer i=1
local integer OOOI0IO
local player p
loop
exitwhen i>5
set p=III0[i]
set OOOI0IO=R2I(TimerGetRemaining(I0O[GetPlayerId(p)]))
if OOOI0IO>0 and IOO10O[GetPlayerId(p)]and IO10IO==false and OOI0O==false then
call LeaderboardDisplay(IOO1IO[GetPlayerId(p)],true)
call LeaderboardSetLabel(IOO1IO[GetPlayerId(p)],"Respawn in"+I2S(OOOI0IO)+"seconds")
else
call LeaderboardDisplay(IOO1IO[GetPlayerId(p)],false)
endif
set p=II10[i]
set OOOI0IO=R2I(TimerGetRemaining(I0O[GetPlayerId(p)]))
if OOOI0IO>0 and IOO10O[GetPlayerId(p)]and IO10IO==false and OOI0O==false then
call LeaderboardDisplay(IOO1IO[GetPlayerId(p)],true)
call LeaderboardSetLabel(IOO1IO[GetPlayerId(p)],"Respawn in"+I2S(OOOI0IO)+"seconds")
else
call LeaderboardDisplay(IOO1IO[GetPlayerId(p)],false)
endif
set i=i+1
endloop
endfunction
function OOOI01O takes nothing returns nothing
local integer x=0
set x=x+1
set IOO1IO[GetPlayerId(III0[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(III0[x],IOO1IO[GetPlayerId(III0[x])])
call LeaderboardDisplay(IOO1IO[GetPlayerId(III0[x])],false)
call LeaderboardSetLabel(IOO1IO[GetPlayerId(III0[x])],"Respawn:")
set IOO1IO[GetPlayerId(II10[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(II10[x],IOO1IO[GetPlayerId(II10[x])])
call LeaderboardDisplay(IOO1IO[GetPlayerId(II10[x])],false)
call LeaderboardSetLabel(IOO1IO[GetPlayerId(II10[x])],"Respawn:")
set x=x+1
set IOO1IO[GetPlayerId(III0[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(III0[x],IOO1IO[GetPlayerId(III0[x])])
call LeaderboardDisplay(IOO1IO[GetPlayerId(III0[x])],false)
call LeaderboardSetLabel(IOO1IO[GetPlayerId(III0[x])],"Respawn:")
set IOO1IO[GetPlayerId(II10[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(II10[x],IOO1IO[GetPlayerId(II10[x])])
call LeaderboardDisplay(IOO1IO[GetPlayerId(II10[x])],false)
call LeaderboardSetLabel(IOO1IO[GetPlayerId(II10[x])],"Respawn:")
set x=x+1
set IOO1IO[GetPlayerId(III0[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(III0[x],IOO1IO[GetPlayerId(III0[x])])
call LeaderboardDisplay(IOO1IO[GetPlayerId(III0[x])],false)
call LeaderboardSetLabel(IOO1IO[GetPlayerId(III0[x])],"Respawn:")
set IOO1IO[GetPlayerId(II10[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(II10[x],IOO1IO[GetPlayerId(II10[x])])
call LeaderboardDisplay(IOO1IO[GetPlayerId(II10[x])],false)
call LeaderboardSetLabel(IOO1IO[GetPlayerId(II10[x])],"Respawn:")
set x=x+1
set IOO1IO[GetPlayerId(III0[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(III0[x],IOO1IO[GetPlayerId(III0[x])])
call LeaderboardDisplay(IOO1IO[GetPlayerId(III0[x])],false)
call LeaderboardSetLabel(IOO1IO[GetPlayerId(III0[x])],"Respawn:")
set IOO1IO[GetPlayerId(II10[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(II10[x],IOO1IO[GetPlayerId(II10[x])])
call LeaderboardDisplay(IOO1IO[GetPlayerId(II10[x])],false)
call LeaderboardSetLabel(IOO1IO[GetPlayerId(II10[x])],"Respawn:")
set x=x+1
set IOO1IO[GetPlayerId(III0[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(III0[x],IOO1IO[GetPlayerId(III0[x])])
call LeaderboardDisplay(IOO1IO[GetPlayerId(III0[x])],false)
call LeaderboardSetLabel(IOO1IO[GetPlayerId(III0[x])],"Respawn:")
set IOO1IO[GetPlayerId(II10[x])]=CreateLeaderboard()
call PlayerSetLeaderboard(II10[x],IOO1IO[GetPlayerId(II10[x])])
call LeaderboardDisplay(IOO1IO[GetPlayerId(II10[x])],false)
call LeaderboardSetLabel(IOO1IO[GetPlayerId(II10[x])],"Respawn:")
endfunction
function I111OI takes nothing returns nothing
local integer x=GetPlayerId(GetTriggerPlayer())
if GetEventPlayerChatString()=="-don" or GetEventPlayerChatString()=="-deathon" then
set IOO10O[x]=true
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"The death timer will show up when you die.")
else
set IOO10O[x]=false
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"The death timer will not show up when you die.")
endif
endfunction
function OOOIIOO takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerAddAction(t,function OOOI01O)
call TriggerRegisterTimerEvent(t,.5,false)
set t=CreateTrigger()
call TriggerAddAction(t,function OOOI00O)
call TriggerRegisterTimerEvent(t,1,true)
endfunction
function I11III takes nothing returns nothing
if(GetEventPlayerChatString()=="-showdeny")then
set IOO11O[GetPlayerId(GetTriggerPlayer())]=true
else
set IOO11O[GetPlayerId(GetTriggerPlayer())]=false
endif
endfunction
function I11I1I takes nothing returns nothing
local integer x=GetPlayerId(GetTriggerPlayer())
set IOO11O[x]=true
set IOO1OO[x]=true
if GetLocalPlayer()==GetTriggerPlayer()then
call MultiboardSetTitleText(O1I,O0OOO+"-"+"CS:"+I2S(I0O0[x])+"/"+I2S(I000[x]))
endif
endfunction
function I1101I takes nothing returns nothing
call ForceRemovePlayer(OOIOO,GetTriggerPlayer())
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"You are now hiding messages.")
endfunction
function I11IOI takes nothing returns nothing
call ForceAddPlayer(OOIOO,GetTriggerPlayer())
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"You are now showing messages.")
endfunction
function OOOII0O takes nothing returns boolean
local integer x=GetRandomInt(1,4)
if x==1 then
set IO0O0O=O00IO
elseif x==2 then
set IO0O0O=O001O
elseif x==3 then
set IO0O0O=OO0OOO
elseif x==4 then
set IO0O0O=OO0O0O
endif
if IO0OIO[GetPlayerId(GetLocalPlayer())]then
call EnableWeatherEffect(O00IO,false)
call EnableWeatherEffect(O001O,false)
call EnableWeatherEffect(OO0OOO,false)
call EnableWeatherEffect(OO0O0O,false)
call EnableWeatherEffect(IO0O0O,true)
endif
return false
endfunction
function OOOIIIO takes nothing returns nothing
local integer x=GetRandomInt(1,4)
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,300,true)
call TriggerAddCondition(t,Condition(function OOOII0O))
set IO0OIO[GetPlayerId(III0[1])]=false
set IO0OIO[GetPlayerId(III0[2])]=false
set IO0OIO[GetPlayerId(III0[3])]=false
set IO0OIO[GetPlayerId(III0[4])]=false
set IO0OIO[GetPlayerId(III0[5])]=false
set IO0OIO[GetPlayerId(II10[1])]=false
set IO0OIO[GetPlayerId(II10[2])]=false
set IO0OIO[GetPlayerId(II10[3])]=false
set IO0OIO[GetPlayerId(II10[4])]=false
set IO0OIO[GetPlayerId(II10[5])]=false
if I0OI then
set IO0OIO[GetPlayerId(O1OOIO)]=false
set IO0OIO[GetPlayerId(O1OO1O)]=false
endif
if x==1 then
set IO0O0O=O00IO
elseif x==2 then
set IO0O0O=O001O
elseif x==3 then
set IO0O0O=OO0OOO
elseif x==4 then
set IO0O0O=OO0O0O
endif
set t=null
endfunction
function I11I0I takes nothing returns nothing
local string I100II=StringCase(GetEventPlayerChatString(),false)
if IO0OOO==true then
set IO0OOO=false
call OOOIIIO()
endif
if I100II=="-weather snow" and GetLocalPlayer()==GetTriggerPlayer()then
set IO0OIO[GetPlayerId(GetTriggerPlayer())]=false
call EnableWeatherEffect(O00IO,true)
call EnableWeatherEffect(O001O,false)
call EnableWeatherEffect(OO0OOO,false)
call EnableWeatherEffect(OO0O0O,false)
endif
if I100II=="-weather rain" and GetLocalPlayer()==GetTriggerPlayer()then
set IO0OIO[GetPlayerId(GetTriggerPlayer())]=false
call EnableWeatherEffect(O00IO,false)
call EnableWeatherEffect(O001O,true)
call EnableWeatherEffect(OO0OOO,false)
call EnableWeatherEffect(OO0O0O,false)
endif
if I100II=="-weather moonlight" and GetLocalPlayer()==GetTriggerPlayer()then
set IO0OIO[GetPlayerId(GetTriggerPlayer())]=false
call EnableWeatherEffect(O00IO,false)
call EnableWeatherEffect(O001O,false)
call EnableWeatherEffect(OO0OOO,true)
call EnableWeatherEffect(OO0O0O,false)
endif
if I100II=="-weather wind" and GetLocalPlayer()==GetTriggerPlayer()then
set IO0OIO[GetPlayerId(GetTriggerPlayer())]=false
call EnableWeatherEffect(O00IO,false)
call EnableWeatherEffect(O001O,false)
call EnableWeatherEffect(OO0OOO,false)
call EnableWeatherEffect(OO0O0O,true)
endif
if I100II=="-weather off" and GetLocalPlayer()==GetTriggerPlayer()then
set IO0OIO[GetPlayerId(GetTriggerPlayer())]=false
call EnableWeatherEffect(O00IO,false)
call EnableWeatherEffect(O001O,false)
call EnableWeatherEffect(OO0OOO,false)
call EnableWeatherEffect(OO0O0O,false)
endif
if I100II=="-weather random" then
set IO0OIO[GetPlayerId(GetTriggerPlayer())]=true
if GetLocalPlayer()==GetTriggerPlayer()then
call EnableWeatherEffect(O00IO,false)
call EnableWeatherEffect(O001O,false)
call EnableWeatherEffect(OO0OOO,false)
call EnableWeatherEffect(OO0O0O,false)
call EnableWeatherEffect(IO0O0O,true)
endif
endif
endfunction
function I1110I takes nothing returns nothing
local integer a=S2I(SubString(GetEventPlayerChatString(),6,StringLength(GetEventPlayerChatString())))
if a>0 and a<2000 then
call OOI110(OOIOO,5,O0O[GetPlayerId(GetTriggerPlayer())]+I10OIO(GetTriggerPlayer())+"|r has rolled"+I2S(GetRandomInt(0,a)))
else
call I11I1O(GetTriggerPlayer(),"Roll value must be between 0 and 2000")
endif
endfunction
function I111II takes nothing returns nothing
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10,"Hero names in chat will now be hidden.")
if GetLocalPlayer()==GetTriggerPlayer()then
call SetPlayerName(III0[1],I10OIO(III0[1]))
call SetPlayerName(III0[2],I10OIO(III0[2]))
call SetPlayerName(III0[3],I10OIO(III0[3]))
call SetPlayerName(III0[4],I10OIO(III0[4]))
call SetPlayerName(III0[5],I10OIO(III0[5]))
call SetPlayerName(II10[1],I10OIO(II10[1]))
call SetPlayerName(II10[2],I10OIO(II10[2]))
call SetPlayerName(II10[3],I10OIO(II10[3]))
call SetPlayerName(II10[4],I10OIO(II10[4]))
call SetPlayerName(II10[5],I10OIO(II10[5]))
endif
endfunction
function I1111I takes nothing returns nothing
local integer id=GetPlayerId(GetTriggerPlayer())
if IO0O1O[id]==true then
set IO0O1O[id]=false
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,"Sounds have now be unmuted for you.")
else
set IO0O1O[id]=true
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,"Sounds have now be muted for you.")
endif
endfunction
function OOOII1O takes string OOOI1OO returns boolean
return OOOI1OO=="-ma" or OOOI1OO=="-ms" or OOOI1OO=="-cs" or OOOI1OO=="-cson" or OOOI1OO=="-disablehelp" or OOOI1OO=="-enablehelp" or OOOI1OO=="-unstuck" or OOOI1OO=="-recreate" or OOOI1OO=="-swaphero" or OOOI1OO=="-showmsg" or OOOI1OO=="-hidemsg" or OOOI1OO=="-showdeny" or OOOI1OO=="-hidedeny" or OOOI1OO=="-weather rain" or OOOI1OO=="-weather snow" or OOOI1OO=="-weather moonlight" or OOOI1OO=="-weather wind" or OOOI1OO=="-weather random" or OOOI1OO=="-weather off" or OOOI1OO=="-denyinfo" or OOOI1OO=="-di" or OOOI1OO=="-deathon" or OOOI1OO=="-don" or OOOI1OO=="-deathoff" or OOOI1OO=="-doff" or OOOI1OO=="-roll" or OOOI1OO=="-hideheronames" or OOOI1OO=="-hhn" or OOOI1OO=="-test" or OOOI1OO=="-mute" or OOOI1OO=="-wtf" or OOOI1OO=="-fleshstr" or OOOI1OO=="-fs"
endfunction
function OOOI10O takes nothing returns boolean
return not OOO
endfunction
function OOOI1IO takes string OOOI11O returns nothing
if I1OI=="" then
set I1OI="|c006699CC"+OOOI11O+"|r"
else
set I1OI=I1OI+"/|c006699CC"+OOOI11O+"|r"
endif
endfunction
function OOO1OOO takes string OOO1O0O,integer OOO1OIO,integer OOO1O1O returns string
return SubString(OOO1O0O,0,OOO1OIO)+SubString(OOO1O0O,OOO1O1O,StringLength(OOO1O0O))
endfunction
function OOO10OO takes string OOO1O0O returns string
local integer OI1100=StringLength(OOO1O0O)
local string OOO100O
local string O01I1I=""
local integer i=0
loop
exitwhen(i==OI1100)
set OOO100O=StringCase(SubString(OOO1O0O,i,i+1),false)
if not(OOO100O==StringCase(OOO100O,true))then
set O01I1I=O01I1I+OOO100O
endif
set i=i+1
endloop
return O01I1I
endfunction
function OOO10IO takes nothing returns nothing
local string I100II=OOO10OO(GetEventPlayerChatString())
local string array OOO101O
local string array OOO1IOO
local boolean array OOO1I0O
local integer OOO1IIO
local integer OI1100=StringLength(I100II)
local integer x=0
local integer y=0
local integer z=0
local boolean AP
local boolean AR
local boolean LM
local boolean MM
local boolean TR
local boolean DM
local boolean MR
local boolean SP
local boolean AA
local boolean AI
local boolean AS
local boolean ID
local boolean NP
local boolean SC
local boolean EM
local boolean DU
local boolean SH
local boolean VR
local boolean RV
local boolean RD
local boolean OM
local boolean NT
local boolean NB
local boolean NM
local boolean NS
local boolean NR
local boolean XL
local boolean TS
set OOO101O[1]="allpick"
set OOO1IOO[1]="ap"
set OOO101O[2]="allrandom"
set OOO1IOO[2]="ar"
set OOO101O[3]="leaguemode"
set OOO1IOO[3]="lm"
set OOO101O[4]="mirrormatch"
set OOO1IOO[4]="mm"
set OOO101O[5]="teamrandom"
set OOO1IOO[5]="tr"
set OOO101O[6]="deathmatch"
set OOO1IOO[6]="dm"
set OOO101O[7]="moderandom"
set OOO1IOO[7]="mr"
set OOO101O[8]="shuffleplayers"
set OOO1IOO[8]="sp"
set OOO101O[9]="allagility"
set OOO1IOO[9]="aa"
set OOO101O[10]="allintelligence"
set OOO1IOO[10]="ai"
set OOO101O[11]="allstrength"
set OOO1IOO[11]="as"
set OOO101O[12]="itemdrop"
set OOO1IOO[12]="id"
set OOO101O[13]="nopowerups"
set OOO1IOO[13]="np"
set OOO101O[14]="supercreeps"
set OOO1IOO[14]="sc"
set OOO101O[15]="easymode"
set OOO1IOO[15]="em"
set OOO101O[16]="duplicatemode"
set OOO1IOO[16]="du"
set OOO101O[17]="samehero"
set OOO1IOO[17]="sh"
set OOO101O[18]="voterandom"
set OOO1IOO[18]="vr"
set OOO101O[19]="reverse"
set OOO1IOO[19]="rv"
set OOO101O[20]="randomdraft"
set OOO1IOO[20]="rd"
set OOO101O[21]="onlymid"
set OOO1IOO[21]="om"
set OOO101O[22]="extendedleague"
set OOO1IOO[22]="xl"
set OOO101O[23]="nomid"
set OOO1IOO[23]="nm"
set OOO101O[24]="notop"
set OOO1IOO[24]="nt"
set OOO101O[25]="nobot"
set OOO1IOO[25]="nb"
set OOO101O[26]="noswap"
set OOO1IOO[26]="ns"
set OOO101O[27]="norepick"
set OOO1IOO[27]="nr"
set OOO101O[28]="terrainsnow"
set OOO1IOO[28]="ts"
set OOO1IIO=28
set x=-1
loop
exitwhen x==OI1100-1
set x=x+1
set y=x
loop
exitwhen y==OI1100
set y=y+1
set z=1
loop
exitwhen z>OOO1IIO
if OOO101O[z]==SubString(I100II,x,y)then
set OOO1I0O[z]=true
set z=OOO1IIO+1
set I100II=OOO1OOO(I100II,x,y)
set x=-1
set OI1100=StringLength(I100II)
set y=OI1100
else
set z=z+1
endif
endloop
endloop
endloop
set x=-1
loop
exitwhen x==OI1100-1
set x=x+1
set y=x
loop
exitwhen y==OI1100
set y=y+1
set z=1
loop
exitwhen z>OOO1IIO
if OOO1IOO[z]==SubString(I100II,x,y)then
set OOO1I0O[z]=true
set z=OOO1IIO+1
set I100II=OOO1OOO(I100II,x,y)
set x=-1
set OI1100=StringLength(I100II)
set y=OI1100
else
set z=z+1
endif
endloop
endloop
endloop
set AP=OOO1I0O[1]
set AR=OOO1I0O[2]
set LM=OOO1I0O[3]
set MM=OOO1I0O[4]
set TR=OOO1I0O[5]
set DM=OOO1I0O[6]
set MR=OOO1I0O[7]
set SP=OOO1I0O[8]
set AA=OOO1I0O[9]
set AI=OOO1I0O[10]
set AS=OOO1I0O[11]
set ID=OOO1I0O[12]
set NP=OOO1I0O[13]
set SC=OOO1I0O[14]
set EM=OOO1I0O[15]
set DU=OOO1I0O[16]
set SH=OOO1I0O[17]
set VR=OOO1I0O[18]
set RV=OOO1I0O[19]
set RD=OOO1I0O[20]
set OM=OOO1I0O[21]
set XL=OOO1I0O[22]
set NM=OOO1I0O[23]
set NT=OOO1I0O[24]
set NB=OOO1I0O[25]
set NS=OOO1I0O[26]
set NR=OOO1I0O[27]
set TS=OOO1I0O[28]
if I100II!="" or OOOII1O(GetEventPlayerChatString())then
return
endif
if(AR and(AP or TR or LM or MR or RV or RD))or(AP and(TR or MR))or(TR and(LM or MR))or(LM and MR)or(MM and SH)then
call I11I1O(O0OI,"Invalid Game Mode Combination!")
return
endif
if(AA and(AI or AS or DM))or(AS and(AI or DM))or(AI and DM)then
call I11I1O(O0OI,"Invalid Game Mode Combination!")
return
endif
if RV and(AR or TR or MR or LM or DM or SH)then
call I11I1O(O0OI,"Invalid Game Mode Combination!")
return
endif
if(DM and(TR or LM or MR or SH or RV or RD))or(MM and DM)or(SH and DM)then
call I11I1O(O0OI,"Deathmatch is not compatible with these modes!")
return
endif
if LM and(AP or RD or AR or MM or TR or DM or MR or AA or AI or AS or ID or NP or SC or EM or DU or SH or RV or OM or NB or NM or NT or XL)then
call I11I1O(O0OI,"League Mode is not compatible with these modes!")
return
endif
if XL and(AP or RD or AR or MM or TR or DM or MR or AA or AI or AS or ID or NP or SC or EM or DU or SH or RV or OM or NB or NM or NT or LM)then
call I11I1O(O0OI,"Extended League is not compatible with these modes!")
return
endif
if RD and(AP or LM or AR or MM or TR or DM or MR or AA or AI or AS or SH or RV)then
call I11I1O(O0OI,"League Mode is not compatible with these modes!")
return
endif
if VR and(LM or RD or AR or MM or TR or DM or MR or AA or AI or AS or SH or RV)then
call I11I1O(O0OI,"VoteRandom is not compatible with these modes!")
return
endif
if MM and IIIO0O(IIO0)!=IIIO0O(II00)then
call I11I1O(O0OI,"The game must have an even number of players to activate Mirror Mode")
return
endif
if VR and IIIO0O(IIO0)!=IIIO0O(II00)then
call I11I1O(O0OI,"The game must have an even number of players to activate Vote Random Mode")
return
endif
if RV and IIIO0O(IIO0)!=IIIO0O(II00)then
call I11I1O(O0OI,"The game must have an even number of players to activate Reverse Mode")
return
endif
if LM and not(II010O(III0[1])and II010O(III0[2])and II010O(III0[3])and II010O(III0[4])and II010O(III0[5])and II010O(II10[1])and II010O(II10[2])and II010O(II10[3])and II010O(II10[4])and II010O(II10[5]))then
endif
if XL and not(II010O(III0[1])and II010O(III0[2])and II010O(III0[3])and II010O(III0[4])and II010O(III0[5])and II010O(II10[1])and II010O(II10[2])and II010O(II10[3])and II010O(II10[4])and II010O(II10[5]))then
endif
if RD==false and LM==false and XL==false then
call OOOIIOO()
endif
if AP or AR or LM or MM or TR or DM or MR or SP or AA or AI or AS or ID or NP or SC or DU or EM or SH or VR or RV or RD or OM or NB or NM or NT or NS or NR or XL or TS then
call DisableTrigger(GetTriggeringTrigger())
else
return
endif
set IO00OO=OOO10OO(GetEventPlayerChatString())
set I11I=false
if LM then
set O0OOO="Leaguemode"
elseif XL then
set O0OOO="Extended League"
elseif RD then
set O0OOO="RandomDraft"
elseif MM then
set O0OOO="Mirrormatch"
elseif DM then
set O0OOO="Deathmatch"
elseif RV then
set O0OOO="Reverse"
elseif AP then
set O0OOO="Allpick"
elseif AR then
set O0OOO="Allrandom"
elseif TR then
set O0OOO="Teamrandom"
elseif MR then
set O0OOO="Moderandom"
elseif VR then
set O0OOO="Voterandom"
endif
call MultiboardSetTitleText(O1I,O0OOO)
if LM then
call OOOI1IO("League Mode")
endif
if XL then
call OOOI1IO("Extended League Mode")
endif
if RD then
call OOOI1IO("Random Draft")
endif
if DM then
call OOOI1IO("Death Match")
endif
if MM then
call OOOI1IO("Mirror Match")
endif
if AP then
call OOOI1IO("All Pick")
endif
if AR then
call OOOI1IO("All Random")
endif
if VR then
call OOOI1IO("Vote Random")
endif
if TR then
call OOOI1IO("Team Random")
endif
if SP then
call OOOI1IO("Shuffle Players")
endif
if AA then
call OOOI1IO("All Agility")
endif
if AS then
call OOOI1IO("All Strength")
endif
if AI then
call OOOI1IO("All Intelligence")
endif
if DU then
call OOOI1IO("Duplicate Mode")
endif
if ID then
call OOOI1IO("Item Drop")
endif
if NP then
call OOOI1IO("No Powerups")
endif
if SC then
call OOOI1IO("Super Creeps")
endif
if EM then
call OOOI1IO("Easy Mode")
endif
if SH then
call OOOI1IO("Same Hero")
endif
if RV then
call OOOI1IO("Reverse")
endif
if OM then
call OOOI1IO("Only Mid")
endif
if NM then
call OOOI1IO("No Mid")
endif
if NB then
call OOOI1IO("No Bot")
endif
if NT then
call OOOI1IO("No Top")
endif
if NS then
call OOOI1IO("No Swap")
endif
if NR then
call OOOI1IO("No Repick")
endif
if TS then
call OOOI1IO("Terrain Snow")
endif
call OOI110(bj_FORCE_ALL_PLAYERS,20.00,"")
call OOI110(bj_FORCE_ALL_PLAYERS,20.00,O0O[GetPlayerId(O0OI)]+I10OIO(O0OI)+"|r"+"has selected"+I1OI)
call OOI110(bj_FORCE_ALL_PLAYERS,20.00,"For more information about the game modes use-gameinfo.")
call OOI110(bj_FORCE_ALL_PLAYERS,20.00,"")
call OOOII0("OOO1I1O",SP)
call OOOII0("OOO11OO",DM)
call OOOII0("OOO110O",MM)
call OOOII0("OOO11IO",SH)
call OOOII0("OOO111O",AA)
call OOOII0("OO0OOOO",AI)
call OOOII0("OO0OO0O",AS)
call OOOII0("OO0OOIO",DU)
call OOOII0("OO0OO1O",AR)
call OOOII0("OO0O0OO",VR)
call OOOII0("OO0O00O",AP)
call OOOII0("OO0O0IO",TR)
call OOOII0("OO0O01O",RV)
call OOOII0("OO0OIOO",LM)
call OOOII0("OO0OI0O",XL)
call OOOII0("OO0OIIO",RD)
call OOOII0("OO0OI1O",MR)
call OOOII0("OO0O1OO",ID)
call OOOII0("OO0O10O",NP)
call OOOII0("OO0O1IO",SC)
call OOOII0("OO0O11O",EM)
call OOOII0("OO00OOO",OM)
call OOOII0("OO00O0O",NB)
call OOOII0("OO00OIO",NT)
call OOOII0("OO00O1O",NM)
call OOOII0("OO000OO",NS)
call OOOII0("OO0000O",NR)
call OOOII0("OO000IO",TS)
endfunction
function OO0O00O takes nothing returns nothing
local location OOOO0IO=GetRectCenter(O1I0O)
local location OOOO01O=GetRectCenter(O1IIO)
local integer x=1
set O0I=true
loop
exitwhen x>5
if II010O(III0[x])then
call CreateUnitAtLoc(III0[x],1848651843,OOOO01O,bj_UNIT_FACING)
endif
if II010O(II10[x])then
call CreateUnitAtLoc(II10[x],1848651843,OOOO0IO,bj_UNIT_FACING)
endif
set x=x+1
endloop
call RemoveLocation(OOOO0IO)
call RemoveLocation(OOOO01O)
endfunction
function OO0001O takes player p returns unit
local integer i=1
local location I1OI0O
loop
exitwhen I[IO01IO[i]]==false
set i=i+1
endloop
set I0I[GetPlayerId(p)]=true
if II0I0O(p)==true then
set I1OI0O=GetRectCenter(OI10O)
else
set I1OI0O=GetRectCenter(OI1OO)
endif
set OI10[GetPlayerId(p)]=CreateUnitAtLoc(p,O1OIOO[IO01IO[i]],I1OI0O,0)
set I[IO01IO[i]]=true
call RemoveLocation(I1OI0O)
set I1OI0O=null
return OI10[GetPlayerId(p)]
endfunction
function OO00IOO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local player p=IIO10O(I1I0IO,"p")
call I0111O(I1I0IO)
call I10I1O(t)
if II010O(p)and OI10[GetPlayerId(p)]==null and GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)<250 then
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p)]+I10OIO(p)+"|r does not have enough gold to be randomly assigned a hero.")
endif
if II010O(p)and OI10[GetPlayerId(p)]==null and GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)>249 then
call OO0001O(p)
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)
endif
set t=null
set p=null
return false
endfunction
function OO00I0O takes player p returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"p",p)
call TriggerRegisterTimerEvent(t,.5,false)
call TriggerAddCondition(t,Condition(function OO00IOO))
set t=null
endfunction
function OO00IIO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer OO1100=GetTriggerEvalCount(t)
local integer O101O0=20-(OO1100-(OO1100/ 20)*20)
call LeaderboardSetLabel(IO010O,"Time Remaining:"+I2S(O101O0))
if OO1100>125 then
call DestroyLeaderboard(IO010O)
call OOOIIOO()
call I10I1O(t)
endif
set t=null
return false
endfunction
function OO00I1O takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function OO00IIO))
set IO010O=CreateLeaderboard()
call LeaderboardSetStyle(IO010O,true,false,false,false)
call LeaderboardDisplay(IO010O,false)
call PlayerSetLeaderboard(III0[1],IO010O)
call PlayerSetLeaderboard(III0[2],IO010O)
call PlayerSetLeaderboard(III0[3],IO010O)
call PlayerSetLeaderboard(III0[4],IO010O)
call PlayerSetLeaderboard(III0[5],IO010O)
call PlayerSetLeaderboard(II10[1],IO010O)
call PlayerSetLeaderboard(II10[2],IO010O)
call PlayerSetLeaderboard(II10[3],IO010O)
call PlayerSetLeaderboard(II10[4],IO010O)
call PlayerSetLeaderboard(II10[5],IO010O)
set t=null
endfunction
function OO001OO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer OO0010O=II000O(I1I0IO,"Iteration")
local player p1
local player p2
local player OO001IO
local player OO0011O
if OO0010O==0 then
if IO0I0O==1 then
set p1=III0[1]
else
set p1=II10[1]
endif
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IO0IIO[GetPlayerId(p1)])
if GetLocalPlayer()==p1 then
call LeaderboardDisplay(IO010O,true)
else
call LeaderboardDisplay(IO010O,false)
endif
elseif OO0010O==1 then
if IO0I0O==1 then
set p1=II10[1]
set p2=II10[2]
set OO001IO=III0[1]
else
set p1=III0[1]
set p2=III0[2]
set OO001IO=II10[1]
endif
call IIIIOO(OO001IO)
call OO00I0O(OO001IO)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p2)]+I10OIO(p2)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IO0IIO[GetPlayerId(p1)])
call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,IO0IIO[GetPlayerId(p2)])
if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 then
call LeaderboardDisplay(IO010O,true)
else
call LeaderboardDisplay(IO010O,false)
endif
elseif OO0010O==2 then
if IO0I0O==1 then
set p1=III0[2]
set p2=III0[3]
set OO001IO=II10[1]
set OO0011O=II10[2]
else
set p1=II10[2]
set p2=II10[3]
set OO001IO=III0[1]
set OO0011O=III0[2]
endif
call IIIIOO(OO001IO)
call IIIIOO(OO0011O)
call OO00I0O(OO001IO)
call OO00I0O(OO0011O)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p2)]+I10OIO(p2)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IO0IIO[GetPlayerId(p1)])
call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,IO0IIO[GetPlayerId(p2)])
if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 then
call LeaderboardDisplay(IO010O,true)
else
call LeaderboardDisplay(IO010O,false)
endif
elseif OO0010O==3 then
if IO0I0O==1 then
set p1=II10[3]
set p2=II10[4]
set OO001IO=III0[2]
set OO0011O=III0[3]
else
set p1=III0[3]
set p2=III0[4]
set OO001IO=II10[2]
set OO0011O=II10[3]
endif
call IIIIOO(OO001IO)
call IIIIOO(OO0011O)
call OO00I0O(OO001IO)
call OO00I0O(OO0011O)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p2)]+I10OIO(p2)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IO0IIO[GetPlayerId(p1)])
call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,IO0IIO[GetPlayerId(p2)])
if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 then
call LeaderboardDisplay(IO010O,true)
else
call LeaderboardDisplay(IO010O,false)
endif
elseif OO0010O==4 then
if IO0I0O==1 then
set p1=III0[4]
set p2=III0[5]
set OO001IO=II10[3]
set OO0011O=II10[4]
else
set p1=II10[4]
set p2=II10[5]
set OO001IO=III0[3]
set OO0011O=III0[4]
endif
call IIIIOO(OO001IO)
call IIIIOO(OO0011O)
call OO00I0O(OO001IO)
call OO00I0O(OO0011O)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p2)]+I10OIO(p2)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IO0IIO[GetPlayerId(p1)])
call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,IO0IIO[GetPlayerId(p2)])
if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 then
call LeaderboardDisplay(IO010O,true)
else
call LeaderboardDisplay(IO010O,false)
endif
elseif OO0010O==5 then
if IO0I0O==1 then
set p1=II10[5]
set OO001IO=III0[4]
set OO0011O=III0[5]
else
set p1=III0[5]
set OO001IO=II10[4]
set OO0011O=II10[5]
endif
call IIIIOO(OO001IO)
call IIIIOO(OO0011O)
call OO00I0O(OO001IO)
call OO00I0O(OO0011O)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IO0IIO[GetPlayerId(p1)])
if GetLocalPlayer()==p1 then
call LeaderboardDisplay(IO010O,true)
else
call LeaderboardDisplay(IO010O,false)
endif
elseif OO0010O==6 then
if IO0I0O==1 then
set OO001IO=II10[5]
else
set OO001IO=III0[5]
endif
call IIIIOO(OO001IO)
call OO00I0O(OO001IO)
call LeaderboardDisplay(IO010O,false)
call EnableTrigger(I0100)
call SuspendTimeOfDay(false)
endif
if OO0010O>6 then
set IO01OO=true
call I0111O(I1I0IO)
call I10I1O(t)
else
call IIO00O(I1I0IO,"Iteration",OO0010O+1)
endif
set t=null
set p1=null
set p2=null
set OO001IO=null
set OO0011O=null
return false
endfunction
function OO0IOOO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO
call I10I1O(t)
call SuspendTimeOfDay(true)
set IO0I0O=GetRandomInt(1,2)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,"")
if IO0I0O==1 then
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,"The"+O0O[GetPlayerId(III0[0])]+"Sentinel|r will now begin the 1-2-2-2-2-1 draft.")
else
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,"The"+O0O[GetPlayerId(II10[0])]+"Scourge|r will now begin the 1-2-2-2-2-1 draft.")
endif
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,"")
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,20,true)
call TriggerAddCondition(t,Condition(function OO001OO))
call IIO00O(I1I0IO,"Iteration",0)
call OO00I1O()
call TriggerEvaluate(t)
set t=null
return false
endfunction
function OO0IO0O takes integer II10IO returns boolean
return II10IO!=23
endfunction
function OO0IOIO takes nothing returns nothing
local integer x=1
local boolean array OO0IO1O
local integer II10IO
local integer MaxHeroes=O1OI1O-O1OIIO+O1O10O-O1O1OO+4
local unit Store1=O1000O
local unit Store2=O100IO
set x=1
loop
exitwhen x==23
set II10IO=I1OIIO(true,true)
if OO0IO1O[II10IO]==false and OO0IO0O(II10IO)then
set OO0IO1O[II10IO]=true
set IO01IO[x]=II10IO
if x<=11 then
call AddUnitToStock(IO000O,O1OIOO[II10IO],1,1)
call AddUnitToStock(IO001O,O1OIOO[II10IO],1,1)
else
call AddUnitToStock(IO00IO,O1OIOO[II10IO],1,1)
call AddUnitToStock(IO0IOO,O1OIOO[II10IO],1,1)
endif
set x=x+1
endif
endloop
endfunction
function OO0OIIO takes nothing returns nothing
local trigger t
local integer x=1
local location OOOO0IO=GetRectCenter(OI10O)
local location OOOO01O=GetRectCenter(OI1OO)
local player II01IO=Player(15)
call RemoveUnit(O1000O)
call RemoveUnit(O100IO)
call RemoveUnit(O1001O)
call RemoveUnit(O10IOO)
call RemoveUnit(O10I0O)
call RemoveUnit(O10IIO)
call RemoveUnit(O10I1O)
call RemoveUnit(O101OO)
set IO000O=CreateUnit(II01IO,1848652121,-6464,-6592,270)
set IO00IO=CreateUnit(II01IO,1848652122,-6080,-6592,270)
set IO001O=CreateUnit(II01IO,1848652121,5888,6208,270)
set IO0IOO=CreateUnit(II01IO,1848652122,6272,6208,270)
call SetUnitColor(IO000O,ConvertPlayerColor(0))
call SetUnitColor(IO00IO,ConvertPlayerColor(0))
call SetUnitColor(IO001O,ConvertPlayerColor(0))
call SetUnitColor(IO0IOO,ConvertPlayerColor(0))
call PanCameraToTimedLocForPlayer(III0[1],OOOO0IO,0)
call PanCameraToTimedLocForPlayer(III0[2],OOOO0IO,0)
call PanCameraToTimedLocForPlayer(III0[3],OOOO0IO,0)
call PanCameraToTimedLocForPlayer(III0[4],OOOO0IO,0)
call PanCameraToTimedLocForPlayer(III0[5],OOOO0IO,0)
call PanCameraToTimedLocForPlayer(II10[1],OOOO01O,0)
call PanCameraToTimedLocForPlayer(II10[2],OOOO01O,0)
call PanCameraToTimedLocForPlayer(II10[3],OOOO01O,0)
call PanCameraToTimedLocForPlayer(II10[4],OOOO01O,0)
call PanCameraToTimedLocForPlayer(II10[5],OOOO01O,0)
call ClearSelectionForPlayer(III0[1])
call ClearSelectionForPlayer(III0[2])
call ClearSelectionForPlayer(III0[3])
call ClearSelectionForPlayer(III0[4])
call ClearSelectionForPlayer(III0[5])
call ClearSelectionForPlayer(II10[1])
call ClearSelectionForPlayer(II10[2])
call ClearSelectionForPlayer(II10[3])
call ClearSelectionForPlayer(II10[4])
call ClearSelectionForPlayer(II10[5])
call SelectUnitAddForPlayer(IO000O,III0[1])
call SelectUnitAddForPlayer(IO000O,III0[2])
call SelectUnitAddForPlayer(IO000O,III0[3])
call SelectUnitAddForPlayer(IO000O,III0[4])
call SelectUnitAddForPlayer(IO000O,III0[5])
call SelectUnitAddForPlayer(IO001O,II10[1])
call SelectUnitAddForPlayer(IO001O,II10[2])
call SelectUnitAddForPlayer(IO001O,II10[3])
call SelectUnitAddForPlayer(IO001O,II10[4])
call SelectUnitAddForPlayer(IO001O,II10[5])
call RemoveLocation(OOOO0IO)
call RemoveLocation(OOOO01O)
set IO0I1O=true
set OO10O=false
set OO1OO=false
call DisableTrigger(I0100)
if I1I then
call DisableTrigger(IO1IOO)
endif
call OO0IOIO()
set IO0IIO[GetPlayerId(III0[1])]=GetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD)+120
set IO0IIO[GetPlayerId(III0[2])]=GetPlayerState(III0[2],PLAYER_STATE_RESOURCE_GOLD)+120
set IO0IIO[GetPlayerId(III0[3])]=GetPlayerState(III0[3],PLAYER_STATE_RESOURCE_GOLD)+120
set IO0IIO[GetPlayerId(III0[4])]=GetPlayerState(III0[4],PLAYER_STATE_RESOURCE_GOLD)+120
set IO0IIO[GetPlayerId(III0[5])]=GetPlayerState(III0[5],PLAYER_STATE_RESOURCE_GOLD)+120
set IO0IIO[GetPlayerId(II10[1])]=GetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD)+120
set IO0IIO[GetPlayerId(II10[2])]=GetPlayerState(II10[2],PLAYER_STATE_RESOURCE_GOLD)+120
set IO0IIO[GetPlayerId(II10[3])]=GetPlayerState(II10[3],PLAYER_STATE_RESOURCE_GOLD)+120
set IO0IIO[GetPlayerId(II10[4])]=GetPlayerState(II10[4],PLAYER_STATE_RESOURCE_GOLD)+120
set IO0IIO[GetPlayerId(II10[5])]=GetPlayerState(II10[5],PLAYER_STATE_RESOURCE_GOLD)+120
call SetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(III0[2],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(III0[3],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(III0[4],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(III0[5],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(II10[2],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(II10[3],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(II10[4],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(II10[5],PLAYER_STATE_RESOURCE_GOLD,0)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,15-TimerGetElapsed(I1O),false)
call TriggerAddCondition(t,Condition(function OO0IOOO))
set t=null
endfunction
function OO0I0OO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer OO0I00O=II000O(I1I0IO,"Index")
local player p
local integer II10IO
local location OOOO0IO=GetRectCenter(OI10O)
local location OOOO01O=GetRectCenter(OI1OO)
if OO0I00O<6 then
set p=III0[OO0I00O]
elseif OO0I00O<11 then
set p=II10[OO0I00O-5]
endif
if OO0I00O>10 then
call I0111O(I1I0IO)
call I10I1O(t)
if II0==false then
set OO10O=true
endif
elseif OO0I00O<5 then
call IIO00O(I1I0IO,"Index",OO0I00O+1)
set OI10[GetPlayerId(p)]=null
if II010O(p)then
loop
exitwhen OI10[GetPlayerId(p)]!=null
set II10IO=II100O()
if I[II10IO]==false then
if not I01I then
set I[II10IO]=true
endif
set OI10[GetPlayerId(p)]=CreateUnitAtLoc(p,O1OIOO[II10IO],OOOO0IO,bj_UNIT_FACING)
endif
endloop
endif
elseif OO0I00O<11 then
call IIO00O(I1I0IO,"Index",OO0I00O+1)
set OI10[GetPlayerId(p)]=null
if II010O(p)then
loop
exitwhen OI10[GetPlayerId(p)]!=null
set II10IO=II100O()
if I[II10IO]==false then
if not I01I then
set I[II10IO]=true
endif
set OI10[GetPlayerId(p)]=CreateUnitAtLoc(p,O1OIOO[II10IO],OOOO01O,bj_UNIT_FACING)
endif
endloop
endif
endif
call RemoveLocation(OOOO0IO)
call RemoveLocation(OOOO01O)
set OOOO0IO=null
set OOOO01O=null
set p=null
set t=null
return false
endfunction
function OO0OO1O takes nothing returns nothing
local location OOOO0IO=GetRectCenter(OI10O)
local location OOOO01O=GetRectCenter(OI1OO)
local location OO0I0IO=GetRectCenter(OI01O)
local location OO0I01O=GetRectCenter(OIOOO)
local integer IIII0O=1
local integer IIIIIO=5
local integer II10IO
local trigger t
set I10=true
set OO1OO=false
if not I01I then
call IIII1O()
endif
set III=400
call PanCameraToTimedLocForPlayer(III0[1],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(III0[2],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(III0[3],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(III0[4],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(III0[5],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(II10[1],OO0I01O,0)
call PanCameraToTimedLocForPlayer(II10[2],OO0I01O,0)
call PanCameraToTimedLocForPlayer(II10[3],OO0I01O,0)
call PanCameraToTimedLocForPlayer(II10[4],OO0I01O,0)
call PanCameraToTimedLocForPlayer(II10[5],OO0I01O,0)
if I1II then
loop
set II10IO=II100O()
exitwhen I[II10IO]==false
endloop
if II0I0O(O0OI)then
set OI10[GetPlayerId(O0OI)]=CreateUnit(O0OI,O1OIOO[II10IO],GetLocationX(OOOO0IO),GetLocationY(OOOO0IO),270)
else
set OI10[GetPlayerId(O0OI)]=CreateUnit(O0OI,O1OIOO[II10IO],GetLocationX(OOOO01O),GetLocationY(OOOO01O),270)
endif
call RemoveLocation(OOOO0IO)
call RemoveLocation(OOOO01O)
call RemoveLocation(OO0I0IO)
call RemoveLocation(OO0I01O)
set OOOO0IO=null
set OOOO01O=null
set OO0I0IO=null
set OO0I01O=null
set t=null
return
endif
set OO10O=false
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddCondition(t,Condition(function OO0I0OO))
call IIO00O(I011OO(t),"Index",1)
call RemoveLocation(OOOO0IO)
call RemoveLocation(OOOO01O)
call RemoveLocation(OO0I0IO)
call RemoveLocation(OO0I01O)
set OOOO0IO=null
set OOOO01O=null
set OO0I0IO=null
set OO0I01O=null
set t=null
endfunction
function OO0IIOO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
call I10I1O(t)
set OOI1O=true
set t=null
return false
endfunction
function OO0II0O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local trigger OO0IIIO=IIO11O(I1I0IO,"t")
local integer i
local integer x
local integer II10IO
local integer OO0II1O=IIIO0O(IIO0)
local integer OO0I1OO=IIIO0O(II00)
local location OOOO0IO=GetRectCenter(OI10O)
local location OOOO01O=GetRectCenter(OI1OO)
local location OO0I0IO=GetRectCenter(OI01O)
local location OO0I01O=GetRectCenter(OIOOO)
call I10I1O(OO0IIIO)
call I0111O(I1I0IO)
call I10I1O(t)
set IOI0IO=II000O("OO0O0OO","Option1Count")
set IOI01O=II000O("OO0O0OO","Option2Count")
set IOIIOO=II000O("OO0O0OO","Option3Count")
set i=1
loop
exitwhen i>OO0II1O
set IOI00O[i]=IO011O[i]
set i=i+1
endloop
set x=GetRandomInt(1,3)
if x==1 then
if OO0II1O==1 then
set IOI00O[1]=IO011O[1]
elseif OO0II1O==2 then
set IOI00O[1]=IO011O[2]
set IOI00O[2]=IO011O[1]
elseif OO0II1O==3 then
set IOI00O[1]=IO011O[3]
set IOI00O[2]=IO011O[1]
set IOI00O[3]=IO011O[2]
elseif OO0II1O==4 then
set IOI00O[1]=IO011O[4]
set IOI00O[2]=IO011O[3]
set IOI00O[3]=IO011O[2]
set IOI00O[4]=IO011O[1]
elseif OO0II1O==5 then
set IOI00O[1]=IO011O[5]
set IOI00O[2]=IO011O[4]
set IOI00O[3]=IO011O[1]
set IOI00O[4]=IO011O[2]
set IOI00O[5]=IO011O[3]
endif
elseif x==2 then
if OO0II1O==1 then
set IOI00O[1]=IO011O[1]
elseif OO0II1O==2 then
set IOI00O[1]=IO011O[2]
set IOI00O[2]=IO011O[1]
elseif OO0II1O==3 then
set IOI00O[1]=IO011O[2]
set IOI00O[2]=IO011O[3]
set IOI00O[3]=IO011O[1]
elseif OO0II1O==4 then
set IOI00O[1]=IO011O[3]
set IOI00O[2]=IO011O[1]
set IOI00O[3]=IO011O[4]
set IOI00O[4]=IO011O[2]
elseif OO0II1O==5 then
set IOI00O[1]=IO011O[4]
set IOI00O[2]=IO011O[3]
set IOI00O[3]=IO011O[2]
set IOI00O[4]=IO011O[5]
set IOI00O[5]=IO011O[1]
endif
else
if OO0II1O==1 then
set IOI00O[1]=IO011O[1]
elseif OO0II1O==2 then
set IOI00O[1]=IO011O[1]
set IOI00O[2]=IO011O[2]
elseif OO0II1O==3 then
set IOI00O[1]=IO011O[3]
set IOI00O[2]=IO011O[2]
set IOI00O[3]=IO011O[1]
elseif OO0II1O==4 then
set IOI00O[1]=IO011O[2]
set IOI00O[2]=IO011O[4]
set IOI00O[3]=IO011O[3]
set IOI00O[4]=IO011O[1]
elseif OO0II1O==5 then
set IOI00O[1]=IO011O[5]
set IOI00O[2]=IO011O[1]
set IOI00O[3]=IO011O[3]
set IOI00O[4]=IO011O[4]
set IOI00O[5]=IO011O[2]
endif
endif
set i=1
loop
exitwhen i>OO0II1O
set IO011O[i]=IOI00O[i]
set i=i+1
endloop
set i=1
loop
exitwhen i>OO0II1O
set IOI00O[i]=IOIOOO[i]
set i=i+1
endloop
set x=GetRandomInt(1,3)
if x==1 then
if OO0II1O==1 then
set IOI00O[1]=IOIOOO[1]
elseif OO0II1O==2 then
set IOI00O[1]=IOIOOO[2]
set IOI00O[2]=IOIOOO[1]
elseif OO0II1O==3 then
set IOI00O[1]=IOIOOO[3]
set IOI00O[2]=IOIOOO[1]
set IOI00O[3]=IOIOOO[2]
elseif OO0II1O==4 then
set IOI00O[1]=IOIOOO[4]
set IOI00O[2]=IOIOOO[3]
set IOI00O[3]=IOIOOO[2]
set IOI00O[4]=IOIOOO[1]
elseif OO0II1O==5 then
set IOI00O[1]=IOIOOO[5]
set IOI00O[2]=IOIOOO[4]
set IOI00O[3]=IOIOOO[1]
set IOI00O[4]=IOIOOO[2]
set IOI00O[5]=IOIOOO[3]
endif
elseif x==2 then
if OO0II1O==1 then
set IOI00O[1]=IOIOOO[1]
elseif OO0II1O==2 then
set IOI00O[1]=IOIOOO[2]
set IOI00O[2]=IOIOOO[1]
elseif OO0II1O==3 then
set IOI00O[1]=IOIOOO[2]
set IOI00O[2]=IOIOOO[3]
set IOI00O[3]=IOIOOO[1]
elseif OO0II1O==4 then
set IOI00O[1]=IOIOOO[3]
set IOI00O[2]=IOIOOO[1]
set IOI00O[3]=IOIOOO[4]
set IOI00O[4]=IOIOOO[2]
elseif OO0II1O==5 then
set IOI00O[1]=IOIOOO[4]
set IOI00O[2]=IOIOOO[3]
set IOI00O[3]=IOIOOO[2]
set IOI00O[4]=IOIOOO[5]
set IOI00O[5]=IOIOOO[1]
endif
else
if OO0II1O==1 then
set IOI00O[1]=IOIOOO[1]
elseif OO0II1O==2 then
set IOI00O[1]=IOIOOO[1]
set IOI00O[2]=IOIOOO[2]
elseif OO0II1O==3 then
set IOI00O[1]=IOIOOO[3]
set IOI00O[2]=IOIOOO[2]
set IOI00O[3]=IOIOOO[1]
elseif OO0II1O==4 then
set IOI00O[1]=IOIOOO[2]
set IOI00O[2]=IOIOOO[4]
set IOI00O[3]=IOIOOO[3]
set IOI00O[4]=IOIOOO[1]
elseif OO0II1O==5 then
set IOI00O[1]=IOIOOO[5]
set IOI00O[2]=IOIOOO[1]
set IOI00O[3]=IOIOOO[3]
set IOI00O[4]=IOIOOO[4]
set IOI00O[5]=IOIOOO[2]
endif
endif
set i=1
loop
exitwhen i>OO0II1O
set IOIOOO[i]=IOI00O[i]
set i=i+1
endloop
set i=1
loop
exitwhen i>OO0II1O
set IOI00O[i]=IOIO0O[i]
set i=i+1
endloop
set x=GetRandomInt(1,3)
if x==1 then
if OO0II1O==1 then
set IOI00O[1]=IOIO0O[1]
elseif OO0II1O==2 then
set IOI00O[1]=IOIO0O[2]
set IOI00O[2]=IOIO0O[1]
elseif OO0II1O==3 then
set IOI00O[1]=IOIO0O[3]
set IOI00O[2]=IOIO0O[1]
set IOI00O[3]=IOIO0O[2]
elseif OO0II1O==4 then
set IOI00O[1]=IOIO0O[4]
set IOI00O[2]=IOIO0O[3]
set IOI00O[3]=IOIO0O[2]
set IOI00O[4]=IOIO0O[1]
elseif OO0II1O==5 then
set IOI00O[1]=IOIO0O[5]
set IOI00O[2]=IOIO0O[4]
set IOI00O[3]=IOIO0O[1]
set IOI00O[4]=IOIO0O[2]
set IOI00O[5]=IOIO0O[3]
endif
elseif x==2 then
if OO0II1O==1 then
set IOI00O[1]=IOIO0O[1]
elseif OO0II1O==2 then
set IOI00O[1]=IOIO0O[2]
set IOI00O[2]=IOIO0O[1]
elseif OO0II1O==3 then
set IOI00O[1]=IOIO0O[2]
set IOI00O[2]=IOIO0O[3]
set IOI00O[3]=IOIO0O[1]
elseif OO0II1O==4 then
set IOI00O[1]=IOIO0O[3]
set IOI00O[2]=IOIO0O[1]
set IOI00O[3]=IOIO0O[4]
set IOI00O[4]=IOIO0O[2]
elseif OO0II1O==5 then
set IOI00O[1]=IOIO0O[4]
set IOI00O[2]=IOIO0O[3]
set IOI00O[3]=IOIO0O[2]
set IOI00O[4]=IOIO0O[5]
set IOI00O[5]=IOIO0O[1]
endif
else
if OO0II1O==1 then
set IOI00O[1]=IOIO0O[1]
elseif OO0II1O==2 then
set IOI00O[1]=IOIO0O[1]
set IOI00O[2]=IOIO0O[2]
elseif OO0II1O==3 then
set IOI00O[1]=IOIO0O[3]
set IOI00O[2]=IOIO0O[2]
set IOI00O[3]=IOIO0O[1]
elseif OO0II1O==4 then
set IOI00O[1]=IOIO0O[2]
set IOI00O[2]=IOIO0O[4]
set IOI00O[3]=IOIO0O[3]
set IOI00O[4]=IOIO0O[1]
elseif OO0II1O==5 then
set IOI00O[1]=IOIO0O[5]
set IOI00O[2]=IOIO0O[1]
set IOI00O[3]=IOIO0O[3]
set IOI00O[4]=IOIO0O[4]
set IOI00O[5]=IOIO0O[2]
endif
endif
set i=1
loop
exitwhen i>OO0II1O
set IOIO0O[i]=IOI00O[i]
set i=i+1
endloop
set i=1
loop
exitwhen i>OO0II1O
set IOI00O[i]=IOIOIO[i]
set i=i+1
endloop
set x=GetRandomInt(1,3)
if x==1 then
if OO0II1O==1 then
set IOI00O[1]=IOIOIO[1]
elseif OO0II1O==2 then
set IOI00O[1]=IOIOIO[2]
set IOI00O[2]=IOIOIO[1]
elseif OO0II1O==3 then
set IOI00O[1]=IOIOIO[3]
set IOI00O[2]=IOIOIO[1]
set IOI00O[3]=IOIOIO[2]
elseif OO0II1O==4 then
set IOI00O[1]=IOIOIO[4]
set IOI00O[2]=IOIOIO[3]
set IOI00O[3]=IOIOIO[2]
set IOI00O[4]=IOIOIO[1]
elseif OO0II1O==5 then
set IOI00O[1]=IOIOIO[5]
set IOI00O[2]=IOIOIO[4]
set IOI00O[3]=IOIOIO[1]
set IOI00O[4]=IOIOIO[2]
set IOI00O[5]=IOIOIO[3]
endif
elseif x==2 then
if OO0II1O==1 then
set IOI00O[1]=IOIOIO[1]
elseif OO0II1O==2 then
set IOI00O[1]=IOIOIO[2]
set IOI00O[2]=IOIOIO[1]
elseif OO0II1O==3 then
set IOI00O[1]=IOIOIO[2]
set IOI00O[2]=IOIOIO[3]
set IOI00O[3]=IOIOIO[1]
elseif OO0II1O==4 then
set IOI00O[1]=IOIOIO[3]
set IOI00O[2]=IOIOIO[1]
set IOI00O[3]=IOIOIO[4]
set IOI00O[4]=IOIOIO[2]
elseif OO0II1O==5 then
set IOI00O[1]=IOIOIO[4]
set IOI00O[2]=IOIOIO[3]
set IOI00O[3]=IOIOIO[2]
set IOI00O[4]=IOIOIO[5]
set IOI00O[5]=IOIOIO[1]
endif
else
if OO0II1O==1 then
set IOI00O[1]=IOIOIO[1]
elseif OO0II1O==2 then
set IOI00O[1]=IOIOIO[1]
set IOI00O[2]=IOIOIO[2]
elseif OO0II1O==3 then
set IOI00O[1]=IOIOIO[3]
set IOI00O[2]=IOIOIO[2]
set IOI00O[3]=IOIOIO[1]
elseif OO0II1O==4 then
set IOI00O[1]=IOIOIO[2]
set IOI00O[2]=IOIOIO[4]
set IOI00O[3]=IOIOIO[3]
set IOI00O[4]=IOIOIO[1]
elseif OO0II1O==5 then
set IOI00O[1]=IOIOIO[5]
set IOI00O[2]=IOIOIO[1]
set IOI00O[3]=IOIOIO[3]
set IOI00O[4]=IOIOIO[4]
set IOI00O[5]=IOIOIO[2]
endif
endif
set i=1
loop
exitwhen i>OO0II1O
set IOIOIO[i]=IOI00O[i]
set i=i+1
endloop
set i=1
loop
exitwhen i>OO0II1O
set IOI00O[i]=IOIO1O[i]
set i=i+1
endloop
set x=GetRandomInt(1,3)
if x==1 then
if OO0II1O==1 then
set IOI00O[1]=IOIO1O[1]
elseif OO0II1O==2 then
set IOI00O[1]=IOIO1O[2]
set IOI00O[2]=IOIO1O[1]
elseif OO0II1O==3 then
set IOI00O[1]=IOIO1O[3]
set IOI00O[2]=IOIO1O[1]
set IOI00O[3]=IOIO1O[2]
elseif OO0II1O==4 then
set IOI00O[1]=IOIO1O[4]
set IOI00O[2]=IOIO1O[3]
set IOI00O[3]=IOIO1O[2]
set IOI00O[4]=IOIO1O[1]
elseif OO0II1O==5 then
set IOI00O[1]=IOIO1O[5]
set IOI00O[2]=IOIO1O[4]
set IOI00O[3]=IOIO1O[1]
set IOI00O[4]=IOIO1O[2]
set IOI00O[5]=IOIO1O[3]
endif
elseif x==2 then
if OO0II1O==1 then
set IOI00O[1]=IOIO1O[1]
elseif OO0II1O==2 then
set IOI00O[1]=IOIO1O[2]
set IOI00O[2]=IOIO1O[1]
elseif OO0II1O==3 then
set IOI00O[1]=IOIO1O[2]
set IOI00O[2]=IOIO1O[3]
set IOI00O[3]=IOIO1O[1]
elseif OO0II1O==4 then
set IOI00O[1]=IOIO1O[3]
set IOI00O[2]=IOIO1O[1]
set IOI00O[3]=IOIO1O[4]
set IOI00O[4]=IOIO1O[2]
elseif OO0II1O==5 then
set IOI00O[1]=IOIO1O[4]
set IOI00O[2]=IOIO1O[3]
set IOI00O[3]=IOIO1O[2]
set IOI00O[4]=IOIO1O[5]
set IOI00O[5]=IOIO1O[1]
endif
else
if OO0II1O==1 then
set IOI00O[1]=IOIO1O[1]
elseif OO0II1O==2 then
set IOI00O[1]=IOIO1O[1]
set IOI00O[2]=IOIO1O[2]
elseif OO0II1O==3 then
set IOI00O[1]=IOIO1O[3]
set IOI00O[2]=IOIO1O[2]
set IOI00O[3]=IOIO1O[1]
elseif OO0II1O==4 then
set IOI00O[1]=IOIO1O[2]
set IOI00O[2]=IOIO1O[4]
set IOI00O[3]=IOIO1O[3]
set IOI00O[4]=IOIO1O[1]
elseif OO0II1O==5 then
set IOI00O[1]=IOIO1O[5]
set IOI00O[2]=IOIO1O[1]
set IOI00O[3]=IOIO1O[3]
set IOI00O[4]=IOIO1O[4]
set IOI00O[5]=IOIO1O[2]
endif
endif
set i=1
loop
exitwhen i>OO0II1O
set IOIO1O[i]=IOI00O[i]
set i=i+1
endloop
set i=1
loop
exitwhen i>OO0II1O
set IOI00O[i]=IOI0OO[i]
set i=i+1
endloop
set x=GetRandomInt(1,3)
if x==1 then
if OO0II1O==1 then
set IOI00O[1]=IOI0OO[1]
elseif OO0II1O==2 then
set IOI00O[1]=IOI0OO[2]
set IOI00O[2]=IOI0OO[1]
elseif OO0II1O==3 then
set IOI00O[1]=IOI0OO[3]
set IOI00O[2]=IOI0OO[1]
set IOI00O[3]=IOI0OO[2]
elseif OO0II1O==4 then
set IOI00O[1]=IOI0OO[4]
set IOI00O[2]=IOI0OO[3]
set IOI00O[3]=IOI0OO[2]
set IOI00O[4]=IOI0OO[1]
elseif OO0II1O==5 then
set IOI00O[1]=IOI0OO[5]
set IOI00O[2]=IOI0OO[4]
set IOI00O[3]=IOI0OO[1]
set IOI00O[4]=IOI0OO[2]
set IOI00O[5]=IOI0OO[3]
endif
elseif x==2 then
if OO0II1O==1 then
set IOI00O[1]=IOI0OO[1]
elseif OO0II1O==2 then
set IOI00O[1]=IOI0OO[2]
set IOI00O[2]=IOI0OO[1]
elseif OO0II1O==3 then
set IOI00O[1]=IOI0OO[2]
set IOI00O[2]=IOI0OO[3]
set IOI00O[3]=IOI0OO[1]
elseif OO0II1O==4 then
set IOI00O[1]=IOI0OO[3]
set IOI00O[2]=IOI0OO[1]
set IOI00O[3]=IOI0OO[4]
set IOI00O[4]=IOI0OO[2]
elseif OO0II1O==5 then
set IOI00O[1]=IOI0OO[4]
set IOI00O[2]=IOI0OO[3]
set IOI00O[3]=IOI0OO[2]
set IOI00O[4]=IOI0OO[5]
set IOI00O[5]=IOI0OO[1]
endif
else
if OO0II1O==1 then
set IOI00O[1]=IOI0OO[1]
elseif OO0II1O==2 then
set IOI00O[1]=IOI0OO[1]
set IOI00O[2]=IOI0OO[2]
elseif OO0II1O==3 then
set IOI00O[1]=IOI0OO[3]
set IOI00O[2]=IOI0OO[2]
set IOI00O[3]=IOI0OO[1]
elseif OO0II1O==4 then
set IOI00O[1]=IOI0OO[2]
set IOI00O[2]=IOI0OO[4]
set IOI00O[3]=IOI0OO[3]
set IOI00O[4]=IOI0OO[1]
elseif OO0II1O==5 then
set IOI00O[1]=IOI0OO[5]
set IOI00O[2]=IOI0OO[1]
set IOI00O[3]=IOI0OO[3]
set IOI00O[4]=IOI0OO[4]
set IOI00O[5]=IOI0OO[2]
endif
endif
set i=1
loop
exitwhen i>OO0II1O
set IOI0OO[i]=IOI00O[i]
set i=i+1
endloop
set II10IO=GetRandomInt(1,2)
if IOI0IO>=IOI01O and IOI0IO>=IOIIOO then
call ClearTextMessages()
call OOI110(bj_FORCE_ALL_PLAYERS,45,"Voted:"+IOII0O)
call OOI110(bj_FORCE_ALL_PLAYERS,45,"")
set i=1
set x=1
loop
exitwhen i>5
if II010O(III0[i])then
if II10IO==1 then
set OI10[GetPlayerId(III0[i])]=CreateUnitAtLoc(III0[i],IO011O[x],OOOO0IO,bj_UNIT_FACING)
else
set OI10[GetPlayerId(III0[i])]=CreateUnitAtLoc(III0[i],IOIOOO[x],OOOO0IO,bj_UNIT_FACING)
endif
set x=x+1
endif
set i=i+1
endloop
set i=1
set x=1
loop
exitwhen i>5
if II010O(II10[i])then
if II10IO==1 then
set OI10[GetPlayerId(II10[i])]=CreateUnitAtLoc(II10[i],IOIOOO[x],OOOO01O,bj_UNIT_FACING)
else
set OI10[GetPlayerId(II10[i])]=CreateUnitAtLoc(II10[i],IO011O[x],OOOO01O,bj_UNIT_FACING)
endif
set x=x+1
endif
set i=i+1
endloop
elseif IOI01O>=IOI0IO and IOI01O>=IOIIOO then
call ClearTextMessages()
call OOI110(bj_FORCE_ALL_PLAYERS,45,"Voted:"+IOIIIO)
call OOI110(bj_FORCE_ALL_PLAYERS,45,"")
set i=1
set x=1
loop
exitwhen i>5
if II010O(III0[i])then
if II10IO==1 then
set OI10[GetPlayerId(III0[i])]=CreateUnitAtLoc(III0[i],IOIO0O[x],OOOO0IO,bj_UNIT_FACING)
else
set OI10[GetPlayerId(III0[i])]=CreateUnitAtLoc(III0[i],IOIOIO[x],OOOO0IO,bj_UNIT_FACING)
endif
set x=x+1
endif
set i=i+1
endloop
set i=1
set x=1
loop
exitwhen i>5
if II010O(II10[i])then
if II10IO==1 then
set OI10[GetPlayerId(II10[i])]=CreateUnitAtLoc(II10[i],IOIOIO[x],OOOO01O,bj_UNIT_FACING)
else
set OI10[GetPlayerId(II10[i])]=CreateUnitAtLoc(II10[i],IOIO0O[x],OOOO01O,bj_UNIT_FACING)
endif
set x=x+1
endif
set i=i+1
endloop
elseif IOIIOO>=IOI0IO and IOIIOO>=IOI01O then
call ClearTextMessages()
call OOI110(bj_FORCE_ALL_PLAYERS,45,"Voted:"+IOII1O)
call OOI110(bj_FORCE_ALL_PLAYERS,45,"")
set i=1
set x=1
loop
exitwhen i>5
if II010O(III0[i])then
if II10IO==1 then
set OI10[GetPlayerId(III0[i])]=CreateUnitAtLoc(III0[i],IOIO1O[x],OOOO0IO,bj_UNIT_FACING)
else
set OI10[GetPlayerId(III0[i])]=CreateUnitAtLoc(III0[i],IOI0OO[x],OOOO0IO,bj_UNIT_FACING)
endif
set x=x+1
endif
set i=i+1
endloop
set i=1
set x=1
loop
exitwhen i>5
if II010O(II10[i])then
if II10IO==1 then
set OI10[GetPlayerId(II10[i])]=CreateUnitAtLoc(II10[i],IOI0OO[x],OOOO01O,bj_UNIT_FACING)
else
set OI10[GetPlayerId(II10[i])]=CreateUnitAtLoc(II10[i],IOIO1O[x],OOOO01O,bj_UNIT_FACING)
endif
set x=x+1
endif
set i=i+1
endloop
endif
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,50,false)
call TriggerAddCondition(t,Condition(function OO0IIOO))
call RemoveLocation(OOOO0IO)
call RemoveLocation(OOOO01O)
call RemoveLocation(OO0I0IO)
call RemoveLocation(OO0I01O)
set OOOO0IO=null
set OOOO01O=null
set OO0I0IO=null
set OO0I01O=null
set t=null
set OO0IIIO=null
return false
endfunction
function OO0I10O takes nothing returns integer
local integer I1O01O
local integer I1OIOO
local integer I1001I
if(GetRandomInt(1,2)==1)then
set I1O01O=O1OIIO
set I1OIOO=O1OI1O
else
set I1O01O=O1O1OO
set I1OIOO=O1O10O
endif
set I1001I=GetRandomInt(I1O01O,I1OIOO)
if I01I then
return I1001I
endif
loop
exitwhen OO00O[I1001I]==false
set I1001I=GetRandomInt(I1O01O,I1OIOO)
endloop
set OO00O[I1001I]=true
return I1001I
endfunction
function OO0I1IO takes nothing returns nothing
local integer i=O1OIIO
loop
exitwhen i>O1O10O
set OO00O[i]=false
set i=i+1
endloop
endfunction
function OO0I11O takes nothing returns boolean
local string IIOO1O=I2S(GetPlayerId(GetTriggerPlayer()))
local string OO01OOO=SubString(GetEventPlayerChatString(),8,9)
local integer OO01O0O=0
if OO01OOO=="1" then
set OO01O0O=1
elseif OO01OOO=="2" then
set OO01O0O=2
elseif OO01OOO=="3" then
set OO01O0O=3
endif
if OO01O0O==0 then
call I1111O(GetTriggerPlayer(),"Invalid Option.Select from-Option 1/2/3")
return false
endif
if II001O("OO0O0OO",IIOO1O)then
call I1111O(GetTriggerPlayer(),"You have already voted.")
return false
endif
call IIOI0O("OO0O0OO",IIOO1O,true)
call IIO00O("OO0O0OO","Option"+I2S(OO01O0O)+"Count",1+II000O("OO0O0OO","Option"+I2S(OO01O0O)+"Count"))
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,20,"You have chosen Option"+I2S(OO01O0O)+".")
return false
endfunction
function OO0O0OO takes nothing returns nothing
local integer OO0II1O=IIIO0O(IIO0)
local integer OO0I1OO=IIIO0O(II00)
local integer i
local integer x
local trigger t=CreateTrigger()
local location OOOO0IO=GetRectCenter(OI10O)
local location OOOO01O=GetRectCenter(OI1OO)
local location OO0I0IO=GetRectCenter(OI01O)
local location OO0I01O=GetRectCenter(OIOOO)
local integer II10IO
local trigger t2
set OO0OO=true
set OO1OO=false
set OO10O=false
call IIII1O()
call PanCameraToTimedLocForPlayer(III0[1],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(III0[2],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(III0[3],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(III0[4],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(III0[5],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(II10[1],OO0I01O,0)
call PanCameraToTimedLocForPlayer(II10[2],OO0I01O,0)
call PanCameraToTimedLocForPlayer(II10[3],OO0I01O,0)
call PanCameraToTimedLocForPlayer(II10[4],OO0I01O,0)
call PanCameraToTimedLocForPlayer(II10[5],OO0I01O,0)
call TriggerRegisterPlayerChatEvent(t,III0[1],"-Option",false)
call TriggerRegisterPlayerChatEvent(t,III0[2],"-Option",false)
call TriggerRegisterPlayerChatEvent(t,III0[3],"-Option",false)
call TriggerRegisterPlayerChatEvent(t,III0[4],"-Option",false)
call TriggerRegisterPlayerChatEvent(t,III0[5],"-Option",false)
call TriggerRegisterPlayerChatEvent(t,II10[1],"-Option",false)
call TriggerRegisterPlayerChatEvent(t,II10[2],"-Option",false)
call TriggerRegisterPlayerChatEvent(t,II10[3],"-Option",false)
call TriggerRegisterPlayerChatEvent(t,II10[4],"-Option",false)
call TriggerRegisterPlayerChatEvent(t,II10[5],"-Option",false)
call TriggerAddCondition(t,Condition(function OO0I11O))
call OO0I1IO()
set i=1
loop
exitwhen i>OO0II1O
set IO011O[i]=O1OIOO[OO0I10O()]
set IOII0O=IOII0O+GetObjectName(IO011O[i])
set i=i+1
if i<=OO0II1O then
set IOII0O=IOII0O+"|c005BFEEA-|r"
endif
endloop
set IOII0O=IOII0O+"|c00FF0000vs|r"
set i=1
loop
exitwhen i>OO0I1OO
set IOIOOO[i]=O1OIOO[OO0I10O()]
set IOII0O=IOII0O+GetObjectName(IOIOOO[i])
set i=i+1
if i<=OO0I1OO then
set IOII0O=IOII0O+"|c005BFEEA-|r"
endif
endloop
call OO0I1IO()
set i=1
loop
exitwhen i>OO0II1O
set IOIO0O[i]=O1OIOO[OO0I10O()]
set IOIIIO=IOIIIO+GetObjectName(IOIO0O[i])+""
set i=i+1
if i<=OO0II1O then
set IOIIIO=IOIIIO+"|c005BFEEA-|r"
endif
endloop
set IOIIIO=IOIIIO+"|c00FF0000vs|r"
set i=1
loop
exitwhen i>OO0I1OO
set IOIOIO[i]=O1OIOO[OO0I10O()]
set IOIIIO=IOIIIO+GetObjectName(IOIOIO[i])+""
set i=i+1
if i<=OO0I1OO then
set IOIIIO=IOIIIO+"|c005BFEEA-|r"
endif
endloop
call OO0I1IO()
set i=1
loop
exitwhen i>OO0II1O
set IOIO1O[i]=O1OIOO[OO0I10O()]
set IOII1O=IOII1O+GetObjectName(IOIO1O[i])+""
set i=i+1
if i<=OO0II1O then
set IOII1O=IOII1O+"|c005BFEEA-|r"
endif
endloop
set IOII1O=IOII1O+"|c00FF0000vs|r"
set i=1
loop
exitwhen i>OO0I1OO
set IOI0OO[i]=O1OIOO[OO0I10O()]
set IOII1O=IOII1O+GetObjectName(IOI0OO[i])+""
set i=i+1
if i<=OO0I1OO then
set IOII1O=IOII1O+"|c005BFEEA-|r"
endif
endloop
call OOI110(bj_FORCE_ALL_PLAYERS,45,"")
call OOI110(bj_FORCE_ALL_PLAYERS,45,"You have 30 seconds to vote from the Options below using-Option 1/2/3.")
call OOI110(bj_FORCE_ALL_PLAYERS,45,"Please note that the groups listed in the Options do not imply that Sentinel will have the first hero set,it is random.")
call OOI110(bj_FORCE_ALL_PLAYERS,45,"")
call OOI110(bj_FORCE_ALL_PLAYERS,45,IOII0O)
call OOI110(bj_FORCE_ALL_PLAYERS,45,"")
call OOI110(bj_FORCE_ALL_PLAYERS,45,IOIIIO)
call OOI110(bj_FORCE_ALL_PLAYERS,45,"")
call OOI110(bj_FORCE_ALL_PLAYERS,45,IOII1O)
set t2=CreateTrigger()
call TriggerRegisterTimerEvent(t2,30,false)
call TriggerAddCondition(t2,Condition(function OO0II0O))
call IIOOIO(I011OO(t2),"t",t)
call RemoveLocation(OOOO0IO)
call RemoveLocation(OOOO01O)
call RemoveLocation(OO0I0IO)
call RemoveLocation(OO0I01O)
set OOOO0IO=null
set OOOO01O=null
set OO0I0IO=null
set OO0I01O=null
set t=null
set t2=null
endfunction
function OO01OIO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer OO1100=GetTriggerEvalCount(t)
local integer O101O0=20-(OO1100-(OO1100/ 20)*20)
call LeaderboardSetLabel(IO1OOO,"Time Remaining:"+I2S(O101O0))
if OO1100>125 then
call DestroyLeaderboard(IO1OOO)
call OOOIIOO()
call I10I1O(t)
endif
set t=null
return false
endfunction
function OO01O1O takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function OO01OIO))
set IO1OOO=CreateLeaderboard()
call LeaderboardSetStyle(IO1OOO,true,false,false,false)
call LeaderboardDisplay(IO1OOO,false)
call PlayerSetLeaderboard(III0[1],IO1OOO)
call PlayerSetLeaderboard(III0[2],IO1OOO)
call PlayerSetLeaderboard(III0[3],IO1OOO)
call PlayerSetLeaderboard(III0[4],IO1OOO)
call PlayerSetLeaderboard(III0[5],IO1OOO)
call PlayerSetLeaderboard(II10[1],IO1OOO)
call PlayerSetLeaderboard(II10[2],IO1OOO)
call PlayerSetLeaderboard(II10[3],IO1OOO)
call PlayerSetLeaderboard(II10[4],IO1OOO)
call PlayerSetLeaderboard(II10[5],IO1OOO)
set t=null
endfunction
function OO010OO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer OO0010O=II000O(I1I0IO,"Iteration")
local player p1
local player p2
local player OO001IO
local player OO0011O
if OO0010O==0 then
if IOI1OO==1 then
set p1=III0[1]
else
set p1=II10[1]
endif
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IOI10O[GetPlayerId(p1)])
if GetLocalPlayer()==p1 then
call LeaderboardDisplay(IO1OOO,true)
else
call LeaderboardDisplay(IO1OOO,false)
endif
elseif OO0010O==1 then
if IOI1OO==1 then
set p1=II10[1]
set p2=II10[2]
set OO001IO=III0[1]
else
set p1=III0[1]
set p2=III0[2]
set OO001IO=II10[1]
endif
call IIIIOO(OO001IO)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p2)]+I10OIO(p2)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IOI10O[GetPlayerId(p1)])
call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,IOI10O[GetPlayerId(p2)])
if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 then
call LeaderboardDisplay(IO1OOO,true)
else
call LeaderboardDisplay(IO1OOO,false)
endif
elseif OO0010O==2 then
if IOI1OO==1 then
set p1=III0[2]
set p2=III0[3]
set OO001IO=II10[1]
set OO0011O=II10[2]
else
set p1=II10[2]
set p2=II10[3]
set OO001IO=III0[1]
set OO0011O=III0[2]
endif
call IIIIOO(OO001IO)
call IIIIOO(OO0011O)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p2)]+I10OIO(p2)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IOI10O[GetPlayerId(p1)])
call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,IOI10O[GetPlayerId(p2)])
if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 then
call LeaderboardDisplay(IO1OOO,true)
else
call LeaderboardDisplay(IO1OOO,false)
endif
elseif OO0010O==3 then
if IOI1OO==1 then
set p1=II10[3]
set p2=II10[4]
set OO001IO=III0[2]
set OO0011O=III0[3]
else
set p1=III0[3]
set p2=III0[4]
set OO001IO=II10[2]
set OO0011O=II10[3]
endif
call IIIIOO(OO001IO)
call IIIIOO(OO0011O)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p2)]+I10OIO(p2)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IOI10O[GetPlayerId(p1)])
call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,IOI10O[GetPlayerId(p2)])
if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 then
call LeaderboardDisplay(IO1OOO,true)
else
call LeaderboardDisplay(IO1OOO,false)
endif
elseif OO0010O==4 then
if IOI1OO==1 then
set p1=III0[4]
set p2=III0[5]
set OO001IO=II10[3]
set OO0011O=II10[4]
else
set p1=II10[4]
set p2=II10[5]
set OO001IO=III0[3]
set OO0011O=III0[4]
endif
call IIIIOO(OO001IO)
call IIIIOO(OO0011O)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p2)]+I10OIO(p2)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IOI10O[GetPlayerId(p1)])
call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,IOI10O[GetPlayerId(p2)])
if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 then
call LeaderboardDisplay(IO1OOO,true)
else
call LeaderboardDisplay(IO1OOO,false)
endif
elseif OO0010O==5 then
if IOI1OO==1 then
set p1=II10[5]
set OO001IO=III0[4]
set OO0011O=III0[5]
else
set p1=III0[5]
set OO001IO=II10[4]
set OO0011O=II10[5]
endif
call IIIIOO(OO001IO)
call IIIIOO(OO0011O)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IOI10O[GetPlayerId(p1)])
if GetLocalPlayer()==p1 then
call LeaderboardDisplay(IO1OOO,true)
else
call LeaderboardDisplay(IO1OOO,false)
endif
elseif OO0010O==6 then
if IOI1OO==1 then
set OO001IO=II10[5]
else
set OO001IO=III0[5]
endif
call IIIIOO(OO001IO)
call LeaderboardDisplay(IO1OOO,false)
call EnableTrigger(I0100)
call SuspendTimeOfDay(false)
endif
if OO0010O>6 then
set IOI11O=true
call I0111O(I1I0IO)
call I10I1O(t)
else
call IIO00O(I1I0IO,"Iteration",OO0010O+1)
endif
set t=null
set p1=null
set p2=null
set OO001IO=null
set OO0011O=null
return false
endfunction
function OO0100O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO
call I10I1O(t)
call SuspendTimeOfDay(true)
set IOI1OO=GetRandomInt(1,2)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,"")
if IOI1OO==1 then
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,"The"+O0O[GetPlayerId(III0[0])]+"Sentinel|r will now begin the 1-2-2-2-2-1 draft.")
else
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,"The"+O0O[GetPlayerId(II10[0])]+"Scourge|r will now begin the 1-2-2-2-2-1 draft.")
endif
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,"")
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,20,true)
call TriggerAddCondition(t,Condition(function OO010OO))
call IIO00O(I1I0IO,"Iteration",0)
call OO01O1O()
call TriggerEvaluate(t)
set t=null
return false
endfunction
function OO0OIOO takes nothing returns nothing
local trigger t
local integer x=1
set IOI1IO=true
set OO10O=false
set OO1OO=false
call III0IO(1211117651)
call III0IO(1211117649)
call III0IO(1160786265)
call III0IO(1211117641)
call III0IO(1311781207)
call III0IO(1311780946)
call III0IO(1211117650)
call III0IO(1211117646)
call III0IO(1311780930)
call DisableTrigger(I0100)
set IOI10O[GetPlayerId(III0[1])]=GetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD)+120
set IOI10O[GetPlayerId(III0[2])]=GetPlayerState(III0[2],PLAYER_STATE_RESOURCE_GOLD)+120
set IOI10O[GetPlayerId(III0[3])]=GetPlayerState(III0[3],PLAYER_STATE_RESOURCE_GOLD)+120
set IOI10O[GetPlayerId(III0[4])]=GetPlayerState(III0[4],PLAYER_STATE_RESOURCE_GOLD)+120
set IOI10O[GetPlayerId(III0[5])]=GetPlayerState(III0[5],PLAYER_STATE_RESOURCE_GOLD)+120
set IOI10O[GetPlayerId(II10[1])]=GetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD)+120
set IOI10O[GetPlayerId(II10[2])]=GetPlayerState(II10[2],PLAYER_STATE_RESOURCE_GOLD)+120
set IOI10O[GetPlayerId(II10[3])]=GetPlayerState(II10[3],PLAYER_STATE_RESOURCE_GOLD)+120
set IOI10O[GetPlayerId(II10[4])]=GetPlayerState(II10[4],PLAYER_STATE_RESOURCE_GOLD)+120
set IOI10O[GetPlayerId(II10[5])]=GetPlayerState(II10[5],PLAYER_STATE_RESOURCE_GOLD)+120
call SetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(III0[2],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(III0[3],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(III0[4],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(III0[5],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(II10[2],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(II10[3],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(II10[4],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(II10[5],PLAYER_STATE_RESOURCE_GOLD,0)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,15-TimerGetElapsed(I1O),false)
call TriggerAddCondition(t,Condition(function OO0100O))
set t=null
endfunction
function OO010IO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer OO1100=GetTriggerEvalCount(t)
local integer O101O0=20-(OO1100-(OO1100/ 20)*20)
call LeaderboardSetLabel(IO100O,"Time Remaining:"+I2S(O101O0))
if OO1100>125 then
call DestroyLeaderboard(IO100O)
call OOOIIOO()
call I10I1O(t)
endif
set t=null
return false
endfunction
function OO0101O takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function OO010IO))
set IO100O=CreateLeaderboard()
call LeaderboardSetStyle(IO100O,true,false,false,false)
call LeaderboardDisplay(IO100O,false)
call PlayerSetLeaderboard(III0[1],IO100O)
call PlayerSetLeaderboard(III0[2],IO100O)
call PlayerSetLeaderboard(III0[3],IO100O)
call PlayerSetLeaderboard(III0[4],IO100O)
call PlayerSetLeaderboard(III0[5],IO100O)
call PlayerSetLeaderboard(II10[1],IO100O)
call PlayerSetLeaderboard(II10[2],IO100O)
call PlayerSetLeaderboard(II10[3],IO100O)
call PlayerSetLeaderboard(II10[4],IO100O)
call PlayerSetLeaderboard(II10[5],IO100O)
set t=null
endfunction
function OO01IOO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer OO0010O=II000O(I1I0IO,"Iteration")
local player p1
local player p2
local player OO001IO
local player OO0011O
if OO0010O==0 then
if IO1O0O==1 then
set p1=III0[1]
else
set p1=II10[1]
endif
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IO1OIO[GetPlayerId(p1)])
if GetLocalPlayer()==p1 then
call LeaderboardDisplay(IO100O,true)
else
call LeaderboardDisplay(IO100O,false)
endif
elseif OO0010O==1 then
if IO1O0O==1 then
set p1=II10[1]
set p2=II10[2]
set OO001IO=III0[1]
else
set p1=III0[1]
set p2=III0[2]
set OO001IO=II10[1]
endif
call IIIIOO(OO001IO)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p2)]+I10OIO(p2)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IO1OIO[GetPlayerId(p1)])
call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,IO1OIO[GetPlayerId(p2)])
if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 then
call LeaderboardDisplay(IO100O,true)
else
call LeaderboardDisplay(IO100O,false)
endif
elseif OO0010O==2 then
if IO1O0O==1 then
set p1=III0[2]
set p2=III0[3]
set OO001IO=II10[1]
set OO0011O=II10[2]
else
set p1=II10[2]
set p2=II10[3]
set OO001IO=III0[1]
set OO0011O=III0[2]
endif
call IIIIOO(OO001IO)
call IIIIOO(OO0011O)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p2)]+I10OIO(p2)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IO1OIO[GetPlayerId(p1)])
call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,IO1OIO[GetPlayerId(p2)])
if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 then
call LeaderboardDisplay(IO100O,true)
else
call LeaderboardDisplay(IO100O,false)
endif
elseif OO0010O==3 then
if IO1O0O==1 then
set p1=II10[3]
set p2=II10[4]
set OO001IO=III0[2]
set OO0011O=III0[3]
else
set p1=III0[3]
set p2=III0[4]
set OO001IO=II10[2]
set OO0011O=II10[3]
endif
call IIIIOO(OO001IO)
call IIIIOO(OO0011O)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p2)]+I10OIO(p2)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IO1OIO[GetPlayerId(p1)])
call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,IO1OIO[GetPlayerId(p2)])
if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 then
call LeaderboardDisplay(IO100O,true)
else
call LeaderboardDisplay(IO100O,false)
endif
elseif OO0010O==4 then
if IO1O0O==1 then
set p1=III0[4]
set p2=III0[5]
set OO001IO=II10[3]
set OO0011O=II10[4]
else
set p1=II10[4]
set p2=II10[5]
set OO001IO=III0[3]
set OO0011O=III0[4]
endif
call IIIIOO(OO001IO)
call IIIIOO(OO0011O)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p2)]+I10OIO(p2)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IO1OIO[GetPlayerId(p1)])
call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,IO1OIO[GetPlayerId(p2)])
if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 then
call LeaderboardDisplay(IO100O,true)
else
call LeaderboardDisplay(IO100O,false)
endif
elseif OO0010O==5 then
if IO1O0O==1 then
set p1=II10[5]
set OO001IO=III0[4]
set OO0011O=III0[5]
else
set p1=III0[5]
set OO001IO=II10[4]
set OO0011O=II10[5]
endif
call IIIIOO(OO001IO)
call IIIIOO(OO0011O)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,O0O[GetPlayerId(p1)]+I10OIO(p1)+"|r has 20 seconds to pick a hero.")
call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IO1OIO[GetPlayerId(p1)])
if GetLocalPlayer()==p1 then
call LeaderboardDisplay(IO100O,true)
else
call LeaderboardDisplay(IO100O,false)
endif
elseif OO0010O==6 then
if IO1O0O==1 then
set OO001IO=II10[5]
else
set OO001IO=III0[5]
endif
call IIIIOO(OO001IO)
call LeaderboardDisplay(IO100O,false)
call EnableTrigger(I0100)
call SuspendTimeOfDay(false)
endif
if OO0010O>6 then
set IO10OO=true
call I0111O(I1I0IO)
call I10I1O(t)
else
call IIO00O(I1I0IO,"Iteration",OO0010O+1)
endif
set t=null
set p1=null
set p2=null
set OO001IO=null
set OO0011O=null
return false
endfunction
function OO01I0O takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local trigger OO01IIO=IIO11O(I1I0IO,"DropHeroTrig")
call I10I1O(OO01IIO)
call I0111O(I1I0IO)
call I10I1O(t)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,20,true)
call TriggerAddCondition(t,Condition(function OO01IOO))
call IIO00O(I1I0IO,"Iteration",0)
call SetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD,0)
call EnableTrigger(O101IO)
call EnableTrigger(O1010O)
set IO1O0O=GetRandomInt(1,2)
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,"")
if IO1O0O==1 then
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,"Hero removal phase has ended.The"+O0O[GetPlayerId(III0[0])]+"Sentinel|r will now begin the 1-2-2-2-2-1 draft.")
else
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,"Hero removal phase has ended.The"+O0O[GetPlayerId(II10[0])]+"Scourge|r will now begin the 1-2-2-2-2-1 draft.")
endif
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,"")
call OO0101O()
call TriggerEvaluate(t)
set t=null
set OO01IIO=null
endfunction
function OO01I1O takes nothing returns boolean
local unit I1IIIO=GetSoldUnit()
local string OO011OO=O0O[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+I10OIO(GetOwningPlayer(GetSoldUnit()))+"|r"
call OOI110(bj_FORCE_ALL_PLAYERS,15,OO011OO+"has removed"+GetUnitName(I1IIIO)+"from the available hero pool.")
call III0IO(GetUnitTypeId(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
set I1IIIO=null
return false
endfunction
function OO0110O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local trigger OO01IIO=CreateTrigger()
local string I1I0IO
local string OO011IO=O0O[GetPlayerId(III0[1])]+I10OIO(III0[1])+"|r"
local string OO0111O=O0O[GetPlayerId(II10[1])]+I10OIO(II10[1])+"|r"
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,"")
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,OO011IO+"has 15 seconds to choose 3 heroes to remove from the pool.")
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,OO0111O+"has 15 seconds to choose 3 heroes to remove from the pool.")
call OOI110(bj_FORCE_ALL_PLAYERS,15.00,"")
call I10I1O(t)
call O0O100(OO01IIO,EVENT_PLAYER_UNIT_SELL)
call TriggerAddCondition(OO01IIO,Condition(function OO01I1O))
call SuspendTimeOfDay(true)
call DisableTrigger(O101IO)
call DisableTrigger(O1010O)
call SetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD,750)
call SetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD,750)
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"DropHeroTrig",OO01IIO)
call TriggerRegisterTimerEvent(t,15,false)
call TriggerAddCondition(t,Condition(function OO01I0O))
set OO01IIO=null
set t=null
return false
endfunction
function OO0OI0O takes nothing returns nothing
local trigger t
local location OOOO0IO=GetRectCenter(O1I0O)
local location OOOO01O=GetRectCenter(O1IIO)
local integer x=1
loop
exitwhen x>5
if II010O(III0[x])then
call CreateUnitAtLoc(III0[x],1848651843,OOOO01O,bj_UNIT_FACING)
endif
if II010O(II10[x])then
call CreateUnitAtLoc(II10[x],1848651843,OOOO0IO,bj_UNIT_FACING)
endif
set x=x+1
endloop
call RemoveLocation(OOOO0IO)
call RemoveLocation(OOOO01O)
set IO1O1O=true
set OO10O=false
set OO1OO=false
call III0IO(1211117651)
call III0IO(1211117649)
call III0IO(1160786265)
call III0IO(1211117641)
call III0IO(1311781207)
call III0IO(1311780946)
call III0IO(1211117650)
call III0IO(1211117646)
call III0IO(1311780930)
call DisableTrigger(I0100)
set IO1OIO[GetPlayerId(III0[1])]=GetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD)+120
set IO1OIO[GetPlayerId(III0[2])]=GetPlayerState(III0[2],PLAYER_STATE_RESOURCE_GOLD)+120
set IO1OIO[GetPlayerId(III0[3])]=GetPlayerState(III0[3],PLAYER_STATE_RESOURCE_GOLD)+120
set IO1OIO[GetPlayerId(III0[4])]=GetPlayerState(III0[4],PLAYER_STATE_RESOURCE_GOLD)+120
set IO1OIO[GetPlayerId(III0[5])]=GetPlayerState(III0[5],PLAYER_STATE_RESOURCE_GOLD)+120
set IO1OIO[GetPlayerId(II10[1])]=GetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD)+120
set IO1OIO[GetPlayerId(II10[2])]=GetPlayerState(II10[2],PLAYER_STATE_RESOURCE_GOLD)+120
set IO1OIO[GetPlayerId(II10[3])]=GetPlayerState(II10[3],PLAYER_STATE_RESOURCE_GOLD)+120
set IO1OIO[GetPlayerId(II10[4])]=GetPlayerState(II10[4],PLAYER_STATE_RESOURCE_GOLD)+120
set IO1OIO[GetPlayerId(II10[5])]=GetPlayerState(II10[5],PLAYER_STATE_RESOURCE_GOLD)+120
call SetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(III0[2],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(III0[3],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(III0[4],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(III0[5],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(II10[2],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(II10[3],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(II10[4],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(II10[5],PLAYER_STATE_RESOURCE_GOLD,0)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,15-TimerGetElapsed(I1O),false)
call TriggerAddCondition(t,Condition(function OO0110O))
set t=null
set OOOO0IO=null
set OOOO01O=null
endfunction
function OOIOOOO takes nothing returns boolean
local player II01IO
set O0O1O=true
set II01IO=III0[1]
if II011O(II01IO)==false and OO11O[GetPlayerId(II01IO)]==false then
call I1O0IO(II01IO)
endif
set II01IO=III0[2]
if II011O(II01IO)==false and OO11O[GetPlayerId(II01IO)]==false then
call I1O0IO(II01IO)
endif
set II01IO=III0[3]
if II011O(II01IO)==false and OO11O[GetPlayerId(II01IO)]==false then
call I1O0IO(II01IO)
endif
set II01IO=III0[4]
if II011O(II01IO)==false and OO11O[GetPlayerId(II01IO)]==false then
call I1O0IO(II01IO)
endif
set II01IO=III0[5]
if II011O(II01IO)==false and OO11O[GetPlayerId(II01IO)]==false then
call I1O0IO(II01IO)
endif
set II01IO=II10[1]
if II011O(II01IO)==false and OO11O[GetPlayerId(II01IO)]==false then
call I1O0IO(II01IO)
endif
set II01IO=II10[2]
if II011O(II01IO)==false and OO11O[GetPlayerId(II01IO)]==false then
call I1O0IO(II01IO)
endif
set II01IO=II10[3]
if II011O(II01IO)==false and OO11O[GetPlayerId(II01IO)]==false then
call I1O0IO(II01IO)
endif
set II01IO=II10[4]
if II011O(II01IO)==false and OO11O[GetPlayerId(II01IO)]==false then
call I1O0IO(II01IO)
endif
set II01IO=II10[5]
if II011O(II01IO)==false and OO11O[GetPlayerId(II01IO)]==false then
call I1O0IO(II01IO)
endif
return false
endfunction
function OOIOO0O takes nothing returns boolean
set OO1OO=false
set OO10O=false
call IIII1O()
return false
endfunction
function OO0O01O takes nothing returns nothing
local string I1I0IO="Global|ReverseMode"
local player array OO0II1O
local player array OO0I1OO
local integer x=0
local integer y=0
local integer i=0
local trigger t=CreateTrigger()
set OO1IO=true
call TriggerAddCondition(t,Condition(function OOIOOOO))
call TriggerRegisterTimerEvent(t,60-TimerGetElapsed(I1O),false)
set t=CreateTrigger()
call TriggerAddCondition(t,Condition(function OOIOO0O))
call TriggerRegisterTimerEvent(t,57-TimerGetElapsed(I1O),false)
set t=null
if II010O(III0[1])then
set x=x+1
set OO0II1O[x]=III0[1]
endif
if II010O(III0[2])then
set x=x+1
set OO0II1O[x]=III0[2]
endif
if II010O(III0[3])then
set x=x+1
set OO0II1O[x]=III0[3]
endif
if II010O(III0[4])then
set x=x+1
set OO0II1O[x]=III0[4]
endif
if II010O(III0[5])then
set x=x+1
set OO0II1O[x]=III0[5]
endif
if II010O(II10[1])then
set y=y+1
set OO0I1OO[y]=II10[1]
endif
if II010O(II10[2])then
set y=y+1
set OO0I1OO[y]=II10[2]
endif
if II010O(II10[3])then
set y=y+1
set OO0I1OO[y]=II10[3]
endif
if II010O(II10[4])then
set y=y+1
set OO0I1OO[y]=II10[4]
endif
if II010O(II10[5])then
set y=y+1
set OO0I1OO[y]=II10[5]
endif
set i=1
loop
exitwhen i>x
call IIOOIO(I1I0IO,I10OIO(OO0II1O[i]),OO0I1OO[i])
call IIOOIO(I1I0IO,I10OIO(OO0I1OO[i]),OO0II1O[i])
set i=i+1
endloop
endfunction
function OOIOOIO takes nothing returns nothing
call OO0OI0(GetEnumUnit())
endfunction
function OOIOO1O takes unit I1IIIO returns nothing
local integer OOIO0OO=GetPlayerId(GetOwningPlayer(I1IIIO))
set OIOI[OOIO0OO]=UnitItemInSlot(I1IIIO,0)
set OI0I[OOIO0OO]=UnitItemInSlot(I1IIIO,1)
set OIII[OOIO0OO]=UnitItemInSlot(I1IIIO,2)
set OI1I[OOIO0OO]=UnitItemInSlot(I1IIIO,3)
set O1OI[OOIO0OO]=UnitItemInSlot(I1IIIO,4)
set O10I[OOIO0OO]=UnitItemInSlot(I1IIIO,5)
endfunction
function OOIO00O takes player I1OI1O,player I1O1OO returns integer
local unit OOIO0IO=OI10[GetPlayerId(I1OI1O)]
local unit OOIO01O=OI10[GetPlayerId(I1O1OO)]
call UnitRemoveBuffs(OOIO0IO,true,true)
call UnitRemoveBuffs(OOIO01O,true,true)
if OOIO0IO==null and OOIO01O==null then
call OOI110(bj_FORCE_ALL_PLAYERS,15,O0O[GetPlayerId(III0[0])]+I10OIO(I1OI1O)+"and"+I10OIO(I1O1OO)+"did not pick a hero so they have no hero to be assigned.|r")
elseif GetRandomInt(1,2)==1 then
if(OOIO0IO!=null)then
return GetUnitTypeId(OOIO0IO)
else
return GetUnitTypeId(OOIO01O)
endif
else
if(OOIO01O!=null)then
return GetUnitTypeId(OOIO01O)
else
return GetUnitTypeId(OOIO0IO)
endif
endif
call OOI110(bj_FORCE_ALL_PLAYERS,15,O0O[GetPlayerId(III0[0])]+I10OIO(I1OI1O)+"and"+I10OIO(I1O1OO)+"have not picked a hero.They will be given a random hero!")
return II100O()
endfunction
function OOIOIOO takes nothing returns nothing
if(GetUnitTypeId(GetEnumUnit())==1848651828)then
call RemoveUnit(GetEnumUnit())
endif
if(GetUnitTypeId(GetEnumUnit())==1865429043)then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function OOIOI0O takes nothing returns nothing
local integer IIII0O
local group OOIOIIO=CreateGroup()
local unit OOIOI1O
local location OO0I0IO=GetRectCenter(OI01O)
local location OO0I01O=GetRectCenter(OIOOO)
local integer OOIO1OO=IIIO0O(IIO0)
local player array OOIO10O
local player array OOIO1IO
local integer x
local integer y
local real OOIO11O
local real OOI0OOO
local real OOI0O0O
local integer OOI0OIO
local group II1O0O=I0I0OO(GetWorldBounds(),null)
call ForGroup(II1O0O,function OOIOIOO)
call DestroyGroup(II1O0O)
set IIII0O=1
set x=1
set y=1
loop
exitwhen IIII0O>5
if(II010O(III0[IIII0O]))then
call OOIOO1O(OI10[GetPlayerId(III0[IIII0O])])
call GroupAddUnit(OOIOIIO,OI10[GetPlayerId(III0[IIII0O])])
set OOIO10O[x]=III0[IIII0O]
set x=x+1
endif
if(II010O(II10[IIII0O]))then
call OOIOO1O(OI10[GetPlayerId(II10[IIII0O])])
call GroupAddUnit(OOIOIIO,OI10[GetPlayerId(II10[IIII0O])])
set OOIO1IO[y]=II10[IIII0O]
set y=y+1
endif
set IIII0O=IIII0O+1
endloop
set x=1
loop
exitwhen x>OOIO1OO
set OOI0OIO=OOIO00O(OOIO10O[x],OOIO1IO[x])
if(OI10[GetPlayerId(OOIO10O[x])]==null)then
set OOIO11O=GetLocationX(OO0I0IO)+GetRandomReal(1,40)
set OOI0OOO=GetLocationY(OO0I0IO)+GetRandomReal(1,40)
set OOI0O0O=270
else
set OOIO11O=GetUnitX(OI10[GetPlayerId(OOIO10O[x])])
set OOI0OOO=GetUnitY(OI10[GetPlayerId(OOIO10O[x])])
set OOI0O0O=GetUnitFacing(OI10[GetPlayerId(OOIO10O[x])])
call SetUnitPathing(OI10[GetPlayerId(OOIO10O[x])],false)
endif
set OI10[GetPlayerId(OOIO10O[x])]=CreateUnit(OOIO10O[x],OOI0OIO,OOIO11O,OOI0OOO,OOI0O0O)
call SetUnitPathing(OI10[GetPlayerId(OOIO10O[x])],false)
call SetUnitPosition(OI10[GetPlayerId(OOIO10O[x])],OOIO11O,OOI0OOO)
call UnitAddItem(OI10[GetPlayerId(OOIO10O[x])],OIOI[GetPlayerId(OOIO10O[x])])
call UnitAddItem(OI10[GetPlayerId(OOIO10O[x])],OI0I[GetPlayerId(OOIO10O[x])])
call UnitAddItem(OI10[GetPlayerId(OOIO10O[x])],OIII[GetPlayerId(OOIO10O[x])])
call UnitAddItem(OI10[GetPlayerId(OOIO10O[x])],OI1I[GetPlayerId(OOIO10O[x])])
call UnitAddItem(OI10[GetPlayerId(OOIO10O[x])],O1OI[GetPlayerId(OOIO10O[x])])
call UnitAddItem(OI10[GetPlayerId(OOIO10O[x])],O10I[GetPlayerId(OOIO10O[x])])
call ClearSelectionForPlayer(OOIO10O[x])
call SelectUnitAddForPlayer(OI10[GetPlayerId(OOIO10O[x])],OOIO10O[x])
call PanCameraToTimedForPlayer(OOIO10O[x],OOIO11O,OOI0OOO,0)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Awaken\\Awaken.mdl",OOIO11O,OOI0OOO))
if(OI10[GetPlayerId(OOIO1IO[x])]==null)then
set OOIO11O=GetLocationX(OO0I01O)
set OOI0OOO=GetLocationY(OO0I01O)
set OOI0O0O=270
else
set OOIO11O=GetUnitX(OI10[GetPlayerId(OOIO1IO[x])])
set OOI0OOO=GetUnitY(OI10[GetPlayerId(OOIO1IO[x])])
set OOI0O0O=GetUnitFacing(OI10[GetPlayerId(OOIO1IO[x])])
call SetUnitPathing(OI10[GetPlayerId(OOIO1IO[x])],false)
endif
set OI10[GetPlayerId(OOIO1IO[x])]=CreateUnit(OOIO1IO[x],OOI0OIO,OOIO11O,OOI0OOO,OOI0O0O)
call SetUnitPathing(OI10[GetPlayerId(OOIO1IO[x])],false)
call SetUnitPosition(OI10[GetPlayerId(OOIO1IO[x])],OOIO11O,OOI0OOO)
call UnitAddItem(OI10[GetPlayerId(OOIO1IO[x])],OIOI[GetPlayerId(OOIO1IO[x])])
call UnitAddItem(OI10[GetPlayerId(OOIO1IO[x])],OI0I[GetPlayerId(OOIO1IO[x])])
call UnitAddItem(OI10[GetPlayerId(OOIO1IO[x])],OIII[GetPlayerId(OOIO1IO[x])])
call UnitAddItem(OI10[GetPlayerId(OOIO1IO[x])],OI1I[GetPlayerId(OOIO1IO[x])])
call UnitAddItem(OI10[GetPlayerId(OOIO1IO[x])],O1OI[GetPlayerId(OOIO1IO[x])])
call UnitAddItem(OI10[GetPlayerId(OOIO1IO[x])],O10I[GetPlayerId(OOIO1IO[x])])
call ClearSelectionForPlayer(OOIO1IO[x])
call SelectUnitAddForPlayer(OI10[GetPlayerId(OOIO1IO[x])],OOIO1IO[x])
call PanCameraToTimedForPlayer(OOIO1IO[x],OOIO11O,OOI0OOO,0)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Awaken\\Awaken.mdl",OOIO11O,OOI0OOO))
set x=x+1
endloop
call ForGroup(OOIOIIO,function OOIOOIO)
call DestroyGroup(OOIOIIO)
set x=1
loop
exitwhen x>OOIO1OO
call SetUnitPathing(OI10[GetPlayerId(OOIO10O[x])],true)
call SetUnitPathing(OI10[GetPlayerId(OOIO1IO[x])],true)
set x=x+1
endloop
call RemoveLocation(OO0I0IO)
call RemoveLocation(OO0I01O)
set OOIOIIO=null
set OOIOI1O=null
set OO0I0IO=null
set OO0I01O=null
set II1O0O=null
endfunction
function OOI0O1O takes nothing returns boolean
set I00I=true
return false
endfunction
function OOI00OO takes nothing returns boolean
set OO10O=false
set OO1OO=false
call IIII1O()
return false
endfunction
function OOO110O takes nothing returns nothing
local trigger t=CreateTrigger()
call OOI110(OOIOO,10,"Your hero might change at the 60 second mark.")
call OOI110(OOIOO,10,"It is recommended to not purchase items until then.")
set I0II=true
call III0IO(1211117641)
call TriggerRegisterTimerEvent(t,60-TimerGetElapsed(I1O),false)
call TriggerAddCondition(t,Condition(function OOIOI0O))
set t=CreateTrigger()
call TriggerAddCondition(t,Condition(function OOI00OO))
call TriggerRegisterTimerEvent(t,57-TimerGetElapsed(I1O),false)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,55+60-TimerGetElapsed(I1O),false)
call TriggerAddCondition(t,Condition(function OOI0O1O))
set t=null
endfunction
function OO0O0IO takes nothing returns nothing
local location OOOO0IO=GetRectCenter(OI10O)
local location OOOO01O=GetRectCenter(OI1OO)
local location OO0I0IO=GetRectCenter(OI01O)
local location OO0I01O=GetRectCenter(OIOOO)
local integer IIII0O
local integer IIIIIO
local integer II10IO
if not I01I then
call IIII1O()
endif
set OOI=true
set III=400
set OO1OO=false
call PanCameraToTimedLocForPlayer(III0[1],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(III0[2],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(III0[3],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(III0[4],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(III0[5],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(II10[1],OO0I01O,0)
call PanCameraToTimedLocForPlayer(II10[2],OO0I01O,0)
call PanCameraToTimedLocForPlayer(II10[3],OO0I01O,0)
call PanCameraToTimedLocForPlayer(II10[4],OO0I01O,0)
call PanCameraToTimedLocForPlayer(II10[5],OO0I01O,0)
if I1II then
if II0I0O(O0OI)then
loop
set II10IO=GetRandomInt(O1OIIO,O1OI1O)
exitwhen I[II10IO]==false
endloop
set OI10[GetPlayerId(O0OI)]=CreateUnit(O0OI,O1OIOO[II10IO],GetLocationX(OOOO0IO),GetLocationY(OOOO0IO),270)
else
loop
set II10IO=GetRandomInt(O1O1OO,O1O10O)
exitwhen I[II10IO]==false
endloop
set OI10[GetPlayerId(O0OI)]=CreateUnit(O0OI,O1OIOO[II10IO],GetLocationX(OOOO01O),GetLocationY(OOOO01O),270)
endif
call RemoveLocation(OOOO0IO)
call RemoveLocation(OOOO01O)
call RemoveLocation(OO0I0IO)
call RemoveLocation(OO0I01O)
return
endif
set OO10O=false
set IIII0O=1
set IIIIIO=5
loop
exitwhen IIII0O>IIIIIO
set OI10[GetPlayerId(III0[IIII0O])]=null
if(II010O(III0[IIII0O]))then
loop
set II10IO=GetRandomInt(O1OIIO,O1OI1O)
if(I[II10IO]==false)then
if not I01I then
set I[II10IO]=true
endif
set OI10[GetPlayerId(III0[IIII0O])]=CreateUnitAtLoc(III0[IIII0O],O1OIOO[II10IO],OOOO0IO,bj_UNIT_FACING)
endif
exitwhen(OI10[GetPlayerId(III0[IIII0O])]!=null)
endloop
endif
set IIII0O=IIII0O+1
endloop
set IIII0O=1
set IIIIIO=5
loop
exitwhen IIII0O>IIIIIO
set OI10[GetPlayerId(II10[IIII0O])]=null
if(II010O(II10[IIII0O]))then
loop
set II10IO=GetRandomInt(O1O1OO,O1O10O)
if(I[II10IO]==false)then
if not I01I then
set I[II10IO]=true
endif
set OI10[GetPlayerId(II10[IIII0O])]=CreateUnitAtLoc(II10[IIII0O],O1OIOO[II10IO],OOOO01O,bj_UNIT_FACING)
endif
exitwhen(OI10[GetPlayerId(II10[IIII0O])]!=null)
endloop
endif
set IIII0O=IIII0O+1
endloop
set OO10O=true
call RemoveLocation(OOOO0IO)
call RemoveLocation(OOOO01O)
call RemoveLocation(OO0I0IO)
call RemoveLocation(OO0I01O)
endfunction
function OOI000O takes nothing returns nothing
set IO10IO=true
call OOI110(bj_FORCE_ALL_PLAYERS,10,"No Deaths has been enabled.You will have no respawn time.")
call DisableTrigger(GetTriggeringTrigger())
endfunction
function OOI00IO takes nothing returns nothing
local integer OOI001O=S2I(SubString(GetEventPlayerChatString(),6,StringLength(GetEventPlayerChatString())))
if OOI001O>IO101O then
call I11I1O(O0OI,"Too many lives")
elseif OOI001O<10 then
call I11I1O(O0OI,"Too few lives")
else
set IO101O=OOI001O
call OOI110(bj_FORCE_ALL_PLAYERS,10,"Each team has"+I2S(IO101O)+"lives before they lose the game.")
call DisableTrigger(GetTriggeringTrigger())
endif
endfunction
function OOI0IOO takes nothing returns nothing
call DisableTrigger(IIO11O(I011OO(GetTriggeringTrigger()),"nd"))
call DisableTrigger(IIO11O(I011OO(GetTriggeringTrigger()),"lives"))
call DisableTrigger(GetTriggeringTrigger())
endfunction
function OOI0I0O takes nothing returns nothing
local trigger OOI0IIO=CreateTrigger()
local trigger OOI0I1O=CreateTrigger()
local trigger nd=CreateTrigger()
set IO101O=OO0II0(O1OI1O,O1O10O-O1O1OO+1)
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"")
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"Extra commands:-nd and-lives xx can be entered in the following 15 seconds.")
call OOI110(bj_FORCE_ALL_PLAYERS,10.00,"Current DM lives are"+I2S(IO101O))
call TriggerRegisterTimerEvent(OOI0IIO,15,false)
call TriggerAddAction(OOI0IIO,function OOI0IOO)
call IIOOIO(I011OO(OOI0IIO),"nd",nd)
call IIOOIO(I011OO(OOI0IIO),"lives",OOI0I1O)
call TriggerRegisterPlayerChatEvent(nd,O0OI,"-nd",true)
call TriggerAddAction(nd,function OOI000O)
call TriggerRegisterPlayerChatEvent(OOI0I1O,O0OI,"-lives",false)
call TriggerAddAction(OOI0I1O,function OOI00IO)
endfunction
function OOI01OO takes nothing returns nothing
local integer OOI010O=II000O(I011OO(GetTriggeringTrigger()),"PlayerId")
local integer IIII0O
local integer IIIIIO
local integer II10IO
local integer OO0I00O
local location OOOO0IO=GetRectCenter(OI10O)
local location OOOO01O=GetRectCenter(OI1OO)
if OOI0O then
return
endif
if II0I0O(Player(OOI010O))then
set IIII0O=O1OIIO
set IIIIIO=O1OI1O
set OO0I00O=0
else
set IIII0O=O1O1OO
set IIIIIO=O1O10O
set OO0I00O=1
endif
if O0I then
set IIII0O=O1OIIO
set IIIIIO=O1O10O
if II0I0O(Player(OOI010O))then
call CreateUnitAtLoc(Player(OOI010O),1848651843,OOOO01O,bj_UNIT_FACING)
else
call CreateUnitAtLoc(Player(OOI010O),1848651843,OOOO0IO,bj_UNIT_FACING)
endif
endif
if not I10 then
loop
exitwhen IIII0O>IIIIIO
if I[IIII0O]==false then
call SetPlayerTechMaxAllowed(Player(OOI010O),O1OIOO[IIII0O],1)
endif
set IIII0O=IIII0O+1
endloop
if(GetPlayerState(Player(OOI010O),PLAYER_STATE_RESOURCE_GOLD)<250)then
call SetPlayerState(Player(OOI010O),PLAYER_STATE_RESOURCE_GOLD,250)
endif
elseif(IOO0[OO0I00O]<IO101O)then
set OI10[OOI010O]=null
if II010O(Player(OOI010O))then
loop
set II10IO=II100O()
if I[II10IO]==false then
set I[II10IO]=true
if II0I0O(Player(OOI010O))then
set OI10[OOI010O]=CreateUnitAtLoc(Player(OOI010O),O1OIOO[II10IO],OOOO0IO,bj_UNIT_FACING)
else
set OI10[OOI010O]=CreateUnitAtLoc(Player(OOI010O),O1OIOO[II10IO],OOOO01O,bj_UNIT_FACING)
endif
endif
exitwhen OI10[OOI010O]!=null
endloop
endif
endif
call RemoveLocation(OOOO0IO)
call RemoveLocation(OOOO01O)
if not I10 then
endif
endfunction
function OOO11OO takes nothing returns nothing
local location O000OI
local real Facing
local trigger t
local integer OOI01IO
local integer x
set II0=true
call III0IO(1211117641)
set x=1
loop
exitwhen x>5
set OOI01IO=GetPlayerId(III0[x])
set t=CreateTrigger()
call TriggerRegisterTimerExpireEvent(t,I0O[OOI01IO])
call TriggerAddAction(t,function OOI01OO)
call IIO00O(I011OO(t),"PlayerId",OOI01IO)
set OOI01IO=GetPlayerId(II10[x])
set t=CreateTrigger()
call TriggerRegisterTimerExpireEvent(t,I0O[OOI01IO])
call TriggerAddAction(t,function OOI01OO)
call IIO00O(I011OO(t),"PlayerId",OOI01IO)
set x=x+1
endloop
call UnitRemoveAbility(O1000O,1096906593)
call UnitRemoveAbility(O100IO,1096906593)
call UnitRemoveAbility(O1001O,1096906593)
call UnitRemoveAbility(O10IOO,1096906593)
call UnitRemoveAbility(O10I0O,1096906593)
call UnitRemoveAbility(O10IIO,1096906593)
call UnitRemoveAbility(O10I1O,1096906593)
call UnitRemoveAbility(O101OO,1096906593)
call ExecuteFunc("OOI0I0O")
endfunction
function OO0OI1O takes nothing returns nothing
local integer OOI011O=GetRandomInt(1,4)
set IIOI=true
if(OOI011O==1)then
call OOI110(bj_FORCE_ALL_PLAYERS,20.00,"AP has been randomly selected as your mode!")
call OOI110(bj_FORCE_ALL_PLAYERS,20.00,"")
call ExecuteFunc("OO0O00O")
endif
if(OOI011O==2)then
call OOI110(bj_FORCE_ALL_PLAYERS,20.00,"AR has been randomly selected as your mode!")
call OOI110(bj_FORCE_ALL_PLAYERS,20.00,"")
call ExecuteFunc("OO0OO1O")
endif
if(OOI011O==3)then
call OOI110(bj_FORCE_ALL_PLAYERS,20.00,"TR has been randomly selected as your mode!")
call OOI110(bj_FORCE_ALL_PLAYERS,20.00,"")
call ExecuteFunc("OO0O0IO")
endif
if(OOI011O==4)then
call OOI110(bj_FORCE_ALL_PLAYERS,20.00,"Normal has been randomly selected as your mode!")
call OOI110(bj_FORCE_ALL_PLAYERS,20.00,"")
endif
endfunction
function OO0OOIO takes nothing returns nothing
set I01I=true
call III0IO(1211117641)
endfunction
function OOO1I1O takes nothing returns nothing
local integer O1OO00=IIIO0O(IIO0)
local integer O1OOO0=IIIO0O(II00)
local integer OOIO10=O1OO00+O1OOO0
local integer IIII0O
local integer OOIIOOO
local integer x
local integer y
local integer z
local player array OOIIO0O
local player array OOIIOIO
local integer w
local integer OOIIO1O
local integer OOII0OO
local location OO0I0IO=GetRectCenter(OI01O)
local location OO0I01O=GetRectCenter(OIOOO)
set I1I0=true
set OOIIO1O=GetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(III0[2],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(III0[3],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(III0[4],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(III0[5],PLAYER_STATE_RESOURCE_GOLD)
set OOII0OO=GetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(II10[2],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(II10[3],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(II10[4],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(II10[5],PLAYER_STATE_RESOURCE_GOLD)
set OOIIO0O[1]=null
set OOIIO0O[2]=null
set OOIIO0O[3]=null
set OOIIO0O[4]=null
set OOIIO0O[5]=null
set OOIIO0O[6]=null
set OOIIO0O[7]=null
set OOIIO0O[8]=null
set OOIIO0O[9]=null
set OOIIO0O[10]=null
set z=1
set w=1
set IIII0O=1
loop
exitwhen IIII0O>5
if(II010O(III0[IIII0O]))then
set OOIIO0O[w]=III0[IIII0O]
set w=w+1
else
set OOIIOIO[z]=III0[IIII0O]
set z=z+1
endif
set IIII0O=IIII0O+1
endloop
set IIII0O=1
loop
exitwhen IIII0O>5
if(II010O(II10[IIII0O]))then
set OOIIO0O[w]=II10[IIII0O]
set w=w+1
else
set OOIIOIO[z]=II10[IIII0O]
set z=z+1
endif
set IIII0O=IIII0O+1
endloop
set III0[1]=null
set III0[2]=null
set III0[3]=null
set III0[4]=null
set III0[5]=null
set II10[1]=null
set II10[2]=null
set II10[3]=null
set II10[4]=null
set II10[5]=null
set IIII0O=1
loop
exitwhen IIII0O>(OOIO10/ 2)
set OOIIOOO=GetRandomInt(1,OOIO10)
if(OOIIO0O[OOIIOOO]!=null)then
set III0[IIII0O]=OOIIO0O[OOIIOOO]
set OOIIO0O[OOIIOOO]=null
set IIII0O=IIII0O+1
endif
endloop
set x=IIII0O
set IIII0O=1
loop
exitwhen IIII0O>OOIO10-x+1
set OOIIOOO=GetRandomInt(1,OOIO10)
if(OOIIO0O[OOIIOOO]!=null)then
set II10[IIII0O]=OOIIO0O[OOIIOOO]
set OOIIO0O[OOIIOOO]=null
set IIII0O=IIII0O+1
endif
endloop
set z=IIII0O
set IIII0O=x
set y=1
loop
exitwhen IIII0O>5
set III0[IIII0O]=OOIIOIO[y]
set y=y+1
set IIII0O=IIII0O+1
endloop
set IIII0O=z
loop
exitwhen IIII0O>5
set II10[IIII0O]=OOIIOIO[y]
set y=y+1
set IIII0O=IIII0O+1
endloop
set IIII0O=0
loop
exitwhen IIII0O>5
set IIII0O=IIII0O+1
endloop
call SetPlayerTeam(III0[0],0)
call SetPlayerTeam(III0[1],0)
call SetPlayerTeam(III0[2],0)
call SetPlayerTeam(III0[3],0)
call SetPlayerTeam(III0[4],0)
call SetPlayerTeam(III0[5],0)
call SetPlayerTeam(II10[0],1)
call SetPlayerTeam(II10[1],1)
call SetPlayerTeam(II10[2],1)
call SetPlayerTeam(II10[3],1)
call SetPlayerTeam(II10[4],1)
call SetPlayerTeam(II10[5],1)
call OI10I0()
set x=0
set y=0
loop
exitwhen x>5
loop
exitwhen y>5
call SetPlayerAllianceStateBJ(III0[x],III0[y],3)
call SetPlayerAllianceStateBJ(II10[x],II10[y],3)
call SetPlayerAllianceStateBJ(III0[x],II10[y],0)
call SetPlayerAllianceStateBJ(II10[x],III0[y],0)
set y=y+1
endloop
set y=0
set x=x+1
endloop
call ForceClear(IIO0)
call ForceClear(II00)
call ForceAddPlayer(IIO0,III0[0])
call ForceAddPlayer(IIO0,III0[1])
call ForceAddPlayer(IIO0,III0[2])
call ForceAddPlayer(IIO0,III0[3])
call ForceAddPlayer(IIO0,III0[4])
call ForceAddPlayer(IIO0,III0[5])
call ForceAddPlayer(II00,II10[0])
call ForceAddPlayer(II00,II10[1])
call ForceAddPlayer(II00,II10[2])
call ForceAddPlayer(II00,II10[3])
call ForceAddPlayer(II00,II10[4])
call ForceAddPlayer(II00,II10[5])
call ExecuteFunc("OI1010")
call TriggerExecute(I01I0)
set O1OO00=IIIO0O(IIO0)
set O1OOO0=IIIO0O(II00)
set IIII0O=1
loop
exitwhen IIII0O>5
if(II010O(III0[IIII0O]))then
call SetPlayerStateBJ(III0[IIII0O],PLAYER_STATE_RESOURCE_GOLD,(3500/ O1OO00))
call SetPlayerStateBJ(III0[IIII0O],PLAYER_STATE_RESOURCE_LUMBER,0)
endif
if(II010O(II10[IIII0O]))then
call SetPlayerStateBJ(II10[IIII0O],PLAYER_STATE_RESOURCE_GOLD,(3500/ O1OOO0))
call SetPlayerStateBJ(II10[IIII0O],PLAYER_STATE_RESOURCE_LUMBER,0)
endif
set IIII0O=IIII0O+1
endloop
call PanCameraToTimedLocForPlayer(III0[1],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(III0[2],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(III0[3],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(III0[4],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(III0[5],OO0I0IO,0)
call PanCameraToTimedLocForPlayer(II10[1],OO0I01O,0)
call PanCameraToTimedLocForPlayer(II10[2],OO0I01O,0)
call PanCameraToTimedLocForPlayer(II10[3],OO0I01O,0)
call PanCameraToTimedLocForPlayer(II10[4],OO0I01O,0)
call PanCameraToTimedLocForPlayer(II10[5],OO0I01O,0)
call DestroyFogModifier(CreateFogModifierRectBJ(true,III0[1],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,III0[2],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,III0[3],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,III0[4],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,III0[5],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,II10[1],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,II10[2],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,II10[3],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,II10[4],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,II10[5],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
if I0OI then
set x=0
loop
exitwhen x>5
call SetPlayerAlliance(Player(0),III0[x],ConvertAllianceType(0),true)
call SetPlayerAlliance(Player(0),III0[x],ConvertAllianceType(4),true)
call SetPlayerAlliance(Player(0),II10[x],ConvertAllianceType(0),false)
call SetPlayerAlliance(Player(0),II10[x],ConvertAllianceType(4),false)
set x=x+1
endloop
endif
call OI10O0()
endfunction
function OOII00O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer I1I1OO=II000O(I1I0IO,"HeroType")
local player II01IO
local integer x=1
loop
exitwhen x>5
set II01IO=III0[x]
if II010O(II01IO)and II01IO!=O0OI then
set OI10[GetPlayerId(II01IO)]=CreateUnit(II01IO,I1I1OO,GetRectCenterX(OI01O),GetRectCenterY(OI01O),270)
endif
set II01IO=II10[x]
if II010O(II01IO)and II01IO!=O0OI then
set OI10[GetPlayerId(II01IO)]=CreateUnit(II01IO,I1I1OO,GetRectCenterX(OIOOO),GetRectCenterY(OIOOO),270)
endif
set x=x+1
endloop
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set II01IO=null
return false
endfunction
function OOII0IO takes nothing returns nothing
local integer x=1
local player II01IO
local unit I1IIIO=GetTriggerUnit()
local integer I1I1OO=GetUnitTypeId(I1IIIO)
local trigger t
local string I1I0IO
if(GetOwningPlayer(I1IIIO)==O0OI and IsUnitType(I1IIIO,UNIT_TYPE_HERO)==true)then
call DisableTrigger(GetTriggeringTrigger())
if I0I[GetPlayerId(O0OI)]==false and I10==false and OOI==false then
call SetPlayerState(O0OI,PLAYER_STATE_RESOURCE_GOLD,250+GetPlayerState(O0OI,PLAYER_STATE_RESOURCE_GOLD))
endif
set OIO[GetPlayerId(O0OI)]=true
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,0.01,false)
call TriggerAddCondition(t,Condition(function OOII00O))
call IIO00O(I1I0IO,"HeroType",I1I1OO)
endif
set II01IO=null
set I1IIIO=null
set t=null
endfunction
function OOO11IO takes nothing returns nothing
local integer x=1
local trigger t=CreateTrigger()
local region r=CreateRegion()
set I1II=true
call III0IO(1211117641)
loop
exitwhen x>5
if(III0[x]!=O0OI)then
call IIIIOO(III0[x])
set I0I[GetPlayerId(III0[x])]=true
set OIO[GetPlayerId(III0[x])]=true
endif
if(II10[x]!=O0OI)then
call IIIIOO(II10[x])
set I0I[GetPlayerId(II10[x])]=true
set OIO[GetPlayerId(II10[x])]=true
endif
set x=x+1
endloop
call RegionAddRect(r,bj_mapInitialPlayableArea)
call TriggerRegisterEnterRegion(t,r,null)
call TriggerAddAction(t,function OOII0IO)
endfunction
function OOO111O takes nothing returns nothing
local integer IIII0O
local integer IIIIIO
set II0I=true
set IIII0O=1
set IIIIIO=O10O1O
loop
exitwhen IIII0O>IIIIIO
call III0IO(O10OIO[IIII0O])
set IIII0O=IIII0O+1
endloop
set IIII0O=1
set IIIIIO=O10O0O
loop
exitwhen IIII0O>IIIIIO
call III0IO(O10OOO[IIII0O])
set IIII0O=IIII0O+1
endloop
endfunction
function OO0OO0O takes nothing returns nothing
local integer IIII0O
local integer IIIIIO
set II1I=true
set IIII0O=1
set IIIIIO=O10O1O
loop
exitwhen IIII0O>IIIIIO
call III0IO(O10OIO[IIII0O])
set IIII0O=IIII0O+1
endloop
set IIII0O=1
set IIIIIO=O1O11O
loop
exitwhen IIII0O>IIIIIO
call III0IO(O1O1IO[IIII0O])
set IIII0O=IIII0O+1
endloop
endfunction
function OO0OOOO takes nothing returns nothing
local integer IIII0O
local integer IIIIIO
set IIII=true
set IIII0O=1
set IIIIIO=O1O11O
loop
exitwhen IIII0O>IIIIIO
call III0IO(O1O1IO[IIII0O])
set IIII0O=IIII0O+1
endloop
set IIII0O=1
set IIIIIO=O10O0O
loop
exitwhen IIII0O>IIIIIO
call III0IO(O10OOO[IIII0O])
set IIII0O=IIII0O+1
endloop
endfunction
function OO0O1OO takes nothing returns nothing
set OII=true
endfunction
function OOII01O takes nothing returns nothing
call SetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(III0[2],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[2],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(III0[3],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[3],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(III0[4],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[4],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(III0[5],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[5],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[2],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[2],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[3],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[3],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[4],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[4],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[5],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[5],PLAYER_STATE_RESOURCE_GOLD)+8)
endfunction
function OO0O11O takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,7,true)
call TriggerAddAction(t,function OOII01O)
set I1I=true
set IO1IOO=t
call SetPlayerTechResearched(III0[0],1378889780,1)
call SetPlayerTechResearched(II10[0],1378889780,1)
call SetPlayerHandicapXP(III0[1],1.5)
call SetPlayerHandicapXP(III0[2],1.5)
call SetPlayerHandicapXP(III0[3],1.5)
call SetPlayerHandicapXP(III0[4],1.5)
call SetPlayerHandicapXP(III0[5],1.5)
call SetPlayerHandicapXP(II10[1],1.5)
call SetPlayerHandicapXP(II10[2],1.5)
call SetPlayerHandicapXP(II10[3],1.5)
call SetPlayerHandicapXP(II10[4],1.5)
call SetPlayerHandicapXP(II10[5],1.5)
endfunction
function OO0O10O takes nothing returns nothing
set OOOO=true
call DisableTrigger(O0O0I)
endfunction
function OO0O1IO takes nothing returns nothing
set OO0O=true
call EnableTrigger(OOIOI)
endfunction
function OO00OOO takes nothing returns nothing
set IO1I0O=true
endfunction
function OO00O0O takes nothing returns nothing
set IO1IIO=true
endfunction
function OO00O1O takes nothing returns nothing
set IO1I1O=true
endfunction
function OO00OIO takes nothing returns nothing
set IO11OO=true
endfunction
function OO000OO takes nothing returns nothing
set IO110O=true
endfunction
function OO0000O takes nothing returns nothing
set IO11IO=true
endfunction
function OOIIIOO takes integer OOIII0O returns integer
if OOIII0O==1130656372 then
return 1130656372
endif
if OOIII0O==1130656356 then
return 1231643493
endif
if OOIII0O==1131833710 then
return 1232301687
endif
if OOIII0O==1130852979 then
return 1232301687
endif
if OOIII0O==1131181671 then
return 1232301687
endif
if OOIII0O==1517709678 then
return 1231317865
endif
if OOIII0O==1516399475 then
return 1231188849
endif
if OOIII0O==1315205732 then
return 1231188849
endif
return 0
endfunction
function OOIIIIO takes nothing returns nothing
local real OOIII1O=128
local real x
local real y
loop
exitwhen IO111O>I0OO0O
loop
exitwhen I0OOOO>8192
set x=IO111O
set y=I0OOOO
if IsPointBlighted(x,y)==false then
call SetTerrainType(x,y,OOIIIOO(GetTerrainType(x,y)),GetTerrainVariance(x,y),1,0)
endif
set x=-IO111O
set y=I0OOOO
if IsPointBlighted(x,y)==false then
call SetTerrainType(x,y,OOIIIOO(GetTerrainType(x,y)),GetTerrainVariance(x,y),1,0)
endif
set x=-IO111O
set y=-I0OOOO
if IsPointBlighted(x,y)==false then
call SetTerrainType(x,y,OOIIIOO(GetTerrainType(x,y)),GetTerrainVariance(x,y),1,0)
endif
set x=IO111O
set y=-I0OOOO
if IsPointBlighted(x,y)==false then
call SetTerrainType(x,y,OOIIIOO(GetTerrainType(x,y)),GetTerrainVariance(x,y),1,0)
endif
set I0OOOO=I0OOOO+OOIII1O
endloop
set I0OOOO=0
set IO111O=IO111O+OOIII1O
endloop
set I0OO0O=I0OO0O+256
if I0OO0O>8192 then
call DisableTrigger(GetTriggeringTrigger())
endif
endfunction
function OO000IO takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,0.02,true)
call TriggerAddAction(t,function OOIIIIO)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,"")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,"Terrain has been transformed.This is a very experimental mode.")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,"")
set IO111O=0
set I0OOOO=0
set I0OO0O=160
set t=null
endfunction
function OOII1OO takes nothing returns nothing
set IO[1]=0
endfunction
function OOII10O takes nothing returns nothing
set IO[2]=0
endfunction
function OOII1IO takes nothing returns nothing
set IO[3]=0
endfunction
function OOII11O takes nothing returns nothing
set IO[4]=0
endfunction
function OOI1OOO takes nothing returns nothing
set IO[5]=0
endfunction
function OOI1O0O takes nothing returns nothing
set IO[7]=0
endfunction
function OOI1OIO takes nothing returns nothing
set IO[8]=0
endfunction
function OOI1O1O takes nothing returns nothing
set IO[9]=0
endfunction
function OOI10OO takes nothing returns nothing
set IO[10]=0
endfunction
function OOI100O takes nothing returns nothing
set IO[11]=0
endfunction
function OOI10IO takes nothing returns boolean
if I11I then
call OOI110(bj_FORCE_ALL_PLAYERS,20.00,O0O[GetPlayerId(O0OI)]+I10OIO(O0OI)+"|r has defaulted to|c006699CCNormal Mode|r.You will get 175 gold refunded when you pick a hero.")
call OOI110(bj_FORCE_ALL_PLAYERS,20.00,"")
call OOOIIOO()
endif
call I10I1O(GetTriggeringTrigger())
return false
endfunction
function OOI101O takes nothing returns boolean
set OOO=true
call I10I1O(GetTriggeringTrigger())
return false
endfunction
function OOI1IOO takes nothing returns nothing
set I0=true
endfunction
function OOI1I0O takes nothing returns nothing
set O11I=true
endfunction
function OOI1IIO takes nothing returns nothing
set O00OO=true
endfunction
function OOI1I1O takes nothing returns boolean
return GetUnitAbilityLevel(GetKillingUnit(),1093685043)>0 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit()))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function OOI11OO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit u=IIO1OO(I1I0IO,"Unit")
call IIO00O(I011OO(u),"PreviousKills",II000O(I011OO(u),"PreviousKills")-1)
call I0111O(I1I0IO)
call I10I1O(t)
set u=null
set t=null
return false
endfunction
function OOI110O takes nothing returns nothing
local unit OOOIO0=GetKillingUnit()
local unit OOI11IO=GetTriggerUnit()
local string I1I0IO=I011OO(OOOIO0)
local integer OOI111O=II000O(I1I0IO,"PreviousKills")
local integer IO0O0I=GetUnitAbilityLevel(OOOIO0,1093685043)
local texttag TextTag=CreateTextTag()
local integer OO1OOOO=OOI111O*2
local integer OO1OO0O=OO0II0(OO1OOOO+IO0O0I*2,18)
local texttag tt=CreateTextTag()
local player p=GetOwningPlayer(OOOIO0)
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,20,false)
call TriggerAddCondition(t,Condition(function OOI11OO))
call IIOOIO(I011OO(t),"Unit",OOOIO0)
call IIO00O(I1I0IO,"PreviousKills",OOI111O+1)
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,OO1OO0O+GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD))
call SetTextTagText(tt,"+"+I2S(OO1OO0O),0.025)
call SetTextTagPosUnit(tt,OOI11IO,0)
call SetTextTagColor(tt,255,220,0,255)
call SetTextTagVelocity(tt,0,0.03)
if GetLocalPlayer()==p then
call SetTextTagVisibility(tt,true)
else
call SetTextTagVisibility(tt,false)
endif
call SetTextTagFadepoint(tt,2)
call SetTextTagLifespan(tt,3)
call SetTextTagPermanent(tt,false)
set t=null
endfunction
function II0II0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function OOI1I1O))
call TriggerAddAction(t,function OOI110O)
endfunction
constant function OO1OOIO takes nothing returns integer
return 1093683766
endfunction
constant function OO1OO1O takes nothing returns integer
return 1093683780
endfunction
function OO1O0OO takes nothing returns boolean
return GetSpellAbilityId()==OO1OOIO()
endfunction
function OO1O00O takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local string I1I0IO
local unit I1IIIO
local unit OOI010
local unit O11O1I
local unit OO1O0IO
local integer IO0O0I=OO0I10(GetTriggerExecCount(t)-1,1)
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST and GetSpellAbilityId()==OO1OOIO()then
set I1I0IO=I011OO(t)
set I1IIIO=IIO1OO(I1I0IO,"Hero")
set OOI010=IIO1OO(I1I0IO,"Target")
set OO1O0IO=IIO1OO(I1I0IO,"Caster")
call I0110O(I1I0IO)
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656899,GetUnitX(I1IIIO),GetUnitY(I1IIIO),0)
call UnitAddAbility(O11O1I,OO1OO1O())
call SetUnitAbilityLevel(O11O1I,OO1OO1O(),IO0O0I)
call IssueTargetOrder(O11O1I,"thunderbolt",OOI010)
call UnitAddAbility(O11O1I,1097625443)
call UnitApplyTimedLife(O11O1I,1112820806,2)
if OO1O0IO!=null and GetUnitState(OO1O0IO,UNIT_STATE_LIFE)>1 then
call KillUnit(OO1O0IO)
endif
call OO10O0(t)
endif
endfunction
function OO1O01O takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local unit O11O1I=IIO1OO(I1I0IO,"Caster")
local unit OOI010=IIO1OO(I1I0IO,"Target")
if GetUnitState(O11O1I,UNIT_STATE_LIFE)<1 or IsUnitVisible(OOI010,GetOwningPlayer(O11O1I))==false then
call PauseTimer(t)
call I0110O(I1I0IO)
else
call SetUnitX(O11O1I,GetUnitX(OOI010))
call SetUnitY(O11O1I,GetUnitY(OOI010))
endif
endfunction
function OO1OIOO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit OO1O0IO=CreateUnit(GetOwningPlayer(I1IIIO),1697657166,GetUnitX(OOI010),GetUnitY(OOI010),0)
local timer OO1OI0O=CreateTimer()
call IIOOIO(I011OO(OO1OI0O),"Caster",OO1O0IO)
call IIOOIO(I011OO(OO1OI0O),"Target",OOI010)
call TimerStart(OO1OI0O,0.1,true,function OO1O01O)
call UnitApplyTimedLife(OO1O0IO,1112820806,6)
call SetUnitPathing(OO1O0IO,false)
call SetUnitInvulnerable(OO1O0IO,true)
call UnitAddAbility(OO1O0IO,1097625443)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_SPELL_ENDCAST)
call TriggerRegisterTimerEvent(t,0.5,true)
call TriggerAddAction(t,function OO1O00O)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIOOIO(I1I0IO,"Caster",OO1O0IO)
endfunction
function II0I10 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(t,function OO1OIOO)
call TriggerAddCondition(t,Condition(function OO1O0OO))
call OO0OO0(OO1OO1O())
endfunction
constant function OO1OIIO takes nothing returns integer
return 1093683532
endfunction
constant function OO1OI1O takes nothing returns integer
return 1093683764
endfunction
function OO1O1OO takes nothing returns boolean
return GetSpellAbilityId()==OO1OIIO()
endfunction
function OO1O10O takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(O00I))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0
endfunction
function OO1O1IO takes nothing returns nothing
call UnitDamageTarget(O00I,GetEnumUnit(),O01I,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endfunction
function OO1O11O takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local unit O11O1I=IIO1OO(I1I0IO,"Caster")
local integer OO10OOO=II000O(I1I0IO,"Counter")
local real x=GetUnitX(O11O1I)
local real y=GetUnitY(O11O1I)
local boolexpr II1OIO
local group II1O0O
if OO10OOO>16 then
call KillUnit(O11O1I)
call PauseTimer(t)
call I0110O(I1I0IO)
call DestroyTimer(t)
else
set O00I=I1IIIO
set O01I=GetUnitAbilityLevel(I1IIIO,OO1OIIO())*8
set II1OIO=Condition(function OO1O10O)
set II1O0O=CreateGroup()
call GroupEnumUnitsInRange(II1O0O,x,y,625,II1OIO)
call ForGroup(II1O0O,function OO1O1IO)
call DestroyGroup(II1O0O)
call DestroyBoolExpr(II1OIO)
set OO10OOO=OO10OOO+1
call IIO00O(I1I0IO,"Counter",OO10OOO)
endif
endfunction
function OO10O0O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local location O000OI=GetSpellTargetLoc()
local real x=GetLocationX(O000OI)
local real y=GetLocationY(O000OI)
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697657157,x,y,0)
local timer t=CreateTimer()
local string I1I0IO=I011OO(t)
call RemoveLocation(O000OI)
call UnitAddAbility(O11O1I,OO1OI1O())
call SetUnitAbilityLevel(O11O1I,OO1OI1O(),GetUnitAbilityLevel(I1IIIO,OO1OIIO()))
call UnitAddAbility(O11O1I,1097625443)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIOOIO(I1I0IO,"Caster",O11O1I)
call IIO00O(I1I0IO,"Counter",0)
call TimerStart(t,1,true,function OO1O11O)
endfunction
function II01O0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(t,function OO10O0O)
call TriggerAddCondition(t,Condition(function OO1O1OO))
call OO0OO0(OO1OI1O())
endfunction
function OO10OIO takes nothing returns boolean
return GetSpellAbilityId()==1093682483
endfunction
function OO10O1O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local integer IO0O0I=GetUnitAbilityLevel(OOOIO0,1093682483)
local real OOIO00=(IO0O0I*0.25+0.35)*(GetUnitState(OOI010,UNIT_STATE_MAX_MANA)-GetUnitState(OOI010,UNIT_STATE_MANA))
call UnitDamageTargetBJ(OOOIO0,OOI010,OOIO00,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC)
endfunction
function O11O00 takes nothing returns nothing
set OIO0I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OIO0I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(OIO0I,Condition(function OO10OIO))
call TriggerAddAction(OIO0I,function OO10O1O)
endfunction
constant function OO100OO takes nothing returns integer
return 1093685040
endfunction
constant function OO1000O takes nothing returns integer
return 1093684826
endfunction
function OO100IO takes nothing returns boolean
return GetUnitAbilityLevel(GetAttacker(),OO100OO())>0 and I1IO0O(GetAttacker(),"BeastRageTrigger")==false and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false
endfunction
function OO1001O takes nothing returns nothing
local unit IOO1OI=GetAttacker()
local unit OOI010=GetTriggerUnit()
local string I1I0IO=I011OO(IOO1OI)
local unit OO10IOO=IIO1OO(I1I0IO,"BeastRage|PreviousTarget")
local integer OO10OOO=OO0I10(II000O(I1I0IO,"BeastRage|Counter"),0)
local integer IO0O0I=GetUnitAbilityLevel(IOO1OI,OO100OO())
if OO10IOO!=OOI010 then
set OO10OOO=OO10OOO/ 2
else
set OO10OOO=OO0II0(OO10OOO+1,21)
endif
call OO0O10(IOO1OI,OO1000O(),OO10OOO*IO0O0I)
call IIO00O(I1I0IO,"BeastRage|Counter",OO10OOO)
call IIOOIO(I1I0IO,"BeastRage|PreviousTarget",OOI010)
call I1I01O(IOO1OI,"BeastRageTrigger",0.4)
endfunction
function O11OI0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function OO100IO))
call TriggerAddAction(t,function OO1001O)
call OO0OO0(OO1000O())
endfunction
function OO10I0O takes nothing returns boolean
return GetSpellAbilityId()==1093685071
endfunction
function OO10IIO takes nothing returns nothing
if(GetUnitTypeId(GetEnumUnit())==1848652113 or GetUnitTypeId(GetEnumUnit())==1848652109 or GetUnitTypeId(GetEnumUnit())==1848652114 or GetUnitTypeId(GetEnumUnit())==1848652115)then
call KillUnit(GetEnumUnit())
endif
endfunction
function OO10I1O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local player II01IO=GetOwningPlayer(OOOIO0)
local integer IO0O0I=GetUnitAbilityLevel(OOOIO0,1093685071)
local real x=GetUnitX(OOOIO0)
local real y=GetUnitY(OOOIO0)
local group II1O0O=CreateGroup()
call GroupEnumUnitsOfPlayer(II1O0O,II01IO,Condition(function OI0O00))
call ForGroup(II1O0O,function OO10IIO)
call DestroyGroup(II1O0O)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl",x,y))
if(IO0O0I==1)then
call UnitApplyTimedLife(CreateUnit(II01IO,1848652113,x,y,270),1112820806,60)
elseif(IO0O0I==2)then
call UnitApplyTimedLife(CreateUnit(II01IO,1848652113,x,y,270),1112820806,70)
call UnitApplyTimedLife(CreateUnit(II01IO,1848652109,x,y,270),1112820806,70)
elseif(IO0O0I==3)then
call UnitApplyTimedLife(CreateUnit(II01IO,1848652114,x,y,270),1112820806,80)
call UnitApplyTimedLife(CreateUnit(II01IO,1848652109,x,y,270),1112820806,80)
elseif(IO0O0I==4)then
call UnitApplyTimedLife(CreateUnit(II01IO,1848652114,x,y,270),1112820806,90)
call UnitApplyTimedLife(CreateUnit(II01IO,1848652115,x,y,270),1112820806,90)
endif
endfunction
function O11000 takes nothing returns nothing
set OIOII=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OIOII,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(OIOII,Condition(function OO10I0O))
call TriggerAddAction(OIOII,function OO10I1O)
endfunction
function OO101OO takes nothing returns nothing
local real x=GetUnitX(GetEnumUnit())
local real y=GetUnitY(GetEnumUnit())
local real a=bj_RADTODEG*Atan2(y-I11II,x-I110I)
local real OO1010O
local real OO101IO
if Sin((a-I111I)*bj_DEGTORAD)<0 then
set OO1010O=GetUnitX(GetEnumUnit())+15*Cos((I111I-90)*bj_DEGTORAD)
set OO101IO=GetUnitY(GetEnumUnit())+15*Sin((I111I-90)*bj_DEGTORAD)
call SetUnitPosition(GetEnumUnit(),OO1010O,OO101IO)
call SetUnitFacingTimed(GetEnumUnit(),I111I+90,0.3)
else
set OO1010O=GetUnitX(GetEnumUnit())+15*Cos((I111I+90)*bj_DEGTORAD)
set OO101IO=GetUnitY(GetEnumUnit())+15*Sin((I111I+90)*bj_DEGTORAD)
call SetUnitPosition(GetEnumUnit(),OO1010O,OO101IO)
call SetUnitFacingTimed(GetEnumUnit(),I111I-90,0.3)
endif
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",GetEnumUnit(),"origin"))
endfunction
function OO1011O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local real OO1IOOO=II00IO(I1I0IO,"Angle")
local real x=II00IO(I1I0IO,"x")
local real y=II00IO(I1I0IO,"y")
local group g=II0OOO(I1I0IO,"g")
if GetTriggerEvalCount(t)>16 then
call DestroyGroup(g)
call I0111O(I1I0IO)
call I10I1O(t)
else
set I110I=x
set I11II=y
set I111I=OO1IOOO
call ForGroup(g,function OO101OO)
endif
set t=null
set g=null
return false
endfunction
function OO1IO0O takes nothing returns nothing
call OII1O0(OOOO1O,GetEnumUnit(),1,I110I)
endfunction
function OO1IOIO takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093685042)
local unit O11O1I
local real OO1IOOO=bj_RADTODEG*Atan2(GetUnitY(OOI010)-GetUnitY(I1IIIO),GetUnitX(OOI010)-GetUnitX(I1IIIO))
local real x
local real y
local group g=CreateGroup()
local group g2=CreateGroup()
call IIOOIO(I1I0IO,"g",g)
call IIO01O(I1I0IO,"Angle",OO1IOOO)
call IIO01O(I1I0IO,"x",GetUnitX(I1IIIO))
call IIO01O(I1I0IO,"y",GetUnitY(I1IIIO))
call TriggerRegisterTimerEvent(t,0.025,true)
call TriggerAddCondition(t,Condition(function OO1011O))
set x=GetUnitX(I1IIIO)+50*Cos(OO1IOOO*bj_DEGTORAD)
set y=GetUnitY(I1IIIO)+50*Sin(OO1IOOO*bj_DEGTORAD)
call GroupEnumUnitsInRange(g2,x,y,250,Condition(function OI00I0))
call GroupAddGroup(g2,g)
call GroupClear(g2)
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1865429081,x,y,OO1IOOO)
call UnitApplyTimedLife(O11O1I,1112820806,1)
call UnitAddAbility(O11O1I,1093684825)
call SetUnitAbilityLevel(O11O1I,1093684825,IO0O0I)
call IssueImmediateOrder(O11O1I,"thunderclap")
set x=GetUnitX(I1IIIO)+250*Cos(OO1IOOO*bj_DEGTORAD)
set y=GetUnitY(I1IIIO)+250*Sin(OO1IOOO*bj_DEGTORAD)
call GroupEnumUnitsInRange(g2,x,y,250,Condition(function OI00I0))
call GroupAddGroup(g2,g)
call GroupClear(g2)
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1865429081,x,y,OO1IOOO)
call UnitApplyTimedLife(O11O1I,1112820806,1)
call UnitAddAbility(O11O1I,1093684825)
call SetUnitAbilityLevel(O11O1I,1093684825,IO0O0I)
call IssueImmediateOrder(O11O1I,"thunderclap")
set x=GetUnitX(I1IIIO)+450*Cos(OO1IOOO*bj_DEGTORAD)
set y=GetUnitY(I1IIIO)+450*Sin(OO1IOOO*bj_DEGTORAD)
call GroupEnumUnitsInRange(g2,x,y,250,Condition(function OI00I0))
call GroupAddGroup(g2,g)
call GroupClear(g2)
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1865429081,x,y,OO1IOOO)
call UnitApplyTimedLife(O11O1I,1112820806,1)
call UnitAddAbility(O11O1I,1093684825)
call SetUnitAbilityLevel(O11O1I,1093684825,IO0O0I)
call IssueImmediateOrder(O11O1I,"thunderclap")
call DestroyGroup(g2)
call GroupRemoveUnit(g,OOI010)
set I110I=100*IO0O0I
set OOOO1O=I1IIIO
call ForGroup(g,function OO1IO0O)
set t=null
set I1IIIO=null
set OOI010=null
set O11O1I=null
set g=null
set g2=null
endfunction
function OO1IO1O takes nothing returns boolean
if GetSpellAbilityId()==1093685042 then
call OO1IOIO()
endif
return false
endfunction
function O11O10 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OO1IO1O))
set t=null
endfunction
function OO1I0OO takes nothing returns boolean
return GetSpellAbilityId()==1093685041
endfunction
function OO1I00O takes nothing returns nothing
call KillDestructable(GetEnumDestructable())
endfunction
function OO1I0IO takes unit OOOIO0,real x,real y,group O1100I returns nothing
local group II1O0O=CreateGroup()
local unit O11OO0
local rect OO1I01O=Rect(x-150,y-150,x+150,y+150)
call GroupEnumUnitsInRange(II1O0O,x,y,150,Condition(function OI0O00))
loop
set O11OO0=FirstOfGroup(II1O0O)
exitwhen O11OO0==null
if(IsUnitInGroup(O11OO0,O1100I)==false and IsUnitEnemy(O11OO0,GetOwningPlayer(OOOIO0))and IsUnitVisible(O11OO0,GetOwningPlayer(OOOIO0)))then
if(GetUnitAbilityLevel(O11OO0,1093678162)!=1 and GetUnitState(O11OO0,UNIT_STATE_LIFE)>0 and IsUnitType(O11OO0,UNIT_TYPE_STRUCTURE)==false)then
call GroupAddUnit(O1100I,O11OO0)
call UnitDamageTarget(OOOIO0,O11OO0,60+GetUnitAbilityLevel(OOOIO0,1093685041)*30,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_METAL_HEAVY_SLICE)
call AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",O11OO0,"overhead")
endif
endif
call GroupRemoveUnit(II1O0O,O11OO0)
endloop
call EnumDestructablesInRect(OO1I01O,null,function OO1I00O)
call RemoveRect(OO1I01O)
call DestroyGroup(II1O0O)
endfunction
function OO1IIOO takes nothing returns nothing
local string I1I0IO=I011OO(GetExpiredTimer())
local unit OO1II0O=IIO1OO(I1I0IO,"Axe")
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local real Ax=II00IO(I1I0IO,"Ax")
local real Ay=II00IO(I1I0IO,"Ay")
local real Cx=II00IO(I1I0IO,"Cx")
local real Cy=II00IO(I1I0IO,"Cy")
local real Bx=II00IO(I1I0IO,"Bx")
local real By=II00IO(I1I0IO,"By")
local real a=II00IO(I1I0IO,"a")
local real b=1-a
local boolean OO1IIIO=II001O(I1I0IO,"FirstPass")
local group O1100I=II0OOO(I1I0IO,"AlreadyDamaged")
call SetUnitX(OO1II0O,OOO100(Ax*a*a+Bx*2*a*b+Cx*b*b))
call SetUnitY(OO1II0O,OOO110(Ay*a*a+By*2*a*b+Cy*b*b))
call OO1I0IO(I1IIIO,GetUnitX(OO1II0O),GetUnitY(OO1II0O),O1100I)
if(OO1IIIO)then
call IIO01O(I1I0IO,"a",a-.02)
else
call IIO01O(I1I0IO,"a",a+.02)
call IIO01O(I1I0IO,"Ax",GetUnitX(I1IIIO))
call IIO01O(I1I0IO,"Ay",GetUnitY(I1IIIO))
endif
if(a<0 and OO1IIIO)then
call IIOI0O(I1I0IO,"FirstPass",false)
call IIO01O(I1I0IO,"Bx",Ax+300*Cos(Atan2(Cy-Ay,Cx-Ax)+II00IO(I1I0IO,"AngleOffset")))
call IIO01O(I1I0IO,"By",Ay+300*Sin(Atan2(Cy-Ay,Cx-Ax)+II00IO(I1I0IO,"AngleOffset")))
endif
if(a>1 and OO1IIIO==false)then
call PauseTimer(GetExpiredTimer())
call DestroyGroup(O1100I)
call I0110O(I1I0IO)
call RemoveUnit(OO1II0O)
call DestroyTimer(GetExpiredTimer())
endif
endfunction
function OO1II1O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local real Ax=GetUnitX(OOOIO0)
local real Ay=GetUnitY(OOOIO0)
local real Cx=GetLocationX(GetSpellTargetLoc())
local real Cy=GetLocationY(GetSpellTargetLoc())
local unit OO1I1OO=CreateUnit(GetOwningPlayer(OOOIO0),1697657172,Ax,Ay,270.0)
local unit OO1I10O=CreateUnit(GetOwningPlayer(OOOIO0),1697657172,Ax,Ay,270.0)
local string OO1I1IO
local string OO1I11O
local timer OO11OOO=CreateTimer()
local timer OO11O0O=CreateTimer()
if GetSpellTargetUnit()!=null then
set Cx=GetUnitX(GetSpellTargetUnit())
set Cy=GetUnitY(GetSpellTargetUnit())
endif
call UnitAddAbility(OO1I1OO,1097691750)
call UnitRemoveAbility(OO1I1OO,1097691750)
call SetUnitFlyHeight(OO1I1OO,150,0)
call UnitAddAbility(OO1I10O,1097691750)
call UnitRemoveAbility(OO1I10O,1097691750)
call SetUnitFlyHeight(OO1I10O,150,0)
set OO1I1IO=I011OO(OO11OOO)
call IIOOIO(OO1I1IO,"Hero",OOOIO0)
call IIOOIO(OO1I1IO,"Axe",OO1I1OO)
call IIOOIO(OO1I1IO,"AlreadyDamaged",CreateGroup())
call IIO01O(OO1I1IO,"Ax",Ax)
call IIO01O(OO1I1IO,"Ay",Ay)
call IIO01O(OO1I1IO,"Cx",Cx)
call IIO01O(OO1I1IO,"Cy",Cy)
call IIO01O(OO1I1IO,"Bx",Ax+300*Cos(Atan2(Cy-Ay,Cx-Ax)+45))
call IIO01O(OO1I1IO,"By",Ay+300*Sin(Atan2(Cy-Ay,Cx-Ax)+45))
call IIO01O(OO1I1IO,"a",1)
call IIO01O(OO1I1IO,"AngleOffset",-45)
call IIOI0O(OO1I1IO,"FirstPass",true)
set OO1I11O=I011OO(OO11O0O)
call IIOOIO(OO1I11O,"Hero",OOOIO0)
call IIOOIO(OO1I11O,"Axe",OO1I10O)
call IIOOIO(OO1I11O,"AlreadyDamaged",CreateGroup())
call IIO01O(OO1I11O,"Ax",Ax)
call IIO01O(OO1I11O,"Ay",Ay)
call IIO01O(OO1I11O,"Cx",Cx)
call IIO01O(OO1I11O,"Cy",Cy)
call IIO01O(OO1I11O,"Bx",Ax+300*Cos(Atan2(Cy-Ay,Cx-Ax)-45))
call IIO01O(OO1I11O,"By",Ay+300*Sin(Atan2(Cy-Ay,Cx-Ax)-45))
call IIO01O(OO1I11O,"a",1)
call IIO01O(OO1I11O,"AngleOffset",45)
call IIOI0O(OO1I11O,"FirstPass",true)
call TimerStart(OO11OOO,.025,true,function OO1IIOO)
call TimerStart(OO11O0O,.025,true,function OO1IIOO)
endfunction
function O110O0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OO1I0OO))
call TriggerAddAction(t,function OO1II1O)
endfunction
function OO11OIO takes nothing returns boolean
return GetSpellAbilityId()==1093681716
endfunction
function OO11O1O takes nothing returns nothing
local location O000OI=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,1697656901,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,1093684536)
call IssueTargetOrder(bj_lastCreatedUnit,"bloodlust",GetTriggerUnit())
call RemoveLocation(O000OI)
endfunction
function O11II0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OO11OIO))
call TriggerAddAction(t,function OO11O1O)
endfunction
function OO110OO takes nothing returns boolean
return GetUnitAbilityLevel(GetKillingUnit(),1093681716)>0 and IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)==true
endfunction
function OO1100O takes nothing returns nothing
local texttag tt=CreateTextTag()
local unit OOOIO0=GetKillingUnit()
local integer I1OO1O=GetUnitAbilityLevel(OOOIO0,1093681716)*50
local player p=GetOwningPlayer(OOOIO0)
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)+I1OO1O)
call SetTextTagText(tt,"+"+I2S(I1OO1O),0.025)
call SetTextTagPosUnit(tt,OI10[GetPlayerId(p)],0)
call SetTextTagColor(tt,255,220,0,255)
call SetTextTagVelocity(tt,0,0.03)
call SetTextTagVisibility(tt,false)
if GetLocalPlayer()==p then
call SetTextTagVisibility(tt,true)
endif
call SetTextTagFadepoint(tt,2)
call SetTextTagLifespan(tt,3)
call SetTextTagPermanent(tt,false)
set tt=null
set OOOIO0=null
set p=null
endfunction
function O11I10 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function OO110OO))
call TriggerAddAction(t,function OO1100O)
endfunction
constant function OO110IO takes nothing returns integer
return 1093682774
endfunction
constant function OO1101O takes nothing returns integer
return 1093682502
endfunction
constant function OO11IOO takes nothing returns integer
return 1093683024
endfunction
constant function OO11I0O takes nothing returns integer
return 1093682775
endfunction
function OO11IIO takes nothing returns boolean
return GetSpellAbilityId()==OO11IOO()or GetSpellAbilityId()==OO11I0O()
endfunction
function OO11I1O takes integer IO0O0I,integer a returns integer
if a==0 then
return 1
else
return(IO0O0I-1)*4+1+a
endif
endfunction
function OO111OO takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())==1697656920
endfunction
function OO1110O takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function OO111IO takes player p returns nothing
local group g=CreateGroup()
call GroupEnumUnitsOfPlayer(g,p,Condition(function OO111OO))
call ForGroup(g,function OO1110O)
call DestroyGroup(g)
set g=null
endfunction
function OO1111O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local unit I1IIIO=IIO1OO(I011OO(t),"Hero")
local string I1I0IO=I011OO(I1IIIO)
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,OO110IO())
local integer O0OOOOO=OO01O0(II000O(I1I0IO,"Warpath|Level")-1,0,4)
local unit O11O1I=IIO1OO(I1I0IO,"Warpath|Caster")
if GetUnitTypeId(O11O1I)==1697656920 then
call SetUnitAbilityLevel(O11O1I,OO1101O(),OO11I1O(IO0O0I,O0OOOOO))
call IIO00O(I1I0IO,"Warpath|Level",O0OOOOO)
else
call OO111IO(IIO10O(I011OO(t),"p"))
endif
call I0111O(I011OO(t))
call I10I1O(t)
set t=null
set I1IIIO=null
set O11O1I=null
return false
endfunction
function O0OOO0O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local string I1I0IO=I011OO(I1IIIO)
local unit O11O1I=IIO1OO(I1I0IO,"Warpath|Caster")
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,OO110IO())
local integer O0OOOOO=OO01O0(II000O(I1I0IO,"Warpath|Level")+1,0,4)
local integer O0OOOIO=OO11I1O(IO0O0I,O0OOOOO)
local trigger t=CreateTrigger()
call SetUnitAbilityLevel(O11O1I,OO1101O(),O0OOOIO)
call IIO00O(I1I0IO,"Warpath|Level",O0OOOOO)
call IIOOIO(I011OO(t),"Hero",I1IIIO)
call IIOOIO(I011OO(t),"p",GetOwningPlayer(I1IIIO))
call TriggerRegisterTimerEvent(t,10,false)
call TriggerAddCondition(t,Condition(function OO1111O))
set t=null
endfunction
function O0OOO1O takes nothing returns boolean
return GetLearnedSkill()==OO110IO()and GetUnitAbilityLevel(GetTriggerUnit(),OO110IO())==1 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function O0OO0OO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,OO110IO())
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656920,0,0,0)
local trigger t=CreateTrigger()
call UnitAddAbility(O11O1I,OO1101O())
call IIOOIO(I011OO(I1IIIO),"Warpath|Caster",O11O1I)
call SetUnitInvulnerable(O11O1I,true)
call UnitAddAbility(O11O1I,1097625443)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OO11IIO))
call TriggerAddAction(t,function O0OOO0O)
endfunction
function O111O0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function O0OOO1O))
call TriggerAddAction(t,function O0OO0OO)
call OO0OO0(OO1101O())
endfunction
function O0OO00O takes nothing returns boolean
if(not(GetSpellAbilityId()==1093682775))then
return false
endif
return true
endfunction
function Trig_Goo_Func001Func001001002 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())==1697656901)
endfunction
function O0OO0IO takes nothing returns nothing
call KillUnit(GetEnumUnit())
endfunction
function O0OO01O takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())==1697656901)
endfunction
function O0OOIOO takes nothing returns boolean
if(not(GetUnitUserData(GetEnumUnit())==4))then
return false
endif
return true
endfunction
function O0OOI0O takes nothing returns nothing
local location O000OI=GetUnitLoc(GetTriggerUnit())
call SetUnitPositionLoc(GetEnumUnit(),O000OI)
if(O0OOIOO())then
call IssueTargetOrder(GetEnumUnit(),"acidbomb",GetSpellTargetUnit())
else
call IncUnitAbilityLevel(GetEnumUnit(),1093682778)
call IssueTargetOrder(GetEnumUnit(),"acidbomb",GetSpellTargetUnit())
call SetUnitUserData(GetEnumUnit(),(GetUnitUserData(GetEnumUnit())+1))
endif
call RemoveLocation(O000OI)
endfunction
function O0OOIIO takes nothing returns nothing
local location O000OI=GetUnitLoc(GetTriggerUnit())
local location O0OOI1O=GetUnitLoc(GetSpellTargetUnit())
local group O0OO1OO
if(UnitHasBuffBJ(GetSpellTargetUnit(),1110454869)==true)then
set O0OO1OO=I0I1OO(GetOwningPlayer(GetSpellTargetUnit()),Condition(function O0OO01O))
call ForGroupBJ(O0OO1OO,function O0OOI0O)
else
set O0OO1OO=I0I1OO(GetOwningPlayer(GetSpellTargetUnit()),Condition(function O0OO01O))
call ForGroupBJ(O0OO1OO,function O0OO0IO)
call DisableTrigger(III00)
call CreateNUnitsAtLocFacingLocBJ(1,1697656901,GetOwningPlayer(GetSpellTargetUnit()),O000OI,O0OOI1O)
call EnableTrigger(III00)
call UnitAddAbility(bj_lastCreatedUnit,1093682778)
call SetUnitAbilityLevelSwapped(1093682778,bj_lastCreatedUnit,((GetUnitAbilityLevelSwapped(1093682775,GetTriggerUnit())*4)-3))
call IssueTargetOrder(bj_lastCreatedUnit,"acidbomb",GetSpellTargetUnit())
call SetUnitUserData(bj_lastCreatedUnit,1)
endif
call DestroyGroup(O0OO1OO)
call RemoveLocation(O000OI)
call RemoveLocation(O0OOI1O)
endfunction
function O11100 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O0OO00O))
call TriggerAddAction(t,function O0OOIIO)
endfunction
function O0OO10O takes nothing returns boolean
return GetLearnedSkill()==1093684531 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function O0OO1IO takes nothing returns boolean
if(IsUnitType(GetEventDamageSource(),UNIT_TYPE_STRUCTURE)==true)then
return false
endif
return true
endfunction
function O0OO11O takes unit I1IIIO returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656901,GetUnitX(I1IIIO),GetUnitY(I1IIIO),0)
call UnitAddAbility(O11O1I,1093683024)
call SetUnitAbilityLevel(O11O1I,1093683024,GetUnitAbilityLevel(I1IIIO,1093683024))
call IssueImmediateOrder(O11O1I,"fanofknives")
endfunction
function O0O0OOO takes unit I1IIIO,real OOIO00 returns nothing
local string I1I0IO=I011OO(I1IIIO)
local real O0O0O0O=II00IO(I1I0IO,"Bristleback_DamageStack")
if O0O0O0O>200 then
call IIO01O(I1I0IO,"Bristleback_DamageStack",0)
call O0OO11O(I1IIIO)
else
call IIO01O(I1I0IO,"Bristleback_DamageStack",O0O0O0O+OOIO00)
endif
endfunction
function O0O0OIO takes nothing returns nothing
local unit O0O0O1O=GetTriggerUnit()
local unit IOO1OI=GetEventDamageSource()
local real O0O00OO=O0O0O0(IOO1OI,O0O0O1O)
local real O0O000O=GetUnitFacing(O0O0O1O)
local real O0O00IO
local real OOIO00=GetEventDamage()
local real O0O001O
local real OO1IOOO
if(OOIO00>10)and GetUnitState(O0O0O1O,UNIT_STATE_LIFE)>1 then
if((O0O000O-O0O00OO)<(-180.00))then
set O0O00IO=(O0O000O-O0O00OO+360)
else
if((O0O000O-O0O00OO)>180.00)then
set O0O00IO=(O0O000O-O0O00OO-360)
else
set O0O00IO=(O0O000O-O0O00OO)
endif
endif
set OO1IOOO=RAbsBJ(O0O00IO)
if OO1IOOO<=70 then
set O0O001O=GetUnitAbilityLevel(O0O0O1O,1093684531)*0.10*OOIO00
call O0O0OOO(O0O0O1O,OOIO00-O0O001O)
call SetUnitState(O0O0O1O,UNIT_STATE_LIFE,GetUnitState(O0O0O1O,UNIT_STATE_LIFE)+O0O001O)
elseif OO1IOOO<=115 then
set O0O001O=GetUnitAbilityLevel(O0O0O1O,1093684531)*0.05*OOIO00
call SetUnitState(O0O0O1O,UNIT_STATE_LIFE,GetUnitState(O0O0O1O,UNIT_STATE_LIFE)+O0O001O)
endif
endif
endfunction
function O0O0IOO takes nothing returns nothing
local trigger t
if GetUnitAbilityLevel(GetTriggerUnit(),1093684531)==1 then
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function O0OO1IO))
call TriggerAddAction(t,function O0O0OIO)
endif
endfunction
function O111I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function O0OO10O))
call TriggerAddAction(t,function O0O0IOO)
endfunction
function O0O0I0O takes nothing returns boolean
return GetSpellAbilityId()==1093683024
endfunction
function O0O0IIO takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitAbilityLevel(GetFilterUnit(),1093678162)!=1
endfunction
function O0O0I1O takes nothing returns nothing
local string O0O01OO=I011OO(GetEnumUnit())
local integer O0O010O=II000O(OOOOO,O0O01OO)
local real OOIO00=OO0100(O01I+O0O010O*30,180)
call UnitDamageTarget(O00I,GetEnumUnit(),OOIO00,false,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call IIO00O(OOOOO,O0O01OO,O0O010O+1)
endfunction
function O0O01IO takes nothing returns nothing
local string O0O01OO=I011OO(GetEnumUnit())
local integer O0O010O=II000O(OOOOO,O0O01OO)
call IIO00O(OOOOO,O0O01OO,O0O010O-1)
endfunction
function O0O011O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOOIO0=IIO1OO(I1I0IO,"UnitVar")
local group II1O0O=II0OOO(I1I0IO,"GroupVar")
set OOOOO=I011OO(OOOIO0)
call ForGroup(II1O0O,function O0O01IO)
call DestroyGroup(II1O0O)
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
return false
endfunction
function O0OIOOO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local group II1O0O=CreateGroup()
local trigger t=CreateTrigger()
if IsUnitType(OOOIO0,UNIT_TYPE_HERO)==false then
set OOOIO0=OI10[GetPlayerId(GetOwningPlayer(OOOIO0))]
endif
call GroupEnumUnitsInRange(II1O0O,GetUnitX(OOOIO0),GetUnitY(OOOIO0),650,Condition(function O0O0IIO))
set O00I=OOOIO0
set O01I=GetUnitAbilityLevel(OOOIO0,1093683024)*20
set OOOOO=I011OO(OOOIO0)
call ForGroup(II1O0O,function O0O0I1O)
call IIOOIO(I011OO(t),"UnitVar",OOOIO0)
call IIOOIO(I011OO(t),"GroupVar",II1O0O)
call TriggerRegisterTimerEvent(t,10,false)
call TriggerAddCondition(t,Condition(function O0O011O))
set t=null
endfunction
function O11110 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O0O0I0O))
call TriggerAddAction(t,function O0OIOOO)
endfunction
function O0OIO0O takes nothing returns nothing
local unit OOI0I0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,1093677132)
call OII1O0(OOI0I0,OOI010,1,100+IO0O0I*75)
call OII1O0(OOI0I0,OOI0I0,1,100+IO0O0I*75)
set OOI0I0=null
set OOI010=null
endfunction
function O0OIOIO takes nothing returns boolean
if GetSpellAbilityId()==1093677132 then
call O0OIO0O()
endif
return false
endfunction
function IOOOO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O0OIOIO))
set t=null
endfunction
function O0OIO1O takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),1093677142)>0 and GetUnitAbilityLevel(GetAttacker(),1093678162)!=1
endfunction
function O0OI0OO takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetAttacker(),12.50*GetUnitAbilityLevel(GetTriggerUnit(),1093677142),ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL)
endfunction
function IOOO00 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function O0OIO1O))
call TriggerAddAction(t,function O0OI0OO)
endfunction
function O0OI00O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer IO0O0I=II000O(I1I0IO,"Level")
local real O0OI0IO
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamage()>10 then
set O0OI0IO=GetEventDamage()*0.07*IO0O0I
call DisableTrigger(t)
call OII1O0(GetEventDamageSource(),GetTriggerUnit(),2,O0OI0IO)
call EnableTrigger(t)
endif
else
call I0111O(I1I0IO)
call I10I1O(t)
endif
set t=null
return false
endfunction
function O0OI01O takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=GetSpellTargetUnit()
local unit OOI0I0=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,1093684045)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",OOI0I0,"chest"))
call IIO00O(I1I0IO,"Level",IO0O0I)
call TriggerRegisterTimerEvent(t,7,false)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function O0OI00O))
set t=null
set OOI010=null
set OOI0I0=null
endfunction
function O0OIIOO takes nothing returns boolean
if GetSpellAbilityId()==1093684045 then
call O0OI01O()
endif
return false
endfunction
function IOOOI0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O0OIIOO))
set t=null
endfunction
function O0OII0O takes nothing returns boolean
if(not(GetSpellAbilityId()==1093684308))then
return false
endif
return true
endfunction
function O0OIIIO takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1
endfunction
function O0OII1O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local integer O0OI1OO=GetUnitAbilityLevel(OOOIO0,1093684308)
local group II1O0O=I0I0OO(bj_mapInitialPlayableArea,Condition(function O0OIIIO))
local unit OOOO00O
loop
set OOOO00O=FirstOfGroup(II1O0O)
exitwhen OOOO00O==null
if(IsUnitAlly(OOOO00O,GetOwningPlayer(OOOIO0))==true)then
call SetWidgetLife(OOOO00O,(GetUnitStateSwap(UNIT_STATE_LIFE,OOOO00O)+100+(100*O0OI1OO)))
call DestroyEffect(AddSpecialEffectTargetUnitBJ("chest",OOOO00O,"Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl"))
endif
call GroupRemoveUnit(II1O0O,OOOO00O)
endloop
call DestroyGroup(II1O0O)
set II1O0O=I0I01O(bj_mapInitialPlayableArea,GetOwningPlayer(OOOIO0))
loop
set OOOO00O=FirstOfGroup(II1O0O)
exitwhen OOOO00O==null
if(IsUnitType(OOOO00O,UNIT_TYPE_HERO)==false and GetUnitTypeId(OOOO00O)!=1848651843)then
call SetUnitLifePercentBJ(OOOO00O,100)
call DestroyEffect(AddSpecialEffectTargetUnitBJ("chest",OOOO00O,"Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl"))
endif
call GroupRemoveUnit(II1O0O,OOOO00O)
endloop
call DestroyGroup(II1O0O)
endfunction
function IOOO10 takes nothing returns nothing
set OIO1I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OIO1I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(OIO1I,Condition(function O0OII0O))
call TriggerAddAction(OIO1I,function O0OII1O)
endfunction
function O0OI10O takes nothing returns boolean
if(not(GetSpellAbilityId()==1093678649))then
return false
endif
return true
endfunction
function O0OI1IO takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false)then
if(IsUnitAliveBJ(GetFilterUnit()))then
if I1O10O(GetFilterUnit())==false then
if(GetUnitTypeId(GetFilterUnit())!=1852010352)then
if(GetUnitAbilityLevel(GetFilterUnit(),1097167976)==1)then
if((GetUnitAbilityLevel(GetFilterUnit(),1093684047)==1)or(GetUnitAbilityLevel(GetFilterUnit(),1093684049)==1)or(GetUnitAbilityLevel(GetFilterUnit(),1093684050)==1)or(GetUnitAbilityLevel(GetFilterUnit(),1093684048)==1))then
return true
endif
endif
endif
endif
endif
endif
return false
endfunction
function O0OI11O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit O0O1OOO=IIO1OO(I1I0IO,"Chen")
local integer O0O1O0O=II000O(I1I0IO,"MaxUnits")
local group II1O0O=I0I1OO(GetOwningPlayer(O0O1OOO),Condition(function O0OI1IO))
local unit OOOO00O
loop
exitwhen(CountUnitsInGroup(II1O0O)<=O0O1O0O)
set OOOO00O=GroupPickRandomUnit(II1O0O)
call GroupRemoveUnit(II1O0O,OOOO00O)
call RemoveUnit(OOOO00O)
endloop
call DestroyGroup(II1O0O)
call I0111O(I1I0IO)
call I10I1O(t)
set O0O1OOO=null
set t=null
set II1O0O=null
set OOOO00O=null
return false
endfunction
function O0O1OIO takes nothing returns nothing
local unit O0O1O1O=GetSpellTargetUnit()
local unit O0O1OOO=GetTriggerUnit()
local integer O0OI1OO=GetUnitAbilityLevel(O0O1OOO,1093678649)
local integer O0O1O0O=1
local integer playerid=GetPlayerId(GetOwningPlayer(O0O1OOO))
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call OOI1I0(O0O1O1O)
if(O0OI1OO==1)then
call UnitAddAbility(O0O1O1O,1093684047)
endif
if(O0OI1OO==2)then
call UnitAddAbility(O0O1O1O,1093684049)
endif
if(O0OI1OO==3)then
set O0O1O0O=2
call UnitAddAbility(O0O1O1O,1093684050)
endif
if(O0OI1OO==4)then
set O0O1O0O=3
call UnitAddAbility(O0O1O1O,1093684048)
endif
call UnitAddAbility(O0O1O1O,1097167976)
call IIOOIO(I1I0IO,"Chen",O0O1OOO)
call IIO00O(I1I0IO,"MaxUnits",O0O1O0O)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function O0OI11O))
set t=null
set O0O1O1O=null
set O0O1OOO=null
endfunction
function IOO0O0 takes nothing returns nothing
set OI0OI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OI0OI,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(OI0OI,Condition(function O0OI10O))
call TriggerAddAction(OI0OI,function O0O1OIO)
endfunction
function O0O10OO takes nothing returns boolean
return GetSpellAbilityId()==1093684310
endfunction
function O0O100O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit O0O1OOO=IIO1OO(I1I0IO,"Chen")
local unit u=IIO1OO(I1I0IO,"Unit")
local real x=II00IO(I1I0IO,"x")
local real y=II00IO(I1I0IO,"y")
call DestroyEffect(II0O0O(I1I0IO,"FX"))
if II001O(I011OO(u),"O10110")==false and GetUnitAbilityLevel(u,1093678162)==0 then
call SetUnitPosition(u,x,y)
endif
if II001O(I011OO(u),"O10110")==true then
call I11I1O(GetOwningPlayer(O0O1OOO),"Cannot Teleport a unit casting Grapple")
endif
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set O0O1OOO=null
set u=null
return false
endfunction
function O0O10IO takes unit u,unit O0O101O,integer O0OI1OO,real x,real y returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,7-O0OI1OO,false)
call TriggerAddCondition(t,Condition(function O0O100O))
call IIOOIO(I1I0IO,"FX",AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Starfall\\StarfallCaster.mdl",u,"origin"))
call IIOOIO(I1I0IO,"Unit",u)
call IIOOIO(I1I0IO,"Chen",O0O101O)
call IIO01O(I1I0IO,"x",x)
call IIO01O(I1I0IO,"y",y)
set t=null
endfunction
function O0O1IOO takes nothing returns nothing
local unit OOI010=GetSpellTargetUnit()
local unit O0O1OOO=GetTriggerUnit()
local location O000OI=GetUnitLoc(O0O1OOO)
local unit O11O1I
local integer O0OI1OO=GetUnitAbilityLevel(O0O1OOO,1093684310)
local real O0O1I0O
local location O0O1IIO
local effect fx
if(II0I0O(GetOwningPlayer(O0O1OOO)))then
set O0O1IIO=GetRectCenter(OI01O)
else
set O0O1IIO=GetRectCenter(OIOOO)
endif
if(IsUnitAlly(OOI010,GetOwningPlayer(O0O1OOO))==false)then
set O0O1I0O=GetRandomInt(50*O0OI1OO,100*O0OI1OO)
call O0OI10(I2S(R2I(O0O1I0O)),1,OOI010,0.023,255,255,0,216)
call UnitDamageTargetBJ(O0O1OOO,OOI010,O0O1I0O,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)
set fx=AddSpecialEffectTargetUnitBJ("chest",OOI010,"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
call DestroyEffect(fx)
else
if(IsUnitType(OOI010,UNIT_TYPE_HERO)==true)then
if(II001O(I011OO(GetOwningPlayer(OOI010)),"DisableHelp")==false)then
call O0O10IO(OOI010,O0O1OOO,O0OI1OO,GetLocationX(O0O1IIO),GetLocationY(O0O1IIO))
endif
elseif(IsUnitOwnedByPlayer(OOI010,GetOwningPlayer(O0O1OOO))==true)then
call SetUnitPositionLoc(OOI010,O0O1IIO)
endif
endif
call RemoveLocation(O000OI)
call RemoveLocation(O0O1IIO)
endfunction
function IOO000 takes nothing returns nothing
set OI00I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OI00I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(OI00I,Condition(function O0O10OO))
call TriggerAddAction(OI00I,function O0O1IOO)
endfunction
function O0O1I1O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO
local unit O11O1I
local integer IO0O0I
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST and(GetSpellAbilityId()==1093677906 or GetSpellAbilityId()==1093681494)then
call I0111O(I1I0IO)
call I10I1O(t)
else
set IO0O0I=II000O(I1I0IO,"Level")
set I1IIIO=IIO1OO(I1I0IO,"Hero")
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656899,GetUnitX(I1IIIO)+GetRandomReal(125,635)*Cos(GetRandomReal(0,360)*bj_DEGTORAD),GetUnitY(I1IIIO)+GetRandomReal(125,635)*Sin(GetRandomReal(0,360)*bj_DEGTORAD),0)
call UnitAddAbility(O11O1I,1093677912)
call SetUnitAbilityLevel(O11O1I,1093677912,IO0O0I)
call SetUnitPathing(O11O1I,false)
call IssueTargetOrder(O11O1I,"frostnova",O11O1I)
call UnitApplyTimedLife(O11O1I,1112820806,0.25)
endif
set t=null
set I1IIIO=null
set O11O1I=null
return false
endfunction
function O0O11OO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local integer IO0O0I
if GetSpellAbilityId()==1093677906 then
set IO0O0I=GetUnitAbilityLevel(I1IIIO,1093677906)
else
set IO0O0I=GetUnitAbilityLevel(I1IIIO,1093681494)
endif
call TriggerRegisterTimerEvent(t,0.10,true)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t,Condition(function O0O1I1O))
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIO00O(I1I0IO,"Level",IO0O0I)
set t=null
set I1IIIO=null
endfunction
function O0O110O takes nothing returns boolean
if GetSpellAbilityId()==1093677906 or GetSpellAbilityId()==1093681494 then
call O0O11OO()
endif
return false
endfunction
function IOO0I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O0O110O))
call OO0OO0(1093677912)
set t=null
endfunction
constant function O0O11IO takes nothing returns integer
return 1093681996
endfunction
constant function O0O111O takes nothing returns integer
return 1378889782
endfunction
function O00OOOO takes nothing returns boolean
return GetLearnedSkill()==O0O11IO()and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function O00OO0O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
call SetPlayerTechResearched(GetOwningPlayer(I1IIIO),O0O111O(),GetPlayerTechCount(GetOwningPlayer(I1IIIO),O0O111O(),true)+1)
endfunction
function II0I00 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function O00OOOO))
call TriggerAddAction(t,function O00OO0O)
endfunction
function O00OOIO takes nothing returns boolean
if(not(GetSpellAbilityId()==1093682248))then
return false
endif
return true
endfunction
function O00OO1O takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==true)
endfunction
function O00O0OO takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)
endfunction
function O00O00O takes nothing returns boolean
return(GetUnitAbilityLevelSwapped(1093678162,GetFilterUnit())!=1)
endfunction
function O00O0IO takes nothing returns boolean
return GetBooleanAnd(O00O0OO(),O00O00O())
endfunction
function O00O01O takes nothing returns boolean
return GetBooleanAnd(O00OO1O(),O00O0IO())
endfunction
function O00OIOO takes nothing returns nothing
local location O0OO1OO=GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc(1,1697656901,GetOwningPlayer(GetTriggerUnit()),O0OO1OO,bj_UNIT_FACING)
call SetUnitScalePercent(bj_lastCreatedUnit,25.00,25.00,25.00)
call UnitAddAbility(bj_lastCreatedUnit,1093682253)
call SetUnitAbilityLevelSwapped(1093682253,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093682248,GetTriggerUnit()))
call IssueImmediateOrder(bj_lastCreatedUnit,"fanofknives")
call RemoveLocation(O0OO1OO)
endfunction
function O00OI0O takes nothing returns nothing
local location O0OO1OO=GetUnitLoc(GetTriggerUnit())
local group O00OIIO=I0II0O(500.00,O0OO1OO,Condition(function O00O01O))
call ForGroupBJ(O00OIIO,function O00OIOO)
call RemoveLocation(O0OO1OO)
call DestroyGroup(O00OIIO)
endfunction
function IOO010 takes nothing returns nothing
set OI0II=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OI0II,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(OI0II,Condition(function O00OOIO))
call TriggerAddAction(OI0II,function O00OI0O)
endfunction
function O00OI1O takes nothing returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(GetEnumUnit()),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call UnitAddAbility(O11O1I,1093686090)
call SetUnitAbilityLevel(O11O1I,1093686090,I1III)
call IssueTargetOrder(O11O1I,"thunderbolt",GetEnumUnit())
call OII1O0(GetTriggerUnit(),GetEnumUnit(),1,I110I)
set O11O1I=null
endfunction
function O00O1OO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local location l=GetSpellTargetLoc()
local integer i=1
local real OOII00=GetUnitX(I1IIIO)
local real OOIII0=GetUnitY(I1IIIO)
local real III11O
local real II1OOO
local real x
local real y
local real a
local group g=CreateGroup()
local group g2=CreateGroup()
if OOI010==null then
set III11O=GetLocationX(l)
set II1OOO=GetLocationY(l)
else
set III11O=GetUnitX(OOI010)
set II1OOO=GetUnitY(OOI010)
endif
set a=bj_DEGTORAD*O0O000(OOII00,OOIII0,III11O,II1OOO)
call RemoveLocation(l)
loop
exitwhen i>20
set x=OOO100(OOII00+i*60*Cos(a))
set y=OOO110(OOIII0+i*60*Sin(a))
call GroupEnumUnitsInRange(g2,x,y,250,Condition(function OI00I0))
call GroupAddGroup(g2,g)
call GroupClear(g2)
call O01010(CreateDestructable(1110454320,x,y,GetRandomReal(0,360),0.5,GetRandomInt(0,2)),8)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",x,y))
set i=i+1
endloop
set I1III=GetUnitAbilityLevel(I1IIIO,1093686091)
set I110I=I1III*50+75
call ForGroup(g,function O00OI1O)
call DestroyGroup(g)
call DestroyGroup(g2)
set I1IIIO=null
set l=null
endfunction
function O00O10O takes nothing returns boolean
if GetSpellAbilityId()==1093686091 then
call O00O1OO()
endif
return false
endfunction
function IOOIO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O00O10O))
call OO0OO0(1093686090)
set t=null
endfunction
function O00O1IO takes nothing returns boolean
if((GetSpellAbilityId()==1093686091))then
return true
endif
if((GetSpellAbilityId()==1093682252))then
return true
endif
if((GetSpellAbilityId()==1093682248))then
return true
endif
return false
endfunction
function O00O11O takes nothing returns boolean
if(not(GetUnitAbilityLevelSwapped(1093682250,GetSpellAbilityUnit())>0))then
return false
endif
if(not O00O1IO())then
return false
endif
return true
endfunction
function O000OOO takes nothing returns nothing
local location O0OO1OO=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,1697656901,GetOwningPlayer(GetTriggerUnit()),O0OO1OO,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,1093682249)
call SetUnitAbilityLevelSwapped(1093682249,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093682250,GetSpellAbilityUnit()))
call IssueImmediateOrder(bj_lastCreatedUnit,"stomp")
call RemoveLocation(O0OO1OO)
endfunction
function IOOI00 takes nothing returns nothing
set OI01I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OI01I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(OI01I,Condition(function O00O11O))
call TriggerAddAction(OI01I,function O000OOO)
endfunction
function O000O0O takes nothing returns boolean
if(GetItemTypeId(GetManipulatedItem())==1886287477)then
if(GetUnitTypeId(GetTriggerUnit())==1333027688)then
return true
endif
endif
return false
endfunction
function O000OIO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656901,GetUnitX(I1IIIO),GetUnitY(I1IIIO),0)
call UnitAddAbility(O11O1I,1095332466)
call IssueImmediateOrder(O11O1I,"roar")
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set I1IIIO=null
set O11O1I=null
return false
endfunction
function O000O1O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call UnitRemoveAbility(I1IIIO,1110454608)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function O000OIO))
set t=null
set I1IIIO=null
endfunction
function IOOII0 takes nothing returns nothing
set OIIOI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OIIOI,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(OIIOI,Condition(function O000O0O))
call TriggerAddAction(OIIOI,function O000O1O)
endfunction
function O0000OO takes nothing returns boolean
if(not(UnitHasBuffBJ(GetAttacker(),1114795873)==true))then
return false
endif
return true
endfunction
function O00000O takes nothing returns nothing
call O01I00(GetAttacker(),1114795873,0.4)
endfunction
function IOOI10 takes nothing returns nothing
set OII0I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OII0I,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(OII0I,Condition(function O0000OO))
call TriggerAddAction(OII0I,function O00000O)
endfunction
function O0000IO takes unit u returns boolean
return IsUnitType(u,UNIT_TYPE_HERO)==false and IsUnitType(u,UNIT_TYPE_ANCIENT)==false and GetUnitTypeId(u)!=1848652101 and GetUnitTypeId(u)!=1848652089
endfunction
function O00001O takes nothing returns nothing
local unit OOI010=GetSpellTargetUnit()
local unit OOI0I0=GetTriggerUnit()
call SetUnitOwner(OOI010,GetOwningPlayer(OOI0I0),true)
call UnitApplyTimedLife(OOI010,1112820806,120)
call UnitRemoveAbility(OOI010,1114860655)
set OOI010=null
set OOI0I0=null
endfunction
function O000IOO takes nothing returns boolean
if GetSpellAbilityId()==1093682264 and O0000IO(GetSpellTargetUnit())then
call O00001O()
endif
return false
endfunction
function IOO1O0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O000IOO))
set t=null
endfunction
function O000I0O takes nothing returns boolean
return OI01O0()and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)!=GetUnitState(GetFilterUnit(),UNIT_STATE_MAX_LIFE)
endfunction
function O000IIO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local integer OO10OOO=II000O(I1I0IO,"Counter")
local group g
local unit O11OO0
if OO10OOO>10 then
call I0111O(I1I0IO)
call I10I1O(t)
else
call IIO00O(I1I0IO,"Counter",OO10OOO+1)
set OOOO1O=OOI0I0
set g=CreateGroup()
call GroupEnumUnitsInRange(g,GetUnitX(OOI0I0),GetUnitY(OOI0I0),300,Condition(function O000I0O))
set O11OO0=GroupPickRandomUnit(g)
call SetUnitState(O11OO0,UNIT_STATE_LIFE,GetUnitState(O11OO0,UNIT_STATE_LIFE)+10)
endif
set t=null
set OOI0I0=null
set g=null
set O11OO0=null
return false
endfunction
function O000I1O takes nothing returns nothing
local unit OOI0I0=GetTriggerUnit()
local trigger t
local integer i=1
loop
exitwhen i>(1+2*GetUnitAbilityLevel(OOI0I0,1093677378))
set t=CreateTrigger()
call IIOOIO(I011OO(t),"Source",OOI0I0)
call IIO00O(I011OO(t),"Counter",0)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function O000IIO))
set i=i+1
endloop
set t=null
set OOI0I0=null
endfunction
function O0001OO takes nothing returns boolean
if GetSpellAbilityId()==1093677378 then
call O000I1O()
endif
return false
endfunction
function IOO100 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O0001OO))
set t=null
endfunction
function O00010O takes real x1,real y1,real x2,real y2 returns real
return SquareRoot(((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)))
endfunction
function O0001IO takes nothing returns boolean
local real d
if GetUnitAbilityLevel(GetTriggerUnit(),1110455125)>0 and GetUnitAbilityLevel(GetEventDamageSource(),1093682265)>0 and IIO1OO(I011OO(GetTriggeringTrigger()),"Source")==GetEventDamageSource()then
call UnitRemoveAbility(GetTriggerUnit(),1110455125)
set d=0.04*I2R(GetUnitAbilityLevel(GetEventDamageSource(),1093682265))*O00010O(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetUnitX(GetEventDamageSource()),GetUnitY(GetEventDamageSource()))
if d>400 then
set d=400
endif
call O0OI10("+"+I2S(R2I(d)),1,GetTriggerUnit(),0.023,3,216,216,216)
call DisableTrigger(GetTriggeringTrigger())
call OII1O0(GetEventDamageSource(),GetTriggerUnit(),3,d)
call I0110O(I011OO(GetTriggeringTrigger()))
call I10I1O(GetTriggeringTrigger())
endif
return false
endfunction
function O00011O takes nothing returns nothing
local trigger t
local unit OOI010
local unit OOI0I0
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
set OOI010=GetSpellTargetUnit()
set OOI0I0=GetTriggerUnit()
else
set OOI010=GetTriggerUnit()
set OOI0I0=GetAttacker()
endif
if IsUnitIllusion(OOI0I0)==false then
set t=CreateTrigger()
call IIOOIO(I011OO(t),"Source",OOI0I0)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function O0001IO))
endif
set t=null
set OOI010=null
set OOI0I0=null
endfunction
function O00IOOO takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if GetUnitAbilityLevel(GetAttacker(),1093682265)>0 and II001O(I011OO(GetTriggeringTrigger()),"OrbOn")and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==IIO1OO(I011OO(GetTriggeringTrigger()),"Hero")then
call O00011O()
endif
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if(GetIssuedOrderId()==OrderId("poisonarrows"))then
call IIOI0O(I011OO(GetTriggeringTrigger()),"OrbOn",true)
elseif(GetIssuedOrderId()==OrderId("unpoisonarrows"))then
call IIOI0O(I011OO(GetTriggeringTrigger()),"OrbOn",false)
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093682265 then
call O00011O()
endif
return false
endfunction
function O00IO0O takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function O00IOOO))
call IIOOIO(I011OO(t),"Hero",GetTriggerUnit())
set t=null
endfunction
function O00IOIO takes nothing returns boolean
if GetLearnedSkill()==1093682265 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093682265)==1 then
call O00IO0O()
endif
return false
endfunction
function IOO1I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function O00IOIO))
set t=null
endfunction
constant function O00IO1O takes nothing returns integer
return 1093682263
endfunction
constant function O00I0OO takes nothing returns integer
return 1093681712
endfunction
function O00I00O takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),O00IO1O())>0
endfunction
function O00I0IO takes nothing returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(GetTriggerUnit()),1697656901,GetUnitX(GetAttacker()),GetUnitY(GetAttacker()),0)
call UnitAddAbility(O11O1I,O00I0OO())
call SetUnitAbilityLevel(O11O1I,O00I0OO(),GetUnitAbilityLevel(GetTriggerUnit(),O00IO1O()))
call IssueTargetOrder(O11O1I,"acidbomb",GetAttacker())
endfunction
function IOO110 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function O00I00O))
call TriggerAddAction(t,function O00I0IO)
endfunction
function O00I01O takes unit III1IO returns boolean
local integer OI0O10=GetUnitTypeId(III1IO)
return OI0O10==1848651828 or OI0O10==1848652103 or OI0O10==1848652099 or OI0O10==1848652088
endfunction
function O00IIOO takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or O00I01O(GetFilterUnit()))and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(IIO1OO(I011OO(GetTriggeringTrigger()),"BlackHole")))==true
endfunction
function O00II0O takes nothing returns nothing
local location O00IIIO=GetUnitLoc(GetEnumUnit())
local location O00II1O=GetUnitLoc(IIO1OO(I011OO(GetTriggeringTrigger()),"BlackHole"))
local location O00I1OO=I0011O(O00II1O,DistanceBetweenPoints(O00II1O,O00IIIO)-2,AngleBetweenPoints(O00II1O,O00IIIO))
call SetUnitPositionLoc(GetEnumUnit(),O00I1OO)
call RemoveLocation(O00IIIO)
call RemoveLocation(O00II1O)
call RemoveLocation(O00I1OO)
endfunction
function O00I10O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local group II1O0O
local unit O00I1IO
local string I1I0IO=I011OO(t)
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call I0111O(I1I0IO)
call I10I1O(t)
else
set O00I1IO=IIO1OO(I1I0IO,"BlackHole")
set II1O0O=CreateGroup()
call GroupEnumUnitsInRange(II1O0O,GetUnitX(O00I1IO),GetUnitY(O00I1IO),400,Condition(function O00IIOO))
call ForGroup(II1O0O,function O00II0O)
call DestroyGroup(II1O0O)
endif
set t=null
return false
endfunction
function O00I11O takes nothing returns nothing
local unit OOOIO0=GetSummoningUnit()
local unit O00I1IO=GetSummonedUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"BlackHole",O00I1IO)
call TriggerRegisterUnitEvent(t,O00I1IO,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,0.05,true)
call TriggerAddCondition(t,Condition(function O00I10O))
call SetUnitAbilityLevel(O00I1IO,1093681968,GetUnitAbilityLevel(OOOIO0,1093681753))
endfunction
function O001OOO takes nothing returns boolean
if GetUnitTypeId(GetSummonedUnit())==1966092340 then
call O00I11O()
endif
return false
endfunction
function IO0OO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function O001OOO))
call OO0OO0(1093681968)
endfunction
function O001O0O takes unit OOI0I0,unit OOI010,integer IO0O0I returns nothing
local real OOIO00
local unit O11O1I=CreateUnit(GetOwningPlayer(OOI0I0),1697656901,GetUnitX(OOI010),GetUnitY(OOI010),0)
call UnitAddAbility(O11O1I,1093677377)
if IO0O0I==1 then
set OOIO00=30
elseif IO0O0I==2 then
set OOIO00=40
elseif IO0O0I==3 then
set OOIO00=65
else
set OOIO00=80
endif
call IssueTargetOrder(O11O1I,"thunderbolt",OOI010)
call OII1O0(OOI0I0,OOI010,1,OOIO00)
set O11O1I=null
endfunction
function O001OIO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local unit OOI010=IIO1OO(I1I0IO,"Target")
local integer IO0O0I=II000O(I1I0IO,"Level")
call O001O0O(OOI0I0,OOI010,IO0O0I)
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set OOI0I0=null
set OOI010=null
return false
endfunction
function O001O1O takes nothing returns nothing
local unit OOI0I0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local trigger t
local string I1I0IO
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,1093683511)
call O001O0O(OOI0I0,OOI010,IO0O0I)
if IO0O0I>1 then
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIO00O(I1I0IO,"Level",IO0O0I)
call TriggerRegisterTimerEvent(t,2,false)
call TriggerAddCondition(t,Condition(function O001OIO))
endif
if IO0O0I==4 then
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIO00O(I1I0IO,"Level",IO0O0I)
call TriggerRegisterTimerEvent(t,4,false)
call TriggerAddCondition(t,Condition(function O001OIO))
endif
set t=null
set OOI0I0=null
set OOI010=null
endfunction
function O0010OO takes nothing returns boolean
if GetSpellAbilityId()==1093683511 then
call O001O1O()
endif
return false
endfunction
function IO0O00 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O0010OO))
endfunction
function O00100O takes nothing returns boolean
if(not(GetSpellAbilityId()==1093681713))then
return false
endif
return true
endfunction
function O0010IO takes nothing returns nothing
local location O0OO1OO=GetUnitLoc(GetTriggerUnit())
local location O00OIIO=GetSpellTargetLoc()
call CreateNUnitsAtLocFacingLocBJ(1,1697656901,GetOwningPlayer(GetTriggerUnit()),O0OO1OO,O00OIIO)
call ShowUnitHide(bj_lastCreatedUnit)
call UnitApplyTimedLifeBJ(8.00,1112820806,bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,1093681714)
call SetUnitAbilityLevelSwapped(1093681714,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093681713,GetTriggerUnit()))
call IssuePointOrderLoc(bj_lastCreatedUnit,"deathanddecay",O00OIIO)
call RemoveLocation(O0OO1OO)
call RemoveLocation(O00OIIO)
endfunction
function IO0OI0 takes nothing returns nothing
set OIIII=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OIIII,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(OIIII,Condition(function O00100O))
call TriggerAddAction(OIIII,function O0010IO)
endfunction
function O00101O takes nothing returns boolean
if(not(GetSpellAbilityId()==1093681719))then
return false
endif
return true
endfunction
function O001IOO takes nothing returns nothing
local integer O0OI1OO=GetUnitAbilityLevelSwapped(1093681719,GetTriggerUnit())
local location O000OI=GetUnitLoc(GetSpellTargetUnit())
local integer I0111I
if(O0OI1OO==1)then
set I0111I=1752654196
endif
if(O0OI1OO==2)then
set I0111I=1752658994
endif
if(O0OI1OO==3)then
set I0111I=1752658995
endif
if(O0OI1OO==4)then
set I0111I=1747988534
endif
call KillUnit(GetSpellTargetUnit())
call UnitApplyTimedLifeBJ(30,1112820806,CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),I0111I,O000OI,bj_UNIT_FACING))
call UnitApplyTimedLifeBJ(30,1112820806,CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),I0111I,O000OI,bj_UNIT_FACING))
call UnitApplyTimedLifeBJ(30,1112820806,CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),I0111I,O000OI,bj_UNIT_FACING))
call RemoveLocation(O000OI)
endfunction
function IO0O10 takes nothing returns nothing
set OII1I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OII1I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(OII1I,Condition(function O00101O))
call TriggerAddAction(OII1I,function O001IOO)
endfunction
function O001I0O takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),OOO0IO)==false then
call GroupAddUnit(OOO0IO,GetEnumUnit())
call OII1O0(OOOO1O,GetEnumUnit(),1,I110I)
endif
endfunction
function O001IIO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local group g=II0OOO(I1I0IO,"g")
local unit O11O1I=IIO1OO(I1I0IO,"Caster")
local integer IO0O0I=II000O(I1I0IO,"Level")
local real OO1IOOO=II00IO(I1I0IO,"Angle")
local group O001I1O
local real x
local real y
if GetTriggerEventId()==EVENT_UNIT_DEATH then
set OOOO1O=CreateUnit(GetOwningPlayer(O11O1I),1747988535,GetUnitX(IIO1OO(I1I0IO,"Hero")),GetUnitY(IIO1OO(I1I0IO,"Hero")),0)
call SetUnitScale(OOOO1O,2.5,2.5,2.5)
call KillUnit(OOOO1O)
call SetUnitPosition(IIO1OO(I1I0IO,"Hero"),GetUnitX(O11O1I),GetUnitY(O11O1I))
set I0OOIO[GetPlayerId(GetOwningPlayer(O11O1I))]=null
call DestroyGroup(g)
call I0111O(I1I0IO)
call I10I1O(t)
elseif GetTriggerEvalCount(t)>120 then
set I0OOIO[GetPlayerId(GetOwningPlayer(O11O1I))]=null
call DestroyGroup(g)
call I0111O(I1I0IO)
call I10I1O(t)
call SetUnitScale(O11O1I,2.5,2.5,2.5)
call KillUnit(O11O1I)
else
set x=GetUnitX(O11O1I)
set y=GetUnitY(O11O1I)
set O001I1O=CreateGroup()
set OOO0IO=g
set OOOO1O=O11O1I
set I110I=IO0O0I*70
call GroupEnumUnitsInRange(O001I1O,x,y,225,Condition(function OI0II0))
call ForGroup(O001I1O,function O001I0O)
call DestroyGroup(O001I1O)
call SetUnitX(O11O1I,OOO100(x+15*Cos(OO1IOOO*bj_DEGTORAD)))
call SetUnitY(O11O1I,OOO110(y+15*Sin(OO1IOOO*bj_DEGTORAD)))
endif
set t=null
set g=null
set O001I1O=null
set O11O1I=null
return false
endfunction
function O0011OO takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local group g=CreateGroup()
local unit I1IIIO=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x1=GetUnitX(I1IIIO)
local real y1=GetUnitY(I1IIIO)
local real x2=GetLocationX(l)
local real y2=GetLocationY(l)
local real OO1IOOO=O0O000(x1,y1,x2,y2)
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093686073)
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1747988535,x1,y1,OO1IOOO)
call O00O10(I0II0,x1,y1)
set I0OOIO[GetPlayerId(GetOwningPlayer(I1IIIO))]=O11O1I
call SetUnitScale(O11O1I,3.5,3.5,3.5)
call IIOOIO(I1I0IO,"Caster",O11O1I)
call IIO00O(I1I0IO,"Level",IO0O0I)
call IIOOIO(I1I0IO,"g",g)
call IIO01O(I1I0IO,"Angle",OO1IOOO)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call TriggerRegisterTimerEvent(t,0.025,true)
call TriggerRegisterUnitEvent(t,O11O1I,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function O001IIO))
call RemoveLocation(l)
set t=null
set O11O1I=null
set g=null
set I1IIIO=null
set l=null
endfunction
function O00110O takes nothing returns nothing
local integer i=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
if I0OOIO[i]==null then
call I11I1O(GetOwningPlayer(GetTriggerUnit()),"Illusory Orb not found.")
call SetUnitState(GetTriggerUnit(),UNIT_STATE_MANA,GetUnitState(GetTriggerUnit(),UNIT_STATE_MANA)+25)
else
call SetUnitScale(I0OOIO[i],2.5,2.5,2.5)
call KillUnit(I0OOIO[i])
endif
endfunction
function O0011IO takes nothing returns boolean
if GetSpellAbilityId()==1093686073 then
call O0011OO()
endif
if GetSpellAbilityId()==1093686081 then
call O00110O()
endif
return false
endfunction
function O00111O takes nothing returns boolean
if GetLearnedSkill()==1093686073 and GetUnitAbilityLevel(GetTriggerUnit(),1093686073)==1 and IsUnitIllusion(GetTriggerUnit())==false then
call UnitAddAbility(GetTriggerUnit(),1093686081)
endif
return false
endfunction
function I1O0O0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O0011IO))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function O00111O))
set t=null
endfunction
function O0IOOOO takes nothing returns nothing
call OII1O0(GetTriggerUnit(),GetEnumUnit(),1,I110I)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\StaffOfPurification\\PurificationTarget.mdx",GetEnumUnit(),"chest"))
endfunction
function O0IOO0O takes nothing returns nothing
local group g=CreateGroup()
local unit I1IIIO=GetTriggerUnit()
local real x=GetUnitX(I1IIIO)
local real y=GetUnitY(I1IIIO)
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093686083)
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656901,x,y,0)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\StaffOfPurification\\PurificationCaster.mdx",x,y))
call UnitAddAbility(O11O1I,1093686084)
call SetUnitAbilityLevel(O11O1I,1093686084,IO0O0I)
call IssuePointOrder(O11O1I,"silence",x,y)
set I110I=IO0O0I*60
call GroupEnumUnitsInRange(g,x,y,400,Condition(function OI0010))
call ForGroup(g,function O0IOOOO)
call DestroyGroup(g)
set O11O1I=null
set g=null
set I1IIIO=null
endfunction
function O0IOOIO takes nothing returns boolean
if GetSpellAbilityId()==1093686083 then
call O0IOO0O()
endif
return false
endfunction
function I1O000 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O0IOOIO))
set t=null
endfunction
function O0IOO1O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
if not(GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER and GetIssuedOrderId()==String2OrderIdBJ("phaseshift"))then
call SetUnitInvulnerable(I1IIIO,false)
call UnitRemoveAbility(I1IIIO,1093678162)
call I0111O(I1I0IO)
call I10I1O(t)
endif
set t=null
set I1IIIO=null
return false
endfunction
function O0IO0OO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call SetUnitInvulnerable(I1IIIO,true)
call UnitAddAbility(I1IIIO,1093678162)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call TriggerRegisterTimerEvent(t,GetUnitAbilityLevel(I1IIIO,1093686082)*0.75,false)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_ISSUED_ORDER)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function O0IOO1O))
call I1I01O(I1IIIO,"O0IO0OO",5.9)
set t=null
set I1IIIO=null
endfunction
function O0IO00O takes nothing returns boolean
if GetIssuedOrderId()==String2OrderIdBJ("phaseshift")and IsUnitIllusion(GetTriggerUnit())==false and I1IO0O(GetTriggerUnit(),"O0IO0OO")==false then
call O0IO0OO()
endif
return false
endfunction
function I1O0I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function O0IO00O))
set t=null
endfunction
function O0IO0IO takes unit OOI0I0,unit OOI010,integer IO0O0I returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(OOI0I0),1697656901,GetUnitX(OOI010),GetUnitY(OOI010),0)
call UnitAddAbility(O11O1I,1093686087)
call SetUnitAbilityLevel(O11O1I,1093686087,IO0O0I)
call IssueTargetOrder(O11O1I,"thunderbolt",OOI010)
call OII1O0(OOI0I0,OOI010,1,IO0O0I*50+50)
set O11O1I=null
endfunction
function O0IO01O takes unit OOI0I0,unit OOI010 returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(OOI0I0),1697656901,GetUnitX(OOI010),GetUnitY(OOI010),0)
call UnitAddAbility(O11O1I,1093686086)
call IssueTargetOrder(O11O1I,"thunderbolt",OOI010)
set O11O1I=null
endfunction
function O0IOIOO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer IO0O0I=II000O(I1I0IO,"Level")
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local unit OOI010=IIO1OO(I1I0IO,"Target")
local lightning O0OI00=II0OIO(I1I0IO,"Light")
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call DestroyLightning(O0OI00)
call I0111O(I1I0IO)
call I10I1O(t)
else
call MoveLightning(O0OI00,true,GetUnitX(OOI0I0),GetUnitY(OOI0I0),GetUnitX(OOI010),GetUnitY(OOI010))
if OOI100(GetUnitX(OOI0I0),GetUnitY(OOI0I0),GetUnitX(OOI010),GetUnitY(OOI010))>600 then
call DestroyLightning(O0OI00)
call I0111O(I1I0IO)
call I10I1O(t)
call O0IO0IO(OOI0I0,OOI010,IO0O0I)
endif
endif
set t=null
set OOI0I0=null
set OOI010=null
set O0OI00=null
return false
endfunction
function O0IOI0O takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local lightning O0OI00=AddLightning("HWPB",true,GetUnitX(OOOO1O),GetUnitY(OOOO1O),GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()))
call SetLightningColor(O0OI00,0,.7,1,1)
call IIOOIO(I1I0IO,"Light",O0OI00)
call IIOOIO(I1I0IO,"Source",OOOO1O)
call IIOOIO(I1I0IO,"Target",GetEnumUnit())
call IIO00O(I1I0IO,"Level",I1III)
call TriggerRegisterTimerEvent(t,0.03,true)
call TriggerRegisterUnitEvent(t,GetEnumUnit(),EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,OOOO1O,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function O0IOIOO))
call OII1O0(GetTriggerUnit(),GetEnumUnit(),1,I11II)
call O0IO01O(GetTriggerUnit(),GetEnumUnit())
set t=null
set O0OI00=null
endfunction
function O0IOIIO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656917,x,y,0)
local group g=CreateGroup()
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093686072)
local real O0IOI1O=5
call RemoveLocation(l)
call SetUnitAnimation(O11O1I,"channel")
call OIOI10(O11O1I,O0IOI1O)
set OOOO1O=O11O1I
set I110I=O0IOI1O
set I11II=IO0O0I*50+50
set I1III=IO0O0I
call GroupEnumUnitsInRange(g,x,y,400,Condition(function OIIOO0))
call ForGroup(g,function O0IOI0O)
call DestroyGroup(g)
set g=null
set O11O1I=null
set I1IIIO=null
set l=null
endfunction
function O0IO1OO takes nothing returns boolean
if GetSpellAbilityId()==1093686072 then
call O0IOIIO()
endif
return false
endfunction
function I1O010 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O0IO1OO))
set t=null
endfunction
function O0IO10O takes nothing returns boolean
return GetSpellAbilityId()==1093678673
endfunction
function O0IO1IO takes nothing returns nothing
local destructable array dx
local integer IIII0O
local integer IIIIIO
local fogmodifier FogVar
local unit O11O1I=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local location O0O1IIO=GetUnitLoc(OOI010)
call O01000(CreateFogModifierRadiusLocBJ(true,GetOwningPlayer(O11O1I),FOG_OF_WAR_VISIBLE,O0O1IIO,1000.00),2.25+0.75*GetUnitAbilityLevel(O11O1I,1093678673))
set IIII0O=1
set IIIIIO=8
loop
exitwhen IIII0O>IIIIIO
call O01010(CreateDestructableLoc(1110454325,I0011O(O0O1IIO,150.00,(I2R(IIII0O)*45.00)),GetRandomReal(0,360),1,0),2.25+0.75*GetUnitAbilityLevel(O11O1I,1093678673))
set IIII0O=IIII0O+1
endloop
call RemoveLocation(O0O1IIO)
endfunction
function O0IO11O takes nothing returns nothing
if GetSpellAbilityId()==1093678673 and IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and II001O(I011OO(GetOwningPlayer(GetSpellTargetUnit())),"DisableHelp")then
call OOO010(GetTriggerUnit())
call I11I1O(GetOwningPlayer(GetTriggerUnit()),"This target has disablehelp on")
endif
endfunction
function IO00O0 takes nothing returns nothing
local trigger t
set OI1OI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OI1OI,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(OI1OI,Condition(function O0IO10O))
call TriggerAddAction(OI1OI,function O0IO1IO)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddAction(t,function O0IO11O)
endfunction
constant function O0I0OOO takes nothing returns integer
return 1093677391
endfunction
function O0I0O0O takes nothing returns boolean
return GetSpellAbilityId()==O0I0OOO()
endfunction
function O0I0OIO takes nothing returns nothing
local location O000OI=GetSpellTargetLoc()
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl",GetLocationX(O000OI),GetLocationY(O000OI)))
call RemoveLocation(O000OI)
endfunction
function IO0000 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_CHANNEL)
call TriggerAddCondition(t,Condition(function O0I0O0O))
call TriggerAddAction(t,function O0I0OIO)
endfunction
function O0I0O1O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer IO0O0I=II000O(I1I0IO,"Level")
local unit OOI010=IIO1OO(I1I0IO,"Target")
local integer O0I00OO=I1II1O(OOI010)
local real OOI0O0=GetUnitState(OOI010,UNIT_STATE_LIFE)
local real O0I000O=GetUnitState(OOI010,UNIT_STATE_MAX_LIFE)
local real O0I00IO
if OOI0O0/ O0I000O>0.4 then
set O0I00IO=I2R(IO0O0I)/ 4*0.2*O0I00OO+2*IO0O0I
else
set O0I00IO=I2R(IO0O0I)/ 4*0.6*O0I00OO+2*IO0O0I
endif
if GetTriggerEvalCount(t)>16 then
call DestroyEffect(II0O0O(I1I0IO,"Effect"))
call UnitRemoveAbility(OOI010,1093685583)
call I0110O(I1I0IO)
call I10I1O(t)
else
call SetUnitState(OOI010,UNIT_STATE_LIFE,OOI0O0+O0I00IO)
endif
set OOI010=null
set t=null
return false
endfunction
function O0I001O takes nothing returns nothing
local unit OOI010=GetSpellTargetUnit()
local unit OOI0I0=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,1093685584)
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function O0I0O1O))
call IIO00O(I1I0IO,"Level",IO0O0I)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIOOIO(I1I0IO,"Effect",AddSpecialEffectTarget("InnerVitality.mdx",OOI010,"chest"))
call UnitAddAbility(OOI010,1093685583)
call SetUnitAbilityLevel(OOI010,1093685583,IO0O0I)
set OOI010=null
set OOI0I0=null
set t=null
endfunction
function O0I0IOO takes nothing returns boolean
if GetSpellAbilityId()==1093685584 then
call O0I001O()
endif
return false
endfunction
function II1OO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O0I0IOO))
endfunction
function O0I0I0O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local string O0I0IIO
local string O0I0I1O
local integer O0I01OO
local unit OOI010=IIO1OO(I1I0IO,"Target")
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
if GetTriggerEvalCount(t)>6 or I1I11O(OOI010)then
call DestroyEffect(II0O0O(I1I0IO,"Effect"))
call I0110O(I1I0IO)
set O0I0IIO=I011OO(OOI0I0)
set O0I0I1O=I011OO(OOI010)+"NumOfSpears"
set O0I01OO=II000O(O0I0IIO,O0I0I1O)
set O0I01OO=O0I01OO-1
if O0I01OO==0 then
call IIOOOO(O0I0IIO,O0I0I1O)
else
call IIO00O(O0I0IIO,O0I0I1O,O0I01OO)
endif
call I10I1O(t)
else
call OII1O0(OOI0I0,OOI010,1,4+2*GetUnitAbilityLevel(OOI0I0,1093685582))
endif
set t=null
set OOI010=null
set OOI0I0=null
return false
endfunction
function O0I010O takes unit OOI0I0,unit OOI010 returns nothing
local string I1I0IO=I011OO(OOI0I0)
local string O0I0IIO
local trigger t
local integer O0I01IO=II000O(I1I0IO,I011OO(OOI010)+"NumOfSpears")
if O0I01IO<5 then
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function O0I0I0O))
set O0I0IIO=I011OO(t)
call IIOOIO(O0I0IIO,"Source",OOI0I0)
call IIOOIO(O0I0IIO,"Target",OOI010)
call IIO00O(I1I0IO,I011OO(OOI010)+"NumOfSpears",O0I01IO+1)
call IIOOIO(O0I0IIO,"Effect",AddSpecialEffectTarget("Abilities\\Spells\\Other\\BreathOfFire\\BreathOfFireDamage.mdl",OOI010,"chest"))
endif
set t=null
endfunction
function O0I011O takes nothing returns boolean
local real d
if GetUnitAbilityLevel(GetTriggerUnit(),1110456369)>0 and GetUnitAbilityLevel(GetEventDamageSource(),1093685582)>0 and IIO1OO(I011OO(GetTriggeringTrigger()),"Source")==GetEventDamageSource()then
call SetUnitState(GetEventDamageSource(),UNIT_STATE_LIFE,OO01I0(GetUnitState(GetEventDamageSource(),UNIT_STATE_LIFE)-15,1))
call UnitRemoveAbility(GetTriggerUnit(),1110456369)
call O0I010O(GetEventDamageSource(),GetTriggerUnit())
call DisableTrigger(GetTriggeringTrigger())
call I0110O(I011OO(GetTriggeringTrigger()))
call I10I1O(GetTriggeringTrigger())
endif
return false
endfunction
function O0IIOOO takes nothing returns nothing
local trigger t
local unit OOI010
local unit OOI0I0
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
set OOI010=GetSpellTargetUnit()
set OOI0I0=GetTriggerUnit()
else
set OOI010=GetTriggerUnit()
set OOI0I0=GetAttacker()
endif
if IsUnitIllusion(OOI0I0)==false then
set t=CreateTrigger()
call IIOOIO(I011OO(t),"Source",OOI0I0)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function O0I011O))
endif
set t=null
set OOI010=null
set OOI0I0=null
endfunction
function O0IIO0O takes unit III1IO returns nothing
call SetUnitState(III1IO,UNIT_STATE_MANA,GetUnitState(III1IO,UNIT_STATE_MANA)+15+5*GetUnitAbilityLevel(III1IO,1093685582))
endfunction
function O0IIOIO takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if GetUnitAbilityLevel(GetAttacker(),1093685582)>0 and II001O(I011OO(GetTriggeringTrigger()),"OrbOn")and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==IIO1OO(I011OO(GetTriggeringTrigger()),"Hero")then
if GetUnitState(GetAttacker(),UNIT_STATE_LIFE)<100 then
return false
endif
call O0IIOOO()
endif
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if(GetIssuedOrderId()==OrderId("poisonarrows"))then
call IIOI0O(I011OO(GetTriggeringTrigger()),"OrbOn",true)
elseif(GetIssuedOrderId()==OrderId("unpoisonarrows"))then
call IIOI0O(I011OO(GetTriggeringTrigger()),"OrbOn",false)
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093685582 then
if GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)<100 then
call O0IIO0O(GetTriggerUnit())
return false
endif
call O0IIOOO()
endif
return false
endfunction
function O0IIO1O takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function O0IIOIO))
call IIOOIO(I011OO(t),"Hero",GetTriggerUnit())
set t=null
endfunction
function O0II0OO takes nothing returns boolean
if GetLearnedSkill()==1093685582 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093685582)==1 then
call O0IIO1O()
endif
return false
endfunction
function II1O00 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function O0II0OO))
set t=null
endfunction
function O0II00O takes nothing returns boolean
local string I1I0IO=I011OO(GetTriggeringTrigger())
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local real CurrentHealth=GetUnitState(I1IIIO,UNIT_STATE_LIFE)
local real MaxHealth=GetUnitState(I1IIIO,UNIT_STATE_MAX_LIFE)
local integer O0II0IO
local integer O0II01O
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093685585)
if IsUnitType(I1IIIO,UNIT_TYPE_HERO)==true and IO0O0I>0 then
set O0II0IO=R2I(100*GetUnitState(I1IIIO,UNIT_STATE_LIFE)/ GetUnitState(I1IIIO,UNIT_STATE_MAX_LIFE))
set O0II01O=OO0I10(OO0II0(R2I(100-O0II0IO)/ 7,7),1)
if I1I11O(I1IIIO)==false then
call SetUnitAbilityLevel(I1IIIO,1093685842,IO0O0I*O0II01O)
call SetUnitAbilityLevel(I1IIIO,1093685843,IO0O0I*O0II01O)
endif
endif
set I1IIIO=null
return false
endfunction
function O0IIIOO takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,0.5,true)
call TriggerAddCondition(t,Condition(function O0II00O))
call IIOOIO(I011OO(t),"Hero",GetTriggerUnit())
call UnitAddAbility(GetTriggerUnit(),1093685842)
call UnitAddAbility(GetTriggerUnit(),1093685843)
set t=null
endfunction
function O0III0O takes nothing returns boolean
if GetLearnedSkill()==1093685585 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093685585)==1 then
call O0IIIOO()
endif
return false
endfunction
function II1OI0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function O0III0O))
set t=null
call OO0OO0(1093685842)
call OO0OO0(1093685843)
endfunction
function O0IIIIO takes nothing returns boolean
local unit OOI0I0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local unit O11O1I=CreateUnit(GetOwningPlayer(OOI0I0),1697656901,GetUnitX(OOI010),GetUnitY(OOI010),0)
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,1093685586)
local real O0III1O
call UnitAddAbility(O11O1I,1093685589)
call SetUnitAbilityLevel(O11O1I,1093685589,IO0O0I)
call IssueTargetOrder(O11O1I,"slow",OOI010)
if IO0O0I==1 then
set O0III1O=0.4
elseif IO0O0I==2 then
set O0III1O=0.33
else
set O0III1O=0.25
endif
call OII1O0(OOI0I0,OOI0I0,1,GetUnitState(OOI0I0,UNIT_STATE_LIFE)*O0III1O)
call OII1O0(OOI0I0,OOI010,1,GetUnitState(OOI010,UNIT_STATE_LIFE)*0.4)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",OOI0I0,"chest"))
call DestroyEffect(AddSpecialEffectTarget("effects\\LifeBreak.mdx",OOI010,"chest"))
set OOI0I0=null
set OOI010=null
set O11O1I=null
return false
endfunction
function O0II1OO takes nothing returns boolean
if GetSpellAbilityId()==1093685586 then
call O0IIIIO()
endif
return false
endfunction
function II1O10 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O0II1OO))
set t=null
call OO0OO0(1093685589)
endfunction
function O0II10O takes real x1,real y1,real x2,real y2,real x3,real y3,real x,real y returns boolean
local real O0II1IO=(y-y1)*(x2-x1)-(x-x1)*(y2-y1)
local real O0II11O=(y-y3)*(x1-x3)-(x-x3)*(y1-y3)
local real O0I1OOO=(y-y2)*(x3-x2)-(x-x2)*(y3-y2)
return(O0II1IO*O0II11O>0)and(O0I1OOO*O0II11O>0)
endfunction
function O0I1O0O takes nothing returns boolean
local real O0I1OIO=I110I
local real O0I1O1O=I11II
local real O0I10OO=I111I
local real O0I100O=OOOOOO
local real O0I10IO=OOOO0O
local real O0I101O=OOOOIO
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and O0II10O(O0I1OIO,O0I1O1O,O0I10OO,O0I100O,O0I10IO,O0I101O,GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()))
endfunction
function O0I1IOO takes real O0I1I0O,real O0I1IIO,real O0I1I1O returns nothing
local real O0I11OO=550
local real O0I110O=200
local real O0I11IO=250
local real O0I111O=Asin((O0I11IO-O0I110O)/ O0I11OO)
local real x=O0I110O/ Sin(O0I111O)
local real y=(O0I11OO+O0I11IO+x)*Tan(O0I111O)
local real O0I1OIO=O0I1IIO+x*Cos((O0I1I0O-180)*bj_DEGTORAD)
local real O0I1O1O=O0I1I1O+x*Sin((O0I1I0O-180)*bj_DEGTORAD)
local real O0I10OO=(O0I1IIO+(O0I11OO+O0I11IO)*Cos(O0I1I0O*bj_DEGTORAD))+y*Cos((O0I1I0O-90)*bj_DEGTORAD)
local real O0I100O=(O0I1I1O+(O0I11OO+O0I11IO)*Sin(O0I1I0O*bj_DEGTORAD))+y*Sin((O0I1I0O-90)*bj_DEGTORAD)
local real O0I10IO=(O0I1IIO+(O0I11OO+O0I11IO)*Cos(O0I1I0O*bj_DEGTORAD))+y*Cos((O0I1I0O+90)*bj_DEGTORAD)
local real O0I101O=(O0I1I1O+(O0I11OO+O0I11IO)*Sin(O0I1I0O*bj_DEGTORAD))+y*Sin((O0I1I0O+90)*bj_DEGTORAD)
set I110I=O0I1OIO
set I11II=O0I1O1O
set I111I=O0I10OO
set OOOOOO=O0I100O
set OOOO0O=O0I10IO
set OOOOIO=O0I101O
endfunction
function O01OOOO takes nothing returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(GetTriggerUnit()),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call UnitAddAbility(O11O1I,1093685057)
call IssueTargetOrder(O11O1I,"frostnova",GetEnumUnit())
set O11O1I=null
endfunction
function O01OO0O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local player p=IIO10O(I1I0IO,"p")
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local real x=II00IO(I1I0IO,"x")
local real y=II00IO(I1I0IO,"y")
local real III11O=II00IO(I1I0IO,"TargetX")
local real II1OOO=II00IO(I1I0IO,"TargetY")
local integer IO0O0I=II000O(I1I0IO,"Level")
local unit O11O1I
if GetTriggerEvalCount(t)>1 then
call SetUnitAnimation(I1IIIO,"stand")
call I0111O(I1I0IO)
call I10I1O(t)
else
call SetUnitAnimation(I1IIIO,"spell")
set O11O1I=CreateUnit(p,1697656901,x,y,0)
call UnitAddAbility(O11O1I,1093685059)
call SetUnitAbilityLevel(O11O1I,1093685059,IO0O0I)
call IssuePointOrder(O11O1I,"breathoffrost",III11O,II1OOO)
endif
set t=null
set p=null
set I1IIIO=null
set O11O1I=null
return false
endfunction
function O01OOIO takes unit u,player p,integer IO0O0I,location l,real x,real y returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"p",p)
call IIO01O(I1I0IO,"x",x)
call IIO01O(I1I0IO,"y",y)
call IIO01O(I1I0IO,"TargetX",GetLocationX(l))
call IIO01O(I1I0IO,"TargetY",GetLocationY(l))
call IIO00O(I1I0IO,"Level",IO0O0I)
call IIOOIO(I1I0IO,"Hero",u)
call TriggerRegisterTimerEvent(t,0.3,true)
call TriggerAddCondition(t,Condition(function O01OO0O))
set t=null
endfunction
function O01OO1O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093685047)
local real x=GetUnitX(I1IIIO)
local real y=GetUnitY(I1IIIO)
local location l
local unit O11O1I
local group g=CreateGroup()
if GetSpellTargetUnit()==null then
set l=GetSpellTargetLoc()
else
set l=GetUnitLoc(GetSpellTargetUnit())
endif
call O0I1IOO(bj_RADTODEG*Atan2(GetLocationY(l)-y,GetLocationX(l)-x),x,y)
call GroupEnumUnitsInRange(g,x,y,2000,Condition(function O0I1O0O))
call ForGroup(g,function O01OOOO)
call DestroyGroup(g)
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656901,x,y,0)
call UnitAddAbility(O11O1I,1093685058)
call SetUnitAbilityLevel(O11O1I,1093685058,IO0O0I)
call IssuePointOrder(O11O1I,"breathoffire",GetLocationX(l),GetLocationY(l))
call O01OOIO(I1IIIO,GetOwningPlayer(I1IIIO),IO0O0I,l,x+50*Cos(Atan2(GetLocationY(l)-y,GetLocationX(l)-x)),y+50*Sin(Atan2(GetLocationY(l)-y,GetLocationX(l)-x)))
call RemoveLocation(l)
set I1IIIO=null
set l=null
set g=null
endfunction
function O01O0OO takes nothing returns boolean
if GetSpellAbilityId()==1093685047 then
call O01OO1O()
endif
return false
endfunction
function O110I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O01O0OO))
call OO0OO0(1093685058)
call OO0OO0(1093685059)
call OO0OO0(1093685057)
set t=null
endfunction
function O01O00O takes nothing returns integer
return 1093685046
endfunction
function O01O0IO takes nothing returns integer
return 1093685062
endfunction
function O01O01O takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false)and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetDyingUnit())))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0))
endfunction
function O01OIOO takes nothing returns boolean
return GetUnitTypeId(GetDyingUnit())==1697657173
endfunction
function O01OI0O takes nothing returns nothing
local unit u=GetDyingUnit()
local integer O0OI1OO=GetUnitUserData(u)
local group g
local unit O01OIIO
local unit O01OI1O
local boolexpr II1OIO=Condition(function O01O01O)
set g=CreateGroup()
call GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),175,II1OIO)
loop
set O01OI1O=FirstOfGroup(g)
exitwhen(O01OI1O==null)
call GroupRemoveUnit(g,O01OI1O)
set O01OIIO=CreateUnit(GetOwningPlayer(u),1697656901,GetUnitX(O01OI1O),GetUnitY(O01OI1O),0)
call UnitAddAbility(O01OIIO,O01O0IO())
call SetUnitAbilityLevel(O01OIIO,O01O0IO(),O0OI1OO)
call IssueTargetOrder(O01OIIO,"thunderbolt",O01OI1O)
call UnitApplyTimedLife(O01OIIO,1112820806,1)
call UnitAddAbility(O01OIIO,1097625443)
endloop
call DestroyGroup(g)
call DestroyBoolExpr(II1OIO)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathMissile.mdl",GetUnitX(u),GetUnitY(u)))
endfunction
function O01O1OO takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,O01O00O())
local real x=II00IO(I1I0IO,"IcePathX")
local real y=II00IO(I1I0IO,"IcePathY")
local real OO1IOOO=II00IO(I1I0IO,"IcePathAngle")
local unit O01OIIO
local integer OO10OOO=II000O(I1I0IO,"IcePath|Counter")
set x=x+100*Cos(OO1IOOO*bj_DEGTORAD)
set y=y+100*Sin(OO1IOOO*bj_DEGTORAD)
call IIO01O(I1I0IO,"IcePathX",x)
call IIO01O(I1I0IO,"IcePathY",y)
set O01OIIO=CreateUnit(GetOwningPlayer(I1IIIO),1697657173,x,y,GetRandomReal(0,359))
call UnitApplyTimedLife(O01OIIO,1112820806,0.5)
call SetUnitUserData(O01OIIO,IO0O0I)
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",x,y))
set OO10OOO=OO10OOO+1
call IIO00O(I1I0IO,"IcePath|Counter",OO10OOO)
if OO10OOO>=10 then
call PauseTimer(t)
call I0110O(I1I0IO)
call DestroyTimer(t)
endif
endfunction
function O01O10O takes nothing returns boolean
return GetSpellAbilityId()==O01O00O()
endfunction
function O01O1IO takes nothing returns nothing
local timer t=CreateTimer()
local unit I1IIIO=GetTriggerUnit()
local location O0O1IIO=GetSpellTargetLoc()
local location O01O11O=GetUnitLoc(I1IIIO)
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIO01O(I1I0IO,"IcePathX",GetUnitX(I1IIIO))
call IIO01O(I1I0IO,"IcePathY",GetUnitY(I1IIIO))
call IIO01O(I1I0IO,"IcePathAngle",AngleBetweenPoints(O01O11O,O0O1IIO))
call IIO00O(I1I0IO,"IcePath|Counter",0)
call RemoveLocation(O01O11O)
call RemoveLocation(O0O1IIO)
call TimerStart(t,0.05,true,function O01O1OO)
endfunction
function O11IO0 takes nothing returns nothing
local trigger O010OOO=CreateTrigger()
set OI10I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O010OOO,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(O010OOO,Condition(function O01OIOO))
call TriggerAddAction(O010OOO,function O01OI0O)
call TriggerRegisterAnyUnitEventBJ(OI10I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(OI10I,Condition(function O01O10O))
call TriggerAddAction(OI10I,function O01O1IO)
endfunction
function O010O0O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit O11O1I=IIO1OO(I1I0IO,"Caster")
call I0111O(I1I0IO)
call I10I1O(t)
call UnitAddAbility(O11O1I,1096971630)
set t=null
set O11O1I=null
return false
endfunction
function O010OIO takes nothing returns nothing
local unit OOI0I0=GetAttacker()
local unit OOI010=GetTriggerUnit()
local real x=GetUnitX(OOI0I0)
local real y=GetUnitY(OOI0I0)
local unit O11O1I=CreateUnit(GetOwningPlayer(OOI0I0),1697656887,x,y,0)
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,1093685048)
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,3,false)
call TriggerAddCondition(t,Condition(function O010O0O))
call IIOOIO(I011OO(t),"Caster",O11O1I)
call UnitAddAbility(O11O1I,1093685060)
call SetUnitAbilityLevel(O11O1I,1093685060,IO0O0I)
call IssueTargetOrder(O11O1I,"attack",OOI010)
call UnitApplyTimedLife(O11O1I,1112820806,10)
set t=null
set OOI0I0=null
set OOI010=null
set O11O1I=null
endfunction
function O010O1O takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),1093685048)>0 and IsUnitEnemy(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))and GetRandomInt(0,100)<(GetUnitAbilityLevel(GetAttacker(),1093685048)*5+20)then
call O010OIO()
endif
return false
endfunction
function O11010 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function O010O1O))
set t=null
endfunction
constant function O0100OO takes nothing returns integer
return 1093685045
endfunction
constant function O01000O takes nothing returns integer
return 1093685061
endfunction
function O0100IO takes nothing returns boolean
return GetSpellAbilityId()==O0100OO()
endfunction
function O01001O takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local unit OOOIO0=IIO1OO(I1I0IO,"UnitVar")
local player II01IO=GetOwningPlayer(OOOIO0)
local real OO1IOOO=II00IO(I1I0IO,"Angle")
local integer IO0O0I=GetUnitAbilityLevel(OOOIO0,O0100OO())
local integer O010IOO=II000O(I1I0IO,"Count")
local location O010I0O=II0O1O(I1I0IO,"SourceLoc")
local real OOIO11O=GetLocationX(O010I0O)+150*(3+IO0O0I-O010IOO+1)*Cos(OO1IOOO)
local real OOI0OOO=GetLocationY(O010I0O)+150*(3+IO0O0I-O010IOO+1)*Sin(OO1IOOO)
local unit O010IIO=CreateUnit(II01IO,1697656901,OOIO11O,OOI0OOO,0)
call UnitAddAbility(O010IIO,O01000O())
call SetUnitAbilityLevel(O010IIO,O01000O(),IO0O0I)
call IssuePointOrder(O010IIO,"flamestrike",OOIO11O,OOI0OOO)
set O010IOO=O010IOO-1
call IIO00O(I1I0IO,"Count",O010IOO)
if O010IOO==0 or GetUnitState(OOOIO0,UNIT_STATE_LIFE)<1 then
call PauseTimer(t)
call I0110O(I1I0IO)
call RemoveLocation(O010I0O)
call SetUnitAnimation(OOOIO0,"stand")
call DestroyTimer(t)
endif
endfunction
function O010I1O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local location O0O1IIO=GetSpellTargetLoc()
local timer t=CreateTimer()
local string I1I0IO=I011OO(t)
local integer IO0O0I=GetUnitAbilityLevel(OOOIO0,O0100OO())
call SetUnitAnimation(OOOIO0,"spell")
call IIO00O(I1I0IO,"Count",3+IO0O0I)
call IIO01O(I1I0IO,"Angle",Atan2(GetLocationY(O0O1IIO)-GetUnitY(OOOIO0),GetLocationX(O0O1IIO)-GetUnitX(OOOIO0)))
call IIOOIO(I1I0IO,"UnitVar",OOOIO0)
call IIOOIO(I1I0IO,"SourceLoc",GetUnitLoc(OOOIO0))
call TimerStart(t,0.2,true,function O01001O)
call RemoveLocation(O0O1IIO)
endfunction
function O11I00 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O0100IO))
call TriggerAddAction(t,function O010I1O)
endfunction
function O0101OO takes nothing returns boolean
return GetUnitTypeId(GetSummonedUnit())==1865429059
endfunction
function O01010O takes nothing returns nothing
call SetUnitAbilityLevelSwapped(1093678392,GetSummonedUnit(),GetUnitAbilityLevelSwapped(1093678135,GetSummoningUnit()))
endfunction
function IO00I0 takes nothing returns nothing
set OI1II=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OI1II,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(OI1II,Condition(function O0101OO))
call TriggerAddAction(OI1II,function O01010O)
endfunction
function O0101IO takes unit I1IIIO,unit OOI010 returns nothing
local real a=GetRandomReal(0,360)
local real x=GetUnitX(OOI010)+50*Cos(a*bj_DEGTORAD)
local real y=GetUnitY(OOI010)+50*Sin(a*bj_DEGTORAD)
call SetUnitPosition(I1IIIO,x,y)
call SetUnitFacing(I1IIIO,bj_RADTODEG*Atan2(GetUnitY(OOI010)-GetUnitY(I1IIIO),GetUnitX(OOI010)-GetUnitX(I1IIIO)))
call SetUnitAnimation(I1IIIO,"Attack")
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",I1IIIO,"chest"))
call OII1O0(I1IIIO,OOI010,2,GetRandomReal(150,250))
call IssueTargetOrder(I1IIIO,"attack",OOI010)
endfunction
function O01011O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local unit OOI010=IIO1OO(I1I0IO,"Target")
call O0101IO(I1IIIO,OOI010)
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set I1IIIO=null
set OOI010=null
return false
endfunction
function O01IOOO takes unit I1IIIO returns nothing
local group g=CreateGroup()
set OOOO1O=I1IIIO
call GroupEnumUnitsInRange(g,GetUnitX(I1IIIO),GetUnitY(I1IIIO),575,Condition(function OII0I0))
set OOOO1O=GroupPickRandomUnit(g)
if OOOO1O!=null then
call O0101IO(I1IIIO,OOOO1O)
endif
call DestroyGroup(g)
set g=null
endfunction
function O01IO0O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local integer O01IOIO=II000O(I1I0IO,"Limit")
local integer O01IO1O=II000O(I1I0IO,"BFLevel")
local integer OO10OOO=II000O(I1I0IO,"Counter")
local unit O01I0OO
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELECTED then
if GetTriggerUnit()==I1IIIO and GetLocalPlayer()==GetOwningPlayer(I1IIIO)then
call SelectUnit(I1IIIO,false)
endif
elseif OO10OOO>O01IOIO then
call DestroyEffect(II0O0O(I1I0IO,"FX"))
call I0111O(I1I0IO)
call I10I1O(t)
if O01IO1O>0 then
call SetPlayerAbilityAvailable(GetOwningPlayer(I1IIIO),1093678407,true)
endif
call SetUnitPathing(I1IIIO,true)
call SetUnitInvulnerable(I1IIIO,false)
call SetUnitVertexColor(I1IIIO,255,255,255,255)
call ClearSelectionForPlayer(GetOwningPlayer(I1IIIO))
call SelectUnitAddForPlayer(I1IIIO,GetOwningPlayer(I1IIIO))
else
call IIO00O(I1I0IO,"Counter",OO10OOO+1)
call O01IOOO(I1IIIO)
if OOOO1O==null then
call DestroyEffect(II0O0O(I1I0IO,"FX"))
call I0111O(I1I0IO)
call I10I1O(t)
if O01IO1O>0 then
call SetPlayerAbilityAvailable(GetOwningPlayer(I1IIIO),1093678407,true)
endif
call SetUnitPathing(I1IIIO,true)
call SetUnitInvulnerable(I1IIIO,false)
call SetUnitVertexColor(I1IIIO,255,255,255,255)
call ClearSelectionForPlayer(GetOwningPlayer(I1IIIO))
call SelectUnitAddForPlayer(I1IIIO,GetOwningPlayer(I1IIIO))
endif
endif
set t=null
set I1IIIO=null
set O01I0OO=null
return false
endfunction
function O01I00O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093684529)
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local integer O01IO1O=GetUnitAbilityLevel(I1IIIO,1093678407)
local player p=GetOwningPlayer(I1IIIO)
local integer O01IOIO=3
if IO0O0I==2 then
set O01IOIO=5
elseif IO0O0I==3 then
set O01IOIO=8
endif
if O01IO1O>0 then
call SetPlayerAbilityAvailable(p,1093678407,false)
endif
if GetLocalPlayer()==p then
call SelectUnit(I1IIIO,false)
endif
call SetUnitVertexColor(I1IIIO,255,255,255,125)
call SetUnitPathing(I1IIIO,false)
call SetUnitInvulnerable(I1IIIO,true)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIOOIO(I1I0IO,"Target",OOI010)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function O01011O))
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIO00O(I1I0IO,"Limit",O01IOIO)
call IIO00O(I1I0IO,"BFLevel",O01IO1O)
call IIO00O(I1I0IO,"Counter",2)
call IIOOIO(I1I0IO,"FX",AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl",I1IIIO,"weapon"))
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SELECTED,Condition(function OI0O00))
call TriggerRegisterTimerEvent(t,0.4,true)
call TriggerAddCondition(t,Condition(function O01IO0O))
set I1IIIO=null
set OOI010=null
set t=null
set p=null
endfunction
function O01I0IO takes nothing returns boolean
if GetSpellAbilityId()==1093684529 then
call O01I00O()
endif
return false
endfunction
function IO0010 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O01I0IO))
set t=null
endfunction
function O01I01O takes nothing returns boolean
return GetSpellAbilityId()==1093678937
endfunction
function O01IIOO takes nothing returns nothing
call IIO00O(I011OO(GetSpellTargetUnit()),"ManaLeakLevel",GetUnitAbilityLevel(GetTriggerUnit(),1093678937))
endfunction
function IO0IO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O01I01O))
call TriggerAddAction(t,function O01IIOO)
endfunction
function O01II0O takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),1110455126)>0
endfunction
function O01IIIO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local integer IO0O0I=II000O(I011OO(OOOIO0),"ManaLeakLevel")
call SetUnitManaBJ(GetTriggerUnit(),(GetUnitStateSwap(UNIT_STATE_MANA,GetTriggerUnit())*(0.20*(5.00-I2R(IO0O0I)))))
endfunction
function IO0I00 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O01II0O))
call TriggerAddAction(t,function O01IIIO)
endfunction
function O01II1O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
local real O01I1OO=II00IO(I1I0IO,"Mana")
call SetUnitState(OOI010,UNIT_STATE_MANA,GetUnitState(OOI010,UNIT_STATE_MANA)+O01I1OO)
call I0111O(I1I0IO)
call I10I1O(t)
set OOI010=null
set t=null
return false
endfunction
function O01I10O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIO01O(I1I0IO,"Mana",75*GetUnitAbilityLevel(I1IIIO,1093678926))
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function O01II1O))
set t=null
set I1IIIO=null
set OOI010=null
endfunction
function O01I1IO takes nothing returns boolean
if GetSpellAbilityId()==1093678926 then
call O01I10O()
endif
return false
endfunction
function IO0II0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O01I1IO))
set t=null
endfunction
function O01I11O takes unit O011OOO,integer O011O0O,unit I1IIIO returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(O011OOO),1697656901,GetUnitX(O011OOO),GetUnitY(O011OOO),0)
local real x=GetUnitX(O11O1I)+175*Cos(GetUnitFacing(I1IIIO)*bj_DEGTORAD)
local real y=GetUnitY(O11O1I)+175*Sin(GetUnitFacing(I1IIIO)*bj_DEGTORAD)
call UnitAddAbility(O11O1I,1093679159)
call SetUnitAbilityLevel(O11O1I,1093679159,O011O0O)
call IssuePointOrder(O11O1I,"breathoffire",x,y)
call KillUnit(O011OOO)
set O11O1I=null
endfunction
function O011OIO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer O011O0O=GetTriggerEvalCount(t)-1
local unit O11O1I=IIO1OO(I1I0IO,"Caster")
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local real x=GetUnitX(I1IIIO)+150*Cos(GetUnitFacing(I1IIIO)*bj_DEGTORAD)
local real y=GetUnitY(I1IIIO)+150*Sin(GetUnitFacing(I1IIIO)*bj_DEGTORAD)
call SetUnitX(O11O1I,x)
call SetUnitY(O11O1I,y)
call SetUnitScale(O11O1I,I2R(100+20*O011O0O)/ 100,I2R(100+20*O011O0O)/ 100,I2R(100+20*O011O0O)/ 100)
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST then
call O01I11O(O11O1I,O011O0O,I1IIIO)
call I0111O(I1I0IO)
call I10I1O(t)
endif
set t=null
set O11O1I=null
set I1IIIO=null
return false
endfunction
function O011O1O takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=GetTriggerUnit()
local real x=GetUnitX(I1IIIO)+150*Cos(GetUnitFacing(I1IIIO)*bj_DEGTORAD)
local real y=GetUnitY(I1IIIO)+150*Sin(GetUnitFacing(I1IIIO)*bj_DEGTORAD)
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1966092362,x,y,GetUnitFacing(I1IIIO))
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIOOIO(I1I0IO,"Caster",O11O1I)
call TriggerRegisterTimerEvent(t,0.5,true)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t,Condition(function O011OIO))
set t=null
set I1IIIO=null
set O11O1I=null
endfunction
function O0110OO takes nothing returns boolean
if GetSpellAbilityId()==1093679157 then
call O011O1O()
endif
return false
endfunction
function IO0I10 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O0110OO))
set t=null
endfunction
function O01100O takes nothing returns boolean
return GetSpellAbilityId()==1093678388 or GetSpellAbilityId()==1093677141
endfunction
function O0110IO takes nothing returns boolean
local unit O01101O=GetFilterUnit()
if IsUnitType(O01101O,UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(O01101O,1093678162)==0 then
if GetUnitState(O01101O,UNIT_STATE_LIFE)>0 and IsUnitVisible(O01101O,GetOwningPlayer(O00I))and IsUnitEnemy(O01101O,GetOwningPlayer(O00I))then
if II000O(I011OO(O000O),I011OO(O01101O))<O0II then
return true
endif
endif
endif
return false
endfunction
function O011IOO takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit O011I0O=IIO1OO(I1I0IO,"Luna")
local integer O01IOIO=II000O(I1I0IO,"Limit")
local integer O011IIO
local integer O011I1O
local integer O0111OO=GetUnitAbilityLevel(O011I0O,1093678130)
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function O0110IO)
local unit OOI010
local unit O11O1I
if GetUnitAbilityLevel(O011I0O,1093678388)>0 then
set O011IIO=4
else
set O011IIO=5
endif
set O0111OO=4
if O0111OO==2 then
set O011I1O=1093677873
elseif O0111OO==3 then
set O011I1O=1093677874
elseif O0111OO==4 then
set O011I1O=1093677875
else
set O011I1O=1093678415
endif
set O00I=O011I0O
set O0II=O011IIO
set O000O=t
call GroupEnumUnitsInRange(II1O0O,GetUnitX(O011I0O),GetUnitY(O011I0O),700,II1OIO)
call DestroyBoolExpr(II1OIO)
set OOI010=GroupPickRandomUnit(II1O0O)
call DestroyGroup(II1O0O)
if OOI010!=null then
call IIO00O(I1I0IO,I011OO(OOI010),II000O(I1I0IO,I011OO(OOI010))+1)
set O11O1I=CreateUnit(GetOwningPlayer(O011I0O),1697656899,GetUnitX(O011I0O),GetUnitY(O011I0O),0)
call UnitAddAbility(O11O1I,O011I1O)
call IssueTargetOrder(O11O1I,"firebolt",OOI010)
call UnitApplyTimedLife(O11O1I,1112820806,2.00)
call SetUnitPathing(O11O1I,false)
call SetUnitInvulnerable(O11O1I,true)
call UnitAddAbility(O11O1I,1097625443)
endif
set O01IOIO=O01IOIO-1
if O01IOIO==0 then
call I0110O(I1I0IO)
call I10I1O(t)
else
call IIO00O(I1I0IO,"Limit",O01IOIO)
endif
endfunction
function O01110O takes nothing returns nothing
local unit O011I0O=GetTriggerUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local integer O01IOIO
if GetSpellAbilityId()==1093678388 then
set O01IOIO=1+3*GetUnitAbilityLevel(O011I0O,1093678388)
else
set O01IOIO=4*GetUnitAbilityLevel(O011I0O,1093677141)
endif
call IIOOIO(I1I0IO,"Luna",O011I0O)
call IIO00O(I1I0IO,"Limit",O01IOIO)
call TriggerAddAction(t,function O011IOO)
call TriggerExecute(t)
call TriggerRegisterTimerEvent(t,0.5,true)
endfunction
function IO01O0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O01100O))
call TriggerAddAction(t,function O01110O)
endfunction
function O0111IO takes nothing returns boolean
if(not(GetLearnedSkill()==1093678129))then
return false
endif
return true
endfunction
function O01111O takes nothing returns nothing
local unit O011I0O=GetTriggerUnit()
local player OIOOOOO=GetOwningPlayer(O011I0O)
local integer O0OI1OO=GetUnitAbilityLevelSwapped(1093678129,GetTriggerUnit())
call SetPlayerTechResearchedSwap(1382378855,O0OI1OO,OIOOOOO)
endfunction
function IO0100 takes nothing returns nothing
set OI11I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OI11I,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(OI11I,Condition(function O0111IO))
call TriggerAddAction(OI11I,function O01111O)
endfunction
constant function OIOOO0O takes nothing returns integer
return 1093684053
endfunction
constant function OIOOOIO takes nothing returns integer
return 1093684052
endfunction
function OIOOO1O takes nothing returns boolean
return GetSpellAbilityId()==OIOOO0O()
endfunction
function OIOO0OO takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function OIOO00O takes nothing returns nothing
call UnitAddAbility(GetEnumUnit(),OIOOOIO())
call SetUnitAbilityLevel(GetEnumUnit(),OIOOOIO(),O0II)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Invisibility\\InvisibilityTarget.mdl",GetEnumUnit(),"chest"))
endfunction
function OIOO0IO takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),OIOOOIO())
endfunction
function OIOO01O takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local group II1O0O=II0OOO(I1I0IO,"Group")
call ForGroup(II1O0O,function OIOO0IO)
call DestroyGroup(II1O0O)
call O0OOI0(t)
endfunction
function OIOOIOO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local boolexpr II1OIO=Condition(function OIOO0OO)
local group II1O0O=CreateGroup()
local timer t=CreateTimer()
local string I1I0IO=I011OO(t)
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,OIOOO0O())
local real O0IOI1O=5+2*IO0O0I
set O0II=IO0O0I
call GroupEnumUnitsInRange(II1O0O,0,0,9999,II1OIO)
call ForGroup(II1O0O,function OIOO00O)
call DestroyBoolExpr(II1OIO)
call IIOOIO(I1I0IO,"Group",II1O0O)
call TimerStart(t,O0IOI1O,false,function OIOO01O)
endfunction
function IIIOO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OIOOO1O))
call TriggerAddAction(t,function OIOOIOO)
endfunction
function OIOOI0O takes nothing returns nothing
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Starfall\\StarfallTarget.mdl",GetEnumUnit(),"origin"))
endfunction
function OIOOIIO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local unit OOI010=IIO1OO(I1I0IO,"Target")
call OII1O0(I1IIIO,OOI010,1,GetUnitAbilityLevel(I1IIIO,1093684054)*37.5)
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set I1IIIO=null
set OOI010=null
return false
endfunction
function OIOOI1O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local group g=CreateGroup()
local unit OOI010=IIO1OO(I1I0IO,"Target")
call DestroyEffect(II0O0O(I1I0IO,"FX"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Starfall\\StarfallTarget.mdl",OOI010,"origin"))
call I0111O(I1I0IO)
call I10I1O(t)
call DestroyGroup(g)
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIOOIO(I1I0IO,"Target",OOI010)
call TriggerRegisterTimerEvent(t,0.5,false)
call TriggerAddCondition(t,Condition(function OIOOIIO))
set t=null
set I1IIIO=null
set g=null
set OOI010=null
return false
endfunction
function OIOO1OO takes nothing returns nothing
call OII1O0(OOOO1O,GetEnumUnit(),1,I110I)
endfunction
function OIOO10O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local group g=II0OOO(I1I0IO,"g")
set I110I=GetUnitAbilityLevel(I1IIIO,1093684054)*75
set OOOO1O=I1IIIO
call ForGroup(g,function OIOO1OO)
call DestroyGroup(g)
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set I1IIIO=null
set g=null
return false
endfunction
function OIOO1IO takes nothing returns nothing
local real OOIIO0=OOII10(GetTriggerUnit(),GetEnumUnit())
if OOIIO0>600 then
if GetRandomInt(1,100)<61 then
call GroupAddUnit(OOO0IO,GetEnumUnit())
endif
else
call GroupAddUnit(OOO0IO,GetEnumUnit())
endif
endfunction
function OIOO11O takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=GetTriggerUnit()
local group g=CreateGroup()
local unit OOI010
set OOOO1O=I1IIIO
set OOO0IO=CreateGroup()
call GroupEnumUnitsInRange(g,GetUnitX(I1IIIO),GetUnitY(I1IIIO),900,Condition(function OI0IO0))
call ForGroup(g,function OIOO1IO)
call DestroyGroup(g)
set g=OOO0IO
call ForGroup(g,function OIOOI0O)
call IIOOIO(I1I0IO,"g",g)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call TriggerRegisterTimerEvent(t,0.5,false)
call TriggerAddCondition(t,Condition(function OIOO10O))
set OOOO1O=I1IIIO
set g=CreateGroup()
call GroupEnumUnitsInRange(g,GetUnitX(I1IIIO),GetUnitY(I1IIIO),200,Condition(function OI0IO0))
set OOI010=GroupPickRandomUnit(g)
call DestroyGroup(g)
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIOOIO(I1I0IO,"FX",AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Starfall\\StarfallCaster.mdl",I1IIIO,"origin"))
call TriggerRegisterTimerEvent(t,1,false)
call TriggerAddCondition(t,Condition(function OIOOI1O))
set t=null
set g=null
set I1IIIO=null
set OOI010=null
endfunction
function OIO0OOO takes nothing returns boolean
if GetSpellAbilityId()==1093684054 then
call OIOO11O()
endif
return false
endfunction
function IIIO00 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OIO0OOO))
set t=null
endfunction
constant function OIO0O0O takes nothing returns integer
return 1093684280
endfunction
constant function OIO0OIO takes nothing returns integer
return 1747988533
endfunction
constant function OIO0O1O takes nothing returns integer
return 1093684279
endfunction
function OIO00OO takes nothing returns boolean
return GetSpellAbilityId()==OIO0O0O()
endfunction
function OIO000O takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(O00I))and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false
endfunction
function OIO00IO takes real OIO001O,real OIO0IOO,real OOII00,real OOIII0 returns integer
local real OOIIO0=SquareRoot((OOII00-OIO001O)*(OOII00-OIO001O)+(OOIII0-OIO0IOO)*(OOIII0-OIO0IOO))
return OO0II0(R2I(OOIIO0/ 150),10)
endfunction
function OIO0I0O takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local unit O00100=IIO1OO(I1I0IO,"Projectile")
local real III11O=II00IO(I1I0IO,"TargetX")
local real II1OOO=II00IO(I1I0IO,"TargetY")
local real OO1IOOO=II00IO(I1I0IO,"Angle")
local real OOII00=GetUnitX(O00100)
local real OOIII0=GetUnitY(O00100)
local real O0IOO0=OOO100(GetUnitX(O00100)+30*Cos(OO1IOOO))
local real O0IO00=OOO110(GetUnitY(O00100)+30*Sin(OO1IOOO))
local boolexpr II1OIO=Condition(function OIO000O)
local group II1O0O=CreateGroup()
local unit O11O1I
local unit OOI010
local real OIO001O
local real OIO0IOO
call SetUnitX(O00100,O0IOO0)
call SetUnitY(O00100,O0IO00)
set O00I=I1IIIO
call GroupEnumUnitsInRange(II1O0O,O0IOO0,O0IO00,140,II1OIO)
set OOI010=FirstOfGroup(II1O0O)
call DestroyGroup(II1O0O)
call DestroyBoolExpr(II1OIO)
if OOI010!=null then
set OIO001O=II00IO(I1I0IO,"OriginalX")
set OIO0IOO=II00IO(I1I0IO,"OriginalY")
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656901,OOII00,OOIII0,0)
call UnitAddAbility(O11O1I,OIO0O1O())
call SetUnitAbilityLevel(O11O1I,OIO0O1O(),OIO00IO(OIO001O,OIO0IOO,OOII00,OOIII0))
call IssueTargetOrder(O11O1I,"thunderbolt",OOI010)
call UnitDamageTarget(I1IIIO,OOI010,90*GetUnitAbilityLevel(I1IIIO,OIO0O0O()),true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call KillUnit(O00100)
call O0OOI0(t)
elseif(O0IOO0-III11O)*(O0IOO0-III11O)+(O0IO00-II1OOO)*(O0IO00-II1OOO)<1600 then
call KillUnit(O00100)
call O0OOI0(t)
endif
endfunction
function OIO0IIO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local real OOII00=OOO100(GetUnitX(I1IIIO))
local real OOIII0=OOO110(GetUnitY(I1IIIO))
local location O0O1IIO=GetSpellTargetLoc()
local real III11O=GetLocationX(O0O1IIO)
local real II1OOO=GetLocationY(O0O1IIO)
local real OO1IOOO=Atan2(II1OOO-OOIII0,III11O-OOII00)
local timer t=CreateTimer()
local string I1I0IO=I011OO(t)
local unit O00100=CreateUnit(GetOwningPlayer(I1IIIO),OIO0OIO(),OOII00,OOIII0,OO1IOOO*bj_RADTODEG)
call RemoveLocation(O0O1IIO)
call SetUnitFacing(O00100,OO1IOOO*bj_RADTODEG)
call SetUnitPathing(O00100,false)
set III11O=OOO100(OOII00+3000*Cos(OO1IOOO))
set II1OOO=OOO110(OOIII0+3000*Sin(OO1IOOO))
call IIO01O(I1I0IO,"OriginalX",OOII00)
call IIO01O(I1I0IO,"OriginalY",OOIII0)
call IIO01O(I1I0IO,"TargetX",III11O)
call IIO01O(I1I0IO,"TargetY",II1OOO)
call IIO01O(I1I0IO,"Angle",OO1IOOO)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIOOIO(I1I0IO,"Projectile",O00100)
call TimerStart(t,0.035,true,function OIO0I0O)
endfunction
function IIIOI0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OIO00OO))
call TriggerAddAction(t,function OIO0IIO)
call OO0OO0(OIO0O1O())
endfunction
constant function OIO0I1O takes nothing returns integer
return 1093684302
endfunction
constant function OIO01OO takes nothing returns integer
return 1093684303
endfunction
function OIO010O takes nothing returns boolean
return GetSpellAbilityId()==OIO0I1O()
endfunction
function OIO01IO takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(O00I))
endfunction
function OIO011O takes nothing returns nothing
local unit I1IIIO=GetEnumUnit()
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697657170,0,0,0)
call UnitAddAbility(O11O1I,OIO01OO())
call SetUnitAbilityLevel(O11O1I,OIO01OO(),GetUnitAbilityLevel(O00I,OIO0I1O()))
call UnitApplyTimedLife(O11O1I,1112820806,10)
endfunction
function OIOIOOO takes unit I1IIIO returns nothing
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function OIO01IO)
set O00I=I1IIIO
call GroupEnumUnitsInRange(II1O0O,GetUnitX(I1IIIO),GetUnitY(I1IIIO),800,II1OIO)
call ForGroup(II1O0O,function OIO011O)
call DestroyBoolExpr(II1OIO)
call DestroyGroup(II1O0O)
endfunction
function OIOIO0O takes unit I1IIIO returns nothing
local string I1I0IO=I011OO(I1IIIO)
local string OIOIOIO=II0IOO(I1I0IO,"OrderType")
local string OIOIO1O=OrderId2String(II000O(I1I0IO,"OrderId"))
local real III11O
local real II1OOO
local unit OOI010
local trigger t=IIO11O(I1I0IO,"Trigger_TrackOrder")
local boolean OIOI0OO=not II001O(I1I0IO,"Idle")
local boolean OIOI00O=II001O(I1I0IO,"SuperOrder")
call DisableTrigger(t)
call IssueImmediateOrder(I1IIIO,"stop")
if OIOIOIO=="Target" and(OIOI0OO or OIOI00O)then
set OOI010=IIO1OO(I1I0IO,"OrderTarget")
call IssueTargetOrder(I1IIIO,OIOIO1O,OOI010)
elseif OIOIOIO=="Point" and(OIOI0OO or OIOI00O)then
set III11O=II00IO(I1I0IO,"OrderPointX")
set II1OOO=II00IO(I1I0IO,"OrderPointY")
call IssuePointOrder(I1IIIO,OIOIO1O,III11O,II1OOO)
elseif(OIOI0OO or OIOI00O)then
call IssueImmediateOrder(I1IIIO,"OrderString")
endif
call IIOI0O(I1I0IO,"SuperOrder",false)
call EnableTrigger(t)
endfunction
function OIOI0IO takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local real OIOI01O=II00IO(I1I0IO,"DistanceRemaining")
local real OIOIIOO=II00IO(I1I0IO,"OriginalDistance")
local real OO1IOOO=II00IO(I1I0IO,"Angle")
local real O0IOO0=GetUnitX(I1IIIO)+30*Cos(OO1IOOO*bj_DEGTORAD)
local real O0IO00=GetUnitY(I1IIIO)+30*Sin(OO1IOOO*bj_DEGTORAD)
local real OIOII0O=200
local real OIOIIIO=(1-OIOI01O/ OIOIIOO)*OIOII0O*2
if OIOIIIO>OIOII0O then
set OIOIIIO=OIOII0O*2-OIOIIIO
endif
call SetUnitFlyHeight(I1IIIO,OO01I0(OIOIIIO,0),0)
call SetUnitX(I1IIIO,OOO100(O0IOO0))
call SetUnitY(I1IIIO,OOO110(O0IO00))
call SetUnitFacing(I1IIIO,OO1IOOO)
call IIO01O(I1I0IO,"DistanceRemaining",OIOI01O-20)
if OIOIIIO<1 and OIOI01O-OIOIIOO!=0 then
call IIOI0O(I011OO(I1IIIO),"InAir",false)
call SetUnitFacing(I1IIIO,OO1IOOO)
call SetUnitAnimation(I1IIIO,"stand")
call SetUnitPathing(I1IIIO,true)
call OIOIO0O(I1IIIO)
call OIOIOOO(I1IIIO)
call PauseTimer(t)
call I0110O(I1I0IO)
call DestroyTimer(t)
endif
endfunction
function OIOII1O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,OIO0I1O())
local real OOIIO0=350+50*IO0O0I
local real OO1IOOO=GetUnitFacing(I1IIIO)
local real OOII00=GetUnitX(I1IIIO)
local real OOIII0=GetUnitY(I1IIIO)
local real III11O=OOO100(OOII00+OOIIO0*Cos(OO1IOOO*bj_DEGTORAD))
local real II1OOO=OOO110(OOIII0+OOIIO0*Sin(OO1IOOO*bj_DEGTORAD))
local timer t=CreateTimer()
local string I1I0IO=I011OO(t)
local trigger OIOI1OO=IIO11O(I011OO(I1IIIO),"Trigger_TrackOrder")
set OOIIO0=SquareRoot((OOII00-III11O)*(OOII00-III11O)+(OOIII0-II1OOO)*(OOIII0-II1OOO))
if OOIIO0>100 then
call UnitAddAbility(I1IIIO,1097691750)
call UnitRemoveAbility(I1IIIO,1097691750)
call SetUnitPathing(I1IIIO,false)
call SetUnitAnimationByIndex(I1IIIO,6)
call DisableTrigger(OIOI1OO)
call IssueImmediateOrder(I1IIIO,"stop")
call EnableTrigger(OIOI1OO)
call IIO01O(I1I0IO,"DistanceRemaining",OOIIO0)
call IIO01O(I1I0IO,"OriginalDistance",OOIIO0)
call IIO01O(I1I0IO,"Angle",OO1IOOO)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call TimerStart(t,0.025,true,function OIOI0IO)
call IIOI0O(I011OO(I1IIIO),"Leap_InAir",true)
call IIOI0O(I011OO(I1IIIO),"SuperOrder",false)
endif
endfunction
function OIOI10O takes nothing returns boolean
return OrderId2String(GetIssuedOrderId())!="windwalk"
endfunction
function OIOI1IO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local string I1I0IO=I011OO(I1IIIO)
local boolean OIOI11O=II001O(I1I0IO,"Leap_InAir")
call IIO00O(I1I0IO,"OrderId",GetIssuedOrderId())
call IIOI0O(I1I0IO,"Idle",false)
if GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER then
call IIOIOO(I1I0IO,"OrderType","Target")
call IIOOIO(I1I0IO,"OrderTarget",GetOrderTarget())
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_POINT_ORDER then
if OIOI11O or O0OO10(GetUnitX(I1IIIO),GetUnitY(I1IIIO),GetOrderPointX(),GetOrderPointY())>800 then
call IIOIOO(I1I0IO,"OrderType","Point")
call IIO01O(I1I0IO,"OrderPointX",GetOrderPointX())
call IIO01O(I1I0IO,"OrderPointY",GetOrderPointY())
else
call IIOI0O(I1I0IO,"Idle",true)
endif
else
call IIOIOO(I1I0IO,"OrderType","Instant")
endif
if OIOI11O then
call IIOI0O(I1I0IO,"SuperOrder",true)
endif
endfunction
function OIO1OOO takes nothing returns nothing
local unit I1IIIO=IIO1OO(I011OO(GetExpiredTimer()),"Hero")
local string I1I0IO=I011OO(I1IIIO)
local real x=GetUnitX(I1IIIO)
local real y=GetUnitY(I1IIIO)
local string OIOIOIO=II0IOO(I1I0IO,"OrderType")
if OIOIOIO=="Point" and O0OO10(GetUnitX(I1IIIO),GetUnitY(I1IIIO),II00IO(I1I0IO,"OrderPointX"),II00IO(I1I0IO,"OrderPointY"))<100 then
call IIOI0O(I1I0IO,"Idle",true)
endif
endfunction
function OIO1O0O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local trigger t=CreateTrigger()
local timer t2
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddAction(t,function OIOI1IO)
call TriggerAddCondition(t,Condition(function OIOI10O))
call IIOOIO(I011OO(I1IIIO),"Trigger_TrackOrder",t)
set t2=CreateTimer()
call IIOOIO(I011OO(t2),"Hero",I1IIIO)
call TimerStart(t2,0.3,true,function OIO1OOO)
call IIOOIO(I011OO(I1IIIO),"Timer_CheckIdle",t2)
endfunction
function OIO1OIO takes nothing returns nothing
if GetUnitAbilityLevel(GetTriggerUnit(),OIO0I1O())==1 then
call OIO1O0O()
endif
endfunction
function IIIO10 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OIO010O))
call TriggerAddAction(t,function OIOII1O)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddAction(t,function OIO1OIO)
endfunction
function OIO1O1O takes nothing returns nothing
local unit OOOIO0=IIO1OO(I011OO(GetTriggeringTrigger()),"Morphling")
if GetUnitTypeId(OOOIO0)!=1328558160 then
call DisableTrigger(GetTriggeringTrigger())
elseif(GetUnitState(OOOIO0,UNIT_STATE_LIFE)>0)then
call SetUnitVertexColorBJ(OOOIO0,GetRandomReal(0.00,255.00),GetRandomReal(0.00,255.00),GetRandomReal(0.00,255.00),GetRandomReal(0.00,10.00))
endif
endfunction
function OIO10OO takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit())==1328558160 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function OIO100O takes nothing returns nothing
local trigger t
if(II001O(I011OO(GetTriggerUnit()),"HasMorphling")==false)then
set t=CreateTrigger()
call IIOOIO(I011OO(t),"Morphling",GetTriggerUnit())
call IIOOIO(I011OO(GetTriggerUnit()),"ColorTrigger",t)
call TriggerAddAction(t,function OIO1O1O)
call TriggerRegisterTimerEvent(t,2.0,true)
call IIOI0O(I011OO(GetTriggerUnit()),"HasMorphling",true)
call UnitAddItem(GetTriggerUnit(),CreateItem(1227894853,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))
endif
endfunction
function IO01I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterEnterRectSimple(t,bj_mapInitialPlayableArea)
call TriggerAddCondition(t,Condition(function OIO10OO))
call TriggerAddAction(t,function OIO100O)
endfunction
function OIO10IO takes nothing returns boolean
return GetSpellAbilityId()==1093682766
endfunction
function OIO101O takes nothing returns boolean
local unit O01101O=GetFilterUnit()
if IsUnitInGroup(O01101O,IO1I)then
return false
endif
if IsUnitEnemy(O01101O,GetOwningPlayer(O00I))and GetUnitAbilityLevel(O01101O,1093678162)!=1 and GetUnitState(O01101O,UNIT_STATE_LIFE)>0 and IsUnitType(O01101O,UNIT_TYPE_STRUCTURE)==false then
return true
endif
return false
endfunction
function OIO1IOO takes nothing returns nothing
call UnitDamageTarget(O00I,GetEnumUnit(),O01I,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endfunction
function OIO1I0O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit O11O1I=IIO1OO(I1I0IO,"Caster")
local unit OOOIO0=IIO1OO(I1I0IO,"UnitVar")
local real OO1IOOO=II00IO(I1I0IO,"Angle")
local integer OIO1IIO=II000O(I1I0IO,"Remaining")
local group O1100I=II0OOO(I1I0IO,"AlreadyDamaged")
local real OIO1I1O=GetUnitX(OOOIO0)
local real OIO11OO=GetUnitY(OOOIO0)
local real O0IOO0=OIO1I1O+1000*0.05*Cos(OO1IOOO)
local real O0IO00=OIO11OO+1000*0.05*Sin(OO1IOOO)
local group II1O0O=CreateGroup()
set O00I=OOOIO0
set O01I=GetUnitAbilityLevel(OOOIO0,1093682766)*75+25
set IO1I=O1100I
call GroupEnumUnitsInRange(II1O0O,OIO1I1O,OIO11OO,280,Condition(function OIO101O))
call ForGroup(II1O0O,function OIO1IOO)
call GroupAddGroup(II1O0O,O1100I)
call DestroyGroup(II1O0O)
set OIO1IIO=OIO1IIO-1
call IIO00O(I1I0IO,"Remaining",OIO1IIO)
call SetUnitPosition(OOOIO0,O0IOO0,O0IO00)
call SetUnitPosition(O11O1I,O0IOO0,O0IO00)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",OIO1I1O,OIO11OO))
if OIO1IIO==0 then
call RemoveUnit(O11O1I)
call ShowUnit(OOOIO0,true)
call SetUnitPathing(OOOIO0,true)
call ClearSelectionForPlayer(GetOwningPlayer(OOOIO0))
call SelectUnitAddForPlayer(OOOIO0,GetOwningPlayer(OOOIO0))
call I0111O(I1I0IO)
call I10I1O(t)
endif
set OOOIO0=null
set O11O1I=null
set O1100I=null
set II1O0O=null
set t=null
return false
endfunction
function OIO110O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local real OOII00=GetUnitX(OOOIO0)
local real OOIII0=GetUnitY(OOOIO0)
local location O0O1IIO=GetSpellTargetLoc()
local real III11O=GetLocationX(O0O1IIO)
local real II1OOO=GetLocationY(O0O1IIO)
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local group O1100I=CreateGroup()
local unit O11O1I=CreateUnit(GetOwningPlayer(OOOIO0),1865429063,OOII00,OOIII0,0)
local integer pid=GetPlayerId(GetOwningPlayer(OOOIO0))
call RemoveLocation(O0O1IIO)
if GetSpellTargetUnit()!=null then
set III11O=GetUnitX(GetSpellTargetUnit())
set II1OOO=GetUnitY(GetSpellTargetUnit())
endif
call ShowUnit(OOOIO0,false)
call SetUnitPathing(OOOIO0,false)
call SetUnitPathing(O11O1I,false)
call IIOOIO(I1I0IO,"UnitVar",OOOIO0)
call IIOOIO(I1I0IO,"Caster",O11O1I)
call IIOOIO(I1I0IO,"AlreadyDamaged",O1100I)
call IIO01O(I1I0IO,"Angle",Atan2(II1OOO-OOIII0,III11O-OOII00))
call IIO00O(I1I0IO,"Remaining",OO0I10(R2I(SquareRoot((III11O-OOII00)*(III11O-OOII00)+(II1OOO-OOIII0)*(II1OOO-OOIII0))/ 50),1))
call TriggerRegisterTimerEvent(t,0.04,true)
call TriggerAddCondition(t,Condition(function OIO1I0O))
set t=null
endfunction
function IO0110 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OIO10IO))
call TriggerAddAction(t,function OIO110O)
endfunction
function OIO11IO takes nothing returns nothing
local unit OIO111O=IIO1OO(I011OO(GetTriggeringTrigger()),"Morphling")
if GetHeroStatBJ(1,OIO111O,false)>2*GetUnitAbilityLevel(OIO111O,1093684056)and GetUnitState(OIO111O,UNIT_STATE_MANA)>=20.00 and GetUnitState(OIO111O,UNIT_STATE_LIFE)>1.00 then
call SetUnitManaBJ(OIO111O,GetUnitState(OIO111O,UNIT_STATE_MANA)-20)
call ModifyHeroStat(1,OIO111O,1,2*GetUnitAbilityLevel(OIO111O,1093684056))
call ModifyHeroStat(0,OIO111O,0,2*GetUnitAbilityLevel(OIO111O,1093684056))
endif
endfunction
function OI0OOOO takes nothing returns nothing
local unit OIO111O=IIO1OO(I011OO(GetTriggeringTrigger()),"Morphling")
if GetHeroStatBJ(0,OIO111O,false)>2*GetUnitAbilityLevel(OIO111O,1093684056)and GetUnitState(OIO111O,UNIT_STATE_MANA)>=20.00 and GetUnitState(OIO111O,UNIT_STATE_LIFE)>1.00 then
call SetUnitManaBJ(OIO111O,GetUnitState(OIO111O,UNIT_STATE_MANA)-20)
call ModifyHeroStat(0,OIO111O,1,2*GetUnitAbilityLevel(OIO111O,1093684056))
call ModifyHeroStat(1,OIO111O,0,2*GetUnitAbilityLevel(OIO111O,1093684056))
endif
endfunction
function OI0OO0O takes nothing returns boolean
if GetIssuedOrderId()==String2OrderIdBJ("replenishmanaoff")or GetIssuedOrderId()==String2OrderIdBJ("replenishlifeoff")then
if GetTriggerUnit()==IIO1OO(I011OO(GetTriggeringTrigger()),"Morphling")then
return true
endif
endif
return false
endfunction
function OI0OOIO takes nothing returns nothing
local string I1I0IO=I011OO(GetTriggeringTrigger())
local trigger OI0OO1O=IIO11O(I1I0IO,"MorphStr")
local trigger OI0O0OO=IIO11O(I1I0IO,"MorphAgi")
if(GetIssuedOrderId()==String2OrderIdBJ("replenishlifeoff"))then
call DisableTrigger(OI0OO1O)
endif
if(GetIssuedOrderId()==String2OrderIdBJ("replenishmanaoff"))then
call DisableTrigger(OI0O0OO)
endif
endfunction
function OI0O00O takes nothing returns boolean
if GetIssuedOrderId()==String2OrderIdBJ("replenishmanaon")or GetIssuedOrderId()==String2OrderIdBJ("replenishlifeon")then
if GetTriggerUnit()==IIO1OO(I011OO(GetTriggeringTrigger()),"Morphling")then
return true
endif
endif
return false
endfunction
function OI0O0IO takes nothing returns nothing
local string I1I0IO=I011OO(GetTriggeringTrigger())
local trigger OI0OO1O=IIO11O(I1I0IO,"MorphStr")
local trigger OI0O0OO=IIO11O(I1I0IO,"MorphAgi")
if(GetIssuedOrderId()==String2OrderIdBJ("replenishlifeon"))then
call EnableTrigger(OI0OO1O)
call DisableTrigger(OI0O0OO)
endif
if(GetIssuedOrderId()==String2OrderIdBJ("replenishmanaon"))then
call DisableTrigger(OI0OO1O)
call EnableTrigger(OI0O0OO)
endif
endfunction
function OI0O01O takes nothing returns boolean
return GetLearnedSkill()==1093684056 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function OI0OIOO takes nothing returns nothing
local unit OIO111O=GetTriggerUnit()
local trigger OI0OI0O
local trigger OI0OIIO
local trigger OI0OO1O
local trigger OI0O0OO
if(GetUnitAbilityLevel(OIO111O,1093684056)==1)then
call UnitAddAbility(OIO111O,1093684055)
set OI0O0OO=CreateTrigger()
call DisableTrigger(OI0O0OO)
call TriggerRegisterTimerEventPeriodic(OI0O0OO,1.00)
call TriggerAddAction(OI0O0OO,function OI0OOOO)
call IIOOIO(I011OO(OI0O0OO),"Morphling",OIO111O)
set OI0OO1O=CreateTrigger()
call DisableTrigger(OI0OO1O)
call TriggerRegisterTimerEventPeriodic(OI0OO1O,1.00)
call TriggerAddAction(OI0OO1O,function OIO11IO)
call IIOOIO(I011OO(OI0OO1O),"Morphling",OIO111O)
set OI0OI0O=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OI0OI0O,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(OI0OI0O,Condition(function OI0O00O))
call TriggerAddAction(OI0OI0O,function OI0O0IO)
call IIOOIO(I011OO(OI0OI0O),"MorphAgi",OI0O0OO)
call IIOOIO(I011OO(OI0OI0O),"MorphStr",OI0OO1O)
call IIOOIO(I011OO(OI0OI0O),"Morphling",OIO111O)
set OI0OIIO=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OI0OIIO,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(OI0OIIO,Condition(function OI0OO0O))
call TriggerAddAction(OI0OIIO,function OI0OOIO)
call IIOOIO(I011OO(OI0OIIO),"MorphAgi",OI0O0OO)
call IIOOIO(I011OO(OI0OIIO),"MorphStr",OI0OO1O)
call IIOOIO(I011OO(OI0OIIO),"Morphling",OIO111O)
else
call SetUnitAbilityLevel(OIO111O,1093684055,GetUnitAbilityLevel(OIO111O,1093684056))
endif
endfunction
function IOIOO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function OI0O01O))
call TriggerAddAction(t,function OI0OIOO)
endfunction
function OI0OI1O takes nothing returns boolean
return GetSpellAbilityId()==1093682998 and GetUnitTypeId(GetSpellTargetUnit())!=1848651852
endfunction
function OI0O1OO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local integer IO0O0I=GetUnitAbilityLevel(OOOIO0,1093682998)
local unit O11O1I
local location OI0O10O
local real OO1IOOO
if GetHeroAgi(OOOIO0,true)>GetHeroStr(OOOIO0,true)then
call O0OI10("+"+I2S(R2I((IO0O0I*0.4+1)*GetHeroAgi(OOOIO0,true)+(30*IO0O0I))),1,OOI010,0.023,3,216,216,216)
call UnitDamageTarget(OOOIO0,OOI010,(IO0O0I*0.4+1)*GetHeroAgi(OOOIO0,true)+(30*IO0O0I),true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
else
set OO1IOOO=Atan2(GetUnitY(OOI010)-GetUnitY(OOOIO0),GetUnitX(OOI010)-GetUnitX(OOOIO0))
set OI0O10O=Location(GetUnitX(OOI010)+200*Cos(OO1IOOO),GetUnitY(OOI010)+200*Sin(OO1IOOO))
call SetUnitPositionLoc(OOI010,OI0O10O)
call O00O00(GetLocationX(OI0O10O),GetLocationY(OI0O10O),200)
call RemoveLocation(OI0O10O)
set O11O1I=CreateUnit(GetOwningPlayer(OOOIO0),1697656899,GetUnitX(OOI010),GetUnitY(OOI010),0)
call UnitAddAbility(O11O1I,1093682261)
call SetUnitAbilityLevel(O11O1I,1093682261,IO0O0I)
call IssueTargetOrder(O11O1I,"firebolt",OOI010)
call UnitApplyTimedLife(O11O1I,1112820806,1)
call SetUnitPathing(O11O1I,false)
call SetUnitInvulnerable(O11O1I,true)
call UnitAddAbility(O11O1I,1097625443)
if GetHeroAgi(OOOIO0,true)==GetHeroStr(OOOIO0,true)then
call UnitDamageTarget(OOOIO0,OOI010,(IO0O0I*0.4+1)*GetHeroAgi(OOOIO0,true)+(30*IO0O0I),true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endif
endif
endfunction
function IOIO00 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OI0OI1O))
call TriggerAddAction(t,function OI0O1OO)
endfunction
constant function OI0O1IO takes nothing returns integer
return 1093683000
endfunction
constant function OI0O11O takes nothing returns integer
return 1093683011
endfunction
constant function OI00OOO takes nothing returns integer
return 1110455088
endfunction
function OI00O0O takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local unit I1IIIO=IIO1OO(I011OO(t),"Hero")
local unit OI00OIO=IIO1OO(I011OO(I1IIIO),"Replicate")
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",GetUnitX(OI00OIO),GetUnitY(OI00OIO)))
call RemoveUnit(OI00OIO)
call UnitRemoveAbility(I1IIIO,OI0O11O())
call SetPlayerAbilityAvailable(GetOwningPlayer(I1IIIO),OI0O1IO(),true)
call I0110O(I011OO(t))
call OO10O0(t)
endfunction
function OI00O1O takes nothing returns boolean
if GetSpellAbilityId()==OI0O11O()then
return true
endif
return false
endfunction
function OI000OO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local string I1I0IO=I011OO(I1IIIO)
local unit OI00OIO=IIO1OO(I1I0IO,"Replicate")
local real x=GetUnitX(OI00OIO)
local real y=GetUnitY(OI00OIO)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",GetUnitX(I1IIIO),GetUnitY(I1IIIO)))
call KillUnit(OI00OIO)
if not III10O(I1IIIO,x,y)then
call SetUnitX(I1IIIO,x)
call SetUnitY(I1IIIO,y)
call PanCameraToTimedForPlayer(GetOwningPlayer(I1IIIO),x,y,0)
call IssueImmediateOrder(I1IIIO,"stop")
else
call I11I1O(GetOwningPlayer(I1IIIO),"Unable to Morph Replicate")
endif
endfunction
function OI0000O takes nothing returns boolean
return GetUnitAbilityLevel(GetSummonedUnit(),OI00OOO())>0
endfunction
function OI000IO takes nothing returns nothing
local unit I1IIIO=GetSummoningUnit()
local string I1I0IO=I011OO(I1IIIO)
local unit OOI010=IIO1OO(I1I0IO,"ReplicateTarget")
local unit OI00OIO=GetSummonedUnit()
local trigger t
call SetPlayerAbilityAvailable(GetOwningPlayer(I1IIIO),OI0O1IO(),false)
call UnitAddAbility(I1IIIO,OI0O11O())
call SetUnitColor(OI00OIO,GetPlayerColor(GetOwningPlayer(OOI010)))
call IIOOIO(I1I0IO,"Replicate",OI00OIO)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,OI00OIO,EVENT_UNIT_DEATH)
call TriggerAddAction(t,function OI00O0O)
call IIOOIO(I011OO(t),"Hero",I1IIIO)
endfunction
function OI0001O takes nothing returns boolean
return GetSpellAbilityId()==OI0O1IO()
endfunction
function OI00IOO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
call IIOOIO(I011OO(I1IIIO),"ReplicateTarget",OOI010)
endfunction
function IOIOI0 takes nothing returns nothing
local trigger t
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OI0001O))
call TriggerAddAction(t,function OI00IOO)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function OI0000O))
call TriggerAddAction(t,function OI000IO)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OI00O1O))
call TriggerAddAction(t,function OI000OO)
endfunction
function OI00I0O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local unit OOI010=GetEnumUnit()
local unit O11O1I=CreateUnit(GetOwningPlayer(OOOIO0),1697656899,GetUnitX(OOI010),GetUnitY(OOI010),270)
call UnitAddAbility(O11O1I,1093678932)
call SetUnitAbilityLevel(O11O1I,1093678932,GetUnitAbilityLevel(OOOIO0,1093678933))
call UnitApplyTimedLife(O11O1I,1112820806,5.00)
call IssueTargetOrder(O11O1I,"sleep",OOI010)
call SetUnitPathing(O11O1I,false)
call SetUnitInvulnerable(O11O1I,true)
call UnitAddAbility(O11O1I,1097625443)
endfunction
function OI00IIO takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false
endfunction
function OI00I1O takes nothing returns boolean
return GetSpellAbilityId()==1093678933
endfunction
function OI001OO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(OOOIO0,1093678933)
local group II1O0O=CreateGroup()
local boolexpr OI0010O=Condition(function OI00IIO)
call GroupEnumUnitsInRange(II1O0O,GetUnitX(OOOIO0),GetUnitY(OOOIO0),500+500*IO0O0I,OI0010O)
call ForGroup(II1O0O,function OI00I0O)
call DestroyGroup(II1O0O)
call DestroyBoolExpr(OI0010O)
endfunction
function IOIO10 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OI00I1O))
call TriggerAddAction(t,function OI001OO)
endfunction
function OI001IO takes unit III1IO returns integer
local integer O0OOO0=GetUnitAbilityLevel(III1IO,1093679160)
if OO00I0(III1IO,1227895349)!=null then
set O0OOO0=O0OOO0+1
endif
return O0OOO0
endfunction
function OI0011O takes nothing returns boolean
local unit O01101O=GetFilterUnit()
local unit OOOIO0=GetTriggerUnit()
if IsUnitAlly(O01101O,GetOwningPlayer(OOOIO0))and GetUnitState(O01101O,UNIT_STATE_LIFE)>0 and GetUnitAbilityLevel(O01101O,1113746543)==0 then
if(GetOwningPlayer(O01101O)==III0[0]or GetOwningPlayer(O01101O)==II10[0])then
if(GetUnitTypeId(O01101O)==1969711215 or GetUnitTypeId(O01101O)==1966092337 or GetUnitTypeId(O01101O)==1970169187 or GetUnitTypeId(O01101O)==1966092338)then
return true
endif
if(GetUnitTypeId(O01101O)==1702061422 or GetUnitTypeId(O01101O)==1697656918 or GetUnitTypeId(O01101O)==1701081721 or GetUnitTypeId(O01101O)==1697656919)then
return true
endif
return false
elseif IsUnitType(O01101O,UNIT_TYPE_HERO)==true then
return true
endif
endif
return false
endfunction
function OI0IOOO takes nothing returns boolean
local real II10IO=GetRandomReal(0,1)
return II10IO<.2 or(II10IO<.3 and GetUnitAbilityLevel(GetTriggerUnit(),1093679160)<OI001IO(GetTriggerUnit()))
endfunction
function OI0IO0O takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),1093679160)>0 and(GetSpellAbilityId()==1093679155 or GetSpellAbilityId()==1093679177 or GetSpellAbilityId()==1093679175 or GetSpellAbilityId()==1093679174)then
return OI0IOOO()
endif
return false
endfunction
function OI0IOIO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local integer IO0O0I=OI001IO(GetTriggerUnit())
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function OI0011O)
local unit O11O1I
local unit O11OO0
local integer I1OO0O=GetSpellAbilityId()
local integer IIII0O=1
call O0OII0("MULTICAST!",5,GetTriggerUnit(),255,0,0)
call GroupEnumUnitsInRange(II1O0O,GetUnitX(OOOIO0),GetUnitY(OOOIO0),600,II1OIO)
if OOOIO0!=GetSpellTargetUnit()then
call GroupAddUnit(II1O0O,OOOIO0)
endif
call DestroyBoolExpr(II1OIO)
loop
exitwhen IIII0O>IO0O0I
set IIII0O=IIII0O+1
set O11O1I=CreateUnit(GetOwningPlayer(OOOIO0),1697656899,GetUnitX(OOOIO0),GetUnitY(OOOIO0),270)
call UnitAddAbility(O11O1I,I1OO0O)
call SetUnitAbilityLevel(O11O1I,I1OO0O,GetUnitAbilityLevel(OOOIO0,I1OO0O))
call UnitApplyTimedLife(O11O1I,1112820806,1.0)
set O11OO0=GroupPickRandomUnit(II1O0O)
call IssueTargetOrder(O11O1I,"bloodlust",O11OO0)
call SetUnitPathing(O11O1I,false)
call SetUnitInvulnerable(O11O1I,true)
call UnitAddAbility(O11O1I,1097625443)
call GroupRemoveUnit(II1O0O,O11OO0)
endloop
call DestroyGroup(II1O0O)
endfunction
function IOI0O0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OI0IO0O))
call TriggerAddAction(t,function OI0IOIO)
endfunction
function OI0IO1O takes nothing returns boolean
local real II10IO=GetRandomReal(0,1)
return II10IO<.2 or(II10IO<.3 and GetUnitAbilityLevel(GetTriggerUnit(),1093679160)<OI001IO(GetTriggerUnit()))
endfunction
function OI0I0OO takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),1093679160)>0 and(GetSpellAbilityId()==1093678167 or GetSpellAbilityId()==1093679172 or GetSpellAbilityId()==1093679169 or GetSpellAbilityId()==1093679161)then
return OI0IO1O()
endif
return false
endfunction
function OI0I00O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local integer OI0I0IO=II000O(I1I0IO,"Iterations")
local integer IO0O0I=II000O(I1I0IO,"Level")
local integer OI0I01O=II000O(I1I0IO,"Spell")
local unit O11O1I
if GetTriggerEvalCount(t)>OI0I0IO then
call I0111O(I1I0IO)
call I10I1O(t)
else
set O11O1I=CreateUnit(GetOwningPlayer(OOI0I0),1697656901,GetUnitX(OOI010),GetUnitY(OOI010),0)
call UnitAddAbility(O11O1I,OI0I01O)
call SetUnitAbilityLevel(O11O1I,OI0I01O,IO0O0I)
call IssueTargetOrder(O11O1I,"thunderbolt",OOI010)
endif
set t=null
set OOI010=null
set OOI0I0=null
set O11O1I=null
return false
endfunction
function OI0IIOO takes nothing returns nothing
local integer OI0I01O=GetSpellAbilityId()
local unit OI0II0O=GetSpellTargetUnit()
local integer IO0O0I=OI001IO(GetTriggerUnit())
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call O0OII0("MULTICAST!",5,GetTriggerUnit(),255,0,0)
call IIOOIO(I1I0IO,"Target",OI0II0O)
call IIOOIO(I1I0IO,"Source",GetTriggerUnit())
call IIO00O(I1I0IO,"Iterations",IO0O0I)
call IIO00O(I1I0IO,"Level",GetUnitAbilityLevel(GetTriggerUnit(),OI0I01O))
call IIO00O(I1I0IO,"Spell",OI0I01O)
call TriggerRegisterTimerEvent(t,0.3,true)
call TriggerAddCondition(t,Condition(function OI0I00O))
set t=null
set OI0II0O=null
endfunction
function IOI000 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OI0I0OO))
call TriggerAddAction(t,function OI0IIOO)
endfunction
constant function OI0IIIO takes nothing returns integer
return 1093679182
endfunction
function OI0II1O takes nothing returns boolean
return GetSpellAbilityId()==OI0IIIO()
endfunction
function OI0I1OO takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)!=1 and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function OI0I10O takes nothing returns nothing
call UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),O01I,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endfunction
function OI0I1IO takes nothing returns nothing
local boolexpr II1OIO=Condition(function OI0I1OO)
local group II1O0O=CreateGroup()
local real x=GetUnitX(GetSpellTargetUnit())
local real y=GetUnitY(GetSpellTargetUnit())
set O01I=90*GetUnitAbilityLevel(GetTriggerUnit(),OI0IIIO())
call GroupEnumUnitsInRange(II1O0O,x,y,250,II1OIO)
call ForGroup(II1O0O,function OI0I10O)
if GetUnitState(GetSpellTargetUnit(),UNIT_STATE_LIFE)>1 then
call SetUnitState(GetSpellTargetUnit(),UNIT_STATE_LIFE,GetUnitState(GetSpellTargetUnit(),UNIT_STATE_LIFE)+O01I)
endif
call DestroyGroup(II1O0O)
call DestroyBoolExpr(II1OIO)
endfunction
function IOI0I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OI0II1O))
call TriggerAddAction(t,function OI0I1IO)
endfunction
function OI0I11O takes nothing returns boolean
return UnitHasBuffBJ(GetTriggerUnit(),1110455105)==true
endfunction
function OI01OOO takes nothing returns nothing
local location O000OI=GetUnitLoc(OI10[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))])
call SetUnitPositionLoc(GetTriggerUnit(),O000OI)
call RemoveLocation(O000OI)
endfunction
function IOI010 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterEnterRectSimple(t,bj_mapInitialPlayableArea)
call TriggerAddCondition(t,Condition(function OI0I11O))
call TriggerAddAction(t,function OI01OOO)
endfunction
function OI01O0O takes nothing returns boolean
if(not(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))==true))then
return false
endif
if(not(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false))then
return false
endif
if(not(UnitHasBuffBJ(GetAttacker(),1110455106)==true))then
return false
endif
if(not(IsUnitType(GetTriggerUnit(),UNIT_TYPE_ANCIENT)==false))then
return false
endif
return true
endfunction
function OI01OIO takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),1110455106)>0
endfunction
function OI01O1O takes nothing returns nothing
local unit OOOIO0=GetAttacker()
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function OI01OIO)
local integer OI010OO=GetRandomInt(1,100)
local integer OI0100O=GetUnitAbilityLevel(OOOIO0,1093682242)
local integer OI010IO=GetUnitAbilityLevel(OOOIO0,1093682233)
call GroupEnumUnitsOfPlayer(II1O0O,GetOwningPlayer(OOOIO0),II1OIO)
call DestroyBoolExpr(II1OIO)
if(CountUnitsInGroup(II1O0O)<9)then
if(IsUnitIllusion(OOOIO0)==false and OI010OO<=(3*OI0100O+2*OI010IO))then
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(OOOIO0),1697656901,GetUnitX(OOOIO0),GetUnitY(OOOIO0),270)
set bj_lastCreatedItem=UnitAddItemById(bj_lastCreatedUnit,1227895347)
call UnitUseItemTarget(bj_lastCreatedUnit,bj_lastCreatedItem,OOOIO0)
endif
if(IsUnitIllusion(OOOIO0)==true and OI010OO<=(1+2*OI010IO))then
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(OOOIO0),1697656901,GetUnitX(OOOIO0),GetUnitY(OOOIO0),270)
set bj_lastCreatedItem=UnitAddItemById(bj_lastCreatedUnit,1227895347)
call UnitUseItemTarget(bj_lastCreatedUnit,bj_lastCreatedItem,OOOIO0)
endif
endif
call DestroyGroup(II1O0O)
endfunction
function IOIIO0 takes nothing returns nothing
set O1OOI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O1OOI,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(O1OOI,Condition(function OI01O0O))
call TriggerAddAction(O1OOI,function OI01O1O)
endfunction
function OI0101O takes nothing returns boolean
return GetSpellAbilityId()==1093682241
endfunction
function OI01IOO takes nothing returns nothing
local location O000OI=GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc(1,1697656901,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,1093682225)
call SetUnitAbilityLevelSwapped(1093682225,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093682241,GetTriggerUnit()))
call IssueTargetOrder(bj_lastCreatedUnit,"cripple",GetSpellTargetUnit())
call RemoveLocation(O000OI)
endfunction
function IOII00 takes nothing returns nothing
set O1O0I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O1O0I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(O1O0I,Condition(function OI0101O))
call TriggerAddAction(O1O0I,function OI01IOO)
endfunction
function OI01I0O takes nothing returns boolean
return GetSpellAbilityId()==1093682231
endfunction
function OI01IIO takes nothing returns nothing
local location O0OO1OO=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLocFacingLocBJ(1,1697656901,GetOwningPlayer(GetTriggerUnit()),O0OO1OO,O0OO1OO)
call UnitAddItemByIdSwapped(1227895088,bj_lastCreatedUnit)
call UnitUseItemTarget(bj_lastCreatedUnit,bj_lastCreatedItem,GetTriggerUnit())
call RemoveLocation(O0OO1OO)
endfunction
function DW takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OI01I0O))
call TriggerAddAction(t,function OI01IIO)
endfunction
function OI01I1O takes nothing returns boolean
return GetSpellAbilityId()==1093678938
endfunction
function OI011OO takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0
endfunction
function OI0110O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local unit O11O1I=CreateUnit(GetOwningPlayer(OOOIO0),1697657394,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),270)
call UnitAddAbility(O11O1I,1093678676)
call SetUnitAbilityLevel(O11O1I,1093678676,GetUnitAbilityLevel(OOOIO0,1093678938))
call IssueTargetOrder(O11O1I,"entanglingroots",GetEnumUnit())
endfunction
function OI011IO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function OI011OO)
call GroupEnumUnitsInRange(II1O0O,GetUnitX(OOOIO0),GetUnitY(OOOIO0),750,II1OIO)
call ForGroup(II1O0O,function OI0110O)
call DestroyBoolExpr(II1OIO)
call DestroyGroup(II1O0O)
endfunction
function IOIII0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OI01I1O))
call TriggerAddAction(t,function OI011IO)
endfunction
function OI0111O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
if O00II0(GetUnitX(I1IIIO),GetUnitY(I1IIIO),375)==false then
call UnitRemoveAbility(I1IIIO,1110454833)
call I0111O(I1I0IO)
call I10I1O(t)
endif
set t=null
set I1IIIO=null
return false
endfunction
function OIIOOOO takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Hero",GetSpellTargetUnit())
call TriggerAddCondition(t,Condition(function OI0111O))
call TriggerRegisterTimerEvent(t,1,true)
set t=null
endfunction
function OIIOO0O takes nothing returns boolean
if GetSpellAbilityId()==1093677402 then
call OIIOOOO()
endif
return false
endfunction
function IOII10 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OIIOO0O))
set t=null
endfunction
function OIIOOIO takes nothing returns boolean
return GetSpellAbilityId()==1093684036
endfunction
function OIIOO1O takes nothing returns nothing
if I1OOOO(GetSpellAbilityId())or GetSpellAbilityId()==1093678667 then
call UnitRemoveAbility(GetTriggerUnit(),1110455620)
call UnitRemoveAbility(GetTriggerUnit(),1110455629)
call UnitRemoveAbility(GetTriggerUnit(),1110455630)
call UnitRemoveAbility(GetTriggerUnit(),1110455631)
call OO10O0(GetTriggeringTrigger())
endif
endfunction
function OIIO0OO takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local unit OOOIO0=IIO1OO(I1I0IO,"CurseTarget")
local real OIIO00O=0
if(UnitHasBuffBJ(OOOIO0,1110455620))then
set OIIO00O=5.0
endif
if(UnitHasBuffBJ(OOOIO0,1110455629))then
set OIIO00O=10.0
endif
if(UnitHasBuffBJ(OOOIO0,1110455630))then
set OIIO00O=15.0
endif
if(UnitHasBuffBJ(OOOIO0,1110455631))then
set OIIO00O=20.0
endif
call SetUnitManaBJ(OOOIO0,GetUnitState(OOOIO0,UNIT_STATE_MANA)-OIIO00O)
if(OIIO00O==0.0)then
call PauseTimer(t)
call I0110O(I1I0IO)
call DestroyTimer(t)
endif
endfunction
function OIIO0IO takes nothing returns nothing
local timer t=CreateTimer()
local trigger OIIO01O=CreateTrigger()
local unit OOOIO0=GetSpellTargetUnit()
call IIOOIO(I011OO(t),"CurseTarget",OOOIO0)
call TimerStart(t,1.0,true,function OIIO0OO)
call TriggerRegisterUnitEvent(OIIO01O,OOOIO0,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddAction(OIIO01O,function OIIOO1O)
endfunction
function IOI1O0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OIIOOIO))
call TriggerAddAction(t,function OIIO0IO)
endfunction
function OIIOIOO takes nothing returns boolean
local real d
if GetUnitAbilityLevel(GetTriggerUnit(),1110455640)>0 and GetUnitAbilityLevel(GetEventDamageSource(),1093684314)>0 and IIO1OO(I011OO(GetTriggeringTrigger()),"Source")==GetEventDamageSource()then
call UnitRemoveAbility(GetTriggerUnit(),1110455640)
set d=0.15*I2R(GetUnitAbilityLevel(GetEventDamageSource(),1093684314)*GetHeroInt(GetEventDamageSource(),true))
call O0OI10("+"+I2S(R2I(d)),1,GetTriggerUnit(),0.023,3,216,216,216)
call DisableTrigger(GetTriggeringTrigger())
call OII1O0(GetEventDamageSource(),GetTriggerUnit(),3,d)
call I0110O(I011OO(GetTriggeringTrigger()))
call I10I1O(GetTriggeringTrigger())
endif
return false
endfunction
function OIIOI0O takes nothing returns nothing
local trigger t
local unit OOI010
local unit OOI0I0
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
set OOI010=GetSpellTargetUnit()
set OOI0I0=GetTriggerUnit()
else
set OOI010=GetTriggerUnit()
set OOI0I0=GetAttacker()
endif
if IsUnitIllusion(OOI0I0)==false then
set t=CreateTrigger()
call IIOOIO(I011OO(t),"Source",OOI0I0)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function OIIOIOO))
endif
set t=null
set OOI010=null
set OOI0I0=null
endfunction
function OIIOIIO takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if GetUnitAbilityLevel(GetAttacker(),1093684314)>0 and II001O(I011OO(GetTriggeringTrigger()),"OrbOn")and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==IIO1OO(I011OO(GetTriggeringTrigger()),"Hero")then
call OIIOI0O()
endif
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if(GetIssuedOrderId()==OrderId("poisonarrows"))then
call IIOI0O(I011OO(GetTriggeringTrigger()),"OrbOn",true)
elseif(GetIssuedOrderId()==OrderId("unpoisonarrows"))then
call IIOI0O(I011OO(GetTriggeringTrigger()),"OrbOn",false)
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093684314 then
call OIIOI0O()
endif
return false
endfunction
function OIIOI1O takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function OIIOIIO))
call IIOOIO(I011OO(t),"Hero",GetTriggerUnit())
set t=null
endfunction
function OIIO1OO takes nothing returns boolean
if GetLearnedSkill()==1093684314 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093684314)==1 then
call OIIOI1O()
endif
return false
endfunction
function IOI1I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function OIIO1OO))
set t=null
endfunction
function OIIO10O takes nothing returns boolean
return IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)==true and IsUnitAlly(GetDyingUnit(),GetOwningPlayer(GetKillingUnit()))==false and GetUnitAbilityLevel(GetKillingUnit(),1093684314)>0 and IsUnitIllusion(GetKillingUnit())==false
endfunction
function OIIO1IO takes nothing returns nothing
call O0OI10("+1 Int",3,GetKillingUnit(),0.023,255,0,0,230)
call O0OI10("-1 Int",3,GetTriggerUnit(),0.023,255,0,0,230)
call SetHeroInt(GetDyingUnit(),GetHeroInt(GetDyingUnit(),false)-1,true)
call SetHeroInt(GetKillingUnit(),GetHeroInt(GetKillingUnit(),false)+1,true)
endfunction
function IOI100 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function OIIO10O))
call TriggerAddAction(t,function OIIO1IO)
endfunction
function OIIO11O takes nothing returns boolean
return GetSpellAbilityId()==1093684275
endfunction
function OII0OOO takes nothing returns nothing
local location O000OI=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,1697656901,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call ShowUnitHide(bj_lastCreatedUnit)
call UnitApplyTimedLifeBJ(5.00,1112820806,bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,1093684274)
call SetUnitAbilityLevelSwapped(1093684274,bj_lastCreatedUnit,GetUnitAbilityLevel(GetTriggerUnit(),1093684275))
call IssuePointOrderLoc(bj_lastCreatedUnit,"silence",O000OI)
call RemoveLocation(O000OI)
endfunction
function GS takes nothing returns nothing
set O1OII=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O1OII,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(O1OII,Condition(function OIIO11O))
call TriggerAddAction(O1OII,function OII0OOO)
endfunction
function OII0O0O takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),1110455638)>0 and GetSpellAbilityId()!=1095328363 and GetSpellAbilityId()!=1093678426
endfunction
function OII0OIO takes nothing returns nothing
local unit OOI010=GetTriggerUnit()
local unit OII0O1O=IIO1OO(I011OO(GetTriggeringTrigger()),"Silencer")
local unit O11O1I=CreateUnit(GetOwningPlayer(OII0O1O),1697656901,GetUnitX(OOI010),GetUnitY(OOI010),0)
if II1IOO(OII0O1O)==false and IsUnitEnemy(OOI010,GetOwningPlayer(OII0O1O))then
call UnitAddAbility(O11O1I,1093684307)
call SetUnitAbilityLevel(O11O1I,1093684307,GetUnitAbilityLevel(OII0O1O,1093684306))
call IssueTargetOrder(O11O1I,"soulburn",OOI010)
endif
endfunction
function OII00OO takes nothing returns boolean
return GetLearnedSkill()==1093684306 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function OII000O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local trigger t
if GetUnitAbilityLevel(OOOIO0,1093684306)==1 then
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(t,Condition(function OII0O0O))
call TriggerAddAction(t,function OII0OIO)
call IIOOIO(I011OO(t),"Silencer",OOOIO0)
endif
endfunction
function IOI110 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function OII00OO))
call TriggerAddAction(t,function OII000O)
endfunction
function OII00IO takes nothing returns boolean
return GetSpellAbilityId()==1093678644
endfunction
function OII001O takes nothing returns nothing
local location l=GetSpellTargetLoc()
local location m
local location u=GetUnitLoc(GetTriggerUnit())
local integer c=4+4*GetUnitAbilityLevelSwapped(1093678644,GetTriggerUnit())
local unit t=GetTriggerUnit()
local unit p
loop
exitwhen c<=0
set p=CreateUnit(GetOwningPlayer(t),1697656906,GetUnitX(t),GetUnitY(t),90)
set m=I0011O(l,GetRandomReal(0,360),GetRandomReal(0,360))
call IssuePointOrderLoc(p,"attackground",m)
call UnitApplyTimedLifeBJ(0.50,1112820806,p)
call RemoveLocation(m)
set c=c-1
endloop
call RemoveLocation(u)
call RemoveLocation(l)
endfunction
function SS takes nothing returns nothing
set O1O1I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O1O1I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(O1O1I,Condition(function OII00IO))
call TriggerAddAction(O1O1I,function OII001O)
endfunction
function OII0IOO takes nothing returns boolean
if(not(GetUnitTypeId(GetOrderedUnit())==1433631084))then
return false
endif
if(not(GetIssuedOrderId()==String2OrderIdBJ("thunderbolt")))then
return false
endif
return true
endfunction
function OII0I0O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOOIO0=IIO1OO(I1I0IO,"UnitVar")
local unit OII0IIO=IIO1OO(I1I0IO,"BuffUnit")
local player II01IO=IIO10O(I1I0IO,"PlayerVar")
call UnitShareVision(OOOIO0,II01IO,false)
call RemoveUnit(OII0IIO)
call UnitRemoveAbility(OOOIO0,1110455880)
set t=null
set OOOIO0=null
set OII0IIO=null
set II01IO=null
return false
endfunction
function OII0I1O takes nothing returns nothing
local player II01IO=GetOwningPlayer(GetOrderedUnit())
local unit OOOIO0=GetOrderTargetUnit()
local unit OII0IIO
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call UnitShareVision(OOOIO0,II01IO,true)
set OII0IIO=CreateUnit(GetOwningPlayer(GetOrderTargetUnit()),1697657170,0,0,bj_UNIT_FACING)
call UnitAddAbility(OII0IIO,1093684809)
call IIOOIO(I1I0IO,"UnitVar",OOOIO0)
call IIOOIO(I1I0IO,"PlayerVar",II01IO)
call IIOOIO(I1I0IO,"BuffUnit",OII0IIO)
call TriggerRegisterTimerEvent(t,3,false)
call TriggerAddCondition(t,Condition(function OII0I0O))
set t=null
endfunction
function IO1OO0 takes nothing returns nothing
set O10OI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O10OI,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(O10OI,Condition(function OII0IOO))
call TriggerAddAction(O10OI,function OII0I1O)
endfunction
function OII01OO takes nothing returns boolean
return GetLearnedSkill()==1093677909
endfunction
function OII010O takes nothing returns nothing
call SetPlayerTechResearchedSwap(1378889781,GetUnitAbilityLevelSwapped(1093677909,GetTriggerUnit()),GetOwningPlayer(GetLearningUnit()))
endfunction
function IO1O00 takes nothing returns nothing
set O100I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O100I,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(O100I,Condition(function OII01OO))
call TriggerAddAction(O100I,function OII010O)
endfunction
function OII01IO takes nothing returns boolean
return GetLearnedSkill()==1093677130 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function OII011O takes nothing returns nothing
if(GetUnitAbilityLevel(GetTriggerUnit(),1093684546)==0)then
call UnitAddAbility(GetTriggerUnit(),1093684546)
endif
call SetUnitAbilityLevel(GetTriggerUnit(),1093684546,GetUnitAbilityLevel(GetTriggerUnit(),1093677130))
endfunction
function II takes nothing returns nothing
set O10II=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O10II,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(O10II,Condition(function OII01IO))
call TriggerAddAction(O10II,function OII011O)
endfunction
function OIIIOOO takes nothing returns boolean
if((RAbsBJ((GetUnitFacing(GetTriggerUnit())-GetUnitFacing(GetAttacker())))<=105.00))then
return true
endif
return false
endfunction
function OIIIO0O takes nothing returns boolean
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetAttacker())))then
return false
endif
if(not(GetUnitAbilityLevelSwapped(1093682266,GetAttacker())>0))then
return false
endif
if(not(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false))then
return false
endif
if(not OIIIOOO())then
return false
endif
return true
endfunction
function OIIIOIO takes nothing returns nothing
local effect I01I1I=AddSpecialEffectTargetUnitBJ("chest",GetTriggerUnit(),"Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl")
call UnitDamageTargetBJ(GetAttacker(),GetTriggerUnit(),((0.25*I2R(GetUnitAbilityLevelSwapped(1093682266,GetAttacker())))*I2R(GetHeroStatBJ(1,GetAttacker(),true))),ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL)
call DestroyEffect(I01I1I)
endfunction
function IO1OI0 takes nothing returns nothing
set O101I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O101I,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(O101I,Condition(function OIIIO0O))
call TriggerAddAction(O101I,function OIIIOIO)
endfunction
function OIIIO1O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),I0OO1O,x,y,0)
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,I0O0OO)
local real OIII0OO=(83+17*IO0O0I)*0.01
call UnitApplyTimedLife(O11O1I,1112820806,6)
call SetUnitScale(O11O1I,OIII0OO,OIII0OO,OIII0OO)
if II0I1O(GetOwningPlayer(I1IIIO))then
call UnitAddAbility(O11O1I,I0O0IO)
call SetUnitAbilityLevel(O11O1I,I0O0IO,IO0O0I)
else
call UnitAddAbility(O11O1I,I0O00O)
call SetUnitAbilityLevel(O11O1I,I0O00O,IO0O0I)
endif
call IssuePointOrder(O11O1I,"cloudoffog",x,y)
call O00O00(x,y,225+25*IO0O0I)
call RemoveLocation(l)
set I1IIIO=null
set l=null
set O11O1I=null
endfunction
function OIII00O takes nothing returns boolean
if GetSpellAbilityId()==I0O0OO then
call OIIIO1O()
endif
return false
endfunction
function IO1O10 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OIII00O))
endfunction
function OIII0IO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093685593)
call UnitRemoveAbility(I1IIIO,1093685593)
call UnitAddAbility(I1IIIO,1093685593)
call SetUnitAbilityLevel(I1IIIO,1093685593,IO0O0I)
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set I1IIIO=null
return false
endfunction
function OIII01O takes unit I1IIIO returns nothing
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093685593)
call SetUnitState(I1IIIO,UNIT_STATE_MANA,GetUnitState(I1IIIO,UNIT_STATE_MANA)-(3+3*IO0O0I))
if GetUnitState(I1IIIO,UNIT_STATE_MANA)<(3+3*IO0O0I)then
call IssueImmediateOrder(I1IIIO,"unimmolation")
endif
endfunction
function OIIIIOO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
if GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if GetIssuedOrderId()==852178 then
call UnitRemoveAbility(I1IIIO,1093685594)
call I0111O(I1I0IO)
call I10I1O(t)
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function OIII0IO))
endif
else
call OIII01O(I1IIIO)
endif
set t=null
return false
endfunction
function OIIII0O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call UnitAddAbility(I1IIIO,1093685594)
call SetUnitAbilityLevel(I1IIIO,1093685594,GetUnitAbilityLevel(I1IIIO,1093685593))
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function OIIIIOO))
set I1IIIO=null
set t=null
endfunction
function OIIIIIO takes nothing returns boolean
if GetSpellAbilityId()==1093685593 then
call OIIII0O()
endif
return false
endfunction
function II11I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OIIIIIO))
set t=null
endfunction
function OIIII1O takes nothing returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(OOOO1O),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call UnitAddAbility(O11O1I,1093686069)
call IssueTargetOrder(O11O1I,"slow",GetEnumUnit())
call OII1O0(OOOO1O,GetEnumUnit(),1,I110I)
set O11O1I=null
endfunction
function OIII1OO takes unit OOI0I0,unit OOI010 returns nothing
local group g=CreateGroup()
set OOOO1O=OOI0I0
set I110I=GetUnitAbilityLevel(OOI0I0,1093685591)*15+15
call GroupEnumUnitsInRange(g,GetUnitX(OOI010),GetUnitY(OOI010),300,Condition(function OI0I00))
call ForGroup(g,function OIIII1O)
call DestroyGroup(g)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",GetUnitX(OOI010),GetUnitY(OOI010)))
set g=null
endfunction
function OIII10O takes unit OOI0I0,unit OOI010 returns nothing
local string I1I0IO=I011OO(OOI0I0)
local integer OO1100=II000O(I1I0IO,"StormreachCount")
local string fx=""
set OO1100=OO1100+1
if OO1100>(8-GetUnitAbilityLevel(OOI0I0,1093685591))then
set OO1100=0
call DestroyEffect(II0O0O(I1I0IO,"OverloadFX1"))
call DestroyEffect(II0O0O(I1I0IO,"OverloadFX2"))
call OIII1OO(OOI0I0,OOI010)
elseif OO1100==(8-GetUnitAbilityLevel(OOI0I0,1093685591))then
if IsUnitAlly(OOI0I0,GetLocalPlayer())then
set fx="Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl"
endif
call IIOOIO(I1I0IO,"OverloadFX1",AddSpecialEffectTarget(fx,OOI0I0,"right hand"))
call IIOOIO(I1I0IO,"OverloadFX2",AddSpecialEffectTarget(fx,OOI0I0,"left hand"))
endif
call IIO00O(I1I0IO,"StormreachCount",OO1100)
endfunction
function OIII1IO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==OOI0I0 then
call DisableTrigger(t)
call OIII10O(OOI0I0,OOI010)
call I0110O(I1I0IO)
call I10I1O(t)
endif
else
call I0110O(I1I0IO)
call I10I1O(t)
endif
set t=null
set OOI0I0=null
set OOI010=null
return false
endfunction
function OIII11O takes nothing returns nothing
local trigger t=CreateTrigger()
local unit OOI010=GetTriggerUnit()
local unit OOI0I0=GetAttacker()
local string I1I0IO=I011OO(t)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerAddCondition(t,Condition(function OIII1IO))
call IIOOIO(I1I0IO,"Target",OOI010)
call IIOOIO(I1I0IO,"Source",OOI0I0)
set OOI010=null
set OOI0I0=null
set t=null
endfunction
function OII1OOO takes nothing returns nothing
local unit OOI0I0=GetAttacker()
if I1IO0O(OOI0I0,"OverloadCooldown")==false then
call I1I01O(OOI0I0,"OverloadCooldown",0.4)
call OIII11O()
endif
endfunction
function OII1O0O takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),1093685591)>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==IIO1OO(I011OO(GetTriggeringTrigger()),"Hero")then
call OII1OOO()
endif
return false
endfunction
function OII1OIO takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function OII1O0O))
call IIOOIO(I011OO(t),"Hero",GetTriggerUnit())
set t=null
endfunction
function OII1O1O takes nothing returns boolean
if GetLearnedSkill()==1093685591 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093685591)==1 then
call OII1OIO()
endif
return false
endfunction
function II11O0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function OII1O1O))
set t=null
endfunction
function OII10OO takes nothing returns boolean
local group g=II0OOO(I011OO(GetTriggeringTrigger()),"g")
if IsUnitInGroup(GetTriggerUnit(),g)==false then
call GroupAddUnit(g,GetTriggerUnit())
call OO1010("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",GetTriggerUnit(),"origin",2)
call SetUnitPathing(GetTriggerUnit(),false)
endif
set g=null
return false
endfunction
function OII100O takes nothing returns nothing
call OO1010("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",GetEnumUnit(),"origin",2)
call SetUnitPathing(GetEnumUnit(),false)
endfunction
function OII10IO takes nothing returns nothing
call O00O00(GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),350)
call SetUnitPathing(GetEnumUnit(),true)
endfunction
function OII101O takes nothing returns nothing
call SetUnitX(GetEnumUnit(),GetUnitX(OOOO1O))
call SetUnitY(GetEnumUnit(),GetUnitY(OOOO1O))
endfunction
function OII1IOO takes nothing returns nothing
call SetUnitPosition(GetEnumUnit(),GetUnitX(GetEnumUnit())+40*Cos(I110I),GetUnitY(GetEnumUnit())+40*Sin(I110I))
endfunction
function OII1I0O takes nothing returns boolean
local trigger OII1IIO=GetTriggeringTrigger()
local string OII1I1O=I011OO(OII1IIO)
local group g=II0OOO(OII1I1O,"g")
local real OO1IOOO=II00IO(OII1I1O,"a")
local integer OII11OO=II000O(OII1I1O,"max")
local trigger OII110O
local string O0I0IIO
local lightning OII11IO=II0OIO(OII1I1O,"light")
local unit I1IIIO=IIO1OO(OII1I1O,"Hero")
local real x=II00IO(OII1I1O,"x")
local real y=II00IO(OII1I1O,"y")
set I110I=OO1IOOO
call ForGroup(g,function OII1IOO)
call MoveLightning(OII11IO,true,GetUnitX(I1IIIO),GetUnitY(I1IIIO),x,y)
if GetTriggerEvalCount(OII1IIO)>OII11OO then
call IIOI0O(I011OO(I1IIIO),"O10110",false)
set OOOO1O=I1IIIO
call ForGroup(g,function OII101O)
call DestroyLightning(OII11IO)
call SetUnitAnimationByIndex(I1IIIO,1)
call ForGroup(g,function OII10IO)
call DestroyGroup(g)
set OII110O=IIO11O(OII1I1O,"detectt")
set O0I0IIO=I011OO(OII110O)
call I0110O(O0I0IIO)
call I10I1O(OII110O)
call I0110O(OII1I1O)
call I10I1O(OII1IIO)
endif
set OII1IIO=null
set g=null
set OII110O=null
set OII11IO=null
set I1IIIO=null
return false
endfunction
function OII111O takes nothing returns nothing
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local unit I1IIIO=GetTriggerUnit()
local group g=CreateGroup()
local group g2=CreateGroup()
local trigger OII1IIO=CreateTrigger()
local trigger OII110O=CreateTrigger()
local real d
local string OII1I1O=I011OO(OII1IIO)
local string O0I0IIO=I011OO(OII110O)
local lightning OII11IO
if GetSpellTargetUnit()!=null then
set x=GetUnitX(GetSpellTargetUnit())
set y=GetUnitY(GetSpellTargetUnit())
endif
set d=O0O110(x,y,GetUnitX(I1IIIO),GetUnitY(I1IIIO))
set OII11IO=AddLightning("CLPB",true,GetUnitX(I1IIIO),GetUnitY(I1IIIO),x,y)
call SetLightningColor(OII11IO,.75,.75,1,.75)
call OO1010("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",GetTriggerUnit(),"origin",2)
call OO1I10("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",x,y,2)
call GroupAddUnit(g,I1IIIO)
call SetUnitAnimationByIndex(I1IIIO,0)
call SetUnitPathing(I1IIIO,false)
call TriggerRegisterTimerEvent(OII1IIO,0.03,true)
call TriggerAddCondition(OII1IIO,Condition(function OII1I0O))
call IIOOIO(OII1I1O,"g",g)
call IIOOIO(OII1I1O,"Hero",I1IIIO)
call IIO01O(OII1I1O,"a",Atan2(y-GetUnitY(I1IIIO),x-GetUnitX(I1IIIO)))
call IIO00O(OII1I1O,"max",R2I(d/ 40))
call IIOOIO(OII1I1O,"detectt",OII110O)
call IIOOIO(OII1I1O,"light",OII11IO)
call IIO01O(OII1I1O,"x",x)
call IIO01O(OII1I1O,"y",y)
call IIOI0O(I011OO(I1IIIO),"O10110",true)
call GroupEnumUnitsInRange(g,GetUnitX(I1IIIO),GetUnitY(I1IIIO),200,Condition(function OII0O0))
call ForGroup(g,function OII100O)
call TriggerRegisterUnitInRange(OII110O,I1IIIO,200,Condition(function OII0O0))
call TriggerAddCondition(OII110O,Condition(function OII10OO))
call IIOOIO(O0I0IIO,"g",g)
call RemoveLocation(l)
set OII11IO=null
set l=null
set g=null
set I1IIIO=null
set OII1IIO=null
set OII110O=null
endfunction
function O10110 takes nothing returns boolean
if GetSpellAbilityId()==1093685809 then
call OII111O()
endif
return false
endfunction
function OI1OOOO takes nothing returns nothing
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
if O00OI0(x,y)==false or OIIII0(x,y)then
call OOO010(GetTriggerUnit())
call I11I1O(GetOwningPlayer(GetTriggerUnit()),"Cannot use Lightning Grapple here")
endif
call RemoveLocation(l)
set l=null
endfunction
function OI1OO0O takes nothing returns boolean
if GetSpellAbilityId()==1093685809 then
call OI1OOOO()
endif
return false
endfunction
function II1100 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O10110))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function OI1OO0O))
endfunction
function OI1OOIO takes nothing returns nothing
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl",GetTriggerUnit(),"origin"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl",GetTriggerUnit(),"origin"))
endfunction
function OI1OO1O takes nothing returns boolean
if GetUnitTypeId(GetTriggerUnit())==1211117651 then
call OI1OOIO()
endif
return false
endfunction
function II1110 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function OI1OO1O))
set t=null
endfunction
function OI1O0OO takes nothing returns boolean
return GetSpellAbilityId()==1093681461
endfunction
function OI1O00O takes nothing returns boolean
if((GetUnitTypeId(GetFilterUnit())==1848652103))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())==1848652099))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())==1848652088))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())==1848651828))then
return true
endif
return false
endfunction
function OI1O0IO takes nothing returns nothing
local string I1I0IO=I011OO(GetOwningPlayer(GetTriggerUnit()))
local unit OO11II=IIO1OO(I1I0IO,"BearItemHolder")
local unit OI1O01O=IIO1OO(I1I0IO,"MyBear")
if OO11II!=null then
call UnitAddItem(OI1O01O,UnitRemoveItemFromSlot(OO11II,0))
call UnitAddItem(OI1O01O,UnitRemoveItemFromSlot(OO11II,1))
call UnitAddItem(OI1O01O,UnitRemoveItemFromSlot(OO11II,2))
call UnitAddItem(OI1O01O,UnitRemoveItemFromSlot(OO11II,3))
call UnitAddItem(OI1O01O,UnitRemoveItemFromSlot(OO11II,4))
call UnitAddItem(OI1O01O,UnitRemoveItemFromSlot(OO11II,5))
endif
endfunction
function OI1OIOO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local player II01IO=GetOwningPlayer(OOOIO0)
local location O000OI=GetUnitLoc(OOOIO0)
local boolexpr II1OIO=Condition(function OI1O00O)
local group II1O0O=CreateGroup()
local integer IO0O0I=GetUnitAbilityLevel(OOOIO0,1093681461)
local string I1I0IO=I011OO(II01IO)
local boolean OI1OI0O
call GroupEnumUnitsOfPlayer(II1O0O,GetOwningPlayer(OOOIO0),II1OIO)
call DestroyBoolExpr(II1OIO)
set OI1OI0O=CountUnitsInGroup(II1O0O)==0
if(IO0O0I==1 and OI1OI0O)then
call CreateNUnitsAtLoc(1,1848651828,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call IIOOIO(I1I0IO,"MyBear",bj_lastCreatedUnit)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
elseif(IO0O0I==2 and OI1OI0O)then
call CreateNUnitsAtLoc(1,1848652088,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call IIOOIO(I1I0IO,"MyBear",bj_lastCreatedUnit)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
elseif(IO0O0I==3 and OI1OI0O)then
call CreateNUnitsAtLoc(1,1848652099,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call IIOOIO(I1I0IO,"MyBear",bj_lastCreatedUnit)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
elseif(IO0O0I==4 and OI1OI0O)then
call CreateNUnitsAtLoc(1,1848652103,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call IIOOIO(I1I0IO,"MyBear",bj_lastCreatedUnit)
call OI1O0IO()
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
endif
call SetUnitAbilityLevel(bj_lastCreatedUnit,1093679449,IO0O0I)
call DestroyGroup(II1O0O)
call RemoveLocation(O000OI)
set OOOIO0=null
set II01IO=null
set O000OI=null
set II1O0O=null
endfunction
function OI1OIIO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local player II01IO=GetOwningPlayer(OOOIO0)
local location O000OI=GetUnitLoc(OOOIO0)
local boolexpr II1OIO=Condition(function OI1O00O)
local group II1O0O=CreateGroup()
local integer IO0O0I=GetUnitAbilityLevel(OOOIO0,1093681461)
local string I1I0IO=I011OO(II01IO)
local boolean OI1OI0O
call GroupEnumUnitsOfPlayer(II1O0O,GetOwningPlayer(OOOIO0),II1OIO)
call DestroyBoolExpr(II1OIO)
set OI1OI0O=CountUnitsInGroup(II1O0O)==0
if OI1OI0O==false then
call OOO010(OOOIO0)
call I11I1O(II01IO,"Spirit Bear is already summoned!")
endif
call DestroyGroup(II1O0O)
call RemoveLocation(O000OI)
endfunction
function IO1000 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function OI1O0OO))
call TriggerAddAction(t,function OI1OIOO)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function OI1O0OO))
call TriggerAddAction(t,function OI1OIIO)
endfunction
function OI1OI1O takes nothing returns boolean
return GetLearnedSkill()==1093681461 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function OI1O1OO takes nothing returns boolean
if((GetUnitTypeId(GetFilterUnit())==1848652099))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())==1848652088))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())==1848651828))then
return true
endif
return false
endfunction
function OI1O10O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local player II01IO=GetOwningPlayer(OOOIO0)
local location O000OI=GetUnitLoc(OOOIO0)
local boolexpr II1OIO=Condition(function OI1O1OO)
local group II1O0O=CreateGroup()
local integer IO0O0I=GetUnitAbilityLevel(OOOIO0,1093681461)
local string I1I0IO=I011OO(II01IO)
local integer OI1O1IO
local unit OI1O01O
local real O0II0IO
call GroupEnumUnitsOfPlayer(II1O0O,GetOwningPlayer(OOOIO0),II1OIO)
call DestroyBoolExpr(II1OIO)
set OI1O1IO=CountUnitsInGroup(II1O0O)
if(OI1O1IO==1)then
set OI1O01O=FirstOfGroup(II1O0O)
set O0II0IO=GetUnitLifePercent(OI1O01O)
set O000OI=GetUnitLoc(OI1O01O)
call RemoveUnit(OI1O01O)
if(IO0O0I==2)then
call CreateNUnitsAtLoc(1,1848652088,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
elseif(IO0O0I==3)then
call CreateNUnitsAtLoc(1,1848652099,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
elseif(IO0O0I==4)then
call CreateNUnitsAtLoc(1,1848652103,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
endif
call SetUnitLifePercentBJ(bj_lastCreatedUnit,O0II0IO)
call IIOOIO(I1I0IO,"MyBear",bj_lastCreatedUnit)
endif
call DestroyGroup(II1O0O)
endfunction
function IO1010 takes nothing returns nothing
set O1IOI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O1IOI,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(O1IOI,Condition(function OI1OI1O))
call TriggerAddAction(O1IOI,function OI1O10O)
endfunction
function OI1O11O takes nothing returns boolean
return GetUnitTypeId(GetAttacker())==1848652103 or GetUnitTypeId(GetAttacker())==1848652099 or GetUnitTypeId(GetAttacker())==1848652088 or GetUnitTypeId(GetAttacker())==1848651828
endfunction
function OI10OOO takes nothing returns nothing
local unit OI1O01O=GetAttacker()
local unit OI10O0O=OI10[GetPlayerId(GetOwningPlayer(OI1O01O))]
if((GetUnitX(OI10O0O)-GetUnitX(OI1O01O))*(GetUnitX(OI10O0O)-GetUnitX(OI1O01O))+(GetUnitY(OI10O0O)-GetUnitY(OI1O01O))*(GetUnitY(OI10O0O)-GetUnitY(OI1O01O))>=2250000)then
call SetUnitX(OI1O01O,GetUnitX(OI10O0O)+GetRandomReal(25,50)*Cos(GetRandomReal(0,360)))
call SetUnitY(OI1O01O,GetUnitY(OI10O0O)+GetRandomReal(25,50)*Sin(GetRandomReal(0,360)))
endif
endfunction
function IO10O0 takes nothing returns nothing
set O1I0I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O1I0I,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(O1I0I,Condition(function OI1O11O))
call TriggerAddAction(O1I0I,function OI10OOO)
endfunction
function OI10OIO takes nothing returns boolean
return GetSpellAbilityId()==1093681463
endfunction
function OI10O1O takes nothing returns nothing
local unit OI1O01O=GetTriggerUnit()
local unit OI10O0O=OI10[GetPlayerId(GetOwningPlayer(OI1O01O))]
call SetUnitX(OI1O01O,GetUnitX(OI10O0O)+GetRandomReal(25,50)*Cos(GetRandomReal(0,360)))
call SetUnitY(OI1O01O,GetUnitY(OI10O0O)+GetRandomReal(25,50)*Sin(GetRandomReal(0,360)))
endfunction
function IO10I0 takes nothing returns nothing
set O1III=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O1III,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(O1III,Condition(function OI10OIO))
call TriggerAddAction(O1III,function OI10O1O)
endfunction
function OI100OO takes nothing returns boolean
return GetLearnedSkill()==1093681464 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function OI1000O takes nothing returns nothing
call SetPlayerTechResearched(GetOwningPlayer(GetTriggerUnit()),1378889776,GetPlayerTechCount(GetOwningPlayer(GetTriggerUnit()),1378889776,true)+1)
call SetPlayerTechResearched(GetOwningPlayer(GetTriggerUnit()),1378889777,GetPlayerTechCount(GetOwningPlayer(GetTriggerUnit()),1378889777,true)+1)
endfunction
function IO1IO0 takes nothing returns nothing
set O1I1I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O1I1I,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(O1I1I,Condition(function OI100OO))
call TriggerAddAction(O1I1I,function OI1000O)
endfunction
function OI100IO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==1848652103 or GetUnitTypeId(GetTriggerUnit())==1848652099 or GetUnitTypeId(GetTriggerUnit())==1848652088 or GetUnitTypeId(GetTriggerUnit())==1848651828)and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function OI1001O takes nothing returns nothing
local string I1I0IO=I011OO(GetOwningPlayer(GetTriggerUnit()))
local unit OO11II=IIO1OO(I1I0IO,"BearItemHolder")
local unit OI1O01O=IIO1OO(I1I0IO,"MyBear")
local integer x
local integer y
if OO11II==null then
if II0I0O(GetOwningPlayer(OI1O01O))then
set x=-6390
set y=-5615
else
set x=5875
set y=5000
endif
set OO11II=CreateUnit(GetOwningPlayer(GetTriggerUnit()),1697657158,x,y,0)
call IIOOIO(I1I0IO,"BearItemHolder",OO11II)
endif
if(GetItemTypeId(GetEnumItem())!=1886613604 and GetItemTypeId(GetEnumItem())!=1868983399)then
call UnitAddItem(OO11II,GetEnumItem())
endif
call ShowUnit(OO11II,true)
endfunction
function OI10IOO takes nothing returns nothing
local location O000OI=GetUnitLoc(GetTriggerUnit())
local rect OO1I01O=RectFromCenterSizeBJ(O000OI,300.00,150.00)
local unit OI10O0O=OI10[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]
call SetHeroXP(OI10O0O,(GetHeroXP(OI10O0O)-(GetHeroXP(OI10O0O)/(125-(25*GetUnitAbilityLevel(OI10O0O,1093681461))))),false)
call UnitDamageTargetBJ(GetKillingUnit(),OI10O0O,(100.00*I2R(GetUnitAbilityLevel(OI10O0O,1093681461))),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
call EnumItemsInRectBJ(OO1I01O,function OI1001O)
call RemoveLocation(O000OI)
call RemoveRect(OO1I01O)
if II0==true then
call OO110I(OI10O0O)
endif
endfunction
function IO1I00 takes nothing returns nothing
set O11OI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O11OI,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(O11OI,Condition(function OI100IO))
call TriggerAddAction(O11OI,function OI10IOO)
endfunction
function OI10I0O takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==1311781171 or GetUnitTypeId(GetTriggerUnit())==1311781199 or GetUnitTypeId(GetTriggerUnit())==1311781173 or GetUnitTypeId(GetTriggerUnit())==1311781172)and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function OI10IIO takes nothing returns nothing
local unit OI1O01O=IIO1OO(I011OO(GetOwningPlayer(GetTriggerUnit())),"MyBear")
call KillUnit(OI1O01O)
endfunction
function IO1II0 takes nothing returns nothing
set O110I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O110I,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(O110I,Condition(function OI10I0O))
call TriggerAddAction(O110I,function OI10IIO)
endfunction
function OI10I1O takes nothing returns boolean
return GetLearnedSkill()==1093681483 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function OI101OO takes nothing returns nothing
if(GetUnitAbilityLevel(GetTriggerUnit(),1093681483)==1)then
call UnitAddAbility(GetTriggerUnit(),1093677652)
endif
endfunction
function IO1I10 takes nothing returns nothing
set O11II=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O11II,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(O11II,Condition(function OI10I1O))
call TriggerAddAction(O11II,function OI101OO)
endfunction
function OI1010O takes nothing returns boolean
if(GetSpellAbilityId()==1093681485 or GetSpellAbilityId()==1093681459 or GetSpellAbilityId()==1093681460 or GetSpellAbilityId()==1093677652)then
return true
endif
return false
endfunction
function OI101IO takes nothing returns boolean
if(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==true)then
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)then
if(GetUnitAbilityLevelSwapped(1093678162,GetFilterUnit())==0)then
return true
endif
endif
endif
return false
endfunction
function OI1011O takes nothing returns nothing
call IssueImmediateOrder(GetEnumUnit(),"locustswarm")
endfunction
function OI1IOOO takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),300.00,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)
endfunction
function OI1IO0O takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),450.00,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)
endfunction
function OI1IOIO takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),600.00,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)
endfunction
function OI1IO1O takes nothing returns nothing
local real x=GetUnitX(GetTriggerUnit())
local real y=GetUnitY(GetTriggerUnit())
local group II1O0O
if(GetSpellAbilityId()==1093681485)then
call OO1I10("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)
set II1O0O=CreateGroup()
call GroupEnumUnitsInRange(II1O0O,x,y,425,Condition(function OI101IO))
call ForGroup(II1O0O,function OI1IOOO)
call RemoveUnit(GetTriggerUnit())
call DestroyGroup(II1O0O)
endif
if(GetSpellAbilityId()==1093681459)then
call OO1I10("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)
set II1O0O=CreateGroup()
call GroupEnumUnitsInRange(II1O0O,x,y,435,Condition(function OI101IO))
call ForGroup(II1O0O,function OI1IO0O)
call RemoveUnit(GetTriggerUnit())
call DestroyGroup(II1O0O)
endif
if(GetSpellAbilityId()==1093681460)then
call OO1I10("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)
set II1O0O=CreateGroup()
call GroupEnumUnitsInRange(II1O0O,x,y,450,Condition(function OI101IO))
call ForGroup(II1O0O,function OI1IOIO)
call RemoveUnit(GetTriggerUnit())
call DestroyGroup(II1O0O)
endif
if(GetSpellAbilityId()==1093677652)then
set II1O0O=I0I1IO(GetOwningPlayer(GetTriggerUnit()),1865429304)
call ForGroup(II1O0O,function OI1011O)
call DestroyGroup(II1O0O)
set II1O0O=I0I1IO(GetOwningPlayer(GetTriggerUnit()),1865429042)
call ForGroup(II1O0O,function OI1011O)
call DestroyGroup(II1O0O)
set II1O0O=I0I1IO(GetOwningPlayer(GetTriggerUnit()),1865429058)
call ForGroup(II1O0O,function OI1011O)
call DestroyGroup(II1O0O)
endif
endfunction
function IO11O0 takes nothing returns nothing
set O111I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O111I,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddAction(O111I,function OI1IO1O)
call TriggerAddCondition(O111I,Condition(function OI1010O))
endfunction
function OI1I0OO takes nothing returns boolean
if((GetUnitTypeId(GetTriggerUnit())==1848651855))then
return true
endif
if((GetUnitTypeId(GetTriggerUnit())==1848651856))then
return true
endif
if((GetUnitTypeId(GetTriggerUnit())==1848651857))then
return true
endif
if((GetUnitTypeId(GetTriggerUnit())==1848651854))then
return true
endif
return false
endfunction
function OI1I00O takes nothing returns boolean
if GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())then
if((GetUnitTypeId(GetFilterUnit())==1848651855))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())==1848651856))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())==1848651857))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())==1848651854))then
return true
endif
endif
return false
endfunction
function OI1I0IO takes nothing returns nothing
local string I1I0IO=I011OO(GetOwningPlayer(GetTriggerUnit()))
local group II1O0O=I0I0OO(bj_mapInitialPlayableArea,Condition(function OI1I00O))
local integer OI1I01O=II000O(I1I0IO,"GMCount")
local integer OI1IIOO=0
local unit OI1II0O
local integer OI1IIIO
local unit O11OO0
local integer OI1II1O
local integer IIII0O
local integer IIIIIO
set OI1I01O=(OI1I01O+1)
call StartTimerBJ(IIO1IO(I1I0IO,"MineTimer"+I2S(OI1I01O)),false,15000.00)
call IIOOIO(I1I0IO,"GMUnit"+I2S(OI1I01O),GetTriggerUnit())
set OI1IIOO=CountUnitsInGroup(II1O0O)
if(OI1IIOO>15)then
set OI1IIIO=99999
set IIII0O=1
set IIIIIO=OI1I01O
loop
exitwhen IIII0O>IIIIIO
set O11OO0=IIO1OO(I1I0IO,"GMUnit"+I2S(IIII0O))
set OI1II1O=R2I(TimerGetRemaining(IIO1IO(I1I0IO,"MineTimer"+I2S(IIII0O))))
if(GetUnitState(O11OO0,UNIT_STATE_LIFE)>0 and OI1II1O<OI1IIIO)then
set OI1II0O=O11OO0
set OI1IIIO=OI1II1O
endif
set IIII0O=IIII0O+1
endloop
call ExplodeUnitBJ(OI1II0O)
endif
call IIO00O(I1I0IO,"GMCount",OI1I01O)
call DestroyGroup(II1O0O)
endfunction
function IO1100 takes nothing returns nothing
set IOOOI=CreateTrigger()
call TriggerRegisterEnterRectSimple(IOOOI,GetWorldBounds())
call TriggerAddCondition(IOOOI,Condition(function OI1I0OO))
call TriggerAddAction(IOOOI,function OI1I0IO)
endfunction
function OI1I1OO takes nothing returns boolean
return GetSpellAbilityId()==1093681745
endfunction
function OI1I10O takes nothing returns nothing
local location OI1I1IO=GetUnitLoc(GetTriggerUnit())
local location O00OIIO=GetSpellTargetLoc()
call CreateNUnitsAtLocFacingLocBJ(1,1697656901,GetOwningPlayer(GetTriggerUnit()),OI1I1IO,O00OIIO)
call UnitAddAbility(bj_lastCreatedUnit,1093678406)
call SetUnitAbilityLevelSwapped(1093678406,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093681745,GetTriggerUnit()))
call IssuePointOrderLoc(bj_lastCreatedUnit,"stampede",O00OIIO)
call RemoveLocation(OI1I1IO)
call RemoveLocation(O00OIIO)
endfunction
function IO11I0 takes nothing returns nothing
set IOO0I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IOO0I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(IOO0I,Condition(function OI1I1OO))
call TriggerAddAction(IOO0I,function OI1I10O)
endfunction
function OI1I11O takes nothing returns boolean
return GetSpellAbilityId()==1093678137
endfunction
function OI11OOO takes nothing returns nothing
call UnitDamageTarget(GetTriggerUnit(),GetSpellTargetUnit(),GetUnitAbilityLevel(GetTriggerUnit(),1093678137)*80,true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endfunction
function IO1110 takes nothing returns nothing
set IOOII=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IOOII,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(IOOII,Condition(function OI1I11O))
call TriggerAddAction(IOOII,function OI11OOO)
endfunction
function OI11O0O takes nothing returns boolean
return GetSpellAbilityId()==1093678645
endfunction
function OI11OIO takes nothing returns nothing
local integer IIII0O=0
local integer IIIIIO=5
local integer array OI11O1O
set OI11O1O[0]=0
set OI11O1O[1]=0
set OI11O1O[2]=0
set OI11O1O[3]=0
set OI11O1O[4]=0
set OI11O1O[5]=0
call DisableTrigger(IOO01O)
loop
exitwhen IIII0O>IIIIIO
if(GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),IIII0O))==1919906931 or GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),IIII0O))==1667786099 or GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),IIII0O))==1885628790 or GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),IIII0O))==1227894834 or GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),IIII0O))==1227894833 or GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),IIII0O))==1870030190 or GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),IIII0O))==1227894868)then
set OI11O1O[IIII0O]=GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),IIII0O))
call RemoveItem(UnitItemInSlot(GetTriggerUnit(),IIII0O))
endif
set IIII0O=IIII0O+1
endloop
call UnitResetCooldown(GetTriggerUnit())
set IIII0O=0
set IIIIIO=5
loop
exitwhen IIII0O>IIIIIO
call UnitAddItemToSlotById(GetTriggerUnit(),OI11O1O[IIII0O],IIII0O)
set IIII0O=IIII0O+1
endloop
call EnableTrigger(IOO01O)
endfunction
function I0OOO0 takes nothing returns nothing
set IOO1I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IOO1I,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(IOO1I,Condition(function OI11O0O))
call TriggerAddAction(IOO1I,function OI11OIO)
endfunction
function OI110OO takes nothing returns boolean
return GetLearnedSkill()==1093682009 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function OI1100O takes nothing returns nothing
local unit OI110IO=IIO1OO(I011OO(GetTriggeringTrigger()),"Tiny")
local integer IO0O0I=GetUnitAbilityLevel(OI110IO,1093682009)
if GetUnitState(OI110IO,UNIT_STATE_LIFE)>1 then
call SetUnitScale(OI110IO,0.5+0.25*IO0O0I,0.5+0.25*IO0O0I,0.5+0.25*IO0O0I)
endif
endfunction
function OI1101O takes nothing returns nothing
local trigger t
local unit OI110IO=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(OI110IO,1093682009)
call SetPlayerTechResearched(GetOwningPlayer(OI110IO),1378889797,IO0O0I)
if IO0O0I==1 then
set t=CreateTrigger()
call TriggerAddAction(t,function OI1100O)
call TriggerRegisterTimerEvent(t,2.00,true)
call IIOOIO(I011OO(t),"Tiny",OI110IO)
call SetUnitScale(OI110IO,0.5+0.25*IO0O0I,0.5+0.25*IO0O0I,0.5+0.25*IO0O0I)
endif
endfunction
function I0OO00 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function OI110OO))
call TriggerAddAction(t,function OI1101O)
endfunction
function OI11IOO takes nothing returns boolean
if(not(GetSpellAbilityId()==1093684300))then
return false
endif
return true
endfunction
function OI11I0O takes nothing returns nothing
local location O000OI=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,1697656901,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call RemoveLocation(O000OI)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call ShowUnitHide(bj_lastCreatedUnit)
call UnitApplyTimedLifeBJ(10.00,1112820806,bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,1093684039)
call SetUnitAbilityLevelSwapped(1093684039,bj_lastCreatedUnit,GetUnitAbilityLevel(GetTriggerUnit(),1093684300))
set O000OI=GetSpellTargetLoc()
call IssuePointOrderLoc(bj_lastCreatedUnit,"clusterrockets",O000OI)
call RemoveLocation(O000OI)
endfunction
function I0OOI0 takes nothing returns nothing
set IO0OI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IO0OI,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(IO0OI,Condition(function OI11IOO))
call TriggerAddAction(IO0OI,function OI11I0O)
endfunction
function OI11IIO takes nothing returns boolean
if(GetSpellAbilityId()!=1093681754)then
return false
endif
if I1O10O(GetSpellTargetUnit())then
return false
endif
if(GetOwningPlayer(GetSpellTargetUnit())==GetOwningPlayer(GetTriggerUnit()))then
return false
endif
return true
endfunction
function OI11I1O takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==true)then
return false
endif
if IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==true then
return false
elseif IsUnitType(GetFilterUnit(),UNIT_TYPE_FLYING)==true then
return false
elseif GetFilterUnit()==GetSpellAbilityUnit()then
return false
elseif IsUnitDeadBJ(GetFilterUnit())then
return false
elseif IsUnitType(GetTriggerUnit(),UNIT_TYPE_ANCIENT)==true then
return false
elseif GetUnitTypeId(GetFilterUnit())==1848651852 then
return false
elseif IsUnitType(GetTriggerUnit(),UNIT_TYPE_GIANT)==true then
return false
elseif IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetSpellAbilityUnit()))==false then
return false
elseif GetUnitAbilityLevelSwapped(1093678162,GetFilterUnit())!=0 then
return false
elseif(GetUnitTypeId(GetFilterUnit())==1211117638 or GetUnitTypeId(GetFilterUnit())==1211117637 or GetUnitTypeId(GetFilterUnit())==1211117639)then
return false
endif
return true
endfunction
function OI111OO takes unit h,real x,real y,real r,real d,integer ID returns nothing
local group g=CreateGroup()
local unit m
local location l
call GroupEnumUnitsInRange(g,x,y,r,Condition(function OI0O00))
loop
set m=FirstOfGroup(g)
exitwhen m==null
if IsUnitEnemy(m,GetOwningPlayer(h))and IsUnitDeadBJ(m)==false and GetUnitAbilityLevel(m,1093678162)==0 then
if(IsUnitType(m,UNIT_TYPE_STRUCTURE)==false)then
call UnitDamageTargetBJ(h,m,d,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION)
else
call UnitDamageTargetBJ(h,m,d/ 3,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION)
endif
set l=GetUnitLoc(m)
call DestroyEffect(AddSpellEffectByIdLoc(ID,EFFECT_TYPE_CASTER,l))
call DestroyEffect(AddSpellEffectByIdLoc(ID,EFFECT_TYPE_CASTER,l))
call DestroyEffect(AddSpellEffectByIdLoc(ID,EFFECT_TYPE_CASTER,l))
call RemoveLocation(l)
call GroupRemoveUnit(g,m)
else
call GroupRemoveUnit(g,m)
endif
endloop
call GroupClear(g)
call DestroyGroup(g)
endfunction
function OI1110O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer OI111IO=II000O(I1I0IO,"TossCounter")
local real OI1111O=II00IO(I1I0IO,"TossDistance")
local real O1OOOOO=II00IO(I1I0IO,"TossAngle")
local location O1OOO0O=II0O1O(I1I0IO,"TossTargetLoc")
local location O1OOOIO=II0O1O(I1I0IO,"TossSourceLoc")
local unit OI110IO=IIO1OO(I1I0IO,"Tiny")
local unit O1OOO1O=IIO1OO(I1I0IO,"TossSource")
local real y=(OI111IO-25)*(OI111IO-25)
local real x=OI1111O*OI111IO/ 50-OI1111O
local location OI0O10O=I0011O(O1OOO0O,x,O1OOOOO)
if(OI111IO<51)then
call SetUnitPositionLoc(O1OOO1O,OI0O10O)
call SetUnitFlyHeight(O1OOO1O,775-y,0)
set OI111IO=OI111IO+1
if(GetRandomInt(1,4)==2)then
call DestroyEffect(AddSpecialEffectTargetUnitBJ("origin",O1OOO1O,"Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl"))
endif
endif
if(OI111IO>50)then
call SetUnitFlyHeight(O1OOO1O,GetUnitDefaultFlyHeight(O1OOO1O),0)
call PauseUnit(O1OOO1O,false)
call SetUnitPathing(O1OOO1O,true)
call TerrainDeformationRippleBJ(0.2,true,O1OOO0O,1.00,300.00,96.00,1,64.00)
if IsUnitAlly(O1OOO1O,GetOwningPlayer(OI110IO))then
call UnitDamageTargetBJ(OI110IO,O1OOO1O,0.2*75*GetUnitAbilityLevel(OI110IO,1093681754),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION)
else
call UnitDamageTargetBJ(OI110IO,O1OOO1O,(0.2+0.15*GetUnitAbilityLevel(OI110IO,1093682009))*75*GetUnitAbilityLevel(OI110IO,1093681754),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION)
endif
call OI111OO(OI110IO,GetLocationX(O1OOO0O),GetLocationY(O1OOO0O),300,75.00*I2R(GetUnitAbilityLevelSwapped(1093681754,OI110IO)),1093681754)
call O00O00(GetLocationX(O1OOO0O),GetLocationY(O1OOO0O),300)
call RemoveLocation(O1OOO0O)
call RemoveLocation(O1OOOIO)
call I0111O(I1I0IO)
call I10I1O(t)
endif
call IIO00O(I1I0IO,"TossCounter",OI111IO)
call RemoveLocation(OI0O10O)
set O1OOO0O=null
set O1OOOIO=null
set OI110IO=null
set O1OOO1O=null
set OI0O10O=null
set t=null
return false
endfunction
function O1OO0OO takes nothing returns nothing
local group II1O0O=CreateGroup()
local trigger t
local unit OI110IO=GetTriggerUnit()
local unit O1OOO1O
local location O1OOO0O
local location O1OOOIO
local integer OI111IO
local real OI1111O
local real O1OOOOO
local string I1I0IO
call GroupEnumUnitsInRange(II1O0O,GetUnitX(OI110IO),GetUnitY(OI110IO),275,Condition(function OI11I1O))
set O1OOO1O=GroupPickRandomUnit(II1O0O)
call DestroyGroup(II1O0O)
set O1OOO0O=GetUnitLoc(GetSpellTargetUnit())
set O1OOOIO=GetUnitLoc(O1OOO1O)
set OI111IO=1
set OI1111O=DistanceBetweenPoints(O1OOOIO,O1OOO0O)
set O1OOOOO=AngleBetweenPoints(O1OOOIO,O1OOO0O)
if(O1OOO1O!=null and I1O10O(O1OOO1O)==false and GetOwningPlayer(GetSpellTargetUnit())!=GetOwningPlayer(OI110IO))then
call SetUnitAnimationByIndex(OI110IO,4)
call PauseUnit(O1OOO1O,true)
call SetUnitPathing(O1OOO1O,false)
call UnitAddAbility(O1OOO1O,1097691750)
call UnitRemoveAbility(O1OOO1O,1097691750)
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Tiny",OI110IO)
call IIOOIO(I1I0IO,"TossSource",O1OOO1O)
call IIOOIO(I1I0IO,"TossTargetLoc",O1OOO0O)
call IIOOIO(I1I0IO,"TossSourceLoc",O1OOOIO)
call IIO00O(I1I0IO,"TossCounter",OI111IO)
call IIO01O(I1I0IO,"TossDistance",OI1111O)
call IIO01O(I1I0IO,"TossAngle",O1OOOOO)
call TriggerRegisterTimerEvent(t,0.02,true)
call TriggerAddCondition(t,Condition(function OI1110O))
endif
set t=null
set II1O0O=null
set OI110IO=null
set O1OOO1O=null
set O1OOO0O=null
set O1OOOIO=null
endfunction
function I0OO10 takes nothing returns nothing
set IO00I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IO00I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(IO00I,Condition(function OI11IIO))
call TriggerAddAction(IO00I,function O1OO0OO)
endfunction
function O1OO00O takes nothing returns boolean
if(not(GetUnitAbilityLevelSwapped(1093681749,GetTriggerUnit())>0))then
return false
endif
if(not(IsUnitType(GetAttacker(),UNIT_TYPE_MELEE_ATTACKER)==true))then
return false
endif
return true
endfunction
function O1OO0IO takes nothing returns nothing
local location O000OI=GetUnitLoc(GetTriggerUnit())
if(GetRandomInt(1,100)<=(GetUnitAbilityLevelSwapped(1093681749,GetTriggerUnit())*6))then
call CreateNUnitsAtLocFacingLocBJ(1,1697656901,GetOwningPlayer(GetTriggerUnit()),O000OI,GetUnitLoc(GetAttacker()))
call UnitAddAbility(bj_lastCreatedUnit,1093681750)
call SetUnitAbilityLevelSwapped(1093681750,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093681749,GetTriggerUnit()))
call IssueTargetOrder(bj_lastCreatedUnit,"thunderbolt",GetAttacker())
endif
call RemoveLocation(O000OI)
endfunction
function I0O0O0 takes nothing returns nothing
set IO0II=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IO0II,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(IO0II,Condition(function O1OO00O))
call TriggerAddAction(IO0II,function O1OO0IO)
endfunction
function O1OO01O takes nothing returns boolean
return GetSpellAbilityId()==1093681733
endfunction
function O1OOIOO takes nothing returns nothing
call SetUnitAbilityLevel(GetTriggerUnit(),1093679429,GetUnitAbilityLevel(GetTriggerUnit(),1093681733))
endfunction
function I0O1O0 takes nothing returns nothing
set IO01I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IO01I,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerRegisterAnyUnitEventBJ(IO01I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(IO01I,Condition(function O1OO01O))
call TriggerAddAction(IO01I,function O1OOIOO)
endfunction
function O1OOI0O takes nothing returns boolean
return GetLearnedSkill()==1093681733 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function O1OOIIO takes nothing returns nothing
call SetUnitAbilityLevel(GetTriggerUnit(),1093679429,GetUnitAbilityLevel(GetTriggerUnit(),1093681733))
endfunction
function I0O100 takes nothing returns nothing
set IOIOI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IOIOI,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(IOIOI,Condition(function O1OOI0O))
call TriggerAddAction(IOIOI,function O1OOIIO)
endfunction
function O1OOI1O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
call UnitRemoveAbility(IIO1OO(I011OO(t),"Hero"),1093685827)
call I0110O(I011OO(t))
call I10I1O(t)
set t=null
return false
endfunction
function O1OO1OO takes unit OOI0I0,unit OOI010 returns nothing
local trigger t=CreateTrigger()
call IIOOIO(I011OO(t),"Hero",OOI010)
call TriggerRegisterTimerEvent(t,10,false)
call TriggerAddCondition(t,Condition(function O1OOI1O))
call UnitAddAbility(OOI010,1093685827)
call SetUnitAbilityLevel(OOI010,1093685827,GetUnitAbilityLevel(OOI0I0,1093685846))
call OII1O0(OOI0I0,OOI010,2,50*GetUnitAbilityLevel(OOI0I0,1093685846))
call O0OII0(I2S(50*GetUnitAbilityLevel(OOI0I0,1093685846)),1,OOI010,255,0,0)
call UnitRemoveAbility(OOI0I0,1110456395)
set t=null
endfunction
function O1OO10O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local trigger O1OO1IO=IIO11O(I1I0IO,"SourceT")
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==OOI0I0 then
call DisableTrigger(t)
call I0110O(I011OO(O1OO1IO))
call I10I1O(O1OO1IO)
call O1OO1OO(OOI0I0,OOI010)
call I0110O(I1I0IO)
call I10I1O(t)
endif
else
call I0110O(I1I0IO)
call I10I1O(t)
endif
set t=null
set OOI010=null
set OOI0I0=null
set O1OO1IO=null
return false
endfunction
function O1OO11O takes unit OOI0I0,unit OOI010,trigger O1OO1IO returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2.0,false)
call TriggerAddCondition(t,Condition(function O1OO10O))
call IIOOIO(I1I0IO,"Target",OOI010)
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIOOIO(I1I0IO,"SourceT",O1OO1IO)
set t=null
endfunction
function O1O0OOO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local real x=II00IO(I1I0IO,"x")
local real y=II00IO(I1I0IO,"y")
if GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED and GetAttacker()==I1IIIO and IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(I1IIIO))==false)then
if GetTriggerEventId()!=EVENT_UNIT_DEATH and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false then
call O1OO11O(I1IIIO,GetTriggerUnit(),t)
call UnitRemoveAbility(I1IIIO,1110456395)
call I0110O(I1I0IO)
call I10I1O(t)
endif
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call I0110O(I1I0IO)
call I10I1O(t)
endif
elseif GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED then
if x!=GetUnitX(I1IIIO)or y!=GetUnitY(I1IIIO)then
call UnitRemoveAbility(I1IIIO,1110456395)
call I0110O(I1I0IO)
call I10I1O(t)
endif
endif
set t=null
set I1IIIO=null
return false
endfunction
function O1O0O0O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call DestroyEffect(AddSpecialEffectTarget("effects\\PurpleAura.mdx",I1IIIO,"origin"))
call O00O10(I0010,GetUnitX(I1IIIO),GetUnitY(I1IIIO))
call O0O100(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,0.2,true)
call TriggerAddCondition(t,Condition(function O1O0OOO))
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIO01O(I1I0IO,"x",GetUnitX(I1IIIO))
call IIO01O(I1I0IO,"y",GetUnitY(I1IIIO))
call IssueImmediateOrder(I1IIIO,"holdposition")
set t=null
set I1IIIO=null
endfunction
function O1O0OIO takes nothing returns boolean
if GetSpellAbilityId()==1093685846 then
call O1O0O0O()
endif
return false
endfunction
function I1OOO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O1O0OIO))
set t=null
endfunction
function O1O0O1O takes nothing returns boolean
local unit I1IIIO=GetTriggerUnit()
local string I1I0IO=I011OO(I1IIIO)
local integer OIO1IIO=II000O(I1I0IO,"RefractionPrevent_Remaining")
if OIO1IIO>0 and GetTriggerEventId()!=EVENT_UNIT_DEATH then
if GetEventDamage()>5 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\PriestMissile\\PriestMissile.mdl",I1IIIO,"right hand"))
call OOIOI0(I1IIIO,GetEventDamage())
call IIO00O(I1I0IO,"RefractionPrevent_Remaining",OIO1IIO-1)
endif
else
call UnitRemoveAbility(I1IIIO,1093685838)
call IIO00O(I1I0IO,"RefractionPrevent_Remaining",0)
endif
set I1IIIO=null
return false
endfunction
function O1O00OO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local unit I1IIIO=IIO1OO(I011OO(t),"Hero")
local string I1I0IO=I011OO(I1IIIO)
local integer OIO1IIO=II000O(I1I0IO,"RefractionDamage_Remaining")
if GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED and GetAttacker()==I1IIIO and IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false)then
if GetTriggerEventId()!=EVENT_UNIT_DEATH and OIO1IIO>0 and GetEventDamage()>0 then
call IIO00O(I1I0IO,"RefractionDamage_Remaining",OIO1IIO-1)
else
call UnitRemoveAbility(I1IIIO,1093685830)
call UnitRemoveAbility(I1IIIO,1093685837)
call IIO00O(I1I0IO,"RefractionDamage_Remaining",0)
endif
endif
set t=null
set I1IIIO=null
return false
endfunction
function O1O000O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local unit I1IIIO=IIO1OO(I011OO(t),"Hero")
local string I1I0IO=I011OO(I1IIIO)
call IIO00O(I1I0IO,"RefractionPrevent_Remaining",0)
call IIO00O(I1I0IO,"RefractionDamage_Remaining",0)
call UnitRemoveAbility(I1IIIO,1093685830)
call UnitRemoveAbility(I1IIIO,1093685837)
call UnitRemoveAbility(I1IIIO,1093685838)
call I0110O(I011OO(t))
call I10I1O(t)
set t=null
set I1IIIO=null
return false
endfunction
function O1O00IO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local string I1I0IO=I011OO(I1IIIO)
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,20,false)
call TriggerAddCondition(t,Condition(function O1O000O))
call IIOOIO(I011OO(t),"Hero",I1IIIO)
call O00O10(I0OI0,GetUnitX(I1IIIO),GetUnitY(I1IIIO))
call UnitAddAbility(I1IIIO,1093685838)
call IIO00O(I1I0IO,"RefractionPrevent_Remaining",GetUnitAbilityLevel(I1IIIO,1093685829)+1)
call UnitAddAbility(I1IIIO,1093685830)
call SetUnitAbilityLevel(I1IIIO,1093685830,GetUnitAbilityLevel(I1IIIO,1093685829))
call UnitAddAbility(I1IIIO,1093685837)
call IIO00O(I1I0IO,"RefractionDamage_Remaining",GetUnitAbilityLevel(I1IIIO,1093685829)+1)
set I1IIIO=null
endfunction
function O1O001O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local trigger t
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function O1O0O1O))
call IIO00O(I011OO(I1IIIO),"RefractionPrevent_Remaining",0)
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function O1O00OO))
call IIOOIO(I011OO(t),"Hero",I1IIIO)
call IIO00O(I011OO(I1IIIO),"RefractionDamage_Remaining",0)
set t=null
set I1IIIO=null
endfunction
function O1O0IOO takes nothing returns boolean
if GetLearnedSkill()==1093685829 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093685829)==1 then
call O1O001O()
endif
return false
endfunction
function O1O0I0O takes nothing returns boolean
if GetSpellAbilityId()==1093685829 then
call O1O00IO()
endif
return false
endfunction
function I1OO00 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O1O0I0O))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function O1O0IOO))
set t=null
endfunction
function O1O0IIO takes unit u,real O1O0I1O,real O1O01OO,real O1O010O,real O1O01IO,real O1O011O returns boolean
local real O1OIOOO=O1O010O-O1O0I1O
local real O1OIO0O=O1O01IO-O1O01OO
local real O1OIOIO=GetUnitX(u)-O1O0I1O
local real O1OIO1O=GetUnitY(u)-O1O01OO
return O1O011O>=RAbsBJ(O1OIOOO*O1OIO1O-O1OIO0O*O1OIOIO)/ RAbsBJ(Pow(Pow(O1OIOOO,2)+Pow(O1OIO0O,2),0.5))
endfunction
function O1OI0OO takes unit OOI0I0,unit OOI010,real OOIO00,real O1OI00O,real O1OI0IO returns nothing
local real O1OI01O=160*GetUnitAbilityLevel(OOI0I0,1093685839)
local real O1OIIOO=160/ 2
local unit O1OII0O
local real dx
local real dy
local real O1OIIIO
local real x
local real y
local group g=CreateGroup()
local boolean O1OII1O
local boolean O1OI1OO
set dx=GetUnitX(OOI010)-GetUnitX(OOI0I0)
set dy=GetUnitY(OOI010)-GetUnitY(OOI0I0)
set O1OIIIO=Pow(Pow(dx,2)+Pow(dy,2),0.5)
set x=GetUnitX(OOI010)+(O1OI01O/ 2)*(dx/ O1OIIIO)
set y=GetUnitY(OOI010)+(O1OI01O/ 2)*(dy/ O1OIIIO)
set OOOO1O=OOI0I0
set I110I=OOIO00
call GroupEnumUnitsInRange(g,x,y,Pow(Pow(O1OI01O/ 2,2)+Pow(O1OIIOO/ 2,2),0.5),Condition(function OI0I00))
call GroupRemoveUnit(g,OOI010)
set O1OII0O=FirstOfGroup(g)
loop
exitwhen O1OII0O==null
set O1OII1O=O1O0IIO(O1OII0O,GetUnitX(OOI0I0),GetUnitY(OOI0I0),GetUnitX(OOI010),GetUnitY(OOI010),O1OIIOO/ 2)
set O1OI1OO=O1O0IIO(O1OII0O,x,y,x-100,y+100*x*Pow(y,-1),0.01+O1OI01O/ 2)
if O1OII1O and O1OI1OO then
call OII1O0(OOI0I0,O1OII0O,3,OOIO00)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\PriestMissile\\PriestMissile.mdl",O1OII0O,"chest"))
endif
call GroupRemoveUnit(g,O1OII0O)
set O1OII0O=FirstOfGroup(g)
endloop
call DestroyGroup(g)
set O1OII0O=null
set g=null
endfunction
function O1OI10O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==OOI0I0 and GetEventDamage()>1 then
call DisableTrigger(t)
call O1OI0OO(OOI0I0,OOI010,GetEventDamage(),II00IO(I1I0IO,"InitX"),II00IO(I1I0IO,"InitY"))
call I0110O(I1I0IO)
call I10I1O(t)
endif
else
call I0110O(I1I0IO)
call I10I1O(t)
endif
set t=null
set OOI0I0=null
set OOI010=null
return false
endfunction
function O1OI1IO takes nothing returns nothing
local trigger t=CreateTrigger()
local unit OOI010=GetTriggerUnit()
local unit OOI0I0=GetAttacker()
local string I1I0IO=I011OO(t)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerAddCondition(t,Condition(function O1OI10O))
call IIOOIO(I1I0IO,"Target",OOI010)
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIO01O(I1I0IO,"InitX",GetUnitX(OOI0I0))
call IIO01O(I1I0IO,"InitY",GetUnitY(OOI0I0))
set OOI010=null
set OOI0I0=null
set t=null
endfunction
function O1OI11O takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),1093685839)>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==IIO1OO(I011OO(GetTriggeringTrigger()),"Hero")then
call O1OI1IO()
endif
return false
endfunction
function O1O1OOO takes nothing returns nothing
local trigger t
if GetUnitAbilityLevel(GetTriggerUnit(),1093685839)==1 then
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function O1OI11O))
call IIOOIO(I011OO(t),"Hero",GetTriggerUnit())
endif
call SetPlayerTechResearched(GetOwningPlayer(GetTriggerUnit()),1382379618,GetUnitAbilityLevel(GetTriggerUnit(),1093685839))
set t=null
endfunction
function O1O1O0O takes nothing returns boolean
if GetLearnedSkill()==1093685839 and IsUnitIllusion(GetTriggerUnit())==false then
call O1O1OOO()
endif
return false
endfunction
function I1OOI0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function O1O1O0O))
set t=null
endfunction
function O1O1OIO takes unit u returns nothing
local unit I1IIIO=OI10[GetPlayerId(GetOwningPlayer(u))]
local string I1I0IO=I011OO(I1IIIO)
local integer O1O1O1O
local integer i
local integer x
local unit O1O10OO
if GetUnitTypeId(I1IIIO)!=1160786265 then
return
endif
set O1O1O1O=II000O(I1I0IO,"TrapMax")
set i=1
loop
exitwhen i>O1O1O1O
set O1O10OO=IIO1OO(I1I0IO,"Trap"+I2S(i))
if O1O10OO==u then
set x=i
loop
exitwhen x==O1O1O1O
call IIOOIO(I1I0IO,"Trap"+I2S(x),IIO1OO(I1I0IO,"Trap"+I2S(x+1)))
set x=x+1
endloop
set i=O1O1O1O
endif
set i=i+1
endloop
call IIO00O(I1I0IO,"TrapMax",O1O1O1O-1)
set O1O10OO=null
set I1IIIO=null
endfunction
function O1O100O takes unit u returns nothing
local unit I1IIIO=OI10[GetPlayerId(GetOwningPlayer(u))]
local string I1I0IO=I011OO(I1IIIO)
local integer O1O1O1O=II000O(I1I0IO,"TrapMax")
set O1O1O1O=O1O1O1O+1
call IIOOIO(I1I0IO,"Trap"+I2S(O1O1O1O),u)
call IIO00O(I1I0IO,"TrapMax",O1O1O1O)
set I1IIIO=null
endfunction
function O1O10IO takes nothing returns nothing
call O1O1OIO(GetTriggerUnit())
endfunction
function O1O101O takes unit u returns nothing
local integer O1O1IOO=GetUnitAbilityLevel(u,1093685840)*3+2
local string I1I0IO=I011OO(u)
local integer O1O1O1O=II000O(I1I0IO,"TrapMax")
local unit O1O10OO=IIO1OO(I1I0IO,"Trap1")
if O1O1O1O==O1O1IOO then
call O1O1OIO(O1O10OO)
call RemoveUnit(O1O10OO)
endif
set O1O10OO=null
endfunction
function O1O1I0O takes nothing returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(GetTriggerUnit()),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call UnitAddAbility(O11O1I,1093685845)
call IssueTargetOrder(O11O1I,"slow",GetEnumUnit())
call UnitAddAbility(O11O1I,1093686071)
set O11O1I=null
endfunction
function O1O1IIO takes nothing returns nothing
local unit OOI0I0=GetTriggerUnit()
local real x=GetUnitX(OOI0I0)
local real y=GetUnitY(OOI0I0)
local group g=CreateGroup()
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl",x,y))
call GroupEnumUnitsInRange(g,x,y,400,Condition(function OI00I0))
call ForGroup(g,function O1O1I0O)
call DestroyGroup(g)
call O1O1OIO(OOI0I0)
call RemoveUnit(OOI0I0)
set g=null
set OOI0I0=null
endfunction
function O1O1I1O takes unit u returns nothing
call IssueImmediateOrder(u,"locustswarm")
endfunction
function O1O11OO takes nothing returns boolean
return GetOwningPlayer(GetFilterUnit())==OOO01O and GetUnitTypeId(GetFilterUnit())==1697657392
endfunction
function O1O110O takes nothing returns nothing
local real O1O11IO=O0O110(GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),I110I,I11II)
local real O1O111O=O0O110(GetUnitX(OOOO1O),GetUnitY(OOOO1O),I110I,I11II)
if O1O11IO<O1O111O then
set OOOO1O=GetEnumUnit()
endif
endfunction
function O10OOOO takes nothing returns nothing
local group g=CreateGroup()
set OOO01O=GetOwningPlayer(GetTriggerUnit())
call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),9000,Condition(function O1O11OO))
set OOOO1O=FirstOfGroup(g)
set I110I=GetUnitX(GetTriggerUnit())
set I11II=GetUnitY(GetTriggerUnit())
call ForGroup(g,function O1O110O)
call O1O1I1O(OOOO1O)
call DestroyGroup(g)
set g=null
endfunction
function O10OO0O takes nothing returns nothing
call UnitAddAbility(GetTriggerUnit(),1093685844)
endfunction
function O10OOIO takes nothing returns nothing
local location l=GetSpellTargetLoc()
call O1O101O(GetTriggerUnit())
call O1O100O(CreateUnit(GetOwningPlayer(GetTriggerUnit()),1697657392,GetLocationX(l),GetLocationY(l),0))
call RemoveLocation(l)
set l=null
endfunction
function O10OO1O takes nothing returns boolean
if GetSpellAbilityId()==1093685840 then
call O10OOIO()
endif
if GetSpellAbilityId()==1093685844 then
call O10OOOO()
endif
return false
endfunction
function O10O0OO takes nothing returns boolean
if GetSpellAbilityId()==1093685841 then
call O1O1IIO()
endif
return false
endfunction
function O10O00O takes nothing returns boolean
if GetLearnedSkill()==1093685840 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093685840)==1 then
call O10OO0O()
endif
return false
endfunction
function O10O0IO takes nothing returns boolean
if GetUnitTypeId(GetDyingUnit())==1697657392 then
call O1O10IO()
endif
return false
endfunction
function I1OO10 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O10OO1O))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function O10O0IO))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O10O0OO))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function O10O00O))
set t=null
endfunction
function O10O01O takes nothing returns boolean
return GetUnitAbilityLevel(GetAttacker(),1110454863)>0
endfunction
function O10OIOO takes nothing returns nothing
set IO0[GetPlayerId(GetOwningPlayer(GetDyingUnit()))]=0
set IO0[GetPlayerId(GetOwningPlayer(GetAttacker()))]=(IO0[GetPlayerId(GetOwningPlayer(GetAttacker()))]+1)
if(IO0[GetPlayerId(GetOwningPlayer(GetAttacker()))]>=5)then
call UnitRemoveAbility(GetAttacker(),1110454863)
set IO0[GetPlayerId(GetOwningPlayer(GetAttacker()))]=0
endif
endfunction
function I0O000 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function O10O01O))
call TriggerAddAction(t,function O10OIOO)
endfunction
function O10OI0O takes nothing returns boolean
return GetSpellAbilityId()==1093678393
endfunction
function O10OIIO takes nothing returns nothing
set IO0[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]=0
endfunction
function I0O0I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O10OI0O))
call TriggerAddAction(t,function O10OIIO)
endfunction
function O10OI1O takes nothing returns boolean
if(UnitHasBuffBJ(GetAttacker(),1110454856)==false)then
return false
endif
if(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==true)then
return false
endif
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetAttacker())))then
return false
endif
return true
endfunction
function O10O1OO takes nothing returns nothing
local real O0O1I0O=(GetUnitStateSwap(UNIT_STATE_LIFE,GetAttacker())*(0.03+(0.01*I2R(GetUnitAbilityLevelSwapped(1093684291,GetAttacker())))))
call UnitDamageTargetBJ(GetAttacker(),GetTriggerUnit(),O0O1I0O,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL)
endfunction
function I0O010 takes nothing returns nothing
set IOI0I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IOI0I,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(IOI0I,Condition(function O10OI1O))
call TriggerAddAction(IOI0I,function O10O1OO)
endfunction
function O10O10O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local unit OOI010=IIO1OO(I1I0IO,"Target")
local real x1=II00IO(I1I0IO,"x1")
local real x2=II00IO(I1I0IO,"x2")
local real y1=II00IO(I1I0IO,"y1")
local real y2=II00IO(I1I0IO,"y2")
call SetUnitPosition(OOI0I0,x2,y2)
call SetUnitPosition(OOI010,x1,y1)
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set OOI0I0=null
set OOI010=null
return false
endfunction
function O10O1IO takes nothing returns nothing
local unit OOI0I0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local real x1=GetUnitX(OOI0I0)
local real y1=GetUnitY(OOI0I0)
local real x2=GetUnitX(OOI010)
local real y2=GetUnitY(OOI010)
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIO01O(I1I0IO,"x1",x1)
call IIO01O(I1I0IO,"x2",x2)
call IIO01O(I1I0IO,"y1",y1)
call IIO01O(I1I0IO,"y2",y2)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function O10O10O))
call O0O010("SPLK",x1,y1,x2,y2,0.5,0,1,1,0.3)
call O00O00(x1,y1,300)
call O00O00(x2,y2,300)
set OOI0I0=null
set OOI010=null
set t=null
endfunction
function O10O11O takes nothing returns boolean
if GetSpellAbilityId()==1093677127 then
call O10O1IO()
endif
return false
endfunction
function O100OOO takes nothing returns nothing
if(IsTerrainPathable(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),PATHING_TYPE_WALKABILITY))then
call OOO010(GetTriggerUnit())
call I11I1O(GetOwningPlayer(GetTriggerUnit()),"Cannot use nether swap here")
endif
endfunction
function O100O0O takes nothing returns boolean
if GetSpellAbilityId()==1093677127 then
call O100OOO()
endif
return false
endfunction
function I0OIO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O10O11O))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function O100O0O))
set t=null
endfunction
constant function O100OIO takes nothing returns integer
return 1093684789
endfunction
constant function O100O1O takes nothing returns integer
return 1093683779
endfunction
constant function O1000OO takes nothing returns integer
return 1093677616
endfunction
constant function O10000O takes nothing returns integer
return 1093678915
endfunction
constant function O1000IO takes nothing returns integer
return 1093678668
endfunction
function O10001O takes nothing returns boolean
return(GetSpellAbilityId()==O100O1O()or GetSpellAbilityId()==O1000OO()or GetSpellAbilityId()==O10000O()or GetSpellAbilityId()==O1000IO())and GetUnitAbilityLevel(GetTriggerUnit(),O100OIO())>0
endfunction
function O100IOO takes nothing returns nothing
local real O100I0O=0.96-0.02*GetUnitAbilityLevel(GetTriggerUnit(),O100OIO())
local real O100IIO=GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)
local real OOIO00=O100IIO-O100IIO*O100I0O
call UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),OOIO00,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\ForkedLightning\\ForkedLightningTarget.mdl",GetEnumUnit(),"overhead"))
endfunction
function O100I1O takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function O1001OO takes nothing returns nothing
local location O000OI=GetUnitLoc(GetTriggerUnit())
local group II1O0O=CreateGroup()
local real x=GetLocationX(O000OI)
local real y=GetLocationY(O000OI)
local boolexpr II1OIO=Condition(function O100I1O)
call GroupEnumUnitsInRange(II1O0O,x,y,800,II1OIO)
call ForGroup(II1O0O,function O100IOO)
call RemoveLocation(O000OI)
call DestroyGroup(II1O0O)
call DestroyBoolExpr(II1OIO)
endfunction
function I0OI00 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O10001O))
call TriggerAddAction(t,function O1001OO)
endfunction
function O10010O takes nothing returns boolean
if((GetSpellAbilityId()==1093678915))then
return true
endif
if((GetSpellAbilityId()==1093678668))then
return true
endif
return false
endfunction
function O1001IO takes nothing returns boolean
if(not O10010O())then
return false
endif
return true
endfunction
function O10011O takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true)and GetUnitTypeId(GetFilterUnit())!=1211117642
endfunction
function O10IOOO takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==true)
endfunction
function O10IO0O takes nothing returns boolean
return GetBooleanAnd(O10011O(),O10IOOO())
endfunction
function O10IOIO takes nothing returns boolean
if(not(GetSpellAbilityId()==1093678915))then
return false
endif
return true
endfunction
function O10IO1O takes nothing returns nothing
local location O000OI=GetUnitLoc(GetEnumUnit())
if(O10IOIO())then
call CreateNUnitsAtLoc(1,1697656880,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,1093678419)
call SetUnitAbilityLevelSwapped(1093678419,bj_lastCreatedUnit,(4+GetUnitAbilityLevelSwapped(1093678915,GetTriggerUnit())))
call IssueTargetOrder(bj_lastCreatedUnit,"chainlightning",GetEnumUnit())
call UnitApplyTimedLifeBJ(3.00,1112820806,bj_lastCreatedUnit)
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,1097625443)
else
call CreateNUnitsAtLoc(1,1697656880,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,1093678419)
call SetUnitAbilityLevelSwapped(1093678419,bj_lastCreatedUnit,(5+GetUnitAbilityLevelSwapped(1093678668,GetTriggerUnit())))
call IssueTargetOrder(bj_lastCreatedUnit,"chainlightning",GetEnumUnit())
call UnitApplyTimedLifeBJ(3.00,1112820806,bj_lastCreatedUnit)
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,1097625443)
endif
call RemoveLocation(O000OI)
endfunction
function O10I0OO takes nothing returns nothing
local group II1O0O=I0I0OO(bj_mapInitialPlayableArea,Condition(function O10IO0O))
call ForGroupBJ(II1O0O,function O10IO1O)
call DestroyGroup(II1O0O)
endfunction
function I0OII0 takes nothing returns nothing
set IOIII=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IOIII,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(IOIII,Condition(function O1001IO))
call TriggerAddAction(IOIII,function O10I0OO)
endfunction
constant function O10I00O takes nothing returns integer
return 1093683779
endfunction
constant function O10I0IO takes nothing returns integer
return 1697656880
endfunction
constant function O10I01O takes nothing returns integer
return 1093678419
endfunction
function O10IIOO takes nothing returns boolean
return GetSpellAbilityId()==O10I00O()
endfunction
function O10II0O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),O10I0IO(),GetUnitX(OOI010),GetUnitY(OOI010),0)
call UnitAddAbility(O11O1I,O10I01O())
call SetUnitAbilityLevel(O11O1I,O10I01O(),GetUnitAbilityLevel(I1IIIO,O10I00O()))
call IssueTargetOrder(O11O1I,"chainlightning",OOI010)
call UnitApplyTimedLife(O11O1I,1112820806,3)
call SetUnitPathing(O11O1I,false)
call UnitAddAbility(O11O1I,1097625443)
endfunction
function I0OI10 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O10IIOO))
call TriggerAddAction(t,function O10II0O)
endfunction
constant function O10IIIO takes nothing returns integer
return 1093683507
endfunction
function O10II1O takes nothing returns boolean
return GetSpellAbilityId()==O10IIIO()
endfunction
function O10I1OO takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local real OOIO00=II00IO(I1I0IO,"Damage")
call UnitDamageTarget(I1IIIO,I1IIIO,OOIO00,false,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call I0110O(I1I0IO)
call PauseTimer(t)
call DestroyTimer(t)
endfunction
function O10I10O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local real OOIO00=25+25*GetUnitAbilityLevel(I1IIIO,O10IIIO())
local timer t=CreateTimer()
local string I1I0IO=I011OO(t)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",OOI010,"origin"))
if IsUnitAlly(OOI010,GetOwningPlayer(I1IIIO))and GetUnitState(OOI010,UNIT_STATE_LIFE)>1.00 then
call SetUnitState(OOI010,UNIT_STATE_LIFE,GetUnitState(OOI010,UNIT_STATE_LIFE)+2*OOIO00)
else
call UnitDamageTarget(I1IIIO,OOI010,2*OOIO00,false,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endif
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIO01O(I1I0IO,"Damage",OOIO00)
call TimerStart(t,0,false,function O10I1OO)
endfunction
function IIOI00 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O10II1O))
call TriggerAddAction(t,function O10I10O)
endfunction
function O10I1IO takes nothing returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(OOOO1O),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call UnitAddAbility(O11O1I,1093684554)
call SetUnitAbilityLevel(O11O1I,1093684554,I1III)
call IssueTargetOrder(O11O1I,"forkedlightning",GetEnumUnit())
set O11O1I=null
endfunction
function O10I11O takes unit OOI0I0,unit OOI010,integer IO0O0I returns nothing
local group g=CreateGroup()
set OOOO1O=OOI0I0
set I1III=IO0O0I
call GroupEnumUnitsInRange(g,GetUnitX(OOI010),GetUnitY(OOI010),700,Condition(function OI0IO0))
call ForGroup(g,function O10I1IO)
call DestroyGroup(g)
set g=null
endfunction
function O101OOO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local real O101O0O=II00IO(I1I0IO,"Life")
local unit OOI0I0
local integer IO0O0I
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if O101O0O<GetEventDamage()then
set OOI0I0=IIO1OO(I1I0IO,"Source")
set IO0O0I=II000O(I1I0IO,"Level")
call DestroyEffect(II0O0O(I1I0IO,"FX"))
call I0111O(I1I0IO)
call I10I1O(t)
call OOIOI0(GetTriggerUnit(),O101O0O)
call O10I11O(OOI0I0,GetTriggerUnit(),IO0O0I)
elseif GetEventDamage()>0 then
call OOIOI0(GetTriggerUnit(),GetEventDamage())
call IIO01O(I1I0IO,"Life",O101O0O-GetEventDamage())
endif
else
call DestroyEffect(II0O0O(I1I0IO,"FX"))
call I0111O(I1I0IO)
call I10I1O(t)
endif
set t=null
return false
endfunction
function O101OIO takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=GetSpellTargetUnit()
local unit OOI0I0=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,1093684550)
call UnitRemoveBuffs(OOI010,false,true)
call IIO01O(I1I0IO,"Life",75+50*IO0O0I)
call IIOOIO(I1I0IO,"FX",AddSpecialEffectTarget("war3mapImported\\Defensive Barrier big.mdx",OOI010,"chest"))
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIO00O(I1I0IO,"Level",IO0O0I)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,20,false)
call TriggerAddCondition(t,Condition(function O101OOO))
set t=null
set OOI010=null
set OOI0I0=null
endfunction
function O101O1O takes nothing returns boolean
if GetSpellAbilityId()==1093684550 then
call O101OIO()
endif
return false
endfunction
function O1010OO takes nothing returns nothing
if GetUnitAbilityLevel(GetSpellTargetUnit(),1112433775)>0 then
call OOO010(GetTriggerUnit())
call I11I1O(GetOwningPlayer(GetTriggerUnit()),"Cannot use Aphotic Shield on Doomed Unit")
endif
endfunction
function O10100O takes nothing returns boolean
if GetSpellAbilityId()==1093684550 then
call O1010OO()
endif
return false
endfunction
function IIOI10 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function O10100O))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O101O1O))
set t=null
endfunction
function O1010IO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=GetTriggerUnit()
local integer O0IOI1O=2+GetUnitAbilityLevel(I1IIIO,1093684819)
if GetTriggerEventId()==EVENT_UNIT_DAMAGED and I1IO0O(I1IIIO,"BorrowedTimeActive")then
call OOIOI0(I1IIIO,GetEventDamage())
elseif(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093684819)or(GetTriggerEventId()==EVENT_UNIT_DAMAGED and I1IO0O(I1IIIO,"BorrowedTimeCD")==false and GetUnitState(I1IIIO,UNIT_STATE_LIFE)<400)then
call UnitRemoveBuffs(I1IIIO,false,true)
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
call DisableTrigger(t)
call IssueImmediateOrder(I1IIIO,"windwalk")
call EnableTrigger(t)
endif
call I1I01O(I1IIIO,"BorrowedTimeActive",O0IOI1O)
call I1I01O(I1IIIO,"BorrowedTimeCD",45)
call OO1010("Abilities\\Spells\\Undead\\Unsummon\\UnsummonTarget.mdl",I1IIIO,"origin",O0IOI1O)
endif
set t=null
set I1IIIO=null
return false
endfunction
function O10101O takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O1010IO))
set t=null
endfunction
function O101IOO takes nothing returns boolean
if GetLearnedSkill()==1093684819 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093684819)==1 then
call O10101O()
endif
return false
endfunction
function IIO1O0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function O101IOO))
set t=null
endfunction
constant function O101I0O takes nothing returns integer
return 1110455862
endfunction
constant function O101IIO takes nothing returns integer
return 1093684552
endfunction
constant function O101I1O takes nothing returns integer
return 1093684551
endfunction
function O1011OO takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),O101I0O())>0
endfunction
function O10110O takes nothing returns nothing
local unit IOO1OI=GetAttacker()
local unit OOI010=GetTriggerUnit()
local unit SourceHero
local integer IO0O0I=GetUnitAbilityLevel(IOO1OI,O101I1O())
local unit O11O1I=CreateUnit(GetOwningPlayer(IOO1OI),1697656901,GetUnitX(IOO1OI),GetUnitY(IOO1OI),0)
if IO0O0I>0 then
call IIO00O(I011OO(OOI010),"MarkOfTheAbyss|Level",IO0O0I)
else
set IO0O0I=II000O(I011OO(OOI010),"MarkOfTheAbyss|Level")
endif
call UnitAddAbility(O11O1I,O101IIO())
call SetUnitAbilityLevel(O11O1I,O101IIO(),IO0O0I)
call IssueTargetOrder(O11O1I,"bloodlust",IOO1OI)
endfunction
function IIOII0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function O1011OO))
call TriggerAddAction(t,function O10110O)
endfunction
function O1011IO takes integer i returns nothing
call DestroyEffect(I0O1OO[i])
set I0O1OO[i]=null
set I0OIIO[i]=null
set I0OI1O[i]=null
set I0O10O[i]=0
set I0O1IO[i]=0
set I0O11O[i]=0
if i!=I0OI0O then
set I0O1OO[i]=I0O1OO[I0OI0O]
set I0OIIO[i]=I0OIIO[I0OI0O]
set I0OI1O[i]=I0OI1O[I0OI0O]
set I0O10O[i]=I0O10O[I0OI0O]
set I0O1IO[i]=I0O1IO[I0OI0O]
set I0O11O[i]=I0O11O[I0OI0O]
set I0O1OO[I0OI0O]=null
set I0OIIO[I0OI0O]=null
set I0OI1O[I0OI0O]=null
set I0O10O[I0OI0O]=0
set I0O1IO[I0OI0O]=0
set I0O11O[I0OI0O]=0
endif
set I0OI0O=I0OI0O-1
endfunction
function O10111O takes nothing returns boolean
local integer i=1
local real OOOI0IO=I10IOO()
loop
exitwhen i>I0OI0O
if OOOI0IO>I0O10O[i]then
if GetUnitAbilityLevel(I0OIIO[i],I0O01O)>0 then
call UnitRemoveAbility(I0OIIO[i],I0O01O)
endif
call O1011IO(i)
elseif(OOOI0IO-I0O1IO[i])>1 then
if I0OI1O[i]!=null then
call OII1O0(I0OI1O[i],I0OIIO[i],1,I0O11O[i])
call OII1O0(I0OI1O[i],I0OIIO[i],2,0.01)
endif
set I0O1IO[i]=I0O1IO[i]+1
set i=i+1
else
set i=i+1
endif
endloop
return false
endfunction
function O1IOOOO takes nothing returns boolean
local unit O1IOO0O=GetTriggerUnit()
local unit O1IOOIO=GetKillingUnit()
local integer i=1
loop
exitwhen i>I0OI0O
if I0OIIO[i]==O1IOO0O then
call O1011IO(i)
endif
set i=i+1
endloop
if O1IOOIO==null then
set O1IOO0O=null
set O1IOOIO=null
return false
endif
if I100OO(O1IOOIO)then
set O1IOOIO=I100IO(O1IOOIO)
endif
set i=1
loop
exitwhen i>I0OI0O
if(O1IOOIO==I0OIIO[i])then
if GetUnitAbilityLevel(O1IOOIO,I0O01O)>0 then
call UnitRemoveAbility(O1IOOIO,I0O01O)
endif
call O1011IO(i)
else
set i=i+1
endif
endloop
set O1IOO0O=null
set O1IOOIO=null
return false
endfunction
function O1IOO1O takes unit OOI010 returns integer
local integer i=1
loop
exitwhen i>I0OI0O
if I0OIIO[i]==OOI010 then
return i
endif
set i=i+1
endloop
return-1
endfunction
function O1IO0OO takes nothing returns nothing
local unit OOI0I0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local real OOIO00=15
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,I0OIOO)
local real O0IOI1O=5+IO0O0I*5
local integer i
if IO0O0I>2 then
set OOIO00=5+IO0O0I*5
endif
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\ReviveDemon\\ReviveDemon.mdl",OOI010,"overhead"))
if GetUnitAbilityLevel(OOI010,I0O01O)==0 then
call UnitAddAbility(OOI010,I0O01O)
else
call SetUnitAbilityLevel(OOI010,I0O01O,GetUnitAbilityLevel(OOI0I0,I0OIOO))
endif
set i=O1IOO1O(OOI010)
if i==-1 then
set I0OI0O=I0OI0O+1
set I0OIIO[I0OI0O]=OOI010
set I0OI1O[I0OI0O]=OOI0I0
set I0O10O[I0OI0O]=O0IOI1O+I10IOO()+1
set I0O1IO[I0OI0O]=I10IOO()
set I0O11O[I0OI0O]=OOIO00
set I0O1OO[I0OI0O]=AddSpecialEffectTarget("Abilities\\Spells\\Other\\SoulBurn\\SoulBurnbuff.mdl",OOI010,"overhead")
else
set I0OI1O[i]=OOI0I0
set I0O10O[i]=O0IOI1O+I10IOO()+1
set I0O11O[i]=OOIO00
endif
set OOI0I0=null
set OOI010=null
endfunction
function O1IO00O takes nothing returns boolean
if GetSpellAbilityId()==I0OIOO then
call O1IO0OO()
endif
return false
endfunction
function I0O1I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,0.25,true)
call TriggerAddCondition(t,Condition(function O10111O))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O1IO00O))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function O1IOOOO))
set t=null
endfunction
function O1IO0IO takes nothing returns nothing
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",GetEnumUnit(),"origin"))
call OII1O0(GetTriggerUnit(),GetEnumUnit(),2,GetUnitAbilityLevel(GetTriggerUnit(),1093681974)*25+75)
endfunction
function O1IO01O takes nothing returns nothing
local group g=CreateGroup()
local unit I1IIIO=GetTriggerUnit()
call GroupEnumUnitsInRange(g,GetUnitX(I1IIIO),GetUnitY(I1IIIO),300,Condition(function OI0010))
call ForGroup(g,function O1IO0IO)
call SetUnitAnimation(I1IIIO,"spin")
call O01I10(I1IIIO,0.6)
call I1I01O(I1IIIO,"O1IO01O",0.6)
call DestroyGroup(g)
set g=null
set I1IIIO=null
endfunction
function O1IOIOO takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),1110455120)>0 and IsUnitType(GetAttacker(),UNIT_TYPE_STRUCTURE)==false and IsUnitType(GetAttacker(),UNIT_TYPE_MECHANICAL)==false and GetUnitAbilityLevel(GetAttacker(),1093678162)==0 and IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false and GetRandomReal(0,100)<15 and I1IO0O(GetTriggerUnit(),"O1IO01O")==false then
call O1IO01O()
endif
return false
endfunction
function I0O110 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function O1IOIOO))
set t=null
endfunction
function O1IOI0O takes nothing returns boolean
return OI00I0()and GetUnitAbilityLevel(GetFilterUnit(),1110454328)==0 and GetUnitAbilityLevel(GetFilterUnit(),1113815395)==0
endfunction
function O1IOIIO takes string I1I0IO,integer O1IOI1O returns nothing
local integer i=1
loop
exitwhen i>O1IOI1O
call DestroyEffect(II0O0O(I1I0IO,"FX"+I2S(i)))
set i=i+1
endloop
endfunction
function O1IO1OO takes nothing returns nothing
call IssueTargetOrder(GetEnumUnit(),"attack",OOOO1O)
endfunction
function O1IO10O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local group g=II0OOO(I1I0IO,"Group")
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local integer O1IOI1O=II000O(I1I0IO,"MaxFX")
if GetTriggerEventId()!=EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER and GetTriggerEventId()!=EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER and GetTriggerEventId()!=EVENT_PLAYER_UNIT_ISSUED_ORDER then
call UnitRemoveAbility(I1IIIO,1093683509)
call DestroyGroup(g)
call O1IOIIO(I1I0IO,O1IOI1O)
call I0111O(I1I0IO)
call I10I1O(t)
else
if IsUnitInGroup(GetTriggerUnit(),g)==true then
call DisableTrigger(t)
call IssueTargetOrder(GetTriggerUnit(),"attack",I1IIIO)
call EnableTrigger(t)
endif
endif
set t=null
set g=null
set I1IIIO=null
return false
endfunction
function O1IO1IO takes nothing returns nothing
set I1III=I1III+1
call IIOOIO(OOOI0O,"FX"+I2S(I1III),AddSpecialEffectTarget("Abilities\\Weapons\\LavaSpawnMissile\\LavaSpawnBirthMissile.mdl",GetEnumUnit(),"chest"))
endfunction
function O1IO11O takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093683510)
local group g=CreateGroup()
call UnitAddAbility(I1IIIO,1093683509)
call SetUnitAbilityLevel(I1IIIO,1093683509,IO0O0I)
set OOOO1O=I1IIIO
set I1III=0
set OOOI0O=I1I0IO
call GroupEnumUnitsInRange(g,GetUnitX(I1IIIO),GetUnitY(I1IIIO),300,Condition(function O1IOI0O))
call ForGroup(g,function O1IO1IO)
call ForGroup(g,function O1IO1OO)
call IIO00O(I1I0IO,"MaxFX",I1III)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIOOIO(I1I0IO,"Group",g)
call TriggerRegisterTimerEvent(t,1+0.5*IO0O0I,false)
call O0O100(t,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call O0O100(t,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call O0O100(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function O1IO10O))
set t=null
set g=null
set I1IIIO=null
endfunction
function O1I0OOO takes nothing returns boolean
if GetSpellAbilityId()==1093683510 then
call O1IO11O()
endif
return false
endfunction
function I00OO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O1I0OOO))
set t=null
endfunction
constant function O1I0O0O takes nothing returns integer
return 1093682482
endfunction
function O1I0OIO takes nothing returns boolean
return GetSpellAbilityId()==O1I0O0O()
endfunction
function O1I0O1O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local real O101O0O=GetUnitState(OOI010,UNIT_STATE_LIFE)
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,O1I0O0O())
local unit O11O1I
if(O101O0O<=300 and IO0O0I==1)or(O101O0O<=450 and IO0O0I==2)or(O101O0O<=625 and IO0O0I==3)then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl",OOI010,"overhead"))
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656901,0,0,0)
call UnitRemoveBuffs(OOI010,true,true)
call UnitDamageTarget(O11O1I,OOI010,100000000.00,true,false,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endif
endfunction
function I00O00 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O1I0OIO))
call TriggerAddAction(t,function O1I0O1O)
endfunction
function O1I00OO takes nothing returns boolean
return GetSpellAbilityId()==1093683019
endfunction
function O1I000O takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetSpellTargetUnit(),75*GetUnitAbilityLevel(GetTriggerUnit(),1093683019),ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)
if GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)>1 then
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+75*GetUnitAbilityLevel(GetTriggerUnit(),1093683019))
endif
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl",GetSpellTargetUnit(),"origin"))
endfunction
function O1I00IO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local player p=IIO10O(I1I0IO,"p")
local integer IO0O0I=II000O(I1I0IO,"Level")
local unit O11O1I
if GetUnitAbilityLevel(OOI010,1110454854)==0 then
call I0111O(I1I0IO)
call I10I1O(t)
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED and GetTriggerUnit()==OOI010 then
call UnitRemoveAbility(OOI010,1110454854)
set O11O1I=CreateUnit(p,1697656901,GetUnitX(OOI010),GetUnitY(OOI010),0)
call UnitAddAbility(O11O1I,1093678169)
call SetUnitAbilityLevel(O11O1I,1093678169,IO0O0I)
call IssueTargetOrder(O11O1I,"sleep",GetAttacker())
call I0111O(I1I0IO)
call I10I1O(t)
elseif GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED then
if GetUnitState(OOI010,UNIT_STATE_LIFE)>21 then
call SetUnitState(OOI010,UNIT_STATE_LIFE,GetUnitState(OOI010,UNIT_STATE_LIFE)-20)
else
call UnitRemoveAbility(OOI010,1110454854)
call OII1O0(OOI0I0,OOI010,1,50)
call I0111O(I1I0IO)
call I10I1O(t)
endif
endif
set t=null
set p=null
set O11O1I=null
set OOI010=null
set OOI0I0=null
return false
endfunction
function O1I001O takes nothing returns nothing
local unit OOI0I0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
set I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIOOIO(I1I0IO,"p",GetOwningPlayer(OOI0I0))
call IIO00O(I1I0IO,"Level",GetUnitAbilityLevel(OOI0I0,1093678169))
call O0O100(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function O1I00IO))
call OII1O0(OOI0I0,OOI010,1,5)
set OOI0I0=null
set OOI010=null
set t=null
endfunction
function O1I0IOO takes nothing returns boolean
if GetSpellAbilityId()==1093678169 and I1O10O(GetSpellTargetUnit())==false then
call O1I001O()
endif
return false
endfunction
function I00OI0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O1I0IOO))
endfunction
function O1I0I0O takes nothing returns boolean
return GetSpellAbilityId()==1093677649
endfunction
function O1I0IIO takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOOIO0=IIO1OO(I011OO(t),"UnitVar")
if(GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST or GetUnitState(OOOIO0,UNIT_STATE_MANA)<=20.00)then
call IssueImmediateOrder(OOOIO0,"stop")
call I0110O(I1I0IO)
call OO10O0(t)
else
call SetUnitManaBJ(OOOIO0,GetUnitState(OOOIO0,UNIT_STATE_MANA)-4-4*GetUnitAbilityLevel(OOOIO0,1093677649))
call UnitDamageTargetBJ(OOOIO0,OOOIO0,4+4*GetUnitAbilityLevel(OOOIO0,1093677649),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MIND)
endif
endfunction
function O1I0I1O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,0.20,true)
call TriggerRegisterUnitEvent(t,OOOIO0,EVENT_UNIT_SPELL_ENDCAST)
call TriggerAddAction(t,function O1I0IIO)
call IIOOIO(I1I0IO,"UnitVar",OOOIO0)
endfunction
function I00O10 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O1I0I0O))
call TriggerAddAction(t,function O1I0I1O)
endfunction
function O1I01OO takes nothing returns boolean
if(GetUnitTypeId(GetDyingUnit())==1848651852)then
return false
endif
if(IsUnitType(GetDyingUnit(),UNIT_TYPE_STRUCTURE)==true)then
return false
endif
if(GetUnitAbilityLevel(GetKillingUnit(),1093684293)>0)then
return true
endif
return false
endfunction
function O1I010O takes nothing returns nothing
local real OOIII1O=0.05
local real O1I01IO
if(IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)==true)then
set OOIII1O=0.1
endif
set O1I01IO=GetUnitAbilityLevel(GetKillingUnit(),1093684293)*OOIII1O*GetUnitState(GetDyingUnit(),UNIT_STATE_MAX_LIFE)
if GetUnitState(GetKillingUnit(),UNIT_STATE_LIFE)>1 then
call SetWidgetLife(GetKillingUnit(),GetUnitState(GetKillingUnit(),UNIT_STATE_LIFE)+O1I01IO)
endif
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\HeroBloodElfBlood.mdl",GetKillingUnit(),"overhead"))
endfunction
function I000O0 takes nothing returns nothing
set IO1OI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IO1OI,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(IO1OI,Condition(function O1I01OO))
call TriggerAddAction(IO1OI,function O1I010O)
endfunction
function O1I011O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local unit OOI010=IIO1OO(I1I0IO,"Target")
local integer IO0O0I=II000O(I1I0IO,"Level")
local real O1IIOOO=II00IO(I1I0IO,"LastX")
local real O1IIO0O=II00IO(I1I0IO,"LastY")
local real x=GetUnitX(OOI010)
local real y=GetUnitY(OOI010)
local real O1IIOIO=0.2*IO0O0I*SquareRoot((O1IIOOO-x)*(O1IIOOO-x)+(O1IIO0O-y)*(O1IIO0O-y))
local integer OO0010O=II000O(I1I0IO,"Iteration")
if O1IIOIO>200 then
set O1IIOIO=0
endif
if O1IIOIO>5 then
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",OOI010,"origin"))
endif
if O1IIOIO>0 and I1I11O(OOI010)==false then
call OII1O0(OOI0I0,OOI010,3,O1IIOIO)
endif
call IIO01O(I1I0IO,"LastX",x)
call IIO01O(I1I0IO,"LastY",y)
call IIO00O(I1I0IO,"Iteration",OO0010O+1)
if I1I11O(OOI010)then
call I0111O(I1I0IO)
call I10I1O(t)
elseif OO0010O>4*(3+2*IO0O0I)then
call UnitRemoveAbility(OOI010,1093683528)
call I0111O(I1I0IO)
call I10I1O(t)
endif
set t=null
set OOI0I0=null
set OOI010=null
return false
endfunction
function O1IIO1O takes nothing returns nothing
local unit OOI0I0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,1093684296)
call UnitAddAbility(OOI010,1093683528)
call SetUnitAbilityLevel(OOI010,1093683528,IO0O0I)
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIO00O(I1I0IO,"Level",IO0O0I)
call IIO01O(I1I0IO,"LastX",GetUnitX(OOI010))
call IIO01O(I1I0IO,"LastY",GetUnitY(OOI010))
call IIO00O(I1I0IO,"Iteration",0)
call TriggerRegisterTimerEvent(t,0.25,true)
call TriggerAddCondition(t,Condition(function O1I011O))
call OII1O0(OOI0I0,OOI010,3,50+100*IO0O0I)
set OOI0I0=null
set OOI010=null
set t=null
endfunction
function O1II0OO takes nothing returns boolean
if GetSpellAbilityId()==1093684296 then
call O1IIO1O()
endif
return false
endfunction
function I00000 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O1II0OO))
set t=null
endfunction
constant function O1II00O takes nothing returns integer
return 1093683512
endfunction
constant function O1II0IO takes nothing returns integer
return 1093684295
endfunction
constant function O1II01O takes nothing returns integer
return 1110455634
endfunction
function O1IIIOO takes nothing returns boolean
return GetLearnedSkill()==O1II00O()and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),O1II00O())==1
endfunction
function O1III0O takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(O00I))
endfunction
function O1IIIIO takes nothing returns nothing
local real OOIIO0=OOII10(GetEnumUnit(),O00I)
if O0II==0 or GetUnitState(O00I,UNIT_STATE_LIFE)<1 then
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(O00I),false)
else
if OOIIO0>=O0II*1500 or(OOIIO0<O0II*1500 and GetUnitStatePercent(GetEnumUnit(),UNIT_STATE_LIFE,UNIT_STATE_MAX_LIFE)>40)then
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(O00I),false)
endif
if OOIIO0<O0II*1500 and GetUnitLifePercent(GetEnumUnit())<=40 then
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(O00I),true)
set O1II=true
endif
endif
endfunction
function O1III1O takes nothing returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(O00I),1697656901,GetUnitX(O00I),GetUnitY(O00I),0)
call UnitAddAbility(O11O1I,O1II0IO())
call SetUnitAbilityLevel(O11O1I,O1II0IO(),O0II)
call IssueTargetOrder(O11O1I,"bloodlust",O00I)
endfunction
function O1II1OO takes nothing returns nothing
call UnitRemoveAbility(O00I,O1II01O())
endfunction
function O1II10O takes nothing returns nothing
local unit I1IIIO=IIO1OO(I011OO(GetExpiredTimer()),"Hero")
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function O1III0O)
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,O1II00O())
set O00I=I1IIIO
set O0II=IO0O0I
set O1II=false
call GroupEnumUnitsInRect(II1O0O,GetWorldBounds(),II1OIO)
call ForGroup(II1O0O,function O1IIIIO)
if O1II then
call O1III1O()
else
call O1II1OO()
endif
call DestroyBoolExpr(II1OIO)
call DestroyGroup(II1O0O)
endfunction
function O1II1IO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local timer t=CreateTimer()
call IIOOIO(I011OO(t),"Hero",I1IIIO)
call TimerStart(t,0.5,true,function O1II10O)
endfunction
function I000I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function O1IIIOO))
call TriggerAddAction(t,function O1II1IO)
endfunction
function O1II11O takes nothing returns boolean
return GetUnitTypeId(GetSummonedUnit())==1865429043
endfunction
function O1I1OOO takes nothing returns nothing
local unit O1I1O0O=GetSummonedUnit()
local unit O1I1OIO=GetSummoningUnit()
local string I1I0IO=I011OO(O1I1OIO)
local integer IO0O0I=GetUnitAbilityLevel(O1I1OIO,1093681735)
local integer O1I1O1O=II000O(I1I0IO,"TotalWebs")
local unit O1I10OO=IIO1OO(I1I0IO,"Web1")
local integer x=1
set O1I1O1O=O1I1O1O+1
call SetUnitVertexColorBJ(O1I1O0O,100,100,100,70)
call UnitAddAbility(O1I1O0O,1097625443)
call IIOOIO(I1I0IO,"Web"+I2S(O1I1O1O),O1I1O0O)
if(O1I1O1O>IO0O0I*2)then
call KillUnit(O1I10OO)
loop
exitwhen x==O1I1O1O
call IIOOIO(I1I0IO,"Web"+I2S(x),IIO1OO(I1I0IO,"Web"+I2S(x+1)))
set x=x+1
endloop
set O1I1O1O=O1I1O1O-1
endif
call IIO00O(I1I0IO,"TotalWebs",O1I1O1O)
call SetUnitAbilityLevel(O1I1O0O,1093681734,IO0O0I)
endfunction
function I00010 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function O1II11O))
call TriggerAddAction(t,function O1I1OOO)
endfunction
function O1I100O takes unit O1I1OIO returns nothing
local string I1I0IO=I011OO(O1I1OIO)
local integer IO0O0I=GetUnitAbilityLevel(O1I1OIO,1093681735)
local integer O1I1O1O=II000O(I1I0IO,"TotalWebs")
local integer x=1
local unit OI1I1IO
loop
exitwhen x>O1I1O1O
set OI1I1IO=IIO1OO(I1I0IO,"Web"+I2S(x))
call SetUnitAbilityLevel(OI1I1IO,1093681734,IO0O0I)
set x=x+1
endloop
endfunction
function O1I10IO takes nothing returns boolean
return GetLearnedSkill()==1093681735 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function O1I101O takes nothing returns nothing
local unit O1I1OIO=IIO1OO(I011OO(GetTriggeringTrigger()),"Spider")
if GetUnitAbilityLevel(O1I1OIO,1110454595)>0 then
call UnitAddAbility(O1I1OIO,1093677617)
else
call UnitRemoveAbility(O1I1OIO,1093677617)
endif
endfunction
function O1I1IOO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local trigger t
if(GetUnitAbilityLevel(OOOIO0,1093681735)==1)then
set t=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(t,1.50)
call TriggerAddAction(t,function O1I101O)
call IIOOIO(I011OO(t),"Spider",OOOIO0)
else
call O1I100O(OOOIO0)
endif
endfunction
function I00IO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function O1I10IO))
call TriggerAddAction(t,function O1I1IOO)
endfunction
function O1I1I0O takes nothing returns boolean
return GetSpellAbilityId()==1093678389
endfunction
function O1I1IIO takes nothing returns nothing
local location O000OI=GetUnitLoc(GetSpellTargetUnit())
local integer IO0O0I=GetUnitAbilityLevel(GetTriggerUnit(),1093678389)
local integer O1I1I1O=GetRandomInt(1,IO0O0I+1)
local unit OOOIO0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local real OOIO00=GetRandomReal(1,200)
if(IO0O0I==4)then
set O1I1I1O=GetRandomInt(2,4)
endif
call CreateNUnitsAtLoc(1,1697656901,GetOwningPlayer(OOOIO0),O000OI,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,1093678165)
call SetUnitAbilityLevel(bj_lastCreatedUnit,1093678165,O1I1I1O)
call IssueTargetOrder(bj_lastCreatedUnit,"thunderbolt",OOI010)
call UnitDamageTargetBJ(OOOIO0,OOI010,OOIO00,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC)
call O0OII0(I2S(O1I1I1O),O1I1I1O,OOI010,50,50,255)
endfunction
function I00I00 takes nothing returns nothing
set IO10I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IO10I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(IO10I,Condition(function O1I1I0O))
call TriggerAddAction(IO10I,function O1I1IIO)
endfunction
function O1I11OO takes nothing returns boolean
return GetLearnedSkill()==1095263841 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function O1I110O takes nothing returns nothing
if(UnitHasBuffBJ(GetTriggerUnit(),1112504171))then
call UnitRemoveAbility(GetTriggerUnit(),1112504171)
endif
call DisableTrigger(IO1II)
endfunction
function IIOIO0 takes nothing returns nothing
set IO1II=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IO1II,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(IO1II,Condition(function O1I11OO))
call TriggerAddAction(IO1II,function O1I110O)
endfunction
function O1I11IO takes integer x returns boolean
return x==1093678680 or x==1093681489
endfunction
function O1I111O takes nothing returns boolean
return(GetLearnedSkill()==1093685063)and(IsUnitIllusion(GetTriggerUnit())==false)
endfunction
function O11OOOO takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),1110455896)>0 and(I1OOOO(GetSpellAbilityId())or GetSpellAbilityId()==1093685065)and O1I11IO(GetSpellAbilityId())==false
endfunction
function O11OO0O takes nothing returns nothing
local string I1I0IO=I011OO(GetTriggeringTrigger())
local unit OOOIO0=GetTriggerUnit()
local unit O11OOIO=IIO1OO(I1I0IO,"Destroyer")
local integer O0OI1OO=GetUnitAbilityLevel(O11OOIO,1093685063)
if GetRandomInt(1,100)<=O0OI1OO*10 and OOI000(OOOIO0,O11OOIO,1400)then
call SetUnitState(OOOIO0,UNIT_STATE_MANA,GetUnitState(OOOIO0,UNIT_STATE_MANA)+0.25*GetUnitState(OOOIO0,UNIT_STATE_MAX_MANA))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCasterOverhead.mdl",OOOIO0,"overhead"))
endif
endfunction
function O11OO1O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local integer O0OI1OO=GetUnitAbilityLevel(OOOIO0,1093685063)
local trigger t
if(O0OI1OO==1)then
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O11OOOO))
call TriggerAddAction(t,function O11OO0O)
call IIOOIO(I011OO(t),"Destroyer",OOOIO0)
endif
if(O0OI1OO==1)then
call UnitAddAbility(OOOIO0,1093685068)
elseif(O0OI1OO==2)then
call UnitAddAbility(OOOIO0,1093685069)
elseif(O0OI1OO==3)then
call UnitAddAbility(OOOIO0,1093685070)
elseif(O0OI1OO==4)then
call UnitAddAbility(OOOIO0,1093685064)
endif
endfunction
function II0000 takes nothing returns nothing
set IO11I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IO11I,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(IO11I,Condition(function O1I111O))
call TriggerAddAction(IO11I,function O11OO1O)
endfunction
function O11O0OO takes nothing returns boolean
local real d
if GetUnitAbilityLevel(GetTriggerUnit(),1110455897)>0 and GetUnitAbilityLevel(GetEventDamageSource(),1093685065)>0 and IIO1OO(I011OO(GetTriggeringTrigger()),"Source")==GetEventDamageSource()then
call UnitRemoveAbility(GetTriggerUnit(),1110455897)
set d=0.01*(5+GetUnitAbilityLevel(GetEventDamageSource(),1093685065))*(GetUnitState(GetEventDamageSource(),UNIT_STATE_MANA)+100)
if(IsUnitType(GetTriggerUnit(),UNIT_TYPE_SUMMONED)==true or IsUnitIllusion(GetTriggerUnit()))and GetUnitTypeId(GetTriggerUnit())!=1848651828 and GetUnitTypeId(GetTriggerUnit())!=1848652088 and GetUnitTypeId(GetTriggerUnit())!=1848652099 and GetUnitTypeId(GetTriggerUnit())!=1848652103 and GetUnitTypeId(GetTriggerUnit())!=1848651861 and GetUnitTypeId(GetTriggerUnit())!=1848651865 and GetUnitTypeId(GetTriggerUnit())!=1848651866 then
set d=d+100*GetUnitAbilityLevel(GetEventDamageSource(),1093685065)
endif
call O0OI10("+"+I2S(R2I(d)),1,GetTriggerUnit(),0.023,191,64,255,216)
if(GetRandomInt(1,100)<=GetUnitAbilityLevel(GetEventDamageSource(),1093685063)*5)and(II001O(I011OO(GetTriggeringTrigger()),"DoneViaSpell")==false)then
call SetUnitState(GetEventDamageSource(),UNIT_STATE_MANA,GetUnitState(GetEventDamageSource(),UNIT_STATE_MANA)+0.25*GetUnitState(GetEventDamageSource(),UNIT_STATE_MAX_MANA))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCasterOverhead.mdl",GetEventDamageSource(),"overhead"))
endif
call DisableTrigger(GetTriggeringTrigger())
call OII1O0(GetEventDamageSource(),GetTriggerUnit(),3,d)
call I0110O(I011OO(GetTriggeringTrigger()))
call I10I1O(GetTriggeringTrigger())
endif
return false
endfunction
function O11O00O takes nothing returns nothing
local trigger t
local unit OOI010
local unit OOI0I0
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
set OOI010=GetSpellTargetUnit()
set OOI0I0=GetTriggerUnit()
else
set OOI010=GetTriggerUnit()
set OOI0I0=GetAttacker()
endif
if IsUnitIllusion(OOI0I0)==false then
set t=CreateTrigger()
if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
call IIOI0O(I011OO(t),"DoneViaSpell",true)
else
call IIOI0O(I011OO(t),"DoneViaSpell",false)
endif
call IIOOIO(I011OO(t),"Source",OOI0I0)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function O11O0OO))
endif
set t=null
set OOI010=null
set OOI0I0=null
endfunction
function O11O0IO takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if GetUnitAbilityLevel(GetAttacker(),1093685065)>0 and II001O(I011OO(GetTriggeringTrigger()),"OrbOn")and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==IIO1OO(I011OO(GetTriggeringTrigger()),"Hero")then
call O11O00O()
endif
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if(GetIssuedOrderId()==OrderId("poisonarrows"))then
call IIOI0O(I011OO(GetTriggeringTrigger()),"OrbOn",true)
elseif(GetIssuedOrderId()==OrderId("unpoisonarrows"))then
call IIOI0O(I011OO(GetTriggeringTrigger()),"OrbOn",false)
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093685065 then
call O11O00O()
endif
return false
endfunction
function O11O01O takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function O11O0IO))
call IIOOIO(I011OO(t),"Hero",GetTriggerUnit())
set t=null
endfunction
function O11OIOO takes nothing returns boolean
if GetLearnedSkill()==1093685065 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093685065)==1 then
call O11O01O()
endif
return false
endfunction
function II00I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function O11OIOO))
set t=null
endfunction
function O11OI0O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local unit OOI010=IIO1OO(I1I0IO,"Target")
local integer O11OIIO=II000O(I1I0IO,"StolenInt")
call SetHeroInt(OOI010,GetHeroInt(OOI010,false)+O11OIIO,true)
call SetHeroInt(OOI0I0,GetHeroInt(OOI0I0,false)-O11OIIO,true)
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set OOI0I0=null
set OOI010=null
return false
endfunction
function O11OI1O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local unit OOI010=IIO1OO(I1I0IO,"Target")
call DestroyEffect(II0O0O(I1I0IO,"FX"))
call SetUnitInvulnerable(OOI010,false)
call PauseUnit(OOI010,false)
call ShowUnit(OOI010,true)
call ClearSelectionForPlayer(GetOwningPlayer(OOI010))
call SelectUnitAddForPlayer(OOI010,GetOwningPlayer(OOI010))
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set OOI0I0=null
set OOI010=null
return false
endfunction
function O11O1OO takes nothing returns nothing
local unit OOI0I0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,1093685066)
local integer O11OIIO=OO0II0(GetHeroInt(OOI010,false),IO0O0I*2)
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call SelectUnitRemoveForPlayer(OOI010,GetOwningPlayer(OOI010))
call SetUnitInvulnerable(OOI010,true)
call PauseUnit(OOI010,true)
call ShowUnit(OOI010,false)
call IIOOIO(I1I0IO,"FX",AddSpecialEffect("Abilities\\Spells\\Demon\\DarkConversion\\ZombifyTarget.mdl",GetUnitX(OOI010),GetUnitY(OOI010)))
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIOOIO(I1I0IO,"Target",OOI010)
call TriggerRegisterTimerEvent(t,IO0O0I,false)
call TriggerAddCondition(t,Condition(function O11OI1O))
if(IsUnitEnemy(OOI010,GetOwningPlayer(OOI0I0)))then
call SetHeroInt(OOI010,GetHeroInt(OOI010,false)-O11OIIO,true)
call SetHeroInt(OOI0I0,GetHeroInt(OOI0I0,false)+O11OIIO,true)
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIO00O(I1I0IO,"StolenInt",O11OIIO)
call TriggerRegisterTimerEvent(t,60,false)
call TriggerRegisterUnitEvent(t,OOI0I0,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function O11OI0O))
endif
set OOI0I0=null
set OOI010=null
set t=null
endfunction
function O11O10O takes nothing returns boolean
if GetSpellAbilityId()==1093685066 then
call O11O1OO()
endif
return false
endfunction
function O11O1IO takes nothing returns nothing
if IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and II001O(I011OO(GetOwningPlayer(GetSpellTargetUnit())),"DisableHelp")and GetSpellTargetUnit()!=GetTriggerUnit()then
call OOO010(GetTriggerUnit())
call I11I1O(GetOwningPlayer(GetTriggerUnit()),"This target has disablehelp on")
endif
endfunction
function O11O11O takes nothing returns boolean
if GetSpellAbilityId()==1093685066 then
call O11O1IO()
endif
return false
endfunction
function II0010 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O11O10O))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function O11O11O))
set t=null
endfunction
function O110OOO takes nothing returns boolean
return GetSpellAbilityId()==1093685067
endfunction
function O110O0O takes nothing returns nothing
local unit OOI010=GetEnumUnit()
local unit O11OOIO=GetTriggerUnit()
local integer O110OIO=GetHeroInt(O11OOIO,true)-GetHeroInt(OOI010,true)
local integer array O110O1O
local integer O1100OO=7+1*GetUnitAbilityLevel(O11OOIO,1093685067)
set O110O1O[1]=10
set O110O1O[2]=30
set O110O1O[3]=50
if(O110OIO>0)then
call UnitDamageTarget(O11OOIO,OOI010,O110OIO*O1100OO,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call O0OI10(I2S(R2I(O110OIO*O1100OO)),3,OOI010,0.023,216,30,30,216)
if(O110OIO<O110O1O[GetUnitAbilityLevel(O11OOIO,1093685067)])then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Feedback\\SpellBreakerAttack.mdl",OOI010,"overhead"))
call SetUnitState(OOI010,UNIT_STATE_MANA,GetUnitState(OOI010,UNIT_STATE_MANA)*.25)
endif
endif
endfunction
function O11000O takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true)then
if(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))then
return true
endif
endif
return false
endfunction
function O1100IO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local integer O0OI1OO=GetUnitAbilityLevel(OOOIO0,1093685067)
local real x=GetLocationX(GetSpellTargetLoc())
local real y=GetLocationY(GetSpellTargetLoc())
local group II1O0O=CreateGroup()
local integer O11001O=0
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",x,y))
loop
exitwhen O11001O>=360
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",x+(200+O0OI1OO*50)*Cos(O11001O*bj_DEGTORAD),y+(200+O0OI1OO*50)*Sin(O11001O*bj_DEGTORAD)))
set O11001O=O11001O+45
endloop
call GroupEnumUnitsInRange(II1O0O,x,y,300+O0OI1OO*100,Condition(function O11000O))
call ForGroup(II1O0O,function O110O0O)
call DestroyGroup(II1O0O)
endfunction
function II0IO0 takes nothing returns nothing
set I0OOI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I0OOI,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(I0OOI,Condition(function O110OOO))
call TriggerAddAction(I0OOI,function O1100IO)
endfunction
function O110IOO takes nothing returns nothing
call OII1O0(OOOO1O,GetEnumUnit(),1,I110I)
endfunction
function O110I0O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local group g
if GetTriggerEvalCount(t)>150 or I1I11O(OOI010)then
call DestroyEffect(II0O0O(I1I0IO,"Effect"))
call I0110O(I1I0IO)
call I10I1O(t)
else
set g=CreateGroup()
set OOOO1O=OOI0I0
set I110I=1.5+1.5*GetUnitAbilityLevel(OOI0I0,1093685575)
call GroupEnumUnitsInRange(g,GetUnitX(OOI010),GetUnitY(OOI010),250,Condition(function OI0I00))
call GroupRemoveUnit(g,OOI010)
call ForGroup(g,function O110IOO)
call DestroyGroup(g)
endif
set t=null
set OOI010=null
set OOI0I0=null
set g=null
return false
endfunction
function O110IIO takes nothing returns nothing
local trigger t=CreateTrigger()
local effect fx=AddSpecialEffectTarget("war3mapImported\\NewSoulArmor.mdx",GetSpellTargetUnit(),"chest")
local string I1I0IO=I011OO(t)
call O00O10(I0OO0,GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()))
call IIOOIO(I1I0IO,"Source",GetTriggerUnit())
call IIOOIO(I1I0IO,"Target",GetSpellTargetUnit())
call IIOOIO(I1I0IO,"Effect",fx)
call TriggerRegisterTimerEvent(t,0.1,true)
call TriggerAddCondition(t,Condition(function O110I0O))
set t=null
set fx=null
endfunction
function O110I1O takes nothing returns boolean
if GetSpellAbilityId()==1093685575 then
call O110IIO()
endif
return false
endfunction
function III100 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O110I1O))
set t=null
endfunction
function O1101OO takes nothing returns nothing
local real x=I11II
local real y=I111I
local unit u=CreateUnit(GetOwningPlayer(GetTriggerUnit()),1697656901,x,y,0)
call UnitAddAbility(u,1093685574)
if I10OOO(GetEnumUnit())==false then
call IssueTargetOrder(u,"thunderbolt",GetEnumUnit())
call OII1O0(GetTriggerUnit(),GetEnumUnit(),1,I110I)
call SetUnitX(GetEnumUnit(),x)
call SetUnitY(GetEnumUnit(),y)
endif
set u=null
endfunction
function O11010O takes nothing returns nothing
local group g=CreateGroup()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local real r=200+100*GetUnitAbilityLevel(GetTriggerUnit(),1093685573)
call O00O10(I0OI0,x,y)
call DestroyEffect(AddSpecialEffect("war3mapImported\\Star Aura.mdx",x,y))
call GroupEnumUnitsInRange(g,x,y,r,Condition(function OI00I0))
set I110I=60*GetUnitAbilityLevel(GetTriggerUnit(),1093685573)
set I11II=x
set I111I=y
set OOOOOO=r
call ForGroup(g,function O1101OO)
call O00O00(x,y,200)
call RemoveLocation(l)
call DestroyGroup(g)
set l=null
set g=null
endfunction
function O1101IO takes nothing returns boolean
if GetSpellAbilityId()==1093685573 then
call O11010O()
endif
return false
endfunction
function O11011O takes nothing returns nothing
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
if O00OI0(x,y)==false or OIIII0(x,y)then
call OOO010(GetTriggerUnit())
call I11I1O(GetOwningPlayer(GetTriggerUnit()),"Cannot use Vacuum here")
endif
call RemoveLocation(l)
set l=null
endfunction
function O11IOOO takes nothing returns boolean
if GetSpellAbilityId()==1093685573 then
call O11011O()
endif
return false
endfunction
function III1O0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O1101IO))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function O11IOOO))
set t=null
endfunction
function O11IO0O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
call UnitRemoveAbility(OOI010,1110456151)
call UnitRemoveAbility(OOI010,1113746543)
call UnitRemoveAbility(OOI010,1110455858)
call UnitRemoveAbility(OOI010,1110455861)
call UnitRemoveAbility(OOI010,1113813619)
call UnitRemoveAbility(OOI010,1110454582)
call UnitRemoveAbility(OOI010,1110455634)
return false
endfunction
function O11IOIO takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,GetUnitAbilityLevel(GetTriggerUnit(),1093685815)*1.5+0.5,false)
call TriggerAddCondition(t,Condition(function O11IO0O))
call IIOOIO(I011OO(t),"Target",GetSpellTargetUnit())
call O00O10(I0O00,GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()))
call DestroyEffect(AddSpecialEffectTarget("effects\\Surge.mdx",GetSpellTargetUnit(),"origin"))
endfunction
function O11IO1O takes nothing returns boolean
if GetSpellAbilityId()==1093685815 then
call O11IOIO()
endif
return false
endfunction
function III1I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O11IO1O))
set t=null
endfunction
function O11I0OO takes nothing returns boolean
local string I1I0IO=I011OO(GetTriggeringTrigger())
local unit O11I00O=IIO1OO(I1I0IO,"Wall")
local unit OOI010=GetTriggerUnit()
local unit O11I0IO=CreateUnit(GetOwningPlayer(O11I00O),1697657171,GetUnitX(OOI010),GetUnitY(OOI010),0)
set I00OOO=GetUnitX(OOI010)
set I00O0O=GetUnitY(OOI010)
set I00OIO=OOI010
call IssueTargetOrderById(O11I00O,852274,OOI010)
call UnitApplyTimedLife(O11I0IO,1112820806,0.5)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl",GetUnitX(OOI010),GetUnitY(OOI010)))
set O11I00O=null
set OOI010=null
return false
endfunction
function O11I01O takes nothing returns boolean
local group g
if IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and I10O1O(GetFilterUnit())==false then
set g=II0OOO(I011OO(GetTriggeringTrigger()),"g1")
if IsUnitInGroup(GetFilterUnit(),g)==false then
call GroupAddUnit(g,GetFilterUnit())
call O11I0OO()
endif
endif
set g=null
return false
endfunction
function WallOfReplica_FindSource takes nothing returns nothing
if GetPlayerId(GetOwningPlayer(GetEnumUnit()))==I1III then
call GroupAddUnit(OOO0IO,GetEnumUnit())
endif
endfunction
function O11IIOO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
call GroupRemoveUnit(II0OOO(I1I0IO,"g1"),IIO1OO(I1I0IO,"imagesource"))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))
call I0110O(I1I0IO)
call DisableTrigger(t)
set t=null
return false
endfunction
function O11II0O takes nothing returns boolean
local unit O11I00O=GetSummoningUnit()
local unit O11IIIO=GetSummonedUnit()
local string I1I0IO=I011OO(O11I00O)
local integer O11II1O=II000O(I1I0IO,"NumOfImages")
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,O11IIIO,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function O11IIOO))
call IIOOIO(I011OO(t),"g1",II0OOO(I1I0IO,"g1"))
call IIOOIO(I011OO(t),"imagesource",I00OIO)
set O11II1O=O11II1O+1
call IIO00O(I1I0IO,"NumOfImages",O11II1O)
call IIOOIO(I1I0IO,"Illusion"+I2S(O11II1O),O11IIIO)
call IIOOIO(I1I0IO,"IllusionTrig"+I2S(O11II1O),t)
call SetUnitX(O11IIIO,I00OOO)
call SetUnitY(O11IIIO,I00O0O)
set O11I00O=null
set O11IIIO=null
return false
endfunction
function O11I1OO takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function O11I10O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string OII1I1O=I011OO(t)
local trigger O11I1IO=IIO11O(OII1I1O,"mastert")
local string O0I0IIO=I011OO(O11I1IO)
local trigger OII110O=IIO11O(O0I0IIO,"DetectTrig")
local group O11I11O=II0OOO(O0I0IIO,"g1")
local group O111OOO=II0OOO(O0I0IIO,"g2")
local unit O11I00O=IIO1OO(O0I0IIO,"Wall")
local string O111O0O=I011OO(O11I00O)
local integer O11II1O=II000O(O111O0O,"NumOfImages")
local integer i
local unit u
call ForGroup(O111OOO,function O11I1OO)
set i=1
loop
exitwhen i>O11II1O
set u=IIO1OO(O111O0O,"Illusion"+I2S(i))
call I0110O(I011OO(IIO11O(O111O0O,"IllusionTrig"+I2S(i))))
call I10I1O(IIO11O(O111O0O,"IllusionTrig"+I2S(i)))
if IsUnitIllusion(u)then
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl",GetUnitX(u),GetUnitY(u)))
call RemoveUnit(u)
endif
set i=i+1
endloop
call I0110O(OII1I1O)
call I0110O(O0I0IIO)
call I0110O(O111O0O)
call RemoveUnit(O11I00O)
call DestroyGroup(O11I11O)
call DestroyGroup(O111OOO)
call I10I1O(O11I1IO)
call I10I1O(OII110O)
call I10I1O(t)
set t=null
set O11I1IO=null
set OII110O=null
set O11I11O=null
set O111OOO=null
set O11I00O=null
set u=null
return false
endfunction
function O111OIO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local real O111O1O=GetUnitFacing(I1IIIO)-45
local unit O11I00O=CreateUnit(GetOwningPlayer(I1IIIO),1747988559,x,y,O111O1O)
local unit u
local real OO1010O
local real OO101IO
local integer i
local real O11001O
local trigger t=CreateTrigger()
local group g1=CreateGroup()
local string I1I0IO=I011OO(t)
local group g2=CreateGroup()
local trigger O11I1IO=t
call O00O10(I0O10,x,y)
call IIOOIO(I1I0IO,"g1",g1)
call IIOOIO(I011OO(O11I00O),"g1",g1)
call IIOOIO(I1I0IO,"g2",g2)
call IIOOIO(I1I0IO,"Wall",O11I00O)
call IIO00O(I011OO(O11I00O),"NumOfImages",0)
set i=0
loop
exitwhen i>30
set OO1010O=x+(400-25*i)*Cos((O111O1O-45)*bj_DEGTORAD)
set OO101IO=y+(400-25*i)*Sin((O111O1O-45)*bj_DEGTORAD)
set u=CreateUnit(GetOwningPlayer(I1IIIO),1747988560,OO1010O,OO101IO,O111O1O)
call GroupAddUnit(g2,u)
call TriggerRegisterUnitInRange(t,u,17,null)
set i=i+1
endloop
call TriggerAddCondition(t,Condition(function O11I01O))
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,O11I00O,EVENT_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function O11II0O))
call IIOOIO(I1I0IO,"DetectTrig",t)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,15*GetUnitAbilityLevel(I1IIIO,1093685579),false)
call TriggerAddCondition(t,Condition(function O11I10O))
call IIOOIO(I011OO(t),"mastert",O11I1IO)
call RemoveLocation(l)
set I1IIIO=null
set l=null
set u=null
set t=null
set O11I1IO=null
set g1=null
set g2=null
set O11I00O=null
endfunction
function O1110OO takes nothing returns boolean
if GetSpellAbilityId()==1093685579 then
call O111OIO()
endif
return false
endfunction
function III110 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O1110OO))
set t=null
endfunction
function O11100O takes nothing returns boolean
return GetSpellAbilityId()==1093684299
endfunction
function O1110IO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOOIO0=IIO1OO(I1I0IO,"TimeWalkUnit")
local real OIO1I1O=GetUnitX(OOOIO0)
local real OIO11OO=GetUnitY(OOOIO0)
local real III11O=II00IO(I1I0IO,"TimeWalkTargetX")
local real II1OOO=II00IO(I1I0IO,"TimeWalkTargetY")
local real OOIIO0=II00IO(I1I0IO,"TimeWalkDistance")
local real OO1IOOO=II00IO(I1I0IO,"Angle")
local real O11101O=II00IO(I1I0IO,"TimeWalkElapsed")
call SetUnitPosition(OOOIO0,OIO1I1O+OOIIO0/ 40*Cos(OO1IOOO),OIO11OO+OOIIO0/ 40*Sin(OO1IOOO))
call IIO01O(I1I0IO,"TimeWalkElapsed",O11101O+0.01)
if((OIO1I1O-III11O)*(OIO1I1O-III11O)+(OIO11OO-II1OOO)*(OIO11OO-II1OOO)<25 or O11101O>0.6)then
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(OOOIO0),1697656901,GetUnitX(OOOIO0),GetUnitY(OOOIO0),270)
call UnitAddAbility(bj_lastCreatedUnit,1093684289)
call SetUnitAbilityLevel(bj_lastCreatedUnit,1093684289,GetUnitAbilityLevel(OOOIO0,1093684299))
call UnitApplyTimedLife(bj_lastCreatedUnit,1112820806,2.0)
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call IssueImmediateOrder(bj_lastCreatedUnit,"thunderclap")
call SetUnitPathing(OOOIO0,true)
call SetUnitAnimation(OOOIO0,"stand")
call SetUnitInvulnerable(OOOIO0,false)
call SetUnitVertexColorBJ(OOOIO0,0,255,150,0.00)
call I0111O(I1I0IO)
call I10I1O(t)
endif
set t=null
set OOOIO0=null
return false
endfunction
function O111IOO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local location O0O1IIO
local location O111I0O=GetUnitLoc(OOOIO0)
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
if GetSpellTargetUnit()==null then
set O0O1IIO=GetSpellTargetLoc()
else
set O0O1IIO=GetUnitLoc(GetSpellTargetUnit())
endif
if((OOOIO0!=null)and(O0O1IIO!=null)and(O111I0O!=null))then
call SetUnitAnimationByIndex(OOOIO0,0)
call SetUnitPathing(OOOIO0,false)
call SetUnitInvulnerable(OOOIO0,true)
call SetUnitVertexColorBJ(OOOIO0,0,0,0,25.00)
call IIO01O(I1I0IO,"TimeWalkDistance",DistanceBetweenPoints(O111I0O,O0O1IIO))
call IIOOIO(I1I0IO,"TimeWalkUnit",OOOIO0)
call IIO01O(I1I0IO,"TimeWalkTargetX",GetLocationX(O0O1IIO))
call IIO01O(I1I0IO,"TimeWalkTargetY",GetLocationY(O0O1IIO))
call IIO01O(I1I0IO,"TimeWalkElapsed",0)
call IIO01O(I1I0IO,"Angle",AngleBetweenPoints(O111I0O,O0O1IIO)*bj_DEGTORAD)
call TriggerRegisterTimerEvent(t,0.01,true)
call TriggerAddCondition(t,Condition(function O1110IO))
endif
call RemoveLocation(O0O1IIO)
call RemoveLocation(O111I0O)
set t=null
set OOOIO0=null
set O0O1IIO=null
set O111I0O=null
endfunction
function I00II0 takes nothing returns nothing
set I0O0I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I0O0I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(I0O0I,Condition(function O11100O))
call TriggerAddAction(I0O0I,function O111IOO)
endfunction
function O111IIO takes nothing returns boolean
return GetLearnedSkill()==1093682010 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function O111I1O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local real OOIO00=GetEventDamage()
if(OOIO00>0)and GetUnitState(OOOIO0,UNIT_STATE_LIFE)>1 then
if(GetRandomInt(1,100)<=(5+(5*GetUnitAbilityLevel(OOOIO0,1093682010))))then
call SetUnitState(OOOIO0,UNIT_STATE_LIFE,GetUnitState(OOOIO0,UNIT_STATE_LIFE)+OOIO00)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",OOOIO0,"hand,left"))
endif
endif
endfunction
function O1111OO takes nothing returns nothing
local trigger t
if GetUnitAbilityLevel(GetTriggerUnit(),1093682010)==1 then
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerAddAction(t,function O111I1O)
endif
endfunction
function I00I10 takes nothing returns nothing
set I0OII=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I0OII,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(I0OII,Condition(function O111IIO))
call TriggerAddAction(I0OII,function O1111OO)
endfunction
constant function O11110O takes nothing returns integer
return 1093683761
endfunction
constant function O1111IO takes nothing returns integer
return 1966092364
endfunction
function O11111O takes nothing returns boolean
return GetSpellAbilityId()==O11110O()
endfunction
function IOOOOOO takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local unit IOOOO0O=IIO1OO(I1I0IO,"Caster")
call SetUnitTimeScale(IOOOO0O,0)
call PauseTimer(t)
call I0110O(I1I0IO)
call DestroyTimer(t)
endfunction
function IOOOOIO takes unit III1IO returns boolean
local integer ID=GetUnitTypeId(III1IO)
return ID==1869836340 or ID==1865429048 or ID==1865429049 or ID==1970107511 or ID==1700946284
endfunction
function IOOOO1O takes nothing returns boolean
return GetOwningPlayer(GetFilterUnit())!=GetOwningPlayer(O00I)and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 or IOOOOIO(GetFilterUnit()))
endfunction
function IOOO0OO takes nothing returns nothing
call PauseUnit(GetEnumUnit(),true)
call SetUnitTimeScale(GetEnumUnit(),0)
call UnitRemoveAbility(GetEnumUnit(),1112896364)
call UnitRemoveAbility(GetEnumUnit(),1112896368)
call UnitRemoveAbility(GetEnumUnit(),1112896372)
endfunction
function IOOO00O takes nothing returns nothing
call PauseUnit(GetEnumUnit(),false)
call SetUnitTimeScale(GetEnumUnit(),1)
endfunction
function IOOO0IO takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local unit IOOOO0O=IIO1OO(I1I0IO,"Caster")
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,O11110O())
local group IOOO01O=II0OOO(I1I0IO,"Group")
local integer OO10OOO=II000O(I1I0IO,"Counter")
local real III11O=GetUnitX(IOOOO0O)
local real II1OOO=GetUnitY(IOOOO0O)
local boolexpr II1OIO=Condition(function IOOOO1O)
local group O001I1O=CreateGroup()
call ForGroup(IOOO01O,function IOOO00O)
set O00I=I1IIIO
call GroupEnumUnitsInRange(O001I1O,III11O,II1OOO,425,II1OIO)
call GroupClear(IOOO01O)
call GroupAddGroup(O001I1O,IOOO01O)
call ForGroup(O001I1O,function IOOO0OO)
call DestroyGroup(O001I1O)
call DestroyBoolExpr(II1OIO)
set OO10OOO=OO10OOO+1
call IIO00O(I1I0IO,"Counter",OO10OOO)
if OO10OOO>20+IO0O0I*10 then
if OOI0O==false then
call ForGroup(IOOO01O,function IOOO00O)
endif
call RemoveUnit(IOOOO0O)
call DestroyGroup(IOOO01O)
call PauseTimer(t)
call I0110O(I1I0IO)
call DestroyTimer(t)
endif
endfunction
function IOOOIOO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,O11110O())
local location OOI010=GetSpellTargetLoc()
local real III11O=GetLocationX(OOI010)
local real II1OOO=GetLocationY(OOI010)
local unit IOOOO0O=CreateUnit(GetOwningPlayer(I1IIIO),O1111IO(),III11O,II1OOO,0)
local timer t=CreateTimer()
local string I1I0IO=I011OO(t)
local group IOOO01O=CreateGroup()
call IIOOIO(I011OO(t),"Caster",IOOOO0O)
call TimerStart(t,0.8,false,function IOOOOOO)
set t=CreateTimer()
set I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Caster",IOOOO0O)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIOOIO(I1I0IO,"Group",IOOO01O)
call IIO00O(I1I0IO,"Counter",0)
call TimerStart(t,0.1,true,function IOOO0IO)
call RemoveLocation(OOI010)
endfunction
function I001O0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O11111O))
call TriggerAddAction(t,function IOOOIOO)
endfunction
constant function IOOOI0O takes nothing returns integer
return 1093684792
endfunction
constant function IOOOIIO takes nothing returns integer
return 1211117641
endfunction
constant function IOOOI1O takes nothing returns integer
return 1211117642
endfunction
function IOOO1OO takes unit III1IO returns boolean
return(GetUnitTypeId(III1IO)==IOOOIIO()or GetUnitTypeId(III1IO)==IOOOI1O())and GetUnitState(III1IO,UNIT_STATE_LIFE)>0.5 and GetOwningPlayer(III1IO)==GetOwningPlayer(GetTriggerUnit())
endfunction
function IOOO10O takes nothing returns boolean
return GetSpellAbilityId()==IOOOI0O()
endfunction
function IOOO1IO takes nothing returns boolean
return IOOO1OO(GetFilterUnit())
endfunction
function IOOO11O takes nothing returns nothing
local unit OOO0I1O=GetEnumUnit()
local real IOO0OOO=OOI1O0(OOO0I1O,O0I0O)
if IOO0OOO<O01I then
set O01I=IOO0OOO
set O00I=OOO0I1O
endif
endfunction
function IOO0O0O takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0
endfunction
function IOO0OIO takes nothing returns nothing
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Feedback\\ArcaneTowerAttack.mdl",GetEnumUnit(),"origin"))
call UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),O01I,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE,WEAPON_TYPE_WHOKNOWS)
endfunction
function IOO0O1O takes nothing returns nothing
local unit OOI0I0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local location O0O1IIO
local real x
local real y
local real OOII00=GetUnitX(OOI0I0)
local real OOIII0=GetUnitY(OOI0I0)
local group II1O0O
local boolexpr II1OIO
local boolean IOO00OO=false
if OOI010!=null and IOOO1OO(OOI010)then
set x=GetUnitX(OOI010)
set y=GetUnitY(OOI010)
set IOO00OO=true
elseif OOI010==null then
set II1OIO=Condition(function IOOO1IO)
set II1O0O=CreateGroup()
call GroupEnumUnitsInRange(II1O0O,0,0,999999,II1OIO)
set O0O1IIO=GetSpellTargetLoc()
set O00I=FirstOfGroup(II1O0O)
if O00I!=null then
set IOO00OO=true
call GroupRemoveUnit(II1O0O,O00I)
set O01I=OOI1O0(O00I,O0O1IIO)
set O0I0O=O0O1IIO
call ForGroup(II1O0O,function IOOO11O)
set OOI010=O00I
set x=GetUnitX(OOI010)
set y=GetUnitY(OOI010)
endif
call DestroyGroup(II1O0O)
call DestroyBoolExpr(II1OIO)
call RemoveLocation(O0O1IIO)
endif
if IOO00OO then
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\ToonBoom\\ToonBoom.mdl",OOII00,OOIII0))
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\ToonBoom\\ToonBoom.mdl",x,y))
call SetUnitX(OOI0I0,x)
call SetUnitY(OOI0I0,y)
set O01I=GetUnitAbilityLevel(GetTriggerUnit(),IOOOI0O())*40
set II1OIO=Condition(function IOO0O0O)
set II1O0O=CreateGroup()
call GroupEnumUnitsInRange(II1O0O,OOII00,OOIII0,400,II1OIO)
call ForGroup(II1O0O,function IOO0OIO)
call DestroyGroup(II1O0O)
set II1O0O=CreateGroup()
call GroupEnumUnitsInRange(II1O0O,x,y,400,II1OIO)
call ForGroup(II1O0O,function IOO0OIO)
call DestroyGroup(II1O0O)
call DestroyBoolExpr(II1OIO)
endif
endfunction
function IOO000O takes nothing returns boolean
return GetSpellAbilityId()==IOOOI0O()
endfunction
function IOO00IO takes nothing returns nothing
call SetUnitAnimationByIndex(IIO1OO(I011OO(GetExpiredTimer()),"UnitVar"),2)
endfunction
function IOO001O takes nothing returns nothing
local timer t=CreateTimer()
call SetUnitAnimationByIndex(GetTriggerUnit(),2)
call IIOOIO(I011OO(t),"UnitVar",GetTriggerUnit())
call TimerStart(t,1.334,false,function IOO00IO)
endfunction
function III0O0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_CHANNEL)
call TriggerAddCondition(t,Condition(function IOO000O))
call TriggerAddAction(t,function IOO001O)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IOOO10O))
call TriggerAddAction(t,function IOO0O1O)
endfunction
constant function IOO0IOO takes nothing returns integer
return 1093684802
endfunction
constant function IOO0I0O takes nothing returns integer
return 1093684803
endfunction
constant function IOO0IIO takes nothing returns integer
return 1747988547
endfunction
constant function Trap_DummyNet takes nothing returns integer
return 1747988537
endfunction
constant function IOO0I1O takes nothing returns integer
return 245
endfunction
function IOO01OO takes nothing returns boolean
return GetSpellAbilityId()==IOO0IOO()
endfunction
function IOO010O takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(O00I))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(O00I))==true and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0.5 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and GetUnitTypeId(GetFilterUnit())!=1848651852
endfunction
function IOO01IO takes nothing returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(O00I),1697656901,O01I,O0IIO,0)
call UnitAddAbility(O11O1I,IOO0I0O())
call IssueTargetOrder(O11O1I,"ensnare",GetEnumUnit())
endfunction
function IOO011O takes unit O00100,real x,real y returns nothing
local boolexpr II1OIO=Condition(function IOO010O)
local group II1O0O=CreateGroup()
set O00I=O00100
call GroupEnumUnitsInRange(II1O0O,x,y,IOO0I1O(),II1OIO)
set O01I=x
set O0IIO=y
call ForGroup(II1O0O,function IOO01IO)
call DestroyGroup(II1O0O)
call DestroyBoolExpr(II1OIO)
endfunction
function IOOIOOO takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local unit O00100=IIO1OO(I1I0IO,"Projectile")
local real III11O=II00IO(I1I0IO,"TargetX")
local real II1OOO=II00IO(I1I0IO,"TargetY")
local real OO1IOOO=II00IO(I1I0IO,"Angle")
local real OOII00=GetUnitX(O00100)
local real OOIII0=GetUnitY(O00100)
local real O0IOO0=GetUnitX(O00100)+30*Cos(OO1IOOO)
local real O0IO00=GetUnitY(O00100)+30*Sin(OO1IOOO)
if(O0IOO0-III11O)*(O0IOO0-III11O)+(O0IO00-II1OOO)*(O0IO00-II1OOO)<1200 then
call SetUnitX(O00100,III11O)
call SetUnitY(O00100,II1OOO)
call IOO011O(O00100,III11O,II1OOO)
call PauseTimer(t)
call I0110O(I1I0IO)
call KillUnit(O00100)
call DestroyTimer(t)
else
call SetUnitX(O00100,O0IOO0)
call SetUnitY(O00100,O0IO00)
endif
endfunction
function IOOIO0O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local location O0O1IIO=GetSpellTargetLoc()
local real III11O=OOO100(GetLocationX(O0O1IIO))
local real II1OOO=OOO110(GetLocationY(O0O1IIO))
local real OOII00=OOO100(GetUnitX(I1IIIO))
local real OOIII0=OOO110(GetUnitY(I1IIIO))
local unit O00100=CreateUnit(GetOwningPlayer(I1IIIO),IOO0IIO(),OOII00,OOIII0,0)
local real OO1IOOO=Atan2(II1OOO-OOIII0,III11O-OOII00)
local timer t=CreateTimer()
local string I1I0IO=I011OO(t)
call SetUnitScale(O00100,2,2,2)
call IIOOIO(I1I0IO,"Projectile",O00100)
call IIO01O(I1I0IO,"TargetX",III11O)
call IIO01O(I1I0IO,"TargetY",II1OOO)
call IIO01O(I1I0IO,"Angle",OO1IOOO)
call TimerStart(t,0.035,true,function IOOIOOO)
call RemoveLocation(O0O1IIO)
endfunction
function III000 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(t,function IOOIO0O)
call TriggerAddCondition(t,Condition(function IOO01OO))
endfunction
constant function IOOIOIO takes nothing returns integer
return 1093684567
endfunction
constant function IOOIO1O takes nothing returns integer
return 1211117641
endfunction
constant function IOOI0OO takes nothing returns integer
return 1211117642
endfunction
constant function IOOI00O takes nothing returns integer
return 1093684792
endfunction
constant function IOOI0IO takes nothing returns integer
return 1093684802
endfunction
constant function IOOI01O takes nothing returns integer
return 1093684791
endfunction
constant function IOOIIOO takes nothing returns integer
return 1953265005
endfunction
constant function IOOII0O takes nothing returns integer
return 1751937908
endfunction
constant function IOOIIIO takes nothing returns integer
return 1227895126
endfunction
constant function IOOII1O takes nothing returns integer
return 1227895127
endfunction
constant function IOOI1OO takes nothing returns integer
return 1952938096
endfunction
function IOOI10O takes unit III1IO returns boolean
return GetUnitTypeId(III1IO)==IOOIO1O()or GetUnitTypeId(III1IO)==IOOI0OO()
endfunction
function DoubleTrouble_IsKoboldCondition takes nothing returns boolean
return GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(O00I)and GetFilterUnit()!=O00I and(GetUnitTypeId(GetFilterUnit())==IOOIO1O()or GetUnitTypeId(GetFilterUnit())==IOOI0OO())
endfunction
function IOOI1IO takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(O00I))==true and IOOI10O(GetFilterUnit())==false
endfunction
function IOOI11O takes nothing returns nothing
call AddHeroXP(GetEnumUnit(),O0II,true)
endfunction
function IOO1OOO takes nothing returns nothing
local string IOO1O0O=I011OO(GetTriggeringTrigger())
local player II01IO=IIO10O(IOO1O0O,"PlayerVar")
local string IOO1OIO=I011OO(II01IO)
local unit O1I0I0=IIO1OO(IOO1OIO,"Kobold0")
local unit O1I010=IIO1OO(IOO1OIO,"Kobold1")
local unit O1IIO0=IIO1OO(IOO1OIO,"Kobold2")
local unit O1II00=IIO1OO(IOO1OIO,"Kobold3")
local integer IOO1O1O=GetUnitAbilityLevel(O1I0I0,1096904043)*2
local integer IOO10OO=GetHeroAgi(O1I0I0,false)
local integer IOO100O=GetHeroAgi(O1I0I0,true)-IOO10OO-IOO1O1O
local integer IOO10IO=GetHeroStr(O1I0I0,false)
local integer IOO101O=GetHeroStr(O1I0I0,true)-IOO10IO-IOO1O1O
local integer IOO1IOO=GetHeroInt(O1I0I0,false)
local integer IOO1I0O=GetHeroInt(O1I0I0,true)-IOO1IOO-IOO1O1O
local real IOO1IIO=0.25
local integer IOO1I1O=R2I(IOO10OO+IOO100O*IOO1IIO)
local integer IOO11OO=R2I(IOO10IO+IOO101O*IOO1IIO)
local integer IOO110O=R2I(IOO1IOO+IOO1I0O*IOO1IIO)
if GetUnitState(O1I0I0,UNIT_STATE_LIFE)>1 then
if O1I010!=null then
call SetHeroAgi(O1I010,IOO1I1O,false)
call SetHeroStr(O1I010,IOO11OO,false)
call SetHeroInt(O1I010,IOO110O,false)
endif
if O1IIO0!=null then
call SetHeroAgi(O1IIO0,IOO1I1O,false)
call SetHeroStr(O1IIO0,IOO11OO,false)
call SetHeroInt(O1IIO0,IOO110O,false)
endif
if O1II00!=null then
call SetHeroAgi(O1II00,IOO1I1O,false)
call SetHeroStr(O1II00,IOO11OO,false)
call SetHeroInt(O1II00,IOO110O,false)
endif
endif
endfunction
function IOO11IO takes nothing returns nothing
local string IOO1O0O=I011OO(GetTriggeringTrigger())
local player II01IO=IIO10O(IOO1O0O,"PlayerVar")
local string IOO1OIO=I011OO(II01IO)
local unit O1I0I0=IIO1OO(IOO1OIO,"Kobold0")
local unit O1I010=IIO1OO(IOO1OIO,"Kobold1")
local unit O1IIO0=IIO1OO(IOO1OIO,"Kobold2")
local unit O1II00=IIO1OO(IOO1OIO,"Kobold3")
local string IOO111O=I011OO(O1I0I0)
local string IO0OOOO=I011OO(O1I010)
local string IO0OO0O=I011OO(O1IIO0)
local string IO0OOIO=I011OO(O1II00)
local integer IO0OO1O=II000O(IOO111O,"XPEarned")
local integer IO0O0OO=II000O(IOO111O,"XPGiven")
local integer IO0O00O=II000O(IO0OOOO,"XPEarned")
local integer IO0O0IO=II000O(IO0OOOO,"XPGiven")
local integer IO0O01O=II000O(IO0OO0O,"XPEarned")
local integer IO0OIOO=II000O(IO0OO0O,"XPGiven")
local integer IO0OI0O=II000O(IO0OOIO,"XPEarned")
local integer IO0OIIO=II000O(IO0OOIO,"XPGiven")
local integer IO0OI1O=GetHeroXP(O1I0I0)
local integer IO0O1OO=GetHeroXP(O1I010)
local integer IO0O10O=GetHeroXP(O1IIO0)
local integer IO0O1IO=GetHeroXP(O1II00)
local integer IO0O11O=IO0OI1O-IO0OO1O-IO0O0OO
local integer IO00OOO=IO0O1OO-IO0O00O-IO0O0IO
local integer IO00O0O=IO0O10O-IO0O01O-IO0OIOO
local integer IO00OIO=IO0O1IO-IO0OI0O-IO0OIIO
if GetUnitState(O1I0I0,UNIT_STATE_LIFE)>1 then
set IO0OO1O=IO0OO1O+IO0O11O
set IO0O00O=IO0O00O+IO00OOO
set IO0O01O=IO0O01O+IO00O0O
set IO0OI0O=IO0OI0O+IO00OIO
if O1I0I0!=null then
call AddHeroXP(O1I010,IO0O11O,false)
if GetHeroXP(O1I010)!=IO0O1OO then
set IO0O0IO=IO0O0IO+IO0O11O
endif
call AddHeroXP(O1IIO0,IO0O11O,false)
if GetHeroXP(O1IIO0)!=IO0O10O then
set IO0OIOO=IO0OIOO+IO0O11O
endif
call AddHeroXP(O1II00,IO0O11O,false)
if GetHeroXP(O1II00)!=IO0O1IO then
set IO0OIIO=IO0OIIO+IO0O11O
endif
endif
if O1I010!=null then
call AddHeroXP(O1I0I0,IO00OOO,false)
if GetHeroXP(O1I0I0)!=IO0OI1O then
set IO0O0OO=IO0O0OO+IO00OOO
endif
call AddHeroXP(O1IIO0,IO00OOO,false)
if GetHeroXP(O1IIO0)!=IO0O10O then
set IO0OIOO=IO0OIOO+IO00OOO
endif
call AddHeroXP(O1II00,IO00OOO,false)
if GetHeroXP(O1II00)!=IO0O1IO then
set IO0OIIO=IO0OIIO+IO00OOO
endif
endif
if O1IIO0!=null then
call AddHeroXP(O1I010,IO00O0O,false)
if GetHeroXP(O1I010)!=IO0O1OO then
set IO0O0IO=IO0O0IO+IO00O0O
endif
call AddHeroXP(O1I0I0,IO00O0O,false)
if GetHeroXP(O1I0I0)!=IO0OI1O then
set IO0O0OO=IO0O0OO+IO00O0O
endif
call AddHeroXP(O1II00,IO00O0O,false)
if GetHeroXP(O1II00)!=IO0O1IO then
set IO0OIIO=IO0OIIO+IO00O0O
endif
endif
if O1II00!=null then
call AddHeroXP(O1I010,IO00OIO,false)
if GetHeroXP(O1I010)!=IO0O1OO then
set IO0O0IO=IO0O0IO+IO00OIO
endif
call AddHeroXP(O1IIO0,IO00OIO,false)
if GetHeroXP(O1IIO0)!=IO0O10O then
set IO0OIOO=IO0OIOO+IO00OIO
endif
call AddHeroXP(O1I0I0,IO00OIO,false)
if GetHeroXP(O1I0I0)!=IO0OI1O then
set IO0O0OO=IO0O0OO+IO00OIO
endif
endif
call IIO00O(IOO111O,"XPEarned",IO0OO1O)
call IIO00O(IOO111O,"XPGiven",IO0O0OO)
call IIO00O(IO0OOOO,"XPEarned",IO0O00O)
call IIO00O(IO0OOOO,"XPGiven",IO0O0IO)
call IIO00O(IO0OO0O,"XPEarned",IO0O01O)
call IIO00O(IO0OO0O,"XPGiven",IO0OIOO)
call IIO00O(IO0OOIO,"XPEarned",IO0OI0O)
call IIO00O(IO0OOIO,"XPGiven",IO0OIIO)
endif
endfunction
function IO00O1O takes nothing returns boolean
return IOOI10O(GetTriggerUnit())and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function IO000OO takes nothing returns nothing
local unit O1IO00=GetTriggerUnit()
local string I1I0IO=I011OO(GetOwningPlayer(O1IO00))
local unit O1I0I0=IIO1OO(I1I0IO,"Kobold0")
local unit O1I010=IIO1OO(I1I0IO,"Kobold1")
local unit O1IIO0=IIO1OO(I1I0IO,"Kobold2")
local unit O1II00=IIO1OO(I1I0IO,"Kobold3")
local boolean OOI1II=false
call DisableTrigger(II0O0)
if O1I0I0!=null and O1I0I0!=O1IO00 then
call KillUnit(O1I0I0)
endif
if O1I010!=null and O1I010!=O1IO00 then
call KillUnit(O1I010)
endif
if O1IIO0!=null and O1IIO0!=O1IO00 then
call KillUnit(O1IIO0)
endif
if O1II00!=null and O1II00!=O1IO00 then
call KillUnit(O1II00)
endif
call EnableTrigger(II0O0)
endfunction
function IO0000O takes nothing returns boolean
return IOOI10O(GetTriggerUnit())and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function IO000IO takes unit IO0001O,unit I1IIIO returns nothing
local trigger t=IIO11O(I011OO(GetOwningPlayer(I1IIIO)),"Kobold|ItemTrigger")
local integer i=0
local boolean O1O1O0=false
local boolean O1O100=false
local boolean O1O1I0=false
local boolean O1O110=false
local boolean IO00IOO=false
call DisableTrigger(t)
loop
exitwhen i>5
if GetItemTypeId(UnitItemInSlot(I1IIIO,i))==IOOIIOO()then
set O1O1O0=true
endif
if GetItemTypeId(UnitItemInSlot(I1IIIO,i))==IOOII0O()then
set O1O100=true
endif
if GetItemTypeId(UnitItemInSlot(I1IIIO,i))==IOOIIIO()then
set O1O1I0=true
endif
if GetItemTypeId(UnitItemInSlot(I1IIIO,i))==IOOII1O()then
set O1O110=true
endif
if GetItemTypeId(UnitItemInSlot(I1IIIO,i))==IOOI1OO()then
set IO00IOO=true
endif
set i=i+1
endloop
if IO00IOO then
call UnitAddItem(IO0001O,CreateItem(IOOI1OO(),0,0))
elseif O1O110 then
call UnitAddItem(IO0001O,CreateItem(IOOII1O(),0,0))
elseif O1O1I0 then
call UnitAddItem(IO0001O,CreateItem(IOOIIIO(),0,0))
elseif O1O100 then
call UnitAddItem(IO0001O,CreateItem(IOOII0O(),0,0))
elseif O1O1O0 then
call UnitAddItem(IO0001O,CreateItem(IOOIIOO(),0,0))
endif
call EnableTrigger(t)
endfunction
function IO00I0O takes nothing returns nothing
local unit O1III0=GetTriggerUnit()
local integer i=0
local boolean O1O1O0=false
local boolean O1O100=false
local boolean O1O1I0=false
local boolean O1O110=false
local boolean IO00IOO=false
local string IOO1OIO=I011OO(GetOwningPlayer(O1III0))
local unit O1I0I0=IIO1OO(IOO1OIO,"Kobold0")
local unit O1I010=IIO1OO(IOO1OIO,"Kobold1")
local unit O1IIO0=IIO1OO(IOO1OIO,"Kobold2")
local unit O1II00=IIO1OO(IOO1OIO,"Kobold3")
local integer I0001I
local boolean IO00IIO=false
local integer IO00I1O=0
local integer IO001OO=0
local integer IO0010O=0
local integer IO001IO=0
local integer IO0011O=0
call DisableTrigger(GetTriggeringTrigger())
if GetUnitTypeId(O1III0)==IOOI0OO()then
call UnitRemoveItemFromSlot(O1III0,0)
call EnableTrigger(GetTriggeringTrigger())
return
endif
if not(GetItemTypeId(GetManipulatedItem())==IOOIIOO()or GetItemTypeId(GetManipulatedItem())==IOOII0O()or GetItemTypeId(GetManipulatedItem())==IOOIIIO()or GetItemTypeId(GetManipulatedItem())==IOOII1O()or GetItemTypeId(GetManipulatedItem())==IOOI1OO())then
call EnableTrigger(GetTriggeringTrigger())
return
endif
if GetTriggerEventId()==EVENT_PLAYER_UNIT_DROP_ITEM then
set IO00IIO=true
endif
loop
exitwhen i>5
set I0001I=GetItemTypeId(UnitItemInSlot(O1III0,i))
if I0001I==IOOIIOO()then
set IO00I1O=IO00I1O+1
if(not(IO00IIO and I0001I==GetItemTypeId(GetManipulatedItem())))or(IO00I1O>1 and I0001I==GetItemTypeId(GetManipulatedItem()))then
set O1O1O0=true
endif
endif
if I0001I==IOOII0O()then
set IO001OO=IO001OO+1
if(not(IO00IIO and I0001I==GetItemTypeId(GetManipulatedItem())))or(IO001OO>1 and I0001I==GetItemTypeId(GetManipulatedItem()))then
set O1O100=true
endif
endif
if I0001I==IOOIIIO()then
set IO0010O=IO0010O+1
if(not(IO00IIO and I0001I==GetItemTypeId(GetManipulatedItem())))or(IO0010O>1 and I0001I==GetItemTypeId(GetManipulatedItem()))then
set O1O1I0=true
endif
endif
if I0001I==IOOII1O()then
set IO001IO=IO001IO+1
if(not(IO00IIO and I0001I==GetItemTypeId(GetManipulatedItem())))or(IO001IO>1 and I0001I==GetItemTypeId(GetManipulatedItem()))then
set O1O110=true
endif
endif
if I0001I==IOOI1OO()then
set IO0011O=IO0011O+1
if(not(IO00IIO and I0001I==GetItemTypeId(GetManipulatedItem())))or(IO0011O>1 and I0001I==GetItemTypeId(GetManipulatedItem()))then
set IO00IOO=true
endif
endif
set i=i+1
endloop
call RemoveItem(UnitRemoveItemFromSlot(O1I010,0))
if O1IIO0!=null then
call RemoveItem(UnitRemoveItemFromSlot(O1IIO0,0))
endif
if O1IIO0!=null then
call RemoveItem(UnitRemoveItemFromSlot(O1II00,0))
endif
if IO00IOO then
call UnitAddItem(O1I010,CreateItem(IOOI1OO(),0,0))
if O1IIO0!=null then
call UnitAddItem(O1IIO0,CreateItem(IOOI1OO(),0,0))
endif
if O1II00!=null then
call UnitAddItem(O1II00,CreateItem(IOOI1OO(),0,0))
endif
elseif O1O110 then
call UnitAddItem(O1I010,CreateItem(IOOII1O(),0,0))
if O1IIO0!=null then
call UnitAddItem(O1IIO0,CreateItem(IOOII1O(),0,0))
endif
if O1II00!=null then
call UnitAddItem(O1II00,CreateItem(IOOII1O(),0,0))
endif
elseif O1O1I0 then
call UnitAddItem(O1I010,CreateItem(IOOIIIO(),0,0))
if O1IIO0!=null then
call UnitAddItem(O1IIO0,CreateItem(IOOIIIO(),0,0))
endif
if O1II00!=null then
call UnitAddItem(O1II00,CreateItem(IOOIIIO(),0,0))
endif
elseif O1O100 then
call UnitAddItem(O1I010,CreateItem(IOOII0O(),0,0))
if O1IIO0!=null then
call UnitAddItem(O1IIO0,CreateItem(IOOII0O(),0,0))
endif
if O1II00!=null then
call UnitAddItem(O1II00,CreateItem(IOOII0O(),0,0))
endif
elseif O1O1O0 then
call UnitAddItem(O1I010,CreateItem(IOOIIOO(),0,0))
if O1IIO0!=null then
call UnitAddItem(O1IIO0,CreateItem(IOOIIOO(),0,0))
endif
if O1II00!=null then
call UnitAddItem(O1II00,CreateItem(IOOIIOO(),0,0))
endif
endif
call EnableTrigger(GetTriggeringTrigger())
endfunction
function IO0IOOO takes nothing returns nothing
local trigger t
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,0.1,true)
call TriggerAddAction(t,function IOO11IO)
call IIOOIO(I011OO(t),"PlayerVar",GetOwningPlayer(GetTriggerUnit()))
call IIOOIO(I011OO(GetOwningPlayer(GetTriggerUnit())),"Kobold|XPTrigger",t)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,0.3,true)
call TriggerAddAction(t,function IOO1OOO)
call IIOOIO(I011OO(t),"PlayerVar",GetOwningPlayer(GetTriggerUnit()))
call IIOOIO(I011OO(GetOwningPlayer(GetTriggerUnit())),"Kobold|AttributesTrigger",t)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(t,function IO000OO)
call TriggerAddCondition(t,Condition(function IO00O1O))
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddAction(t,function IO00I0O)
call TriggerAddCondition(t,Condition(function IO0000O))
call IIOOIO(I011OO(GetOwningPlayer(GetTriggerUnit())),"Kobold|ItemTrigger",t)
call ExecuteFunc("IO0IO0O")
endfunction
function IO0IOIO takes unit IO0IO1O,integer IO0I0OO returns nothing
local string IOO1OIO=I011OO(GetOwningPlayer(IO0IO1O))
local unit O1I0I0=IIO1OO(IOO1OIO,"Kobold0")
local unit O1I010=IIO1OO(IOO1OIO,"Kobold1")
local unit O1IIO0=IIO1OO(IOO1OIO,"Kobold2")
local unit O1II00=IIO1OO(IOO1OIO,"Kobold3")
if O1I0I0!=null and O1I0I0!=IO0IO1O then
call SelectHeroSkill(O1I0I0,IO0I0OO)
endif
if O1I010!=null and O1I010!=IO0IO1O then
call SelectHeroSkill(O1I010,IO0I0OO)
endif
if O1IIO0!=null and O1IIO0!=IO0IO1O then
call SelectHeroSkill(O1IIO0,IO0I0OO)
endif
if O1II00!=null and O1II00!=IO0IO1O then
call SelectHeroSkill(O1II00,IO0I0OO)
endif
endfunction
function IO0I00O takes integer IO0OOI,unit OOO0IOO,unit OOO0I0O returns nothing
local integer IIII0O=1
local integer IIIIIO=GetUnitAbilityLevel(OOO0IOO,IO0OOI)
loop
exitwhen IIII0O>IIIIIO
call SelectHeroSkill(OOO0I0O,IO0OOI)
set IIII0O=IIII0O+1
endloop
endfunction
function IO0I0IO takes unit IO0001O,unit IO0I01O returns nothing
call AddHeroXP(IO0001O,GetHeroXP(IO0I01O),false)
call IIO00O(I011OO(IO0001O),"XPGiven",GetHeroXP(IO0I01O))
call IIO00O(I011OO(IO0001O),"XPEarned",0)
call IO0I00O(IOOI00O(),IO0I01O,IO0001O)
call IO0I00O(IOOI0IO(),IO0I01O,IO0001O)
call IO0I00O(IOOI01O(),IO0I01O,IO0001O)
call IO0I00O(1096904043,IO0I01O,IO0001O)
call IO0I00O(IOOIOIO(),IO0I01O,IO0001O)
endfunction
function IO0IIOO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local player II01IO=GetOwningPlayer(I1IIIO)
local string I1I0IO=I011OO(II01IO)
local unit IO0001O
call IO0IOIO(I1IIIO,IOOIOIO())
set IO0001O=CreateUnit(GetOwningPlayer(I1IIIO),IOOI0OO(),GetUnitX(I1IIIO),GetUnitY(I1IIIO),0)
call IO0I0IO(IO0001O,I1IIIO)
call IO000IO(IO0001O,I1IIIO)
call IIOOIO(I1I0IO,"Kobold"+I2S(GetUnitAbilityLevel(I1IIIO,IOOIOIO())),IO0001O)
endfunction
function IO0II0O takes unit O1I010,unit O1IIO0,integer IO0I0OO,integer IO00I1O,integer IO001OO returns nothing
if IO00I1O>IO001OO then
call SelectHeroSkill(O1IIO0,IO0I0OO)
elseif IO001OO>IO00I1O then
call SelectHeroSkill(O1I010,IO0I0OO)
endif
endfunction
function IO0IIIO takes unit O1I010,unit O1IIO0 returns nothing
local integer IO0O1OO=GetHeroXP(O1I010)
local integer IO0O10O=GetHeroXP(O1IIO0)
local string IO0OOOO=I011OO(O1I010)
local string IO0OO0O=I011OO(O1IIO0)
local integer IO0O0IO=II000O(IO0OOOO,"XPGiven")
local integer IO0OIOO=II000O(IO0OO0O,"XPGiven")
local integer OI1I1IO
if IO0O1OO>IO0O10O then
set OI1I1IO=IO0O1OO-IO0O10O
call AddHeroXP(O1IIO0,OI1I1IO,true)
if IO0O10O!=GetHeroXP(O1IIO0)then
call IIO00O(IO0OO0O,"XPGiven",IO0OIOO+OI1I1IO)
endif
elseif IO0O1OO<IO0O10O then
set OI1I1IO=IO0O10O-IO0O1OO
call AddHeroXP(O1I010,OI1I1IO,true)
if IO0O1OO!=GetHeroXP(O1I010)then
call IIO00O(IO0OOOO,"XPGiven",IO0O0IO+OI1I1IO)
endif
endif
endfunction
function IO0II1O takes unit O1I010,unit O1IIO0 returns nothing
local integer IO0I1OO=GetUnitAbilityLevel(O1I010,IOOI00O())
local integer IO0I10O=GetUnitAbilityLevel(O1I010,IOOI0IO())
local integer IO0I1IO=GetUnitAbilityLevel(O1I010,IOOI01O())
local integer IO0I11O=GetUnitAbilityLevel(O1I010,IOOIOIO())
local integer IO01OOO=GetUnitAbilityLevel(O1I010,1096904043)
local integer IO01O0O=GetUnitAbilityLevel(O1IIO0,IOOI00O())
local integer IO01OIO=GetUnitAbilityLevel(O1IIO0,IOOI0IO())
local integer IO01O1O=GetUnitAbilityLevel(O1IIO0,IOOI01O())
local integer IO010OO=GetUnitAbilityLevel(O1IIO0,IOOIOIO())
local integer IO0100O=GetUnitAbilityLevel(O1IIO0,1096904043)
call IO0IIIO(O1I010,O1IIO0)
call IO0II0O(O1I010,O1IIO0,IOOI00O(),IO0I1OO,IO01O0O)
call IO0II0O(O1I010,O1IIO0,IOOI0IO(),IO0I10O,IO01OIO)
call IO0II0O(O1I010,O1IIO0,IOOI01O(),IO0I1IO,IO01O1O)
call IO0II0O(O1I010,O1IIO0,IOOIOIO(),IO0I11O,IO010OO)
call IO0II0O(O1I010,O1IIO0,1096904043,IO01OOO,IO0100O)
endfunction
function IO010IO takes unit O1I010,unit O1IIO0 returns nothing
if O1I010!=null and O1IIO0!=null then
call IO0II1O(O1I010,O1IIO0)
endif
endfunction
function IO0101O takes nothing returns nothing
local string IOO1OIO=I011OO(IIO10O(I011OO(GetTriggeringTrigger()),"PlayerVar"))
local unit O1I0I0=IIO1OO(IOO1OIO,"Kobold0")
local unit O1I010=IIO1OO(IOO1OIO,"Kobold1")
local unit O1IIO0=IIO1OO(IOO1OIO,"Kobold2")
local unit O1II00=IIO1OO(IOO1OIO,"Kobold3")
call DisableTrigger(I00O1O)
call IO010IO(O1I0I0,O1I010)
call IO010IO(O1I0I0,O1IIO0)
call IO010IO(O1I0I0,O1II00)
call IO010IO(O1I010,O1IIO0)
call IO010IO(O1I010,O1II00)
call IO010IO(O1IIO0,O1II00)
call EnableTrigger(I00O1O)
endfunction
function IO0IO0O takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,0.2,true)
call TriggerAddAction(t,function IO0101O)
call IIOOIO(I011OO(t),"PlayerVar",GetOwningPlayer(GetTriggerUnit()))
endfunction
function IO01IOO takes nothing returns nothing
local integer IO0I0OO=GetLearnedSkill()
if IsUnitIllusion(GetTriggerUnit())or IOOI10O(GetTriggerUnit())==false then
return
endif
if IO0I0OO==IOOIOIO()and GetUnitAbilityLevel(GetTriggerUnit(),IO0I0OO)==1 then
call TriggerExecute(IIO11O(I011OO(GetOwningPlayer(GetTriggerUnit())),"Kobold|XPTrigger"))
call TriggerExecute(IIO11O(I011OO(GetOwningPlayer(GetTriggerUnit())),"Kobold|AttributesTrigger"))
call IIOOIO(I011OO(GetOwningPlayer(GetTriggerUnit())),"Kobold0",GetTriggerUnit())
call IIO00O(I011OO(GetTriggerUnit()),"XPEarned",GetHeroXP(GetTriggerUnit()))
call IIO00O(I011OO(GetTriggerUnit()),"XPGiven",0)
call DisableTrigger(GetTriggeringTrigger())
call IO0IOOO()
call EnableTrigger(GetTriggeringTrigger())
endif
if IO0I0OO==IOOIOIO()then
call TriggerExecute(IIO11O(I011OO(GetOwningPlayer(GetTriggerUnit())),"Kobold|XPTrigger"))
call TriggerExecute(IIO11O(I011OO(GetOwningPlayer(GetTriggerUnit())),"Kobold|AttributesTrigger"))
call DisableTrigger(GetTriggeringTrigger())
call IO0IIOO()
call EnableTrigger(GetTriggeringTrigger())
endif
if IO0I0OO==IOOI00O()or IO0I0OO==IOOI0IO()or IO0I0OO==IOOI01O()or IO0I0OO==1096904043 then
call TriggerExecute(IIO11O(I011OO(GetOwningPlayer(GetTriggerUnit())),"Kobold|XPTrigger"))
call TriggerExecute(IIO11O(I011OO(GetOwningPlayer(GetTriggerUnit())),"Kobold|AttributesTrigger"))
call DisableTrigger(GetTriggeringTrigger())
call IO0IOIO(GetTriggerUnit(),IO0I0OO)
call EnableTrigger(GetTriggeringTrigger())
endif
endfunction
function III0I0 takes nothing returns nothing
set I00O1O=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I00O1O,EVENT_PLAYER_HERO_SKILL)
call TriggerAddAction(I00O1O,function IO01IOO)
endfunction
function IO01I0O takes nothing returns boolean
return IsUnitEnemy(OOOO1O,GetOwningPlayer(GetFilterUnit()))and OI0000()
endfunction
function IO01IIO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local integer IO0O0I=II000O(I1I0IO,"Level")
local group g
local unit u
if GetTriggerEvalCount(t)>32 then
call I0111O(I1I0IO)
call I10I1O(t)
else
set g=CreateGroup()
set OOOO1O=I1IIIO
call GroupEnumUnitsInRange(g,GetUnitX(I1IIIO),GetUnitY(I1IIIO),500,Condition(function IO01I0O))
set u=GroupPickRandomUnit(g)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\SteamTank\\SteamTankImpact.mdl",u,"chest"))
call UnitDamageTarget(I1IIIO,u,12.50*IO0O0I,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call DestroyGroup(g)
endif
set u=null
set g=null
set t=null
set I1IIIO=null
return false
endfunction
function IO01I1O takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=GetTriggerUnit()
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIO00O(I1I0IO,"Level",GetUnitAbilityLevel(I1IIIO,1093677877))
call TriggerRegisterTimerEvent(t,0.25,true)
call TriggerAddCondition(t,Condition(function IO01IIO))
set t=null
set I1IIIO=null
endfunction
function IO011OO takes nothing returns boolean
if GetSpellAbilityId()==1093677877 then
call IO01I1O()
endif
return false
endfunction
function I00100 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IO011OO))
endfunction
function IO0110O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093678680)
if IO0O0I==0 then
set IO0O0I=GetUnitAbilityLevel(I1IIIO,1093681489)
call UnitRemoveAbility(I1IIIO,1093681489)
call UnitAddAbility(I1IIIO,1093681489)
call SetUnitAbilityLevel(I1IIIO,1093681489,IO0O0I)
else
call UnitRemoveAbility(I1IIIO,1093678680)
call UnitAddAbility(I1IIIO,1093678680)
call SetUnitAbilityLevel(I1IIIO,1093678680,IO0O0I)
endif
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set I1IIIO=null
return false
endfunction
function IO011IO takes unit I1IIIO returns nothing
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093678680)
if IO0O0I==0 then
set IO0O0I=GetUnitAbilityLevel(I1IIIO,1093681489)
endif
call SetUnitState(I1IIIO,UNIT_STATE_MANA,GetUnitState(I1IIIO,UNIT_STATE_MANA)-20*IO0O0I)
if GetUnitState(I1IIIO,UNIT_STATE_MANA)<20*IO0O0I then
call IssueImmediateOrder(I1IIIO,"unimmolation")
endif
endfunction
function IO0111O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
if GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if GetIssuedOrderId()==852178 then
call I0111O(I1I0IO)
call I10I1O(t)
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function IO0110O))
endif
else
call IO011IO(I1IIIO)
endif
set t=null
return false
endfunction
function IOIOOOO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function IO0111O))
set I1IIIO=null
set t=null
endfunction
function IOIOO0O takes nothing returns boolean
if GetSpellAbilityId()==1093678680 or GetSpellAbilityId()==1093681489 then
call IOIOOOO()
endif
return false
endfunction
function I001I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IOIOO0O))
set t=null
endfunction
function IOIOOIO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local player p=IIO10O(I1I0IO,"p")
local unit IOIOO1O=IIO1OO(I1I0IO,"LastTarget")
local integer IO0O0I=II000O(I1I0IO,"Level")
local integer IOIO0OO=II000O(I1I0IO,"CurrentCount")
local integer IOIO00O=II000O(I1I0IO,"MaxCount")
local unit O011OOO=IIO1OO(I1I0IO,"VisualCaster")
local unit O11O1I=CreateUnit(p,1697656901,GetUnitX(IOIOO1O),GetUnitY(IOIOO1O),0)
local group g
call I0111O(I1I0IO)
call I10I1O(t)
call UnitAddAbility(O11O1I,1093679409)
call SetUnitAbilityLevel(O11O1I,1093679409,IO0O0I)
call IssueTargetOrder(O11O1I,"frostnova",IOIOO1O)
if IOIO0OO>IOIO00O then
call RemoveUnit(O011OOO)
else
set g=CreateGroup()
set OOOO1O=O011OOO
call GroupEnumUnitsInRange(g,GetUnitX(IOIOO1O),GetUnitY(IOIOO1O),600,Condition(function OI0IO0))
call GroupRemoveUnit(g,IOIOO1O)
set IOIOO1O=GroupPickRandomUnit(g)
call DestroyGroup(g)
if IOIOO1O!=null then
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call IssuePointOrder(O011OOO,"move",GetUnitX(IOIOO1O),GetUnitY(IOIOO1O))
call IIOOIO(I1I0IO,"p",p)
call IIOOIO(I1I0IO,"LastTarget",IOIOO1O)
call IIOOIO(I1I0IO,"VisualCaster",O011OOO)
call IIO00O(I1I0IO,"Level",IO0O0I)
call IIO00O(I1I0IO,"CurrentCount",IOIO0OO+1)
call IIO00O(I1I0IO,"MaxCount",IOIO00O)
call TriggerRegisterTimerEvent(t,OOII10(O011OOO,IOIOO1O)/ 522,false)
call TriggerAddCondition(t,Condition(function IOIOOIO))
else
call RemoveUnit(O011OOO)
endif
endif
set t=null
set p=null
set IOIOO1O=null
set O011OOO=null
set O11O1I=null
set g=null
return false
endfunction
function IOIO0IO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093678420)
local integer IOIO00O=6
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit O011OOO
if GetSpellAbilityId()==1093679176 then
set IO0O0I=GetUnitAbilityLevel(I1IIIO,1093679176)+1
set IOIO00O=7
endif
set O011OOO=CreateUnit(GetOwningPlayer(I1IIIO),1697656889,GetUnitX(I1IIIO),GetUnitY(I1IIIO),0)
call IssuePointOrder(O011OOO,"move",GetUnitX(OOI010),GetUnitY(OOI010))
call IIOOIO(I1I0IO,"p",GetOwningPlayer(I1IIIO))
call IIOOIO(I1I0IO,"LastTarget",OOI010)
call IIOOIO(I1I0IO,"VisualCaster",O011OOO)
call IIO00O(I1I0IO,"Level",IO0O0I)
call IIO00O(I1I0IO,"CurrentCount",1)
call IIO00O(I1I0IO,"MaxCount",IOIO00O)
call TriggerRegisterTimerEvent(t,OOII10(O011OOO,OOI010)/ 522,false)
call TriggerAddCondition(t,Condition(function IOIOOIO))
set I1IIIO=null
set OOI010=null
set O011OOO=null
set t=null
endfunction
function IOIO01O takes nothing returns boolean
if GetSpellAbilityId()==1093678420 or GetSpellAbilityId()==1093679176 then
call IOIO0IO()
endif
return false
endfunction
function I00110 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IOIO01O))
set t=null
endfunction
function IOIOIOO takes nothing returns boolean
return GetSpellAbilityId()==1093679412
endfunction
function IOIOI0O takes nothing returns boolean
if(not(ModuloReal(I2R(GetHeroLevel(GetSpellTargetUnit())),(7.00-I2R(GetUnitAbilityLevelSwapped(1093679412,GetTriggerUnit()))))==0.00))then
return false
endif
return true
endfunction
function IOIOIIO takes nothing returns nothing
if(IOIOI0O()or GetHeroLevel(GetSpellTargetUnit())==25)then
call UnitDamageTargetBJ(GetTriggerUnit(),GetSpellTargetUnit(),250.00,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
endif
endfunction
function I0IOO0 takes nothing returns nothing
set I0O1I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I0O1I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(I0O1I,Condition(function IOIOIOO))
call TriggerAddAction(I0O1I,function IOIOIIO)
endfunction
function IOIOI1O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local integer IO0O0I=II000O(I1I0IO,"Level")
call OIO0I0(GetOwningPlayer(I1IIIO),I1IIIO,10*IO0O0I)
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set I1IIIO=null
return false
endfunction
function IOIO1OO takes nothing returns nothing
local unit I1IIIO=GetTransportUnit()
local unit IOIO10O=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093678425)
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIO00O(I1I0IO,"Level",IO0O0I)
call TriggerRegisterTimerEvent(t,GetUnitState(IOIO10O,UNIT_STATE_LIFE)/ 20,false)
call TriggerAddCondition(t,Condition(function IOIOI1O))
set t=null
set I1IIIO=null
set IOIO10O=null
endfunction
function IOIO1IO takes nothing returns boolean
if GetUnitTypeId(GetTransportUnit())==1430467634 then
call IOIO1OO()
endif
return false
endfunction
function I0IO00 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_LOADED)
call TriggerAddCondition(t,Condition(function IOIO1IO))
set t=null
endfunction
function IOIO11O takes nothing returns boolean
if(not(GetSpellAbilityId()==1093682757))then
return false
endif
return true
endfunction
function IOI0OOO takes nothing returns nothing
local location O000OI=GetSpellTargetLoc()
call CreateNUnitsAtLoc(1,1697656901,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call ShowUnitHide(bj_lastCreatedUnit)
call UnitApplyTimedLifeBJ(20.00,1112820806,bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,1093682758)
call SetUnitAbilityLevelSwapped(1093682758,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093682757,GetTriggerUnit()))
call UnitAddAbility(bj_lastCreatedUnit,1093682759)
call SetUnitAbilityLevelSwapped(1093682759,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093682757,GetTriggerUnit()))
call RemoveLocation(O000OI)
endfunction
function I0IOI0 takes nothing returns nothing
set I00OI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I00OI,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(I00OI,Condition(function IOIO11O))
call TriggerAddAction(I00OI,function IOI0OOO)
endfunction
function IOI0O0O takes nothing returns boolean
if(not(GetSpellAbilityId()==1093678662))then
return false
endif
return true
endfunction
function IOI0OIO takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)then
if(GetUnitTypeId(GetFilterUnit())!=1848651852)then
return true
endif
endif
return false
endfunction
function IOI0O1O takes nothing returns boolean
return(GetUnitAbilityLevelSwapped(1093678162,GetFilterUnit())!=1)
endfunction
function IOI00OO takes nothing returns boolean
return GetBooleanAnd(IOI0OIO(),IOI0O1O())
endfunction
function IOI000O takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==true)
endfunction
function IOI00IO takes nothing returns boolean
return(IsUnitDeadBJ(GetFilterUnit())==false)
endfunction
function IOI001O takes nothing returns boolean
return GetBooleanAnd(IOI000O(),IOI00IO())
endfunction
function IOI0IOO takes nothing returns boolean
return GetBooleanAnd(IOI00OO(),IOI001O())
endfunction
function IOI0I0O takes nothing returns nothing
local location O000OI=GetUnitLoc(GetSpellAbilityUnit())
local location O0OOI1O=I0011O(O000OI,GetRandomReal(20.00,70.00),GetRandomReal(0,360))
call SetUnitPositionLoc(GetEnumUnit(),O0OOI1O)
call RemoveLocation(O000OI)
call RemoveLocation(O0OOI1O)
endfunction
function IOI0IIO takes nothing returns nothing
local location O000OI=GetUnitLoc(GetTriggerUnit())
local group II1O0O=I0II0O(480.00,O000OI,Condition(function IOI0IOO))
call ForGroupBJ(II1O0O,function IOI0I0O)
call DestroyGroup(II1O0O)
call RemoveLocation(O000OI)
endfunction
function RP takes nothing returns nothing
set I000I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I000I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(I000I,Condition(function IOI0O0O))
call TriggerAddAction(I000I,function IOI0IIO)
endfunction
function IOI0I1O takes nothing returns boolean
if(not(GetUnitAbilityLevelSwapped(1093677362,GetDyingUnit())>0))then
return false
endif
return true
endfunction
function IOI01OO takes nothing returns boolean
if(not(GetUnitAbilityLevelSwapped(1093677362,GetTriggerUnit())>0))then
return false
endif
if(not(GetIssuedOrderId()==String2OrderIdBJ("defend")))then
return false
endif
return true
endfunction
function IOI010O takes nothing returns boolean
if(not(GetUnitAbilityLevelSwapped(1093677362,GetTriggerUnit())>0))then
return false
endif
if(not(GetIssuedOrderId()==String2OrderIdBJ("undefend")))then
return false
endif
return true
endfunction
function IOI01IO takes nothing returns nothing
if(IOI0I1O())then
call UnitRemoveAbility(GetDyingUnit(),1093679434)
else
endif
if(IOI01OO())then
call UnitAddAbility(GetTriggerUnit(),1093679434)
else
endif
if(IOI010O())then
call UnitRemoveAbility(GetTriggerUnit(),1093679434)
else
endif
endfunction
function I0IO10 takes nothing returns nothing
set I00II=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I00II,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerRegisterAnyUnitEventBJ(I00II,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(I00II,function IOI01IO)
endfunction
function IOI011O takes nothing returns nothing
call OII1O0(OOOO1O,GetEnumUnit(),3,0.01*GetUnitState(GetEnumUnit(),UNIT_STATE_MAX_LIFE))
endfunction
function IOIIOOO takes nothing returns boolean
return OI0I00()and GetUnitAbilityLevel(GetFilterUnit(),1110456372)>0
endfunction
function IOIIO0O takes nothing returns boolean
local string I1I0IO=I011OO(GetTriggeringTrigger())
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local group g
if I1I11O(I1IIIO)==false then
set g=CreateGroup()
set OOOO1O=I1IIIO
call GroupEnumUnitsInRange(g,GetUnitX(I1IIIO),GetUnitY(I1IIIO),250*GetUnitAbilityLevel(I1IIIO,1093677390),Condition(function IOIIOOO))
call ForGroup(g,function IOI011O)
call DestroyGroup(g)
endif
set g=null
set I1IIIO=null
return false
endfunction
function IOIIOIO takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1.0,true)
call TriggerAddCondition(t,Condition(function IOIIO0O))
call IIOOIO(I011OO(t),"Hero",GetTriggerUnit())
set t=null
endfunction
function IOIIO1O takes nothing returns boolean
if GetLearnedSkill()==1093677390 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093677390)==1 then
call IOIIOIO()
endif
return false
endfunction
function II1IO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function IOIIO1O))
set t=null
endfunction
function IOII0OO takes nothing returns nothing
call SetUnitState(OOO0OO,UNIT_STATE_LIFE,GetUnitState(OOO0OO,UNIT_STATE_LIFE)+50)
endfunction
function IOII00O takes nothing returns nothing
call O0IOI0(GetDyingUnit(),GetEnumUnit(),1747988567,"IOII0OO",400)
endfunction
function IOII0IO takes nothing returns nothing
local group g=CreateGroup()
call GroupEnumUnitsOfPlayer(g,GetOwningPlayer(GetDyingUnit()),Condition(function OII000))
call ForGroup(g,function IOII00O)
call DestroyGroup(g)
set g=null
endfunction
function IOII01O takes nothing returns nothing
call O00O10(I00I0,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endfunction
function IOIIIOO takes nothing returns boolean
if GetUnitTypeId(GetDyingUnit())==1848652336 then
call IOII0IO()
endif
return false
endfunction
function IOIII0O takes nothing returns boolean
if GetSpellAbilityId()==1093685590 then
call IOII01O()
endif
return false
endfunction
function II1I10 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function IOIIIOO))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IOIII0O))
endfunction
function IOIIIIO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit IOIII1O=IIO1OO(I1I0IO,"MainSource")
local real IOII1OO=0.15+GetUnitAbilityLevel(IOIII1O,1093685811)*0.05
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
call IIOI0O(I011OO(IIO1OO(I1I0IO,"Unit")),"IsPlagueInfected",false)
call I0110O(I011OO(IIO11O(I1I0IO,"neart")))
call I10I1O(IIO11O(I1I0IO,"neart"))
call I0110O(I1I0IO)
call I10I1O(t)
elseif GetEventDamage()>5 then
call DisableTrigger(t)
call OII1O0(GetEventDamageSource(),GetTriggerUnit(),3,GetEventDamage()*IOII1OO)
call EnableTrigger(t)
endif
set t=null
return false
endfunction
function IOII10O takes nothing returns boolean
set OOOO1O=GetTriggerUnit()
set OOO0OO=IIO1OO(I011OO(GetTriggeringTrigger()),"MainSource")
call ExecuteFunc("IOII1IO")
return false
endfunction
function IOII11O takes unit III1IO,unit IOIII1O returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local integer IO0O0I=GetUnitAbilityLevel(IOIII1O,1093685811)
local integer O0IOI1O=5+IO0O0I*2
local unit O11O1I=CreateUnit(GetOwningPlayer(IOIII1O),1697656901,GetUnitX(III1IO),GetUnitY(III1IO),0)
local trigger IOI1OOO=CreateTrigger()
call TriggerRegisterUnitInRange(IOI1OOO,III1IO,200,Condition(function OI0100))
call TriggerAddCondition(IOI1OOO,Condition(function IOII10O))
call IIOOIO(I011OO(IOI1OOO),"MainSource",IOIII1O)
call UnitAddAbility(O11O1I,1093685812)
call SetUnitAbilityLevel(O11O1I,1093685812,IO0O0I)
call IssueTargetOrder(O11O1I,"slow",III1IO)
call TriggerRegisterUnitEvent(t,III1IO,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,O0IOI1O,false)
call TriggerAddCondition(t,Condition(function IOIIIIO))
call IIOOIO(I1I0IO,"MainSource",IOIII1O)
call IIOOIO(I1I0IO,"neart",IOI1OOO)
call IIOOIO(I1I0IO,"Unit",III1IO)
call OO11I0("effects\\runicbreath.mdx",III1IO,"chest",1,O0IOI1O-1)
set t=null
set O11O1I=null
set IOI1OOO=null
endfunction
function IOI1O0O takes unit III1IO,unit IOIII1O returns nothing
if IsUnitEnemy(III1IO,GetOwningPlayer(IOIII1O))and II001O(I011OO(III1IO),"IsPlagueInfected")==false then
call IIOI0O(I011OO(III1IO),"IsPlagueInfected",true)
call IOII11O(III1IO,IOIII1O)
endif
endfunction
function IOII1IO takes nothing returns nothing
call IOI1O0O(OOOO1O,OOO0OO)
endfunction
function IOI1OIO takes nothing returns nothing
call IOI1O0O(GetSpellTargetUnit(),GetTriggerUnit())
endfunction
function IOI1O1O takes nothing returns boolean
if GetSpellAbilityId()==1093685811 then
call IOI1OIO()
endif
return false
endfunction
function II1I00 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IOI1O1O))
set t=null
endfunction
function IOI10OO takes nothing returns nothing
if I1III<=I1I1I then
set I1III=I1III+1
call GroupAddUnit(OOO0IO,GetEnumUnit())
endif
endfunction
function IOI100O takes unit OOI0I0,unit OOI010 returns nothing
call O0O010("SPLK",GetUnitX(OOI0I0),GetUnitY(OOI0I0),GetUnitX(OOI010),GetUnitY(OOI010),0.1,0.6,0.44,.9,0.6)
endfunction
function IOI10IO takes nothing returns nothing
call SetUnitState(OOOO1O,UNIT_STATE_LIFE,GetUnitState(OOOO1O,UNIT_STATE_LIFE)+25)
call OII1O0(OOO0OO,GetEnumUnit(),1,25)
call IOI100O(GetEnumUnit(),OOOO1O)
endfunction
function IOI101O takes nothing returns nothing
call OII1O0(OOO0OO,OOOO1O,1,25)
call OII1O0(OOO0OO,GetEnumUnit(),1,25)
call IOI100O(GetEnumUnit(),OOOO1O)
endfunction
function IOI1IOO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local group g=CreateGroup()
local integer IOI1I0O=GetUnitAbilityLevel(I1IIIO,1093685813)*5
set OOO0IO=CreateGroup()
set I1III=0
set I1I1I=IOI1I0O
set OOOO1O=I1IIIO
call GroupEnumUnitsInRange(g,GetUnitX(I1IIIO),GetUnitY(I1IIIO),1000,Condition(function OIIIO0))
call GroupRemoveUnit(g,I1IIIO)
call GroupRemoveUnit(g,GetSpellTargetUnit())
call ForGroup(g,function IOI10OO)
call DestroyGroup(g)
set g=OOO0IO
set OOOO1O=GetSpellTargetUnit()
set OOO0OO=I1IIIO
if IsUnitAlly(OOOO1O,GetOwningPlayer(I1IIIO))then
call ForGroup(g,function IOI10IO)
else
call ForGroup(g,function IOI101O)
endif
call DestroyGroup(g)
set I1IIIO=null
set g=null
endfunction
function IOI1IIO takes nothing returns boolean
if GetSpellAbilityId()==1093685813 then
call IOI1IOO()
endif
return false
endfunction
function II1II0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IOI1IIO))
set t=null
endfunction
function IOI1I1O takes unit OOI0I0,unit OOI010 returns nothing
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,1093686099)
local real OOIO00=(0.03+0.01*IO0O0I)*GetUnitState(OOI010,UNIT_STATE_LIFE)
call OII1O0(OOI0I0,OOI010,2,OOIO00)
call SetUnitState(OOI0I0,UNIT_STATE_LIFE,OOIO00+GetUnitState(OOI0I0,UNIT_STATE_LIFE))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",OOI0I0,"origin"))
endfunction
function IOI11OO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==OOI0I0 then
call DisableTrigger(t)
call IOI1I1O(OOI0I0,OOI010)
call I0110O(I1I0IO)
call I10I1O(t)
endif
else
call I0110O(I1I0IO)
call I10I1O(t)
endif
set t=null
set OOI0I0=null
set OOI010=null
return false
endfunction
function IOI110O takes nothing returns nothing
local trigger t=CreateTrigger()
local unit OOI010=GetTriggerUnit()
local unit OOI0I0=GetAttacker()
local string I1I0IO=I011OO(t)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,1,false)
call TriggerAddCondition(t,Condition(function IOI11OO))
call IIOOIO(I1I0IO,"Target",OOI010)
call IIOOIO(I1I0IO,"Source",OOI0I0)
set OOI010=null
set OOI0I0=null
set t=null
endfunction
function IOI11IO takes nothing returns nothing
local unit OOI0I0=GetAttacker()
if I1IO0O(OOI0I0,"FeastCooldown")==false then
call I1I01O(OOI0I0,"FeastCooldown",0.4)
call IOI110O()
endif
endfunction
function IOI111O takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),1093686099)>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==IIO1OO(I011OO(GetTriggeringTrigger()),"Hero")and GetUnitTypeId(GetTriggerUnit())!=1848651852 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))then
call IOI11IO()
endif
return false
endfunction
function IO1OOOO takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function IOI111O))
call IIOOIO(I011OO(t),"Hero",GetTriggerUnit())
set t=null
endfunction
function IO1OO0O takes nothing returns boolean
if GetLearnedSkill()==1093686099 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093686099)==1 then
call IO1OOOO()
endif
return false
endfunction
function I1OIO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function IO1OO0O))
set t=null
endfunction
function IO1OOIO takes integer OO1100,unit OOI0I0,unit OOI010 returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(OOI0I0),1697656901,GetUnitX(OOI010),GetUnitY(OOI010),0)
if OO1100==0 then
call UnitAddAbility(O11O1I,1093686608)
call IssueTargetOrder(O11O1I,"thunderbolt",OOI010)
elseif OO1100==1 then
call UnitAddAbility(O11O1I,1093686344)
call SetUnitAbilityLevel(O11O1I,1093686344,1)
call IssueTargetOrder(O11O1I,"slow",OOI010)
elseif OO1100==2 then
call UnitAddAbility(O11O1I,1093686344)
call SetUnitAbilityLevel(O11O1I,1093686344,2)
call IssueTargetOrder(O11O1I,"slow",OOI010)
elseif OO1100==3 then
call UnitAddAbility(O11O1I,1093686344)
call SetUnitAbilityLevel(O11O1I,1093686344,3)
call IssueTargetOrder(O11O1I,"slow",OOI010)
elseif OO1100==4 then
call UnitAddAbility(O11O1I,1093686344)
call SetUnitAbilityLevel(O11O1I,1093686344,4)
call IssueTargetOrder(O11O1I,"slow",OOI010)
endif
set O11O1I=null
endfunction
function IO1OO1O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer IO0O0I=II000O(I1I0IO,"Level")
local integer OO1100=II000O(I1I0IO,"Count")
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local unit OOI010=IIO1OO(I1I0IO,"Target")
local real O0III1O=(5.0+IO0O0I*5.0)/ 100.0
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
set OO1100=OO1100+1
call IO1OOIO(OO1100,OOI0I0,OOI010)
if OO1100==7 then
call I0111O(I1I0IO)
call I10I1O(t)
else
call IIO00O(I1I0IO,"Count",OO1100)
endif
elseif GetEventDamage()>5 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))and IsUnitType(GetEventDamageSource(),UNIT_TYPE_STRUCTURE)==false then
call SetUnitState(GetEventDamageSource(),UNIT_STATE_LIFE,GetUnitState(GetEventDamageSource(),UNIT_STATE_LIFE)+GetEventDamage()*O0III1O)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",GetEventDamageSource(),"origin"))
endif
set t=null
set OOI0I0=null
set OOI010=null
return false
endfunction
function IO1O0OO takes nothing returns nothing
local unit OOI0I0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call IO1OOIO(0,OOI0I0,OOI010)
call IIO00O(I1I0IO,"Cache",0)
call IIO00O(I1I0IO,"Level",GetUnitAbilityLevel(OOI0I0,1093686345))
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIOOIO(I1I0IO,"Target",OOI010)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function IO1OO1O))
endfunction
function IO1O00O takes nothing returns boolean
if GetSpellAbilityId()==1093686345 then
call IO1O0OO()
endif
return false
endfunction
function I1OI10 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IO1O00O))
set t=null
call OO0OO0(1093686344)
endfunction
function IO1O0IO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
call SetUnitVertexColor(I1IIIO,100,100,100,255)
call DestroyEffect(II0O0O(I1I0IO,"FX1"))
call DestroyEffect(II0O0O(I1I0IO,"FX2"))
call UnitRemoveAbility(I1IIIO,1093686098)
call UnitRemoveAbility(I1IIIO,1093686100)
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set I1IIIO=null
return false
endfunction
function IO1O01O takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093686322)
call SetUnitVertexColor(I1IIIO,0,0,0,255)
call SetPlayerAbilityAvailable(GetOwningPlayer(I1IIIO),1093686100,false)
call UnitAddAbility(I1IIIO,1093686100)
call UnitAddAbility(I1IIIO,1093686098)
call SetUnitAbilityLevel(I1IIIO,1093686098,IO0O0I)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIOOIO(I1I0IO,"FX1",AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Bloodlust\\BloodlustTarget.mdl",I1IIIO,"right hand"))
call IIOOIO(I1I0IO,"FX2",AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Bloodlust\\BloodlustTarget.mdl",I1IIIO,"left hand"))
call TriggerRegisterTimerEvent(t,1.75+0.75*IO0O0I,false)
call TriggerAddCondition(t,Condition(function IO1O0IO))
set I1IIIO=null
set t=null
endfunction
function IO1OIOO takes nothing returns boolean
if GetSpellAbilityId()==1093686322 then
call IO1O01O()
endif
return false
endfunction
function I1OI00 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IO1OIOO))
set t=null
endfunction
function IO1OI0O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local unit O11O1I=IIO1OO(I1I0IO,"Caster")
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call SetUnitPosition(I1IIIO,GetUnitX(OOI010),GetUnitY(OOI010))
call PauseUnit(I1IIIO,false)
call ShowUnit(I1IIIO,true)
call SetUnitPathing(I1IIIO,true)
call ClearSelectionForPlayer(GetOwningPlayer(I1IIIO))
call SelectUnitForPlayerSingle(I1IIIO,GetOwningPlayer(I1IIIO))
call SetUnitInvulnerable(I1IIIO,false)
call DestroyEffect(II0O0O(I1I0IO,"FX"))
call RemoveUnit(O11O1I)
call I0111O(I1I0IO)
call I10I1O(t)
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093686104 then
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl",GetUnitX(OOI010),GetUnitY(OOI010)))
if GetUnitAbilityLevel(I1IIIO,1093686103)==3 then
call SetUnitState(I1IIIO,UNIT_STATE_LIFE,GetUnitState(I1IIIO,UNIT_STATE_LIFE)+GetUnitState(OOI010,UNIT_STATE_MAX_LIFE))
else
call SetUnitState(I1IIIO,UNIT_STATE_LIFE,GetUnitState(I1IIIO,UNIT_STATE_LIFE)+GetUnitState(OOI010,UNIT_STATE_LIFE))
endif
call SetUnitPosition(I1IIIO,GetUnitX(OOI010),GetUnitY(OOI010))
call PauseUnit(I1IIIO,false)
call ShowUnit(I1IIIO,true)
call SetUnitPathing(I1IIIO,true)
call SetUnitAnimation(I1IIIO,"Stand Victory")
call O01I10(I1IIIO,1.5)
call ClearSelectionForPlayer(GetOwningPlayer(I1IIIO))
call SelectUnitForPlayerSingle(I1IIIO,GetOwningPlayer(I1IIIO))
call SetUnitInvulnerable(I1IIIO,false)
call DestroyEffect(II0O0O(I1I0IO,"FX"))
call RemoveUnit(O11O1I)
call UnitRemoveBuffs(OOI010,true,true)
call OII1O0(I1IIIO,OOI010,1,100000)
call OII1O0(I1IIIO,OOI010,2,100000)
call OII1O0(I1IIIO,OOI010,3,100000)
call I0111O(I1I0IO)
call I10I1O(t)
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELECTED and GetTriggerUnit()==OOI010 then
call ClearSelectionForPlayer(GetOwningPlayer(I1IIIO))
call SelectUnitAddForPlayer(O11O1I,GetOwningPlayer(I1IIIO))
else
call SetUnitPosition(I1IIIO,GetUnitX(OOI010),GetUnitY(OOI010))
endif
set t=null
set OOI010=null
set I1IIIO=null
return false
endfunction
function IO1OIIO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697657136,7260,-7732,0)
local string I01I1I="Objects\\Spawnmodels\\Naga\\NagaBlood\\NagaBloodWindserpent.mdl"
local string IO1OI1O="Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBase.mdl"
if IsPlayerEnemy(GetLocalPlayer(),GetOwningPlayer(I1IIIO))then
set I01I1I=""
set IO1OI1O=""
endif
call SetUnitInvulnerable(O11O1I,true)
call UnitAddAbility(O11O1I,1093686104)
call ClearSelectionForPlayer(GetOwningPlayer(I1IIIO))
call SelectUnitForPlayerSingle(O11O1I,GetOwningPlayer(I1IIIO))
call UnitShareVision(OOI010,GetOwningPlayer(I1IIIO),true)
call SetUnitInvulnerable(I1IIIO,true)
call ShowUnit(I1IIIO,false)
call PauseUnit(I1IIIO,true)
call SetUnitPathing(I1IIIO,false)
call DestroyEffect(AddSpecialEffectTarget(I01I1I,OOI010,"overhead"))
call IIOOIO(I1I0IO,"Target",OOI010)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIOOIO(I1I0IO,"Caster",O11O1I)
call IIOOIO(I1I0IO,"FX",AddSpecialEffectTarget(IO1OI1O,OOI010,"overhead"))
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DEATH)
call TriggerRegisterPlayerUnitEvent(t,GetOwningPlayer(I1IIIO),EVENT_PLAYER_UNIT_SELECTED,null)
call TriggerRegisterUnitEvent(t,O11O1I,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterTimerEvent(t,0.2,true)
call TriggerAddCondition(t,Condition(function IO1OI0O))
set t=null
set I1IIIO=null
set OOI010=null
endfunction
function IO1O1OO takes nothing returns boolean
if GetSpellAbilityId()==1093686103 then
call IO1OIIO()
endif
return false
endfunction
function IO1O10O takes nothing returns boolean
if GetSpellAbilityId()==1093686103 and GetUnitAbilityLevel(GetTriggerUnit(),1093686103)==1 and IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and I1001O(GetSpellTargetUnit())==false then
call OOO010(GetTriggerUnit())
call I11I1O(GetOwningPlayer(GetTriggerUnit()),"Cannot target enemy units at level 1")
endif
return false
endfunction
function I1OII0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IO1O1OO))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function IO1O10O))
set t=null
endfunction
function IO1O1IO takes nothing returns boolean
if(not(UnitHasBuffBJ(GetKillingUnit(),1110454866)==true))then
return false
endif
return true
endfunction
function IO1O11O takes nothing returns nothing
call SetUnitManaBJ(GetKillingUnit(),(GetUnitStateSwap(UNIT_STATE_MANA,GetKillingUnit())+(12.00*I2R(GetUnitAbilityLevelSwapped(1093678640,GetKillingUnit())))))
endfunction
function I0I0O0 takes nothing returns nothing
set I001I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I001I,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(I001I,Condition(function IO1O1IO))
call TriggerAddAction(I001I,function IO1O11O)
endfunction
function IO10OOO takes nothing returns nothing
local string I1I0IO=I011OO(GetTriggeringTrigger())
local unit OOI0I0=OOOO1O
local unit OOI010=OOO0OO
local real OOIO00=II00IO(I1I0IO,"Damage")
local real IO10O0O=II00IO(I1I0IO,"Heal")
if IsUnitAlly(OOI010,GetOwningPlayer(OOI0I0))then
call SetUnitState(OOI010,UNIT_STATE_LIFE,GetUnitState(OOI010,UNIT_STATE_LIFE)+IO10O0O)
else
call OII1O0(OOI0I0,OOI010,1,OOIO00)
endif
set OOI0I0=null
set OOI010=null
endfunction
function IO10OIO takes nothing returns nothing
local trigger t=O0IOI0(OOOO1O,GetEnumUnit(),1747988567,"IO10OOO",400)
local string I1I0IO=I011OO(t)
call IIO01O(I1I0IO,"Damage",I110I)
call IIO01O(I1I0IO,"Heal",I11II)
set t=null
endfunction
function IO10O1O takes nothing returns nothing
if IsUnitVisible(GetEnumUnit(),GetOwningPlayer(OOOO1O))then
call IO10OIO()
endif
endfunction
function IO100OO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local group g=CreateGroup()
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,I000OO)
local real r
local real OOIO00
local real IO10O0O
if IO0O0I==1 then
set OOIO00=75
set IO10O0O=50
set r=400
elseif IO0O0I==2 then
set OOIO00=125
set IO10O0O=75
set r=450
elseif IO0O0I==3 then
set OOIO00=200
set IO10O0O=100
set r=475
elseif IO0O0I==4 then
set OOIO00=275
set IO10O0O=130
set r=500
endif
set OOOO1O=I1IIIO
set I110I=OOIO00
set I11II=IO10O0O
call GroupEnumUnitsInRange(g,GetUnitX(I1IIIO),GetUnitY(I1IIIO),r,Condition(function OIIOI0))
call GroupRemoveUnit(g,I1IIIO)
call ForGroup(g,function IO10O1O)
call DestroyGroup(g)
call SetUnitState(I1IIIO,UNIT_STATE_LIFE,GetUnitState(I1IIIO,UNIT_STATE_LIFE)+IO10O0O)
set I1IIIO=null
set g=null
endfunction
function IO1000O takes nothing returns boolean
if GetSpellAbilityId()==I000OO then
call IO100OO()
endif
return false
endfunction
function I0I000 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IO1000O))
set t=null
endfunction
function IO100IO takes nothing returns boolean
return GetSpellAbilityId()==1093678647 or GetSpellAbilityId()==1093679184
endfunction
function IO1001O takes nothing returns nothing
local integer IO10IOO=GetUnitAbilityLevel(GetTriggerUnit(),1093678647)
local integer IO10I0O=GetUnitAbilityLevel(GetTriggerUnit(),1093679184)
if IO10IOO==1 then
set O01I=0.4
endif
if IO10IOO==2 or IO10I0O==1 then
set O01I=0.6
endif
if IO10IOO==3 or IO10I0O==2 then
set O01I=0.9
endif
if IO10I0O==3 then
set O01I=1.1
endif
call UnitDamageTargetBJ(GetTriggerUnit(),GetSpellTargetUnit(),(O01I*(GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetSpellTargetUnit())-GetUnitStateSwap(UNIT_STATE_LIFE,GetSpellTargetUnit()))),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)
endfunction
function I0I0I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IO100IO))
call TriggerAddAction(t,function IO1001O)
endfunction
function IO10IIO takes nothing returns nothing
local integer IO10I1O=GetUnitAbilityLevel(GetKillingUnit(),1093682001)
local integer IO0O0I=GetUnitAbilityLevel(GetKillingUnit(),1093681746)
local integer IO101OO
if IO0O0I==1 then
set IO101OO=8
elseif IO0O0I==2 then
set IO101OO=15
elseif IO0O0I==3 then
set IO101OO=23
else
set IO101OO=30
endif
if IO10I1O<=IO101OO then
call SetUnitAbilityLevel(GetKillingUnit(),1093682001,IO10I1O+1)
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\ZigguratMissile\\ZigguratMissile.mdl",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))
endif
endfunction
function IO1010O takes nothing returns nothing
call SetUnitAbilityLevel(GetTriggerUnit(),1093682001,R2I(GetUnitAbilityLevel(GetTriggerUnit(),1093682001)*0.5)+1)
endfunction
function IO101IO takes nothing returns boolean
if GetUnitAbilityLevel(GetKillingUnit(),1093681746)>0 and IsUnitIllusion(GetTriggerUnit())==false then
call IO10IIO()
endif
if GetUnitAbilityLevel(GetTriggerUnit(),1093681746)>0 and IsUnitIllusion(GetTriggerUnit())==false then
call IO1010O()
endif
return false
endfunction
function I0I010 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function IO101IO))
set t=null
endfunction
constant function IO1011O takes nothing returns integer
return 1093682521
endfunction
constant function IO1IOOO takes nothing returns integer
return 1093682760
endfunction
constant function IO1IO0O takes nothing returns integer
return 1093682736
endfunction
constant function IO1IOIO takes nothing returns integer
return 275
endfunction
function IO1IO1O takes nothing returns boolean
return GetSpellAbilityId()==IO1011O()or GetSpellAbilityId()==IO1IOOO()or GetSpellAbilityId()==IO1IO0O()
endfunction
function IO1I0OO takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitAbilityLevel(GetFilterUnit(),1093678162)!=1
endfunction
function IO1I00O takes nothing returns nothing
call UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),O01I,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEATH,WEAPON_TYPE_WHOKNOWS)
endfunction
function IO1I0IO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit O11O1I
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function IO1I0OO)
local real I0IOIO=GetUnitFacing(I1IIIO)
local real x
local real y
if GetSpellAbilityId()==IO1011O()then
set x=GetUnitX(I1IIIO)+200*Cos(I0IOIO*bj_DEGTORAD)
set y=GetUnitY(I1IIIO)+200*Sin(I0IOIO*bj_DEGTORAD)
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656886,x,y,0)
call UnitApplyTimedLife(O11O1I,1112820806,2)
call GroupEnumUnitsInRange(II1O0O,x,y,IO1IOIO(),II1OIO)
set O01I=75*GetUnitAbilityLevel(I1IIIO,GetSpellAbilityId())
call ForGroup(II1O0O,function IO1I00O)
call GroupClear(II1O0O)
endif
if GetSpellAbilityId()==IO1IOOO()then
set x=GetUnitX(I1IIIO)+450*Cos(I0IOIO*bj_DEGTORAD)
set y=GetUnitY(I1IIIO)+450*Sin(I0IOIO*bj_DEGTORAD)
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656886,x,y,0)
call UnitApplyTimedLife(O11O1I,1112820806,2)
call GroupEnumUnitsInRange(II1O0O,x,y,IO1IOIO(),II1OIO)
set O01I=75*GetUnitAbilityLevel(I1IIIO,GetSpellAbilityId())
call ForGroup(II1O0O,function IO1I00O)
call GroupClear(II1O0O)
endif
if GetSpellAbilityId()==IO1IO0O()then
set x=GetUnitX(I1IIIO)+700*Cos(I0IOIO*bj_DEGTORAD)
set y=GetUnitY(I1IIIO)+700*Sin(I0IOIO*bj_DEGTORAD)
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656886,x,y,0)
call UnitApplyTimedLife(O11O1I,1112820806,2)
call GroupEnumUnitsInRange(II1O0O,x,y,IO1IOIO(),II1OIO)
set O01I=75*GetUnitAbilityLevel(I1IIIO,GetSpellAbilityId())
call ForGroup(II1O0O,function IO1I00O)
call GroupClear(II1O0O)
endif
call DestroyGroup(II1O0O)
call DestroyBoolExpr(II1OIO)
endfunction
function I0IIO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(t,function IO1I0IO)
call TriggerAddCondition(t,Condition(function IO1IO1O))
endfunction
function IO1I01O takes nothing returns nothing
if(GetLearnedSkill()==1093682521)then
if(GetUnitAbilityLevelSwapped(1093682521,GetTriggerUnit())==1)then
call UnitAddAbility(GetTriggerUnit(),1093682736)
call UnitAddAbility(GetTriggerUnit(),1093682760)
else
call SetUnitAbilityLevelSwapped(1093682736,GetTriggerUnit(),GetUnitAbilityLevelSwapped(1093682521,GetTriggerUnit()))
call SetUnitAbilityLevelSwapped(1093682760,GetTriggerUnit(),GetUnitAbilityLevelSwapped(1093682521,GetTriggerUnit()))
endif
endif
if(GetLearnedSkill()==1093681746)then
if(GetUnitAbilityLevelSwapped(1093681746,GetTriggerUnit())==1)then
call UnitAddAbility(GetTriggerUnit(),1093682001)
endif
endif
endfunction
function NL takes nothing returns nothing
set I0IOI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I0IOI,EVENT_PLAYER_HERO_SKILL)
call TriggerAddAction(I0IOI,function IO1I01O)
endfunction
function IO1IIOO takes nothing returns boolean
if(not(GetSpellAbilityId()==1093683269))then
return false
endif
return true
endfunction
function IO1II0O takes nothing returns nothing
local integer IO10I1O=GetUnitAbilityLevelSwapped(1093682001,GetTriggerUnit())
local integer IO1IIIO
local integer IIIIIO
local unit OOOIO0=GetTriggerUnit()
local location O000OI=GetUnitLoc(GetTriggerUnit())
local location O0OOI1O
set IO10I1O=IO10I1O/ 2
set IO1IIIO=1
set IIIIIO=IO10I1O
loop
exitwhen IO1IIIO>IIIIIO
set O0OOI1O=I0011O(O000OI,50.00,(I2R(IO1IIIO)*(360/ IO10I1O)))
call CreateNUnitsAtLoc(1,1697656899,GetOwningPlayer(OOOIO0),O000OI,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,1093683271)
call SetUnitAbilityLevelSwapped(1093683271,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093683269,GetTriggerUnit()))
call UnitApplyTimedLifeBJ(2.00,1112820806,bj_lastCreatedUnit)
call IssuePointOrderLoc(bj_lastCreatedUnit,"carrionswarm",O0OOI1O)
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,1097625443)
call RemoveLocation(O0OOI1O)
set IO1IIIO=IO1IIIO+1
endloop
call RemoveLocation(O000OI)
endfunction
function I0II00 takes nothing returns nothing
set I0I0I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I0I0I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(I0I0I,Condition(function IO1IIOO))
call TriggerAddAction(I0I0I,function IO1II0O)
endfunction
function IO1II1O takes nothing returns boolean
if(not(GetSpellAbilityId()==1093683269))then
return false
endif
return true
endfunction
function IO1I1OO takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==true)then
return false
endif
if(GetUnitAbilityLevelSwapped(1093678162,GetFilterUnit())==1)then
return false
endif
if(IsUnitAliveBJ(GetFilterUnit())==false)then
return false
endif
if(GetUnitTypeId(GetFilterUnit())==1865429043)then
return false
endif
if(IsUnitEnemy(GetFilterUnit(),GetTriggerPlayer())==false)then
return false
endif
if(GetTriggerUnit()==GetFilterUnit())then
return false
endif
if(IsUnitVisible(GetFilterUnit(),GetTriggerPlayer())==false)then
return false
endif
return true
endfunction
function IO1I10O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local location O000OI=GetUnitLoc(OOOIO0)
call CreateNUnitsAtLoc(1,1697656899,GetOwningPlayer(OOOIO0),O000OI,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,1093683272)
call SetUnitAbilityLevelSwapped(1093683272,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093683269,GetTriggerUnit()))
call UnitApplyTimedLifeBJ(2.00,1112820806,bj_lastCreatedUnit)
call IssueTargetOrder(bj_lastCreatedUnit,"cripple",GetEnumUnit())
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,1097625443)
call RemoveLocation(O000OI)
endfunction
function IO1I1IO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local location O000OI=GetUnitLoc(OOOIO0)
call CreateNUnitsAtLoc(1,1697656899,GetOwningPlayer(OOOIO0),O000OI,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,1093683272)
call SetUnitAbilityLevelSwapped(1093683274,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093683269,GetTriggerUnit()))
call UnitApplyTimedLifeBJ(2.00,1112820806,bj_lastCreatedUnit)
call IssueTargetOrder(bj_lastCreatedUnit,"cripple",GetEnumUnit())
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,1097625443)
call RemoveLocation(O000OI)
endfunction
function IO1I11O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local location O000OI=GetUnitLoc(OOOIO0)
call CreateNUnitsAtLoc(1,1697656899,GetOwningPlayer(OOOIO0),O000OI,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,1093683272)
call SetUnitAbilityLevelSwapped(1093683273,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093683269,GetTriggerUnit()))
call UnitApplyTimedLifeBJ(2.00,1112820806,bj_lastCreatedUnit)
call IssueTargetOrder(bj_lastCreatedUnit,"cripple",GetEnumUnit())
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,1097625443)
call RemoveLocation(O000OI)
endfunction
function IO11OOO takes nothing returns nothing
local location O000OI=GetUnitLoc(GetTriggerUnit())
local unit OOOIO0=GetTriggerUnit()
local group II1O0O
set II1O0O=I0II0O(700,O000OI,Condition(function IO1I1OO))
call ForGroup(II1O0O,function IO1I10O)
set II1O0O=I0II0O(400,O000OI,Condition(function IO1I1OO))
call ForGroup(II1O0O,function IO1I1IO)
set II1O0O=I0II0O(200,O000OI,Condition(function IO1I1OO))
call ForGroup(II1O0O,function IO1I11O)
call RemoveLocation(O000OI)
call DestroyGroup(II1O0O)
endfunction
function I0III0 takes nothing returns nothing
set I0III=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I0III,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(I0III,Condition(function IO1II1O))
call TriggerAddAction(I0III,function IO11OOO)
endfunction
function IO11O0O takes nothing returns boolean
return GetSpellAbilityId()==1093677640
endfunction
function IO11OIO takes nothing returns nothing
local unit O11O1I
if(OOOI00()==false)then
set O11O1I=CreateUnit(GetOwningPlayer(GetTriggerUnit()),1697656901,GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()),bj_UNIT_FACING)
call UnitAddAbility(O11O1I,1093677650)
call IssueTargetOrder(O11O1I,"slow",GetSpellTargetUnit())
endif
endfunction
function I0I1O0 takes nothing returns nothing
set I0I1I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I0I1I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(I0I1I,Condition(function IO11O0O))
call TriggerAddAction(I0I1I,function IO11OIO)
endfunction
function IO11O1O takes nothing returns boolean
return(GetLearnedSkill()==1093679158 or GetLearnedSkill()==1093679173)and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function IO110OO takes nothing returns nothing
local unit IO1100O=IIO1OO(I011OO(GetTriggeringTrigger()),"NightStalker")
if(IO1100O!=null and OOOI00()and GetUnitState(IO1100O,UNIT_STATE_LIFE)>1)then
call SetUnitAbilityLevel(IO1100O,1395667009,5)
call SetUnitAbilityLevel(IO1100O,1093679171,5)
elseif(IO1100O!=null and OOOI00()==false and GetUnitState(IO1100O,UNIT_STATE_LIFE)>1)then
call SetUnitAbilityLevel(IO1100O,1395667009,GetUnitAbilityLevel(IO1100O,1093679158))
call SetUnitAbilityLevel(IO1100O,1093679171,GetUnitAbilityLevel(IO1100O,1093679173))
endif
endfunction
function IO110IO takes nothing returns nothing
local string I1I0IO=I011OO(GetTriggerUnit())
local trigger t
if(II001O(I1I0IO,"NightStalkerAlreadyLearned")==false)then
call IIOI0O(I1I0IO,"NightStalkerAlreadyLearned",true)
set t=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(t,2.00)
call TriggerRegisterGameStateEventTimeOfDay(t,LESS_THAN,6.00)
call TriggerRegisterGameStateEventTimeOfDay(t,GREATER_THAN,18.00)
call TriggerAddAction(t,function IO110OO)
call IIOOIO(I011OO(t),"NightStalker",GetTriggerUnit())
endif
if(GetLearnedSkill()==1093679158)then
call UnitAddAbility(GetTriggerUnit(),1395667009)
if(OOOI00())then
call SetUnitAbilityLevel(GetTriggerUnit(),1395667009,5)
else
call SetUnitAbilityLevel(GetTriggerUnit(),1395667009,GetUnitAbilityLevel(GetTriggerUnit(),1093679158))
endif
endif
if(GetLearnedSkill()==1093679173)then
call UnitAddAbility(GetTriggerUnit(),1093679171)
if(OOOI00())then
call SetUnitAbilityLevel(GetTriggerUnit(),1093679171,5)
else
call SetUnitAbilityLevel(GetTriggerUnit(),1093679171,GetUnitAbilityLevel(GetTriggerUnit(),1093679173))
endif
endif
endfunction
function I0II10 takes nothing returns nothing
set I01OI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I01OI,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(I01OI,Condition(function IO11O1O))
call TriggerAddAction(I01OI,function IO110IO)
endfunction
function IO1101O takes nothing returns nothing
local unit IO11IOO=IIO1OO(I011OO(GetTriggeringTrigger()),"PhantomAssassin")
local integer O0OI1OO=GetUnitAbilityLevel(IO11IOO,1093677904)
if(GetUnitState(IO11IOO,UNIT_STATE_LIFE)>1)then
if(O0OI1OO==1)then
call SetUnitVertexColorBJ(IO11IOO,100,100,100,40.00)
endif
if(O0OI1OO==2)then
call SetUnitVertexColorBJ(IO11IOO,100,100,100,60.00)
endif
if(O0OI1OO==3)then
call SetUnitVertexColorBJ(IO11IOO,100,100,100,80.00)
endif
if(O0OI1OO==4)then
call SetUnitVertexColorBJ(IO11IOO,100,100,100,98.00)
endif
endif
endfunction
function IO11I0O takes nothing returns boolean
return GetLearnedSkill()==1093677904 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function IO11IIO takes nothing returns nothing
local integer O0OI1OO=GetUnitAbilityLevelSwapped(1093677904,GetTriggerUnit())
local trigger t
local unit IO11IOO=GetTriggerUnit()
if(O0OI1OO==1)then
call SetUnitVertexColorBJ(IO11IOO,100,100,100,40.00)
set t=CreateTrigger()
call TriggerAddAction(t,function IO1101O)
call TriggerRegisterTimerEventPeriodic(t,2.00)
call IIOOIO(I011OO(t),"PhantomAssassin",IO11IOO)
endif
if(O0OI1OO==2)then
call SetUnitVertexColorBJ(IO11IOO,100,100,100,60.00)
endif
if(O0OI1OO==3)then
call SetUnitVertexColorBJ(IO11IOO,100,100,100,80.00)
endif
if(O0OI1OO==4)then
call SetUnitVertexColorBJ(IO11IOO,100,100,100,98.00)
endif
endfunction
function I0I100 takes nothing returns nothing
set I010I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I010I,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(I010I,Condition(function IO11I0O))
call TriggerAddAction(I010I,function IO11IIO)
endfunction
function IO11I1O takes nothing returns nothing
local unit O11O1I
if IsUnitInGroup(GetEnumUnit(),OOO0IO)==false then
call GroupAddUnit(OOO0IO,GetEnumUnit())
set O11O1I=CreateUnit(GetOwningPlayer(OOOO1O),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call UnitAddAbility(O11O1I,1093685833)
call SetUnitAbilityLevel(O11O1I,1093685833,GetUnitAbilityLevel(OOOO1O,1093685825))
call IssueTargetOrder(O11O1I,"ensnare",GetEnumUnit())
endif
set O11O1I=null
endfunction
function IO111OO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer i
local group g=II0OOO(I1I0IO,"g")
local real x=II00IO(I1I0IO,"x")
local real y=II00IO(I1I0IO,"y")
local group IO1110O=CreateGroup()
local unit OOOIO0=IIO1OO(I1I0IO,"UnitVar")
set OOOO1O=OOOIO0
call GroupEnumUnitsInRange(IO1110O,x,y,300,Condition(function OI0I00))
set OOO0IO=g
call ForGroup(IO1110O,function IO11I1O)
call DestroyGroup(IO1110O)
if GetTriggerEvalCount(t)>I0000O*10 then
set i=1
loop
exitwhen i>16
call DestroyEffect(II0O0O(I1I0IO,"Effect"+I2S(i)))
set i=i+1
endloop
call DestroyGroup(g)
call I0110O(I1I0IO)
call I10I1O(t)
endif
set t=null
set g=null
set IO1110O=null
set OOOIO0=null
return false
endfunction
function IO111IO takes nothing returns nothing
local integer i=1
local location l=GetSpellTargetLoc()
local real IO1111O=GetLocationX(l)
local real I0OOOOO=GetLocationY(l)
local real x
local real y
local integer I0OOO0O=16
local string fx="Abilities\\Spells\\Undead\\Graveyard\\GraveMarker.mdl"
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local group g=CreateGroup()
call O00010(GetOwningPlayer(GetTriggerUnit()),I0000O,IO1111O,I0OOOOO,I000IO+500)
call O00O10(I00O0,IO1111O,I0OOOOO)
call TriggerRegisterTimerEvent(t,0.1,true)
call TriggerAddCondition(t,Condition(function IO111OO))
call IIOOIO(I1I0IO,"g",g)
call IIOOIO(I1I0IO,"UnitVar",GetTriggerUnit())
call IIO01O(I1I0IO,"x",IO1111O)
call IIO01O(I1I0IO,"y",I0OOOOO)
loop
exitwhen i>I0OOO0O
set x=IO1111O+I000IO*Cos(i*360/ I0OOO0O*bj_DEGTORAD)
set y=I0OOOOO+I000IO*Sin(i*360/ I0OOO0O*bj_DEGTORAD)
call IIOOIO(I1I0IO,"Effect"+I2S(i),AddSpecialEffect(fx,x,y))
set i=i+1
endloop
set t=null
set g=null
endfunction
function I0OOOIO takes nothing returns boolean
if GetSpellAbilityId()==1093685825 then
call IO111IO()
endif
return false
endfunction
function II10I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I0OOOIO))
set t=null
endfunction
function I0OOO1O takes nothing returns nothing
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl",GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit())))
call SetUnitPosition(GetEnumUnit(),I110I,I11II)
call PanCameraToTimedForPlayer(GetOwningPlayer(GetEnumUnit()),I110I,I11II,0)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl",GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit())))
endfunction
function I0OO0OO takes unit OOI0I0,unit OOI010 returns nothing
local group g=CreateGroup()
call DestroyEffect(AddSpecialEffect("Doodads\\Cinematic\\ShimmeringPortal\\ShimmeringPortal.mdl",GetUnitX(OOI0I0),GetUnitY(OOI0I0)))
call DestroyEffect(AddSpecialEffect("Doodads\\Cinematic\\ShimmeringPortal\\ShimmeringPortal.mdl",GetUnitX(OOI010),GetUnitY(OOI010)))
set I110I=GetUnitX(OOI010)
set I11II=GetUnitY(OOI010)
set OOOO1O=OOI0I0
call GroupEnumUnitsInRange(g,GetUnitX(OOI0I0),GetUnitY(OOI0I0),375,Condition(function OI01I0))
call ForGroup(g,function I0OOO1O)
call DestroyGroup(g)
set g=null
endfunction
function I0OO00O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local unit OOI010=IIO1OO(I1I0IO,"Target")
call DestroyEffect(II0O0O(I1I0IO,"FX"))
if OOI010==null or I1I11O(OOI010)then
call I11I1O(GetOwningPlayer(OOI0I0),"Target unit is not valid or target is dead.")
elseif OOI0I0==null or I1I11O(OOI0I0)then
call I11I1O(GetOwningPlayer(OOI0I0),"Casting hero is not valid or is dead.")
else
call I0OO0OO(OOI0I0,OOI010)
endif
set t=null
set OOI0I0=null
set OOI010=null
return false
endfunction
function I0OO0IO takes unit OOI0I0,unit OOI010 returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,6-GetUnitAbilityLevel(OOI0I0,1093685808),false)
call TriggerAddCondition(t,Condition(function I0OO00O))
call IIOOIO(I1I0IO,"FX",AddSpecialEffectTarget("war3mapImported\\DarkHands.mdl",OOI010,"overhead"))
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIOOIO(I1I0IO,"Target",OOI010)
set t=null
endfunction
function I0OO01O takes nothing returns nothing
local unit OOI010=GetSpellTargetUnit()
local unit I1IIIO=GetTriggerUnit()
if IsUnitAlly(OOI010,GetOwningPlayer(I1IIIO))==false then
call OOO010(I1IIIO)
call I11I1O(GetOwningPlayer(I1IIIO),"Must target allied unit or building.")
elseif GetUnitAbilityLevel(I1IIIO,1093685808)==1 and IsUnitType(OOI010,UNIT_TYPE_STRUCTURE)==false then
call OOO010(I1IIIO)
call I11I1O(GetOwningPlayer(I1IIIO),"Must target allied building.")
elseif GetUnitAbilityLevel(I1IIIO,1093685808)>1 and II00II(OOI010)==false then
call OOO010(I1IIIO)
call I11I1O(GetOwningPlayer(I1IIIO),"Must target allied unit or building.")
else
call I0OO0IO(I1IIIO,OOI010)
endif
set OOI010=null
set I1IIIO=null
endfunction
function I0OOIOO takes nothing returns boolean
if GetSpellAbilityId()==1093685808 then
call I0OO01O()
endif
return false
endfunction
function II10O0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I0OOIOO))
set t=null
endfunction
function I0OOI0O takes nothing returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(OOOO1O),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call UnitAddAbility(O11O1I,1093685834)
call IssueTargetOrder(O11O1I,"thunderbolt",GetEnumUnit())
set O11O1I=null
call OII1O0(OOOO1O,GetEnumUnit(),1,I110I)
endfunction
function I0OOIIO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local real x=II00IO(I1I0IO,"x")
local real y=II00IO(I1I0IO,"y")
local group g=CreateGroup()
local real r1=500
local real r2=400
local unit I0OOI1O
call GroupEnumUnitsInRange(g,x,y,r1,Condition(function OIII00))
set I0OOI1O=FirstOfGroup(g)
call DestroyGroup(g)
if I0OOI1O==null then
if II001O(I1I0IO,"HadChance1")==true and II001O(I1I0IO,"HadChance2")==true then
call DestroyEffect(II0O0O(I1I0IO,"fx"))
call I0110O(I1I0IO)
call I10I1O(t)
else
if II001O(I1I0IO,"HadChance1")==false then
call IIOI0O(I1I0IO,"HadChance1",true)
else
call IIOI0O(I1I0IO,"HadChance2",true)
endif
endif
else
set x=GetUnitX(I0OOI1O)
set y=GetUnitY(I0OOI1O)
call IIOI0O(I1I0IO,"HadChance1",false)
call IIOI0O(I1I0IO,"HadChance2",false)
call I0110O(I011OO(I0OOI1O))
call DestroyEffect(AddSpecialEffect("war3mapImported\\CorpseExplosion.mdx",x,y))
call RemoveUnit(I0OOI1O)
set g=CreateGroup()
set OOOO1O=I1IIIO
call GroupEnumUnitsInRange(g,x,y,r2,Condition(function OI0I00))
set I110I=20*GetUnitAbilityLevel(I1IIIO,1093685588)
call ForGroup(g,function I0OOI0O)
call DestroyGroup(g)
endif
set g=null
set I1IIIO=null
set I0OOI1O=null
set t=null
return false
endfunction
function I0OO1OO takes nothing returns nothing
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function I0OOIIO))
call IIOOIO(I1I0IO,"fx",AddSpecialEffect("Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTarget.mdl",x,y))
call IIOOIO(I1I0IO,"Hero",GetTriggerUnit())
call IIO01O(I1I0IO,"x",x)
call IIO01O(I1I0IO,"y",y)
call IIOI0O(I1I0IO,"HadChance1",false)
call IIOI0O(I1I0IO,"HadChance2",false)
call RemoveLocation(l)
set l=null
set t=null
endfunction
function I0OO10O takes nothing returns boolean
if GetSpellAbilityId()==1093685588 then
call I0OO1OO()
endif
return false
endfunction
function II1000 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I0OO10O))
set t=null
endfunction
function I0OO1IO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093677385)
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656901,x,y,0)
call UnitAddAbility(O11O1I,1093685832)
call SetUnitAbilityLevel(O11O1I,1093685832,IO0O0I)
call IssuePointOrder(O11O1I,"rainoffire",x,y)
call RemoveLocation(l)
set I1IIIO=null
set l=null
set O11O1I=null
endfunction
function I0OO11O takes nothing returns boolean
if GetSpellAbilityId()==1093677385 then
call I0OO1IO()
endif
return false
endfunction
function II1010 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I0OO11O))
set t=null
endfunction
function I0O0OOO takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),1093678667)>0
endfunction
function I0O0O0O takes nothing returns nothing
if(GetIssuedOrderId()==String2OrderIdBJ("immolation"))then
call UnitAddAbility(GetTriggerUnit(),1093681498)
endif
if(GetIssuedOrderId()==String2OrderIdBJ("unimmolation"))then
call UnitRemoveAbility(GetTriggerUnit(),1093681498)
endif
endfunction
function I0I1I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function I0O0OOO))
call TriggerAddAction(t,function I0O0O0O)
endfunction
function I0O0OIO takes nothing returns boolean
return GetUnitAbilityLevel(GetKillingUnit(),1093678660)>0 and IsUnitEnemy(GetKillingUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function I0O0O1O takes nothing returns nothing
if GetUnitTypeId(OI10[GetPlayerId(GetTriggerPlayer())])==1429221446 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,OOIIO,10.00,"You gained"+R2S(II00IO(I011OO(OI10[GetPlayerId(GetTriggerPlayer())]),"FleshHeapTotal"))+"str from Flesh Heap")
endif
endfunction
function I0O00OO takes nothing returns nothing
local string I1I0IO=I011OO(GetKillingUnit())
local real I0O000O=II00IO(I1I0IO,"FleshHeap")
local real I0O00IO=II00IO(I1I0IO,"FleshHeapTotal")
if(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true)then
set I0O000O=I0O000O+0.3*GetUnitAbilityLevel(GetKillingUnit(),1093678660)
set I0O00IO=I0O00IO+0.3*GetUnitAbilityLevel(GetKillingUnit(),1093678660)
else
set I0O000O=I0O000O+0.03*GetUnitAbilityLevel(GetKillingUnit(),1093678660)
set I0O00IO=I0O00IO+0.03*GetUnitAbilityLevel(GetKillingUnit(),1093678660)
endif
if(I0O000O>=1.00)then
set I0O000O=I0O000O-1
if GetUnitState(GetKillingUnit(),UNIT_STATE_LIFE)>1 then
call ModifyHeroStat(0,GetKillingUnit(),0,1)
endif
endif
call IIO01O(I1I0IO,"FleshHeap",I0O000O)
call IIO01O(I1I0IO,"FleshHeapTotal",I0O00IO)
endfunction
function I0I110 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function I0O0OIO))
call TriggerAddAction(t,function I0O00OO)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,III0[1],"-fleshstr",true)
call TriggerRegisterPlayerChatEvent(t,III0[2],"-fleshstr",true)
call TriggerRegisterPlayerChatEvent(t,III0[3],"-fleshstr",true)
call TriggerRegisterPlayerChatEvent(t,III0[4],"-fleshstr",true)
call TriggerRegisterPlayerChatEvent(t,III0[5],"-fleshstr",true)
call TriggerRegisterPlayerChatEvent(t,II10[1],"-fleshstr",true)
call TriggerRegisterPlayerChatEvent(t,II10[2],"-fleshstr",true)
call TriggerRegisterPlayerChatEvent(t,II10[3],"-fleshstr",true)
call TriggerRegisterPlayerChatEvent(t,II10[4],"-fleshstr",true)
call TriggerRegisterPlayerChatEvent(t,II10[5],"-fleshstr",true)
call TriggerRegisterPlayerChatEvent(t,III0[1],"-fs",true)
call TriggerRegisterPlayerChatEvent(t,III0[2],"-fs",true)
call TriggerRegisterPlayerChatEvent(t,III0[3],"-fs",true)
call TriggerRegisterPlayerChatEvent(t,III0[4],"-fs",true)
call TriggerRegisterPlayerChatEvent(t,III0[5],"-fs",true)
call TriggerRegisterPlayerChatEvent(t,II10[1],"-fs",true)
call TriggerRegisterPlayerChatEvent(t,II10[2],"-fs",true)
call TriggerRegisterPlayerChatEvent(t,II10[3],"-fs",true)
call TriggerRegisterPlayerChatEvent(t,II10[4],"-fs",true)
call TriggerRegisterPlayerChatEvent(t,II10[5],"-fs",true)
call TriggerAddAction(t,function I0O0O1O)
endfunction
function I0O001O takes unit OOI0I0,unit OOI010 returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(OOI0I0),1697656901,GetUnitX(OOI010),GetUnitY(OOI010),0)
call UnitAddAbility(O11O1I,1093685338)
call IssueTargetOrder(O11O1I,"thunderbolt",OOI010)
set O11O1I=null
endfunction
function I0O0IOO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer I0O0I0O=II000O(I1I0IO,"LinkNumber")
local boolean I0O0IIO=II001O(I1I0IO,"FoundTarget")
local unit OOI010
local unit I0O0I1O=IIO1OO(I1I0IO,"Link"+I2S(I0O0I0O))
if I0O0IIO then
set OOI010=IIO1OO(I1I0IO,"Target")
call SetUnitX(OOI010,GetUnitX(I0O0I1O))
call SetUnitY(OOI010,GetUnitY(I0O0I1O))
endif
call RemoveUnit(I0O0I1O)
set I0O0I0O=I0O0I0O-1
call IIO00O(I1I0IO,"LinkNumber",I0O0I0O)
if I0O0I0O==0 then
call I0111O(I1I0IO)
call I10I1O(t)
endif
set t=null
set OOI010=null
return false
endfunction
function I0O01OO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local integer I0O0I0O=II000O(I1I0IO,"LinkNumber")
local integer IO0O0I=II000O(I1I0IO,"Level")
local real OO1IOOO=II00IO(I1I0IO,"Angle")
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local trigger I0O010O=IIO11O(I1I0IO,"RetractTrigger")
local string I0O01IO=I011OO(I0O010O)
local group g
local unit u
local real x
local real y
if I0O0I0O<5+6*IO0O0I then
set I0O0I0O=I0O0I0O+1
call IIO00O(I1I0IO,"LinkNumber",I0O0I0O)
set x=GetUnitX(I1IIIO)+I0O0I0O*40*Cos(OO1IOOO*bj_DEGTORAD)
set y=GetUnitY(I1IIIO)+I0O0I0O*40*Sin(OO1IOOO*bj_DEGTORAD)
call IIOOIO(I0O01IO,"Link"+I2S(I0O0I0O),CreateUnit(GetOwningPlayer(I1IIIO),1966092360,x,y,OO1IOOO))
set g=CreateGroup()
call GroupEnumUnitsInRange(g,x,y,125,Condition(function OIIO00))
call GroupRemoveUnit(g,I1IIIO)
set u=GroupPickRandomUnit(g)
call DestroyGroup(g)
if u!=null then
call I0111O(I1I0IO)
call I10I1O(t)
call TriggerRegisterTimerEvent(I0O010O,0.03,true)
call TriggerAddCondition(I0O010O,Condition(function I0O0IOO))
call IIO00O(I0O01IO,"LinkNumber",I0O0I0O)
call IIOI0O(I0O01IO,"FoundTarget",true)
call IIOOIO(I0O01IO,"Target",u)
if IsUnitEnemy(u,GetOwningPlayer(I1IIIO))then
call I0O001O(I1IIIO,u)
call OII1O0(I1IIIO,u,2,100*IO0O0I)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",u,"origin"))
endif
endif
else
call I0111O(I1I0IO)
call I10I1O(t)
call TriggerRegisterTimerEvent(I0O010O,0.03,true)
call TriggerAddCondition(I0O010O,Condition(function I0O0IOO))
call IIO00O(I0O01IO,"LinkNumber",I0O0I0O)
call IIOI0O(I0O01IO,"FoundTarget",false)
endif
set t=null
set I1IIIO=null
set I0O010O=null
set g=null
set u=null
return false
endfunction
function I0O011O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real OO1IOOO=O0O000(GetUnitX(I1IIIO),GetUnitY(I1IIIO),GetLocationX(l),GetLocationY(l))
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093678665)
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIO00O(I1I0IO,"Level",IO0O0I)
call IIO01O(I1I0IO,"Angle",OO1IOOO)
call IIO00O(I1I0IO,"LinkNumber",0)
call IIOOIO(I1I0IO,"RetractTrigger",CreateTrigger())
call TriggerRegisterTimerEvent(t,0.03,true)
call TriggerAddCondition(t,Condition(function I0O01OO))
call RemoveLocation(l)
set I1IIIO=null
set l=null
set t=null
endfunction
function I0OIOOO takes nothing returns boolean
if GetSpellAbilityId()==1093678665 then
call I0O011O()
endif
return false
endfunction
function I01OO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I0OIOOO))
set t=null
endfunction
function I0OIO0O takes nothing returns boolean
if(GetUnitTypeId(GetSummonedUnit())==1865429068)then
return true
endif
if(GetUnitTypeId(GetSummonedUnit())==1865429069)then
return true
endif
if(GetUnitTypeId(GetSummonedUnit())==1865429070)then
return true
endif
if(GetUnitTypeId(GetSummonedUnit())==1865429071)then
return true
endif
return false
endfunction
function I0OIOIO takes nothing returns nothing
call SetUnitAbilityLevelSwapped(1093679188,GetSummonedUnit(),GetUnitAbilityLevelSwapped(1093679428,GetSummoningUnit()))
call SetUnitAbilityLevelSwapped(1093681990,GetSummonedUnit(),GetUnitAbilityLevelSwapped(1093679428,GetSummoningUnit()))
call IssueImmediateOrder(GetSummonedUnit(),"manaflareon")
endfunction
function NW takes nothing returns nothing
set I01II=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I01II,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(I01II,Condition(function I0OIO0O))
call TriggerAddAction(I01II,function I0OIOIO)
endfunction
function I0OIO1O takes nothing returns boolean
return GetLearnedSkill()==1093678146 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function I0OI0OO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656901,GetUnitX(I1IIIO),GetUnitY(I1IIIO),0)
call UnitAddAbility(O11O1I,1093685319)
call IssueTargetOrder(O11O1I,"hex",I1IIIO)
endfunction
function IIII10 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddAction(t,function I0OI0OO)
call TriggerAddCondition(t,Condition(function I0OIO1O))
endfunction
function I0OI00O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local real x=II00IO(I1I0IO,"x")
local real y=II00IO(I1I0IO,"y")
call SetUnitPosition(I1IIIO,x,y)
call SetUnitAnimation(I1IIIO,"morph ALTERNATE")
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set I1IIIO=null
return false
endfunction
function I0OI0IO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093678671)
local location l
local real OO1IOOO
local real x=GetUnitX(I1IIIO)
local real y=GetUnitY(I1IIIO)
local real III11O
local real II1OOO
local real I0OI01O
local real I0OIIOO
local real I0OII0O
local real I0OIIIO
local integer I0OII1O
local unit O11O1I
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
if IO0O0I==1 then
set I0OII1O=1093678901
elseif IO0O0I==2 then
set I0OII1O=1093678896
elseif IO0O0I==3 then
set I0OII1O=1093678682
elseif IO0O0I==4 then
set I0OII1O=1093678903
endif
if GetSpellTargetUnit()!=null then
set l=GetUnitLoc(GetSpellTargetUnit())
else
set l=GetSpellTargetLoc()
endif
set III11O=GetLocationX(l)
set II1OOO=GetLocationY(l)
call RemoveLocation(l)
set OO1IOOO=O0O000(x,y,III11O,II1OOO)
set I0OII0O=x-100*Cos(OO1IOOO*bj_DEGTORAD)
set I0OIIIO=y-100*Sin(OO1IOOO*bj_DEGTORAD)
set I0OI01O=III11O+100*Cos(OO1IOOO*bj_DEGTORAD)
set I0OIIOO=II1OOO+100*Sin(OO1IOOO*bj_DEGTORAD)
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656901,I0OII0O,I0OIIIO,GetUnitFacing(I1IIIO))
call UnitAddAbility(O11O1I,I0OII1O)
call SetUnitAbilityLevel(O11O1I,I0OII1O,R2I(OOI100(x,y,III11O,II1OOO)/ 100))
call IssuePointOrder(O11O1I,"impale",I0OI01O,I0OIIOO)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIO01O(I1I0IO,"x",III11O)
call IIO01O(I1I0IO,"y",II1OOO)
call TriggerRegisterTimerEvent(t,OOI100(x,y,III11O,II1OOO)/ 2000,false)
call TriggerAddCondition(t,Condition(function I0OI00O))
set O11O1I=null
set l=null
set I1IIIO=null
set t=null
endfunction
function I0OI1OO takes nothing returns boolean
if GetSpellAbilityId()==1093678671 then
call I0OI0IO()
endif
return false
endfunction
function I01O00 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I0OI1OO))
set t=null
endfunction
function I0OI10O takes player p,real x,real y,integer IO0O0I,integer I0OI1IO returns nothing
local unit O11O1I=CreateUnit(p,1697656901,x,y,0)
call UnitAddAbility(O11O1I,1093678924)
call SetUnitAbilityLevel(O11O1I,1093678924,IO0O0I)
call IssueImmediateOrder(O11O1I,"thunderclap")
call O011O0(0.03,false,x,y,150+100*I0OI1IO,150+100*I0OI1IO,72,0.03,512)
set O11O1I=null
endfunction
function I0OI11O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local player p=IIO10O(I1I0IO,"p")
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local real O1IIOOO=II00IO(I1I0IO,"LastX")
local real O1IIO0O=II00IO(I1I0IO,"LastY")
local integer IO0O0I=II000O(I1I0IO,"Level")
local integer OO0010O=II000O(I1I0IO,"Iteration")
local integer OII11OO=4+IO0O0I*2
local real x=O1IIOOO
local real y=O1IIO0O
if OO0010O>OII11OO then
call I0111O(I1I0IO)
call I10I1O(t)
else
if I1IIIO!=null and I1I11O(I1IIIO)==false then
set x=GetUnitX(I1IIIO)
set y=GetUnitY(I1IIIO)
endif
call I0OI10O(p,x,y,IO0O0I,OO0010O)
call IIO00O(I1I0IO,"Iteration",OO0010O+1)
call IIO01O(I1I0IO,"LastX",x)
call IIO01O(I1I0IO,"LastY",y)
endif
set t=null
set p=null
set I1IIIO=null
return false
endfunction
function I0O1OOO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local player p=GetOwningPlayer(I1IIIO)
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093678674)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIOOIO(I1I0IO,"p",GetOwningPlayer(I1IIIO))
call IIO01O(I1I0IO,"LastX",GetUnitX(I1IIIO))
call IIO01O(I1I0IO,"LastY",GetUnitY(I1IIIO))
call IIO00O(I1I0IO,"Level",IO0O0I)
call IIO00O(I1I0IO,"Iteration",2)
call TriggerRegisterTimerEvent(t,0.35,true)
call TriggerAddCondition(t,Condition(function I0OI11O))
call I0OI10O(p,GetUnitX(I1IIIO),GetUnitY(I1IIIO),IO0O0I,1)
endfunction
function I0O1O0O takes nothing returns boolean
if GetSpellAbilityId()==1093678674 then
call I0O1OOO()
endif
return false
endfunction
function I01OI0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(t,Condition(function I0O1O0O))
set t=null
endfunction
function I0O1OIO takes nothing returns boolean
if(not(GetSpellAbilityId()==1093683248))then
return false
endif
return true
endfunction
function I0O1O1O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656901,GetUnitX(I1IIIO),GetUnitY(I1IIIO),bj_UNIT_FACING)
call UnitAddAbility(O11O1I,1093683279)
call SetUnitAbilityLevel(O11O1I,1093683279,GetUnitAbilityLevel(I1IIIO,1093683248))
call IssueTargetOrder(O11O1I,"invisibility",I1IIIO)
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set I1IIIO=null
set O11O1I=null
return false
endfunction
function I0O10OO takes nothing returns nothing
local unit I0O100O
local unit I0O10IO=GetTriggerUnit()
local unit array I0O101O
local integer OO10OOO
local trigger t=CreateTrigger()
call I1IO1O(I0O10IO,"Sandstorm")
set I0O100O=CreateUnit(GetOwningPlayer(I0O10IO),1697656913,GetUnitX(I0O10IO),GetUnitY(I0O10IO),bj_UNIT_FACING)
call SetUnitPathing(I0O100O,false)
call SetUnitInvulnerable(I0O100O,true)
call UnitAddAbility(I0O100O,1097625443)
call UnitAddAbility(I0O100O,1093683277)
call SetUnitAbilityLevelSwapped(1093683277,I0O100O,GetUnitAbilityLevelSwapped(1093683248,I0O10IO))
call IssueImmediateOrder(I0O100O,"immolation")
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function I0O1O1O))
call IIOOIO(I011OO(t),"Hero",I0O10IO)
set OO10OOO=1
set I0O101O[OO10OOO]=CreateUnit(GetOwningPlayer(I0O10IO),1697656913,GetUnitX(I0O10IO)+150,GetUnitY(I0O10IO)+150,bj_UNIT_FACING)
call SetUnitTimeScalePercent(I0O101O[OO10OOO],0.00)
call SetUnitPathing(I0O101O[OO10OOO],false)
call SetUnitInvulnerable(I0O101O[OO10OOO],true)
call UnitAddAbility(I0O101O[OO10OOO],1097625443)
set OO10OOO=2
set I0O101O[OO10OOO]=CreateUnit(GetOwningPlayer(I0O10IO),1697656913,GetUnitX(I0O10IO)+150,GetUnitY(I0O10IO)-150,bj_UNIT_FACING)
call SetUnitTimeScalePercent(I0O101O[OO10OOO],0.00)
call SetUnitPathing(I0O101O[OO10OOO],false)
call SetUnitInvulnerable(I0O101O[OO10OOO],true)
call UnitAddAbility(I0O101O[OO10OOO],1097625443)
set OO10OOO=3
set I0O101O[OO10OOO]=CreateUnit(GetOwningPlayer(I0O10IO),1697656913,GetUnitX(I0O10IO)-150,GetUnitY(I0O10IO)+150,bj_UNIT_FACING)
call SetUnitTimeScalePercent(I0O101O[OO10OOO],0.00)
call SetUnitPathing(I0O101O[OO10OOO],false)
call SetUnitInvulnerable(I0O101O[OO10OOO],true)
call UnitAddAbility(I0O101O[OO10OOO],1097625443)
set OO10OOO=4
set I0O101O[OO10OOO]=CreateUnit(GetOwningPlayer(I0O10IO),1697656913,GetUnitX(I0O10IO)-150,GetUnitY(I0O10IO)-150,bj_UNIT_FACING)
call SetUnitTimeScalePercent(I0O101O[OO10OOO],0.00)
call SetUnitPathing(I0O101O[OO10OOO],false)
call SetUnitInvulnerable(I0O101O[OO10OOO],true)
call UnitAddAbility(I0O101O[OO10OOO],1097625443)
call UnitApplyTimedLife(I0O101O[1],1112820806,20*GetUnitAbilityLevel(I0O10IO,1093683248))
call UnitApplyTimedLife(I0O101O[2],1112820806,20*GetUnitAbilityLevel(I0O10IO,1093683248))
call UnitApplyTimedLife(I0O101O[3],1112820806,20*GetUnitAbilityLevel(I0O10IO,1093683248))
call UnitApplyTimedLife(I0O101O[4],1112820806,20*GetUnitAbilityLevel(I0O10IO,1093683248))
set t=null
endfunction
function I01O10 takes nothing returns nothing
set I011I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I011I,EVENT_PLAYER_UNIT_SPELL_CHANNEL)
call TriggerAddCondition(I011I,Condition(function I0O1OIO))
call TriggerAddAction(I011I,function I0O10OO)
endfunction
function I0O1IOO takes nothing returns boolean
if(not(GetSpellAbilityId()==1093683248))then
return false
endif
return true
endfunction
function I0O1I0O takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())==1697656913)
endfunction
function I0O1IIO takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function I0O1I1O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local group g=II0OOO(I1I0IO,"g")
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
if I1IO0O(I1IIIO,"Sandstorm")==false then
call UnitRemoveAbility(I1IIIO,1110455378)
endif
call ForGroup(g,function I0O1IIO)
call DestroyGroup(g)
call I0111O(I1I0IO)
call I10I1O(t)
set t=null
set g=null
set I1IIIO=null
return false
endfunction
function Trig_Sand_Storm_Turn_Off_Func005001002 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())==1429221451)
endfunction
function I0O11OO takes nothing returns nothing
local unit I0O10IO=GetTriggerUnit()
local group II1O0O
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call I1I0OO(I0O10IO,"Sandstorm")
set II1O0O=I0I1OO(GetOwningPlayer(I0O10IO),Condition(function I0O1I0O))
call IIOOIO(I1I0IO,"g",II1O0O)
call IIOOIO(I1I0IO,"Hero",I0O10IO)
call TriggerRegisterTimerEvent(t,GetUnitAbilityLevel(I0O10IO,1093683248)*0.3,false)
call TriggerAddCondition(t,Condition(function I0O1I1O))
set t=null
set I0O10IO=null
set II1O0O=null
endfunction
function I010O0 takes nothing returns nothing
set IIOOI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IIOOI,EVENT_PLAYER_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(IIOOI,Condition(function I0O1IOO))
call TriggerAddAction(IIOOI,function I0O11OO)
endfunction
function I0O110O takes nothing returns boolean
if(not(GetSpellAbilityId()==1093677399))then
return false
endif
return true
endfunction
function I0O11IO takes nothing returns nothing
local location O000OI=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,1697656901,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,1093684537)
call SetUnitAbilityLevel(bj_lastCreatedUnit,1093684537,GetUnitAbilityLevel(GetTriggerUnit(),1093677399))
call IssueImmediateOrder(bj_lastCreatedUnit,"thunderclap")
call RemoveLocation(O000OI)
endfunction
function I01000 takes nothing returns nothing
set IIO0I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IIO0I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(IIO0I,Condition(function I0O110O))
call TriggerAddAction(IIO0I,function I0O11IO)
endfunction
function I0O111O takes nothing returns integer
return 1093683287
endfunction
function I00OOOO takes nothing returns integer
return 1093683506
endfunction
function I00OO0O takes nothing returns integer
return 1093683289
endfunction
function I00OOIO takes nothing returns integer
return 1110455351
endfunction
function I00OO1O takes nothing returns integer
return 1747988530
endfunction
function I00O0OO takes nothing returns integer
return 1747988531
endfunction
function I00O00O takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local unit OOOIO0=IIO1OO(I1I0IO,"UnitVar")
local unit I011IO=IIO1OO(I1I0IO,"Owner")
local unit O11O1I
local real O0IOI1O=II00IO(I1I0IO,"Duration")
local integer IO0O0I=GetUnitAbilityLevel(I011IO,I0O111O())
local real I00O0IO=II00IO(I1I0IO,"x")
local real I00O01O=II00IO(I1I0IO,"y")
local real O0IOO0=GetUnitX(OOOIO0)
local real O0IO00=GetUnitY(OOOIO0)
if(O0IOO0-I00O0IO)*(O0IOO0-I00O0IO)+(O0IO00-I00O01O)*(O0IO00-I00O01O)>900 then
set O11O1I=CreateUnit(GetOwningPlayer(I011IO),I00OO1O(),GetUnitX(OOOIO0),GetUnitY(OOOIO0),0)
call SetUnitAbilityLevel(O11O1I,I00OOOO(),IO0O0I)
call SetUnitAbilityLevel(O11O1I,I00OO0O(),IO0O0I)
call UnitApplyTimedLife(O11O1I,1112820806,7)
call IIO01O(I1I0IO,"x",O0IOO0)
call IIO01O(I1I0IO,"y",O0IO00)
endif
set O0IOI1O=O0IOI1O+0.2
call IIO01O(I1I0IO,"Duration",O0IOI1O)
if O0IOI1O>7 or GetUnitState(OOOIO0,UNIT_STATE_LIFE)<1 then
call PauseTimer(t)
call I0110O(I1I0IO)
endif
endfunction
function I00OIOO takes nothing returns nothing
local unit OOI010=GetEnumUnit()
local sound I11IIO
local timer t
local string I1I0IO
call UnitDamageTarget(O00I,OOI010,O01I,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call GroupAddUnit(IO1I,OOI010)
if IsUnitType(OOI010,UNIT_TYPE_HERO)==true then
set t=CreateTimer()
set I1I0IO=I011OO(t)
set I11IIO=CreateSound("Sounds\\Spectral Dagger.mp3",false,true,true,10,10,"DefaultEAXON")
call SetSoundPosition(I11IIO,GetUnitX(OOI010),GetUnitY(OOI010),0)
call SetSoundDistanceCutoff(I11IIO,700)
call StartSound(I11IIO)
call KillSoundWhenDone(I11IIO)
call IIOOIO(I1I0IO,"UnitVar",OOI010)
call IIOOIO(I1I0IO,"Owner",O00I)
call IIO01O(I1I0IO,"x",GetUnitX(OOI010))
call IIO01O(I1I0IO,"y",GetUnitY(OOI010))
call TimerStart(t,0.2,true,function I00O00O)
endif
endfunction
function I00OI0O takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(O00I))and IsUnitInGroup(GetFilterUnit(),IO1I)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false
endfunction
function I00OIIO takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local group O1100I=II0OOO(I1I0IO,"AlreadyDamaged")
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function I00OI0O)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local unit O00100=IIO1OO(I1I0IO,"Projectile")
local unit OOI010=IIO1OO(I1I0IO,"Target")
local real III11O=GetUnitX(OOI010)
local real II1OOO=GetUnitY(OOI010)
local real OOII00=GetUnitX(O00100)
local real OOIII0=GetUnitY(O00100)
local real OO1IOOO=Atan2(II1OOO-OOIII0,III11O-OOII00)
local real O0IOO0=OOO100(GetUnitX(O00100)+30*Cos(OO1IOOO))
local real O0IO00=OOO110(GetUnitY(O00100)+30*Sin(OO1IOOO))
local unit O11O1I
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,I0O111O())
if II001O(I1I0IO,"TrailNext")then
call IIOI0O(I1I0IO,"TrailNext",false)
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),I00OO1O(),OOII00,OOIII0,0)
call SetUnitAbilityLevel(O11O1I,I00OOOO(),IO0O0I)
call SetUnitAbilityLevel(O11O1I,I00OO0O(),IO0O0I)
call UnitApplyTimedLife(O11O1I,1112820806,12)
else
call IIOI0O(I1I0IO,"TrailNext",true)
endif
call SetUnitX(O00100,O0IOO0)
call SetUnitY(O00100,O0IO00)
call SetUnitFacing(O00100,OO1IOOO*bj_RADTODEG)
set IO1I=O1100I
set O00I=I1IIIO
set O01I=50*GetUnitAbilityLevel(I1IIIO,I0O111O())
call GroupEnumUnitsInRange(II1O0O,O0IOO0,O0IO00,150,II1OIO)
call ForGroup(II1O0O,function I00OIOO)
call DestroyGroup(II1O0O)
call DestroyBoolExpr(II1OIO)
if(O0IOO0-III11O)*(O0IOO0-III11O)+(O0IO00-II1OOO)*(O0IO00-II1OOO)<1600 then
call PauseTimer(t)
call I0110O(I1I0IO)
call KillUnit(O00100)
call DestroyGroup(O1100I)
endif
endfunction
function I00OI1O takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local group O1100I=II0OOO(I1I0IO,"AlreadyDamaged")
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function I00OI0O)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local unit O00100=IIO1OO(I1I0IO,"Projectile")
local real III11O=II00IO(I1I0IO,"TargetX")
local real II1OOO=II00IO(I1I0IO,"TargetY")
local real OOII00=GetUnitX(O00100)
local real OOIII0=GetUnitY(O00100)
local real OO1IOOO=II00IO(I1I0IO,"Angle")
local real O0IOO0=OOO100(GetUnitX(O00100)+30*Cos(OO1IOOO))
local real O0IO00=OOO110(GetUnitY(O00100)+30*Sin(OO1IOOO))
local unit O11O1I
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,I0O111O())
if II001O(I1I0IO,"TrailNext")then
call IIOI0O(I1I0IO,"TrailNext",false)
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),I00OO1O(),OOII00,OOIII0,0)
call SetUnitAbilityLevel(O11O1I,I00OOOO(),IO0O0I)
call SetUnitAbilityLevel(O11O1I,I00OO0O(),IO0O0I)
call UnitApplyTimedLife(O11O1I,1112820806,12)
else
call IIOI0O(I1I0IO,"TrailNext",true)
endif
call SetUnitX(O00100,O0IOO0)
call SetUnitY(O00100,O0IO00)
set IO1I=O1100I
set O00I=I1IIIO
set O01I=50*GetUnitAbilityLevel(I1IIIO,I0O111O())
call GroupEnumUnitsInRange(II1O0O,O0IOO0,O0IO00,150,II1OIO)
call ForGroup(II1O0O,function I00OIOO)
call DestroyGroup(II1O0O)
call DestroyBoolExpr(II1OIO)
if(O0IOO0-III11O)*(O0IOO0-III11O)+(O0IO00-II1OOO)*(O0IO00-II1OOO)<1600 then
call PauseTimer(t)
call I0110O(I1I0IO)
call KillUnit(O00100)
call DestroyGroup(O1100I)
endif
endfunction
function I00O1OO takes unit OOOIO0,integer OO0IO0 returns boolean
if(GetItemTypeId(UnitItemInSlot(OOOIO0,OO0IO0))==1886613604)then
return true
endif
if(GetItemTypeId(UnitItemInSlot(OOOIO0,OO0IO0))==1868983399)then
return true
endif
return false
endfunction
function I00O10O takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local real O0IOI1O=II00IO(I1I0IO,"Duration")
local integer IIII0O=0
loop
exitwhen IIII0O>5
if I00O1OO(I1IIIO,IIII0O)then
if GetUnitAbilityLevel(I1IIIO,I00OOIO())==0 then
call SetItemDropOnDeath(UnitItemInSlot(I1IIIO,IIII0O),true)
if GetItemTypeId(UnitItemInSlot(I1IIIO,IIII0O))==1868983399 then
call SetItemDroppable(UnitItemInSlot(I1IIIO,IIII0O),true)
endif
else
call SetItemDropOnDeath(UnitItemInSlot(I1IIIO,IIII0O),false)
if GetItemTypeId(UnitItemInSlot(I1IIIO,IIII0O))==1868983399 then
call SetItemDroppable(UnitItemInSlot(I1IIIO,IIII0O),false)
endif
endif
endif
set IIII0O=IIII0O+1
endloop
set O0IOI1O=O0IOI1O+0.2
call IIO01O(I1I0IO,"Duration",O0IOI1O)
if GetUnitAbilityLevel(I1IIIO,I00OOIO())==0 then
call SetUnitPathing(I1IIIO,true)
else
call SetUnitPathing(I1IIIO,false)
endif
if O0IOI1O>20 then
call PauseTimer(t)
call I0110O(I1I0IO)
call SetUnitPathing(I1IIIO,true)
set IIII0O=0
loop
exitwhen IIII0O>5
if I00O1OO(I1IIIO,IIII0O)then
call SetItemDropOnDeath(UnitItemInSlot(I1IIIO,IIII0O),true)
if GetItemTypeId(UnitItemInSlot(I1IIIO,IIII0O))==1868983399 then
call SetItemDroppable(UnitItemInSlot(I1IIIO,IIII0O),true)
endif
endif
set IIII0O=IIII0O+1
endloop
endif
endfunction
function I00O1IO takes nothing returns boolean
return GetSpellAbilityId()==I0O111O()
endfunction
function I00O11O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local real OOII00=OOO100(GetUnitX(I1IIIO))
local real OOIII0=OOO110(GetUnitY(I1IIIO))
local unit O00100=CreateUnit(GetOwningPlayer(I1IIIO),I00O0OO(),OOII00,OOIII0,0)
local timer t=CreateTimer()
local string I1I0IO=I011OO(t)
local group O1100I=CreateGroup()
local location O0O1IIO
local real OO1IOOO
local real III11O
local real II1OOO
call SetUnitPathing(O00100,false)
call IIOOIO(I1I0IO,"AlreadyDamaged",O1100I)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIOOIO(I1I0IO,"Projectile",O00100)
if OOI010!=null then
call IIOOIO(I1I0IO,"Target",OOI010)
call TimerStart(t,0.035,true,function I00OIIO)
else
set O0O1IIO=GetSpellTargetLoc()
set III11O=GetLocationX(O0O1IIO)
set II1OOO=GetLocationY(O0O1IIO)
set OO1IOOO=Atan2(II1OOO-OOIII0,III11O-OOII00)
call SetUnitFacing(O00100,OO1IOOO*bj_RADTODEG)
set III11O=OOO100(OOII00+2100*Cos(OO1IOOO))
set II1OOO=OOO110(OOIII0+2100*Sin(OO1IOOO))
call IIO01O(I1I0IO,"TargetX",III11O)
call IIO01O(I1I0IO,"TargetY",II1OOO)
call IIO01O(I1I0IO,"Angle",OO1IOOO)
call TimerStart(t,0.035,true,function I00OI1O)
endif
set t=CreateTimer()
set I1I0IO=I011OO(t)
call SetUnitPathing(I1IIIO,false)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call TimerStart(t,3+0.2,true,function I00O10O)
endfunction
function IIO100 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I00O1IO))
call TriggerAddAction(t,function I00O11O)
call CreateSound("Sounds\\Spectral Dagger.mp3",false,false,false,10,10,"DefaultEAXON")
call OO0OO0(I00OOOO())
call OO0OO0(I00OO0O())
endfunction
constant function I000OOO takes nothing returns integer
return 1093682776
endfunction
function I000O0O takes nothing returns boolean
return IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true and GetUnitAbilityLevel(GetAttacker(),I000OOO())>0
endfunction
function I000OIO takes nothing returns boolean
return IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false
endfunction
function I000O1O takes nothing returns nothing
local unit IOO1OI=GetAttacker()
local unit O0O0O1O=GetTriggerUnit()
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function I000OIO)
local string I1I0IO
call GroupEnumUnitsInRange(II1O0O,GetUnitX(O0O0O1O),GetUnitY(O0O0O1O),400,II1OIO)
call GroupRemoveUnit(II1O0O,O0O0O1O)
if FirstOfGroup(II1O0O)==null then
set I1I0IO=I011OO(IOO1OI)
if I1IO0O(IOO1OI,"Desolate")==false then
call UnitDamageTarget(IOO1OI,O0O0O1O,5+10*GetUnitAbilityLevel(IOO1OI,I000OOO()),true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_DIVINE,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl",O0O0O1O,"overhead"))
call I1I01O(IOO1OI,"Desolate",0.3)
endif
endif
call DestroyGroup(II1O0O)
call DestroyBoolExpr(II1OIO)
endfunction
function IIO1I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function I000O0O))
call TriggerAddAction(t,function I000O1O)
endfunction
constant function I0000OO takes nothing returns integer
return 1093684801
endfunction
constant function I00000O takes nothing returns integer
return 1093684814
endfunction
function I0000IO takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function I00001O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetEnumUnit()
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656901,GetUnitX(I1IIIO),GetUnitY(I1IIIO),0)
local real OOIO00=O01I
call UnitAddAbility(O11O1I,I00000O())
call IssueTargetOrder(O11O1I,"thunderbolt",OOI010)
call UnitDamageTarget(I1IIIO,OOI010,OOIO00,true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endfunction
function I000IOO takes nothing returns boolean
return GetRandomReal(0,10)<GetUnitAbilityLevel(GetTriggerUnit(),I0000OO())*.4 and GetEventDamage()>5 and GetUnitTypeId(GetEventDamageSource())!=1852206952 and GetUnitTypeId(GetEventDamageSource())!=1852073580
endfunction
function I000I0O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit O11O1I
local group II1O0O=CreateGroup()
local real OOIO00=GetEventDamage()
local boolexpr II1OIO=Condition(function I0000IO)
local real OOI0O0=GetUnitState(I1IIIO,UNIT_STATE_LIFE)
set O01I=OO0100(OOIO00,OOI0O0)
call OOIOI0(I1IIIO,OOIO00)
call GroupEnumUnitsInRange(II1O0O,GetUnitX(I1IIIO),GetUnitY(I1IIIO),400,II1OIO)
call ForGroup(II1O0O,function I00001O)
call DestroyGroup(II1O0O)
call DestroyBoolExpr(II1OIO)
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697657169,GetUnitX(I1IIIO),GetUnitY(I1IIIO),0)
call SetUnitPathing(O11O1I,false)
call SetUnitInvulnerable(O11O1I,true)
call SetUnitAnimation(O11O1I,"Death")
call OIOIO0(O11O1I,2)
endfunction
function I000IIO takes nothing returns boolean
return GetLearnedSkill()==I0000OO()and GetUnitAbilityLevel(GetTriggerUnit(),I0000OO())==1 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function I000I1O takes nothing returns nothing
local trigger t=CreateTrigger()
local unit I1IIIO=GetTriggerUnit()
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function I000IOO))
call TriggerAddAction(t,function I000I0O)
endfunction
function IIO110 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function I000IIO))
call TriggerAddAction(t,function I000I1O)
endfunction
constant function I0001OO takes nothing returns integer
return 1093683257
endfunction
constant function I00010O takes nothing returns integer
return 1093684793
endfunction
constant function I0001IO takes nothing returns integer
return 1110455884
endfunction
constant function I00011O takes nothing returns integer
return 1093683265
endfunction
function I00IOOO takes nothing returns boolean
return GetSpellAbilityId()==I0001OO()
endfunction
function I00IO0O takes nothing returns nothing
local unit OOI010=GetEnumUnit()
local unit I1IIIO=GetTriggerUnit()
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697656901,GetUnitX(OOI010),GetUnitY(OOI010),0)
call IIOOIO(I011OO(O11O1I),"HauntTarget",OOI010)
call UnitAddAbility(O11O1I,I00010O())
call SetUnitAbilityLevel(O11O1I,I00010O(),GetUnitAbilityLevel(I1IIIO,I0001OO()))
call IssueTargetOrderById(O11O1I,852274,I1IIIO)
endfunction
function I00IOIO takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function I00IO1O takes nothing returns nothing
local string I1I0IO=I011OO(GetTriggeringTrigger())
local unit O11IIIO=IIO1OO(I1I0IO,"HauntImage")
local unit OOI010=IIO1OO(I1I0IO,"HauntTarget")
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call DisableTrigger(GetTriggeringTrigger())
call I0110O(I011OO(GetTriggeringTrigger()))
if OOI010==GetTriggerUnit()then
call KillUnit(O11IIIO)
endif
elseif IsUnitPaused(O11IIIO)==false then
call DisableTrigger(GetTriggeringTrigger())
call IssueTargetOrder(O11IIIO,"attack",OOI010)
call EnableTrigger(GetTriggeringTrigger())
endif
endfunction
function I00I0OO takes nothing returns boolean
return GetUnitAbilityLevel(GetSummonedUnit(),I0001IO())>0
endfunction
function I00I00O takes nothing returns nothing
local unit O11O1I=GetSummoningUnit()
local unit O11IIIO=GetSummonedUnit()
local unit OOI010=IIO1OO(I011OO(O11O1I),"HauntTarget")
local trigger t=CreateTrigger()
call IIOOIO(I011OO(OI10[GetPlayerId(GetOwningPlayer(O11O1I))]),"HauntTarget"+I011OO(O11IIIO),OOI010)
call SetUnitPathing(O11IIIO,false)
call SetUnitMoveSpeed(O11IIIO,400)
call SetUnitX(O11IIIO,GetUnitX(OOI010))
call SetUnitY(O11IIIO,GetUnitY(OOI010))
call IssueTargetOrder(O11IIIO,"attack",OOI010)
call TriggerRegisterUnitEvent(t,O11IIIO,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterUnitEvent(t,O11IIIO,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(t,O11IIIO,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,0.5,true)
call TriggerAddAction(t,function I00IO1O)
call IIOOIO(I011OO(t),"HauntTarget",OOI010)
call IIOOIO(I011OO(t),"HauntImage",O11IIIO)
call I0110O(I011OO(O11O1I))
endfunction
function I00I0IO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function I00IOIO)
local sound I11IIO
call GroupEnumUnitsInRect(II1O0O,bj_mapInitialPlayableArea,II1OIO)
call ForGroup(II1O0O,function I00IO0O)
if FirstOfGroup(II1O0O)!=null then
set I11IIO=CreateSound("Abilities\\Spells\\Other\\ANsa\\SacrificeUnit.wav",false,false,false,10,10,"DefaultEAXON")
call StartSound(I11IIO)
call KillSoundWhenDone(I11IIO)
endif
call DestroyBoolExpr(II1OIO)
call DestroyGroup(II1O0O)
endfunction
function I00I01O takes nothing returns boolean
return GetLearnedSkill()==I0001OO()and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),I0001OO())==1
endfunction
function I00IIOO takes nothing returns nothing
call UnitAddAbility(GetTriggerUnit(),I00011O())
endfunction
function II0OO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I00IOOO))
call TriggerAddAction(t,function I00I0IO)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(t,Condition(function I00I0OO))
call TriggerAddAction(t,function I00I00O)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function I00I01O))
call TriggerAddAction(t,function I00IIOO)
call CreateSound("Abilities\\Spells\\Other\\ANsa\\SacrificeUnit.wav",false,false,false,10,10,"DefaultEAXON")
call OO0OO0(I00010O())
endfunction
constant function I00II0O takes nothing returns integer
return 1093683265
endfunction
constant function I00IIIO takes nothing returns integer
return 1110455884
endfunction
function I00II1O takes nothing returns boolean
return GetSpellAbilityId()==I00II0O()
endfunction
function I00I1OO takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),I00IIIO())>0
endfunction
function I00I10O takes nothing returns nothing
local unit OOOIO0
local real OOIIO0=OOI1O0(GetEnumUnit(),GetSpellTargetLoc())
if OOIIO0<O01I then
set O00I=GetEnumUnit()
set O01I=OOIIO0
endif
endfunction
function I00I1IO takes nothing returns unit
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function I00I1OO)
set O00I=null
set O01I=9999999
call GroupEnumUnitsOfPlayer(II1O0O,GetOwningPlayer(GetTriggerUnit()),II1OIO)
call ForGroup(II1O0O,function I00I10O)
call DestroyBoolExpr(II1OIO)
call DestroyGroup(II1O0O)
return O00I
endfunction
function I00I11O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=I00I1IO()
local unit I001OOO=IIO1OO(I011OO(I1IIIO),"HauntTarget"+I011OO(OOI010))
local real III11O
local real II1OOO
if OOI010==null then
call I11I1O(GetOwningPlayer(I1IIIO),"Cannot find any of your Haunting illusions")
else
set III11O=GetUnitX(OOI010)
set II1OOO=GetUnitY(OOI010)
call KillUnit(OOI010)
call SetUnitX(I1IIIO,III11O)
call SetUnitY(I1IIIO,II1OOO)
call PanCameraToTimedForPlayer(GetOwningPlayer(I1IIIO),III11O,II1OOO,0)
call IssueTargetOrder(I1IIIO,"attack",I001OOO)
endif
endfunction
function Reality_CheckValid takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=I00I1IO()
if OOI010==null then
call OOO010(I1IIIO)
call I11I1O(GetOwningPlayer(I1IIIO),"Cannot find any of your Haunting illusions")
endif
endfunction
function II0O00 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I00II1O))
call TriggerAddAction(t,function I00I11O)
endfunction
function I001O0O takes nothing returns boolean
return GetUnitAbilityLevel(GetAttacker(),1093682515)>0 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))and I1IO0O(GetAttacker(),"EmpoweringHaste")==false
endfunction
function I001OIO takes nothing returns nothing
local unit IOO1OI=GetAttacker()
local unit O0O0O1O=GetTriggerUnit()
local real OOIO00=GetUnitMoveSpeed(IOO1OI)*0.04*GetUnitAbilityLevel(IOO1OI,1093682515)
call I1I01O(IOO1OI,"EmpoweringHaste",0.3)
call OII1O0(IOO1OI,O0O0O1O,2,OOIO00)
set IOO1OI=null
set O0O0O1O=null
endfunction
function I01010 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function I001O0O))
call TriggerAddAction(t,function I001OIO)
endfunction
function I001O1O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
local real OO1IOOO=II00IO(I1I0IO,"Angle")
local real x=GetUnitX(OOI010)
local real y=GetUnitY(OOI010)
local integer OO1100=GetTriggerEvalCount(t)
local real I0010OO=II00IO(I1I0IO,"Rate")
local integer IOIO00O=II000O(I1I0IO,"MaxCount")
if OO1100>35 then
call IIO01O(I1I0IO,"Rate",I0010OO*0.98)
endif
if GetTriggerEventId()==EVENT_UNIT_DEATH or OO1100>IOIO00O then
call I0111O(I1I0IO)
call I10I1O(t)
else
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl",x,y))
call O00O00(x,y,150)
call SetUnitPosition(OOI010,x+I0010OO*Cos(OO1IOOO),y+I0010OO*Sin(OO1IOOO))
endif
set t=null
set OOI010=null
return false
endfunction
function I00100O takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=GetAttacker()
local unit OOI010=GetTriggerUnit()
local real OO1IOOO=Atan2(GetUnitY(OOI010)-GetUnitY(OOI0I0),GetUnitX(OOI010)-GetUnitX(OOI0I0))
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,1093682997)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl",OOI0I0,"weapon"))
call IIOOIO(I1I0IO,"Target",OOI010)
call IIO01O(I1I0IO,"Angle",OO1IOOO)
call IIO01O(I1I0IO,"Rate",2)
call IIO00O(I1I0IO,"MaxCount",75+20*IO0O0I)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,0.01,true)
call TriggerAddCondition(t,Condition(function I001O1O))
call OII1O0(OOI0I0,OOI010,1,25*IO0O0I)
call I1I01O(OOI0I0,"I00100O",1.5)
set t=null
set OOI0I0=null
set OOI010=null
endfunction
function I0010IO takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),1093682997)>0 and IsUnitIllusion(GetAttacker())==false and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitTypeId(GetTriggerUnit())!=1848651852 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))and GetRandomInt(1,100)<=17 and I1IO0O(GetAttacker(),"I00100O")==false then
call I00100O()
endif
return false
endfunction
function I01IO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function I0010IO))
set t=null
endfunction
function I00101O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local unit OOI010=IIO1OO(I1I0IO,"Target")
local unit O11O1I=IIO1OO(I1I0IO,"Caster")
local integer IO0O0I=II000O(I1I0IO,"Level")
local integer OO1100=GetTriggerEvalCount(t)
local integer OO0010O
local integer I0OII1O
if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_POINT_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER then
call I0111O(I1I0IO)
call I10I1O(t)
call RemoveUnit(O11O1I)
call UnitRemoveAbility(OOI010,1110454617)
call UnitShareVision(OOI010,GetOwningPlayer(OOI0I0),false)
call SetUnitPathing(OOI0I0,true)
call SetUnitVertexColor(OOI0I0,255,255,255,255)
elseif GetTriggerEventId()==EVENT_UNIT_ATTACKED then
if GetAttacker()==OOI0I0 then
call I0111O(I1I0IO)
call I10I1O(t)
call SetUnitX(O11O1I,GetUnitX(OOI010))
call SetUnitY(O11O1I,GetUnitY(OOI010))
call UnitAddAbility(O11O1I,1093683027)
call SetUnitAbilityLevel(O11O1I,1093683027,IO0O0I)
call IssueTargetOrder(O11O1I,"thunderbolt",OOI010)
call RemoveUnit(O11O1I)
call UnitRemoveAbility(OOI010,1110454617)
call UnitShareVision(OOI010,GetOwningPlayer(OOI0I0),false)
call SetUnitPathing(OOI0I0,true)
call SetUnitVertexColor(OOI0I0,255,255,255,255)
endif
else
call DisableTrigger(t)
call IssueTargetOrder(OOI0I0,"attack",OOI010)
call EnableTrigger(t)
set OO0010O=II000O(I1I0IO,"Iteration")
set OO0010O=OO0010O+1
call IIO00O(I1I0IO,"Iteration",OO0010O)
call SetUnitVertexColor(OOI0I0,255,255,255,255*(100-(IO0O0I*OO0010O))/ 100)
if ModuloInteger(OO0010O,4)==0 then
set I0OII1O=II000O(I1I0IO,"CasterAbility")
call SetUnitAbilityLevel(O11O1I,I0OII1O,GetUnitAbilityLevel(O11O1I,I0OII1O)+1)
endif
endif
set t=null
set OOI0I0=null
set OOI010=null
set O11O1I=null
return false
endfunction
function I001IOO takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,1093684556)
local unit O11O1I=CreateUnit(GetOwningPlayer(OOI0I0),1697656899,GetUnitX(OOI0I0),GetUnitY(OOI0I0),0)
local integer I0OII1O
call UnitShareVision(OOI010,GetOwningPlayer(OOI0I0),true)
if IO0O0I==1 then
set I0OII1O=1093683013
elseif IO0O0I==2 then
set I0OII1O=1093683014
elseif IO0O0I==3 then
set I0OII1O=1093683015
else
set I0OII1O=1093683016
endif
call IIOOIO(I011OO(GetOwningPlayer(OOI0I0)),"ChargeUnit",O11O1I)
call UnitAddAbility(O11O1I,1097625443)
call UnitAddAbility(O11O1I,I0OII1O)
call UnitAddAbility(O11O1I,1093683018)
call IssueTargetOrder(O11O1I,"faeriefire",OOI010)
call IssueTargetOrder(OOI0I0,"attack",OOI010)
call SetUnitPathing(OOI0I0,false)
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIOOIO(I1I0IO,"Caster",O11O1I)
call IIO00O(I1I0IO,"Level",IO0O0I)
call IIO00O(I1I0IO,"CasterAbility",I0OII1O)
call IIO00O(I1I0IO,"Iteration",0)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(t,OOI0I0,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,OOI0I0,EVENT_UNIT_ISSUED_ORDER)
call TriggerRegisterUnitEvent(t,OOI0I0,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(t,OOI0I0,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(t,Condition(function I00101O))
set t=null
set OOI0I0=null
set OOI010=null
set O11O1I=null
endfunction
function I001I0O takes nothing returns boolean
if GetSpellAbilityId()==1093684556 then
call I001IOO()
endif
return false
endfunction
function I010I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I001I0O))
set t=null
endfunction
function I001IIO takes unit OOI0I0,unit OOI010 returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local real OO1IOOO=Atan2(GetUnitY(OOI010)-GetUnitY(OOI0I0),GetUnitX(OOI010)-GetUnitX(OOI0I0))
local integer IO0O0I=4
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl",OOI0I0,"weapon"))
call IIOOIO(I1I0IO,"Target",OOI010)
call IIO01O(I1I0IO,"Angle",OO1IOOO)
call IIO01O(I1I0IO,"Rate",2)
call IIO00O(I1I0IO,"MaxCount",75+20*IO0O0I)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(t,0.01,true)
call TriggerAddCondition(t,Condition(function I001O1O))
call OII1O0(OOI0I0,OOI010,1,25*IO0O0I)
set t=null
endfunction
function I001I1O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local unit OOI010
local integer OO1100=GetTriggerEvalCount(t)
local integer I0011OO
local integer IO0O0I
local real OO1IOOO
if GetTriggerEventId()==EVENT_UNIT_DEATH or OO1100==200 then
call SetUnitVertexColor(OOI0I0,255,255,255,255)
set OOI010=IIO1OO(I1I0IO,"Target")
call UnitShareVision(OOI010,GetOwningPlayer(OOI0I0),false)
call I0111O(I1I0IO)
call I10I1O(t)
else
if OO1100<100 then
set I0011OO=OO1100
else
set I0011OO=200-OO1100
endif
call SetUnitVertexColor(OOI0I0,255,255,255,255*(100-I0011OO)/ 100)
if OO1100==100 then
set OOI010=IIO1OO(I1I0IO,"Target")
set IO0O0I=II000O(I1I0IO,"Level")
set OO1IOOO=Atan2(GetUnitY(OOI010)-GetUnitY(OOI0I0),GetUnitX(OOI010)-GetUnitX(OOI0I0))
call SetUnitPosition(OOI0I0,GetUnitX(OOI010)+80*Cos(OO1IOOO),GetUnitY(OOI010)+80*Sin(OO1IOOO))
call SetUnitAnimation(OOI0I0,"attack")
call IssueTargetOrder(OOI0I0,"attack",OOI010)
call OII1O0(OOI0I0,OOI010,1,100*IO0O0I)
call I001IIO(OOI0I0,OOI010)
endif
endif
set t=null
set OOI0I0=null
set OOI010=null
return false
endfunction
function I00110O takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,1093682996)
call UnitShareVision(OOI010,GetOwningPlayer(OOI0I0),true)
call IssueImmediateOrder(OOI0I0,"halt")
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIO00O(I1I0IO,"Level",IO0O0I)
call TriggerRegisterTimerEvent(t,0.01,true)
call TriggerRegisterUnitEvent(t,OOI0I0,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,OOI010,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function I001I1O))
set t=null
set OOI0I0=null
set OOI010=null
endfunction
function I0011IO takes nothing returns boolean
if GetSpellAbilityId()==1093682996 then
call I00110O()
endif
return false
endfunction
function I01I00 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I0011IO))
set t=null
endfunction
function I00111O takes nothing returns boolean
return GetSpellAbilityId()==1093683252
endfunction
function I0IOOOO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(OOOIO0,1093683252)
local unit O11O1I=CreateUnit(GetOwningPlayer(OOOIO0),1697656901,GetUnitX(OOOIO0),GetUnitY(OOOIO0),0)
call UnitAddAbility(O11O1I,1093679185)
call SetUnitAbilityLevel(O11O1I,1093679185,IO0O0I)
call IssueTargetOrderById(O11O1I,852274,OOOIO0)
endfunction
function I01I10 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I00111O))
call TriggerAddAction(t,function I0IOOOO)
endfunction
function Sunder_SwitchConditions takes nothing returns boolean
return GetSpellAbilityId()==1093678930
endfunction
function I0IOO0O takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local unit OOI010=IIO1OO(I1I0IO,"Target")
local real I0IOOIO=II00IO(I1I0IO,"SourceLifePercent")
local real I0IOO1O=II00IO(I1I0IO,"TargetLifePercent")
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,1093678929)
if GetSpellTargetUnit()==OOI0I0 then
call SetUnitLifePercentBJ(OOI0I0,I0IOO1O)
endif
if GetSpellTargetUnit()==OOI010 then
call SetUnitLifePercentBJ(OOI010,I0IOOIO)
if GetUnitLifePercent(OOI010)<33.00 and IO0O0I==1 and GetUnitState(OOI010,UNIT_STATE_LIFE)>1 then
call SetUnitLifePercentBJ(OOI010,33.00)
endif
if GetUnitLifePercent(OOI010)<28.00 and IO0O0I==2 and GetUnitState(OOI010,UNIT_STATE_LIFE)>1 then
call SetUnitLifePercentBJ(OOI010,28.00)
endif
if GetUnitLifePercent(OOI010)<23.00 and IO0O0I==3 and GetUnitState(OOI010,UNIT_STATE_LIFE)>1 then
call SetUnitLifePercentBJ(OOI010,23.00)
endif
endif
if GetTriggerExecCount(t)==2 then
call I0111O(I1I0IO)
call I10I1O(t)
endif
set OOI0I0=null
set OOI010=null
set t=null
endfunction
function I0IO0OO takes nothing returns boolean
if GetSpellAbilityId()==1093678930 then
call I0IOO0O()
endif
return false
endfunction
function I0IO00O takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local unit O11O1I
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIO01O(I1I0IO,"SourceLifePercent",GetUnitLifePercent(OOI0I0))
call IIO01O(I1I0IO,"TargetLifePercent",GetUnitLifePercent(OOI010))
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I0IO0OO))
set O11O1I=CreateUnit(GetOwningPlayer(OOI010),1697656921,GetUnitX(OOI010),GetUnitY(OOI010),0)
call UnitAddAbility(O11O1I,1093678930)
call IssueTargetOrder(O11O1I,"thunderbolt",OOI0I0)
call ShowUnit(O11O1I,false)
call SetUnitPathing(O11O1I,false)
call SetUnitInvulnerable(O11O1I,true)
call UnitApplyTimedLife(O11O1I,1112820806,0.2)
set O11O1I=CreateUnit(GetOwningPlayer(OOI0I0),1697656921,GetUnitX(OOI0I0),GetUnitY(OOI0I0),0)
call UnitAddAbility(O11O1I,1093678930)
call IssueTargetOrder(O11O1I,"thunderbolt",OOI010)
call ShowUnit(O11O1I,false)
call SetUnitPathing(O11O1I,false)
call SetUnitInvulnerable(O11O1I,true)
call UnitApplyTimedLife(O11O1I,1112820806,0.2)
set t=null
set OOI0I0=null
set OOI010=null
set O11O1I=null
endfunction
function I0IO0IO takes nothing returns boolean
if GetSpellAbilityId()==1093678929 then
call I0IO00O()
endif
return false
endfunction
function I01II0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I0IO0IO))
endfunction
function I0IO01O takes nothing returns nothing
call UnitRemoveBuffsBJ(1,IIO1OO(I011OO(GetExpiredTimer()),"UnitVar"))
endfunction
function I0IOIOO takes nothing returns boolean
return GetLearnedSkill()==1093678149 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function I0IOI0O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(OOOIO0,1093678149)
local timer t
if IO0O0I==1 then
set t=CreateTimer()
call TimerStart(t,11,true,function I0IO01O)
call IIOOIO(I011OO(t),"UnitVar",OOOIO0)
call IIOOIO(I011OO(OOOIO0),"KrakenTimer",t)
else
set t=IIO1IO(I011OO(OOOIO0),"KrakenTimer")
call TimerStart(t,12-IO0O0I,true,function I0IO01O)
endif
endfunction
function I011O0 takes nothing returns nothing
set IIOII=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IIOII,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(IIOII,Condition(function I0IOIOO))
call TriggerAddAction(IIOII,function I0IOI0O)
endfunction
function I0IOIIO takes nothing returns boolean
return GetSpellAbilityId()==1093678134
endfunction
function I0IOI1O takes nothing returns nothing
local unit t=GetSpellTargetUnit()
local real I0IO1OO=(60.00+(50.00*I2R(GetUnitAbilityLevelSwapped(1093678134,GetTriggerUnit()))))
call UnitDamageTargetBJ(GetTriggerUnit(),t,I0IO1OO,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_COLD)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",t,"chest"))
endfunction
function I01100 takes nothing returns nothing
set IIO1I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IIO1I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(IIO1I,Condition(function I0IOIIO))
call TriggerAddAction(IIO1I,function I0IOI1O)
endfunction
function I0IO10O takes nothing returns boolean
return GetSpellAbilityId()==1093677914
endfunction
function I0IO1IO takes nothing returns nothing
local location O000OI=GetUnitLoc(GetTriggerUnit())
local location O0OOI1O
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=16
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,1697656901,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,1093679156)
call SetUnitAbilityLevelSwapped(1093679156,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093677914,GetTriggerUnit()))
set O0OOI1O=I0011O(O000OI,100.00,(22.50*I2R(bj_forLoopAIndex)))
call IssuePointOrderLoc(bj_lastCreatedUnit,"impale",O0OOI1O)
call RemoveLocation(O0OOI1O)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call RemoveLocation(O000OI)
endfunction
function I011I0 takes nothing returns nothing
set II0OI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(II0OI,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(II0OI,Condition(function I0IO10O))
call TriggerAddAction(II0OI,function I0IO1IO)
endfunction
constant function I0IO11O takes nothing returns integer
return 1093685074
endfunction
function I0I0OOO takes nothing returns boolean
return GetSpellAbilityId()==I0IO11O()
endfunction
function I0I0O0O takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(O00I))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0
endfunction
function I0I0OIO takes nothing returns nothing
call OII1O0(O00I,GetEnumUnit(),2,O01I)
endfunction
function I0I0O1O takes unit OOI0I0,unit OOI010,real OOIO00 returns nothing
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function I0I0O0O)
set O00I=OOI0I0
set O01I=OOIO00
call GroupEnumUnitsInRange(II1O0O,GetUnitX(OOI010),GetUnitY(OOI010),180,II1OIO)
call ForGroup(II1O0O,function I0I0OIO)
call DestroyBoolExpr(II1OIO)
call DestroyGroup(II1O0O)
endfunction
function I0I00OO takes nothing returns boolean
return GetFilterUnit()!=O00I and IsUnitInGroup(GetFilterUnit(),IO1I)==false and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1
endfunction
function I0I000O takes group I0I00IO,unit I0I001O,unit OOI0I0 returns unit
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function I0I00OO)
local unit I0I0IOO=null
local unit I0I0I0O
set IO1I=I0I00IO
set O00I=OOI0I0
call GroupEnumUnitsInRange(II1O0O,GetUnitX(I0I001O),GetUnitY(I0I001O),500,II1OIO)
set I0I0I0O=FirstOfGroup(II1O0O)
set I0I0IOO=I0I0I0O
loop
exitwhen I0I0I0O==null
if GetUnitState(I0I0I0O,UNIT_STATE_LIFE)!=GetUnitState(I0I0I0O,UNIT_STATE_MAX_LIFE)then
if IsUnitType(I0I0I0O,UNIT_TYPE_HERO)==true and IsUnitType(I0I0IOO,UNIT_TYPE_HERO)==false then
set I0I0IOO=I0I0I0O
elseif GetUnitState(I0I0I0O,UNIT_STATE_LIFE)<GetUnitState(I0I0IOO,UNIT_STATE_LIFE)and IsUnitType(I0I0I0O,UNIT_TYPE_HERO)==true and IsUnitType(I0I0IOO,UNIT_TYPE_HERO)==true then
set I0I0IOO=I0I0I0O
elseif IsUnitType(I0I0IOO,UNIT_TYPE_HERO)==false and GetUnitState(I0I0I0O,UNIT_STATE_LIFE)<GetUnitState(I0I0IOO,UNIT_STATE_LIFE)then
set I0I0IOO=I0I0I0O
endif
endif
call GroupRemoveUnit(II1O0O,I0I0I0O)
set I0I0I0O=FirstOfGroup(II1O0O)
endloop
call DestroyGroup(II1O0O)
call DestroyBoolExpr(II1OIO)
return I0I0IOO
endfunction
function I0I0IIO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local string I0I0I1O="Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCaster.mdl"
local string I0I01OO="origin"
local unit array I0I010O
local integer x
local integer i=1
local real OOIO00=60+GetUnitAbilityLevel(I1IIIO,I0IO11O())*20
local group I0I00IO=CreateGroup()
local integer I0I01IO=4
local boolean I0I011O=false
set I0I010O[i]=OOI010
if OOI010!=I1IIIO then
call O0O010("SPLK",GetUnitX(I1IIIO),GetUnitY(I1IIIO),GetUnitX(OOI010),GetUnitY(OOI010),0.3,0.5,0.9,1,0.7)
endif
call OO1010(I0I0I1O,I0I010O[i],I0I01OO,2)
if GetUnitState(I0I010O[i],UNIT_STATE_LIFE)>1 then
call SetUnitState(I0I010O[i],UNIT_STATE_LIFE,GetUnitState(I0I010O[i],UNIT_STATE_LIFE)+OOIO00)
endif
call I0I0O1O(I1IIIO,I0I010O[i],OOIO00)
call GroupAddUnit(I0I00IO,I0I010O[i])
set i=2
loop
exitwhen i>I0I01IO or I0I011O
set I0I010O[i]=I0I000O(I0I00IO,I0I010O[i-1],I1IIIO)
if I0I010O[i]==null then
set I0I011O=true
else
call GroupAddUnit(I0I00IO,I0I010O[i])
call OO1010(I0I0I1O,I0I010O[i],I0I01OO,2)
call SetUnitState(I0I010O[i],UNIT_STATE_LIFE,GetUnitState(I0I010O[i],UNIT_STATE_LIFE)+OOIO00)
call I0I0O1O(I1IIIO,I0I010O[i],OOIO00)
call O0O010("SPLK",GetUnitX(I0I010O[i-1]),GetUnitY(I0I010O[i-1]),GetUnitX(I0I010O[i]),GetUnitY(I0I010O[i]),0.3,0.5,0.9,1,0.7)
set i=i+1
endif
endloop
call DestroyGroup(I0I00IO)
endfunction
function III010 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I0I0OOO))
call TriggerAddAction(t,function I0I0IIO)
endfunction
constant function I0IIOOO takes nothing returns integer
return 1093684817
endfunction
constant function I0IIO0O takes nothing returns integer
return 1093684810
endfunction
constant function I0IIOIO takes nothing returns integer
return 1093684811
endfunction
constant function I0IIO1O takes nothing returns integer
return 1093685079
endfunction
function I0II0OO takes nothing returns boolean
return GetSpellAbilityId()==I0IIOOO()
endfunction
function I0II00O takes unit OOI0I0,unit OOI010,integer IO0O0I returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(OOI0I0),1697656901,GetUnitX(OOI010),GetUnitY(OOI010),0)
call UnitAddAbility(O11O1I,I0IIO0O())
call SetUnitAbilityLevel(O11O1I,I0IIO0O(),IO0O0I)
call IssueTargetOrder(O11O1I,"slow",OOI010)
endfunction
function I0II0IO takes unit OOI0I0,unit OOI010 returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(OOI0I0),1697656901,GetUnitX(OOI010),GetUnitY(OOI010),0)
call UnitAddAbility(O11O1I,I0IIOIO())
call IssueTargetOrder(O11O1I,"thunderbolt",OOI010)
endfunction
function I0II01O takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local unit OOI010=IIO1OO(I1I0IO,"Target")
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,I0IIOOO())
local integer OO0010O=GetTriggerExecCount(t)
local real OOIO00=7*IO0O0I
if IO0O0I==1 then
call UnitAddAbility(OOI010,I0IIO1O())
call OII1O0(OOI0I0,OOI010,2,OOIO00)
if OO0010O==8 then
call UnitRemoveAbility(OOI010,I0IIO1O())
call I0110O(I1I0IO)
call I10I1O(t)
endif
endif
if IO0O0I==2 then
if OO0010O==1 then
call I0II00O(OOI0I0,OOI010,2)
endif
if OO0010O>1 then
call UnitAddAbility(OOI010,I0IIO1O())
call OII1O0(OOI0I0,OOI010,2,OOIO00)
endif
if OO0010O==9 then
call UnitRemoveAbility(OOI010,I0IIO1O())
call I0110O(I1I0IO)
call I10I1O(t)
endif
endif
if IO0O0I==3 then
if OO0010O==1 then
call I0II00O(OOI0I0,OOI010,2)
endif
if OO0010O==2 then
call I0II0IO(OOI0I0,OOI010)
endif
if OO0010O>2 then
call UnitAddAbility(OOI010,I0IIO1O())
call OII1O0(OOI0I0,OOI010,2,OOIO00)
endif
if OO0010O==10 then
call UnitRemoveAbility(OOI010,I0IIO1O())
call I0110O(I1I0IO)
call I10I1O(t)
endif
endif
if IO0O0I==4 then
if OO0010O==1 then
call I0II00O(OOI0I0,OOI010,2)
endif
if OO0010O==2 then
call I0II0IO(OOI0I0,OOI010)
endif
if OO0010O>2 then
call UnitAddAbility(OOI010,I0IIO1O())
call OII1O0(OOI0I0,OOI010,2,OOIO00)
endif
if OO0010O==10 then
call UnitRemoveAbility(OOI010,I0IIO1O())
call I0110O(I1I0IO)
call I10I1O(t)
endif
endif
endfunction
function I0IIIOO takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddAction(t,function I0II01O)
call IIOOIO(I1I0IO,"Source",GetTriggerUnit())
call IIOOIO(I1I0IO,"Target",GetSpellTargetUnit())
call I0II00O(GetTriggerUnit(),GetSpellTargetUnit(),1)
endfunction
function IIIIO0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I0II0OO))
call TriggerAddAction(t,function I0IIIOO)
call OO0OO0(I0IIO0O())
call OO0OO0(I0IIOIO())
endfunction
constant function I0III0O takes nothing returns integer
return 1093684822
endfunction
constant function I0IIIIO takes nothing returns integer
return 1093684823
endfunction
constant function I0III1O takes nothing returns integer
return 1093684821
endfunction
constant function I0II1OO takes nothing returns integer
return 1093685080
endfunction
constant function I0II10O takes nothing returns integer
return 1093685081
endfunction
function I0II1IO takes nothing returns boolean
return GetSpellAbilityId()==I0III0O()
endfunction
function I0II11O takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local integer OO1100=GetTriggerExecCount(t)
local boolean O1IOO0O=GetUnitState(OOI010,UNIT_STATE_LIFE)<0.5
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,I0III0O())
if OO1100==18 or O1IOO0O then
if not O1IOO0O then
call UnitRemoveAbility(OOI010,I0IIIIO())
call UnitRemoveAbility(OOI010,I0II1OO())
elseif IsUnitType(OOI010,UNIT_TYPE_HERO)==true then
call O01I00(OOI010,I0IIIIO(),5.1)
call O01I00(OOI010,I0II1OO(),5.1)
endif
call I0110O(I1I0IO)
call I10I1O(t)
else
if IO0O0I==1 and(OO1100==5 or OO1100==10 or OO1100==15)then
call UnitAddAbility(OOI010,I0IIIIO())
call SetUnitAbilityLevel(OOI010,I0IIIIO(),GetUnitAbilityLevel(OOI010,I0IIIIO())+1)
endif
if IO0O0I==2 and(OO1100==3 or OO1100==5 or OO1100==7 or OO1100==9 or OO1100==11 or OO1100==13 or OO1100==15)then
call UnitAddAbility(OOI010,I0IIIIO())
call SetUnitAbilityLevel(OOI010,I0IIIIO(),GetUnitAbilityLevel(OOI010,I0IIIIO())+1)
endif
if IO0O0I==3 and(OO1100==2 or OO1100==3 or OO1100==5 or OO1100==6 or OO1100==8 or OO1100==9 or OO1100==11 or OO1100==12 or OO1100==14 or OO1100==15 or OO1100==16)then
call UnitAddAbility(OOI010,I0IIIIO())
call SetUnitAbilityLevel(OOI010,I0IIIIO(),GetUnitAbilityLevel(OOI010,I0IIIIO())+1)
endif
if IO0O0I==4 and OO1100<16 then
call UnitAddAbility(OOI010,I0IIIIO())
call SetUnitAbilityLevel(OOI010,I0IIIIO(),GetUnitAbilityLevel(OOI010,I0IIIIO())+1)
endif
endif
endfunction
function I0I1OOO takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local integer OO1100=GetTriggerExecCount(t)
local boolean O1IOO0O=GetUnitState(OOI010,UNIT_STATE_LIFE)<0.5
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,I0III0O())
if OO1100==18 or O1IOO0O then
if not O1IOO0O then
call UnitRemoveAbility(OOI010,I0III1O())
call UnitRemoveAbility(OOI010,I0II10O())
elseif IsUnitType(OOI010,UNIT_TYPE_HERO)==true then
call O01I00(OOI010,I0III1O(),5.1)
call O01I00(OOI010,I0II10O(),5.1)
endif
call I0110O(I1I0IO)
call I10I1O(t)
else
if IO0O0I==1 and(OO1100==5 or OO1100==10 or OO1100==15)then
call UnitAddAbility(OOI010,I0III1O())
call SetUnitAbilityLevel(OOI010,I0III1O(),GetUnitAbilityLevel(OOI010,I0III1O())+1)
endif
if IO0O0I==2 and(OO1100==3 or OO1100==5 or OO1100==7 or OO1100==9 or OO1100==11 or OO1100==13 or OO1100==15)then
call UnitAddAbility(OOI010,I0III1O())
call SetUnitAbilityLevel(OOI010,I0III1O(),GetUnitAbilityLevel(OOI010,I0III1O())+1)
endif
if IO0O0I==3 and(OO1100==2 or OO1100==3 or OO1100==5 or OO1100==6 or OO1100==8 or OO1100==9 or OO1100==11 or OO1100==12 or OO1100==14 or OO1100==15 or OO1100==16)then
call UnitAddAbility(OOI010,I0III1O())
call SetUnitAbilityLevel(OOI010,I0III1O(),GetUnitAbilityLevel(OOI010,I0III1O())+1)
endif
if IO0O0I==4 and OO1100<16 then
call UnitAddAbility(OOI010,I0III1O())
call SetUnitAbilityLevel(OOI010,I0III1O(),GetUnitAbilityLevel(OOI010,I0III1O())+1)
endif
endif
endfunction
function I0I1O0O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Target",OOI010)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call TriggerRegisterTimerEvent(t,1,true)
if IsUnitAlly(OOI010,GetOwningPlayer(I1IIIO))then
call UnitAddAbility(OOI010,I0IIIIO())
call UnitAddAbility(OOI010,I0II1OO())
call TriggerAddAction(t,function I0II11O)
else
call UnitAddAbility(OOI010,I0III1O())
call UnitAddAbility(OOI010,I0II10O())
call TriggerAddAction(t,function I0I1OOO)
endif
endfunction
function IIII00 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I0II1IO))
call TriggerAddAction(t,function I0I1O0O)
call OO0OO0(I0IIIIO())
call OO0OO0(I0III1O())
endfunction
function O0O11I takes nothing returns nothing
local unit OOI010=O00I
local unit O1IOOIO=IOII
local unit OOI0I0=IIO1OO(I011OO(OOI010),"ShallowGrave|Source")
local unit O11O1I=CreateUnit(GetOwningPlayer(OOI0I0),1747988556,GetUnitX(OOI010),GetUnitY(OOI010),O0O0O0(OOI010,O1IOOIO))
call UnitAddAbility(O11O1I,1097691750)
call UnitRemoveAbility(O11O1I,1097691750)
call SetUnitFlyHeight(O11O1I,-100,0)
call UnitApplyTimedLife(O11O1I,1112820806,4)
call OII110(OOI0I0,O1IOOIO,2,150*GetUnitAbilityLevel(OOI0I0,1093685075),1.4)
set OOI010=null
set O1IOOIO=null
set OOI0I0=null
set O11O1I=null
endfunction
function I0I1OIO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI010=IIO1OO(I1I0IO,"Target")
local integer O0IOI1O=II000O(I1I0IO,"Duration")
if I1I11O(OOI010)then
call I0111O(I1I0IO)
call I10I1O(t)
elseif GetTriggerEvalCount(t)>O0IOI1O then
call I0111O(I1I0IO)
call I10I1O(t)
call UnitRemoveAbility(OOI010,1093685078)
elseif GetUnitAbilityLevel(OOI010,1093685078)==0 then
call UnitAddAbility(OOI010,1093685078)
endif
set OOI010=null
set t=null
return false
endfunction
function I0I1O1O takes nothing returns nothing
local trigger t
local string I1I0IO
local unit OOI0I0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local integer O0IOI1O=360
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function I0I1OIO))
call IIOOIO(I1I0IO,"Target",OOI010)
call IIO00O(I1I0IO,"Duration",O0IOI1O)
call IIOOIO(I011OO(OOI010),"ShallowGrave|Source",OOI0I0)
call UnitAddAbility(OOI010,1093685078)
set t=null
set OOI0I0=null
set OOI010=null
endfunction
function I0I10OO takes nothing returns boolean
if GetSpellAbilityId()==1093685075 then
call I0I1O1O()
endif
return false
endfunction
function IIIII0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I0I10OO))
set t=null
endfunction
function I0I100O takes nothing returns nothing
local unit O11O1I=CreateUnit(GetOwningPlayer(OOOO1O),1865429065,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call UnitApplyTimedLife(O11O1I,1112820806,2)
set O11O1I=null
endfunction
function I0I10IO takes nothing returns boolean
return OI0I00()and GetUnitAbilityLevel(GetFilterUnit(),1110454840)==0
endfunction
function PoisonNova_Iterate takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local integer I0I101O=II000O(I1I0IO,"NovaLevel")
local real r=II00IO(I1I0IO,"r")
local group g
if GetTriggerEvalCount(t)>13 then
call I0111O(I1I0IO)
call I10I1O(t)
else
set r=r+53
call IIO01O(I1I0IO,"r",r)
set g=CreateGroup()
set OOOO1O=I1IIIO
set I1III=I0I101O
call GroupEnumUnitsInRange(g,GetUnitX(I1IIIO),GetUnitY(I1IIIO),r,Condition(function I0I10IO))
call ForGroup(g,function I0I100O)
call DestroyGroup(g)
endif
set t=null
set I1IIIO=null
set g=null
return false
endfunction
function I0I1IOO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local integer I0I101O
local integer i=1
local real x=GetUnitX(I1IIIO)
local real y=GetUnitY(I1IIIO)
local unit O11O1I
if GetSpellAbilityId()==1093677363 then
set I0I101O=GetUnitAbilityLevel(I1IIIO,1093677363)
else
set I0I101O=GetUnitAbilityLevel(I1IIIO,1093681462)+1
endif
loop
exitwhen i>18
set O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),1697657143,x,y,0)
call UnitAddAbility(O11O1I,1093678391)
call SetUnitAbilityLevel(O11O1I,1093678391,I0I101O)
call IssuePointOrder(O11O1I,"move",x+675*Cos(i*20*bj_DEGTORAD),y+675*Sin(i*20*bj_DEGTORAD))
call UnitApplyTimedLife(O11O1I,1112820806,1.15)
set i=i+1
endloop
set I1IIIO=null
set O11O1I=null
endfunction
function I0I1I0O takes nothing returns boolean
if GetSpellAbilityId()==1093677363 or GetSpellAbilityId()==1093681462 then
call I0I1IOO()
endif
return false
endfunction
function I01110 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I0I1I0O))
set t=null
endfunction
function I0I1IIO takes nothing returns boolean
if(GetUnitAbilityLevelSwapped(1093684557,GetTriggerUnit())>0)then
if(GetUnitAbilityLevelSwapped(1093678162,GetAttacker())==0)then
if(IsUnitType(GetAttacker(),UNIT_TYPE_STRUCTURE)==false)then
if(IsUnitEnemy(GetAttacker(),GetTriggerPlayer()))then
return true
endif
endif
endif
endif
return false
endfunction
function I0I1I1O takes nothing returns nothing
local location O000OI=GetUnitLoc(GetAttacker())
call CreateNUnitsAtLoc(1,1865429075,GetOwningPlayer(GetTriggerUnit()),O000OI,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,1093684041)
call SetUnitAbilityLevelSwapped(1093684041,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093684557,GetTriggerUnit()))
call UnitApplyTimedLifeBJ(1.00,1112820806,bj_lastCreatedUnit)
call IssueTargetOrder(bj_lastCreatedUnit,"attack",GetAttacker())
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,1097625443)
call RemoveLocation(O000OI)
endfunction
function IIOOO0 takes nothing returns nothing
set II00I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(II00I,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(II00I,Condition(function I0I1IIO))
call TriggerAddAction(II00I,function I0I1I1O)
endfunction
function I0I11OO takes nothing returns boolean
if((GetUnitTypeId(GetSummonedUnit())==1966092339))then
return true
endif
if((GetUnitTypeId(GetSummonedUnit())==1966092341))then
return true
endif
if((GetUnitTypeId(GetSummonedUnit())==1966092345))then
return true
endif
return false
endfunction
function I0I110O takes nothing returns boolean
if(not I0I11OO())then
return false
endif
return true
endfunction
function I0I11IO takes nothing returns nothing
call SetUnitAbilityLevel(GetSummonedUnit(),1093682480,GetUnitAbilityLevel(GetSummoningUnit(),1093678923))
endfunction
function IIOO00 takes nothing returns nothing
set II0II=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(II0II,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(II0II,Condition(function I0I110O))
call TriggerAddAction(II0II,function I0I11IO)
endfunction
function I0I111O takes nothing returns boolean
return GetSpellAbilityId()==1093679192
endfunction
function I01OOOO takes nothing returns nothing
local location O000OI=GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLocFacingLocBJ(1,1697656901,GetOwningPlayer(GetSpellAbilityUnit()),O000OI,O000OI)
call RemoveLocation(O000OI)
call UnitAddAbility(bj_lastCreatedUnit,1093679427)
call SetUnitAbilityLevelSwapped(1093679427,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093679192,GetSpellAbilityUnit()))
call IssueTargetOrder(bj_lastCreatedUnit,"bloodlust",GetSpellAbilityUnit())
endfunction
function IIOOI0 takes nothing returns nothing
set II01I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(II01I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(II01I,Condition(function I0I111O))
call TriggerAddAction(II01I,function I01OOOO)
endfunction
function I01OO0O takes nothing returns boolean
if(not(GetUnitTypeId(GetEnteringUnit())==1697656922))then
return false
endif
return true
endfunction
function I01OOIO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped(1093681972,GetFilterUnit())!=0)
endfunction
function I01OO1O takes nothing returns nothing
if GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)>1 then
call SetWidgetLife(GetEnumUnit(),((10.00*I2R(GetUnitAbilityLevelSwapped(1093681972,GetEnumUnit())))+GetUnitStateSwap(UNIT_STATE_LIFE,GetEnumUnit())))
endif
endfunction
function I01O0OO takes nothing returns nothing
local group O0OO1OO=I0I1OO(GetOwningPlayer(GetEnteringUnit()),Condition(function I01OOIO))
call ForGroupBJ(O0OO1OO,function I01OO1O)
call DestroyGroup(O0OO1OO)
endfunction
function IIOO10 takes nothing returns nothing
set IIIOI=CreateTrigger()
call TriggerRegisterEnterRectSimple(IIIOI,bj_mapInitialPlayableArea)
call TriggerAddCondition(IIIOI,Condition(function I01OO0O))
call TriggerAddAction(IIIOI,function I01O0OO)
endfunction
function I01O00O takes nothing returns boolean
return GetLearnedSkill()==1093684548 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function I01O0IO takes nothing returns nothing
if GetUnitAbilityLevel(GetEnumUnit(),1110455860)>0 and GetEventDamage()>10 and IsUnitEnemy(GetEnumUnit(),GetOwningPlayer(GetTriggerUnit()))then
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),0.05*(GetUnitAbilityLevel(GetTriggerUnit(),1093684548))*GetEventDamage(),ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)
endif
endfunction
function I01O01O takes nothing returns nothing
local group II1O0O
local unit OOOIO0=GetTriggerUnit()
local real OOIO00=0.05*(GetUnitAbilityLevel(OOOIO0,1093684548))*GetEventDamage()
if(GetEventDamage()<1400)then
call SetWidgetLife(OOOIO0,GetUnitStateSwap(UNIT_STATE_LIFE,OOOIO0)+OOIO00)
set II1O0O=CreateGroup()
call GroupEnumUnitsInRange(II1O0O,GetUnitX(OOOIO0),GetUnitY(OOOIO0),600,Condition(function OI0O00))
call ForGroup(II1O0O,function I01O0IO)
call DestroyGroup(II1O0O)
endif
endfunction
function I01OIOO takes nothing returns nothing
local trigger t
if GetUnitAbilityLevel(GetTriggerUnit(),1093684548)==1 then
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerAddAction(t,function I01O01O)
endif
endfunction
function IIO0O0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function I01O00O))
call TriggerAddAction(t,function I01OIOO)
endfunction
constant function I01OI0O takes nothing returns integer
return 1093678672
endfunction
constant function I01OIIO takes nothing returns integer
return 1093683781
endfunction
constant function I01OI1O takes nothing returns integer
return 1697657159
endfunction
function I01O1OO takes nothing returns boolean
return GetSpellAbilityId()==I01OI0O()
endfunction
function I01O10O takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(O00I))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1
endfunction
function I01O1IO takes nothing returns nothing
local unit OOI010=GetEnumUnit()
local unit O11O1I=CreateUnit(GetOwningPlayer(O00I),1697656901,GetUnitX(OOI010),GetUnitY(OOI010),0)
call UnitAddAbility(O11O1I,I01OIIO())
call SetUnitAbilityLevel(O11O1I,I01OIIO(),O0II)
call IssueTargetOrder(O11O1I,"slow",OOI010)
endfunction
function I01O11O takes unit I1IIIO returns nothing
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function I01O10O)
set O00I=I1IIIO
call GroupEnumUnitsInRange(II1O0O,GetUnitX(I1IIIO),GetUnitY(I1IIIO),675,II1OIO)
call ForGroup(II1O0O,function I01O1IO)
call DestroyGroup(II1O0O)
call DestroyBoolExpr(II1OIO)
endfunction
function I010OOO takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO
local unit O11O1I=IIO1OO(I1I0IO,"Caster")
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST then
call KillUnit(O11O1I)
call I0110O(I1I0IO)
call OO10O0(t)
else
call SetUnitAnimation(O11O1I,"birth")
set I1IIIO=IIO1OO(I1I0IO,"Hero")
set O0II=GetTriggerExecCount(t)*GetUnitAbilityLevel(I1IIIO,I01OI0O())/ 2
call I01O11O(I1IIIO)
endif
endfunction
function I010O0O takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local location O000OI=GetSpellTargetLoc()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local real x=GetLocationX(O000OI)
local real y=GetLocationY(O000OI)
local unit O11O1I=CreateUnit(GetOwningPlayer(I1IIIO),I01OI1O(),x,y,0)
call RemoveLocation(O000OI)
call TriggerRegisterUnitEvent(t,I1IIIO,EVENT_UNIT_SPELL_ENDCAST)
call TriggerRegisterTimerEvent(t,0.5,true)
call TriggerAddAction(t,function I010OOO)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIOOIO(I1I0IO,"Caster",O11O1I)
endfunction
function II0100 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(t,function I010O0O)
call TriggerAddCondition(t,Condition(function I01O1OO))
call OO0OO0(I01OIIO())
endfunction
constant function I010OIO takes nothing returns integer
return 1093683765
endfunction
constant function I010O1O takes nothing returns integer
return 1093683769
endfunction
constant function I0100OO takes nothing returns integer
return 1093685298
endfunction
function I01000O takes nothing returns boolean
return GetSpellAbilityId()==I010OIO()
endfunction
function I0100IO takes nothing returns nothing
call UnitAddAbility(GetEnumUnit(),I0100OO())
endfunction
function I01001O takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),I0100OO())
endfunction
function I010IOO takes unit I010I0O,unit I010IIO returns nothing
if I010I0O!=null and I010IIO!=null then
call O0O010("CLPB",GetUnitX(I010I0O),GetUnitY(I010I0O),GetUnitX(I010IIO),GetUnitY(I010IIO),0.7,0.1,0.9,1,0.3)
endif
endfunction
function I010I1O takes nothing returns nothing
if GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)>1 and GetEnumUnit()!=GetTriggerUnit()then
call UnitDamageTarget(O00I,GetEnumUnit(),O01I,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endif
endfunction
function I0101OO takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local real OOIO00
local unit OOOIO0
local unit I1IIIO
local group II1O0O=II0OOO(I1I0IO,"Group")
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
call ForGroup(II1O0O,function I01001O)
call I0110O(I1I0IO)
call DestroyGroup(II1O0O)
call OO10O0(t)
elseif GetEventDamage()>10 and GetEventDamage()<6000 then
set I1IIIO=IIO1OO(I1I0IO,"Hero")
set OOIO00=GetUnitAbilityLevel(I1IIIO,I010OIO())*0.05*GetEventDamage()
set O01I=OO0100(OOIO00,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE))
set O00I=I1IIIO
call DisableTrigger(t)
call ForGroup(II1O0O,function I010I1O)
call EnableTrigger(t)
endif
endfunction
function I01010O takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1
endfunction
function I0101IO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local group II1O0O=CreateGroup()
local boolexpr II1OIO=Condition(function I01010O)
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local integer i=2
local group I01011O=CreateGroup()
local unit array I01IOOO
local string I01IO0O="Abilities\\Spells\\Undead\\Curse\\CurseTarget.mdl"
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call I010IOO(I1IIIO,OOI010)
call OO1010(I01IO0O,OOI010,"overhead",25)
set I01IOOO[1]=OOI010
call IIOOIO(I1I0IO,"Unit1",I01IOOO[1])
call TriggerRegisterUnitEvent(t,I01IOOO[1],EVENT_UNIT_DAMAGED)
call GroupEnumUnitsInRange(II1O0O,GetUnitX(OOI010),GetUnitY(OOI010),600,II1OIO)
call GroupRemoveUnit(II1O0O,OOI010)
call GroupAddUnit(I01011O,OOI010)
call IIOOIO(I1I0IO,"Group",I01011O)
loop
exitwhen i>5 or FirstOfGroup(II1O0O)==null
set I01IOOO[i]=FirstOfGroup(II1O0O)
call I010IOO(I01IOOO[i-1],I01IOOO[i])
call TriggerRegisterUnitEvent(t,I01IOOO[i],EVENT_UNIT_DAMAGED)
call GroupAddUnit(I01011O,I01IOOO[i])
call GroupRemoveUnit(II1O0O,I01IOOO[i])
call OO1010(I01IO0O,I01IOOO[i],"overhead",25)
set i=i+1
endloop
call IIO00O(I1I0IO,"FXCount",i-1)
set O0II=GetUnitAbilityLevel(I1IIIO,I010OIO())
call ForGroup(I01011O,function I0100IO)
call TriggerRegisterTimerEvent(t,25,false)
call TriggerAddAction(t,function I0101OO)
endfunction
function II01I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I01000O))
call TriggerAddAction(t,function I0101IO)
call OO0OO0(I010O1O())
endfunction
constant function I01IOIO takes nothing returns integer
return 1093681491
endfunction
constant function I01IO1O takes nothing returns integer
return 1093683782
endfunction
constant function I01I0OO takes nothing returns integer
return 1093685296
endfunction
function I01I00O takes nothing returns boolean
return GetSpellAbilityId()==I01IOIO()
endfunction
function I01I0IO takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local integer OO10OOO=II000O(I1I0IO,"Counter")
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local unit OOI010=IIO1OO(I1I0IO,"Target")
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,I01IOIO())
if OO10OOO>7 or GetUnitState(OOI010,UNIT_STATE_LIFE)<1 then
call DestroyEffect(II0O0O(I1I0IO,"Effect"))
call UnitRemoveAbility(OOI010,I01I0OO())
call PauseTimer(t)
call I0110O(I1I0IO)
call DestroyTimer(t)
else
set OO10OOO=OO10OOO+1
call OII1O0(I1IIIO,OOI010,1,IO0O0I*10)
call IIO00O(I1I0IO,"Counter",OO10OOO)
endif
endfunction
function I01I01O takes nothing returns nothing
local timer t=GetExpiredTimer()
local string I1I0IO=I011OO(t)
local integer OO10OOO=II000O(I1I0IO,"Counter")
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
local unit OOI010=IIO1OO(I1I0IO,"Target")
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,I01IOIO())
if OO10OOO>7 or GetUnitState(OOI010,UNIT_STATE_LIFE)<1 then
call DestroyEffect(II0O0O(I1I0IO,"Effect"))
call UnitRemoveAbility(OOI010,I01I0OO())
call PauseTimer(t)
call I0110O(I1I0IO)
call DestroyTimer(t)
else
set OO10OOO=OO10OOO+1
call OO1OI0(OOI010,IO0O0I*10)
call IIO00O(I1I0IO,"Counter",OO10OOO)
endif
endfunction
function I01IIOO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local timer t=CreateTimer()
local string I1I0IO=I011OO(t)
call UnitAddAbility(OOI010,I01I0OO())
call IIOOIO(I1I0IO,"Target",OOI010)
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call IIO00O(I1I0IO,"Counter",0)
if IsUnitAlly(OOI010,GetOwningPlayer(I1IIIO))then
call IIOOIO(I1I0IO,"Effect",AddSpecialEffectTarget("Abilities\\Spells\\Items\\StaffOfSanctuary\\Staff_Sanctuary_Target.mdl",OOI010,"chest"))
call TimerStart(t,1,true,function I01I01O)
else
call IIOOIO(I1I0IO,"Effect",AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Voodoo\\VoodooAuraTarget.mdl",OOI010,"overhead"))
call TimerStart(t,1,true,function I01I0IO)
endif
endfunction
function II0110 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I01I00O))
call TriggerAddAction(t,function I01IIOO)
call OO0OO0(I01IO1O())
endfunction
function I01II0O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=IIO1OO(I1I0IO,"Hero")
if GetUnitAbilityLevel(I1IIIO,1112041075)==0 then
call UnitRemoveAbility(I1IIIO,1093681977)
call I0111O(I1I0IO)
call I10I1O(t)
endif
set t=null
set I1IIIO=null
return false
endfunction
function I01IIIO takes nothing returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit I1IIIO=GetTriggerUnit()
call UnitAddAbility(I1IIIO,1093681977)
call SetUnitAbilityLevel(I1IIIO,1093681977,GetUnitAbilityLevel(I1IIIO,1093681985))
call IIOOIO(I1I0IO,"Hero",I1IIIO)
call TriggerRegisterTimerEvent(t,0.2,true)
call TriggerAddCondition(t,Condition(function I01II0O))
set I1IIIO=null
set t=null
endfunction
function I01II1O takes nothing returns boolean
if GetSpellAbilityId()==1093681985 then
call I01IIIO()
endif
return false
endfunction
function IIO000 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I01II1O))
endfunction
function I01I1OO takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
call SetUnitState(IIO1OO(I1I0IO,"Unit"),UNIT_STATE_MANA,II00IO(I1I0IO,"Mana"))
call I0110O(I1I0IO)
call I10I1O(t)
set t=null
return false
endfunction
function I01I10O takes unit u,real I01I1IO returns nothing
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
call TriggerRegisterTimerEvent(t,0,false)
call TriggerAddCondition(t,Condition(function I01I1OO))
call IIOOIO(I1I0IO,"Unit",u)
call IIO01O(I1I0IO,"Mana",I01I1IO)
set t=null
endfunction
function I01I11O takes nothing returns boolean
return GetSpellAbilityId()==1093682004
endfunction
function I011OOO takes nothing returns nothing
local string I1I0IO=I011OO(GetTriggerUnit())
local real O101O0O=OO01I0(II00IO(I1I0IO,"TLLife1"),1)
local real O01I1OO=OO01I0(II00IO(I1I0IO,"TLMana1"),1)
local real x=II00IO(I1I0IO,"TLX1")
local real y=II00IO(I1I0IO,"TLY1")
local unit OOOIO0=GetTriggerUnit()
if II00IO(I1I0IO,"TLLife1")>1 and GetUnitState(OOOIO0,UNIT_STATE_LIFE)>1 then
call AddSpecialEffect("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl",GetUnitX(OOOIO0),GetUnitY(OOOIO0))
call SetUnitX(OOOIO0,x)
call SetUnitY(OOOIO0,y)
call SetUnitState(OOOIO0,UNIT_STATE_LIFE,O101O0O)
call SetUnitState(OOOIO0,UNIT_STATE_MANA,O01I1OO)
call UnitRemoveBuffs(OOOIO0,false,true)
call I01I10O(OOOIO0,O01I1OO)
endif
endfunction
function IIO0I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I01I11O))
call TriggerAddAction(t,function I011OOO)
endfunction
function I011O0O takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local unit OOOIO0=IIO1OO(I011OO(t),"UnitVar")
local string I1I0IO=I011OO(OOOIO0)
local integer IIII0O=1
local integer IIIIIO=10
call RemoveLocation(II0O1O(I1I0IO,"TLPoint0"))
loop
exitwhen IIII0O>IIIIIO
call IIO01O(I1I0IO,"TLX"+I2S(IIII0O-1),II00IO(I1I0IO,"TLX"+I2S(IIII0O)))
call IIO01O(I1I0IO,"TLY"+I2S(IIII0O-1),II00IO(I1I0IO,"TLY"+I2S(IIII0O)))
call IIO01O(I1I0IO,"TLLife"+I2S(IIII0O-1),II00IO(I1I0IO,"TLLife"+I2S(IIII0O)))
call IIO01O(I1I0IO,"TLMana"+I2S(IIII0O-1),II00IO(I1I0IO,"TLMana"+I2S(IIII0O)))
set IIII0O=IIII0O+1
endloop
call IIO01O(I1I0IO,"TLX10",GetUnitX(OOOIO0))
call IIO01O(I1I0IO,"TLY10",GetUnitY(OOOIO0))
call IIO01O(I1I0IO,"TLLife10",GetUnitState(OOOIO0,UNIT_STATE_LIFE))
call IIO01O(I1I0IO,"TLMana10",GetUnitState(OOOIO0,UNIT_STATE_MANA))
endfunction
function I011OIO takes nothing returns boolean
return GetLearnedSkill()==1093682004 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function I011O1O takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(OOOIO0,1093682004)
local trigger t
if IO0O0I==1 then
set t=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(t,0.50)
call TriggerAddAction(t,function I011O0O)
call IIOOIO(I011OO(t),"UnitVar",OOOIO0)
endif
endfunction
function IIO010 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function I011OIO))
call TriggerAddAction(t,function I011O1O)
endfunction
function I0110OO takes unit OOI0I0,unit IOOOII,unit I01100O,integer IO0O0I returns real
local unit O11O1I=CreateUnit(GetOwningPlayer(OOI0I0),1697656901,GetUnitX(IOOOII),GetUnitY(IOOOII),0)
call UnitAddAbility(O11O1I,1093684812)
call IssueTargetOrder(O11O1I,"thunderbolt",I01100O)
if IsUnitType(I01100O,UNIT_TYPE_HERO)==false then
call OII110(OOI0I0,I01100O,1,50+25*IO0O0I,0.4)
endif
return((GetUnitX(I01100O)-GetUnitX(IOOOII))*(GetUnitX(I01100O)-GetUnitX(IOOOII))+(GetUnitY(I01100O)-GetUnitY(IOOOII))*(GetUnitY(I01100O)-GetUnitY(IOOOII)))/ 360000
endfunction
function I0110IO takes unit OOI0I0,unit IOOOII returns unit
local group g=CreateGroup()
set OOOO1O=OOI0I0
call GroupEnumUnitsInRange(g,GetUnitX(IOOOII),GetUnitY(IOOOII),600,Condition(function OI0IO0))
call GroupRemoveUnit(g,IOOOII)
set OOOO1O=GroupPickRandomUnit(g)
call DestroyGroup(g)
set g=null
return OOOO1O
endfunction
function I01101O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local integer IO0O0I=II000O(I1I0IO,"Level")
local unit IOOOII=IIO1OO(I1I0IO,"Old")
local integer OO1100=II000O(I1I0IO,"Count")
local unit I01100O
local real I1IIOO
call I0111O(I1I0IO)
call I10I1O(t)
if OO1100<(IO0O0I*2+1)then
set I01100O=I0110IO(OOI0I0,IOOOII)
if I01100O!=null then
set I1IIOO=I0110OO(OOI0I0,IOOOII,I01100O,IO0O0I)
set t=CreateTrigger()
set I1I0IO=I011OO(t)
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIO00O(I1I0IO,"Level",IO0O0I)
call IIOOIO(I1I0IO,"Old",I01100O)
call IIO00O(I1I0IO,"Count",OO1100+1)
call TriggerRegisterTimerEvent(t,I1IIOO+0.4,false)
call TriggerAddCondition(t,Condition(function I01101O))
endif
endif
set t=null
set OOI0I0=null
set IOOOII=null
set I01100O=null
return false
endfunction
function I011IOO takes nothing returns nothing
local unit I1IIIO=GetTriggerUnit()
local unit I011I0O=GetSpellTargetUnit()
local integer IO0O0I=GetUnitAbilityLevel(I1IIIO,1093684813)
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local real I1IIOO=I0110OO(I1IIIO,I1IIIO,I011I0O,IO0O0I)
call IIOOIO(I1I0IO,"Source",I1IIIO)
call IIO00O(I1I0IO,"Level",IO0O0I)
call IIOOIO(I1I0IO,"Old",I011I0O)
call IIO00O(I1I0IO,"Count",1)
call TriggerRegisterTimerEvent(t,I1IIOO,false)
call TriggerAddCondition(t,Condition(function I01101O))
set I1IIIO=null
set I011I0O=null
set t=null
endfunction
function I011IIO takes nothing returns boolean
if GetSpellAbilityId()==1093684813 then
call I011IOO()
endif
return false
endfunction
function II0OI0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I011IIO))
set t=null
endfunction
function I011I1O takes unit OOOIO0,real I0111OO returns nothing
call SetUnitState(OOOIO0,UNIT_STATE_LIFE,OO01I0(0,GetUnitState(OOOIO0,UNIT_STATE_LIFE)+I0111OO))
endfunction
function I01110O takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(O00I))==true and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1
endfunction
function I0111IO takes nothing returns nothing
local integer IO0O0I=GetUnitAbilityLevel(O00I,1093684805)
if IO0O0I==1 or IO0O0I==2 then
call I011I1O(GetEnumUnit(),IO0O0I*6)
else
call I011I1O(GetEnumUnit(),(IO0O0I+1)*6)
endif
endfunction
function I01111O takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local unit IIOOOOO=IIO1OO(I011OO(t),"WitchDoctor")
local group II1O0O=CreateGroup()
if(GetUnitState(IIOOOOO,UNIT_STATE_MANA)<10)then
call DisableTrigger(t)
endif
set O00I=IIOOOOO
call GroupEnumUnitsInRange(II1O0O,GetUnitX(IIOOOOO),GetUnitY(IIOOOOO),350,Condition(function I01110O))
call GroupAddUnit(II1O0O,IIOOOOO)
call ForGroup(II1O0O,function I0111IO)
call DestroyGroup(II1O0O)
endfunction
function IIOOO0O takes nothing returns boolean
if(GetIssuedOrderId()==String2OrderIdBJ("immolation")or GetIssuedOrderId()==String2OrderIdBJ("unimmolation"))then
if(GetUnitTypeId(GetTriggerUnit())==1160786241)then
return true
endif
endif
return false
endfunction
function IIOOOIO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local trigger t=IIO11O(I011OO(OOOIO0),"VoodooTrigger")
if(t==null)then
set t=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(t,1.0)
call TriggerAddAction(t,function I01111O)
call IIOOIO(I011OO(t),"WitchDoctor",OOOIO0)
call IIOOIO(I011OO(OOOIO0),"VoodooTrigger",t)
endif
if(GetIssuedOrderId()==String2OrderIdBJ("immolation"))then
call EnableTrigger(t)
else
call DisableTrigger(t)
endif
endfunction
function II00O0 takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function IIOOO0O))
call TriggerAddAction(t,function IIOOOIO)
endfunction
function IIOOO1O takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=IIO1OO(I1I0IO,"Source")
local integer IO0O0I=II000O(I1I0IO,"Level")
local integer O0O1O0O=II000O(I1I0IO,"MaxUnits")
local integer OO1100=GetTriggerEvalCount(t)
local integer i=1
local unit u
local real hp
local real O1IIOIO
if OO1100>12 then
loop
exitwhen i>O0O1O0O
call DestroyEffect(II0O0O(I1I0IO,"FX"+I2S(i)))
set i=i+1
endloop
call I0111O(I1I0IO)
call I10I1O(t)
else
loop
exitwhen i>O0O1O0O
set u=IIO1OO(I1I0IO,"Unit"+I2S(i))
set hp=II00IO(I1I0IO,"HP"+I2S(i))
if u!=null and I1I11O(u)==false then
call OII1O0(OOI0I0,u,1,IO0O0I*5)
if OO1100==4 or OO1100==8 or OO1100==12 then
set O1IIOIO=IO0O0I*0.1*OO01I0(hp-GetUnitState(u,UNIT_STATE_LIFE),0)
if O1IIOIO>0 then
call OII1O0(OOI0I0,u,1,O1IIOIO)
call OOOOO0(I2S(R2I(O1IIOIO))+"!",u,2,218,165,32,255)
endif
endif
endif
set i=i+1
endloop
endif
set u=null
set t=null
set OOI0I0=null
return false
endfunction
function IIOO0OO takes nothing returns nothing
set I1III=I1III+1
call IIOOIO(OOOI0O,"Unit"+I2S(I1III),GetEnumUnit())
call IIO01O(OOOI0O,"HP"+I2S(I1III),GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE))
call IIOOIO(OOOI0O,"FX"+I2S(I1III),AddSpecialEffectTarget("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkTarget.mdl",GetEnumUnit(),"overhead"))
endfunction
function IIOO00O takes nothing returns nothing
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local group g=CreateGroup()
local trigger t=CreateTrigger()
local string I1I0IO=I011OO(t)
local unit OOI0I0=GetTriggerUnit()
local integer IO0O0I=GetUnitAbilityLevel(OOI0I0,1093684815)
set I1III=0
set OOOI0O=I1I0IO
call GroupEnumUnitsInRange(g,x,y,160,Condition(function OI0110))
call ForGroup(g,function IIOO0OO)
call IIO00O(I1I0IO,"Level",IO0O0I)
call IIOOIO(I1I0IO,"Source",OOI0I0)
call IIO00O(I1I0IO,"MaxUnits",I1III)
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function IIOOO1O))
call RemoveLocation(l)
call DestroyGroup(g)
set l=null
set g=null
set t=null
endfunction
function IIOO0IO takes nothing returns boolean
if GetSpellAbilityId()==1093684815 then
call IIOO00O()
endif
return false
endfunction
function II0O10 takes nothing returns nothing
local trigger t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IIOO0IO))
set t=null
endfunction
function IIOO01O takes nothing returns boolean
return GetSpellAbilityId()==1093677391 or GetSpellAbilityId()==1093678935
endfunction
function IIOOIOO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local location O000OI=GetSpellTargetLoc()
if III10O(OOOIO0,GetLocationX(O000OI),GetLocationY(O000OI))then
call OOO010(OOOIO0)
call I11I1O(GetOwningPlayer(OOOIO0),"You cannot teleport there.")
endif
call RemoveLocation(O000OI)
endfunction
function IIOOI0O takes nothing returns boolean
return GetSpellAbilityId()==1093684025 or GetSpellAbilityId()==1093685324 or GetSpellAbilityId()==1093685847
endfunction
function IIOOIIO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local unit OOI010=GetSpellTargetUnit()
local real OOIO00=30*GetUnitAbilityLevel(OOOIO0,GetSpellAbilityId())
call SetUnitX(OOOIO0,GetUnitX(OOI010))
call SetUnitY(OOOIO0,GetUnitY(OOI010))
if IsUnitEnemy(OOI010,GetOwningPlayer(OOOIO0))then
call UnitDamageTargetBJ(OOOIO0,OOI010,OOIO00,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL)
call IssueTargetOrder(OOOIO0,"attack",OOI010)
endif
endfunction
function IIOOI1O takes nothing returns boolean
if I1O10O(GetSpellTargetUnit())then
return false
endif
if(GetSpellAbilityId()==1093678161)then
return true
endif
if(GetSpellAbilityId()==1093678387)then
return true
endif
return false
endfunction
function IIOO1OO takes nothing returns nothing
local unit OOOIO0=GetTriggerUnit()
local unit IIOO10O=GetSpellTargetUnit()
if(GetSpellAbilityId()==1093678161)and GetUnitState(OOOIO0,UNIT_STATE_LIFE)>1 then
call SetWidgetLife(OOOIO0,(GetUnitStateSwap(UNIT_STATE_LIFE,OOOIO0)+(GetUnitStateSwap(UNIT_STATE_LIFE,IIOO10O)*(0.15+(I2R(GetUnitAbilityLevelSwapped(1093678161,OOOIO0))*0.40)))))
call KillUnit(IIOO10O)
endif
if(GetSpellAbilityId()==1093678387)and GetUnitState(OOOIO0,UNIT_STATE_LIFE)>1 then
call SetUnitManaBJ(OOOIO0,(GetUnitStateSwap(UNIT_STATE_MANA,OOOIO0)+(GetUnitStateSwap(UNIT_STATE_LIFE,IIOO10O)*(I2R(GetUnitAbilityLevelSwapped(1093678387,OOOIO0))*0.15))))
call KillUnit(IIOO10O)
endif
endfunction
function IIOO1IO takes nothing returns nothing
call O0010I()
call O001II()
endfunction
function InitCustomTeams takes nothing returns nothing
call SetPlayerTeam(Player(1),0)
call SetPlayerTeam(Player(2),0)
call SetPlayerTeam(Player(3),0)
call SetPlayerTeam(Player(4),0)
call SetPlayerTeam(Player(5),0)
call SetPlayerTeam(Player(7),1)
call SetPlayerTeam(Player(8),1)
call SetPlayerTeam(Player(9),1)
call SetPlayerTeam(Player(10),1)
call SetPlayerTeam(Player(11),1)
endfunction
function main takes nothing returns nothing
local weathereffect we
local player p
local unit u
local integer unitID
local trigger t
local real life
local integer OO0IO0
local integer IIOO11O
local version v
local integer I01O1O
local integer i
call SetCameraBounds(-7424.0+GetCameraMargin(CAMERA_MARGIN_LEFT),-7680.0+GetCameraMargin(CAMERA_MARGIN_BOTTOM),7424.0-GetCameraMargin(CAMERA_MARGIN_RIGHT),7168.0-GetCameraMargin(CAMERA_MARGIN_TOP),-7424.0+GetCameraMargin(CAMERA_MARGIN_LEFT),7168.0-GetCameraMargin(CAMERA_MARGIN_TOP),7424.0-GetCameraMargin(CAMERA_MARGIN_RIGHT),-7680.0+GetCameraMargin(CAMERA_MARGIN_BOTTOM))
call SetDayNightModels("Environment\\DNC\\DNCFelwood\\DNCFelwoodTerrain\\DNCFelwoodTerrain.mdl","Environment\\DNC\\DNCFelwood\\DNCFelwoodUnit\\DNCFelwoodUnit.mdl")
call SetWaterBaseColor(0,0,255,255)
call NewSoundEnvironment("Default")
call SetAmbientDaySound("FelwoodDay")
call SetAmbientNightSound("FelwoodNight")
call SetMapMusic("Music",true,0)
set IOO00=CreateSound("Sounds\\Dominating.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(IOO00,1802)
call SetSoundChannel(IOO00,0)
call SetSoundVolume(IOO00,127)
call SetSoundPitch(IOO00,1.0)
set IOOI0=CreateSound("Sounds\\Double_Kill.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(IOOI0,2012)
call SetSoundChannel(IOOI0,0)
call SetSoundVolume(IOOI0,127)
call SetSoundPitch(IOOI0,1.0)
set IOO10=CreateSound("Sounds\\firstblood.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(IOO10,1567)
call SetSoundChannel(IOO10,0)
call SetSoundVolume(IOO10,127)
call SetSoundPitch(IOO10,1.0)
set IO0O0=CreateSound("Sounds\\GodLike.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(IO0O0,1828)
call SetSoundChannel(IO0O0,0)
call SetSoundVolume(IO0O0,127)
call SetSoundPitch(IO0O0,1.0)
set IO000=CreateSound("Sounds\\Killing_Spree.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(IO000,2377)
call SetSoundChannel(IO000,0)
call SetSoundVolume(IO000,127)
call SetSoundPitch(IO000,1.0)
set IO0I0=CreateSound("Sounds\\MegaKill.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(IO0I0,2612)
call SetSoundChannel(IO0I0,0)
call SetSoundVolume(IO0I0,127)
call SetSoundPitch(IO0I0,1.0)
set IO010=CreateSound("Sounds\\Ownage.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(IO010,2586)
call SetSoundChannel(IO010,0)
call SetSoundVolume(IO010,127)
call SetSoundPitch(IO010,1.0)
set IOIO0=CreateSound("Sounds\\triple_kill.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(IOIO0,1907)
call SetSoundChannel(IOIO0,0)
call SetSoundVolume(IOIO0,127)
call SetSoundPitch(IOIO0,1.0)
set IOI00=CreateSound("Sounds\\Unstoppable.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(IOI00,2038)
call SetSoundChannel(IOI00,0)
call SetSoundVolume(IOI00,127)
call SetSoundPitch(IOI00,1.0)
set IOII0=CreateSound("Sounds\\WhickedSick.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(IOII0,2612)
call SetSoundChannel(IOII0,0)
call SetSoundVolume(IOII0,127)
call SetSoundPitch(IOII0,1.0)
set IOI10=CreateSound("Sounds\\MonsterKill.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(IOI10,3344)
call SetSoundChannel(IOI10,0)
call SetSoundVolume(IOI10,127)
call SetSoundPitch(IOI10,1.0)
set IO1O0=CreateSound("Sounds\\HolyShit.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(IO1O0,2325)
call SetSoundChannel(IO1O0,0)
call SetSoundVolume(IO1O0,127)
call SetSoundPitch(IO1O0,1.0)
set IO100=CreateSound("Abilities\\Spells\\Undead\\Sleep\\SleepBirth1.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(IO100,"Sleep")
call SetSoundDuration(IO100,3203)
set IO1I0=CreateSound("Sounds\\Animality.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundChannel(IO1I0,0)
call SetSoundVolume(IO1I0,127)
call SetSoundPitch(IO1I0,1.0)
set IO110=CreateSound("Sound\\Ambient\\DoodadEffects\\TheHornOfCenarius.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(IO110,"HornOfCenariusSound")
call SetSoundDuration(IO110,12121)
set I0OO0=CreateSound("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaos.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(I0OO0,"MarkOfChaos")
call SetSoundDuration(I0OO0,4000)
set I0O00=CreateSound("Abilities\\Spells\\Undead\\DevourMagic\\DevourMagic.wav",false,true,true,10,10,"MissilesEAX")
call SetSoundParamsFromLabel(I0O00,"DevourMagicLaunch")
call SetSoundDuration(I0O00,1225)
set I0OI0=CreateSound("Abilities\\Spells\\Human\\DivineShield\\PaladinDivineShieldDeath1.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(I0OI0,"DivineShieldDeath")
call SetSoundDuration(I0OI0,1043)
call SetSoundDistanceCutoff(I0OI0,1500.0)
set I0O10=CreateSound("Abilities\\Spells\\Items\\AIso\\SoulGem.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(I0O10,"SoulGem")
call SetSoundDuration(I0O10,4474)
set I00O0=CreateSound("Buildings\\Undead\\TempleOfTheDamned\\TempleOfTheDamnedWhat.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(I00O0,"TempleOfTheDamnedWhat")
call SetSoundDuration(I00O0,3518)
call SetSoundDistanceCutoff(I00O0,2000.0)
set I0000=CreateSound("Buildings\\Naga\\TempleofTides\\TempleOfTidesWhat1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(I0000,"TempleOfTidesWhat")
call SetSoundDuration(I0000,3483)
call SetSoundDistanceCutoff(I0000,2000.0)
set I00I0=CreateSound("Buildings\\Undead\\TombOfRelics\\TombOfRelicsWhat1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(I00I0,"TombOfRelicsWhat")
call SetSoundDuration(I00I0,3065)
call SetSoundDistanceCutoff(I00I0,2000.0)
set I0010=CreateSound("Abilities\\Spells\\NightElf\\ShadowMeld\\ShadowMeld1.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(I0010,"ShadowMeld")
call SetSoundDuration(I0010,941)
set I0IO0=CreateSound("Abilities\\Spells\\Orc\\Disenchant\\Disenchant.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(I0IO0,"Disenchant")
call SetSoundDuration(I0IO0,2043)
set I0I00=CreateSound("Abilities\\Spells\\Human\\Avatar\\Avatar.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(I0I00,"Avatar")
call SetSoundDuration(I0I00,3199)
set I0II0=CreateSound("Buildings\\NightElf\\MoonWell\\MoonWellWhat1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(I0II0,"MoonWellWhat")
call SetSoundDuration(I0II0,2972)
call SetSoundDistances(I0II0,600.0,10000.0)
call SetSoundDistanceCutoff(I0II0,2000.0)
set I0I10=CreateSound("Sound\\Music\\mp3Music\\DarkVictory.mp3",true,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(I0I10,75111)
call SetSoundChannel(I0I10,0)
call SetSoundVolume(I0I10,127)
call SetSoundPitch(I0I10,1.0)
set O010O=Rect(5600.0,2848.0,5952.0,3168.0)
set O01IO=Rect(3424.0,2816.0,3744.0,3104.0)
set O011O=Rect(2880.0,6016.0,3296.0,6464.0)
set OIOOO=Rect(5824.0,5056.0,6272.0,5344.0)
set OIO0O=Rect(-3680.0,-6368.0,-3392.0,-6016.0)
set OIOIO=Rect(-6272.0,-4480.0,-5920.0,-4096.0)
set OIO1O=Rect(-4864.0,-5056.0,-4576.0,-4768.0)
set OI0OO=Rect(5568.0,3392.0,5920.0,3712.0)
set OI00O=Rect(3456.0,3424.0,3776.0,3744.0)
set OI0IO=Rect(3168.0,5440.0,3520.0,5792.0)
set OI01O=Rect(-6624.0,-5760.0,-6240.0,-5504.0)
set OIIOO=Rect(-3392.0,-6816.0,-3072.0,-6496.0)
set OII0O=Rect(-6656.0,-4224.0,-6240.0,-3808.0)
set OIIIO=Rect(-4544.0,-4832.0,-4224.0,-4512.0)
set OII1O=Rect(2912.0,-2944.0,3104.0,-2720.0)
set OI1OO=Rect(5472.0,5888.0,6624.0,7008.0)
set OI10O=Rect(-6848.0,-7456.0,-5696.0,-6272.0)
set OI1IO=Rect(-2464.0,1536.0,-2240.0,1760.0)
set OI11O=Rect(4352.0,-2688.0,4608.0,-2400.0)
set O1OOO=Rect(-3328.0,-416.0,-3104.0,-96.0)
set O1O0O=Rect(1440.0,-4096.0,1728.0,-3872.0)
set O1OIO=Rect(-4512.0,3232.0,-4352.0,3424.0)
set O1O1O=Rect(-608.0,3072.0,-384.0,3328.0)
set O10OO=Rect(2848.0,-5088.0,3072.0,-4928.0)
set O100O=Rect(-1824.0,2240.0,-1472.0,2464.0)
set O10IO=Rect(3008.0,-3776.0,3136.0,-3648.0)
set O101O=Rect(736.0,864.0,864.0,1024.0)
set O1IOO=Rect(-416.0,-3456.0,-160.0,-3200.0)
set O1I0O=Rect(-6368.0,-6944.0,-6176.0,-6752.0)
set O1IIO=Rect(5920.0,6272.0,6112.0,6464.0)
set O1I1O=Rect(-5152.0,-7264.0,-4448.0,-6560.0)
set O11OO=Rect(4672.0,4256.0,5376.0,4960.0)
set O110O=Rect(2304.0,-672.0,2592.0,-384.0)
set O11IO=Rect(4000.0,-2880.0,4928.0,-2144.0)
set O111O=Rect(-3552.0,-768.0,-2208.0,320.0)
set IOOOO=Rect(1056.0,-5216.0,2368.0,-3744.0)
set IOO0O=Rect(-5280.0,3072.0,-3808.0,4384.0)
set IOOIO=Rect(-1248.0,2656.0,352.0,4800.0)
set IOO1O=Rect(2272.0,-6080.0,3776.0,-4928.0)
set IO0OO=Rect(-1888.0,2208.0,-1248.0,2816.0)
set IO00O=Rect(384.0,576.0,1120.0,1952.0)
set IO0IO=Rect(2592.0,-4800.0,3744.0,-3328.0)
set IO01O=Rect(-960.0,-3712.0,416.0,-2304.0)
set IOIOO=Rect(-6912.0,-6144.0,-5888.0,-5184.0)
set IOI0O=Rect(5504.0,4576.0,6624.0,5728.0)
set IOIIO=Rect(-512.0,992.0,352.0,2272.0)
set IOI1O=Rect(-96.0,1248.0,96.0,1376.0)
set IO1OO=Rect(-1632.0,-5056.0,-768.0,-3904.0)
set IO10O=Rect(-1152.0,-4704.0,-960.0,-4480.0)
set IO1IO=Rect(-480.0,-800.0,-256.0,-512.0)
set IO11O=Rect(2112.0,-1280.0,3072.0,-288.0)
set I0OOO=Rect(7264.0,-5504.0,7488.0,-5280.0)
set I0O0O=Rect(-7520.0,6528.0,-7328.0,6720.0)
set I0OIO=Rect(2112.0,-736.0,2720.0,-352.0)
set I0O1O=Rect(2112.0,-960.0,2720.0,-640.0)
set I00OO=Rect(2112.0,-1088.0,2720.0,-864.0)
set I000O=Rect(2656.0,-1120.0,2784.0,-416.0)
set I00IO=Rect(2752.0,-1248.0,2880.0,-544.0)
set I001O=Rect(2848.0,-1344.0,2912.0,-640.0)
set I0IOO=Rect(2912.0,-1408.0,2976.0,-704.0)
set I0I0O=Rect(2208.0,-1216.0,2816.0,-992.0)
set I0IIO=Rect(2464.0,-1472.0,3200.0,-1152.0)
set I0I1O=Rect(-8192.0,-8192.0,-2976.0,-4320.0)
set I01OO=Rect(-8192.0,-4736.0,-4128.0,-3264.0)
set I010O=Rect(-4512.0,-4608.0,-3552.0,-3680.0)
set I01IO=Rect(2400.0,2976.0,8192.0,8192.0)
set I011O=Rect(3552.0,1792.0,8192.0,3072.0)
set IIOOO=Rect(2816.0,2304.0,3776.0,3232.0)
set IIO0O=Rect(-7360.0,5568.0,-6848.0,6272.0)
set IIOIO=Rect(-7008.0,6336.0,-6496.0,6752.0)
set IIO1O=Rect(-3616.0,3680.0,-2912.0,4544.0)
set II0OO=Rect(-2272.0,2016.0,-1792.0,2720.0)
set II00O=Rect(-2080.0,1760.0,-1312.0,2176.0)
set II0IO=Rect(-1440.0,1856.0,-992.0,2432.0)
set II01O=Rect(-800.0,1344.0,-480.0,1664.0)
set IIIOO=Rect(-1696.0,-768.0,-1376.0,-448.0)
set III0O=Rect(-576.0,0.0,-352.0,256.0)
set IIIIO=Rect(3104.0,-2784.0,3680.0,-2336.0)
set III1O=Rect(3264.0,-3040.0,3872.0,-2656.0)
set II1OO=Rect(4960.0,-3104.0,5632.0,-2816.0)
set II10O=Rect(4896.0,-3744.0,5280.0,-3456.0)
set II1IO=Rect(7488.0,-3520.0,8192.0,-2336.0)
set II11O=Rect(6656.0,-3328.0,7808.0,-2656.0)
set I1OOO=Rect(6400.0,-8192.0,8128.0,-5760.0)
set I1O0O=Rect(5472.0,-8192.0,6976.0,-7104.0)
set I1OIO=Rect(6176.0,-7136.0,7136.0,-6080.0)
set I1O1O=Rect(5600.0,-7168.0,6432.0,-6912.0)
set I10OO=Rect(6016.0,-6976.0,6528.0,-6336.0)
set I100O=Rect(5888.0,-6944.0,6368.0,-6560.0)
set I10IO=Rect(5664.0,-7040.0,6112.0,-6688.0)
set I101O=Rect(-8128.0,-8192.0,5536.0,-7744.0)
set I1IOO=Rect(2368.0,-7904.0,2688.0,-7584.0)
set I1I0O=Rect(-1664.0,-7808.0,-1344.0,-7552.0)
set I1IIO=Rect(-2976.0,-7776.0,-1920.0,-7040.0)
set I1I1O=Rect(-3968.0,-7968.0,-2912.0,-7232.0)
set I11OO=Rect(-5760.0,-8000.0,-5184.0,-7584.0)
set I110O=Rect(-3424.0,4320.0,-2976.0,4704.0)
set I11IO=Rect(-7072.0,-7552.0,-5600.0,-6176.0)
set I111O=Rect(-7488.0,-6432.0,-6752.0,-4928.0)
set OOOO0=Rect(-8192.0,-8128.0,-6848.0,8160.0)
set OOO00=Rect(-7744.0,4704.0,-7296.0,5600.0)
set OOOI0=Rect(-7680.0,1984.0,-6560.0,2816.0)
set OOO10=Rect(-7776.0,1696.0,-6944.0,2176.0)
set OO0O0=Rect(-7104.0,-2496.0,-6752.0,-2176.0)
set OO000=Rect(-6912.0,-3360.0,-6560.0,-3040.0)
set OO0I0=Rect(-3936.0,-2752.0,-3584.0,-2432.0)
set OO010=Rect(-3168.0,-1952.0,-2912.0,-1696.0)
set OOIO0=Rect(-4128.0,-1632.0,-3776.0,-1152.0)
set OOI00=Rect(-4992.0,-1792.0,-3968.0,-1440.0)
set OOII0=Rect(-5472.0,-1664.0,-4832.0,-1312.0)
set OOI10=Rect(-5600.0,-1536.0,-5312.0,-96.0)
set OO1O0=Rect(-5664.0,-1440.0,-5344.0,0.0)
set OO100=Rect(-5824.0,-1216.0,-5408.0,-544.0)
set OO1I0=Rect(-5216.0,-1216.0,-4480.0,-384.0)
set OO110=Rect(-5632.0,448.0,-5152.0,1856.0)
set O0OO0=Rect(-5856.0,1440.0,-5248.0,2624.0)
set O0O00=Rect(-5408.0,1888.0,-4928.0,2368.0)
set O0OI0=Rect(-5056.0,1664.0,-4064.0,2144.0)
set O0O10=Rect(-4320.0,1344.0,-3808.0,1952.0)
set O00O0=Rect(-4224.0,1472.0,-3264.0,1984.0)
set O0000=Rect(-3296.0,1312.0,-3104.0,1568.0)
set O00I0=Rect(-2400.0,640.0,-2208.0,896.0)
set O0010=Rect(-3392.0,640.0,-3200.0,896.0)
set O0IO0=Rect(-3744.0,-1024.0,-3232.0,384.0)
set O0I00=Rect(-2016.0,-5504.0,-1664.0,-4768.0)
set O0II0=Rect(-1760.0,-5248.0,-1312.0,-4800.0)
set O0I10=Rect(896.0,-3328.0,1088.0,-3072.0)
set O01O0=Rect(2464.0,-3712.0,2656.0,-3456.0)
set O0100=Rect(1984.0,-3744.0,2176.0,-3488.0)
set O01I0=Rect(928.0,-6720.0,1216.0,-6400.0)
set O0110=Rect(1152.0,-6560.0,1376.0,-6272.0)
set OIOO0=Rect(1216.0,-6368.0,1504.0,-6176.0)
set OIO00=Rect(-1376.0,-6784.0,-1184.0,-6528.0)
set OIOI0=Rect(6656.0,-6528.0,8192.0,8160.0)
set OIO10=Rect(7072.0,-2304.0,7264.0,-2048.0)
set OI0O0=Rect(-7872.0,7328.0,8192.0,8192.0)
set OI000=Rect(2272.0,6528.0,2592.0,6944.0)
set OI0I0=Rect(1632.0,7168.0,2144.0,7424.0)
set OI010=Rect(-768.0,7168.0,-416.0,7424.0)
set OIIO0=Rect(-7488.0,6304.0,-7168.0,6624.0)
set OII00=Rect(1184.0,6528.0,1376.0,6784.0)
set OIII0=Rect(1056.0,4512.0,1376.0,4896.0)
set OII10=Rect(1056.0,4352.0,1504.0,4608.0)
set OI1O0=Rect(1152.0,3520.0,1664.0,4608.0)
set OI100=Rect(1600.0,3904.0,1792.0,4352.0)
set OI1I0=Rect(960.0,3968.0,1248.0,4224.0)
set OI110=Rect(1056.0,3968.0,1504.0,4384.0)
set O1OO0=Rect(1056.0,3008.0,1504.0,4064.0)
set O1O00=Rect(928.0,3072.0,1120.0,3328.0)
set O1OI0=Rect(-1376.0,1760.0,-1184.0,2016.0)
set O1O10=Rect(-1216.0,1792.0,-1024.0,2048.0)
set O10O0=Rect(2368.0,-3200.0,2656.0,-2880.0)
set O1000=Rect(2624.0,-3584.0,2816.0,-2848.0)
set O10I0=Rect(2464.0,-3392.0,2656.0,-3136.0)
set O1010=Rect(2784.0,-3232.0,2976.0,-2976.0)
set O1IO0=Rect(2784.0,-3424.0,2976.0,-3168.0)
set O1I00=Rect(5472.0,5760.0,6880.0,7008.0)
set O1II0=Rect(2240.0,4096.0,2624.0,5760.0)
set O1I10=Rect(2400.0,3360.0,2720.0,4160.0)
set O11O0=Rect(2528.0,2976.0,2944.0,3360.0)
set O1100=Rect(3584.0,1920.0,5760.0,2336.0)
set O11I0=Rect(5280.0,544.0,5952.0,1344.0)
set O1110=Rect(-3104.0,2752.0,-2624.0,3232.0)
set IOOO0=Rect(7136.0,-7520.0,7328.0,-7328.0)
set p=Player(15)
set II11I=CreateUnit(p,1966092378,7360.0,-4416.0,270.000)
call SetUnitColor(II11I,ConvertPlayerColor(12))
set II1II=CreateUnit(p,1966092378,-7296.0,4160.0,270.000)
call SetUnitColor(II1II,ConvertPlayerColor(12))
set u=CreateUnit(p,1967339316,3008.0,0.0,270.000)
call SetUnitColor(u,ConvertPlayerColor(1))
set u=CreateUnit(p,1967339316,-4608.0,1152.0,270.000)
call SetUnitColor(u,ConvertPlayerColor(1))
set p=Player(15)
set IIIII=CreateUnit(p,1697656900,-6043.9,5314.7,212.150)
set II10I=CreateUnit(p,1697656898,-713.7,-515.7,325.600)
set II1OI=CreateUnit(p,1697656897,5853.5,-6214.9,64.000)
set III1I=CreateUnit(p,1697656888,-4690.8,-6680.8,349.599)
set III0I=CreateUnit(p,1697656881,4836.0,4372.2,212.110)
call ConfigureNeutralVictim()
set I0010O=Filter(function I01I0O)
set filterIssueHauntOrderAtLocBJ=Filter(function IssueHauntOrderAtLocBJFilter)
set filterEnumDestructablesInCircleBJ=Filter(function I0IO1O)
set filterGetUnitsInRectOfPlayer=Filter(function GetUnitsInRectOfPlayerFilter)
set filterGetUnitsOfTypeIdAll=Filter(function GetUnitsOfTypeIdAllFilter)
set filterGetUnitsOfPlayerAndTypeId=Filter(function GetUnitsOfPlayerAndTypeIdFilter)
set filterMeleeTrainedUnitIsHeroBJ=Filter(function MeleeTrainedUnitIsHeroBJFilter)
set filterLivingPlayerUnitsOfTypeId=Filter(function LivingPlayerUnitsOfTypeIdFilter)
set OO0IO0=0
loop
exitwhen OO0IO0==16
set bj_FORCE_PLAYER[OO0IO0]=CreateForce()
call ForceAddPlayer(bj_FORCE_PLAYER[OO0IO0],Player(OO0IO0))
set OO0IO0=OO0IO0+1
endloop
set bj_FORCE_ALL_PLAYERS=CreateForce()
call ForceEnumPlayers(bj_FORCE_ALL_PLAYERS,null)
set bj_cineModePriorSpeed=GetGameSpeed()
set bj_cineModePriorFogSetting=IsFogEnabled()
set bj_cineModePriorMaskSetting=IsFogMaskEnabled()
set OO0IO0=0
loop
exitwhen OO0IO0>=bj_MAX_QUEUED_TRIGGERS
set bj_queuedExecTriggers[OO0IO0]=null
set bj_queuedExecUseConds[OO0IO0]=false
set OO0IO0=OO0IO0+1
endloop
set bj_isSinglePlayer=false
set IIOO11O=0
set OO0IO0=0
loop
exitwhen OO0IO0>=12
if(GetPlayerController(Player(OO0IO0))==MAP_CONTROL_USER and GetPlayerSlotState(Player(OO0IO0))==PLAYER_SLOT_STATE_PLAYING)then
set IIOO11O=IIOO11O+1
endif
set OO0IO0=OO0IO0+1
endloop
set bj_isSinglePlayer=(IIOO11O==1)
set bj_rescueSound=CreateSoundFromLabel("Rescue",false,false,false,10000,10000)
set bj_questDiscoveredSound=CreateSoundFromLabel("QuestNew",false,false,false,10000,10000)
set bj_questUpdatedSound=CreateSoundFromLabel("QuestUpdate",false,false,false,10000,10000)
set bj_questCompletedSound=CreateSoundFromLabel("QuestCompleted",false,false,false,10000,10000)
set bj_questFailedSound=CreateSoundFromLabel("QuestFailed",false,false,false,10000,10000)
set bj_questHintSound=CreateSoundFromLabel("Hint",false,false,false,10000,10000)
set bj_questSecretSound=CreateSoundFromLabel("SecretFound",false,false,false,10000,10000)
set bj_questItemAcquiredSound=CreateSoundFromLabel("ItemReward",false,false,false,10000,10000)
set bj_questWarningSound=CreateSoundFromLabel("Warning",false,false,false,10000,10000)
set bj_victoryDialogSound=CreateSoundFromLabel("QuestCompleted",false,false,false,10000,10000)
set bj_defeatDialogSound=CreateSoundFromLabel("QuestFailed",false,false,false,10000,10000)
call DelayedSuspendDecayCreate()
set v=VersionGet()
if(v==VERSION_REIGN_OF_CHAOS)then
set bj_MELEE_MAX_TWINKED_HEROES=bj_MELEE_MAX_TWINKED_HEROES_V0
else
set bj_MELEE_MAX_TWINKED_HEROES=bj_MELEE_MAX_TWINKED_HEROES_V1
endif
call InitQueuedTriggers()
call InitRescuableBehaviorBJ()
call InitDNCSounds()
call InitMapRects()
call InitSummonableCaps()
set I01O1O=0
loop
set bj_stockAllowedPermanent[I01O1O]=false
set bj_stockAllowedCharged[I01O1O]=false
set bj_stockAllowedArtifact[I01O1O]=false
set I01O1O=I01O1O+1
exitwhen I01O1O>10
endloop
call SetAllItemTypeSlots(11)
call SetAllUnitTypeSlots(11)
set bj_stockUpdateTimer=CreateTimer()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INITIAL_DELAY,false,function I01IOO)
set bj_stockItemPurchased=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(15),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerAddAction(bj_stockItemPurchased,function RemovePurchasedItem)
call DetectGameStarted()
set i=0
set i=0
loop
exitwhen(i>16)
set O[i]=0
set OO[i]=0
set IO[i]=0
set IO0[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>100)
set I[i]=false
set OO10[i]=0
set O0O0[i]=0
set O000[i]=0
set O0I0[i]=0
set OIO0[i]=0
set OII0[i]=0
set OOII[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>4)
set O0[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>2)
set OI[i]=false
set I00[i]=0
set IOO0[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>12)
set O0O[i]=""
set O1O[i]=CreateTimer()
set IOO[i]=0
set IIO[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>13)
set OIO[i]=false
set I0O[i]=CreateTimer()
set I0I[i]=false
set I0O0[i]=0
set I000[i]=0
set I010[i]=0
set O0OIO[i]=false
set i=i+1
endloop
set I1O=CreateTimer()
set i=0
loop
exitwhen(i>1)
set OO0[i]=0
set OOO1O[i]=""
set OO00O[i]=false
set OO0IO[i]=0
set O0O0O[i]=false
set i=i+1
endloop
set III=150
set O01O=true
set OIOO=true
set OI0O=true
set OIIO=true
set OI1O=true
set O1OO=true
set O10O=true
set O1IO=true
set O11O=true
set IOOO=true
set IO0O=true
set IOIO=true
set IO1O=3
set I0OO=1
set O010=80
set i=0
loop
exitwhen(i>17)
set OI10[i]=null
set i=i+1
endloop
set i=0
loop
exitwhen(i>40)
set IO00[i]=0
set IOI0[i]=0
set IO10[i]=0
set i=i+1
endloop
set IIO0=CreateForce()
set II00=CreateForce()
set IO1I=CreateGroup()
set I10I=CreateTimer()
set OOIOO=CreateForce()
set OOIIO=0.00
set OO1OO=true
set OO10O=true
set i=0
loop
exitwhen(i>14)
set OO11O[i]=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>15)
set O01OO[i]="Here"
set i=i+1
endloop
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,15,true)
call TriggerAddCondition(t,Condition(function I1010O))
set t=null
set I1O1I[0]=false
set I1O1I[1]=false
set I1O1I[2]=false
set I1O1I[3]=false
set I1O1I[4]=false
set I1O1I[5]=false
set I1O1I[6]=false
set I1O1I[7]=false
set I1O1I[8]=false
set I1O1I[9]=false
set I1O1I[10]=false
set I1O1I[11]=false
set I1O1I[12]=false
set I1O1I[13]=false
set I1O1I[14]=false
set I1O1I[15]=false
set I1O1I[16]=false
call OIII10()
call OI1OO0()
call OI1O00()
call OI1OI0()
call OI1O10()
call OI1110()
call O1OOI0()
call O1OO10()
call O1O000()
call O10O00()
call O1OII0()
call O10OI0()
set I01O0=CreateTrigger()
call TriggerRegisterTimerEventSingle(I01O0,0.01)
call TriggerAddAction(I01O0,function O10O10)
set t=CreateTrigger()
call TriggerRegisterPlayerEventLeave(t,III0[1])
call TriggerRegisterPlayerEventLeave(t,III0[2])
call TriggerRegisterPlayerEventLeave(t,III0[3])
call TriggerRegisterPlayerEventLeave(t,III0[4])
call TriggerRegisterPlayerEventLeave(t,III0[5])
call TriggerRegisterPlayerEventLeave(t,II10[1])
call TriggerRegisterPlayerEventLeave(t,II10[2])
call TriggerRegisterPlayerEventLeave(t,II10[3])
call TriggerRegisterPlayerEventLeave(t,II10[4])
call TriggerRegisterPlayerEventLeave(t,II10[5])
call TriggerAddAction(t,function O10I10)
if I0OI then
set t=CreateTrigger()
if IsPlayerObserver(O1OOIO)then
call TriggerRegisterPlayerEventLeave(t,O1OOIO)
endif
if IsPlayerObserver(O1OO1O)then
call TriggerRegisterPlayerEventLeave(t,O1OO1O)
endif
call TriggerAddAction(t,function O100O0)
endif
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_REVIVE_FINISH)
call TriggerAddAction(t,function O1I100)
set t=CreateTrigger()
call TriggerRegisterEnterRectSimple(t,bj_mapInitialPlayableArea)
call TriggerAddCondition(t,Condition(function I1O100))
call TriggerAddAction(t,function I10O00)
set O1010O=t
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SELL)
call TriggerAddAction(t,function I100O0)
call TriggerAddCondition(t,Condition(function I10O10))
set O101IO=t
set I0100=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(I0100,7.00)
call TriggerAddAction(I0100,function I10000)
set I01I0=CreateTrigger()
call TriggerRegisterTimerEventSingle(I01I0,0.01)
call TriggerAddAction(I01I0,function I100I0)
set I0110=CreateTrigger()
call TriggerAddAction(I0110,function I10I00)
set IIOO0=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IIOO0,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(IIOO0,Condition(function I10II0))
call TriggerAddAction(IIOO0,function I10I10)
set IIO00=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IIO00,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(IIO00,Condition(function I101O0))
call TriggerAddAction(IIO00,function I10100)
set IIOI0=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(IIOI0,1.00)
call TriggerAddAction(IIOI0,function I101I0)
if I0OI then
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddAction(t,function OOI0OI)
set O1IIOO=t
endif
set IIO10=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IIO10,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(IIO10,function OOI0II)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,0.5,true)
call TriggerAddCondition(t,Condition(function OO1O0I))
set t=null
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function O0OOOI))
call TriggerAddAction(t,function O0OO0I)
set II0O0=t
set II000=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(II000,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(II000,Condition(function O00OOI))
call TriggerAddAction(II000,function O00O0I)
set II0I0=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(II0I0,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(II0I0,Condition(function O00OII))
call TriggerAddAction(II0I0,function O0000I)
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,III0[0],EVENT_PLAYER_UNIT_DEATH,Condition(function OI0O00))
call TriggerRegisterPlayerUnitEvent(t,II10[0],EVENT_PLAYER_UNIT_DEATH,Condition(function OI0O00))
call TriggerAddCondition(t,Condition(function O001OI))
set t=null
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,0.5,true)
call TriggerAddCondition(t,Condition(function O0IO0I))
set t=null
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,.5,true)
call TriggerAddAction(t,function O0IO1I)
set O1100O=t
call TriggerRegisterUnitEvent(O1101O,OI0IIO,EVENT_UNIT_DEATH)
call TriggerAddAction(O1101O,function O01OOI)
call TriggerRegisterUnitEvent(O11IOO,O0I1OO,EVENT_UNIT_DEATH)
call TriggerAddAction(O11IOO,function O0I11I)
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function O010II))
set t=null
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O01I0I))
set t=null
set t=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(t,300.00)
call TriggerAddAction(t,function O0110I)
set II010=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(II010,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(II010,Condition(function O011II))
call TriggerAddAction(II010,function O0111I)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function OIOOOI))
call TriggerAddAction(t,function OIOO0I)
set O11I1O=CreateRegion()
call RegionAddRect(O11I1O,I0OIO)
call RegionAddRect(O11I1O,I0O1O)
call RegionAddRect(O11I1O,I00OO)
call RegionAddRect(O11I1O,I000O)
call RegionAddRect(O11I1O,I00IO)
call RegionAddRect(O11I1O,I001O)
call RegionAddRect(O11I1O,I0IOO)
call RegionAddRect(O11I1O,I0I0O)
call RegionAddRect(O11I1O,I0IIO)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddAction(t,function OIO01I)
call TriggerAddCondition(t,Condition(function OIOOII))
set IIIO0=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IIIO0,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(IIIO0,Condition(function OIOIOI))
call TriggerAddAction(IIIO0,function OIOI0I)
set III00=CreateTrigger()
call TriggerRegisterEnterRectSimple(III00,bj_mapInitialPlayableArea)
call TriggerAddCondition(III00,Condition(function OIOI1I))
call TriggerAddAction(III00,function OIO1OI)
set IIII0=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IIII0,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(IIII0,Condition(function OIO10I))
call TriggerAddAction(IIII0,function OI0OOI)
set III10=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(III10,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(III10,Condition(function OI0O0I))
call TriggerAddAction(III10,function OI00OI)
if OI00II()then
call OI011I()
endif
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,O0OI,"-wtf",true)
call TriggerAddAction(t,function OII0OI)
call TriggerAddCondition(t,Condition(function OIIOOI))
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,O0OI,"-test",true)
call TriggerAddCondition(t,Condition(function OIIIOI))
set t=null
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(t,function OIIIII)
call TriggerAddCondition(t,Condition(function OIII0I))
call OIII1I()
set II1O0=CreateTrigger()
call TriggerRegisterUnitInRangeSimple(II1O0,300.00,II1OI)
call TriggerRegisterUnitInRangeSimple(II1O0,300.00,II10I)
call TriggerRegisterUnitInRangeSimple(II1O0,300.00,IIIII)
call TriggerAddCondition(II1O0,Condition(function OII1OI))
call TriggerAddAction(II1O0,function OII10I)
set II100=CreateTrigger()
call TriggerRegisterTimerEventSingle(II100,2699.00)
call TriggerAddAction(II100,function OII1II)
set II1I0=CreateTrigger()
call TriggerRegisterTimerEventSingle(II1I0,999.00)
call TriggerRegisterTimerEventSingle(II1I0,1999.00)
call TriggerRegisterTimerEventSingle(II1I0,2999.00)
call TriggerAddAction(II1I0,function OII11I)
set II110=CreateTrigger()
call TriggerRegisterEnterRectSimple(II110,OIIIO)
call TriggerRegisterEnterRectSimple(II110,OIO1O)
call TriggerAddCondition(II110,Condition(function OI1OOI))
call TriggerAddAction(II110,function OI1O0I)
set I1OO0=CreateTrigger()
call TriggerRegisterEnterRectSimple(I1OO0,OI00O)
call TriggerRegisterEnterRectSimple(I1OO0,O01IO)
call TriggerAddCondition(I1OO0,Condition(function OI1OII))
call TriggerAddAction(I1OO0,function OI1O1I)
set I1O00=CreateTrigger()
call TriggerRegisterEnterRectSimple(I1O00,OII0O)
call TriggerRegisterEnterRectSimple(I1O00,OIOIO)
call TriggerAddCondition(I1O00,Condition(function OI10OI))
call TriggerAddAction(I1O00,function OI100I)
set I1OI0=CreateTrigger()
call TriggerRegisterEnterRectSimple(I1OI0,O011O)
call TriggerRegisterEnterRectSimple(I1OI0,OI0IO)
call TriggerAddCondition(I1OI0,Condition(function OI10II))
call TriggerAddAction(I1OI0,function OI101I)
set I1O10=CreateTrigger()
call TriggerRegisterEnterRectSimple(I1O10,OI0OO)
call TriggerRegisterEnterRectSimple(I1O10,O010O)
call TriggerAddCondition(I1O10,Condition(function OI1IOI))
call TriggerAddAction(I1O10,function OI1I0I)
set I10O0=CreateTrigger()
call TriggerRegisterEnterRectSimple(I10O0,OIO0O)
call TriggerRegisterEnterRectSimple(I10O0,OIIOO)
call TriggerAddCondition(I10O0,Condition(function OI1III))
call TriggerAddAction(I10O0,function OI1I1I)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,20,false)
call TriggerAddAction(t,function OI110I)
set I1000=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(I1000,30.00)
call TriggerAddCondition(I1000,Condition(function OI11II))
call TriggerAddAction(I1000,function O1OOII)
set I10I0=CreateTrigger()
call TriggerRegisterUnitEvent(I10I0,O01I1O,EVENT_UNIT_DEATH)
call TriggerAddAction(I10I0,function O1O0OI)
set I1010=CreateTrigger()
call TriggerRegisterUnitEvent(I1010,O011OO,EVENT_UNIT_DEATH)
call TriggerAddAction(I1010,function O1O00I)
set I1IO0=CreateTrigger()
call TriggerRegisterUnitEvent(I1IO0,O0110O,EVENT_UNIT_DEATH)
call TriggerAddAction(I1IO0,function O1O0II)
set I1I00=CreateTrigger()
call TriggerRegisterUnitEvent(I1I00,O01IOO,EVENT_UNIT_DEATH)
call TriggerAddAction(I1I00,function O1O01I)
set I1II0=CreateTrigger()
call TriggerRegisterUnitEvent(I1II0,O01I0O,EVENT_UNIT_DEATH)
call TriggerAddAction(I1II0,function O1OIOI)
set I1I10=CreateTrigger()
call TriggerRegisterUnitEvent(I1I10,O01IIO,EVENT_UNIT_DEATH)
call TriggerAddAction(I1I10,function O1OI0I)
set I11O0=CreateTrigger()
call TriggerRegisterUnitEvent(I11O0,OIII0O,EVENT_UNIT_DEATH)
call TriggerAddAction(I11O0,function O1OIII)
set I1100=CreateTrigger()
call TriggerRegisterUnitEvent(I1100,OIIIIO,EVENT_UNIT_DEATH)
call TriggerAddAction(I1100,function O1OI1I)
set I11I0=CreateTrigger()
call TriggerRegisterUnitEvent(I11I0,OIII1O,EVENT_UNIT_DEATH)
call TriggerAddAction(I11I0,function O1O1OI)
set I1110=CreateTrigger()
call TriggerRegisterUnitEvent(I1110,OII0IO,EVENT_UNIT_DEATH)
call TriggerAddAction(I1110,function O1O10I)
set OOOOI=CreateTrigger()
call TriggerRegisterUnitEvent(OOOOI,OII01O,EVENT_UNIT_DEATH)
call TriggerAddAction(OOOOI,function O1O1II)
set OOO0I=CreateTrigger()
call TriggerRegisterUnitEvent(OOO0I,OIIIOO,EVENT_UNIT_DEATH)
call TriggerAddAction(OOO0I,function O1O11I)
set OOOII=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OOOII,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(OOOII,Condition(function O10OOI))
call TriggerAddAction(OOOII,function O10O0I)
set OOO1I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OOO1I,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(OOO1I,Condition(function O10OII))
call TriggerAddAction(OOO1I,function O10O1I)
set OO0OI=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(OO0OI,450.00)
call TriggerAddAction(OO0OI,function O100OI)
set OO00I=CreateTrigger()
call TriggerRegisterTimerEventSingle(OO00I,75.00)
call TriggerAddAction(OO00I,function O1000I)
set OO0II=CreateTrigger()
call TriggerRegisterTimerEventSingle(OO0II,90.00)
call TriggerAddAction(OO0II,function O1001I)
set OO01I=CreateTrigger()
call DisableTrigger(OO01I)
call TriggerRegisterTimerEventPeriodic(OO01I,60.00)
call TriggerAddAction(OO01I,function O10I1I)
set OOIOI=CreateTrigger()
call DisableTrigger(OOIOI)
call TriggerRegisterTimerEventPeriodic(OOIOI,780.00)
call TriggerAddAction(OOIOI,function O1010I)
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(t,Condition(function O1IO0I))
set t=null
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O1I00I))
set t=null
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,II1II,EVENT_UNIT_SELL_ITEM)
call TriggerRegisterUnitEvent(t,II11I,EVENT_UNIT_SELL_ITEM)
call TriggerAddCondition(t,Condition(function O1I0II))
set t=null
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(t,Condition(function O1I01I))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(t,Condition(function O1I10I))
set t=null
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call O0O100(t,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddCondition(t,Condition(function O11O0I))
set t=null
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function O110II))
set t=null
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IOOIII))
set t=null
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function IOO1II))
set t=null
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IO00OI))
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddAction(t,function IO0IOI)
call TriggerAddCondition(t,Condition(function IO001I))
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddAction(t,function IO0I0I)
call TriggerAddCondition(t,Condition(function IO001I))
set t=CreateTrigger()
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(t,function IOIO0I)
call TriggerAddCondition(t,Condition(function IO0III))
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function IOI0OI))
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SELL_ITEM)
call TriggerAddAction(t,function IOI00I)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IOI01I))
call TriggerAddAction(t,function IOIIII)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SELL_ITEM)
call TriggerAddAction(t,function IOII1I)
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IO1OII))
set t=null
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddAction(t,function IO10II)
call TriggerAddCondition(t,Condition(function IO100I))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IO110I))
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(t,Condition(function I0OO0I))
set t=null
set OOI0I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OOI0I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(OOI0I,Condition(function I0OOII))
call TriggerAddAction(OOI0I,function I0OO1I)
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function I0O0II))
set t=null
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(t,Condition(function I00O1I))
call TriggerAddAction(t,function I000OI)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(t,function I00OII)
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(t,Condition(function I001OI))
set t=null
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(t,Condition(function I0010I))
call TriggerAddAction(t,function I001II)
set IOOO1O=t
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddAction(t,function I0011I)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddAction(t,function I0IOOI)
set OOIII=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OOIII,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(OOIII,Condition(function I0IO0I))
call TriggerAddAction(OOIII,function I0IOII)
set OOI1I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OOI1I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(OOI1I,Condition(function I0IO1I))
call TriggerAddAction(OOI1I,function I0I0OI)
set OO1OI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OO1OI,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(OO1OI,Condition(function I0I00I))
call TriggerAddAction(OO1OI,function I0I0II)
set OO10I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OO10I,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(OO10I,Condition(function I0I01I))
call TriggerAddAction(OO10I,function I0IIOI)
set OO1II=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OO1II,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(OO1II,Condition(function I0II0I))
call TriggerAddAction(OO1II,function I0IIII)
set OO11I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OO11I,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(OO11I,Condition(function I0II1I))
call TriggerAddAction(OO11I,function I0I10I)
set O0OOI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O0OOI,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(O0OOI,Condition(function I0I1II))
call TriggerAddAction(O0OOI,function I0I11I)
set O0O0I=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(O0O0I,120.00)
call TriggerAddAction(O0O0I,function I01O0I)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(t,Condition(function I01OII))
call TriggerAddAction(t,function I0100I)
set O0OII=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O0OII,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddAction(O0OII,function I011OI)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(t,Condition(function I0110I))
call TriggerAddAction(t,function I011II)
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call O0O100(t,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddCondition(t,Condition(function IIO00I))
set t=null
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(t,Condition(function IIO01I))
set t=null
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IIOI0I))
call TriggerAddAction(t,function IIOIII)
set O0O1I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(O0O1I,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddAction(O0O1I,function IIO1OI)
set t=CreateTrigger()
call O0O100(t,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(t,Condition(function II00OI))
call II0OOI()
set IOO01O=t
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function II0OII))
set t=null
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,2,false)
call TriggerAddAction(t,function II100I)
set t=CreateTrigger()
call TriggerRegisterEnterRectSimple(t,GetWorldBounds())
call TriggerAddCondition(t,Condition(function II10II))
call TriggerAddAction(t,function II101I)
set t=CreateTrigger()
call TriggerRegisterUnitInRangeSimple(t,300.00,II1OI)
call TriggerRegisterUnitInRangeSimple(t,300.00,II10I)
call TriggerRegisterUnitInRangeSimple(t,300.00,IIIII)
call TriggerAddCondition(t,Condition(function II1IOI))
call TriggerAddAction(t,function II1I0I)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,25,false)
call TriggerAddAction(t,function I1OOOI)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,25,false)
call TriggerAddAction(t,function I1O00I)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function I1OI0I))
call TriggerAddAction(t,function I1OI1I)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddAction(t,function I10OII)
call TriggerAddCondition(t,Condition(function I1O11I))
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,2,true)
call TriggerAddAction(t,function I100OI)
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,III0[1],"-",false)
call TriggerRegisterPlayerChatEvent(t,III0[2],"-",false)
call TriggerRegisterPlayerChatEvent(t,III0[3],"-",false)
call TriggerRegisterPlayerChatEvent(t,III0[4],"-",false)
call TriggerRegisterPlayerChatEvent(t,III0[5],"-",false)
call TriggerRegisterPlayerChatEvent(t,II10[1],"-",false)
call TriggerRegisterPlayerChatEvent(t,II10[2],"-",false)
call TriggerRegisterPlayerChatEvent(t,II10[3],"-",false)
call TriggerRegisterPlayerChatEvent(t,II10[4],"-",false)
call TriggerRegisterPlayerChatEvent(t,II10[5],"-",false)
call TriggerAddAction(t,function I1000I)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(t,Condition(function OOO00IO))
call TriggerAddAction(t,function OOO0IIO)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(t,Condition(function OOO01IO))
call TriggerAddAction(t,function OOO011O)
set IOO1OO[0]=false
set IOO1OO[1]=false
set IOO1OO[2]=false
set IOO1OO[3]=false
set IOO1OO[4]=false
set IOO1OO[5]=false
set IOO1OO[6]=false
set IOO1OO[7]=false
set IOO1OO[8]=false
set IOO1OO[9]=false
set IOO1OO[10]=false
set IOO1OO[11]=false
set IOO1OO[12]=false
set IOO1OO[13]=false
set IOO1OO[14]=false
set IOO1OO[15]=false
set IOO1OO[16]=false
set IOO10O[0]=false
set IOO10O[1]=false
set IOO10O[2]=false
set IOO10O[3]=false
set IOO10O[4]=false
set IOO10O[5]=false
set IOO10O[6]=false
set IOO10O[7]=false
set IOO10O[8]=false
set IOO10O[9]=false
set IOO10O[10]=false
set IOO10O[11]=false
set IOO10O[12]=false
set IOO10O[13]=false
set IOO10O[14]=false
set IOO10O[15]=false
set IOO10O[16]=false
set IOO10O[GetPlayerId(III0[1])]=true
set IOO10O[GetPlayerId(III0[2])]=true
set IOO10O[GetPlayerId(III0[3])]=true
set IOO10O[GetPlayerId(III0[4])]=true
set IOO10O[GetPlayerId(III0[5])]=true
set IOO10O[GetPlayerId(II10[1])]=true
set IOO10O[GetPlayerId(II10[2])]=true
set IOO10O[GetPlayerId(II10[3])]=true
set IOO10O[GetPlayerId(II10[4])]=true
set IOO10O[GetPlayerId(II10[5])]=true
set IO0O1O[GetPlayerId(III0[1])]=false
set IO0O1O[GetPlayerId(III0[2])]=false
set IO0O1O[GetPlayerId(III0[3])]=false
set IO0O1O[GetPlayerId(III0[4])]=false
set IO0O1O[GetPlayerId(III0[5])]=false
set IO0O1O[GetPlayerId(II10[1])]=false
set IO0O1O[GetPlayerId(II10[2])]=false
set IO0O1O[GetPlayerId(II10[3])]=false
set IO0O1O[GetPlayerId(II10[4])]=false
set IO0O1O[GetPlayerId(II10[5])]=false
set t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,O0OI,"-",false)
call TriggerAddAction(t,function OOO10IO)
call TriggerAddCondition(t,Condition(function OOOI10O))
set O00OI=CreateTrigger()
call TriggerRegisterTimerExpireEvent(O00OI,O1O[1])
call TriggerAddAction(O00OI,function OOII1OO)
set O000I=CreateTrigger()
call TriggerRegisterTimerExpireEvent(O000I,O1O[2])
call TriggerAddAction(O000I,function OOII10O)
set O00II=CreateTrigger()
call TriggerRegisterTimerExpireEvent(O00II,O1O[3])
call TriggerAddAction(O00II,function OOII1IO)
set O001I=CreateTrigger()
call TriggerRegisterTimerExpireEvent(O001I,O1O[4])
call TriggerAddAction(O001I,function OOII11O)
set O0IOI=CreateTrigger()
call TriggerRegisterTimerExpireEvent(O0IOI,O1O[5])
call TriggerAddAction(O0IOI,function OOI1OOO)
set O0I0I=CreateTrigger()
call TriggerRegisterTimerExpireEvent(O0I0I,O1O[7])
call TriggerAddAction(O0I0I,function OOI1O0O)
set O0III=CreateTrigger()
call TriggerRegisterTimerExpireEvent(O0III,O1O[8])
call TriggerAddAction(O0III,function OOI1OIO)
set O0I1I=CreateTrigger()
call TriggerRegisterTimerExpireEvent(O0I1I,O1O[9])
call TriggerAddAction(O0I1I,function OOI1O1O)
set O01OI=CreateTrigger()
call TriggerRegisterTimerExpireEvent(O01OI,O1O[10])
call TriggerAddAction(O01OI,function OOI10OO)
set O010I=CreateTrigger()
call TriggerRegisterTimerExpireEvent(O010I,O1O[11])
call TriggerAddAction(O010I,function OOI100O)
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,14,false)
call TriggerAddCondition(t,Condition(function OOI101O))
set t=CreateTrigger()
call TriggerRegisterTimerEvent(t,15,false)
call TriggerAddCondition(t,Condition(function OOI10IO))
set O01II=CreateTrigger()
call TriggerRegisterTimerEventSingle(O01II,65.00)
call TriggerAddAction(O01II,function OOI1IOO)
set O011I=CreateTrigger()
call TriggerRegisterTimerEventSingle(O011I,90.00)
call TriggerAddAction(O011I,function OOI1I0O)
set OIOOI=CreateTrigger()
call TriggerRegisterTimerEventSingle(OIOOI,120.00)
call TriggerAddAction(OIOOI,function OOI1IIO)
set IOI1I=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IOI1I,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(IOI1I,Condition(function O1I00OO))
call TriggerAddAction(IOI1I,function O1I000O)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function IIOO01O))
call TriggerAddAction(t,function IIOOIOO)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IIOOI0O))
call TriggerAddAction(t,function IIOOIIO)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function IIOOI1O))
call TriggerAddAction(t,function IIOO1OO)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(t,function IIOO1IO)
endfunction
function config takes nothing returns nothing
call SetMapName("DotA Allstars v6.49b")
call SetMapDescription("Choose from 89 unique heroes in an epic battle to defend the Ancients.
Modes:|c001e90ff-ap,-ar,-lm,-rd,-mm,-xl,-dm,-tr,-vr,-rv,-mr,-du,-sp,-sh,-aa,-ai,-as,-id,-em,-sc,-np,-om,-nt,-nm,-nb,-ns,-nr,-ts|r")
call SetPlayers(10)
call SetTeams(10)
call SetGamePlacement(MAP_PLACEMENT_TEAMS_TOGETHER)
call DefineStartLocation(0,-6272.0,-6912.0)
call DefineStartLocation(1,-6272.0,-6912.0)
call DefineStartLocation(2,-6272.0,-6912.0)
call DefineStartLocation(3,-6272.0,-6912.0)
call DefineStartLocation(4,-6272.0,-6912.0)
call DefineStartLocation(5,6080.0,6400.0)
call DefineStartLocation(6,6080.0,6400.0)
call DefineStartLocation(7,6080.0,6400.0)
call DefineStartLocation(8,6080.0,6400.0)
call DefineStartLocation(9,6080.0,6400.0)
call SetPlayerStartLocation(Player(1),0)
call ForcePlayerStartLocation(Player(1),0)
call SetPlayerColor(Player(1),ConvertPlayerColor(1))
call SetPlayerRacePreference(Player(1),RACE_PREF_NIGHTELF)
call SetPlayerRaceSelectable(Player(1),false)
call SetPlayerController(Player(1),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(2),1)
call ForcePlayerStartLocation(Player(2),1)
call SetPlayerColor(Player(2),ConvertPlayerColor(2))
call SetPlayerRacePreference(Player(2),RACE_PREF_NIGHTELF)
call SetPlayerRaceSelectable(Player(2),false)
call SetPlayerController(Player(2),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(3),2)
call ForcePlayerStartLocation(Player(3),2)
call SetPlayerColor(Player(3),ConvertPlayerColor(3))
call SetPlayerRacePreference(Player(3),RACE_PREF_NIGHTELF)
call SetPlayerRaceSelectable(Player(3),false)
call SetPlayerController(Player(3),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(4),3)
call ForcePlayerStartLocation(Player(4),3)
call SetPlayerColor(Player(4),ConvertPlayerColor(4))
call SetPlayerRacePreference(Player(4),RACE_PREF_NIGHTELF)
call SetPlayerRaceSelectable(Player(4),false)
call SetPlayerController(Player(4),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(5),4)
call ForcePlayerStartLocation(Player(5),4)
call SetPlayerColor(Player(5),ConvertPlayerColor(5))
call SetPlayerRacePreference(Player(5),RACE_PREF_NIGHTELF)
call SetPlayerRaceSelectable(Player(5),false)
call SetPlayerController(Player(5),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(7),5)
call ForcePlayerStartLocation(Player(7),5)
call SetPlayerColor(Player(7),ConvertPlayerColor(7))
call SetPlayerRacePreference(Player(7),RACE_PREF_UNDEAD)
call SetPlayerRaceSelectable(Player(7),false)
call SetPlayerController(Player(7),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(8),6)
call ForcePlayerStartLocation(Player(8),6)
call SetPlayerColor(Player(8),ConvertPlayerColor(8))
call SetPlayerRacePreference(Player(8),RACE_PREF_UNDEAD)
call SetPlayerRaceSelectable(Player(8),false)
call SetPlayerController(Player(8),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(9),7)
call ForcePlayerStartLocation(Player(9),7)
call SetPlayerColor(Player(9),ConvertPlayerColor(9))
call SetPlayerRacePreference(Player(9),RACE_PREF_UNDEAD)
call SetPlayerRaceSelectable(Player(9),false)
call SetPlayerController(Player(9),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(10),8)
call ForcePlayerStartLocation(Player(10),8)
call SetPlayerColor(Player(10),ConvertPlayerColor(10))
call SetPlayerRacePreference(Player(10),RACE_PREF_UNDEAD)
call SetPlayerRaceSelectable(Player(10),false)
call SetPlayerController(Player(10),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(11),9)
call ForcePlayerStartLocation(Player(11),9)
call SetPlayerColor(Player(11),ConvertPlayerColor(11))
call SetPlayerRacePreference(Player(11),RACE_PREF_UNDEAD)
call SetPlayerRaceSelectable(Player(11),false)
call SetPlayerController(Player(11),MAP_CONTROL_USER)
call InitCustomTeams()
call SetStartLocPrioCount(0,4)
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 SetStartLocPrioCount(1,4)
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 SetStartLocPrioCount(2,4)
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 SetStartLocPrioCount(3,4)
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 SetStartLocPrioCount(4,4)
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 SetStartLocPrioCount(5,4)
call SetStartLocPrio(5,0,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(5,1,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(5,2,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(5,3,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(6,4)
call SetStartLocPrio(6,0,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(6,1,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(6,2,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(6,3,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(7,4)
call SetStartLocPrio(7,0,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(7,1,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(7,2,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(7,3,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(8,4)
call SetStartLocPrio(8,0,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,1,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,2,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,3,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(9,4)
call SetStartLocPrio(9,0,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,1,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,2,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,3,8,MAP_LOC_PRIO_HIGH)
endfunction
function InitTrig_init takes nothing returns nothing
set udg_trigger148 = CreateTrigger()
set udg_trigger149 = CreateTrigger()
call ExecuteFunc("main2")
endfunction