native UnitAlive takes unit u returns boolean
Name | Type | is_array | initial_value |
_AbilityA | ability | No | |
_BooleanA | boolean | No | |
_IntegerA | integer | No | |
_IntegerB | integer | No | |
_LocA | location | No | |
_NearestEnemyUnit | unit | No | |
_PlayerA | player | No | |
_PointA | location | No | |
_PointB | location | No | |
_RealA | real | No | |
_UnitA | unit | No | |
_UnitB | unit | No | |
_UnitGroupA | group | No | |
AirOnlyMode | boolean | No | |
Argis | unit | No | |
AttackMovePoint | location | No | |
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 | |
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 | |
button01 | button | No | |
button02 | button | No | |
button03 | button | No | |
button04 | button | No | |
button05 | button | No | |
button06 | button | No | |
button07 | button | No | |
button08 | button | No | |
button09 | button | No | |
button10 | button | No | |
camerasetup01 | camerasetup | No | |
camerasetup02 | camerasetup | No | |
Concentration | integer | No | |
CurrentTarget | unit | Yes | |
destructable01 | destructable | No | |
destructable02 | destructable | No | |
destructable03 | destructable | No | |
destructable04 | destructable | No | |
destructable05 | destructable | No | |
destructable06 | destructable | No | |
destructable07 | destructable | No | |
destructable08 | destructable | No | |
destructable09 | destructable | No | |
destructable10 | destructable | No | |
destructable11 | destructable | No | |
destructable12 | destructable | No | |
dialog01 | dialog | No | |
dialog02 | dialog | No | |
FirstName | string | Yes | |
FirstNameCount | integer | No | |
force01 | force | No | |
force02 | force | No | |
force03 | force | No | |
force04 | force | No | |
force05 | force | No | |
force06 | force | No | |
force07 | force | No | |
force08 | force | No | |
force09 | force | No | |
force10 | force | No | |
force11 | force | No | |
ForceGenesisEnding | boolean | No | |
forces01 | force | Yes | |
gamecache01 | gamecache | No | |
gamecache02 | gamecache | No | |
gamecache03 | gamecache | No | |
gamecache04 | gamecache | No | |
gamecache05 | gamecache | No | |
GhostChance | integer | No | |
group01 | group | No | |
group02 | group | No | |
group03 | group | No | |
group04 | group | No | |
group05 | group | No | |
group06 | group | No | |
group07 | group | No | |
group08 | group | No | |
group09 | group | No | |
group10 | group | No | |
group11 | group | No | |
group12 | group | No | |
group13 | group | No | |
group14 | group | No | |
group15 | group | No | |
group16 | group | No | |
group17 | group | No | |
group18 | group | No | |
group19 | group | No | |
group20 | group | No | |
group21 | group | No | |
group22 | group | No | |
group23 | group | No | |
group24 | group | No | |
group25 | group | No | |
group26 | group | No | |
group27 | group | No | |
group28 | group | No | |
group29 | group | No | |
group30 | group | No | |
group31 | group | No | |
groups01 | group | Yes | |
groups02 | group | Yes | |
hashtable01 | hashtable | No | |
hashtable02 | hashtable | No | |
HephaestusGroup | group | No | |
InitialPlayers | force | 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 | |
integer33 | integer | No | |
integer34 | integer | No | |
integer35 | integer | No | |
integer36 | integer | No | |
integer37 | integer | No | |
integer38 | integer | No | |
integer39 | integer | No | |
integer40 | integer | No | |
integer41 | integer | No | |
integer42 | integer | No | |
integer43 | integer | No | |
integer44 | integer | No | |
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 | |
item01 | item | No | |
item02 | item | No | |
items01 | item | Yes | |
items02 | item | Yes | |
items03 | item | Yes | |
LastName | string | Yes | |
LastNameCount | integer | No | |
Leadership | integer | No | |
lightning01 | lightning | No | |
LoadCode | string | Yes | |
LoadIndex | integer | No | |
location01 | location | No | |
location02 | location | No | |
location03 | location | No | |
locations01 | location | Yes | |
locations02 | location | Yes | |
locations03 | location | Yes | |
locations04 | location | Yes | |
LogMessagesOn | boolean | No | true |
MissionRadius | integer | Yes | |
multiboard01 | multiboard | No | |
NightmareEvolver | unit | No | |
NightmareMode | boolean | No | |
NoMosLimits | boolean | No | |
OriginalPlayerNames | string | Yes | |
player01 | player | No | |
player02 | player | No | |
players01 | player | Yes | |
Predator | unit | No | |
PredatorAngle | real | No | |
PredatorHeight | real | No | 2000.00 |
quest01 | quest | No | |
quest02 | quest | No | |
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 | .0 |
real13 | real | No | .0 |
real14 | real | No | |
real15 | real | No | |
real16 | real | No | |
real17 | real | No | |
real18 | real | No | |
reals01 | real | Yes | |
reals02 | real | Yes | |
reals03 | real | Yes | |
reals04 | real | Yes | |
RecentExecCount | integer | No | |
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 | |
rect16 | 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 | |
rects01 | rect | Yes | |
rects02 | rect | Yes | |
rects03 | rect | Yes | |
rects04 | rect | Yes | |
rects05 | rect | Yes | |
rects06 | rect | Yes | |
rects07 | rect | Yes | |
rects08 | rect | Yes | |
rects09 | rect | Yes | |
ShellsPerMission | integer | Yes | |
ShellsRemaining | integer | Yes | |
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 | |
sound100 | sound | No | |
sound101 | sound | No | |
sound102 | sound | No | |
sound103 | sound | No | |
sound104 | sound | No | |
sound105 | sound | No | |
sound106 | sound | No | |
sound107 | sound | No | |
sound108 | sound | No | |
sound109 | sound | No | |
sound11 | sound | No | |
sound110 | sound | No | |
sound111 | sound | No | |
sound112 | sound | No | |
sound113 | sound | No | |
sound114 | sound | No | |
sound115 | sound | No | |
sound116 | sound | No | |
sound117 | sound | No | |
sound118 | sound | No | |
sound119 | sound | No | |
sound12 | sound | No | |
sound120 | sound | No | |
sound121 | sound | No | |
sound122 | sound | No | |
sound123 | sound | No | |
sound124 | sound | No | |
sound125 | sound | No | |
sound126 | sound | No | |
sound127 | sound | No | |
sound128 | sound | No | |
sound129 | sound | No | |
sound13 | sound | No | |
sound130 | sound | No | |
sound131 | sound | No | |
sound132 | sound | No | |
sound133 | sound | No | |
sound134 | sound | No | |
sound135 | sound | No | |
sound136 | sound | No | |
sound137 | sound | No | |
sound138 | sound | No | |
sound139 | sound | No | |
sound14 | sound | No | |
sound140 | 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 | |
sound28 | sound | No | |
sound29 | sound | No | |
sound30 | sound | No | |
sound31 | sound | No | |
sound32 | sound | No | |
sound33 | sound | No | |
sound34 | sound | No | |
sound35 | sound | No | |
sound36 | sound | No | |
sound37 | sound | No | |
sound38 | sound | No | |
sound39 | sound | No | |
sound40 | sound | No | |
sound41 | sound | No | |
sound42 | sound | No | |
sound43 | sound | No | |
sound44 | sound | No | |
sound45 | sound | No | |
sound46 | sound | No | |
sound47 | sound | No | |
sound48 | sound | No | |
sound49 | sound | No | |
sound50 | sound | No | |
sound51 | sound | No | |
sound52 | sound | No | |
sound53 | sound | No | |
sound54 | sound | No | |
sound55 | sound | No | |
sound56 | sound | No | |
sound57 | sound | No | |
sound58 | sound | No | |
sound59 | sound | No | |
sound60 | sound | No | |
sound61 | sound | No | |
sound62 | sound | No | |
sound63 | sound | No | |
sound64 | sound | No | |
sound65 | sound | No | |
sound66 | sound | No | |
sound67 | sound | No | |
sound68 | sound | No | |
sound69 | sound | No | |
sound70 | sound | No | |
sound71 | sound | No | |
sound72 | sound | No | |
sound73 | sound | No | |
sound74 | sound | No | |
sound75 | sound | No | |
sound76 | sound | No | |
sound77 | sound | No | |
sound78 | sound | No | |
sound79 | sound | No | |
sound80 | sound | No | |
sound81 | sound | No | |
sound82 | sound | No | |
sound83 | sound | No | |
sound84 | sound | No | |
sound85 | sound | No | |
sound86 | sound | No | |
sound87 | sound | No | |
sound88 | sound | No | |
sound89 | sound | No | |
sound90 | sound | No | |
sound91 | sound | No | |
sound92 | sound | No | |
sound93 | sound | No | |
sound94 | sound | No | |
sound95 | sound | No | |
sound96 | sound | No | |
sound97 | sound | No | |
sound98 | sound | No | |
sound99 | sound | No | |
sounds01 | sound | Yes | |
sounds02 | sound | Yes | |
sounds03 | sound | Yes | |
sounds04 | sound | Yes | |
sounds05 | sound | Yes | |
sounds06 | sound | Yes | |
sounds07 | sound | Yes | |
string01 | string | No | |
string02 | string | No | |
string03 | string | No | -cheats |
string04 | string | No | |
string05 | string | No | |
strings01 | string | Yes | |
strings02 | string | Yes | |
strings03 | string | Yes | |
strings04 | string | Yes | |
strings05 | string | Yes | |
strings06 | string | Yes | |
strings07 | string | Yes | |
strings08 | string | Yes | |
SuppressItemSounds | boolean | No | |
SyncData | string | No | |
Temp_Group | group | No | |
Temp_Group2 | group | No | |
Temp_Group3 | group | No | |
Temp_Group4 | group | No | |
Temp_Group5 | group | No | |
Temp_Group6 | group | No | |
Temp_Group7 | group | No | |
Temp_Group8 | group | No | |
Temp_Group9 | group | No | |
Temp_Point | location | No | |
Temp_Point0 | location | No | |
Temp_Point1 | location | No | |
Temp_Point10 | location | No | |
Temp_Point11 | location | No | |
Temp_Point12 | location | No | |
Temp_Point2 | location | No | |
Temp_Point3 | location | No | |
Temp_Point4 | location | No | |
Temp_Point5 | location | No | |
Temp_Point6 | location | No | |
Temp_Point7 | location | No | |
Temp_Point8 | location | No | |
Temp_Point9 | location | No | |
Temp_Region | rect | No | |
Temp_Region1 | rect | No | |
temploc | location | No | |
TheUnabomber | player | No | |
timer01 | timer | No | |
timer02 | timer | No | |
timer03 | timer | No | |
timer04 | timer | No | |
timer05 | timer | No | |
timer06 | timer | No | |
timers01 | 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 | |
trigger154 | trigger | No | |
trigger155 | trigger | No | |
trigger156 | trigger | No | |
trigger157 | trigger | No | |
trigger158 | trigger | No | |
trigger159 | trigger | No | |
trigger16 | trigger | No | |
trigger160 | trigger | No | |
trigger161 | trigger | No | |
trigger162 | trigger | No | |
trigger163 | trigger | No | |
trigger164 | trigger | No | |
trigger165 | trigger | No | |
trigger166 | trigger | No | |
trigger167 | trigger | No | |
trigger168 | trigger | No | |
trigger169 | trigger | No | |
trigger17 | trigger | No | |
trigger170 | trigger | No | |
trigger171 | trigger | No | |
trigger172 | trigger | No | |
trigger173 | trigger | No | |
trigger174 | trigger | No | |
trigger175 | trigger | No | |
trigger176 | trigger | No | |
trigger177 | trigger | No | |
trigger178 | trigger | No | |
trigger179 | trigger | No | |
trigger18 | trigger | No | |
trigger180 | trigger | No | |
trigger181 | trigger | No | |
trigger182 | trigger | No | |
trigger183 | trigger | No | |
trigger184 | trigger | No | |
trigger185 | trigger | No | |
trigger186 | trigger | No | |
trigger187 | trigger | No | |
trigger188 | trigger | No | |
trigger189 | trigger | No | |
trigger19 | trigger | No | |
trigger190 | trigger | No | |
trigger191 | trigger | No | |
trigger192 | trigger | No | |
trigger193 | trigger | No | |
trigger194 | trigger | No | |
trigger195 | trigger | No | |
trigger196 | trigger | No | |
trigger197 | trigger | No | |
trigger198 | trigger | No | |
trigger199 | trigger | No | |
trigger20 | trigger | No | |
trigger200 | trigger | No | |
trigger201 | trigger | No | |
trigger202 | trigger | No | |
trigger203 | trigger | No | |
trigger204 | trigger | No | |
trigger205 | trigger | No | |
trigger206 | trigger | No | |
trigger207 | trigger | No | |
trigger208 | trigger | No | |
trigger209 | trigger | No | |
trigger21 | trigger | No | |
trigger210 | trigger | No | |
trigger211 | trigger | No | |
trigger212 | trigger | No | |
trigger213 | trigger | No | |
trigger214 | trigger | No | |
trigger215 | trigger | No | |
trigger216 | trigger | No | |
trigger217 | trigger | No | |
trigger218 | trigger | No | |
trigger219 | trigger | No | |
trigger22 | trigger | No | |
trigger220 | trigger | No | |
trigger221 | trigger | No | |
trigger222 | trigger | No | |
trigger223 | trigger | No | |
trigger224 | trigger | No | |
trigger225 | trigger | No | |
trigger226 | trigger | No | |
trigger227 | trigger | No | |
trigger228 | trigger | No | |
trigger229 | trigger | No | |
trigger23 | trigger | No | |
trigger230 | trigger | No | |
trigger231 | trigger | No | |
trigger232 | trigger | No | |
trigger233 | trigger | No | |
trigger234 | trigger | No | |
trigger235 | trigger | No | |
trigger236 | trigger | No | |
trigger237 | trigger | No | |
trigger238 | trigger | No | |
trigger239 | trigger | No | |
trigger24 | trigger | No | |
trigger240 | trigger | No | |
trigger241 | trigger | No | |
trigger242 | trigger | No | |
trigger243 | trigger | No | |
trigger244 | trigger | No | |
trigger245 | trigger | No | |
trigger246 | trigger | No | |
trigger247 | trigger | No | |
trigger248 | trigger | No | |
trigger249 | trigger | No | |
trigger25 | trigger | No | |
trigger250 | trigger | No | |
trigger251 | trigger | No | |
trigger252 | trigger | No | |
trigger253 | trigger | No | |
trigger254 | trigger | No | |
trigger255 | trigger | No | |
trigger256 | trigger | No | |
trigger257 | trigger | No | |
trigger258 | trigger | No | |
trigger259 | trigger | No | |
trigger26 | trigger | No | |
trigger260 | trigger | No | |
trigger261 | trigger | No | |
trigger262 | trigger | No | |
trigger263 | trigger | No | |
trigger264 | trigger | No | |
trigger265 | trigger | No | |
trigger266 | trigger | No | |
trigger267 | trigger | No | |
trigger268 | trigger | No | |
trigger269 | trigger | No | |
trigger27 | trigger | No | |
trigger270 | trigger | No | |
trigger271 | trigger | No | |
trigger272 | trigger | No | |
trigger273 | trigger | No | |
trigger274 | trigger | No | |
trigger275 | trigger | No | |
trigger276 | trigger | No | |
trigger277 | trigger | No | |
trigger278 | trigger | No | |
trigger279 | trigger | No | |
trigger28 | trigger | No | |
trigger280 | trigger | No | |
trigger281 | trigger | No | |
trigger282 | trigger | No | |
trigger283 | trigger | No | |
trigger284 | trigger | No | |
trigger285 | trigger | No | |
trigger286 | trigger | No | |
trigger287 | trigger | No | |
trigger288 | trigger | No | |
trigger289 | trigger | No | |
trigger29 | trigger | No | |
trigger290 | trigger | No | |
trigger291 | trigger | No | |
trigger292 | trigger | No | |
trigger293 | trigger | No | |
trigger294 | trigger | No | |
trigger295 | trigger | No | |
trigger296 | trigger | No | |
trigger297 | trigger | No | |
trigger298 | trigger | No | |
trigger299 | trigger | No | |
trigger30 | trigger | No | |
trigger300 | trigger | No | |
trigger301 | trigger | No | |
trigger302 | trigger | No | |
trigger303 | trigger | No | |
trigger304 | trigger | No | |
trigger305 | trigger | No | |
trigger306 | trigger | No | |
trigger307 | trigger | No | |
trigger308 | trigger | No | |
trigger309 | trigger | No | |
trigger31 | trigger | No | |
trigger310 | trigger | No | |
trigger311 | trigger | No | |
trigger312 | trigger | No | |
trigger313 | trigger | No | |
trigger314 | trigger | No | |
trigger315 | trigger | No | |
trigger316 | trigger | No | |
trigger317 | trigger | No | |
trigger318 | trigger | No | |
trigger319 | trigger | No | |
trigger32 | trigger | No | |
trigger320 | trigger | No | |
trigger321 | trigger | No | |
trigger322 | trigger | No | |
trigger323 | trigger | No | |
trigger324 | trigger | No | |
trigger325 | trigger | No | |
trigger326 | trigger | No | |
trigger327 | trigger | No | |
trigger328 | trigger | No | |
trigger329 | trigger | No | |
trigger33 | trigger | No | |
trigger330 | trigger | No | |
trigger331 | trigger | No | |
trigger332 | trigger | No | |
trigger333 | trigger | No | |
trigger334 | trigger | No | |
trigger335 | trigger | No | |
trigger336 | trigger | No | |
trigger337 | trigger | No | |
trigger338 | trigger | No | |
trigger339 | trigger | No | |
trigger34 | trigger | No | |
trigger340 | trigger | No | |
trigger341 | trigger | No | |
trigger342 | trigger | No | |
trigger343 | trigger | No | |
trigger344 | trigger | No | |
trigger345 | 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 | |
trigger97a | trigger | No | |
trigger98 | trigger | No | |
trigger99 | trigger | No | |
TurretCount | integer | No | 0 |
TurretPoint | location | No | |
UmbAI | boolean | No | |
UmbGroup | group | 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 | |
unit11 | 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 | |
units01 | unit | Yes | |
units02 | unit | Yes | |
units03 | unit | Yes | |
units04 | unit | Yes | |
units05 | unit | Yes | |
units06 | unit | Yes | |
units07 | unit | Yes | |
units10 | unit | Yes | |
weathereffect01 | weathereffect | No | |
weathereffect02 | weathereffect | No | |
WhitePhosphorusShellReq | integer | No | 0 |
ZombieAggroPlayerId | integer | No | |
ZombiePlayerUnits | group | Yes | |
ZombiesForce | force | No | |
ZombieSpawnPlayerId | integer | No | 13 |
function UADebugMessage takes string s returns nothing
set s=null
endfunction
function GetItemOfTypeFromUnit takes unit u,integer it returns integer
local integer i
set i=0
loop
exitwhen i>(UnitInventoryCount(u)-1)
if(it==GetItemTypeId(UnitItemInSlot(u,i)))then
return i
endif
set i=i+1
endloop
return 10
endfunction
function GetItemOfTypeFromUnitLast takes unit u,integer it returns integer
local integer i
set i=(UnitInventoryCount(u)-1)
loop
exitwhen i<0
if(it==GetItemTypeId(UnitItemInSlot(u,i)))then
return i
endif
set i=i-1
endloop
return 10
endfunction
function VXSleep takes real loc_real01 returns nothing
local real loc_real02
local real loc_real03=TimerGetElapsed(udg_timer06)
if loc_real03<=0 then
set udg_timer06=CreateTimer()
call TimerStart(udg_timer06,1000000,false,null)
endif
if(loc_real01>0)then
loop
set loc_real02=loc_real01-TimerGetElapsed(udg_timer06)+loc_real03
exitwhen loc_real02<=0
if(loc_real02>bj_POLLED_WAIT_SKIP_THRESHOLD)then
call TriggerSleepAction(.1*loc_real02)
else
call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)
endif
endloop
endif
endfunction
function Func0002 takes location loc_location01,real loc_real01,real loc_real02 returns location
return Location(GetLocationX(loc_location01)+loc_real01*Cos(loc_real02*bj_DEGTORAD),GetLocationY(loc_location01)+loc_real01*Sin(loc_real02*bj_DEGTORAD))
endfunction
function Func0003 takes nothing returns boolean
local destructable loc_destructable01=GetFilterDestructable()
local real loc_real01=GetDestructableX(loc_destructable01)-udg_real12
local real loc_real02=GetDestructableY(loc_destructable01)-udg_real13
return(loc_real01*loc_real01+loc_real02*loc_real02<=bj_enumDestructableRadius)
endfunction
function Func0004 takes real loc_real01,location loc_location01,code loc_code01 returns nothing
local rect loc_rect01
if(loc_real01>=0)then
set udg_real12=GetLocationX(loc_location01)
set udg_real13=GetLocationY(loc_location01)
set bj_enumDestructableRadius=loc_real01*loc_real01
set loc_rect01=Rect(udg_real12-bj_enumDestructableRadius,udg_real13-bj_enumDestructableRadius,udg_real12+bj_enumDestructableRadius,udg_real13+bj_enumDestructableRadius)
call EnumDestructablesInRect(loc_rect01,filterEnumDestructablesInCircleBJ,loc_code01)
call RemoveRect(loc_rect01)
set loc_rect01=null
endif
endfunction
function Func0005 takes rect loc_rect01,boolexpr loc_boolexpr01 returns group
set udg_group30=CreateGroup()
call GroupEnumUnitsInRect(udg_group30,loc_rect01,loc_boolexpr01)
call DestroyBoolExpr(loc_boolexpr01)
return udg_group30
endfunction
function Func0006 takes rect loc_rect01 returns group
set udg_group30=CreateGroup()
call GroupEnumUnitsInRect(udg_group30,loc_rect01,udg_boolexpr01)
return udg_group30
endfunction
function Func0007 takes rect loc_rect01,player loc_player01 returns group
set udg_group30=CreateGroup()
set bj_groupEnumOwningPlayer=loc_player01
call GroupEnumUnitsInRect(udg_group30,loc_rect01,filterGetUnitsInRectOfPlayer)
return udg_group30
endfunction
function UAUnitGroupWithinRangeOfLocMatching takes real loc_real01,location loc_location01,boolexpr loc_boolexpr01 returns group
set udg_group30=CreateGroup()
call GroupEnumUnitsInRangeOfLoc(udg_group30,loc_location01,loc_real01,loc_boolexpr01)
return udg_group30
endfunction
function UAUnitGroupWithinRangeOfLoc takes real loc_real01,location loc_location01 returns group
set udg_group30=CreateGroup()
call GroupEnumUnitsInRangeOfLoc(udg_group30,loc_location01,loc_real01,udg_boolexpr01)
return udg_group30
endfunction
function UAUnitGroupWithTypeId takes integer loc_integer01 returns group
set udg_group30=CreateGroup()
call GroupEnumUnitsOfType(udg_group30,UnitId2String(loc_integer01),udg_boolexpr01)
return udg_group30
endfunction
function UAUnitGroupFromPlayerMatching takes player loc_player01,boolexpr loc_boolexpr01 returns group
set udg_group30=CreateGroup()
call GroupEnumUnitsOfPlayer(udg_group30,loc_player01,loc_boolexpr01)
call DestroyBoolExpr(loc_boolexpr01)
return udg_group30
endfunction
function UAUnitGroupFromPlayer takes player loc_player01 returns group
set udg_group30=CreateGroup()
call GroupEnumUnitsOfPlayer(udg_group30,loc_player01,udg_boolexpr01)
return udg_group30
endfunction
function Func0013 takes player loc_player01,integer loc_integer01 returns group
set udg_group30=CreateGroup()
set bj_groupEnumTypeId=loc_integer01
call GroupEnumUnitsOfPlayer(udg_group30,loc_player01,filterGetUnitsOfPlayerAndTypeId)
return udg_group30
endfunction
function CreatePlayerForce takes player loc_player01 returns force
set udg_force09=CreateForce()
call ForceAddPlayer(udg_force09,loc_player01)
return udg_force09
endfunction
function Func0015 takes mapcontrol loc_mapcontrol01 returns force
local integer loc_integer01
local player loc_player01
set udg_force09=CreateForce()
set loc_integer01=0
loop
set loc_player01=Player(loc_integer01)
if GetPlayerController(loc_player01)==loc_mapcontrol01 then
call ForceAddPlayer(udg_force09,loc_player01)
endif
set loc_integer01=loc_integer01+1
exitwhen loc_integer01==16
endloop
return udg_force09
endfunction
function Func0016 takes player loc_player01 returns force
set udg_force09=CreateForce()
call ForceEnumAllies(udg_force09,loc_player01,udg_boolexpr01)
return udg_force09
endfunction
function Func0017 takes player loc_player01 returns force
set udg_force09=CreateForce()
call ForceEnumEnemies(udg_force09,loc_player01,udg_boolexpr01)
return udg_force09
endfunction
function Func0018 takes boolexpr loc_boolexpr01 returns force
set udg_force09=CreateForce()
call ForceEnumPlayers(udg_force09,loc_boolexpr01)
call DestroyBoolExpr(loc_boolexpr01)
return udg_force09
endfunction
function Func0019 takes integer loc_integer01,group loc_group01 returns group
set bj_randomSubGroupGroup=CreateGroup()
set bj_randomSubGroupWant=loc_integer01
set bj_randomSubGroupTotal=CountUnitsInGroup(loc_group01)
if(bj_randomSubGroupWant<=0 or bj_randomSubGroupTotal<=0)then
return bj_randomSubGroupGroup
endif
set bj_randomSubGroupChance=I2R(bj_randomSubGroupWant)/I2R(bj_randomSubGroupTotal)
call ForGroup(loc_group01,function GetRandomSubGroupEnum)
return bj_randomSubGroupGroup
endfunction
function Func0020 takes itemtype loc_itemtype01,integer loc_integer01 returns nothing
local group loc_group01
set bj_stockPickedItemType=loc_itemtype01
set bj_stockPickedItemLevel=loc_integer01
set loc_group01=CreateGroup()
call GroupEnumUnitsOfType(loc_group01,"marketplace",udg_boolexpr01)
call ForGroup(loc_group01,function UpdateEachStockBuildingEnum)
call DestroyGroup(loc_group01)
set loc_group01=null
endfunction
function Func0021 takes nothing returns nothing
local integer loc_integer01
local itemtype loc_itemtype01
local integer loc_integer02=0
local integer loc_integer03=0
local integer loc_integer04
set loc_integer04=1
loop
if(bj_stockAllowedPermanent[loc_integer04])then
set loc_integer03=loc_integer03+1
if(GetRandomInt(1,loc_integer03)==1)then
set loc_itemtype01=ITEM_TYPE_PERMANENT
set loc_integer02=loc_integer04
endif
endif
if(bj_stockAllowedCharged[loc_integer04])then
set loc_integer03=loc_integer03+1
if(GetRandomInt(1,loc_integer03)==1)then
set loc_itemtype01=ITEM_TYPE_CHARGED
set loc_integer02=loc_integer04
endif
endif
if(bj_stockAllowedArtifact[loc_integer04])then
set loc_integer03=loc_integer03+1
if(GetRandomInt(1,loc_integer03)==1)then
set loc_itemtype01=ITEM_TYPE_ARTIFACT
set loc_integer02=loc_integer04
endif
endif
set loc_integer04=loc_integer04+1
exitwhen loc_integer04>10
endloop
if(loc_integer03==0)then
set loc_itemtype01=null
return
endif
call Func0020(loc_itemtype01,loc_integer02)
set loc_itemtype01=null
endfunction
function Func0022 takes nothing returns nothing
call Func0021()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INTERVAL,true,function Func0021)
endfunction
function Func0023 takes nothing returns boolean
return true
endfunction
function Func0026 takes nothing returns string
local integer loc_integer01=1
local integer loc_integer02
local string loc_string01
loop
exitwhen loc_integer01>12
if(GetPlayerSlotState(Player(loc_integer01-1))==PLAYER_SLOT_STATE_PLAYING)and(GetPlayerController(Player(loc_integer01-1))==MAP_CONTROL_USER)then
set loc_integer02=loc_integer01-1
set loc_string01=I2S(loc_integer02)
set loc_integer01=13
endif
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>(12-loc_integer02)
if IsPlayerEnemy(Player(loc_integer02),Player(loc_integer01+loc_integer02))and IsPlayerAlly(Player(loc_integer01-1+loc_integer02),Player(loc_integer01+loc_integer02))==false then
set loc_string01=loc_string01+";"+I2S(loc_integer01+loc_integer02)
endif
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=0
set loc_integer02=0
return loc_string01
endfunction
function Func0027 takes nothing returns rect
local rect loc_rect01=bj_mapInitialPlayableArea
local real loc_real01=GetRectMaxX(loc_rect01)
local real loc_real02=GetRectMaxY(loc_rect01)
local rect loc_rect02=Rect(loc_real01-3,loc_real02-3,loc_real01,loc_real02)
set loc_real01=0
set loc_real02=0
set loc_rect01=null
return loc_rect02
endfunction
function Func0028 takes nothing returns rect
local rect loc_rect01=bj_mapInitialPlayableArea
local real loc_real01=GetRectMinX(loc_rect01)
local real loc_real02=GetRectMaxY(loc_rect01)
local rect loc_rect02=Rect(loc_real01,loc_real02-3,loc_real01+3,loc_real02)
set loc_real01=0
set loc_real02=0
set loc_rect01=null
return loc_rect02
endfunction
function Func0029 takes nothing returns rect
local rect loc_rect01=bj_mapInitialPlayableArea
local real loc_real01=GetRectMaxX(loc_rect01)
local real loc_real02=GetRectMinY(loc_rect01)
local rect loc_rect02=Rect(loc_real01-3,loc_real02,loc_real01,loc_real02+3)
set loc_real01=0
set loc_real02=0
set loc_rect01=null
return loc_rect02
endfunction
function Func0030 takes nothing returns rect
local rect loc_rect01=bj_mapInitialPlayableArea
local real loc_real01=GetRectMinY(loc_rect01)
local real loc_real02=GetRectMinX(loc_rect01)
local rect loc_rect02=Rect(loc_real02,loc_real01+3,loc_real02+3,loc_real01)
set loc_real02=0
set loc_real01=0
set loc_rect01=null
return loc_rect02
endfunction
function Func0031 takes player loc_player01 returns real
local real loc_real01=99999999
if GetLocalPlayer()==loc_player01 then
set loc_real01=GetCameraTargetPositionX()
endif
return loc_real01
endfunction
function Func0032 takes player loc_player01 returns real
local real loc_real01=99999999
if GetLocalPlayer()==loc_player01 then
set loc_real01=GetCameraTargetPositionY()
endif
return loc_real01
endfunction
function Func0033 takes nothing returns boolean
local boolean loc_boolean01
local integer loc_integer01=1
local real loc_real01
local real loc_real02
local real loc_real03
local real loc_real04
local integer loc_integer02
set udg_boolean23=false
loop
exitwhen loc_integer01>12
if GetPlayerSlotState(Player(loc_integer01-1))==PLAYER_SLOT_STATE_PLAYING and(GetPlayerController(Player(loc_integer01-1))==MAP_CONTROL_USER)then
set loc_integer02=loc_integer01-1
set loc_integer01=13
endif
set loc_integer01=loc_integer01+1
endloop
set loc_real01=Func0031(Player(loc_integer02))
set loc_real02=Func0032(Player(loc_integer02))
call PauseGame(true)
call TriggerSleepAction(0)
if loc_real01!=99999999 and loc_real02!=99999999 then
call SetCameraPositionForPlayer(Player(loc_integer02),loc_real01+1,loc_real02+1)
endif
call TriggerSleepAction(0)
call PauseGame(false)
set loc_real03=Func0031(Player(loc_integer02))
if GetLocalPlayer()==Player(loc_integer02)then
if loc_real03==loc_real01+1 then
set udg_boolean23=false
else
set udg_boolean23=true
endif
endif
if loc_real03!=99999999 then
call SetCameraPositionForPlayer(Player(loc_integer02),loc_real01,loc_real02)
endif
set loc_integer01=0
set loc_real03=0
set loc_real04=0
set loc_real01=0
set loc_real02=0
set loc_integer02=0
return udg_boolean23
endfunction
function Func0034 takes nothing returns nothing
set udg_boolean20=Func0033()
endfunction
function Func0035 takes nothing returns nothing
call PauseTimer(udg_timer03)
endfunction
function Func0036 takes nothing returns nothing
call ResumeTimer(udg_timer03)
endfunction
function Func0037 takes nothing returns nothing
call PauseTimer(udg_timer04)
endfunction
function Func0038 takes nothing returns nothing
call ResumeTimer(udg_timer04)
endfunction
function Func0040 takes nothing returns gamecache
call FlushGameCache(InitGameCache("arcii.vx"))
set udg_gamecache01=InitGameCache("arcii.vx")
return udg_gamecache01
endfunction
constant function rC takes nothing returns string
if(""=="")then
return"%"
endif
return""
endfunction
function Func0041 takes string loc_string01 returns integer
local string loc_string02=" !\"#$"+rC()+"&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
local string loc_string03
local integer loc_integer01=0
if(loc_string01=="\b")then
return 8
elseif loc_string01=="\t"then
return 9
elseif loc_string01=="\n"then
return 10
elseif loc_string01==""then
return 12
elseif loc_string01==""then
return 13
endif
loop
set loc_string03=SubString(loc_string02,loc_integer01,loc_integer01+1)
exitwhen loc_string03==""
if loc_string03==loc_string01 then
return loc_integer01+32
endif
set loc_integer01=loc_integer01+1
endloop
return 0
endfunction
function Func0042 takes string loc_string01 returns integer
local string loc_string02
local string loc_string03=SubString(loc_string01,0,1)
local integer loc_integer01
if(loc_string03=="")or(loc_string03==null)then
return 0
endif
if(StringCase(loc_string03,true)==loc_string03)then
set loc_string02=loc_string03
else
set loc_string02=loc_string03+"1"
endif
if HaveStoredInteger(udg_gamecache01,"ascii",loc_string02)then
return GetStoredInteger(udg_gamecache01,"ascii",loc_string02)
endif
set loc_integer01=Func0041(loc_string03)
call StoreInteger(udg_gamecache01,"ascii",loc_string02,loc_integer01)
return loc_integer01
endfunction
function Func0043 takes string loc_string01,integer loc_integer01 returns integer
local integer loc_integer02=StringLength(loc_string01)
local integer loc_integer03=0
local integer loc_integer04=0
loop
exitwhen(loc_integer03>=loc_integer02)
set loc_integer04=loc_integer04+Func0042(SubString(loc_string01,loc_integer03,loc_integer03+1))
if(loc_integer04>=loc_integer01)then
set loc_integer04=loc_integer04-loc_integer01
endif
set loc_integer03=loc_integer03+1
endloop
return loc_integer04
endfunction
function Func0045 takes nothing returns gamecache
call FlushGameCache(InitGameCache("codemaker"))
set udg_gamecache02=InitGameCache("codemaker")
return udg_gamecache02
endfunction
function Func0046 takes integer loc_integer01 returns integer
return udg_integers07[loc_integer01]
endfunction
function Func0047 takes integer loc_integer01 returns integer
return udg_integers06[loc_integer01]
endfunction
function Func0050 takes string loc_string01,integer loc_integer01 returns string
local integer loc_integer02=0
local string loc_string02=""
loop
exitwhen(loc_integer02>=loc_integer01)
if(SubString(loc_string01,loc_integer02,loc_integer02+1)=="1")then
set loc_string02=loc_string02+"0"
else
set loc_string02=loc_string02+"1"
endif
set loc_integer02=loc_integer02+1
endloop
return loc_string02
endfunction
function Func0051 takes string loc_string01,string loc_string02,integer loc_integer01 returns string
local string loc_string03=""
local string loc_string04
local string loc_string05
local string loc_string06
local boolean loc_boolean01=false
loop
exitwhen(loc_integer01<=0)
set loc_string04=SubString(loc_string01,loc_integer01-1,loc_integer01)
set loc_string05=SubString(loc_string02,loc_integer01-1,loc_integer01)
if(loc_string05!=loc_string04)then
if loc_boolean01 then
set loc_string06="0"
else
set loc_string06="1"
endif
elseif(loc_string04==loc_string05)and(loc_string04=="1")then
if loc_boolean01 then
set loc_string06="1"
else
set loc_string06="0"
set loc_boolean01=true
endif
else
if loc_boolean01 then
set loc_string06="1"
set loc_boolean01=false
else
set loc_string06="0"
endif
endif
set loc_string03=loc_string06+loc_string03
set loc_integer01=loc_integer01-1
endloop
return loc_string03
endfunction
function Func0052 takes string loc_string01,string loc_string02,integer loc_integer01 returns string
local string loc_string03=""
local integer loc_integer02=1
local integer loc_integer03=1
local integer loc_integer04=1
local integer loc_integer05=StringLength(loc_string01)
local integer loc_integer06=StringLength(loc_string02)
loop
exitwhen(loc_integer02>loc_integer01)
if((SubString(loc_string01,loc_integer03-1,loc_integer03)=="1")!=(SubString(loc_string02,loc_integer04-1,loc_integer04)=="1"))then
set loc_string03=loc_string03+"1"
else
set loc_string03=loc_string03+"0"
endif
set loc_integer02=loc_integer02+1
set loc_integer03=loc_integer03+1
set loc_integer04=loc_integer04+1
if(loc_integer03>loc_integer05)then
set loc_integer03=1
endif
if(loc_integer04>loc_integer06)then
set loc_integer04=1
endif
endloop
return loc_string03
endfunction
function Func0053 takes integer loc_integer01,integer loc_integer02 returns string
local integer loc_integer03
local string loc_string01=""
local string loc_string02=""
if(loc_integer02<32)then
if(loc_integer01<0)then
return Func0053(0,loc_integer02)
endif
elseif(loc_integer01<0)then
set loc_string01=Func0053(-loc_integer01,31)
set loc_string01=Func0050(loc_string01,31)
set loc_string01=Func0051(loc_string01,Func0053(1,31),31)
return"1"+loc_string01+loc_string02
endif
loop
exitwhen(loc_integer02==0)
set loc_integer03=loc_integer01/2
if(loc_integer03*2==loc_integer01)then
set loc_string01="0"+loc_string01
else
set loc_string01="1"+loc_string01
endif
set loc_string02="1"+loc_string02
set loc_integer01=loc_integer03
set loc_integer02=loc_integer02-1
endloop
if(loc_integer01!=0)then
return loc_string02
endif
return loc_string01
endfunction
function Func0054 takes string loc_string01,integer loc_integer01 returns integer
local integer loc_integer02
local string loc_string02
local integer loc_integer03=0
local integer loc_integer04=1
loop
exitwhen(loc_integer01<=0)
set loc_string02=SubString(loc_string01,loc_integer01-1,loc_integer01)
if(loc_string02=="1")then
set loc_integer03=loc_integer03+loc_integer04
endif
set loc_integer04=loc_integer04*2
set loc_integer01=loc_integer01-1
endloop
return loc_integer03
endfunction
function Func0055 takes string loc_string01 returns string
local gamecache loc_gamecache01=udg_gamecache02
local string loc_string02=(I2S(GetStoredInteger(udg_gamecache02,"charmaps","current")))
local integer loc_integer01=GetStoredInteger(loc_gamecache01,loc_string02+"bitsperchar","now")
local integer loc_integer02
local integer loc_integer03=0
local string loc_string03
local string loc_string04=""
set loc_string02=loc_string02+"bin2char"
loop
set loc_string03=SubString(loc_string01,loc_integer03,loc_integer03+loc_integer01)
exitwhen(loc_string03=="")or(loc_string03==null)
if HaveStoredString(loc_gamecache01,loc_string02,loc_string03)then
set loc_string04=loc_string04+GetStoredString(loc_gamecache01,loc_string02,loc_string03)
else
set loc_string04=loc_string04+GetStoredString(loc_gamecache01,loc_string02,"def")
endif
set loc_integer03=loc_integer03+loc_integer01
endloop
set loc_gamecache01=null
return loc_string04
endfunction
function Func0056 takes string loc_string01 returns string
local gamecache loc_gamecache01=udg_gamecache02
local integer loc_integer01=0
local string loc_string02=(I2S(GetStoredInteger(udg_gamecache02,"charmaps","current")))+"char2bin"
local string loc_string03=""
local string loc_string04
loop
set loc_string04=SubString(loc_string01,loc_integer01,loc_integer01+1)
exitwhen(loc_string04=="")or(loc_string04==null)
if(StringCase(loc_string04,true)==loc_string04)then
set loc_string04=loc_string04+"1"
endif
if HaveStoredString(loc_gamecache01,loc_string02,loc_string04)then
set loc_string03=loc_string03+GetStoredString(loc_gamecache01,loc_string02,loc_string04)
else
set loc_gamecache01=null
return""
endif
set loc_integer01=loc_integer01+1
endloop
set loc_gamecache01=null
return loc_string03
endfunction
function Func0057 takes nothing returns string
local integer loc_integer01=(udg_integers07[0])
local integer loc_integer02=1
local string loc_string01=""
loop
exitwhen(loc_integer02>loc_integer01)
set loc_string01=loc_string01+Func0053(Func0046(loc_integer02),Func0047(loc_integer02))
set loc_integer02=loc_integer02+1
endloop
return loc_string01
endfunction
function Func0058 takes string loc_string01,integer loc_integer01 returns string
local integer loc_integer02=R2I(Pow(2,loc_integer01))
local integer loc_integer03=0
local string loc_string02
local integer loc_integer04=0
loop
set loc_string02=SubString(loc_string01,loc_integer04,loc_integer04+loc_integer01)
exitwhen(loc_string02=="")or(loc_string02==null)
set loc_integer03=ModuloInteger(loc_integer03+Func0054(loc_string02,loc_integer01),loc_integer02)
set loc_integer04=loc_integer04+loc_integer01
endloop
return Func0053(loc_integer03,loc_integer01)
endfunction
function Func0059 takes string loc_string01 returns string
local integer loc_integer01=GetStoredInteger(udg_gamecache02,(I2S(GetStoredInteger(udg_gamecache02,"charmaps","current"))),"FCS")
local string loc_string02=Func0058(loc_string01,loc_integer01)
return(loc_string02+Func0052(loc_string01,loc_string02,StringLength(loc_string01)))
endfunction
function Func0060 takes string loc_string01 returns string
local integer loc_integer01=GetStoredInteger(udg_gamecache02,(I2S(GetStoredInteger(udg_gamecache02,"charmaps","current")))+"bitsperchar","now")
loop
exitwhen(ModuloInteger(StringLength(loc_string01),loc_integer01)==0)
set loc_string01=loc_string01+"0"
endloop
return loc_string01
endfunction
function Func0061 takes string loc_string01,player loc_player01 returns string
local string loc_string02=Func0060(loc_string01)
local integer loc_integer01=0
local integer loc_integer02=StringLength(loc_string02)
local integer loc_integer03=IMinBJ(loc_integer02,31)
local string loc_string03=Func0053(Func0043(GetPlayerName(loc_player01),R2I(Pow(2,loc_integer03))),loc_integer03)
local string loc_string04=""
loop
exitwhen loc_integer01>=loc_integer02
if(loc_integer01+loc_integer03>=loc_integer02)then
set loc_integer03=loc_integer02-loc_integer01
endif
set loc_string04=loc_string04+Func0052(SubString(loc_string02,loc_integer01,loc_integer01+loc_integer03),loc_string03,loc_integer03)
set loc_integer01=loc_integer01+loc_integer03
endloop
return loc_string04
endfunction
function Func0062 takes string loc_string01,player loc_player01 returns string
local integer loc_integer01=0
local integer loc_integer02=StringLength(loc_string01)
local integer loc_integer03=IMinBJ(loc_integer02,31)
local string loc_string02=Func0053(Func0043(GetPlayerName(loc_player01),R2I(Pow(2,loc_integer03))),loc_integer03)
local string loc_string03=""
loop
exitwhen loc_integer01>=loc_integer02
if(loc_integer01+loc_integer03>=loc_integer02)then
set loc_integer03=loc_integer02-loc_integer01
endif
set loc_string03=loc_string03+Func0052(SubString(loc_string01,loc_integer01,loc_integer01+loc_integer03),loc_string02,loc_integer03)
set loc_integer01=loc_integer01+loc_integer03
endloop
return loc_string03
endfunction
function Func0063 takes nothing returns integer
local integer loc_integer01=udg_integers07[0]
local integer loc_integer02=0
loop
exitwhen(loc_integer01<=0)
set loc_integer02=loc_integer02+udg_integers06[loc_integer01]
set loc_integer01=loc_integer01-1
endloop
return loc_integer02
endfunction
function Func0064 takes nothing returns integer
local string loc_string01=(I2S(GetStoredInteger(udg_gamecache02,"charmaps","current")))
local integer loc_integer01=Func0063()+GetStoredInteger(udg_gamecache02,loc_string01,"FCS")
local integer loc_integer02=GetStoredInteger(udg_gamecache02,loc_string01+"bitsperchar","now")
loop
exitwhen(ModuloInteger(loc_integer01,loc_integer02)==0)
set loc_integer01=loc_integer01+1
endloop
return(loc_integer01/loc_integer02)
endfunction
function Func0065 takes string loc_string01 returns string
local integer loc_integer01=GetStoredInteger(udg_gamecache02,(I2S(GetStoredInteger(udg_gamecache02,"charmaps","current"))),"FCS")
local integer loc_integer02=Func0063()
local string loc_string02=SubString(loc_string01,loc_integer01,loc_integer01+loc_integer02)
local string loc_string03=SubString(loc_string01,0,loc_integer01)
set loc_string02=Func0052(loc_string02,loc_string03,loc_integer02)
if(Func0058(loc_string02,loc_integer01)!=loc_string03)then
return""
endif
return loc_string02
endfunction
function Func0066 takes string loc_string01 returns integer
local integer loc_integer01=(udg_integers07[0])
local integer loc_integer02=1
local integer loc_integer03=0
local integer loc_integer04
local string loc_string02
loop
exitwhen(loc_integer02>loc_integer01)
set loc_integer04=Func0047(loc_integer02)
set loc_string02=SubString(loc_string01,loc_integer03,loc_integer03+loc_integer04)
if(StringLength(loc_string02)<loc_integer04)then
return 4
endif
set udg_integers07[loc_integer02]=Func0054(loc_string02,loc_integer04)
set loc_integer02=loc_integer02+1
set loc_integer03=loc_integer03+loc_integer04
endloop
return 0
endfunction
function Func0067 takes handle h returns integer
return GetHandleId(h)
endfunction
function Func0068 takes nothing returns nothing
local gamecache loc_gamecache01=udg_gamecache02
local string loc_string01=I2S(Func0067(GetTriggeringTrigger()))
local string loc_string02=GetStoredString(loc_gamecache01,loc_string01,"cmd")
local integer loc_integer01=StringLength(loc_string02)
local boolean loc_boolean01=false
local string loc_string03=GetEventPlayerChatString()
local string loc_string04
if(loc_string03==GetStoredString(loc_gamecache01,loc_string01,"cnl"))then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,2,loc_string03)
set loc_boolean01=true
set loc_string04=""
elseif(SubString(loc_string03,0,loc_integer01)==loc_string02)then
set loc_string04=SubString(loc_string03,loc_integer01,StringLength(loc_string03))
set loc_boolean01=((loc_string04!=null)and(loc_string04!=""))
endif
if not(loc_boolean01)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,GetStoredReal(loc_gamecache01,loc_string01,"rem"),GetStoredString(loc_gamecache01,loc_string01,"prm"))
else
call StoreString(loc_gamecache01,loc_string01,"result",loc_string04)
endif
set loc_gamecache01=null
endfunction
function Func0069 takes nothing returns nothing
local string loc_string01
set loc_string01=Func0057()
set loc_string01=Func0059(loc_string01)
if(bj_groupEnumOwningPlayer!=null)then
set loc_string01=Func0061(loc_string01,bj_groupEnumOwningPlayer)
endif
set bj_lastPlayedMusic=Func0055(loc_string01)
endfunction
function Func0070 takes nothing returns nothing
local player loc_player01=bj_groupEnumOwningPlayer
local string loc_string01=bj_lastPlayedMusic
local integer loc_integer01=Func0064()
local integer loc_integer02=StringLength(loc_string01)
set bj_groupEnumTypeId=5
if(loc_integer02<loc_integer01)then
set bj_groupEnumTypeId=1
else
if(loc_integer02>loc_integer01)then
set loc_string01=SubString(loc_string01,0,loc_integer01)
endif
set loc_string01=Func0056(loc_string01)
if(loc_string01=="")then
set bj_groupEnumTypeId=2
else
if(loc_player01!=null)then
set loc_string01=Func0062(loc_string01,loc_player01)
endif
set loc_string01=Func0065(loc_string01)
if(loc_string01=="")then
set bj_groupEnumTypeId=3
else
set bj_groupEnumTypeId=Func0066(loc_string01)
endif
endif
endif
set loc_player01=null
endfunction
function Func0071 takes player loc_player01 returns string
local string loc_string01=bj_lastPlayedMusic
local string loc_string02
set bj_groupEnumOwningPlayer=loc_player01
call ExecuteFunc("Func0069")
set loc_string02=bj_lastPlayedMusic
set bj_lastPlayedMusic=loc_string01
return loc_string02
endfunction
function Func0072 takes player loc_player01,string loc_string01 returns integer
local string loc_string02=bj_lastPlayedMusic
set bj_lastPlayedMusic=loc_string01
set bj_groupEnumOwningPlayer=loc_player01
call ExecuteFunc("Func0070")
set bj_lastPlayedMusic=loc_string02
return bj_groupEnumTypeId
endfunction
function Func0073 takes integer loc_integer01,string loc_string01,integer loc_integer02 returns nothing
local gamecache loc_gamecache01=udg_gamecache02
local integer loc_integer03=0
local integer loc_integer04=0
local integer loc_integer05=1
local string loc_string02
local string loc_string03=I2S(loc_integer01)
local integer loc_integer06=0
local string loc_string04
if(loc_integer02>30)then
call BJDebugMsg("|cffff0000Invalid FCS size: Must be <= 30")
call FlushGameCache(loc_gamecache01)
endif
call StoreBoolean(loc_gamecache01,"charmaps",loc_string03,true)
loop
set loc_string02=SubString(loc_string01,loc_integer03,loc_integer03+1)
exitwhen(loc_string02=="")
if(StringCase(loc_string02,true)==loc_string02)then
set loc_string02=loc_string02+"1"
endif
set loc_integer03=loc_integer03+1
if(loc_integer03>loc_integer05)then
set loc_integer05=loc_integer05*2
set loc_integer04=loc_integer04+1
endif
endloop
if(loc_integer03!=loc_integer05)then
call BJDebugMsg("|cffff0000Invalid charmap: Length must be a power of 2")
call FlushGameCache(loc_gamecache01)
set loc_integer06=loc_integer06
endif
if(ModuloInteger(loc_integer05,loc_integer02)==0)then
call BJDebugMsg("|cffff0000Invalid charmap/FCS size: FCS size can't be a multiple of the number of bits per character")
call FlushGameCache(loc_gamecache01)
set loc_integer06=loc_integer06
endif
set loc_integer03=0
call StoreInteger(loc_gamecache01,loc_string03,"FCS",loc_integer02)
call StoreInteger(loc_gamecache01,loc_string03+"bitsperchar","now",loc_integer04)
loop
exitwhen(loc_integer03>=loc_integer05)
set loc_string04=Func0053(loc_integer03,loc_integer04)
set loc_string02=SubString(loc_string01,loc_integer03,loc_integer03+1)
call StoreString(loc_gamecache01,loc_string03+"bin2char",loc_string04,loc_string02)
if(loc_integer03==0)then
call StoreString(loc_gamecache01,loc_string03+"bin2char","def",loc_string02)
endif
if(StringCase(loc_string02,true)==loc_string02)then
set loc_string02=loc_string02+"1"
endif
call StoreString(loc_gamecache01,loc_string03+"char2bin",loc_string02,loc_string04)
if(loc_integer03==0)then
call StoreString(loc_gamecache01,loc_string03+"char2bin","def",loc_string04)
endif
set loc_integer03=loc_integer03+1
endloop
set loc_gamecache01=null
endfunction
function Func0075 takes string loc_string01,string loc_string02,string loc_string03,string loc_string04 returns string
local integer loc_integer01=StringLength(loc_string01)
local integer loc_integer02=0
local string loc_string05=""
local string loc_string06
local string loc_string07
local boolean loc_boolean01
loop
exitwhen(loc_integer02>=loc_integer01)
set loc_string06=SubString(loc_string01,loc_integer02,loc_integer02+1)
set loc_string07=""
loop
exitwhen(loc_integer02>=loc_integer01)
set loc_boolean01=(StringCase(loc_string06,true)==loc_string06)and(StringCase(loc_string06,false)!=loc_string06)
exitwhen not(loc_boolean01)
set loc_string07=loc_string07+loc_string06
set loc_integer02=loc_integer02+1
set loc_string06=SubString(loc_string01,loc_integer02,loc_integer02+1)
endloop
if(loc_string07!="")then
set loc_string05=loc_string05/*+"|c"+loc_string02*/+loc_string07/*+"|r"*/
endif
set loc_string07=""
loop
exitwhen(loc_integer02>=loc_integer01)
set loc_boolean01=(StringCase(loc_string06,true)!=loc_string06)and(StringCase(loc_string06,false)==loc_string06)
exitwhen not(loc_boolean01)
set loc_string07=loc_string07+loc_string06
set loc_integer02=loc_integer02+1
set loc_string06=SubString(loc_string01,loc_integer02,loc_integer02+1)
endloop
if(loc_string07!="")then
set loc_string05=loc_string05/*+"|c"+loc_string03*/+loc_string07/*+"|r"*/
endif
set loc_string07=""
loop
exitwhen(loc_integer02>=loc_integer01)
set loc_boolean01=(StringCase(loc_string06,true)==loc_string06)and(StringCase(loc_string06,false)==loc_string06)
exitwhen not(loc_boolean01)
set loc_string07=loc_string07+loc_string06
set loc_integer02=loc_integer02+1
set loc_string06=SubString(loc_string01,loc_integer02,loc_integer02+1)
endloop
if(loc_string07!="")then
set loc_string05=loc_string05/*+"|c"+loc_string04*/+loc_string07/*+"|r"*/
endif
endloop
return loc_string05
endfunction
function Func0076 takes nothing returns integer
return'AInv'
endfunction
function Func0077 takes integer loc_integer01 returns real
return I2R(loc_integer01)
endfunction
function Func0078 takes integer loc_integer01 returns integer
return R2I(udg_reals01[loc_integer01])
endfunction
function Func0079 takes group loc_group01 returns group
set bj_groupAddGroupDest=CreateGroup()
call ForGroup(loc_group01,function GroupAddGroupEnum)
return bj_groupAddGroupDest
endfunction
function Func0080 takes unit loc_unit01,player loc_player01 returns boolean
local boolean b = false
set b = b or IsUnitVisible(loc_unit01, Player(12))
set b = b or IsUnitVisible(loc_unit01, Player(13))
set b = b or IsUnitVisible(loc_unit01, Player(14))
set b = b or IsUnitVisible(loc_unit01, Player(15))
//set b = b or IsUnitVisible(loc_unit01, Player(16))
//set b = b or IsUnitVisible(loc_unit01, Player(17))
//set b = b or IsUnitVisible(loc_unit01, Player(18))
//set b = b or IsUnitVisible(loc_unit01, Player(19))
//set b = b or IsUnitVisible(loc_unit01, Player(20))
//set b = b or IsUnitVisible(loc_unit01, Player(21))
//set b = b or IsUnitVisible(loc_unit01, Player(22))
//set b = b or IsUnitVisible(loc_unit01, Player(23))
return b or IsUnitVisible(loc_unit01, loc_player01)
endfunction
function Func0081 takes real loc_real01 returns real
local rect loc_rect01=bj_mapInitialPlayableArea
local real loc_real02=GetRectMinX(loc_rect01)+50.
if(loc_real01<loc_real02)then
set loc_real01=loc_real02
else
set loc_real02=GetRectMaxX(loc_rect01)-50.
if(loc_real01>loc_real02)then
set loc_real01=loc_real02
endif
endif
set loc_rect01=null
return(loc_real01)
endfunction
function Func0082 takes real loc_real01 returns real
local rect loc_rect01=bj_mapInitialPlayableArea
local real loc_real02=GetRectMinY(loc_rect01)+50.
if(loc_real01<loc_real02)then
set loc_real01=loc_real02
else
set loc_real02=GetRectMaxY(loc_rect01)-50.
if(loc_real01>loc_real02)then
set loc_real01=loc_real02
endif
endif
set loc_rect01=null
return(loc_real01)
endfunction
function Func0083 takes unit loc_unit01,real loc_real01,real loc_real02 returns boolean
local rect loc_rect01=bj_mapInitialPlayableArea
local real loc_real03=GetRectMinX(loc_rect01)+50.
local boolean loc_boolean01=true
if(loc_real01<loc_real03)then
set loc_real01=loc_real03
set loc_boolean01=false
else
set loc_real03=GetRectMaxX(loc_rect01)-50.
if(loc_real01>loc_real03)then
set loc_boolean01=false
set loc_real01=loc_real03
endif
endif
set loc_real03=GetRectMinY(loc_rect01)+50.
if(loc_real02<loc_real03)then
set loc_real02=loc_real03
set loc_boolean01=false
else
set loc_real03=GetRectMaxY(loc_rect01)-50.
if(loc_real02>loc_real03)then
set loc_real02=loc_real03
set loc_boolean01=false
endif
endif
if(loc_boolean01)then
call SetUnitX(loc_unit01,loc_real01)
call SetUnitY(loc_unit01,loc_real02)
endif
set loc_rect01=null
return loc_boolean01
endfunction
function Func0084 takes nothing returns boolean
return IsUnitInRangeLoc(GetFilterUnit(),bj_enumDestructableCenter,bj_enumDestructableRadius)
endfunction
function Func0085 takes group loc_group01,real loc_real01,real loc_real02,real loc_real03,boolexpr loc_boolexpr01 returns nothing
local boolexpr loc_boolexpr02
local boolexpr loc_boolexpr03=Condition(function Func0084)
if(loc_boolexpr01==null)then
set loc_boolexpr02=loc_boolexpr03
else
set loc_boolexpr02=And(loc_boolexpr03,loc_boolexpr01)
endif
set bj_enumDestructableCenter=Location(loc_real01,loc_real02)
set bj_enumDestructableRadius=loc_real03
call GroupEnumUnitsInRange(loc_group01,loc_real01,loc_real02,55.+loc_real03,loc_boolexpr02)
call DestroyBoolExpr(loc_boolexpr02)
if(loc_boolexpr01!=null)then
call DestroyBoolExpr(loc_boolexpr03)
endif
call RemoveLocation(bj_enumDestructableCenter)
set loc_boolexpr03=null
set loc_boolexpr02=null
endfunction
function H2I takes handle h returns integer
return GetHandleId(h)
endfunction
function Func0087 takes nothing returns gamecache
call FlushGameCache(InitGameCache("CasterSystem.vx"))
set udg_gamecache03=InitGameCache("CasterSystem.vx")
set udg_hashtable01=InitHashtable()
call StoreInteger(udg_gamecache03,"misc","TableMaxReleasedIndex",100)
return udg_gamecache03
endfunction
function Func0088 takes handle loc_handle01,gamecache loc_gamecache01 returns integer
return GetStoredInteger(loc_gamecache01,I2S(H2I(loc_handle01))+";"+GetStoredString(loc_gamecache01,"argpass","set"),GetStoredString(loc_gamecache01,"argpass","seti"))
endfunction
function Func0089 takes handle h,string key,integer ht returns integer
if(key=="")then
return Func0088(h,udg_gamecache03)
endif
return GetStoredInteger(udg_gamecache03,I2S(H2I(h)),key)
endfunction
function HKey2Handle takes handle h,string key returns handle
return null
endfunction
function HKey2Unit takes handle h,string key returns unit
if(key=="")then
return LoadUnitHandle(udg_hashtable01,StringHash(I2S(H2I(h))+";"+GetStoredString(udg_gamecache03,"argpass","set")),StringHash(GetStoredString(udg_gamecache03,"argpass","seti")))
endif
return LoadUnitHandle(udg_hashtable01,H2I(h),StringHash(key))
endfunction
function HKey2Timer takes handle h,string key returns timer
if(key=="")then
return LoadTimerHandle(udg_hashtable01,StringHash(I2S(H2I(h))+";"+GetStoredString(udg_gamecache03,"argpass","set")),StringHash(GetStoredString(udg_gamecache03,"argpass","seti")))
endif
return LoadTimerHandle(udg_hashtable01,H2I(h),StringHash(key))
endfunction
function HKey2Group takes handle h,string key returns group
if(key=="")then
return LoadGroupHandle(udg_hashtable01,StringHash(I2S(H2I(h))+";"+GetStoredString(udg_gamecache03,"argpass","set")),StringHash(GetStoredString(udg_gamecache03,"argpass","seti")))
endif
return LoadGroupHandle(udg_hashtable01,H2I(h),StringHash(key))
endfunction
function Func0094 takes handle loc_handle01 returns nothing
local gamecache loc_gamecache01=udg_gamecache03
local string loc_string01=I2S(H2I(loc_handle01))
local integer loc_integer01=GetStoredInteger(loc_gamecache01,loc_string01,"#totalsets")
local integer loc_integer02=1
loop
exitwhen loc_integer02>loc_integer01
call FlushStoredMission(loc_gamecache01,loc_string01+";"+GetStoredString(loc_gamecache01,loc_string01,"#setName;"+I2S(loc_integer02)))
set loc_integer02=loc_integer02+1
endloop
call FlushStoredMission(loc_gamecache01,loc_string01)
set loc_gamecache01=null
endfunction
function VXGetFreeTableIndex takes nothing returns integer
local gamecache loc_gamecache01=udg_gamecache03
local integer loc_integer01=GetStoredInteger(loc_gamecache01,"misc","FreeTableTotal")
local integer loc_integer02
if(loc_integer01>0)then
set loc_integer02=GetStoredInteger(loc_gamecache01,"misc","FreeTable1")
if(loc_integer01>1)then
call StoreInteger(loc_gamecache01,"misc","FreeTable1",GetStoredInteger(loc_gamecache01,"misc","FreeTable"+I2S(loc_integer01)))
call FlushStoredInteger(loc_gamecache01,"misc","FreeTable"+I2S(loc_integer01))
endif
call StoreInteger(loc_gamecache01,"misc","FreeTableTotal",loc_integer01-1)
else
set loc_integer02=GetStoredInteger(loc_gamecache01,"misc","TableMaxReleasedIndex")+1
call StoreInteger(loc_gamecache01,"misc","TableMaxReleasedIndex",loc_integer02)
endif
call StoreBoolean(loc_gamecache01,"misc","Created"+I2S(loc_integer02),true)
set loc_gamecache01=null
return loc_integer02
endfunction
function I2S2 takes nothing returns string
return I2S(VXGetFreeTableIndex())
endfunction
function HandleId2String takes handle loc_handle01 returns string
return I2S(H2I(loc_handle01))
endfunction
function VXFlushTable takes string indexstring returns nothing
local gamecache loc_gamecache01=udg_gamecache03
local integer loc_integer01=S2I(indexstring)
local integer loc_integer02
if(loc_integer01!=0)and(GetStoredBoolean(loc_gamecache01,"misc","Created"+indexstring))then
call FlushStoredBoolean(loc_gamecache01,"misc","Created"+indexstring)
set loc_integer02=GetStoredInteger(loc_gamecache01,"misc","FreeTableTotal")+1
call StoreInteger(loc_gamecache01,"misc","FreeTableTotal",loc_integer02)
call StoreInteger(loc_gamecache01,"misc","FreeTable"+I2S(loc_integer02),loc_integer01)
endif
call FlushStoredMission(loc_gamecache01,indexstring)
set loc_gamecache01=null
endfunction
function VXFlushMission takes string loc_string01 returns nothing
call FlushStoredMission(udg_gamecache03,loc_string01)
call FlushChildHashtable(udg_hashtable01,StringHash(loc_string01))
endfunction
function VXStoreInteger takes string loc_string01,string loc_string02,integer loc_integer01 returns nothing
local gamecache loc_gamecache01=udg_gamecache03
if(loc_integer01==0)then
call FlushStoredInteger(loc_gamecache01,loc_string01,loc_string02)
else
call StoreInteger(loc_gamecache01,loc_string01,loc_string02,loc_integer01)
endif
set loc_gamecache01=null
endfunction
function VXLoadInteger takes string loc_string01,string loc_string02 returns integer
return GetStoredInteger(udg_gamecache03,loc_string01,loc_string02)
endfunction
function VXStoreReal takes string loc_string01,string loc_string02,real loc_real01 returns nothing
local gamecache loc_gamecache01=udg_gamecache03
if(loc_real01==0)then
call FlushStoredReal(loc_gamecache01,loc_string01,loc_string02)
else
call StoreReal(loc_gamecache01,loc_string01,loc_string02,loc_real01)
endif
set loc_gamecache01=null
endfunction
function Func0103 takes string loc_string01,string loc_string02 returns real
return GetStoredReal(udg_gamecache03,loc_string01,loc_string02)
endfunction
function VXStoreBoolean takes string loc_string01,string loc_string02,boolean loc_boolean01 returns nothing
local gamecache loc_gamecache01=udg_gamecache03
if(not(loc_boolean01))then
call FlushStoredBoolean(loc_gamecache01,loc_string01,loc_string02)
else
call StoreBoolean(loc_gamecache01,loc_string01,loc_string02,loc_boolean01)
endif
set loc_gamecache01=null
endfunction
function VXLoadBoolean takes string loc_string01,string loc_string02 returns boolean
return GetStoredBoolean(udg_gamecache03,loc_string01,loc_string02)
endfunction
function VXStoreHandle takes string loc_string01,string loc_string02,handle loc_handle01 returns nothing
local gamecache loc_gamecache01=udg_gamecache03
if(loc_handle01==null)then
call FlushStoredInteger(loc_gamecache01,loc_string01,loc_string02)
else
call StoreInteger(loc_gamecache01,loc_string01,loc_string02,H2I(loc_handle01))
endif
set loc_gamecache01=null
endfunction
function VXStoreUnitHandle takes string missionkey,string key,unit u returns nothing
local hashtable ht=udg_hashtable01
if(u==null)then
else
call SaveUnitHandle(ht,StringHash(missionkey),StringHash(key),u)
endif
set ht=null
endfunction
function VXStoreGroupHandle takes string missionkey,string key,group g returns nothing
local hashtable ht=udg_hashtable01
if(g==null)then
else
call SaveGroupHandle(ht,StringHash(missionkey),StringHash(key),g)
endif
set ht=null
endfunction
function VXStoreTimerHandle takes string missionkey,string key,timer t returns nothing
local hashtable ht=udg_hashtable01
if(t==null)then
else
call SaveTimerHandle(ht,StringHash(missionkey),StringHash(key),t)
endif
set ht=null
endfunction
function VXStoreEffectHandle takes string missionkey,string key,effect ef returns nothing
local hashtable ht=udg_hashtable01
if(ef==null)then
else
call SaveEffectHandle(ht,StringHash(missionkey),StringHash(key),ef)
endif
set ht=null
endfunction
function VXLoadWidgetHandle takes string missionkey,string key returns widget
return LoadWidgetHandle(udg_hashtable01,StringHash(missionkey),StringHash(key))
endfunction
function VXLoadUnitHandle takes string missionkey,string key returns unit
return LoadUnitHandle(udg_hashtable01,StringHash(missionkey),StringHash(key))
endfunction
function VXLoadEffectHandle takes string missionkey,string key returns effect
return LoadEffectHandle(udg_hashtable01,StringHash(missionkey),StringHash(key))
endfunction
function VXLoadTriggerHandle takes string missionkey,string key returns trigger
return LoadTriggerHandle(udg_hashtable01,StringHash(missionkey),StringHash(key))
endfunction
function VXLoadTimerHandle takes string missionkey,string key returns timer
return LoadTimerHandle(udg_hashtable01,StringHash(missionkey),StringHash(key))
endfunction
function VXLoadGroupHandle takes string missionkey,string key returns group
return LoadGroupHandle(udg_hashtable01,StringHash(missionkey),StringHash(key))
endfunction
function VXLoadTriggerActionHandle takes string missionkey,string key returns triggeraction
return LoadTriggerActionHandle(udg_hashtable01,StringHash(missionkey),StringHash(key))
endfunction
function Func0115 takes real loc_real01,real loc_real02,real loc_real03 returns real
local real loc_real04
set loc_real01=ModuloReal(loc_real01,360)
set loc_real02=ModuloReal(loc_real02,360)
if loc_real01>loc_real02 then
set loc_real04=loc_real01-360
if loc_real01-loc_real02>loc_real02-loc_real04 then
set loc_real01=loc_real04
endif
else
set loc_real04=loc_real02-360
if loc_real02-loc_real01>loc_real01-loc_real04 then
set loc_real02=loc_real04
endif
endif
if loc_real01>loc_real02 then
set loc_real04=loc_real01-loc_real03
if loc_real04<=loc_real02 then
return loc_real02
endif
return loc_real04
endif
set loc_real04=loc_real01+loc_real03
if loc_real04>=loc_real02 then
return loc_real02
endif
return loc_real04
endfunction
function Func0116 takes real loc_real01,real loc_real02,real loc_real03 returns unit
local unit loc_unit01
if(loc_real02!=0)then
set loc_real02=Func0081(loc_real02)
endif
if(loc_real03!=0)then
set loc_real03=Func0082(loc_real03)
endif
set loc_unit01=CreateUnit(Player(27),'h00X',loc_real02,loc_real03,loc_real01)
call UnitAddAbility(loc_unit01,'Aloc')
call UnitAddAbility(loc_unit01,'Amrf')
call UnitRemoveAbility(loc_unit01,'Amrf')
set udg_unit07=loc_unit01
set loc_unit01=null
return udg_unit07
endfunction
function Func0117 takes real loc_real01 returns unit
return Func0116(loc_real01,0,0)
endfunction
function Func0119 takes timer loc_timer01 returns nothing
if(loc_timer01!=null)then
call PauseTimer(loc_timer01)
call Func0094(loc_timer01)
call DestroyTimer(loc_timer01)
endif
endfunction
function Func0120 takes nothing returns unit
set udg_unit07=FirstOfGroup(udg_group19)
if udg_unit07==null then
set udg_unit07=(Func0116(0,0,0))
endif
call GroupRemoveUnit(udg_group19,udg_unit07)
call SetUnitState(udg_unit07,UNIT_STATE_MANA,1000)
return udg_unit07
endfunction
function Func0121 takes unit loc_unit01 returns nothing
if not IsUnitDeadBJ(loc_unit01)then
call ResetUnitLookAt(loc_unit01)
call SetUnitOwner(loc_unit01,Player(27),true)
call SetUnitVertexColor(loc_unit01,255,255,255,255)
call SetUnitScale(loc_unit01,1,1,1)
call SetUnitTimeScale(loc_unit01,1)
call SetUnitMoveSpeed(loc_unit01,522)
call SetUnitFlyHeight(loc_unit01,0,0)
call UnitAddAbility(loc_unit01,'Aloc')
call SetUnitTurnSpeed(loc_unit01,.6)
call GroupAddUnit(udg_group19,loc_unit01)
endif
endfunction
function Func0122 takes nothing returns nothing
local timer loc_timer01=GetExpiredTimer()
local string loc_string01=HandleId2String(loc_timer01)
local unit loc_unit01=VXLoadUnitHandle(loc_string01,"c")
local integer loc_integer01=VXLoadInteger(loc_string01,"a")
if(loc_integer01!=0)then
call UnitRemoveAbility(loc_unit01,loc_integer01)
endif
call Func0121(loc_unit01)
call VXFlushMission(loc_string01)
call DestroyTimer(loc_timer01)
set loc_unit01=null
set loc_timer01=null
endfunction
function Func0123 takes unit loc_unit01,integer loc_integer01,real loc_real01 returns nothing
local timer loc_timer01=CreateTimer()
local string loc_string01=HandleId2String(loc_timer01)
call VXStoreUnitHandle(loc_string01,"c",loc_unit01)
if(loc_integer01!=0)then
call VXStoreInteger(loc_string01,"a",loc_integer01)
endif
call TimerStart(loc_timer01,loc_real01,false,function Func0122)
set loc_timer01=null
endfunction
function Func0124 takes nothing returns nothing
local unit loc_unit01=udg_unit07
local integer loc_integer01=udg_integer22
local real loc_real01=udg_reals01[0]
local boolean loc_boolean01=(udg_reals01[1]>0)
loop
exitwhen GetUnitCurrentOrder(loc_unit01)==0
call TriggerSleepAction(0)
endloop
if(loc_real01>0)then
if loc_boolean01 then
call Func0123(loc_unit01,loc_integer01,loc_real01)
else
call UnitRemoveAbility(loc_unit01,loc_integer01)
call Func0123(loc_unit01,0,loc_real01)
endif
else
call UnitRemoveAbility(loc_unit01,loc_integer01)
call Func0121(loc_unit01)
endif
set loc_unit01=null
endfunction
function Func0125 takes unit loc_unit01,real loc_real01,integer loc_integer01,boolean loc_boolean01 returns nothing
set udg_reals01[0]=loc_real01
set udg_reals01[1]=IntegerTertiaryOp(loc_boolean01,1,0)
set udg_integer22=loc_integer01
set udg_unit07=loc_unit01
call ExecuteFunc("Func0124")
endfunction
function Func0126 takes integer loc_integer01 returns integer
local unit loc_unit01=FirstOfGroup(udg_group19)
if loc_unit01==null then
set loc_unit01=Func0120()
call UnitAddAbility(loc_unit01,loc_integer01)
call UnitRemoveAbility(loc_unit01,loc_integer01)
call Func0121(loc_unit01)
else
call UnitAddAbility(loc_unit01,loc_integer01)
call UnitRemoveAbility(loc_unit01,loc_integer01)
endif
set loc_unit01=null
return loc_integer01
endfunction
function Func0127 takes player loc_player01,real loc_real01,real loc_real02,real loc_real03,integer loc_integer01,integer loc_integer02,string loc_string01,widget loc_widget01,real loc_real04 returns unit
local unit loc_unit01=Func0120()
local boolean loc_boolean01=false
call SetUnitOwner(loc_unit01,loc_player01,false)
call UnitAddAbility(loc_unit01,loc_integer01)
call SetUnitAbilityLevel(loc_unit01,loc_integer01,loc_integer02)
call Func0083(loc_unit01,loc_real01,loc_real02)
call SetUnitFlyHeight(loc_unit01,loc_real03,0)
if S2I(loc_string01)!=0 then
set loc_boolean01=IssueTargetOrderById(loc_unit01,S2I(loc_string01),loc_widget01)
else
set loc_boolean01=IssueTargetOrder(loc_unit01,loc_string01,loc_widget01)
endif
if(loc_real04<=0)or not(loc_boolean01)then
call UnitRemoveAbility(loc_unit01,loc_integer01)
call Func0121(loc_unit01)
else
call Func0125(loc_unit01,loc_real04,loc_integer01,true)
endif
set udg_unit07=loc_unit01
set loc_unit01=null
return udg_unit07
endfunction
function Func0128 takes player loc_player01,integer loc_integer01,integer loc_integer02,string loc_string01,widget loc_widget01,boolean loc_boolean01 returns unit
local real loc_real01
local real loc_real02
local real loc_real03
if udg_location01!=null then
set loc_real01=GetLocationX(udg_location01)
set loc_real02=GetLocationY(udg_location01)
else
set loc_real01=GetWidgetX(loc_widget01)
set loc_real02=GetWidgetY(loc_widget01)
endif
if not(loc_boolean01)then
set loc_real03=udg_real01+.01
else
set loc_real03=0
endif
return Func0127(loc_player01,loc_real01,loc_real02,0,loc_integer01,loc_integer02,loc_string01,loc_widget01,loc_real03)
endfunction
function Func0129 takes nothing returns nothing
local timer loc_timer01=GetExpiredTimer()
local string loc_string01=HandleId2String(loc_timer01)
call Func0121(VXLoadUnitHandle(loc_string01,"c"))
call VXFlushMission(loc_string01)
call DestroyTimer(loc_timer01)
set loc_timer01=null
endfunction
function Func0130 takes nothing returns nothing
local timer loc_timer01=GetExpiredTimer()
local string loc_string01=HandleId2String(loc_timer01)
call DestroyEffect(VXLoadEffectHandle(loc_string01,"fx"))
call UnitRemoveAbility(VXLoadUnitHandle(loc_string01,"c"),VXLoadInteger(loc_string01,"a"))
call TimerStart(loc_timer01,2,false,function Func0129)
set loc_timer01=null
endfunction
function Func0131 takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),bj_groupEnumOwningPlayer)and not(IsUnitDeadBJ(GetFilterUnit()))
endfunction
function Func0132 takes nothing returns boolean
return IsUnitAlly(GetFilterUnit(),bj_groupEnumOwningPlayer)and not(IsUnitDeadBJ(GetFilterUnit()))
endfunction
function Func0133 takes nothing returns nothing
call RemoveLocation(udg_location01)
set udg_location01=null
call DestroyTimer(GetExpiredTimer())
endfunction
function Func0134 takes nothing returns nothing
set udg_real01=0
call DestroyTimer(GetExpiredTimer())
endfunction
function Func0135 takes attacktype loc_attacktype01,damagetype loc_damagetype01 returns integer
set udg_reals01[100]=H2I(loc_attacktype01)
set udg_reals01[101]=H2I(loc_damagetype01)
return 1
endfunction
function Func0136 takes unittype loc_unittype01,real loc_real01 returns integer
set udg_reals01[102]=H2I(loc_unittype01)
set udg_reals01[103]=loc_real01
return 2
endfunction
function Func0137 takes unittype loc_unittype01 returns integer
set udg_reals01[104]=H2I(loc_unittype01)
return 4
endfunction
function Func0138 takes nothing returns integer
set udg_reals01[105]=0
return 64
endfunction
function Func0139 takes nothing returns integer
set udg_reals01[105]=1
return 64
endfunction
function Func0140 takes nothing returns integer
set udg_reals01[105]=2
return 64
endfunction
function Func0141 takes unittype loc_unittype01 returns integer
set udg_reals01[112]=H2I(loc_unittype01)
return 1024
endfunction
function Func0142 takes unit loc_unit01,attacktype loc_attacktype01,damagetype loc_damagetype01 returns real
local real loc_real01=GetWidgetLife(loc_unit01)
local real loc_real02=GetUnitState(loc_unit01,UNIT_STATE_MANA)
local real loc_real03
local unit loc_unit02=Func0120()
call UnitRemoveAbility(loc_unit02,'Aloc')
call Func0083(loc_unit02,GetUnitX(loc_unit01),GetUnitY(loc_unit01))
call SetUnitOwner(loc_unit02,GetOwningPlayer(loc_unit01),false)
set loc_real03=loc_real01
if(loc_real01<1)then
call SetWidgetLife(loc_unit01,1)
set loc_real03=1
endif
call UnitDamageTarget(loc_unit02,loc_unit01,.01,true,false,loc_attacktype01,loc_damagetype01,null)
call Func0121(loc_unit02)
if(loc_real02>GetUnitState(loc_unit01,UNIT_STATE_MANA))then
call SetUnitState(loc_unit01,UNIT_STATE_MANA,loc_real02)
set loc_real03=1
else
set loc_real03=(loc_real03-GetWidgetLife(loc_unit01))*100
endif
call SetWidgetLife(loc_unit01,loc_real01)
set loc_unit02=null
return loc_real03
endfunction
function Func0143 takes unit loc_unit01,unittype loc_unittype01 returns boolean
if(loc_unittype01==UNIT_TYPE_GROUND)then
return not(IsUnitType(loc_unit01,UNIT_TYPE_FLYING))
elseif(loc_unittype01==UNIT_TYPE_RESISTANT)then
return IsUnitType(loc_unit01,loc_unittype01)or IsUnitType(loc_unit01,UNIT_TYPE_HERO)
endif
return IsUnitType(loc_unit01,loc_unittype01)
endfunction
function Func0144 takes unit loc_unit01,unit loc_unit02,integer loc_integer01 returns real
local real loc_real01=1
if(loc_integer01>=8192)then
set loc_integer01=loc_integer01-8192
elseif(loc_integer01>=4096)then
if(GetWidgetLife(loc_unit02)>.405)then
return.0
endif
set loc_integer01=loc_integer01-4096
elseif(GetWidgetLife(loc_unit02)<=.405)then
return.0
endif
if loc_integer01>=2048 then
if IsUnitAlly(loc_unit02,GetOwningPlayer(loc_unit01))then
set loc_real01=loc_real01*udg_reals01[113]
endif
set loc_integer01=loc_integer01-2048
endif
if loc_integer01>=1024 then
if Func0143(loc_unit02,ConvertUnitType(R2I(udg_reals01[112])))then
return.0
endif
set loc_integer01=loc_integer01-1024
endif
if loc_integer01>=512 then
if GetUnitAbilityLevel(loc_unit02,Func0078(110))>0 then
set loc_real01=loc_real01*udg_reals01[111]
endif
set loc_integer01=loc_integer01-512
endif
if loc_integer01>=256 then
if GetUnitAbilityLevel(loc_unit02,Func0078(108))>0 then
set loc_real01=loc_real01*udg_reals01[109]
endif
set loc_integer01=loc_integer01-256
endif
if loc_integer01>=128 then
if GetUnitAbilityLevel(loc_unit02,Func0078(106))>0 then
set loc_real01=loc_real01*udg_reals01[107]
endif
set loc_integer01=loc_integer01-128
endif
if loc_integer01>=64 then
if(udg_reals01[105]==0)and IsUnitAlly(loc_unit02,GetOwningPlayer(loc_unit01))then
return.0
elseif(udg_reals01[105]==2)and IsUnitEnemy(loc_unit02,GetOwningPlayer(loc_unit01))then
return.0
endif
set loc_integer01=loc_integer01-64
endif
if loc_integer01>=32 then
set loc_integer01=loc_integer01-32
if not Func0080(loc_unit02,GetOwningPlayer(loc_unit01))then
return.0
endif
endif
if loc_integer01>=16 then
set loc_integer01=loc_integer01-16
endif
if loc_integer01>=8 then
set loc_integer01=loc_integer01-8
if loc_unit01==loc_unit02 then
return.0
endif
endif
if loc_integer01>=4 then
set loc_integer01=loc_integer01-4
if not Func0143(loc_unit02,ConvertUnitType(R2I(udg_reals01[104])))then
return.0
endif
endif
if loc_integer01>=2 then
set loc_integer01=loc_integer01-2
if Func0143(loc_unit02,ConvertUnitType(R2I(udg_reals01[102])))then
set loc_real01=loc_real01*udg_reals01[103]
endif
endif
if loc_integer01>=1 then
set loc_integer01=loc_integer01-1
set loc_real01=loc_real01*Func0142(loc_unit02,ConvertAttackType(R2I(udg_reals01[100])),ConvertDamageType(R2I(udg_reals01[101])))
endif
return loc_real01
endfunction
function Func0145 takes unit loc_unit01,unit loc_unit02,real loc_real01,attacktype loc_attacktype01,damagetype loc_damagetype01 returns boolean
return UnitDamageTarget(loc_unit01,loc_unit02,loc_real01,true,false,loc_attacktype01,loc_damagetype01,null)
endfunction
function Func0146 takes unit loc_unit01,unit loc_unit02,real loc_real01,integer loc_integer01 returns boolean
local real loc_real02=Func0144(loc_unit01,loc_unit02,loc_integer01)
if(loc_real02==0)then
return false
endif
return UnitDamageTarget(loc_unit01,loc_unit02,loc_real01*loc_real02,true,false,null,null,null)
endfunction
function Func0147 takes player loc_player01,real loc_real01,unit loc_unit01 returns boolean
local unit loc_unit02=Func0120()
call UnitRemoveAbility(loc_unit02,'Aloc')
call Func0083(loc_unit02,GetUnitX(loc_unit01),GetUnitY(loc_unit01))
call SetUnitOwner(loc_unit02,loc_player01,false)
call Func0145(loc_unit02,loc_unit01,loc_real01,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL))
call Func0121(loc_unit02)
return GetWidgetLife(loc_unit01)<=0
endfunction
function Func0148 takes nothing returns nothing
local real loc_real01=udg_reals01[0]
local real loc_real02=udg_reals01[2]
local effect loc_effect01=bj_lastCreatedEffect
local timer loc_timer01=CreateTimer()
local unit loc_unit01=udg_unit08
local real loc_real03=0
local integer loc_integer01=0
local real loc_real04
local unit loc_unit02=udg_unit07
local damagetype loc_damagetype01=ConvertDamageType(R2I(udg_reals01[4]))
local attacktype loc_attacktype01=ConvertAttackType(R2I(udg_reals01[3]))
call TimerStart(loc_timer01,udg_reals01[1]-.01,false,null)
loop
if TimerGetElapsed(loc_timer01)>=loc_real03 then
exitwhen not UnitDamageTarget(loc_unit01,loc_unit02,loc_real01,true,false,loc_attacktype01,loc_damagetype01,null)
exitwhen IsUnitDeadBJ(loc_unit02)
set loc_integer01=loc_integer01+1
set loc_real03=loc_integer01*loc_real02
endif
exitwhen(TimerGetRemaining(loc_timer01)<=0)or IsUnitDeadBJ(loc_unit02)
call TriggerSleepAction(0)
endloop
call DestroyEffect(loc_effect01)
call DestroyTimer(loc_timer01)
set loc_timer01=null
set loc_effect01=null
set loc_damagetype01=null
set loc_attacktype01=null
endfunction
function Func0149 takes nothing returns nothing
local real loc_real01=udg_reals01[0]
local real loc_real02=udg_reals01[2]
local effect loc_effect01=bj_lastCreatedEffect
local timer loc_timer01=CreateTimer()
local integer loc_integer01=udg_integer22
local real loc_real03=0
local integer loc_integer02=0
local real loc_real04
local unit loc_unit01=udg_unit07
call TimerStart(loc_timer01,udg_reals01[1]-.01,false,null)
loop
if TimerGetElapsed(loc_timer01)>=loc_real03 then
exitwhen Func0147(Player(loc_integer01),loc_real01,loc_unit01)
set loc_integer02=loc_integer02+1
set loc_real03=loc_integer02*loc_real02
endif
exitwhen(TimerGetRemaining(loc_timer01)<=0)or IsUnitDeadBJ(loc_unit01)
call TriggerSleepAction(0)
endloop
call DestroyEffect(loc_effect01)
call DestroyTimer(loc_timer01)
set loc_timer01=null
set loc_effect01=null
endfunction
function Func0150 takes gamecache loc_gamecache01,integer loc_integer01,integer loc_integer02 returns nothing
local string loc_string01="DOPT"+I2S(loc_integer01)
local integer loc_integer03=loc_integer02
call StoreInteger(loc_gamecache01,loc_string01,"value",loc_integer03)
if(loc_integer03>=8192)then
set loc_integer03=loc_integer03-8192
endif
if(loc_integer03>=4096)then
set loc_integer03=loc_integer03-4096
endif
if loc_integer03>=2048 then
call StoreReal(loc_gamecache01,loc_string01,"allf",udg_reals01[113])
set loc_integer03=loc_integer03-2048
endif
if loc_integer03>=1024 then
call StoreInteger(loc_gamecache01,loc_string01,"ign",R2I(udg_reals01[112]))
set loc_integer03=loc_integer03-1024
endif
if loc_integer03>=512 then
call StoreInteger(loc_gamecache01,loc_string01,"ab3",Func0078(110))
call StoreReal(loc_gamecache01,loc_string01,"fc3",udg_reals01[111])
set loc_integer03=loc_integer03-512
endif
if loc_integer03>=256 then
call StoreInteger(loc_gamecache01,loc_string01,"ab2",Func0078(108))
call StoreReal(loc_gamecache01,loc_string01,"fc2",udg_reals01[109])
set loc_integer03=loc_integer03-256
endif
if loc_integer03>=128 then
call StoreInteger(loc_gamecache01,loc_string01,"ab1",Func0078(106))
call StoreReal(loc_gamecache01,loc_string01,"fc1",udg_reals01[107])
set loc_integer03=loc_integer03-128
endif
if loc_integer03>=64 then
set loc_integer03=loc_integer03-64
call StoreInteger(loc_gamecache01,loc_string01,"allied",R2I(udg_reals01[105]))
endif
if loc_integer03>=32 then
set loc_integer03=loc_integer03-32
endif
if loc_integer03>=16 then
set loc_integer03=loc_integer03-16
endif
if loc_integer03>=8 then
set loc_integer03=loc_integer03-8
endif
if loc_integer03>=4 then
call StoreInteger(loc_gamecache01,loc_string01,"only",R2I(udg_reals01[104]))
set loc_integer03=loc_integer03-4
endif
if loc_integer03>=2 then
call StoreInteger(loc_gamecache01,loc_string01,"excp",R2I(udg_reals01[102]))
call StoreReal(loc_gamecache01,loc_string01,"excf",udg_reals01[103])
set loc_integer03=loc_integer03-2
endif
if loc_integer03>=1 then
call StoreInteger(loc_gamecache01,loc_string01,"attT",R2I(udg_reals01[100]))
call StoreInteger(loc_gamecache01,loc_string01,"dmgT",R2I(udg_reals01[101]))
endif
endfunction
function Func0151 takes integer loc_integer01 returns integer
local gamecache loc_gamecache01=udg_gamecache03
local integer loc_integer02=GetStoredInteger(loc_gamecache01,"misc","DOPTn")+1
call StoreInteger(loc_gamecache01,"misc","DOPTn",loc_integer02)
call Func0150(loc_gamecache01,loc_integer02,loc_integer01)
set loc_gamecache01=null
return loc_integer02
endfunction
function Func0152 takes integer loc_integer01 returns nothing
call FlushStoredMission(udg_gamecache03,"DOPT"+I2S(loc_integer01))
endfunction
function Func0153 takes integer loc_integer01 returns integer
local gamecache loc_gamecache01=udg_gamecache03
local string loc_string01="DOPT"+I2S(loc_integer01)
local integer loc_integer02=GetStoredInteger(loc_gamecache01,loc_string01,"value")
local integer loc_integer03=loc_integer02
if loc_integer03>=8192 then
set loc_integer03=loc_integer03-8192
endif
if loc_integer03>=4096 then
set loc_integer03=loc_integer03-4096
endif
if loc_integer03>=2048 then
set udg_reals01[113]=GetStoredReal(loc_gamecache01,loc_string01,"allf")
set loc_integer03=loc_integer03-2028
endif
if loc_integer03>=1024 then
set udg_reals01[112]=GetStoredInteger(loc_gamecache01,loc_string01,"ign")
set loc_integer03=loc_integer03-1024
endif
if loc_integer03>=512 then
set udg_reals01[110]=Func0077(GetStoredInteger(loc_gamecache01,loc_string01,"ab3"))
set udg_reals01[111]=GetStoredReal(loc_gamecache01,loc_string01,"fc3")
set loc_integer03=loc_integer03-512
endif
if loc_integer03>=256 then
set udg_reals01[108]=Func0077(GetStoredInteger(loc_gamecache01,loc_string01,"ab2"))
set udg_reals01[109]=GetStoredReal(loc_gamecache01,loc_string01,"fc2")
set loc_integer03=loc_integer03-256
endif
if loc_integer03>=128 then
set udg_reals01[106]=Func0077(GetStoredInteger(loc_gamecache01,loc_string01,"ab1"))
set udg_reals01[107]=GetStoredReal(loc_gamecache01,loc_string01,"fc1")
set loc_integer03=loc_integer03-128
endif
if loc_integer03>=64 then
set loc_integer03=loc_integer03-64
set udg_reals01[105]=GetStoredInteger(loc_gamecache01,loc_string01,"allied")
endif
if loc_integer03>=32 then
set loc_integer03=loc_integer03-32
endif
if loc_integer03>=16 then
set loc_integer03=loc_integer03-16
endif
if loc_integer03>=8 then
set loc_integer03=loc_integer03-8
endif
if loc_integer03>=4 then
set udg_reals01[104]=GetStoredInteger(loc_gamecache01,loc_string01,"only")
set loc_integer03=loc_integer03-4
endif
if loc_integer03>=2 then
set udg_reals01[102]=GetStoredInteger(loc_gamecache01,loc_string01,"excp")
set udg_reals01[103]=GetStoredReal(loc_gamecache01,loc_string01,"excf")
set loc_integer03=loc_integer03-2
endif
if loc_integer03>=1 then
set udg_reals01[100]=GetStoredInteger(loc_gamecache01,loc_string01,"attT")
set udg_reals01[101]=GetStoredInteger(loc_gamecache01,loc_string01,"dmgT")
endif
set loc_gamecache01=null
return loc_integer02
endfunction
function Func0154 takes destructable loc_destructable01 returns boolean
local unit loc_unit01=Func0120()
local boolean loc_boolean01
local boolean loc_boolean02=IsDestructableInvulnerable(loc_destructable01)
local integer loc_integer01='Aeat'
if loc_boolean02 then
call SetDestructableInvulnerable(loc_destructable01,false)
endif
call UnitAddAbility(loc_unit01,loc_integer01)
call Func0083(loc_unit01,GetWidgetX(loc_destructable01),GetWidgetY(loc_destructable01))
set loc_boolean01=(IssueTargetOrderById(loc_unit01,852146,loc_destructable01))
call UnitRemoveAbility(loc_unit01,loc_integer01)
call Func0121(loc_unit01)
set loc_unit01=null
if loc_boolean02 then
call SetDestructableInvulnerable(loc_destructable01,true)
endif
return loc_boolean01
endfunction
function Func0155 takes destructable loc_destructable01 returns boolean
local gamecache loc_gamecache01=udg_gamecache03
local string loc_string01=I2S(GetDestructableTypeId(loc_destructable01))
local boolean loc_boolean01
if HaveStoredBoolean(loc_gamecache01,"trees",loc_string01)then
set loc_boolean01=GetStoredBoolean(loc_gamecache01,"trees",loc_string01)
set loc_gamecache01=null
return loc_boolean01
else
set loc_boolean01=Func0154(loc_destructable01)
call StoreBoolean(loc_gamecache01,"trees",loc_string01,loc_boolean01)
return loc_boolean01
endif
endfunction
function Func0156 takes nothing returns nothing
local destructable loc_destructable01=GetEnumDestructable()
local unit loc_unit01=udg_unit07
if(GetWidgetLife(loc_destructable01)>0)and not(IsDestructableInvulnerable(loc_destructable01))and((Pow(GetDestructableX(loc_destructable01)-udg_reals01[200],2)+Pow(GetDestructableY(loc_destructable01)-udg_reals01[201],2))<=udg_reals01[202])then
call SetWidgetLife(loc_destructable01,GetWidgetLife(loc_destructable01)-udg_reals01[203])
endif
set udg_unit07=loc_unit01
set loc_unit01=null
set loc_destructable01=null
endfunction
function Func0157 takes real loc_real01,real loc_real02,real loc_real03,real loc_real04 returns nothing
local rect loc_rect01=Rect(loc_real01-loc_real03,loc_real02-loc_real03,loc_real01+loc_real03,loc_real02+loc_real03)
set udg_reals01[200]=loc_real01
set udg_reals01[201]=loc_real02
set udg_reals01[202]=loc_real03*loc_real03
set udg_reals01[203]=loc_real04
call EnumDestructablesInRect(loc_rect01,null,function Func0156)
call RemoveRect(loc_rect01)
set loc_rect01=null
endfunction
function Func0158 takes nothing returns nothing
local destructable loc_destructable01=GetEnumDestructable()
if(GetWidgetLife(loc_destructable01)>0)and not(IsDestructableInvulnerable(loc_destructable01))and((Pow(GetDestructableX(loc_destructable01)-udg_reals01[200],2)+Pow(GetDestructableY(loc_destructable01)-udg_reals01[201],2))<=udg_reals01[202])and(Func0155(loc_destructable01))then
call KillDestructable(loc_destructable01)
endif
set loc_destructable01=null
endfunction
function Func0159 takes real loc_real01,real loc_real02,real loc_real03 returns nothing
local rect loc_rect01=Rect(loc_real01-loc_real03,loc_real02-loc_real03,loc_real01+loc_real03,loc_real02+loc_real03)
set udg_reals01[200]=loc_real01
set udg_reals01[201]=loc_real02
set udg_reals01[202]=loc_real03*loc_real03
call EnumDestructablesInRect(loc_rect01,null,function Func0158)
call RemoveRect(loc_rect01)
set loc_rect01=null
endfunction
function Func0160 takes unit loc_unit01,real loc_real01,group loc_group01,integer loc_integer01 returns nothing
local group loc_group02
local unit loc_unit02
if bj_wantDestroyGroup then
set bj_wantDestroyGroup=false
set loc_group02=loc_group01
else
set loc_group02=CreateGroup()
call GroupAddGroup(loc_group01,loc_group02)
endif
loop
set loc_unit02=FirstOfGroup(loc_group02)
exitwhen loc_unit02==null
call Func0146(loc_unit01,loc_unit02,loc_real01,loc_integer01)
call GroupRemoveUnit(loc_group02,loc_unit02)
endloop
call DestroyGroup(loc_group02)
set loc_group02=null
set loc_unit02=null
endfunction
function Func0161 takes unit loc_unit01,real loc_real01,real loc_real02,real loc_real03,real loc_real04,boolean loc_boolean01,integer loc_integer01 returns nothing
local boolexpr loc_boolexpr01=null
local group loc_group01=CreateGroup()
local integer loc_integer02=loc_integer01
set bj_groupEnumOwningPlayer=GetOwningPlayer(loc_unit01)
if loc_integer02>=8192 then
set loc_integer02=loc_integer02-8192
endif
if loc_integer02>=4096 then
set loc_integer02=loc_integer02-4096
endif
if loc_integer02>=2048 then
set loc_integer02=loc_integer02-2048
endif
if loc_integer02>=1024 then
set loc_integer02=loc_integer02-1024
endif
if loc_integer02>=512 then
set loc_integer02=loc_integer02-512
endif
if loc_integer02>=256 then
set loc_integer02=loc_integer02-256
endif
if loc_integer02>=128 then
set loc_integer02=loc_integer02-128
endif
if loc_integer02>=64 then
if(udg_reals01[105]==2)then
set loc_boolexpr01=Condition(function Func0132)
elseif(udg_reals01[105]==1)then
else
set loc_boolexpr01=Condition(function Func0131)
endif
set loc_integer02=loc_integer02-64
elseif not(loc_boolean01)then
set loc_boolexpr01=Condition(function Func0131)
endif
if loc_integer02>=32 then
set loc_integer02=loc_integer02-32
endif
if loc_integer02>=16 then
call Func0159(loc_real02,loc_real03,loc_real04)
endif
call Func0085(loc_group01,loc_real02,loc_real03,loc_real04,loc_boolexpr01)
set bj_wantDestroyGroup=true
call Func0160(loc_unit01,loc_real01,loc_group01,loc_integer01)
call DestroyBoolExpr(loc_boolexpr01)
set loc_boolexpr01=null
set loc_group01=null
endfunction
function Func0162 takes nothing returns nothing
local real loc_real01
local real loc_real02=udg_reals01[0]
local real loc_real03=udg_reals01[2]
local real loc_real04=udg_reals01[3]
local real loc_real05=udg_reals01[8]
local boolean loc_boolean01=(udg_reals01[4]>=1)
local boolean loc_boolean02=(udg_reals01[4]==2)
local boolean loc_boolean03=(udg_reals01[5]==1)
local unit loc_unit01=udg_unit08
local unit loc_unit02=udg_unit07
local player loc_player01=GetOwningPlayer(loc_unit02)
local timer loc_timer01=CreateTimer()
local real loc_real06=0
local integer loc_integer01=0
local group loc_group01=CreateGroup()
local string loc_string01
local string loc_string02=bj_lastPlayedMusic
local string loc_string03=""
local unit loc_unit03
local boolean loc_boolean04=false
local unittype loc_unittype01=null
local unittype loc_unittype02=null
local unittype loc_unittype03=null
local attacktype loc_attacktype01
local damagetype loc_damagetype01
local boolean loc_boolean05=(udg_reals01[11]==1)
local boolean loc_boolean06=(udg_reals01[12]==1)
local integer loc_integer02=0
local integer loc_integer03=0
local integer loc_integer04=0
local real loc_real07=udg_reals01[107]
local real loc_real08=udg_reals01[109]
local real loc_real09=udg_reals01[111]
local real loc_real10=udg_reals01[113]
local effect array loc_effects01
local integer loc_integer05=R2I(udg_reals01[114])
local boolean loc_boolean07=false
local integer loc_integer06=0
set loc_effects01[0]=bj_lastCreatedEffect
if loc_real07!=1 then
set loc_integer02=Func0078(106)
endif
if loc_real08!=1 then
set loc_integer03=Func0078(108)
endif
if loc_real09!=1 then
set loc_integer04=Func0078(110)
endif
if udg_reals01[112]!=-1 then
set loc_unittype02=ConvertUnitType(R2I(udg_reals01[112]))
endif
if udg_reals01[6]!=-1 then
set loc_unittype01=ConvertUnitType(R2I(udg_reals01[6]))
endif
if udg_reals01[7]!=-1 then
set loc_unittype03=ConvertUnitType(R2I(udg_reals01[7]))
endif
if udg_reals01[9]!=-1 then
set loc_attacktype01=ConvertAttackType(R2I(udg_reals01[9]))
else
set loc_attacktype01=(ATTACK_TYPE_CHAOS)
endif
if udg_reals01[10]!=-1 then
set loc_damagetype01=ConvertDamageType(R2I(udg_reals01[10]))
else
set loc_damagetype01=(DAMAGE_TYPE_UNIVERSAL)
endif
loop
set loc_string01=SubString(loc_string02,loc_integer01,loc_integer01+1)
exitwhen loc_string01=="!"or loc_string01==""
set loc_string03=loc_string03+loc_string01
set loc_integer01=loc_integer01+1
endloop
set loc_string02=SubString(loc_string02,loc_integer01+1,10000)
call TimerStart(loc_timer01,udg_reals01[1]-.01,false,null)
set loc_integer01=0
loop
loop
exitwhen loc_integer06<=0
call DestroyEffect(loc_effects01[loc_integer06])
set loc_effects01[loc_integer06]=null
set loc_integer06=loc_integer06-1
endloop
if IsUnitInGroup(loc_unit02,udg_group19)then
set loc_boolean04=true
call GroupRemoveUnit(udg_group19,loc_unit02)
endif
exitwhen loc_boolean04
if TimerGetElapsed(loc_timer01)>=loc_real06 then
set loc_integer01=loc_integer01+1
set loc_real06=loc_integer01*loc_real04
call Func0085(loc_group01,GetUnitX(loc_unit02),GetUnitY(loc_unit02),loc_real03,null)
if loc_boolean05 then
call Func0159(GetUnitX(loc_unit02),GetUnitY(loc_unit02),loc_real03)
endif
loop
set loc_unit03=FirstOfGroup(loc_group01)
exitwhen loc_unit03==null
if(loc_integer05==0)then
set loc_boolean07=(GetWidgetLife(loc_unit03)>.405)
elseif(loc_integer05==1)then
set loc_boolean07=(GetWidgetLife(loc_unit03)<=.405)
else
set loc_boolean07=true
endif
if(loc_boolean03 or loc_unit03!=loc_unit01)and not(IsUnitDeadBJ(loc_unit03))and(((loc_boolean01 or loc_boolean02)and IsUnitAlly(loc_unit03,loc_player01))or(not(loc_boolean02)and IsUnitEnemy(loc_unit03,loc_player01)))and(loc_unittype01==null or Func0143(loc_unit03,loc_unittype01))and(loc_unittype02==null or not(Func0143(loc_unit03,loc_unittype02)))then
set loc_real01=loc_real02
if(loc_real10!=1)and IsUnitAlly(loc_unit03,loc_player01)then
set loc_real01=loc_real01*loc_real10
endif
if(loc_unittype03!=null)and Func0143(loc_unit03,loc_unittype03)then
set loc_real01=loc_real01*loc_real05
endif
if loc_boolean06 and not(Func0080(loc_unit03,loc_player01))then
set loc_real01=0
endif
if(loc_integer02!=0)and(GetUnitAbilityLevel(loc_unit03,loc_integer02)>0)then
set loc_real01=loc_real01*loc_real07
endif
if(loc_integer03!=0)and(GetUnitAbilityLevel(loc_unit03,loc_integer03)>0)then
set loc_real01=loc_real01*loc_real08
endif
if(loc_integer04!=0)and(GetUnitAbilityLevel(loc_unit03,loc_integer04)>0)then
set loc_real01=loc_real01*loc_real09
endif
if loc_real01!=0 then
call Func0145(loc_unit01,loc_unit03,loc_real01,loc_attacktype01,loc_damagetype01)
if(loc_string02!="")and(loc_string02!=null)then
set loc_integer06=loc_integer06+1
set loc_effects01[loc_integer06]=AddSpecialEffectTarget(loc_string02,loc_unit03,loc_string03)
endif
endif
endif
call GroupRemoveUnit(loc_group01,loc_unit03)
endloop
endif
exitwhen TimerGetRemaining(loc_timer01)<=0
call TriggerSleepAction(0)
endloop
call DestroyGroup(loc_group01)
call DestroyEffect(loc_effects01[0])
call TriggerSleepAction(2)
call Func0121(loc_unit02)
call DestroyTimer(loc_timer01)
set loc_group01=null
set loc_unit02=null
set loc_timer01=null
set loc_player01=null
set loc_effects01[0]=null
set loc_unit03=null
set loc_unit01=null
set loc_unittype01=null
set loc_unittype02=null
set loc_unittype03=null
set loc_attacktype01=null
set loc_damagetype01=null
endfunction
function Func0163 takes string missionkey,string key returns unit
return LoadUnitHandle(udg_hashtable01,StringHash(missionkey),StringHash(key))
endfunction
function Func0164 takes gamecache loc_gamecache01,unit loc_unit01,string loc_string01 returns boolean
local boolean loc_boolean01=GetStoredBoolean(loc_gamecache01,loc_string01,"unit")
local unit loc_unit02
local real loc_real01
local real loc_real02
local real loc_real03
local real loc_real04=GetUnitX(loc_unit01)
local real loc_real05=GetUnitY(loc_unit01)
local real loc_real06=GetUnitFlyHeight(loc_unit01)
local real loc_real07
local real loc_real08
local real loc_real09
local real loc_real10
local real loc_real11
local integer loc_integer01
local boolean loc_boolean02=false
local effect loc_effect01
if loc_boolean01 then
set loc_unit02=Func0163(loc_string01,"tg")
if(GetWidgetLife(loc_unit02)<=.405)then
set loc_boolean01=false
call StoreBoolean(loc_gamecache01,loc_string01,"unit",false)
else
set loc_real01=GetUnitX(loc_unit02)
set loc_real02=GetUnitY(loc_unit02)
set loc_real03=GetUnitFlyHeight(loc_unit02)+GetStoredReal(loc_gamecache01,loc_string01,"z2o")
set loc_integer01=GetStoredInteger(loc_gamecache01,loc_string01,"N")
set loc_integer01=loc_integer01+1
if(loc_integer01==0)then
call StoreReal(loc_gamecache01,loc_string01,"z2",loc_real03)
call StoreReal(loc_gamecache01,loc_string01,"x2",loc_real01)
call StoreReal(loc_gamecache01,loc_string01,"y2",loc_real02)
elseif(loc_integer01==25)then
set loc_integer01=0
endif
call StoreInteger(loc_gamecache01,loc_string01,"N",loc_integer01)
endif
set loc_unit02=null
endif
if not(loc_boolean01)then
set loc_real03=GetStoredReal(loc_gamecache01,loc_string01,"z2")
set loc_real01=GetStoredReal(loc_gamecache01,loc_string01,"x2")
set loc_real02=GetStoredReal(loc_gamecache01,loc_string01,"y2")
endif
set loc_real07=Atan2(loc_real02-loc_real05,loc_real01-loc_real04)
call SetUnitFacing(loc_unit01,loc_real07*bj_RADTODEG)
set loc_real10=GetStoredReal(loc_gamecache01,loc_string01,"speed")
set loc_real08=loc_real10*.04
set loc_real09=SquareRoot(Pow(loc_real04-loc_real01,2)+Pow(loc_real05-loc_real02,2))
if(loc_real09<=loc_real08)then
call Func0083(loc_unit01,loc_real01,loc_real02)
set loc_boolean02=true
else
call Func0083(loc_unit01,loc_real04+loc_real08*Cos(loc_real07),loc_real05+loc_real08*Sin(loc_real07))
endif
set loc_real07=GetStoredReal(loc_gamecache01,loc_string01,"acel")
set loc_real11=loc_real09/loc_real10
set loc_real10=(loc_real03-loc_real06+.5*loc_real07*loc_real11*loc_real11)/loc_real11
call SetUnitFlyHeight(loc_unit01,loc_real06+loc_real10*.04,0)
set loc_real08=(Pow(GetUnitX(loc_unit01)-loc_real01,2)+Pow(GetUnitY(loc_unit01)-loc_real02,2))
if(loc_boolean02 or(loc_real08<=400))then
set loc_boolean02=true
call StoreBoolean(loc_gamecache01,loc_string01,"done",true)
set loc_effect01=VXLoadEffectHandle(loc_string01,"fx")
if(loc_effect01!=null)then
call DestroyEffect(loc_effect01)
set loc_effect01=null
endif
endif
return loc_boolean02
endfunction
function Func0165 takes gamecache loc_gamecache01,unit loc_unit01,string loc_string01,trigger loc_trigger01 returns nothing
local effect loc_effect01=VXLoadEffectHandle(loc_string01,"fx")
call TriggerExecute(loc_trigger01)
if(loc_effect01!=null)then
call DestroyEffect(loc_effect01)
set loc_effect01=null
endif
call FlushStoredInteger(loc_gamecache01,"MOVEMENT_TABLES",HandleId2String(loc_unit01))
call FlushStoredInteger(loc_gamecache01,"MOVEMENT_TABLES",HandleId2String(loc_trigger01))
if VXLoadBoolean(loc_string01,"new")then
call ExplodeUnitBJ(loc_unit01)
else
call Func0125(loc_unit01,4,0,true)
endif
call VXFlushMission(loc_string01)
call TriggerRemoveAction(loc_trigger01,VXLoadTriggerActionHandle(loc_string01,"ac"))
call Func0094(loc_trigger01)
call DestroyTrigger(loc_trigger01)
endfunction
function Func0167 takes gamecache loc_gamecache01,unit loc_unit01,string loc_string01 returns boolean
local integer loc_integer01=GetStoredInteger(loc_gamecache01,loc_string01,"state")
local boolean loc_boolean01=(loc_integer01==2)
local real loc_real01
local real loc_real02
local real loc_real03
local real loc_real04
local real loc_real05
local real loc_real06
local real loc_real07
local integer loc_integer02
local widget loc_widget01
if not(loc_boolean01)then
if(loc_integer01==1)then
call TriggerRegisterUnitInRange(VXLoadTriggerHandle(loc_string01,"T"),loc_unit01,GetStoredReal(loc_gamecache01,loc_string01,"collision"),null)
call FlushStoredInteger(loc_gamecache01,loc_string01,"state")
endif
set loc_real01=GetStoredReal(loc_gamecache01,loc_string01,"speed")*.04
set loc_real02=GetStoredReal(loc_gamecache01,loc_string01,"F")
set loc_real03=GetStoredReal(loc_gamecache01,loc_string01,"aspeed")
set loc_real04=GetUnitX(loc_unit01)
set loc_real06=GetUnitY(loc_unit01)
if(loc_real03!=0)then
set loc_integer02=GetStoredInteger(loc_gamecache01,loc_string01,"TType")
if(loc_integer02==1)or(loc_integer02==2)then
if(loc_integer02==1)then
set loc_real05=GetStoredReal(loc_gamecache01,loc_string01,"Tx")
set loc_real07=GetStoredReal(loc_gamecache01,loc_string01,"Func1374")
else
set loc_widget01=VXLoadWidgetHandle(loc_string01,"Func1276")
if(GetWidgetLife(loc_widget01)<=.405)then
call StoreInteger(loc_gamecache01,loc_string01,"TType",0)
set loc_real05=loc_real04+.001
set loc_real07=loc_real06+.001
else
set loc_real05=GetWidgetX(loc_widget01)
set loc_real07=GetWidgetY(loc_widget01)
endif
set loc_widget01=null
endif
set loc_real02=Func0115(loc_real02,Atan2BJ(loc_real07-loc_real06,loc_real05-loc_real04),loc_real03*.04)
else
set loc_real02=loc_real02+loc_real03*.04
endif
call StoreReal(loc_gamecache01,loc_string01,"F",loc_real02)
call SetUnitFacing(loc_unit01,loc_real02)
endif
set loc_real02=loc_real02*bj_DEGTORAD
set loc_real05=loc_real04+loc_real01*Cos(loc_real02)
set loc_real07=loc_real06+loc_real01*Sin(loc_real02)
set loc_real01=GetStoredReal(loc_gamecache01,loc_string01,"maxd")-loc_real01
call StoreReal(loc_gamecache01,loc_string01,"maxd",loc_real01)
set loc_boolean01=(loc_real01<=0)
if not(Func0083(loc_unit01,loc_real05,loc_real07))then
call SetUnitX(loc_unit01,loc_real04)
call SetUnitY(loc_unit01,loc_real06)
set loc_boolean01=true
elseif(GetStoredBoolean(loc_gamecache01,loc_string01,"pfx"))then
set loc_real02=GetStoredReal(loc_gamecache01,loc_string01,"pfx_current")+.04
if(loc_real02>=GetStoredReal(loc_gamecache01,loc_string01,"pfx_dur"))then
call DestroyEffect(AddSpecialEffectTarget(GetStoredString(loc_gamecache01,loc_string01,"pfx_path"),loc_unit01,"origin"))
call StoreReal(loc_gamecache01,loc_string01,"pfx_current",0)
else
call StoreReal(loc_gamecache01,loc_string01,"pfx_current",loc_real02)
endif
endif
endif
if loc_boolean01 then
call Func0165(loc_gamecache01,loc_unit01,loc_string01,VXLoadTriggerHandle(loc_string01,"T"))
endif
set loc_gamecache01=null
return loc_boolean01
endfunction
function Func0168 takes nothing returns nothing
local timer loc_timer01=GetExpiredTimer()
local group loc_group01=VXLoadGroupHandle("CasterSystem","MOVEMENT_GROUP")
local group loc_group02=CreateGroup()
local unit loc_unit01
local string loc_string01
local gamecache loc_gamecache01=udg_gamecache03
call GroupAddUnit(loc_group01,null)
loop
set loc_unit01=FirstOfGroup(loc_group01)
exitwhen(loc_unit01==null)
call GroupRemoveUnit(loc_group01,loc_unit01)
set loc_string01=I2S(GetStoredInteger(loc_gamecache01,"MOVEMENT_TABLES",HandleId2String(loc_unit01)))
if(loc_string01!=null)and(loc_string01!="")then
if GetStoredBoolean(loc_gamecache01,loc_string01,"IsCollisionMissile")then
if not(Func0167(loc_gamecache01,loc_unit01,loc_string01))then
call GroupAddUnit(loc_group02,loc_unit01)
endif
elseif GetStoredBoolean(loc_gamecache01,loc_string01,"IsProjectile")then
if not(Func0164(loc_gamecache01,loc_unit01,loc_string01))then
call GroupAddUnit(loc_group02,loc_unit01)
endif
endif
else
call BJDebugMsg("Caster System: Unexpected Error (2)")
endif
endloop
if(FirstOfGroup(loc_group02)==null)then
call Func0094(loc_timer01)
call DestroyTimer(loc_timer01)
call DestroyGroup(loc_group02)
else
call VXStoreGroupHandle("CasterSystem","MOVEMENT_GROUP",loc_group02)
endif
call DestroyGroup(loc_group01)
set loc_unit01=null
set loc_group02=null
set loc_group01=null
set loc_timer01=null
set loc_gamecache01=null
endfunction
function Func0169 takes unit loc_unit01,effect loc_effect01,real loc_real01,real loc_real02,real loc_real03,real loc_real04,unit loc_unit02,real loc_real05 returns nothing
local timer loc_timer01
local gamecache loc_gamecache01=udg_gamecache03
local hashtable ht=udg_hashtable01
local string loc_string01
local string loc_string02
local integer loc_integer01
local group loc_group01
if(HaveSavedHandle(ht,StringHash("CasterSystem"),StringHash("MOVEMENT_TIMER")))then
set loc_group01=VXLoadGroupHandle("CasterSystem","MOVEMENT_GROUP")
else
set loc_timer01=CreateTimer()
set loc_group01=CreateGroup()
call VXStoreGroupHandle("CasterSystem","MOVEMENT_GROUP",loc_group01)
call VXStoreTimerHandle("CasterSystem","MOVEMENT_TIMER",loc_timer01)
call TimerStart(loc_timer01,.04,true,function Func0168)
set loc_timer01=null
endif
set loc_string02=HandleId2String(loc_unit01)
set loc_string01=I2S(VXLoadInteger("MOVEMENT_TABLES",loc_string02))
if(loc_string01!=null)and(loc_string01!="")then
call VXStoreBoolean(loc_string01,"done",true)
endif
set loc_integer01=VXGetFreeTableIndex()
set loc_string01=I2S(loc_integer01)
call VXStoreInteger("MOVEMENT_TABLES",loc_string02,loc_integer01)
call GroupAddUnit(loc_group01,loc_unit01)
call StoreBoolean(loc_gamecache01,loc_string01,"IsProjectile",true)
if(loc_unit02!=null)then
call StoreBoolean(loc_gamecache01,loc_string01,"unit",true)
call StoreInteger(loc_gamecache01,loc_string01,"tg",H2I(loc_unit02))
call StoreReal(loc_gamecache01,loc_string01,"x2",GetUnitX(loc_unit02))
call StoreReal(loc_gamecache01,loc_string01,"y2",GetUnitY(loc_unit02))
call StoreReal(loc_gamecache01,loc_string01,"z2o",loc_real05)
else
call StoreReal(loc_gamecache01,loc_string01,"x2",loc_real03)
call StoreReal(loc_gamecache01,loc_string01,"y2",loc_real04)
endif
call StoreReal(loc_gamecache01,loc_string01,"z2",loc_real05)
call StoreReal(loc_gamecache01,loc_string01,"speed",loc_real01)
call StoreReal(loc_gamecache01,loc_string01,"acel",loc_real02*8000)
if(loc_effect01!=null)then
call VXStoreEffectHandle(loc_string01,"fx",loc_effect01)
set loc_effect01=null
endif
loop
exitwhen GetStoredBoolean(loc_gamecache01,loc_string01,"done")
call TriggerSleepAction(0)
endloop
call VXStoreInteger("MOVEMENT_TABLES",loc_string02,0)
set loc_gamecache01=null
set loc_group01=null
endfunction
function Func0170 takes unit loc_unit01,real loc_real01,real loc_real02,real loc_real03,unit loc_unit02,real loc_real04 returns nothing
local real loc_real05=GetUnitX(loc_unit01)
local real loc_real06=GetUnitY(loc_unit01)
local real loc_real07=loc_real01*1600
local real loc_real08=GetUnitMoveSpeed(loc_unit01)
local real loc_real09=GetUnitFlyHeight(loc_unit01)
local real loc_real10
local real loc_real11
local real loc_real12
local real loc_real13
local real loc_real14
local real loc_real15=0
local boolean loc_boolean01=(loc_unit02!=null)
local boolean loc_boolean02=false
local boolean loc_boolean03=false
if loc_boolean01 then
set loc_real02=GetUnitX(loc_unit02)
set loc_real03=GetUnitY(loc_unit02)
set loc_real04=GetUnitFlyHeight(loc_unit02)+loc_real04
endif
set loc_boolean03=(loc_real04>loc_real09)
set loc_real10=SquareRoot(Pow(loc_real02-loc_real05,2)+Pow(loc_real03-loc_real06,2))
set loc_real11=1000000
set loc_real12=0
set loc_real13=loc_real10/loc_real08
if loc_real13==0 then
set loc_real13=.001
endif
set loc_real14=(loc_real04-loc_real09+.5*loc_real07*loc_real13*loc_real13)/loc_real13
call SetUnitFacing(loc_unit01,Atan2BJ(loc_real03-loc_real06,loc_real02-loc_real02))
call IssuePointOrderById(loc_unit01,851986,loc_real02,loc_real03)
set loc_real13=0
loop
set loc_real12=loc_real11
if loc_boolean01 then
if IsUnitDeadBJ(loc_unit02)then
set loc_boolean01=false
else
set loc_real02=GetUnitX(loc_unit02)
set loc_real03=GetUnitY(loc_unit02)
endif
endif
set loc_real11=SquareRoot(Pow(loc_real02-GetUnitX(loc_unit01),2)+Pow(loc_real03-GetUnitY(loc_unit01),2))
exitwhen loc_boolean02 or loc_real11==0
set loc_boolean02=(loc_real11<=loc_real08*(loc_real13-loc_real15))
exitwhen(loc_boolean03 and loc_boolean02)or(GetUnitCurrentOrder(loc_unit01)!=851986)
if loc_boolean01 then
call IssuePointOrderById(loc_unit01,851986,loc_real02,loc_real03)
endif
set loc_real15=loc_real13
if loc_real15==.001 then
set loc_real13=.1
else
set loc_real13=(loc_real10-loc_real11)/loc_real08
endif
set loc_real13=2*loc_real13-loc_real15
call SetUnitFlyHeight(loc_unit01,loc_real09+(loc_real14*loc_real13-.5*loc_real07*loc_real13*loc_real13),RAbsBJ(loc_real14-loc_real07*(loc_real13+loc_real15)/2))
set loc_real13=(loc_real13+loc_real15)/2
call TriggerSleepAction(0)
endloop
if loc_boolean01 then
set loc_real02=GetUnitX(loc_unit02)
set loc_real03=GetUnitY(loc_unit02)
endif
call SetUnitFlyHeight(loc_unit01,loc_real04,0)
call Func0083(loc_unit01,loc_real02,loc_real03)
endfunction
function Func0171 takes unit loc_unit01,real loc_real01,real loc_real02,real loc_real03,real loc_real04 returns nothing
call Func0170(loc_unit01,loc_real01,loc_real02,loc_real03,null,loc_real04)
endfunction
function Func0172 takes nothing returns nothing
local unit loc_unit01=udg_unit07
local effect loc_effect01=bj_lastCreatedEffect
local real loc_real01=udg_reals01[0]
local real loc_real02=udg_reals01[1]
local real loc_real03=udg_reals01[3]
local real loc_real04=udg_reals01[4]
local boolean loc_boolean01=bj_isUnitGroupInRectResult
local integer loc_integer01=Func0151(R2I(udg_reals01[5]))
local unit loc_unit02=udg_unit08
local real loc_real05=udg_reals01[6]
if(loc_real05<=522)then
call SetUnitMoveSpeed(loc_unit01,loc_real05)
call Func0171(loc_unit01,bj_meleeNearestMineDist,udg_reals01[0],udg_reals01[1],udg_reals01[2])
call DestroyEffect(loc_effect01)
else
call Func0169(loc_unit01,loc_effect01,loc_real05,bj_meleeNearestMineDist,udg_reals01[0],udg_reals01[1],null,udg_reals01[2])
endif
call Func0161(loc_unit02,loc_real04,loc_real01,loc_real02,loc_real03,loc_boolean01,Func0153(loc_integer01))
call Func0152(loc_integer01)
call ExplodeUnitBJ(loc_unit01)
set loc_unit01=null
set loc_effect01=null
endfunction
function Func0173 takes nothing returns nothing
local unit loc_unit01=udg_unit07
local effect loc_effect01=bj_lastCreatedEffect
local real loc_real01=udg_reals01[0]
local real loc_real02=udg_reals01[1]
local real loc_real03=udg_reals01[3]
if(loc_real03<=522)then
call SetUnitMoveSpeed(loc_unit01,loc_real03)
call Func0171(loc_unit01,bj_meleeNearestMineDist,udg_reals01[0],udg_reals01[1],udg_reals01[2])
call DestroyEffect(loc_effect01)
else
call Func0169(loc_unit01,loc_effect01,loc_real03,bj_meleeNearestMineDist,udg_reals01[0],udg_reals01[1],null,udg_reals01[2])
endif
call ExplodeUnitBJ(loc_unit01)
set loc_unit01=null
set loc_effect01=null
endfunction
function Func0174 takes unit loc_unit01,real loc_real01,unit loc_unit02,real loc_real02 returns nothing
call Func0170(loc_unit01,loc_real01,0,0,loc_unit02,loc_real02)
endfunction
function Func0175 takes nothing returns nothing
local unit loc_unit01=udg_unit07
local unit loc_unit02=bj_meleeNearestMine
local effect loc_effect01=bj_lastCreatedEffect
local real loc_real01=udg_reals01[4]
local damagetype loc_damagetype01=ConvertDamageType(R2I(udg_reals01[6]))
local attacktype loc_attacktype01=ConvertAttackType(R2I(udg_reals01[5]))
local unit loc_unit03=udg_unit08
local real loc_real02=udg_reals01[7]
if(loc_real02<=522)then
call SetUnitMoveSpeed(loc_unit01,loc_real02)
call Func0174(loc_unit01,bj_meleeNearestMineDist,loc_unit02,udg_reals01[2])
call DestroyEffect(loc_effect01)
else
call Func0169(loc_unit01,loc_effect01,loc_real02,bj_meleeNearestMineDist,0,0,loc_unit02,udg_reals01[2])
endif
call Func0145(loc_unit03,loc_unit02,loc_real01,loc_attacktype01,loc_damagetype01)
call ExplodeUnitBJ(loc_unit01)
set loc_unit01=null
set loc_unit03=null
set loc_unit02=null
set loc_effect01=null
set loc_damagetype01=null
set loc_attacktype01=null
set loc_effect01=null
endfunction
function Func0176 takes unit loc_unit01,timer loc_timer01,group loc_group01 returns nothing
local string loc_string01=HandleId2String(loc_unit01)
call PauseTimer(loc_timer01)
call Func0094(loc_timer01)
call DestroyTimer(loc_timer01)
call GroupRemoveUnit(loc_group01,loc_unit01)
call DestroyEffect(VXLoadEffectHandle(loc_string01,"CS_fx"))
call Func0125(loc_unit01,4,VXLoadInteger(loc_string01,"CS_abil"),false)
call VXFlushMission(loc_string01)
endfunction
function Func0177 takes nothing returns nothing
local timer loc_timer01=GetExpiredTimer()
local unit loc_unit01=HKey2Unit(loc_timer01,"u")
call Func0176(loc_unit01,loc_timer01,HKey2Group(HKey2Unit(loc_unit01,"CS_DG"),"G"))
set loc_timer01=null
set loc_unit01=null
endfunction
function Func0178 takes timer loc_timer01 returns nothing
local string loc_string01=I2S(H2I(loc_timer01))
local gamecache loc_gamecache01=udg_gamecache03
local group loc_group01=VXLoadGroupHandle(loc_string01,"G")
local unit loc_unit01
call Func0152(GetStoredInteger(loc_gamecache01,loc_string01,"dop"))
call Func0119(VXLoadTimerHandle(loc_string01,"lifespan"))
loop
set loc_unit01=FirstOfGroup(loc_group01)
exitwhen(loc_unit01==null)
call Func0176(loc_unit01,HKey2Timer(loc_unit01,"CS_t"),loc_group01)
endloop
call DestroyGroup(loc_group01)
call FlushStoredMission(loc_gamecache01,loc_string01)
call PauseTimer(loc_timer01)
call DestroyTimer(loc_timer01)
set loc_group01=null
set loc_gamecache01=null
endfunction
function Func0179 takes nothing returns nothing
call GroupAddUnit(bj_groupAddGroupDest,GetFilterUnit())
endfunction
function Func0180 takes nothing returns nothing
local timer loc_timer01=GetExpiredTimer()
local string loc_string01=I2S(H2I(loc_timer01))
local gamecache loc_gamecache01=udg_gamecache03
local group loc_group01=CreateGroup()
local group loc_group02=Func0079(VXLoadGroupHandle(loc_string01,"G"))
local group loc_group03=CreateGroup()
local unit loc_unit01
local unit loc_unit02=VXLoadUnitHandle(loc_string01,"hur")
local real loc_real01=GetStoredReal(loc_gamecache01,loc_string01,"are")
local real loc_real02
local integer loc_integer01
local boolean loc_boolean01=GetStoredBoolean(loc_gamecache01,loc_string01,"trees")
local boolexpr loc_boolexpr01=Condition(function Func0179)
set bj_groupAddGroupDest=loc_group01
if(FirstOfGroup(loc_group02)!=null)then
loop
set loc_unit01=FirstOfGroup(loc_group02)
exitwhen(loc_unit01==null)
call GroupRemoveUnit(loc_group02,loc_unit01)
call Func0085(loc_group03,GetUnitX(loc_unit01),GetUnitY(loc_unit01),loc_real01,loc_boolexpr01)
if loc_boolean01 then
call Func0159(GetUnitX(loc_unit01),GetUnitY(loc_unit01),loc_real01)
endif
endloop
if(FirstOfGroup(loc_group01)!=null)then
set loc_integer01=Func0153(GetStoredInteger(loc_gamecache01,loc_string01,"dop"))
set loc_real02=GetStoredReal(loc_gamecache01,loc_string01,"dmg")
loop
set loc_unit01=FirstOfGroup(loc_group01)
exitwhen(loc_unit01==null)
set loc_real01=Func0144(loc_unit02,loc_unit01,loc_integer01)
if(loc_real01!=0)then
call UnitDamageTarget(loc_unit02,loc_unit01,loc_real02*loc_real01,true,false,null,null,null)
endif
call GroupRemoveUnit(loc_group01,loc_unit01)
endloop
endif
elseif GetStoredBoolean(loc_gamecache01,loc_string01,"autodestruct")then
call Func0178(loc_timer01)
endif
call DestroyBoolExpr(loc_boolexpr01)
call DestroyGroup(loc_group01)
call DestroyGroup(loc_group03)
call DestroyGroup(loc_group02)
set loc_boolexpr01=null
set loc_timer01=null
set loc_group01=null
set loc_group03=null
set loc_group02=null
set loc_unit02=null
set loc_gamecache01=null
endfunction
function Func0181 takes nothing returns nothing
call Func0178(HKey2Timer(GetExpiredTimer(),"t"))
endfunction
function Func0182 takes nothing returns nothing
local gamecache loc_gamecache01=udg_gamecache03
local integer loc_integer01=GetLearnedSkill()
local string loc_string01=I2S(loc_integer01)
if HaveStoredString(loc_gamecache01,"events_onlearn",loc_string01)then
call ExecuteFunc(GetStoredString(loc_gamecache01,"events_onlearn",loc_string01))
endif
set loc_gamecache01=null
endfunction
function Func0183 takes nothing returns nothing
local gamecache loc_gamecache01=udg_gamecache03
local integer loc_integer01=GetLearnedSkill()
local string loc_string01=I2S(loc_integer01)
if HaveStoredString(loc_gamecache01,"events_onlearn",loc_string01)then
call StoreInteger(loc_gamecache01,"events_variables","unit",H2I(GetTriggerUnit()))
call StoreInteger(loc_gamecache01,"events_variables","current",loc_integer01)
call ExecuteFunc(GetStoredString(loc_gamecache01,"events_onlearn",loc_string01))
endif
set loc_gamecache01=null
endfunction
function Func0186 takes gamecache loc_gamecache01,unit loc_unit01,string loc_string01 returns nothing
local integer loc_integer01=GetStoredInteger(loc_gamecache01,"events_passives","n")
local integer loc_integer02=0
local integer loc_integer03=1
local integer loc_integer04
loop
exitwhen(loc_integer03>loc_integer01)
set loc_integer04=GetStoredInteger(loc_gamecache01,"events_passives",I2S(loc_integer03))
if(GetUnitAbilityLevel(loc_unit01,loc_integer04)>0)then
if(loc_integer02==0)then
set loc_integer02=1
call StoreInteger(loc_gamecache01,"events_variables","unit",H2I(loc_unit01))
else
set loc_integer02=loc_integer02+1
endif
call StoreInteger(loc_gamecache01,"events_unit_passive"+I2S(loc_integer02),loc_string01,loc_integer04)
call StoreInteger(loc_gamecache01,"events_variables","current",loc_integer04)
call ExecuteFunc(GetStoredString(loc_gamecache01,"events_onlearn",I2S(loc_integer04)))
endif
set loc_integer03=loc_integer03+1
endloop
if(loc_integer02==0)then
set loc_integer02=-1
endif
call StoreInteger(loc_gamecache01,"events_unit_passives",loc_string01,loc_integer02)
endfunction
function Func0187 takes gamecache loc_gamecache01,unit loc_unit01,string loc_string01,integer loc_integer01 returns nothing
local integer loc_integer02=1
local integer loc_integer03
call StoreInteger(loc_gamecache01,"events_variables","unit",H2I(loc_unit01))
loop
exitwhen(loc_integer02>loc_integer01)
set loc_integer03=GetStoredInteger(loc_gamecache01,"events_unit_passive"+I2S(loc_integer02),loc_string01)
if(GetUnitAbilityLevel(loc_unit01,loc_integer03)>0)then
call StoreInteger(loc_gamecache01,"events_variables","current",loc_integer03)
call ExecuteFunc(GetStoredString(loc_gamecache01,"events_onlearn",I2S(loc_integer03)))
endif
set loc_integer02=loc_integer02+1
endloop
endfunction
function Func0188 takes nothing returns nothing
local gamecache loc_gamecache01=udg_gamecache03
local unit loc_unit01=GetTriggerUnit()
local string loc_string01=I2S(GetUnitTypeId(loc_unit01))
local integer loc_integer01=GetStoredInteger(loc_gamecache01,"events_unit_passives",loc_string01)
if(loc_integer01>0)then
call Func0187(loc_gamecache01,loc_unit01,loc_string01,loc_integer01)
elseif(loc_integer01==0)then
call Func0186(loc_gamecache01,loc_unit01,loc_string01)
endif
set loc_gamecache01=null
set loc_unit01=null
endfunction
function Func0189 takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='h00X')
endfunction
function Func0190 takes nothing returns nothing
local gamecache loc_gamecache01=udg_gamecache03
local trigger loc_trigger01
local integer loc_integer01=GetStoredInteger(loc_gamecache01,"events_passives","n")
local integer loc_integer02=1
local integer array loc_integers01
local string array loc_strings01
local unit loc_unit01
local group loc_group01=CreateGroup()
local boolean loc_boolean01
call DestroyTimer(GetExpiredTimer())
loop
exitwhen(loc_integer02>loc_integer01)
set loc_integers01[loc_integer02]=GetStoredInteger(loc_gamecache01,"events_passives",I2S(loc_integer02))
set loc_strings01[loc_integer02]=GetStoredString(loc_gamecache01,"events_onlearn",I2S(loc_integers01[loc_integer02]))
set loc_integer02=loc_integer02+1
endloop
call GroupEnumUnitsInRect(loc_group01,bj_mapInitialPlayableArea,null)
loop
set loc_unit01=FirstOfGroup(loc_group01)
exitwhen(loc_unit01==null)
set loc_integer02=1
set loc_boolean01=false
loop
exitwhen(loc_integer02>loc_integer01)
if(GetUnitAbilityLevel(loc_unit01,loc_integers01[loc_integer02])>0)then
if(not loc_boolean01)then
set loc_boolean01=true
call StoreInteger(loc_gamecache01,"events_variables","unit",H2I(loc_unit01))
endif
call StoreInteger(loc_gamecache01,"events_variables","current",loc_integers01[loc_integer02])
call ExecuteFunc(loc_strings01[loc_integer02])
endif
set loc_integer02=loc_integer02+1
endloop
call GroupRemoveUnit(loc_group01,loc_unit01)
endloop
set loc_trigger01=CreateTrigger()
call TriggerRegisterEnterRectSimple(loc_trigger01,bj_mapInitialPlayableArea)
call TriggerAddAction(loc_trigger01,function Func0188)
call TriggerAddCondition(loc_trigger01,Condition(function Func0189))
call DestroyGroup(loc_group01)
set loc_trigger01=null
set loc_group01=null
endfunction
function Func0191 takes nothing returns nothing
local string loc_string01=I2S(GetSpellAbilityId())
local gamecache loc_gamecache01=udg_gamecache03
if HaveStoredString(loc_gamecache01,"events_oneffect",loc_string01)then
call ExecuteFunc(GetStoredString(loc_gamecache01,"events_oneffect",loc_string01))
endif
set loc_gamecache01=null
endfunction
function Func0192 takes gamecache loc_gamecache01 returns nothing
local trigger loc_trigger01=CreateTrigger()
local integer loc_integer01=0
loop
call TriggerRegisterPlayerUnitEvent(loc_trigger01,Player(loc_integer01),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set loc_integer01=loc_integer01+1
exitwhen loc_integer01==16
endloop
call TriggerAddAction(loc_trigger01,function Func0191)
call StoreInteger(loc_gamecache01,"eventhandlers","effect",1)
set loc_trigger01=null
endfunction
function Func0193 takes integer loc_integer01,string loc_string01 returns nothing
local gamecache loc_gamecache01=udg_gamecache03
if(not HaveStoredInteger(loc_gamecache01,"eventhandlers","effect"))then
call Func0192(loc_gamecache01)
endif
call StoreString(loc_gamecache01,"events_oneffect",I2S(loc_integer01),loc_string01)
set loc_gamecache01=null
endfunction
function Func0194 takes nothing returns nothing
local string loc_string01=I2S(GetSpellAbilityId())
local gamecache loc_gamecache01=udg_gamecache03
if HaveStoredString(loc_gamecache01,"events_oncast",loc_string01)then
call ExecuteFunc(GetStoredString(loc_gamecache01,"events_oncast",loc_string01))
endif
set loc_gamecache01=null
endfunction
function Func0195 takes nothing returns nothing
local string loc_string01=I2S(GetSpellAbilityId())
local gamecache loc_gamecache01=udg_gamecache03
if HaveStoredString(loc_gamecache01,"events_onendcast",loc_string01)then
call ExecuteFunc(GetStoredString(loc_gamecache01,"events_onendcast",loc_string01))
endif
set loc_gamecache01=null
endfunction
function Func0196 takes real loc_real01,real loc_real02 returns boolean
return IsTerrainPathable(loc_real01,loc_real02,PATHING_TYPE_WALKABILITY)and not(IsTerrainPathable(loc_real01,loc_real02,PATHING_TYPE_AMPHIBIOUSPATHING))
endfunction
function Func0199 takes nothing returns boolean
return GetBooleanAnd(((IsUnitInGroup(GetFilterUnit(),udg_group20))),((IsUnitAliveBJ(GetFilterUnit()))))
endfunction
function Func0200 takes unit loc_unit01 returns nothing
local boolexpr loc_boolexpr01=Condition(function Func0199)
local group loc_group01=Func0005(GetWorldBounds(),loc_boolexpr01)
local unit loc_unit02=GroupPickRandomUnit(loc_group01)
local location loc_location01=GetUnitLoc(loc_unit02)
call IssuePointOrderByIdLoc(loc_unit01,851983,loc_location01)
call DestroyGroup(loc_group01)
set loc_unit02=null
call RemoveLocation(loc_location01)
set loc_location01=null
call DestroyBoolExpr(loc_boolexpr01)
endfunction
function Func0201 takes integer loc_integer01 returns nothing
local location loc_location01=GetRandomLocInRect(udg_rect01)
set bj_lastCreatedUnit=CreateUnit(Player(27),loc_integer01,GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(1,360))
if loc_integer01=='n00W'then
call IssueImmediateOrderById(bj_lastCreatedUnit,852556)
endif
if loc_integer01=='n00Z'then
call TriggerRegisterUnitEvent(udg_trigger204,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
endif
if loc_integer01=='n000'or loc_integer01=='n001'or loc_integer01=='n002'or loc_integer01=='n00E'and GetRandomInt(1,10)==1 then
call TriggerRegisterUnitEvent(udg_trigger205,bj_lastCreatedUnit,EVENT_UNIT_ACQUIRED_TARGET)
endif
call RemoveLocation(loc_location01)
set loc_location01=null
endfunction
function Func0202 takes unit loc_unit01 returns nothing
local unit loc_unit02=GroupPickRandomUnit(udg_group03)
local location loc_location01=GetUnitLoc(loc_unit02)
call IssuePointOrderByIdLoc(loc_unit01,851983,loc_location01)
call RemoveLocation(loc_location01)
set loc_location01=null
set loc_unit02=null
endfunction
function Func0203 takes unit loc_unit01 returns nothing
local unit loc_unit02=GroupPickRandomUnit(udg_group21)
local location loc_location01=GetUnitLoc(loc_unit02)
call IssuePointOrderByIdLoc(loc_unit01,851983,loc_location01)
call RemoveLocation(loc_location01)
set loc_location01=null
set loc_unit02=null
endfunction
function I2Timer takes integer loc_integer01 returns timer
return null
endfunction
function H2I2 takes handle h returns integer
return GetHandleId(h)
endfunction
function Cache8FlushMission takes handle h returns nothing
call FlushStoredMission(udg_gamecache04,I2S(H2I2(h)))
endfunction
function Cache8FlushChild takes handle h returns nothing
call FlushChildHashtable(udg_hashtable02,H2I2(h))
endfunction
function Cache8GetSoundHandle takes handle h,integer key returns sound
return LoadSoundHandle(udg_hashtable02,H2I2(h),key)
endfunction
function Cache8StoreInteger takes handle h,string key,integer value returns nothing
call StoreInteger(udg_gamecache04,I2S(H2I2(h)),key,value)
endfunction
function Cache8GetInteger takes handle h,string key returns integer
return GetStoredInteger(udg_gamecache04,I2S(H2I2(h)),key)
endfunction
function Cache8StoreReal takes handle h,string key,real value returns nothing
call StoreReal(udg_gamecache04,I2S(H2I2(h)),key,value)
endfunction
function Cache8GetReal takes handle h,string key returns real
return GetStoredReal(udg_gamecache04,I2S(H2I2(h)),key)
endfunction
function Cache8StoreHandle takes handle h1,string key,handle h2 returns nothing
call StoreInteger(udg_gamecache04,I2S(H2I2(h1)),key,H2I2(h2))
endfunction
function Cache8StoreUnitHandle takes handle h1,integer key,unit u returns nothing
call SaveUnitHandle(udg_hashtable02,H2I2(h1),key,u)
endfunction
function Cache8StoreTimerHandle takes handle h1,integer key,timer t returns nothing
call SaveTimerHandle(udg_hashtable02,H2I2(h1),key,t)
endfunction
function Cache8StorePlayerHandle takes handle h1,integer key,player p returns nothing
call SavePlayerHandle(udg_hashtable02,H2I2(h1),key,p)
endfunction
function Cache8StoreSoundHandle takes handle h1,integer key,sound s returns nothing
call SaveSoundHandle(udg_hashtable02,H2I2(h1),key,s)
endfunction
function Cache8GetUnitHandle takes handle h,integer key returns unit
return LoadUnitHandle(udg_hashtable02,H2I2(h),key)
endfunction
function Cache8GetPlayerHandle takes handle h,integer key returns player
return LoadPlayerHandle(udg_hashtable02,H2I2(h),key)
endfunction
function Func0216 takes player loc_player01,string loc_string01 returns nothing
local sound loc_sound01=CreateSoundFromLabel("InterfaceError",false,false,false,10,10)
if(GetLocalPlayer()==loc_player01)then
call ClearTextMessages()
call StartSound(loc_sound01)
call DisplayTimedTextToPlayer(loc_player01,.52,-1.,2.,"|cffffcc00"+loc_string01+"|r")
endif
call KillSoundWhenDone(loc_sound01)
set loc_sound01=null
endfunction
function Func0217 takes player loc_player01,sound loc_sound01 returns nothing
if GetLocalPlayer()==loc_player01 then
call PlaySoundBJ(loc_sound01)
endif
endfunction
function Func0218 takes player loc_player01,real loc_real01 returns nothing
if GetLocalPlayer()==loc_player01 then
call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_UNITSOUNDS,loc_real01-100)
call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_SPELLS,loc_real01-100)
call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_COMBAT,loc_real01-100)
call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_FIRE,loc_real01-100)
call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_UI,loc_real01-100)
call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_AMBIENTSOUNDS,loc_real01-100)
endif
endfunction
function Func0219 takes timer loc_timer01 returns nothing
local real loc_real01=Cache8GetReal(loc_timer01,"v")
local player loc_player01=Cache8GetPlayerHandle(loc_timer01,StringHash("p"))
if loc_real01<100 then
call Func0218(loc_player01,loc_real01)
set loc_real01=loc_real01+5
call Cache8StoreReal(loc_timer01,"v",loc_real01)
else
call Cache8FlushChild(loc_timer01)
call DestroyTimer(loc_timer01)
endif
endfunction
function Func0220 takes nothing returns nothing
call Func0219(GetExpiredTimer())
endfunction
function Func0221 takes location loc_location01,real loc_real01 returns nothing
local integer loc_integer01=0
local timer t=CreateTimer()
local location temploc
loop
exitwhen loc_integer01>10
set temploc=GetUnitLoc(udg_units01[loc_integer01+1])
if((DistanceBetweenPoints(temploc,(loc_location01)))<=loc_real01)then
call Func0217((GetOwningPlayer(udg_units01[loc_integer01+1])),udg_sound98)
call Cache8StorePlayerHandle(t,StringHash("p"),GetOwningPlayer(udg_units01[loc_integer01+1]))
call Cache8StoreReal(t,"v",.0)
call TimerStart(t,.14,true,function Func0220)
endif
call RemoveLocation(temploc)
set loc_integer01=loc_integer01+1
endloop
set temploc=null
endfunction
function Func0225 takes timer loc_timer01 returns nothing
local integer loc_integer01=0
call DestroyTimer(loc_timer01)
loop
exitwhen loc_integer01>10
call CameraClearNoiseForPlayer(Player(loc_integer01))
set loc_integer01=loc_integer01+1
endloop
endfunction
function Func0226 takes nothing returns nothing
call Func0225(GetExpiredTimer())
endfunction
function Func0227 takes real loc_real01,real loc_real02 returns nothing
local integer loc_integer01=0
local timer t=CreateTimer()
loop
exitwhen loc_integer01>10
call CameraSetEQNoiseForPlayer(Player(loc_integer01),loc_real01)
set loc_integer01=loc_integer01+1
endloop
call TimerStart(t,loc_real02,true,function Func0226)
endfunction
function Func0228 takes integer loc_integer01 returns integer
return loc_integer01
endfunction
function Func0229 takes location loc_location01 returns nothing
local string loc_string01="Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
local location temploc
set temploc=OffsetLocation(loc_location01,250,0)
call DestroyEffect(AddSpecialEffectLoc(loc_string01,temploc))
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location01,500,0)
call DestroyEffect(AddSpecialEffectLoc(loc_string01,temploc))
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location01,250,250)
call DestroyEffect(AddSpecialEffectLoc(loc_string01,temploc))
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location01,500,500)
call DestroyEffect(AddSpecialEffectLoc(loc_string01,temploc))
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location01,-250,250)
call DestroyEffect(AddSpecialEffectLoc(loc_string01,temploc))
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location01,-500,500)
call DestroyEffect(AddSpecialEffectLoc(loc_string01,temploc))
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location01,-250,0)
call DestroyEffect(AddSpecialEffectLoc(loc_string01,temploc))
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location01,-500,0)
call DestroyEffect(AddSpecialEffectLoc(loc_string01,temploc))
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location01,250,-250)
call DestroyEffect(AddSpecialEffectLoc(loc_string01,temploc))
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location01,500,-500)
call DestroyEffect(AddSpecialEffectLoc(loc_string01,temploc))
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location01,0,-250)
call DestroyEffect(AddSpecialEffectLoc(loc_string01,temploc))
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location01,0,-500)
call DestroyEffect(AddSpecialEffectLoc(loc_string01,temploc))
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location01,-250,-250)
call DestroyEffect(AddSpecialEffectLoc(loc_string01,temploc))
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location01,-500,-500)
call DestroyEffect(AddSpecialEffectLoc(loc_string01,temploc))
call RemoveLocation(temploc)
set temploc=null
endfunction
function Func0230 takes player loc_player01,boolean loc_boolean01 returns nothing
if loc_player01==GetLocalPlayer()then
if(loc_boolean01)then
call SetTerrainFogEx(0,2100.,4500.,.25,20.,20.,100.)
//call CinematicFilterGenericBJ(5.,BLEND_MODE_MODULATE_2X,"ReplaceableTextures\\CameraMasks\\White_mask.blp",.0,0,100,100,0,0,80.,25.)
else
call SetTerrainFogEx(0,350.,4000.,.55,udg_real02*.01,udg_real02*.01,udg_real02*.01)
//call CinematicFilterGenericBJ(.5,BLEND_MODE_BLEND,"ReplaceableTextures\\CameraMasks\\White_mask.blp",50.,100,50.,.0,50.,100.,50.,100.)
//call CinematicFilterGenericBJ(.0,BLEND_MODE_BLEND,"ReplaceableTextures\\CameraMasks\\Black_mask.blp",20.,20.,20.,.0,20.,20.,20.,udg_real03)
endif
endif
endfunction
function PlaySoundAtUnitLoc takes sound loc_sound01,unit loc_unit01 returns nothing
call SetSoundPosition(loc_sound01,GetUnitX(loc_unit01),GetUnitY(loc_unit01),10)
call StartSound(loc_sound01)
endfunction
function Func0232 takes integer loc_integer01,string loc_string01,location loc_location01,location loc_location02,real loc_real01 returns nothing
local unit loc_unit01=CreateUnit(Player(25),'h003',GetLocationX(loc_location01),GetLocationY(loc_location01),AngleBetweenPoints(loc_location01,loc_location02))
call SetUnitFlyHeight(loc_unit01,loc_real01,99999)
call UnitApplyTimedLifeBJ(3.,'BTLF',loc_unit01)
call UnitAddAbility(loc_unit01,loc_integer01)
call IssuePointOrderLoc(loc_unit01,loc_string01,loc_location02)
set loc_unit01=null
endfunction
function Func0233 takes real loc_real01,string loc_string01 returns nothing
local integer loc_integer01=1
local real xpamount=loc_real01
call StartSound(udg_sound88)
if xpamount<0 then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,("|cff808000"+loc_string01+", "+I2S(R2I(-xpamount*(udg_integer16+1)))+" XP deducted from all players."))
elseif xpamount>0 and xpamount<1 then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,("|cff808000"+loc_string01+", "+I2S(1+udg_integer16)+" XP awarded to all players."))
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,("|cff808000"+loc_string01+", "+(I2S(R2I(xpamount*udg_real04*(udg_integer16+1)))+" XP awarded to all players.")))
endif
loop
exitwhen loc_integer01>11
if xpamount<0 then
set udg_integers04[loc_integer01]=(udg_integers04[loc_integer01]+R2I(xpamount*(udg_integer16+1)))
elseif xpamount>0 and xpamount<1 then
set udg_integers04[loc_integer01]=(udg_integers04[loc_integer01]+1+udg_integer16)
else
set udg_integers04[loc_integer01]=(udg_integers04[loc_integer01]+R2I(xpamount*udg_real04*(udg_integer16+1)))
endif
set loc_integer01=loc_integer01+1
endloop
endfunction
function Func0234 takes unit loc_unit01 returns real
return GetUnitStateSwap(UNIT_STATE_MAX_LIFE,loc_unit01)-GetUnitStateSwap(UNIT_STATE_LIFE,loc_unit01)
endfunction
function UMBMessageToAll takes real loc_real01,string loc_string01 returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,loc_real01,loc_string01)
call StartSound(udg_sound88)
set loc_string01=null
endfunction
function Func0236 takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='o007'
endfunction
function Func0237 takes nothing returns nothing
call KillUnit(GetEnumUnit())
endfunction
function Func0238 takes real loc_real01,location loc_location01 returns nothing
local group g=UAUnitGroupWithinRangeOfLocMatching(loc_real01,loc_location01,Condition(function Func0236))
call ForGroup(g,function Func0237)
call DestroyGroup(g)
set g=null
endfunction
function Func0239 takes nothing returns boolean
return IsUnitAliveBJ(GetFilterUnit())
endfunction
function Func0240 takes unit loc_unit01,real loc_real01,string loc_string01 returns nothing
local texttag loc_texttag01
local real loc_real02
local real loc_real03
if GetUnitState(loc_unit01,UNIT_STATE_LIFE)>0 then
set loc_real02=GetUnitX(loc_unit01)
set loc_real03=GetUnitY(loc_unit01)
set loc_texttag01=CreateTextTag()
call SetTextTagText(loc_texttag01,loc_string01,.0184)
call SetTextTagPos(loc_texttag01,loc_real02,loc_real03,25.)
call SetTextTagVisibility(loc_texttag01,true)
call SetTextTagLifespan(loc_texttag01,loc_real01)
call SetTextTagPermanent(loc_texttag01,false)
endif
set loc_texttag01=null
endfunction
function Func0241 takes unit loc_unit01,real loc_real01,string loc_string01 returns nothing
if GetUnitState(loc_unit01,UNIT_STATE_LIFE)>0 then
call StartSound(udg_sound88)
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,loc_real01,loc_string01)
endif
endfunction
function Func0242 takes unit loc_unit01,integer loc_integer01 returns nothing
if GetRandomInt(1,loc_integer01)==1 then
call UnitAddAbility(loc_unit01,'A04H')
endif
endfunction
function Func0243 takes unit loc_unit01,integer loc_integer01 returns nothing
if GetRandomInt(1,loc_integer01)==1 then
call UnitAddAbility(loc_unit01,'A02J')
call UnitAddAbility(loc_unit01,'A04F')
endif
endfunction
function Func0244 takes unit loc_unit01,integer loc_integer01 returns nothing
if GetRandomInt(1,loc_integer01)==1 then
call UnitAddAbility(loc_unit01,'A06Z')
endif
endfunction
function Func0245 takes group loc_group01 returns nothing
local location loc_location01
local location loc_location02
local group loc_group02=CreateGroup()
local unit loc_unit01
local unit loc_unit02
local location loc_location03
call GroupAddGroup(loc_group01,loc_group02)
set udg_boolean19=true
set loc_unit01=GroupPickRandomUnit(loc_group02)
set udg_unit14=loc_unit01
set udg_integer34=5
call TriggerExecute(udg_trigger324)
loop
set loc_unit02=GroupPickRandomUnit(udg_group20)
exitwhen udg_boolean01 or IsUnitAliveBJ(loc_unit02)
endloop
set loc_location03=GetUnitLoc(loc_unit02)
if udg_boolean16 or GetRandomInt(1,3)==1 or(udg_boolean17 and GetRandomInt(1,2)==1)then
loop
set loc_unit01=FirstOfGroup(loc_group02)
exitwhen loc_unit01==null
call IssuePointOrderByIdLoc(loc_unit01,851983,loc_location03)
call GroupRemoveUnit(loc_group02,loc_unit01)
endloop
elseif udg_boolean17==false then
if GetRandomInt(1,3)!=1 then
set loc_location01=GetRandomLocInRect(udg_rect52)
else
set loc_location01=GetRandomLocInRect(udg_rect53)
endif
loop
set loc_unit01=FirstOfGroup(loc_group02)
exitwhen loc_unit01==null
set loc_location02=OffsetLocation(loc_location01,GetRandomInt(-500,500),GetRandomInt(-500,500))
call IssuePointOrderByIdLoc(loc_unit01,851983,loc_location02)
call RemoveLocation(loc_location02)
call GroupRemoveUnit(loc_group02,loc_unit01)
endloop
elseif udg_boolean17 then
set loc_location01=GetRandomLocInRect(udg_rect19)
loop
set loc_unit01=FirstOfGroup(loc_group02)
exitwhen loc_unit01==null
set loc_location02=OffsetLocation(loc_location01,GetRandomInt(-1200,1200),GetRandomInt(-1200,1200))
call IssuePointOrderByIdLoc(loc_unit01,851983,loc_location02)
call RemoveLocation(loc_location02)
call GroupRemoveUnit(loc_group02,loc_unit01)
endloop
endif
call DestroyGroup(loc_group02)
set loc_group01=null
set loc_group02=null
call RemoveLocation(loc_location01)
set loc_location01=null
call RemoveLocation(loc_location02)
set loc_location02=null
call RemoveLocation(loc_location03)
set loc_location03=null
set loc_unit01=null
set loc_unit02=null
endfunction
function UAUMBSpawnSquad takes integer loc_integer01 returns nothing
set udg_integer31=loc_integer01
call TriggerExecute(udg_trigger322)
endfunction
function Func0247 takes nothing returns boolean
return GetOwningPlayer(GetFilterUnit())==Player(11)and IsUnitAliveBJ(GetFilterUnit())and IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false
endfunction
function Func0248 takes nothing returns boolean
return Player(11)==GetOwningPlayer(GetFilterUnit())and IsUnitAliveBJ(GetFilterUnit())and IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false
endfunction
function Func0249 takes nothing returns nothing
local location loc_location01=GetUnitLoc(GetEnumUnit())
local location loc_location02=Func0002(loc_location01,800.,AngleBetweenPoints(udg_location02,loc_location01))
call IssuePointOrderByIdLoc(GetEnumUnit(),851986,loc_location02)
call RemoveLocation(loc_location01)
set loc_location01=null
call RemoveLocation(loc_location02)
set loc_location02=null
endfunction
function Func0250 takes location loc_location01 returns nothing
local group loc_group01
local group loc_group02=UAUnitGroupWithinRangeOfLocMatching(800.,loc_location01,Condition(function Func0248))
local unit loc_unit01
set udg_integer34=GetRandomInt(3,4)
set loc_group01=UAUnitGroupWithinRangeOfLocMatching(1600.,loc_location01,Condition(function Func0247))
set loc_unit01=GroupPickRandomUnit(loc_group01)
if loc_unit01!=null then
set udg_unit14=loc_unit01
endif
if CountUnitsInGroup(loc_group02)>=1 then
set udg_boolean19=true
else
set udg_boolean19=false
endif
call TriggerExecute(udg_trigger324)
set udg_location02=OffsetLocation(loc_location01,0,0)
call ForGroup(loc_group02,function Func0249)
set loc_unit01=null
call DestroyGroup(loc_group01)
call DestroyGroup(loc_group02)
set loc_group01=null
set loc_group02=null
endfunction
function Func0251 takes unit loc_unit01 returns nothing
local unit loc_unit02=CreateUnit(GetOwningPlayer(loc_unit01),'h003',GetUnitX(loc_unit01),GetUnitY(loc_unit01),GetUnitFacing(loc_unit01))
call GroupAddUnit(udg_group17,loc_unit01)
call UnitAddAbility(loc_unit02,'A06R')
call SetUnitAbilityLevel(loc_unit02,'A06R',7)
call IssueTargetOrderById(loc_unit02,852585,loc_unit01)
call UnitApplyTimedLifeBJ(3.,'BTLF',loc_unit02)
call TriggerRegisterUnitEvent(udg_trigger68,loc_unit01,EVENT_UNIT_DAMAGED)
set loc_unit02=null
endfunction
function ActionLiftBootsFinish takes timer loc_timer01 returns nothing
local unit loc_unit01=Cache8GetUnitHandle(loc_timer01,StringHash("u"))
local sound loc_sound01=Cache8GetSoundHandle(loc_timer01,StringHash("s"))
if GetUnitFlyHeight(loc_unit01)<=1.then
call Cache8FlushChild(loc_timer01)
call PauseTimer(loc_timer01)
call DestroyTimer(loc_timer01)
call SetUnitPathing(loc_unit01,true)
call SetUnitFlyHeight(loc_unit01,.0,900)
call PauseUnit(loc_unit01,false)
call StopSound(loc_sound01,false,true)
call UnitRemoveAbility(loc_unit01,'A04Q')
call Func0251(loc_unit01)
endif
set loc_unit01=null
set loc_sound01=null
endfunction
function Func0253 takes nothing returns nothing
call ActionLiftBootsFinish(GetExpiredTimer())
endfunction
function ActionLiftBoots takes unit loc_unit01 returns nothing
local timer t=CreateTimer()
local sound loc_sound01=udg_sound69
call SetUnitFlyHeight(loc_unit01,2500.,900000)
call SetUnitFlyHeight(loc_unit01,.0,800)
call UnitAddAbility(loc_unit01,'Amrf')
call UnitRemoveAbility(loc_unit01,'Amrf')
call UnitAddAbility(loc_unit01,'A04Q')
call AttachSoundToUnit(loc_sound01,loc_unit01)
call SetSoundVolume(loc_sound01,127)
call StartSound(loc_sound01)
call PauseUnit(loc_unit01,true)
call Cache8StoreUnitHandle(t,StringHash("u"),loc_unit01)
call Cache8StoreSoundHandle(t,StringHash("s"),loc_sound01)
call TimerStart(t,GetRandomReal(.7,1.15),true,function Func0253)
set loc_sound01=null
endfunction
function Func0255 takes nothing returns nothing
call ConditionalTriggerExecute(udg_trigger08)
call ConditionalTriggerExecute(udg_trigger03)
call ConditionalTriggerExecute(udg_trigger06)
call ConditionalTriggerExecute(udg_trigger04)
call ConditionalTriggerExecute(udg_trigger02)
call ConditionalTriggerExecute(udg_trigger09)
call ConditionalTriggerExecute(udg_trigger07)
endfunction
function Func0256 takes nothing returns nothing
set udg_sounds01[1]=udg_sound22
set udg_sounds01[2]=udg_sound23
set udg_sounds01[3]=udg_sound24
set udg_sounds01[4]=udg_sound25
set udg_sounds01[5]=udg_sound26
set udg_sounds01[6]=udg_sound27
set udg_sounds01[7]=udg_sound28
set udg_sounds02[1]=udg_sound29
set udg_sounds02[2]=udg_sound30
set udg_sounds03[1]=udg_sound38
set udg_sounds03[2]=udg_sound39
set udg_sounds04[1]=udg_sound101
set udg_sounds04[2]=udg_sound102
set udg_sounds04[3]=udg_sound103
set udg_sounds04[4]=udg_sound104
set udg_sounds05[1]=udg_sound131
set udg_sounds05[2]=udg_sound132
set udg_sounds06[1]=udg_sound126
set udg_sounds06[2]=udg_sound127
set udg_sounds06[3]=udg_sound128
set udg_sounds07[1]=udg_sound119
set udg_sounds07[2]=udg_sound122
set udg_sounds07[3]=udg_sound124
set udg_sounds07[4]=udg_sound136
set udg_sounds07[5]=udg_sound120
set udg_sounds07[6]=udg_sound129
set udg_sounds07[7]=udg_sound130
set udg_sounds07[8]=udg_sound133
set udg_sounds07[9]=udg_sound134
set udg_sounds07[10]=udg_sound123
set udg_sounds07[11]=udg_sound135
endfunction
function Func0257 takes nothing returns nothing
call CreateNUnitsAtLoc(1,'H000',Player(24),GetRandomLocInRect(bj_mapInitialPlayableArea),GetRandomReal(0,360))
call RemoveUnit(bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'H001',Player(24),GetRandomLocInRect(bj_mapInitialPlayableArea),GetRandomReal(0,360))
call RemoveUnit(bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'H008',Player(24),GetRandomLocInRect(bj_mapInitialPlayableArea),GetRandomReal(0,360))
call RemoveUnit(bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'H00H',Player(24),GetRandomLocInRect(bj_mapInitialPlayableArea),GetRandomReal(0,360))
call RemoveUnit(bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'H00C',Player(24),GetRandomLocInRect(bj_mapInitialPlayableArea),GetRandomReal(0,360))
call RemoveUnit(bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'H00D',Player(24),GetRandomLocInRect(bj_mapInitialPlayableArea),GetRandomReal(0,360))
call RemoveUnit(bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'H00I',Player(24),GetRandomLocInRect(bj_mapInitialPlayableArea),GetRandomReal(0,360))
call RemoveUnit(bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'H00J',Player(24),GetRandomLocInRect(bj_mapInitialPlayableArea),GetRandomReal(0,360))
call RemoveUnit(bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'h00K',Player(24),GetRandomLocInRect(bj_mapInitialPlayableArea),GetRandomReal(0,360))
call RemoveUnit(bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'h01K',Player(24),GetRandomLocInRect(bj_mapInitialPlayableArea),GetRandomReal(0,360))
call RemoveUnit(bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'H00N',Player(24),GetRandomLocInRect(bj_mapInitialPlayableArea),GetRandomReal(0,360))
call RemoveUnit(bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'H00P',Player(24),GetRandomLocInRect(bj_mapInitialPlayableArea),GetRandomReal(0,360))
call RemoveUnit(bj_lastCreatedUnit)
call Preload("war3mapImported\\FA-22 Raptor.mdx")
endfunction
function Func0258 takes nothing returns nothing
set udg_rects01[1]=udg_rect54
set udg_rects01[2]=udg_rect55
set udg_rects01[3]=udg_rect56
set udg_rects01[4]=udg_rect57
set udg_rects01[5]=udg_rect58
set udg_rects01[6]=udg_rect59
set udg_rects01[7]=udg_rect60
set udg_rects01[8]=udg_rect61
set udg_rects01[9]=udg_rect62
set udg_rects01[10]=udg_rect63
set udg_rects01[11]=udg_rect64
set udg_rects01[12]=udg_rect65
set udg_rects01[13]=udg_rect66
set udg_rects01[14]=udg_rect67
set udg_rects01[15]=udg_rect68
set udg_rects01[16]=udg_rect69
set udg_rects01[17]=udg_rect70
set udg_rects01[18]=udg_rect71
set udg_rects01[19]=udg_rect72
set udg_rects01[20]=udg_rect73
set udg_rects01[21]=udg_rect74
set udg_rects01[22]=udg_rect75
set udg_rects01[23]=udg_rect76
set udg_rects01[24]=udg_rect77
set udg_rects01[25]=udg_rect78
set udg_rects01[26]=udg_rect79
set udg_rects01[27]=udg_rect80
set udg_rects01[28]=udg_rect81
set udg_rects01[29]=udg_rect82
set udg_rects01[30]=udg_rect83
set udg_rects01[31]=udg_rect84
set udg_rects01[32]=udg_rect85
set udg_rects01[33]=udg_rect86
set udg_rects01[34]=udg_rect87
set udg_rects01[35]=udg_rect88
set udg_integer01=35
endfunction
function Func0267 takes nothing returns nothing
call SetTimeOfDay(18.5)
call SetTimeOfDayScalePercentBJ(11.)
loop
exitwhen(((GetTimeOfDay()>=20.)))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,2.))
endloop
call SetTimeOfDayScalePercentBJ(9.)
loop
exitwhen(((GetTimeOfDay()>=22.)))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,2.))
endloop
call SetTimeOfDayScalePercentBJ(6.)
loop
exitwhen(((GetTimeOfDay()>=23.)))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,2.))
endloop
call SetTimeOfDayScalePercentBJ(5.)
loop
exitwhen(((GetTimeOfDay()>=24.)))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,2.))
endloop
call SetTimeOfDayScalePercentBJ(4.)
loop
exitwhen(((GetTimeOfDay()>=1.)))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,2.))
endloop
call SetTimeOfDayScalePercentBJ(5.)
loop
exitwhen(((GetTimeOfDay()>=3.)))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,2.))
endloop
call SetTimeOfDayScalePercentBJ(6.)
loop
exitwhen(((GetTimeOfDay()>=4.5)))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,2.))
endloop
call SetTimeOfDayScalePercentBJ(7.)
loop
exitwhen(((GetTimeOfDay()>=6.)))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,2.))
endloop
call SetTimeOfDayScalePercentBJ(9.)
endfunction
function Func0268 takes nothing returns nothing
call TriggerRegisterPlayerChatEvent(udg_trigger51,GetEnumPlayer(),"-tl",true)
call TriggerRegisterPlayerChatEvent(udg_trigger53,GetEnumPlayer(),"-ms",true)
call TriggerRegisterPlayerChatEvent(udg_trigger55,GetEnumPlayer(),"-t",true)
call TriggerRegisterPlayerChatEvent(udg_trigger52,GetEnumPlayer(),"-dead",true)
call TriggerRegisterPlayerChatEvent(udg_trigger57,GetEnumPlayer(),"-st",true)
call TriggerRegisterPlayerChatEvent(udg_trigger58,GetEnumPlayer(),"-s",false)
call TriggerRegisterPlayerChatEvent(udg_trigger59,GetEnumPlayer(),"-r",false)
call TriggerRegisterPlayerChatEvent(udg_trigger56,GetEnumPlayer(),"-v",false)
call TriggerRegisterPlayerEventLeave(udg_trigger49,GetEnumPlayer())
call SetPlayerHandicapXPBJ(GetEnumPlayer(),(40.+(I2R(udg_integer24)*1.35)))
call SetPlayerMaxHeroesAllowed(1,GetEnumPlayer())
call ForceAddPlayer(udg_force07,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H00C',false,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H000',false,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H011',false,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H01I',false,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H001',false,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H00U',false,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H008',false,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H00D',false,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H00H',false,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H00I',false,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H00J',false,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H00N',false,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H00M',false,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H00P',false,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H00R',false,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H01J',false,GetEnumPlayer())
call UnitShareVisionBJ(true,udg_unit18,GetEnumPlayer())
call SelectUnitForPlayerSingle(udg_unit18,GetEnumPlayer())
call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_RESOURCE_FOOD_CAP,1)
call SetPlayerAllianceStateBJ(GetEnumPlayer(),Player(26),0)
call SetPlayerAllianceStateBJ(Player(26),GetEnumPlayer(),0)
call SetPlayerAllianceStateBJ(GetEnumPlayer(),Player(25),0)
call SetPlayerAllianceStateBJ(Player(25),GetEnumPlayer(),0)
call SetPlayerAllianceStateBJ(Player(11),Player(25),0)
call SetPlayerAllianceStateBJ(Player(25),Player(11),0)
call SetPlayerAllianceStateBJ(Player(25),Player(24),0)
call SetPlayerAllianceStateBJ(Player(24),Player(25),0)
call SetPlayerAllianceStateBJ(Player(27),Player(25),3)
call SetPlayerAllianceStateBJ(Player(25),Player(27),3)
call SetPlayerAllianceStateBJ(GetEnumPlayer(),Player(27),0)
call SetPlayerAllianceStateBJ(Player(27),GetEnumPlayer(),0)
call SetPlayerAllianceStateBJ(Player(11),Player(27),0)
call SetPlayerAllianceStateBJ(Player(27),Player(11),0)
call SetPlayerAllianceStateBJ(GetEnumPlayer(),Player(24),2)
call SetPlayerAllianceStateBJ(Player(24),GetEnumPlayer(),2)
call SetPlayerAllianceStateBJ(Player(24),Player(11),2)
call SetPlayerAllianceStateBJ(Player(11),Player(24),2)
call SetPlayerAllianceStateBJ(GetEnumPlayer(),Player(11),2)
call SetPlayerAllianceStateBJ(Player(11),GetEnumPlayer(),2)
endfunction
function Func0271 takes nothing returns nothing
call EndThematicMusicBJ()
call SetPlayerName(Player(27),"The Infected")
call SetPlayerName(Player(24),"Populace")
call SetPlayerName(Player(26),"Umbrella")
call SetPlayerName(Player(25),"The Infected")
call SetPlayerAllianceStateBJ(Player(11),Player(26),0)
call SetPlayerAllianceStateBJ(Player(26),Player(11),0)
call SetPlayerAllianceStateBJ(Player(26),Player(24),0)
call SetPlayerAllianceStateBJ(Player(24),Player(26),0)
call SetPlayerAllianceStateBJ(Player(27),Player(26),0)
call SetPlayerAllianceStateBJ(Player(26),Player(27),0)
call SetPlayerAllianceStateBJ(Player(27),Player(24),0)
call SetPlayerAllianceStateBJ(Player(24),Player(27),0)
set udg_integers15[1]=1
set udg_integers15[2]=1
set udg_integers15[3]=1
set udg_integers35[1]=1
//call AddUnitToStockBJ('H00H',udg_unit18,IntegerTertiaryOp(udg_NoMosLimits,11,1),IntegerTertiaryOp(udg_NoMosLimits,11,1))
//call AddUnitToStockBJ('H000',udg_unit18,11,11)
//call AddUnitToStockBJ('H01I',udg_unit18,IntegerTertiaryOp(udg_NoMosLimits,11,1),IntegerTertiaryOp(udg_NoMosLimits,11,1))
//call AddUnitToStockBJ('H00M',udg_unit18,IntegerTertiaryOp(udg_NoMosLimits,11,1),IntegerTertiaryOp(udg_NoMosLimits,11,1))
call ForForce(Func0015(MAP_CONTROL_USER),function Func0268)
call SetCreepCampFilterState(false)
call EnableMinimapFilterButtons(true,false)
call VolumeGroupSetVolumeBJ(SOUND_VOLUMEGROUP_UNITSOUNDS,50.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)and(GetPlayerController(Player(-1+(bj_forLoopAIndex)))==MAP_CONTROL_USER)))then
set udg_integer24=(udg_integer24+1)
set udg_strings04[bj_forLoopAIndex]=GetPlayerName(Player(-1+(bj_forLoopAIndex)))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call EnableTrigger(udg_trigger33)
call VXSleep(15.)
endfunction
function Func0273 takes nothing returns nothing
call LockGuardPosition(GetEnumUnit())
call IssueImmediateOrderById(GetEnumUnit(),851993)
call GroupAddUnit(udg_group14,GetEnumUnit())
endfunction
function Func0274 takes nothing returns nothing
local group g=UAUnitGroupWithTypeId('h005')
call ForGroupBJ(g,function Func0273)
call DestroyGroup(g)
set g=null
endfunction
function Func0275 takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player(26),true)
call ShowUnitHide(GetEnumUnit())
call PauseUnit(GetEnumUnit(),true)
endfunction
function Func0276 takes nothing returns nothing
set udg_gamecache04=InitGameCache("jasslocalvars.w3v")
set udg_hashtable02=InitHashtable()
call SetDayNightModels("Environment\\DNC\\DNCAshenvale\\DNCAshenvaleTerrain\\DNCAshenvaleTerrain.mdl","Environment\\DNC\\DNCAshenvale\\DNCAshenvaleUnit\\DNCAshenvaleUnit.mdl")
set udg_group23=UAUnitGroupWithTypeId('h006')
call ForGroupBJ(udg_group23,function Func0275)
call DestroyGroup(udg_group23)
set udg_group23=null
set udg_rects09[1]=udg_rect139
set udg_rects09[2]=udg_rect140
set udg_rects09[3]=udg_rect141
set udg_rects09[4]=udg_rect142
set udg_rects09[5]=udg_rect143
set udg_rects09[6]=udg_rect144
set udg_rects09[7]=udg_rect145
set udg_rects09[8]=udg_rect146
set udg_rects09[9]=udg_rect147
set udg_rects02[1]=udg_rect95
set udg_rects02[2]=udg_rect97
set udg_rects02[3]=udg_rect98
set udg_rects02[4]=udg_rect96
set udg_rects04[1]=udg_rect14
set udg_rects04[2]=udg_rect15
set udg_rects04[3]=udg_rect16
set udg_rects04[4]=udg_rect17
set udg_integers30[1]='u005'
set udg_integers30[2]='u003'
set udg_integers30[3]='u002'
set udg_integers30[4]='u006'
set udg_integers30[5]='u004'
set udg_integers30[6]='u008'
set udg_integers30[7]='n00P'
set udg_integers30[8]='n00K'
set udg_integers30[9]='n00F'
set udg_integers30[10]='n00G'
set udg_integers03[1]='n004'
set udg_integers03[2]='n005'
set udg_integers03[3]='n008'
set udg_integers03[4]='n007'
set udg_integers03[5]='n006'
set udg_rects07[1]=udg_rect90
set udg_rects07[2]=udg_rect91
set udg_rects07[3]=udg_rect92
set udg_rects07[4]=udg_rect93
set udg_rects07[5]=udg_rect94
set udg_integers28[1]=4
set udg_integers28[2]=7
set udg_integers28[3]=8
set udg_integers28[4]=7
set udg_integers28[5]=10
set udg_integers28[6]=10
set udg_integers28[7]=10
set udg_strings07[1]="attack"
set udg_strings07[2]="attack"
set udg_strings07[3]="drunkenhaze"
set udg_strings07[4]="slow"
set udg_strings07[5]="parasite"
set udg_strings07[6]="drunkenhaze"
set udg_strings07[7]="drunkenhaze"
set udg_integers29[1]='A00R'
set udg_integers29[2]='A02M'
set udg_integers29[3]='A04T'
set udg_integers29[4]='A04S'
set udg_integers29[5]='A01U'
set udg_integers29[6]='A04U'
set udg_integers29[7]='A04V'
set udg_rects03[1]=udg_rect27
set udg_rects03[2]=udg_rect28
set udg_rects03[3]=udg_rect29
set udg_rects03[4]=udg_rect30
set udg_rects03[5]=udg_rect31
set udg_rects03[6]=udg_rect32
set udg_rects03[7]=udg_rect33
set udg_rects03[8]=udg_rect34
set udg_rects03[9]=udg_rect35
set udg_rects03[10]=udg_rect36
set udg_rects03[11]=udg_rect37
set udg_rects03[12]=udg_rect38
set udg_rects03[13]=udg_rect39
set udg_rects03[14]=udg_rect40
set udg_rects03[15]=udg_rect41
set udg_rects03[16]=udg_rect42
set udg_rects03[17]=udg_rect43
set udg_rects03[18]=udg_rect44
set udg_rects03[19]=udg_rect45
set udg_rects03[20]=udg_rect46
set udg_rects03[21]=udg_rect25
set udg_rects03[22]=udg_rect112
set udg_integer05=1
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=20
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call TriggerRegisterEnterRectSimple(udg_trigger255,udg_rects03[bj_forLoopAIndex])
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func0288 takes nothing returns nothing
if(((udg_integer16<=1)))then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'n00L',Player(24),GetRandomLocInRect(udg_rect156),bj_UNIT_FACING)
set udg_units03[bj_forLoopAIndex]=bj_lastCreatedUnit
else
call CreateNUnitsAtLoc(1,'n00L',Player(24),GetRandomLocInRect(udg_rect155),bj_UNIT_FACING)
set udg_units03[bj_forLoopAIndex]=bj_lastCreatedUnit
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(5.)
call EnableTrigger(udg_trigger12)
call TriggerSleepAction(80.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,25.,"|cff808000SOCOM:|r Logs show that Echo Company passed through here about a week ago. They had to ditch a lot of equipment that they stocked in 3 weapons caches somewhere in the sector. Those caches will aid you tremendously if you can find them.")
call PlaySoundBJ(udg_sound88)
else
if(((((udg_integer16==2)or(udg_integer16==4)or(udg_integer16==6)))))then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'n00L',Player(24),GetRandomLocInRect(udg_rect156),bj_UNIT_FACING)
set udg_units03[bj_forLoopAIndex]=bj_lastCreatedUnit
else
call CreateNUnitsAtLoc(1,'n00L',Player(24),GetRandomLocInRect(udg_rect155),bj_UNIT_FACING)
set udg_units03[bj_forLoopAIndex]=bj_lastCreatedUnit
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_booleans08[3]=true
call TriggerSleepAction(5.)
call EnableTrigger(udg_trigger12)
call TriggerSleepAction(80.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,25.,"|cff808000SOCOM:|r Logs show that Echo Company passed through here a week ago. They had to ditch a lot of equipment that they stocked in 2 weapons caches somewhere in the sector. The caches will aid you greatly if you can find them.")
call PlaySoundBJ(udg_sound88)
else
if(((udg_integer16==3)))then
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'n00L',Player(24),GetRandomLocInRect(udg_rect156),bj_UNIT_FACING)
set udg_units03[1]=bj_lastCreatedUnit
else
call CreateNUnitsAtLoc(1,'n00L',Player(24),GetRandomLocInRect(udg_rect155),bj_UNIT_FACING)
set udg_units03[1]=bj_lastCreatedUnit
endif
set udg_booleans08[2]=true
set udg_booleans08[3]=true
call TriggerSleepAction(5.)
call EnableTrigger(udg_trigger12)
call TriggerSleepAction(80.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,25.,"|cff808000SOCOM:|r Logs show that Echo Company passed through here a week ago. They had to ditch a lot of equipment that they stocked in a weapons cache somewhere in the sector. The cache will aid you if you can find it.")
call PlaySoundBJ(udg_sound88)
endif
endif
endif
endfunction
function Func0289 takes nothing returns nothing
call SetCameraQuickPositionLocForPlayer(GetEnumPlayer(),udg_location02)
endfunction
function Func0291 takes nothing returns nothing
call SetCameraQuickPositionLocForPlayer(GetEnumPlayer(),udg_location02)
endfunction
function Func0293 takes nothing returns nothing
call SetCameraQuickPositionLocForPlayer(GetEnumPlayer(),udg_location02)
endfunction
function Func0295 takes nothing returns nothing
local location temploc
local location temploc2
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set temploc=GetUnitLoc(udg_units01[bj_forLoopAIndex])
set temploc2=GetUnitLoc(udg_units03[1])
if(((DistanceBetweenPoints(temploc,temploc2)<=200.)and(udg_booleans08[1]==false)))then
set udg_location02=GetUnitLoc(udg_units03[1])
set udg_booleans08[1]=true
call PlaySoundBJ(udg_sound138)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,8.,2,82.,36.,9.)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func0289)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"Weapons cache found.")
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=8
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call CreateItemLoc('I000',udg_location02)
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
call CreateItemLoc('I00M',udg_location02)
call CreateItemLoc('I00O',udg_location02)
call CreateItemLoc('I00F',udg_location02)
call CreateItemLoc('I00U',udg_location02)
call CreateItemLoc('I009',udg_location02)
call CreateItemLoc('I012',udg_location02)
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=2
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call CreateItemLoc('I00S',udg_location02)
call CreateItemLoc('I00I',udg_location02)
call CreateItemLoc('I004',udg_location02)
call CreateItemLoc('I003',udg_location02)
call CreateItemLoc('I00V',udg_location02)
call CreateItemLoc('I00W',udg_location02)
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
call RemoveUnit(udg_units03[1])
call RemoveLocation(udg_location02)
endif
call RemoveLocation(temploc)
call RemoveLocation(temploc2)
set temploc=GetUnitLoc(udg_units01[bj_forLoopAIndex])
set temploc2=GetUnitLoc(udg_units03[2])
if(((DistanceBetweenPoints(temploc,temploc2)<=200.)and(udg_booleans08[2]==false)))then
set udg_location02=GetUnitLoc(udg_units03[2])
set udg_booleans08[2]=true
call PlaySoundBJ(udg_sound138)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,8.,2,82.,36.,9.)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func0291)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"Weapons cache found.")
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=6
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call CreateItemLoc('I000',udg_location02)
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
call CreateItemLoc('I001',udg_location02)
call CreateItemLoc('I00E',udg_location02)
call CreateItemLoc('I005',udg_location02)
call CreateItemLoc('I003',udg_location02)
call CreateItemLoc('I004',udg_location02)
call CreateItemLoc('I00V',udg_location02)
call CreateItemLoc('I012',udg_location02)
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=2
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call CreateItemLoc('I00S',udg_location02)
call CreateItemLoc('I00N',udg_location02)
call CreateItemLoc('I017',udg_location02)
call CreateItemLoc('I018',udg_location02)
call CreateItemLoc('I00O',udg_location02)
call CreateItemLoc('I00J',udg_location02)
call CreateItemLoc('I00W',udg_location02)
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
call RemoveUnit(udg_units03[2])
call RemoveLocation(udg_location02)
endif
call RemoveLocation(temploc)
call RemoveLocation(temploc2)
set temploc=GetUnitLoc(udg_units01[bj_forLoopAIndex])
set temploc2=GetUnitLoc(udg_units03[3])
if(((DistanceBetweenPoints(temploc,temploc2)<=200.)and(udg_booleans08[3]==false)))then
set udg_location02=GetUnitLoc(udg_units03[3])
set udg_booleans08[3]=true
call PlaySoundBJ(udg_sound138)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,8.,2,82.,36.,9.)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func0293)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"Weapons cache found.")
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=12
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call CreateItemLoc('I000',udg_location02)
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
call CreateItemLoc('I008',udg_location02)
call CreateItemLoc('I00E',udg_location02)
call CreateItemLoc('I00D',udg_location02)
call CreateItemLoc('I00N',udg_location02)
call CreateItemLoc('I00O',udg_location02)
call CreateItemLoc('I00V',udg_location02)
call CreateItemLoc('I00W',udg_location02)
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=2
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call CreateItemLoc('I00S',udg_location02)
call CreateItemLoc('I006',udg_location02)
call CreateItemLoc('I00I',udg_location02)
call CreateItemLoc('I004',udg_location02)
call CreateItemLoc('I003',udg_location02)
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
call RemoveUnit(udg_units03[3])
call RemoveLocation(udg_location02)
endif
call RemoveLocation(temploc)
call RemoveLocation(temploc2)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set temploc=null
set temploc2=null
endfunction
function Func0301 takes nothing returns nothing
if(((udg_integer16==0)))then
call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_FOOD_CAP_CEILING,50)
endif
if(((udg_integer16==1)))then
call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_FOOD_CAP_CEILING,40)
endif
if(((udg_integer16==2)))then
call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_FOOD_CAP_CEILING,28)
endif
if(((udg_integer16==3)))then
call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_FOOD_CAP_CEILING,20)
endif
if(((udg_integer16==4)))then
call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_FOOD_CAP_CEILING,35)
endif
call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_RESOURCE_FOOD_CAP,1000)
endfunction
function Func0302 takes nothing returns nothing
call ForForce(Func0015(MAP_CONTROL_USER),function Func0301)
call EnableTrigger(udg_trigger14)
endfunction
function Func0303 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func0304 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Func0308 takes nothing returns nothing
if(((IsUnitDeadBJ(GetEnumUnit()))))then
set udg_integer18=(udg_integer18+R2I(2.5))
endif
endfunction
function Func0310 takes nothing returns nothing
if(((udg_integer18<0)))then
call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_RESOURCE_FOOD_USED,0)
else
call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_RESOURCE_FOOD_USED,udg_integer18)
endif
endfunction
function Func0311 takes nothing returns nothing
call UnitAddAbility(GetEnumUnit(),'A040')
call IssueImmediateOrderById(GetEnumUnit(),852561)
endfunction
function Func0315 takes nothing returns nothing
if(((GetUnitTypeId(GetEnumUnit())!='H00P')))then
call SetUnitLifePercentBJ(GetEnumUnit(),(GetUnitLifePercent(GetEnumUnit())-GetRandomReal(.0,2.)))
endif
endfunction
function Func0320 takes nothing returns nothing
local group g
local group g2
set g=UAUnitGroupFromPlayerMatching(Player(27),Condition(function Func0304))
set udg_integer18=(CountUnitsInGroup(g)/15)
call DestroyGroup(g)
set g=null
//
set g=UAUnitGroupFromPlayerMatching(Player(12),Condition(function Func0304))
set udg_integer18=(CountUnitsInGroup(g)/15)
call DestroyGroup(g)
set g=null
set g=UAUnitGroupFromPlayerMatching(Player(13),Condition(function Func0304))
set udg_integer18=(CountUnitsInGroup(g)/15)
call DestroyGroup(g)
set g=null
set g=UAUnitGroupFromPlayerMatching(Player(14),Condition(function Func0304))
set udg_integer18=(CountUnitsInGroup(g)/15)
call DestroyGroup(g)
set g=null
set g=UAUnitGroupFromPlayerMatching(Player(15),Condition(function Func0304))
set udg_integer18=(CountUnitsInGroup(g)/15)
call DestroyGroup(g)
set g=null
set g=UAUnitGroupFromPlayerMatching(Player(16),Condition(function Func0304))
set udg_integer18=(CountUnitsInGroup(g)/15)
call DestroyGroup(g)
set g=null
set g=UAUnitGroupFromPlayerMatching(Player(17),Condition(function Func0304))
set udg_integer18=(CountUnitsInGroup(g)/15)
call DestroyGroup(g)
set g=null
set g=UAUnitGroupFromPlayerMatching(Player(18),Condition(function Func0304))
set udg_integer18=(CountUnitsInGroup(g)/15)
call DestroyGroup(g)
set g=null
set g=UAUnitGroupFromPlayerMatching(Player(19),Condition(function Func0304))
set udg_integer18=(CountUnitsInGroup(g)/15)
call DestroyGroup(g)
set g=null
set g=UAUnitGroupFromPlayerMatching(Player(20),Condition(function Func0304))
set udg_integer18=(CountUnitsInGroup(g)/15)
call DestroyGroup(g)
set g=null
set g=UAUnitGroupFromPlayerMatching(Player(21),Condition(function Func0304))
set udg_integer18=(CountUnitsInGroup(g)/15)
call DestroyGroup(g)
set g=null
set g=UAUnitGroupFromPlayerMatching(Player(22),Condition(function Func0304))
set udg_integer18=(CountUnitsInGroup(g)/15)
call DestroyGroup(g)
set g=null
set g=UAUnitGroupFromPlayerMatching(Player(23),Condition(function Func0304))
set udg_integer18=(CountUnitsInGroup(g)/15)
call DestroyGroup(g)
set g=null
//
set g=UAUnitGroupWithTypeId('u005')
set udg_integer18=(udg_integer18+(CountUnitsInGroup(g)*15))
call DestroyGroup(g)
set g=null
set g=UAUnitGroupWithTypeId('u003')
set udg_integer18=(udg_integer18+(CountUnitsInGroup(g)*15))
call DestroyGroup(g)
set g=null
set g=UAUnitGroupWithTypeId('u006')
set udg_integer18=(udg_integer18+(CountUnitsInGroup(g)*5))
call DestroyGroup(g)
set g=null
set g=UAUnitGroupWithTypeId('n00K')
set udg_integer18=(udg_integer18+(CountUnitsInGroup(g)*R2I(1.5)))
call DestroyGroup(g)
set g=null
set g=UAUnitGroupWithTypeId('n00H')
set udg_integer18=(udg_integer18+(CountUnitsInGroup(g)*2))
call DestroyGroup(g)
set g=null
set g=UAUnitGroupWithTypeId('n00F')
set udg_integer18=(udg_integer18+(CountUnitsInGroup(g)*3))
call DestroyGroup(g)
set g=null
set g=UAUnitGroupWithTypeId('n00G')
set udg_integer18=(udg_integer18+(CountUnitsInGroup(g)*3))
call DestroyGroup(g)
set g=null
set udg_integer18=(udg_integer18+(udg_integer20*12))
set udg_integer18=(udg_integer18-(udg_integer19*R2I(4.)))
set udg_integer18=(udg_integer18-(udg_integer11*R2I(.35)))
set udg_integer18=(udg_integer18-(udg_integer08*R2I(.45)))
set g=UAUnitGroupFromPlayerMatching(Player(24),Condition(function Func0304))
set udg_integer18=(udg_integer18-(CountUnitsInGroup(g)/6))
call DestroyGroup(g)
set g=null
set g=UAUnitGroupFromPlayerMatching(Player(11),Condition(function Func0304))
set udg_integer18=(udg_integer18-(CountUnitsInGroup(g)/6))
call DestroyGroup(g)
set g=null
call TriggerSleepAction(.02)
call ForGroupBJ(udg_group20,function Func0308)
call DestroyGroup(GetLastCreatedGroup())
call TriggerSleepAction(.02)
call ForForce(Func0015(MAP_CONTROL_USER),function Func0310)
call DestroyGroup(GetLastCreatedGroup())
call TriggerSleepAction(.02)
if(((udg_integer18>GetPlayerState(Player(0),PLAYER_STATE_FOOD_CAP_CEILING))and(GetRandomInt(1,3)==1)))then
set g=UAUnitGroupFromPlayer(Player(27))
set g2=Func0019(1,g)
call ForGroupBJ(g2,function Func0311)
call DestroyGroup(g)
call DestroyGroup(g2)
set g=null
set g2=null
//
set g=UAUnitGroupFromPlayer(Player(12))
set g2=Func0019(1,g)
call ForGroupBJ(g2,function Func0311)
call DestroyGroup(g)
call DestroyGroup(g2)
set g=null
set g2=null
set g=UAUnitGroupFromPlayer(Player(13))
set g2=Func0019(1,g)
call ForGroupBJ(g2,function Func0311)
call DestroyGroup(g)
call DestroyGroup(g2)
set g=null
set g2=null
set g=UAUnitGroupFromPlayer(Player(14))
set g2=Func0019(1,g)
call ForGroupBJ(g2,function Func0311)
call DestroyGroup(g)
call DestroyGroup(g2)
set g=null
set g2=null
set g=UAUnitGroupFromPlayer(Player(15))
set g2=Func0019(1,g)
call ForGroupBJ(g2,function Func0311)
call DestroyGroup(g)
call DestroyGroup(g2)
set g=null
set g2=null
set g=UAUnitGroupFromPlayer(Player(16))
set g2=Func0019(1,g)
call ForGroupBJ(g2,function Func0311)
call DestroyGroup(g)
call DestroyGroup(g2)
set g=null
set g2=null
set g=UAUnitGroupFromPlayer(Player(17))
set g2=Func0019(1,g)
call ForGroupBJ(g2,function Func0311)
call DestroyGroup(g)
call DestroyGroup(g2)
set g=null
set g2=null
set g=UAUnitGroupFromPlayer(Player(18))
set g2=Func0019(1,g)
call ForGroupBJ(g2,function Func0311)
call DestroyGroup(g)
call DestroyGroup(g2)
set g=null
set g2=null
set g=UAUnitGroupFromPlayer(Player(19))
set g2=Func0019(1,g)
call ForGroupBJ(g2,function Func0311)
call DestroyGroup(g)
call DestroyGroup(g2)
set g=null
set g2=null
set g=UAUnitGroupFromPlayer(Player(20))
set g2=Func0019(1,g)
call ForGroupBJ(g2,function Func0311)
call DestroyGroup(g)
call DestroyGroup(g2)
set g=null
set g2=null
set g=UAUnitGroupFromPlayer(Player(21))
set g2=Func0019(1,g)
call ForGroupBJ(g2,function Func0311)
call DestroyGroup(g)
call DestroyGroup(g2)
set g=null
set g2=null
set g=UAUnitGroupFromPlayer(Player(22))
set g2=Func0019(1,g)
call ForGroupBJ(g2,function Func0311)
call DestroyGroup(g)
call DestroyGroup(g2)
set g=null
set g2=null
set g=UAUnitGroupFromPlayer(Player(23))
set g2=Func0019(1,g)
call ForGroupBJ(g2,function Func0311)
call DestroyGroup(g)
call DestroyGroup(g2)
set g=null
set g2=null
//
endif
call TriggerSleepAction(.02)
if(((udg_integer18>=60)and(GetRandomInt(1,2)==1)))then
if(((udg_boolean29==false)))then
call PlaySoundBJ(udg_sound59)
set udg_boolean29=true
endif
call ForGroupBJ(udg_group20,function Func0315)
call DestroyGroup(GetLastCreatedGroup())
endif
if(((udg_integer18<60)))then
call StopSoundBJ(udg_sound59,true)
set udg_boolean29=false
endif
if(((udg_integer18<=GetPlayerState(Player(0),PLAYER_STATE_FOOD_CAP_CEILING))and(GetRandomInt(1,8)==1)and(udg_integer16!=6)))then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_integers04[bj_forLoopAIndex]=(udg_integers04[bj_forLoopAIndex]+1+udg_integer16)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
if(((udg_integer18<=GetPlayerState(Player(0),PLAYER_STATE_FOOD_CAP_CEILING))and(GetRandomInt(1,8)==1)and(udg_integer16==6)))then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_integers04[bj_forLoopAIndex]=(udg_integers04[bj_forLoopAIndex]+5)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
set g=null
set g2=null
endfunction
function Func0322 takes nothing returns nothing
call UnitApplyTimedLifeBJ(150.,'BTLF',GetEnumUnit())
call SetUnitScalePercent(GetEnumUnit(),140.,140.,180.)
call SetUnitTimeScalePercent(GetEnumUnit(),150.)
endfunction
function Func0323 takes nothing returns nothing
call UnitApplyTimedLifeBJ(150.,'BTLF',GetEnumUnit())
call SetUnitScalePercent(GetEnumUnit(),140.,140.,180.)
call SetUnitTimeScalePercent(GetEnumUnit(),150.)
endfunction
function Func0327 takes nothing returns nothing
local group g
if(((GetRandomInt(1,2)==1)))then
if(((GetRandomInt(1,5)==1)))then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,("|cff808000Current Temperature:|r "+(I2S(GetRandomInt(25,35))+" degrees fahrenheit.")))
call TriggerSleepAction(3.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"|cff808000Weather:|r Snow expected.")
call TriggerSleepAction(GetRandomReal(15.,30.))
if(((GetRandomInt(1,2)==1)))then
call AddWeatherEffectSaveLast(GetWorldBounds(),'SNls')
set udg_weathereffect02=bj_lastCreatedWeatherEffect
set udg_boolean09=true
call EnableWeatherEffect(udg_weathereffect02,true)
call PlaySoundBJ(udg_sound04)
call TriggerSleepAction(GetRandomReal(15.,30.))
call RemoveWeatherEffect(udg_weathereffect02)
call AddWeatherEffectSaveLast(GetWorldBounds(),'SNhs')
set udg_weathereffect02=bj_lastCreatedWeatherEffect
call EnableWeatherEffect(udg_weathereffect02,true)
else
call AddWeatherEffectSaveLast(GetWorldBounds(),'SNls')
set udg_weathereffect02=bj_lastCreatedWeatherEffect
set udg_boolean09=true
call EnableWeatherEffect(udg_weathereffect02,true)
call PlaySoundBJ(udg_sound01)
endif
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,("|cff808000Current Temperature:|r "+(I2S(GetRandomInt(55,65))+" degrees fahrenheit.")))
call TriggerSleepAction(3.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"|cff808000Weather:|r Rain expected.")
call TriggerSleepAction(GetRandomReal(15.,30.))
if(((GetRandomInt(1,2)==1)))then
call AddWeatherEffectSaveLast(GetWorldBounds(),'RAlr')
set udg_weathereffect01=bj_lastCreatedWeatherEffect
set udg_boolean08=true
call EnableWeatherEffect(udg_weathereffect01,true)
call PlaySoundBJ(udg_sound02)
call TriggerSleepAction(GetRandomReal(15.,30.))
call RemoveWeatherEffect(udg_weathereffect01)
call AddWeatherEffectSaveLast(GetWorldBounds(),'RAhr')
set udg_weathereffect01=bj_lastCreatedWeatherEffect
call EnableWeatherEffect(udg_weathereffect01,true)
set g=UAUnitGroupWithTypeId('o005')
call ForGroupBJ(g,function Func0323)
call DestroyGroup(g)
else
call AddWeatherEffectSaveLast(GetWorldBounds(),'RAlr')
set udg_weathereffect01=bj_lastCreatedWeatherEffect
set udg_boolean08=true
call EnableWeatherEffect(udg_weathereffect01,true)
call PlaySoundBJ(udg_sound03)
set g=UAUnitGroupWithTypeId('o005')
call ForGroupBJ(g,function Func0322)
call DestroyGroup(g)
endif
endif
call TriggerSleepAction(GetRandomReal(600.,900.))
set udg_boolean08=false
set udg_boolean09=false
call RemoveWeatherEffect(udg_weathereffect01)
call RemoveWeatherEffect(udg_weathereffect02)
call StopSoundBJ(udg_sound02,true)
call StopSoundBJ(udg_sound03,true)
call StopSoundBJ(udg_sound04,true)
call StopSoundBJ(udg_sound01,true)
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,("|cff808000Current Temperature:|r "+(I2S(GetRandomInt(55,65))+" degrees fahrenheit.")))
call TriggerSleepAction(3.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"|cff808000Weather:|r Partly cloudy.")
endif
set g=null
endfunction
function Func0328 takes nothing returns boolean
return IsPlayerEnemy(GetOwningPlayer(GetTriggerUnit()),GetOwningPlayer(GetAttacker()))and(udg_integer16!=6 or GetOwningPlayer(GetTriggerUnit())!=Player(11))
endfunction
function Func0329 takes nothing returns nothing
local unit loc_unit01=GetTriggerUnit()
local real loc_real01=GetUnitX(loc_unit01)
local real loc_real02=GetUnitY(loc_unit01)
call IssuePointOrderById(loc_unit01,851986,loc_real01+(4*(loc_real01-GetUnitX(GetAttacker()))),loc_real02+(4*(loc_real02-GetUnitY(GetAttacker()))))
set loc_unit01=null
endfunction
function Func0330 takes nothing returns boolean
local integer loc_integer01=1
if IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()),Player(11))and IsUnitAliveBJ(GetFilterUnit())then
loop
exitwhen loc_integer01>10
if GetUnitTypeId(GetFilterUnit())==udg_integers30[loc_integer01]then
return true
endif
set loc_integer01=loc_integer01+1
endloop
endif
return false
endfunction
function Func0334 takes nothing returns nothing
local group loc_group01=Func0013(Player(11),'h009')
local group loc_group02=Func0013(Player(11),'h00A')
local group loc_group03=Func0013(Player(11),'h01D')
local unit loc_unit01
local integer loc_integer01=1
call GroupAddGroup(loc_group02,loc_group01)
call GroupAddGroup(loc_group03,loc_group01)
loop
call VXSleep(.2)
set loc_unit01=FirstOfGroup(loc_group01)
exitwhen loc_unit01==null
if Func0234(loc_unit01)>=25 then
call IssueImmediateOrderById(loc_unit01,852663)
exitwhen 1==1
endif
call GroupRemoveUnit(loc_group01,loc_unit01)
endloop
call DestroyGroup(loc_group01)
call DestroyGroup(loc_group02)
call DestroyGroup(loc_group03)
set loc_unit01=null
endfunction
function Func0337 takes nothing returns boolean
return IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()),Player(11))and IsUnitAliveBJ(GetFilterUnit())
endfunction
function Func0338 takes nothing returns boolean
return IsPlayerAlly(GetOwningPlayer(GetFilterUnit()),Player(11))and IsUnitAliveBJ(GetFilterUnit())
endfunction
function Func0343 takes nothing returns boolean
local integer loc_integer01=1
local unit fu=GetFilterUnit()
if IsPlayerEnemy(GetOwningPlayer(fu),Player(11))and IsUnitAliveBJ(fu)then
loop
exitwhen loc_integer01>10
if GetUnitTypeId(fu)==udg_integers30[loc_integer01]then
set fu=null
return true
endif
set loc_integer01=loc_integer01+1
endloop
endif
if IsUnitInGroup(fu,udg_group20)and IsUnitAliveBJ(fu)then
set fu=null
return true
endif
if GetUnitTypeId(fu)=='h00G'and IsPlayerEnemy(GetOwningPlayer(fu),Player(11))then
set fu=null
return true
endif
return false
endfunction
function Func0344 takes nothing returns nothing
local group loc_group01=Func0013(Player(11),'h01D')
local unit loc_unit01=GroupPickRandomUnit(loc_group01)
local location loc_location01=GetUnitLoc(loc_unit01)
local group loc_group02=UAUnitGroupWithinRangeOfLocMatching(3800.,loc_location01,Condition(function Func0343))
local unit loc_unit02=GroupPickRandomUnit(loc_group02)
local location loc_location02=GetUnitLoc(loc_unit02)
if CountUnitsInGroup(loc_group02)>0 then
call IssuePointOrderByIdLoc(loc_unit01,852667,loc_location02)
endif
call DestroyGroup(loc_group01)
call DestroyGroup(loc_group02)
set loc_unit01=null
set loc_unit02=null
call RemoveLocation(loc_location01)
set loc_location01=null
call RemoveLocation(loc_location02)
set loc_location02=null
endfunction
function Func0345 takes nothing returns boolean
local integer loc_integer01=1
if IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()),Player(11))and IsUnitAliveBJ(GetFilterUnit())then
loop
exitwhen loc_integer01>10
if GetUnitTypeId(GetFilterUnit())==udg_integers30[loc_integer01]then
return true
endif
set loc_integer01=loc_integer01+1
endloop
endif
if IsUnitInGroup(GetFilterUnit(),udg_group20)and IsUnitAliveBJ(GetFilterUnit())then
return true
endif
if GetUnitTypeId(GetFilterUnit())=='h00G'and IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()),Player(11))then
return true
endif
return false
endfunction
function Func0346 takes nothing returns nothing
local group loc_group01=Func0013(Player(11),'h01E')
local unit loc_unit01=GroupPickRandomUnit(loc_group01)
local location loc_location01=GetUnitLoc(loc_unit01)
local group loc_group02=UAUnitGroupWithinRangeOfLocMatching(6000.,loc_location01,Condition(function Func0345))
local unit loc_unit02=GroupPickRandomUnit(loc_group02)
local location loc_location02=GetUnitLoc(loc_unit02)
if CountUnitsInGroup(loc_group02)>0 then
call IssuePointOrderByIdLoc(loc_unit01,852667,loc_location02)
endif
call DestroyGroup(loc_group01)
call DestroyGroup(loc_group02)
set loc_unit01=null
set loc_unit02=null
call RemoveLocation(loc_location01)
set loc_location01=null
call RemoveLocation(loc_location02)
set loc_location02=null
set loc_group01=null
set loc_group02=null
endfunction
function Func0347 takes nothing returns boolean
local integer loc_integer01=1
if IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()),Player(11))and IsUnitAliveBJ(GetFilterUnit())then
loop
exitwhen loc_integer01>10
if GetUnitTypeId(GetFilterUnit())==udg_integers30[loc_integer01]then
return true
endif
set loc_integer01=loc_integer01+1
endloop
endif
if IsUnitInGroup(GetFilterUnit(),udg_group20)and IsUnitAliveBJ(GetFilterUnit())then
return true
endif
if GetUnitTypeId(GetFilterUnit())=='h00G'and IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()),Player(11))then
return true
endif
return false
endfunction
function Func0348 takes nothing returns nothing
local group loc_group01=Func0013(Player(11),'h01A')
local unit loc_unit01=GroupPickRandomUnit(loc_group01)
local location loc_location01=GetUnitLoc(loc_unit01)
local group loc_group02=UAUnitGroupWithinRangeOfLocMatching(13000.,loc_location01,Condition(function Func0347))
local unit loc_unit02=GroupPickRandomUnit(loc_group02)
local location loc_location02=GetUnitLoc(loc_unit02)
if CountUnitsInGroup(loc_group02)>0 then
call IssuePointOrderByIdLoc(loc_unit01,852488,loc_location02)
endif
call DestroyGroup(loc_group01)
call DestroyGroup(loc_group02)
set loc_unit01=null
set loc_unit02=null
call RemoveLocation(loc_location01)
set loc_location01=null
call RemoveLocation(loc_location02)
set loc_location02=null
set loc_group01=null
set loc_group02=null
endfunction
function Func0351 takes nothing returns nothing
call CreateMultiboardBJ(3,12,"Initializing")
set udg_multiboard01=bj_lastCreatedMultiboard
call MultiboardSetItemValueBJ(udg_multiboard01,1,1,"|cff804000Soldier ID|r")
call MultiboardSetItemValueBJ(udg_multiboard01,2,1,"|cff804000Status|r")
call MultiboardSetItemValueBJ(udg_multiboard01,3,1,"|cff804000Experience|r")
call MultiboardSetItemWidthBJ(udg_multiboard01,1,0,13.5)
call MultiboardSetItemWidthBJ(udg_multiboard01,2,0,6.)
call MultiboardSetItemWidthBJ(udg_multiboard01,3,0,6.)
call MultiboardSetItemStyleBJ(bj_lastCreatedMultiboard,0,0,true,false)
call MultiboardSetItemStyleBJ(bj_lastCreatedMultiboard,1,0,true,true)
call MultiboardSetItemStyleBJ(bj_lastCreatedMultiboard,1,1,true,false)
call MultiboardSetItemStyleBJ(bj_lastCreatedMultiboard,2,0,true,true)
call MultiboardSetItemStyleBJ(bj_lastCreatedMultiboard,2,1,true,false)
call MultiboardMinimize(udg_multiboard01,true)
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((GetPlayerController(Player(-1+((1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1))))))))==MAP_CONTROL_USER)and(GetPlayerSlotState(Player(-1+((1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1))))))))==PLAYER_SLOT_STATE_PLAYING)))then
call MultiboardSetItemValueBJ(udg_multiboard01,1,bj_forLoopAIndex,GetPlayerName(Player(-1+((bj_forLoopAIndex-1)))))
else
if(((GetPlayerController(Player(-1+((1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1))))))))==MAP_CONTROL_USER)and(GetPlayerSlotState(Player(-1+((1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1))))))))!=PLAYER_SLOT_STATE_PLAYING)))then
call MultiboardSetItemStyleBJ(udg_multiboard01,0,bj_forLoopAIndex,false,false)
endif
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(.5)
call MultiboardSetTitleText(udg_multiboard01,"Initializing.")
call TriggerSleepAction(.5)
call MultiboardSetTitleText(udg_multiboard01,"Initializing..")
call TriggerSleepAction(.5)
call MultiboardSetTitleText(udg_multiboard01,"Initializing...")
call TriggerSleepAction(.5)
call MultiboardSetTitleText(udg_multiboard01,"Recieving Data")
call TriggerSleepAction(.5)
call MultiboardSetTitleText(udg_multiboard01,"Recieving Data.")
call TriggerSleepAction(.5)
call MultiboardSetTitleText(udg_multiboard01,"Recieving Data..")
call TriggerSleepAction(.5)
call MultiboardSetTitleText(udg_multiboard01,"Recieving Data...")
call TriggerSleepAction(1.5)
call MultiboardSetTitleText(udg_multiboard01,"Connecting")
call TriggerSleepAction(1.5)
call MultiboardSetTitleText(udg_multiboard01,"Connecting.")
call TriggerSleepAction(1.5)
call MultiboardSetTitleText(udg_multiboard01,"Connecting..")
call TriggerSleepAction(1.5)
call MultiboardSetTitleText(udg_multiboard01,"Connecting...")
call TriggerSleepAction(1.5)
call MultiboardSetTitleText(udg_multiboard01,"HUD")
call MultiboardSetItemIconBJ(udg_multiboard01,2,1,"ReplaceableTextures\\CommandButtons\\BTNSkillz.tga")
endfunction
function Func0383 takes nothing returns nothing
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemIconBJ(udg_multiboard01,2,bj_forLoopAIndex,"ReplaceableTextures\\CommandButtons\\BTNSkillz.tga")
if(((((UnitHasBuffBJ(udg_units01[(bj_forLoopAIndex-1)],'B00C'))or(UnitHasBuffBJ(udg_units01[(bj_forLoopAIndex-1)],'B012'))or(UnitHasBuffBJ(udg_units01[(bj_forLoopAIndex-1)],'B011'))))))then
call MultiboardSetItemIconBJ(udg_multiboard01,2,bj_forLoopAIndex,"ReplaceableTextures\\CommandButtons\\BTNSkeletalLongevity.blp")
endif
if(((((UnitHasBuffBJ(udg_units01[(bj_forLoopAIndex-1)],'B004'))or(UnitHasBuffBJ(udg_units01[(bj_forLoopAIndex-1)],'B005'))))))then
call MultiboardSetItemIconBJ(udg_multiboard01,2,bj_forLoopAIndex,"ReplaceableTextures\\CommandButtons\\BTNMajorWound.blp")
endif
if(((((UnitHasBuffBJ(udg_units01[(bj_forLoopAIndex-1)],'B00M'))or(UnitHasBuffBJ(udg_units01[(bj_forLoopAIndex-1)],'B00N'))or(UnitHasBuffBJ(udg_units01[(bj_forLoopAIndex-1)],'B00Z'))))))then
call MultiboardSetItemIconBJ(udg_multiboard01,2,bj_forLoopAIndex,"ReplaceableTextures\\CommandButtons\\BTNCorrosiveBreath.blp")
endif
if(((((UnitHasBuffBJ(udg_units01[(bj_forLoopAIndex-1)],'B00M'))or(UnitHasBuffBJ(udg_units01[(bj_forLoopAIndex-1)],'B00N'))or(UnitHasBuffBJ(udg_units01[(bj_forLoopAIndex-1)],'B00Z'))))))then
call MultiboardSetItemIconBJ(udg_multiboard01,2,bj_forLoopAIndex,"ReplaceableTextures\\CommandButtons\\BTNCorrosiveBreath.blp")
endif
if(((((UnitHasBuffBJ(udg_units01[(bj_forLoopAIndex-1)],'B00D'))))))then
call MultiboardSetItemIconBJ(udg_multiboard01,2,bj_forLoopAIndex,"ReplaceableTextures\\CommandButtons\\BTNParasite.blp")
endif
if(((((IsUnitDeadBJ(udg_units01[(bj_forLoopAIndex-1)]))or(udg_units01[(bj_forLoopAIndex-1)]==null)))))then
call MultiboardSetItemIconBJ(udg_multiboard01,2,bj_forLoopAIndex,"ReplaceableTextures\\CommandButtons\\BTNAnkh.blp")
endif
/*
if(((((GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])=='H008')or(GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])=='H00C')or(GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])=='H000')or(GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])=='H01I')))))then
call MultiboardSetItemIconBJ(udg_multiboard01,1,bj_forLoopAIndex,"ReplaceableTextures\\CommandButtons\\BTNMarine.blp")
endif
if(((((GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])=='H00H')))))then
call MultiboardSetItemIconBJ(udg_multiboard01,1,bj_forLoopAIndex,"ReplaceableTextures\\CommandButtons\\BTNCommander.blp")
endif
if(((((GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])=='H00N')or(GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])=='H00P')))))then
call MultiboardSetItemIconBJ(udg_multiboard01,1,bj_forLoopAIndex,"ReplaceableTextures\\CommandButtons\\BTN_Marine.blp")
endif
if(((((GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])=='H00U')))))then
call MultiboardSetItemIconBJ(udg_multiboard01,1,bj_forLoopAIndex,"ReplaceableTextures\\CommandButtons\\BTNFirebat.blp")
endif
if(((((GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])=='H001')or(GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])=='H00D')or(GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])=='H00R')or(GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])=='H011')))))then
call MultiboardSetItemIconBJ(udg_multiboard01,1,bj_forLoopAIndex,"ReplaceableTextures\\CommandButtons\\BTNSophoComabatSpaceMarine1.blp")
endif
if(((((GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])=='H00J')))))then
call MultiboardSetItemIconBJ(udg_multiboard01,1,bj_forLoopAIndex,"ReplaceableTextures\\CommandButtons\\BTNCommander2.blp")
endif
if(((GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])=='H00I')))then
call MultiboardSetItemIconBJ(udg_multiboard01,1,bj_forLoopAIndex,"ReplaceableTextures\\CommandButtons\\BTNGhost.blp")
endif
if(((GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])=='h00K')))then
call MultiboardSetItemIconBJ(udg_multiboard01,1,bj_forLoopAIndex,"ReplaceableTextures\\CommandButtons\\BTNCobra.blp")
endif
if(((GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])=='h01K')))then
call MultiboardSetItemIconBJ(udg_multiboard01,1,bj_forLoopAIndex,"ReplaceableTextures\\CommandButtons\\BTNBradley.blp")
endif
*/
call MultiboardSetItemIconBJ(udg_multiboard01,1,bj_forLoopAIndex,HeroIcons.string[GetUnitTypeId(udg_units01[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))])])
//
call MultiboardSetItemValueBJ(udg_multiboard01,2,bj_forLoopAIndex,(I2S(R2I(GetUnitLifePercent(udg_units01[(bj_forLoopAIndex-1)])))+"%"))
if(((IsUnitDeadBJ(udg_units01[(bj_forLoopAIndex-1)]))))then
call MultiboardSetItemValueBJ(udg_multiboard01,2,bj_forLoopAIndex,"K.I.A.")
endif
if(((udg_units01[(bj_forLoopAIndex-1)]==null)))then
call MultiboardSetItemValueBJ(udg_multiboard01,2,bj_forLoopAIndex,"Picking")
endif
if(((GetPlayerSlotState(Player(-1+((bj_forLoopAIndex-1))))==PLAYER_SLOT_STATE_LEFT)))then
call MultiboardSetItemValueBJ(udg_multiboard01,2,bj_forLoopAIndex,"M.I.A.")
endif
call MultiboardSetItemValueBJ(udg_multiboard01,3,bj_forLoopAIndex,I2S(udg_integers04[(1+GetPlayerId(Player(-1+((bj_forLoopAIndex-1)))))]))
if(((GetPlayerSlotState(Player(-1+((bj_forLoopAIndex-1))))==PLAYER_SLOT_STATE_PLAYING)))then
call MultiboardSetItemValueBJ(udg_multiboard01,1,bj_forLoopAIndex,GetPlayerName(Player(-1+((bj_forLoopAIndex-1)))))
else
if(((GetPlayerSlotState(Player(-1+((bj_forLoopAIndex-1))))==PLAYER_SLOT_STATE_LEFT)))then
call MultiboardSetItemValueBJ(udg_multiboard01,1,bj_forLoopAIndex,("|cff808080"+GetPlayerName(Player(-1+((bj_forLoopAIndex-1))))))
endif
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func0384 takes nothing returns nothing
set udg_integer14=(udg_integer14+1)
call MultiboardSetTitleText(udg_multiboard01,("HUD (Mission time: "+(I2S((udg_integer14/60))+" min "+I2S(ModuloInteger(udg_integer14,60))+" sec )")))
endfunction
function Func0385 takes nothing returns nothing
set udg_integers17[1]=0
set udg_integers18[1]=250
set udg_strings05[1]="01Pvt."
set udg_strings06[1]="01S.R."
set udg_integers17[2]=251
set udg_integers18[2]=500
set udg_strings05[2]="02Pfc."
set udg_strings06[2]="02S.A."
set udg_integers17[3]=501
set udg_integers18[3]=2500
set udg_strings05[3]="03LCpl."
set udg_strings06[3]="03S.N."
set udg_integers17[4]=2501
set udg_integers18[4]=5000
set udg_strings05[4]="04Cpl."
set udg_strings06[4]="04P.O.3."
set udg_integers17[5]=5001
set udg_integers18[5]=8000
set udg_strings05[5]="05Sgt."
set udg_strings06[5]="05P.O.2."
set udg_integers17[6]=8001
set udg_integers18[6]=12000
set udg_strings05[6]="06SSgt."
set udg_strings06[6]="06P.O.1."
set udg_integers17[7]=12001
set udg_integers18[7]=20000
set udg_strings05[7]="07GySgt."
set udg_strings06[7]="07C.P.O."
set udg_integers17[8]=20001
set udg_integers18[8]=30000
set udg_strings05[8]="08MSgt."
set udg_strings06[8]="08S.C.P.O."
set udg_integers17[9]=30001
set udg_integers18[9]=40000
set udg_strings05[9]="09Sgt. Maj."
set udg_strings06[9]="09M.C.P.O"
set udg_integers17[10]=40001
set udg_integers18[10]=50000
set udg_strings05[10]="10W.O."
set udg_strings06[10]="10C.M.C."
set udg_integers17[11]=50001
set udg_integers18[11]=60000
set udg_strings05[11]="11C.W.O."
set udg_strings06[11]="11M.C.P.O.N."
set udg_integers17[12]=60001
set udg_integers18[12]=70000
set udg_strings05[12]="122nd Lt."
set udg_strings06[12]="12Ens."
set udg_integers17[13]=70001
set udg_integers18[13]=80000
set udg_strings05[13]="131st Lt."
set udg_strings06[13]="13Sub Lt."
set udg_integers17[14]=80001
set udg_integers18[14]=100000
set udg_strings05[14]="14Capt."
set udg_strings06[14]="14Lt. A.S."
set udg_integers17[15]=100001
set udg_integers18[15]=130000
set udg_strings05[15]="15Maj."
set udg_strings06[15]="15Lt. Com."
set udg_integers17[16]=130001
set udg_integers18[16]=190000
set udg_strings05[16]="16Lt. Col."
set udg_strings06[16]="16Com."
set udg_integers17[17]=190001
set udg_integers18[17]=300000
set udg_strings05[17]="17Col."
set udg_strings06[17]="17Capt."
set udg_integers17[18]=300001
set udg_integers18[18]=500000
set udg_strings05[18]="18Lt. Gen."
set udg_strings06[18]="18V. Adm."
set udg_integers17[19]=500001
set udg_integers18[19]=999999
set udg_strings05[19]="19Gen."
set udg_strings06[19]="19Adm."
endfunction
function Func0386 takes nothing returns nothing
local gamecache loc_gamecache01=InitGameCache("cheatcheck.w3v")
call StoreInteger(loc_gamecache01,"test","test",9)
if SaveGameCache(loc_gamecache01)then
set udg_boolean24=true
call DisableTrigger(udg_trigger31)
call VXSleep(2.15)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"The current game is single player. You cannot save in single player to prevent cheating.")
endif
endfunction
function Func0387 takes nothing returns nothing
call SetPlayerName(GetTriggerPlayer(),udg_strings04[(1+GetPlayerId(GetTriggerPlayer()))])
set udg_integers21[(1+GetPlayerId(GetTriggerPlayer()))]=(udg_integers04[(1+GetPlayerId(GetTriggerPlayer()))]/100)
set udg_integers07[0]=2
set udg_integers07[1]=udg_integers04[(1+GetPlayerId(GetTriggerPlayer()))]
set udg_integers06[1]=20
set udg_integers07[2]=udg_integers21[(1+GetPlayerId(GetTriggerPlayer()))]
set udg_integers06[2]=14
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,120.," ")
call DisplayTimedTextToForce(CreatePlayerForce(GetTriggerPlayer()),120.,("Your experience is: "+I2S(udg_integers07[1])))
set udg_player01=GetTriggerPlayer()
set udg_string01=Func0071(udg_player01)
set udg_string01=Func0075(udg_string01,"FFAAAAAA","FF0055FF","FFFFFF00")
if (GetLocalPlayer() == GetTriggerPlayer()) then
call File.open("Undead Assault 2/" + udg_OriginalPlayerNames[GetPlayerId(GetTriggerPlayer())] + ".txt").write(udg_string01).close()
endif
call DisplayTimedTextToForce(CreatePlayerForce(GetTriggerPlayer()),10000.,("Your soldier ID is: "+udg_string01))
call SetPlayerName(GetTriggerPlayer(),(SubStringBJ(udg_strings03[(1+GetPlayerId(GetTriggerPlayer()))],3,StringLength(udg_strings03[(1+GetPlayerId(GetTriggerPlayer()))]))+(" "+udg_strings04[(1+GetPlayerId(GetTriggerPlayer()))])))
endfunction
function Func0388 takes nothing returns boolean
return(udg_booleans03[(1+GetPlayerId(GetTriggerPlayer()))]==false)
endfunction
function Func0395 takes nothing returns nothing
call SetPlayerName(GetTriggerPlayer(),udg_strings04[(1+GetPlayerId(GetTriggerPlayer()))])
set udg_integers07[0]=2
set udg_integers06[1]=20
set udg_integers06[2]=14
set udg_player01=GetTriggerPlayer()
set udg_string01=SubStringBJ(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString()))
if(((StringLength(udg_string01)!=0)))then
set udg_integer07=Func0072(udg_player01,udg_string01)
if(((udg_integer07!=0)))then
call DisplayTextToForce(CreatePlayerForce(GetTriggerPlayer()),"Soldier ID invalid.")
return
endif
if(((((udg_integers07[1]<=99)or(((udg_integers07[1]>=(udg_integers07[2]*100))and(udg_integers07[1]<=((udg_integers07[2]+1)*100))))))))then
call DisplayTimedTextToForce(CreatePlayerForce(GetTriggerPlayer()),120.," ")
call DisplayTimedTextToForce(CreatePlayerForce(GetTriggerPlayer()),120.,("Experience is "+I2S(udg_integers07[1])))
set udg_integers04[(1+GetPlayerId(GetTriggerPlayer()))]=udg_integers07[1]
set udg_integers34[(1+GetPlayerId(GetTriggerPlayer()))]=udg_integers07[1]
set udg_integers21[(1+GetPlayerId(GetTriggerPlayer()))]=udg_integers07[2]
set udg_booleans03[(1+GetPlayerId(GetTriggerPlayer()))]=true
else
call DisplayTextToForce(CreatePlayerForce(GetTriggerPlayer()),"Soldier ID invalid.")
return
endif
endif
call SetPlayerName(GetTriggerPlayer(),(SubStringBJ(udg_strings03[(1+GetPlayerId(GetTriggerPlayer()))],3,StringLength(udg_strings03[(1+GetPlayerId(GetTriggerPlayer()))]))+(" "+udg_strings04[(1+GetPlayerId(GetTriggerPlayer()))])))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=19
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((udg_integers17[bj_forLoopAIndex]<=udg_integers04[(1+GetPlayerId(GetTriggerPlayer()))])and(udg_integers18[bj_forLoopAIndex]>=udg_integers04[(1+GetPlayerId(GetTriggerPlayer()))])))then
if(udg_units01[(1+GetPlayerId(GetTriggerPlayer()))]!=null and GetUnitTypeId(udg_units01[(1+GetPlayerId(GetTriggerPlayer()))])=='H00C')then
set udg_strings03[(1+GetPlayerId(GetTriggerPlayer()))]=udg_strings06[bj_forLoopAIndex]
else
set udg_strings03[(1+GetPlayerId(GetTriggerPlayer()))]=udg_strings05[bj_forLoopAIndex]
endif
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_integers20[(1+GetPlayerId(GetTriggerPlayer()))]=S2I(SubStringBJ(udg_strings03[(1+GetPlayerId(GetTriggerPlayer()))],1,2))
endfunction
function Func0409 takes nothing returns nothing
call SetPlayerName(GetEnumPlayer(),udg_strings04[(1+GetPlayerId(GetEnumPlayer()))])
call SetPlayerName(GetEnumPlayer(),(SubStringBJ(udg_strings03[(1+GetPlayerId(GetEnumPlayer()))],3,StringLength(udg_strings03[(1+GetPlayerId(GetEnumPlayer()))]))+(" "+udg_strings04[(1+GetPlayerId(GetEnumPlayer()))])))
endfunction
function Func0410 takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=19
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((udg_integers17[bj_forLoopAIndex]<=udg_integers04[(1+GetPlayerId(GetEnumPlayer()))])and(udg_integers18[bj_forLoopAIndex]>=udg_integers04[(1+GetPlayerId(GetEnumPlayer()))])))then
if(udg_units01[(1+GetPlayerId(GetEnumPlayer()))]!=null and GetUnitTypeId(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])=='H00C')then
set udg_strings03[(1+GetPlayerId(GetEnumPlayer()))]=udg_strings06[bj_forLoopAIndex]
else
set udg_strings03[(1+GetPlayerId(GetEnumPlayer()))]=udg_strings05[bj_forLoopAIndex]
endif
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(((S2I(SubStringBJ(udg_strings03[(1+GetPlayerId(GetEnumPlayer()))],1,2))>udg_integers20[(1+GetPlayerId(GetEnumPlayer()))])and(GetPlayerController(GetEnumPlayer())==MAP_CONTROL_USER)and(GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_PLAYING)))then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,(GetPlayerName(GetEnumPlayer())+(" has been promoted to "+SubStringBJ(udg_strings03[(1+GetPlayerId(GetEnumPlayer()))],3,StringLength(udg_strings03[(1+GetPlayerId(GetEnumPlayer()))])))))
endif
set udg_integers20[(1+GetPlayerId(GetEnumPlayer()))]=S2I(SubStringBJ(udg_strings03[(1+GetPlayerId(GetEnumPlayer()))],1,2))
call SetPlayerTechResearchedSwap('R002',S2I(SubStringBJ(udg_strings03[(1+GetPlayerId(GetEnumPlayer()))],1,2)),GetEnumPlayer())
call SetPlayerTechResearchedSwap('R00J',(S2I(SubStringBJ(udg_strings03[(1+GetPlayerId(GetEnumPlayer()))],1,2))/3),GetEnumPlayer())
call SetPlayerTechResearchedSwap('R003',S2I(SubStringBJ(udg_strings03[(1+GetPlayerId(GetEnumPlayer()))],1,2)),GetEnumPlayer())
if(((udg_boolean26==false)and(udg_boolean25==false)))then
if(((udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]>=251)))then
call SetPlayerUnitAvailableBJ('H011',true,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H001',true,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H01I',true,GetEnumPlayer())
endif
if(((udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]>=501)))then
call SetPlayerUnitAvailableBJ('H00H',true,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H00U',true,GetEnumPlayer())
endif
if(((udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]>=2501)))then
call SetPlayerUnitAvailableBJ('H00N',true,GetEnumPlayer())
endif
if(((udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]>=5001)))then
call SetPlayerUnitAvailableBJ('H00R',true,GetEnumPlayer())
endif
if(((udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]>=8001)))then
call SetPlayerUnitAvailableBJ('H00D',true,GetEnumPlayer())
endif
if(((udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]>=12001)))then
if(((udg_integer16!=6)))then
call SetPlayerUnitAvailableBJ('H00M',true,GetEnumPlayer())
endif
call SetPlayerUnitAvailableBJ('H00P',true,GetEnumPlayer())
endif
if(((udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]>=20001)))then
call SetPlayerUnitAvailableBJ('H008',true,GetEnumPlayer())
endif
if(((udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]>=30001)))then
call SetPlayerUnitAvailableBJ('H00I',true,GetEnumPlayer())
endif
if(((udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]>=80001)))then
call SetPlayerUnitAvailableBJ('H00J',true,GetEnumPlayer())
endif
if(((udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]>=100001)))then
call SetPlayerUnitAvailableBJ(HERO_MEDIC,true,GetEnumPlayer())
endif
if(((udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]>=190001)))then
if(((udg_integer16!=6)))then
call SetPlayerUnitAvailableBJ('H01J',true,GetEnumPlayer())
endif
endif
endif
call ForForce(Func0015(MAP_CONTROL_USER),function Func0409)
endfunction
function Func0411 takes nothing returns nothing
call ForForce(Func0015(MAP_CONTROL_USER),function Func0410)
endfunction
function Func0412 takes nothing returns boolean
return(GetPlayerController(GetOwningPlayer(GetKillingUnit()))==MAP_CONTROL_USER)and(IsPlayerEnemy(GetOwningPlayer(GetDyingUnit()),GetOwningPlayer(GetKillingUnit())))
endfunction
function ActionKillXP takes nothing returns nothing
local unit du=GetDyingUnit()
local integer ut=GetUnitTypeId(du)
local player p=GetOwningPlayer(GetKillingUnit())
local integer playerid=GetPlayerId(p)
local integer xp=0
if(IsUnitAlly(du,p)==false)then
if(ut=='u002')then
set xp=3*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='u004')then
set xp=5*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='u005')then
set xp=8*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='u006')then
set xp=8*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='u008')then
set xp=8*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='u009')then
set xp=8*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='u00A')then
set xp=2*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='u00B')then
set xp=8*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='n012')then
set xp=2*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='n00W')then
set xp=4*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='n00F')then
set xp=3*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='n00G')then
set xp=8*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='n00K')then
set xp=5*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='n00N')then
set xp=2*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='n00P')then
set xp=3*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='n00U')then
set xp=5*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='n00V')then
set xp=5*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='H00G')then
set xp=5*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
elseif(ut=='h00F')then
set xp=5*(1+udg_integer16)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,("|cff808000"+GetPlayerName(p)+" killed "+GetUnitName(du)+", "+I2S(xp)+" XP awarded to him.|r"))
endif
set udg_integers04[(1+playerid)]=(udg_integers04[(1+playerid)]+xp)
endif
set du=null
set p=null
if(((udg_integers08[(1+playerid)]==6)))then
set udg_integers04[(1+playerid)]=(udg_integers04[(1+playerid)]+1)
set udg_integers08[(1+playerid)]=0
endif
set udg_integers08[(1+playerid)]=(udg_integers08[(1+playerid)]+1)
endfunction
function Func0416 takes nothing returns nothing
if(((udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]>=1000000)))then
set udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]=999999
endif
endfunction
function Func0417 takes nothing returns nothing
call ForForce(Func0015(MAP_CONTROL_USER),function Func0416)
endfunction
function Func0418 takes nothing returns nothing
local integer loc_integer01=0
local integer loc_integer02=1
local integer loc_integer03=0
local integer loc_integer04=0
loop
exitwhen loc_integer02>11
if(GetPlayerSlotState(Player(-1+(loc_integer02)))==PLAYER_SLOT_STATE_PLAYING)then
set loc_integer01=loc_integer01+udg_integers04[loc_integer02]
endif
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=loc_integer01/udg_integer24
set loc_integer02=1
loop
exitwhen loc_integer02>11
if(GetPlayerSlotState(Player(-1+(loc_integer02)))==PLAYER_SLOT_STATE_PLAYING)then
if udg_integers04[loc_integer02]>R2I(loc_integer01*1.5)then
set loc_integer04=loc_integer04+1
else
set loc_integer03=loc_integer03+udg_integers04[loc_integer02]
endif
endif
set loc_integer02=loc_integer02+1
endloop
set loc_integer03=loc_integer03/(udg_integer24-loc_integer04)
set udg_integer23=loc_integer03
endfunction
function Func0419 takes nothing returns boolean
return(GetSellingUnit() == udg_unit18 or GetSellingUnit() == udg_Predator)
endfunction
function Func0446 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func0450 takes nothing returns boolean
return GetBooleanAnd(((GetPlayerController(GetFilterPlayer())==MAP_CONTROL_USER)),((GetPlayerSlotState(GetFilterPlayer())==PLAYER_SLOT_STATE_PLAYING)))
endfunction
function Func0452 takes nothing returns nothing
local string rankedname
local integer xp
local string tempname
local location testloc
local unit loc_unit01=GetSoldUnit()
local sound loc_sound01=udg_sound93
local player p = GetOwningPlayer(GetSoldUnit())
local integer id = GetPlayerId(p)
if (GetUnitAbilityLevel(loc_unit01, ATTRIBUTE_NEW_HERO) > 0) then
set loc_unit01 = null
set loc_sound01 = null
return
endif
if(((udg_units01[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]!=null)))then
call RemoveUnit(GetSoldUnit())
return
endif
if(((GetUnitTypeId(GetSoldUnit())=='H00M')))then
set udg_integer25=(udg_integer25*R2I(1.1))
set udg_integers14[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]='h00K'
call CreateNUnitsAtLoc(1,'h00K',GetOwningPlayer(GetSoldUnit()),GetRectCenter(udg_rect90),bj_UNIT_FACING)
set udg_units01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]=bj_lastCreatedUnit
call GroupAddUnit(udg_group20,bj_lastCreatedUnit)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,(("|cff804000"+GetPlayerName(GetOwningPlayer(GetSoldUnit())))+("|r is now operating the "+GetUnitName(bj_lastCreatedUnit))))
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call SelectUnitForPlayerSingle(bj_lastCreatedUnit,GetOwningPlayer(GetSoldUnit()))
call RemoveUnit(GetSoldUnit())
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetBuyingUnit()),GetRectCenter(udg_rect90),.0)
set udg_real04=(udg_real04*.8)
set udg_integers36[1]=(udg_integers36[1]+1)
else
set udg_integers14[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=GetUnitTypeId(GetSoldUnit())
set udg_units01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]=GetSoldUnit()
call GroupAddUnit(udg_group20,GetSoldUnit())
set tempname=GetPlayerName(GetOwningPlayer(GetSoldUnit()))
if(GetUnitTypeId(GetSoldUnit())=='H00C')then
set xp=udg_integers04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
set rankedname=GetPlayerName(GetOwningPlayer(GetSoldUnit()))
if(xp>=udg_integers17[19])then
set tempname=SubString(udg_strings06[19],2,StringLength(udg_strings06[19]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[18])then
set tempname=SubString(udg_strings06[18],2,StringLength(udg_strings06[18]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[17])then
set tempname=SubString(udg_strings06[17],2,StringLength(udg_strings06[17]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[16])then
set tempname=SubString(udg_strings06[16],2,StringLength(udg_strings06[16]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[15])then
set tempname=SubString(udg_strings06[15],2,StringLength(udg_strings06[15]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[14])then
set tempname=SubString(udg_strings06[14],2,StringLength(udg_strings06[14]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[13])then
set tempname=SubString(udg_strings06[13],2,StringLength(udg_strings06[13]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[12])then
set tempname=SubString(udg_strings06[12],2,StringLength(udg_strings06[12]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[11])then
set tempname=SubString(udg_strings06[11],2,StringLength(udg_strings06[11]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[10])then
set tempname=SubString(udg_strings06[10],2,StringLength(udg_strings06[10]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[9])then
set tempname=SubString(udg_strings06[9],2,StringLength(udg_strings06[9]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[8])then
set tempname=SubString(udg_strings06[8],2,StringLength(udg_strings06[8]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[7])then
set tempname=SubString(udg_strings06[7],2,StringLength(udg_strings06[7]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[6])then
set tempname=SubString(udg_strings06[6],2,StringLength(udg_strings06[6]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[5])then
set tempname=SubString(udg_strings06[5],2,StringLength(udg_strings06[5]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[4])then
set tempname=SubString(udg_strings06[4],2,StringLength(udg_strings06[4]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[3])then
set tempname=SubString(udg_strings06[3],2,StringLength(udg_strings06[3]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
elseif(xp>=udg_integers17[2])then
set tempname=SubString(udg_strings06[2],2,StringLength(udg_strings06[2]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
else
set tempname=SubString(udg_strings06[1],2,StringLength(udg_strings06[1]))+udg_strings04[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),tempname)
endif
endif
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,(("|cff804000"+tempname)+("|r has selected "+GetUnitName(GetSoldUnit()))))
call UnitShareVisionBJ(false,udg_unit18,GetOwningPlayer(GetSoldUnit()))
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
call SelectUnitForPlayerSingle(GetSoldUnit(),GetOwningPlayer(GetSoldUnit()))
call TriggerRegisterUnitEvent(udg_trigger68,GetSoldUnit(),EVENT_UNIT_DAMAGED)
if(((udg_integer16==0)))then
call UnitAddAbility(GetSoldUnit(),'A05S')
endif
if(((udg_boolean26)))then
call SetHeroLevelBJ(GetSoldUnit(),2,false)
call UnitAddItemByIdSwapped('I000',GetSoldUnit())
call SetItemCharges(bj_lastCreatedItem,3)
endif
endif
if(((((GetUnitTypeId(GetSoldUnit())=='H00C')))))then
call UnitAddItemByIdSwapped('I003',GetSoldUnit())
endif
if(((((GetUnitTypeId(GetSoldUnit())=='H00C')or(GetUnitTypeId(GetSoldUnit())=='H00D')))))then
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=65
set udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=65
call SetPlayerStateBJ(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_LUMBER,14)
call UnitAddItemByIdSwapped('I00W',GetSoldUnit())
endif
if(((((GetUnitTypeId(GetSoldUnit())=='H00P')))))then
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=200
set udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=200
call SetPlayerStateBJ(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_LUMBER,12)
call UnitAddItemByIdSwapped('I00C',GetSoldUnit())
endif
if(((GetUnitTypeId(GetSoldUnit())=='H00N')))then
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=24
set udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=24
call SetPlayerStateBJ(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_LUMBER,10)
call UnitAddItemByIdSwapped('I00V',GetSoldUnit())
call SetItemCharges(bj_lastCreatedItem,4)
call SetPlayerTechResearchedSwap('R00B',5,GetOwningPlayer(GetSoldUnit()))
endif
if(((((GetUnitTypeId(GetSoldUnit())=='H008')))))then
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=80
set udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=80
call SetPlayerStateBJ(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_LUMBER,16)
call UnitAddItemByIdSwapped('I00O',GetSoldUnit())
set udg_real04=(udg_real04*.9)
call SetPlayerTechResearchedSwap('R00B',5,GetOwningPlayer(GetSoldUnit()))
endif
if(((((GetUnitTypeId(GetSoldUnit())=='H00J')))))then
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=40
set udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=40
call SetPlayerStateBJ(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_LUMBER,16)
call UnitAddItemByIdSwapped('I00O',GetSoldUnit())
call SetPlayerTechResearchedSwap('R00B',5,GetOwningPlayer(GetSoldUnit()))
endif
if(((((GetUnitTypeId(GetSoldUnit())=='H00I')))))then
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=165
set udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=165
call SetPlayerStateBJ(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_LUMBER,16)
call UnitAddItemByIdSwapped('I00O',GetSoldUnit())
set udg_real04=(udg_real04*.95)
call SetPlayerTechResearchedSwap('R00B',5,GetOwningPlayer(GetSoldUnit()))
endif
if(((GetUnitTypeId(GetSoldUnit())=='H00R')))then
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=24
set udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=24
call UnitAddItemByIdSwapped('I00I',GetSoldUnit())
call SetPlayerStateBJ(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_LUMBER,16)
endif
if(((GetUnitTypeId(GetSoldUnit())=='H00H')))then
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=45
set udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=45
call SetPlayerStateBJ(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_LUMBER,14)
set udg_integers16[1]=(udg_integers16[1]+1)
call UnitAddItemByIdSwapped('I00O',GetSoldUnit())
endif
if(((GetUnitTypeId(GetSoldUnit())=='H00U')))then
set udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=50
call SetPlayerStateBJ(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_LUMBER,425)
call UnitAddItemByIdSwapped('I018',GetSoldUnit())
set udg_integers16[2]=(udg_integers16[2]+1)
endif
if(((GetUnitTypeId(GetSoldUnit())=='H000')))then
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=75
set udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=75
call SetPlayerStateBJ(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_LUMBER,15)
set udg_integers16[3]=(udg_integers16[3]+1)
call UnitAddItemByIdSwapped('I00N',GetSoldUnit())
endif
if(((GetUnitTypeId(GetSoldUnit())=='H011')))then
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=65
set udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=65
call SetPlayerStateBJ(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_LUMBER,14)
set udg_integers16[4]=(udg_integers16[4]+1)
call UnitAddItemByIdSwapped('I00O',GetSoldUnit())
endif
if(((((GetUnitTypeId(GetSoldUnit())=='H001')))))then
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=100
set udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=100
call SetPlayerStateBJ(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_LUMBER,12)
call UnitAddItemByIdSwapped('I00S',GetSoldUnit())
set udg_integers16[5]=(udg_integers16[5]+1)
endif
if(((((GetUnitTypeId(GetSoldUnit())=='H01I')))))then
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=80
set udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=80
call SetPlayerStateBJ(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_LUMBER,16)
call UnitAddItemByIdSwapped('I00O',GetSoldUnit())
set udg_integers16[6]=(udg_integers16[6]+1)
endif
call ForGroupBJ(Func0013(GetOwningPlayer(GetSoldUnit()),'n003'),function Func0446)
set udg_integer09=0
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((udg_units01[bj_forLoopAIndex]!=null)))then
set udg_integer09=(udg_integer09+1)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(((udg_integer09==CountPlayersInForceBJ(Func0018(Condition(function Func0450))))))then
call ConditionalTriggerExecute(udg_trigger38)
endif
set loc_unit01=null
set loc_sound01=null
endfunction
function Func0453 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func0454 takes nothing returns nothing
local group g
local location temploc
call DisableTrigger(udg_trigger39)
call DisableTrigger(udg_trigger40)
call DisableTrigger(gg_trg_MOS_Mode)
call SetUnitFlyHeight(udg_unit18,800.,300.)
call SetUnitFlyHeight(udg_Predator,3000.,350.)
call TriggerSleepAction(1.5)
call DisableTrigger(gg_trg_Predator)
call EnableTrigger(udg_trigger64)
set temploc=GetRandomLocInRect(udg_rects02[GetRandomInt(1,4)])
call IssuePointOrderByIdLoc(udg_unit18,851986,temploc)
call RemoveLocation(temploc)
set temploc=null
set g=UAUnitGroupWithTypeId('n003')
call ForGroupBJ(g,function Func0453)
call DestroyGroup(g)
set g=null
call TriggerSleepAction(5.)
call RemoveUnit(udg_unit18)
call RemoveUnit(udg_Predator)
endfunction
function Func0455 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func0457 takes nothing returns nothing
local location temploc
local group g
local unit loc_unit01
local sound loc_sound01=udg_sound93
call ConditionalTriggerExecute(udg_trigger38)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)and(GetPlayerController(Player(-1+(bj_forLoopAIndex)))==MAP_CONTROL_USER)and(udg_units01[bj_forLoopAIndex]==null)))then
set temploc=GetUnitLoc(udg_unit18)
call CreateNUnitsAtLoc(1,'H000',Player(-1+(bj_forLoopAIndex)),temploc,bj_UNIT_FACING)
call RemoveLocation(temploc)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,(("|cff804000"+GetPlayerName(Player(-1+(bj_forLoopAIndex))))+(" has selected "+GetUnitName(bj_lastCreatedUnit))))
set udg_units01[bj_forLoopAIndex]=bj_lastCreatedUnit
call GroupAddUnit(udg_group20,bj_lastCreatedUnit)
call UnitShareVisionBJ(false,udg_unit18,Player(-1+(bj_forLoopAIndex)))
set loc_unit01=bj_lastCreatedUnit
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
call SelectUnitForPlayerSingle(bj_lastCreatedUnit,Player(-1+(bj_forLoopAIndex)))
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]=65
set udg_integers09[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]=65
call SetPlayerStateBJ(GetOwningPlayer(bj_lastCreatedUnit),PLAYER_STATE_RESOURCE_LUMBER,14)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
set g=Func0013(Player(-1+(bj_forLoopAIndex)),'n003')
call ForGroupBJ(g,function Func0455)
call DestroyGroup(g)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set temploc=null
set g=null
set loc_unit01=null
set loc_sound01=null
endfunction
function Func0458 takes nothing returns boolean
return(udg_boolean26==false)
endfunction
function Func0465 takes nothing returns nothing
if(((udg_integers15[1]==1)and(udg_integers16[2]<2)))then
set udg_integers15[1]=2
//call RemoveUnitFromStock(udg_unit18,'H00H')
call ExecuteFunc("Func0467")
else
if(((udg_integers15[1]==2)and(udg_integers16[1]<1)))then
set udg_integers15[1]=1
//call RemoveUnitFromStock(udg_unit18,'H00U')
call ExecuteFunc("Func0466")
endif
endif
if(((udg_integers15[2]==1)and(udg_integers16[4]<2)))then
set udg_integers15[2]=2
//call RemoveUnitFromStock(udg_unit18,'H000')
call ExecuteFunc("Func0469")
else
if(((udg_integers15[2]==2)and(udg_integers16[3]<11)))then
set udg_integers15[2]=1
//call RemoveUnitFromStock(udg_unit18,'H011')
call ExecuteFunc("Func0468")
endif
endif
if(((udg_integers15[3]==1)and(udg_integers16[5]<2)))then
set udg_integers15[3]=2
//call RemoveUnitFromStock(udg_unit18,'H01I')
call ExecuteFunc("Func0470")
else
if(((udg_integers15[3]==2)and(udg_integers16[6]<1)))then
set udg_integers15[3]=1
//call RemoveUnitFromStock(udg_unit18,'H001')
call ExecuteFunc("Func0471")
endif
endif
if(((udg_integers35[1]==1)and(udg_integers36[2]<1)))then
set udg_integers35[1]=2
//call RemoveUnitFromStock(udg_unit18,'H00M')
call ExecuteFunc("Func0471b")
else
if(((udg_integers35[1]==2)and(udg_integers36[1]<1)))then
set udg_integers35[1]=1
//call RemoveUnitFromStock(udg_unit18,'H01J')
call ExecuteFunc("Func0471a")
endif
endif
endfunction
function Func0466 takes nothing returns nothing
call VXSleep(.8)
if (udg_NoMosLimits) then
//call ExecuteFunc("UpdateMosStock")
endif
//call AddUnitToStockBJ('H00H',udg_unit18,(IntegerTertiaryOp(udg_NoMosLimits,11,1)-udg_integers16[1]),IntegerTertiaryOp(udg_NoMosLimits,11,1))
endfunction
function Func0467 takes nothing returns nothing
call VXSleep(.8)
if (udg_NoMosLimits) then
//call ExecuteFunc("UpdateMosStock")
endif
//call AddUnitToStockBJ('H00U',udg_unit18,(IntegerTertiaryOp(udg_NoMosLimits,11,2)-udg_integers16[2]),IntegerTertiaryOp(udg_NoMosLimits,11,2))
endfunction
function Func0468 takes nothing returns nothing
call VXSleep(.8)
if (udg_NoMosLimits) then
//call ExecuteFunc("UpdateMosStock")
endif
//call AddUnitToStockBJ('H000',udg_unit18,(11-udg_integers16[3]),11)
endfunction
function Func0469 takes nothing returns nothing
call VXSleep(.8)
if (udg_NoMosLimits) then
//call ExecuteFunc("UpdateMosStock")
endif
//call AddUnitToStockBJ('H011',udg_unit18,(IntegerTertiaryOp(udg_NoMosLimits,11,3)-udg_integers16[4]),IntegerTertiaryOp(udg_NoMosLimits,11,3))
endfunction
function Func0470 takes nothing returns nothing
call VXSleep(.8)
if (udg_NoMosLimits) then
//call ExecuteFunc("UpdateMosStock")
endif
//call AddUnitToStockBJ('H001',udg_unit18,(IntegerTertiaryOp(udg_NoMosLimits,11,2)-udg_integers16[5]),IntegerTertiaryOp(udg_NoMosLimits,11,2))
endfunction
function Func0471 takes nothing returns nothing
call VXSleep(.8)
if (udg_NoMosLimits) then
//call ExecuteFunc("UpdateMosStock")
endif
//call AddUnitToStockBJ('H01I',udg_unit18,(IntegerTertiaryOp(udg_NoMosLimits,11,1)-udg_integers16[6]),IntegerTertiaryOp(udg_NoMosLimits,11,1))
endfunction
function Func0471a takes nothing returns nothing
call VXSleep(.8)
if (udg_NoMosLimits) then
//call ExecuteFunc("UpdateMosStock")
endif
//call AddUnitToStockBJ('H00M',udg_unit18,(IntegerTertiaryOp(udg_NoMosLimits,11,1)-udg_integers36[1]),IntegerTertiaryOp(udg_NoMosLimits,11,1))
endfunction
function Func0471b takes nothing returns nothing
call VXSleep(.8)
if (udg_NoMosLimits) then
//call ExecuteFunc("UpdateMosStock")
endif
//call AddUnitToStockBJ('H01J',udg_unit18,(IntegerTertiaryOp(udg_NoMosLimits,11,1)-udg_integers36[2]),IntegerTertiaryOp(udg_NoMosLimits,11,1))
endfunction
function Func0472 takes nothing returns boolean
return(udg_boolean25)
endfunction
function Func0473 takes nothing returns nothing
//call SetPlayerUnitAvailableBJ('H011',false,GetEnumPlayer())
call SetPlayerHandicapXPBJ(GetEnumPlayer(),60.)
call SetPlayerHandicapXPBJ(GetEnumPlayer(),(50.+(I2R(udg_integer24)*1.55)))
call SetPlayerAbilityAvailableBJ(true,'a06B',GetEnumPlayer())
endfunction
function Func0474 takes nothing returns nothing
local integer i = 0
call DisableTrigger(GetTriggeringTrigger())
if (udg_NoMosLimits) then
return
endif
set udg_boolean26=true
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,8.,("|cffffcc00"+(GetPlayerName(Player(0))+" has chosen Rifle Mode. You can only pick Rifleman, Grenadier, and Navy Corpsman but receive a 15% gain in XP along with other benefits.")))
call QuestSetTitle(udg_quest02,(udg_string02+" - Rifle"))
set udg_string02=(udg_string02+" - Rifle")
set udg_real04=(udg_real04+.15)
// Derdan
loop
call SetPlayerUnitAvailableBJ('H011', true, Player(i))
call UnitShareVision(udg_Argis, Player(i), true)
set i = i + 1
exitwhen (i == bj_MAX_PLAYERS)
endloop
//set udg_Argis = GroupPickRandomUnit(GetUnitsOfTypeIdAll('h002'))
//call RemoveUnit(udg_Argis)
//set udg_Argis = CreateUnit(Player(24),'h01Q',5023.5,988.2,162.27)
//set udg_unit18 = udg_Argis
// ----
call ForForce(bj_FORCE_ALL_PLAYERS,function Func0473)
endfunction
function Func0475 takes nothing returns boolean
return(udg_boolean25)and(udg_integer16!=0)and(udg_integer16!=6)
endfunction
function Func0477 takes nothing returns nothing
if(((udg_boolean26==false)))then
call SetPlayerHandicapXPBJ(GetEnumPlayer(),47.)
endif
endfunction
function Func0478 takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
set udg_boolean27=true
call QuestSetTitle(udg_quest02,(udg_string02+" - Outbreak"))
set udg_string02=(udg_string02+" - Outbreak")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,8.,("|cffffcc00"+(GetPlayerName(Player(0))+" has chosen Outbreak Mode. XP gain is reduced by 30% but mostly basic zombies will spawn.")))
set udg_real04=(udg_real04-.3)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func0477)
endfunction
function Func0479 takes nothing returns boolean
return IsUnitInGroup(GetAttacker(),udg_group20)and IsUnitInGroup(GetAttacker(),udg_group28)==false and GetUnitTypeId(GetAttacker())!='H00U'and GetUnitTypeId(GetAttacker())!='h01K'and GetUnitTypeId(GetAttacker())!='h00K'
endfunction
function Func0480 takes nothing returns nothing
local unit loc_unit01=GetAttacker()
local unit loc_unit02=CreateUnit(GetOwningPlayer(loc_unit01),'h003',GetUnitX(loc_unit01),GetUnitY(loc_unit01),GetUnitFacing(loc_unit01))
local real loc_real01=GetUnitX(loc_unit01)-GetUnitX(GetTriggerUnit())
local real loc_real02=GetUnitY(loc_unit01)-GetUnitY(GetTriggerUnit())
local integer loc_integer01=R2I((loc_real01*loc_real01+loc_real02*loc_real02)/(GetUnitAcquireRange(loc_unit01)*GetUnitAcquireRange(loc_unit01))*10)
call UnitRemoveAbility(loc_unit01,'A06R')
if GetUnitTypeId(loc_unit01)=='H00H'or GetUnitTypeId(loc_unit01)=='H00R'or GetUnitTypeId(loc_unit01)=='H00N'then
call UnitAddAbility(loc_unit02,'A06Y')
call SetUnitAbilityLevel(loc_unit02,'A06Y',loc_integer01)
else
call UnitAddAbility(loc_unit02,'A06R')
call SetUnitAbilityLevel(loc_unit02,'A06R',loc_integer01)
endif
call IssueTargetOrderById(loc_unit02,852585,loc_unit01)
call UnitApplyTimedLifeBJ(3.,'BTLF',loc_unit02)
set loc_unit01=null
set loc_unit02=null
endfunction
function Func0493 takes nothing returns nothing
if(((IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==false)))then
call SetUnitMoveSpeed(GetEnumUnit(),(GetUnitMoveSpeed(GetEnumUnit())-60.))
endif
endfunction
function Func0494 takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((GetUnitTypeId(udg_units01[bj_forLoopAIndex])=='H00U')))then
set udg_real11=(GetUnitDefaultMoveSpeed(udg_units01[bj_forLoopAIndex])-(I2R(GetPlayerState(Player(-1+(bj_forLoopAIndex)),PLAYER_STATE_RESOURCE_LUMBER))*.02))
else
set udg_real11=(GetUnitDefaultMoveSpeed(udg_units01[bj_forLoopAIndex])-(I2R(GetPlayerState(Player(-1+(bj_forLoopAIndex)),PLAYER_STATE_RESOURCE_LUMBER))*1.5))
endif
if(((((GetPlayerTechCountSimple('R00B',Player(-1+(bj_forLoopAIndex)))>=4)or(GetUnitAbilityLevelSwapped('A01X',udg_units01[bj_forLoopAIndex])>=4)or(GetUnitAbilityLevelSwapped('A00L',udg_units01[bj_forLoopAIndex])>=4)))))then
set udg_real11=(udg_real11+10.)
endif
if(((udg_boolean09)))then
set udg_real11=(udg_real11-8.)
endif
if(((udg_booleans09[bj_forLoopAIndex])))then
set udg_real11=(udg_real11-100.)
endif
set udg_real11=(udg_real11+(S2R(SubStringBJ(udg_strings03[bj_forLoopAIndex],1,2))*.5))
set udg_real11=(udg_real11+(I2R(GetPlayerTechCountSimple('R00I',Player(-1+(bj_forLoopAIndex))))*5.))
if(((UnitHasBuffBJ(udg_units01[bj_forLoopAIndex],'B01A'))))then
set udg_real11=(udg_real11*(1.02+(I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),udg_units01[bj_forLoopAIndex]))*.02)))
endif
if(((IsUnitInGroup(udg_units01[bj_forLoopAIndex],udg_group27))))then
set udg_real11=(udg_real11-60.)
endif
if(((IsUnitInGroup(udg_units01[bj_forLoopAIndex],udg_group01)==false)))then
call SetUnitMoveSpeed(udg_units01[bj_forLoopAIndex],udg_real11)
if(((udg_integers02[bj_forLoopAIndex]<140)))then
set udg_integers02[bj_forLoopAIndex]=(udg_integers02[bj_forLoopAIndex]+GetRandomInt(8,12))
endif
else
set udg_integers02[bj_forLoopAIndex]=(udg_integers02[bj_forLoopAIndex]-GetRandomInt(4,8))
set udg_real11=(udg_real11+I2R(udg_integers02[bj_forLoopAIndex]))
call SetUnitMoveSpeed(udg_units01[bj_forLoopAIndex],udg_real11)
if(((((udg_integers02[bj_forLoopAIndex]<=-15)or(udg_booleans09[bj_forLoopAIndex])))))then
call DisplayTimedTextToForce(CreatePlayerForce(Player(-1+(bj_forLoopAIndex))),2.,"Sprint |cffCD0000OFF|r (exhausted)")
call GroupRemoveUnit(udg_group01,udg_units01[bj_forLoopAIndex])
endif
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call ForGroupBJ(udg_group27,function Func0493)
endfunction
function Func0499 takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cffffcc00Pilot:|r You have 90 seconds to pick your MOS.")
call TriggerSleepAction(180.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,6.,"\"You are not a superman.\" - Murphy's Laws of Combat")
call TriggerSleepAction(30.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff32cd32HINT|r - As you play the game, you gain experience from killing undead and completing missions. You can type \"-save\" to save your experience and type \"-load <code>\" to input your Marine ID.")
call TriggerSleepAction(30.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff32cd32HINT|r - You can type \"-tl\" to ping your team's locations and \"-dead\" to ping the locations of dead teammates. For more commands and information, view the Intel (|cffffcc00F9|r).")
call TriggerSleepAction(30.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff32cd32HINT|r - Every time you shoot, your bullets go through the target and will hit anything behind it, even allies. Bullets from more powerful guns travel farther.")
call TriggerSleepAction(30.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff32cd32HINT|r - The more magazines you have, the more encumbered your soldier is. This does not include Ammo in your inventory.")
endfunction
function Func0500 takes nothing returns nothing
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),GetEnumPlayer(),4)
endfunction
function Func0502 takes nothing returns nothing
call ForForce(Func0016(GetTriggerPlayer()),function Func0500)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,(GetPlayerName(GetTriggerPlayer())+" has abandoned the mission."))
if(((udg_integer16==5)))then
call ForceRemovePlayer(udg_forces01[1],GetTriggerPlayer())
call ForceRemovePlayer(udg_forces01[2],GetTriggerPlayer())
call ConditionalTriggerExecute(udg_trigger326)
endif
endfunction
function Func0503 takes nothing returns boolean
return(GetPlayerController(GetOwningPlayer(GetKillingUnit()))==MAP_CONTROL_USER)
endfunction
function Func0506 takes nothing returns nothing
if(((udg_integer16==5)and(IsUnitInGroup(GetDyingUnit(),udg_group20))and(IsUnitInGroup(GetKillingUnit(),udg_group20))))then
set udg_integers13[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]=(udg_integers13[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]+1)
else
if(((udg_integer16!=5)and(IsPlayerEnemy(GetOwningPlayer(GetDyingUnit()),GetOwningPlayer(GetKillingUnit())))))then
set udg_integers13[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]=(udg_integers13[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]+1)
endif
endif
endfunction
function Func0508 takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((udg_units01[bj_forLoopAIndex]!=null)and(IsUnitAliveBJ(udg_units01[bj_forLoopAIndex]))and(IsPlayerAlly(Player(-1+(bj_forLoopAIndex)),GetTriggerPlayer()))))then
set udg_location02=GetUnitLoc(udg_units01[bj_forLoopAIndex])
call PingMinimapLocForForceEx(CreatePlayerForce(GetTriggerPlayer()),udg_location02,5.,0,50.,100,50.)
call RemoveLocation(udg_location02)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func0510 takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((udg_units01[bj_forLoopAIndex]!=null)and(IsUnitDeadBJ(udg_units01[bj_forLoopAIndex]))))then
set udg_location02=GetUnitLoc(udg_units01[bj_forLoopAIndex])
call PingMinimapLocForForceEx(CreatePlayerForce(GetTriggerPlayer()),udg_location02,5.,0,100.,50.,50.)
call RemoveLocation(udg_location02)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func0512 takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)))then
call DisplayTimedTextToForce(CreatePlayerForce(GetTriggerPlayer()),15.,((GetPlayerName(Player(-1+(bj_forLoopAIndex)))+" is moving at ")+I2S(R2I(GetUnitMoveSpeed(udg_units01[bj_forLoopAIndex])))))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func0528 takes nothing returns nothing
call DisplayTimedTextToForce(CreatePlayerForce(GetTriggerPlayer()),15.,("|cff008000Experience gained: "+I2S((udg_integers04[(1+GetPlayerId(GetTriggerPlayer()))]-udg_integers34[(1+GetPlayerId(GetTriggerPlayer()))]))))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)and(GetPlayerController(Player(-1+(bj_forLoopAIndex)))==MAP_CONTROL_USER)))then
if(((udg_units01[bj_forLoopAIndex]==null)))then
call DisplayTimedTextToForce(CreatePlayerForce(GetTriggerPlayer()),15.,(GetPlayerName(Player(-1+(bj_forLoopAIndex)))+"|cff0000FF - MOS: Picking"))
else
if(((IsUnitAliveBJ(udg_units01[bj_forLoopAIndex]))))then
call DisplayTimedTextToForce(CreatePlayerForce(GetTriggerPlayer()),15.,((GetPlayerName(Player(-1+(bj_forLoopAIndex)))+" |cff0000FF- ")+(("MOS: "+GetUnitName(udg_units01[bj_forLoopAIndex]))+(" |cff008040at level "+I2S(GetUnitLevel(udg_units01[bj_forLoopAIndex]))))))
else
call DisplayTimedTextToForce(CreatePlayerForce(GetTriggerPlayer()),15.,((GetPlayerName(Player(-1+(bj_forLoopAIndex)))+" |cffC0C0C0- ")+(("MOS: "+GetUnitName(udg_units01[bj_forLoopAIndex]))+(" |cff008040at level "+I2S(GetUnitLevel(udg_units01[bj_forLoopAIndex]))))))
endif
endif
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func0529 takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),1,3)=="-v ")
endfunction
function Func0530 takes nothing returns nothing
call SetCameraFieldForPlayer(GetTriggerPlayer(),CAMERA_FIELD_TARGET_DISTANCE,(S2R(SubStringBJ(GetEventPlayerChatString(),4,StringLength(GetEventPlayerChatString())))*100.),.5)
endfunction
function Func0532 takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)and(GetPlayerController(Player(-1+(bj_forLoopAIndex)))==MAP_CONTROL_USER)))then
call DisplayTimedTextToForce(CreatePlayerForce(GetTriggerPlayer()),15.,((GetPlayerName(Player(-1+(bj_forLoopAIndex)))+" - ")+(("|cffFF0000Kills: "+I2S(udg_integers13[bj_forLoopAIndex]))+(" |r - |cff0000FFHits: "+I2S(udg_integers12[bj_forLoopAIndex])))))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func0533 takes nothing returns boolean
return(GetUnitTypeId(udg_units01[(1+GetPlayerId(GetTriggerPlayer()))])=='H008')and(GetEventPlayerChatString()!="-save")
endfunction
function Func0536 takes nothing returns nothing
local player p = GetTriggerPlayer()
local integer id = GetPlayerId(p)
if(((GetEventPlayerChatString()=="-s")))then
call DisplayTimedTextToPlayer(p,0,0,5.,("Shells per Fire Mission: "+I2S(udg_ShellsPerMission[id])))
call DisplayTimedTextToPlayer(p,0,0,5.,("Radius per Fire Mission: "+I2S(udg_MissionRadius[id])))
call DisplayTimedTextToPlayer(p,0,0,5.,("Shells remaining: "+I2S(udg_ShellsRemaining[id])))
endif
if(((S2I(SubStringBJ(GetEventPlayerChatString(),4,StringLength(GetEventPlayerChatString())))<=15)and(S2I(SubStringBJ(GetEventPlayerChatString(),4,StringLength(GetEventPlayerChatString())))>=1)))then
set udg_ShellsPerMission[id]=S2I(SubStringBJ(GetEventPlayerChatString(),4,StringLength(GetEventPlayerChatString())))
call DisplayTimedTextToPlayer(p,0,0,5.,("Shells per Fire Mission: "+I2S(udg_ShellsPerMission[id])))
else
call DisplayTimedTextToPlayer(p,0,0,5.,"Input \"-s \" then the desired number of shells (1 - 15)")
endif
endfunction
function Func0537 takes nothing returns boolean
return(GetUnitTypeId(udg_units01[(1+GetPlayerId(GetTriggerPlayer()))])=='H008')
endfunction
function Func0539 takes nothing returns nothing
local player p = GetTriggerPlayer()
local integer id = GetPlayerId(p)
if(((S2I(SubStringBJ(GetEventPlayerChatString(),4,StringLength(GetEventPlayerChatString())))<=1000)and(S2I(SubStringBJ(GetEventPlayerChatString(),4,StringLength(GetEventPlayerChatString())))>=150)))then
set udg_MissionRadius[id]=S2I(SubStringBJ(GetEventPlayerChatString(),4,StringLength(GetEventPlayerChatString())))
call DisplayTimedTextToPlayer(p,0,0,5.,("Radius per Fire Mission: "+I2S(udg_MissionRadius[id])))
else
call DisplayTimedTextToPlayer(p,0,0,5.,"Input \"-r \" then the desired radius (150 - 1000)")
endif
endfunction
function Func0540 takes nothing returns boolean
return(GetDyingUnit()==udg_units01[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))])
endfunction
function Func0546 takes nothing returns nothing
if(((IsPlayerAlly(GetOwningPlayer(GetDyingUnit()),GetEnumPlayer()))))then
if(((GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_PLAYING)))then
call SetPlayerAllianceStateBJ(GetEnumPlayer(),GetOwningPlayer(GetDyingUnit()),3)
else
if(((GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_LEFT)))then
call SetPlayerAllianceStateBJ(GetEnumPlayer(),GetOwningPlayer(GetDyingUnit()),4)
endif
endif
endif
endfunction
function Func0550 takes nothing returns nothing
if(((IsPlayerAlly(GetOwningPlayer(GetDyingUnit()),GetEnumPlayer()))))then
if(((GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_PLAYING)))then
call SetPlayerAllianceStateBJ(GetEnumPlayer(),GetOwningPlayer(GetDyingUnit()),2)
else
if(((GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_LEFT)))then
call SetPlayerAllianceStateBJ(GetEnumPlayer(),GetOwningPlayer(GetDyingUnit()),4)
endif
endif
endif
endfunction
function Func0552 takes nothing returns nothing
call Func0217(GetOwningPlayer(GetDyingUnit()),udg_sound21)
call AttachSoundToUnit(udg_sound21,GetDyingUnit())
call StartSound(udg_sound21)
call GroupRemoveUnit(udg_group17,GetDyingUnit())
call GroupRemoveUnit(udg_group01,GetDyingUnit())
if((true))then
endif
if(((udg_integer16!=5)))then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,(GetPlayerName(GetOwningPlayer(GetDyingUnit()))+" has been killed in action."))
call PlaySoundBJ(udg_sound88)
endif
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetDyingUnit())),15.,"You have died. You still gain XP while you are dead and are able to watch your team until they revive you or until the next respawn.")
call ForForce(Func0015(MAP_CONTROL_USER),function Func0546)
if(((udg_booleans09[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])))then
set udg_booleans09[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=false
call AddUnitAnimationPropertiesBJ(false,"defend",GetTriggerUnit())
call SetUnitMoveSpeed(GetTriggerUnit(),GetUnitDefaultMoveSpeed(GetTriggerUnit()))
call UnitRemoveAbility(GetTriggerUnit(),'A06A')
call UnitRemoveAbility(GetTriggerUnit(),'A06V')
call UnitRemoveAbility(GetTriggerUnit(),'A072')
call UnitRemoveAbility(GetTriggerUnit(),'A03I')
call UnitRemoveAbility(GetTriggerUnit(),'A03J')
call UnitRemoveAbility(GetTriggerUnit(),'A03K')
endif
if(((udg_integer16==5)))then
call UnitRemoveAbility(GetDyingUnit(),'A04H')
call UnitRemoveAbility(GetDyingUnit(),'A04I')
call UnitRemoveAbility(GetDyingUnit(),'A034')
call UnitRemoveAbility(GetDyingUnit(),'A042')
call ForceRemovePlayer(udg_force03,GetOwningPlayer(GetTriggerUnit()))
call ForceRemovePlayer(udg_force06,GetOwningPlayer(GetTriggerUnit()))
call ForceAddPlayer(udg_force07,GetOwningPlayer(GetTriggerUnit()))
call VXSleep(14.5)
call ForForce(Func0015(MAP_CONTROL_USER),function Func0550)
endif
endfunction
function Func0553 takes nothing returns boolean
local unit loc_unit01=GetDyingUnit()
if(not(GetDyingUnit()==udg_units01[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]))then
set loc_unit01=null
return false
endif
if GetUnitTypeId(GetDyingUnit())=='h00K'or GetUnitTypeId(GetDyingUnit())=='h01K'then
set loc_unit01=null
return false
endif
if(not(udg_integer16!=5))then
set loc_unit01=null
return false
endif
return true
endfunction
function Func0554 takes nothing returns nothing
local player loc_player01=Player(udg_integer31)
if IsPlayerAlly((loc_player01),GetEnumPlayer())then
if(GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_PLAYING)then
call SetPlayerAllianceStateBJ(GetEnumPlayer(),loc_player01,6)
call SetPlayerAllianceStateBJ(GetEnumPlayer(),loc_player01,2)
else
if GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_LEFT then
call SetPlayerAllianceStateBJ(GetEnumPlayer(),loc_player01,4)
endif
endif
endif
endfunction
function Func0555 takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit corpse
local unit visionDummy
local player p = GetOwningPlayer(u)
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local effect corpseIndicator
local effect healthOrb = null
call VXSleep(1.16)
if (GetUnitAbilityLevel(u, 'A0AP') > 0) then
set corpse = CreateCorpse(p, 'h016', x, y, GetUnitFacing(u))
else
set corpse = CreateCorpse(p, 'h01N', x, y, GetUnitFacing(u))
endif
call UnitSuspendDecay(corpse, true)
call SetUnitAnimation(corpse, "decay corpse")
call SetUnitBlendTime(corpse, 0)
call SetUnitTimeScalePercent(corpse, 0)
call GroupAddUnit(bj_suspendDecayFleshGroup, corpse)
call TimerStart(bj_delayedSuspendDecayTimer, 0.05, false, null)
set visionDummy = CreateUnit(p, 'h00S', x, y, 0)
if (GetUnitAbilityLevel(u, 'A0AR') > 0) then
set healthOrb = AddSpecialEffect(SFX_DEAD_HEALER, x, y)
endif
set corpseIndicator = AddSpecialEffect(SFX_INDICATOR_CORPSE[GetPlayerId(p)], x, y)
loop
exitwhen (GetWidgetLife(corpse) >= 0.405 or GetWidgetLife(u) >= 0.405)
call VXSleep(0.75)
endloop
call RemoveUnit(corpse)
call RemoveUnit(visionDummy)
call DestroyEffect(corpseIndicator)
if (healthOrb != null) then
call DestroyEffect(healthOrb)
set healthOrb = null
endif
if (GetWidgetLife(u) < 0.405) then
call ReviveHero(u, x, y, false)
set udg_integer31 = GetPlayerId(p)
call ForForce(Func0015(MAP_CONTROL_USER), function Func0554)
endif
set visionDummy = null
set corpseIndicator = null
endfunction
function Func0557 takes nothing returns boolean
return(GetPlayerController(GetOwningPlayer(GetKillingUnit()))==MAP_CONTROL_USER)and(IsPlayerAlly(GetOwningPlayer(GetKillingUnit()),GetOwningPlayer(GetDyingUnit())))and(((IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO))or(GetOwningPlayer(GetDyingUnit())==Player(11))or(GetOwningPlayer(GetDyingUnit())==Player(24))))
endfunction
function Func0560 takes nothing returns nothing
if(((GetOwningPlayer(GetKillingUnit())==GetOwningPlayer(GetDyingUnit()))and(udg_units01[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]==GetDyingUnit())))then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,(GetPlayerName(GetOwningPlayer(GetDyingUnit()))+" has killed himself."))
else
if(((GetPlayerController(GetOwningPlayer(GetDyingUnit()))==MAP_CONTROL_USER)and(udg_units01[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]==GetDyingUnit())))then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,(GetPlayerName(GetOwningPlayer(GetKillingUnit()))+(" has killed "+GetPlayerName(GetOwningPlayer(GetDyingUnit())))))
else
if (GetUnitTypeId(GetDyingUnit()) != 'o004') then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,(GetPlayerName(GetOwningPlayer(GetKillingUnit()))+(" has killed "+GetUnitName(GetDyingUnit()))))
endif
endif
endif
endfunction
function Func0561 takes nothing returns boolean
return udg_boolean01==false
endfunction
function Func0562 takes nothing returns nothing
local integer loc_integer01=GetPlayerId(GetEnumPlayer())
local sound loc_sound01=udg_sound68
if(GetWidgetLife(udg_units01[loc_integer01+1])<.405)and(GetPlayerSlotState(Player(loc_integer01))==PLAYER_SLOT_STATE_PLAYING)then
if(GetLocalPlayer()==Player(loc_integer01))then
call ResetToGameCamera(2.)
call StopSoundBJ(udg_sound67,false)
endif
if(udg_integers14[loc_integer01+1]=='h00K')and(IsUnitDeadBJ(udg_units01[loc_integer01+1]))then
call CreateNUnitsAtLoc(1,'h00K',Player(loc_integer01),GetRandomLocInRect(udg_rect26),0)
set udg_units01[loc_integer01+1]=bj_lastCreatedUnit
call PanCameraToTimedLocForPlayer(Player(loc_integer01),GetRandomLocInRect(udg_rect26),.0)
else
if(udg_integers14[loc_integer01+1]=='h01K')and(IsUnitDeadBJ(udg_units01[loc_integer01+1]))then
call CreateNUnitsAtLoc(1,'h01K',Player(loc_integer01),GetRandomLocInRect(udg_rect26),0)
set udg_units01[loc_integer01+1]=bj_lastCreatedUnit
call PanCameraToTimedLocForPlayer(Player(loc_integer01),GetRandomLocInRect(udg_rect26),.0)
else
call ReviveHeroLoc(udg_units01[loc_integer01+1],GetRandomLocInRect(udg_rect26),false)
call PanCameraToTimedLocForPlayer(Player(loc_integer01),GetRandomLocInRect(udg_rect26),.0)
endif
endif
call SetUserControlForceOn(CreatePlayerForce(Player(-1+(loc_integer01+1))))
call VolumeGroupSetVolumeBJ(SOUND_VOLUMEGROUP_UNITSOUNDS,60.)
call PlaySoundAtPointBJ(loc_sound01,100,udg_locations02[loc_integer01+1],0)
call RemoveLocation(udg_locations02[loc_integer01+1])
endif
set loc_sound01=null
endfunction
function Func0566 takes nothing returns nothing
call TriggerSleepAction(9.6)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func0562)
endfunction
function Func0568 takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((IsUnitAliveBJ(udg_units01[bj_forLoopAIndex]))))then
return
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(udg_trigger14)
call StopSoundBJ(udg_sound09,true)
call StopSoundBJ(udg_sound10,true)
call StopSoundBJ(udg_sound11,true)
call StopSoundBJ(udg_sound19,true)
call StopSoundBJ(udg_sound20,true)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"The platoon has been wiped out.")
set udg_boolean01=true
call PlaySoundBJ(udg_sound81)
call TriggerSleepAction(5.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"Please play again. If you are having trouble beating this mode, consider playing a lower difficulty or trying a different mode.")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"If you enjoy playing Undead Assault II, consider joining our community at: |cff408080https://discord.gg/ZF8vE2W")
endfunction
function Func0573 takes nothing returns nothing
call SetPlayerUnitAvailableBJ('H00C',true,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H000',true,GetEnumPlayer())
endfunction
function Func0575 takes nothing returns nothing
call CinematicFadeBJ(1,.0,"ReplaceableTextures\\CameraMasks\\Black_mask.blp",0,0,0,0)
call SetUserControlForceOff(bj_FORCE_ALL_PLAYERS)
call SetUserControlForceOn(CreatePlayerForce(Player(0)))
call DialogSetMessage(udg_dialog01,"Choose Difficulty")
call DialogAddButtonBJ(udg_dialog01,"Recruit")
set udg_button05=bj_lastCreatedButton
call DialogAddButtonBJ(udg_dialog01,"Normal")
set udg_button01=bj_lastCreatedButton
call DialogAddButtonBJ(udg_dialog01,"Hard")
set udg_button02=bj_lastCreatedButton
call DialogAddButtonBJ(udg_dialog01,"Insane")
set udg_button03=bj_lastCreatedButton
call DialogAddButtonBJ(udg_dialog01,"Umbrella")
set udg_button07=bj_lastCreatedButton
call DialogAddButtonBJ(udg_dialog01,"Survival")
set udg_button04=bj_lastCreatedButton
call DialogDisplayBJ(true,udg_dialog01,Player(0))
if(((((GetPlayerSlotState(Player(0))==PLAYER_SLOT_STATE_LEFT)or(GetPlayerSlotState(Player(0))==PLAYER_SLOT_STATE_EMPTY)))))then
call DialogDisplayBJ(false,udg_dialog01,Player(0))
call CinematicFadeBJ(0,3.,"ReplaceableTextures\\CameraMasks\\Black_mask.blp",0,0,0,0)
call SetUserControlForceOn(bj_FORCE_ALL_PLAYERS)
set udg_integer16=1
call ConditionalTriggerExecute(udg_trigger26)
set udg_boolean07=true
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,"The current difficulty is Normal.")
call ConditionalTriggerExecute(udg_trigger224)
call ConditionalTriggerExecute(udg_trigger168)
endif
call TriggerSleepAction(35.)
if(((udg_boolean07==false)))then
call DialogDisplayBJ(false,udg_dialog01,Player(0))
call CinematicFadeBJ(0,3.,"ReplaceableTextures\\CameraMasks\\Black_mask.blp",0,0,0,0)
call SetUserControlForceOn(bj_FORCE_ALL_PLAYERS)
set udg_integer16=1
set udg_boolean07=true
call EnableTrigger(udg_trigger40)
set udg_boolean25=false
call ForForce(bj_FORCE_ALL_PLAYERS,function Func0573)
call CreateQuestBJ(0,"Difficulty: Normal","Normal mode offers average enemy statistics and experience rewards.","ReplaceableTextures\\CommandButtons\\BTNOrb.blp")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,"Red has taken too long to choose a difficulty, so it has been set to Normal by default.")
call ConditionalTriggerExecute(udg_trigger26)
call ConditionalTriggerExecute(udg_trigger224)
call ConditionalTriggerExecute(udg_trigger168)
call ConditionalTriggerExecute(udg_trigger11)
endif
endfunction
function Func0576 takes nothing returns nothing
call SelectUnitForPlayerSingle(udg_unit18,GetEnumPlayer())
endfunction
function Func0581 takes nothing returns nothing
call SetPlayerHandicapXPBJ(GetEnumPlayer(),58.)
endfunction
function Func0583 takes nothing returns nothing
if(((GetUnitTypeId(GetEnumUnit())=='h006')))then
call SetUnitOwner(GetEnumUnit(),Player(11),true)
endif
endfunction
function Func0585 takes nothing returns nothing
call SetPlayerAbilityAvailableBJ(false,'a06B',GetEnumPlayer())
endfunction
function Func0587 takes nothing returns nothing
//call SetPlayerAbilityAvailableBJ(false,'A086',GetEnumPlayer())
endfunction
function Func0589 takes nothing returns nothing
call SetPlayerUnitAvailableBJ('H011',false,GetEnumPlayer())
call SetPlayerHandicapXPBJ(GetEnumPlayer(),60.)
call SetPlayerAbilityAvailableBJ(true,'a06B',GetEnumPlayer())
endfunction
function Func0590 takes nothing returns nothing
call SetPlayerUnitAvailableBJ('H00C',true,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H000',true,GetEnumPlayer())
endfunction
function Func0592 takes nothing returns nothing
call SetPlayerUnitAvailableBJ('H00C',true,GetEnumPlayer())
call SetPlayerUnitAvailableBJ('H000',true,GetEnumPlayer())
endfunction
function Func0594 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func0595 takes nothing returns nothing
call SetPlayerAbilityAvailableBJ(false,'A086',GetEnumPlayer())
endfunction
function UAActionDifficulty takes nothing returns nothing
local integer i = 0
call DisableTrigger(GetTriggeringTrigger())
call TriggerExecute(gg_trg_AutoLoad)
call CinematicFadeBJ(0,3.,"ReplaceableTextures\\CameraMasks\\Black_mask.blp",0,0,0,0)
call SetUserControlForceOn(bj_FORCE_ALL_PLAYERS)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func0576)
set udg_boolean07=true
if(((GetClickedButton()==udg_button05)))then
set udg_integer16=0
set udg_real04=.65
set udg_integer38=8
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,"The current difficulty is Recruit.")
call ConditionalTriggerExecute(udg_trigger224)
set udg_integer25=R2I((I2R(udg_integer25)*.8))
set udg_string02="Recruit"
call CreateQuestBJ(0,udg_string02,"Recruit mode is shorter, easier and grants 65% of the normal experience reward. Only Riflemen and Navy Corpsmen are available in Recruit mode.","ReplaceableTextures\\CommandButtons\\BTNOrb.blp")
set udg_quest02=bj_lastCreatedQuest
endif
if(((GetClickedButton()==udg_button01)))then
set udg_integer16=1
set udg_integer38=6
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,"The current difficulty is Normal.")
call ConditionalTriggerExecute(udg_trigger224)
set udg_string02="Normal"
call CreateQuestBJ(0,udg_string02,"Normal mode offers average enemy statistics and experience gain.","ReplaceableTextures\\CommandButtons\\BTNOrb.blp")
set udg_quest02=bj_lastCreatedQuest
endif
if(((GetClickedButton()==udg_button02)))then
set udg_integer16=2
set udg_real04=1.75
set udg_integer38=4
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,"The current difficulty is Hard.")
call ConditionalTriggerExecute(udg_trigger224)
set udg_integer25=R2I((I2R(udg_integer25)*1.05))
call SetPlayerTechResearchedSwap('R008',8,Player(27))
//
call SetPlayerTechResearchedSwap('R008',8,Player(12))
call SetPlayerTechResearchedSwap('R008',8,Player(13))
call SetPlayerTechResearchedSwap('R008',8,Player(14))
call SetPlayerTechResearchedSwap('R008',8,Player(15))
call SetPlayerTechResearchedSwap('R008',8,Player(16))
call SetPlayerTechResearchedSwap('R008',8,Player(17))
call SetPlayerTechResearchedSwap('R008',8,Player(18))
call SetPlayerTechResearchedSwap('R008',8,Player(19))
call SetPlayerTechResearchedSwap('R008',8,Player(20))
call SetPlayerTechResearchedSwap('R008',8,Player(21))
call SetPlayerTechResearchedSwap('R008',8,Player(22))
call SetPlayerTechResearchedSwap('R008',8,Player(23))
//
set udg_string02="Hard"
call CreateQuestBJ(0,udg_string02,"Hard mode offers boosted enemy statistics and grants 1.75 times the normal experience gain.","ReplaceableTextures\\CommandButtons\\BTNOrb.blp")
set udg_quest02=bj_lastCreatedQuest
endif
if(((GetClickedButton()==udg_button03)))then
set udg_integer16=3
set udg_real04=2.5
set udg_integer38=3
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,"The current difficulty is Insane.")
call ConditionalTriggerExecute(udg_trigger224)
set udg_integer25=R2I((I2R(udg_integer25)*1.1))
call SetPlayerTechResearchedSwap('R008',18,Player(27))
//
call SetPlayerTechResearchedSwap('R008',18,Player(12))
call SetPlayerTechResearchedSwap('R008',18,Player(13))
call SetPlayerTechResearchedSwap('R008',18,Player(14))
call SetPlayerTechResearchedSwap('R008',18,Player(15))
call SetPlayerTechResearchedSwap('R008',18,Player(16))
call SetPlayerTechResearchedSwap('R008',18,Player(17))
call SetPlayerTechResearchedSwap('R008',18,Player(18))
call SetPlayerTechResearchedSwap('R008',18,Player(19))
call SetPlayerTechResearchedSwap('R008',18,Player(20))
call SetPlayerTechResearchedSwap('R008',18,Player(21))
call SetPlayerTechResearchedSwap('R008',18,Player(22))
call SetPlayerTechResearchedSwap('R008',18,Player(23))
//
set udg_string02="Insane"
call CreateQuestBJ(0,udg_string02,"Insane mode offers greatly boosted enemy statistics and grants 2.5 times the normal experience gain.","ReplaceableTextures\\CommandButtons\\BTNOrb.blp")
set udg_quest02=bj_lastCreatedQuest
endif
if(((GetClickedButton()==udg_button07)))then
set udg_integer16=6
set udg_integer38=9
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,"The current mode is Umbrella.")
call TriggerExecute(udg_trigger314)
call SetPlayerTechResearchedSwap('R008',4,Player(27))
//
call SetPlayerTechResearchedSwap('R008',4,Player(12))
call SetPlayerTechResearchedSwap('R008',4,Player(13))
call SetPlayerTechResearchedSwap('R008',4,Player(14))
call SetPlayerTechResearchedSwap('R008',4,Player(15))
call SetPlayerTechResearchedSwap('R008',4,Player(16))
call SetPlayerTechResearchedSwap('R008',4,Player(17))
call SetPlayerTechResearchedSwap('R008',4,Player(18))
call SetPlayerTechResearchedSwap('R008',4,Player(19))
call SetPlayerTechResearchedSwap('R008',4,Player(20))
call SetPlayerTechResearchedSwap('R008',4,Player(21))
call SetPlayerTechResearchedSwap('R008',4,Player(22))
call SetPlayerTechResearchedSwap('R008',4,Player(23))
//
set udg_string02="Umbrella"
call CreateQuestBJ(0,udg_string02,"Umbrella mode primarily involves combatting Umbrella insurgents while zombie activity is minimal. Umbrella mode offers high experience gain with arguably the most difficult gameplay.","ReplaceableTextures\\CommandButtons\\BTNOrb.blp")
set udg_quest02=bj_lastCreatedQuest
set udg_real04=1.0
loop
set udg_ShellsRemaining[i] = 150
set i = i + 1
exitwhen (i == bj_MAX_PLAYERS)
endloop
call ForForce(Func0015(MAP_CONTROL_USER),function Func0581)
set udg_group23=Func0006(bj_mapInitialPlayableArea)
call ForGroupBJ(udg_group23,function Func0583)
call DestroyGroup(udg_group23)
call TriggerExecute(gg_trg_RemoveBarricades)
endif
if(((GetClickedButton()==udg_button04)))then
set udg_integer16=4
set udg_integer38=5
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,"The current mode is Survival.")
call ConditionalTriggerExecute(udg_trigger302)
call SetPlayerTechResearchedSwap('R008',8,Player(27))
//
call SetPlayerTechResearchedSwap('R008',8,Player(12))
call SetPlayerTechResearchedSwap('R008',8,Player(13))
call SetPlayerTechResearchedSwap('R008',8,Player(14))
call SetPlayerTechResearchedSwap('R008',8,Player(15))
call SetPlayerTechResearchedSwap('R008',8,Player(16))
call SetPlayerTechResearchedSwap('R008',8,Player(17))
call SetPlayerTechResearchedSwap('R008',8,Player(18))
call SetPlayerTechResearchedSwap('R008',8,Player(19))
call SetPlayerTechResearchedSwap('R008',8,Player(20))
call SetPlayerTechResearchedSwap('R008',8,Player(21))
call SetPlayerTechResearchedSwap('R008',8,Player(22))
call SetPlayerTechResearchedSwap('R008',8,Player(23))
//
set udg_string02="Survival"
call CreateQuestBJ(0,udg_string02,"Survival mode offers boosted enemy statistics with above average experience gain. In survival mode, you do not lose experience for failing missions and gain less for completing them. The goal, as the name of the mode suggests, is to survive for 60 minutes. If you die in Survival mode, you still gain experience but cannot be revived.","ReplaceableTextures\\CommandButtons\\BTNOrb.blp")
set udg_quest02=bj_lastCreatedQuest
call ForForce(bj_FORCE_ALL_PLAYERS,function Func0587)
endif
if(((udg_integer16!=0)))then
set udg_boolean25=true
call DisplayTimedTextToForce(CreatePlayerForce(Player(0)),12.,"|cffffcc00You have 12 seconds to choose extra modes. To do this, type \"-\" followed by the mode name. Extra modes are: |r rifle || outbreak || nightmare || aironly. |cffffcc00Umbrella has a|r hard |cffffcc00mode.")
call VXSleep(12.)
call EnableTrigger(udg_trigger40)
set udg_boolean25=false
call DisplayTimedTextToForce(CreatePlayerForce(Player(0)),8.,"|cffffcc00You can no longer enable extra modes.")
call ForForce(bj_FORCE_ALL_PLAYERS,function Func0592)
else
set udg_boolean25=false
set udg_boolean26=true
call ForForce(bj_FORCE_ALL_PLAYERS,function Func0589)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func0590)
endif
call ConditionalTriggerExecute(udg_trigger13)
call ConditionalTriggerExecute(udg_trigger168)
call ConditionalTriggerExecute(udg_trigger11)
call ConditionalTriggerExecute(udg_trigger26)
endfunction
function Func0602 takes nothing returns nothing
local unit loc_unit01=GetTriggerUnit()
local unit loc_unit02=GetEventDamageSource()
local sound loc_sound01=udg_sound114
local integer loc_integer01=1
local integer loc_integer02=(1+GetPlayerId(GetOwningPlayer(loc_unit01)))
local integer loc_integer03=GetUnitTypeId(loc_unit02)
if(loc_unit01==udg_units01[loc_integer02])then
if GetEventDamage()>10 then
set udg_integers12[loc_integer02]=udg_integers12[loc_integer02]+1
endif
endif
if(GetRandomInt(1,udg_integer38)==1 and IsUnitEnemy(loc_unit02,Player(loc_integer02-1))and GetEventDamage()>10)and(GetUnitTypeId(loc_unit01)!='H00P')and(GetUnitAbilityLevel(loc_unit01,'B018')<=0)then
loop
exitwhen loc_integer01>7
if GetRandomInt(1,udg_integers28[loc_integer01])==1 then
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
set loc_unit02=CreateUnit(Player(25),'h003',GetUnitX(loc_unit01),GetUnitY(loc_unit01),.0)
call UnitAddAbility(loc_unit02,udg_integers29[loc_integer01])
call IssueTargetOrder(loc_unit02,udg_strings07[loc_integer01],loc_unit01)
call UnitApplyTimedLife(loc_unit02,'Bhwd',5.)
exitwhen 1==1
endif
set loc_integer01=loc_integer01+1
endloop
endif
set loc_unit02=null
set loc_unit01=null
set loc_sound01=null
endfunction
function Func0607 takes nothing returns nothing
call SetPlayerTechResearchedSwap('R00H',(GetUnitAbilityLevelSwapped('A01C',GetEnumUnit())+GetUnitAbilityLevelSwapped('A01D',GetEnumUnit())),GetOwningPlayer(GetEnumUnit()))
endfunction
function Func0608 takes nothing returns nothing
set udg_group23=UAUnitGroupWithTypeId('H00C')
call ForGroupBJ(udg_group23,function Func0607)
call DestroyGroup(udg_group23)
endfunction
function Func0640 takes nothing returns boolean
return(GetSpellAbilityId()=='A03H')
endfunction
function Func0642 takes nothing returns nothing
local unit loc_unit01
if(((CountUnitsInGroup(Func0013(GetOwningPlayer(GetTriggerUnit()),'h01O'))>=2)))then
call KillUnit(GroupPickRandomUnit(Func0013(GetOwningPlayer(GetTriggerUnit()),'h01O')))
endif
call CreateNUnitsAtLoc(1,'h01O',GetOwningPlayer(GetTriggerUnit()),GetSpellTargetLoc(),bj_UNIT_FACING)
call SetUnitAnimation(bj_lastCreatedUnit,"birth")
set loc_unit01=bj_lastCreatedUnit
call VXSleep(.67)
call ResetUnitAnimation(loc_unit01)
set loc_unit01=null
endfunction
function Func0651 takes nothing returns boolean
return GetSpellAbilityId()=='A03A'or GetSpellAbilityId()=='A070'
endfunction
function Func0652 takes nothing returns nothing
local integer loc_integer01=0
local unit loc_unit01=GetTriggerUnit()
local integer loc_integer02=GetUnitAbilityLevelSwapped('A03A',loc_unit01)
local location loc_location01
local location loc_location02=GetSpellTargetLoc()
local location loc_location03
call Func0250(loc_location02)
call VXSleep(.4)
call CreateNUnitsAtLoc(1,'h00S',GetOwningPlayer(loc_unit01),loc_location02,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(4.,'BTLF',bj_lastCreatedUnit)
call Func0221(loc_location02,800)
loop
exitwhen loc_integer01>=1+loc_integer02
call VXSleep(GetRandomReal(.0,.08))
set loc_location01=OffsetLocation(loc_location02,GetRandomInt(-160,160),GetRandomInt(-160,160))
call PlaySoundBJ(udg_sounds01[GetRandomInt(1,7)])
call DestroyEffect(AddSpecialEffectLoc("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",loc_location01))
call UnitDamagePointLoc(loc_unit01,0,300.+(20.*I2R(loc_integer02)),loc_location02,400.+(300.*I2R(loc_integer02))/(1.+I2R(loc_integer02)),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
call Func0238(300.+(20.*I2R(loc_integer02)),loc_location01)
set loc_location03=OffsetLocation(loc_location01,GetRandomInt(-120,120),GetRandomInt(-120,120))
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Weapons\\SteamTank\\SteamTankImpact.mdl",loc_location03))
call RemoveLocation(loc_location03)
set loc_location03=OffsetLocation(loc_location01,GetRandomInt(-120,120),GetRandomInt(-120,120))
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Weapons\\SteamTank\\SteamTankImpact.mdl",loc_location03))
call RemoveLocation(loc_location03)
set loc_location03=OffsetLocation(loc_location01,GetRandomInt(-120,120),GetRandomInt(-120,120))
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Weapons\\SteamTank\\SteamTankImpact.mdl",loc_location03))
call RemoveLocation(loc_location03)
set loc_integer01=loc_integer01+1
call RemoveLocation(loc_location01)
endloop
set loc_unit01=null
set loc_location01=null
call RemoveLocation(loc_location02)
set loc_location02=null
set loc_location03=null
endfunction
function Func0655 takes nothing returns boolean
return GetSpellAbilityId()=='A02X'
endfunction
function Func0656 takes nothing returns nothing
local location loc_location01=GetUnitLoc(GetEnumUnit())
call DestroyEffect(AddSpecialEffectLoc("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",loc_location01))
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",loc_location01))
call PlaySoundBJ(udg_sounds01[GetRandomInt(1,7)])
call Func0238(350.,loc_location01)
call UnitDamagePointLoc(GetEnumUnit(),0,350.,loc_location01,1200.,ATTACK_TYPE_SIEGE,DAMAGE_TYPE_NORMAL)
call UnitAddAbility(GetEnumUnit(),'A081')
call KillUnit(GetEnumUnit())
call RemoveLocation(loc_location01)
set loc_location01=null
endfunction
function Func0657 takes nothing returns nothing
call ForGroupBJ(udg_group05,function Func0656)
endfunction
function Func0666 takes nothing returns boolean
return GetSpellAbilityId()=='A03P'
endfunction
function Func0667 takes timer loc_timer01 returns nothing
local real loc_real01
local real loc_real02
local real loc_real03=Cache8GetReal(loc_timer01,"x1")
local real loc_real04=Cache8GetReal(loc_timer01,"y1")
local unit loc_unit01=Cache8GetUnitHandle(loc_timer01,StringHash("u"))
local location loc_location01=Location(Cache8GetReal(loc_timer01,"Func1540"),Cache8GetReal(loc_timer01,"Func1586"))
local integer loc_integer01=Cache8GetInteger(loc_timer01,"i2")
local integer loc_integer02=Cache8GetInteger(loc_timer01,"i3")
if loc_timer01==null then
call BJDebugMsg("Fire Leap timer in hell")
elseif loc_integer01>loc_integer02 then
call Cache8FlushChild(loc_timer01)
call DestroyTimer(loc_timer01)
call SetUnitPathing(loc_unit01,true)
call SetUnitFlyHeight(loc_unit01,.0,900)
call PauseUnit(loc_unit01,false)
if IsUnitAliveBJ(loc_unit01)then
call ResetUnitAnimation(loc_unit01)
else
call SetUnitAnimation(loc_unit01,"death")
endif
else
set loc_real01=GetLocationX(GetUnitLoc(loc_unit01))-9.*Cos(AngleBetweenPoints(loc_location01,GetUnitLoc(loc_unit01))*bj_DEGTORAD)
set loc_real02=GetLocationY(GetUnitLoc(loc_unit01))-9.*Sin(AngleBetweenPoints(loc_location01,GetUnitLoc(loc_unit01))*bj_DEGTORAD)
call SetUnitPositionLoc(loc_unit01,Location(loc_real01,loc_real02))
set loc_integer01=loc_integer01+1
call Cache8StoreInteger(loc_timer01,"i2",loc_integer01)
if loc_integer01<loc_integer02/2 then
call SetUnitFlyHeight(loc_unit01,(loc_integer01*8),999)
else
call SetUnitFlyHeight(loc_unit01,(loc_integer02*8)-(loc_integer01*8),999)
endif
call SetUnitAnimation(loc_unit01,"stand alternate")
endif
set loc_unit01=null
set loc_location01=null
endfunction
function Func0668 takes nothing returns nothing
call Func0667(GetExpiredTimer())
endfunction
function ActionLeap takes nothing returns nothing
local unit loc_unit01=GetSpellAbilityUnit()
local location loc_location01=GetSpellTargetLoc()
local integer loc_integer01=1
local integer loc_integer02
local integer loc_integer03=GetTerrainCliffLevel(GetLocationX(GetUnitLoc(loc_unit01)),GetLocationY(GetUnitLoc(loc_unit01)))
local integer loc_integer04=GetTerrainCliffLevel(GetLocationX(loc_location01),GetLocationY(loc_location01))
local timer t=CreateTimer()
local real loc_real01=GetUnitX(loc_unit01)
local real loc_real02=GetUnitY(loc_unit01)
local location temploc=GetUnitLoc(loc_unit01)
if(DistanceBetweenPoints(loc_location01,temploc)>=175)and(RectContainsLoc(bj_mapInitialPlayableArea,loc_location01))and(udg_boolean08==false)then
set loc_integer02=R2I(DistanceBetweenPoints(loc_location01,temploc)/9.)
call UnitAddAbility(loc_unit01,'Amrf')
call UnitRemoveAbility(loc_unit01,'Amrf')
call PauseUnit(loc_unit01,true)
call SetUnitAnimation(loc_unit01,"stand alternate")
call SetUnitPathing(loc_unit01,false)
call Cache8StoreUnitHandle(t,StringHash("u"),loc_unit01)
call Cache8StoreReal(t,"Func1540",GetLocationX(loc_location01))
call Cache8StoreReal(t,"Func1586",GetLocationY(loc_location01))
call Cache8StoreReal(t,"x1",loc_real01)
call Cache8StoreReal(t,"y1",loc_real02)
call Cache8StoreInteger(t,"i2",loc_integer01)
call Cache8StoreInteger(t,"i3",loc_integer02)
call TimerStart(t,.02,true,function Func0668)
else
call IssueImmediateOrderById(loc_unit01,851972)
if(udg_boolean08)then
call Func0216(GetOwningPlayer(loc_unit01),"Cannot leap.")
else
call Func0216(GetOwningPlayer(loc_unit01),"Cannot use leap there.")
endif
call ResetUnitAnimation(loc_unit01)
endif
call RemoveLocation(loc_location01)
set loc_location01=null
set loc_unit01=null
call RemoveLocation(temploc)
set temploc=null
endfunction
function Func0694 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func0696 takes nothing returns boolean
return GetSpellAbilityId()=='A059'
endfunction
function Func0697 takes nothing returns nothing
local unit loc_unit01=GetTriggerUnit()
call Func0230(GetOwningPlayer(loc_unit01),true)
call VXSleep(15.)
call Func0230(GetOwningPlayer(loc_unit01),false)
set loc_unit01=null
endfunction
function Func0704 takes nothing returns boolean
return(GetSpellAbilityId()=='A050')and udg_booleans09[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]==false
endfunction
function Func0705 takes timer loc_timer01 returns nothing
local real loc_real01
local real loc_real02
local real loc_real03=Cache8GetReal(loc_timer01,"x1")
local real loc_real04=Cache8GetReal(loc_timer01,"y1")
local unit loc_unit01=Cache8GetUnitHandle(loc_timer01,StringHash("u"))
local sound loc_sound02=udg_sound114
local location loc_location01=Location(Cache8GetReal(loc_timer01,"Func1540"),Cache8GetReal(loc_timer01,"Func1586"))
local integer loc_integer01=Cache8GetInteger(loc_timer01,"i2")
local integer loc_integer02=Cache8GetInteger(loc_timer01,"i3")
local integer loc_integer03=Cache8GetInteger(loc_timer01,"i6")
local sound loc_sound01=Cache8GetSoundHandle(loc_timer01,StringHash("s"))
local location temploc=GetUnitLoc(loc_unit01)
if loc_timer01==null then
call BJDebugMsg("Jump timer in hell")
elseif loc_integer01>loc_integer02 then
call Cache8FlushChild(loc_timer01)
call PauseTimer(loc_timer01)
call DestroyTimer(loc_timer01)
call SetUnitPathing(loc_unit01,true)
call SetUnitFlyHeight(loc_unit01,.0,900)
call StopSound(loc_sound01,false,true)
if(loc_integer03>=2)then
call SetUnitAnimation(loc_unit01,"Death")
call CreateNUnitsAtLoc(1,'h003',Player(24),temploc,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(3.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A051')
call IssueTargetOrderById(bj_lastCreatedUnit,852075,loc_unit01)
call SetWidgetLife(loc_unit01,(GetUnitStateSwap(UNIT_STATE_LIFE,loc_unit01)-(80.*loc_integer03)))
call PlaySoundAtUnitLoc(loc_sound02,loc_unit01)
endif
if RectContainsUnit(udg_rect119,loc_unit01)then
call Func0240(loc_unit01,5.,GetPlayerName(GetOwningPlayer(loc_unit01))+": Gross...")
endif
else
set loc_real01=GetLocationX(GetUnitLoc(loc_unit01))-25.*Cos(AngleBetweenPoints(loc_location01,temploc)*bj_DEGTORAD)
set loc_real02=GetLocationY(GetUnitLoc(loc_unit01))-25.*Sin(AngleBetweenPoints(loc_location01,temploc)*bj_DEGTORAD)
call RemoveLocation(temploc)
set temploc=Location(loc_real01,loc_real02)
call SetUnitPositionLoc(loc_unit01,temploc)
set loc_integer01=loc_integer01+1
call Cache8StoreInteger(loc_timer01,"i2",loc_integer01)
if loc_integer01<loc_integer02/2 then
call SetUnitFlyHeight(loc_unit01,(loc_integer01*9),999)
else
call SetUnitFlyHeight(loc_unit01,(loc_integer02*9)-(loc_integer01*9),999)
endif
endif
set loc_unit01=null
call RemoveLocation(loc_location01)
set loc_location01=null
call RemoveLocation(temploc)
set temploc=null
set loc_sound01=null
set loc_sound02=null
endfunction
function Func0706 takes nothing returns nothing
call Func0705(GetExpiredTimer())
endfunction
function ActionJump takes nothing returns nothing
local unit loc_unit01=GetSpellAbilityUnit()
local location loc_location01=GetSpellTargetLoc()
local location loc_location02=GetUnitLoc(loc_unit01)
local real loc_real01=GetUnitX(loc_unit01)
local real loc_real02=GetUnitY(loc_unit01)
local integer loc_integer01=1
local integer loc_integer02
local integer loc_integer03=GetTerrainCliffLevel(GetLocationX(loc_location02),GetLocationY(loc_location02))
local integer loc_integer04=GetTerrainCliffLevel(GetLocationX(loc_location01),GetLocationY(loc_location01))
local integer loc_integer05=(GetTerrainCliffLevel(loc_real01,loc_real02))-(GetTerrainCliffLevel(GetLocationX(loc_location01),GetLocationY(loc_location01)))
local timer t=CreateTimer()
local sound loc_sound01=udg_sound63
if DistanceBetweenPoints(loc_location01,loc_location02)>350 or(GetUnitTypeId(loc_unit01)=='H00P'and DistanceBetweenPoints(loc_location01,loc_location02)>475)then
if GetUnitTypeId(loc_unit01)=='H00P'then
set loc_location01=Func0002(loc_location02,475,AngleBetweenPoints(loc_location02,loc_location01))
else
set loc_location01=Func0002(loc_location02,350,AngleBetweenPoints(loc_location02,loc_location01))
endif
endif
if(DistanceBetweenPoints(loc_location01,loc_location02)>=50)and IsTerrainPathableBJ(loc_location01,PATHING_TYPE_WALKABILITY)==false and((GetTerrainCliffLevel(loc_real01,loc_real02))>=(GetTerrainCliffLevel(GetLocationX(loc_location01),GetLocationY(loc_location01))))and(RectContainsLoc(bj_mapInitialPlayableArea,loc_location01))and(RectContainsLoc(udg_rect134,loc_location01)==false)and(RectContainsLoc(udg_rect135,loc_location01)==false)and(RectContainsLoc(udg_rect136,loc_location01)==false)and(RectContainsLoc(udg_rect137,loc_location01)==false)and(RectContainsLoc(udg_rect138,loc_location01)==false)then
set loc_integer02=R2I(DistanceBetweenPoints(loc_location01,loc_location02)/25.)
call VXSleep(.15)
call UnitAddAbility(loc_unit01,'Amrf')
call UnitRemoveAbility(loc_unit01,'Amrf')
call AttachSoundToUnit(loc_sound01,loc_unit01)
call SetSoundVolume(loc_sound01,127)
call StartSound(loc_sound01)
call SetUnitPathing(loc_unit01,false)
call Cache8StoreUnitHandle(t,StringHash("u"),loc_unit01)
call Cache8StoreReal(t,"Func1540",GetLocationX(loc_location01))
call Cache8StoreReal(t,"Func1586",GetLocationY(loc_location01))
call Cache8StoreReal(t,"x1",loc_real01)
call Cache8StoreReal(t,"y1",loc_real02)
call Cache8StoreInteger(t,"i2",loc_integer01)
call Cache8StoreInteger(t,"i3",loc_integer02)
call Cache8StoreInteger(t,"i6",loc_integer05)
call Cache8StoreSoundHandle(t,StringHash("s"),loc_sound01)
call TimerStart(t,.03,true,function Func0706)
call BlzUnitDisableAbility(loc_unit01,'A050',true,false)
call VXSleep(3.)
call BlzUnitDisableAbility(loc_unit01,'A050',false,false)
else
call IssueImmediateOrderById(loc_unit01,851993)
call Func0216(GetOwningPlayer(loc_unit01),"Cannot jump there.")
call ResetUnitAnimation(loc_unit01)
endif
call RemoveLocation(loc_location01)
set loc_location01=null
set loc_unit01=null
call RemoveLocation(loc_location02)
set loc_location02=null
endfunction
function Func0709 takes nothing returns nothing
call UnitShareVision(udg_unit06,GetEnumPlayer(),true)
endfunction
function Func0710 takes nothing returns nothing
call UnitShareVision(udg_unit06,GetEnumPlayer(),false)
endfunction
function Func0712 takes nothing returns boolean
return GetSpellAbilityId()=='A04O'and GetUnitTypeId(GetTriggerUnit())!='h00K'and GetUnitTypeId(GetTriggerUnit())!='h01K'and GetUnitTypeId(GetTriggerUnit())!='h004'
endfunction
function Func0713 takes timer loc_timer01 returns nothing
local real loc_real01
local real loc_real02
local real loc_real03=Cache8GetReal(loc_timer01,"x1")
local real loc_real04=Cache8GetReal(loc_timer01,"y1")
local unit loc_unit01=Cache8GetUnitHandle(loc_timer01,StringHash("u"))
local location loc_location01=Location(Cache8GetReal(loc_timer01,"Func1540"),Cache8GetReal(loc_timer01,"Func1586"))
local location temploc=GetUnitLoc(loc_unit01)
local integer loc_integer01=Cache8GetInteger(loc_timer01,"i2")
local integer loc_integer02=Cache8GetInteger(loc_timer01,"i3")
local integer loc_integer03=Cache8GetInteger(loc_timer01,"i6")
local sound loc_sound01=Cache8GetSoundHandle(loc_timer01,StringHash("s"))
if loc_timer01==null then
call BJDebugMsg("Lift timer in hell")
elseif loc_integer01>loc_integer02 then
call Cache8FlushChild(loc_timer01)
call DestroyTimer(loc_timer01)
call SetUnitPathing(loc_unit01,true)
call SetUnitFlyHeight(loc_unit01,.0,900)
if udg_boolean01==false then
call PauseUnit(loc_unit01,false)
endif
call StopSound(loc_sound01,false,true)
call UnitRemoveAbility(loc_unit01,'A04P')
call UnitRemoveAbility(loc_unit01,'A04Q')
else
set loc_real01=GetLocationX(temploc)-7.*Cos(AngleBetweenPoints(loc_location01,temploc)*bj_DEGTORAD)
set loc_real02=GetLocationY(temploc)-7.*Sin(AngleBetweenPoints(loc_location01,temploc)*bj_DEGTORAD)
call RemoveLocation(temploc)
set temploc=Location(loc_real01,loc_real02)
call SetUnitPositionLoc(loc_unit01,temploc)
set loc_integer01=loc_integer01+1
set loc_integer03=loc_integer03+1
call Cache8StoreInteger(loc_timer01,"i2",loc_integer01)
if loc_integer01<loc_integer02/2 then
call SetUnitFlyHeight(loc_unit01,(loc_integer01*3),999)
if(loc_integer03>loc_integer02)then
set loc_integer03=0
call UnitRemoveAbility(loc_unit01,'A04Q')
call UnitAddAbility(loc_unit01,'A04P')
endif
else
call SetUnitFlyHeight(loc_unit01,(loc_integer02*3)-(loc_integer01*3),999)
endif
endif
set loc_unit01=null
call RemoveLocation(loc_location01)
set loc_location01=null
call RemoveLocation(temploc)
set temploc=null
endfunction
function Func0714 takes nothing returns nothing
call Func0713(GetExpiredTimer())
endfunction
function Func0715 takes nothing returns nothing
local unit loc_unit01=GetSpellAbilityUnit()
local location loc_location01=GetSpellTargetLoc()
local location temploc=GetUnitLoc(loc_unit01)
local integer loc_integer01=1
local integer loc_integer02
local integer loc_integer03=GetTerrainCliffLevel(GetLocationX(temploc),GetLocationY(temploc))
local integer loc_integer04=GetTerrainCliffLevel(GetLocationX(loc_location01),GetLocationY(loc_location01))
local integer loc_integer05=1
local timer t=CreateTimer()
local real loc_real01=GetUnitX(loc_unit01)
local real loc_real02=GetUnitY(loc_unit01)
local sound loc_sound01=udg_sound69
if(DistanceBetweenPoints(loc_location01,temploc)>=175)and(RectContainsLoc(bj_mapInitialPlayableArea,loc_location01))and(GetUnitTypeId(loc_unit01)!='h00K')and(GetUnitTypeId(loc_unit01)!='h01K')and IsTerrainPathableBJ(loc_location01,PATHING_TYPE_WALKABILITY)==false then
set loc_integer02=R2I(DistanceBetweenPoints(loc_location01,temploc)/7.)
call UnitAddAbility(loc_unit01,'Amrf')
call UnitRemoveAbility(loc_unit01,'Amrf')
call UnitAddAbility(loc_unit01,'A04Q')
call AttachSoundToUnit(loc_sound01,loc_unit01)
call SetSoundVolume(loc_sound01,127)
call StartSound(loc_sound01)
call PauseUnit(loc_unit01,true)
call SetUnitPathing(loc_unit01,false)
call Cache8StoreUnitHandle(t,StringHash("u"),loc_unit01)
call Cache8StoreReal(t,"Func1540",GetLocationX(loc_location01))
call Cache8StoreReal(t,"Func1586",GetLocationY(loc_location01))
call Cache8StoreReal(t,"x1",loc_real01)
call Cache8StoreReal(t,"y1",loc_real02)
call Cache8StoreInteger(t,"i2",loc_integer01)
call Cache8StoreInteger(t,"i3",loc_integer02)
call Cache8StoreInteger(t,"i6",loc_integer05)
call Cache8StoreSoundHandle(t,StringHash("s"),loc_sound01)
call TimerStart(t,.02,true,function Func0714)
else
call IssueImmediateOrderById(loc_unit01,851993)
if(GetUnitTypeId(loc_unit01)=='h00K')or (GetUnitTypeId(loc_unit01)=='h01K')then
call Func0216(GetOwningPlayer(loc_unit01),"Cannot use this item.")
else
call Func0216(GetOwningPlayer(loc_unit01),"Cannot use Lift Boots there.")
endif
call ResetUnitAnimation(loc_unit01)
endif
call RemoveLocation(loc_location01)
set loc_location01=null
set loc_unit01=null
call RemoveLocation(temploc)
set temploc=null
endfunction
function Func0716 takes nothing returns nothing
set udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(100+(100*GetUnitAbilityLevelSwapped('A05B',GetEnumUnit())))
endfunction
function Func0717 takes nothing returns nothing
set udg_group23=UAUnitGroupWithTypeId('H001')
call ForGroupBJ(udg_group23,function Func0716)
call DestroyGroup(udg_group23)
endfunction
function Func0721 takes nothing returns nothing
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UndeadLargeDeathExplode\\UndeadLargeDeathExplode.mdl",GetEnumUnit(),"origin"))
call SetUnitExploded(GetEnumUnit(),true)
endfunction
function Func0722 takes nothing returns nothing
call SetUnitExploded(GetEnumUnit(),false)
endfunction
function Func0723 takes nothing returns nothing
call SetDestructableLife(GetEnumDestructable(),(GetDestructableLife(GetEnumDestructable())-(300.+300.*I2R(bj_forLoopAIndex))))
if IsDestructableAliveBJ(GetEnumDestructable())then
call SetDestructableAnimation(GetEnumDestructable(),"stand hit")
endif
endfunction
function Func0724 takes nothing returns nothing
if IsDestructableAliveBJ(GetEnumDestructable())then
call SetDestructableAnimation(GetEnumDestructable(),"stand")
endif
endfunction
function Func0726 takes nothing returns boolean
return GetSpellAbilityId()=='A071'
endfunction
function Func0727 takes timer loc_timer01 returns nothing
local real loc_real01=Cache8GetReal(loc_timer01,"x")
local real loc_real02=Cache8GetReal(loc_timer01,"y")
local unit loc_unit01=Cache8GetUnitHandle(loc_timer01,StringHash("u"))
local integer loc_integer01=Cache8GetInteger(loc_timer01,"i")
local location loc_location01=Location(loc_real01,loc_real02)
local location loc_location02=GetUnitLoc(loc_unit01)
local real loc_real03=GetLocationX(loc_location02)+(10.-(loc_integer01/5))*Cos(AngleBetweenPoints(loc_location01,loc_location02)*bj_DEGTORAD)
local real loc_real04=GetLocationY(loc_location02)+(10.-(loc_integer01/5))*Sin(AngleBetweenPoints(loc_location01,loc_location02)*bj_DEGTORAD)
set loc_integer01=loc_integer01+1
call Cache8StoreInteger(loc_timer01,"i",loc_integer01)
if loc_integer01>50 then
call Cache8FlushChild(loc_timer01)
call DestroyTimer(loc_timer01)
set loc_unit01=null
else
call SetUnitPosition(loc_unit01,loc_real03,loc_real04)
endif
call RemoveLocation(loc_location01)
set loc_location01=null
call RemoveLocation(loc_location02)
set loc_location02=null
endfunction
function Func0728 takes nothing returns nothing
call Func0727(GetExpiredTimer())
endfunction
function Func0729 takes nothing returns nothing
local unit loc_unit01=bj_lastCreatedUnit
local location loc_location01=GetUnitLoc(loc_unit01)
local real loc_real01=GetLocationX(loc_location01)
local real loc_real02=GetLocationY(loc_location01)
local timer t=CreateTimer()
local integer loc_integer02=1
call SetWidgetLife(GetEnumUnit(),GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)-40)
call Cache8StoreUnitHandle(t,StringHash("u"),GetEnumUnit())
call Cache8StoreReal(t,"x",loc_real01)
call Cache8StoreReal(t,"y",loc_real02)
call Cache8StoreInteger(t,"i",loc_integer02)
call TimerStart(t,.04,true,function Func0728)
set loc_unit01=null
call RemoveLocation(loc_location01)
set loc_location01=null
endfunction
function Func0730 takes nothing returns boolean
local boolean b = false
local player p = GetOwningPlayer(GetFilterUnit())
set b = b or IsPlayerEnemy(p,Player(27))
set b = b or IsPlayerEnemy(p,Player(12))
set b = b or IsPlayerEnemy(p,Player(13))
set b = b or IsPlayerEnemy(p,Player(14))
set b = b or IsPlayerEnemy(p,Player(15))
//set b = b or IsPlayerEnemy(p,Player(16))
//set b = b or IsPlayerEnemy(p,Player(17))
//set b = b or IsPlayerEnemy(p,Player(18))
//set b = b or IsPlayerEnemy(p,Player(19))
//set b = b or IsPlayerEnemy(p,Player(20))
//set b = b or IsPlayerEnemy(p,Player(21))
//set b = b or IsPlayerEnemy(p,Player(22))
//set b = b or IsPlayerEnemy(p,Player(23))
return b and IsUnitAliveBJ(GetFilterUnit())and IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false
endfunction
function Func0731 takes timer loc_timer01 returns nothing
local real loc_real01
local real loc_real02
local real loc_real03=Cache8GetReal(loc_timer01,"x1")
local real loc_real04=Cache8GetReal(loc_timer01,"y1")
local unit loc_unit01=Cache8GetUnitHandle(loc_timer01,StringHash("u"))
local location loc_location01=Location(Cache8GetReal(loc_timer01,"Func1540"),Cache8GetReal(loc_timer01,"Func1586"))
local location temploc=GetUnitLoc(loc_unit01)
local integer loc_integer01=Cache8GetInteger(loc_timer01,"i2")
local integer loc_integer02=Cache8GetInteger(loc_timer01,"i3")
local group loc_group01=CreateGroup()
if loc_timer01==null then
call BJDebugMsg("Minerva Leap timer in hell")
elseif loc_integer01>loc_integer02 then
call Cache8FlushChild(loc_timer01)
call PauseTimer(loc_timer01)
call DestroyTimer(loc_timer01)
call SetUnitPathing(loc_unit01,true)
call SetUnitFlyHeight(loc_unit01,.0,900)
call PauseUnit(loc_unit01,false)
call SetUnitTimeScalePercent(loc_unit01,100)
if IsUnitAliveBJ(loc_unit01)then
call ResetUnitAnimation(loc_unit01)
endif
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",loc_location01))
set bj_lastCreatedUnit=loc_unit01
set loc_group01=UAUnitGroupWithinRangeOfLocMatching(250.,loc_location01,Condition(function Func0730))
call ForGroup(loc_group01,function Func0729)
else
set loc_real01=GetLocationX(temploc)-9.*Cos(AngleBetweenPoints(loc_location01,temploc)*bj_DEGTORAD)
set loc_real02=GetLocationY(temploc)-9.*Sin(AngleBetweenPoints(loc_location01,temploc)*bj_DEGTORAD)
call RemoveLocation(temploc)
set temploc=Location(loc_real01,loc_real02)
call SetUnitPositionLoc(loc_unit01,temploc)
set loc_integer01=loc_integer01+1
call Cache8StoreInteger(loc_timer01,"i2",loc_integer01)
if loc_integer01<loc_integer02/2 then
call SetUnitFlyHeight(loc_unit01,(loc_integer01*8),999)
else
call SetUnitFlyHeight(loc_unit01,(loc_integer02*8)-(loc_integer01*8),999)
endif
endif
set loc_unit01=null
set loc_location01=null
call DestroyGroup(loc_group01)
set loc_group01=null
call RemoveLocation(temploc)
set temploc=null
endfunction
function Func0732 takes nothing returns nothing
call Func0731(GetExpiredTimer())
endfunction
function Func0733 takes nothing returns nothing
local unit loc_unit01=GetSpellAbilityUnit()
local location loc_location01=GetSpellTargetLoc()
local location temploc=GetUnitLoc(loc_unit01)
local integer loc_integer01=1
local integer loc_integer02
local integer loc_integer03=GetTerrainCliffLevel(GetLocationX(temploc),GetLocationY(temploc))
local integer loc_integer04=GetTerrainCliffLevel(GetLocationX(loc_location01),GetLocationY(loc_location01))
local timer t=CreateTimer()
local real loc_real01=GetUnitX(loc_unit01)
local real loc_real02=GetUnitY(loc_unit01)
if(DistanceBetweenPoints(loc_location01,temploc)>=175)and(RectContainsLoc(bj_mapInitialPlayableArea,loc_location01))then
set loc_integer02=R2I(DistanceBetweenPoints(loc_location01,temploc)/9.)
call UnitAddAbility(loc_unit01,'Amrf')
call UnitRemoveAbility(loc_unit01,'Amrf')
call SetUnitTimeScalePercent(loc_unit01,50)
call SetUnitAnimation(loc_unit01,"attack spell slam")
call PauseUnit(loc_unit01,true)
call SetUnitPathing(loc_unit01,false)
call Cache8StoreUnitHandle(t,StringHash("u"),loc_unit01)
call Cache8StoreReal(t,"Func1540",GetLocationX(loc_location01))
call Cache8StoreReal(t,"Func1586",GetLocationY(loc_location01))
call Cache8StoreReal(t,"x1",loc_real01)
call Cache8StoreReal(t,"y1",loc_real02)
call Cache8StoreInteger(t,"i2",loc_integer01)
call Cache8StoreInteger(t,"i3",loc_integer02)
call TimerStart(t,.02,true,function Func0732)
else
call IssueImmediateOrderById(loc_unit01,851972)
call ResetUnitAnimation(loc_unit01)
endif
call RemoveLocation(temploc)
set loc_location01=null
set loc_unit01=null
set temploc=null
endfunction
function Func0734 takes nothing returns boolean
return GetSpellAbilityId()=='A02Q'
endfunction
function Func0735 takes nothing returns nothing
local location loc_location01=OffsetLocation(GetSpellTargetLoc(),GetRandomReal(-50.,50.),GetRandomReal(-50.,50.))
local location loc_location02
local unit loc_unit01=GetSpellAbilityUnit()
local sound loc_sound01=udg_sound99
local integer loc_integer01=0
local location temploc
set temploc=GetUnitLoc(loc_unit01)
call CreateNUnitsAtLoc(1,'h003',GetOwningPlayer(loc_unit01),temploc,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(4.,'BTLF',bj_lastCreatedUnit)
call VXSleep(.25)
call CreateNUnitsAtLoc(1,'h00L',GetOwningPlayer(loc_unit01),temploc,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(5.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A00F')
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,852652,(loc_location01))
call SetUnitAnimation((loc_unit01),"spell")
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
call Func0250(loc_location01)
call VXSleep(1.)
loop
exitwhen loc_integer01>GetRandomInt(2,3)
set loc_location02=OffsetLocation(loc_location01,GetRandomInt(-50,50),GetRandomInt(-50,50))
call DestroyEffect(AddSpecialEffectLoc("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",(loc_location02)))
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",(loc_location02)))
set loc_integer01=loc_integer01+1
endloop
call Func0238(400.+(50.*I2R(GetUnitAbilityLevelSwapped('A01J',loc_unit01))),loc_location01)
call DestroyEffect(AddSpecialEffectLoc("war3mapImported\\Satchel Explosion.mdx",loc_location01))
call UnitDamagePointLoc((loc_unit01),0,(400.+(50.*I2R(GetUnitAbilityLevelSwapped('A01J',loc_unit01)))),(loc_location01),(1800.+(200.*I2R(GetUnitAbilityLevelSwapped('A01J',(loc_unit01))))),ATTACK_TYPE_SIEGE,DAMAGE_TYPE_NORMAL)
call PlaySoundBJ(udg_sounds03[GetRandomInt(1,2)])
call Func0221((loc_location01),800)
call Func0227(10.,.55)
call RemoveLocation(loc_location01)
call RemoveLocation(loc_location02)
call RemoveLocation(temploc)
set loc_unit01=null
set loc_sound01=null
set temploc=null
endfunction
function Func0739 takes nothing returns boolean
return(GetSpellAbilityId()=='A00X')
endfunction
function Func0741 takes nothing returns nothing
local player p = GetOwningPlayer(GetTriggerUnit())
local integer id = GetPlayerId(p)
if(((udg_ShellsRemaining[id]<10)))then
call IssueImmediateOrderById(GetTriggerUnit(),851972)
call DisplayTimedTextToPlayer(p,0,0,5.,"Not enough shells")
else
set udg_ShellsRemaining[id]=(udg_ShellsRemaining[id]-10)
call DisplayTimedTextToPlayer(p,0,0,5.,("Shells remaining: "+I2S(udg_ShellsRemaining[id])))
endif
endfunction
function Func0742 takes nothing returns boolean
return(GetSpellAbilityId()=='A00X')
endfunction
function Func0743 takes nothing returns nothing
call Func0221(GetSpellTargetLoc(),600)
call Func0227(8.,1.2)
endfunction
function Func0744 takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='o001')
endfunction
function Func0745 takes timer loc_timer01 returns nothing
local real loc_real01=Cache8GetReal(loc_timer01,"x")
local real loc_real02=Cache8GetReal(loc_timer01,"y")
local unit loc_unit01=Cache8GetUnitHandle(loc_timer01,StringHash("u"))
local integer loc_integer01=Cache8GetInteger(loc_timer01,"i")
local location loc_location01=Location(loc_real01,loc_real02)
local location loc_location02=GetUnitLoc(loc_unit01)
local real loc_real03=GetLocationX(loc_location02)+(10.-(loc_integer01/5))*Cos(AngleBetweenPoints(loc_location01,loc_location02)*bj_DEGTORAD)
local real loc_real04=GetLocationY(loc_location02)+(10.-(loc_integer01/5))*Sin(AngleBetweenPoints(loc_location01,loc_location02)*bj_DEGTORAD)
set loc_integer01=loc_integer01+1
call Cache8StoreInteger(loc_timer01,"i",loc_integer01)
if loc_integer01>50 then
call Cache8FlushChild(loc_timer01)
call DestroyTimer(loc_timer01)
else
call SetUnitPosition(loc_unit01,loc_real03,loc_real04)
endif
call RemoveLocation(loc_location01)
set loc_location01=null
call RemoveLocation(loc_location02)
set loc_location02=null
endfunction
function Func0746 takes nothing returns nothing
call Func0745(GetExpiredTimer())
endfunction
function Func0747 takes nothing returns boolean
return GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>.0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false
endfunction
function Func0748 takes nothing returns nothing
local unit loc_unit01=GetDyingUnit()
local location loc_location01=GetUnitLoc(loc_unit01)
local real loc_real01=GetLocationX(loc_location01)
local real loc_real02=GetLocationY(loc_location01)
local timer t=CreateTimer()
local integer loc_integer02=1
call Cache8StoreUnitHandle(t,StringHash("u"),GetEnumUnit())
call Cache8StoreReal(t,"x",loc_real01)
call Cache8StoreReal(t,"y",loc_real02)
call Cache8StoreInteger(t,"i",loc_integer02)
call TimerStart(t,.04,true,function Func0746)
set loc_unit01=null
call RemoveLocation(loc_location01)
set loc_location01=null
endfunction
function Func0749 takes nothing returns nothing
local unit loc_unit01=GetDyingUnit()
local location loc_location01=GetUnitLoc(loc_unit01)
local unit loc_unit02=CreateUnit(GetOwningPlayer(loc_unit01),'h003',GetLocationX(loc_location01),GetLocationY(loc_location01),.0)
local integer loc_integer01=H2I2(CreateTimer())
local integer loc_integer02=1
local group loc_group01=UAUnitGroupWithinRangeOfLocMatching(450,loc_location01,Condition(function Func0747))
call SetUnitAnimation(loc_unit01,"death alternate")
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",loc_location01))
call UnitAddAbility(loc_unit02,'A02S')
call UnitApplyTimedLifeBJ(5.,'BTLF',loc_unit02)
call IssuePointOrderByIdLoc(loc_unit02,852652,loc_location01)
call ForGroup(loc_group01,function Func0748)
call DestroyGroup(loc_group01)
set loc_unit01=null
call RemoveLocation(loc_location01)
set loc_location01=null
set loc_group01=null
set loc_unit02=null
endfunction
function Func0752 takes nothing returns boolean
return GetSpellAbilityId()=='A046'or GetSpellAbilityId()=='A06T'
endfunction
function Func0753 takes nothing returns nothing
local unit loc_unit01=GetSpellAbilityUnit()
local sound loc_sound01=udg_sound84
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
set loc_unit01=null
set loc_sound01=null
endfunction
function Func0767 takes nothing returns boolean
return(udg_boolean15)
endfunction
function Func0768 takes nothing returns boolean
return(IsUnitAliveBJ(GetEnumUnit()))
endfunction
function Func0769 takes nothing returns nothing
if(((IsUnitAliveBJ(GetEnumUnit()))))then
set udg_location02=GetUnitLoc(GetEnumUnit())
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,3.,0,100,10.,10.)
call RemoveLocation(udg_location02)
endif
endfunction
function Func0788 takes nothing returns boolean
return(((GetSpellAbilityId()=='A00K')or(GetSpellAbilityId()=='A02W')or(GetSpellAbilityId()=='A05M')))
endfunction
function Func0789 takes nothing returns nothing
call VXSleep(.15)
call IssueImmediateOrderById(GetSpellAbilityUnit(),851993)
endfunction
constant function AP takes real loc_real01 returns real
return 50+200*loc_real01
endfunction
constant function NP takes real loc_real01 returns real
return 30+7*loc_real01
endfunction
constant function bP takes real loc_real01 returns real
return 800.+5*loc_real01
endfunction
constant function BP takes real loc_real01 returns real
return 4+1*loc_real01
endfunction
constant function cP takes real loc_real01 returns real
return 90+loc_real01*3
endfunction
constant function CP takes real loc_real01 returns real
return 1.+loc_real01*.01
endfunction
function Func0792 takes integer loc_integer01 returns integer
return Func0139()+Func0141(UNIT_TYPE_STRUCTURE)+Func0137(UNIT_TYPE_GROUND)
endfunction
function Func0793 takes integer loc_integer01 returns integer
return Func0135(ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FORCE)+Func0138()+Func0137(UNIT_TYPE_GROUND)+Func0136(UNIT_TYPE_STRUCTURE,4)
endfunction
function Func0795 takes real loc_real01,real loc_real02 returns integer
local location loc_location01=Location(loc_real01,loc_real02)
local integer loc_integer01=R2I(GetLocationZ(loc_location01))
call RemoveLocation(loc_location01)
set loc_location01=null
return loc_integer01
endfunction
function ActionEnergyOrbDamage takes string loc_string01,unit loc_unit01,integer loc_integer01,timer loc_timer01,group loc_group01,boolean loc_boolean01 returns nothing
local real loc_real01
local integer loc_integer02=0
local real loc_real02=GetUnitX(loc_unit01)
local real loc_real03=GetUnitY(loc_unit01)
local real loc_real04
local unit loc_unit02=CreateUnit(GetOwningPlayer(loc_unit01),'h00S',loc_real02,loc_real03,.0)
call UnitAddAbility(loc_unit02,'A05Q')
call UnitApplyTimedLifeBJ(2.,'BTLF',loc_unit02)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",loc_real02,loc_real03))
call UnitDamagePointLoc(loc_unit02,0,350.,Location(loc_real02,loc_real03),250.,ATTACK_TYPE_MAGIC,DAMAGE_TYPE_NORMAL)
call VXStoreBoolean(loc_string01,"mainended",true)
call DestroyEffect(VXLoadEffectHandle(loc_string01,"fx"))
if loc_boolean01 then
call DestroyEffect(AddSpellEffectById('A045',EFFECT_TYPE_SPECIAL,loc_real02,loc_real03))
call RemoveUnit(loc_unit01)
else
call ExplodeUnitBJ(loc_unit01)
endif
set loc_unit02=null
endfunction
function Func0797 takes string loc_string01,unit loc_unit01,integer loc_integer01 returns boolean
local boolean loc_boolean01=VXLoadBoolean(loc_string01,"RollingBoulder_Die")
local group loc_group01=CreateGroup()
local unit loc_unit02
local real loc_real01
if not(loc_boolean01)then
call GroupAddGroup(VXLoadGroupHandle("[RollingBoulder]","g"),loc_group01)
set loc_real01=cP(loc_integer01)
endif
loop
set loc_unit02=FirstOfGroup(loc_group01)
exitwhen loc_boolean01 or(loc_unit02==null)
call GroupRemoveUnit(loc_group01,loc_unit02)
if(loc_unit02!=loc_unit01)then
if(IsUnitInRange(loc_unit02,loc_unit01,loc_real01))then
call VXStoreBoolean(I2S(VXLoadInteger("[RollingBoulder]",HandleId2String(loc_unit02))),"RollingBoulder_Die",true)
set loc_boolean01=true
endif
endif
endloop
call DestroyGroup(loc_group01)
set loc_group01=null
set loc_unit02=null
return loc_boolean01
endfunction
function ActionEnergyOrbTree takes real loc_real01,real loc_real02,integer loc_integer01,real loc_real03,real loc_real04 returns nothing
local integer loc_integer02=2
local real loc_real05=cP(loc_integer01)
set loc_real04=loc_real04*bj_DEGTORAD
set loc_real01=loc_real01+loc_real03*Cos(loc_real04)
set loc_real02=loc_real02+loc_real03*Sin(loc_real04)
if(loc_integer02>=2)then
set loc_integer02=loc_integer02-1
call Func0157(loc_real01,loc_real02,loc_real05,AP(loc_integer01))
endif
if(loc_integer02>=1)then
call Func0159(loc_real01,loc_real02,loc_real05)
endif
endfunction
function Func0799 takes nothing returns nothing
set bj_rescueChangeColorUnit=bj_rescueChangeColorUnit or(GetEnumItem()!=bj_itemRandomCurrentPick)
endfunction
function Func0800 takes item loc_item01,real loc_real01,real loc_real02 returns boolean
local integer loc_integer01=30
local rect loc_rect01
local real loc_real03
local real loc_real04
call SetItemPosition(loc_item01,loc_real01,loc_real02)
set loc_real03=GetItemX(loc_item01)-loc_real01
set loc_real04=GetItemY(loc_item01)-loc_real02
if(loc_real03*loc_real03+loc_real04*loc_real04<=100)then
return true
endif
set loc_rect01=Rect(loc_real01-loc_integer01,loc_real02-loc_integer01,loc_real01+loc_integer01,loc_real02+loc_integer01)
set bj_itemRandomCurrentPick=loc_item01
set bj_rescueChangeColorUnit=false
call EnumItemsInRect(loc_rect01,null,function Func0799)
call RemoveRect(loc_rect01)
set loc_rect01=null
return bj_rescueChangeColorUnit
endfunction
function Func0801 takes item loc_item01,real loc_real01,real loc_real02,real loc_real03 returns real
local integer loc_integer01=128
local real loc_real04=1.4142136*loc_integer01
local real loc_real05
local boolean loc_boolean01
local boolean loc_boolean02
local boolean loc_boolean03
local boolean loc_boolean04
local boolean loc_boolean05
set loc_real01=ModuloReal(loc_real01,6.283185)
if(loc_real01>=4.712389)then
set loc_real05=4.712389
elseif(loc_real01>=bj_PI)then
set loc_real05=bj_PI
elseif(loc_real01>=1.570796)then
set loc_real05=1.570796
else
set loc_real05=0
endif
set loc_boolean01=not Func0800(loc_item01,loc_real02+loc_real04*Cos(loc_real05-.785398),loc_real03+loc_real04*Sin(loc_real05-.785398))
set loc_boolean02=not Func0800(loc_item01,loc_real02+loc_integer01*Cos(loc_real05),loc_real03+loc_integer01*Sin(loc_real05))
set loc_boolean03=not Func0800(loc_item01,loc_real02+loc_real04*Cos(loc_real05+.785398),loc_real03+loc_real04*Sin(loc_real05+.785398))
set loc_boolean04=not Func0800(loc_item01,loc_real02+loc_integer01*Cos(loc_real05+1.570796),loc_real03+loc_integer01*Sin(loc_real05+1.570796))
set loc_boolean05=not Func0800(loc_item01,loc_real02+loc_real04*Cos(loc_real05+2.356194),loc_real03+loc_real04*Sin(loc_real05+2.356194))
if loc_boolean02 and loc_boolean03 and loc_boolean04 then
set loc_real05=loc_real01+bj_PI
elseif(loc_boolean03 and loc_boolean04 and loc_boolean05)or(loc_boolean01 and loc_boolean02 and loc_boolean03)then
set loc_real05=-loc_real01+bj_PI
else
set loc_real05=GetRandomReal(.00001,bj_PI*2)
endif
return loc_real05+GetRandomReal(-.01,.01)
endfunction
function Func0802 takes string loc_string01,unit loc_unit01,integer loc_integer01,timer loc_timer01,group loc_group01 returns boolean
local integer loc_integer02=0
local item loc_item01
local real loc_real01=GetUnitX(loc_unit01)
local real loc_real02=GetUnitY(loc_unit01)
local real loc_real03=0
local real loc_real04=Func0103(loc_string01,"f")
local real loc_real05=bP(loc_integer01)*.04
local real loc_real06
local real loc_real07
local real loc_real08
local real loc_real09
local integer loc_integer03=200
local real loc_real10
local real loc_real11=loc_real04
local real loc_real12
local real loc_real13=IntegerTertiaryOp(GetRandomInt(0,1)==0,-1,1)*10
local boolean loc_boolean01=false
local integer loc_integer04
call ActionEnergyOrbTree(loc_real01,loc_real02,loc_integer01,loc_real05,loc_real04)
if(Func0797(loc_string01,loc_unit01,loc_integer01))then
call ActionEnergyOrbDamage(loc_string01,loc_unit01,loc_integer01,loc_timer01,loc_group01,false)
return false
endif
set loc_item01=CreateItem('ciri',0,0)
set loc_integer04=VXLoadInteger(loc_string01,"Ign")
if loc_integer04>0 then
set loc_real06=loc_real01+loc_real05*Cos(loc_real04)
set loc_real07=loc_real02+loc_real05*Sin(loc_real04)
call VXStoreInteger(loc_string01,"Ign",loc_integer04-1)
call DestroyEffect(AddSpellEffectById('A045',EFFECT_TYPE_AREA_EFFECT,loc_real01,loc_real02))
else
loop
set loc_real06=loc_real01+loc_real05*Cos(loc_real04)
set loc_real07=loc_real02+loc_real05*Sin(loc_real04)
exitwhen Func0800(loc_item01,loc_real06,loc_real07)
if loc_integer02==0 then
set loc_real11=Func0795(loc_real01,loc_real02)
set loc_real12=Func0795(loc_real06,loc_real07)
set loc_real10=loc_real05
loop
exitwhen(loc_real11!=loc_real12)or(loc_real10>loc_integer03)or loc_boolean01
set loc_real10=loc_real10+loc_real05
set loc_real12=Func0795(loc_real01+loc_real10*Cos(loc_real04),loc_real02+loc_real10*Sin(loc_real04))
set loc_boolean01=(Func0196(loc_real01+loc_real10*Cos(loc_real04),loc_real02+loc_real10*Sin(loc_real04)))
endloop
exitwhen loc_boolean01
if(loc_real11>loc_real12)then
call VXStoreInteger(loc_string01,"Ign",R2I(loc_real10/loc_real05)*2)
exitwhen true
endif
set loc_real11=loc_real04
endif
set loc_integer02=loc_integer02+1
exitwhen(loc_integer02>4)
if(loc_integer02>2)then
set loc_real04=-loc_real11+GetRandomReal(-.01,.01)
elseif loc_integer02>1 then
set loc_real04=GetRandomReal(.001,bj_PI*2)
else
set loc_real04=Func0801(loc_item01,loc_real04,loc_real01,loc_real02)
endif
endloop
endif
call VXStoreReal(loc_string01,"f",loc_real04)
call SetUnitFacing(loc_unit01,loc_real04*bj_RADTODEG)
call SetItemVisible(loc_item01,false)
call RemoveItem(loc_item01)
set loc_item01=null
if(loc_integer02>4)then
call ActionEnergyOrbDamage(loc_string01,loc_unit01,loc_integer01,loc_timer01,loc_group01,false)
return false
else
if(loc_integer02>0)then
call DestroyEffect(AddSpellEffectById('A045',EFFECT_TYPE_AREA_EFFECT,loc_real01,loc_real02))
endif
call SetUnitPosition(loc_unit01,loc_real06,loc_real07)
set loc_integer04=VXLoadInteger(loc_string01,"water")
if loc_integer04==1 then
if Func0196(loc_real06,loc_real07)then
call ActionEnergyOrbDamage(loc_string01,loc_unit01,loc_integer01,loc_timer01,loc_group01,true)
else
call VXStoreInteger(loc_string01,"water",0)
endif
elseif loc_integer04>1 then
call VXStoreInteger(loc_string01,"water",loc_integer04-1)
elseif loc_boolean01 then
call VXStoreInteger(loc_string01,"water",R2I((loc_real10+cP(loc_integer01))/loc_real05))
endif
return true
endif
endfunction
function Func0803 takes nothing returns nothing
local timer loc_timer01=GetExpiredTimer()
local string loc_string01=I2S(VXLoadInteger("[RollingBoulder]",HandleId2String(loc_timer01)))
local group loc_group01=VXLoadGroupHandle(loc_string01,"g")
local group loc_group02
local unit loc_unit01
local unit loc_unit02
local unit loc_unit03
local real loc_real01
local real loc_real02
local real loc_real03
local real loc_real04
local real loc_real05
local real loc_real06
local real loc_real07
local real loc_real08
local real loc_real09
local integer loc_integer01
local integer loc_integer02=VXLoadInteger(loc_string01,"l")
local integer loc_integer03=VXLoadInteger(loc_string01,"num")+1
local real loc_real10
local real loc_real11
local real loc_real12
if VXLoadBoolean(loc_string01,"mainended")then
call DestroyGroup(loc_group01)
call PauseTimer(loc_timer01)
set loc_timer01=null
set loc_group01=null
set loc_group02=null
set loc_unit01=null
return
endif
call VXStoreInteger(loc_string01,"num",loc_integer03)
set loc_unit02=VXLoadUnitHandle(loc_string01,"m")
set loc_unit03=VXLoadUnitHandle(loc_string01,"u")
set loc_real03=GetUnitX(loc_unit02)
set loc_real04=GetUnitY(loc_unit02)
set loc_group02=CreateGroup()
call GroupAddGroup(loc_group01,loc_group02)
set loc_real02=.04
set loc_real09=NP(loc_integer02)*loc_real02
set loc_real02=bP(loc_integer02)*loc_real02
loop
set loc_unit01=FirstOfGroup(loc_group02)
exitwhen loc_unit01==null
set loc_real05=GetUnitX(loc_unit01)
set loc_real06=GetUnitY(loc_unit01)
if IsUnitInRange(loc_unit01,loc_unit02,cP(loc_integer02))and not(IsUnitType(loc_unit01,UNIT_TYPE_DEAD))then
call Func0146(loc_unit03,loc_unit01,loc_real09,Func0793(loc_integer02))
set loc_real01=Atan2(loc_real06-loc_real04,loc_real05-loc_real03)
set loc_real07=loc_real05+loc_real02*Cos(loc_real01)
set loc_real08=loc_real06+loc_real02*Sin(loc_real01)
call SetUnitPosition(loc_unit01,loc_real07,loc_real08)
set loc_real11=GetUnitX(loc_unit01)-loc_real07
set loc_real12=GetUnitY(loc_unit01)-loc_real08
if(loc_real11*loc_real11+loc_real12*loc_real12>400)then
call SetUnitPosition(loc_unit01,loc_real05,loc_real06)
endif
else
call GroupRemoveUnit(loc_group01,loc_unit01)
endif
call GroupRemoveUnit(loc_group02,loc_unit01)
endloop
if not(Func0802(loc_string01,loc_unit02,loc_integer02,loc_timer01,loc_group01))then
call VXStoreBoolean(loc_string01,"mainended",true)
endif
set loc_timer01=null
set loc_group01=null
set loc_group02=null
set loc_unit01=null
endfunction
function ActionEneryOrbHit takes string loc_string01,unit loc_unit01,unit loc_unit02,unit loc_unit03 returns nothing
local integer loc_integer01=VXLoadInteger(loc_string01,"l")
local integer loc_integer02=0
local real loc_real01=GetUnitX(loc_unit02)
local real loc_real02=GetUnitY(loc_unit02)
local real loc_real03
if((loc_unit03!=loc_unit01)or VXLoadBoolean(loc_string01,"RegEnded"))and(Func0144(loc_unit03,loc_unit01,Func0792(loc_integer01))!=0)then
call Func0128(GetOwningPlayer(loc_unit03),'A044',loc_integer01,I2S((852095)),loc_unit01,true)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UndeadLargeDeathExplode\\UndeadLargeDeathExplode.mdl",loc_unit01,"head"))
call GroupAddUnit(VXLoadGroupHandle(loc_string01,"g"),loc_unit01)
endif
call Func0146(loc_unit03,loc_unit01,AP(loc_integer01),Func0793(loc_integer01))
endfunction
function ActionEneryOrbLoop takes nothing returns nothing
local string loc_string01=I2S(VXLoadInteger("[RollingBoulder]",HandleId2String(GetTriggeringTrigger())))
local unit loc_unit01=GetTriggerUnit()
local unit loc_unit02=VXLoadUnitHandle(loc_string01,"u")
if(loc_unit01==null)then
call VXStoreBoolean(loc_string01,"RegEnded",true)
elseif(loc_unit02!=null)then
call ActionEneryOrbHit(loc_string01,loc_unit01,VXLoadUnitHandle(loc_string01,"m"),loc_unit02)
set loc_unit02=null
endif
set loc_unit01=null
set loc_unit02=null
endfunction
function ActionEnergyOrb takes timer loc_timer01 returns nothing
local unit loc_unit01=GetTriggerUnit()
local integer loc_integer01=GetSpellAbilityId()
local integer loc_integer02=GetUnitAbilityLevel(loc_unit01,loc_integer01)
local location loc_location01=GetSpellTargetLoc()
local real loc_real01=GetUnitX(loc_unit01)
local real loc_real02=GetUnitY(loc_unit01)
local real loc_real03=Atan2(GetLocationY(loc_location01)-loc_real02,GetLocationX(loc_location01)-loc_real01)
local unit loc_unit02=Func0117(loc_real03)
local group loc_group01=CreateGroup()
local group loc_group02
local trigger loc_trigger01=CreateTrigger()
local triggeraction loc_triggeraction01=TriggerAddAction(loc_trigger01,function ActionEneryOrbLoop)
local integer loc_integer03=VXGetFreeTableIndex()
local string indexstring=I2S(loc_integer03)
local integer loc_integer04=VXLoadInteger("[RollingBoulder]","N")
if(loc_integer04==0)then
call VXStoreInteger("[RollingBoulder]","N",1)
set loc_group02=CreateGroup()
call VXStoreGroupHandle("[RollingBoulder]","g",loc_group02)
else
set loc_group02=VXLoadGroupHandle("[RollingBoulder]","g")
call VXStoreInteger("[RollingBoulder]","N",loc_integer04+1)
endif
call SetUnitPosition(loc_unit02,loc_real01,loc_real02)
set loc_real01=CP(loc_integer02)
call SetUnitScale(loc_unit02,loc_real01,loc_real01,loc_real01)
call UnitAddAbility(loc_unit02,'A05Q')
call VXStoreInteger(indexstring,"l",loc_integer02)
call VXStoreUnitHandle(indexstring,"u",loc_unit01)
call VXStoreUnitHandle(indexstring,"m",loc_unit02)
call VXStoreGroupHandle(indexstring,"g",loc_group01)
call GroupAddUnit(VXLoadGroupHandle("[RollingBoulder]","g"),loc_unit02)
call SetUnitFlyHeight(loc_unit02,150,0)
call SetUnitFlyHeight(loc_unit02,50,100)
call VXStoreReal(indexstring,"f",loc_real03)
call VXStoreInteger("[RollingBoulder]",HandleId2String(loc_trigger01),loc_integer03)
call VXStoreInteger("[RollingBoulder]",HandleId2String(loc_unit02),loc_integer03)
call VXStoreInteger("[RollingBoulder]",HandleId2String(loc_timer01),loc_integer03)
call VXStoreInteger("[RollingBoulder]",HandleId2String(loc_trigger01),loc_integer03)
call TriggerRegisterUnitInRange(loc_trigger01,loc_unit02,cP(loc_integer02),null)
call VXStoreEffectHandle(indexstring,"fx",AddSpellEffectTargetById(loc_integer01,EFFECT_TYPE_MISSILE,loc_unit02,"origin"))
call SetUnitOwner(loc_unit02,GetOwningPlayer(loc_unit01),true)
call RemoveLocation(loc_location01)
call TimerStart(loc_timer01,.04,true,function Func0803)
call TriggerRegisterTimerEvent(loc_trigger01,.5,false)
call VXSleep(BP(loc_integer02))
if not(Func0768())then
call ActionEnergyOrbDamage(indexstring,loc_unit02,loc_integer02,loc_timer01,loc_group01,false)
endif
call TriggerSleepAction(0)
set loc_integer04=VXLoadInteger("[RollingBoulder]","N")-1
if(loc_integer04==0)then
call DestroyGroup(loc_group02)
call VXFlushMission("[RollingBoulder]")
else
call VXStoreInteger("[RollingBoulder]","N",loc_integer04)
endif
call VXFlushMission(indexstring)
call DestroyTimer(loc_timer01)
call TriggerRemoveAction(loc_trigger01,loc_triggeraction01)
call DestroyTrigger(loc_trigger01)
set loc_unit01=null
set loc_location01=null
set loc_unit02=null
set loc_group01=null
set loc_trigger01=null
set loc_triggeraction01=null
endfunction
function Func0807 takes nothing returns nothing
call ActionEnergyOrb(CreateTimer())
endfunction
function Func0810 takes nothing returns boolean
local integer loc_integer01=(1+GetPlayerId(GetOwningPlayer(GetAttacker())))
return udg_integer16!=5 and TimerGetRemaining(udg_timers01[loc_integer01])<=0 and GetUnitTypeId(GetAttacker())=='H00H'and GetUnitAbilityLevel(GetAttacker(),'A02L')!=0 and udg_integers01[loc_integer01]>0 and udg_booleans06[loc_integer01]==false
endfunction
function Func0811 takes nothing returns nothing
local unit loc_unit01=GetAttacker()
local integer loc_integer01=GetPlayerId(GetOwningPlayer(loc_unit01))
local real loc_real01=GetUnitX(loc_unit01)-GetUnitX(GetTriggerUnit())
local real loc_real02=GetUnitY(loc_unit01)-GetUnitY(GetTriggerUnit())
if(loc_real01*loc_real01+loc_real02*loc_real02>=300.*300.)then
call SetPlayerAllianceStateBJ(Player(27),Player(loc_integer01),2)
// MORE ZOMBIE PLAYERS
call SetPlayerAllianceStateBJ(Player(12),Player(loc_integer01),2)
call SetPlayerAllianceStateBJ(Player(13),Player(loc_integer01),2)
call SetPlayerAllianceStateBJ(Player(14),Player(loc_integer01),2)
call SetPlayerAllianceStateBJ(Player(15),Player(loc_integer01),2)
call SetPlayerAllianceStateBJ(Player(16),Player(loc_integer01),2)
call SetPlayerAllianceStateBJ(Player(17),Player(loc_integer01),2)
call SetPlayerAllianceStateBJ(Player(18),Player(loc_integer01),2)
call SetPlayerAllianceStateBJ(Player(19),Player(loc_integer01),2)
call SetPlayerAllianceStateBJ(Player(20),Player(loc_integer01),2)
call SetPlayerAllianceStateBJ(Player(21),Player(loc_integer01),2)
call SetPlayerAllianceStateBJ(Player(22),Player(loc_integer01),2)
call SetPlayerAllianceStateBJ(Player(23),Player(loc_integer01),2)
// ----
if udg_integer16==6 then
call SetPlayerAllianceStateBJ(Player(11),Player(loc_integer01),2)
endif
call TimerStart(udg_timers01[loc_integer01+1],2.,false,null)
call VXSleep(1.65)
call SetPlayerAllianceStateBJ(Player(27),Player(loc_integer01),0)
//MORE ZOMBIE PLAYERS
call SetPlayerAllianceStateBJ(Player(12),Player(loc_integer01),0)
call SetPlayerAllianceStateBJ(Player(13),Player(loc_integer01),0)
call SetPlayerAllianceStateBJ(Player(14),Player(loc_integer01),0)
call SetPlayerAllianceStateBJ(Player(15),Player(loc_integer01),0)
call SetPlayerAllianceStateBJ(Player(16),Player(loc_integer01),0)
call SetPlayerAllianceStateBJ(Player(17),Player(loc_integer01),0)
call SetPlayerAllianceStateBJ(Player(18),Player(loc_integer01),0)
call SetPlayerAllianceStateBJ(Player(19),Player(loc_integer01),0)
call SetPlayerAllianceStateBJ(Player(20),Player(loc_integer01),0)
call SetPlayerAllianceStateBJ(Player(21),Player(loc_integer01),0)
call SetPlayerAllianceStateBJ(Player(22),Player(loc_integer01),0)
call SetPlayerAllianceStateBJ(Player(23),Player(loc_integer01),0)
// ----
if udg_integer16==6 then
call SetPlayerAllianceStateBJ(Player(11),Player(loc_integer01),0)
endif
endif
set loc_unit01=null
endfunction
function Func0815 takes nothing returns boolean
return(GetSpellAbilityId()=='A02D')
endfunction
function Func0816 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Func0819 takes nothing returns nothing
if(((((GetUnitTypeId(GetEnumUnit())=='u005')or(GetUnitTypeId(GetEnumUnit())=='u003')or(GetUnitTypeId(GetEnumUnit())=='u002')or(GetUnitTypeId(GetEnumUnit())=='u006')or(GetUnitTypeId(GetEnumUnit())=='u004')or(GetUnitTypeId(GetEnumUnit())=='n00N')or(GetUnitTypeId(GetEnumUnit())=='n00P')or(GetUnitTypeId(GetEnumUnit())=='n00K')or(GetUnitTypeId(GetEnumUnit())=='n00O')or(GetUnitTypeId(GetEnumUnit())=='n00B')or(GetUnitTypeId(GetEnumUnit())=='n00H')or(GetUnitTypeId(GetEnumUnit())=='n00F')or(GetUnitTypeId(GetEnumUnit())=='n00G')or(GetUnitTypeId(GetEnumUnit())=='u009')or(GetUnitTypeId(GetEnumUnit())=='u008')or(GetUnitTypeId(GetEnumUnit())=='n00T')or(GetUnitTypeId(GetEnumUnit())=='u00B')or(GetUnitTypeId(GetEnumUnit())=='n00W')))))then
set udg_location02=GetUnitLoc(GetEnumUnit())
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,5.,0,100,15.,15.)
call RemoveLocation(udg_location02)
endif
endfunction
function Func0820 takes nothing returns nothing
set udg_location02=GetUnitLoc(GetTriggerUnit())
set udg_group23=UAUnitGroupWithinRangeOfLocMatching(8000.,udg_location02,Condition(function Func0816))
call RemoveLocation(udg_location02)
call ForGroupBJ(udg_group23,function Func0819)
call DestroyGroup(udg_group23)
endfunction
function Func0825 takes nothing returns nothing
call UnitShareVisionBJ(true,GetEnumUnit(),GetEnumPlayer())
endfunction
function Func0826 takes nothing returns nothing
call ForForce(Func0016(GetOwningPlayer(GetEnumUnit())),function Func0825)
endfunction
function Func0827 takes nothing returns nothing
call UnitShareVisionBJ(true,GetEnumUnit(),GetEnumPlayer())
endfunction
function Func0828 takes nothing returns nothing
call ForForce(Func0016(GetOwningPlayer(GetEnumUnit())),function Func0827)
endfunction
function Func0829 takes nothing returns nothing
call UnitShareVisionBJ(true,GetEnumUnit(),GetEnumPlayer())
endfunction
function Func0830 takes nothing returns nothing
call ForForce(Func0016(GetOwningPlayer(GetEnumUnit())),function Func0829)
endfunction
function Func0831 takes nothing returns nothing
set udg_group23=UAUnitGroupWithTypeId('o000')
call ForGroupBJ(udg_group23,function Func0826)
call DestroyGroup(udg_group23)
set udg_group23=UAUnitGroupWithTypeId('h00S')
call ForGroupBJ(udg_group23,function Func0828)
call DestroyGroup(udg_group23)
set udg_group23=UAUnitGroupWithTypeId('h016')
call ForGroupBJ(udg_group23,function Func0830)
call DestroyGroup(udg_group23)
endfunction
function Func0832 takes nothing returns boolean
return udg_integer16==6
endfunction
function Func0833 takes nothing returns nothing
local group loc_group01=UAUnitGroupFromPlayerMatching(Player(11),Condition(function Func0239))
local unit loc_unit01
local location loc_location01
loop
set loc_unit01=FirstOfGroup(loc_group01)
exitwhen loc_unit01==null
if IsUnitVisible(loc_unit01,Player(0))and GetUnitTypeId(loc_unit01)=='h004'or GetUnitTypeId(loc_unit01)=='h01A'or GetUnitTypeId(loc_unit01)=='h00V'or GetUnitTypeId(loc_unit01)=='h01D'or GetUnitTypeId(loc_unit01)=='h017'or GetUnitTypeId(loc_unit01)=='h019'or GetUnitTypeId(loc_unit01)=='h00E'or GetUnitTypeId(loc_unit01)=='h009'or GetUnitTypeId(loc_unit01)=='h01E'or GetUnitTypeId(loc_unit01)=='h00A'or GetUnitTypeId(loc_unit01)=='h01B'or GetUnitTypeId(loc_unit01)=='h00G'then
set loc_location01=GetUnitLoc(loc_unit01)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,loc_location01,2.,0,100.,20.,20.)
call RemoveLocation(loc_location01)
endif
call GroupRemoveUnit(loc_group01,loc_unit01)
endloop
call DestroyGroup(loc_group01)
set loc_unit01=null
set loc_location01=null
endfunction
function Func0836 takes nothing returns boolean
return GetSpellAbilityId()=='A04R'
endfunction
function Func0837 takes timer loc_timer01 returns nothing
local real loc_real01
local real loc_real02
local real loc_real03=Cache8GetReal(loc_timer01,"x1")
local real loc_real04=Cache8GetReal(loc_timer01,"y1")
local unit loc_unit01=Cache8GetUnitHandle(loc_timer01,StringHash("u"))
local location loc_location01=Location(Cache8GetReal(loc_timer01,"Func1540"),Cache8GetReal(loc_timer01,"Func1586"))
local integer loc_integer01=Cache8GetInteger(loc_timer01,"i2")
local integer loc_integer02=Cache8GetInteger(loc_timer01,"i3")
local location temploc
if loc_timer01==null then
call BJDebugMsg("Zombie Leap timer in hell")
elseif loc_integer01>loc_integer02 then
call Cache8FlushChild(loc_timer01)
call PauseTimer(loc_timer01)
call DestroyTimer(loc_timer01)
call SetUnitPathing(loc_unit01,true)
call SetUnitFlyHeight(loc_unit01,.0,900)
call PauseUnit(loc_unit01,false)
call SetUnitTimeScalePercent(loc_unit01,100)
if IsUnitAliveBJ(loc_unit01)then
call ResetUnitAnimation(loc_unit01)
endif
else
set temploc=GetUnitLoc(loc_unit01)
set loc_real01=GetLocationX(temploc)-9.*Cos(AngleBetweenPoints(loc_location01,temploc)*bj_DEGTORAD)
set loc_real02=GetLocationY(temploc)-9.*Sin(AngleBetweenPoints(loc_location01,temploc)*bj_DEGTORAD)
call RemoveLocation(temploc)
call SetUnitPositionLoc(loc_unit01,Location(loc_real01,loc_real02))
set loc_integer01=loc_integer01+1
call Cache8StoreInteger(loc_timer01,"i2",loc_integer01)
if loc_integer01<loc_integer02/2 then
call SetUnitFlyHeight(loc_unit01,(loc_integer01*8),999)
else
call SetUnitFlyHeight(loc_unit01,(loc_integer02*8)-(loc_integer01*8),999)
endif
endif
set loc_unit01=null
set loc_location01=null
set temploc=null
endfunction
function Func0838 takes nothing returns nothing
call Func0837(GetExpiredTimer())
endfunction
function Func0839 takes nothing returns nothing
local unit loc_unit01=GetSpellAbilityUnit()
local location loc_location01=GetSpellTargetLoc()
local location temploc=GetUnitLoc(loc_unit01)
local integer loc_integer01=1
local integer loc_integer02
local integer loc_integer03=GetTerrainCliffLevel(GetLocationX(temploc),GetLocationY(temploc))
local integer loc_integer04=GetTerrainCliffLevel(GetLocationX(loc_location01),GetLocationY(loc_location01))
local timer t=CreateTimer()
local real loc_real01=GetUnitX(loc_unit01)
local real loc_real02=GetUnitY(loc_unit01)
if(DistanceBetweenPoints(loc_location01,temploc)>=175)and(RectContainsLoc(bj_mapInitialPlayableArea,loc_location01))then
set loc_integer02=R2I(DistanceBetweenPoints(loc_location01,temploc)/9.)
call UnitAddAbility(loc_unit01,'Amrf')
call UnitRemoveAbility(loc_unit01,'Amrf')
call SetUnitTimeScalePercent(loc_unit01,50)
call SetUnitAnimation(loc_unit01,"stand victory")
call PauseUnit(loc_unit01,true)
call SetUnitPathing(loc_unit01,false)
call Cache8StoreUnitHandle(t,StringHash("u"),loc_unit01)
call Cache8StoreReal(t,"Func1540",GetLocationX(loc_location01))
call Cache8StoreReal(t,"Func1586",GetLocationY(loc_location01))
call Cache8StoreReal(t,"x1",loc_real01)
call Cache8StoreReal(t,"y1",loc_real02)
call Cache8StoreInteger(t,"i2",loc_integer01)
call Cache8StoreInteger(t,"i3",loc_integer02)
call TimerStart(t,.02,true,function Func0838)
else
call IssueImmediateOrderById(loc_unit01,851972)
call ResetUnitAnimation(loc_unit01)
endif
call RemoveLocation(loc_location01)
set loc_location01=null
set loc_unit01=null
call RemoveLocation(temploc)
set temploc=null
endfunction
function Func0841 takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetAttacker()),udg_force01)==false)and(IsPlayerInForce(GetOwningPlayer(GetAttacker()),udg_force04)==false)and(IsUnitInGroup(GetAttacker(),udg_group28)==false)and(udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]==false)and(((udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]>0)or(IsUnitType(GetAttacker(),UNIT_TYPE_HERO)==false)))
endfunction
function Func0851 takes nothing returns nothing
local effect loc_effect01
set udg_unit06=GetAttacker()
if(((((GetUnitTypeId(GetAttacker())=='H000')or(GetUnitTypeId(GetAttacker())=='H011')or(GetUnitTypeId(GetAttacker())=='H00J')or(GetUnitTypeId(GetAttacker())=='H00I')or(GetUnitTypeId(GetAttacker())=='H00C')or(GetUnitTypeId(GetAttacker())=='H00D')))))then
call AddSpecialEffectTargetUnitBJ("weapon",udg_unit06,"war3mapImported\\Gunshot Effect.MDX")
set loc_effect01=bj_lastCreatedEffect
call DestroyEffect(loc_effect01)
endif
if(((((GetUnitTypeId(GetAttacker())=='H001')or(GetUnitTypeId(GetAttacker())=='H00P')))))then
call AddSpecialEffectTargetUnitBJ("weapon",udg_unit06,"war3mapImported\\MachineGunEffect.MDX")
set loc_effect01=bj_lastCreatedEffect
call DestroyEffect(loc_effect01)
endif
if(((((GetUnitTypeId(GetAttacker())=='H008')or(GetUnitTypeId(GetAttacker())=='H01I')))))then
call AddSpecialEffectTargetUnitBJ("weapon",udg_unit06,"war3mapImported\\SMG Gunshot.MDX")
set loc_effect01=bj_lastCreatedEffect
call DestroyEffect(loc_effect01)
endif
if(((GetUnitTypeId(GetAttacker())=='H00H')and(GetUnitAbilityLevelSwapped('A074',GetAttacker())==0)))then
call AddSpecialEffectTargetUnitBJ("weapon",udg_unit06,"war3mapImported\\SniperEffectAttachment.MDX")
set loc_effect01=bj_lastCreatedEffect
call DestroyEffect(loc_effect01)
endif
if(((((GetUnitTypeId(GetAttacker())=='H00N')))))then
call AddSpecialEffectTargetUnitBJ("weapon",udg_unit06,"war3mapImported\\ShotgunEffect.MDX")
set loc_effect01=bj_lastCreatedEffect
call DestroyEffect(loc_effect01)
endif
set loc_effect01=null
endfunction
function Func0852 takes nothing returns boolean
return(udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]==false)and IsUnitInGroup(GetAttacker(),udg_group28)==false and(udg_units01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]==GetAttacker())and(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]>0)and(IsPlayerInForce(GetOwningPlayer(GetAttacker()),udg_force01)==false)and(IsPlayerInForce(GetOwningPlayer(GetAttacker()),udg_force04)==false)
endfunction
function Func0853 takes nothing returns nothing
local unit loc_unit01=GetAttacker()
if GetUnitTypeId(GetAttacker())=='H00I'then
if GetRandomInt(1,2)==1 then
call SetSoundPosition(udg_sound77,GetUnitX(loc_unit01),GetUnitY(loc_unit01),10)
call StartSound(udg_sound77)
else
call SetSoundPosition(udg_sound78,GetUnitX(loc_unit01),GetUnitY(loc_unit01),10)
call StartSound(udg_sound78)
endif
endif
if GetUnitTypeId(GetAttacker())=='H00R'then
call SetSoundPosition(udg_sound12,GetUnitX(loc_unit01),GetUnitY(loc_unit01),10)
call StartSound(udg_sound12)
endif
endfunction
function Func0854 takes nothing returns boolean
local unit loc_unit01=GetAttacker()
return(udg_booleans06[(1+GetPlayerId(GetOwningPlayer(loc_unit01)))]==false)and IsUnitInGroup(GetAttacker(),udg_group28)==false and(udg_units01[(1+GetPlayerId(GetOwningPlayer(loc_unit01)))]==loc_unit01)and(IsPlayerInForce(GetOwningPlayer(loc_unit01),udg_force01)==false)and(IsPlayerInForce(GetOwningPlayer(loc_unit01),udg_force04)==false)and((udg_integers01[(1+GetPlayerId(GetOwningPlayer(loc_unit01)))]>0)or GetUnitTypeId(loc_unit01)=='H00U')
set loc_unit01=null
return false
endfunction
function Func0855 takes nothing returns nothing
local unit loc_unit01=GetAttacker()
local sound loc_sound01
if GetUnitTypeId(loc_unit01)=='H00D'or GetUnitTypeId(loc_unit01)=='H000'or GetUnitTypeId(loc_unit01)=='H00C'or GetUnitTypeId(loc_unit01)=='H011'then
if GetRandomInt(1,2)==1 then
set loc_sound01=udg_sound96
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
else
set loc_sound01=udg_sound97
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
endif
call StartSound(udg_sound33)
endif
if GetUnitTypeId(loc_unit01)=='H00J'then
if GetRandomInt(1,2)==1 then
set loc_sound01=udg_sound50
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
else
set loc_sound01=udg_sound51
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
endif
call StartSound(udg_sound31)
endif
if UnitHasItemOfTypeBJ(loc_unit01,'I00G')==false and GetUnitTypeId(loc_unit01)=='H001'or GetUnitTypeId(loc_unit01)=='H00P'then
if GetRandomInt(1,2)==1 then
set loc_sound01=udg_sound71
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
else
set loc_sound01=udg_sound72
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
endif
call StartSound(udg_sound35)
endif
if UnitHasItemOfTypeBJ(loc_unit01,'I00G')and GetUnitTypeId(loc_unit01)=='H001'or GetUnitTypeId(loc_unit01)=='H00P'then
if GetRandomInt(1,2)==1 then
set loc_sound01=udg_sound48
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
else
set loc_sound01=udg_sound49
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
endif
call StartSound(udg_sound36)
endif
if GetUnitTypeId(loc_unit01)=='H008'or GetUnitTypeId(GetAttacker())=='H01I'then
if GetRandomInt(1,2)==1 then
set loc_sound01=udg_sound110
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
else
set loc_sound01=udg_sound111
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
endif
call StartSound(udg_sound34)
endif
if GetUnitTypeId(loc_unit01)=='H00H'then
if GetUnitAbilityLevel(loc_unit01,'A074')!=0 then
if GetRandomInt(1,2)==1 then
set loc_sound01=udg_sound42
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
else
set loc_sound01=udg_sound43
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
endif
else
if GetRandomInt(1,2)==1 then
set loc_sound01=udg_sound40
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
else
set loc_sound01=udg_sound41
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
endif
call VXSleep(.2)
call StartSound(udg_sound32)
endif
endif
if GetUnitTypeId(loc_unit01)=='H00N'then
if UnitHasItemOfTypeBJ(GetAttacker(),'I00U')then
if GetRandomInt(1,3)==1 then
set loc_sound01=udg_sound06
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
else
if GetRandomInt(1,2)==1 then
set loc_sound01=udg_sound07
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
else
set loc_sound01=udg_sound08
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
endif
endif
else
if GetRandomInt(1,2)==1 then
set loc_sound01=udg_sound108
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
else
set loc_sound01=udg_sound109
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
endif
endif
call StartSound(udg_sound35)
endif
set loc_unit01=null
set loc_sound01=null
endfunction
function Func0856 takes nothing returns boolean
local unit loc_unit01=GetAttacker()
return IsUnitInGroup(loc_unit01,udg_group13)==false and IsUnitType(loc_unit01,UNIT_TYPE_HERO)==false
set loc_unit01=null
return false
endfunction
function Func0857 takes nothing returns nothing
local unit loc_unit01=GetAttacker()
local sound loc_sound01
if GetUnitTypeId(loc_unit01)=='h009'or GetUnitTypeId(loc_unit01)=='h00A'or GetUnitTypeId(loc_unit01)=='h019'then
if GetRandomInt(1,2)==1 then
set loc_sound01=udg_sound96
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
else
set loc_sound01=udg_sound97
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
endif
call StartSound(udg_sound33)
endif
if UnitHasItemOfTypeBJ(loc_unit01,'I00G')==false and GetUnitTypeId(loc_unit01)=='h00E'then
if GetRandomInt(1,2)==1 then
set loc_sound01=udg_sound71
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
else
set loc_sound01=udg_sound72
call SetSoundPosition(loc_sound01,GetUnitX(loc_unit01),GetUnitY(loc_unit01),10)
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
endif
call StartSound(udg_sound35)
endif
if UnitHasItemOfTypeBJ(loc_unit01,'I00G')and GetUnitTypeId(loc_unit01)=='H00E'then
if GetRandomInt(1,2)==1 then
set loc_sound01=udg_sound48
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
else
set loc_sound01=udg_sound49
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
endif
call StartSound(udg_sound36)
endif
if GetUnitTypeId(loc_unit01)=='H01E'then
call StartSound(udg_sound32)
endif
if GetUnitTypeId(loc_unit01)=='h017'or GetUnitTypeId(loc_unit01)=='h005'then
if UnitHasItemOfTypeBJ(GetAttacker(),'I00U')then
if GetRandomInt(1,3)==1 then
set loc_sound01=udg_sound06
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
else
if GetRandomInt(1,2)==1 then
set loc_sound01=udg_sound07
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
else
set loc_sound01=udg_sound08
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
endif
endif
else
if GetRandomInt(1,2)==1 then
set loc_sound01=udg_sound108
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
else
set loc_sound01=udg_sound109
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
endif
endif
call StartSound(udg_sound35)
endif
set loc_unit01=null
set loc_sound01=null
endfunction
function Func0866 takes nothing returns nothing
local unit loc_unit01
local sound loc_sound01
if IsUnitType(GetAttacker(),UNIT_TYPE_HERO)and GetPlayerController(GetOwningPlayer(GetAttacker()))==MAP_CONTROL_USER and GetUnitTypeId(GetAttacker())!='H00U'and(IsPlayerInForce(GetOwningPlayer(GetAttacker()),udg_force01)or udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]or(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]==0)or IsUnitInGroup(GetAttacker(),udg_group28))then
set loc_unit01=GetAttacker()
call IssueImmediateOrderById(GetAttacker(),851993)
if(((IsPlayerInForce(GetOwningPlayer(GetAttacker()),udg_force01))))then
set loc_sound01=udg_sound137
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
if(((udg_booleans04[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]==false)))then
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetAttacker())),5.,"Weapon jammed. Press Z then A to unjam.")
set udg_booleans04[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]=true
call TriggerSleepAction(4.)
set udg_booleans04[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]=false
endif
endif
if(((udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]==0)and(GetUnitTypeId(GetAttacker())!='H00U')))then
set loc_sound01=udg_sound17
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
if(((udg_booleans05[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]==false)))then
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetAttacker())),1.5,"Magazine is empty.")
set udg_booleans05[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]=true
call TriggerSleepAction(4.)
set udg_booleans05[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]=false
endif
endif
endif
if(((GetPlayerController(GetOwningPlayer(GetAttacker()))==MAP_CONTROL_USER)and(GetUnitTypeId(GetAttacker())=='H00U')and(GetPlayerState(GetOwningPlayer(GetAttacker()),PLAYER_STATE_RESOURCE_LUMBER)==0)))then
call IssueImmediateOrderById(GetAttacker(),851993)
if(((udg_booleans05[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]==false)))then
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetAttacker())),1.5,"Out of fuel.")
set udg_booleans05[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]=true
call TriggerSleepAction(4.)
set udg_booleans05[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]=false
endif
endif
set loc_unit01=null
set loc_sound01=null
endfunction
function Func0867 takes nothing returns boolean
return(IsUnitInGroup(GetAttacker(),udg_group28)==false)and(IsPlayerInForce(GetOwningPlayer(GetAttacker()),udg_force03))and(udg_integers11[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]>=3)
endfunction
function Func0869 takes nothing returns nothing
set udg_integers11[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]=0
call ForceAddPlayer(udg_force04,GetOwningPlayer(GetAttacker()))
call SetUnitAbilityLevelSwapped('A042',GetAttacker(),2)
call SetUnitAbilityLevelSwapped('A034',GetAttacker(),2)
if(((UnitHasBuffBJ(GetAttacker(),'B00O')==false)))then
call TriggerSleepAction(GetRandomReal(.15,.5))
else
call TriggerSleepAction(GetRandomReal(.05,.1))
endif
call ForceRemovePlayer(udg_force04,GetOwningPlayer(GetAttacker()))
call SetUnitAbilityLevelSwapped('A042',GetAttacker(),1)
call SetUnitAbilityLevelSwapped('A034',GetAttacker(),1)
endfunction
function Func0870 takes nothing returns boolean
return(IsUnitType(GetAttacker(),UNIT_TYPE_HERO))and(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]>0)and(GetPlayerController(GetOwningPlayer(GetAttacker()))==MAP_CONTROL_USER)and(IsPlayerInForce(GetOwningPlayer(GetAttacker()),udg_force01)==false)and(IsPlayerInForce(GetOwningPlayer(GetAttacker()),udg_force04)==false)and(IsPlayerInForce(GetOwningPlayer(GetAttacker()),udg_force03))and(IsUnitInGroup(GetAttacker(),udg_group28)==false)
endfunction
function Func0871 takes nothing returns nothing
set udg_integers11[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]=(udg_integers11[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]+1)
endfunction
function Func0881 takes nothing returns nothing
local effect loc_effect01
local integer loc_integer01
local unit loc_unit01=GetAttacker()
local sound loc_sound01
local sound loc_sound02
local sound loc_sound03=udg_sound93
if(((IsUnitInGroup(GetAttacker(),udg_group13)==false)and(GetUnitStateSwap(UNIT_STATE_MANA,GetAttacker())==.0)and(((GetUnitTypeId(GetAttacker())=='h00A')or(GetUnitTypeId(GetAttacker())=='h009')or(GetUnitTypeId(GetAttacker())=='h00E')or(GetUnitTypeId(GetAttacker())=='h014')or(GetUnitTypeId(GetAttacker())=='h018')or(GetUnitTypeId(GetAttacker())=='h019')or(GetUnitTypeId(GetAttacker())=='h017')or(GetUnitTypeId(GetAttacker())=='h01A')or(GetUnitTypeId(GetAttacker())=='h01D')or(GetUnitTypeId(GetAttacker())=='h01E')))))then
call GroupAddUnit(udg_group13,loc_unit01)
set loc_effect01=AddSpecialEffectTargetUnitBJ("overhead",loc_unit01,"Abilities\\Spells\\Human\\ManaFlare\\ManaFlareTarget.mdl")
call SetUnitManaPercentBJ(loc_unit01,.0)
set loc_sound01=udg_sound95
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
call CreateTextTagUnitBJ((("|cff804000"+GetUnitName(loc_unit01))+":|r Reloading!"),loc_unit01,0,8.,100,100,100,10.)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,4.)
call TriggerSleepAction((4.*(1-(.05*I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),GetAttacker()))))))
set loc_sound02=udg_sound94
call PlaySoundOnUnitBJ(loc_sound02,100,loc_unit01)
call TriggerSleepAction(1.)
call PlaySoundOnUnitBJ(loc_sound03,100,loc_unit01)
call TriggerSleepAction(.3)
call DestroyEffect(loc_effect01)
call GroupRemoveUnit(udg_group13,loc_unit01)
call SetUnitManaPercentBJ(loc_unit01,100.)
endif
if(((IsUnitInGroup(GetAttacker(),udg_group13)==false)and(GetUnitStateSwap(UNIT_STATE_MANA,GetAttacker())==.0)and(GetUnitTypeId(GetAttacker())=='h005')))then
call GroupAddUnit(udg_group13,loc_unit01)
set loc_effect01=AddSpecialEffectTargetUnitBJ("overhead",loc_unit01,"Abilities\\Spells\\Human\\ManaFlare\\ManaFlareTarget.mdl")
call SetUnitManaPercentBJ(loc_unit01,.0)
call CreateTextTagUnitBJ((("|cff804000"+GetUnitName(loc_unit01))+":|r Reloading!"),loc_unit01,0,8.,100,100,100,10.)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,4.)
set loc_sound01=udg_sound107
set loc_sound02=udg_sound106
set loc_integer01=1
loop
exitwhen loc_integer01>8
if(((IsUnitAliveBJ(GetAttacker()))))then
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
endif
call SetUnitManaBJ(loc_unit01,(GetUnitStateSwap(UNIT_STATE_MANA,loc_unit01)+1))
call VXSleep(.6)
set loc_integer01=loc_integer01+1
endloop
call TriggerSleepAction(.6)
if(((IsUnitAliveBJ(GetAttacker()))))then
call PlaySoundOnUnitBJ(loc_sound02,100,loc_unit01)
endif
call DestroyEffect(loc_effect01)
call VXSleep(.5)
call GroupRemoveUnit(udg_group13,loc_unit01)
call SetUnitManaBJ(loc_unit01,8.)
endif
if(((((GetUnitStateSwap(UNIT_STATE_MANA,GetAttacker())==.0)or(IsUnitInGroup(GetAttacker(),udg_group13))or(IsUnitInGroup(GetAttacker(),udg_group28))))and(((GetUnitTypeId(GetAttacker())=='h005')or(GetUnitTypeId(GetAttacker())=='h00A')or(GetUnitTypeId(GetAttacker())=='h009')or(GetUnitTypeId(GetAttacker())=='h00V')or(GetUnitTypeId(GetAttacker())=='h00E')or(GetUnitTypeId(GetAttacker())=='h004')or(GetUnitTypeId(GetAttacker())=='h01O')or(GetUnitTypeId(GetAttacker())=='h014')or(GetUnitTypeId(GetAttacker())=='h018')or(GetUnitTypeId(GetAttacker())=='h017')or(GetUnitTypeId(GetAttacker())=='h019')or(GetUnitTypeId(GetAttacker())=='h01A')or(GetUnitTypeId(GetAttacker())=='h01D')or(GetUnitTypeId(GetAttacker())=='h01E')or(GetUnitTypeId(GetAttacker())=='h00K')))))then
call IssueImmediateOrderById(loc_unit01,851972)
call IssueImmediateOrderById(loc_unit01,851993)
endif
if(((GetUnitStateSwap(UNIT_STATE_MANA,GetAttacker())>=1.)and(((GetUnitTypeId(GetAttacker())=='h005')or(GetUnitTypeId(GetAttacker())=='h00A')or(GetUnitTypeId(GetAttacker())=='h009')or(GetUnitTypeId(GetAttacker())=='h00E')or(GetUnitTypeId(GetAttacker())=='h004')or(GetUnitTypeId(GetAttacker())=='h01O')or(GetUnitTypeId(GetAttacker())=='h014')or(GetUnitTypeId(GetAttacker())=='h017')or(GetUnitTypeId(GetAttacker())=='h018')or(GetUnitTypeId(GetAttacker())=='h019')or(GetUnitTypeId(GetAttacker())=='h00V')or(GetUnitTypeId(GetAttacker())=='h01A')or(GetUnitTypeId(GetAttacker())=='h01D')or(GetUnitTypeId(GetAttacker())=='h01E')or(GetUnitTypeId(GetAttacker())=='h00K')))and(not(IsUnitInGroup(GetAttacker(),udg_group13)))))then
call SetUnitManaBJ(loc_unit01,(GetUnitStateSwap(UNIT_STATE_MANA,loc_unit01)-1))
endif
set loc_unit01=null
set loc_effect01=null
set loc_sound01=null
set loc_sound02=null
set loc_sound03=null
endfunction
function Func0882 takes nothing returns boolean
return(GetSpellAbilityId()=='A00C')and(IsUnitInGroup(GetTriggerUnit(),udg_group13)==false)and(udg_units01[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]!=GetTriggerUnit())
endfunction
function Func0885 takes nothing returns nothing
local effect loc_effect01
local unit loc_unit01=GetTriggerUnit()
local sound loc_sound01=udg_sound95
local sound loc_sound02=udg_sound94
local sound loc_sound03=udg_sound93
call GroupAddUnit(udg_group13,GetTriggerUnit())
call AddSpecialEffectTargetUnitBJ("overhead",GetTriggerUnit(),"Abilities\\Spells\\Human\\ManaFlare\\ManaFlareTarget.mdl")
set loc_effect01=bj_lastCreatedEffect
call SetUnitManaPercentBJ(GetTriggerUnit(),.0)
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
call CreateTextTagUnitBJ((("|cff804000"+GetUnitName(GetTriggerUnit()))+":|r Reloading!"),GetTriggerUnit(),0,8.,100,100,100,10.)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,4.)
if(((((GetUnitTypeId(GetTriggerUnit())=='h00E')))))then
call TriggerSleepAction((6.*(1-(.05*I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),GetTriggerUnit()))))))
else
call TriggerSleepAction((4.*(1-(.05*I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),GetTriggerUnit()))))))
endif
call PlaySoundOnUnitBJ(loc_sound02,100,loc_unit01)
call TriggerSleepAction(1.)
call PlaySoundOnUnitBJ(loc_sound03,100,loc_unit01)
call TriggerSleepAction(.3)
call SetUnitManaPercentBJ(GetTriggerUnit(),100)
call DestroyEffect(loc_effect01)
call GroupRemoveUnit(udg_group13,GetTriggerUnit())
set loc_unit01=null
set loc_effect01=null
set loc_sound01=null
set loc_sound02=null
set loc_sound03=null
endfunction
function Func0890 takes nothing returns boolean
return IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()),GetOwningPlayer(GetFilterUnit()))and IsUnitAliveBJ(GetFilterUnit())
endfunction
function Func0891 takes nothing returns nothing
local location temploc=GetUnitLoc(GetEnumUnit())
local group loc_group01=UAUnitGroupWithinRangeOfLocMatching(250.,temploc,Condition(function Func0890))
local unit loc_unit01=GroupPickRandomUnit(loc_group01)
local boolean b = false
// MORE ZOMBIE PLAYERS
set b = b or IsUnitVisible(GetEnumUnit(),Player(27))
set b = b or IsUnitVisible(GetEnumUnit(),Player(12))
set b = b or IsUnitVisible(GetEnumUnit(),Player(13))
set b = b or IsUnitVisible(GetEnumUnit(),Player(14))
set b = b or IsUnitVisible(GetEnumUnit(),Player(15))
//set b = b or IsUnitVisible(GetEnumUnit(),Player(16))
//set b = b or IsUnitVisible(GetEnumUnit(),Player(17))
//set b = b or IsUnitVisible(GetEnumUnit(),Player(18))
//set b = b or IsUnitVisible(GetEnumUnit(),Player(19))
//set b = b or IsUnitVisible(GetEnumUnit(),Player(20))
//set b = b or IsUnitVisible(GetEnumUnit(),Player(21))
//set b = b or IsUnitVisible(GetEnumUnit(),Player(22))
//set b = b or IsUnitVisible(GetEnumUnit(),Player(23))
// ----
if(loc_unit01!=null and b and not IsUnitHidden(GetEnumUnit()))then
call GroupAddUnit(udg_group18,GetEnumUnit())
call UnitAddAbility(GetEnumUnit(),'A043')
call SetUnitTimeScalePercent(GetEnumUnit(),125.)
if udg_booleans09[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]then
call SetUnitAnimation(GetEnumUnit(),"spell throw defend")
else
call SetUnitAnimation(GetEnumUnit(),"spell")
endif
call CreateNUnitsAtLoc(1,'h00W',GetOwningPlayer(GetEnumUnit()),temploc,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(3.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,851983,loc_unit01)
set loc_unit01=null
endif
call DestroyGroup(loc_group01)
call RemoveLocation(temploc)
set temploc=null
endfunction
function Func0892 takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'A043')
call SetUnitTimeScalePercent(GetEnumUnit(),100.)
call ResetUnitAnimation(GetEnumUnit())
call GroupRemoveUnit(udg_group18,GetEnumUnit())
endfunction
function Func0893 takes nothing returns nothing
call ForGroup(udg_group17,function Func0891)
call VXSleep(.08)
call ForGroup(udg_group18,function Func0892)
endfunction
function Func0894 takes nothing returns boolean
return(GetSpellAbilityId()=='A041')
endfunction
function Func0897 takes nothing returns nothing
if(((IsUnitInGroup(GetTriggerUnit(),udg_group17))))then
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetTriggerUnit())),8.,"Rifle butting |cffCD0000OFF|r")
call GroupRemoveUnit(udg_group17,GetTriggerUnit())
else
if(((IsUnitInGroup(GetTriggerUnit(),udg_group17)==false)))then
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetTriggerUnit())),8.,"Rifle butting |cff00CD00ON|r")
call GroupAddUnit(udg_group17,GetTriggerUnit())
endif
endif
endfunction
function Func0898 takes nothing returns boolean
return(IsUnitInGroup(GetDyingUnit(),udg_group17))
endfunction
function Func0899 takes nothing returns nothing
call GroupRemoveUnit(udg_group17,GetDyingUnit())
endfunction
function Func0900 takes nothing returns boolean
return(GetSpellAbilityId()=='A035')
endfunction
function Func0909 takes nothing returns nothing
local unit loc_unit01=GetTriggerUnit()
local sound loc_sound01=udg_sound117
if(((IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),udg_force07))))then
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetTriggerUnit())),3.,"|cffffcc00Fire mode:|r Burst")
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
call UnitRemoveAbility(GetTriggerUnit(),'A04H')
call UnitRemoveAbility(GetTriggerUnit(),'A04I')
call UnitRemoveAbility(GetTriggerUnit(),'A034')
call UnitRemoveAbility(GetTriggerUnit(),'A042')
if(((((GetUnitTypeId(GetTriggerUnit())=='H008')))))then
call UnitAddAbility(GetTriggerUnit(),'A034')
else
call UnitAddAbility(GetTriggerUnit(),'A042')
endif
call ForceRemovePlayer(udg_force07,GetOwningPlayer(GetTriggerUnit()))
call ForceAddPlayer(udg_force03,GetOwningPlayer(GetTriggerUnit()))
return
endif
if(((IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),udg_force03))and(GetPlayerTechCountSimple('R00B',GetOwningPlayer(GetTriggerUnit()))<5)))then
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetTriggerUnit())),3.,"|cffffcc00Fire mode:|r Single")
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
call UnitRemoveAbility(GetTriggerUnit(),'A04H')
call UnitRemoveAbility(GetTriggerUnit(),'A04I')
call UnitRemoveAbility(GetTriggerUnit(),'A034')
call UnitRemoveAbility(GetTriggerUnit(),'A042')
call ForceRemovePlayer(udg_force03,GetOwningPlayer(GetTriggerUnit()))
call ForceAddPlayer(udg_force07,GetOwningPlayer(GetTriggerUnit()))
return
endif
if(((IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),udg_force03))and(GetPlayerTechCountSimple('R00B',GetOwningPlayer(GetTriggerUnit()))>=5)))then
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetTriggerUnit())),3.,"|cffffcc00Fire mode:|r Automatic")
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
call UnitRemoveAbility(GetTriggerUnit(),'A04H')
call UnitRemoveAbility(GetTriggerUnit(),'A04I')
call UnitRemoveAbility(GetTriggerUnit(),'A034')
call UnitRemoveAbility(GetTriggerUnit(),'A042')
if(((((GetUnitTypeId(GetTriggerUnit())=='H008')))))then
call UnitAddAbility(GetTriggerUnit(),'A04I')
else
call UnitAddAbility(GetTriggerUnit(),'A04H')
endif
call ForceRemovePlayer(udg_force03,GetOwningPlayer(GetTriggerUnit()))
call ForceAddPlayer(udg_force06,GetOwningPlayer(GetTriggerUnit()))
return
endif
if(((IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),udg_force06))))then
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetTriggerUnit())),3.,"|cffffcc00Fire mode:|r Single")
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
call UnitRemoveAbility(GetTriggerUnit(),'A04H')
call UnitRemoveAbility(GetTriggerUnit(),'A04I')
call UnitRemoveAbility(GetTriggerUnit(),'A034')
call UnitRemoveAbility(GetTriggerUnit(),'A042')
call ForceRemovePlayer(udg_force06,GetOwningPlayer(GetTriggerUnit()))
call ForceAddPlayer(udg_force07,GetOwningPlayer(GetTriggerUnit()))
return
endif
set loc_unit01=null
set loc_sound01=null
endfunction
function Func0910 takes nothing returns boolean
return(GetSpellAbilityId()=='A078')
endfunction
function Func0912 takes nothing returns nothing
if(((IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),udg_force08)==false)))then
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetTriggerUnit())),8.,"Opportuned shot |cff00CD00ON|r")
call ForceAddPlayer(udg_force08,GetOwningPlayer(GetTriggerUnit()))
call UnitAddAbility(GetTriggerUnit(),'A079')
call SetUnitAbilityLevelSwapped('A079',GetTriggerUnit(),2)
else
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetTriggerUnit())),8.,"Opportuned shot |cffCD0000OFF|r")
call ForceRemovePlayer(udg_force08,GetOwningPlayer(GetTriggerUnit()))
call UnitRemoveAbility(GetTriggerUnit(),'A079')
endif
endfunction
function Func0913 takes nothing returns boolean
return(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]>0)and(IsPlayerInForce(GetOwningPlayer(GetAttacker()),udg_force01)==false)and(IsPlayerInForce(GetOwningPlayer(GetAttacker()),udg_force08))and(IsUnitInGroup(GetAttacker(),udg_group28)==false)
endfunction
function Func0915 takes nothing returns nothing
if(((GetUnitAbilityLevelSwapped('A079',GetAttacker())!=1)))then
call SetUnitAbilityLevelSwapped('A079',GetAttacker(),GetRandomInt(1,3))
else
call SetUnitAbilityLevelSwapped('A079',GetAttacker(),GetRandomInt(2,3))
endif
endfunction
function Func0917 takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((GetRandomInt(1,(950*(1+GetUnitAbilityLevel(GetAttacker(),'A00D'))))==1)and(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]>0)and(GetAttacker()==udg_units01[bj_forLoopAIndex])and(GetUnitTypeId(GetAttacker())!='H00U')and(GetUnitTypeId(GetAttacker())!='H00I')and(GetUnitTypeId(GetAttacker())!='H00J')and(GetUnitTypeId(GetAttacker())!='H00R')))then
call ForceAddPlayer(udg_force01,GetOwningPlayer(GetAttacker()))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func0918 takes nothing returns boolean
return(GetSpellAbilityId()=='A00B')and(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),udg_force01))
endfunction
function Func0922 takes nothing returns nothing
local effect loc_effect01
local unit loc_unit01=GetTriggerUnit()
local sound loc_sound01=udg_sound94
local sound loc_sound02=udg_sound93
call AddSpecialEffectTargetUnitBJ("overhead",GetTriggerUnit(),"Abilities\\Spells\\Human\\ManaFlare\\ManaFlareTarget.mdl")
set loc_effect01=bj_lastCreatedEffect
call TriggerSleepAction(.2)
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
if(((((GetUnitTypeId(GetTriggerUnit())=='H001')or(GetUnitTypeId(GetTriggerUnit())=='H00P')))))then
call TriggerSleepAction((1.7-(I2R(GetUnitAbilityLevelSwapped('A00L',GetTriggerUnit()))*.15)))
else
if(((GetUnitTypeId(GetTriggerUnit())=='H00H')))then
call TriggerSleepAction((1.7-(I2R(GetUnitAbilityLevelSwapped('A01X',GetTriggerUnit()))*.15)))
else
call TriggerSleepAction((1.7-(I2R(GetUnitAbilityLevelSwapped('A00D',GetTriggerUnit()))*.15)))
endif
endif
call PlaySoundOnUnitBJ(loc_sound02,100,loc_unit01)
call TriggerSleepAction(.2)
call DestroyEffect(loc_effect01)
call ForceRemovePlayer(udg_force01,GetOwningPlayer(GetTriggerUnit()))
set loc_unit01=null
set loc_effect01=null
set loc_sound01=null
set loc_sound02=null
endfunction
function Func0923 takes nothing returns boolean
return(udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]==false)and(GetPlayerState(GetOwningPlayer(GetAttacker()),PLAYER_STATE_RESOURCE_LUMBER)>(0+GetUnitAbilityLevelSwapped('A05B',GetTriggerUnit())))and(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]==0)and(udg_units01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]==GetAttacker())and(GetUnitTypeId(GetAttacker())!='H00U')and(GetUnitTypeId(GetAttacker())!='H00R')and(GetUnitTypeId(GetAttacker())!='H00I')
endfunction
function Func0931 takes nothing returns nothing
local effect loc_effect01
local unit loc_unit01=GetAttacker()
local sound loc_sound01=udg_sound95
local sound loc_sound02=udg_sound94
local sound loc_sound03=udg_sound93
set udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]=true
call AddSpecialEffectTargetUnitBJ("overhead",GetAttacker(),"Abilities\\Spells\\Human\\ManaFlare\\ManaFlareTarget.mdl")
set loc_effect01=bj_lastCreatedEffect
call AdjustPlayerStateBJ((-1-GetUnitAbilityLevelSwapped('A05B',GetAttacker())),GetOwningPlayer(GetAttacker()),PLAYER_STATE_RESOURCE_LUMBER)
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
call CreateTextTagUnitBJ((("|cff804000"+GetPlayerName(GetOwningPlayer(GetAttacker())))+":|r Reloading!"),GetAttacker(),0,8.,100,100,100,10.)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,4.)
if(((((GetUnitTypeId(GetAttacker())=='H001')or(GetUnitTypeId(GetAttacker())=='H00P')))))then
call TriggerSleepAction(((6.-(I2R(GetUnitAbilityLevelSwapped('A00L',GetAttacker()))*.6))*(1-(.05*I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),GetAttacker()))))))
endif
if(((GetUnitTypeId(GetAttacker())=='H00H')))then
call TriggerSleepAction(((5.-(I2R(GetUnitAbilityLevelSwapped('A01X',GetAttacker()))*.6))*(1-(.05*I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),GetAttacker()))))))
endif
if(((((GetUnitTypeId(GetAttacker())=='H000')or(GetUnitTypeId(GetAttacker())=='H01I')or(GetUnitTypeId(GetAttacker())=='H011')or(GetUnitTypeId(GetAttacker())=='H00C')or(GetUnitTypeId(GetAttacker())=='H00D')or(GetUnitTypeId(GetAttacker())=='H00N')))))then
call TriggerSleepAction(((4.-(I2R(GetUnitAbilityLevelSwapped('A00D',GetAttacker()))*.6))*(1-(.05*I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),GetAttacker()))))))
endif
if(((((GetUnitTypeId(GetAttacker())=='H008')or(GetUnitTypeId(GetAttacker())=='H00J')))))then
call TriggerSleepAction((2.*(1-(.05*I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),GetAttacker()))))))
endif
call PlaySoundOnUnitBJ(loc_sound02,100,loc_unit01)
call TriggerSleepAction(1.)
call PlaySoundOnUnitBJ(loc_sound03,100,loc_unit01)
call TriggerSleepAction(.5)
call ForceRemovePlayer(udg_force01,GetOwningPlayer(GetAttacker()))
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]=udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]
call DestroyEffect(loc_effect01)
set udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]=false
set loc_unit01=null
set loc_effect01=null
set loc_sound01=null
set loc_sound02=null
set loc_sound03=null
endfunction
function Func0933 takes nothing returns boolean
return(udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]==false)and(udg_units01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]==GetAttacker())and(GetPlayerState(GetOwningPlayer(GetAttacker()),PLAYER_STATE_RESOURCE_LUMBER)>0)and(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]==0)and(((GetUnitTypeId(GetAttacker())=='H00I')or(GetUnitTypeId(GetAttacker())=='H00R')))
endfunction
function Func0938 takes nothing returns nothing
local effect loc_effect01
local unit loc_unit01=GetAttacker()
local sound loc_sound01=udg_sound79
set udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]=true
call AddSpecialEffectTargetUnitBJ("overhead",GetAttacker(),"Abilities\\Spells\\Human\\ManaFlare\\ManaFlareTarget.mdl")
set loc_effect01=bj_lastCreatedEffect
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]=0
call AdjustPlayerStateBJ(-1,GetOwningPlayer(GetAttacker()),PLAYER_STATE_RESOURCE_LUMBER)
call CreateTextTagUnitBJ((("|cff804000"+GetPlayerName(GetOwningPlayer(GetAttacker())))+":|r Reloading!"),GetAttacker(),0,8.,100,100,100,10.)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,4.)
call TriggerSleepAction(.2)
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
if(((((GetUnitTypeId(GetAttacker())=='H00R')))))then
call TriggerSleepAction((3.*(1-(.05*I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),GetAttacker()))))))
endif
if(((((GetUnitTypeId(GetAttacker())=='H00I')))))then
call TriggerSleepAction((2.4*(1-(.05*I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),GetAttacker()))))))
endif
call ForceRemovePlayer(udg_force01,GetOwningPlayer(GetAttacker()))
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]=udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]
call DestroyEffect(loc_effect01)
set udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]=false
set loc_unit01=null
set loc_effect01=null
set loc_sound01=null
endfunction
function Func0941 takes nothing returns nothing
if(((IsUnitType(GetAttacker(),UNIT_TYPE_HERO))and(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]>0)and(GetPlayerController(GetOwningPlayer(GetAttacker()))==MAP_CONTROL_USER)and(IsPlayerInForce(GetOwningPlayer(GetAttacker()),udg_force01)==false)and(IsPlayerInForce(GetOwningPlayer(GetAttacker()),udg_force04)==false)and(udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]==false)and(IsUnitInGroup(GetAttacker(),udg_group28)==false)))then
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]=(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]-1)
endif
if(((GetUnitTypeId(GetAttacker())=='H00U')and(IsUnitType(GetAttacker(),UNIT_TYPE_HERO))and(GetPlayerState(GetOwningPlayer(GetAttacker()),PLAYER_STATE_RESOURCE_LUMBER)>0)and(GetPlayerController(GetOwningPlayer(GetAttacker()))==MAP_CONTROL_USER)and(udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetAttacker())))]==false)and(GetRandomInt(1,3)==1)))then
call AdjustPlayerStateBJ(-1,GetOwningPlayer(GetAttacker()),PLAYER_STATE_RESOURCE_LUMBER)
endif
endfunction
function Func0942 takes nothing returns boolean
return(GetSpellAbilityId()=='A00V')
endfunction
function Func0960 takes nothing returns nothing
local unit loc_unit01=GetTriggerUnit()
local sound loc_sound01
if(((GetUnitTypeId(GetTriggerUnit())=='H00U')and(GetPlayerState(GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_LUMBER)>=75)))then
call AdjustPlayerStateBJ(-75,GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_LUMBER)
set loc_sound01=udg_sound47
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((((((GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex))=='I000')and(GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex))<3)))or(((GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex))=='I00S')and(GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex))<10)))))))then
call SetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex),(GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex))+1))
return
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call UnitAddItemByIdSwapped('I000',GetTriggerUnit())
endif
if(((((GetUnitTypeId(GetTriggerUnit())=='H000')or(GetUnitTypeId(GetTriggerUnit())=='H011')or(GetUnitTypeId(GetTriggerUnit())=='H00I')or(GetUnitTypeId(GetTriggerUnit())=='H00H')or(GetUnitTypeId(GetTriggerUnit())=='H00C')or(GetUnitTypeId(GetTriggerUnit())=='H00D')or(GetUnitTypeId(GetTriggerUnit())=='H00J')or(GetUnitTypeId(GetTriggerUnit())=='H00N')or(GetUnitTypeId(GetTriggerUnit())=='H001')or(GetUnitTypeId(GetTriggerUnit())=='H00P')))and(GetPlayerState(GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_LUMBER)>=2)))then
call AdjustPlayerStateBJ(-2,GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_LUMBER)
set loc_sound01=udg_sound95
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((((((GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex))=='I000')and(GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex))<3)))or(((GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex))=='I00S')and(GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex))<10)))))))then
call SetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex),(GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex))+1))
return
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call UnitAddItemByIdSwapped('I000',GetTriggerUnit())
endif
if(((((GetUnitTypeId(GetTriggerUnit())=='H008')or(GetUnitTypeId(GetTriggerUnit())=='H01I')or(GetUnitTypeId(GetTriggerUnit())=='H00R')))and(GetPlayerState(GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_LUMBER)>=3)))then
call AdjustPlayerStateBJ(-3,GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_LUMBER)
set loc_sound01=udg_sound95
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((((((GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex))=='I000')and(GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex))<3)))or(((GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex))=='I00S')and(GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex))<10)))))))then
call SetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex),(GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(),bj_forLoopAIndex))+1))
return
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call UnitAddItemByIdSwapped('I000',GetTriggerUnit())
endif
set loc_unit01=null
set loc_sound01=null
endfunction
function Func0962 takes nothing returns boolean
return(((GetItemTypeId(GetManipulatedItem())=='I000')or(GetItemTypeId(GetManipulatedItem())=='I00S')))
endfunction
function Func0969 takes nothing returns nothing
//if(((GetUnitTypeId(GetManipulatingUnit())=='h00K')))then
//call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetManipulatingUnit())),10.,"Only soldiers can use magazines.")
//call UnitAddItemByIdSwapped('I000',GetManipulatingUnit())
//endif
if(((GetUnitTypeId(GetTriggerUnit())=='H00U')))then
call UnitAddItemByIdSwapped('I011',GetManipulatingUnit())
endif
if(((((GetUnitTypeId(GetManipulatingUnit())=='H000')or(GetUnitTypeId(GetManipulatingUnit())=='H011')or(GetUnitTypeId(GetManipulatingUnit())=='H00I')or(GetUnitTypeId(GetManipulatingUnit())=='H00H')or(GetUnitTypeId(GetManipulatingUnit())=='H00C')or(GetUnitTypeId(GetManipulatingUnit())=='H00D')or(GetUnitTypeId(GetManipulatingUnit())=='H00J')or(GetUnitTypeId(GetManipulatingUnit())=='H00N')or(GetUnitTypeId(GetManipulatingUnit())=='H001')or(GetUnitTypeId(GetManipulatingUnit())=='H00P')))))then
call UnitAddItemByIdSwapped('I00Z',GetManipulatingUnit())
endif
if(((((GetUnitTypeId(GetManipulatingUnit())=='H00R')or(GetUnitTypeId(GetManipulatingUnit())=='H008')or(GetUnitTypeId(GetManipulatingUnit())=='H01I')))))then
call UnitAddItemByIdSwapped('I010',GetManipulatingUnit())
endif
endfunction
function Func0970 takes nothing returns boolean
return(GetSpellAbilityId()=='A00C')and(udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]==false)and(udg_units01[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]==GetTriggerUnit())and(GetUnitTypeId(GetTriggerUnit())!='H00R')and(GetUnitTypeId(GetTriggerUnit())!='H00I')
endfunction
function Func0979 takes nothing returns nothing
local effect loc_effect01
local unit loc_unit01=GetTriggerUnit()
local sound loc_sound01=udg_sound95
local sound loc_sound02=udg_sound94
local sound loc_sound03=udg_sound93
local boolean loc_boolean01=GetUnitState(GetTriggerUnit(),UNIT_STATE_MANA)==0
if(((GetPlayerState(GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_LUMBER)>(0+GetUnitAbilityLevelSwapped('A05B',GetTriggerUnit())))))then
set udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=true
call AddSpecialEffectTargetUnitBJ("overhead",GetTriggerUnit(),"Abilities\\Spells\\Human\\ManaFlare\\ManaFlareTarget.mdl")
set loc_effect01=bj_lastCreatedEffect
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=0
call AdjustPlayerStateBJ((-1-GetUnitAbilityLevelSwapped('A05B',GetTriggerUnit())),GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_LUMBER)
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
call CreateTextTagUnitBJ((("|cff804000"+GetPlayerName(GetOwningPlayer(GetTriggerUnit())))+":|r Reloading!"),GetTriggerUnit(),0,8.,100,100,100,10.)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,4.)
if(((((GetUnitTypeId(GetTriggerUnit())=='H001')or(GetUnitTypeId(GetTriggerUnit())=='H00P')))))then
call TriggerSleepAction(((6.-(I2R(GetUnitAbilityLevelSwapped('A00L',GetTriggerUnit()))*.6))*(1-(.05*I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),GetTriggerUnit()))))))
endif
if(((GetUnitTypeId(GetTriggerUnit())=='H00H')))then
call TriggerSleepAction(((5.-(I2R(GetUnitAbilityLevelSwapped('A01X',GetTriggerUnit()))*.6))*(1-(.05*I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),GetTriggerUnit()))))))
endif
if(((((GetUnitTypeId(GetTriggerUnit())=='H000')or(GetUnitTypeId(GetTriggerUnit())=='H01I')or(GetUnitTypeId(GetTriggerUnit())=='H011')or(GetUnitTypeId(GetTriggerUnit())=='H00C')or(GetUnitTypeId(GetTriggerUnit())=='H00D')or(GetUnitTypeId(GetTriggerUnit())=='H00N')))))then
call TriggerSleepAction(((4.-(I2R(GetUnitAbilityLevelSwapped('A00D',GetTriggerUnit()))*.6))*(1-(.05*I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),GetTriggerUnit()))))))
endif
if(((((GetUnitTypeId(GetTriggerUnit())=='H008')or(GetUnitTypeId(GetTriggerUnit())=='H00J')))))then
call TriggerSleepAction((2.*(1-(.05*I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),GetTriggerUnit()))))))
endif
if(GetUnitTypeId(GetTriggerUnit())=='H01P')then
call TriggerSleepAction(((4.-(I2R(GetUnitAbilityLevelSwapped('A00D',GetTriggerUnit()))*.6))*(1-(.05*I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),GetTriggerUnit()))))))
endif
call PlaySoundOnUnitBJ(loc_sound02,100,loc_unit01)
call TriggerSleepAction(1.)
if loc_boolean01 then
call PlaySoundOnUnitBJ(loc_sound03,100,loc_unit01)
call VXSleep(.5)
endif
call ForceRemovePlayer(udg_force01,GetOwningPlayer(GetTriggerUnit()))
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]
call DestroyEffect(loc_effect01)
set udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=false
else
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetTriggerUnit())),5.,"Not enough magazines.")
endif
set loc_unit01=null
set loc_effect01=null
set loc_sound01=null
set loc_sound02=null
set loc_sound03=null
endfunction
function Func0981 takes nothing returns boolean
return(GetSpellAbilityId()=='A00C')and(udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]==false)and(udg_units01[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]==GetTriggerUnit())and(((GetUnitTypeId(GetTriggerUnit())=='H00I')or(GetUnitTypeId(GetTriggerUnit())=='H00R')))
endfunction
function Func0987 takes nothing returns nothing
local effect loc_effect01
local unit loc_unit01=GetTriggerUnit()
local sound loc_sound01=udg_sound79
if(((GetPlayerState(GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_LUMBER)>0)))then
set udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=true
call AddSpecialEffectTargetUnitBJ("overhead",GetTriggerUnit(),"Abilities\\Spells\\Human\\ManaFlare\\ManaFlareTarget.mdl")
set loc_effect01=bj_lastCreatedEffect
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=0
call AdjustPlayerStateBJ(-1,GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_LUMBER)
call CreateTextTagUnitBJ((("|cff804000"+GetPlayerName(GetOwningPlayer(GetTriggerUnit())))+":|r Reloading!"),GetTriggerUnit(),0,8.,100,100,100,10.)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,4.)
call TriggerSleepAction(.2)
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
if(((((GetUnitTypeId(GetTriggerUnit())=='H00R')))))then
call TriggerSleepAction((3.*(1-(.05*I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),GetTriggerUnit()))))))
endif
if(((((GetUnitTypeId(GetTriggerUnit())=='H00I')))))then
call TriggerSleepAction((2.4*(1-(.05*I2R(GetUnitAbilityLevelSwapped(Func0228('A085'),GetTriggerUnit()))))))
endif
call ForceRemovePlayer(udg_force01,GetOwningPlayer(GetTriggerUnit()))
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]
call DestroyEffect(loc_effect01)
set udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=false
else
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetTriggerUnit())),5.,"Not enough magazines.")
endif
set loc_unit01=null
set loc_effect01=null
set loc_sound01=null
endfunction
function Func0988 takes nothing returns boolean
return(GetSpellAbilityId()=='A05B')and(udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]==false)and(udg_units01[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]==GetTriggerUnit())
endfunction
function Func0990 takes nothing returns nothing
local effect loc_effect01
local unit loc_unit01=GetTriggerUnit()
local sound loc_sound01=udg_sound16
local sound loc_sound02=udg_sound93
if(((GetPlayerState(GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_LUMBER)>0)and(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]<=(udg_integers09[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]-100))))then
set udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=true
call AddSpecialEffectTargetUnitBJ("overhead",GetTriggerUnit(),"Abilities\\Spells\\Human\\ManaFlare\\ManaFlareTarget.mdl")
set loc_effect01=bj_lastCreatedEffect
call AdjustPlayerStateBJ(-1,GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_LUMBER)
call CreateTextTagUnitBJ((("|cff804000"+GetPlayerName(GetOwningPlayer(GetTriggerUnit())))+":|r Reloading!"),GetTriggerUnit(),0,8.,100,100,100,10.)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,4.)
call TriggerSleepAction((6.-(I2R(GetUnitAbilityLevelSwapped('A05B',GetTriggerUnit()))*1.5)))
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
call TriggerSleepAction(1.)
call PlaySoundOnUnitBJ(loc_sound02,100,loc_unit01)
call TriggerSleepAction(.3)
set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]+100)
call DestroyEffect(loc_effect01)
set udg_booleans06[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=false
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetTriggerUnit())),5.,(I2S((udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]/100))+" full belts attached."))
else
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetTriggerUnit())),5.,"Cannot link belts.")
endif
set loc_unit01=null
set loc_effect01=null
set loc_sound01=null
set loc_sound02=null
endfunction
function Func0991 takes nothing returns nothing
local unit loc_unit01=GetManipulatingUnit()
local sound loc_sound01=udg_sound75
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
set loc_unit01=null
set loc_sound01=null
endfunction
function Func0993 takes nothing returns nothing
set udg_integers05[1]='I000'
set udg_integers05[2]='I004'
set udg_integers05[3]='I003'
set udg_integers05[4]='I01A'
set udg_integers05[5]='I001'
set udg_integers05[6]='I006'
set udg_integers05[7]='I00A'
set udg_integers05[8]='I00C'
set udg_integers05[9]='I00D'
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(12,22)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rects01[GetRandomInt(1,udg_integer01)])
call CreateItemLoc('I000',udg_location02)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,3)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rects01[GetRandomInt(1,udg_integer01)])
call CreateItemLoc('I004',udg_location02)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,4)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rects01[GetRandomInt(1,udg_integer01)])
call CreateItemLoc('I003',udg_location02)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I012',udg_location02)
call RemoveLocation(udg_location02)
if(((udg_integer16!=5)))then
call TriggerSleepAction(GetRandomReal(800.,1200.))
set udg_location02=GetRandomLocInRect(bj_mapInitialPlayableArea)
call CreateItemLoc('I00K',udg_location02)
call RemoveLocation(udg_location02)
call TriggerSleepAction(GetRandomReal(90.,180.))
set udg_location02=GetRandomLocInRect(bj_mapInitialPlayableArea)
call CreateItemLoc('I00K',udg_location02)
call RemoveLocation(udg_location02)
endif
endfunction
function Func0996 takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rects01[udg_integer01])
call CreateItemLoc(udg_integers05[1],udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(((GetRandomInt(1,2)==1)))then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rects01[udg_integer01])
call CreateItemLoc(udg_integers05[2],udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
if(((GetRandomInt(1,2)==1)))then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rects01[udg_integer01])
call CreateItemLoc(udg_integers05[3],udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=35
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(bj_mapInitialPlayableArea)
call CreateItemLoc(udg_integers05[1],udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=8
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I00S',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,2)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc(udg_integers05[2],udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,2)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc(udg_integers05[3],udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(3,6)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I00J',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,2)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rects01[GetRandomInt(1,udg_integer01)])
call CreateItemLoc('I00J',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(2,3)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I00I',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(2,3)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I00N',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(2,5)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I00O',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(3,4)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rects01[GetRandomInt(1,udg_integer01)])
call CreateItemLoc('I00S',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(3,5)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I00V',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(3,6)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I00W',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func0997 takes nothing returns nothing
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I00U',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,3)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I008',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,3)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I012',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,3)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I00G',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,2)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I00R',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,3)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I00L',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(2,4)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I009',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(2,4)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(bj_mapInitialPlayableArea)
call CreateItemLoc('I00E',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,3)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(bj_mapInitialPlayableArea)
call CreateItemLoc('I00F',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_location02=GetRandomLocInRect(bj_mapInitialPlayableArea)
call CreateItemLoc('I005',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(2,5)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(bj_mapInitialPlayableArea)
call CreateItemLoc(udg_integers05[4],udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,2)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc(udg_integers05[5],udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(2,8)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(bj_mapInitialPlayableArea)
call CreateItemLoc(udg_integers05[6],udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,2)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(bj_mapInitialPlayableArea)
call CreateItemLoc(udg_integers05[7],udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(2,5)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc(udg_integers05[8],udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,3)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc(udg_integers05[9],udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(2,5)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(bj_mapInitialPlayableArea)
call CreateItemLoc('I00M',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,3)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I013',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,3)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I014',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,2)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I015',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,3)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I00K',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
// New items //
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,3)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I017',udg_location02) // Stun Grenade
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,3)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect155)
call CreateItemLoc('I018',udg_location02) // WP Grenade
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func1004 takes nothing returns boolean
return(GetItemTypeId(GetManipulatedItem())=='I008')and(((GetUnitTypeId(GetManipulatingUnit())=='H00D')or(GetUnitTypeId(GetManipulatingUnit())=='H00I')or(GetUnitTypeId(GetManipulatingUnit())=='H00C')or(GetUnitTypeId(GetManipulatingUnit())=='H000')or(GetUnitTypeId(GetManipulatingUnit())=='h009')))
endfunction
function Func1005 takes nothing returns nothing
if(((GetItemTypeId(GetManipulatedItem())=='I008')and(((GetUnitTypeId(GetManipulatingUnit())=='H00D')or(GetUnitTypeId(GetManipulatingUnit())=='H00I')or(GetUnitTypeId(GetManipulatingUnit())=='H00C')or(GetUnitTypeId(GetManipulatingUnit())=='H000')or(GetUnitTypeId(GetManipulatingUnit())=='h009')))))then
call UnitRemoveAbility(GetTriggerUnit(),'A04Y')
call UnitAddAbility(GetTriggerUnit(),'A002')
endif
endfunction
function Func1007 takes nothing returns boolean
return(GetUnitTypeId(GetManipulatingUnit())!='H001')and(GetUnitTypeId(GetManipulatingUnit())!='h00E')and(GetUnitTypeId(GetManipulatingUnit())!='H00P')
endfunction
function Func1011 takes nothing returns boolean
return(GetItemTypeId(GetManipulatedItem())=='I00G')and(((GetUnitTypeId(GetManipulatingUnit())=='H001')or(GetUnitTypeId(GetManipulatingUnit())=='h00E')or(GetUnitTypeId(GetManipulatingUnit())=='H00P')))
endfunction
function Func1012 takes nothing returns nothing
if(((GetItemTypeId(GetManipulatedItem())=='I00G')and(((GetUnitTypeId(GetManipulatingUnit())=='H001')or(GetUnitTypeId(GetManipulatingUnit())=='h00E')or(GetUnitTypeId(GetManipulatingUnit())=='H00P')))))then
call UnitRemoveAbility(GetTriggerUnit(),'A04Z')
call UnitAddAbility(GetTriggerUnit(),'A00J')
endif
endfunction
function Func1017 takes nothing returns boolean
return(GetItemTypeId(GetManipulatedItem())=='I00F')and(GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(),bj_forLoopAIndex))=='I00F')and(GetManipulatedItem()!=UnitItemInSlotBJ(GetManipulatingUnit(),bj_forLoopAIndex))
endfunction
function Func1035 takes nothing returns boolean
return(((GetItemTypeId(GetManipulatedItem())=='I007')or(GetManipulatedItem()==udg_items02[1])or(GetManipulatedItem()==udg_items02[2])or(GetManipulatedItem()==udg_items02[3])or(GetItemTypeId(GetManipulatedItem())=='I00B')or(GetItemTypeId(GetManipulatedItem())=='I00H')))and(GetUnitTypeId(GetManipulatingUnit())=='h00K')
endfunction
function Func1036 takes nothing returns nothing
if(((((GetItemTypeId(GetManipulatedItem())=='I007')or(GetManipulatedItem()==udg_items02[1])or(GetManipulatedItem()==udg_items02[2])or(GetManipulatedItem()==udg_items02[3])or(GetItemTypeId(GetManipulatedItem())=='I00B')or(GetItemTypeId(GetManipulatedItem())=='I00H')))and(GetUnitTypeId(GetManipulatingUnit())=='h00K')))then
call UnitRemoveItemSwapped(GetManipulatedItem(),GetManipulatingUnit())
endif
endfunction
function Func1090 takes nothing returns boolean
return(((GetUnitTypeId(GetAttacker())=='u009')or(GetUnitTypeId(GetAttacker())=='u003')or(GetUnitTypeId(GetAttacker())=='u00C')))
endfunction
function Func1091 takes nothing returns nothing
local unit loc_unit01=GetAttacker()
local sound loc_sound01=udg_sound90
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
set loc_unit01=null
set loc_sound01=null
endfunction
function Func1092 takes nothing returns nothing
local unit loc_unit01=GetTriggerUnit()
local sound loc_sound01=udg_sound92
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
set loc_unit01=null
set loc_sound01=null
endfunction
function Func1096 takes nothing returns nothing
local unit loc_unit01=GetDyingUnit()
local sound loc_sound01=udg_sound91
local location loc_location01=GetUnitLoc(loc_unit01)
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
if(((GetUnitTypeId(GetDyingUnit())=='u00C')))then
call VXSleep(.3)
call DestroyEffect(AddSpecialEffectLoc("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl",loc_location01))
call DestroyEffect(AddSpecialEffectLoc("war3mapImported\\Zombie Explosion.mdx",loc_location01))
call Func0238(250.,loc_location01)
call UnitDamagePointLoc((loc_unit01),0,250.,loc_location01,300.,ATTACK_TYPE_SIEGE,DAMAGE_TYPE_NORMAL)
endif
call RemoveLocation(loc_location01)
set loc_location01=null
set loc_unit01=null
set loc_sound01=null
endfunction
function Func1097 takes nothing returns nothing
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UndeadBlood\\UndeadBloodGhoul.mdl",GetTriggerUnit(),"origin"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",GetTriggerUnit(),"origin"))
endfunction
function Func1098 takes nothing returns boolean
return(GetRandomInt(1,8)==1)
endfunction
function Func1100 takes nothing returns nothing
local unit u=GetTriggerUnit()
local sound loc_sound01
if(((GetRandomInt(1,2)==1)))then
set loc_sound01=udg_sound139
call PlaySoundOnUnitBJ(loc_sound01,100,u)
else
set loc_sound01=udg_sound140
call PlaySoundOnUnitBJ(loc_sound01,100,u)
endif
set u=null
set loc_sound01=null
endfunction
function Func1101 takes nothing returns nothing
set udg_integer25=(udg_integer24*2)+10
call ConditionalTriggerExecute(udg_trigger207)
endfunction
function Func1105 takes nothing returns nothing
if(((udg_integer23<10000)))then
if(((udg_integer23<5000)))then
set udg_integer26=(udg_integer25-2)
else
set udg_integer26=(udg_integer25-1)
endif
else
set udg_integer26=R2I((I2R(udg_integer25)*1.1))
endif
if(((udg_integer26<=0)))then
set udg_integer26=udg_integer25
endif
endfunction
function Func1106 takes nothing returns nothing
set udg_location02=GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc(1,'n00M',Player(27),udg_location02,GetRandomReal(0,360))
call Func0200(bj_lastCreatedUnit)
call SetUnitAnimation(bj_lastCreatedUnit,"birth")
call RemoveLocation(udg_location02)
endfunction
function Func1107 takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,2)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_group23=UAUnitGroupWithTypeId('n00N')
call ForGroupBJ(udg_group23,function Func1106)
call DestroyGroup(udg_group23)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func1108 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1112 takes nothing returns nothing
if(((GetRandomInt(1,3)==1)and(((GetUnitTypeId(GetDyingUnit())=='n000')or(GetUnitTypeId(GetDyingUnit())=='n001')or(GetUnitTypeId(GetDyingUnit())=='n002')or(GetUnitTypeId(GetDyingUnit())=='u000')or(GetUnitTypeId(GetDyingUnit())=='n009')or(GetUnitTypeId(GetDyingUnit())=='h005')or(GetUnitTypeId(GetDyingUnit())=='h018')or(GetUnitTypeId(GetDyingUnit())=='n004')or(GetUnitTypeId(GetDyingUnit())=='n005')or(GetUnitTypeId(GetDyingUnit())=='n008')or(GetUnitTypeId(GetDyingUnit())=='n007')or(GetUnitTypeId(GetDyingUnit())=='n006')))))then
call TriggerSleepAction(GetRandomReal(3.,20.))
set udg_location02=GetUnitLoc(GetDyingUnit())
if(((GetRandomInt(1,12)==1)))then
call CreateNUnitsAtLoc(1,'u007',Player(27),udg_location02,GetUnitFacing(GetDyingUnit()))
else
call CreateNUnitsAtLoc(1,'u000',Player(27),udg_location02,GetUnitFacing(GetDyingUnit()))
endif
call RemoveLocation(udg_location02)
set udg_location02=GetUnitLoc(bj_lastCreatedUnit)
call Func0200(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl",udg_location02))
call DestroyEffect(AddSpecialEffectLoc("Objects\\Spawnmodels\\Undead\\UndeadLargeDeathExplode\\UndeadLargeDeathExplode.mdl",udg_location02))
call RemoveLocation(udg_location02)
endif
endfunction
function Func1113 takes nothing returns boolean
return udg_boolean01==false
endfunction
function Func1114 takes nothing returns nothing
local integer loc_integer01=1
local unit loc_unit01
loop
exitwhen loc_integer01>20
// MORE ZOMBIE PLAYERS
//set loc_unit01=GroupPickRandomUnit(UAUnitGroupFromPlayerMatching(Player(27),Condition(function Func0239)))
set loc_unit01=GroupPickRandomUnit(UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239)))
// ----
call Func0200(loc_unit01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_unit01=null
endfunction
function Func1115 takes nothing returns boolean
return udg_boolean01==false
endfunction
function Func1117 takes nothing returns nothing
local integer loc_integer01=1
local unit loc_unit01
loop
exitwhen loc_integer01>20
// MORE ZOMBIE PLAYERS
//set loc_unit01=GroupPickRandomUnit(UAUnitGroupFromPlayerMatching(Player(27),Condition(function Func0239)))
set loc_unit01=GroupPickRandomUnit(UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239)))
// ----
call Func0203(loc_unit01)
call VXSleep(.2)
// MORE ZOMBIE PLAYERS
//set loc_unit01=GroupPickRandomUnit(UAUnitGroupFromPlayerMatching(Player(27),Condition(function Func0239)))
set loc_unit01=GroupPickRandomUnit(UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239)))
// ----
call Func0200(loc_unit01)
set loc_integer01=loc_integer01+1
endloop
set loc_unit01=null
endfunction
function Func1118 takes nothing returns boolean
return udg_boolean01==false
endfunction
function Func1120 takes nothing returns nothing
local integer loc_integer01=1
local unit loc_unit01
loop
exitwhen loc_integer01>20
// MORE ZOMBIE PLAYERS
//set loc_unit01=GroupPickRandomUnit(UAUnitGroupFromPlayerMatching(Player(27),Condition(function Func0239)))
set loc_unit01=GroupPickRandomUnit(UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239)))
// ----
call Func0202(loc_unit01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_unit01=null
endfunction
function Func1121 takes nothing returns boolean
return udg_boolean01==false
endfunction
function Func1123 takes nothing returns nothing
local integer loc_integer01=1
local location loc_location01
local unit loc_unit01
loop
exitwhen loc_integer01>20
// MORE ZOMBIE PLAYERS
//set loc_unit01=GroupPickRandomUnit(UAUnitGroupFromPlayerMatching(Player(27),Condition(function Func0239)))
set loc_unit01=GroupPickRandomUnit(UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239)))
// ----
call Func0200(loc_unit01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
if udg_unit11==null then
set loc_integer01=1
loop
exitwhen loc_integer01>20
set loc_location01=GetRandomLocInRect(udg_rect19)
// MORE ZOMBIE PLAYERS
//set loc_unit01=GroupPickRandomUnit(UAUnitGroupFromPlayerMatching(Player(27),Condition(function Func0239)))
set loc_unit01=GroupPickRandomUnit(UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239)))
// ----
call IssuePointOrderByIdLoc(loc_unit01,851983,loc_location01)
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
else
if IsUnitAliveBJ(udg_unit11)then
set loc_integer01=1
loop
exitwhen loc_integer01>20
set loc_location01=GetUnitLoc(udg_unit11)
// MORE ZOMBIE PLAYERS
//set loc_unit01=GroupPickRandomUnit(UAUnitGroupFromPlayerMatching(Player(27),Condition(function Func0239)))
set loc_unit01=GroupPickRandomUnit(UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239)))
// ----
call IssuePointOrderByIdLoc(loc_unit01,851983,loc_location01)
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
else
set loc_integer01=1
loop
exitwhen loc_integer01>20
set loc_location01=GetRandomLocInRect(udg_rect07)
// MORE ZOMBIE PLAYERS
//set loc_unit01=GroupPickRandomUnit(UAUnitGroupFromPlayerMatching(Player(27),Condition(function Func0239)))
set loc_unit01=GroupPickRandomUnit(UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239)))
// ----
call IssuePointOrderByIdLoc(loc_unit01,851983,loc_location01)
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
endif
call RemoveLocation(loc_location01)
set loc_location01=null
set loc_unit01=null
endfunction
function Func1124 takes nothing returns boolean
// MORE ZOMBIE PLAYERS
local group loc_group01=UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239))
// ----
if udg_boolean01 or udg_boolean27 then
call DestroyGroup(loc_group01)
return false
endif
if CountUnitsInGroup(loc_group01)>=50 then
call DestroyGroup(loc_group01)
return false
endif
call DestroyGroup(loc_group01)
return true
endfunction
function Func1125 takes nothing returns boolean
// MORE ZOMBIE PLAYERS
local group loc_group01=UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239))
// ----
if udg_boolean01 then
call DestroyGroup(loc_group01)
return false
endif
if CountUnitsInGroup(loc_group01)>=50 then
call DestroyGroup(loc_group01)
return false
endif
call DestroyGroup(loc_group01)
return true
endfunction
function Func1126 takes nothing returns nothing
local integer loc_integer01
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
call TriggerSleepAction(2.)
if udg_integer18>=20 and(Func1125())then
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(.2)
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
call TriggerSleepAction(2.)
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
if GetRandomInt(1,2)==1 and(Func1125())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
if GetRandomInt(1,3)==1 and(Func1125())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/4
call Func0201('n002')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,3)==1 and(Func1125())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/4
call Func0201('n001')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if udg_integer18>=41 and(Func1125())then
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,3)==1 then
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n00E')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if udg_integer18>=21 and Func1125()then
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,9)==1 then
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
call Func0201('u004')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n00Q')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,9)==1 then
set udg_rect01=udg_rects02[GetRandomInt(1,4)]
call Func0201('n00W')
call Func0200(bj_lastCreatedUnit)
endif
endfunction
function Func1127 takes nothing returns boolean
// MORE ZOMBIE PLAYERS
local group loc_group01=UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239))
// ----
if udg_boolean01 or udg_boolean27 then
call DestroyGroup(loc_group01)
return false
endif
if CountUnitsInGroup(loc_group01)>=100 then
call DestroyGroup(loc_group01)
return false
endif
call DestroyGroup(loc_group01)
return true
endfunction
function Func1128 takes nothing returns boolean
// MORE ZOMBIE PLAYERS
local group loc_group01=UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239))
// ----
if udg_boolean01 then
call DestroyGroup(loc_group01)
return false
endif
if CountUnitsInGroup(loc_group01)>=100 then
call DestroyGroup(loc_group01)
return false
endif
call DestroyGroup(loc_group01)
return true
endfunction
function Func1129 takes nothing returns nothing
local integer loc_integer01
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26*2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
call TriggerSleepAction(2.)
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
call TriggerSleepAction(2.)
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
if GetRandomInt(1,2)==1 and(Func1128())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('u007')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,4)==1 and(Func1128())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n002')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('u00C')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
if(Func1128())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n00E')
call SetUnitExploded(bj_lastCreatedUnit,true)
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,4)==1 and(Func1128())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n001')
call Func0200(bj_lastCreatedUnit)
call Func0201('u000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
if GetRandomInt(1,2)==1 and(Func1128())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26*3
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,6)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('n00D')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,2)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n00R')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,6)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('n00S')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('n00A')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
call TriggerSleepAction(2.)
if GetRandomInt(1,3)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
call Func0201('n013')
call Func0200(bj_lastCreatedUnit)
set loc_integer01=loc_integer01+1
call VXSleep(.2)
endloop
endif
call TriggerSleepAction(2.)
if udg_integer23>=20000 and GetRandomInt(1,3)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
call Func0201('n00C')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,2)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/GetRandomInt(1,2)
call Func0201('u001')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if udg_integer23>=20000 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/GetRandomInt(1,2)
call Func0201('u001')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
if GetRandomInt(1,2)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/GetRandomInt(1,2)
call Func0201('n009')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
if GetRandomInt(1,3)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/GetRandomInt(1,3)
call Func0201('n011')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if udg_integer23>=25000 and GetRandomInt(1,2)==1 then
call Func0201('n012')
call Func0200(bj_lastCreatedUnit)
endif
call TriggerSleepAction(2.)
if udg_integer23>=25000 and GetRandomInt(1,2)==1 then
call Func0201('u004')
call Func0200(bj_lastCreatedUnit)
endif
call TriggerSleepAction(2.)
if udg_integer23>=50000 and udg_integer18>=25 and GetRandomInt(1,2)==1 then
call Func0201('u004')
call Func0200(bj_lastCreatedUnit)
endif
call TriggerSleepAction(2.)
if udg_integer18>=41 then
call Func0201('u004')
call Func0200(bj_lastCreatedUnit)
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,2)==1 then
call Func0201('n00N')
call Func0200(bj_lastCreatedUnit)
endif
call TriggerSleepAction(2.)
if udg_integer18>=35 and udg_integer16==2 then
set loc_integer01=1
loop
exitwhen loc_integer01>2
call Func0201('u002')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if udg_integer23>=50000 and udg_integer18>=30 and udg_integer16==2 then
set loc_integer01=1
loop
exitwhen loc_integer01>5
call Func0201('u002')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
if GetRandomInt(1,2)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26*2
call Func0201('n00J')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rect124
if udg_integer18>GetPlayerState(Player(0),PLAYER_STATE_FOOD_CAP_CEILING)then
call Func0201('n00O')
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rect124
if udg_integer23>=2500 and GetRandomInt(1,2)==1 then
call Func0201('n00Z')
call Func0200(bj_lastCreatedUnit)
call Func0201('n00Z')
call Func0200(bj_lastCreatedUnit)
endif
if udg_integer23>=10000 and GetRandomInt(1,2)==1 then
call Func0201('n00Z')
call Func0200(bj_lastCreatedUnit)
call Func0201('n00Z')
call Func0200(bj_lastCreatedUnit)
call Func0201('n00Z')
call Func0200(bj_lastCreatedUnit)
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rect124
if udg_integer23>=35000 and GetRandomInt(1,3)==1 then
call Func0201('n00O')
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
if(Func1128())then
set loc_integer01=1
loop
exitwhen loc_integer01>R2I(I2R(udg_integer26)*1.5)
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
if GetRandomInt(1,2)==1 and(Func1128())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26*2
call Func0201('n011')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
if GetRandomInt(1,2)==1 and(Func1128())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('n00R')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
if GetRandomInt(1,2)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
call Func0201('u00A')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
endfunction
function Func1130 takes nothing returns boolean
// MORE ZOMBIE PLAYERS
local group loc_group01=UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239))
// ----
if udg_boolean01 or udg_boolean27 then
call DestroyGroup(loc_group01)
return false
endif
if CountUnitsInGroup(loc_group01)>=100 then
call DestroyGroup(loc_group01)
return false
endif
call DestroyGroup(loc_group01)
return true
endfunction
function Func1131 takes nothing returns boolean
// MORE ZOMBIE PLAYERS
local group loc_group01=UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239))
// ----
if udg_boolean01 then
call DestroyGroup(loc_group01)
return false
endif
if CountUnitsInGroup(loc_group01)>=100 then
call DestroyGroup(loc_group01)
return false
endif
call DestroyGroup(loc_group01)
return true
endfunction
function Func1132 takes nothing returns nothing
local integer loc_integer01
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
if GetRandomInt(1,2)==1 and(Func1131())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26*3
call Func0201('n011')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
if GetRandomInt(1,4)==1 and(Func1131())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('n002')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,3)==1 and(Func1131())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call SetUnitExploded(bj_lastCreatedUnit,true)
call Func0201('n00E')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
if GetRandomInt(1,4)==1 and(Func1131())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('n001')
call Func0200(bj_lastCreatedUnit)
call Func0201('u000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
if GetRandomInt(1,2)==1 and(Func1131())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26*4
call Func0201('n011')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,6)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('n00D')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
if GetRandomInt(1,6)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('n00R')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,6)==1 and(Func1131())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('n00D')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('n00S')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
call TriggerSleepAction(2.)
if GetRandomInt(1,3)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('n00C')
call Func0200(bj_lastCreatedUnit)
set loc_integer01=loc_integer01+1
call VXSleep(.2)
endloop
endif
call TriggerSleepAction(2.)
if udg_integer23>=30000 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('n00C')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
if GetRandomInt(1,2)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('u001')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if udg_integer23>=20000 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('u001')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
if GetRandomInt(1,2)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
call Func0201('n009')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
call TriggerSleepAction(2.)
set udg_rect01=udg_rects02[GetRandomInt(1,4)]
if udg_integer23>=20000 and GetRandomInt(1,2)==1 then
call Func0201('u004')
call Func0200(bj_lastCreatedUnit)
endif
call TriggerSleepAction(2.)
if udg_integer23>=40000 and udg_integer18>=25 then
if GetRandomInt(1,2)==1 then
call Func0201('u004')
call Func0200(bj_lastCreatedUnit)
endif
endif
call TriggerSleepAction(2.)
if udg_integer23>=20000 and udg_integer18>=25 then
if GetRandomInt(1,2)==1 then
call Func0201('n012')
call Func0200(bj_lastCreatedUnit)
endif
endif
call TriggerSleepAction(2.)
if udg_integer18>=41 then
call Func0201('u004')
call Func0200(bj_lastCreatedUnit)
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,2)==1 then
call Func0201('n00N')
call Func0200(bj_lastCreatedUnit)
endif
call TriggerSleepAction(2.)
if udg_integer18>=35 and udg_integer16==2 then
set loc_integer01=1
loop
exitwhen loc_integer01>2
call Func0201('u002')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if udg_integer18>=20 and udg_integer16>=2 and udg_integer23>=10000 then
set loc_integer01=1
loop
exitwhen loc_integer01>7
call Func0201('u002')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
if GetRandomInt(1,2)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26*3
call Func0201('n00J')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rect124
if udg_integer18>GetPlayerState(Player(0),PLAYER_STATE_FOOD_CAP_CEILING)then
call Func0201('n00O')
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rect124
if udg_integer23>=35000 and GetRandomInt(1,3)==1 then
call Func0201('n00O')
endif
set udg_rect01=udg_rects02[GetRandomInt(1,4)]
if GetRandomInt(1,3)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
call Func0201('u002')
call Func0200(bj_lastCreatedUnit)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(.2)
if udg_integer23>=50000 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('u002')
call Func0200(bj_lastCreatedUnit)
set loc_integer01=loc_integer01+1
endloop
endif
set udg_rect01=udg_rects02[GetRandomInt(1,4)]
if GetRandomInt(1,3)==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n00B')
call Func0200(bj_lastCreatedUnit)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/4
call Func0201('u00C')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endfunction
function Func1133 takes nothing returns boolean
// MORE ZOMBIE PLAYERS
local group loc_group01=UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239))
// ----
if udg_boolean01 or udg_boolean27 then
call DestroyGroup(loc_group01)
return false
endif
if CountUnitsInGroup(loc_group01)>=100 then
call DestroyGroup(loc_group01)
return false
endif
call DestroyGroup(loc_group01)
return true
endfunction
function Func1134 takes nothing returns boolean
// MORE ZOMBIE PLAYERS
local group loc_group01=UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239))
// ----
if udg_boolean01 then
call DestroyGroup(loc_group01)
return false
endif
if CountUnitsInGroup(loc_group01)>=100 then
call DestroyGroup(loc_group01)
return false
endif
call DestroyGroup(loc_group01)
return true
endfunction
function Func1135 takes nothing returns nothing
local integer loc_integer01
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
call TriggerSleepAction(2.)
if Func1134()then
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
call TriggerSleepAction(2.)
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
if GetRandomInt(1,2)==1 and Func1134()then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
if GetRandomInt(1,3)==1 and Func1134()then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/4
call Func0201('n002')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,3)==1 and(Func1134())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/4
call Func0201('n001')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if(Func1134())then
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,2)==1 and Func1134()then
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n00J')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if Func1134()then
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n00E')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
call Func0201('u001')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
if GetRandomInt(1,2)==1 then
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/5
call Func0201('n009')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
if GetRandomInt(1,2)==1 then
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/5
call Func0201('n00A')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endfunction
function Func1136 takes nothing returns boolean
// MORE ZOMBIE PLAYERS
local group loc_group01=UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239))
// ----
if udg_boolean01 or udg_boolean27==false then
call DestroyGroup(loc_group01)
return false
endif
if CountUnitsInGroup(loc_group01)>=80 then
call DestroyGroup(loc_group01)
return false
endif
call DestroyGroup(loc_group01)
return true
endfunction
function Func1137 takes nothing returns boolean
// MORE ZOMBIE PLAYERS
local group loc_group01=UAUnitGroupFromPlayerMatching(Player(GetRandomInt(12,15)),Condition(function Func0239))
// ----
if udg_boolean01 then
call DestroyGroup(loc_group01)
return false
endif
if CountUnitsInGroup(loc_group01)>=80 then
call DestroyGroup(loc_group01)
return false
endif
call DestroyGroup(loc_group01)
return true
endfunction
function Func1138 takes nothing returns nothing
local integer loc_integer01
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
set loc_integer01=1
loop
exitwhen loc_integer01>R2I(udg_integer26*.75)
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
call TriggerSleepAction(2.)
if udg_integer18>=20 and(Func1137())then
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>R2I(udg_integer26*.75)
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(.2)
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>R2I(udg_integer26*.75)
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
call TriggerSleepAction(2.)
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
if GetRandomInt(1,2)==1 and(Func1137())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
if GetRandomInt(1,3)==1 and(Func1137())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
call Func0201('n002')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,3)==1 and(Func1137())then
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
call Func0201('n001')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,2)>=1 and(Func1137())then
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
set loc_integer01=1
loop
exitwhen loc_integer01>R2I(udg_integer26*.6)
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>R2I(udg_integer26*.6)
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,2)==1 then
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
set loc_integer01=1
loop
exitwhen loc_integer01>R2I(udg_integer26*.75)
call Func0201('n00E')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,3)>=1 and Func1137()then
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n000')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
call TriggerSleepAction(2.)
if GetRandomInt(1,18)==1 then
set udg_rect01=udg_rects01[GetRandomInt(1,udg_integer01)]
call Func0201('u004')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set udg_rect01=udg_rects04[GetRandomInt(1,4)]
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
call Func0201('n00Q')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endif
endfunction
function Func1140 takes nothing returns nothing
if(((GetUnitStateSwap(UNIT_STATE_MANA,GetEnumUnit())>=100.)and(IsUnitAliveBJ(GetEnumUnit()))))then
set udg_location02=GetUnitLoc(GetEnumUnit())
call KillUnit(GetEnumUnit())
call CreateNUnitsAtLoc(1,'n00P',Player(27),udg_location02,GetRandomReal(0,360))
call Func0200(bj_lastCreatedUnit)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(3,8)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'n00J',Player(27),udg_location02,GetRandomReal(0,360))
call Func0200(bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call PlaySoundBJ(udg_sound59)
endif
endfunction
function Func1141 takes nothing returns nothing
set udg_group23=UAUnitGroupWithTypeId('n00O')
call ForGroupBJ(udg_group23,function Func1140)
call DestroyGroup(udg_group23)
call RemoveLocation(udg_location02)
endfunction
function Func1142 takes nothing returns boolean
local boolean b = false
local player p = GetOwningPlayer(GetFilterUnit())
set b = b or IsPlayerEnemy(p, Player(12))
set b = b or IsPlayerEnemy(p, Player(13))
set b = b or IsPlayerEnemy(p, Player(14))
set b = b or IsPlayerEnemy(p, Player(15))
//set b = b or IsPlayerEnemy(p, Player(16))
//set b = b or IsPlayerEnemy(p, Player(17))
//set b = b or IsPlayerEnemy(p, Player(18))
//set b = b or IsPlayerEnemy(p, Player(19))
//set b = b or IsPlayerEnemy(p, Player(20))
//set b = b or IsPlayerEnemy(p, Player(22))
//set b = b or IsPlayerEnemy(p, Player(23))
//set b = b or IsPlayerEnemy(p, Player(24))
return b and IsUnitAliveBJ(GetFilterUnit())
endfunction
function Func1143 takes nothing returns nothing
local group loc_group01=UAUnitGroupWithTypeId('u005')
local unit loc_unit01=GroupPickRandomUnit(loc_group01)
local location loc_location01=GetUnitLoc(loc_unit01)
local group loc_group02=UAUnitGroupWithinRangeOfLocMatching(1200.,loc_location01,Condition(function Func1142))
local unit loc_unit02=GroupPickRandomUnit(loc_group02)
local location loc_location02=GetUnitLoc(loc_unit02)
if CountUnitsInGroup(loc_group02)>0 then
call IssueImmediateOrderById(loc_unit01,852100)
call IssuePointOrderById(loc_unit01,851983,GetLocationX(loc_location02),GetLocationY(loc_location02))
call AddUnitAnimationProperties(loc_unit01,"alternate",true)
endif
call VXSleep(6.)
call AddUnitAnimationProperties(loc_unit01,"alternate",false)
call DestroyGroup(loc_group01)
call DestroyGroup(loc_group02)
set loc_unit01=null
set loc_unit02=null
call RemoveLocation(loc_location01)
set loc_location01=null
call RemoveLocation(loc_location02)
set loc_location02=null
endfunction
function Func1144 takes nothing returns boolean
local boolean b = false
local player p = GetOwningPlayer(GetFilterUnit())
set b = b or IsPlayerEnemy(p, Player(12))
set b = b or IsPlayerEnemy(p, Player(13))
set b = b or IsPlayerEnemy(p, Player(14))
set b = b or IsPlayerEnemy(p, Player(15))
//set b = b or IsPlayerEnemy(p, Player(16))
//set b = b or IsPlayerEnemy(p, Player(17))
//set b = b or IsPlayerEnemy(p, Player(18))
//set b = b or IsPlayerEnemy(p, Player(19))
//set b = b or IsPlayerEnemy(p, Player(20))
//set b = b or IsPlayerEnemy(p, Player(21))
//set b = b or IsPlayerEnemy(p, Player(22))
//set b = b or IsPlayerEnemy(p, Player(23))
return b and IsUnitAliveBJ(GetFilterUnit())
endfunction
function Func1145 takes nothing returns nothing
local group loc_group01=UAUnitGroupWithTypeId('n00P')
local unit loc_unit01=GroupPickRandomUnit(loc_group01)
local location loc_location01=GetUnitLoc(loc_unit01)
local group loc_group02=UAUnitGroupWithinRangeOfLocMatching(400.,loc_location01,Condition(function Func1144))
local group loc_group03=UAUnitGroupWithinRangeOfLocMatching(2200.,loc_location01,Condition(function Func1144))
local unit loc_unit02=GroupPickRandomUnit(loc_group03)
local location loc_location02=GetUnitLoc(loc_unit02)
if CountUnitsInGroup(loc_group02)>0 then
call IssuePointOrderById(loc_unit01,852525,GetLocationX(loc_location02),GetLocationY(loc_location02))
endif
call DestroyGroup(loc_group01)
call DestroyGroup(loc_group02)
call DestroyGroup(loc_group03)
set loc_unit01=null
set loc_unit02=null
call RemoveLocation(loc_location01)
set loc_location01=null
call RemoveLocation(loc_location02)
set loc_location02=null
endfunction
function Func1146 takes nothing returns boolean
local boolean b = false
local player p = GetOwningPlayer(GetFilterUnit())
set b = b or IsPlayerEnemy(p, Player(12))
set b = b or IsPlayerEnemy(p, Player(13))
set b = b or IsPlayerEnemy(p, Player(14))
set b = b or IsPlayerEnemy(p, Player(15))
//set b = b or IsPlayerEnemy(p, Player(16))
//set b = b or IsPlayerEnemy(p, Player(17))
//set b = b or IsPlayerEnemy(p, Player(18))
//set b = b or IsPlayerEnemy(p, Player(19))
//set b = b or IsPlayerEnemy(p, Player(20))
//set b = b or IsPlayerEnemy(p, Player(21))
//set b = b or IsPlayerEnemy(p, Player(22))
//set b = b or IsPlayerEnemy(p, Player(23))
return b and IsUnitAliveBJ(GetFilterUnit())
endfunction
function Func1147 takes nothing returns nothing
local group loc_group01=UAUnitGroupWithTypeId('u007')
local unit loc_unit01=GroupPickRandomUnit(loc_group01)
local location loc_location01=GetUnitLoc(loc_unit01)
local group loc_group02=UAUnitGroupWithinRangeOfLocMatching(400.,loc_location01,Condition(function Func1146))
local group loc_group03=UAUnitGroupWithinRangeOfLocMatching(2200.,loc_location01,Condition(function Func1146))
local unit loc_unit02=GroupPickRandomUnit(loc_group03)
local location loc_location02=GetUnitLoc(loc_unit02)
if CountUnitsInGroup(loc_group02)>0 then
call IssuePointOrderById(loc_unit01,852525,GetLocationX(loc_location02),GetLocationY(loc_location02))
endif
call DestroyGroup(loc_group01)
call DestroyGroup(loc_group02)
call DestroyGroup(loc_group03)
set loc_unit01=null
set loc_unit02=null
call RemoveLocation(loc_location01)
set loc_location01=null
call RemoveLocation(loc_location02)
set loc_location02=null
endfunction
function Func1148 takes nothing returns boolean
local boolean b = false
local player p = GetOwningPlayer(GetFilterUnit())
set b = b or IsPlayerEnemy(p, Player(12))
set b = b or IsPlayerEnemy(p, Player(13))
set b = b or IsPlayerEnemy(p, Player(14))
set b = b or IsPlayerEnemy(p, Player(15))
//set b = b or IsPlayerEnemy(p, Player(16))
//set b = b or IsPlayerEnemy(p, Player(17))
//set b = b or IsPlayerEnemy(p, Player(18))
//set b = b or IsPlayerEnemy(p, Player(19))
//set b = b or IsPlayerEnemy(p, Player(20))
//set b = b or IsPlayerEnemy(p, Player(21))
//set b = b or IsPlayerEnemy(p, Player(22))
//set b = b or IsPlayerEnemy(p, Player(23))
return b and IsUnitAliveBJ(GetFilterUnit())
endfunction
function Func1149 takes nothing returns nothing
local group loc_group01=UAUnitGroupWithTypeId('n00G')
local unit loc_unit01=GroupPickRandomUnit(loc_group01)
local location loc_location01=GetUnitLoc(loc_unit01)
local group loc_group02=UAUnitGroupWithinRangeOfLocMatching(400.,loc_location01,Condition(function Func1148))
local group loc_group03=UAUnitGroupWithinRangeOfLocMatching(2800.,loc_location01,Condition(function Func1148))
local unit loc_unit02=GroupPickRandomUnit(loc_group03)
local location loc_location02=GetUnitLoc(loc_unit02)
if CountUnitsInGroup(loc_group02)>0 then
call IssuePointOrderById(loc_unit01,852525,GetLocationX(loc_location02),GetLocationY(loc_location02))
endif
call DestroyGroup(loc_group01)
call DestroyGroup(loc_group02)
call DestroyGroup(loc_group03)
set loc_unit01=null
set loc_unit02=null
call RemoveLocation(loc_location01)
set loc_location01=null
call RemoveLocation(loc_location02)
set loc_location02=null
endfunction
function Func1154 takes nothing returns nothing
if(((GetOwningPlayer(GetEnumUnit())==Player(24))and(GetEnumUnit()!=udg_unit18)and(GetEnumUnit()!=udg_Predator)))then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function Func1155 takes nothing returns nothing
call GroupAddUnit(udg_groups02[1],GetEnumUnit())
endfunction
function Func1156 takes nothing returns nothing
call GroupAddUnit(udg_groups02[2],GetEnumUnit())
endfunction
function Func1157 takes nothing returns nothing
call GroupAddUnit(udg_groups02[3],GetEnumUnit())
endfunction
function Func1159 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func1160 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func1161 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func1163 takes nothing returns nothing
if(((GetOwningPlayer(GetEnumUnit())==Player(24))and(GetEnumUnit()!=udg_unit18)))then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function Func1165 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func1166 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func1167 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func1169 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func1170 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func1171 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func1173 takes nothing returns nothing
if(((GetOwningPlayer(GetEnumUnit())==Player(24))and(GetEnumUnit()!=udg_unit18)))then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function Func1175 takes nothing returns nothing
call EnableTrigger(udg_trigger230)
call EnableTrigger(udg_trigger231)
if(((((((GetRandomInt(1,2)==1)and(udg_integer16>1)))or(((GetRandomInt(1,3)==1)and(udg_integer16<=1)))))))then
call EnableTrigger(udg_trigger243)
set udg_integer12=1
set udg_group23=Func0006(udg_rect101)
call ForGroupBJ(udg_group23,function Func1169)
call DestroyGroup(udg_group23)
set udg_group23=Func0006(udg_rect102)
call ForGroupBJ(udg_group23,function Func1170)
call DestroyGroup(udg_group23)
set udg_group23=Func0006(udg_rect89)
call ForGroupBJ(udg_group23,function Func1171)
call DestroyGroup(udg_group23)
set udg_group23=Func0006(udg_rect06)
call ForGroupBJ(udg_group23,function Func1173)
call DestroyGroup(udg_group23)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect124)
call CreateNUnitsAtLoc(1,'n00H',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group06,bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(GetRandomReal(10.,30.))
call ConditionalTriggerExecute(udg_trigger226)
else
if(((GetRandomInt(1,3)==1)))then
set udg_integer12=2
set udg_group23=Func0006(udg_rect101)
call ForGroupBJ(Func0006(udg_rect101),function Func1165)
call DestroyGroup(udg_group23)
set udg_group23=Func0006(udg_rect102)
call ForGroupBJ(udg_group23,function Func1166)
call DestroyGroup(udg_group23)
set udg_group23=Func0006(udg_rect89)
call ForGroupBJ(udg_group23,function Func1167)
call DestroyGroup(udg_group23)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=25
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=OffsetLocation(GetRectCenter(udg_rects01[GetRandomInt(1,udg_integer01)]),GetRandomReal(-200.,200.),GetRandomReal(-200.,200.))
call CreateNUnitsAtLoc(1,udg_integers03[GetRandomInt(1,5)],Player(24),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group02,bj_lastCreatedUnit)
call IssueImmediateOrderById(bj_lastCreatedUnit,851993)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(GetRandomReal(10.,30.))
call ConditionalTriggerExecute(udg_trigger225)
else
if(((GetRandomInt(1,1)==1)))then
call EnableTrigger(udg_trigger243)
set udg_integer12=3
set udg_group23=Func0006(udg_rect101)
call ForGroupBJ(udg_group23,function Func1159)
call DestroyGroup(udg_group23)
set udg_group23=Func0006(udg_rect102)
call ForGroupBJ(udg_group23,function Func1160)
call DestroyGroup(udg_group23)
set udg_group23=Func0006(udg_rect89)
call ForGroupBJ(udg_group23,function Func1161)
call DestroyGroup(udg_group23)
set udg_group23=Func0006(udg_rect06)
call ForGroupBJ(udg_group23,function Func1163)
call DestroyGroup(udg_group23)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect97)
call CreateNUnitsAtLoc(1,'n00N',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0200(bj_lastCreatedUnit)
call GroupAddUnit(udg_group12,bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=4
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect97)
call CreateNUnitsAtLoc(1,'n00T',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0200(bj_lastCreatedUnit)
call GroupAddUnit(udg_group12,bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(GetRandomReal(10.,30.))
call ConditionalTriggerExecute(udg_trigger227)
call EnableTrigger(udg_trigger229)
else
call EnableTrigger(udg_trigger243)
set udg_group23=Func0006(udg_rect06)
call ForGroupBJ(udg_group23,function Func1154)
call DestroyGroup(udg_group23)
set udg_group23=Func0006(udg_rect101)
call ForGroupBJ(udg_group23,function Func1155)
call DestroyGroup(udg_group23)
set udg_group23=Func0006(udg_rect102)
call ForGroupBJ(udg_group23,function Func1156)
call DestroyGroup(udg_group23)
set udg_group23=Func0006(udg_rect89)
call ForGroupBJ(udg_group23,function Func1157)
call DestroyGroup(udg_group23)
set udg_integers33[1]=GetRandomInt(1,udg_integer01)
set udg_location03=GetRectCenter(udg_rects01[udg_integers33[1]])
call TriggerRegisterEnterRectSimple(udg_trigger232,udg_rects01[udg_integers33[1]])
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((GetRandomInt(1,2)==1)))then
set udg_location02=GetRandomLocInRect(udg_rects01[udg_integers33[1]])
call CreateNUnitsAtLoc(1,'h018',Player(24),udg_location02,AngleBetweenPoints(udg_location03,udg_location02))
call GroupAddUnit(udg_groups02[4],bj_lastCreatedUnit)
call RemoveLocation(udg_location02)
else
set udg_location02=GetRandomLocInRect(udg_rects01[udg_integers33[1]])
call CreateNUnitsAtLoc(1,'h005',Player(24),udg_location02,AngleBetweenPoints(udg_location03,udg_location02))
call GroupAddUnit(udg_groups02[4],bj_lastCreatedUnit)
call RemoveLocation(udg_location02)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call RemoveLocation(udg_location03)
call ConditionalTriggerExecute(udg_trigger228)
endif
endif
endif
endfunction
function Func1177 takes nothing returns nothing
if(((IsUnitInGroup(GetEnumUnit(),udg_group02))))then
set udg_location02=GetUnitLoc(GetEnumUnit())
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,15.,0,35.,35.,100)
call RemoveLocation(udg_location02)
endif
endfunction
function Func1178 takes nothing returns nothing
call KillUnit(GetEnumUnit())
set udg_location02=GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc(1,'u000',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
endfunction
function Func1179 takes nothing returns nothing
call TriggerSleepAction(5.)
call EnableTrigger(udg_trigger235)
call CreateQuestBJ(0,"Current Objective","Search the area for civilians and guard the police barricade. If you find any civilians, bring them to the police barricade.","ReplaceableTextures\\CommandButtons\\BTNSelectHeroOn.blp")
call FlashQuestDialogButton()
set udg_quest01=bj_lastCreatedQuest
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,25.,"|cff808000SOCOM:|r A police barricade? I'm surprised anyone survived that wreck. Guard the police and search the buildings for more survivors. If you find any, lead them back to the barricade.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(12.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000Marine:|r They won't be survivors for long if they're out too far.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(6.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cff808000SOCOM:|r Sattelites are going to pick up any life signs near you. It will make a locator ping on your digital map for a few seconds.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(4.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"|cff808000Pinging nearby life units...|r")
call TriggerSleepAction(2.)
call PlaySoundBJ(udg_sound05)
set udg_group23=UAUnitGroupWithinRangeOfLoc(9000.,GetRectCenter(udg_rect122))
call ForGroupBJ(udg_group23,function Func1177)
call DestroyGroup(udg_group23)
call TriggerSleepAction(4.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,8.,"|cff808000Police Officer:|r Marines? Thank God we've got some backup. We're pinned down here and can't spare any men to look for more civilians. Lead any you can find here and we'll head to town when we're ready.")
call TriggerSleepAction(GetRandomReal(240.,520.))
call ConditionalTriggerExecute(udg_trigger239)
call EnableTrigger(udg_trigger243)
call PlaySoundBJ(udg_sound56)
call ForGroupBJ(udg_group02,function Func1178)
endfunction
function Func1180 takes nothing returns nothing
call SetCameraQuickPositionLocForPlayer(GetEnumPlayer(),udg_location02)
endfunction
function Func1181 takes nothing returns nothing
set udg_location02=GetUnitLoc(GetEnumUnit())
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,12.,0,35.,35.,100)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func1180)
call RemoveLocation(udg_location02)
endfunction
function Func1182 takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Communication with Special Operations Command established (SOCOM).")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(5.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Jesus, what happened to that place? Keep your eyes peeled for hostiles.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(20.)
call CreateQuestBJ(0,"Current Objective","Initial airborne reconnaissance drones have picked up at least 5 Spore Colonies operating in your sector. While not the greatest threat, these colonies could severely destabilize the sector if left unchecked. Hostile units are bearing down on your location and we estimate that you have |cfffffc019 minutes|r to purge these colonies before you have greater issues to deal with.","ReplaceableTextures\\CommandButtons\\BTNSelectHeroOn.blp")
call FlashQuestDialogButton()
set udg_quest01=bj_lastCreatedQuest
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Reports on this sector say that Spore Colonies have been spotted in the area. Find and kill 5 Spore Colonies to purge the sector of pests.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(4.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"|cff808000Pinging nearby spore units...|r")
call TriggerSleepAction(2.)
call PlaySoundBJ(udg_sound05)
set udg_group23=UAUnitGroupWithTypeId('n00H')
call ForGroupBJ(udg_group23,function Func1181)
call TriggerSleepAction(540.)
call PlaySoundBJ(udg_sound56)
set udg_boolean02=true
endfunction
function Func1183 takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Communication with Special Operations Command established (SOCOM).")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(5.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Jesus, what happened to that place? Keep your eyes peeled for hostiles.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(20.)
call CreateQuestBJ(0,"Current Objective","Airborne surveillance of the surrounding area has revealed that 2 Gonarchs and 4 class B zombies are closing in on your sector. In order to prevent the area from being overrun, we have begun bombardment with specialized shells containing T-Virus samples and we have enough ammunition to keep this assault up for |cfffffc019 minutes|r. While we suggest that you use the T-Virus clouds to your advantage, your mission is to destroy them by any means available.","ReplaceableTextures\\CommandButtons\\BTNSelectHeroOn.blp")
call FlashQuestDialogButton()
set udg_quest01=bj_lastCreatedQuest
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r 2 Gonarchs and 4 Class B zombies have infested this area and we will commence artillery cleansing with T-Virus clouds. Leading them into the T-Virus clouds will help with killing them.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(540.)
call PlaySoundBJ(udg_sound56)
set udg_boolean02=true
endfunction
function Func1184 takes nothing returns nothing
call SetCameraQuickPositionLocForPlayer(GetEnumPlayer(),udg_location02)
endfunction
function Func1185 takes nothing returns nothing
call SetCameraQuickPositionLocForPlayer(GetEnumPlayer(),udg_location02)
endfunction
function Func1186 takes nothing returns nothing
call SetCameraQuickPositionLocForPlayer(GetEnumPlayer(),udg_location02)
endfunction
function Func1187 takes nothing returns nothing
call SetCameraQuickPositionLocForPlayer(GetEnumPlayer(),udg_location02)
endfunction
function Func1188 takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,8.,"|cff808000SOCOM:|r Communication with Special Operations Command established (SOCOM).")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(5.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Jesus, what happened to that place? Keep your eyes peeled for hostiles.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(15.)
call CreateQuestBJ(0,"Current Objective","We have picked up 4 distress signals shortly after your arrival. Airborn surveillance has detected them to be police either pinned down or set up at road stops. Find the police officers and prepare them to be escorted to one of the 2 towns.","ReplaceableTextures\\CommandButtons\\BTNSelectHeroOn.blp")
call FlashQuestDialogButton()
set udg_quest01=bj_lastCreatedQuest
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r We have picked up 4 distress signals shortly after your arrival. Airborn surveillance has detected them to be police either pinned down or set up at road stops.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(8.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Find the police officers and prepare them to be escorted to one of the 2 towns.")
call PlaySoundBJ(udg_sound88)
set udg_location02=GetRectCenter(udg_rect89)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,12.,0,35.,35.,100)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func1184)
call RemoveLocation(udg_location02)
set udg_location02=GetRectCenter(udg_rect101)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,12.,0,35.,35.,100)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func1185)
call RemoveLocation(udg_location02)
set udg_location02=GetRectCenter(udg_rect102)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,12.,0,35.,35.,100)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func1186)
call RemoveLocation(udg_location02)
set udg_location02=GetRectCenter(udg_rects01[udg_integers33[1]])
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,12.,0,35.,35.,100)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func1187)
call RemoveLocation(udg_location02)
call TriggerSleepAction(1080.)
call PlaySoundBJ(udg_sound56)
set udg_boolean02=true
endfunction
function Func1189 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1190 takes nothing returns nothing
local location loc_location01=GetRandomLocInRect(udg_rect127)
local group loc_group01
local sound loc_sound01=udg_sound18
call CreateNUnitsAtLoc(1,'h00S',Player(11),(loc_location01),bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(5.,'BTLF',bj_lastCreatedUnit)
call ForForce(Func0015(MAP_CONTROL_USER),function Func1189)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,loc_location01,3.,0,100,100,.0)
call VXSleep(2.)
call PlaySoundAtPointBJ((loc_sound01),100.,(loc_location01),.0)
call DestroyEffect(AddSpecialEffectLoc("war3mapImported\\ground.mdx",(loc_location01)))
call CreateNUnitsAtLoc(1,'h00T',Player(11),(loc_location01),GetRandomReal(0,360))
call UnitApplyTimedLifeBJ(20.,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(loc_location01)
set loc_group01=null
set loc_location01=null
set loc_sound01=null
endfunction
function Func1193 takes nothing returns boolean
local boolean b = GetUnitRace(GetTriggerUnit()) == RACE_UNDEAD or GetUnitRace(GetAttacker()) == RACE_UNDEAD
return b and(((GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_USER)or(GetPlayerController(GetOwningPlayer(GetAttacker()))==MAP_CONTROL_USER)))
endfunction
function Func1196 takes nothing returns nothing
if GetUnitRace(GetTriggerUnit()) == RACE_UNDEAD then
call DisableTrigger(GetTriggeringTrigger())
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,(GetPlayerName(GetOwningPlayer(GetAttacker()))+": Contact!"))
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(4.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Undead, just as we thought. Continue the patrol.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(8.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Don't let them get close, a zombie thrash can cause wounds and other ailments.")
call PlaySoundBJ(udg_sound88)
endif
if GetUnitRace(GetAttacker()) == RACE_UNDEAD then
call DisableTrigger(GetTriggeringTrigger())
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+": Contact!"))
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(4.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Undead, just as we thought. Continue the patrol.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(8.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Don't let them get close, a zombie thrash can cause wounds and other ailments.")
call PlaySoundBJ(udg_sound88)
endif
endfunction
function Func1197 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1199 takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Recon has picked up multiple hostiles closing in on your position.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(10.)
if(((udg_integer16==0)))then
call EnableTrigger(udg_trigger217)
else
call EnableTrigger(udg_trigger215)
endif
endfunction
function Func1200 takes nothing returns boolean
return(IsUnitInGroup(GetEnteringUnit(),udg_group20))
endfunction
function Func1209 takes nothing returns nothing
if(((GetPlayerSlotState(GetOwningPlayer(GetEnteringUnit()))==PLAYER_SLOT_STATE_PLAYING)))then
call SetUnitOwner(GetEnumUnit(),GetOwningPlayer(GetEnteringUnit()),true)
else
set udg_location02=GetRectCenter(udg_rect19)
call IssuePointOrderByIdLoc(GetEnumUnit(),851986,udg_location02)
call RemoveLocation(udg_location02)
endif
endfunction
function Func1211 takes nothing returns nothing
local integer loc_integer01
if(((RectContainsUnit(udg_rect101,GetEnteringUnit()))))then
set loc_integer01=1
endif
if(((RectContainsUnit(udg_rect102,GetEnteringUnit()))))then
set loc_integer01=2
endif
if(((RectContainsUnit(udg_rect89,GetEnteringUnit()))))then
set loc_integer01=3
endif
if(((RectContainsUnit(udg_rects01[udg_integers33[1]],GetEnteringUnit()))))then
set loc_integer01=4
endif
set udg_integer31=loc_integer01
if(((udg_booleans14[udg_integer31]==false)and(IsUnitGroupDeadBJ(udg_groups02[udg_integer31])==false)))then
set udg_booleans14[udg_integer31]=true
call Func0241(GetEnteringUnit(),8.,"|cff808000"+GetPlayerName(GetOwningPlayer(GetEnteringUnit()))+"|r Found some officers. Give them a minute or two to get ready.")
set udg_location02=GetUnitLoc(GetEnteringUnit())
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,5.,0,35.,35.,100)
call RemoveLocation(udg_location02)
call TriggerSleepAction(GetRandomReal(90.,200.))
set udg_integer31=loc_integer01
set udg_booleans13[loc_integer01]=true
if(((udg_boolean01)))then
return
endif
if(((IsUnitGroupDeadBJ(udg_groups02[udg_integer31]))))then
return
endif
if(((GetPlayerSlotState(GetOwningPlayer(GetEnteringUnit()))==PLAYER_SLOT_STATE_PLAYING)))then
call Func0241(GetEnteringUnit(),8.,"|cff808000"+GetPlayerName(GetOwningPlayer(GetEnteringUnit()))+"|r Let's go.")
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,8.,"|cff808000Police Officer:|r Let's move out.")
endif
call ForGroupBJ(udg_groups02[udg_integer31],function Func1209)
endif
endfunction
function Func1213 takes nothing returns boolean
return(((IsUnitInGroup(GetEnteringUnit(),udg_groups02[1]))or(IsUnitInGroup(GetEnteringUnit(),udg_groups02[2]))or(IsUnitInGroup(GetEnteringUnit(),udg_groups02[3]))or(IsUnitInGroup(GetEnteringUnit(),udg_groups02[4]))))
endfunction
function Func1215 takes nothing returns nothing
call Func0233(3.,"Officer rescued")
call SetUnitOwner(GetEnteringUnit(),Player(24),true)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=4
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call GroupRemoveUnit(udg_groups02[bj_forLoopAIndex],GetEnteringUnit())
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(((RectContainsUnit(udg_rect19,GetEnteringUnit()))))then
set udg_location02=GetRandomLocInRect(udg_rect19)
call IssuePointOrderByIdLoc(GetEnteringUnit(),851986,udg_location02)
call RemoveLocation(udg_location02)
else
set udg_location02=GetRandomLocInRect(udg_rect126)
call IssuePointOrderByIdLoc(GetEnteringUnit(),851986,udg_location02)
call RemoveLocation(udg_location02)
endif
endfunction
function Func1217 takes nothing returns boolean
return(((IsUnitInGroup(GetTriggerUnit(),udg_group02))or(IsUnitInGroup(GetTriggerUnit(),udg_group07))))and(udg_boolean01==false)and(GetUnitTypeId(udg_units01[(1+GetPlayerId(GetTriggerPlayer()))])!='h00K')
endfunction
function Func1219 takes nothing returns nothing
local location temploc=GetUnitLoc(udg_units01[(1+GetPlayerId(GetTriggerPlayer()))])
local location temploc2=GetUnitLoc(GetTriggerUnit())
if(((DistanceBetweenPoints(temploc,temploc2)<=800.)))then
call IssueTargetOrderById(GetTriggerUnit(),851971,udg_units01[(1+GetPlayerId(GetTriggerPlayer()))])
else
call DisplayTimedTextToForce(CreatePlayerForce(GetTriggerPlayer()),5.,"Must get closer.")
endif
call RemoveLocation(temploc)
set temploc=null
call RemoveLocation(temploc2)
set temploc2=null
endfunction
function Func1220 takes nothing returns boolean
return(IsUnitInGroup(GetEnteringUnit(),udg_group02))and(udg_boolean01==false)
endfunction
function Func1221 takes nothing returns nothing
set udg_location02=GetRectCenter(udg_rect06)
call IssuePointOrderByIdLoc(GetEnteringUnit(),851986,udg_location02)
call RemoveLocation(udg_location02)
call GroupRemoveUnit(udg_group02,GetEnteringUnit())
call TriggerSleepAction(GetRandomReal(7.,12.))
call IssueImmediateOrderById(GetEnteringUnit(),851993)
endfunction
function Func1222 takes nothing returns boolean
return(IsUnitInGroup(GetEnteringUnit(),udg_group16))and(udg_boolean01==false)
endfunction
function Func1223 takes nothing returns nothing
local real loc_real01
call IssueImmediateOrderById(GetEnteringUnit(),851972)
call SetUnitInvulnerable(GetEnteringUnit(),true)
set loc_real01=0
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=10
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call TriggerSleepAction(.1)
call SetUnitVertexColorBJ(GetEnteringUnit(),100,100,100,loc_real01)
set loc_real01=loc_real01+3.3
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call GroupRemoveUnit(udg_group02,GetEnteringUnit())
call RemoveUnit(GetEnteringUnit())
call Func0233(2.,"Survivor rescued")
endfunction
function Func1224 takes nothing returns boolean
return(IsUnitInGroup(GetEnteringUnit(),udg_group16))and(udg_boolean01==false)
endfunction
function Func1225 takes nothing returns nothing
local real loc_real01
call IssueImmediateOrderById(GetEnteringUnit(),851972)
call SetUnitInvulnerable(GetEnteringUnit(),true)
set loc_real01=0
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=10
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call TriggerSleepAction(.1)
call SetUnitVertexColorBJ(GetEnteringUnit(),100,100,100,loc_real01)
set loc_real01=loc_real01+3.3
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call GroupRemoveUnit(udg_group02,GetEnteringUnit())
call RemoveUnit(GetEnteringUnit())
call Func0233(2.,"Survivor rescued")
endfunction
function Func1226 takes nothing returns boolean
return(IsUnitInGroup(GetDyingUnit(),udg_group02))
endfunction
function Func1227 takes nothing returns nothing
call GroupRemoveUnit(udg_group02,GetDyingUnit())
endfunction
function Func1230 takes nothing returns boolean
return GetBooleanAnd(((GetOwningPlayer(GetFilterUnit())==Player(24))),((IsUnitAliveBJ(GetFilterUnit()))))
endfunction
function Func1231 takes nothing returns boolean
return(CountUnitsInGroup(Func0005(udg_rect06,Condition(function Func1230)))>=1)
endfunction
function Func1233 takes nothing returns nothing
call GroupAddUnit(udg_group16,GetEnumUnit())
if(((GetRandomInt(1,2)==1)))then
set udg_location02=GetRectCenter(udg_rect125)
call IssuePointOrderByIdLoc(GetEnumUnit(),851986,udg_location02)
call RemoveLocation(udg_location02)
set udg_integer21=1
call EnableTrigger(udg_trigger236)
else
set udg_location02=GetRectCenter(udg_rect126)
call IssuePointOrderByIdLoc(GetEnumUnit(),851986,udg_location02)
call RemoveLocation(udg_location02)
set udg_integer21=2
call EnableTrigger(udg_trigger237)
endif
endfunction
function Func1235 takes nothing returns nothing
call EnableTrigger(udg_trigger240)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"The survivors are evacuating.")
set udg_group23=Func0007(udg_rect06,Player(24))
call ForGroupBJ(udg_group23,function Func1233)
if(((udg_integer23>=5000)))then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=10
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect14)
call CreateNUnitsAtLoc(1,'n013',Player(27),udg_location02,.0)
call Func0200(bj_lastCreatedUnit)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
endfunction
function Func1238 takes nothing returns nothing
if(((udg_integer21==1)))then
set udg_location02=GetRectCenter(udg_rect125)
call IssuePointOrderByIdLoc(GetEnumUnit(),851986,udg_location02)
call RemoveLocation(udg_location02)
else
if(((udg_integer21==2)))then
set udg_location02=GetRectCenter(udg_rect126)
call IssuePointOrderByIdLoc(GetEnumUnit(),851986,udg_location02)
call RemoveLocation(udg_location02)
endif
endif
endfunction
function Func1239 takes nothing returns nothing
call ForGroupBJ(udg_group16,function Func1238)
endfunction
function Func1241 takes nothing returns nothing
local unit u=GetEnumUnit()
local location temploc
local group g
if(((IsUnitAliveBJ(u))))then
set temploc=GetUnitLoc(u)
call SetUnitAnimation(u,"slam")
call DestroyEffect(AddSpecialEffectLoc("Objects\\Spawnmodels\\Demon\\DemonSmallDeathExplode\\DemonSmallDeathExplode.mdl",temploc))
set g=CreateNUnitsAtLoc(1,'n00I',Player(27),temploc,GetRandomReal(0,360))
call RemoveLocation(temploc)
set temploc=GetUnitLoc(GroupPickRandomUnit(udg_group20))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851983,temploc)
call RemoveLocation(temploc)
call DestroyGroup(g)
endif
set u=null
set temploc=null
set g=null
endfunction
function Func1242 takes nothing returns boolean
return(IsUnitAliveBJ(GetEnumUnit()))
endfunction
function Func1243 takes nothing returns nothing
if(((IsUnitAliveBJ(GetEnumUnit()))))then
call ResetUnitAnimation(GetEnumUnit())
endif
endfunction
function Func1244 takes nothing returns nothing
local group g
set g=UAUnitGroupWithTypeId('n00H')
call ForGroupBJ(g,function Func1241)
call TriggerSleepAction(1.)
call ForGroupBJ(g,function Func1243)
call DestroyGroup(g)
set g=null
endfunction
function Func1245 takes nothing returns boolean
return(IsUnitInGroup(GetDyingUnit(),udg_group06))
endfunction
function Func1246 takes nothing returns nothing
call GroupRemoveUnit(udg_group06,GetDyingUnit())
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,("|cff808000Spore purged, "+(I2S((10*(udg_integer16+1)))+" XP awarded to all players.")))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_integers04[bj_forLoopAIndex]=(udg_integers04[bj_forLoopAIndex]+(10*(udg_integer16+1)))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func1247 takes nothing returns nothing
call ExplodeUnitBJ(GetEnumUnit())
endfunction
function Func1255 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1259 takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player(11),true)
set udg_location02=GetRectCenter(udg_rect26)
call IssuePointOrderByIdLoc(GetEnumUnit(),851986,udg_location02)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group03,GetEnumUnit())
endfunction
function Func1262 takes nothing returns nothing
local location temploc
if(((CountUnitsInGroup(udg_group16)==0)and(udg_boolean01==false)and(udg_integer12==2)))then
call DisableTrigger(GetTriggeringTrigger())
set udg_integer19=(udg_integer19+1)
call TriggerSleepAction(GetRandomReal(1.,5.))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Continue the patrol and reinforce your sector before receiving new orders.")
call PlaySoundBJ(udg_sound88)
else
if(((CountUnitsInGroup(udg_group06)==0)and(udg_boolean01==false)and(udg_integer12==1)))then
call DisableTrigger(GetTriggeringTrigger())
set udg_integer19=(udg_integer19+1)
call Func0233(10.,"Spores eradicated")
call TriggerSleepAction(GetRandomReal(3.,5.))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r The spores have been purged. Reinforce the sector and await further orders.")
call PlaySoundBJ(udg_sound88)
else
if(((udg_boolean01==false)and(udg_integer12==1)and(udg_boolean02)))then
set udg_integer20=(udg_integer20+1)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Reinforce the sector and await further orders.")
call PlaySoundBJ(udg_sound88)
else
if(((IsUnitGroupDeadBJ(udg_group12))and(udg_boolean01==false)and(udg_integer12==3)))then
call DisableTrigger(GetTriggeringTrigger())
set udg_integer19=(udg_integer19+1)
call DisableTrigger(udg_trigger229)
call Func0233(28.,"Gonarchs and Class B zombies slain")
call TriggerSleepAction(GetRandomReal(1.,5.))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r The Gonarchs and Class B's have been killed. Reinforce the sector and await further orders.")
call PlaySoundBJ(udg_sound88)
else
if(((udg_boolean02)and(udg_integer12==3)))then
call DisableTrigger(udg_trigger229)
set udg_integer20=(udg_integer20+1)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Reinforce the sector and await further orders.")
call PlaySoundBJ(udg_sound88)
else
return
if(((IsUnitGroupDeadBJ(udg_groups02[1]))and(IsUnitGroupDeadBJ(udg_groups02[2]))and(IsUnitGroupDeadBJ(udg_groups02[3]))and(IsUnitGroupDeadBJ(udg_groups02[4]))and(udg_boolean01==false)and(udg_integer12==4)and(udg_boolean02==false)))then
set udg_integer19=(udg_integer19+1)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Reinforce the sector and await further orders.")
call PlaySoundBJ(udg_sound88)
else
if(((udg_integer12==4)and(udg_boolean02)))then
set udg_integer20=(udg_integer20+1)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Reinforce the sector and await further orders.")
call PlaySoundBJ(udg_sound88)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=4
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call ForGroupBJ(udg_groups02[bj_forLoopAIndex],function Func1247)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
return
endif
endif
endif
endif
endif
endif
endif
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(udg_trigger236)
call DisableTrigger(udg_trigger237)
call DisableTrigger(udg_trigger232)
call QuestSetDescription(udg_quest01,"Extraction is put on hold due to high hostile activity. We have no outstanding tasks or missions for you at this time. Your standing orders are to focus on survival as well as the protection of the two towns and their inhabitants. Defend the towns, search for equipment and reinforce the sector at your own discretion.")
call FlashQuestDialogButton()
call TriggerSleepAction(GetRandomReal(30.,60.))
set temploc=GetRandomLocInRect(udg_rects02[GetRandomInt(1,4)])
call CreateNUnitsAtLoc(1,'u002',Player(27),temploc,GetRandomReal(0,360))
call RemoveLocation(temploc)
call Func0200(bj_lastCreatedUnit)
set temploc=GetRandomLocInRect(udg_rects02[GetRandomInt(1,4)])
call CreateNUnitsAtLoc(1,'n00W',Player(27),temploc,GetRandomReal(0,360))
call RemoveLocation(temploc)
call IssueImmediateOrderById(bj_lastCreatedUnit,852556)
call Func0200(bj_lastCreatedUnit)
call TriggerSleepAction(GetRandomReal(40.,120.))
if(((GetRandomInt(1,3)==1)))then
set udg_integer27=1
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"|cff808000SOCOM:|r 1st Platoon, Bravo Company's convoy will be passing through your sector shortly. You'll need to set up 3 sentry guns to help secure the sector and survey activity.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(15.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r The M70 Sentry Guns will be dropped in the northwestern town. Deploy them at the designated positions.")
call PlaySoundBJ(udg_sound88)
set temploc=GetRectCenter(udg_rect114)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,temploc,20.,2,100.,50.,100.)
call RemoveLocation(temploc)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateItemLoc('I005',GetRandomLocInRect(udg_rect114))
set udg_items02[bj_forLoopAIndex]=bj_lastCreatedItem
set udg_locations01[bj_forLoopAIndex]=GetRandomLocInRect(udg_rect52)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call QuestSetDescription(udg_quest01,"Bravo Company has a convoy inbound that will be passing through your sector in under |cfffffc015 1/2 minutes|r. In order to assure their safe passage, you are ordered to deploy the 3 M70 sentry turrets that have been dropped in the northwestern town at the designated points.")
call FlashQuestDialogButton()
call EnableTrigger(udg_trigger244)
call EnableTrigger(udg_trigger245)
call DisableTrigger(udg_trigger215)
call EnableTrigger(udg_trigger247)
call TriggerSleepAction(330.)
set udg_boolean03=true
call EnableTrigger(udg_trigger215)
else
if(((GetRandomInt(1,3)==1)))then
set udg_integer27=2
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"|cff808000SOCOM:|r An Argis-45 Transport Helicopter will be dropping off reinforcements and supplies for Bravo Company. Meet up with them and secure the supplies for the convoy.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(25.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"|cff808000Pilot:|r Damnit! I've got shredders on my tail and I can't shake them!")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(15.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"|cff808000Pilot:|r We're going down! I repeat, we are going down!")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(4.)
call PlaySoundBJ(udg_sound60)
call TriggerSleepAction(3.)
call QuestSetDescription(udg_quest01,"Rescue the crash victims and bring them to the southwest town.")
call FlashQuestDialogButton()
call DisableTrigger(udg_trigger215)
call DisableTrigger(udg_trigger210)
call EnableTrigger(udg_trigger211)
call PlaySoundBJ(udg_sound38)
set temploc=Location(291.,13359.)
call CreateNUnitsAtLoc(1,'h013',Player(11),temploc,161.)
call RemoveLocation(temploc)
call UnitApplyTimedLifeBJ(330.,'BTLF',bj_lastCreatedUnit)
call SetUnitTimeScalePercent(bj_lastCreatedUnit,.0)
call SetUnitLifePercentBJ(bj_lastCreatedUnit,40.)
set temploc=Location(621.,13743.)
call CreateNUnitsAtLoc(1,'o005',Player(11),temploc,GetRandomReal(0,360))
call RemoveLocation(temploc)
call ForForce(Func0015(MAP_CONTROL_USER),function Func1255)
if(((udg_boolean08)))then
call UnitApplyTimedLifeBJ(85.,'BTLF',bj_lastCreatedUnit)
call SetUnitScalePercent(bj_lastCreatedUnit,115.,115.,115.)
call SetUnitTimeScalePercent(bj_lastCreatedUnit,150.)
else
call UnitApplyTimedLifeBJ(240.,'BTLF',bj_lastCreatedUnit)
endif
call AttachSoundToUnit(udg_sound58,bj_lastCreatedUnit)
call SetSoundVolume(udg_sound58,100)
call StartSound(udg_sound58)
set temploc=Location(707.,13409.)
call CreateNUnitsAtLoc(1,'h009',Player(11),temploc,9.)
call RemoveLocation(temploc)
call IssueImmediateOrderById(bj_lastCreatedUnit,851993)
call GroupAddUnit(udg_group21,bj_lastCreatedUnit)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
set temploc=Location(2.,13322.)
call CreateNUnitsAtLoc(1,'h009',Player(11),temploc,152.)
call RemoveLocation(temploc)
call IssueImmediateOrderById(bj_lastCreatedUnit,851993)
call GroupAddUnit(udg_group21,bj_lastCreatedUnit)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
set temploc=Location(276.,13048.)
call CreateNUnitsAtLoc(1,'h014',Player(11),temploc,274.)
call RemoveLocation(temploc)
call IssueImmediateOrderById(bj_lastCreatedUnit,851993)
call GroupAddUnit(udg_group21,bj_lastCreatedUnit)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
set temploc=Location(448.,13761.)
call CreateNUnitsAtLoc(1,'h009',Player(11),temploc,100.)
call RemoveLocation(temploc)
call IssueImmediateOrderById(bj_lastCreatedUnit,851993)
call GroupAddUnit(udg_group21,bj_lastCreatedUnit)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"|cff808000SOCOM:|r Head to the crash site and bring those soldiers to the southwest town.")
call PlaySoundBJ(udg_sound88)
set temploc=Location(291.,13359.)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,temploc,5.,2,100,50.,50.)
call RemoveLocation(temploc)
call EnableTrigger(udg_trigger246)
call EnableTrigger(udg_trigger247)
call TriggerSleepAction(420.)
set udg_boolean03=true
call EnableTrigger(udg_trigger215)
call DisableTrigger(udg_trigger211)
call DisableTrigger(udg_trigger246)
call EnableTrigger(udg_trigger210)
call ForGroupBJ(udg_group21,function Func1259)
else
set udg_integer27=3
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"|cff808000SOCOM:|r An Argis-45 Transport Helicopter will be dropping off reinforcements and supplies for Bravo Company. Meet up with them and secure the supplies for the convoy.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(25.)
call QuestSetDescription(udg_quest01,"Guard the supplies for the convoy.")
call FlashQuestDialogButton()
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Guard the supplies until the convoy passes by.")
call PlaySoundBJ(udg_sound88)
set udg_location02=OffsetLocation(GetRectCenter(udg_rect92),-1200.,150.)
call CreateNUnitsAtLoc(1,'h015',Player(11),udg_location02,.0)
call UnitApplyTimedLifeBJ(9.,'BTLF',bj_lastCreatedUnit)
set udg_unit06=bj_lastCreatedUnit
call RemoveLocation(udg_location02)
set udg_location02=GetRectCenter(udg_rect92)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851986,udg_location02)
call RemoveLocation(udg_location02)
call TriggerSleepAction(4.)
set udg_location02=GetRectCenter(udg_rect92)
call CreateNUnitsAtLoc(1,'n010',Player(11),udg_location02,.0)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func1255)
set udg_unit17=bj_lastCreatedUnit
call RemoveLocation(udg_location02)
set udg_location02=GetRectCenter(udg_rect118)
call CreateNUnitsAtLoc(1,'h004',Player(11),udg_location02,.0)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func1255)
call RemoveLocation(udg_location02)
set udg_location02=GetRectCenter(udg_rect97)
call IssuePointOrderByIdLoc(udg_unit06,851986,udg_location02)
call RemoveLocation(udg_location02)
call EnableTrigger(udg_trigger247)
call TriggerSleepAction(240.)
set udg_boolean03=true
endif
endif
endfunction
function Func1263 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1265 takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((udg_booleans02[bj_forLoopAIndex]==false)))then
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_locations01[bj_forLoopAIndex],1.,0,50.,100.,50.)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func1266 takes nothing returns boolean
return(GetSpellAbilityId()=='A013')and(udg_boolean01==false)
endfunction
function Func1269 takes nothing returns boolean
return GetBooleanAnd(((GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit()))),((GetUnitTypeId(GetFilterUnit())=='h004')))
endfunction
function Func1272 takes nothing returns boolean
return GetBooleanAnd(((GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit()))),((GetUnitTypeId(GetFilterUnit())=='h004')))
endfunction
function Func1273 takes nothing returns nothing
call CreateItemLoc('I005',GetUnitLoc(GetEnumUnit()))
call RemoveUnit(GetEnumUnit())
endfunction
function Func1277 takes nothing returns nothing
local location temploc
local group g
set temploc=GetUnitLoc(GetSpellAbilityUnit())
if(((DistanceBetweenPoints(temploc,udg_locations01[1])<800.)and(udg_booleans02[1]==false)))then
set udg_booleans02[1]=true
call SetUnitOwner(GetEnumUnit(),Player(24),true)
call Func0233(10.,"Sentry activated")
else
if(((DistanceBetweenPoints(temploc,udg_locations01[2])<800.)and(udg_booleans02[2]==false)))then
set udg_booleans02[2]=true
call SetUnitOwner(GetEnumUnit(),Player(24),true)
call Func0233(10.,"Sentry activated")
else
if(((DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()),udg_locations01[3])<800.)and(udg_booleans02[3]==false)))then
set udg_booleans02[3]=true
call SetUnitOwner(GetEnumUnit(),Player(24),true)
call Func0233(10.,"Sentry activated")
else
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetTriggerUnit())),10.,"Sentries must be deployed at designated areas.")
set g=UAUnitGroupWithinRangeOfLocMatching(300.,GetUnitLoc(GetTriggerUnit()),Condition(function Func1272))
call ForGroupBJ(g,function Func1273)
call DestroyGroup(g)
endif
endif
endif
call RemoveLocation(temploc)
set temploc=null
set g=null
endfunction
function Func1278 takes nothing returns nothing
local group g=UAUnitGroupWithinRangeOfLocMatching(300.,GetUnitLoc(GetTriggerUnit()),Condition(function Func1269))
call ForGroupBJ(g,function Func1277)
call DestroyGroup(g)
set g=null
endfunction
function Func1279 takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player(-1+(bj_forLoopAIndex)),false)
endfunction
function Func1281 takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((DistanceBetweenPoints(GetUnitLoc(udg_units01[bj_forLoopAIndex]),Location(291.,13359.))<=650.)))then
call DisableTrigger(GetTriggeringTrigger())
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"|cff808000Pilot:|r Man, are we glad to see you! Let's get the hell out of here!")
call PlaySoundBJ(udg_sound88)
call ForGroupBJ(udg_group21,function Func1279)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,(GetPlayerName(Player(-1+(bj_forLoopAIndex)))+" has rescued the crash victims."))
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=10
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call CreateNUnitsAtLoc(1,'n001',Player(27),Location(-1947.,13985.),bj_UNIT_FACING)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851983,Location(291.,13359.))
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
call TriggerSleepAction(.01)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func1289 takes nothing returns boolean
return GetBooleanAnd((GetBooleanAnd(((IsUnitAliveBJ(GetFilterUnit()))),((IsUnitInGroup(GetFilterUnit(),udg_group21))))),((GetUnitTypeId(GetFilterUnit())!='h014')))
endfunction
function Func1291 takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player(11),true)
endfunction
function Func1292 takes nothing returns nothing
call GroupRemoveUnit(udg_group21,GetEnumUnit())
endfunction
function Func1294 takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player(11),true)
call IssuePointOrderByIdLoc(GetEnumUnit(),851986,GetRectCenter(udg_rect26))
call GroupAddUnit(udg_group03,GetEnumUnit())
endfunction
function Func1301 takes nothing returns nothing
call GroupAddUnit(udg_group03,GetEnumUnit())
call IssuePointOrderByIdLoc(GetEnumUnit(),851986,GetRectCenter(udg_rect26))
endfunction
function Func1302 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1303 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1304 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1305 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1306 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1307 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1308 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1309 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1310 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1311 takes nothing returns nothing
local group g
if(((udg_integer27==1)and(udg_boolean01==false)and(udg_booleans02[1])and(udg_booleans02[2])and(udg_booleans02[3])))then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Bravo Company will be passing through shortly. Guard them on their way out.")
call PlaySoundBJ(udg_sound88)
set udg_integer19=(udg_integer19+1)
else
if(((udg_boolean03)and(udg_integer27==1)))then
set udg_integer20=(udg_integer20+1)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r You have taken too long to plant the sentries. Bravo Company will be passing through shortly. Guard them on their way out.")
call PlaySoundBJ(udg_sound88)
call DisableTrigger(udg_trigger244)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call RemoveItem(udg_items02[bj_forLoopAIndex])
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(((udg_integer27==1)))then
return
endif
endif
endif
if(((udg_integer27==2)and(IsUnitGroupInRectBJ(udg_group21,udg_rect19))))then
if(((CountUnitsInGroup(Func0005(GetWorldBounds(),Condition(function Func1289)))>0)))then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Bravo Company will be passing through shortly. Guard them on their way out. The rest of the men will join your platoon.")
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Bravo Company will be passing through shortly. Guard them on their way out.")
endif
call PlaySoundBJ(udg_sound88)
set udg_integer19=(udg_integer19+1)
set g=UAUnitGroupWithTypeId('h014')
call ForGroupBJ(g,function Func1291)
call DestroyGroup(g)
call ForGroupBJ(udg_group21,function Func1292)
else
if(((IsUnitGroupDeadBJ(udg_group21))and(udg_integer27==2)))then
set udg_integer20=(udg_integer20+1)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r The crash victims have been killed.")
call PlaySoundBJ(udg_sound88)
call DisableTrigger(udg_trigger246)
else
if(((udg_boolean03)and(udg_integer27==2)))then
set udg_integer20=(udg_integer20+1)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Bravo Company will be passing through shortly. The crash victims will join up with them.")
call PlaySoundBJ(udg_sound88)
call ForGroupBJ(udg_group21,function Func1294)
else
if(((udg_integer27==2)))then
return
endif
endif
endif
endif
if(((udg_integer27==3)and(udg_boolean01==false)and(udg_boolean03)and(IsUnitAliveBJ(udg_unit17))))then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Bravo Company should be passing through shortly. Guard the supplies until they can retrieve them.")
call PlaySoundBJ(udg_sound88)
set udg_integer19=(udg_integer19+1)
else
if(((udg_integer27==3)and(udg_boolean01==false)and(IsUnitDeadBJ(udg_unit17))))then
set udg_integer20=(udg_integer20+1)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r The supplies have been destroyed.")
call PlaySoundBJ(udg_sound88)
else
if(((udg_integer27==3)))then
return
endif
endif
endif
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(udg_trigger245)
call DisableTrigger(udg_trigger244)
call PlaySoundBJ(udg_sound88)
call PlaySoundBJ(udg_sound87)
call TriggerSleepAction(30.)
set udg_location02=GetRectCenter(udg_rect26)
call ForGroupBJ(UAUnitGroupWithTypeId('h014'),function Func1301)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,60.,2,50.,100,50.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r The convoy has arrived.")
call PlaySoundBJ(udg_sound88)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=4
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'h009',Player(11),udg_location02,.0)
call GroupAddUnit(udg_group03,bj_lastCreatedUnit)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call Func0242(bj_lastCreatedUnit,3)
call Func0244(bj_lastCreatedUnit,3)
call ForForce(Func0016(Player(0)),function Func1302)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'h00B',Player(11),udg_location02,.0)
call GroupAddUnit(udg_group03,bj_lastCreatedUnit)
call ForForce(Func0016(Player(0)),function Func1303)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call CreateNUnitsAtLoc(1,'h00G',Player(11),udg_location02,.0)
call GroupAddUnit(udg_group03,bj_lastCreatedUnit)
call ForForce(Func0016(Player(0)),function Func1304)
call CreateNUnitsAtLoc(1,'h019',Player(11),udg_location02,.0)
call GroupAddUnit(udg_group03,bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call Func0242(bj_lastCreatedUnit,3)
call ForForce(Func0016(Player(0)),function Func1305)
call CreateNUnitsAtLoc(1,'h00A',Player(11),udg_location02,.0)
call GroupAddUnit(udg_group03,bj_lastCreatedUnit)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
set udg_unit12=bj_lastCreatedUnit
call ForForce(Func0016(Player(0)),function Func1306)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'h00E',Player(11),udg_location02,.0)
call GroupAddUnit(udg_group03,bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call ForForce(Func0016(Player(0)),function Func1307)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'h00V',Player(11),udg_location02,.0)
call GroupAddUnit(udg_group03,bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call ForForce(Func0016(Player(0)),function Func1308)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call CreateNUnitsAtLoc(1,'h01E',Player(11),udg_location02,.0)
call GroupAddUnit(udg_group03,bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call ForForce(Func0016(Player(0)),function Func1309)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'h017',Player(11),udg_location02,.0)
call GroupAddUnit(udg_group03,bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call ForForce(Func0016(Player(0)),function Func1310)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call RemoveLocation(udg_location02)
call QuestSetDescription(udg_quest01,"Bravo Company is escorting a convoy carrying equipment for the Forward Operations post to the east and is presently passing through your sector. It is absolutely imperative that this convoy is not destroyed. You are ordered to protect the APCs and the soldiers as they pass through the hostile zone.")
call FlashQuestDialogButton()
call ConditionalTriggerExecute(udg_trigger248)
set g=null
endfunction
function Func1312 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1320 takes nothing returns nothing
if(((GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_PLAYING)and(IsUnitDeadBJ(udg_units01[(1+GetPlayerId(GetEnumPlayer()))]))))then
set udg_location02=GetRandomLocInRect(udg_rect26)
call PingMinimapLocForForceEx(CreatePlayerForce(GetEnumPlayer()),udg_location02,8.,2,50.,100,50.)
call DisplayTimedTextToForce(CreatePlayerForce(GetEnumPlayer()),15.,"Reinforcements have arrived.")
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'h009',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
if(((GetRandomInt(1,2)==1)))then
call CreateNUnitsAtLoc(1,'h00E',GetEnumPlayer(),udg_location02,.0)
else
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'h017',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
if(((GetRandomInt(1,2)==1)))then
if(((GetRandomInt(1,4)==1)))then
if(((GetRandomInt(1,2)==1)))then
call CreateNUnitsAtLoc(1,'h01D',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
call CreateNUnitsAtLoc(1,'h00A',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
endif
else
call CreateNUnitsAtLoc(1,'h01E',GetEnumPlayer(),udg_location02,.0)
endif
else
call CreateNUnitsAtLoc(1,'h00V',GetEnumPlayer(),udg_location02,.0)
endif
endif
endif
endif
call UnitAddItemByIdSwapped('I004',bj_lastCreatedUnit)
call RemoveLocation(udg_location02)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
endif
endfunction
function Func1330 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1335 takes nothing returns nothing
call ForForce(Func0015(MAP_CONTROL_USER),function Func1320)
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(27))+udg_integer16),Player(27))
// MORE ZOMBIE PLAYERS
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(12))+udg_integer16),Player(12))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(13))+udg_integer16),Player(13))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(14))+udg_integer16),Player(14))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(15))+udg_integer16),Player(15))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(16))+udg_integer16),Player(16))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(17))+udg_integer16),Player(17))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(18))+udg_integer16),Player(18))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(19))+udg_integer16),Player(19))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(20))+udg_integer16),Player(20))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(21))+udg_integer16),Player(21))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(22))+udg_integer16),Player(22))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(23))+udg_integer16),Player(23))
// ----
call EnableTrigger(udg_trigger251)
call EnableTrigger(udg_trigger253)
call EnableTrigger(udg_trigger212)
call DisableTrigger(udg_trigger210)
call CreateNUnitsAtLoc(1,'n00O',Player(27),GetRandomLocInRect(udg_rect124),GetRandomReal(0,360))
call TriggerSleepAction(5.)
set udg_location02=GetRandomLocInRect(udg_rect97)
call CreateNUnitsAtLoc(1,'n00W',Player(27),udg_location02,GetRandomReal(0,360))
call IssueImmediateOrderById(bj_lastCreatedUnit,852556)
call RemoveLocation(udg_location02)
call Func0202(bj_lastCreatedUnit)
if(((udg_integer23>=4500)))then
set udg_location02=GetRandomLocInRect(udg_rect97)
call CreateNUnitsAtLoc(1,'n00F',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0202(bj_lastCreatedUnit)
if(((udg_integer23>=40000)))then
set udg_location02=GetRandomLocInRect(udg_rect97)
call CreateNUnitsAtLoc(1,'n00F',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0202(bj_lastCreatedUnit)
if(((udg_integer23>=35000)))then
call PlaySoundBJ(udg_sound14)
else
call PlaySoundBJ(udg_sounds04[GetRandomInt(1,4)])
endif
endif
if(((udg_integer23>=35000)))then
set udg_location02=GetRandomLocInRect(udg_rect97)
call CreateNUnitsAtLoc(1,'u009',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0202(bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger202,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
endif
endif
call TriggerSleepAction(.01)
if(((udg_integer23>=12000)))then
set udg_location02=GetRandomLocInRect(udg_rect97)
call CreateNUnitsAtLoc(1,'u004',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0202(bj_lastCreatedUnit)
endif
if(((udg_integer23>=20000)))then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect97)
call CreateNUnitsAtLoc(1,'u004',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0202(bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(((udg_integer23>=40000)))then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect97)
call CreateNUnitsAtLoc(1,'u004',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0202(bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
endif
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=(udg_integer26*R2I(1.2))
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect110)
call CreateNUnitsAtLoc(1,'n000',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0202(bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(5.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=udg_integer26
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect110)
call CreateNUnitsAtLoc(1,'n001',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0202(bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(4.)
call Func0240(udg_unit12,8.,"|cff808000Detachment Commander:|r Alright team, things might get ugly fast. Watch out for hostiles and remember: 1 shot, 1 kill doesn't always apply to these things.")
call TriggerSleepAction(30.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000Battallion:|r Be advised that your cargo has attracted numerous hostiles flooding into the sector. We need the APCs to reach their destination unharmed, over.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(4.)
call Func0240(udg_unit12,8.,"|cff808000Detachment Commander:|r Roger that. E.T.A. 10 minutes, over.")
call TriggerSleepAction(30.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=(udg_integer26/3)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect106)
call CreateNUnitsAtLoc(1,'n011',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0202(bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(30.)
call Func0240(udg_unit12,8.,"|cff808000Detachment Commander:|r Our Combat Engineers and Medics are very important. Ensure their survival and they will ensure yours.")
call TriggerSleepAction(120.)
call Func0240(udg_unit12,8.,"|cff808000Detachment Commander:|r The bloated red ones can explode with toxic gases when killed. Keep an eye out for them.")
call TriggerSleepAction(GetRandomReal(120.,360.))
if(((udg_integer06==0)and(CountUnitsInGroup(udg_group03)>=1)))then
call Func0241(udg_unit12,8.,"|cff808000Battallion:|r Report in on the status of the convoy.")
call TriggerSleepAction(4.)
if(((udg_integer10==0)))then
call Func0240(udg_unit12,8.,"|cff808000Detachment Commander:|r All APCs have survived thus far.")
else
if(((udg_integer10==1)))then
call Func0240(udg_unit12,8.,"|cff808000Detachment Commander:|r We've got 1 APC down. Can we get additional support?")
else
call Func0240(udg_unit12,8.,"|cff808000Detachment Commander:|r We've got "+I2S(udg_integer10)+" APCs down. We need additional support, over.")
endif
endif
call TriggerSleepAction(8.)
if(((udg_integer10>=1)and(CountUnitsInGroup(udg_group03)>=1)and(((udg_boolean13)or(udg_integer05<10)))))then
call Func0241(udg_unit12,8.,"|cff808000Battallion:|r We may be able to spare a few soldiers from Sector E, but things aren't looking good there. We can't make any promises.")
call TriggerSleepAction(15.)
if(((GetRandomInt(1,3)!=1)))then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000Battallion:|r We've scrounged a few marines from Sector E. They'll join up with the convoy.")
call PlaySoundBJ(udg_sound88)
set udg_location02=GetRectCenter(udg_rect111)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,5.,2,50.,100,50.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(2,5)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'h009',Player(11),udg_location02,bj_UNIT_FACING)
call GroupAddUnit(udg_group03,bj_lastCreatedUnit)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call Func0242(bj_lastCreatedUnit,3)
call ForForce(Func0016(Player(0)),function Func1330)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000Battallion:|r We can't spare any marines from Sector E. Good luck out there.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(5.)
call Func0240(udg_unit12,8.,"|cff808000Detachment Commander:|r Don't let night dull your senses, men.")
endif
else
call Func0241(udg_unit12,8.,"|cff808000Battallion:|r Roger that.")
endif
endif
endfunction
function Func1336 takes nothing returns boolean
return(IsUnitInGroup(GetDyingUnit(),udg_group03))
endfunction
function Func1338 takes nothing returns nothing
call GroupRemoveUnit(udg_group03,GetDyingUnit())
if(((GetUnitTypeId(GetDyingUnit())=='h00B')))then
set udg_integer10=(udg_integer10+1)
endif
endfunction
function Func1339 takes nothing returns boolean
return(IsUnitInGroup(GetEnteringUnit(),udg_group03))and(udg_boolean01==false)
endfunction
function Func1341 takes nothing returns nothing
call DisableTrigger(udg_trigger249)
call GroupRemoveUnit(udg_group03,GetEnteringUnit())
call RemoveUnit(GetEnteringUnit())
call EnableTrigger(udg_trigger249)
if(((GetUnitTypeId(GetEnteringUnit())=='h00B')))then
set udg_integer06=(udg_integer06+1)
endif
endfunction
function Func1342 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1345 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func1349 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func1351 takes nothing returns nothing
if(((((udg_integer06>=3)or(((udg_integer06>=2)and(udg_integer10>=1)))))))then
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(udg_trigger253)
call DisableTrigger(udg_trigger212)
call EnableTrigger(udg_trigger210)
set udg_integer19=(udg_integer19+1)
call PlaySoundBJ(udg_sound85)
call ForGroupBJ(udg_group03,function Func1345)
call TriggerSleepAction(2)
if(((udg_boolean13)))then
call Func0233(65.,"Convoy extracted")
else
call Func0233(50.,"Convoy extracted")
endif
call TriggerSleepAction(60.)
call ConditionalTriggerExecute(udg_trigger265)
endif
if(((udg_integer10>=2)))then
call DisableTrigger(GetTriggeringTrigger())
set udg_integer20=(udg_integer20+1)
call PlaySoundBJ(udg_sound86)
call TriggerSleepAction(2)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r The convoy has been destroyed.")
call PlaySoundBJ(udg_sound88)
loop
exitwhen(((CountUnitsInGroup(udg_group03)==0)))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,1))
endloop
call DisableTrigger(udg_trigger253)
call DisableTrigger(udg_trigger252)
call DisableTrigger(udg_trigger212)
call EnableTrigger(udg_trigger210)
call ForGroupBJ(udg_group03,function Func1349)
call TriggerSleepAction(60.)
call ConditionalTriggerExecute(udg_trigger265)
endif
endfunction
function Func1352 takes nothing returns boolean
return(udg_integer05==13)
endfunction
function Func1359 takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
if(((((((udg_integer23<2000)and(GetRandomInt(1,2)==1)))or(((udg_integer23>=2000)and(GetRandomInt(1,6)==1)))))))then
set udg_integer05=22
else
set udg_boolean13=true
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000Battallion:|r New orders, Bravo Company. You are to take the south road to Forward Station C instead. Sector E is almost overrun with the contamination and we're initiating lock down procedures, over.")
call PlaySoundBJ(udg_sound88)
call VXSleep(4.)
if(((IsUnitAliveBJ(udg_unit12))))then
call Func0240(udg_unit12,8.,"|cff808000Detachment Commander:|r Affirmative.")
endif
call VXSleep(4.)
if(((IsUnitAliveBJ(udg_unit12))))then
call Func0240(udg_unit12,8.,"|cff808000Detachment Commander:|r Stay sharp men, we'll be out of here in no time.")
endif
endif
endfunction
function Func1360 takes nothing returns nothing
local integer loc_integer01=1
local unit loc_unit01
local unit loc_unit02
local location loc_location01
local location loc_location02
local group loc_group01=UAUnitGroupWithTypeId('h00B')
local location loc_location03
local location loc_location04=GetRectCenter(udg_rects03[udg_integer05])
local real loc_real01
local real loc_real02
local real loc_real03
local real loc_real04
local real loc_real05=GetLocationX(loc_location04)
local real loc_real06=GetLocationY(loc_location04)
local integer loc_integer02=CountUnitsInGroup(loc_group01)
loop
exitwhen loc_integer01>GetRandomInt(4,5)
set loc_unit01=GroupPickRandomUnit(udg_group03)
set loc_unit02=GroupPickRandomUnit(loc_group01)
set loc_real01=GetUnitX(loc_unit02)
set loc_real03=GetUnitY(loc_unit02)
set loc_real02=GetUnitX(loc_unit01)
set loc_real04=GetUnitY(loc_unit01)
if GetUnitTypeId(loc_unit01)!='h00B'or GetUnitTypeId(loc_unit01)!='h00G'then
if(loc_integer02>=1)and(RAbsBJ((loc_real02-loc_real01)*(loc_real02-loc_real01))+RAbsBJ((loc_real04-loc_real03)*(loc_real04-loc_real03))>=1000.*1000.)then
call SetUnitMoveSpeed(loc_unit01,290.)
set loc_location02=GetUnitLoc(loc_unit02)
set loc_location01=OffsetLocation(loc_location02,GetRandomReal(-100.,100.),GetRandomReal(-100.,100.))
call IssuePointOrderByIdLoc(loc_unit01,851986,loc_location01)
call RemoveLocation(loc_location01)
call RemoveLocation(loc_location02)
else
set loc_location01=GetRandomLocInRect(udg_rects03[udg_integer05])
call SetUnitMoveSpeed(loc_unit01,GetUnitDefaultMoveSpeed(loc_unit01))
call IssuePointOrderByIdLoc(loc_unit01,851983,loc_location01)
call RemoveLocation(loc_location01)
endif
else
set loc_location01=GetRandomLocInRect(udg_rects03[udg_integer05])
if(RAbsBJ((loc_real05-loc_real01)*(loc_real05-loc_real01))+RAbsBJ((loc_real06-loc_real03)*(loc_real06-loc_real03))>=800.*800.)or udg_integer05>=21 then
call IssuePointOrderByIdLoc(loc_unit02,851983,loc_location01)
else
call IssueImmediateOrderById(loc_unit02,851993)
endif
call RemoveLocation(loc_location01)
endif
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
call RemoveLocation(loc_location04)
set loc_location01=null
set loc_location02=null
set loc_location03=null
set loc_location04=null
set loc_unit01=null
set loc_unit02=null
call DestroyGroup(loc_group01)
endfunction
function Func1361 takes nothing returns nothing
set udg_boolean30=false
set udg_integer05=udg_integer05+1
endfunction
function Func1362 takes nothing returns boolean
return IsUnitInGroup(GetEnteringUnit(),udg_group03)and RectContainsUnit(udg_rects03[udg_integer05],GetEnteringUnit())
endfunction
function Func1363 takes nothing returns nothing
local unit loc_unit01=GetEnteringUnit()
local location loc_location01=GetRectCenter(udg_rect92)
if udg_integer05<21 and udg_boolean30==false and TimerGetRemaining(udg_timer01)==.0 then
set udg_boolean30=true
call TimerStart(udg_timer01,5.,false,null)
endif
call VXSleep(GetRandomReal(.0,2.5))
call IssueImmediateOrderById(loc_unit01,851993)
if udg_integer05==8 and udg_integer27==3 then
call SetUnitInvulnerable(loc_unit01,true)
loop
exitwhen RectContainsUnit(udg_rect92,loc_unit01)or IsUnitDeadBJ(udg_unit17)
call IssuePointOrderByIdLoc(loc_unit01,851986,loc_location01)
call VXSleep(1.)
endloop
if IsUnitDeadBJ(udg_unit17)and udg_unit17!=null then
set udg_unit17=null
set udg_integer20=udg_integer20+1
elseif udg_unit17!=null then
call RemoveUnit(udg_unit17)
call Func0233(35.,"Supplies successfully defended")
set udg_integer19=udg_integer19+1
endif
call SetUnitInvulnerable(loc_unit01,false)
endif
set loc_unit01=null
call RemoveLocation(loc_location01)
set loc_location01=null
endfunction
function Func1364 takes nothing returns boolean
return udg_integer05==3
endfunction
function Func1365 takes nothing returns nothing
local integer loc_integer01
call DisableTrigger(GetTriggeringTrigger())
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
set udg_rect01=udg_rect14
call Func0201('n000')
call Func0202(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/4
set udg_rect01=udg_rect14
call Func0201('n001')
call Func0202(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/4
set udg_rect01=udg_rect14
call Func0201('n002')
call Func0202(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/4
set udg_rect01=udg_rect14
call Func0201('u007')
call Func0202(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
endfunction
function Func1366 takes nothing returns boolean
return udg_integer05==6
endfunction
function Func1367 takes nothing returns nothing
local integer loc_integer01=1
call DisableTrigger(GetTriggeringTrigger())
loop
exitwhen loc_integer01>udg_integer26/3
set udg_rect01=udg_rect14
call Func0201('n000')
call Func0202(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
set udg_rect01=udg_rect21
call Func0201('n00R')
call Func0202(bj_lastCreatedUnit)
if GetRandomInt(1,4)==1 then
call VXSleep(.2)
endif
set loc_integer01=loc_integer01+1
endloop
set udg_rect01=udg_rect14
call Func0201('u001')
call Func0202(bj_lastCreatedUnit)
endfunction
function Func1368 takes nothing returns boolean
return udg_integer05==8
endfunction
function Func1369 takes nothing returns nothing
local integer loc_integer01
local location loc_location01
call DisableTrigger(GetTriggeringTrigger())
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
set udg_rect01=udg_rect89
call Func0201('n000')
call Func0202(bj_lastCreatedUnit)
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
set udg_rect01=udg_rect89
call Func0201('u000')
call Func0202(bj_lastCreatedUnit)
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
set udg_rect01=udg_rect21
call Func0201('n00E')
call Func0202(bj_lastCreatedUnit)
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/5
set udg_rect01=udg_rect24
call Func0201('n00Z')
call Func0202(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_location01=null
endfunction
function Func1370 takes nothing returns boolean
return udg_integer05==9
endfunction
function Func1371 takes nothing returns nothing
local integer loc_integer01=1
local location loc_location01
call DisableTrigger(GetTriggeringTrigger())
loop
exitwhen loc_integer01>udg_integer26/2
set udg_rect01=udg_rect21
call Func0201('n000')
call Func0202(bj_lastCreatedUnit)
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
set udg_rect01=udg_rect21
call Func0201('n002')
call Func0202(bj_lastCreatedUnit)
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_location01=null
endfunction
function Func1372 takes nothing returns boolean
return udg_integer05==10
endfunction
function Func1373 takes nothing returns nothing
local integer loc_integer01=1
local location loc_location01
call DisableTrigger(GetTriggeringTrigger())
loop
exitwhen loc_integer01>udg_integer26/2
set udg_rect01=udg_rect82
call Func0201('n000')
call Func0202(bj_lastCreatedUnit)
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
set udg_rect01=udg_rect82
call Func0201('n001')
call Func0202(bj_lastCreatedUnit)
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
set udg_rect01=udg_rect82
call Func0201('n002')
call Func0202(bj_lastCreatedUnit)
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_location01=null
endfunction
function Func1374 takes nothing returns boolean
return udg_integer05==11
endfunction
function Func1375 takes nothing returns nothing
local integer loc_integer01=1
call DisableTrigger(GetTriggeringTrigger())
loop
exitwhen loc_integer01>udg_integer26*.8
set udg_rect01=udg_rect24
call Func0201('n000')
call Func0202(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
set udg_rect01=udg_rect24
call Func0201('n001')
call Func0202(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
set udg_rect01=udg_rect24
call Func0201('n002')
call Func0202(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
call VXSleep(GetRandomReal(2,35))
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/4
set udg_rect01=udg_rect24
call Func0201('n00R')
call Func0202(bj_lastCreatedUnit)
if GetRandomInt(1,4)==1 then
call VXSleep(.2)
endif
set loc_integer01=loc_integer01+1
endloop
endfunction
function Func1376 takes nothing returns boolean
return udg_integer05==14
endfunction
function Func1377 takes nothing returns nothing
local integer loc_integer01=1
local location loc_location01
call DisableTrigger(GetTriggeringTrigger())
loop
exitwhen loc_integer01>udg_integer26/2
set udg_rect01=udg_rect20
call Func0201('n000')
call Func0202(bj_lastCreatedUnit)
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/2
set udg_rect01=udg_rect20
call Func0201('u000')
call Func0202(bj_lastCreatedUnit)
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_location01=null
endfunction
function Func1378 takes nothing returns boolean
return udg_integer05==15
endfunction
function Func1379 takes nothing returns nothing
local integer loc_integer01=1
local location loc_location01
call DisableTrigger(GetTriggeringTrigger())
loop
exitwhen loc_integer01>udg_integer26/2
set udg_rect01=udg_rect22
call Func0201('n001')
call Func0202(bj_lastCreatedUnit)
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
set udg_rect01=udg_rect22
call Func0201('n00A')
call Func0202(bj_lastCreatedUnit)
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26/3
set udg_rect01=udg_rect22
call Func0201('u000')
call Func0202(bj_lastCreatedUnit)
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_location01=null
endfunction
function Func1380 takes nothing returns boolean
return udg_integer05==20
endfunction
function Func1381 takes nothing returns nothing
local integer loc_integer01=1
local location loc_location01
call DisableTrigger(GetTriggeringTrigger())
loop
exitwhen loc_integer01>udg_integer26/2
set udg_rect01=udg_rect23
call Func0201('n001')
call Func0202(bj_lastCreatedUnit)
call SetUnitAnimation(bj_lastCreatedUnit,"birth")
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
call Func0201('n001')
call Func0202(bj_lastCreatedUnit)
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>3
set udg_rect01=udg_rect24
call Func0201('u001')
call Func0202(bj_lastCreatedUnit)
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
set udg_rect01=udg_rect23
call Func0201('u001')
call Func0202(bj_lastCreatedUnit)
set loc_location01=GetUnitLoc(bj_lastCreatedUnit)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",loc_location01))
call RemoveLocation(loc_location01)
call VXSleep(.2)
set loc_integer01=loc_integer01+1
endloop
set loc_location01=null
endfunction
function Func1382 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1384 takes nothing returns nothing
call SetPlayerTechResearchedSwap('R00F',1,GetEnumPlayer())
endfunction
function Func1388 takes nothing returns nothing
call ShowUnitShow(GetEnumUnit())
call PauseUnit(GetEnumUnit(),false)
endfunction
function Func1394 takes nothing returns nothing
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(27))+udg_integer16),Player(27))
// MORE ZOMBIE PLAYERS
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(12))+udg_integer16),Player(12))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(13))+udg_integer16),Player(13))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(14))+udg_integer16),Player(14))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(15))+udg_integer16),Player(15))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(16))+udg_integer16),Player(16))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(17))+udg_integer16),Player(17))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(18))+udg_integer16),Player(18))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(19))+udg_integer16),Player(19))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(20))+udg_integer16),Player(20))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(21))+udg_integer16),Player(21))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(22))+udg_integer16),Player(22))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(23))+udg_integer16),Player(23))
// ----
if(((udg_integer23>=20000)))then
set udg_rect01=udg_rect97
call Func0201('u009')
call Func0200(bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger202,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call PlaySoundBJ(udg_sounds04[GetRandomInt(1,4)])
endif
call ForForce(bj_FORCE_ALL_PLAYERS,function Func1384)
if(((udg_integer16==0)))then
call ConditionalTriggerExecute(udg_trigger289)
return
endif
if(((GetRandomInt(1,3)==1)))then
set udg_integer17=1
if(((GetRandomInt(1,2)==1)))then
set udg_boolean28=true
endif
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Minerva has been spotted heading towards your sector. You must eradicate this threat before it causes any serious damage.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"Satellite surveillance has revealed a Minerva-Grade infested organism not far from your position and it appears to be inbound. You must destroy this creature in order to maintain security in your sector and do so before it can harm either of the towns' occupants.")
call FlashQuestDialogButton()
call CreateNUnitsAtLoc(1,'n00G',Player(27),GetRandomLocInRect(udg_rect97),GetRandomReal(0,360))
call Func0200(bj_lastCreatedUnit)
set udg_unit02=bj_lastCreatedUnit
loop
exitwhen(((IsUnitDeadBJ(udg_unit02))))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,1))
endloop
call PlaySoundBJ(udg_sound56)
call TriggerSleepAction(2)
if(((udg_boolean01)))then
return
endif
call ConditionalTriggerExecute(udg_trigger284)
call Func0233(35.,"Minerva slain")
else
if(((GetRandomInt(1,2)==1)))then
set udg_integer17=2
if(((GetRandomInt(1,2)==1)))then
set udg_boolean28=true
endif
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r There's an Umbrella facility in your sector to the southeast. We want you to search it, but first we need to gather information to obtain a search warrant. Search the destroyed buildings for papers from their employees. You have 7 minutes to find those papers or we'll proceed without them.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"We have reason to believe that the Umbrella Corporation had a hand in causing the global pandemic with the initial outbreak of the virus. We suspect Umbrella destroyed those office buildings to cover their tracks and we need you to search them for any TPS reports that survived.")
call FlashQuestDialogButton()
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rects01[GetRandomInt(1,udg_integer01)])
call CreateItemLoc('I00B',udg_location02)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call EnableTrigger(udg_trigger274)
call EnableTrigger(udg_trigger275)
call KillDestructable(udg_destructable02)
call KillDestructable(udg_destructable01)
call RemoveDestructable(udg_destructable03)
call RemoveDestructable(udg_destructable12)
call RemoveDestructable(udg_destructable11)
call RemoveDestructable(udg_destructable10)
set udg_group23=UAUnitGroupWithTypeId('h006')
call ForGroupBJ(udg_group23,function Func1388)
call DestroyGroup(udg_group23)
call TriggerSleepAction(420.)
set udg_boolean04=true
else
set udg_integer17=3
if(((GetRandomInt(1,2)==1)))then
set udg_boolean28=true
endif
set udg_rects05[1]=udg_rect150
set udg_rects05[2]=udg_rect151
set udg_rects05[3]=udg_rect152
set udg_rects05[4]=udg_rect153
set udg_rects05[5]=udg_rect154
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000Battallion:|r All platoons must retrieve a sample of the water supply so that we can test it for the virus. Sector E had a water contamination and now it's turning into a war zone over there.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(10.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r We've dropped 10 vials that you must fill at the water plugs and return to the LZ. You must fill 2 vials at each water plug to give us accurate data.")
call PlaySoundBJ(udg_sound88)
set udg_location02=GetRandomLocInRect(udg_rect90)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,5.,0,50.,50.,100)
call RemoveLocation(udg_location02)
call QuestSetDescription(udg_quest01,"Fill the vials at the water plugs and return them to the LZ.")
call FlashQuestDialogButton()
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=10
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect90)
call CreateItemLoc('I00Q',udg_location02)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call EnableTrigger(udg_trigger268)
call EnableTrigger(udg_trigger266)
call EnableTrigger(udg_trigger267)
call EnableTrigger(udg_trigger269)
call TriggerSleepAction((900.-(20.*I2R(udg_integer24))))
set udg_boolean04=true
endif
endif
endfunction
function Func1395 takes nothing returns boolean
return(udg_units01[(1+GetPlayerId(GetOwningPlayer(GetEnteringUnit())))]==GetEnteringUnit())and(GetUnitTypeId(GetEnteringUnit())!='h00k')
endfunction
function Func1398 takes nothing returns nothing
local integer i = 0
loop
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=5
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
if(((RectContainsUnit(udg_rects05[bj_forLoopBIndex],GetEnteringUnit()))))then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((udg_integers22[bj_forLoopBIndex]<2)and(GetItemTypeId(UnitItemInSlotBJ(GetEnteringUnit(),bj_forLoopAIndex))=='I00Q')))then
call RemoveItem(UnitItemInSlotBJ(GetEnteringUnit(),bj_forLoopAIndex))
call UnitAddItemByIdSwapped('I00P',GetEnteringUnit())
set udg_integers22[bj_forLoopBIndex]=(udg_integers22[bj_forLoopBIndex]+1)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
set i = i + 1
exitwhen (i > 1)
endloop
endfunction
function Func1400 takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((udg_integers22[bj_forLoopAIndex]<2)))then
set udg_location02=GetRectCenter(udg_rects05[bj_forLoopAIndex])
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,4.,0,50.,50.,100)
call RemoveLocation(udg_location02)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func1402 takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((GetItemTypeId(UnitItemInSlotBJ(GetEnteringUnit(),bj_forLoopAIndex))=='I00P')))then
call RemoveItem(UnitItemInSlotBJ(GetEnteringUnit(),bj_forLoopAIndex))
set udg_integer28=(udg_integer28+1)
call Func0233(4.,"Vial returned")
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func1403 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1413 takes nothing returns nothing
if(((GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_PLAYING)and(IsUnitDeadBJ(udg_units01[(1+GetPlayerId(GetEnumPlayer()))]))))then
set udg_location02=GetRandomLocInRect(udg_rect26)
call PingMinimapLocForForceEx(CreatePlayerForce(GetEnumPlayer()),udg_location02,8.,2,50.,100,50.)
call DisplayTimedTextToForce(CreatePlayerForce(GetEnumPlayer()),15.,"Reinforcements have arrived.")
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'h009',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
if(((GetRandomInt(1,2)==1)))then
call CreateNUnitsAtLoc(1,'h00E',GetEnumPlayer(),udg_location02,.0)
else
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'h017',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
if(((GetRandomInt(1,2)==1)))then
if(((GetRandomInt(1,4)==1)))then
if(((GetRandomInt(1,2)==1)))then
call CreateNUnitsAtLoc(1,'h01D',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
call CreateNUnitsAtLoc(1,'h00A',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
endif
else
call CreateNUnitsAtLoc(1,'h01E',GetEnumPlayer(),udg_location02,.0)
endif
else
call CreateNUnitsAtLoc(1,'h00V',GetEnumPlayer(),udg_location02,.0)
endif
endif
endif
endif
call UnitAddItemByIdSwapped('I004',bj_lastCreatedUnit)
call RemoveLocation(udg_location02)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
endif
endfunction
function Func1414 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1415 takes nothing returns nothing
if(((udg_integer28>=10)))then
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(udg_trigger266)
call DisableTrigger(udg_trigger268)
call DisableTrigger(udg_trigger267)
call Func0233(20.,"Samples returned")
else
if(((udg_boolean04)))then
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(udg_trigger267)
set udg_integer20=(udg_integer20+1)
call Func0233(-10.,"Mission failed")
else
return
endif
endif
call ForForce(Func0015(MAP_CONTROL_USER),function Func1413)
call TriggerSleepAction(15.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Reinforce the sector and await further orders.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"We have no outstanding tasks or missions for you at this time. Your standing orders are to focus on survival as well as the protection of the two towns and their inhabitants. Defend the towns, search for equipment and reinforce the sector at your own discretion.")
call FlashQuestDialogButton()
call TriggerSleepAction(360.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Battallion has just informed us that a Darreus has escaped from Sector E and is spreading the contamination in its wake. You cannot allow it to pass through your sector into Sector A.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"Kill Darreus before it enters Sector A.")
call FlashQuestDialogButton()
call TriggerSleepAction(15.)
set udg_location02=GetRectCenter(udg_rect112)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,5.,2,100,50.,50.)
call CreateNUnitsAtLoc(1,'u005',Player(27),udg_location02,270.)
call GroupAddUnit(udg_group22,bj_lastCreatedUnit)
call SetUnitLifePercentBJ(bj_lastCreatedUnit,75.)
set udg_unit09=bj_lastCreatedUnit
call ForForce(bj_FORCE_ALL_PLAYERS,function Func1414)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=10
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'u000',Player(27),udg_location02,270.)
call GroupAddUnit(udg_group22,bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'n001',Player(27),udg_location02,270.)
call GroupAddUnit(udg_group22,bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call RemoveLocation(udg_location02)
call EnableTrigger(udg_trigger272)
set udg_integer05=12
call EnableTrigger(udg_trigger273)
call EnableTrigger(udg_trigger270)
endfunction
function Func1416 takes nothing returns nothing
set udg_location02=GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc(1,'n00Q',Player(27),udg_location02,bj_UNIT_FACING)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group22,bj_lastCreatedUnit)
endfunction
function Func1417 takes nothing returns nothing
set udg_group23=UAUnitGroupWithTypeId('u005')
call ForGroupBJ(udg_group23,function Func1416)
call DestroyGroup(udg_group23)
endfunction
function Func1418 takes nothing returns boolean
return(udg_unit09==GetEnteringUnit())
endfunction
function Func1419 takes nothing returns nothing
call RemoveUnit(udg_unit09)
set udg_boolean10=true
endfunction
function Func1422 takes nothing returns nothing
if(((IsUnitDeadBJ(udg_unit09))and(udg_boolean10==false)))then
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(udg_trigger270)
call DisableTrigger(udg_trigger273)
set udg_integer19=(udg_integer19+1)
call Func0233(45.,"Darreus killed")
else
if(((udg_boolean10)))then
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(udg_trigger270)
call DisableTrigger(udg_trigger273)
set udg_integer20=(udg_integer20+1)
call Func0233(-10.,"Darreus has entered Sector A")
else
return
endif
endif
call ConditionalTriggerExecute(udg_trigger289)
endfunction
function Func1425 takes nothing returns nothing
set udg_location02=GetRandomLocInRect(udg_rects03[udg_integer05])
call IssuePointOrderByIdLoc(GetEnumUnit(),851983,udg_location02)
call RemoveLocation(udg_location02)
if(((GetUnitTypeId(GetEnumUnit())!='u005')and(IsUnitAliveBJ(udg_unit09))))then
set udg_location03=GetUnitLoc(GroupPickRandomUnit(UAUnitGroupWithTypeId('u005')))
set udg_location02=OffsetLocation(udg_location03,GetRandomReal(-400.,400.),GetRandomReal(-400.,400.))
call IssuePointOrderByIdLoc(GetEnumUnit(),851983,udg_location02)
call RemoveLocation(udg_location02)
call RemoveLocation(udg_location03)
endif
endfunction
function Func1426 takes nothing returns nothing
set udg_location02=GetUnitLoc(udg_unit09)
set udg_location03=GetRectCenter(udg_rects03[udg_integer05])
if(((DistanceBetweenPoints(udg_location02,udg_location03)<=500.)and(udg_integer05!=21)))then
set udg_integer05=(udg_integer05+1)
endif
call RemoveLocation(udg_location02)
call RemoveLocation(udg_location03)
set udg_group23=Func0019((CountUnitsInGroup(udg_group22)/2),udg_group22)
call ForGroupBJ(udg_group23,function Func1425)
call DestroyGroup(udg_group23)
endfunction
function Func1427 takes nothing returns boolean
return(udg_boolean01==false)and(GetItemTypeId(GetManipulatedItem())=='I00B')and(GetUnitTypeId(GetManipulatingUnit())!='h00K')
endfunction
function Func1429 takes nothing returns nothing
call RemoveItem(GetManipulatedItem())
if(((udg_boolean04)))then
return
endif
set udg_integer11=(udg_integer11+1)
call Func0233(5.,"PAPERS FOUND")
endfunction
function Func1432 takes nothing returns nothing
if(((udg_integer11>=2)and(udg_boolean01==false)))then
call DisableTrigger(GetTriggeringTrigger())
call ConditionalTriggerExecute(udg_trigger276)
set udg_integer19=(udg_integer19+1)
call Func0233(20.,"PAPERS FOUND")
else
if(((udg_boolean04)))then
call DisableTrigger(GetTriggeringTrigger())
call ConditionalTriggerExecute(udg_trigger276)
set udg_integer20=(udg_integer20+1)
call Func0233(-10.,"Mission failed")
else
return
endif
endif
endfunction
function Func1433 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1441 takes nothing returns nothing
if(((GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_PLAYING)and(IsUnitDeadBJ(udg_units01[(1+GetPlayerId(GetEnumPlayer()))]))))then
set udg_location02=GetRandomLocInRect(udg_rect26)
call PingMinimapLocForForceEx(CreatePlayerForce(GetEnumPlayer()),udg_location02,8.,2,50.,100,50.)
call DisplayTimedTextToForce(CreatePlayerForce(GetEnumPlayer()),15.,"Reinforcements have arrived.")
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'h009',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
if(((GetRandomInt(1,2)==1)))then
call CreateNUnitsAtLoc(1,'h00E',GetEnumPlayer(),udg_location02,.0)
else
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'h017',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
if(((GetRandomInt(1,2)==1)))then
if(((GetRandomInt(1,4)==1)))then
if(((GetRandomInt(1,2)==1)))then
call CreateNUnitsAtLoc(1,'h01D',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
call CreateNUnitsAtLoc(1,'h00A',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
endif
else
call CreateNUnitsAtLoc(1,'h01E',GetEnumPlayer(),udg_location02,.0)
endif
else
call CreateNUnitsAtLoc(1,'h00V',GetEnumPlayer(),udg_location02,.0)
endif
endif
endif
endif
call UnitAddItemByIdSwapped('I004',bj_lastCreatedUnit)
call RemoveLocation(udg_location02)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
endif
endfunction
function Func1442 takes nothing returns nothing
call ForForce(Func0015(MAP_CONTROL_USER),function Func1441)
// call DisableTrigger(udg_trigger210)
// call DisableTrigger(udg_trigger215)
call TriggerSleepAction(6.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cff808000SOCOM:|r Umbrella's sentry guns are killing anyone and anything that gets too close to the facility. We need you to enter the facility and destroy the 3 generators powering those sentries and their other electronic defenses.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(17.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cff808000SOCOM:|r We'll be dropping 3 satchel charges for you to place by the 3 generators. Once they're planted, exit the facility and we'll detonate them. Don't worry about the charges destroying anything important; we're sure that place is blast-proof or Umbrella would have demolished it like the other buildings.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"3 satchels will be dropped that you must retrieve and place at 3 power generators in the Umbrella facility in the southeast of your sector. Their sentry guns will shoot anyone that gets too close and its recommended that anyone with flares or binoculars take them out.")
call FlashQuestDialogButton()
call TriggerSleepAction(35.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000The satchel charges have arrived.")
set udg_location02=GetRectCenter(udg_rect90)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,20.,2,100.,50.,100.)
call RemoveLocation(udg_location02)
call EnableTrigger(udg_trigger277)
call EnableTrigger(udg_trigger278)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect90)
call CreateItemLoc('I007',udg_location02)
call RemoveLocation(udg_location02)
set udg_items01[bj_forLoopAIndex]=bj_lastCreatedItem
set udg_location02=GetItemLoc(bj_lastCreatedItem)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(900.)
set udg_boolean05=true
endfunction
function Func1443 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1447 takes nothing returns nothing
if(((RectContainsItem(udg_items01[1],udg_rect103)==false)and(RectContainsItem(udg_items01[2],udg_rect103)==false)and(RectContainsItem(udg_items01[3],udg_rect103)==false)))then
set udg_location02=GetRectCenter(udg_rect103)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,3.,0,50.,50.,100.)
call RemoveLocation(udg_location02)
endif
if(((RectContainsItem(udg_items01[1],udg_rect104)==false)and(RectContainsItem(udg_items01[2],udg_rect104)==false)and(RectContainsItem(udg_items01[3],udg_rect104)==false)))then
set udg_location02=GetRectCenter(udg_rect104)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,3.,0,50.,50.,100.)
call RemoveLocation(udg_location02)
endif
if(((RectContainsItem(udg_items01[1],udg_rect105)==false)and(RectContainsItem(udg_items01[2],udg_rect105)==false)and(RectContainsItem(udg_items01[3],udg_rect105)==false)))then
set udg_location02=GetRectCenter(udg_rect105)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,3.,0,50.,50.,100.)
call RemoveLocation(udg_location02)
endif
endfunction
function Func1448 takes nothing returns nothing
call KillUnit(GetEnumUnit())
endfunction
function Func1457 takes nothing returns nothing
local location temploc
if(((udg_boolean01==false)and(((RectContainsItem(udg_items01[1],udg_rect103))or(RectContainsItem(udg_items01[2],udg_rect103))or(RectContainsItem(udg_items01[3],udg_rect103))))and(((RectContainsItem(udg_items01[1],udg_rect104))or(RectContainsItem(udg_items01[2],udg_rect104))or(RectContainsItem(udg_items01[3],udg_rect104))))and(((RectContainsItem(udg_items01[1],udg_rect105))or(RectContainsItem(udg_items01[2],udg_rect105))or(RectContainsItem(udg_items01[3],udg_rect105))))))then
call DisableTrigger(GetTriggeringTrigger())
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r The charges have been placed. Clear the facility in 30 seconds before they explode!")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(30.)
set udg_integer19=(udg_integer19+1)
call DisableTrigger(udg_trigger277)
call PlaySoundBJ(udg_sound61)
call RemoveItem(udg_items01[1])
call RemoveItem(udg_items01[2])
call RemoveItem(udg_items01[3])
call UnitRemoveAbility(udg_unit22,'Avul')
call UnitRemoveAbility(udg_unit23,'Avul')
call UnitRemoveAbility(udg_unit24,'Avul')
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=15
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set temploc=GetRandomLocInRect(udg_rect48)
call CreateDestructableLoc('LTrc',temploc,GetRandomReal(0,360),1,GetRandomInt(1,6))
call RemoveLocation(temploc)
set temploc=GetRandomLocInRect(udg_rect49)
call CreateDestructableLoc('LTrc',temploc,GetRandomReal(0,360),1,GetRandomInt(1,6))
call RemoveLocation(temploc)
set temploc=GetRandomLocInRect(udg_rect50)
call CreateDestructableLoc('LTrc',temploc,GetRandomReal(0,360),1,GetRandomInt(1,6))
call RemoveLocation(temploc)
set temploc=GetRandomLocInRect(udg_rect51)
call CreateDestructableLoc('LTrc',temploc,GetRandomReal(0,360),1,GetRandomInt(1,6))
call RemoveLocation(temploc)
set temploc=GetRandomLocInRect(udg_rect121)
call CreateDestructableLoc('LTrc',temploc,GetRandomReal(0,360),1,GetRandomInt(1,6))
call RemoveLocation(temploc)
set temploc=GetRandomLocInRect(udg_rect120)
call CreateDestructableLoc('LTrc',temploc,GetRandomReal(0,360),1,GetRandomInt(1,6))
call RemoveLocation(temploc)
set temploc=GetRandomLocInRect(udg_rect135)
call CreateDestructableLoc('LTrc',temploc,GetRandomReal(0,360),1,GetRandomInt(1,6))
call RemoveLocation(temploc)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call ForGroupBJ(Func0006(udg_rect134),function Func1448)
call ForGroupBJ(Func0006(udg_rect135),function Func1448)
call ForGroupBJ(Func0006(udg_rect136),function Func1448)
call ForGroupBJ(Func0006(udg_rect137),function Func1448)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=35
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set temploc=GetRandomLocInRect(udg_rect134)
call AddSpecialEffectLocBJ(temploc,"Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl")
call RemoveLocation(temploc)
set temploc=GetRandomLocInRect(udg_rect134)
call AddSpecialEffectLocBJ(temploc,"Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl")
call RemoveLocation(temploc)
set temploc=GetRandomLocInRect(udg_rect135)
call AddSpecialEffectLocBJ(temploc,"Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl")
call RemoveLocation(temploc)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call KillUnit(udg_unit22)
call KillUnit(udg_unit24)
call KillUnit(udg_unit23)
call TriggerSleepAction(5.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,("|cff808000Power generators destroyed, "+(I2S((70*(udg_integer16+1)))+" XP awarded to all players.")))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_integers04[bj_forLoopAIndex]=(udg_integers04[bj_forLoopAIndex]+(70*(udg_integer16+1)))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(((udg_boolean05)))then
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(udg_trigger277)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,("|cff808000Satchel charges not planted in the alotted time, "+(I2S((10*(udg_integer16+1)))+" XP deducted from all players.")))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_integers04[bj_forLoopAIndex]=(udg_integers04[bj_forLoopAIndex]-(10*(udg_integer16+1)))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
return
endif
endif
call TriggerSleepAction(5.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Search the facility for any intel you can find. You have 5 minutes to find at least 3 pieces of evidence.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"The Umbrella facility needs to be searched for any evidence that will help us in our case against the corporation. Remember that, while this task is important, defending the civilians is your top priority and you should spend no more than |cfffffc015 minutes|r on this task, after which you must return to defend the towns. Though any evidence you find will help, we need at least 3 definitive pieces in order to have a strong enough case to convict Umbrella.")
call FlashQuestDialogButton()
call EnableTrigger(udg_trigger279)
call EnableTrigger(udg_trigger280)
call EnableTrigger(udg_trigger281)
call EnableTrigger(udg_trigger282)
call TriggerSleepAction(300.)
set udg_boolean06=true
endfunction
function Func1458 takes nothing returns boolean
return(udg_boolean01==false)and(GetPlayerController(GetOwningPlayer(GetEnteringUnit()))==MAP_CONTROL_USER)
endfunction
function Func1459 takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,GetRectCenter(udg_rect130),3.,0,50.,100,50.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Well, this proves they were working on cell mutations. Looks like one of those things got out, too, which may explain how the contamination began.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(5.)
call PlaySoundBJ(udg_sound05)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000EVIDENCE FOUND|r")
set udg_integer08=(udg_integer08+1)
endfunction
function Func1460 takes nothing returns boolean
return(udg_boolean01==false)and(GetPlayerController(GetOwningPlayer(GetEnteringUnit()))==MAP_CONTROL_USER)
endfunction
function Func1461 takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,GetRectCenter(udg_rect131),3.,0,50.,100,50.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r This console shows that this facilty was built illegally on private property. Three weeks after construction began, the owner of the property supposedly died of natural causes. That's suspicious.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(5.)
call PlaySoundBJ(udg_sound05)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000EVIDENCE FOUND|r")
set udg_integer08=(udg_integer08+1)
endfunction
function Func1462 takes nothing returns boolean
return(udg_boolean01==false)and(GetPlayerController(GetOwningPlayer(GetEnteringUnit()))==MAP_CONTROL_USER)
endfunction
function Func1463 takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,GetRectCenter(udg_rect132),3.,0,50.,100,50.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r This console has the surveillance camera data. Take its memory card and store it in your suit, we'll analyze it after the mission.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(5.)
call PlaySoundBJ(udg_sound05)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000EVIDENCE FOUND|r")
set udg_integer08=(udg_integer08+1)
endfunction
function Func1464 takes nothing returns boolean
return(udg_boolean01==false)and(GetPlayerController(GetOwningPlayer(GetEnteringUnit()))==MAP_CONTROL_USER)
endfunction
function Func1465 takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,GetRectCenter(udg_rect133),3.,0,50.,100,50.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r This computer holds DNA research data. Install that data into your suit and we'll analyze it when you get back after the mission.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(5.)
call PlaySoundBJ(udg_sound05)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000EVIDENCE FOUND|r")
set udg_integer08=(udg_integer08+1)
endfunction
function Func1468 takes nothing returns nothing
if(((udg_integer17==2)and(udg_integer08>=3)and(udg_boolean01==false)))then
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(udg_trigger279)
call DisableTrigger(udg_trigger280)
call DisableTrigger(udg_trigger281)
call DisableTrigger(udg_trigger282)
// call EnableTrigger(udg_trigger215)
// call EnableTrigger(udg_trigger210)
set udg_integer19=(udg_integer19+1)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Great work, team. We now have enough evidence to convict Umbrella for researching illegal biological weapons.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(3.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,("|cff808000Evidence found, "+(I2S((60*(udg_integer16+1)))+" XP awarded to all players.")))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_integers04[bj_forLoopAIndex]=(udg_integers04[bj_forLoopAIndex]+(60*(udg_integer16+1)))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(((udg_boolean06)))then
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(udg_trigger279)
call DisableTrigger(udg_trigger280)
call DisableTrigger(udg_trigger281)
call DisableTrigger(udg_trigger282)
// call EnableTrigger(udg_trigger215)
// call EnableTrigger(udg_trigger210)
set udg_integer20=(udg_integer20+1)
call Func0233(-10.,"|cff808000SOCOM:|r You have failed to gather enough evidence in the alotted time.")
else
return
endif
endif
call ConditionalTriggerExecute(udg_trigger289)
endfunction
function Func1469 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1477 takes nothing returns nothing
if(((GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_PLAYING)and(IsUnitDeadBJ(udg_units01[(1+GetPlayerId(GetEnumPlayer()))]))))then
set udg_location02=GetRandomLocInRect(udg_rect26)
call PingMinimapLocForForceEx(CreatePlayerForce(GetEnumPlayer()),udg_location02,8.,2,50.,100,50.)
call DisplayTimedTextToForce(CreatePlayerForce(GetEnumPlayer()),15.,"Reinforcements have arrived.")
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'h009',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
if(((GetRandomInt(1,2)==1)))then
call CreateNUnitsAtLoc(1,'h00E',GetEnumPlayer(),udg_location02,.0)
else
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'h017',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
if(((GetRandomInt(1,2)==1)))then
if(((GetRandomInt(1,4)==1)))then
if(((GetRandomInt(1,2)==1)))then
call CreateNUnitsAtLoc(1,'h01D',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
call CreateNUnitsAtLoc(1,'h00A',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
endif
else
call CreateNUnitsAtLoc(1,'h01E',GetEnumPlayer(),udg_location02,.0)
endif
else
call CreateNUnitsAtLoc(1,'h00V',GetEnumPlayer(),udg_location02,.0)
endif
endif
endif
endif
call UnitAddItemByIdSwapped('I004',bj_lastCreatedUnit)
call RemoveLocation(udg_location02)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
endif
endfunction
function Func1478 takes nothing returns nothing
call ForForce(Func0015(MAP_CONTROL_USER),function Func1477)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Recent studies show that spore colonies may be operating underground. We'll need you to map out the earth under your sector to confirm that. To do this, we'll need you to plant 5 resonators at certain points in the sector.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(20.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r The resonators have arrived.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"We are almost certain that the spore colonies popping up in your sector are part of an immense underground network; if this is true, we must map that network for both scientific and tactical reasons. To this end, we have dropped 5 ultrasonic resonators at the LZ in the southwest town. These resonators are normally used in mining projects to map out subterranean caverns and pockets of minerals, though they should suit our needs well enough. Your orders are to plant the resonators at the 5 designated locations in the sector within |cfffffc0115 minutes|r or we will be unable to activate the resonators.")
call FlashQuestDialogButton()
set udg_location02=GetRectCenter(udg_rect90)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,10.,2,50.,50.,100)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect90)
call CreateItemLoc('I00H',udg_location02)
call RemoveLocation(udg_location02)
set udg_items03[bj_forLoopAIndex]=bj_lastCreatedItem
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_locations03[1]=GetRandomLocInRect(udg_rect106)
set udg_locations03[2]=GetRandomLocInRect(udg_rect107)
set udg_locations03[3]=GetRandomLocInRect(udg_rect108)
set udg_locations03[4]=GetRandomLocInRect(udg_rect109)
set udg_locations03[5]=GetRandomLocInRect(udg_rect110)
call EnableTrigger(udg_trigger285)
call EnableTrigger(udg_trigger286)
call EnableTrigger(udg_trigger288)
call TriggerSleepAction(900.)
set udg_boolean05=true
endfunction
function Func1479 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1481 takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((udg_booleans07[bj_forLoopAIndex]==false)))then
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_locations03[bj_forLoopAIndex],2.,0,50.,100.,50.)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func1482 takes nothing returns boolean
return(GetSpellAbilityId()=='A03B')and(udg_boolean01==false)
endfunction
function Func1485 takes nothing returns boolean
return GetBooleanAnd(((GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit()))),((GetUnitTypeId(GetFilterUnit())=='h00Q')))
endfunction
function Func1488 takes nothing returns boolean
return GetBooleanAnd(((GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit()))),((GetUnitTypeId(GetFilterUnit())=='h00Q')))
endfunction
function Func1489 takes nothing returns nothing
set udg_location03=GetUnitLoc(GetEnumUnit())
call CreateItemLoc('I00H',udg_location03)
call RemoveLocation(udg_location03)
call RemoveUnit(GetEnumUnit())
endfunction
function Func1495 takes nothing returns nothing
local group g
if(((DistanceBetweenPoints(udg_location02,udg_locations03[1])<800.)and(udg_booleans07[1]==false)))then
set udg_booleans07[1]=true
call SetUnitOwner(GetEnumUnit(),Player(24),true)
call Func0233(10,"Resonator planted")
else
if(((DistanceBetweenPoints(udg_location02,udg_locations03[2])<800.)and(udg_booleans07[2]==false)))then
set udg_booleans07[2]=true
call SetUnitOwner(GetEnumUnit(),Player(24),true)
call Func0233(10,"Resonator planted")
else
if(((DistanceBetweenPoints(udg_location02,udg_locations03[3])<800.)and(udg_booleans07[3]==false)))then
set udg_booleans07[3]=true
call SetUnitOwner(GetEnumUnit(),Player(24),true)
call Func0233(10,"Resonator planted")
else
if(((DistanceBetweenPoints(udg_location02,udg_locations03[4])<800.)and(udg_booleans07[4]==false)))then
set udg_booleans07[4]=true
call SetUnitOwner(GetEnumUnit(),Player(24),true)
call Func0233(10,"Resonator planted")
else
if(((DistanceBetweenPoints(udg_location02,udg_locations03[5])<800.)and(udg_booleans07[5]==false)))then
set udg_booleans07[5]=true
call SetUnitOwner(GetEnumUnit(),Player(24),true)
call Func0233(10,"Resonator planted")
else
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetTriggerUnit())),10.,"Resonators must be planted at designated areas.")
set g=UAUnitGroupWithinRangeOfLocMatching(300.,udg_location02,Condition(function Func1488))
call ForGroupBJ(g,function Func1489)
call DestroyGroup(g)
endif
endif
endif
endif
endif
set g=null
endfunction
function Func1496 takes nothing returns nothing
local group g
set udg_location02=GetUnitLoc(GetTriggerUnit())
set g=UAUnitGroupWithinRangeOfLocMatching(500.,udg_location02,Condition(function Func1485))
call ForGroupBJ(g,function Func1495)
call DestroyGroup(g)
call RemoveLocation(udg_location02)
set g=null
set udg_location02=null
endfunction
function Func1497 takes nothing returns boolean
return(IsUnitInGroup(GetDyingUnit(),udg_group11))
endfunction
function Func1498 takes nothing returns nothing
call GroupRemoveUnit(udg_group11,GetDyingUnit())
endfunction
function Func1500 takes nothing returns nothing
call AddSpecialEffectLocBJ(GetUnitLoc(GetEnumUnit()),"war3mapImported\\BigExplosionBlue.mdx")
call UnitDamagePointLoc(GetEnumUnit(),0,1000.,GetUnitLoc(GetEnumUnit()),800.,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
endfunction
function Func1503 takes nothing returns nothing
local integer loc_integer01
local integer loc_integer02
local rect array loc_rects01
set loc_rects01[1]=udg_rect106
set loc_rects01[2]=udg_rect107
set loc_rects01[3]=udg_rect108
set loc_rects01[4]=udg_rect109
set loc_rects01[5]=udg_rect110
if(((udg_boolean01==false)and(udg_booleans07[1])and(udg_booleans07[2])and(udg_booleans07[3])and(udg_booleans07[4])and(udg_booleans07[5])))then
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(udg_trigger285)
call DisableTrigger(udg_trigger286)
set udg_integer19=(udg_integer19+1)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Activating resonators, clear the areas around them immediately.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(20.)
call ForGroupBJ(UAUnitGroupWithTypeId('h00Q'),function Func1500)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,("|cff808000Resonators planted, "+(I2S((60*(udg_integer16+1)))+" XP awarded to all players.")))
call PlaySoundBJ(udg_sound88)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_integers04[bj_forLoopAIndex]=(udg_integers04[bj_forLoopAIndex]+(60*(udg_integer16+1)))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(10.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Just as we thought. The resonators show that spore colonies have tunnels throughout the whole damn sector. Those resonators must have also disturbed whatever was living in those tunnels, we're now picking up large amounts of life signs heading towards the surface.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(10.)
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer26
set loc_integer02=1
loop
exitwhen loc_integer02>5
set udg_rect01=loc_rects01[loc_integer02]
call Func0201('n00I')
call Func0200(bj_lastCreatedUnit)
call VXSleep(.2)
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=loc_integer01+1
endloop
set udg_location02=GetRectCenter(udg_rect106)
call CreateNUnitsAtLoc(1,'n00K',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0200(bj_lastCreatedUnit)
call GroupAddUnit(udg_group11,bj_lastCreatedUnit)
set udg_location02=GetRectCenter(udg_rect107)
call CreateNUnitsAtLoc(1,'n00K',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0200(bj_lastCreatedUnit)
call GroupAddUnit(udg_group11,bj_lastCreatedUnit)
set udg_location02=GetRectCenter(udg_rect108)
call CreateNUnitsAtLoc(1,'n00K',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0200(bj_lastCreatedUnit)
call GroupAddUnit(udg_group11,bj_lastCreatedUnit)
set udg_location02=GetRectCenter(udg_rect109)
call CreateNUnitsAtLoc(1,'n00K',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0200(bj_lastCreatedUnit)
call GroupAddUnit(udg_group11,bj_lastCreatedUnit)
set udg_location02=GetRectCenter(udg_rect110)
call CreateNUnitsAtLoc(1,'n00K',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0200(bj_lastCreatedUnit)
call GroupAddUnit(udg_group11,bj_lastCreatedUnit)
call TriggerSleepAction(5.)
call QuestSetDescription(udg_quest01,"The resonators have mapped a vast network of tunnels that extend throughout and beyond your sector. Unfortunately, they appear to have also aggravated the tunnels' inhabitants. Satellites have picked up 5 large creatures emerging from the networks and moving fast in your direction. Your top priority is to make sure the civilians survive this onslaught.")
call FlashQuestDialogButton()
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Kill those hive queens and await further orders.")
call PlaySoundBJ(udg_sound88)
loop
exitwhen(((CountUnitsInGroup(udg_group11)==0)))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,.5))
endloop
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,("|cff808000Queens slain, "+(I2S((90*(udg_integer16+1)))+" XP awarded to all players.")))
call PlaySoundBJ(udg_sound88)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_integers04[bj_forLoopAIndex]=(udg_integers04[bj_forLoopAIndex]+(90*(udg_integer16+1)))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_integer19=(udg_integer19+1)
else
if(((udg_boolean05)))then
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(udg_trigger285)
call DisableTrigger(udg_trigger286)
set udg_integer20=(udg_integer20+1)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,("|cff808000Resonators not planted in the alotted time, "+(I2S((25*(udg_integer16+1)))+" XP deducted from all players.")))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_integers04[bj_forLoopAIndex]=(udg_integers04[bj_forLoopAIndex]-(25*(udg_integer16+1)))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
return
endif
endif
call ConditionalTriggerExecute(udg_trigger289)
endfunction
function Func1506 takes nothing returns nothing
if(((GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_PLAYING)))then
call SetPlayerAllianceStateBJ(GetEnumPlayer(),Player(-1+(bj_forLoopAIndex)),6)
call SetPlayerAllianceStateBJ(GetEnumPlayer(),Player(-1+(bj_forLoopAIndex)),2)
else
if(((GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_LEFT)))then
call SetPlayerAllianceStateBJ(GetEnumPlayer(),Player(-1+(bj_forLoopAIndex)),6)
call SetPlayerAllianceStateBJ(GetEnumPlayer(),Player(-1+(bj_forLoopAIndex)),4)
endif
endif
endfunction
function Func1510 takes nothing returns nothing
call GroupAddUnit(udg_group02,GetEnumUnit())
endfunction
function Func1512 takes nothing returns nothing
call TriggerSleepAction(8.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Protect the 2 towns from the infected and wait for further orders. Our reports are showing more undead advancing on your sector and small towns in the countryside are evacuating to the cities.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"We have no outstanding tasks or missions for you at this time. Your standing orders are to focus on survival as well as the protection of the two towns and their inhabitants. Defend the towns, search for equipment and reinforce the sector at your own discretion.")
call FlashQuestDialogButton()
call TriggerSleepAction(30.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r We'll be sending reinforcements if you have any casualties. Titan B234's route is near your sector and will drop reinforcements at the western road in your sector. It will also be dropping 3 sentry guns, though we can't predict where they'll land.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(10.)
call PlaySoundBJ(udg_sound116)
call TriggerSleepAction(5.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call ForForce(Func0015(MAP_CONTROL_USER),function Func1506)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call ConditionalTriggerExecute(udg_trigger63)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(bj_mapInitialPlayableArea)
call CreateItemLoc('I005',udg_location02)
call AddSpecialEffectLocBJ(udg_location02,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,4.,2,50.,50.,90.)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(60.)
call QuestSetDescription(udg_quest01,"We have no outstanding tasks or missions for you at this time. Your standing orders are to focus on survival as well as the protection of the two towns and their inhabitants. Defend the towns, search for equipment and reinforce the sector at your own discretion. Krill have been spotted, so be on your guard.")
call FlashQuestDialogButton()
if(((udg_integer16!=0)))then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Recon reports that krill are heading towards your sector from the north. Watch out, they fly and kill fast. Keep the civilians alive, team.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(10.)
call PlaySoundBJ(udg_sound64)
call TriggerSleepAction(3.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000Marine:|r Sir, I hear something!")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(8.)
call PlaySoundBJ(udg_sound65)
call TriggerSleepAction(3.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000Marine:|r Stay alert, people.")
call PlaySoundBJ(udg_sound88)
set udg_location02=GetRandomLocInRect(udg_rect98)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=udg_integer26
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'n00B',Player(27),udg_location02,GetRandomReal(0,360))
call Func0200(bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call RemoveLocation(udg_location02)
call TriggerSleepAction(5.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000Marine:|r Where are those things?")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(5.)
call PlaySoundBJ(udg_sound66)
call TriggerSleepAction(5.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000Marine:|r Oh shit! They're cloaked!")
call PlaySoundBJ(udg_sound88)
call EnableTrigger(udg_trigger216)
call DisableTrigger(udg_trigger215)
endif
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(27))+udg_integer16),Player(27))
call TriggerSleepAction(60.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Recon has picked up large mutants in your sector.")
call PlaySoundBJ(udg_sound88)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect14)
call CreateNUnitsAtLoc(1,'u002',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0200(bj_lastCreatedUnit)
set udg_location02=GetRandomLocInRect(udg_rect20)
call CreateNUnitsAtLoc(1,'u002',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0200(bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(120.)
if(((udg_boolean01)))then
return
endif
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Refugees will be coming in from the western road to stay in the town there. Protect them. You may want to escort the civilians from the northwest town to the southern town.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(30.)
if(((udg_boolean01)))then
return
endif
call PlaySoundBJ(udg_sound05)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,GetRectCenter(udg_rect26),5.,2,25.,25.,100)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_group23=UAUnitGroupWithTypeId(udg_integers03[bj_forLoopAIndex])
call ForGroupBJ(udg_group23,function Func1510)
call DestroyGroup(udg_group23)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(15,20)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,udg_integers03[GetRandomInt(1,5)],Player(24),udg_location02,.0)
call RemoveLocation(udg_location02)
set udg_location02=GetRandomLocInRect(udg_rect19)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851986,GetRandomLocInRect(udg_rect19))
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group02,bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(2,5)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h005',Player(24),GetRandomLocInRect(udg_rect26),.0)
call RemoveLocation(udg_location02)
set udg_location02=GetRandomLocInRect(udg_rect19)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851986,GetRandomLocInRect(udg_rect19))
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(45.)
if(((udg_boolean01)))then
return
endif
call EnableTrigger(udg_trigger213)
call DisableTrigger(udg_trigger210)
call TriggerSleepAction(120.)
call ConditionalTriggerExecute(udg_trigger290)
endfunction
function Func1513 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1515 takes nothing returns nothing
call GroupAddUnit(udg_group02,GetEnumUnit())
endfunction
function Func1520 takes nothing returns nothing
if(((GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_PLAYING)))then
call SetPlayerAllianceStateBJ(GetEnumPlayer(),Player(-1+(bj_forLoopAIndex)),6)
call SetPlayerAllianceStateBJ(GetEnumPlayer(),Player(-1+(bj_forLoopAIndex)),2)
else
if(((GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_LEFT)))then
call SetPlayerAllianceStateBJ(GetEnumPlayer(),Player(-1+(bj_forLoopAIndex)),6)
call SetPlayerAllianceStateBJ(GetEnumPlayer(),Player(-1+(bj_forLoopAIndex)),4)
endif
endif
endfunction
function Func1521 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1522 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1523 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1524 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1525 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1526 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1531 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1532 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1540 takes nothing returns nothing
set udg_location02=GetRectCenter(udg_rect90)
call IssuePointOrderByIdLoc(GetEnumUnit(),851986,udg_location02)
call RemoveLocation(udg_location02)
endfunction
function Func1545 takes nothing returns nothing
call UnitShareVisionBJ(true,udg_unit11,GetEnumPlayer())
endfunction
function Func1549 takes nothing returns nothing
call UnitShareVisionBJ(false,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1550 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func1552 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func1573 takes nothing returns nothing
local integer civtime
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(27))+udg_integer16),Player(27))
// MORE ZOMBIE PLAYERS
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(12))+udg_integer16),Player(12))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(13))+udg_integer16),Player(13))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(14))+udg_integer16),Player(14))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(15))+udg_integer16),Player(15))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(16))+udg_integer16),Player(16))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(17))+udg_integer16),Player(17))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(18))+udg_integer16),Player(18))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(19))+udg_integer16),Player(19))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(20))+udg_integer16),Player(20))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(21))+udg_integer16),Player(21))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(22))+udg_integer16),Player(22))
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',Player(23))+udg_integer16),Player(23))
// ----
if(((udg_integer23>=10000)))then
set udg_rect01=udg_rect97
call Func0201('u009')
call Func0200(bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger202,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call PlaySoundBJ(udg_sounds04[GetRandomInt(1,4)])
endif
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_group23=UAUnitGroupWithTypeId(udg_integers03[bj_forLoopAIndex])
call ForGroupBJ(udg_group23,function Func1515)
call DestroyGroup(udg_group23)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r A Behemoth and Gargantuan are moving south towards the towns. You must eliminate them before they reach the civilians. Bravo Company will be arriving shortly to aid you.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"A Behemoth and Gargantuan are closing in on your sector. Your orders are to meet with Bravo Company and destroy the abominations before they slaughter the civilians. Their presence will likely overwhelm the already taxed defenses of both towns.")
call FlashQuestDialogButton()
call CreateNUnitsAtLoc(1,'u006',Player(27),GetRandomLocInRect(udg_rect98),GetRandomReal(0,360))
call GroupAddUnit(udg_group10,bj_lastCreatedUnit)
call Func0200(bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'u00B',Player(27),GetRandomLocInRect(udg_rect98),GetRandomReal(0,360))
call GroupAddUnit(udg_group10,bj_lastCreatedUnit)
call Func0200(bj_lastCreatedUnit)
call TriggerSleepAction(12.)
call PlaySoundBJ(udg_sound10)
if(((udg_boolean01)))then
return
endif
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((IsUnitDeadBJ(udg_units01[bj_forLoopAIndex]))and(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)))then
call ReviveHeroLoc(udg_units01[bj_forLoopAIndex],GetRandomLocInRect(udg_rect26),false)
endif
call ForForce(Func0015(MAP_CONTROL_USER),function Func1520)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_locations04[1]=GetRectCenter(udg_rect08)
set udg_locations04[2]=GetRectCenter(udg_rect09)
set udg_locations04[3]=GetRectCenter(udg_rect10)
set udg_locations04[4]=GetRectCenter(udg_rect11)
set udg_locations04[5]=GetRectCenter(udg_rect12)
set udg_locations04[6]=GetRectCenter(udg_rect13)
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h00A',Player(11),udg_location02,.0)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
set udg_location02=Func0002(udg_locations04[GetRandomInt(1,4)],GetRandomReal(0,350.),GetRandomReal(0,360))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851983,udg_location02)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group04,bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call ForForce(Func0016(Player(0)),function Func1521)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h009',Player(11),udg_location02,.0)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
set udg_location02=Func0002(udg_locations04[GetRandomInt(1,4)],GetRandomReal(0,350.),GetRandomReal(0,360))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851983,udg_location02)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group04,bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call ForForce(Func0016(Player(0)),function Func1522)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h00E',Player(11),udg_location02,.0)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
set udg_location02=Func0002(udg_locations04[GetRandomInt(1,4)],GetRandomReal(0,350.),GetRandomReal(0,360))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851983,udg_location02)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group04,bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call ForForce(Func0016(Player(0)),function Func1523)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetRandomInt(1,2)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h017',Player(11),udg_location02,.0)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
set udg_location02=Func0002(udg_locations04[GetRandomInt(1,4)],GetRandomReal(0,350.),GetRandomReal(0,360))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851983,udg_location02)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group04,bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call ForForce(Func0016(Player(0)),function Func1524)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h019',Player(11),udg_location02,.0)
call RemoveLocation(udg_location02)
set udg_location02=Func0002(udg_locations04[GetRandomInt(1,4)],GetRandomReal(0,350.),GetRandomReal(0,360))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851983,udg_location02)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group04,bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call ForForce(Func0016(Player(0)),function Func1525)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h00V',Player(11),udg_location02,.0)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
set udg_location02=Func0002(udg_locations04[GetRandomInt(1,4)],GetRandomReal(0,350.),GetRandomReal(0,360))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851983,udg_location02)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group04,bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call ForForce(Func0016(Player(0)),function Func1526)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((GetPlayerController(Player(-1+(bj_forLoopAIndex)))==MAP_CONTROL_USER)and(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)))then
if(((GetRandomInt(1,3)==1)))then
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h009',Player(-1+(bj_forLoopAIndex)),udg_location02,.0)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
if(((GetRandomInt(1,2)==1)))then
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h00E',Player(-1+(bj_forLoopAIndex)),udg_location02,.0)
call RemoveLocation(udg_location02)
else
if(((GetRandomInt(1,3)==1)))then
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h017',Player(-1+(bj_forLoopAIndex)),udg_location02,.0)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
if(((GetRandomInt(1,2)==1)))then
if(((GetRandomInt(1,4)==1)))then
if(((GetRandomInt(1,2)==1)))then
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h01D',Player(-1+(bj_forLoopAIndex)),udg_location02,.0)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h00A',Player(-1+(bj_forLoopAIndex)),udg_location02,.0)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
endif
else
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h01E',Player(-1+(bj_forLoopAIndex)),udg_location02,.0)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
endif
else
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h00V',Player(-1+(bj_forLoopAIndex)),udg_location02,.0)
call RemoveLocation(udg_location02)
endif
endif
endif
endif
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h00G',Player(11),udg_location02,.0)
call RemoveLocation(udg_location02)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851986,udg_locations04[5])
call GroupAddUnit(udg_group04,bj_lastCreatedUnit)
call ForForce(Func0016(Player(0)),function Func1531)
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h00G',Player(11),udg_location02,.0)
call RemoveLocation(udg_location02)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851986,udg_locations04[6])
call GroupAddUnit(udg_group04,bj_lastCreatedUnit)
call ForForce(Func0016(Player(0)),function Func1532)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((GetRandomInt(1,220)==1)and(GetPlayerController(Player(-1+(bj_forLoopAIndex)))==MAP_CONTROL_USER)and(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)))then
set udg_location02=GetRandomLocInRect(udg_rect26)
call CreateNUnitsAtLoc(1,'h00G',Player(-1+(bj_forLoopAIndex)),udg_location02,.0)
call RemoveLocation(udg_location02)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(12.)
call EnableTrigger(udg_trigger295)
set udg_integer40=(udg_integer14+600)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,8.,"|cff808000SOCOM:|r You have 10 minutes to slay those... things.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"A Behemoth and Gargantuan are closing in on your sector. Your orders are to meet with Bravo Company and destroy the abominations before they slaughter the civilians. Their presence will likely overwhelm the already taxed defenses of both towns.")
loop
exitwhen((GetBooleanOr(((IsUnitGroupDeadBJ(udg_group10))),((udg_integer14>=udg_integer40)))))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,2.))
endloop
if(((udg_integer14<udg_integer40)))then
call Func0233(40.,"Behemoth and Gargantuan slain")
set udg_integer19=(udg_integer19+1)
call PlaySoundBJ(udg_sound56)
else
call Func0233(-8.,"Behemoth and Gargantuan not slain within 10 minutes")
set udg_integer20=(udg_integer20+1)
endif
call TriggerSleepAction(2)
if(((udg_boolean01)))then
return
endif
if(((CountUnitsInGroup(udg_group02)>0)))then
call TriggerSleepAction(GetRandomReal(30.,60.))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r We're sending a helicopter to evacuate the civilians.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"A helicopter in the southwestern town's LZ will evacuate the remaining civilians. Even if the town appears secure from the west, make sure the civilians reach the helicopter safely and standby for orders dealing with our next crisis.")
call FlashQuestDialogButton()
call TriggerSleepAction(5.)
call CreateNUnitsAtLoc(1,'h015',Player(11),OffsetLocation(GetRectCenter(udg_rect90),GetRandomReal(600.,1000.),GetRandomReal(-200.,200.)),.0)
set udg_unit01=bj_lastCreatedUnit
call IssuePointOrderByIdLoc(udg_unit01,851986,GetRectCenter(udg_rect90))
call SetUnitInvulnerable(udg_unit01,true)
call TriggerSleepAction(3.)
call SetUnitFlyHeight(udg_unit01,.0,250.)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,GetRectCenter(udg_rect90),8.,2,50.,100,50.)
call PlaySoundBJ(udg_sound05)
call EnableTrigger(udg_trigger296)
set civtime=0
call ForGroupBJ(udg_group02,function Func1540)
loop
exitwhen(((CountUnitsInGroup(udg_group02)==0)or civtime>300))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,2.))
set civtime=civtime+2
endloop
call DisableTrigger(udg_trigger296)
call SetUnitFlyHeight(udg_unit01,800.,250.)
call IssuePointOrderByIdLoc(udg_unit01,851986,GetRandomLocInRect(udg_rect96))
call VXSleep(6.)
call SetUnitFlyHeight(udg_unit01,1500.,250.)
call VXSleep(3.)
call RemoveUnit(udg_unit01)
call TriggerSleepAction(GetRandomReal(3.,15.))
if(((udg_boolean01)))then
return
endif
if(((udg_boolean28 or udg_ForceGenesisEnding)))then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Now that the civilians have been evacuated, we must inform you that a Genesis has been spotted heading towards your sector. Bravo Company will be securing LZs with you for additional support. You must eliminate the Genesis before the contamination spreads any further.")
call PlaySoundBJ(udg_sound88)
endif
else
call Func0233(-8.,"No civilians alive")
call TriggerSleepAction(GetRandomReal(30.,60.))
if(((udg_boolean28 or udg_ForceGenesisEnding)))then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r A Genesis has been spotted heading towards your sector. You must destroy that thing before the contamination spreads any further. Bravo Company will be securing LZs with you for additional support.")
call PlaySoundBJ(udg_sound88)
endif
endif
// Derdan
call EnableTrigger(gg_trg_ForceFinalAssault)
call EnableTrigger(gg_trg_RemoveTrashMobs)
call TriggerExecute(gg_trg_RemoveTrashMobsExisting)
// ----
if(((udg_boolean28 or udg_ForceGenesisEnding)))then
call QuestSetDescription(udg_quest01,"A Genesis-Grade life form has been spotted by recon teams and it is heading your way. In order to completely restore security to the sector, this monster must be dealt with before it is given a chance to wreak havoc. Bravo Company will be securing LZs with you for additional support. After Genesis is destroyed, you all can have the rest of the day off.")
call FlashQuestDialogButton()
set udg_boolean11=true
call EnableTrigger(udg_trigger293)
call EnableTrigger(udg_trigger292)
call EnableTrigger(udg_trigger294)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff32cd32HINT|r - In order to secure an LZ properly, you must throw a ground flare at the center of the LZ. Flares have been dropped at the first LZ to accomplish this. It is highly recommended that you wait for Bravo Company to catch up to the LZs before throwing the flares.")
loop
exitwhen(((udg_boolean11==false)))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,5.))
endloop
call DisableTrigger(udg_trigger292)
call DisableTrigger(udg_trigger293)
call DisableTrigger(udg_trigger294)
call TriggerSleepAction(180.)
if(((udg_boolean01)))then
return
endif
call PlaySoundBJ(udg_sound52)
call TriggerSleepAction(10.)
call PlaySoundBJ(udg_sound53)
call TriggerSleepAction(10.)
call PlaySoundBJ(udg_sound54)
call TriggerSleepAction(5.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000Marine:|r Whatever that is, it's heading this way.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(5.)
if(((udg_boolean01)))then
return
endif
if(((udg_integer23>=1000)))then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=4
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect96)
call CreateNUnitsAtLoc(1,'n00P',Player(27),udg_location02,.0)
call RemoveLocation(udg_location02)
call Func0200(bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
if(((udg_integer23>=2500)))then
set udg_location02=GetRandomLocInRect(udg_rect96)
call CreateNUnitsAtLoc(1,'u008',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call Func0200(bj_lastCreatedUnit)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect96)
call CreateNUnitsAtLoc(1,'n00F',Player(27),udg_location02,.0)
call RemoveLocation(udg_location02)
call Func0200(bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
if(((udg_integer23>=8000)))then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=8
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect96)
call CreateNUnitsAtLoc(1,'u004',Player(27),udg_location02,.0)
call RemoveLocation(udg_location02)
call Func0200(bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
if(((udg_integer23>=80000)))then
set udg_location02=GetRandomLocInRect(udg_rect96)
call CreateNUnitsAtLoc(1,'u005',Player(27),udg_location02,.0)
call RemoveLocation(udg_location02)
call Func0200(bj_lastCreatedUnit)
endif
call TriggerSleepAction(30.)
call PlaySoundBJ(udg_sound11)
if(((udg_boolean01)))then
return
endif
set udg_location02=GetRandomLocInRect(udg_rect98)
call CreateNUnitsAtLoc(1,'u003',Player(27),udg_location02,.0)
call RemoveLocation(udg_location02)
call Func0200(bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger202,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
if(((udg_integer23>=20000)))then
set udg_rect01=udg_rect97
call Func0201('u009')
call Func0200(bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger202,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call PlaySoundBJ(udg_sounds04[GetRandomInt(1,4)])
endif
else
call TriggerSleepAction(15.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Our intel shows that the Umbrella Corporation received a crate containing virus samples 1 week ago. We'll be sending in a squad from Bravo Company to retrieve the crate in their warehouse. You must escort their APC to the warehouse entrance.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"Intelligence shows that Umbrella Corporation received a crate containing virus samples 1 week ago. We'll be sending in a squad from Bravo Company to find and retrieve the crate in their warehouse, you must escort the APC to the warehouse entrance.")
call FlashQuestDialogButton()
call TriggerSleepAction(15.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000Marine:|r Apparently we can't get a sample off one of these damn things...")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(4.)
call CreateNUnitsAtLoc(1,'h00B',Player(11),GetRectCenter(udg_rect25),bj_UNIT_FACING)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851986,GetRectCenter(udg_rect46))
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,GetUnitLoc(bj_lastCreatedUnit),3.,2,20.,100,20.)
set udg_unit11=bj_lastCreatedUnit
call ForForce(bj_FORCE_ALL_PLAYERS,function Func1545)
call CreateNUnitsAtLoc(1,'n00F',Player(27),GetRandomLocInRect(udg_rect97),180.)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851983,GetUnitLoc(udg_unit11))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Guard the APC until it reaches the warehouse entrance.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(10.)
call IssuePointOrderByIdLoc(udg_unit11,851986,GetRectCenter(udg_rect07))
set udg_boolean14=true
loop
exitwhen((GetBooleanOr(((IsUnitDeadBJ(udg_unit11))),((RectContainsUnit(udg_rect07,udg_unit11))))))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,1.))
endloop
set udg_boolean14=false
if(((IsUnitDeadBJ(udg_unit11))))then
call KillDestructable(udg_destructable09)
call KillDestructable(udg_destructable08)
call KillDestructable(udg_destructable07)
call KillDestructable(udg_destructable06)
call KillDestructable(udg_destructable05)
call KillDestructable(udg_destructable04)
call DisableTrigger(udg_trigger291)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=10
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'n00T',Player(27),GetRandomLocInRect(udg_rect149),.0)
call Func0200(bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r The APC has been destroyed. You'll have to enter the warehouse and retrieve the crate yourself.")
call PlaySoundBJ(udg_sound88)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_integers04[bj_forLoopAIndex]=(udg_integers04[bj_forLoopAIndex]-(10*(udg_integer16+1)))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call CreateItemLoc('I00T',GetRandomLocInRect(udg_rect47))
set udg_item01=bj_lastCreatedItem
loop
exitwhen(((IsItemOwned(udg_item01))))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,1))
endloop
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r You found the crate, now bring it to the LZ in the northwestern town.")
call PlaySoundBJ(udg_sound88)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,GetRectCenter(udg_rect114),15.,2,25.,25.,75.)
loop
exitwhen(((RectContainsItem(udg_item01,udg_rect114))))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,3.))
endloop
call RemoveItem(udg_item01)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Now we can study the samples. Hopefully we can find a cure and create a vaccine for the virus.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(10.)
if(((udg_boolean01)))then
return
endif
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r It seems the intrusion in the warehouse has awakened some creatures that may have been residing there since the outbreak. Whatever they are, they must be neutralized.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"The intrusion in the warehouse has awoken numerous Class A zombies residing there. Kill 1 Darreus, 3 Metasis as well as 6 Artemis and the sector will be secure.")
// Derdan
call EnableTrigger(gg_trg_ForceFinalAssault)
call EnableTrigger(gg_trg_RemoveTrashMobs)
call TriggerExecute(gg_trg_RemoveTrashMobsExisting)
// ----
call FlashQuestDialogButton()
call PlaySoundBJ(udg_sound11)
call TriggerSleepAction(10.)
call PlaySoundBJ(udg_sound13)
call CreateNUnitsAtLoc(1,'u005',Player(27),GetRectCenter(udg_rect07),90.)
call GroupAddUnit(udg_group24,bj_lastCreatedUnit)
call Func0200(bj_lastCreatedUnit)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'u008',Player(27),GetRectCenter(udg_rect07),90.)
call GroupAddUnit(udg_group24,bj_lastCreatedUnit)
call Func0200(bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'n00F',Player(27),GetRectCenter(udg_rect128),90.)
call GroupAddUnit(udg_group24,bj_lastCreatedUnit)
call Func0200(bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'n00F',Player(27),GetRectCenter(udg_rect128),90.)
call GroupAddUnit(udg_group24,bj_lastCreatedUnit)
call Func0200(bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
loop
exitwhen(((IsUnitGroupDeadBJ(udg_group24))))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,1))
endloop
if(((udg_boolean01)))then
return
endif
set udg_boolean01=true
call StopSoundBJ(udg_sound11,true)
call PlaySoundBJ(udg_sound125)
call DisableTrigger(udg_trigger14)
call ExecuteFunc("Func0035")
call ExecuteFunc("Func0037")
call FogEnableOff()
call FogMaskEnableOff()
call TriggerSleepAction(3.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Great job, team. The creatures have been eliminated and no major threats reside in your sector. SOCOM out.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(3.)
call Func0233(75.,"Creatures have been killed")
call PauseAllUnitsBJ(true)
call DisableTrigger(udg_trigger209)
call DisableTrigger(udg_trigger214)
call DisableTrigger(udg_trigger215)
call DisableTrigger(udg_trigger216)
call DisableTrigger(udg_trigger64)
call TriggerSleepAction(3.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,40.,"|cff808000Thank you for playing Undead Assault II. You can save your experience by typing \"-save\". You can load your experience by typing \"-load <code>\".")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,40.,"If you enjoy playing Undead Assault II, consider joining our community at: |cff408080https://discord.gg/ZF8vE2W")
call TriggerSleepAction(35.)
call PlaySoundBJ(udg_sound118)
else
call Func0233(10.,"The APC has made it to the warehouse")
call TriggerSleepAction(3.)
call SetUnitPositionLocFacingBJ(udg_unit11,GetRectCenter(udg_rect07),90.)
call IssueImmediateOrderById(udg_unit11,851993)
call SetUnitInvulnerable(udg_unit11,true)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func1549)
call TriggerSleepAction(3.)
set udg_location03=GetUnitLoc(udg_unit11)
set udg_location02=OffsetLocation(udg_location03,150.,.0)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'h009',Player(11),udg_location02,bj_UNIT_FACING)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851986,GetRandomLocInRect(udg_rect128))
call GroupAddUnit(udg_group25,bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call RemoveLocation(udg_location02)
call RemoveLocation(udg_location03)
call TriggerSleepAction(8.)
call ForGroupBJ(udg_group25,function Func1550)
call PlaySoundBJ(udg_sound115)
call TriggerSleepAction(90.)
if(((udg_boolean01)))then
return
endif
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000Marine:|r We've got the crate but the scientists won't die!")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(5.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000Marine:|r Man down! Run for the APC! Let's go!")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(5.)
call CreateNUnitsAtLoc(1,'h009',Player(11),GetRectCenter(udg_rect129),bj_UNIT_FACING)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851986,GetRectCenter(udg_rect07))
call GroupAddUnit(udg_group25,bj_lastCreatedUnit)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call TriggerSleepAction(5.)
call ForGroupBJ(udg_group25,function Func1552)
call TriggerSleepAction(5.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000Marine:|r The crate's in! Let's get the hell outta here!")
call PlaySoundBJ(udg_sound88)
call KillDestructable(udg_destructable09)
call KillDestructable(udg_destructable08)
call KillDestructable(udg_destructable07)
call KillDestructable(udg_destructable06)
call KillDestructable(udg_destructable05)
call KillDestructable(udg_destructable04)
call DisableTrigger(udg_trigger291)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=8
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'n00T',Player(27),GetRandomLocInRect(udg_rect129),.0)
call Func0200(bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call IssuePointOrderByIdLoc(udg_unit11,851986,GetRectCenter(udg_rect46))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Now we can study the samples. Hopefully we can find a cure and create a vaccine for the virus.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(5.)
call RemoveUnit(udg_unit11)
call TriggerSleepAction(10.)
if(((udg_boolean01)))then
return
endif
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r It seems the intrusion in the warehouse has awakened some creatures that may have been residing there since the outbreak. Whatever they are, they must be neutralized.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"The intrusion in the warehouse has awoken numerous Class A zombies residing there. Kill 1 Darreus, 3 Metasis as well as 6 Artemis and the sector will be secure.")
call FlashQuestDialogButton()
if(((udg_integer23>=20000)))then
set udg_rect01=udg_rect97
call Func0201('u009')
call Func0200(bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger202,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call PlaySoundBJ(udg_sounds04[GetRandomInt(1,4)])
endif
call PlaySoundBJ(udg_sound11)
call TriggerSleepAction(10.)
call PlaySoundBJ(udg_sound13)
call CreateNUnitsAtLoc(1,'u005',Player(27),GetRectCenter(udg_rect07),90.)
call GroupAddUnit(udg_group24,bj_lastCreatedUnit)
call Func0200(bj_lastCreatedUnit)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'u008',Player(27),GetRectCenter(udg_rect07),90.)
call GroupAddUnit(udg_group24,bj_lastCreatedUnit)
call Func0200(bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'n00F',Player(27),GetRectCenter(udg_rect128),90.)
call GroupAddUnit(udg_group24,bj_lastCreatedUnit)
call Func0200(bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'n00F',Player(27),GetRectCenter(udg_rect128),90.)
call GroupAddUnit(udg_group24,bj_lastCreatedUnit)
call Func0200(bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
loop
exitwhen(((IsUnitGroupDeadBJ(udg_group24))))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,1))
endloop
if(((udg_boolean01)))then
return
endif
set udg_boolean01=true
call StopSoundBJ(udg_sound11,true)
call PlaySoundBJ(udg_sound125)
call DisableTrigger(udg_trigger14)
call ExecuteFunc("Func0035")
call ExecuteFunc("Func0037")
call FogEnableOff()
call FogMaskEnableOff()
call TriggerSleepAction(3.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Great job, team. The creatures have been eliminated and no major threats remain in your sector. SOCOM out.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(3.)
call Func0233(75.,"Creatures have been killed")
call PauseAllUnitsBJ(true)
call DisableTrigger(udg_trigger209)
call DisableTrigger(udg_trigger214)
call DisableTrigger(udg_trigger215)
call DisableTrigger(udg_trigger216)
call DisableTrigger(udg_trigger64)
call TriggerSleepAction(3.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,40.,"|cff808000Thank you for playing Undead Assault II. You can save your experience by typing \"-save\". You can load your experience by typing \"-load <code>\".")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,40.,"If you enjoy playing Undead Assault II, consider joining our community at: |cff408080https://discord.gg/ZF8vE2W")
call TriggerSleepAction(35.)
call PlaySoundBJ(udg_sound118)
endif
endif
endfunction
function Func1574 takes nothing returns boolean
return(GetPlayerController(GetOwningPlayer(GetEnteringUnit()))==MAP_CONTROL_USER)
endfunction
function Func1575 takes nothing returns nothing
call SetUnitPositionLoc(GetEnteringUnit(),GetRectCenter(udg_rect07))
call DisplayTimedTextToForce(CreatePlayerForce(GetOwningPlayer(GetEnteringUnit())),5.,"You cannot enter the warehouse.")
endfunction
function Func1576 takes nothing returns boolean
return(udg_booleans12[udg_integer29]==false)and(GetUnitTypeId(GetEnteringUnit())=='o005')
endfunction
function Func1578 takes nothing returns nothing
if(((RectContainsUnit(udg_rects07[udg_integer29],GetEnteringUnit()))))then
set udg_booleans12[udg_integer29]=true
endif
endfunction
function Func1586 takes nothing returns nothing
local sound loc_sound01=udg_sound82
local unit loc_unit01
if(((udg_integer29<=4)and(udg_booleans10[udg_integer29]==false)and(udg_booleans12[udg_integer29])))then
set udg_booleans10[udg_integer29]=true
else
if(((udg_integer29==1)and(udg_booleans10[udg_integer29]==false)))then
set udg_booleans10[udg_integer29]=true
else
return
endif
endif
set loc_unit01=GroupPickRandomUnit(udg_group04)
call PlaySoundOnUnitBJ(loc_sound01,100,loc_unit01)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,GetRectCenter(udg_rects07[udg_integer29]),5.,2,50.,100,50.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"LZ secured.")
call CreateNUnitsAtLoc(1,'h015',Player(11),OffsetLocation(GetRectCenter(udg_rects07[udg_integer29]),-1000.,200.),bj_UNIT_FACING)
set udg_unit10=bj_lastCreatedUnit
call IssuePointOrderByIdLoc(udg_unit10,851986,GetRectCenter(udg_rects07[udg_integer29]))
call VXSleep(1.)
call IssuePointOrderByIdLoc(udg_unit10,851986,GetRectCenter(udg_rects07[udg_integer29]))
loop
exitwhen(((DistanceBetweenPoints(GetUnitLoc(udg_unit10),GetRectCenter(udg_rects07[udg_integer29]))<=500.)))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,1))
endloop
call SetUnitFlyHeight(udg_unit10,80.,300.)
call TriggerSleepAction(5.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((GetPlayerController(Player(-1+(bj_forLoopAIndex)))==MAP_CONTROL_USER)and(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)))then
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'h009',Player(-1+(bj_forLoopAIndex)),GetRandomLocInRect(udg_rects07[udg_integer29]),.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
if(((GetRandomInt(1,2)==1)))then
call CreateNUnitsAtLoc(1,'h00E',Player(-1+(bj_forLoopAIndex)),GetRandomLocInRect(udg_rects07[udg_integer29]),.0)
else
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'h017',Player(-1+(bj_forLoopAIndex)),GetRandomLocInRect(udg_rects07[udg_integer29]),.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
if(((GetRandomInt(1,2)==1)))then
if(((GetRandomInt(1,4)==1)))then
if(((GetRandomInt(1,2)==1)))then
call CreateNUnitsAtLoc(1,'h01D',Player(-1+(bj_forLoopAIndex)),GetRandomLocInRect(udg_rects07[udg_integer29]),.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
call CreateNUnitsAtLoc(1,'h00A',Player(-1+(bj_forLoopAIndex)),GetRandomLocInRect(udg_rects07[udg_integer29]),.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
endif
else
call CreateNUnitsAtLoc(1,'h01E',Player(-1+(bj_forLoopAIndex)),GetRandomLocInRect(udg_rects07[udg_integer29]),.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
endif
else
call CreateNUnitsAtLoc(1,'h00V',Player(-1+(bj_forLoopAIndex)),GetRandomLocInRect(udg_rects07[udg_integer29]),.0)
endif
endif
endif
endif
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'h009',Player(11),GetRandomLocInRect(udg_rects07[udg_integer29]),.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
call GroupAddUnit(udg_group04,bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call CreateNUnitsAtLoc(1,'h00V',Player(11),GetRandomLocInRect(udg_rects07[udg_integer29]),.0)
call GroupAddUnit(udg_group04,bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
call CreateNUnitsAtLoc(1,'h00E',Player(11),GetRandomLocInRect(udg_rects07[udg_integer29]),.0)
call GroupAddUnit(udg_group04,bj_lastCreatedUnit)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateItemLoc('I00O',GetRandomLocInRect(udg_rects07[udg_integer29]))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(5.)
call SetUnitFlyHeight(udg_unit10,500.,300.)
call IssuePointOrderByIdLoc(udg_unit10,851986,GetRandomLocInRect(udg_rect97))
call TriggerSleepAction(5.)
call RemoveUnit(udg_unit10)
set udg_unit10=null
if(((udg_integer29<4)))then
set udg_integer29=(udg_integer29+1)
set udg_integer30=0
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,GetRectCenter(udg_rects07[udg_integer29]),5.,2,50.,100,50.)
else
set udg_integer29=0
set udg_boolean11=false
call DisableTrigger(GetTriggeringTrigger())
call ConditionalTriggerExecute(udg_trigger295)
call TriggerSleepAction(.08)
call ConditionalTriggerExecute(udg_trigger295)
endif
endfunction
function Func1588 takes nothing returns nothing
set udg_location02=GetUnitLoc(GetEnumUnit())
set udg_location03=GetRectCenter(udg_rects07[udg_integer29])
if(((DistanceBetweenPoints(GetUnitLoc(GetEnumUnit()),GetRectCenter(udg_rects07[udg_integer29]))<=1500.)and(udg_booleans10[udg_integer29]==false)))then
set udg_integer30=(udg_integer30+1)
endif
call RemoveLocation(udg_location02)
call RemoveLocation(udg_location03)
endfunction
function Func1591 takes nothing returns nothing
call ForGroupBJ(udg_group04,function Func1588)
if(((udg_integer30>=420)))then
if(((udg_integer29<4)))then
set udg_booleans10[udg_integer29]=true
set udg_integer29=(udg_integer29+1)
set udg_integer30=0
set udg_location02=GetRectCenter(udg_rects07[udg_integer29])
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,5.,2,50.,100,50.)
call RemoveLocation(udg_location02)
else
set udg_integer29=0
set udg_boolean11=false
call DisableTrigger(GetTriggeringTrigger())
endif
endif
endfunction
function Func1593 takes nothing returns nothing
set udg_location02=GetRectCenter(udg_rects07[udg_integer29])
set udg_location03=Func0002(udg_location02,GetRandomReal(0,900.),GetRandomReal(0,360))
call IssuePointOrderByIdLoc(GetEnumUnit(),851983,udg_location03)
call RemoveLocation(udg_location02)
call RemoveLocation(udg_location03)
endfunction
function Func1596 takes nothing returns nothing
if(((GetUnitTypeId(GetEnumUnit())!='h00G')))then
set udg_location02=Func0002(udg_locations04[GetRandomInt(1,4)],GetRandomReal(0,350.),GetRandomReal(0,360))
call IssuePointOrderByIdLoc(GetEnumUnit(),851983,udg_location02)
call RemoveLocation(udg_location02)
else
set udg_location02=Func0002(udg_locations04[GetRandomInt(5,6)],GetRandomReal(0,350.),GetRandomReal(0,360))
call IssuePointOrderByIdLoc(GetEnumUnit(),851983,udg_location02)
call RemoveLocation(udg_location02)
endif
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetUnitLoc(GetEnumUnit())
if(((DistanceBetweenPoints(udg_location02,udg_locations04[bj_forLoopAIndex])<=600.)))then
call IssueImmediateOrderById(GetEnumUnit(),851993)
endif
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func1597 takes nothing returns nothing
set udg_location02=GetUnitLoc(GroupPickRandomUnit(UAUnitGroupWithTypeId('u003')))
call IssuePointOrderByIdLoc(GetEnumUnit(),851983,udg_location02)
call RemoveLocation(udg_location02)
endfunction
function Func1599 takes nothing returns nothing
set udg_location02=GetUnitLoc(GroupPickRandomUnit(UAUnitGroupWithTypeId('u006')))
call IssuePointOrderByIdLoc(GetEnumUnit(),851983,udg_location02)
call RemoveLocation(udg_location02)
endfunction
function Func1602 takes nothing returns nothing
local group g
local group g2
if(((udg_boolean14)))then
set udg_location02=GetRectCenter(udg_rect07)
call IssuePointOrderByIdLoc(udg_unit11,851986,udg_location02)
call RemoveLocation(udg_location02)
endif
if(((udg_boolean11==false)))then
set g=Func0019((CountUnitsInGroup(udg_group04)/2),udg_group04)
call ForGroupBJ(g,function Func1596)
call DestroyGroup(g)
set g=UAUnitGroupWithTypeId('u003')
if(((RectContainsUnit(udg_rect19,GroupPickRandomUnit(g)))))then
set g2=UAUnitGroupWithTypeId('h00G')
call ForGroupBJ(g2,function Func1597)
call DestroyGroup(g2)
endif
call DestroyGroup(g)
set g=UAUnitGroupWithTypeId('u006')
if(((RectContainsUnit(udg_rect19,GroupPickRandomUnit(g)))))then
set g2=UAUnitGroupWithTypeId('h00G')
call ForGroupBJ(g2,function Func1599)
call DestroyGroup(g2)
endif
call DestroyGroup(g)
else
call ForGroupBJ(udg_group04,function Func1593)
endif
set g=null
set g2=null
endfunction
function Func1603 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1604 takes nothing returns boolean
return(IsUnitInGroup(GetFilterUnit(),udg_group02))
endfunction
function Func1605 takes nothing returns nothing
call GroupRemoveUnit(udg_group02,GetEnumUnit())
call RemoveUnit(GetEnumUnit())
call Func0233(2,"Civilian rescued")
endfunction
function Func1606 takes nothing returns nothing
set udg_group23=Func0005(udg_rect90,Condition(function Func1604))
call ForGroupBJ(udg_group23,function Func1605)
call DestroyGroup(udg_group23)
set udg_group23=null
endfunction
function Func1607 takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='u003')and(udg_boolean01==false)
endfunction
function Func1608 takes nothing returns nothing
call StopSoundBJ(udg_sound11,true)
call DisableTrigger(udg_trigger14)
call PlaySoundBJ(udg_sound125)
call ExecuteFunc("Func0035")
call ExecuteFunc("Func0037")
call FogEnableOff()
call FogMaskEnableOff()
set udg_boolean01=true
call TriggerSleepAction(3.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Excellent job, team. Genesis has been neutralized and no major threats remain in your sector. SOCOM out.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(3.)
call Func0233(75.,"Genesis has been killed")
call PauseAllUnitsBJ(true)
call DisableTrigger(udg_trigger209)
call DisableTrigger(udg_trigger214)
call DisableTrigger(udg_trigger215)
call DisableTrigger(udg_trigger216)
call DisableTrigger(udg_trigger64)
call TriggerSleepAction(3.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,40.,"|cff808000Thank you for playing Undead Assault II. You can save your experience by typing \"-save\". You can load your experience by typing \"-load <code>\".")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,40.,"If you enjoy playing Undead Assault II, consider joining our community at: |cff408080https://discord.gg/ZF8vE2W")
call TriggerSleepAction(35.)
call PlaySoundBJ(udg_sound118)
endfunction
function Func1611 takes nothing returns boolean
local boolean b = GetUnitRace(GetAttacker()) == RACE_UNDEAD or GetUnitRace(GetTriggerUnit()) == RACE_UNDEAD
return b and(((GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_USER)or(GetPlayerController(GetOwningPlayer(GetAttacker()))==MAP_CONTROL_USER)))
endfunction
function Func1614 takes nothing returns nothing
if GetUnitRace(GetTriggerUnit()) == RACE_UNDEAD then
call DisableTrigger(GetTriggeringTrigger())
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,(GetPlayerName(GetOwningPlayer(GetAttacker()))+": Contact!"))
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(4.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000SOCOM:|r Damn. We were hoping the contamination hadn't spread this far yet. I guess those destroyed buildings indicated that couldn't be true. Extraction is put on hold for now.")
call PlaySoundBJ(udg_sound88)
endif
if GetUnitRace(GetAttacker()) == RACE_UNDEAD then
call DisableTrigger(GetTriggeringTrigger())
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,(GetPlayerName(GetOwningPlayer(GetAttacker()))+": I've made contact!"))
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(4.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cff808000SOCOM:|r Damn. We were hoping the contamination hadn't spread this far yet. It's worse than we expected. Extraction is put on hold for now, reinforce the sector and await further orders.")
call PlaySoundBJ(udg_sound88)
endif
endfunction
function Func1615 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1616 takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_integers04[bj_forLoopAIndex]=(udg_integers04[bj_forLoopAIndex]+2+udg_integer16)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func1617 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1618 takes nothing returns nothing
call PauseAllUnitsBJ(true)
call PlaySoundBJ(udg_sound125)
call Func0233(80.,"Survived for 60 minutes")
call TriggerSleepAction(2.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cff808000SOCOM:|r Alright, soldiers: we've got enough information about the area from your patrol and we're no longer in need of your services in that sector. Let's get you home.")
call PlaySoundBJ(udg_sound88)
call DisableTrigger(udg_trigger216)
call DisableTrigger(udg_trigger209)
call DisableTrigger(udg_trigger214)
call DisableTrigger(udg_trigger299)
call ExecuteFunc("Func0035")
call ExecuteFunc("Func0037")
call FogEnableOff()
call FogMaskEnableOff()
call TriggerSleepAction(5.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,40.,"|cff808000Thank you for playing Undead Assault II. You can save your experience by typing \"-save\". You can load your experience by typing \"-load <code>\".")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,40.,"If you enjoy playing Undead Assault II, consider joining our community at: |cff408080https://discord.gg/ZF8vE2W")
endfunction
function Func1619 takes nothing returns boolean
return(udg_boolean01)
endfunction
function Func1620 takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(udg_trigger216)
call DisableTrigger(udg_trigger209)
call DisableTrigger(udg_trigger214)
endfunction
function Func1622 takes nothing returns nothing
if(((GetOwningPlayer(GetEnumUnit())==Player(24))and(GetEnumUnit()!=udg_unit18)))then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function Func1623 takes nothing returns nothing
call SetPlayerAllianceStateBJ(GetEnumPlayer(),Player(11),3)
call SetPlayerAllianceStateBJ(Player(11),GetEnumPlayer(),3)
endfunction
function Func1627 takes nothing returns nothing
local group g=Func0006(udg_rect06)
call ForGroupBJ(g,function Func1622)
call DestroyGroup(g)
call ForForce(Func0016(Player(0)),function Func1623)
call EnableTrigger(udg_trigger298)
call EnableTrigger(udg_trigger299)
call EnableTrigger(udg_trigger301)
call EnableTrigger(udg_trigger300)
call EnableTrigger(udg_trigger231)
call ReplaceUnitBJ(udg_unit21,'h005',2)
call IssueImmediateOrderById(bj_lastReplacedUnit,851993)
call ReplaceUnitBJ(udg_unit19,'h005',2)
call IssueImmediateOrderById(bj_lastReplacedUnit,851993)
call ReplaceUnitBJ(udg_unit20,'h005',2)
call IssueImmediateOrderById(bj_lastReplacedUnit,851993)
call TriggerSleepAction(GetRandomReal(60.,300.))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cff808000SOCOM:|r Bravo Company was ambushed and is heading towards your sector for assistance before we can evacuate them. Meet up with the marines and bring them to the LZ.")
call PlaySoundBJ(udg_sound88)
call CreateQuestBJ(0,"Current Objective","Bravo Company's convoy was ambushed by an overwhelming number of hostiles recently and was destroyed. A few marines survived the attack, however we cannot afford to send aircraft to look for them as we now need our helicopters to ferry supplies to replace those that have been lost. Therefore, we have redirected the survivors to your sector, where the task of escorting them through the hostile area to their extraction point falls to you.","ReplaceableTextures\\CommandButtons\\BTNSelectHeroOn.blp")
set udg_quest01=bj_lastCreatedQuest
call TriggerSleepAction(GetRandomReal(30.,90.))
call PlaySoundBJ(udg_sound05)
if(((GetRandomInt(1,2)==1)))then
set udg_location02=GetRandomLocInRect(udg_rect96)
call CreateNUnitsAtLoc(1,'h00F',Player(11),udg_location02,.0)
call RemoveLocation(udg_location02)
set udg_location02=GetRectCenter(udg_rect90)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851986,udg_location02)
call RemoveLocation(udg_location02)
set udg_unit03=bj_lastCreatedUnit
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=4
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect97)
set udg_location03=Func0002(udg_location02,GetRandomReal(50.,200.),180.)
call CreateNUnitsAtLoc(1,'h009',Player(11),udg_location02,180.)
call GroupAddUnit(udg_group07,bj_lastCreatedUnit)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
call SetUnitLifePercentBJ(bj_lastCreatedUnit,GetRandomReal(40.,90.))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851986,udg_location03)
call RemoveLocation(udg_location02)
call RemoveLocation(udg_location03)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_integer13=1
set udg_location02=GetRectCenter(udg_rect90)
call PingMinimapLocForForce(bj_FORCE_ALL_PLAYERS,udg_location02,10.)
call RemoveLocation(udg_location02)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cff808000SOCOM:|r The soldiers have arrived. Lead them to the LZ.")
call PlaySoundBJ(udg_sound88)
loop
exitwhen(((RectContainsUnit(udg_rect90,udg_unit03))))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,1))
endloop
call SetUnitFlyHeight(udg_unit03,.0,200.)
else
set udg_location02=GetRandomLocInRect(udg_rect96)
call CreateNUnitsAtLoc(1,'h00F',Player(11),udg_location02,.0)
call RemoveLocation(udg_location02)
set udg_unit03=bj_lastCreatedUnit
set udg_location02=GetRectCenter(udg_rect92)
call IssuePointOrderByIdLoc(udg_unit03,851986,udg_location02)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=4
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect95)
set udg_location03=Func0002(udg_location02,GetRandomReal(50.,200.),90.)
call CreateNUnitsAtLoc(1,'h009',Player(11),udg_location02,90.)
call GroupAddUnit(udg_group07,bj_lastCreatedUnit)
call SetUnitLifePercentBJ(bj_lastCreatedUnit,GetRandomReal(45.,95.))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851986,udg_location03)
call RemoveLocation(udg_location02)
call RemoveLocation(udg_location03)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_integer13=3
call PingMinimapLocForForce(bj_FORCE_ALL_PLAYERS,GetRectCenter(udg_rect92),10.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cff808000SOCOM:|r The soldiers have arrived. Lead them to the LZ.")
call PlaySoundBJ(udg_sound88)
loop
exitwhen(((RectContainsUnit(udg_rect92,udg_unit03))))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,1))
endloop
call SetUnitFlyHeight(udg_unit03,.0,200.)
endif
call TriggerSleepAction(300.)
call EnableTrigger(udg_trigger215)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cff808000SOCOM:|r We've got multiple hostiles heading towards your position. The situation is worse than we expected, so be careful.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(1800.)
call EnableTrigger(udg_trigger216)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cff808000SOCOM:|r Recon has picked up even more hostiles closing in on your location. It's going to get ugly, so we'll drop some supplies at an LZ.")
call PlaySoundBJ(udg_sound88)
call TriggerSleepAction(30.)
set udg_location02=GetRectCenter(udg_rect93)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,udg_location02,15.,2,50.,50.,80.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateItemLoc('I00F',udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateItemLoc('I00D',udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateItemLoc('I004',udg_location02)
call CreateItemLoc('I003',udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateItemLoc('I006',udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateItemLoc('I005',udg_location02)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call RemoveLocation(udg_location02)
set g=null
endfunction
function Func1630 takes nothing returns nothing
set udg_location02=GetUnitLoc(GetEnteringUnit())
set udg_location03=GetRectCenter(udg_rect90)
if(((udg_integer13==1)and(DistanceBetweenPoints(udg_location02,udg_location03)<=1200.)and(IsUnitInGroup(GetEnteringUnit(),udg_group07))))then
set udg_integers10[1]=(udg_integers10[1]+1)
call GroupRemoveUnit(udg_group07,GetEnteringUnit())
call RemoveUnit(GetEnteringUnit())
call Func0233(7.,"Marine extracted")
endif
call RemoveLocation(udg_location03)
set udg_location03=GetRectCenter(udg_rect92)
if(((udg_integer13==3)and(DistanceBetweenPoints(udg_location02,udg_location03)<=1200.)and(IsUnitInGroup(GetEnteringUnit(),udg_group07))))then
set udg_integers10[1]=(udg_integers10[1]+1)
call GroupRemoveUnit(udg_group07,GetEnteringUnit())
call RemoveUnit(GetEnteringUnit())
call Func0233(7.,"Marine extracted")
endif
call RemoveLocation(udg_location02)
endfunction
function Func1631 takes nothing returns boolean
return(IsUnitInGroup(GetDyingUnit(),udg_group07))
endfunction
function Func1632 takes nothing returns nothing
call GroupRemoveUnit(udg_group07,GetDyingUnit())
set udg_integers10[2]=(udg_integers10[2]+1)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000A marine has been killed.")
endfunction
function Func1633 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1635 takes nothing returns nothing
call UnitShareVisionBJ(false,udg_unit03,GetEnumPlayer())
endfunction
function Func1637 takes nothing returns nothing
call UnitShareVisionBJ(false,udg_unit03,GetEnumPlayer())
endfunction
function Func1639 takes nothing returns nothing
if(((udg_integers10[1]>=3)and(CountUnitsInGroup(udg_group07)==0)))then
call DisableTrigger(GetTriggeringTrigger())
call Func0233(7.,"Marines extracted")
call IssuePointOrderByIdLoc(udg_unit03,851986,GetRandomLocInRect(udg_rect97))
call SetUnitFlyHeight(udg_unit03,500.,200.)
call TriggerSleepAction(3.)
call SetUnitFlyHeight(udg_unit03,2000.,200.)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func1637)
call TriggerSleepAction(6.)
call RemoveUnit(udg_unit03)
call QuestSetDescription(udg_quest01,"We have no outstanding tasks or missions for you at this time. Your standing orders are to focus on survival. Defend the towns, search for equipment and reinforce the sector at your own discretion.")
call ConditionalTriggerExecute(udg_trigger306)
else
if(((udg_integers10[2]>=2)))then
call DisableTrigger(GetTriggeringTrigger())
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cff808000SOCOM:|r The marines have sustained too many losses.")
call PlaySoundBJ(udg_sound88)
loop
exitwhen(((CountUnitsInGroup(udg_group07)==0)))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,.2))
endloop
call IssuePointOrderByIdLoc(udg_unit03,851986,GetRandomLocInRect(udg_rect97))
call SetUnitFlyHeight(udg_unit03,500.,200.)
call TriggerSleepAction(3.)
call SetUnitFlyHeight(udg_unit03,2000.,200.)
call ForForce(bj_FORCE_ALL_PLAYERS,function Func1635)
call TriggerSleepAction(6.)
call RemoveUnit(udg_unit03)
call QuestSetDescription(udg_quest01,"We have no outstanding tasks or missions for you at this time. Your standing orders are to focus on survival. Defend the towns, search for equipment and reinforce the sector at your own discretion.")
call ConditionalTriggerExecute(udg_trigger306)
else
return
endif
endif
endfunction
function Func1640 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1641 takes nothing returns nothing
call UnitShareVisionBJ(true,udg_unit04,GetEnumPlayer())
endfunction
function Func1642 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Func1643 takes nothing returns nothing
set udg_integer05=14
call VXSleep(GetRandomReal(180.,300.))
set udg_location02=GetRectCenter(udg_rect111)
call CreateNUnitsAtLoc(1,'h00B',Player(24),udg_location02,180.)
call RemoveLocation(udg_location02)
call IssueImmediateOrderById(bj_lastCreatedUnit,851993)
set udg_unit04=bj_lastCreatedUnit
call ForForce(Func0015(MAP_CONTROL_USER),function Func1641)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect111)
call CreateNUnitsAtLoc(1,'n008',Player(24),udg_location02,180.)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group08,bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect111)
call CreateNUnitsAtLoc(1,'n007',Player(24),GetRandomLocInRect(udg_rect111),180.)
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group08,bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call VXSleep(2.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Some civilians fleeing the area around Boston are passing through your sector. With most hostiles focused on you, they should be fine on their own if you stay clear of their route. Nonetheless, keep an eye on them and be ready to move in if necessary.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"Survivors from the Boston area are being transported to our Forward Operations post in Sector A. We have already dispatched a commando unit to escort them and they should be able to handle the mission by themselves. Still, be prepared to rush to their aid if necessary. If nothing else, ensure that the APC makes it through to Sector A and return to your defenses afterwards.")
call VXSleep(5.)
call CreateNUnitsAtLoc(1,'h00A',Player(11),GetRandomLocInRect(udg_rect113),GetRandomReal(0,360))
call UnitAddItemByIdSwapped('I00A',bj_lastCreatedUnit)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
set udg_units02[1]=bj_lastCreatedUnit
call UnitAddAbility(bj_lastCreatedUnit,'Amrf')
call UnitRemoveAbility(bj_lastCreatedUnit,'Amrf')
call UnitAddAbility(bj_lastCreatedUnit,'A04P')
call SetUnitFlyHeight(bj_lastCreatedUnit,800.,9999999.)
call TriggerSleepAction(.1)
call SetUnitFlyHeight(udg_units02[1],.0,100.)
call PauseUnit(udg_units02[1],true)
call SetUnitInvulnerable(udg_units02[1],true)
call TriggerSleepAction(GetRandomReal(.0,1.))
call CreateNUnitsAtLoc(1,'h00E',Player(11),GetRandomLocInRect(udg_rect113),GetRandomReal(0,360))
call UnitAddItemByIdSwapped('I01A',bj_lastCreatedUnit)
set udg_units02[2]=bj_lastCreatedUnit
call UnitAddAbility(bj_lastCreatedUnit,'Amrf')
call UnitRemoveAbility(bj_lastCreatedUnit,'Amrf')
call UnitAddAbility(bj_lastCreatedUnit,'A04P')
call SetUnitFlyHeight(bj_lastCreatedUnit,800.,9999999.)
call TriggerSleepAction(.1)
call SetUnitFlyHeight(udg_units02[2],.0,100.)
call PauseUnit(udg_units02[2],true)
call SetUnitInvulnerable(udg_units02[2],true)
call VXSleep(8.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PauseUnit(udg_units02[bj_forLoopAIndex],false)
call SetUnitInvulnerable(udg_units02[bj_forLoopAIndex],false)
call UnitRemoveAbility(udg_units02[bj_forLoopAIndex],'A04P')
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(30.)
call EnableTrigger(udg_trigger308)
set udg_integer15=CountUnitsInGroup(udg_group08)
call ForGroupBJ(udg_group08,function Func1642)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000The civilians are leaving.")
endfunction
function Func1644 takes nothing returns boolean
return(GetDyingUnit()==udg_unit04)
endfunction
function Func1645 takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r The civilians have been killed.")
call PlaySoundBJ(udg_sound88)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetUnitFlyHeight(udg_units02[bj_forLoopAIndex],1500.,125.)
call PauseUnit(udg_units02[bj_forLoopAIndex],true)
call SetUnitInvulnerable(udg_units02[bj_forLoopAIndex],true)
call UnitAddAbility(udg_units02[bj_forLoopAIndex],'A04P')
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call VXSleep(9.)
call RemoveUnit(udg_units02[1])
call RemoveUnit(udg_units02[2])
call ConditionalTriggerExecute(udg_trigger310)
endfunction
function Func1648 takes nothing returns nothing
set udg_location02=GetUnitLoc(udg_unit04)
set udg_location03=GetRectCenter(udg_rects03[udg_integer05])
if(((udg_integer05!=21)and(DistanceBetweenPoints(udg_location02,udg_location03)<=600.)))then
set udg_integer05=(udg_integer05+1)
endif
call RemoveLocation(udg_location02)
call RemoveLocation(udg_location03)
set udg_location02=GetRectCenter(udg_rects03[udg_integer05])
call IssuePointOrderByIdLoc(udg_unit04,851986,udg_location02)
call RemoveLocation(udg_location02)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetUnitLoc(udg_unit04)
set udg_location03=GetUnitLoc(udg_units02[bj_forLoopAIndex])
if(((DistanceBetweenPoints(udg_location02,udg_location03)<=650.)))then
call RemoveLocation(udg_location02)
call RemoveLocation(udg_location03)
set udg_location03=GetUnitLoc(udg_unit04)
set udg_location02=OffsetLocation(udg_location03,GetRandomReal(-150.,150.),GetRandomReal(-150.,150.))
call IssuePointOrderByIdLoc(udg_units02[bj_forLoopAIndex],851983,udg_location02)
call SetUnitMoveSpeed(udg_units02[bj_forLoopAIndex],GetUnitDefaultMoveSpeed(udg_units02[bj_forLoopAIndex]))
call RemoveLocation(udg_location02)
call RemoveLocation(udg_location03)
else
call RemoveLocation(udg_location02)
call RemoveLocation(udg_location03)
set udg_location03=GetUnitLoc(udg_unit04)
set udg_location02=OffsetLocation(udg_location03,GetRandomReal(-150.,150.),GetRandomReal(-150.,150.))
call IssuePointOrderByIdLoc(udg_units02[bj_forLoopAIndex],851986,udg_location02)
call SetUnitMoveSpeed(udg_units02[bj_forLoopAIndex],290.)
call RemoveLocation(udg_location02)
call RemoveLocation(udg_location03)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func1649 takes nothing returns boolean
return(udg_unit04==GetEnteringUnit())and(udg_boolean01==false)
endfunction
function Func1650 takes nothing returns nothing
call RemoveUnit(GetEnteringUnit())
call QuestSetDescription(udg_quest01,"We have no outstanding tasks or missions for you at this time. Your standing orders are to focus on survival. Defend the towns, search for equipment and reinforce the sector at your own discretion.")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,("|cff808000Civilians extracted. "+I2S((udg_integer15*5*(udg_integer16+1)))+" XP awarded to all players."))
call PlaySoundBJ(udg_sound88)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_integers04[bj_forLoopAIndex]=(udg_integers04[bj_forLoopAIndex]+(udg_integer15*5*(udg_integer16+1)))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call UnitAddAbility(udg_units02[bj_forLoopAIndex],'A04P')
call SetUnitFlyHeight(udg_units02[bj_forLoopAIndex],1500.,125.)
call PauseUnit(udg_units02[bj_forLoopAIndex],true)
call SetUnitInvulnerable(udg_units02[bj_forLoopAIndex],true)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call VXSleep(7.)
call RemoveUnit(udg_units02[1])
call RemoveUnit(udg_units02[2])
call ConditionalTriggerExecute(udg_trigger310)
endfunction
function Func1651 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1659 takes nothing returns nothing
if(((GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_PLAYING)and(IsUnitDeadBJ(udg_units01[(1+GetPlayerId(GetEnumPlayer()))]))))then
set udg_location02=GetRandomLocInRect(udg_rect26)
call PingMinimapLocForForceEx(CreatePlayerForce(GetEnumPlayer()),udg_location02,8.,2,50.,100,50.)
call DisplayTimedTextToForce(CreatePlayerForce(GetEnumPlayer()),15.,"Reinforcements have arrived.")
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'h009',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
if(((GetRandomInt(1,2)==1)))then
call CreateNUnitsAtLoc(1,'h00E',GetEnumPlayer(),udg_location02,.0)
else
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'h017',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
if(((GetRandomInt(1,2)==1)))then
if(((GetRandomInt(1,4)==1)))then
if(((GetRandomInt(1,2)==1)))then
call CreateNUnitsAtLoc(1,'h01D',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
call CreateNUnitsAtLoc(1,'h00A',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
endif
else
call CreateNUnitsAtLoc(1,'h01E',GetEnumPlayer(),udg_location02,.0)
endif
else
call CreateNUnitsAtLoc(1,'h00V',GetEnumPlayer(),udg_location02,.0)
endif
endif
endif
endif
call UnitAddItemByIdSwapped('I004',bj_lastCreatedUnit)
call RemoveLocation(udg_location02)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
endif
endfunction
function Func1665 takes nothing returns nothing
call ForForce(Func0015(MAP_CONTROL_USER),function Func1659)
call TriggerSleepAction(GetRandomReal(120.,300.))
if(((GetRandomInt(1,2)==1)))then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Minerva has been spotted heading towards your sector. Eradicate this threat at your earliest opportunity.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"Satellite surveillance has revealed a Minerva-Grade infested organism not far from your position and it appears to be inbound. You must destroy this creature in order to maintain security in your sector.")
call CreateNUnitsAtLoc(1,'n00G',Player(27),GetRandomLocInRect(udg_rect97),GetRandomReal(0,360))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,851983,GetUnitLoc(GroupPickRandomUnit(UAUnitGroupFromPlayer(ForcePickRandomPlayer(Func0017(Player(27)))))))
set udg_unit02=bj_lastCreatedUnit
loop
exitwhen(((IsUnitDeadBJ(udg_unit02))))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,1))
endloop
call QuestSetDescription(udg_quest01,"We have no outstanding tasks or missions for you at this time. Your standing orders are to focus on survival. Defend the towns, search for equipment and reinforce the sector at your own discretion.")
call PlaySoundBJ(udg_sound56)
call TriggerSleepAction(2)
if(((udg_boolean01)))then
return
endif
call Func0233(35.,"Minerva slain")
call ConditionalTriggerExecute(udg_trigger311)
else
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location02=GetRandomLocInRect(udg_rect124)
call CreateNUnitsAtLoc(1,'n00H',Player(27),udg_location02,GetRandomReal(0,360))
call RemoveLocation(udg_location02)
call GroupAddUnit(udg_group06,bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(3.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Spores have erected in your sector. Destroy them at your earliest opportunity.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"Satellites show that several Spore Colonies have emerged in your sector. While the colonies themselves are not an immediate threat, their presence contributes to the instability of the area. These pests must be eradicated before they can cause any real damage. We're experiencing technical difficulties with our satellite uplink, so you will have to find the Spore Colonies on your own.")
loop
exitwhen(((IsUnitGroupDeadBJ(udg_group06))))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,3.))
endloop
call QuestSetDescription(udg_quest01,"We have no outstanding tasks or missions for you at this time. Your standing orders are to focus on survival. Defend the towns, search for equipment and reinforce the sector at your own discretion.")
if(((udg_boolean01)))then
return
endif
call ConditionalTriggerExecute(udg_trigger311)
call Func0233(35.,"Spores purged")
endif
endfunction
function Func1666 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1674 takes nothing returns nothing
if(((GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_PLAYING)and(IsUnitDeadBJ(udg_units01[(1+GetPlayerId(GetEnumPlayer()))]))))then
set udg_location02=GetRandomLocInRect(udg_rect26)
call PingMinimapLocForForceEx(CreatePlayerForce(GetEnumPlayer()),udg_location02,8.,2,50.,100,50.)
call DisplayTimedTextToForce(CreatePlayerForce(GetEnumPlayer()),15.,"Reinforcements have arrived.")
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'h009',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
if(((GetRandomInt(1,2)==1)))then
call CreateNUnitsAtLoc(1,'h00E',GetEnumPlayer(),udg_location02,.0)
else
if(((GetRandomInt(1,3)==1)))then
call CreateNUnitsAtLoc(1,'h017',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
if(((GetRandomInt(1,2)==1)))then
if(((GetRandomInt(1,4)==1)))then
if(((GetRandomInt(1,2)==1)))then
call CreateNUnitsAtLoc(1,'h01D',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
else
call CreateNUnitsAtLoc(1,'h00A',GetEnumPlayer(),udg_location02,.0)
call GroupAddUnit(udg_group17,bj_lastCreatedUnit)
endif
else
call CreateNUnitsAtLoc(1,'h01E',GetEnumPlayer(),udg_location02,.0)
endif
else
call CreateNUnitsAtLoc(1,'h00V',GetEnumPlayer(),udg_location02,.0)
endif
endif
endif
endif
call UnitAddItemByIdSwapped('I004',bj_lastCreatedUnit)
call RemoveLocation(udg_location02)
call TriggerRegisterUnitEvent(udg_trigger68,bj_lastCreatedUnit,EVENT_UNIT_DAMAGED)
endif
endfunction
function Func1675 takes nothing returns nothing
call SetPlayerTechResearchedSwap('R00F',1,GetEnumPlayer())
endfunction
function Func1678 takes nothing returns nothing
call VXSleep(20.)
call ForForce(Func0015(MAP_CONTROL_USER),function Func1674)
call TriggerSleepAction(GetRandomReal(60.,90.))
call ForForce(bj_FORCE_ALL_PLAYERS,function Func1675)
call TriggerSleepAction(GetRandomReal(180.,300.))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Multiple Artemis have been spotted moving towards your sector. Be prepared for their arrival.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"Numerous Artemis-Grade infected organisms have been spotted near your location and appear to be heading towards the two towns. We suggest that you neutralize them before they arrive, or they will undoubtedly destroy the towns' defenses.")
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'n00F',Player(27),GetRandomLocInRect(udg_rect97),GetRandomReal(0,360))
call Func0200(bj_lastCreatedUnit)
call GroupAddUnit(udg_group09,bj_lastCreatedUnit)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
loop
exitwhen(((IsUnitGroupDeadBJ(udg_group09))))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,1))
endloop
call QuestSetDescription(udg_quest01,"We have no outstanding tasks or missions for you at this time. Your standing orders are to focus on survival. Defend the towns, search for equipment and reinforce the sector at your own discretion.")
call ConditionalTriggerExecute(udg_trigger312)
call PlaySoundBJ(udg_sound56)
call TriggerSleepAction(2)
if(((udg_boolean01)))then
return
endif
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000All Artemis killed. "+I2S(35*(udg_integer16+1))+" XP awarded to all players.")
call PlaySoundBJ(udg_sound88)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_integers04[bj_forLoopAIndex]=(udg_integers04[bj_forLoopAIndex]+(35*(udg_integer16+1)))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func1679 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function Func1682 takes nothing returns nothing
call TriggerSleepAction(GetRandomReal(240.,300.))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cff808000SOCOM:|r Recon reports that a Darreus accompanied by a Metasis are both moving in on your sector. Eliminate Darreus and be prepared to take down the Metasis as well.")
call PlaySoundBJ(udg_sound88)
call QuestSetDescription(udg_quest01,"Kill Darreus.")
call CreateNUnitsAtLoc(1,'u005',Player(27),GetRandomLocInRect(udg_rect97),GetRandomReal(0,360))
call Func0200(bj_lastCreatedUnit)
set udg_unit05=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'u008',Player(27),GetRandomLocInRect(udg_rect97),GetRandomReal(0,360))
call Func0200(bj_lastCreatedUnit)
loop
exitwhen(((IsUnitDeadBJ(udg_unit05))))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,1))
endloop
call QuestSetDescription(udg_quest01,"We have no outstanding tasks or missions for you at this time. Your standing orders are to focus on survival. Defend the towns, search for equipment and reinforce the sector at your own discretion.")
call PlaySoundBJ(udg_sound56)
call TriggerSleepAction(2)
if(((udg_boolean01)))then
return
endif
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff808000Darreus killed. "+I2S(55*(udg_integer16+1))+" XP awarded to all players.")
call PlaySoundBJ(udg_sound88)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=11
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_integers04[bj_forLoopAIndex]=(udg_integers04[bj_forLoopAIndex]+(55*(udg_integer16+1)))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Func1685 takes nothing returns nothing
if GetOwningPlayer(GetEnumUnit())==Player(24)and GetEnumUnit()!=udg_unit18 then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function Func1686 takes nothing returns nothing
call SetPlayerAllianceStateBJ(GetEnumPlayer(),Player(26),3)
call SetPlayerAllianceStateBJ(Player(26),GetEnumPlayer(),3)
call SetPlayerAllianceStateBJ(GetEnumPlayer(),Player(11),0)
call SetPlayerAllianceStateBJ(Player(11),GetEnumPlayer(),0)
endfunction
function Func1687 takes nothing returns nothing
local location loc_location01=GetRectCenter(udg_rect18)
local location loc_location02=GetRectCenter(udg_rect90)
local location loc_location03=GetRectCenter(udg_rect25)
local location temploc
local unit loc_unit01
local unit array loc_units01
local group loc_group01=CreateGroup()
local rect array loc_rects01
local integer loc_integer01=1
local integer loc_integer02=1
local unit loc_unit02
local unit loc_unit03
local group g
set loc_rects01[1]=udg_rect112
set loc_rects01[2]=udg_rect111
set udg_unit13=CreateUnit(Player(24),'h01C',GetLocationX(loc_location01),GetLocationY(loc_location01),.0)
set g=Func0006(udg_rect06)
call ForGroupBJ(g,function Func1685)
call DestroyGroup(g)
call ForForce(Func0016(Player(0)),function Func1686)
call SetPlayerAllianceStateBJ(Player(24),Player(26),3)
call SetPlayerAllianceStateBJ(Player(26),Player(24),3)
call SetPlayerAllianceStateBJ(Player(11),Player(26),0)
call SetPlayerAllianceStateBJ(Player(26),Player(11),0)
call EnableTrigger(udg_trigger321)
call EnableTrigger(udg_trigger319)
call EnableTrigger(udg_trigger323)
call EnableTrigger(udg_trigger23)
call EnableTrigger(udg_trigger24)
call EnableTrigger(udg_trigger25)
call RemoveUnit(udg_unit19)
call RemoveUnit(udg_unit20)
call RemoveUnit(udg_unit21)
call SetPlayerName(Player(11),"|cff808000Umbrella|r")
call SetPlayerName(Player(26),"|cff808000USMC|r")
call TriggerExecute(udg_trigger169)
call VXSleep(GetRandomReal(10.,15.))
call UMBMessageToAll(10.,"|cff808000SOCOM:|r Patrol the area for anything unusual and shoot the infected on sight. We need this sector secure for use of its roadways in the future.")
call VXSleep(GetRandomReal(115.,115.))
call UAUMBSpawnSquad(1)
if udg_integer24>=7 then
call UAUMBSpawnSquad(1)
endif
call UMBMessageToAll(10.,"|cff808000Unknown:|r This is Umbrella, we're here to take over your operations in this sector.")
call VXSleep(12.)
call UMBMessageToAll(10.,"|cff808000Marine:|r You have nothing to do with our operations. Let us handle it.")
call VXSleep(12.)
call UMBMessageToAll(10.,"|cff808000Umbrella Officer:|r We cannot do that, we have strict orders to hold this sector and remove all USMC threats.")
call VXSleep(12.)
call UMBMessageToAll(10.,"|cff808000Marine:|r Excuse me? Threats? You're under governmental control and our job is to keep the population safe.")
call VXSleep(16.)
call UMBMessageToAll(10.,"|cff808000Umbrella Officer:|r We will take the sector by force if necessary. Drop your weapons and surrender now or you will be shot on sight.")
call VXSleep(12.)
call UMBMessageToAll(10.,"|cff808000Battallion:|r The Umbrella Corporation is attempting to intervene in some of our operations and you cannot lose the sector to them. You are authorized to use deadly force. All squad leaders give SITREP and standby, over.")
call VXSleep(15.)
call UMBMessageToAll(10.,"|cff808000SOCOM:|r The Umbrella special forces units are trained extensively. We recommend deploying field cameras around the sector to monitor enemy movement.")
call VXSleep(12.)
call UMBMessageToAll(10.,"|cff408080HINT|r - Umbrella will use laser-guided weaponry against you. Be on your guard for glowing red dots at your feet.")
call VXSleep(24.)
call UMBMessageToAll(10.,"|cff408080HINT|r - Whenever you engage or are engaged by Umbrella, prone (hotkey |cffffcc00ZE|r) immediately. This makes it harder for them to hit you along with boosting your own attacks, greatly increasing your chances of survival.")
call VXSleep(18.)
call UMBMessageToAll(10.,"|cff408080HINT|r - Be sure not to stand too close to your squad members. Umbrella loves killing multiple soldiers with one explosive.")
call VXSleep(8.)
if udg_boolean01 then
return
endif
set udg_quest01=CreateQuestBJ(0,"Current Objective","Hold off Umbrella soldiers, patrol the roads and await further orders.","ReplaceableTextures\\CommandButtons\\BTNSelectHeroOn.blp")
call VXSleep(GetRandomReal(60.,90.))
call UAUMBSpawnSquad(1)
call VXSleep(1.)
if udg_integer24>=5 then
call UAUMBSpawnSquad(6)
endif
call VXSleep(10.)
call UMBMessageToAll(10.,"|cff808000SOCOM:|r It will be difficult for them to find you if there is no contact. If they spot you, all of their squads will be alerted to your position.")
call VXSleep(GetRandomReal(120.,240.))
if udg_boolean01 then
return
endif
call UAUMBSpawnSquad(1)
call VXSleep(GetRandomReal(20.,40.))
call UAUMBSpawnSquad(1)
call VXSleep(10.)
call UAUMBSpawnSquad(6)
call VXSleep(15.)
call UAUMBSpawnSquad(1)
call VXSleep(30.)
if udg_integer24>=10 and udg_integer23>15000 then
call UAUMBSpawnSquad(1)
endif
call VXSleep(10.)
call UAUMBSpawnSquad(1)
call VXSleep(GetRandomReal(90.,120.))
if udg_boolean01 then
return
endif
call UMBMessageToAll(10.,"|cff808000Battallion:|r Be advised, some sort of bioweapon has been detected around Sector C and is spreading to nearby sectors. It has the appearance of a thick, black fog.")
call VXSleep(8.)
call UMBMessageToAll(10.,"|cff808000SOCOM:|r Normally the biosphere cleanup processes would clear it, but the city power generator has been shut down by Umbrella. The controls have been jammed and the only way to turn the generator back on is to fully recharge it with batteries.")
call VXSleep(GetRandomReal(5.,15.))
call SetDayNightModels("","")
call VXSleep(5.)
call UMBMessageToAll(10.,"|cff808000SOCOM:|r We'll drop batteries off at the southwest LZ. Bring them to the power generator outside of the northern town.")
call VXSleep(20.)
if udg_boolean01 then
return
endif
call UMBMessageToAll(10.,"|cff808000Umbrella Officer:|r You cannot win. This is your last chance to surrender.")
call UAUMBSpawnSquad(5)
call VXSleep(12.)
call UAUMBSpawnSquad(7)
call VXSleep(12.)
if udg_boolean01 then
return
endif
call StartSound(udg_sound20)
if udg_integer24>=8 and udg_integer23>15000 then
call UAUMBSpawnSquad(6)
endif
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,loc_location01,8.,2,100,30.,30.)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,loc_location02,8.,2,100,30.,30.)
call CreateItemLoc('I00I',loc_location02)
call CreateItemLoc('I00I',loc_location02)
call CreateItemLoc('I00I',loc_location02)
call CreateItemLoc('I00I',loc_location02)
call CreateItemLoc('I00I',loc_location02)
call QuestSetDescription(udg_quest01,"A bioweapon has leaked into your sector and is disrupting your vision. Umbrella has shut down the city power generator so it cannot activate the biosphere cleanup process. Retrieve batteries from the southwest town to bring the north generator back online.")
loop
exitwhen GetUnitState(udg_unit13,UNIT_STATE_MANA)>=1000
call VXSleep(.5)
endloop
if udg_boolean01 then
return
endif
call UAUMBSpawnSquad(1)
call VXSleep(2.)
if udg_boolean01 then
return
endif
call UMBMessageToAll(10.,"|cff808000SOCOM:|r It will take a few moments for the systems to restart. Hunker down and wait until you regain visibility.")
call VXSleep(90.)
if udg_boolean01 then
return
endif
call UAUMBSpawnSquad(1)
call VXSleep(5.)
if udg_integer24>=8 and udg_integer23>15000 then
call UAUMBSpawnSquad(6)
endif
call VXSleep(5.)
if udg_integer24>=6 and udg_integer23>12000 then
call UAUMBSpawnSquad(7)
endif
call VXSleep(20.)
call UAUMBSpawnSquad(5)
call VXSleep(20.)
if udg_boolean01 then
return
endif
call StopSound(udg_sound20,true,true)
call StartSound(udg_sound83)
call SetDayNightModels("Environment\\DNC\\DNCAshenvale\\DNCAshenvaleTerrain\\DNCAshenvaleTerrain.mdl","Environment\\DNC\\DNCAshenvale\\DNCAshenvaleUnit\\DNCAshenvaleUnit.mdl")
call Func0233(42.5,"Power restored")
call QuestSetDescription(udg_quest01,"Await further orders. You should focus on survival as well as cleaning Umbrella out of the sector. Fanning the area for equipment is suggested.")
call VXSleep(60.)
call UAUMBSpawnSquad(6)
call VXSleep(1.)
if udg_integer24>=8 and udg_integer23>15000 then
call UAUMBSpawnSquad(1)
endif
call VXSleep(1.)
call UAUMBSpawnSquad(1)
call VXSleep(120.)
if udg_boolean01 then
return
endif
if udg_integer24>=6 and udg_integer23>15000 then
call UAUMBSpawnSquad(2)
endif
if udg_integer24>=8 and udg_integer23>35000 then
call VXSleep(20.)
call UAUMBSpawnSquad(8)
endif
call VXSleep(20.)
call UAUMBSpawnSquad(1)
call VXSleep(5.)
call UAUMBSpawnSquad(1)
call VXSleep(5.)
if udg_integer24>=6 and udg_integer23>20000 then
call UAUMBSpawnSquad(7)
endif
call VXSleep(5.)
call UAUMBSpawnSquad(1)
call VXSleep(5.)
if udg_integer24>=4 and udg_integer23>10000 then
call UAUMBSpawnSquad(5)
endif
call VXSleep(90.)
call UAUMBSpawnSquad(1)
call VXSleep(5.)
call UAUMBSpawnSquad(6)
call VXSleep(240.)
if udg_boolean01 then
return
endif
call UMBMessageToAll(10.,"|cff808000Battallion:|r Umbrella is attempting to take control of your sector and is sending soldiers to lock down key checkpoints. Sattelite Reconnaissance has picked up these spots and will ping them on your digital map.")
call VXSleep(5.)
call UMBMessageToAll(10.,"|cff808000Battallion:|r Your sector contains essential roads for supply lines and links our base of operations to other units in nearby sectors. We cannot afford to lose this sector to them. Eliminate the guards within |cff80800010|r minutes and await further orders.")
call QuestSetDescription(udg_quest01,"Eliminate all Umbrella guards within |cff80800010|r minutes and await further orders.")
call StartSound(udg_sound118)
call TriggerExecute(udg_trigger315)
call VXSleep(8.)
call UAUMBSpawnSquad(2)
set loc_integer01=1
loop
exitwhen IsUnitGroupDeadBJ(udg_group29)or loc_integer01>=120
call VXSleep(5.)
set loc_integer02=1
loop
exitwhen udg_rects09[loc_integer02]==null
set loc_location01=GetRectCenter(udg_rects09[loc_integer02])
call PingMinimapForForceEx(bj_FORCE_ALL_PLAYERS,GetLocationX(loc_location01),GetLocationY(loc_location01),1.,0,100.,.0,.0)
call RemoveLocation(loc_location01)
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=loc_integer01+1
endloop
if loc_integer01>=120 then
call Func0233(-10,"Umbrella checkpoints not destroyed in the alotted time")
else
call Func0233(42.5,"Umbrella checkpoints destroyed")
endif
call VXSleep(10.)
call UAUMBSpawnSquad(1)
call VXSleep(10.)
call UAUMBSpawnSquad(1)
call VXSleep(10.)
call UAUMBSpawnSquad(6)
call VXSleep(90.)
if udg_boolean01 then
return
endif
call StartSound(udg_sound19)
set loc_unit03=CreateUnit(Player(25),'n00U',15500.1030,1030.,0.)
call GroupAddUnit(loc_group01,loc_unit03)
call Func0200(loc_unit03)
set loc_unit03=null
set loc_unit03=CreateUnit(Player(25),'n00V',15500.1030,1030.,0.)
call GroupAddUnit(loc_group01,loc_unit03)
call Func0200(loc_unit03)
set loc_unit03=null
set loc_unit03=CreateUnit(Player(25),'u00C',15500.1030,1030.,0.)
call Func0200(loc_unit03)
set loc_unit03=null
set loc_unit03=CreateUnit(Player(25),'u00C',15500.1030,1030.,0.)
call Func0200(loc_unit03)
set loc_unit03=null
set loc_unit03=CreateUnit(Player(25),'u00C',15500.1030,1030.,0.)
call Func0200(loc_unit03)
set loc_unit03=null
set loc_unit03=CreateUnit(Player(25),'u00C',15500.1030,1030.,0.)
call Func0200(loc_unit03)
set loc_unit03=null
call UMBMessageToAll(10.,"|cff808000Battallion:|r 2 highly evolved creatures have escaped from Sector E. We suspect they may even be synthetic after discovering a hidden Umbrella Facility in that sector as well.")
call VXSleep(6.)
call UAUMBSpawnSquad(2)
call UAUMBSpawnSquad(5)
call VXSleep(2.)
call UMBMessageToAll(10.,"|cff808000Marine:|r They better not be more of those damn dogs.")
call VXSleep(18.)
if udg_boolean01 then
return
endif
call QuestSetDescription(udg_quest01,"2 synthetic infected have escaped from Sector E, you must kill them to retain order in the sector. Lure them to Umbrella soldiers if possible.")
call UAUMBSpawnSquad(2)
loop
exitwhen IsUnitGroupDeadBJ(loc_group01)
call VXSleep(2.)
endloop
if udg_boolean01 then
return
endif
call StopSound(udg_sound19,true,true)
call StartSound(udg_sound56)
call VXSleep(2.5)
call Func0233(32.5,"Bonnie and Dolly killed")
call VXSleep(15.)
call UMBMessageToAll(10.,"|cff808000SOCOM:|r Nice work, team. Await further orders.")
call QuestSetDescription(udg_quest01,"Await further orders. You should focus on survival as well as cleaning Umbrella out of the sector. Fanning the area for equipment is suggested.")
call VXSleep(180.)
call UMBMessageToAll(10.,"|cff808000Battallion:|r Umbrella is sending heavy amounts of firepower into Sector E. We can barely even hold that sector, so we're going to fallback to yours. Be prepared for them.")
call VXSleep(10.)
call UMBMessageToAll(10.,"|cff808000Battallion:|r Easy Company is going to resupply you for what's coming. They'll be taking an APC from the south road and drop off equipment in the southwest town.")
call QuestSetDescription(udg_quest01,"Sector E is being overrun. Easy Company will resupply you from the South.")
call VXSleep(30.)
if udg_boolean01 then
return
endif
call UAUMBSpawnSquad(2)
call VXSleep(2.)
if udg_integer24>=6 and udg_integer23>15000 then
call UAUMBSpawnSquad(8)
endif
call VXSleep(2.)
call UAUMBSpawnSquad(1)
call VXSleep(2.)
if udg_integer24>=6 and udg_integer23>20000 then
call UAUMBSpawnSquad(7)
endif
call VXSleep(15.)
call UAUMBSpawnSquad(6)
call VXSleep(15.)
call UAUMBSpawnSquad(6)
call VXSleep(15.)
if udg_integer24>=6 and udg_integer23>20000 then
call UAUMBSpawnSquad(6)
endif
call VXSleep(35.)
set loc_location03=GetRectCenter(udg_rect25)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,loc_location03,8.,2,100,30.,30.)
call VXSleep(2.)
set loc_unit01=CreateUnit(Player(26),'h00B',GetLocationX(loc_location03),GetLocationY(loc_location03),90.)
set loc_units01[1]=CreateUnit(Player(26),'h009',GetLocationX(loc_location03),GetLocationY(loc_location03),90.)
set loc_units01[2]=CreateUnit(Player(26),'h009',GetLocationX(loc_location03),GetLocationY(loc_location03),90.)
set loc_units01[3]=CreateUnit(Player(26),'h009',GetLocationX(loc_location03),GetLocationY(loc_location03),90.)
call RemoveLocation(loc_location03)
loop
exitwhen RectContainsUnit(udg_rect19,loc_unit01)or IsUnitDeadBJ(loc_unit01)
call VXSleep(2.)
set loc_location03=GetRectCenter(udg_rect19)
call IssuePointOrderByIdLoc(loc_unit01,851986,loc_location03)
call RemoveLocation(loc_location03)
set loc_location03=GetUnitLoc(loc_unit01)
call IssuePointOrderByIdLoc(loc_units01[1],851983,loc_location03)
call IssuePointOrderByIdLoc(loc_units01[2],851983,loc_location03)
call IssuePointOrderByIdLoc(loc_units01[3],851983,loc_location03)
call RemoveLocation(loc_location03)
endloop
if udg_boolean01 then
return
endif
if IsUnitDeadBJ(loc_unit01)then
call Func0233(-6.4,"APC killed")
call KillUnit(loc_units01[1])
call KillUnit(loc_units01[2])
call KillUnit(loc_units01[3])
call QuestSetDescription(udg_quest01,"Sector E is being overrun. Casualties will receive evac in your sector and arrive in the east.")
else
call IssueImmediateOrderById(loc_unit01,851993)
call RemoveLocation(loc_location03)
set loc_location03=GetUnitLoc(loc_unit01)
call Func0233(14.2,"APC reached destination")
call VXSleep(.5)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I004',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I004',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I004',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I006',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I006',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I006',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I00O',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I00O',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I00W',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I00W',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I00S',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I00S',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I00S',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I00S',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I005',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I005',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I003',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I003',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I00N',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I00F',temploc)
call RemoveLocation(temploc)
set temploc=OffsetLocation(loc_location03,GetRandomReal(-250,250),GetRandomReal(-250,250))
call CreateItemLoc('I00F',temploc)
call RemoveLocation(temploc)
set temploc=null
call RemoveLocation(loc_location03)
set loc_location03=GetRectCenter(udg_rect26)
call IssuePointOrderByIdLoc(loc_unit01,851986,loc_location03)
call IssuePointOrderByIdLoc(loc_units01[1],851983,loc_location03)
call IssuePointOrderByIdLoc(loc_units01[2],851983,loc_location03)
call IssuePointOrderByIdLoc(loc_units01[3],851983,loc_location03)
call QuestSetDescription(udg_quest01,"Sector E is being overrun. Casualties will receive evac in your sector and arrive in the east. Use the equipment from Easy company to their full extent.")
loop
exitwhen RectContainsUnit(udg_rect26,loc_unit01)or IsUnitDeadBJ(loc_unit01)
call VXSleep(2.)
call IssuePointOrderByIdLoc(loc_unit01,851986,loc_location03)
call IssuePointOrderByIdLoc(loc_units01[1],851983,loc_location03)
call IssuePointOrderByIdLoc(loc_units01[2],851983,loc_location03)
call IssuePointOrderByIdLoc(loc_units01[3],851983,loc_location03)
endloop
if udg_boolean01 then
return
endif
call RemoveUnit(loc_unit01)
call RemoveUnit(loc_units01[1])
call RemoveUnit(loc_units01[2])
call RemoveUnit(loc_units01[3])
endif
set loc_unit01=null
set loc_units01[1]=null
set loc_units01[2]=null
set loc_units01[3]=null
call RemoveLocation(loc_location03)
call VXSleep(5.)
call UMBMessageToAll(10.,"|cff808000Battallion:|r Casualties are on their way.")
call VXSleep(15.)
if udg_boolean01 then
return
endif
call UMBMessageToAll(10.,"|cff808000Battallion:|r Casualties have arrived at the 2 eastern roads. Bring them to the LZ.")
call QuestSetDescription(udg_quest01,"Casualties are arriving at the 2 eastern roads and you must evacuate them to the designated LZ.")
set loc_integer01=1
loop
exitwhen loc_integer01>udg_integer24+1
set loc_location03=GetRandomLocInRect(loc_rects01[GetRandomInt(1,2)])
call CreateItemLoc('I00X',loc_location03)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,loc_location03,3.,2,30.,100.,30.)
set loc_integer01=loc_integer01+1
call RemoveLocation(loc_location03)
call VXSleep(.35)
endloop
call VXSleep(15.)
if udg_boolean01 then
return
endif
call UMBMessageToAll(10.,"|cff808000Battallion:|r Be advised that Umbrella is sending their platoons to your sector.")
call UAUMBSpawnSquad(1)
call VXSleep(3.)
if udg_integer24>=6 and udg_integer23>20000 then
call UAUMBSpawnSquad(8)
endif
call VXSleep(3.)
call UAUMBSpawnSquad(5)
call VXSleep(10.)
if udg_integer24>=8 and udg_integer23>15000 then
call UAUMBSpawnSquad(3)
endif
call VXSleep(5.)
if udg_integer24>=6 and udg_integer23>10000 then
call UAUMBSpawnSquad(4)
endif
call VXSleep(5.)
if udg_integer24>=8 and udg_integer23>15000 then
call UAUMBSpawnSquad(3)
call VXSleep(2.)
call UAUMBSpawnSquad(4)
endif
call VXSleep(15.)
if udg_integer24>=10 and udg_integer23>10000 then
call UAUMBSpawnSquad(8)
call VXSleep(2.)
call UAUMBSpawnSquad(7)
endif
call VXSleep(10.)
if udg_boolean01 then
return
endif
set udg_rect02=udg_rects07[GetRandomInt(1,5)]
set loc_location03=GetRectCenter(udg_rect02)
set loc_unit02=CreateUnit(Player(26),'h015',GetLocationX(loc_location03),GetLocationY(loc_location03),270.)
call SetUnitFlyHeight(loc_unit02,50,200)
call PauseUnit(loc_unit02,true)
call EnableTrigger(udg_trigger317)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,loc_location03,8.,2,30.,100.,30.)
call UMBMessageToAll(10.,"|cff808000Battallion:|r The evac heli has arrived. Take the corpses to the LZ marked on your digital map.")
loop
exitwhen udg_integer33>=udg_integer24+1
call VXSleep(2.)
endloop
if udg_boolean01 then
return
endif
call Func0233(49.2,"Casualties evacuated")
call VXSleep(5.)
call UMBMessageToAll(10.,"|cff808000SOCOM:|r Now they can receive proper funerals. Await further orders.")
call QuestSetDescription(udg_quest01,"Await further orders. You should focus on survival as well as cleaning Umbrella out of the sector. Fanning the area for equipment is suggested.")
call SetUnitFlyHeight(loc_unit02,1500,300)
call PauseUnit(loc_unit02,false)
call VXSleep(.2)
call RemoveLocation(loc_location03)
set loc_location03=GetRandomLocInRect(udg_rect96)
call IssuePointOrderByIdLoc(loc_unit02,851986,loc_location03)
call VXSleep(5.)
call RemoveUnit(loc_unit02)
set loc_unit02=null
call VXSleep(90.)
if udg_boolean01 then
return
endif
call UAUMBSpawnSquad(1)
call VXSleep(1.)
call UAUMBSpawnSquad(1)
call VXSleep(20.)
if udg_integer24>=8 and udg_integer23>10000 then
call UAUMBSpawnSquad(1)
endif
call VXSleep(4.)
if udg_integer24>=8 and udg_integer23>10000 then
call UAUMBSpawnSquad(2)
endif
if udg_integer24>=8 and udg_integer23>15000 then
call UAUMBSpawnSquad(3)
call VXSleep(2.)
call UAUMBSpawnSquad(4)
endif
call VXSleep(120.)
call UAUMBSpawnSquad(1)
call VXSleep(1.)
call UAUMBSpawnSquad(1)
call VXSleep(1.)
call UAUMBSpawnSquad(2)
call VXSleep(20.)
call UAUMBSpawnSquad(5)
call VXSleep(90.)
if udg_boolean01 then
return
endif
call UMBMessageToAll(10.,"|cff808000SOCOM:|r Umbrella is flooding out of Sector E and Bravo Company is on their way to aid you. Secure the southwest town and get ready, it's about to turn into a war zone over there.")
call VXSleep(30.)
set udg_boolean17=true
call VXSleep(30.)
if udg_boolean01 then
return
endif
call RemoveLocation(loc_location03)
set loc_location03=GetRectCenter(udg_rect26)
set loc_integer01=1
loop
exitwhen loc_integer01>12
set loc_unit03=CreateUnit(Player(26),'h009',GetLocationX(loc_location03),GetLocationY(loc_location03),.0)
call GroupAddUnit(udg_group26,loc_unit03)
set loc_unit03=null
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>4
set loc_unit03=CreateUnit(Player(26),'h00E',GetLocationX(loc_location03),GetLocationY(loc_location03),.0)
call GroupAddUnit(udg_group26,loc_unit03)
set loc_unit03=null
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>3
set loc_unit03=CreateUnit(Player(26),'h00V',GetLocationX(loc_location03),GetLocationY(loc_location03),.0)
call GroupAddUnit(udg_group26,loc_unit03)
set loc_unit03=null
set loc_unit03=CreateUnit(Player(26),'h00A',GetLocationX(loc_location03),GetLocationY(loc_location03),.0)
call GroupAddUnit(udg_group26,loc_unit03)
set loc_unit03=null
set loc_unit03=CreateUnit(Player(26),'h019',GetLocationX(loc_location03),GetLocationY(loc_location03),.0)
call GroupAddUnit(udg_group26,loc_unit03)
set loc_unit03=null
set loc_integer01=loc_integer01+1
endloop
set loc_unit03=CreateUnit(Player(26),'h00G',GetLocationX(loc_location03),GetLocationY(loc_location03),.0)
call GroupAddUnit(udg_group26,loc_unit03)
set loc_unit03=null
set loc_unit03=CreateUnit(Player(26),'h00G',GetLocationX(loc_location03),GetLocationY(loc_location03),.0)
call GroupAddUnit(udg_group26,loc_unit03)
set loc_unit03=null
set loc_unit03=CreateUnit(Player(26),'h01B',GetLocationX(loc_location03),GetLocationY(loc_location03),.0)
call GroupAddUnit(udg_group26,loc_unit03)
set loc_unit03=null
set loc_integer01=1
loop
exitwhen loc_integer01>3
set loc_unit03=CreateUnit(Player(26),'h01E',GetLocationX(loc_location03),GetLocationY(loc_location03),.0)
call GroupAddUnit(udg_group26,loc_unit03)
set loc_unit03=null
set loc_integer01=loc_integer01+1
endloop
call RemoveLocation(loc_location03)
set udg_locations04[1]=GetRectCenter(udg_rect08)
set udg_locations04[2]=GetRectCenter(udg_rect09)
set udg_locations04[3]=GetRectCenter(udg_rect10)
set udg_locations04[4]=GetRectCenter(udg_rect11)
set udg_locations04[5]=GetRectCenter(udg_rect12)
set udg_locations04[6]=GetRectCenter(udg_rect13)
call EnableTrigger(udg_trigger318)
call VXSleep(8.)
call UMBMessageToAll(10.,"|cff808000SOCOM:|r Reconnaissance has picked up Umbrella platoons from Sector E moving in on your location. Destroy them and the sector will be secure.")
call QuestSetDescription(udg_quest01,"Destroy all Umbrella forces.")
call VXSleep(5.)
call UAUMBSpawnSquad(1)
call VXSleep(2.)
call UAUMBSpawnSquad(1)
call VXSleep(20.)
call UAUMBSpawnSquad(4)
call VXSleep(2.)
call DisableTrigger(udg_trigger25)
set udg_boolean31=true
call UMBMessageToAll(10.,"|cff808000SOCOM:|r We have finally hacked their Ion Cannon uplinks and deactivated them. Good luck.")
call VXSleep(5.)
call StartSound(udg_sound09)
call VXSleep(15.)
call UAUMBSpawnSquad(4)
call VXSleep(8.)
call UAUMBSpawnSquad(3)
call VXSleep(8.)
call UAUMBSpawnSquad(3)
call VXSleep(20.)
if udg_boolean01 then
return
endif
call UAUMBSpawnSquad(3)
call VXSleep(8.)
call UAUMBSpawnSquad(2)
call VXSleep(8.)
call UAUMBSpawnSquad(7)
call VXSleep(2.)
call UAUMBSpawnSquad(5)
call VXSleep(2.)
call UAUMBSpawnSquad(7)
call VXSleep(2.)
call UAUMBSpawnSquad(5)
call VXSleep(90.)
call UAUMBSpawnSquad(2)
call VXSleep(8.)
call UAUMBSpawnSquad(2)
call VXSleep(20.)
call UAUMBSpawnSquad(5)
call VXSleep(2.)
call UAUMBSpawnSquad(2)
call VXSleep(2.)
call UAUMBSpawnSquad(2)
call VXSleep(2.)
call UAUMBSpawnSquad(4)
call VXSleep(20.)
if udg_boolean01 then
return
endif
call UAUMBSpawnSquad(5)
call VXSleep(2.)
call UAUMBSpawnSquad(4)
loop
exitwhen udg_integer32==0
call VXSleep(2.)
endloop
if udg_boolean01 then
return
endif
call DisableTrigger(udg_trigger14)
call DisableTrigger(udg_trigger209)
call DisableTrigger(udg_trigger214)
call DisableTrigger(udg_trigger215)
call DisableTrigger(udg_trigger216)
call DisableTrigger(udg_trigger64)
call PauseAllUnitsBJ(true)
call ExecuteFunc("Func0035")
call ExecuteFunc("Func0037")
call FogEnableOff()
call FogMaskEnableOff()
call StartSound(udg_sound125)
call Func0233(114.2,"Umbrella forces eliminated")
call VXSleep(6.)
call UMBMessageToAll(30.,"|cff808000Thank you for playing Undead Assault II. You can save your experience by typing \"-save\". You can load your experience by typing \"-load <code>\".")
call UMBMessageToAll(30.,"If you enjoy playing Undead Assault II, consider joining our community at: |cff408080https://discord.gg/ZF8vE2W")
call StartSound(udg_sound125)
call VXSleep(46.)
call StartSound(udg_sound118)
set g=null
endfunction
function Func1688 takes nothing returns nothing
local unit loc_unit01
local integer loc_integer01=1
local integer loc_integer02=1
local location loc_location01
loop
exitwhen udg_rects09[loc_integer02]==null
set loc_integer01=1
set loc_location01=GetRectCenter(udg_rects09[loc_integer02])
call PingMinimapForForceEx(bj_FORCE_ALL_PLAYERS,GetLocationX(loc_location01),GetLocationY(loc_location01),15.,2,100.,.0,.0)
call RemoveLocation(loc_location01)
loop
exitwhen loc_integer01>GetRandomInt(2,5)
set loc_location01=GetRandomLocInRect(udg_rects09[loc_integer02])
set loc_unit01=CreateUnit(Player(11),'h009',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomReal(.0,180.))
call Func0242(loc_unit01,3)
call Func0243(loc_unit01,3)
call Func0244(loc_unit01,3)
call GroupAddUnit(udg_group29,loc_unit01)
call ActionLiftBoots(loc_unit01)
set loc_unit01=null
call RemoveLocation(loc_location01)
set loc_integer01=loc_integer01+1
endloop
set loc_integer02=loc_integer02+1
endloop
set loc_unit01=null
set loc_location01=null
endfunction
function Func1689 takes nothing returns boolean
return(GetManipulatingUnit()==udg_unit13)
endfunction
function Func1691 takes nothing returns nothing
local location loc_location01=GetUnitLoc(GetManipulatingUnit())
if(((GetItemTypeId(GetManipulatedItem())=='I00I')))then
call SetUnitManaBJ(udg_unit13,(GetUnitStateSwap(UNIT_STATE_MANA,udg_unit13)+(60.*I2R(GetItemCharges(GetManipulatedItem())))))
call RemoveItem(GetManipulatedItem())
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Items\\AIma\\AImaTarget.mdl",loc_location01))
else
call UnitRemoveItemSwapped(GetManipulatedItem(),GetManipulatingUnit())
endif
call RemoveLocation(loc_location01)
set loc_location01=null
endfunction
function Func1692 takes nothing returns nothing
local unit loc_unit01=GetEnumUnit()
if UnitHasItemOfTypeBJ(loc_unit01,'I00X')then
call RemoveItem(GetItemOfTypeFromUnitBJ(loc_unit01,'I00X'))
call Func0233(4.2,"Marine evacuated")
set udg_integer33=udg_integer33+1
endif
set loc_unit01=null
endfunction
function Func1693 takes nothing returns nothing
local group loc_group01=Func0006(udg_rect02)
call ForGroup(loc_group01,function Func1692)
call DestroyGroup(loc_group01)
set loc_group01=null
endfunction
function Func1694 takes nothing returns nothing
local group loc_group01=CreateGroup()
local unit loc_unit01
local location loc_location01
local location loc_location02
call GroupAddGroup(udg_group26,loc_group01)
loop
set loc_unit01=FirstOfGroup(loc_group01)
exitwhen loc_unit01==null
set loc_location01=GetUnitLoc(loc_unit01)
if GetUnitTypeId(loc_unit01)=='h00G'then
set loc_location02=OffsetLocation(udg_locations04[GetRandomInt(1,4)],GetRandomInt(-800,800),GetRandomInt(-800,800))
else
set loc_location02=OffsetLocation(udg_locations04[GetRandomInt(5,6)],GetRandomInt(-300,300),GetRandomInt(-300,300))
endif
if DistanceBetweenPoints(loc_location01,loc_location02)<=900 then
call IssueImmediateOrder(loc_unit01,"holdpoisition")
else
call IssuePointOrderByIdLoc(loc_unit01,851983,loc_location02)
endif
call GroupRemoveUnit(loc_group01,loc_unit01)
call VXSleep(.2)
endloop
call DestroyGroup(loc_group01)
set loc_unit01=null
call RemoveLocation(loc_location01)
set loc_location01=null
call RemoveLocation(loc_location02)
set loc_location02=null
endfunction
function Func1695 takes nothing returns boolean
return(GetPlayerController(GetOwningPlayer(GetAttacker()))==MAP_CONTROL_USER and GetOwningPlayer(GetTriggerUnit())==Player(26))or(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_USER and GetOwningPlayer(GetAttacker())==Player(26))
endfunction
function Func1696 takes nothing returns boolean
local unit loc_unit01=GetEnumUnit()
local unit loc_unit02=GetAttacker()
local location loc_location01=GetUnitLoc(loc_unit01)
local location loc_location02=GetUnitLoc(loc_unit02)
local real loc_real01=DistanceBetweenPoints(loc_location01,loc_location02)
call RemoveLocation(loc_location01)
set loc_location01=null
call RemoveLocation(loc_location02)
set loc_location02=null
set loc_unit01=null
set loc_unit02=null
return loc_real01<=4000
endfunction
function Func1697 takes nothing returns nothing
local unit loc_unit01
local unit loc_unit02=GetEnumUnit()
local location loc_location01
if udg_integer31==1 then
set loc_unit01=GetAttacker()
else
set loc_unit01=GetTriggerUnit()
endif
set loc_location01=GetUnitLoc(loc_unit01)
call IssuePointOrderByIdLoc(loc_unit02,851983,loc_location01)
set loc_unit01=null
set loc_unit02=null
call RemoveLocation(loc_location01)
set loc_location01=null
endfunction
function Func1698 takes nothing returns nothing
local unit loc_unit01=GetAttacker()
local unit loc_unit02=GetTriggerUnit()
local group loc_group01
if TimerGetRemaining(udg_timer02)<50.then
set loc_group01=UAUnitGroupFromPlayerMatching(Player(26),Condition(function Func1696))
if GetOwningPlayer(loc_unit01)==MAP_CONTROL_USER then
set udg_integer31=1
else
set udg_integer31=2
endif
call ForGroup(loc_group01,function Func1697)
call DestroyGroup(loc_group01)
if GetUnitTypeId(loc_unit01)!='h006'and GetUnitTypeId(loc_unit02)!='h006'then
set udg_integer34=GetRandomInt(7,10)
set udg_boolean19=true
set udg_unit14=loc_unit01
call TriggerExecute(udg_trigger324)
endif
endif
set udg_boolean16=true
call StartTimerBJ(udg_timer02,false,60.)
set loc_unit01=null
set loc_unit02=null
endfunction
function Func1699 takes nothing returns nothing
local unit loc_unit01=GroupPickRandomUnit(udg_groups01[GetRandomInt(1,udg_integer32)])
set udg_boolean16=false
set udg_integer34=11
set udg_boolean19=true
set udg_unit14=loc_unit01
call TriggerExecute(udg_trigger324)
set loc_unit01=null
endfunction
function UAUMBUpdate takes nothing returns nothing
local integer index=1
local integer i=0
local integer umbgroups=0
local integer j
loop
exitwhen index>=128
if IsUnitGroupDeadBJ(udg_groups01[index])then
call GroupClear(udg_groups01[index])
set i=i+1
endif
if CountUnitsInGroup(udg_groups01[index])>=1 then
if i>0 then
if bj_wantDestroyGroup==false then
set j=1
loop
exitwhen j>i
if udg_groups01[index-j]!=null then
call UADebugMessage("UAUMBUpdate: Destroy UMB Squad unit group Id: "+I2S(index-j))
call DestroyGroup(udg_groups01[index-j])
set udg_groups01[index-j]=null
endif
set j=j+1
endloop
endif
endif
set umbgroups=umbgroups+1
set i=0
endif
set index=index+1
endloop
set udg_integer32=umbgroups
call UADebugMessage("UAUMBUpdate: Active UMB unit groups: "+I2S(umbgroups))
if udg_boolean16 then
set index=1
loop
exitwhen index>=128
if(udg_groups01[index]!=null)then
call Func0245(udg_groups01[index])
set index=index+1
call VXSleep(2.)
endif
endloop
else
call Func0245(udg_groups01[GetRandomInt(1,umbgroups)])
endif
endfunction
function ActionUMBSpawn takes nothing returns nothing
local unit loc_unit01
local location loc_location01=GetRandomLocInRect(udg_rects02[GetRandomInt(1,3)])
local integer loc_integer01=1
local integer loc_integer02=1
local integer loc_integer03
loop
exitwhen loc_integer01>128
if IsUnitGroupDeadBJ(udg_groups01[loc_integer01])or IsUnitGroupEmptyBJ(udg_groups01[loc_integer01])then
set loc_integer03=loc_integer01
if bj_wantDestroyGroup==false then
call UADebugMessage("Spawn UMB:Destroy UMB Squad unit group Id: "+I2S(loc_integer03))
call DestroyGroup(udg_groups01[loc_integer03])
set udg_groups01[loc_integer03]=null
endif
call UADebugMessage("Spawn UMB:New UMB Squad unit group Id: "+I2S(loc_integer03))
set udg_groups01[loc_integer03]=CreateGroup()
exitwhen 1==1
endif
set loc_integer01=loc_integer01+1
endloop
if udg_integer31==1 then
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(1,3)
set loc_unit01=CreateUnit(Player(11),'h009',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call Func0242(loc_unit01,3)
call Func0243(loc_unit01,3)
call Func0244(loc_unit01,5)
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0251(loc_unit01)
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
set loc_unit01=null
endloop
set loc_unit01=CreateUnit(Player(11),'h019',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call Func0242(loc_unit01,4)
call Func0243(loc_unit01,3)
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer02=loc_integer02+1
if loc_integer02<GetRandomInt(3,4)then
set loc_unit01=CreateUnit(Player(11),'h00V',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
set loc_unit01=null
set loc_integer02=loc_integer02+1
endif
call Func0245(udg_groups01[loc_integer03])
if GetRandomInt(1,3)==1 then
call UMBMessageToAll(5.,"|cff808000SOCOM: A small squad of Umbrella soldiers has entered your sector.")
endif
endif
if udg_integer31==2 then
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(5,8)
set loc_unit01=CreateUnit(Player(11),'h009',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call Func0242(loc_unit01,2)
call Func0243(loc_unit01,3)
call Func0244(loc_unit01,5)
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(1,2)
set loc_unit01=CreateUnit(Player(11),'h019',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call Func0242(loc_unit01,3)
call Func0243(loc_unit01,3)
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(0,2)
set loc_unit01=CreateUnit(Player(11),'h00V',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(1,2)
set loc_unit01=CreateUnit(Player(11),'h017',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0243(loc_unit01,3)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(1,2)
set loc_unit01=CreateUnit(Player(11),'h01D',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call Func0242(loc_unit01,3)
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0243(loc_unit01,3)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(1,2)
set loc_unit01=CreateUnit(Player(11),'h01E',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0243(loc_unit01,3)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(1,2)
set loc_unit01=CreateUnit(Player(11),'h00A',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0243(loc_unit01,1)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(2,3)
set loc_unit01=CreateUnit(Player(11),'h00E',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0243(loc_unit01,3)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
call Func0245(udg_groups01[loc_integer03])
if GetRandomInt(1,3)!=1 then
call UMBMessageToAll(5.,"|cff808000SOCOM: A large squad of Umbrella soldiers has entered your sector.")
endif
endif
if udg_integer31==3 then
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(3,7)
set loc_unit01=CreateUnit(Player(11),'h009',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call Func0242(loc_unit01,2)
call Func0244(loc_unit01,5)
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(1,2)
set loc_unit01=CreateUnit(Player(11),'h019',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call Func0242(loc_unit01,3)
call Func0243(loc_unit01,3)
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(0,2)
set loc_unit01=CreateUnit(Player(11),'h00V',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(2,4)
set loc_unit01=CreateUnit(Player(11),'h017',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0243(loc_unit01,3)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(1,2)
set loc_unit01=CreateUnit(Player(11),'h00A',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0243(loc_unit01,1)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(0,2)
set loc_unit01=CreateUnit(Player(11),'h00E',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0243(loc_unit01,3)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(1,2)
set loc_unit01=CreateUnit(Player(11),'h00G',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
call Func0245(udg_groups01[loc_integer03])
if GetRandomInt(1,3)!=1 then
call UMBMessageToAll(5.,"|cff808000SOCOM: A large squad of Umbrella soldiers has entered your sector. They have tanks with them.")
endif
endif
if udg_integer31==4 then
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(2,5)
set loc_unit01=CreateUnit(Player(11),'h009',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call Func0242(loc_unit01,2)
call Func0243(loc_unit01,3)
call Func0244(loc_unit01,5)
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(1,2)
set loc_unit01=CreateUnit(Player(11),'h019',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call Func0242(loc_unit01,3)
call Func0243(loc_unit01,3)
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(1,2)
set loc_unit01=CreateUnit(Player(11),'h017',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0243(loc_unit01,3)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(1,2)
set loc_unit01=CreateUnit(Player(11),'h01A',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(1,2)
set loc_unit01=CreateUnit(Player(11),'h01B',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0243(loc_unit01,2)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
call Func0245(udg_groups01[loc_integer03])
if GetRandomInt(1,2)==1 then
call UMBMessageToAll(5.,"|cff808000SOCOM: A squad of Umbrella soldiers has entered your sector. They have helicopters with them.")
endif
endif
if udg_integer31==5 then
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(5,8)
set loc_unit01=CreateUnit(Player(11),'h009',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call Func0242(loc_unit01,3)
call Func0243(loc_unit01,3)
call Func0244(loc_unit01,5)
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(3,4)
set loc_unit01=CreateUnit(Player(11),'h019',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call Func0242(loc_unit01,3)
call Func0243(loc_unit01,3)
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(1,2)
set loc_unit01=CreateUnit(Player(11),'h00A',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0243(loc_unit01,1)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
call Func0245(udg_groups01[loc_integer03])
if GetRandomInt(1,3)!=1 then
call UMBMessageToAll(5.,"|cff808000SOCOM: A large squad of Umbrella soldiers has entered your sector.")
endif
endif
if udg_integer31==6 then
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(2,4)
set loc_unit01=CreateUnit(Player(11),'h00V',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_unit01=CreateUnit(Player(11),'h019',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call Func0242(loc_unit01,4)
call Func0243(loc_unit01,3)
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer02=loc_integer02+1
call Func0245(udg_groups01[loc_integer03])
if GetRandomInt(1,2)==1 then
call UMBMessageToAll(5.,"|cff808000SOCOM: A small squad of Umbrella soldiers has entered your sector.")
endif
endif
if udg_integer31==7 then
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(2,4)
set loc_unit01=CreateUnit(Player(11),'h01E',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0243(loc_unit01,3)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_unit01=CreateUnit(Player(11),'h019',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call Func0242(loc_unit01,4)
call Func0243(loc_unit01,3)
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer02=loc_integer02+1
call Func0245(udg_groups01[loc_integer03])
if GetRandomInt(1,3)!=1 then
call UMBMessageToAll(5.,"|cff808000SOCOM: A small squad of Umbrella Marksmen has entered your sector.")
endif
endif
if udg_integer31==8 then
set loc_integer01=1
loop
exitwhen loc_integer01>GetRandomInt(2,4)
set loc_unit01=CreateUnit(Player(11),'h01D',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call Func0242(loc_unit01,3)
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0243(loc_unit01,3)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer01=loc_integer01+1
set loc_integer02=loc_integer02+1
endloop
set loc_unit01=CreateUnit(Player(11),'h019',GetLocationX(loc_location01),GetLocationY(loc_location01),GetRandomInt(160,200))
call Func0242(loc_unit01,4)
call Func0243(loc_unit01,3)
call GroupAddUnit(udg_groups01[loc_integer03],loc_unit01)
call Func0251(loc_unit01)
set loc_unit01=null
set loc_integer02=loc_integer02+1
call Func0245(udg_groups01[loc_integer03])
if GetRandomInt(1,3)!=1 then
call UMBMessageToAll(5.,"|cff808000SOCOM: A small squad of Umbrella Assaultmen has entered your sector.")
endif
endif
call RemoveLocation(loc_location01)
set loc_location01=null
endfunction
function Func1702 takes nothing returns boolean
return GetOwningPlayer(GetDyingUnit())==Player(26)and GetRandomInt(1,2)==1
endfunction
function Func1703 takes nothing returns boolean
return IsUnitAliveBJ(GetFilterUnit())and GetOwningPlayer(GetFilterUnit())==Player(26)
endfunction
function Func1704 takes nothing returns nothing
local unit loc_unit01=GetDyingUnit()
local location loc_location01=GetUnitLoc(loc_unit01)
local group loc_group01=UAUnitGroupWithinRangeOfLocMatching(1400.,loc_location01,Condition(function Func1703))
local unit loc_unit02=FirstOfGroup(loc_group01)
set udg_boolean19=false
set udg_unit14=loc_unit02
set udg_integer34=GetRandomInt(6,7)
call TriggerExecute(udg_trigger324)
call DestroyGroup(loc_group01)
set loc_unit01=null
set loc_unit02=null
call RemoveLocation(loc_location01)
set loc_location01=null
endfunction
function Func1705 takes nothing returns boolean
return IsUnitAlly(udg_unit14,GetOwningPlayer(GetFilterUnit()))and IsUnitAliveBJ(GetFilterUnit())
endfunction
function Func1706 takes nothing returns nothing
local unit loc_unit01=udg_unit14
local location loc_location01=GetUnitLoc(loc_unit01)
local integer loc_integer01=udg_integer34
local boolean loc_boolean01=udg_boolean19
local group loc_group01=UAUnitGroupWithinRangeOfLocMatching(1800.,loc_location01,Condition(function Func1705))
local unit loc_unit02=GroupPickRandomUnit(loc_group01)
local sound loc_sound01
if loc_unit01==null or IsUnitDeadBJ(loc_unit01)then
return
endif
loop
exitwhen udg_boolean18==false
call VXSleep(.8)
endloop
set udg_boolean18=true
set loc_sound01=udg_sounds05[GetRandomInt(1,2)]
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
call VXSleep(GetSoundDurationBJ(loc_sound01))
set loc_sound01=udg_sounds07[loc_integer01]
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
call VXSleep(GetSoundDurationBJ(loc_sound01))
set loc_sound01=udg_sounds06[GetRandomInt(1,3)]
call PlaySoundAtUnitLoc(loc_sound01,loc_unit01)
call VXSleep(GetSoundDurationBJ(loc_sound01))
if loc_boolean01 and loc_unit01!=loc_unit02 and IsUnitAliveBJ(loc_unit02)then
set loc_sound01=udg_sounds05[GetRandomInt(1,2)]
call PlaySoundAtUnitLoc(loc_sound01,loc_unit02)
call VXSleep(GetSoundDurationBJ(loc_sound01))
set loc_sound01=udg_sounds07[GetRandomInt(1,2)]
call PlaySoundAtUnitLoc(loc_sound01,loc_unit02)
call VXSleep(GetSoundDurationBJ(loc_sound01))
set loc_sound01=udg_sounds06[GetRandomInt(1,3)]
call PlaySoundAtUnitLoc(loc_sound01,loc_unit02)
call VXSleep(GetSoundDurationBJ(loc_sound01))
endif
set udg_boolean18=false
call DestroyGroup(loc_group01)
set loc_unit01=null
set loc_unit02=null
call RemoveLocation(loc_location01)
set loc_location01=null
set loc_sound01=null
set loc_group01=null
endfunction
function Func1707 takes nothing returns nothing
call SetPlayerHandicapXPBJ(GetEnumPlayer(),180.)
endfunction
function Func1714 takes nothing returns nothing
set udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]=(udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]+40)
endfunction
function Func1715 takes nothing returns nothing
set udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]=(udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]+75)
endfunction
function Func1717 takes nothing returns nothing
set udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]=(udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]+75)
endfunction
function Func1718 takes nothing returns nothing
set udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]=(udg_integers04[(1+GetPlayerId(GetEnumPlayer()))]+40)
endfunction
function Func1722 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1725 takes nothing returns nothing
call UnitShareVisionBJ(true,bj_lastCreatedUnit,GetEnumPlayer())
endfunction
function Func1795 takes nothing returns nothing
set udg_real05=5
set udg_rect03=Func0027()
set udg_boolean21=true
endfunction
function Func1796 takes nothing returns nothing
local timer loc_timer01=GetExpiredTimer()
call PauseTimer(loc_timer01)
call DestroyTimer(loc_timer01)
call DestroyLightning(udg_lightning01)
endfunction
function Func1797 takes nothing returns nothing
local timer loc_timer01=CreateTimer()
call TimerStart(loc_timer01,udg_real05-.01,true,function Func1796)
endfunction
function UAAMHS takes nothing returns nothing
/*
local fogmodifier loc_fogmodifier01=null
local integer loc_integer01=1
local integer loc_integer02
local boolean loc_boolean01
local unit loc_unit01
local real loc_real01
local real loc_real02
local string loc_string01
local player array loc_players01
local integer loc_integer03=0
local integer loc_integer04
local string loc_string02
local integer loc_integer05
loop
exitwhen loc_integer01>12
if GetPlayerSlotState(Player(loc_integer01-1))==PLAYER_SLOT_STATE_PLAYING then
if IsVisibleToPlayer(udg_real06,udg_real07,Player(loc_integer01-1))then
set loc_fogmodifier01=CreateFogModifierRect(Player(loc_integer01-1),FOG_OF_WAR_MASKED,udg_rect03,true,false)
endif
set udg_lightning01=AddLightning("AMHS",true,udg_real06,udg_real07,udg_real06,udg_real07)
if loc_fogmodifier01!=null then
call DestroyFogModifier(loc_fogmodifier01)
endif
call ExecuteFunc("Func1797")
endif
set loc_integer01=loc_integer01+1
endloop
set loc_integer01=0
*/
endfunction
function Func1799 takes nothing returns nothing
set udg_lightning01=null
set udg_real05=0
call RemoveRect(udg_rect03)
set udg_boolean21=false
set udg_real06=0
set udg_real07=0
endfunction
function Func1800 takes nothing returns nothing
set udg_timer03=CreateTimer()
if udg_boolean24 and udg_boolean21 then
call ExecuteFunc("Func1799")
else
call ExecuteFunc("Func1795")
set udg_real06=GetRectMinX(udg_rect03)+1.5
set udg_real07=GetRectMinY(udg_rect03)+1.5
call TimerStart(udg_timer03,udg_real05,true,function UAAMHS)
endif
endfunction
function Func1801 takes nothing returns nothing
if udg_boolean20!=true then
call ExecuteFunc("Func1800")
else
call ExecuteFunc("Func1799")
endif
endfunction
function Func1802 takes nothing returns nothing
set udg_real08=2.29
set udg_rect04=Func0028()
set udg_integer37=20
set udg_boolean22=false
set udg_integer35='h01H'
endfunction
function Func1803 takes nothing returns nothing
local integer loc_integer01=1
local integer loc_integer02=1
local boolean loc_boolean01
local unit loc_unit01
local real loc_real01
local real loc_real02
local fogmodifier loc_fogmodifier01
if udg_boolean22 then
set loc_boolean01=false
loop
exitwhen loc_integer01>udg_integer36
set loc_fogmodifier01=CreateFogModifierRect(udg_players01[loc_integer01-1],FOG_OF_WAR_VISIBLE,udg_rect04,true,false)
set udg_unit15=CreateUnit(Player(27),udg_integer35,udg_real09,udg_real10,0)
call UnitApplyTimedLife(udg_unit15,udg_integer35,.02)
if IsUnitVisible(udg_unit15,udg_players01[loc_integer01-1])==false then
set udg_unit16=CreateUnit(Player(27),udg_integer35,udg_real09,udg_real10,0)
call UnitApplyTimedLife(udg_unit16,udg_integer35,.02)
call IssueTargetOrderById(udg_unit15,851983,udg_unit16)
set udg_unit16=null
else
loop
exitwhen loc_integer02>udg_integer37
set loc_real01=GetRandomReal(GetRectMinX(bj_mapInitialPlayableArea),GetRectMaxX(bj_mapInitialPlayableArea))
set loc_real02=GetRandomReal(GetRectMinY(bj_mapInitialPlayableArea),GetRectMaxY(bj_mapInitialPlayableArea))
set udg_unit15=CreateUnit(Player(27),udg_integer35,loc_real01,loc_real02,0)
call UnitApplyTimedLife(udg_unit15,udg_integer35,.02)
if IsUnitVisible(udg_unit15,udg_players01[loc_integer01-1])==false then
set loc_boolean01=true
set loc_integer02=udg_integer37+1
set udg_unit16=CreateUnit(Player(27),udg_integer35,loc_real01,loc_real02,0)
call UnitApplyTimedLife(udg_unit16,udg_integer35,.02)
endif
set udg_unit15=null
set udg_unit16=null
set loc_integer02=loc_integer02+1
endloop
if loc_boolean01 then
call IssueTargetOrderById(udg_unit15,851983,udg_unit16)
endif
call DestroyFogModifier(loc_fogmodifier01)
set loc_fogmodifier01=null
endif
set udg_unit15=null
set loc_integer01=loc_integer01+1
endloop
else
set loc_integer01=1
set loc_boolean01=false
loop
exitwhen loc_integer01>12
set loc_fogmodifier01=CreateFogModifierRect(Player(loc_integer01-1),FOG_OF_WAR_VISIBLE,udg_rect04,true,false)
set udg_unit15=CreateUnit(Player(27),udg_integer35,udg_real09,udg_real10,0)
call UnitApplyTimedLife(udg_unit15,udg_integer35,.02)
if IsUnitVisible(udg_unit15,Player(loc_integer01-1))==false then
set udg_unit16=CreateUnit(Player(27),udg_integer35,udg_real09,udg_real10,0)
call IssueTargetOrderById(udg_unit15,851983,udg_unit16)
call UnitApplyTimedLife(udg_unit16,udg_integer35,.02)
else
loop
exitwhen loc_integer02>udg_integer37
set loc_real01=GetRandomReal(GetRectMinX(bj_mapInitialPlayableArea),GetRectMaxX(bj_mapInitialPlayableArea))
set loc_real02=GetRandomReal(GetRectMinY(bj_mapInitialPlayableArea),GetRectMaxY(bj_mapInitialPlayableArea))
set udg_unit15=CreateUnit(Player(27),udg_integer35,loc_real01,loc_real02,0)
call UnitApplyTimedLife(udg_unit15,udg_integer35,.02)
if IsUnitVisible(udg_unit15,Player(loc_integer01-1))==false then
set loc_boolean01=true
set loc_integer02=udg_integer37+1
set udg_unit16=CreateUnit(Player(27),udg_integer35,loc_real01,loc_real02,0)
call UnitApplyTimedLife(udg_unit16,udg_integer35,.02)
endif
set udg_unit15=null
set udg_unit16=null
set loc_integer02=loc_integer02+1
endloop
if loc_boolean01 then
call IssueTargetOrderById(udg_unit15,851983,udg_unit16)
endif
call DestroyFogModifier(loc_fogmodifier01)
endif
set loc_integer01=loc_integer01+1
endloop
endif
endfunction
function Func1804 takes nothing returns nothing
set udg_real09=0
set udg_real10=0
set udg_real08=0
call RemoveRect(udg_rect03)
set udg_boolean22=false
endfunction
function Func1805 takes nothing returns nothing
local string loc_string01
local integer loc_integer01=1
local integer loc_integer02=0
local integer loc_integer03
local string loc_string02
set udg_timer04=CreateTimer()
call ExecuteFunc("Func1802")
set udg_real09=GetRectMinX(udg_rect04)+1.5
set udg_real10=GetRectMinY(udg_rect04)+1.5
set loc_string01=Func0026()
if udg_boolean22 then
set loc_string01=loc_string01+";"
set loc_integer03=0
loop
set loc_string02=SubString(loc_string01,loc_integer02,loc_integer02+1)
exitwhen(loc_string02=="")or(loc_string02==null)
if(loc_string02==";")then
set udg_players01[loc_integer01-1]=Player(S2I(SubString(loc_string01,loc_integer03,loc_integer02)))
set loc_integer01=loc_integer01+1
set loc_integer03=loc_integer02+1
endif
set loc_integer02=loc_integer02+1
endloop
set udg_integer36=loc_integer01
endif
call TimerStart(udg_timer04,udg_real08,true,function Func1803)
endfunction
function Func1806 takes nothing returns nothing
if udg_boolean20!=true then
call ExecuteFunc("Func1805")
else
call ExecuteFunc("Func1804")
endif
endfunction
function Func1807 takes nothing returns nothing
call ExecuteFunc("Func1801")
call ExecuteFunc("Func1806")
endfunction
function Func1808 takes nothing returns nothing
call ExecuteFunc("")
endfunction
function main2 takes nothing returns nothing
local weathereffect loc_weathereffect01
local destructable loc_destructable01
local trigger loc_trigger01
local real loc_real01
local integer loc_integer01
local player loc_player01
local unit loc_unit01
local integer loc_integer02
local integer loc_integer03
local integer loc_integer04
local version loc_version01
local integer loc_integer05
local integer loc_integer06
call SetCameraBounds(-15616.+GetCameraMargin(CAMERA_MARGIN_LEFT),-15872.+GetCameraMargin(CAMERA_MARGIN_BOTTOM),15616.-GetCameraMargin(CAMERA_MARGIN_RIGHT),15360.-GetCameraMargin(CAMERA_MARGIN_TOP),-15616.+GetCameraMargin(CAMERA_MARGIN_LEFT),15360.-GetCameraMargin(CAMERA_MARGIN_TOP),15616.-GetCameraMargin(CAMERA_MARGIN_RIGHT),-15872.+GetCameraMargin(CAMERA_MARGIN_BOTTOM))
call SetDayNightModels("Environment\\DNC\\DNCAshenvale\\DNCAshenvaleTerrain\\DNCAshenvaleTerrain.mdl","Environment\\DNC\\DNCAshenvale\\DNCAshenvaleUnit\\DNCAshenvaleUnit.mdl")
call SetTerrainFogEx(0,350.,4000.,.25,.118,.118,.118)
call NewSoundEnvironment("psychotic")
call SetAmbientDaySound("DalaranRuinsDay")
call SetAmbientNightSound("DalaranRuinsNight")
call SetMapMusic("Music",true,0)
set udg_sound01=CreateSound("Sound\\Ambient\\WindLoopStereo.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound01,"AmbientSoundTestWind")
call SetSoundDuration(udg_sound01,11036)
call SetSoundVolume(udg_sound01,80)
set udg_sound02=CreateSound("Sound\\Ambient\\BattleNetWindStereoLoop1.wav",true,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound02,"GlueScreenBnetWind")
call SetSoundDuration(udg_sound02,19783)
call SetSoundVolume(udg_sound02,127)
set udg_sound03=CreateSound("Sound\\Ambient\\RainAmbience.wav",true,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound03,"AmbientSoundRain")
call SetSoundDuration(udg_sound03,4418)
call SetSoundVolume(udg_sound03,127)
set udg_sound04=CreateSound("Sound\\Ambient\\UndeadGlueScreenLoop1.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound04,"UndeadGlueScreenLoop")
call SetSoundDuration(udg_sound04,7291)
call SetSoundVolume(udg_sound04,127)
set udg_sound05=CreateSound("Sound\\Interface\\Hint.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound05,"Hint")
call SetSoundDuration(udg_sound05,2006)
call SetSoundVolume(udg_sound05,100)
set udg_sound06=CreateSound("war3mapImported\\Autoshotgun.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound06,713)
call SetSoundChannel(udg_sound06,0)
call SetSoundVolume(udg_sound06,127)
call SetSoundPitch(udg_sound06,1.)
call SetSoundDistances(udg_sound06,600.,10000.)
call SetSoundDistanceCutoff(udg_sound06,3000.)
call SetSoundConeAngles(udg_sound06,.0,.0,127)
call SetSoundConeOrientation(udg_sound06,.0,.0,.0)
set udg_sound07=CreateSound("war3mapImported\\Autoshotgun.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound07,713)
call SetSoundChannel(udg_sound07,0)
call SetSoundVolume(udg_sound07,127)
call SetSoundPitch(udg_sound07,1.)
call SetSoundDistances(udg_sound07,600.,10000.)
call SetSoundDistanceCutoff(udg_sound07,3000.)
call SetSoundConeAngles(udg_sound07,.0,.0,127)
call SetSoundConeOrientation(udg_sound07,.0,.0,.0)
set udg_sound08=CreateSound("war3mapImported\\Autoshotgun.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound08,713)
call SetSoundChannel(udg_sound08,0)
call SetSoundVolume(udg_sound08,127)
call SetSoundPitch(udg_sound08,1.)
call SetSoundDistances(udg_sound08,600.,10000.)
call SetSoundDistanceCutoff(udg_sound08,3000.)
call SetSoundConeAngles(udg_sound08,.0,.0,127)
call SetSoundConeOrientation(udg_sound08,.0,.0,.0)
set udg_sound09=CreateSound("Sound\\Music\\mp3Music\\War3XMainScreen.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound09,80162)
call SetSoundChannel(udg_sound09,0)
call SetSoundVolume(udg_sound09,127)
call SetSoundPitch(udg_sound09,1.)
set udg_sound10=CreateSound("Sound\\Music\\mp3Music\\Mainscreen.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound10,69177)
call SetSoundChannel(udg_sound10,0)
call SetSoundVolume(udg_sound10,127)
call SetSoundPitch(udg_sound10,1.)
set udg_sound11=CreateSound("Sound\\Music\\mp3Music\\DarkAgents.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound11,64950)
call SetSoundChannel(udg_sound11,0)
call SetSoundVolume(udg_sound11,127)
call SetSoundPitch(udg_sound11,1.)
set udg_sound12=CreateSound("Abilities\\Spells\\NightElf\\Taunt\\Taunt.wav",false,true,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound12,"Taunt")
call SetSoundDuration(udg_sound12,757)
set udg_sound13=CreateSound("Units\\Undead\\ObsidianStatue\\ObsidianStatueMorph.wav",false,false,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound13,"ObsidianStatueMorph")
call SetSoundDuration(udg_sound13,3384)
set udg_sound14=CreateSound("Abilities\\Spells\\Orc\\Voodoo\\BigBadVoodooSpellBirth1.wav",false,false,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound14,"VoodooBirth")
call SetSoundDuration(udg_sound14,3442)
set udg_sound15=CreateSound("Sound\\Interface\\BattleNetTick.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound15,"ChatroomTimerTick")
call SetSoundDuration(udg_sound15,476)
call SetSoundVolume(udg_sound15,50)
set udg_sound16=CreateSound("war3mapImported\\bulletchain2.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound16,1288)
call SetSoundChannel(udg_sound16,0)
call SetSoundVolume(udg_sound16,127)
call SetSoundPitch(udg_sound16,1.)
call SetSoundDistances(udg_sound16,600.,10000.)
call SetSoundDistanceCutoff(udg_sound16,3000.)
call SetSoundConeAngles(udg_sound16,.0,.0,127)
call SetSoundConeOrientation(udg_sound16,.0,.0,.0)
set udg_sound17=CreateSound("war3mapImported\\ClipEmpty2.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound17,67)
call SetSoundChannel(udg_sound17,0)
call SetSoundVolume(udg_sound17,127)
call SetSoundPitch(udg_sound17,1.)
call SetSoundDistances(udg_sound17,600.,10000.)
call SetSoundDistanceCutoff(udg_sound17,3000.)
call SetSoundConeAngles(udg_sound17,.0,.0,127)
call SetSoundConeOrientation(udg_sound17,.0,.0,.0)
set udg_sound18=CreateSound("war3mapImported\\ArtExplodeW.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound18,1254)
call SetSoundChannel(udg_sound18,0)
call SetSoundVolume(udg_sound18,100)
call SetSoundPitch(udg_sound18,1.)
call SetSoundDistances(udg_sound18,1750.,10000.)
call SetSoundDistanceCutoff(udg_sound18,4000.)
call SetSoundConeAngles(udg_sound18,.0,.0,127)
call SetSoundConeOrientation(udg_sound18,.0,.0,.0)
set udg_sound19=CreateSound("Sound\\Music\\mp3Music\\Undead2.mp3",true,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound19,309242)
call SetSoundChannel(udg_sound19,0)
call SetSoundVolume(udg_sound19,127)
call SetSoundPitch(udg_sound19,1.)
set udg_sound20=CreateSound("Sound\\Music\\mp3Music\\Undead3.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound20,291071)
call SetSoundChannel(udg_sound20,0)
call SetSoundVolume(udg_sound20,127)
call SetSoundPitch(udg_sound20,1.)
set udg_sound21=CreateSound("war3mapImported\\diebuzzC.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound21,2985)
call SetSoundChannel(udg_sound21,0)
call SetSoundVolume(udg_sound21,127)
call SetSoundPitch(udg_sound21,1.)
call SetSoundDistances(udg_sound21,1000.,10000.)
call SetSoundDistanceCutoff(udg_sound21,4000.)
call SetSoundConeAngles(udg_sound21,.0,.0,127)
call SetSoundConeOrientation(udg_sound21,.0,.0,.0)
set udg_sound22=CreateSound("war3mapImported\\DistantExplosion1.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound22,974)
call SetSoundChannel(udg_sound22,0)
call SetSoundVolume(udg_sound22,120)
call SetSoundPitch(udg_sound22,.9)
set udg_sound23=CreateSound("war3mapImported\\DistantExplosion1.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound23,974)
call SetSoundChannel(udg_sound23,0)
call SetSoundVolume(udg_sound23,122)
call SetSoundPitch(udg_sound23,1.)
set udg_sound24=CreateSound("war3mapImported\\DistantExplosion1.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound24,974)
call SetSoundChannel(udg_sound24,0)
call SetSoundVolume(udg_sound24,118)
call SetSoundPitch(udg_sound24,.9)
set udg_sound25=CreateSound("war3mapImported\\DistantExplosion1.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound25,974)
call SetSoundChannel(udg_sound25,0)
call SetSoundVolume(udg_sound25,125)
call SetSoundPitch(udg_sound25,.9)
set udg_sound26=CreateSound("war3mapImported\\DistantExplosion1.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound26,974)
call SetSoundChannel(udg_sound26,0)
call SetSoundVolume(udg_sound26,123)
call SetSoundPitch(udg_sound26,1.)
set udg_sound27=CreateSound("war3mapImported\\DistantExplosion1.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound27,974)
call SetSoundChannel(udg_sound27,0)
call SetSoundVolume(udg_sound27,119)
call SetSoundPitch(udg_sound27,1.)
set udg_sound28=CreateSound("war3mapImported\\DistantExplosion1.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound28,974)
call SetSoundChannel(udg_sound28,0)
call SetSoundVolume(udg_sound28,127)
call SetSoundPitch(udg_sound28,1.)
set udg_sound29=CreateSound("Abilities\\Spells\\Human\\Polymorph\\PolymorphTargetAir1.wav",false,false,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound29,"PolymorphAir")
call SetSoundDuration(udg_sound29,663)
call SetSoundVolume(udg_sound29,55)
call SetSoundPitch(udg_sound29,.8)
set udg_sound30=CreateSound("Abilities\\Spells\\Human\\Polymorph\\PolymorphTargetAir1.wav",false,false,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound30,"PolymorphAir")
call SetSoundDuration(udg_sound30,663)
call SetSoundVolume(udg_sound30,60)
call SetSoundPitch(udg_sound30,.8)
set udg_sound31=CreateSound("Abilities\\Spells\\Human\\Polymorph\\PolymorphDone.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound31,"PolymorphDone")
call SetSoundDuration(udg_sound31,872)
call SetSoundChannel(udg_sound31,0)
call SetSoundVolume(udg_sound31,30)
call SetSoundPitch(udg_sound31,1.2)
set udg_sound32=CreateSound("war3mapImported\\DistantHighCal.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound32,557)
call SetSoundChannel(udg_sound32,0)
call SetSoundVolume(udg_sound32,80)
call SetSoundPitch(udg_sound32,1.)
set udg_sound33=CreateSound("war3mapImported\\DistantLowCal.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound33,165)
call SetSoundChannel(udg_sound33,0)
call SetSoundVolume(udg_sound33,50)
call SetSoundPitch(udg_sound33,1.)
set udg_sound34=CreateSound("war3mapImported\\DistantLowCal2.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound34,165)
call SetSoundChannel(udg_sound34,0)
call SetSoundVolume(udg_sound34,65)
call SetSoundPitch(udg_sound34,1.)
set udg_sound35=CreateSound("war3mapImported\\DistantMediumCal.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound35,139)
call SetSoundChannel(udg_sound35,0)
call SetSoundVolume(udg_sound35,75)
call SetSoundPitch(udg_sound35,1.)
set udg_sound36=CreateSound("war3mapImported\\DistantMG.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound36,348)
call SetSoundChannel(udg_sound36,0)
call SetSoundVolume(udg_sound36,40)
call SetSoundPitch(udg_sound36,1.)
set udg_sound37=CreateSound("Sound\\Buildings\\Death\\NightElfBuildingDeathSmall1.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound37,"DeathNightElfBuildingCancel")
call SetSoundDuration(udg_sound37,3675)
call SetSoundVolume(udg_sound37,80)
call SetSoundPitch(udg_sound37,.8)
set udg_sound38=CreateSound("war3mapImported\\Grenade3 Dist.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound38,1333)
call SetSoundChannel(udg_sound38,0)
call SetSoundVolume(udg_sound38,127)
call SetSoundPitch(udg_sound38,1.)
set udg_sound39=CreateSound("war3mapImported\\Grenade3 Dist.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound39,1333)
call SetSoundChannel(udg_sound39,0)
call SetSoundVolume(udg_sound39,127)
call SetSoundPitch(udg_sound39,1.1)
set udg_sound40=CreateSound("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound40,"Resurrect")
call SetSoundDuration(udg_sound40,499)
call SetSoundChannel(udg_sound40,0)
call SetSoundDistances(udg_sound40,1000.,10000.)
call SetSoundDistanceCutoff(udg_sound40,5000.)
set udg_sound41=CreateSound("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound41,"Resurrect")
call SetSoundDuration(udg_sound41,499)
call SetSoundChannel(udg_sound41,0)
call SetSoundDistances(udg_sound41,1000.,10000.)
call SetSoundDistanceCutoff(udg_sound41,5000.)
set udg_sound42=CreateSound("Abilities\\Spells\\Human\\Slow\\SlowTarget.wav",false,true,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound42,"Slow")
call SetSoundDuration(udg_sound42,165)
call SetSoundDistances(udg_sound42,500.,10000.)
call SetSoundDistanceCutoff(udg_sound42,2000.)
set udg_sound43=CreateSound("Abilities\\Spells\\Human\\Slow\\SlowTarget.wav",false,true,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound43,"Slow")
call SetSoundDuration(udg_sound43,165)
call SetSoundDistances(udg_sound43,500.,10000.)
call SetSoundDistanceCutoff(udg_sound43,2000.)
set udg_sound44=CreateSound("war3mapImported\\Equip_Armor.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound44,1314)
call SetSoundChannel(udg_sound44,0)
call SetSoundVolume(udg_sound44,127)
call SetSoundPitch(udg_sound44,1.)
call SetSoundDistances(udg_sound44,600.,10000.)
call SetSoundDistanceCutoff(udg_sound44,3000.)
call SetSoundConeAngles(udg_sound44,.0,.0,127)
call SetSoundConeOrientation(udg_sound44,.0,.0,.0)
set udg_sound45=CreateSound("Abilities\\Spells\\NightElf\\Uproot\\Uproot.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound45,"Uproot")
call SetSoundDuration(udg_sound45,412)
call SetSoundChannel(udg_sound45,0)
call SetSoundVolume(udg_sound45,100)
set udg_sound46=CreateSound("Sound\\Interface\\GlueScreenMeteorLaunch3.wav",false,false,false,10,10,"MissilesEAX")
call SetSoundParamsFromLabel(udg_sound46,"GlueScreenMeteorLaunch")
call SetSoundDuration(udg_sound46,3000)
call SetSoundVolume(udg_sound46,127)
call SetSoundPitch(udg_sound46,.9)
set udg_sound47=CreateSound("Abilities\\Weapons\\CannonTowerMissile\\CannonTowerMissileLaunch2.wav",false,true,false,10,10,"CombatSoundsEAX")
call SetSoundParamsFromLabel(udg_sound47,"CannonTowerAttack")
call SetSoundDuration(udg_sound47,1219)
set udg_sound48=CreateSound("Abilities\\Spells\\NightElf\\Root\\Root.wav",false,true,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound48,"Root")
call SetSoundDuration(udg_sound48,482)
set udg_sound49=CreateSound("Abilities\\Spells\\NightElf\\Root\\Root.wav",false,true,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound49,"Root")
call SetSoundDuration(udg_sound49,482)
set udg_sound50=CreateSound("Abilities\\Spells\\Human\\Polymorph\\PolymorphDone.wav",false,true,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound50,"PolymorphDone")
call SetSoundDuration(udg_sound50,872)
set udg_sound51=CreateSound("Abilities\\Spells\\Human\\Polymorph\\PolymorphDone.wav",false,true,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound51,"PolymorphDone")
call SetSoundDuration(udg_sound51,872)
set udg_sound52=CreateSound("Units\\Undead\\ObsidianStatue\\ObsidianAvengerWhat1.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound52,"ObsidianDestroyerWhat")
call SetSoundDuration(udg_sound52,2519)
set udg_sound53=CreateSound("Units\\Undead\\ObsidianStatue\\ObsidianAvengerWhat2.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound53,"ObsidianDestroyerWhat")
call SetSoundDuration(udg_sound53,2647)
set udg_sound54=CreateSound("Units\\Undead\\ObsidianStatue\\ObsidianAvengerWhat3.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound54,"ObsidianDestroyerWhat")
call SetSoundDuration(udg_sound54,2682)
set udg_sound55=CreateSound("Sound\\Units\\Combat\\MetalHeavyBashMetal2.wav",false,true,false,10,10,"CombatSoundsEAX")
call SetSoundParamsFromLabel(udg_sound55,"MetalHeavyBashMetal")
call SetSoundDuration(udg_sound55,1248)
call SetSoundDistances(udg_sound55,900.,10000.)
call SetSoundDistanceCutoff(udg_sound55,3500.)
set udg_sound56=CreateSound("Sound\\Ambient\\DoodadEffects\\FlashBack1Second.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound56,"FlashBack1Second")
call SetSoundDuration(udg_sound56,2178)
call SetSoundPitch(udg_sound56,.5)
set udg_sound57=CreateSound("war3mapImported\\GrenadeLaunch1.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound57,166)
call SetSoundChannel(udg_sound57,0)
call SetSoundVolume(udg_sound57,127)
call SetSoundPitch(udg_sound57,1.)
call SetSoundDistances(udg_sound57,800.,10000.)
call SetSoundDistanceCutoff(udg_sound57,3500.)
call SetSoundConeAngles(udg_sound57,.0,.0,127)
call SetSoundConeOrientation(udg_sound57,.0,.0,.0)
set udg_sound58=CreateSound("Abilities\\Spells\\Human\\Flare\\FlareTarget1.wav",false,true,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound58,"Flare1")
call SetSoundDuration(udg_sound58,3582)
set udg_sound59=CreateSound("war3mapImported\\Heartbeat.mp3",true,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound59,687)
call SetSoundChannel(udg_sound59,0)
call SetSoundVolume(udg_sound59,127)
call SetSoundPitch(udg_sound59,1.)
set udg_sound60=CreateSound("Abilities\\Spells\\Demon\\RainOfFire\\RainOfFireTarget3.wav",false,false,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound60,"StarfallTarget")
call SetSoundDuration(udg_sound60,3000)
set udg_sound61=CreateSound("Sound\\Buildings\\Death\\BuildingDeathLargeHuman.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound61,"DeathHumanLargeBuilding")
call SetSoundDuration(udg_sound61,1493)
call SetSoundPitch(udg_sound61,.3)
set udg_sound62=CreateSound("war3mapImported\\IonCannon.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound62,1549)
call SetSoundChannel(udg_sound62,0)
call SetSoundVolume(udg_sound62,127)
call SetSoundPitch(udg_sound62,1.)
set udg_sound63=CreateSound("Sound\\Units\\Footsteps\\step.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound63,"TestFootstep")
call SetSoundDuration(udg_sound63,540)
call SetSoundVolume(udg_sound63,127)
call SetSoundDistances(udg_sound63,600.,10000.)
call SetSoundDistanceCutoff(udg_sound63,3000.)
set udg_sound64=CreateSound("Units\\NightElf\\FaerieDragon\\FaerieDragonWhat1.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound64,"FaerieDragonWhat")
call SetSoundDuration(udg_sound64,1382)
set udg_sound65=CreateSound("Units\\NightElf\\FaerieDragon\\FaerieDragonYes2.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound65,"FaerieDragonYesAttack")
call SetSoundDuration(udg_sound65,1625)
set udg_sound66=CreateSound("Units\\NightElf\\FaerieDragon\\FaerieDragonPissed1.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound66,"FaerieDragonPissed")
call SetSoundDuration(udg_sound66,3200)
set udg_sound67=CreateSound("Sound\\Buildings\\Fire\\OrcHumanLargeBuildingFire1.wav",true,false,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound67,"HumanFireLarge")
call SetSoundDuration(udg_sound67,3471)
call SetSoundPitch(udg_sound67,1.8)
set udg_sound68=CreateSound("Sound\\Interface\\GlueScreenMeteorHit1.wav",false,true,false,10,10,"MissilesEAX")
call SetSoundParamsFromLabel(udg_sound68,"GlueScreenMeteorHit")
call SetSoundDuration(udg_sound68,1500)
call SetSoundVolume(udg_sound68,127)
call SetSoundPitch(udg_sound68,.8)
call SetSoundDistances(udg_sound68,1000.,10000.)
call SetSoundDistanceCutoff(udg_sound68,5000.)
set udg_sound69=CreateSound("Sound\\Buildings\\Fire\\OrcHumanLargeBuildingFire1.wav",true,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound69,"HumanFireLarge")
call SetSoundDuration(udg_sound69,3471)
call SetSoundChannel(udg_sound69,0)
call SetSoundPitch(udg_sound69,1.8)
call SetSoundDistances(udg_sound69,800.,100000.)
call SetSoundDistanceCutoff(udg_sound69,3000.)
set udg_sound70=CreateSound("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.wav",false,true,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound70,"MassTeleport")
call SetSoundDuration(udg_sound70,4899)
call SetSoundPitch(udg_sound70,.6)
set udg_sound71=CreateSound("Abilities\\Spells\\Human\\Invisibility\\InvisibilityTarget.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound71,"Invisibility")
call SetSoundDuration(udg_sound71,440)
call SetSoundChannel(udg_sound71,0)
set udg_sound72=CreateSound("Abilities\\Spells\\Human\\Invisibility\\InvisibilityTarget.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound72,"Invisibility")
call SetSoundDuration(udg_sound72,440)
call SetSoundChannel(udg_sound72,0)
call SetSoundPitch(udg_sound72,1.)
set udg_sound73=CreateSound("war3mapImported\\nvg_off.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound73,191)
call SetSoundChannel(udg_sound73,0)
call SetSoundVolume(udg_sound73,127)
call SetSoundPitch(udg_sound73,1.)
call SetSoundDistances(udg_sound73,600.,10000.)
call SetSoundDistanceCutoff(udg_sound73,3000.)
call SetSoundConeAngles(udg_sound73,.0,.0,127)
call SetSoundConeOrientation(udg_sound73,.0,.0,.0)
set udg_sound74=CreateSound("war3mapImported\\nvg_on.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound74,348)
call SetSoundChannel(udg_sound74,0)
call SetSoundVolume(udg_sound74,127)
call SetSoundPitch(udg_sound74,1.)
call SetSoundDistances(udg_sound74,600.,10000.)
call SetSoundDistanceCutoff(udg_sound74,3000.)
call SetSoundConeAngles(udg_sound74,.0,.0,127)
call SetSoundConeOrientation(udg_sound74,.0,.0,.0)
set udg_sound75=CreateSound("war3mapImported\\Pickup2.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound75,530)
call SetSoundChannel(udg_sound75,0)
call SetSoundVolume(udg_sound75,100)
call SetSoundPitch(udg_sound75,1.)
call SetSoundDistances(udg_sound75,600.,10000.)
call SetSoundDistanceCutoff(udg_sound75,3000.)
call SetSoundConeAngles(udg_sound75,.0,.0,127)
call SetSoundConeOrientation(udg_sound75,.0,.0,.0)
set udg_sound76=CreateSound("war3mapImported\\pinpull.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound76,169)
call SetSoundChannel(udg_sound76,0)
call SetSoundVolume(udg_sound76,127)
call SetSoundPitch(udg_sound76,.8)
call SetSoundDistances(udg_sound76,600.,10000.)
call SetSoundDistanceCutoff(udg_sound76,3000.)
call SetSoundConeAngles(udg_sound76,.0,.0,127)
call SetSoundConeOrientation(udg_sound76,.0,.0,.0)
set udg_sound77=CreateSound("Abilities\\Weapons\\DruidoftheTalonMissile\\DruidOfTheTalonMissileLaunch1.wav",false,true,false,10,10,"MissilesEAX")
call SetSoundParamsFromLabel(udg_sound77,"DruidOfTheTalonMissileLaunch")
call SetSoundDuration(udg_sound77,395)
set udg_sound78=CreateSound("Abilities\\Weapons\\DruidoftheTalonMissile\\DruidOfTheTalonMissileLaunch2.wav",false,true,false,10,10,"MissilesEAX")
call SetSoundParamsFromLabel(udg_sound78,"DruidOfTheTalonMissileLaunch")
call SetSoundDuration(udg_sound78,405)
set udg_sound79=CreateSound("war3mapImported\\PlasmaRifleReload.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound79,3456)
call SetSoundChannel(udg_sound79,0)
call SetSoundVolume(udg_sound79,127)
call SetSoundPitch(udg_sound79,1.)
call SetSoundDistances(udg_sound79,900.,10000.)
call SetSoundDistanceCutoff(udg_sound79,5000.)
call SetSoundConeAngles(udg_sound79,.0,.0,127)
call SetSoundConeOrientation(udg_sound79,.0,.0,.0)
set udg_sound80=CreateSound("Abilities\\Spells\\Undead\\Impale\\ImpaleLand.wav",false,true,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound80,"ImpaleLand")
call SetSoundDuration(udg_sound80,879)
call SetSoundPitch(udg_sound80,.8)
set udg_sound81=CreateSound("Sound\\Music\\mp3Music\\UndeadVictory.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound81,39794)
call SetSoundChannel(udg_sound81,0)
call SetSoundVolume(udg_sound81,127)
call SetSoundPitch(udg_sound81,1.)
set udg_sound82=CreateSound("war3mapImported\\PointSecure.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound82,1079)
call SetSoundChannel(udg_sound82,0)
call SetSoundVolume(udg_sound82,127)
call SetSoundPitch(udg_sound82,1.)
call SetSoundDistances(udg_sound82,3000.,10000.)
call SetSoundDistanceCutoff(udg_sound82,100000.)
call SetSoundConeAngles(udg_sound82,.0,.0,127)
call SetSoundConeOrientation(udg_sound82,.0,.0,.0)
set udg_sound83=CreateSound("Abilities\\Spells\\Orc\\Reincarnation\\Reincarnation.wav",false,false,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound83,"Reincarnation")
call SetSoundDuration(udg_sound83,2728)
call SetSoundPitch(udg_sound83,.6)
set udg_sound84=CreateSound("war3mapImported\\pshield.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound84,1184)
call SetSoundChannel(udg_sound84,0)
call SetSoundVolume(udg_sound84,127)
call SetSoundPitch(udg_sound84,1.)
call SetSoundDistances(udg_sound84,600.,10000.)
call SetSoundDistanceCutoff(udg_sound84,3000.)
call SetSoundConeAngles(udg_sound84,.0,.0,127)
call SetSoundConeOrientation(udg_sound84,.0,.0,.0)
set udg_sound85=CreateSound("Sound\\Interface\\QuestCompleted.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound85,"QuestCompleted")
call SetSoundDuration(udg_sound85,5155)
call SetSoundVolume(udg_sound85,127)
set udg_sound86=CreateSound("Sound\\Interface\\QuestFailed.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound86,"QuestFailed")
call SetSoundDuration(udg_sound86,4690)
call SetSoundVolume(udg_sound86,127)
call SetSoundPitch(udg_sound86,.7)
set udg_sound87=CreateSound("Sound\\Interface\\QuestNew.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound87,"QuestNew")
call SetSoundDuration(udg_sound87,3750)
call SetSoundVolume(udg_sound87,127)
set udg_sound88=CreateSound("war3mapImported\\RadioFeedback_C.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound88,307)
call SetSoundChannel(udg_sound88,0)
call SetSoundVolume(udg_sound88,127)
call SetSoundPitch(udg_sound88,1.)
set udg_sound89=CreateSound("war3mapImported\\RadioFeedback_C.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound89,307)
call SetSoundChannel(udg_sound89,0)
call SetSoundVolume(udg_sound89,127)
call SetSoundPitch(udg_sound89,1.)
call SetSoundDistances(udg_sound89,800.,10000.)
call SetSoundDistanceCutoff(udg_sound89,4000.)
call SetSoundConeAngles(udg_sound89,.0,.0,127)
call SetSoundConeOrientation(udg_sound89,.0,.0,.0)
set udg_sound90=CreateSound("war3mapImported\\blacka1.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound90,739)
call SetSoundChannel(udg_sound90,0)
call SetSoundVolume(udg_sound90,127)
call SetSoundPitch(udg_sound90,1.)
call SetSoundDistances(udg_sound90,600.,10000.)
call SetSoundDistanceCutoff(udg_sound90,3000.)
call SetSoundConeAngles(udg_sound90,.0,.0,127)
call SetSoundConeOrientation(udg_sound90,.0,.0,.0)
set udg_sound91=CreateSound("war3mapImported\\blackd1.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound91,1758)
call SetSoundChannel(udg_sound91,0)
call SetSoundVolume(udg_sound91,127)
call SetSoundPitch(udg_sound91,1.)
call SetSoundDistances(udg_sound91,600.,10000.)
call SetSoundDistanceCutoff(udg_sound91,3000.)
call SetSoundConeAngles(udg_sound91,.0,.0,127)
call SetSoundConeOrientation(udg_sound91,.0,.0,.0)
set udg_sound92=CreateSound("war3mapImported\\blackh1.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound92,504)
call SetSoundChannel(udg_sound92,0)
call SetSoundVolume(udg_sound92,127)
call SetSoundPitch(udg_sound92,1.)
call SetSoundDistances(udg_sound92,600.,10000.)
call SetSoundDistanceCutoff(udg_sound92,3000.)
call SetSoundConeAngles(udg_sound92,.0,.0,127)
call SetSoundConeOrientation(udg_sound92,.0,.0,.0)
set udg_sound93=CreateSound("war3mapImported\\m4a1_boltpull.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound93,369)
call SetSoundChannel(udg_sound93,0)
call SetSoundVolume(udg_sound93,127)
call SetSoundPitch(udg_sound93,1.)
call SetSoundDistances(udg_sound93,600.,10000.)
call SetSoundDistanceCutoff(udg_sound93,3000.)
call SetSoundConeAngles(udg_sound93,.0,.0,127)
call SetSoundConeOrientation(udg_sound93,.0,.0,.0)
set udg_sound94=CreateSound("war3mapImported\\Rifle_clipin.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound94,544)
call SetSoundChannel(udg_sound94,0)
call SetSoundVolume(udg_sound94,127)
call SetSoundPitch(udg_sound94,1.)
call SetSoundDistances(udg_sound94,600.,10000.)
call SetSoundDistanceCutoff(udg_sound94,3000.)
call SetSoundConeAngles(udg_sound94,.0,.0,127)
call SetSoundConeOrientation(udg_sound94,.0,.0,.0)
set udg_sound95=CreateSound("war3mapImported\\Rifle_clipout.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound95,232)
call SetSoundChannel(udg_sound95,0)
call SetSoundVolume(udg_sound95,127)
call SetSoundPitch(udg_sound95,1.)
call SetSoundDistances(udg_sound95,600.,10000.)
call SetSoundDistanceCutoff(udg_sound95,3000.)
call SetSoundConeAngles(udg_sound95,.0,.0,127)
call SetSoundConeOrientation(udg_sound95,.0,.0,.0)
set udg_sound96=CreateSound("Abilities\\Spells\\Human\\DispelMagic\\DispelMagicTarget.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound96,"DispelMagic")
call SetSoundDuration(udg_sound96,451)
call SetSoundChannel(udg_sound96,0)
set udg_sound97=CreateSound("Abilities\\Spells\\Human\\DispelMagic\\DispelMagicTarget.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound97,"DispelMagic")
call SetSoundDuration(udg_sound97,451)
call SetSoundChannel(udg_sound97,0)
call SetSoundPitch(udg_sound97,1.)
set udg_sound98=CreateSound("war3mapImported\\ring6.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound98,6000)
call SetSoundChannel(udg_sound98,0)
call SetSoundVolume(udg_sound98,200)
call SetSoundPitch(udg_sound98,1.)
set udg_sound99=CreateSound("Abilities\\Weapons\\BoatMissile\\BoatAttack1.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound99,"BoatMissileLaunch")
call SetSoundDuration(udg_sound99,235)
call SetSoundChannel(udg_sound99,0)
call SetSoundDistances(udg_sound99,900.,10000.)
call SetSoundDistanceCutoff(udg_sound99,4000.)
set udg_sound100=CreateSound("Abilities\\Spells\\Human\\Polymorph\\PolymorphDone.wav",false,true,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound100,"PolymorphDone")
call SetSoundDuration(udg_sound100,872)
call SetSoundPitch(udg_sound100,.5)
call SetSoundDistances(udg_sound100,1000.,10000.)
call SetSoundDistanceCutoff(udg_sound100,5000.)
set udg_sound101=CreateSound("Abilities\\Spells\\Undead\\DarkSummoning\\DarkSummoningTarget1.wav",false,false,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound101,"DarkSummoningTarget")
call SetSoundDuration(udg_sound101,3320)
call SetSoundPitch(udg_sound101,.7)
set udg_sound102=CreateSound("Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget1.wav",false,false,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound102,"DarkRitual")
call SetSoundDuration(udg_sound102,3007)
call SetSoundPitch(udg_sound102,.7)
set udg_sound103=CreateSound("Abilities\\Spells\\Undead\\ReviveUndead\\ReviveUndead.wav",false,false,false,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound103,"ReviveUndead")
call SetSoundDuration(udg_sound103,3623)
call SetSoundVolume(udg_sound103,80)
call SetSoundPitch(udg_sound103,.5)
set udg_sound104=CreateSound("Abilities\\Spells\\Orc\\ReviveOrc\\ReviveOrc.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound104,"ReviveOrc")
call SetSoundDuration(udg_sound104,3013)
set udg_sound105=CreateSound("war3mapImported\\mortar_shell_incomming.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound105,948)
call SetSoundChannel(udg_sound105,0)
call SetSoundVolume(udg_sound105,127)
call SetSoundPitch(udg_sound105,1.)
call SetSoundDistances(udg_sound105,2000.,10000.)
call SetSoundDistanceCutoff(udg_sound105,8000.)
call SetSoundConeAngles(udg_sound105,.0,.0,127)
call SetSoundConeOrientation(udg_sound105,.0,.0,.0)
set udg_sound106=CreateSound("war3mapImported\\shotgun_cock.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound106,458)
call SetSoundChannel(udg_sound106,0)
call SetSoundVolume(udg_sound106,127)
call SetSoundPitch(udg_sound106,1.)
call SetSoundDistances(udg_sound106,600.,10000.)
call SetSoundDistanceCutoff(udg_sound106,3000.)
call SetSoundConeAngles(udg_sound106,.0,.0,127)
call SetSoundConeOrientation(udg_sound106,.0,.0,.0)
set udg_sound107=CreateSound("war3mapImported\\Shotgun_InsertShellW.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound107,548)
call SetSoundChannel(udg_sound107,0)
call SetSoundVolume(udg_sound107,127)
call SetSoundPitch(udg_sound107,1.)
call SetSoundDistances(udg_sound107,600.,10000.)
call SetSoundDistanceCutoff(udg_sound107,3000.)
call SetSoundConeAngles(udg_sound107,.0,.0,127)
call SetSoundConeOrientation(udg_sound107,.0,.0,.0)
set udg_sound108=CreateSound("war3mapImported\\shotgun_fire1.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound108,728)
call SetSoundChannel(udg_sound108,0)
call SetSoundVolume(udg_sound108,127)
call SetSoundPitch(udg_sound108,1.)
call SetSoundDistances(udg_sound108,600.,10000.)
call SetSoundDistanceCutoff(udg_sound108,3000.)
call SetSoundConeAngles(udg_sound108,.0,.0,127)
call SetSoundConeOrientation(udg_sound108,.0,.0,.0)
set udg_sound109=CreateSound("war3mapImported\\shotgun_fire1.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound109,728)
call SetSoundChannel(udg_sound109,0)
call SetSoundVolume(udg_sound109,127)
call SetSoundPitch(udg_sound109,1.)
call SetSoundDistances(udg_sound109,600.,10000.)
call SetSoundDistanceCutoff(udg_sound109,3000.)
call SetSoundConeAngles(udg_sound109,.0,.0,127)
call SetSoundConeOrientation(udg_sound109,.0,.0,.0)
set udg_sound110=CreateSound("Units\\Orc\\Catapult\\CatapultAttack1.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound110,"CatapultAttack1")
call SetSoundDuration(udg_sound110,239)
call SetSoundChannel(udg_sound110,0)
set udg_sound111=CreateSound("Units\\Orc\\Catapult\\CatapultAttack1.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound111,"CatapultAttack1")
call SetSoundDuration(udg_sound111,239)
call SetSoundChannel(udg_sound111,0)
call SetSoundPitch(udg_sound111,1.)
set udg_sound112=CreateSound("war3mapImported\\ArtExplodeW.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound112,1254)
call SetSoundChannel(udg_sound112,0)
call SetSoundVolume(udg_sound112,100)
call SetSoundPitch(udg_sound112,1.1)
call SetSoundDistances(udg_sound112,600.,10000.)
call SetSoundDistanceCutoff(udg_sound112,3000.)
call SetSoundConeAngles(udg_sound112,.0,.0,127)
call SetSoundConeOrientation(udg_sound112,.0,.0,.0)
set udg_sound113=CreateSound("war3mapImported\\suit_sprint.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound113,510)
call SetSoundChannel(udg_sound113,0)
call SetSoundVolume(udg_sound113,127)
call SetSoundPitch(udg_sound113,1.)
call SetSoundDistances(udg_sound113,600.,10000.)
call SetSoundDistanceCutoff(udg_sound113,3000.)
call SetSoundConeAngles(udg_sound113,.0,.0,127)
call SetSoundConeOrientation(udg_sound113,.0,.0,.0)
set udg_sound114=CreateSound("war3mapImported\\SuiteWound2.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound114,1236)
call SetSoundChannel(udg_sound114,0)
call SetSoundVolume(udg_sound114,100)
call SetSoundPitch(udg_sound114,1.)
call SetSoundDistances(udg_sound114,600.,10000.)
call SetSoundDistanceCutoff(udg_sound114,3000.)
call SetSoundConeAngles(udg_sound114,.0,.0,127)
call SetSoundConeOrientation(udg_sound114,.0,.0,.0)
set udg_sound115=CreateSound("Sound\\Ambient\\DoodadEffects\\Switch.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound115,"Switch")
call SetSoundDuration(udg_sound115,2606)
set udg_sound116=CreateSound("Sound\\Interface\\GlueScreenMeteorLaunch3.wav",false,false,false,10,10,"MissilesEAX")
call SetSoundParamsFromLabel(udg_sound116,"GlueScreenMeteorLaunch")
call SetSoundDuration(udg_sound116,3000)
call SetSoundVolume(udg_sound116,127)
call SetSoundPitch(udg_sound116,.3)
set udg_sound117=CreateSound("war3mapImported\\ToggleFireMode.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound117,191)
call SetSoundChannel(udg_sound117,0)
call SetSoundVolume(udg_sound117,100)
call SetSoundPitch(udg_sound117,1.)
call SetSoundDistances(udg_sound117,600.,10000.)
call SetSoundDistanceCutoff(udg_sound117,3000.)
call SetSoundConeAngles(udg_sound117,.0,.0,127)
call SetSoundConeOrientation(udg_sound117,.0,.0,.0)
set udg_sound118=CreateSound("Sound\\Music\\mp3Music\\UndeadX1.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound118,270671)
call SetSoundChannel(udg_sound118,0)
call SetSoundVolume(udg_sound118,127)
call SetSoundPitch(udg_sound118,1.)
set udg_sound119=CreateSound("war3mapImported\\affirmative2.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound119,478)
call SetSoundChannel(udg_sound119,0)
call SetSoundVolume(udg_sound119,127)
call SetSoundPitch(udg_sound119,1.)
call SetSoundDistances(udg_sound119,800.,10000.)
call SetSoundDistanceCutoff(udg_sound119,3000.)
call SetSoundConeAngles(udg_sound119,.0,.0,127)
call SetSoundConeOrientation(udg_sound119,.0,.0,.0)
set udg_sound120=CreateSound("war3mapImported\\allunitsmovein.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound120,687)
call SetSoundChannel(udg_sound120,0)
call SetSoundVolume(udg_sound120,127)
call SetSoundPitch(udg_sound120,1.)
call SetSoundDistances(udg_sound120,800.,10000.)
call SetSoundDistanceCutoff(udg_sound120,3000.)
call SetSoundConeAngles(udg_sound120,.0,.0,127)
call SetSoundConeOrientation(udg_sound120,.0,.0,.0)
set udg_sound121=CreateSound("Units\\NightElf\\Ballista\\BallistaYes1.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound121,"BallistaYes")
call SetSoundDuration(udg_sound121,334)
call SetSoundChannel(udg_sound121,0)
call SetSoundVolume(udg_sound121,100)
call SetSoundDistances(udg_sound121,800.,10000.)
call SetSoundDistanceCutoff(udg_sound121,3000.)
set udg_sound122=CreateSound("war3mapImported\\copy.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound122,321)
call SetSoundChannel(udg_sound122,0)
call SetSoundVolume(udg_sound122,127)
call SetSoundPitch(udg_sound122,1.)
call SetSoundDistances(udg_sound122,800.,10000.)
call SetSoundDistanceCutoff(udg_sound122,3000.)
call SetSoundConeAngles(udg_sound122,.0,.0,127)
call SetSoundConeOrientation(udg_sound122,.0,.0,.0)
set udg_sound123=CreateSound("Units\\NightElf\\Ballista\\BallistaYesAttack3.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound123,"BallistaYesAttack")
call SetSoundDuration(udg_sound123,316)
call SetSoundChannel(udg_sound123,0)
call SetSoundVolume(udg_sound123,100)
call SetSoundDistances(udg_sound123,800.,10000.)
call SetSoundDistanceCutoff(udg_sound123,3000.)
set udg_sound124=CreateSound("war3mapImported\\grenade.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound124,452)
call SetSoundChannel(udg_sound124,0)
call SetSoundVolume(udg_sound124,127)
call SetSoundPitch(udg_sound124,1.)
call SetSoundDistances(udg_sound124,800.,10000.)
call SetSoundDistanceCutoff(udg_sound124,3000.)
call SetSoundConeAngles(udg_sound124,.0,.0,127)
call SetSoundConeOrientation(udg_sound124,.0,.0,.0)
set udg_sound125=CreateSound("Sound\\Music\\mp3Music\\HumanDefeat.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound125,46664)
call SetSoundChannel(udg_sound125,0)
call SetSoundVolume(udg_sound125,127)
call SetSoundPitch(udg_sound125,1.)
set udg_sound126=CreateSound("war3mapImported\\off2.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound126,557)
call SetSoundChannel(udg_sound126,0)
call SetSoundVolume(udg_sound126,127)
call SetSoundPitch(udg_sound126,1.)
call SetSoundDistances(udg_sound126,800.,10000.)
call SetSoundDistanceCutoff(udg_sound126,3000.)
call SetSoundConeAngles(udg_sound126,.0,.0,127)
call SetSoundConeOrientation(udg_sound126,.0,.0,.0)
set udg_sound127=CreateSound("war3mapImported\\off3.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound127,583)
call SetSoundChannel(udg_sound127,0)
call SetSoundVolume(udg_sound127,127)
call SetSoundPitch(udg_sound127,1.)
call SetSoundDistances(udg_sound127,800.,10000.)
call SetSoundDistanceCutoff(udg_sound127,3000.)
call SetSoundConeAngles(udg_sound127,.0,.0,127)
call SetSoundConeOrientation(udg_sound127,.0,.0,.0)
set udg_sound128=CreateSound("war3mapImported\\off4.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound128,191)
call SetSoundChannel(udg_sound128,0)
call SetSoundVolume(udg_sound128,127)
call SetSoundPitch(udg_sound128,1.)
call SetSoundDistances(udg_sound128,800.,10000.)
call SetSoundDistanceCutoff(udg_sound128,3000.)
call SetSoundConeAngles(udg_sound128,.0,.0,127)
call SetSoundConeOrientation(udg_sound128,.0,.0,.0)
set udg_sound129=CreateSound("war3mapImported\\officerdown.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound129,635)
call SetSoundChannel(udg_sound129,0)
call SetSoundVolume(udg_sound129,127)
call SetSoundPitch(udg_sound129,1.)
call SetSoundDistances(udg_sound129,800.,10000.)
call SetSoundDistanceCutoff(udg_sound129,3000.)
call SetSoundConeAngles(udg_sound129,.0,.0,127)
call SetSoundConeOrientation(udg_sound129,.0,.0,.0)
set udg_sound130=CreateSound("war3mapImported\\officerunderfire.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound130,948)
call SetSoundChannel(udg_sound130,0)
call SetSoundVolume(udg_sound130,127)
call SetSoundPitch(udg_sound130,1.)
call SetSoundDistances(udg_sound130,800.,10000.)
call SetSoundDistanceCutoff(udg_sound130,3000.)
call SetSoundConeAngles(udg_sound130,.0,.0,127)
call SetSoundConeOrientation(udg_sound130,.0,.0,.0)
set udg_sound131=CreateSound("war3mapImported\\on2.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound131,321)
call SetSoundChannel(udg_sound131,0)
call SetSoundVolume(udg_sound131,127)
call SetSoundPitch(udg_sound131,1.)
call SetSoundDistances(udg_sound131,800.,10000.)
call SetSoundDistanceCutoff(udg_sound131,3000.)
call SetSoundConeAngles(udg_sound131,.0,.0,127)
call SetSoundConeOrientation(udg_sound131,.0,.0,.0)
set udg_sound132=CreateSound("war3mapImported\\on3.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound132,635)
call SetSoundChannel(udg_sound132,0)
call SetSoundVolume(udg_sound132,127)
call SetSoundPitch(udg_sound132,1.)
call SetSoundDistances(udg_sound132,800.,10000.)
call SetSoundDistanceCutoff(udg_sound132,3000.)
call SetSoundConeAngles(udg_sound132,.0,.0,127)
call SetSoundConeOrientation(udg_sound132,.0,.0,.0)
set udg_sound133=CreateSound("Units\\NightElf\\Ballista\\BallistaYesAttack2.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound133,"BallistaYesAttack")
call SetSoundDuration(udg_sound133,393)
call SetSoundChannel(udg_sound133,0)
call SetSoundVolume(udg_sound133,100)
call SetSoundDistances(udg_sound133,800.,10000.)
call SetSoundDistanceCutoff(udg_sound133,3000.)
set udg_sound134=CreateSound("Units\\NightElf\\Ballista\\BallistaYesAttack1.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound134,"BallistaYesAttack")
call SetSoundDuration(udg_sound134,494)
call SetSoundChannel(udg_sound134,0)
call SetSoundVolume(udg_sound134,100)
call SetSoundDistances(udg_sound134,800.,10000.)
call SetSoundDistanceCutoff(udg_sound134,3000.)
set udg_sound135=CreateSound("Units\\NightElf\\Ballista\\BallistaWhat1.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound135,"BallistaWhat")
call SetSoundDuration(udg_sound135,748)
call SetSoundChannel(udg_sound135,0)
call SetSoundVolume(udg_sound135,100)
call SetSoundDistances(udg_sound135,800.,10000.)
call SetSoundDistanceCutoff(udg_sound135,3000.)
set udg_sound136=CreateSound("war3mapImported\\watchit.mp3",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound136,504)
call SetSoundChannel(udg_sound136,0)
call SetSoundVolume(udg_sound136,127)
call SetSoundPitch(udg_sound136,1.)
call SetSoundDistances(udg_sound136,800.,10000.)
call SetSoundDistanceCutoff(udg_sound136,3000.)
call SetSoundConeAngles(udg_sound136,.0,.0,127)
call SetSoundConeOrientation(udg_sound136,.0,.0,.0)
set udg_sound137=CreateSound("war3mapImported\\NoAmmo.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundDuration(udg_sound137,200)
call SetSoundChannel(udg_sound137,0)
call SetSoundVolume(udg_sound137,127)
call SetSoundPitch(udg_sound137,1.)
call SetSoundDistances(udg_sound137,600.,10000.)
call SetSoundDistanceCutoff(udg_sound137,3000.)
call SetSoundConeAngles(udg_sound137,.0,.0,127)
call SetSoundConeOrientation(udg_sound137,.0,.0,.0)
set udg_sound138=CreateSound("Sound\\Interface\\SecretFound.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound138,"SecretFound")
call SetSoundDuration(udg_sound138,2525)
call SetSoundVolume(udg_sound138,100)
set udg_sound139=CreateSound("Units\\Creeps\\Wendigo\\WendigoWhat3.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound139,"WendigoWhat")
call SetSoundDuration(udg_sound139,1567)
call SetSoundDistances(udg_sound139,300.,10000.)
call SetSoundDistanceCutoff(udg_sound139,800.)
set udg_sound140=CreateSound("Units\\Creeps\\Wendigo\\WendigoYesAttack1.wav",false,true,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound140,"WendigoYesAttack")
call SetSoundDuration(udg_sound140,1695)
call SetSoundDistances(udg_sound140,300.,10000.)
call SetSoundDistanceCutoff(udg_sound140,800.)
set udg_rect05=Rect(15136.,14720.,15200.,14784.)
set udg_rect06=Rect(2624.,-32.,5952.,2080.)
set udg_rect07=Rect(12704.,-10336.,13856.,-9568.)
set udg_rect08=Rect(-9984.,-4640.,-9920.,-4576.)
set udg_rect09=Rect(-9824.,-3552.,-9760.,-3488.)
set udg_rect10=Rect(-9216.,-2752.,-9152.,-2688.)
set udg_rect11=Rect(-9344.,-3904.,-9280.,-3840.)
set udg_rect12=Rect(-8672.,-4320.,-8608.,-4256.)
set udg_rect13=Rect(-9792.,-2976.,-9728.,-2912.)
set udg_rect14=Rect(-4544.,11200.,-4320.,11424.)
set udg_rect15=Rect(2784.,14880.,3072.,15200.)
set udg_rect16=Rect(5920.,13184.,6208.,13504.)
set udg_rect17=Rect(-14144.,3232.,-13888.,3488.)
set udg_rect18=Rect(-5376.,12672.,-5088.,12960.)
set udg_rect19=Rect(-13760.,-6976.,-8544.,-1792.)
set udg_rect20=Rect(11520.,-5280.,11776.,-5056.)
set udg_rect21=Rect(3328.,6720.,3744.,7104.)
set udg_rect22=Rect(9344.,-6432.,9600.,-6208.)
set udg_rect23=Rect(-896.,-15200.,-640.,-14976.)
set udg_rect24=Rect(9792.,-1664.,10176.,-1312.)
set udg_rect25=Rect(-2400.,-15872.,-1952.,-15680.)
set udg_rect26=Rect(-15584.,-2400.,-15296.,-1984.)
set udg_rect27=Rect(-13440.,-3392.,-12960.,-2912.)
set udg_rect28=Rect(-9792.,-1248.,-9312.,-768.)
set udg_rect29=Rect(-5152.,3136.,-4672.,3616.)
set udg_rect30=Rect(-5952.,5824.,-5472.,6304.)
set udg_rect31=Rect(-5312.,8672.,-4832.,9152.)
set udg_rect32=Rect(-3936.,9760.,-3456.,10240.)
set udg_rect33=Rect(-1728.,9600.,-1248.,10080.)
set udg_rect34=Rect(-192.,8480.,288.,8960.)
set udg_rect35=Rect(4128.,7840.,4608.,8320.)
set udg_rect36=Rect(10016.,5984.,10496.,6464.)
set udg_rect37=Rect(11296.,4640.,11776.,5120.)
set udg_rect38=Rect(12672.,2592.,13152.,3072.)
set udg_rect39=Rect(11488.,-1632.,11968.,-1152.)
set udg_rect40=Rect(12768.,-2944.,13248.,-2464.)
set udg_rect41=Rect(11136.,-4256.,11616.,-3776.)
set udg_rect42=Rect(8352.,-4320.,8832.,-3840.)
set udg_rect43=Rect(4768.,-6336.,5248.,-5856.)
set udg_rect44=Rect(3968.,-7904.,4448.,-7424.)
set udg_rect45=Rect(-864.,-5280.,-384.,-4800.)
set udg_rect46=Rect(-2656.,-5856.,-2176.,-5376.)
set udg_rect47=Rect(11904.,-14560.,12128.,-14400.)
set udg_rect48=Rect(704.,-12800.,1664.,-11872.)
set udg_rect49=Rect(-1440.,-12384.,-480.,-11456.)
set udg_rect50=Rect(1984.,-13920.,4160.,-12992.)
set udg_rect51=Rect(7776.,-13632.,11136.,-12320.)
set udg_rect52=Rect(-15232.,-8096.,5536.,10304.)
set udg_rect53=Rect(6080.,-7648.,15296.,5056.)
set udg_rect54=Rect(4320.,1792.,5344.,2752.)
set udg_rect55=Rect(6144.,4384.,6976.,5152.)
set udg_rect56=Rect(5984.,2016.,7008.,2976.)
set udg_rect57=Rect(-800.,-2560.,.0,-1824.)
set udg_rect58=Rect(6176.,3360.,6752.,3968.)
set udg_rect59=Rect(5856.,800.,6496.,1440.)
set udg_rect60=Rect(7008.,736.,7904.,1504.)
set udg_rect61=Rect(7744.,-640.,8352.,-64.)
set udg_rect62=Rect(6784.,-1536.,7392.,-960.)
set udg_rect63=Rect(6240.,-2944.,7136.,-2144.)
set udg_rect64=Rect(5184.,-4320.,6080.,-3520.)
set udg_rect65=Rect(4032.,-2944.,4608.,-2336.)
set udg_rect66=Rect(2656.,-3488.,3424.,-2784.)
set udg_rect67=Rect(2720.,-2144.,3232.,-1632.)
set udg_rect68=Rect(1568.,-1536.,2208.,-928.)
set udg_rect69=Rect(320.,-1952.,960.,-1344.)
set udg_rect70=Rect(-2016.,1056.,-1376.,1664.)
set udg_rect71=Rect(1312.,-416.,1952.,192.)
set udg_rect72=Rect(-416.,-544.,512.,224.)
set udg_rect73=Rect(1184.,896.,1824.,1504.)
set udg_rect74=Rect(1568.,1952.,2208.,2560.)
set udg_rect75=Rect(3872.,-5184.,4576.,-4544.)
set udg_rect76=Rect(-2336.,-2496.,-1312.,-1696.)
set udg_rect77=Rect(-3424.,-2400.,-2784.,-1792.)
set udg_rect78=Rect(7008.,5824.,7584.,6432.)
set udg_rect79=Rect(7520.,3008.,8480.,3840.)
set udg_rect80=Rect(8352.,1760.,8928.,2368.)
set udg_rect81=Rect(9056.,2912.,9824.,3616.)
set udg_rect82=Rect(9472.,4960.,10304.,5696.)
set udg_rect83=Rect(8256.,4928.,9088.,5664.)
set udg_rect84=Rect(10208.,3552.,10976.,4256.)
set udg_rect85=Rect(8736.,480.,9312.,1088.)
set udg_rect86=Rect(32.,832.,608.,1440.)
set udg_rect87=Rect(416.,1984.,992.,2592.)
set udg_rect88=Rect(2400.,-5440.,3264.,-4672.)
set udg_rect89=Rect(224.,8960.,1088.,9728.)
set udg_rect90=Rect(-13728.,-4416.,-12960.,-3584.)
set udg_rect91=Rect(11104.,-7616.,11872.,-6784.)
set udg_rect92=Rect(-1632.,7008.,-864.,7840.)
set udg_rect93=Rect(-32.,12960.,736.,13792.)
set udg_rect94=Rect(-2272.,12288.,-1504.,13120.)
set udg_rect95=Rect(-2688.,-15872.,15424.,-15712.)
set udg_rect96=Rect(-15584.,-11552.,-15424.,15328.)
set udg_rect97=Rect(15424.,-15872.,15584.,5728.)
set udg_rect98=Rect(-15424.,15168.,-10208.,15328.)
set udg_rect99=Rect(-4864.,11680.,2816.,15776.)
call SetSoundPosition(udg_sound01,-1024.,13728.,95.6)
call RegisterStackedSound(udg_sound01,true,7680.,4096.)
set udg_rect100=Rect(11296.,-14720.,11712.,-14080.)
set udg_rect101=Rect(10784.,-4192.,13344.,-2496.)
set udg_rect102=Rect(12000.,1920.,13504.,3584.)
set udg_rect103=Rect(8352.,-13248.,8800.,-12832.)
set udg_rect104=Rect(-1184.,-9888.,-736.,-9472.)
set udg_rect105=Rect(-1120.,-13632.,-672.,-13216.)
set udg_rect106=Rect(13856.,5344.,14624.,6208.)
set udg_rect107=Rect(4192.,-1056.,4960.,-192.)
set udg_rect108=Rect(1152.,11296.,1824.,12000.)
set udg_rect109=Rect(11168.,-9568.,15136.,-6368.)
set udg_rect110=Rect(736.,4448.,4704.,7648.)
set udg_rect111=Rect(15424.,-4032.,15584.,-3648.)
set udg_rect112=Rect(15392.,2272.,15584.,2720.)
set udg_rect113=Rect(14976.,-3968.,15264.,-3680.)
set udg_rect114=Rect(-12864.,8384.,-12384.,8832.)
set udg_rect115=Rect(-2496.,-5984.,2112.,-3840.)
set udg_rect116=Rect(12416.,-5408.,15296.,3456.)
set udg_rect117=Rect(-5600.,4192.,128.,10336.)
set udg_rect118=Rect(-1216.,7072.,-1088.,7200.)
set udg_rect119=Rect(-7264.,-10976.,-6880.,-9664.)
set udg_rect120=Rect(9024.,-11232.,9760.,-10592.)
set udg_rect121=Rect(7264.,-11264.,8000.,-10624.)
set udg_rect122=Rect(3648.,640.,5728.,1536.)
set udg_rect123=Rect(-12128.,-13920.,-7968.,-11104.)
set udg_rect124=Rect(-2272.,-4928.,12224.,3200.)
set udg_rect125=Rect(-12288.,-5984.,-10784.,-4480.)
set udg_rect126=Rect(-12800.,7744.,-9888.,10560.)
set udg_rect127=Rect(-2496.,-7680.,14944.,4192.)
set udg_rect128=Rect(12672.,-11008.,12800.,-10624.)
set udg_rect129=Rect(13952.,-11008.,14080.,-10624.)
set udg_rect130=Rect(3648.,-12320.,4160.,-11424.)
set udg_rect131=Rect(2144.,-12512.,2720.,-12032.)
set udg_rect132=Rect(-1312.,-10976.,-736.,-10496.)
set udg_rect133=Rect(10016.,-12352.,10336.,-12000.)
set udg_rect134=Rect(-1504.,-14112.,4672.,-8768.)
set udg_rect135=Rect(7200.,-14720.,11136.,-10496.)
set udg_rect136=Rect(4672.,-13984.,7232.,-12992.)
set udg_rect137=Rect(11104.,-14816.,12192.,-14048.)
set udg_rect138=Rect(12096.,-14816.,14784.,-10592.)
set udg_rect139=Rect(-10272.,2240.,-9920.,2656.)
set udg_rect140=Rect(-7392.,32.,-6848.,704.)
set udg_rect141=Rect(-5248.,2816.,-4352.,3872.)
set udg_rect142=Rect(-6016.,8640.,-5440.,9792.)
set udg_rect143=Rect(12416.,2208.,13280.,3456.)
set udg_rect144=Rect(12160.,-4128.,13216.,-2688.)
set udg_rect145=Rect(-3808.,-3328.,-3328.,-2752.)
set udg_rect146=Rect(-8480.,-1344.,-8000.,-768.)
set udg_rect147=Rect(-1280.,-5184.,-800.,-4608.)
set udg_rect148=Rect(12256.,-14624.,14624.,-10720.)
set udg_rect149=Rect(12544.,-14624.,12800.,-14112.)
set udg_rect150=Rect(3904.,1312.,4256.,1632.)
set udg_rect151=Rect(1920.,13216.,2272.,13536.)
set udg_rect152=Rect(14784.,-4512.,15136.,-4192.)
set udg_rect153=Rect(-256.,-15008.,96.,-14688.)
set udg_rect154=Rect(-6592.,3232.,-6240.,3552.)
set udg_rect155=Rect(-3840.,-8128.,13504.,7168.)
set udg_rect156=Rect(-4224.,7264.,6816.,13568.)
set udg_camerasetup01=CreateCameraSetup()
call CameraSetupSetField(udg_camerasetup01,CAMERA_FIELD_ZOFFSET,.0,.0)
call CameraSetupSetField(udg_camerasetup01,CAMERA_FIELD_ROTATION,90.,.0)
call CameraSetupSetField(udg_camerasetup01,CAMERA_FIELD_ANGLE_OF_ATTACK,304.,.0)
call CameraSetupSetField(udg_camerasetup01,CAMERA_FIELD_TARGET_DISTANCE,1024.5,.0)
call CameraSetupSetField(udg_camerasetup01,CAMERA_FIELD_ROLL,.0,.0)
call CameraSetupSetField(udg_camerasetup01,CAMERA_FIELD_FIELD_OF_VIEW,70.,.0)
call CameraSetupSetField(udg_camerasetup01,CAMERA_FIELD_FARZ,5000.,.0)
call CameraSetupSetDestPosition(udg_camerasetup01,7756.4,-10944.1,.0)
set udg_camerasetup02=CreateCameraSetup()
call CameraSetupSetField(udg_camerasetup02,CAMERA_FIELD_ZOFFSET,.0,.0)
call CameraSetupSetField(udg_camerasetup02,CAMERA_FIELD_ROTATION,90.,.0)
call CameraSetupSetField(udg_camerasetup02,CAMERA_FIELD_ANGLE_OF_ATTACK,304.,.0)
call CameraSetupSetField(udg_camerasetup02,CAMERA_FIELD_TARGET_DISTANCE,931.4,.0)
call CameraSetupSetField(udg_camerasetup02,CAMERA_FIELD_ROLL,.0,.0)
call CameraSetupSetField(udg_camerasetup02,CAMERA_FIELD_FIELD_OF_VIEW,70.,.0)
call CameraSetupSetField(udg_camerasetup02,CAMERA_FIELD_FARZ,5000.,.0)
call CameraSetupSetDestPosition(udg_camerasetup02,9436.6,-10957.9,.0)
set udg_destructable10=CreateDestructable('B001',8640.,-10752.,270.,1.,0)
set udg_destructable03=CreateDestructable('B001',8384.,-10496.,270.,1.,0)
set udg_destructable11=CreateDestructable('B001',8384.,-10752.,270.,1.,0)
set udg_destructable12=CreateDestructable('B001',8640.,-10496.,270.,1.,0)
set udg_destructable02=CreateDestructable('XTmx',8384.,-10528.,270.,.85,0)
set udg_destructable01=CreateDestructable('XTmx',8640.,-10528.,90.,.85,0)
set udg_destructable08=CreateDestructable('Ytlc',12608.,-10816.,270.,1.,0)
set udg_destructable09=CreateDestructable('Ytlc',12608.,-10688.,270.,1.,0)
set udg_destructable05=CreateDestructable('Ytlc',14144.,-10816.,270.,1.,0)
set udg_destructable04=CreateDestructable('Ytlc',14144.,-10944.,270.,1.,0)
set udg_destructable07=CreateDestructable('Ytlc',12608.,-10944.,270.,1.,0)
set udg_destructable06=CreateDestructable('Ytlc',14144.,-10688.,270.,1.,0)
call CreateItem('I003',299.6,9049.2)
call CreateItem('I004',-5487.9,13035.8)
call CreateItem('I004',-4034.4,4937.)
call CreateItem('I008',-296.6,-13857.2)
call CreateItem('I00C',3694.3,-1007.9)
call CreateItem('I00C',-5534.1,13043.6)
call CreateItem('I00C',3485.7,-778.3)
call CreateItem('I00I',299.,9002.8)
call CreateItem('I00I',-4383.2,6061.)
call CreateItem('I00M',-4422.8,-10075.2)
call CreateItem('I00N',3069.3,6247.2)
call CreateItem('I00N',-4384.7,-10046.2)
call CreateItem('I00N',4304.6,1537.8)
call CreateItem('I00O',4345.9,1560.1)
call CreateItem('I00S',13219.9,-5631.)
set loc_player01=Player(24)
set udg_unit22=CreateUnit(loc_player01,'h007',8576.,-13056.,270.)
set udg_unit23=CreateUnit(loc_player01,'h007',-960.,-9664.,270.)
set udg_unit24=CreateUnit(loc_player01,'h007',-896.,-13440.,270.)
set loc_player01=Player(24)
set udg_unit18=CreateUnit(loc_player01,'h002',5023.5,988.2,162.27)
// Derdan
set udg_Argis = udg_unit18
set udg_Predator = CreateUnit(loc_player01, 'h01U', 4900, 1080, 200)
// ----
set udg_unit19=CreateUnit(loc_player01,'h004',-10240.,9344.,358.421)
call SetUnitState(udg_unit19,UNIT_STATE_MANA,435)
set udg_unit20=CreateUnit(loc_player01,'h004',-8128.,-1088.,38.423)
call SetUnitState(udg_unit20,UNIT_STATE_MANA,387)
set udg_unit21=CreateUnit(loc_player01,'h004',-8640.,-3392.,.87)
call SetUnitState(udg_unit21,UNIT_STATE_MANA,463)
set loc_unit01=CreateUnit(loc_player01,'h005',-10350.2,9295.,28.003)
set loc_unit01=CreateUnit(loc_player01,'h018',-8235.,-312.6,334.895)
set loc_unit01=CreateUnit(loc_player01,'h018',-14161.3,-7155.,124.98)
set loc_unit01=CreateUnit(loc_player01,'h018',-8458.7,-2757.3,296.351)
set loc_unit01=CreateUnit(loc_player01,'h018',-8599.6,-3779.6,28.054)
set loc_unit01=CreateUnit(loc_player01,'h005',-10050.1,-5587.6,47.455)
set loc_unit01=CreateUnit(loc_player01,'h005',-11220.5,-3990.,144.808)
set loc_unit01=CreateUnit(loc_player01,'h005',-8930.6,-6278.3,273.226)
set loc_unit01=CreateUnit(loc_player01,'h005',-10224.4,-4321.,308.332)
set loc_unit01=CreateUnit(loc_player01,'h005',-13618.,-5996.5,47.455)
set loc_unit01=CreateUnit(loc_player01,'h005',-14593.2,-6271.6,254.716)
set loc_unit01=CreateUnit(loc_player01,'h018',-8464.2,-7648.,37.74)
set loc_unit01=CreateUnit(loc_player01,'h005',-12629.,-6814.7,242.939)
set loc_unit01=CreateUnit(loc_player01,'h018',-13831.9,-6423.4,266.804)
set loc_unit01=CreateUnit(loc_player01,'h005',-9188.2,-7296.3,47.455)
set loc_unit01=CreateUnit(loc_player01,'n004',-12688.3,-6921.1,208.92)
set loc_unit01=CreateUnit(loc_player01,'n008',-12574.5,-6888.2,263.15)
set loc_unit01=CreateUnit(loc_player01,'n006',-13716.8,-6461.6,352.02)
set loc_unit01=CreateUnit(loc_player01,'n005',-13346.4,-6771.8,174.41)
set loc_unit01=CreateUnit(loc_player01,'n008',-14211.8,-6304.7,169.35)
set loc_unit01=CreateUnit(loc_player01,'h005',-13692.8,-5083.1,121.05)
set loc_unit01=CreateUnit(loc_player01,'n005',-13345.7,-5293.4,211.416)
set loc_unit01=CreateUnit(loc_player01,'n008',-13219.,-4917.2,227.11)
set loc_unit01=CreateUnit(loc_player01,'n007',-12582.,-5372.3,170.07)
set loc_unit01=CreateUnit(loc_player01,'n008',-11242.5,-5380.2,230.48)
set loc_unit01=CreateUnit(loc_player01,'n006',-11732.1,-5176.4,332.34)
set loc_unit01=CreateUnit(loc_player01,'n004',-10923.2,-4331.8,297.156)
set loc_unit01=CreateUnit(loc_player01,'n005',-10895.7,-4390.9,117.29)
set loc_unit01=CreateUnit(loc_player01,'n006',-10693.6,-4037.2,248.56)
set loc_unit01=CreateUnit(loc_player01,'n008',-10537.7,-3170.,13.124)
set loc_unit01=CreateUnit(loc_player01,'n006',-9655.3,-3484.1,183.41)
set loc_unit01=CreateUnit(loc_player01,'n004',-8216.1,-5372.6,230.04)
set loc_unit01=CreateUnit(loc_player01,'n008',-8517.9,-7333.,330.292)
set loc_unit01=CreateUnit(loc_player01,'n007',-8104.5,-7364.,177.204)
set loc_unit01=CreateUnit(loc_player01,'n006',-8699.1,-6558.1,193.42)
set loc_unit01=CreateUnit(loc_player01,'h005',-11338.4,8339.5,250.413)
set loc_unit01=CreateUnit(loc_player01,'h005',-12477.3,10085.4,56.68)
set loc_unit01=CreateUnit(loc_player01,'h005',-11915.3,10297.8,309.76)
set loc_unit01=CreateUnit(loc_player01,'h005',-11123.2,10216.2,119.137)
set loc_unit01=CreateUnit(loc_player01,'n004',-11189.2,9906.1,159.944)
set loc_unit01=CreateUnit(loc_player01,'n007',-11418.3,10198.,235.829)
set loc_unit01=CreateUnit(loc_player01,'n008',-11654.8,9669.1,19.106)
set loc_unit01=CreateUnit(loc_player01,'n006',-11619.3,9708.3,253.91)
set loc_unit01=CreateUnit(loc_player01,'n007',-10520.7,8361.8,200.417)
set loc_unit01=CreateUnit(loc_player01,'n006',-12187.3,8343.9,214.877)
set loc_unit01=CreateUnit(loc_player01,'n007',-12222.2,8303.8,67.524)
set loc_unit01=CreateUnit(loc_player01,'n004',-12242.5,8355.5,280.413)
set loc_unit01=CreateUnit(loc_player01,'n004',-12577.7,9615.,15.149)
set loc_unit01=CreateUnit(loc_player01,'n006',-11099.9,8845.3,341.951)
set loc_unit01=CreateUnit(loc_player01,'h005',-11682.5,-3281.3,59.42)
set loc_unit01=CreateUnit(loc_player01,'h018',-8854.7,-4334.2,38.9)
set loc_unit01=CreateUnit(loc_player01,'h005',-13026.6,-7179.,59.42)
set loc_unit01=CreateUnit(loc_player01,'h018',-10627.8,8715.3,148.138)
set loc_unit01=CreateUnit(loc_player01,'h018',-3781.8,-2782.9,118.568)
set loc_unit01=CreateUnit(loc_player01,'h018',-3420.1,-3262.9,28.357)
set loc_unit01=CreateUnit(loc_player01,'h018',-5785.2,8792.7,61.438)
set loc_unit01=CreateUnit(loc_player01,'h018',-5927.6,9730.9,322.29)
set loc_unit01=CreateUnit(loc_player01,'h018',-11753.,9046.,314.4)
set loc_unit01=CreateUnit(loc_player01,'n007',-11038.3,8874.,290.959)
set loc_unit01=CreateUnit(loc_player01,'n008',-12345.7,9179.5,237.326)
set loc_unit01=CreateUnit(loc_player01,'h005',5568.9,662.2,327.6)
set loc_unit01=CreateUnit(loc_player01,'h005',5217.3,178.9,2.39)
set loc_unit01=CreateUnit(loc_player01,'h005',5368.,1566.6,88.16)
set loc_unit01=CreateUnit(loc_player01,'h005',5659.,1451.5,77.85)
set loc_unit01=CreateUnit(loc_player01,'h018',5455.5,1117.4,247.96)
set loc_unit01=CreateUnit(loc_player01,'h005',3539.1,1381.7,105.65)
set loc_unit01=CreateUnit(loc_player01,'h018',3973.4,1129.1,114.751)
set loc_unit01=CreateUnit(loc_player01,'h005',2968.8,1046.5,192.388)
set loc_unit01=CreateUnit(loc_player01,'h005',3164.3,622.,236.751)
set loc_unit01=CreateUnit(loc_player01,'h018',3603.4,799.4,215.47)
set loc_unit01=CreateUnit(loc_player01,'h018',4619.,542.8,304.28)
set loc_unit01=CreateUnit(loc_player01,'h005',3627.8,1357.7,68.43)
set loc_unit01=CreateUnit(loc_player01,'n008',-11741.4,8451.9,40.006)
set loc_unit01=CreateUnit(loc_player01,'n006',-11245.8,8565.6,68.055)
set loc_unit01=CreateUnit(loc_player01,'n004',-11208.8,8610.8,231.176)
set loc_unit01=CreateUnit(loc_player01,'n004',-10116.7,8209.9,151.257)
set loc_unit01=CreateUnit(loc_player01,'h018',-10421.6,7584.5,256.905)
set loc_unit01=CreateUnit(loc_player01,'h005',-5789.8,8720.,356.666)
set loc_unit01=CreateUnit(loc_player01,'n008',-8347.1,-4568.9,128.157)
set loc_unit01=CreateUnit(loc_player01,'n006',-8191.,-5437.1,97.778)
set loc_unit01=CreateUnit(loc_player01,'n007',-8347.1,-4469.1,245.45)
set loc_unit01=CreateUnit(loc_player01,'n007',-9571.,-2698.1,262.301)
set loc_unit01=CreateUnit(loc_player01,'n005',-9512.8,-2735.8,238.227)
set loc_unit01=CreateUnit(loc_player01,'h018',-9976.1,-2574.8,73.555)
set loc_unit01=CreateUnit(loc_player01,'h018',-12434.3,-4245.9,297.761)
set loc_unit01=CreateUnit(loc_player01,'h005',-8688.4,-3296.8,345.855)
set loc_unit01=CreateUnit(loc_player01,'h005',-10207.4,2396.6,234.888)
set loc_unit01=CreateUnit(loc_player01,'h005',-10114.7,2267.7,261.758)
set loc_unit01=CreateUnit(loc_player01,'h018',-5124.4,3481.2,25.869)
set loc_unit01=CreateUnit(loc_player01,'h005',-4872.2,2912.1,52.644)
set loc_unit01=CreateUnit(loc_player01,'h005',-4558.4,3825.9,208.609)
set loc_unit01=CreateUnit(loc_player01,'h005',-4547.2,3711.4,185.001)
set loc_unit01=CreateUnit(loc_player01,'h005',13008.4,3403.7,257.029)
set loc_unit01=CreateUnit(loc_player01,'h018',13165.4,2551.9,117.03)
set loc_unit01=CreateUnit(loc_player01,'h005',12491.2,2982.7,70.706)
set loc_unit01=CreateUnit(loc_player01,'h018',12522.5,2871.8,328.087)
set loc_unit01=CreateUnit(loc_player01,'h005',12254.,2110.6,257.029)
set loc_unit01=CreateUnit(loc_player01,'h005',12091.2,3294.3,127.405)
set loc_unit01=CreateUnit(loc_player01,'h018',13168.8,2311.5,196.542)
set loc_unit01=CreateUnit(loc_player01,'h018',11865.1,-2758.6,2.407)
set loc_unit01=CreateUnit(loc_player01,'h018',11008.9,-3168.5,247.283)
set loc_unit01=CreateUnit(loc_player01,'h005',11625.4,-2576.8,70.29)
set loc_unit01=CreateUnit(loc_player01,'h018',12364.1,-2795.4,101.634)
set loc_unit01=CreateUnit(loc_player01,'h005',12443.5,-2844.9,351.704)
set loc_unit01=CreateUnit(loc_player01,'h005',12504.3,-3960.,147.137)
set loc_unit01=CreateUnit(loc_player01,'h018',13092.3,-3208.9,236.546)
set loc_player01=Player(27)
set loc_unit01=CreateUnit(loc_player01,'u000',3801.3,-11572.6,142.541)
set loc_unit01=CreateUnit(loc_player01,'u001',3779.7,-12110.,22.775)
set loc_unit01=CreateUnit(loc_player01,'h006',5793.7,-13241.9,.0)
set loc_unit01=CreateUnit(loc_player01,'h006',5793.7,-13657.9,.0)
set loc_unit01=CreateUnit(loc_player01,'h006',4929.7,-12985.9,270.)
set loc_unit01=CreateUnit(loc_player01,'h006',4929.7,-13881.9,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',3265.7,-14009.9,123.008)
set loc_unit01=CreateUnit(loc_player01,'h006',1022.3,-13299.4,.0)
set loc_unit01=CreateUnit(loc_player01,'h006',549.1,-12106.7,180.)
set loc_unit01=CreateUnit(loc_player01,'h006',3391.9,-11207.9,270.)
set loc_unit01=CreateUnit(loc_player01,'h006',2753.5,-11205.,270.)
set loc_unit01=CreateUnit(loc_player01,'h006',-828.3,-11337.5,270.)
set loc_unit01=CreateUnit(loc_player01,'h006',-57.2,-11334.8,270.)
set loc_unit01=CreateUnit(loc_player01,'h006',-447.1,-12483.3,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',322.4,-12482.6,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',-1333.2,-12368.1,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',-552.3,-11726.8,158.705)
set loc_unit01=CreateUnit(loc_player01,'h006',1248.2,-12601.8,272.422)
set loc_unit01=CreateUnit(loc_player01,'h006',-61.7,-13633.7,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',-1324.8,-13676.9,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',-711.,-13284.8,224.133)
set loc_unit01=CreateUnit(loc_player01,'h006',-796.,-13870.3,127.3)
set loc_unit01=CreateUnit(loc_player01,'h006',-1468.6,-14022.8,44.155)
set loc_unit01=CreateUnit(loc_player01,'h006',503.,-10682.8,213.471)
set loc_unit01=CreateUnit(loc_player01,'h006',-1204.7,-10608.2,320.063)
set loc_unit01=CreateUnit(loc_player01,'h006',1793.5,-11009.6,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',2415.6,-8980.,269.866)
set loc_unit01=CreateUnit(loc_player01,'h006',2390.3,-11059.8,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',1078.3,-8898.1,312.362)
set loc_unit01=CreateUnit(loc_player01,'h006',350.9,-8847.,187.966)
set loc_unit01=CreateUnit(loc_player01,'h006',385.2,-9011.5,332.855)
set loc_unit01=CreateUnit(loc_player01,'h006',560.7,-10010.9,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',24.9,-8973.9,269.322)
set loc_unit01=CreateUnit(loc_player01,'h006',-323.8,-9280.7,222.345)
set loc_unit01=CreateUnit(loc_player01,'h006',-320.1,-9794.8,270.)
set loc_unit01=CreateUnit(loc_player01,'h006',-1469.6,-9927.4,.0)
set loc_unit01=CreateUnit(loc_player01,'h006',-1484.7,-8763.2,135.403)
set loc_unit01=CreateUnit(loc_player01,'h006',-666.5,-9960.,132.846)
set loc_unit01=CreateUnit(loc_player01,'h006',3775.4,-12864.9,308.969)
set loc_unit01=CreateUnit(loc_player01,'h006',8130.9,-10566.6,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',7929.,-11659.9,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',8155.5,-11338.6,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',8867.3,-11341.5,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',9141.5,-11713.5,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',8896.6,-11966.9,270.)
set loc_unit01=CreateUnit(loc_player01,'h006',8123.8,-11966.9,270.)
set loc_unit01=CreateUnit(loc_player01,'h006',7609.1,-12607.3,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',8888.5,-10576.9,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',10180.9,-11584.5,90.)
set loc_unit01=CreateUnit(loc_player01,'h006',9896.7,-11313.1,134.841)
set loc_unit01=CreateUnit(loc_player01,'h006',9922.,-12093.,270.)
set loc_unit01=CreateUnit(loc_player01,'h006',10431.3,-12093.,270.)
set loc_unit01=CreateUnit(loc_player01,'h006',10449.2,-11862.4,329.182)
set loc_unit01=CreateUnit(loc_player01,'h006',10442.2,-11337.3,50.142)
set loc_unit01=CreateUnit(loc_player01,'h006',9925.7,-11852.1,201.639)
set loc_unit01=CreateUnit(loc_player01,'h006',10045.,-12861.6,137.177)
set loc_unit01=CreateUnit(loc_player01,'h006',7105.,-12868.5,313.784)
set loc_unit01=CreateUnit(loc_player01,'h006',4676.5,-8772.6,42.108)
set loc_player01=Player(0)
set loc_unit01=CreateUnit(loc_player01,'n003',5184.,1344.,270.)
set loc_player01=Player(1)
set loc_unit01=CreateUnit(loc_player01,'n003',5367.1,1081.3,270.)
set loc_player01=Player(2)
set loc_unit01=CreateUnit(loc_player01,'n003',5312.,832.,270.)
set loc_player01=Player(3)
set loc_unit01=CreateUnit(loc_player01,'n003',5120.,704.,270.)
set loc_player01=Player(4)
set loc_unit01=CreateUnit(loc_player01,'n003',4864.,768.,270.)
set loc_player01=Player(5)
set loc_unit01=CreateUnit(loc_player01,'n003',4696.3,924.3,52.121)
set loc_player01=Player(6)
set loc_unit01=CreateUnit(loc_player01,'n003',4696.3,1162.7,50.616)
set loc_unit01=CreateUnit(loc_player01,'n003',4678.9,1137.3,251.661)
set loc_player01=Player(7)
set loc_unit01=CreateUnit(loc_player01,'n003',4799.9,1345.7,67.821)
set loc_player01=Player(8)
set loc_unit01=CreateUnit(loc_player01,'n003',4977.,1398.7,322.997)
set loc_player01=Player(9)
set loc_unit01=CreateUnit(loc_player01,'n003',5299.1,1261.8,315.746)
set loc_player01=Player(10)
set loc_unit01=CreateUnit(loc_player01,'n003',4994.2,717.,172.128)
call ConfigureNeutralVictim()
set udg_boolexpr01=Filter(function Func0023)
set filterIssueHauntOrderAtLocBJ=Filter(function IssueHauntOrderAtLocBJFilter)
set filterEnumDestructablesInCircleBJ=Filter(function Func0003)
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 loc_integer03=0
loop
exitwhen loc_integer03==16
set bj_FORCE_PLAYER[loc_integer03]=CreateForce()
call ForceAddPlayer(bj_FORCE_PLAYER[loc_integer03],Player(loc_integer03))
set loc_integer03=loc_integer03+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 loc_integer03=0
loop
exitwhen loc_integer03>=bj_MAX_QUEUED_TRIGGERS
set bj_queuedExecTriggers[loc_integer03]=null
set bj_queuedExecUseConds[loc_integer03]=false
set loc_integer03=loc_integer03+1
endloop
set bj_isSinglePlayer=false
set loc_integer04=0
set loc_integer03=0
loop
exitwhen loc_integer03>=12
if(GetPlayerController(Player(loc_integer03))==MAP_CONTROL_USER and GetPlayerSlotState(Player(loc_integer03))==PLAYER_SLOT_STATE_PLAYING)then
set loc_integer04=loc_integer04+1
endif
set loc_integer03=loc_integer03+1
endloop
set bj_isSinglePlayer=(loc_integer04==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 loc_version01=VersionGet()
if(loc_version01==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 loc_integer05=0
loop
set bj_stockAllowedPermanent[loc_integer05]=false
set bj_stockAllowedCharged[loc_integer05]=false
set bj_stockAllowedArtifact[loc_integer05]=false
set loc_integer05=loc_integer05+1
exitwhen loc_integer05>10
endloop
call SetAllItemTypeSlots(11)
call SetAllUnitTypeSlots(11)
set bj_stockUpdateTimer=CreateTimer()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INITIAL_DELAY,false,function Func0022)
set bj_stockItemPurchased=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(27),EVENT_PLAYER_UNIT_SELL_ITEM,null)
// MORE ZOMBIE PLAYERS
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(12),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(13),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(14),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(15),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(16),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(17),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(18),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(19),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(20),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(21),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(22),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(23),EVENT_PLAYER_UNIT_SELL_ITEM,null)
// ----
call TriggerAddAction(bj_stockItemPurchased,function RemovePurchasedItem)
call DetectGameStarted()
set loc_integer06=0
set udg_force01=CreateForce()
set loc_integer06=0
loop
exitwhen(loc_integer06>11)
set udg_units01[loc_integer06]=null
set udg_integers01[loc_integer06]=0
set udg_integers02[loc_integer06]=120
set udg_booleans01[loc_integer06]=false
set udg_integers04[loc_integer06]=0
set udg_strings03[loc_integer06]=""
set udg_integers08[loc_integer06]=0
set udg_booleans03[loc_integer06]=false
set udg_booleans04[loc_integer06]=false
set udg_booleans05[loc_integer06]=false
set udg_integers09[loc_integer06]=0
set udg_booleans06[loc_integer06]=false
set udg_integers11[loc_integer06]=0
set udg_integers12[loc_integer06]=0
set udg_integers13[loc_integer06]=0
set udg_booleans09[loc_integer06]=false
set udg_integers14[loc_integer06]=0
set udg_strings04[loc_integer06]=""
set udg_integers19[loc_integer06]=0
set udg_integers20[loc_integer06]=1
set udg_integers21[loc_integer06]=0
set udg_booleans11[loc_integer06]=false
set udg_integers34[loc_integer06]=0
set loc_integer06=loc_integer06+1
endloop
set udg_group01=CreateGroup()
set loc_integer06=0
loop
exitwhen(loc_integer06>15)
set udg_strings01[loc_integer06]=""
set udg_strings02[loc_integer06]=""
set udg_integers26[loc_integer06]=0
set udg_integers27[loc_integer06]=0
set loc_integer06=loc_integer06+1
endloop
set udg_group02=CreateGroup()
//
set loc_integer06 = 0
loop
set udg_ShellsPerMission[loc_integer06] = 2
set udg_MissionRadius[loc_integer06] = 200
set udg_ShellsRemaining[loc_integer06] = 500
set loc_integer06 = loc_integer06 + 1
exitwhen (loc_integer06 == bj_MAX_PLAYERS)
endloop
//
set loc_integer06=0
loop
exitwhen(loc_integer06>3)
set udg_booleans02[loc_integer06]=false
set udg_booleans08[loc_integer06]=false
set loc_integer06=loc_integer06+1
endloop
set udg_group03=CreateGroup()
set loc_integer06=0
loop
exitwhen(loc_integer06>1)
set udg_integers06[loc_integer06]=0
set udg_integers07[loc_integer06]=0
set udg_integers15[loc_integer06]=1
set udg_integers16[loc_integer06]=0
set udg_reals01[loc_integer06]=0
set udg_integers28[loc_integer06]=0
set udg_strings07[loc_integer06]=""
set udg_groups01[loc_integer06]=CreateGroup()
set udg_integers31[loc_integer06]=0
set udg_booleans13[loc_integer06]=false
set udg_booleans14[loc_integer06]=false
set udg_booleans15[loc_integer06]=false
set udg_timers01[loc_integer06]=CreateTimer()
set loc_integer06=loc_integer06+1
endloop
set udg_group04=CreateGroup()
set udg_group05=CreateGroup()
set udg_group06=CreateGroup()
set udg_dialog01=DialogCreate()
set udg_group07=CreateGroup()
set loc_integer06=0
loop
exitwhen(loc_integer06>2)
set udg_integers10[loc_integer06]=0
set udg_integers23[loc_integer06]=0
set udg_forces01[loc_integer06]=CreateForce()
set udg_integers33[loc_integer06]=0
set loc_integer06=loc_integer06+1
endloop
set udg_force02=CreateForce()
set udg_force03=CreateForce()
set udg_force04=CreateForce()
set udg_multiboard01=CreateMultiboard()
set udg_group08=CreateGroup()
set udg_group09=CreateGroup()
set udg_group10=CreateGroup()
set loc_integer06=0
loop
exitwhen(loc_integer06>5)
set udg_booleans07[loc_integer06]=false
set udg_integers22[loc_integer06]=0
set udg_integers32[loc_integer06]=0
set loc_integer06=loc_integer06+1
endloop
set udg_group11=CreateGroup()
set udg_group12=CreateGroup()
set udg_group13=CreateGroup()
set udg_group14=CreateGroup()
set udg_group15=CreateGroup()
set udg_group16=CreateGroup()
set udg_force05=CreateForce()
set udg_group17=CreateGroup()
set udg_group18=CreateGroup()
set udg_group19=CreateGroup()
set udg_group20=CreateGroup()
set loc_integer06=0
loop
exitwhen(loc_integer06>19)
set udg_integers17[loc_integer06]=0
set udg_integers18[loc_integer06]=0
set udg_strings05[loc_integer06]=""
set loc_integer06=loc_integer06+1
endloop
set udg_force06=CreateForce()
set udg_force07=CreateForce()
set udg_group21=CreateGroup()
set udg_group22=CreateGroup()
set udg_integer29=1
set loc_integer06=0
loop
exitwhen(loc_integer06>4)
set udg_booleans10[loc_integer06]=false
set udg_booleans12[loc_integer06]=false
set udg_groups02[loc_integer06]=CreateGroup()
set loc_integer06=loc_integer06+1
endloop
set udg_group23=CreateGroup()
set udg_group24=CreateGroup()
set udg_group25=CreateGroup()
set udg_real02=30.
set udg_real03=70.
set udg_real04=1.
set udg_timer01=CreateTimer()
set udg_timer02=CreateTimer()
set udg_group26=CreateGroup()
set udg_timer03=CreateTimer()
set udg_timer04=CreateTimer()
set udg_integer38=5
set udg_dialog02=DialogCreate()
set udg_timer05=CreateTimer()
set udg_group27=CreateGroup()
set udg_group28=CreateGroup()
set udg_force08=CreateForce()
set udg_group29=CreateGroup()
call Func0040()
call Func0045()
call Func0087()
set udg_gamecache04=InitGameCache("jasslocalvars.w3v")
set udg_trigger01=CreateTrigger()
call TriggerAddAction(udg_trigger01,function Func0255)
set udg_trigger02=CreateTrigger()
call TriggerAddAction(udg_trigger02,function Func0256)
set udg_trigger03=CreateTrigger()
call TriggerAddAction(udg_trigger03,function Func0257)
set udg_trigger04=CreateTrigger()
call TriggerAddAction(udg_trigger04,function Func0258)
set udg_trigger05=CreateTrigger()
call TriggerRegisterTimerEventSingle(udg_trigger05,.01)
call TriggerAddAction(udg_trigger05,function Func0267)
set udg_trigger06=CreateTrigger()
call TriggerAddAction(udg_trigger06,function Func0271)
set udg_trigger08=CreateTrigger()
call TriggerAddAction(udg_trigger08,function Func0274)
set udg_trigger09=CreateTrigger()
call TriggerAddAction(udg_trigger09,function Func0276)
set udg_trigger10=CreateTrigger()
set udg_trigger11=CreateTrigger()
call TriggerAddAction(udg_trigger11,function Func0288)
set udg_trigger12=CreateTrigger()
call DisableTrigger(udg_trigger12)
call TriggerRegisterTimerEventPeriodic(udg_trigger12,1.)
call TriggerAddAction(udg_trigger12,function Func0295)
set udg_trigger13=CreateTrigger()
call TriggerAddAction(udg_trigger13,function Func0302)
set udg_trigger14=CreateTrigger()
call DisableTrigger(udg_trigger14)
call TriggerRegisterTimerEventPeriodic(udg_trigger14,GetRandomReal(3.,4.))
call TriggerAddCondition(udg_trigger14,Condition(function Func0303))
call TriggerAddAction(udg_trigger14,function Func0320)
set udg_trigger15=CreateTrigger()
call TriggerRegisterTimerEventSingle(udg_trigger15,120.)
call TriggerRegisterTimerEventPeriodic(udg_trigger15,1500.)
call TriggerAddAction(udg_trigger15,function Func0327)
set udg_trigger16=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(udg_trigger16,Player(11),EVENT_PLAYER_UNIT_ATTACKED,null)
call TriggerRegisterPlayerUnitEvent(udg_trigger16,Player(24),EVENT_PLAYER_UNIT_ATTACKED,null)
call TriggerAddCondition(udg_trigger16,Condition(function Func0328))
call TriggerAddAction(udg_trigger16,function Func0329)
set udg_trigger19=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger19,GetRandomReal(2.6,5.))
call TriggerAddAction(udg_trigger19,function Func0334)
set udg_trigger23=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger23,GetRandomReal(1.2,1.7))
call TriggerAddAction(udg_trigger23,function Func0344)
set udg_trigger24=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger24,GetRandomReal(2.5,3.5))
call TriggerAddAction(udg_trigger24,function Func0346)
set udg_trigger25=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger25,GetRandomReal(1.2,1.7))
call TriggerAddAction(udg_trigger25,function Func0348)
set udg_trigger26=CreateTrigger()
call TriggerAddAction(udg_trigger26,function Func0351)
set udg_trigger27=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger27,3.)
call TriggerAddAction(udg_trigger27,function Func0383)
set udg_trigger28=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger28,1.)
call TriggerAddAction(udg_trigger28,function Func0384)
call Func0073(0,"+!*gaCBADEFGHJKLMNOPQRSTUVWXYZbcdefhjklmnopqrstuvwxzy9876543210@",7)
set udg_trigger29=CreateTrigger()
call TriggerAddAction(udg_trigger29,function Func0385)
set udg_trigger30=CreateTrigger()
call TriggerRegisterTimerEventSingle(udg_trigger30,.1)
call TriggerAddAction(udg_trigger30,function Func0386)
set udg_trigger31=CreateTrigger()
call TriggerRegisterPlayerChatEvent(udg_trigger31,Player(0),"-save",true)
call TriggerRegisterPlayerChatEvent(udg_trigger31,Player(1),"-save",true)
call TriggerRegisterPlayerChatEvent(udg_trigger31,Player(2),"-save",true)
call TriggerRegisterPlayerChatEvent(udg_trigger31,Player(3),"-save",true)
call TriggerRegisterPlayerChatEvent(udg_trigger31,Player(4),"-save",true)
call TriggerRegisterPlayerChatEvent(udg_trigger31,Player(5),"-save",true)
call TriggerRegisterPlayerChatEvent(udg_trigger31,Player(6),"-save",true)
call TriggerRegisterPlayerChatEvent(udg_trigger31,Player(7),"-save",true)
call TriggerRegisterPlayerChatEvent(udg_trigger31,Player(8),"-save",true)
call TriggerRegisterPlayerChatEvent(udg_trigger31,Player(9),"-save",true)
call TriggerRegisterPlayerChatEvent(udg_trigger31,Player(10),"-save",true)
call TriggerAddAction(udg_trigger31,function Func0387)
set udg_trigger32=CreateTrigger()
call TriggerRegisterPlayerChatEvent(udg_trigger32,Player(0),"-load",false)
call TriggerRegisterPlayerChatEvent(udg_trigger32,Player(1),"-load",false)
call TriggerRegisterPlayerChatEvent(udg_trigger32,Player(2),"-load",false)
call TriggerRegisterPlayerChatEvent(udg_trigger32,Player(3),"-load",false)
call TriggerRegisterPlayerChatEvent(udg_trigger32,Player(4),"-load",false)
call TriggerRegisterPlayerChatEvent(udg_trigger32,Player(5),"-load",false)
call TriggerRegisterPlayerChatEvent(udg_trigger32,Player(6),"-load",false)
call TriggerRegisterPlayerChatEvent(udg_trigger32,Player(7),"-load",false)
call TriggerRegisterPlayerChatEvent(udg_trigger32,Player(8),"-load",false)
call TriggerRegisterPlayerChatEvent(udg_trigger32,Player(9),"-load",false)
call TriggerRegisterPlayerChatEvent(udg_trigger32,Player(10),"-load",false)
call TriggerAddCondition(udg_trigger32,Condition(function Func0388))
call TriggerAddAction(udg_trigger32,function Func0395)
set udg_trigger33=CreateTrigger()
call DisableTrigger(udg_trigger33)
call TriggerRegisterTimerEventPeriodic(udg_trigger33,2.)
call TriggerAddAction(udg_trigger33,function Func0411)
set udg_trigger34=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger34,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger34,Condition(function Func0412))
call TriggerAddAction(udg_trigger34,function ActionKillXP)
set udg_trigger35=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger35,1.)
call TriggerAddAction(udg_trigger35,function Func0417)
set udg_trigger36=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger36,20.)
call TriggerAddAction(udg_trigger36,function Func0418)
set udg_trigger37=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger37,EVENT_PLAYER_UNIT_SELL)
call TriggerAddCondition(udg_trigger37,Condition(function Func0419))
call TriggerAddAction(udg_trigger37,function Func0452)
set udg_trigger38=CreateTrigger()
call TriggerAddAction(udg_trigger38,function Func0454)
set udg_trigger39=CreateTrigger()
call TriggerRegisterTimerEventSingle(udg_trigger39,90.)
call TriggerAddAction(udg_trigger39,function Func0457)
set udg_trigger40=CreateTrigger()
call DisableTrigger(udg_trigger40)
call TriggerRegisterTimerEventPeriodic(udg_trigger40,10.)
call TriggerAddCondition(udg_trigger40,Condition(function Func0458))
call TriggerAddAction(udg_trigger40,function Func0465)
set udg_trigger41=CreateTrigger()
set udg_trigger42=CreateTrigger()
call TriggerRegisterPlayerChatEvent(udg_trigger42,Player(0),"-rifle",true)
call TriggerAddCondition(udg_trigger42,Condition(function Func0472))
call TriggerAddAction(udg_trigger42,function Func0474)
set udg_trigger43=CreateTrigger()
call TriggerRegisterPlayerChatEvent(udg_trigger43,Player(0),"-outbreak",true)
call TriggerAddCondition(udg_trigger43,Condition(function Func0475))
call TriggerAddAction(udg_trigger43,function Func0478)
set udg_trigger44=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger44,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(udg_trigger44,Condition(function Func0479))
call TriggerAddAction(udg_trigger44,function Func0480)
set udg_trigger45=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger45,2.)
call TriggerAddAction(udg_trigger45,function Func0494)
call TriggerRegisterTimerEventSingle(udg_trigger48,.0)
call TriggerAddAction(udg_trigger48,function Func0499)
set udg_trigger49=CreateTrigger()
call TriggerAddAction(udg_trigger49,function Func0502)
set udg_trigger50=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger50,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger50,Condition(function Func0503))
call TriggerAddAction(udg_trigger50,function Func0506)
set udg_trigger51=CreateTrigger()
call TriggerAddAction(udg_trigger51,function Func0508)
set udg_trigger52=CreateTrigger()
call TriggerAddAction(udg_trigger52,function Func0510)
set udg_trigger53=CreateTrigger()
call TriggerAddAction(udg_trigger53,function Func0512)
set udg_trigger55=CreateTrigger()
call TriggerAddAction(udg_trigger55,function Func0528)
set udg_trigger56=CreateTrigger()
call TriggerAddCondition(udg_trigger56,Condition(function Func0529))
call TriggerAddAction(udg_trigger56,function Func0530)
set udg_trigger57=CreateTrigger()
call TriggerAddAction(udg_trigger57,function Func0532)
set udg_trigger58=CreateTrigger()
call TriggerAddCondition(udg_trigger58,Condition(function Func0533))
call TriggerAddAction(udg_trigger58,function Func0536)
set udg_trigger59=CreateTrigger()
call TriggerAddCondition(udg_trigger59,Condition(function Func0537))
call TriggerAddAction(udg_trigger59,function Func0539)
set udg_trigger60=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger60,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger60,Condition(function Func0540))
call TriggerAddAction(udg_trigger60,function Func0552)
set udg_trigger61=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger61,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger61,Condition(function Func0553))
call TriggerAddAction(udg_trigger61,function Func0555)
set udg_trigger62=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger62,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger62,Condition(function Func0557))
call TriggerAddAction(udg_trigger62,function Func0560)
set udg_trigger63=CreateTrigger()
call TriggerAddCondition(udg_trigger63,Condition(function Func0561))
call TriggerAddAction(udg_trigger63,function Func0566)
set udg_trigger64=CreateTrigger()
call DisableTrigger(udg_trigger64)
call TriggerRegisterTimerEventPeriodic(udg_trigger64,3.)
call TriggerAddAction(udg_trigger64,function Func0568)
set udg_trigger65=CreateTrigger()
call TriggerRegisterTimerEventSingle(udg_trigger65,.0)
call TriggerAddAction(udg_trigger65,function Func0575)
set udg_trigger66=CreateTrigger()
call TriggerRegisterDialogEvent(udg_trigger66,udg_dialog01)
call TriggerAddAction(udg_trigger66,function UAActionDifficulty)
set udg_trigger68=CreateTrigger()
call TriggerAddAction(udg_trigger68,function Func0602)
set udg_trigger71=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger71,2.1)
call TriggerAddAction(udg_trigger71,function Func0608)
set udg_trigger87=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger87,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger87,Condition(function Func0640))
call TriggerAddAction(udg_trigger87,function Func0642)
set udg_trigger92=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger92,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger92,Condition(function Func0651))
call TriggerAddAction(udg_trigger92,function Func0652)
set udg_trigger94=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger94,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger94,Condition(function Func0655))
call TriggerAddAction(udg_trigger94,function Func0657)
set udg_trigger99=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger99,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(udg_trigger99,Condition(function Func0666))
call TriggerAddAction(udg_trigger99,function ActionLeap)
set udg_trigger109=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger109,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger109,Condition(function Func0696))
call TriggerAddAction(udg_trigger109,function Func0697)
set udg_trigger113=CreateTrigger()
//call TriggerRegisterAnyUnitEventBJ(udg_trigger113,EVENT_PLAYER_UNIT_SPELL_CAST)
//call TriggerAddCondition(udg_trigger113,Condition(function Func0704))
//call TriggerAddAction(udg_trigger113,function ActionJump)
set udg_trigger115=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger115,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(udg_trigger115,Condition(function Func0712))
call TriggerAddAction(udg_trigger115,function Func0715)
set udg_trigger116=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger116,3.2)
call TriggerAddAction(udg_trigger116,function Func0717)
set udg_trigger119=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger119,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(udg_trigger119,Condition(function Func0726))
call TriggerAddAction(udg_trigger119,function Func0733)
set udg_trigger120=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger120,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger120,Condition(function Func0734))
call TriggerAddAction(udg_trigger120,function Func0735)
set udg_trigger123=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger123,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(udg_trigger123,Condition(function Func0739))
call TriggerAddAction(udg_trigger123,function Func0741)
set udg_trigger124=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger124,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger124,Condition(function Func0742))
call TriggerAddAction(udg_trigger124,function Func0743)
set udg_trigger125=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger125,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger125,Condition(function Func0744))
call TriggerAddAction(udg_trigger125,function Func0749)
set udg_trigger127=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger127,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger127,Condition(function Func0752))
call TriggerAddAction(udg_trigger127,function Func0753)
set udg_trigger130=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger130,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger130,Condition(function Func0788))
call TriggerAddAction(udg_trigger130,function Func0789)
call Func0126('A044')
call Func0193('A045',"Func0807")
set udg_trigger133=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger133,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(udg_trigger133,Condition(function Func0810))
call TriggerAddAction(udg_trigger133,function Func0811)
set udg_trigger135=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger135,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger135,Condition(function Func0815))
call TriggerAddAction(udg_trigger135,function Func0820)
set udg_trigger137=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger137,.83)
call TriggerAddAction(udg_trigger137,function Func0831)
set udg_trigger138=CreateTrigger()
call DisableTrigger(udg_trigger138)
call TriggerRegisterTimerEventPeriodic(udg_trigger138,5.)
call TriggerAddCondition(udg_trigger138,Condition(function Func0832))
call TriggerAddAction(udg_trigger138,function Func0833)
set udg_trigger140=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger140,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(udg_trigger140,Condition(function Func0836))
call TriggerAddAction(udg_trigger140,function Func0839)
set udg_trigger141=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger141,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(udg_trigger141,Condition(function Func0841))
call TriggerAddAction(udg_trigger141,function Func0851)
set udg_trigger142=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger142,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(udg_trigger142,Condition(function Func0852))
call TriggerAddAction(udg_trigger142,function Func0853)
set udg_trigger143=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger143,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(udg_trigger143,Condition(function Func0854))
call TriggerAddAction(udg_trigger143,function Func0855)
set udg_trigger144=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger144,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(udg_trigger144,Condition(function Func0856))
call TriggerAddAction(udg_trigger144,function Func0857)
set udg_trigger145=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger145,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddAction(udg_trigger145,function Func0866)
set udg_trigger146=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger146,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(udg_trigger146,Condition(function Func0867))
call TriggerAddAction(udg_trigger146,function Func0869)
set udg_trigger147=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger147,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(udg_trigger147,Condition(function Func0870))
call TriggerAddAction(udg_trigger147,function Func0871)
set udg_trigger148=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger148,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddAction(udg_trigger148,function Func0881)
set udg_trigger149=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger149,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(udg_trigger149,Condition(function Func0882))
call TriggerAddAction(udg_trigger149,function Func0885)
set udg_trigger151=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger151,.8)
call TriggerAddAction(udg_trigger151,function Func0893)
set udg_trigger152=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger152,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger152,Condition(function Func0894))
call TriggerAddAction(udg_trigger152,function Func0897)
set udg_trigger153=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger153,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger153,Condition(function Func0898))
call TriggerAddAction(udg_trigger153,function Func0899)
set udg_trigger154=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger154,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger154,Condition(function Func0900))
call TriggerAddAction(udg_trigger154,function Func0909)
set udg_trigger155=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger155,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger155,Condition(function Func0910))
call TriggerAddAction(udg_trigger155,function Func0912)
set udg_trigger156=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger156,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(udg_trigger156,Condition(function Func0913))
call TriggerAddAction(udg_trigger156,function Func0915)
set udg_trigger157=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger157,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddAction(udg_trigger157,function Func0917)
set udg_trigger158=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger158,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(udg_trigger158,Condition(function Func0918))
call TriggerAddAction(udg_trigger158,function Func0922)
set udg_trigger159=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger159,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(udg_trigger159,Condition(function Func0923))
call TriggerAddAction(udg_trigger159,function Func0931)
set udg_trigger160=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger160,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(udg_trigger160,Condition(function Func0933))
call TriggerAddAction(udg_trigger160,function Func0938)
set udg_trigger161=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger161,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddAction(udg_trigger161,function Func0941)
set udg_trigger162=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger162,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(udg_trigger162,Condition(function Func0942))
call TriggerAddAction(udg_trigger162,function Func0960)
set udg_trigger163=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger163,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(udg_trigger163,Condition(function Func0962))
call TriggerAddAction(udg_trigger163,function Func0969)
set udg_trigger164=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger164,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(udg_trigger164,Condition(function Func0970))
call TriggerAddAction(udg_trigger164,function Func0979)
set udg_trigger165=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger165,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(udg_trigger165,Condition(function Func0981))
call TriggerAddAction(udg_trigger165,function Func0987)
set udg_trigger166=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger166,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger166,Condition(function Func0988))
call TriggerAddAction(udg_trigger166,function Func0990)
set udg_trigger167=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger167,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddAction(udg_trigger167,function Func0991)
set udg_trigger168=CreateTrigger()
call TriggerAddAction(udg_trigger168,function Func0993)
set udg_trigger169=CreateTrigger()
call TriggerRegisterTimerEventSingle(udg_trigger169,5.)
call TriggerRegisterTimerEventPeriodic(udg_trigger169,GetRandomReal(600.,800.))
call TriggerAddAction(udg_trigger169,function Func0996)
set udg_trigger170=CreateTrigger()
call TriggerRegisterTimerEventSingle(udg_trigger170,1080.)
call TriggerRegisterTimerEventSingle(udg_trigger170,1800.)
call TriggerAddAction(udg_trigger170,function Func0997)
set udg_trigger172=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger172,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddAction(udg_trigger172,function Func1005)
set udg_trigger174=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger174,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddAction(udg_trigger174,function Func1012)
set udg_trigger180=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger180,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddAction(udg_trigger180,function Func1036)
set udg_trigger201=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger201,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(udg_trigger201,Condition(function Func1090))
call TriggerAddAction(udg_trigger201,function Func1091)
set udg_trigger202=CreateTrigger()
call TriggerAddAction(udg_trigger202,function Func1092)
set udg_trigger204=CreateTrigger()
call TriggerAddAction(udg_trigger204,function Func1097)
set udg_trigger205=CreateTrigger()
call TriggerAddCondition(udg_trigger205,Condition(function Func1098))
call TriggerAddAction(udg_trigger205,function Func1100)
set udg_trigger206=CreateTrigger()
call TriggerAddAction(udg_trigger206,function Func1101)
set udg_trigger207=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger207,60.)
call TriggerAddAction(udg_trigger207,function Func1105)
set udg_trigger208=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger208,GetRandomReal(20.,45.))
call TriggerAddAction(udg_trigger208,function Func1107)
set udg_trigger209=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger209,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger209,Condition(function Func1108))
call TriggerAddAction(udg_trigger209,function Func1112)
set udg_trigger210=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger210,GetRandomReal(8.,10.))
call TriggerAddCondition(udg_trigger210,Condition(function Func1113))
call TriggerAddAction(udg_trigger210,function Func1114)
set udg_trigger211=CreateTrigger()
call DisableTrigger(udg_trigger211)
call TriggerRegisterTimerEventPeriodic(udg_trigger211,GetRandomReal(8.,10.))
call TriggerAddCondition(udg_trigger211,Condition(function Func1115))
call TriggerAddAction(udg_trigger211,function Func1117)
set udg_trigger212=CreateTrigger()
call DisableTrigger(udg_trigger212)
call TriggerRegisterTimerEventPeriodic(udg_trigger212,9.)
call TriggerAddCondition(udg_trigger212,Condition(function Func1118))
call TriggerAddAction(udg_trigger212,function Func1120)
set udg_trigger213=CreateTrigger()
call DisableTrigger(udg_trigger213)
call TriggerRegisterTimerEventPeriodic(udg_trigger213,15.)
call TriggerAddCondition(udg_trigger213,Condition(function Func1121))
call TriggerAddAction(udg_trigger213,function Func1123)
set udg_trigger214=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger214,90.)
call TriggerAddCondition(udg_trigger214,Condition(function Func1124))
call TriggerAddAction(udg_trigger214,function Func1126)
set udg_trigger215=CreateTrigger()
call DisableTrigger(udg_trigger215)
call TriggerRegisterTimerEventPeriodic(udg_trigger215,180.)
call TriggerAddCondition(udg_trigger215,Condition(function Func1127))
call TriggerAddAction(udg_trigger215,function Func1129)
set udg_trigger216=CreateTrigger()
call DisableTrigger(udg_trigger216)
call TriggerRegisterTimerEventPeriodic(udg_trigger216,120.)
call TriggerAddCondition(udg_trigger216,Condition(function Func1130))
call TriggerAddAction(udg_trigger216,function Func1132)
set udg_trigger217=CreateTrigger()
call DisableTrigger(udg_trigger217)
call TriggerRegisterTimerEventPeriodic(udg_trigger217,120.)
call TriggerAddCondition(udg_trigger217,Condition(function Func1133))
call TriggerAddAction(udg_trigger217,function Func1135)
set udg_trigger218=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger218,30.)
call TriggerAddCondition(udg_trigger218,Condition(function Func1136))
call TriggerAddAction(udg_trigger218,function Func1138)
set udg_trigger219=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger219,GetRandomReal(2.,5.))
call TriggerAddAction(udg_trigger219,function Func1141)
set udg_trigger220=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger220,GetRandomReal(1.2,1.7))
call TriggerAddAction(udg_trigger220,function Func1143)
set udg_trigger221=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger221,GetRandomReal(1.2,2.2))
call TriggerAddAction(udg_trigger221,function Func1145)
set udg_trigger222=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger222,GetRandomReal(1.,1.5))
call TriggerAddAction(udg_trigger222,function Func1147)
set udg_trigger223=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger223,GetRandomReal(1.,1.5))
call TriggerAddAction(udg_trigger223,function Func1149)
set udg_trigger224=CreateTrigger()
call TriggerAddAction(udg_trigger224,function Func1175)
set udg_trigger225=CreateTrigger()
call TriggerAddAction(udg_trigger225,function Func1179)
set udg_trigger226=CreateTrigger()
call TriggerAddAction(udg_trigger226,function Func1182)
set udg_trigger227=CreateTrigger()
call TriggerAddAction(udg_trigger227,function Func1183)
set udg_trigger228=CreateTrigger()
call TriggerAddAction(udg_trigger228,function Func1188)
set udg_trigger229=CreateTrigger()
call DisableTrigger(udg_trigger229)
call TriggerRegisterTimerEventPeriodic(udg_trigger229,5.)
call TriggerAddAction(udg_trigger229,function Func1190)
set udg_trigger230=CreateTrigger()
call DisableTrigger(udg_trigger230)
call TriggerRegisterAnyUnitEventBJ(udg_trigger230,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(udg_trigger230,Condition(function Func1193))
call TriggerAddAction(udg_trigger230,function Func1196)
set udg_trigger231=CreateTrigger()
call DisableTrigger(udg_trigger231)
call TriggerRegisterTimerEventSingle(udg_trigger231,GetRandomReal(240.,360.))
call TriggerAddCondition(udg_trigger231,Condition(function Func1197))
call TriggerAddAction(udg_trigger231,function Func1199)
set udg_trigger232=CreateTrigger()
call TriggerRegisterEnterRectSimple(udg_trigger232,udg_rect101)
call TriggerRegisterEnterRectSimple(udg_trigger232,udg_rect102)
call TriggerRegisterEnterRectSimple(udg_trigger232,udg_rect89)
call TriggerAddCondition(udg_trigger232,Condition(function Func1200))
call TriggerAddAction(udg_trigger232,function Func1211)
set udg_trigger233=CreateTrigger()
call TriggerRegisterEnterRectSimple(udg_trigger233,udg_rect19)
call TriggerRegisterEnterRectSimple(udg_trigger233,udg_rect126)
call TriggerAddCondition(udg_trigger233,Condition(function Func1213))
call TriggerAddAction(udg_trigger233,function Func1215)
set udg_trigger234=CreateTrigger()
call TriggerRegisterPlayerSelectionEventBJ(udg_trigger234,Player(0),true)
call TriggerRegisterPlayerSelectionEventBJ(udg_trigger234,Player(1),true)
call TriggerRegisterPlayerSelectionEventBJ(udg_trigger234,Player(2),true)
call TriggerRegisterPlayerSelectionEventBJ(udg_trigger234,Player(3),true)
call TriggerRegisterPlayerSelectionEventBJ(udg_trigger234,Player(4),true)
call TriggerRegisterPlayerSelectionEventBJ(udg_trigger234,Player(5),true)
call TriggerRegisterPlayerSelectionEventBJ(udg_trigger234,Player(6),true)
call TriggerRegisterPlayerSelectionEventBJ(udg_trigger234,Player(7),true)
call TriggerRegisterPlayerSelectionEventBJ(udg_trigger234,Player(8),true)
call TriggerRegisterPlayerSelectionEventBJ(udg_trigger234,Player(9),true)
call TriggerRegisterPlayerSelectionEventBJ(udg_trigger234,Player(10),true)
call TriggerAddCondition(udg_trigger234,Condition(function Func1217))
call TriggerAddAction(udg_trigger234,function Func1219)
set udg_trigger235=CreateTrigger()
call DisableTrigger(udg_trigger235)
call TriggerRegisterEnterRectSimple(udg_trigger235,udg_rect06)
call TriggerAddCondition(udg_trigger235,Condition(function Func1220))
call TriggerAddAction(udg_trigger235,function Func1221)
set udg_trigger236=CreateTrigger()
call DisableTrigger(udg_trigger236)
call TriggerRegisterEnterRectSimple(udg_trigger236,udg_rect125)
call TriggerAddCondition(udg_trigger236,Condition(function Func1222))
call TriggerAddAction(udg_trigger236,function Func1223)
set udg_trigger237=CreateTrigger()
call DisableTrigger(udg_trigger237)
call TriggerRegisterEnterRectSimple(udg_trigger237,udg_rect126)
call TriggerAddCondition(udg_trigger237,Condition(function Func1224))
call TriggerAddAction(udg_trigger237,function Func1225)
set udg_trigger238=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger238,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger238,Condition(function Func1226))
call TriggerAddAction(udg_trigger238,function Func1227)
set udg_trigger239=CreateTrigger()
call TriggerAddCondition(udg_trigger239,Condition(function Func1231))
call TriggerAddAction(udg_trigger239,function Func1235)
set udg_trigger240=CreateTrigger()
call DisableTrigger(udg_trigger240)
call TriggerRegisterTimerEventPeriodic(udg_trigger240,5.)
call TriggerAddAction(udg_trigger240,function Func1239)
set udg_trigger241=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger241,GetRandomReal(13.,30.))
call TriggerAddAction(udg_trigger241,function Func1244)
set udg_trigger242=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger242,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger242,Condition(function Func1245))
call TriggerAddAction(udg_trigger242,function Func1246)
set udg_trigger243=CreateTrigger()
call DisableTrigger(udg_trigger243)
call TriggerRegisterTimerEventPeriodic(udg_trigger243,1.85)
call TriggerAddAction(udg_trigger243,function Func1262)
set udg_trigger244=CreateTrigger()
call DisableTrigger(udg_trigger244)
call TriggerRegisterTimerEventPeriodic(udg_trigger244,1.)
call TriggerAddCondition(udg_trigger244,Condition(function Func1263))
call TriggerAddAction(udg_trigger244,function Func1265)
set udg_trigger245=CreateTrigger()
call DisableTrigger(udg_trigger245)
call TriggerRegisterAnyUnitEventBJ(udg_trigger245,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(udg_trigger245,Condition(function Func1266))
call TriggerAddAction(udg_trigger245,function Func1278)
set udg_trigger246=CreateTrigger()
call DisableTrigger(udg_trigger246)
call TriggerRegisterTimerEventPeriodic(udg_trigger246,4.)
call TriggerAddAction(udg_trigger246,function Func1281)
set udg_trigger247=CreateTrigger()
call DisableTrigger(udg_trigger247)
call TriggerRegisterTimerEventPeriodic(udg_trigger247,2.)
call TriggerAddAction(udg_trigger247,function Func1311)
set udg_trigger248=CreateTrigger()
call TriggerAddCondition(udg_trigger248,Condition(function Func1312))
call TriggerAddAction(udg_trigger248,function Func1335)
set udg_trigger249=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger249,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger249,Condition(function Func1336))
call TriggerAddAction(udg_trigger249,function Func1338)
set udg_trigger250=CreateTrigger()
call TriggerRegisterEnterRectSimple(udg_trigger250,udg_rect25)
call TriggerRegisterEnterRectSimple(udg_trigger250,udg_rect112)
call TriggerAddCondition(udg_trigger250,Condition(function Func1339))
call TriggerAddAction(udg_trigger250,function Func1341)
set udg_trigger251=CreateTrigger()
call DisableTrigger(udg_trigger251)
call TriggerRegisterTimerEventPeriodic(udg_trigger251,3.)
call TriggerAddCondition(udg_trigger251,Condition(function Func1342))
call TriggerAddAction(udg_trigger251,function Func1351)
set udg_trigger252=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger252,2)
call TriggerAddCondition(udg_trigger252,Condition(function Func1352))
call TriggerAddAction(udg_trigger252,function Func1359)
set udg_trigger253=CreateTrigger()
call DisableTrigger(udg_trigger253)
call TriggerRegisterTimerEventPeriodic(udg_trigger253,1.1)
call TriggerAddAction(udg_trigger253,function Func1360)
set udg_trigger254=CreateTrigger()
call TriggerRegisterTimerExpireEvent(udg_trigger254,udg_timer01)
call TriggerAddAction(udg_trigger254,function Func1361)
set udg_trigger255=CreateTrigger()
call TriggerAddCondition(udg_trigger255,Condition(function Func1362))
call TriggerAddAction(udg_trigger255,function Func1363)
set udg_trigger256=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger256,1.25)
call TriggerAddCondition(udg_trigger256,Condition(function Func1364))
call TriggerAddAction(udg_trigger256,function Func1365)
set udg_trigger257=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger257,1.4)
call TriggerAddCondition(udg_trigger257,Condition(function Func1366))
call TriggerAddAction(udg_trigger257,function Func1367)
set udg_trigger258=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger258,1.8)
call TriggerAddCondition(udg_trigger258,Condition(function Func1368))
call TriggerAddAction(udg_trigger258,function Func1369)
set udg_trigger259=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger259,1.15)
call TriggerAddCondition(udg_trigger259,Condition(function Func1370))
call TriggerAddAction(udg_trigger259,function Func1371)
set udg_trigger260=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger260,1.28)
call TriggerAddCondition(udg_trigger260,Condition(function Func1372))
call TriggerAddAction(udg_trigger260,function Func1373)
set udg_trigger261=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger261,1.69)
call TriggerAddCondition(udg_trigger261,Condition(function Func1374))
call TriggerAddAction(udg_trigger261,function Func1375)
set udg_trigger262=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger262,2.)
call TriggerAddCondition(udg_trigger262,Condition(function Func1376))
call TriggerAddAction(udg_trigger262,function Func1377)
set udg_trigger263=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger263,2.3)
call TriggerAddCondition(udg_trigger263,Condition(function Func1378))
call TriggerAddAction(udg_trigger263,function Func1379)
set udg_trigger264=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger264,2.7)
call TriggerAddCondition(udg_trigger264,Condition(function Func1380))
call TriggerAddAction(udg_trigger264,function Func1381)
set udg_trigger265=CreateTrigger()
call TriggerAddCondition(udg_trigger265,Condition(function Func1382))
call TriggerAddAction(udg_trigger265,function Func1394)
set udg_trigger266=CreateTrigger()
call DisableTrigger(udg_trigger266)
call TriggerRegisterEnterRectSimple(udg_trigger266,udg_rect150)
call TriggerRegisterEnterRectSimple(udg_trigger266,udg_rect151)
call TriggerRegisterEnterRectSimple(udg_trigger266,udg_rect152)
call TriggerRegisterEnterRectSimple(udg_trigger266,udg_rect153)
call TriggerRegisterEnterRectSimple(udg_trigger266,udg_rect154)
call TriggerAddCondition(udg_trigger266,Condition(function Func1395))
call TriggerAddAction(udg_trigger266,function Func1398)
set udg_trigger267=CreateTrigger()
call DisableTrigger(udg_trigger267)
call TriggerRegisterTimerEventPeriodic(udg_trigger267,4.)
call TriggerAddAction(udg_trigger267,function Func1400)
set udg_trigger268=CreateTrigger()
call DisableTrigger(udg_trigger268)
call TriggerRegisterEnterRectSimple(udg_trigger268,udg_rect90)
call TriggerAddAction(udg_trigger268,function Func1402)
set udg_trigger269=CreateTrigger()
call DisableTrigger(udg_trigger269)
call TriggerRegisterTimerEventPeriodic(udg_trigger269,2.)
call TriggerAddCondition(udg_trigger269,Condition(function Func1403))
call TriggerAddAction(udg_trigger269,function Func1415)
set udg_trigger270=CreateTrigger()
call DisableTrigger(udg_trigger270)
call TriggerRegisterTimerEventPeriodic(udg_trigger270,15.)
call TriggerAddAction(udg_trigger270,function Func1417)
set udg_trigger271=CreateTrigger()
call TriggerRegisterEnterRectSimple(udg_trigger271,udg_rect25)
call TriggerAddCondition(udg_trigger271,Condition(function Func1418))
call TriggerAddAction(udg_trigger271,function Func1419)
set udg_trigger272=CreateTrigger()
call DisableTrigger(udg_trigger272)
call TriggerRegisterTimerEventPeriodic(udg_trigger272,2)
call TriggerAddAction(udg_trigger272,function Func1422)
set udg_trigger273=CreateTrigger()
call DisableTrigger(udg_trigger273)
call TriggerRegisterTimerEventPeriodic(udg_trigger273,2.35)
call TriggerAddAction(udg_trigger273,function Func1426)
set udg_trigger274=CreateTrigger()
call DisableTrigger(udg_trigger274)
call TriggerRegisterAnyUnitEventBJ(udg_trigger274,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(udg_trigger274,Condition(function Func1427))
call TriggerAddAction(udg_trigger274,function Func1429)
set udg_trigger275=CreateTrigger()
call DisableTrigger(udg_trigger275)
call TriggerRegisterTimerEventPeriodic(udg_trigger275,1.02)
call TriggerAddAction(udg_trigger275,function Func1432)
set udg_trigger276=CreateTrigger()
call TriggerAddCondition(udg_trigger276,Condition(function Func1433))
call TriggerAddAction(udg_trigger276,function Func1442)
set udg_trigger277=CreateTrigger()
call DisableTrigger(udg_trigger277)
call TriggerRegisterTimerEventPeriodic(udg_trigger277,3.)
call TriggerAddCondition(udg_trigger277,Condition(function Func1443))
call TriggerAddAction(udg_trigger277,function Func1447)
set udg_trigger278=CreateTrigger()
call DisableTrigger(udg_trigger278)
call TriggerRegisterTimerEventPeriodic(udg_trigger278,2.)
call TriggerAddAction(udg_trigger278,function Func1457)
set udg_trigger279=CreateTrigger()
call DisableTrigger(udg_trigger279)
call TriggerRegisterEnterRectSimple(udg_trigger279,udg_rect130)
call TriggerAddCondition(udg_trigger279,Condition(function Func1458))
call TriggerAddAction(udg_trigger279,function Func1459)
set udg_trigger280=CreateTrigger()
call DisableTrigger(udg_trigger280)
call TriggerRegisterEnterRectSimple(udg_trigger280,udg_rect131)
call TriggerAddCondition(udg_trigger280,Condition(function Func1460))
call TriggerAddAction(udg_trigger280,function Func1461)
set udg_trigger281=CreateTrigger()
call DisableTrigger(udg_trigger281)
call TriggerRegisterEnterRectSimple(udg_trigger281,udg_rect132)
call TriggerAddCondition(udg_trigger281,Condition(function Func1462))
call TriggerAddAction(udg_trigger281,function Func1463)
set udg_trigger282=CreateTrigger()
call DisableTrigger(udg_trigger282)
call TriggerRegisterEnterRectSimple(udg_trigger282,udg_rect133)
call TriggerAddCondition(udg_trigger282,Condition(function Func1464))
call TriggerAddAction(udg_trigger282,function Func1465)
set udg_trigger283=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger283,1.)
call TriggerAddAction(udg_trigger283,function Func1468)
set udg_trigger284=CreateTrigger()
call TriggerAddCondition(udg_trigger284,Condition(function Func1469))
call TriggerAddAction(udg_trigger284,function Func1478)
set udg_trigger285=CreateTrigger()
call DisableTrigger(udg_trigger285)
call TriggerRegisterTimerEventPeriodic(udg_trigger285,2.)
call TriggerAddCondition(udg_trigger285,Condition(function Func1479))
call TriggerAddAction(udg_trigger285,function Func1481)
set udg_trigger286=CreateTrigger()
call DisableTrigger(udg_trigger286)
call TriggerRegisterAnyUnitEventBJ(udg_trigger286,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(udg_trigger286,Condition(function Func1482))
call TriggerAddAction(udg_trigger286,function Func1496)
set udg_trigger287=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger287,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger287,Condition(function Func1497))
call TriggerAddAction(udg_trigger287,function Func1498)
set udg_trigger288=CreateTrigger()
call DisableTrigger(udg_trigger288)
call TriggerRegisterTimerEventPeriodic(udg_trigger288,2.)
call TriggerAddAction(udg_trigger288,function Func1503)
set udg_trigger289=CreateTrigger()
call TriggerAddAction(udg_trigger289,function Func1512)
set udg_trigger290=CreateTrigger()
call TriggerAddCondition(udg_trigger290,Condition(function Func1513))
call TriggerAddAction(udg_trigger290,function Func1573)
set udg_trigger291=CreateTrigger()
call TriggerRegisterEnterRectSimple(udg_trigger291,udg_rect148)
call TriggerAddCondition(udg_trigger291,Condition(function Func1574))
call TriggerAddAction(udg_trigger291,function Func1575)
set udg_trigger292=CreateTrigger()
call DisableTrigger(udg_trigger292)
call TriggerRegisterEnterRectSimple(udg_trigger292,udg_rect90)
call TriggerRegisterEnterRectSimple(udg_trigger292,udg_rect91)
call TriggerRegisterEnterRectSimple(udg_trigger292,udg_rect92)
call TriggerRegisterEnterRectSimple(udg_trigger292,udg_rect93)
call TriggerAddCondition(udg_trigger292,Condition(function Func1576))
call TriggerAddAction(udg_trigger292,function Func1578)
set udg_trigger293=CreateTrigger()
call DisableTrigger(udg_trigger293)
call TriggerRegisterTimerEventPeriodic(udg_trigger293,1.5)
call TriggerAddAction(udg_trigger293,function Func1586)
set udg_trigger294=CreateTrigger()
call DisableTrigger(udg_trigger294)
call TriggerRegisterTimerEventPeriodic(udg_trigger294,2.)
call TriggerAddAction(udg_trigger294,function Func1591)
set udg_trigger295=CreateTrigger()
call DisableTrigger(udg_trigger295)
call TriggerRegisterTimerEventPeriodic(udg_trigger295,12.)
call TriggerAddAction(udg_trigger295,function Func1602)
set udg_trigger296=CreateTrigger()
call DisableTrigger(udg_trigger296)
call TriggerRegisterTimerEventPeriodic(udg_trigger296,2)
call TriggerAddCondition(udg_trigger296,Condition(function Func1603))
call TriggerAddAction(udg_trigger296,function Func1606)
set udg_trigger297=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger297,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger297,Condition(function Func1607))
call TriggerAddAction(udg_trigger297,function Func1608)
set udg_trigger298=CreateTrigger()
call DisableTrigger(udg_trigger298)
call TriggerRegisterAnyUnitEventBJ(udg_trigger298,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(udg_trigger298,Condition(function Func1611))
call TriggerAddAction(udg_trigger298,function Func1614)
set udg_trigger299=CreateTrigger()
call DisableTrigger(udg_trigger299)
call TriggerRegisterTimerEventPeriodic(udg_trigger299,30.)
call TriggerAddCondition(udg_trigger299,Condition(function Func1615))
call TriggerAddAction(udg_trigger299,function Func1616)
set udg_trigger300=CreateTrigger()
call DisableTrigger(udg_trigger300)
call TriggerRegisterTimerEventSingle(udg_trigger300,3600.)
call TriggerAddCondition(udg_trigger300,Condition(function Func1617))
call TriggerAddAction(udg_trigger300,function Func1618)
set udg_trigger301=CreateTrigger()
call DisableTrigger(udg_trigger301)
call TriggerRegisterTimerEventPeriodic(udg_trigger301,2.)
call TriggerAddCondition(udg_trigger301,Condition(function Func1619))
call TriggerAddAction(udg_trigger301,function Func1620)
set udg_trigger302=CreateTrigger()
call TriggerAddAction(udg_trigger302,function Func1627)
set udg_trigger303=CreateTrigger()
call TriggerRegisterEnterRectSimple(udg_trigger303,udg_rect90)
call TriggerRegisterEnterRectSimple(udg_trigger303,udg_rect92)
call TriggerAddAction(udg_trigger303,function Func1630)
set udg_trigger304=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger304,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger304,Condition(function Func1631))
call TriggerAddAction(udg_trigger304,function Func1632)
set udg_trigger305=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger305,1.5)
call TriggerAddCondition(udg_trigger305,Condition(function Func1633))
call TriggerAddAction(udg_trigger305,function Func1639)
set udg_trigger306=CreateTrigger()
call TriggerAddCondition(udg_trigger306,Condition(function Func1640))
call TriggerAddAction(udg_trigger306,function Func1643)
set udg_trigger307=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger307,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger307,Condition(function Func1644))
call TriggerAddAction(udg_trigger307,function Func1645)
set udg_trigger308=CreateTrigger()
call DisableTrigger(udg_trigger308)
call TriggerRegisterTimerEventPeriodic(udg_trigger308,2.)
call TriggerAddAction(udg_trigger308,function Func1648)
set udg_trigger309=CreateTrigger()
call TriggerRegisterEnterRectSimple(udg_trigger309,udg_rect25)
call TriggerAddCondition(udg_trigger309,Condition(function Func1649))
call TriggerAddAction(udg_trigger309,function Func1650)
set udg_trigger310=CreateTrigger()
call TriggerAddCondition(udg_trigger310,Condition(function Func1651))
call TriggerAddAction(udg_trigger310,function Func1665)
set udg_trigger311=CreateTrigger()
call TriggerAddCondition(udg_trigger311,Condition(function Func1666))
call TriggerAddAction(udg_trigger311,function Func1678)
set udg_trigger312=CreateTrigger()
call TriggerAddCondition(udg_trigger312,Condition(function Func1679))
call TriggerAddAction(udg_trigger312,function Func1682)
set udg_trigger314=CreateTrigger()
call TriggerAddAction(udg_trigger314,function Func1687)
set udg_trigger315=CreateTrigger()
call TriggerAddAction(udg_trigger315,function Func1688)
set udg_trigger316=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger316,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(udg_trigger316,Condition(function Func1689))
call TriggerAddAction(udg_trigger316,function Func1691)
set udg_trigger317=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger317,3.)
call TriggerAddAction(udg_trigger317,function Func1693)
set udg_trigger318=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger318,25.)
call TriggerAddAction(udg_trigger318,function Func1694)
set udg_trigger319=CreateTrigger()
call DisableTrigger(udg_trigger319)
call TriggerRegisterAnyUnitEventBJ(udg_trigger319,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(udg_trigger319,Condition(function Func1695))
call TriggerAddAction(udg_trigger319,function Func1698)
set udg_trigger320=CreateTrigger()
call TriggerRegisterTimerExpireEvent(udg_trigger320,udg_timer02)
call TriggerAddAction(udg_trigger320,function Func1699)
set udg_trigger321=CreateTrigger()
call DisableTrigger(udg_trigger321)
call TriggerRegisterTimerEventPeriodic(udg_trigger321,20.)
call TriggerAddAction(udg_trigger321,function UAUMBUpdate)
set udg_trigger322=CreateTrigger()
call TriggerAddAction(udg_trigger322,function ActionUMBSpawn)
set udg_trigger323=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger323,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger323,Condition(function Func1702))
call TriggerAddAction(udg_trigger323,function Func1704)
set udg_trigger324=CreateTrigger()
call TriggerAddAction(udg_trigger324,function Func1706)
set udg_trigger332=CreateTrigger()
call TriggerRegisterEnterRectSimple(udg_trigger332,udg_rect114)
set udg_trigger336=CreateTrigger()
call TriggerRegisterTimerEventSingle(udg_trigger336,5.)
call TriggerAddAction(udg_trigger336,function Func1807)
set udg_trigger337=CreateTrigger()
call TriggerRegisterTimerEventSingle(udg_trigger337,.0)
call TriggerAddAction(udg_trigger337,function Func1808)
call ConditionalTriggerExecute(udg_trigger01)
call ConditionalTriggerExecute(udg_trigger29)
call ConditionalTriggerExecute(udg_trigger206)
endfunction
function InitTrig_init takes nothing returns nothing
set udg_gamecache05 = InitGameCache("KeyBindings.w3v")
call ExecuteFunc("main2")
endfunction
library AbilityConstants
globals
// --------
// Shared
constant integer ABILITY_JUMP = 'A050'
// --------
// --------
// Hero
constant integer ABILITY_EMP_ROCKET = 'A01G'
constant integer ABILITY_REINFORCEMENTS_DC = 'A01Z'
constant integer ABILITY_HELLFIRE_MISSILE = 'A02B'
constant integer ABILITY_PHOTON_BLAST = 'A02E'
constant integer ABILITY_SOLID_ROCKET_BOOST = 'A02G'
constant integer ABILITY_BUILD_BARRICADE = 'A047'
constant integer ABILITY_INFRARED_CAMERAS = 'A059'
constant integer ABILITY_CONSTRICTION_NET_MINI = 'A05C'
constant integer ABILITY_CONSTRICTION_NET = 'A07F'
constant integer ABILITY_TOW_MISSILE = 'A088'
constant integer ABILITY_REINFORCEMENTS_TANK = 'A08M'
constant integer ABILITY_LAND_AIRCRAFT = 'A09H'
constant integer ABILITY_GLOBAL_HAWK_MENU = 'A09I'
constant integer ABILITY_TAKE_OFF_AIRCRAFT = 'A09J'
constant integer ABILITY_SELF_REPAIR = 'A09K'
constant integer ABILITY_GRENADE_ACCURACY = 'A0A4'
constant integer ABILITY_PREDATOR_DRONE = 'A0A7'
// --------
// --------
// Dummy
constant integer ABILITY_HEAT_KILL_TREES = 'A099'
constant integer ABILITY_TOW_KILL_TREES = 'A09A'
// --------
endglobals
endlibrary
library AttributeConstants
globals
constant integer ATTRIBUTE_BOSS = 'A069'
constant integer ATTRIBUTE_NEW_HERO = 'A0AH'
endglobals
function UnitHasAttribute takes unit u, integer attribute returns boolean
return GetUnitAbilityLevel(u, attribute) > 0
endfunction
endlibrary
library BuffConstants
globals
constant integer BUFF_CONSTRICTION_NET = 'B00P'
endglobals
endlibrary
library EffectConstants initializer Init
globals
constant string SFX_FRAG = "war3mapImported\\Explosion.mdx"
constant string SFX_EMP_EXPLOSION = "war3mapImported\\BigExplosionBlue.mdx"
constant string SFX_SATCHEL_EXPLOSION = "war3mapImported\\Satchel Explosion.mdx"
constant string SFX_GROUND_EXPLOSION = "war3mapImported\\Ground.mdx"
constant string SFX_STRONG_LIGHT = "war3mapImported\\StrongLight.mdx"
constant string SFX_DEAD_HEALER = "war3mapImported\\ItemHealthOrb.mdx"
constant string SFX_ITEM_INDICATOR = "war3mapImported\\ItemIndicator.mdx"
string array SFX_INDICATOR_CORPSE
endglobals
private function Init takes nothing returns nothing
set SFX_INDICATOR_CORPSE[0] = "war3mapImported\\BrillianceRed.mdx"
set SFX_INDICATOR_CORPSE[1] = "war3mapImported\\BrillianceBlue.mdx"
set SFX_INDICATOR_CORPSE[2] = "war3mapImported\\BrillianceTeal.mdx"
set SFX_INDICATOR_CORPSE[3] = "war3mapImported\\BrilliancePurple.mdx"
set SFX_INDICATOR_CORPSE[4] = "war3mapImported\\BrillianceYellow.mdx"
set SFX_INDICATOR_CORPSE[5] = "war3mapImported\\BrillianceOrange.mdx"
set SFX_INDICATOR_CORPSE[6] = "war3mapImported\\BrillianceGreen.mdx"
set SFX_INDICATOR_CORPSE[7] = "war3mapImported\\BrilliancePink.mdx"
set SFX_INDICATOR_CORPSE[8] = "war3mapImported\\BrillianceGray.mdx"
set SFX_INDICATOR_CORPSE[9] = "war3mapImported\\BrillianceLightBlue.mdx"
set SFX_INDICATOR_CORPSE[10] = "war3mapImported\\BrillianceDarkGreen.mdx"
endfunction
endlibrary
library GameplayConstants
globals
constant real DEFENSE_ARMOR = 0.060
constant real ITEM_PICK_UP_RANGE = 150.00
endglobals
endlibrary
library HeroConstants
globals
constant integer HERO_ASSAULTMAN = 'H00D'
constant integer HERO_BRADLEY = 'h01K' // Body, not a hero
constant integer HERO_COMBAT_ENGINEER = 'H00N'
constant integer HERO_COMMANDER = 'H00J'
constant integer HERO_CYBORG = 'H00P'
constant integer HERO_FIREBAT = 'H00U'
constant integer HERO_FORWARD_OBSERVER = 'H008'
constant integer HERO_GHOST = 'H00I'
constant integer HERO_GLOBAL_HAWK = 'h00K' // Not a hero
constant integer HERO_GRENADIER = 'H011'
constant integer HERO_HEAVY_SUPPORT = 'H00R'
constant integer HERO_MACHINE_GUNNER = 'H001'
constant integer HERO_MARKSMAN = 'H00H'
constant integer HERO_MEDIC = 'H01P'
constant integer HERO_NAVY_CORPSMAN = 'H00C'
constant integer HERO_RIFLEMAN = 'H000'
constant integer HERO_SCOUT = 'H01I'
endglobals
endlibrary
library ItemConstants
globals
constant integer ITEM_MAGAZINE = 'I000'
constant integer ITEM_M400_GL = 'I012'
constant integer ITEM_STUN_GRENADE = 'I017'
constant integer ITEM_APR_NEW = 'I01A'
endglobals
endlibrary
library PlayerConstants
globals
constant player PLAYER_DUMMY = Player(PLAYER_NEUTRAL_AGGRESSIVE)
endglobals
endlibrary
library UnitConstants
globals
// --------
// Dummies
constant integer UNIT_DUMMY = 'xdum'
constant integer UNIT_DUMMY_KILL_TREES = 'h01S'
// --------
// --------
// Minis
constant integer UNIT_MINI_RIFLEMAN = 'h009'
constant integer UNIT_MINI_COMBAT_ENGINEER = 'h017'
// --------
// --------
// Wards
constant integer UNIT_BARRICADE = 'o004'
constant integer UNIT_EXPLOSIVE_CHARGE = 'o007'
// --------
// --------
// Summons
constant integer UNIT_PREDATOR_DRONE = 'h01X'
// --------
// --------
// Undead
constant integer UNIT_BOOMER = 'n00E'
constant integer UNIT_HORROR = 'u00C'
// --------
endglobals
endlibrary
library HeroIcons initializer Init
globals
Table HeroIcons
endglobals
private function Init takes nothing returns nothing
set HeroIcons = Table.create()
set HeroIcons.string[HERO_ASSAULTMAN] = "ReplaceableTextures\\CommandButtons\\BTNInsAssaultMan.blp"
set HeroIcons.string[HERO_COMBAT_ENGINEER] = "ReplaceableTextures\\CommandButtons\\BTNInsCombatEngineer2.blp"
set HeroIcons.string[HERO_MEDIC] = "ReplaceableTextures\\CommandButtons\\BTNMedic.blp"
set HeroIcons.string[HERO_CYBORG] = "ReplaceableTextures\\CommandButtons\\BTNInsCyborg.blp"
set HeroIcons.string[HERO_MARKSMAN] = "ReplaceableTextures\\CommandButtons\\BTNInsDesignatedMarksman.blp"
set HeroIcons.string[HERO_COMMANDER] = "ReplaceableTextures\\CommandButtons\\BTNInsDetachmentCommander.blp"
set HeroIcons.string[HERO_FIREBAT] = "ReplaceableTextures\\CommandButtons\\BTNInsFlamethrower.blp"
set HeroIcons.string[HERO_FORWARD_OBSERVER] = "ReplaceableTextures\\CommandButtons\\BTNInsForwardObserver.blp"
set HeroIcons.string[HERO_GHOST] = "ReplaceableTextures\\CommandButtons\\BTNInsGhost.blp"
set HeroIcons.string[HERO_GRENADIER] = "ReplaceableTextures\\CommandButtons\\BTNInsGrenadier.blp"
set HeroIcons.string[HERO_HEAVY_SUPPORT] = "ReplaceableTextures\\CommandButtons\\BTNInsHeavySupport.blp"
set HeroIcons.string[HERO_BRADLEY] = "ReplaceableTextures\\CommandButtons\\BTNInsBradley.blp"
set HeroIcons.string[HERO_MACHINE_GUNNER] = "ReplaceableTextures\\CommandButtons\\BTNInsMachineGunner.blp"
set HeroIcons.string[HERO_NAVY_CORPSMAN] = "ReplaceableTextures\\CommandButtons\\BTNInsNavyCorpsman.blp"
set HeroIcons.string[HERO_GLOBAL_HAWK] = "ReplaceableTextures\\CommandButtons\\BTNInsGlobalHawk.blp"
set HeroIcons.string[HERO_RIFLEMAN] = "ReplaceableTextures\\CommandButtons\\BTNInsRifleman2.blp"
set HeroIcons.string[HERO_SCOUT] = "ReplaceableTextures\\CommandButtons\\BTNInsScoutRecon.blp"
endfunction
endlibrary
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~ Alloc ~~ By Sevion ~~ Version 1.09 ~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// What is Alloc?
// - Alloc implements an intuitive allocation method for array structs
//
// =Pros=
// - Efficient.
// - Simple.
// - Less overhead than regular structs.
//
// =Cons=
// - Must use array structs (hardly a con).
// - Must manually call OnDestroy.
// - Must use Delegates for inheritance.
// - No default values for variables (use onInit instead).
// - No array members (use another Alloc struct as a linked list or type declaration).
//
// Methods:
// - struct.allocate()
// - struct.deallocate()
//
// These methods are used just as they should be used in regular structs.
//
// Modules:
// - Alloc
// Implements the most basic form of Alloc. Includes only create and destroy
// methods.
//
// Details:
// - Less overhead than regular structs
//
// - Use array structs when using Alloc. Put the implement at the top of the struct.
//
// - Alloc operates almost exactly the same as default structs in debug mode with the exception of onDestroy.
//
// How to import:
// - Create a trigger named Alloc.
// - Convert it to custom text and replace the whole trigger text with this.
//
// Thanks:
// - Nestharus for the method of allocation and suggestions on further merging.
// - Bribe for suggestions like the static if and method names.
// - PurgeandFire111 for some suggestions like the merging of Alloc and AllocX as well as OnDestroy stuff.
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
library Alloc
module Alloc
private static integer instanceCount = 0
private thistype recycle
static method allocate takes nothing returns thistype
local thistype this
if (thistype(0).recycle == 0) then
debug if (instanceCount == 8190) then
debug call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, "Alloc ERROR: Attempted to allocate too many instances!")
debug return 0
debug endif
set instanceCount = instanceCount + 1
set this = instanceCount
else
set this = thistype(0).recycle
set thistype(0).recycle = thistype(0).recycle.recycle
endif
debug set this.recycle = -1
//
static if thistype.listAdd.exists then
call this.listAdd()
endif
//
return this
endmethod
method deallocate takes nothing returns nothing
debug if (this.recycle != -1) then
debug call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, "Alloc ERROR: Attempted to deallocate an invalid instance at [" + I2S(this) + "]!")
debug return
debug endif
set this.recycle = thistype(0).recycle
set thistype(0).recycle = this
endmethod
endmodule
endlibrary
library FileIO
/***************************************************************
*
* v1.1.0, by TriggerHappy
* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
*
* Provides functionality to read and write files.
* _________________________________________________________________________
* 1. Requirements
* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
* - Patch 1.29 or higher.
* - JassHelper (vJASS)
* _________________________________________________________________________
* 2. Installation
* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
* Copy the script to your map and save it.
* _________________________________________________________________________
* 3. API
* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
* struct File extends array
*
* static constant integer AbilityCount
* static constant integer PreloadLimit
*
* readonly static boolean ReadEnabled
* readonly static integer Counter
* readonly static integer array List
*
* static method open takes string filename returns File
* static method create takes string filename returns File
*
* ---------
*
* method write takes string value returns File
* method read takes nothing returns string
*
* method readEx takes boolean close returns string
* method readAndClose takes nothing returns string
* method readBuffer takes nothing returns string
* method writeBuffer takes string contents returns nothing
* method appendBuffer takes string contents returns nothing
*
* method close takes nothing returns nothing
*
* public function Write takes string filename, string contents returns nothing
* public function Read takes string filename returns string
*
***************************************************************/
globals
// Enable this if you want to allow the system to read files generated in patch 1.30 or below.
// NOTE: For this to work properly you must edit the 'Amls' ability and change the levels to 2
// as well as typing something in "Level 2 - Text - Tooltip - Normal" text field.
//
// Enabling this will also cause the system to treat files written with .write("") as empty files.
//
// This setting is really only intended for those who were already using the system in their map
// prior to patch 1.31 and want to keep old files created with this system to still work.
private constant boolean BACKWARDS_COMPATABILITY = false
endglobals
private keyword FileInit
struct File extends array
static constant integer AbilityCount = 10
static constant integer PreloadLimit = 200
readonly static integer Counter = 0
readonly static integer array List
readonly static integer array AbilityList
readonly static boolean ReadEnabled = false
readonly string filename
private string buffer
static method open takes string filename returns thistype
local thistype this = .List[0]
if (this == 0) then
set this = Counter + 1
set Counter = this
else
set .List[0] = .List[this]
endif
set this.filename = filename
set this.buffer = null
debug if (this >= JASS_MAX_ARRAY_SIZE) then
debug call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0, 120, "FileIO(" + filename + ") WARNING: Maximum instance limit " + I2S(JASS_MAX_ARRAY_SIZE) + " reached.")
debug endif
return this
endmethod
// This is used to detect invalid characters which aren't supported in preload files.
static if (DEBUG_MODE) then
private static method validateInput takes string contents returns string
local integer i = 0
local integer l = StringLength(contents)
local string ch = ""
loop
exitwhen i >= l
set ch = SubString(contents, i, i + 1)
if (ch == "\\") then
return ch
elseif (ch == "\"") then
return ch
endif
set i = i + 1
endloop
return null
endmethod
endif
method write takes string contents returns thistype
local integer i = 0
local integer c = 0
local integer len = StringLength(contents)
local integer lev = 0
local string prefix = "-" // this is used to signify an empty string vs a null one
local string chunk
debug if (.validateInput(contents) != null) then
debug call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0, 120, "FileIO(" + filename + ") ERROR: Invalid character |cffffcc00" + .validateInput(contents) + "|r")
debug return this
debug endif
set this.buffer = null
// Check if the string is empty. If null, the contents will be cleared.
if (contents == "") then
set len = len + 1
endif
// Begin to generate the file
call PreloadGenClear()
call PreloadGenStart()
loop
exitwhen i >= len
debug if (c >= .AbilityCount) then
debug call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0, 120, "FileIO(" + filename + ") ERROR: String exceeds max length (" + I2S(.AbilityCount * .PreloadLimit) + ").|r")
debug endif
set lev = 0
static if (BACKWARDS_COMPATABILITY) then
if (c == 0) then
set lev = 1
set prefix = ""
else
set prefix = "-"
endif
endif
set chunk = SubString(contents, i, i + .PreloadLimit)
call Preload("\" )\ncall BlzSetAbilityTooltip(" + I2S(.AbilityList[c]) + ", \"" + prefix + chunk + "\", " + I2S(lev) + ")\n//")
set i = i + .PreloadLimit
set c = c + 1
endloop
call Preload("\" )\nendfunction\nfunction a takes nothing returns nothing\n //")
call PreloadGenEnd(this.filename)
return this
endmethod
method clear takes nothing returns thistype
return this.write(null)
endmethod
private method readPreload takes nothing returns string
local integer i = 0
local integer lev = 0
local string array original
local string chunk = ""
local string output = ""
loop
exitwhen i == .AbilityCount
set original[i] = BlzGetAbilityTooltip(.AbilityList[i], 0)
set i = i + 1
endloop
// Execute the preload file
call Preloader(this.filename)
// Read the output
set i = 0
loop
exitwhen i == .AbilityCount
set lev = 0
// Read from ability index 1 instead of 0 if
// backwards compatability is enabled
static if (BACKWARDS_COMPATABILITY) then
if (i == 0) then
set lev = 1
endif
endif
// Make sure the tooltip has changed
set chunk = BlzGetAbilityTooltip(.AbilityList[i], lev)
if (chunk == original[i]) then
if (i == 0 and output == "") then
return null // empty file
endif
return output
endif
// Check if the file is an empty string or null
static if not (BACKWARDS_COMPATABILITY) then
if (i == 0) then
if (SubString(chunk, 0, 1) != "-") then
return null // empty file
endif
set chunk = SubString(chunk, 1, StringLength(chunk))
endif
endif
// Remove the prefix
if (i > 0) then
set chunk = SubString(chunk, 1, StringLength(chunk))
endif
// Restore the tooltip and append the chunk
call BlzSetAbilityTooltip(.AbilityList[i], original[i], lev)
set output = output + chunk
set i = i + 1
endloop
return output
endmethod
method close takes nothing returns nothing
if (this.buffer != null) then
call .write(.readPreload() + this.buffer)
set this.buffer = null
endif
set .List[this] = .List[0]
set .List[0] = this
endmethod
method readEx takes boolean close returns string
local string output = .readPreload()
local string buf = this.buffer
if (close) then
call this.close()
endif
if (output == null) then
return buf
endif
if (buf != null) then
set output = output + buf
endif
return output
endmethod
method read takes nothing returns string
return .readEx(false)
endmethod
method readAndClose takes nothing returns string
return .readEx(true)
endmethod
method appendBuffer takes string contents returns thistype
set .buffer = .buffer + contents
return this
endmethod
method readBuffer takes nothing returns string
return .buffer
endmethod
method writeBuffer takes string contents returns nothing
set .buffer = contents
endmethod
static method create takes string filename returns thistype
return .open(filename).write("")
endmethod
implement FileInit
endstruct
private module FileInit
private static method onInit takes nothing returns nothing
local string originalTooltip
// We can't use a single ability with multiple levels because
// tooltips return the first level's value if the value hasn't
// been set. This way we don't need to edit any object editor data.
set File.AbilityList[0] = 'Amls'
set File.AbilityList[1] = 'Aroc'
set File.AbilityList[2] = 'Amic'
set File.AbilityList[3] = 'Amil'
set File.AbilityList[4] = 'Aclf'
set File.AbilityList[5] = 'Acmg'
set File.AbilityList[6] = 'Adef'
set File.AbilityList[7] = 'Adis'
set File.AbilityList[8] = 'Afbt'
set File.AbilityList[9] = 'Afbk'
// Backwards compatability check
static if (BACKWARDS_COMPATABILITY) then
static if (DEBUG_MODE) then
set originalTooltip = BlzGetAbilityTooltip(File.AbilityList[0], 1)
call BlzSetAbilityTooltip(File.AbilityList[0], SCOPE_PREFIX, 1)
if (BlzGetAbilityTooltip(File.AbilityList[0], 1) == originalTooltip) then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0, 120, "FileIO WARNING: Backwards compatability enabled but \"" + GetObjectName(File.AbilityList[0]) + "\" isn't setup properly.|r")
endif
endif
endif
// Read check
set File.ReadEnabled = File.open("FileTester.pld").write(SCOPE_PREFIX).readAndClose() == SCOPE_PREFIX
endmethod
endmodule
function Write takes string filename, string contents returns nothing
call File.open(filename).write(contents).close()
endfunction
function Read takes string filename returns string
return File.open(filename).readEx(true)
endfunction
endlibrary
/**************************************************************
*
* RegisterPlayerUnitEvent
* v5.1.0.1
* By Magtheridon96
*
* I would like to give a special thanks to Bribe, azlier
* and BBQ for improving this library. For modularity, it only
* supports player unit events.
*
* Functions passed to RegisterPlayerUnitEvent must either
* return a boolean (false) or nothing. (Which is a Pro)
*
* Warning:
* --------
*
* - Don't use TriggerSleepAction inside registered code.
* - Don't destroy a trigger unless you really know what you're doing.
*
* API:
* ----
*
* - function RegisterPlayerUnitEvent takes playerunitevent whichEvent, code whichFunction returns nothing
* - Registers code that will execute when an event fires.
* - function RegisterPlayerUnitEventForPlayer takes playerunitevent whichEvent, code whichFunction, player whichPlayer returns nothing
* - Registers code that will execute when an event fires for a certain player.
* - function GetPlayerUnitEventTrigger takes playerunitevent whichEvent returns trigger
* - Returns the trigger corresponding to ALL functions of a playerunitevent.
*
**************************************************************/
library RegisterPlayerUnitEvent // Special Thanks to Bribe and azlier
globals
private trigger array t
endglobals
function RegisterPlayerUnitEvent takes playerunitevent p, code c returns nothing
local integer i = GetHandleId(p)
local integer k = 23
if t[i] == null then
set t[i] = CreateTrigger()
loop
call TriggerRegisterPlayerUnitEvent(t[i], Player(k), p, null)
exitwhen k == 0
set k = k - 1
endloop
endif
call TriggerAddCondition(t[i], Filter(c))
endfunction
function RegisterPlayerUnitEventForPlayer takes playerunitevent p, code c, player pl returns nothing
local integer i = 24 * GetHandleId(p) + GetPlayerId(pl)
if t[i] == null then
set t[i] = CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t[i], pl, p, null)
endif
call TriggerAddCondition(t[i], Filter(c))
endfunction
function GetPlayerUnitEventTrigger takes playerunitevent p returns trigger
return t[GetHandleId(p)]
endfunction
endlibrary
//============================================================================
// SpellEffectEvent
// - Version 1.1.0.0
//
// API
// ---
// RegisterSpellEffectEvent(integer abil, code onCast)
//
// Requires
// --------
// RegisterPlayerUnitEvent: hiveworkshop.com/forums/showthread.php?t=203338
//
// Optional
// --------
// Table: hiveworkshop.com/forums/showthread.php?t=188084
//
library SpellEffectEvent requires RegisterPlayerUnitEvent, optional Table
//============================================================================
private module M
static if LIBRARY_Table then
static Table tb
else
static hashtable ht = InitHashtable()
endif
static method onCast takes nothing returns nothing
static if LIBRARY_Table then
call TriggerEvaluate(.tb.trigger[GetSpellAbilityId()])
else
call TriggerEvaluate(LoadTriggerHandle(.ht, 0, GetSpellAbilityId()))
endif
endmethod
private static method onInit takes nothing returns nothing
static if LIBRARY_Table then
set .tb = Table.create()
endif
call RegisterPlayerUnitEvent(EVENT_PLAYER_UNIT_SPELL_EFFECT, function thistype.onCast)
endmethod
endmodule
//============================================================================
private struct S extends array
implement M
endstruct
//============================================================================
function RegisterSpellEffectEvent takes integer abil, code onCast returns nothing
static if LIBRARY_Table then
if not S.tb.handle.has(abil) then
set S.tb.trigger[abil] = CreateTrigger()
endif
call TriggerAddCondition(S.tb.trigger[abil], Filter(onCast))
else
if not HaveSavedHandle(S.ht, 0, abil) then
call SaveTriggerHandle(S.ht, 0, abil, CreateTrigger())
endif
call TriggerAddCondition(LoadTriggerHandle(S.ht, 0, abil), Filter(onCast))
endif
endfunction
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
library Table /* made by Bribe, special thanks to Vexorian & Nestharus, version 4.1.0.1.
One map, one hashtable. Welcome to NewTable 4.1.0.1
This newest iteration of Table introduces the new HashTable struct.
You can now instantiate HashTables which enables the use of large
parent and large child keys, just like a standard hashtable. Previously,
the user would have to instantiate a Table to do this on their own which -
while doable - is something the user should not have to do if I can add it
to this resource myself (especially if they are inexperienced).
This library was originally called NewTable so it didn't conflict with
the API of Table by Vexorian. However, the damage is done and it's too
late to change the library name now. To help with damage control, I
have provided an extension library called TableBC, which bridges all
the functionality of Vexorian's Table except for 2-D string arrays &
the ".flush(integer)" method. I use ".flush()" to flush a child hash-
table, because I wanted the API in NewTable to reflect the API of real
hashtables (I thought this would be more intuitive).
API
------------
struct Table
| static method create takes nothing returns Table
| create a new Table
|
| method destroy takes nothing returns nothing
| destroy it
|
| method flush takes nothing returns nothing
| flush all stored values inside of it
|
| method remove takes integer key returns nothing
| remove the value at index "key"
|
| method operator []= takes integer key, $TYPE$ value returns nothing
| assign "value" to index "key"
|
| method operator [] takes integer key returns $TYPE$
| load the value at index "key"
|
| method has takes integer key returns boolean
| whether or not the key was assigned
|
----------------
struct TableArray
| static method operator [] takes integer array_size returns TableArray
| create a new array of Tables of size "array_size"
|
| method destroy takes nothing returns nothing
| destroy it
|
| method flush takes nothing returns nothing
| flush and destroy it
|
| method operator size takes nothing returns integer
| returns the size of the TableArray
|
| method operator [] takes integer key returns Table
| returns a Table accessible exclusively to index "key"
*/
globals
private integer less = 0 //Index generation for TableArrays (below 0).
private integer more = 8190 //Index generation for Tables.
//Configure it if you use more than 8190 "key" variables in your map (this will never happen though).
private hashtable ht = InitHashtable()
private key sizeK
private key listK
endglobals
private struct dex extends array
static method operator size takes nothing returns Table
return sizeK
endmethod
static method operator list takes nothing returns Table
return listK
endmethod
endstruct
private struct handles extends array
method has takes integer key returns boolean
return HaveSavedHandle(ht, this, key)
endmethod
method remove takes integer key returns nothing
call RemoveSavedHandle(ht, this, key)
endmethod
endstruct
private struct agents extends array
method operator []= takes integer key, agent value returns nothing
call SaveAgentHandle(ht, this, key, value)
endmethod
endstruct
//! textmacro NEW_ARRAY_BASIC takes SUPER, FUNC, TYPE
private struct $TYPE$s extends array
method operator [] takes integer key returns $TYPE$
return Load$FUNC$(ht, this, key)
endmethod
method operator []= takes integer key, $TYPE$ value returns nothing
call Save$FUNC$(ht, this, key, value)
endmethod
method has takes integer key returns boolean
return HaveSaved$SUPER$(ht, this, key)
endmethod
method remove takes integer key returns nothing
call RemoveSaved$SUPER$(ht, this, key)
endmethod
endstruct
private module $TYPE$m
method operator $TYPE$ takes nothing returns $TYPE$s
return this
endmethod
endmodule
//! endtextmacro
//! textmacro NEW_ARRAY takes FUNC, TYPE
private struct $TYPE$s extends array
method operator [] takes integer key returns $TYPE$
return Load$FUNC$Handle(ht, this, key)
endmethod
method operator []= takes integer key, $TYPE$ value returns nothing
call Save$FUNC$Handle(ht, this, key, value)
endmethod
method has takes integer key returns boolean
return HaveSavedHandle(ht, this, key)
endmethod
method remove takes integer key returns nothing
call RemoveSavedHandle(ht, this, key)
endmethod
endstruct
private module $TYPE$m
method operator $TYPE$ takes nothing returns $TYPE$s
return this
endmethod
endmodule
//! endtextmacro
//Run these textmacros to include the entire hashtable API as wrappers.
//Don't be intimidated by the number of macros - Vexorian's map optimizer is
//supposed to kill functions which inline (all of these functions inline).
//! runtextmacro NEW_ARRAY_BASIC("Real", "Real", "real")
//! runtextmacro NEW_ARRAY_BASIC("Boolean", "Boolean", "boolean")
//! runtextmacro NEW_ARRAY_BASIC("String", "Str", "string")
//New textmacro to allow table.integer[] syntax for compatibility with textmacros that might desire it.
//! runtextmacro NEW_ARRAY_BASIC("Integer", "Integer", "integer")
//! runtextmacro NEW_ARRAY("Player", "player")
//! runtextmacro NEW_ARRAY("Widget", "widget")
//! runtextmacro NEW_ARRAY("Destructable", "destructable")
//! runtextmacro NEW_ARRAY("Item", "item")
//! runtextmacro NEW_ARRAY("Unit", "unit")
//! runtextmacro NEW_ARRAY("Ability", "ability")
//! runtextmacro NEW_ARRAY("Timer", "timer")
//! runtextmacro NEW_ARRAY("Trigger", "trigger")
//! runtextmacro NEW_ARRAY("TriggerCondition", "triggercondition")
//! runtextmacro NEW_ARRAY("TriggerAction", "triggeraction")
//! runtextmacro NEW_ARRAY("TriggerEvent", "event")
//! runtextmacro NEW_ARRAY("Force", "force")
//! runtextmacro NEW_ARRAY("Group", "group")
//! runtextmacro NEW_ARRAY("Location", "location")
//! runtextmacro NEW_ARRAY("Rect", "rect")
//! runtextmacro NEW_ARRAY("BooleanExpr", "boolexpr")
//! runtextmacro NEW_ARRAY("Sound", "sound")
//! runtextmacro NEW_ARRAY("Effect", "effect")
//! runtextmacro NEW_ARRAY("UnitPool", "unitpool")
//! runtextmacro NEW_ARRAY("ItemPool", "itempool")
//! runtextmacro NEW_ARRAY("Quest", "quest")
//! runtextmacro NEW_ARRAY("QuestItem", "questitem")
//! runtextmacro NEW_ARRAY("DefeatCondition", "defeatcondition")
//! runtextmacro NEW_ARRAY("TimerDialog", "timerdialog")
//! runtextmacro NEW_ARRAY("Leaderboard", "leaderboard")
//! runtextmacro NEW_ARRAY("Multiboard", "multiboard")
//! runtextmacro NEW_ARRAY("MultiboardItem", "multiboarditem")
//! runtextmacro NEW_ARRAY("Trackable", "trackable")
//! runtextmacro NEW_ARRAY("Dialog", "dialog")
//! runtextmacro NEW_ARRAY("Button", "button")
//! runtextmacro NEW_ARRAY("TextTag", "texttag")
//! runtextmacro NEW_ARRAY("Lightning", "lightning")
//! runtextmacro NEW_ARRAY("Image", "image")
//! runtextmacro NEW_ARRAY("Ubersplat", "ubersplat")
//! runtextmacro NEW_ARRAY("Region", "region")
//! runtextmacro NEW_ARRAY("FogState", "fogstate")
//! runtextmacro NEW_ARRAY("FogModifier", "fogmodifier")
//! runtextmacro NEW_ARRAY("Hashtable", "hashtable")
struct Table extends array
// Implement modules for intuitive syntax (tb.handle; tb.unit; etc.)
implement realm
implement integerm
implement booleanm
implement stringm
implement playerm
implement widgetm
implement destructablem
implement itemm
implement unitm
implement abilitym
implement timerm
implement triggerm
implement triggerconditionm
implement triggeractionm
implement eventm
implement forcem
implement groupm
implement locationm
implement rectm
implement boolexprm
implement soundm
implement effectm
implement unitpoolm
implement itempoolm
implement questm
implement questitemm
implement defeatconditionm
implement timerdialogm
implement leaderboardm
implement multiboardm
implement multiboarditemm
implement trackablem
implement dialogm
implement buttonm
implement texttagm
implement lightningm
implement imagem
implement ubersplatm
implement regionm
implement fogstatem
implement fogmodifierm
implement hashtablem
method operator handle takes nothing returns handles
return this
endmethod
method operator agent takes nothing returns agents
return this
endmethod
//set this = tb[GetSpellAbilityId()]
method operator [] takes integer key returns Table
return LoadInteger(ht, this, key) //return this.integer[key]
endmethod
//set tb[389034] = 8192
method operator []= takes integer key, Table tb returns nothing
call SaveInteger(ht, this, key, tb) //set this.integer[key] = tb
endmethod
//set b = tb.has(2493223)
method has takes integer key returns boolean
return HaveSavedInteger(ht, this, key) //return this.integer.has(key)
endmethod
//call tb.remove(294080)
method remove takes integer key returns nothing
call RemoveSavedInteger(ht, this, key) //call this.integer.remove(key)
endmethod
//Remove all data from a Table instance
method flush takes nothing returns nothing
call FlushChildHashtable(ht, this)
endmethod
//local Table tb = Table.create()
static method create takes nothing returns Table
local Table this = dex.list[0]
if this == 0 then
set this = more + 1
set more = this
else
set dex.list[0] = dex.list[this]
call dex.list.remove(this) //Clear hashed memory
endif
debug set dex.list[this] = -1
return this
endmethod
// Removes all data from a Table instance and recycles its index.
//
// call tb.destroy()
//
method destroy takes nothing returns nothing
debug if dex.list[this] != -1 then
debug call BJDebugMsg("Table Error: Tried to double-free instance: " + I2S(this))
debug return
debug endif
call this.flush()
set dex.list[this] = dex.list[0]
set dex.list[0] = this
endmethod
//! runtextmacro optional TABLE_BC_METHODS()
endstruct
//! runtextmacro optional TABLE_BC_STRUCTS()
struct TableArray extends array
//Returns a new TableArray to do your bidding. Simply use:
//
// local TableArray ta = TableArray[array_size]
//
static method operator [] takes integer array_size returns TableArray
local Table tb = dex.size[array_size] //Get the unique recycle list for this array size
local TableArray this = tb[0] //The last-destroyed TableArray that had this array size
debug if array_size <= 0 then
debug call BJDebugMsg("TypeError: Invalid specified TableArray size: " + I2S(array_size))
debug return 0
debug endif
if this == 0 then
set this = less - array_size
set less = this
else
set tb[0] = tb[this] //Set the last destroyed to the last-last destroyed
call tb.remove(this) //Clear hashed memory
endif
set dex.size[this] = array_size //This remembers the array size
return this
endmethod
//Returns the size of the TableArray
method operator size takes nothing returns integer
return dex.size[this]
endmethod
//This magic method enables two-dimensional[array][syntax] for Tables,
//similar to the two-dimensional utility provided by hashtables them-
//selves.
//
//ta[integer a].unit[integer b] = unit u
//ta[integer a][integer c] = integer d
//
//Inline-friendly when not running in debug mode
//
method operator [] takes integer key returns Table
static if DEBUG_MODE then
local integer i = this.size
if i == 0 then
call BJDebugMsg("IndexError: Tried to get key from invalid TableArray instance: " + I2S(this))
return 0
elseif key < 0 or key >= i then
call BJDebugMsg("IndexError: Tried to get key [" + I2S(key) + "] from outside TableArray bounds: " + I2S(i))
return 0
endif
endif
return this + key
endmethod
//Destroys a TableArray without flushing it; I assume you call .flush()
//if you want it flushed too. This is a public method so that you don't
//have to loop through all TableArray indices to flush them if you don't
//need to (ie. if you were flushing all child-keys as you used them).
//
method destroy takes nothing returns nothing
local Table tb = dex.size[this.size]
debug if this.size == 0 then
debug call BJDebugMsg("TypeError: Tried to destroy an invalid TableArray: " + I2S(this))
debug return
debug endif
if tb == 0 then
//Create a Table to index recycled instances with their array size
set tb = Table.create()
set dex.size[this.size] = tb
endif
call dex.size.remove(this) //Clear the array size from hash memory
set tb[this] = tb[0]
set tb[0] = this
endmethod
private static Table tempTable
private static integer tempEnd
//Avoids hitting the op limit
private static method clean takes nothing returns nothing
local Table tb = .tempTable
local integer end = tb + 0x1000
if end < .tempEnd then
set .tempTable = end
call ForForce(bj_FORCE_PLAYER[0], function thistype.clean)
else
set end = .tempEnd
endif
loop
call tb.flush()
set tb = tb + 1
exitwhen tb == end
endloop
endmethod
//Flushes the TableArray and also destroys it. Doesn't get any more
//similar to the FlushParentHashtable native than this.
//
method flush takes nothing returns nothing
debug if this.size == 0 then
debug call BJDebugMsg("TypeError: Tried to flush an invalid TableArray instance: " + I2S(this))
debug return
debug endif
set .tempTable = this
set .tempEnd = this + this.size
call ForForce(bj_FORCE_PLAYER[0], function thistype.clean)
call this.destroy()
endmethod
endstruct
//NEW: Added in Table 4.0. A fairly simple struct but allows you to do more
//than that which was previously possible.
struct HashTable extends array
//Enables myHash[parentKey][childKey] syntax.
//Basically, it creates a Table in the place of the parent key if
//it didn't already get created earlier.
method operator [] takes integer index returns Table
local Table t = Table(this)[index]
if t == 0 then
set t = Table.create()
set Table(this)[index] = t //whoops! Forgot that line. I'm out of practice!
endif
return t
endmethod
//You need to call this on each parent key that you used if you
//intend to destroy the HashTable or simply no longer need that key.
method remove takes integer index returns nothing
local Table t = Table(this)[index]
if t != 0 then
call t.destroy()
call Table(this).remove(index)
endif
endmethod
//Added in version 4.1
method has takes integer index returns boolean
return Table(this).has(index)
endmethod
//HashTables are just fancy Table indices.
method destroy takes nothing returns nothing
call Table(this).destroy()
endmethod
//Like I said above...
static method create takes nothing returns thistype
return Table.create()
endmethod
endstruct
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
library TimerUtils initializer init
//*********************************************************************
//* TimerUtils (red+blue+orange flavors for 1.24b+)
//* ----------
//*
//* To implement it , create a custom text trigger called TimerUtils
//* and paste the contents of this script there.
//*
//* To copy from a map to another, copy the trigger holding this
//* library to your map.
//*
//* (requires vJass) More scripts: htt://www.wc3c.net
//*
//* For your timer needs:
//* * Attaching
//* * Recycling (with double-free protection)
//*
//* set t=NewTimer() : Get a timer (alternative to CreateTimer)
//* ReleaseTimer(t) : Relese a timer (alt to DestroyTimer)
//* SetTimerData(t,2) : Attach value 2 to timer
//* GetTimerData(t) : Get the timer's value.
//* You can assume a timer's value is 0
//* after NewTimer.
//*
//* Multi-flavor:
//* Set USE_HASH_TABLE to true if you don't want to complicate your life.
//*
//* If you like speed and giberish try learning about the other flavors.
//*
//********************************************************************
//================================================================
globals
//How to tweak timer utils:
// USE_HASH_TABLE = true (new blue)
// * SAFEST
// * SLOWEST (though hash tables are kind of fast)
//
// USE_HASH_TABLE = false, USE_FLEXIBLE_OFFSET = true (orange)
// * kinda safe (except there is a limit in the number of timers)
// * ALMOST FAST
//
// USE_HASH_TABLE = false, USE_FLEXIBLE_OFFSET = false (red)
// * THE FASTEST (though is only faster than the previous method
// after using the optimizer on the map)
// * THE LEAST SAFE ( you may have to tweak OFSSET manually for it to
// work)
//
private constant boolean USE_HASH_TABLE = true
private constant boolean USE_FLEXIBLE_OFFSET = false
private constant integer OFFSET = 0x100000
private integer VOFFSET = OFFSET
//Timers to preload at map init:
private constant integer QUANTITY = 100
//Changing this to something big will allow you to keep recycling
// timers even when there are already AN INCREDIBLE AMOUNT of timers in
// the stack. But it will make things far slower so that's probably a bad idea...
private constant integer ARRAY_SIZE = 8190
endglobals
//==================================================================================================
globals
private integer array data[ARRAY_SIZE]
private hashtable ht
endglobals
//It is dependent on jasshelper's recent inlining optimization in order to perform correctly.
function SetTimerData takes timer t, integer value returns nothing
static if(USE_HASH_TABLE) then
// new blue
call SaveInteger(ht,0,GetHandleId(t), value)
elseif (USE_FLEXIBLE_OFFSET) then
// orange
static if (DEBUG_MODE) then
if(GetHandleId(t)-VOFFSET<0) then
call BJDebugMsg("SetTimerData: Wrong handle id, only use SetTimerData on timers created by NewTimer")
endif
endif
set data[GetHandleId(t)-VOFFSET]=value
else
// new red
static if (DEBUG_MODE) then
if(GetHandleId(t)-OFFSET<0) then
call BJDebugMsg("SetTimerData: Wrong handle id, only use SetTimerData on timers created by NewTimer")
endif
endif
set data[GetHandleId(t)-OFFSET]=value
endif
endfunction
function GetTimerData takes timer t returns integer
static if(USE_HASH_TABLE) then
// new blue
return LoadInteger(ht,0,GetHandleId(t) )
elseif (USE_FLEXIBLE_OFFSET) then
// orange
static if (DEBUG_MODE) then
if(GetHandleId(t)-VOFFSET<0) then
call BJDebugMsg("SetTimerData: Wrong handle id, only use SetTimerData on timers created by NewTimer")
endif
endif
return data[GetHandleId(t)-VOFFSET]
else
// new red
static if (DEBUG_MODE) then
if(GetHandleId(t)-OFFSET<0) then
call BJDebugMsg("SetTimerData: Wrong handle id, only use SetTimerData on timers created by NewTimer")
endif
endif
return data[GetHandleId(t)-OFFSET]
endif
endfunction
//==========================================================================================
globals
private timer array tT[ARRAY_SIZE]
private integer tN = 0
private constant integer HELD=0x28829022
//use a totally random number here, the more improbable someone uses it, the better.
endglobals
//==========================================================================================
function NewTimerEx takes integer data returns timer
if (tN==0) then
//If this happens then the QUANTITY rule has already been broken, try to fix the
// issue, else fail.
debug call BJDebugMsg("NewTimer: Warning, Exceeding TimerUtils_QUANTITY, make sure all timers are getting recycled correctly")
static if( not USE_HASH_TABLE) then
debug call BJDebugMsg("In case of errors, please increase it accordingly, or set TimerUtils_USE_HASH_TABLE to true")
set tT[0]=CreateTimer()
static if( USE_FLEXIBLE_OFFSET) then
if (GetHandleId(tT[0])-VOFFSET<0) or (GetHandleId(tT[0])-VOFFSET>=ARRAY_SIZE) then
//all right, couldn't fix it
call BJDebugMsg("NewTimer: Unable to allocate a timer, you should probably set TimerUtils_USE_HASH_TABLE to true or fix timer leaks.")
return null
endif
else
if (GetHandleId(tT[0])-OFFSET<0) or (GetHandleId(tT[0])-OFFSET>=ARRAY_SIZE) then
//all right, couldn't fix it
call BJDebugMsg("NewTimer: Unable to allocate a timer, you should probably set TimerUtils_USE_HASH_TABLE to true or fix timer leaks.")
return null
endif
endif
endif
else
set tN=tN-1
endif
call SetTimerData(tT[tN],data)
return tT[tN]
endfunction
function NewTimer takes nothing returns timer
return NewTimerEx(0)
endfunction
//==========================================================================================
function ReleaseTimer takes timer t returns nothing
if(t==null) then
debug call BJDebugMsg("Warning: attempt to release a null timer")
return
endif
if (tN==ARRAY_SIZE) then
debug call BJDebugMsg("Warning: Timer stack is full, destroying timer!!")
//stack is full, the map already has much more troubles than the chance of bug
call DestroyTimer(t)
else
call PauseTimer(t)
if(GetTimerData(t)==HELD) then
debug call BJDebugMsg("Warning: ReleaseTimer: Double free!")
return
endif
call SetTimerData(t,HELD)
set tT[tN]=t
set tN=tN+1
endif
endfunction
private function init takes nothing returns nothing
local integer i=0
local integer o=-1
local boolean oops = false
static if( USE_HASH_TABLE ) then
set ht = InitHashtable()
loop
exitwhen(i==QUANTITY)
set tT[i]=CreateTimer()
call SetTimerData(tT[i], HELD)
set i=i+1
endloop
set tN = QUANTITY
else
loop
set i=0
loop
exitwhen (i==QUANTITY)
set tT[i] = CreateTimer()
if(i==0) then
set VOFFSET = GetHandleId(tT[i])
static if(USE_FLEXIBLE_OFFSET) then
set o=VOFFSET
else
set o=OFFSET
endif
endif
if (GetHandleId(tT[i])-o>=ARRAY_SIZE) then
exitwhen true
endif
if (GetHandleId(tT[i])-o>=0) then
set i=i+1
endif
endloop
set tN = i
exitwhen(tN == QUANTITY)
set oops = true
exitwhen not USE_FLEXIBLE_OFFSET
debug call BJDebugMsg("TimerUtils_init: Failed a initialization attempt, will try again")
endloop
if(oops) then
static if ( USE_FLEXIBLE_OFFSET) then
debug call BJDebugMsg("The problem has been fixed.")
//If this message doesn't appear then there is so much
//handle id fragmentation that it was impossible to preload
//so many timers and the thread crashed! Therefore this
//debug message is useful.
elseif(DEBUG_MODE) then
call BJDebugMsg("There were problems and the new timer limit is "+I2S(i))
call BJDebugMsg("This is a rare ocurrence, if the timer limit is too low:")
call BJDebugMsg("a) Change USE_FLEXIBLE_OFFSET to true (reduces performance a little)")
call BJDebugMsg("b) or try changing OFFSET to "+I2S(VOFFSET) )
endif
endif
endif
endfunction
/* Derd */
function GetTimerReleasedData takes timer t returns integer
local integer d = GetTimerData(t)
call ReleaseTimer(t)
return d
endfunction
/* ---- */
endlibrary
library Math
globals
constant real TAU = 2 * bj_PI
endglobals
function GetRandomAngleRad takes nothing returns real
return GetRandomReal(0,TAU)
endfunction
function GetRandomAngleDeg takes nothing returns real
return GetRandomReal(0,360)
endfunction
function Chance takes real percent returns boolean
return GetRandomReal(0,1) < percent
endfunction
// Not technically Gaussian, but close enough
private function GetGaussianNormal takes nothing returns real
local real result = 0
set result = result + GetRandomReal(0,1)
set result = result + GetRandomReal(0,1)
set result = result + GetRandomReal(0,1)
set result = result + GetRandomReal(0,1)
set result = result + GetRandomReal(0,1)
set result = result + GetRandomReal(0,1)
set result = result + GetRandomReal(0,1)
set result = result + GetRandomReal(0,1)
set result = result + GetRandomReal(0,1)
set result = result + GetRandomReal(0,1)
set result = result + GetRandomReal(0,1)
set result = result + GetRandomReal(0,1)
return result - 6
endfunction
function GetGaussian takes real mean, real variance returns real
return mean + GetGaussianNormal() * variance
endfunction
function GetGaussianEx takes real mean, real variance, real min, real max returns real
local real result
loop
set result = GetGaussian(mean,variance)
exitwhen (result >= min and result <= max)
endloop
return result
endfunction
endlibrary
library WorldBounds
function GetRectRandomX takes rect r returns real
return GetRandomReal(GetRectMinX(r),GetRectMaxX(r))
endfunction
function GetRectRandomY takes rect r returns real
return GetRandomReal(GetRectMinY(r),GetRectMaxY(r))
endfunction
function GetWorldRandomX takes nothing returns real
return GetRandomReal(WorldBounds.MIN_X,WorldBounds.MAX_X)
endfunction
function GetWorldRandomY takes nothing returns real
return GetRandomReal(WorldBounds.MIN_Y,WorldBounds.MAX_Y)
endfunction
private module initm
private static method onInit takes nothing returns nothing
set thistype.MIN_X = GetRectMinX(bj_mapInitialPlayableArea)
set thistype.MAX_X = GetRectMaxX(bj_mapInitialPlayableArea)
set thistype.MIN_Y = GetRectMinY(bj_mapInitialPlayableArea)
set thistype.MAX_Y = GetRectMaxY(bj_mapInitialPlayableArea)
endmethod
endmodule
struct WorldBounds extends array
readonly static real MIN_X
readonly static real MAX_X
readonly static real MIN_Y
readonly static real MAX_Y
implement initm
endstruct
endlibrary
library DebugUtils initializer Init
// Display message indefinitely
function Log takes string msg returns nothing
if (udg_LogMessagesOn) then
call DisplayTimedTextToPlayer(udg_TheUnabomber, 0, 0, 0.00, "|cff808000Log:|r " + msg)
endif
endfunction
// Display message for 1 second
function LogQuick takes string msg returns nothing
if (udg_LogMessagesOn) then
call DisplayTimedTextToPlayer(udg_TheUnabomber, 0, 0, 1.00, "|cff808000Log:|r " + msg)
endif
endfunction
private function OnGameStart takes nothing returns nothing
// Log toggle
call TriggerRegisterPlayerChatEvent(gg_trg_LogMessageToggle, udg_TheUnabomber, "-log", true)
// Kick
call TriggerRegisterPlayerChatEvent(gg_trg_Kick_1_Red, udg_TheUnabomber, "-kick 1", true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kick_2_Blue, udg_TheUnabomber, "-kick 2", true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kick_3_Teal, udg_TheUnabomber, "-kick 3", true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kick_4_Purple, udg_TheUnabomber, "-kick 4", true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kick_5_Yellow, udg_TheUnabomber, "-kick 5", true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kick_6_Orange, udg_TheUnabomber, "-kick 6", true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kick_7_Green, udg_TheUnabomber, "-kick 7", true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kick_8_Pink, udg_TheUnabomber, "-kick 8", true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kick_9_Gray, udg_TheUnabomber, "-kick 9", true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kick_10_Light_Blue, udg_TheUnabomber, "-kick 10", true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kick_11_Dark_Green, udg_TheUnabomber, "-kick 11", true)
endfunction
private function Init takes nothing returns nothing
local integer i = 0
set udg_TheUnabomber = null
loop
if (SubString(GetPlayerName(Player(i)), 0, 6) == "Derdan") then
set udg_TheUnabomber = Player(i)
exitwhen true
endif
set i = i + 1
exitwhen (i == bj_MAX_PLAYERS)
endloop
call TimerStart(CreateTimer(), 1.00, false, function OnGameStart)
endfunction
endlibrary
library NewDestructibleFuncs
function KillTreesInRangeHEAT takes real x, real y, integer radiusLevel returns nothing
set bj_lastCreatedUnit = CreateUnit(PLAYER_DUMMY, UNIT_DUMMY_KILL_TREES, x, y, bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit, ABILITY_HEAT_KILL_TREES)
set udg__AbilityA = BlzGetUnitAbility(bj_lastCreatedUnit, ABILITY_HEAT_KILL_TREES)
set udg__RealA = BlzGetAbilityRealLevelField(udg__AbilityA, ABILITY_RLF_FULL_DAMAGE_RADIUS_DDA1, radiusLevel - 1)
// Game only reads full damage radius for level 1, so set the radius for level 1
// to what it is in the object editor for the current level
call BlzSetAbilityRealLevelField(udg__AbilityA, ABILITY_RLF_FULL_DAMAGE_RADIUS_DDA1, 0, udg__RealA)
call IncUnitAbilityLevel(bj_lastCreatedUnit, ABILITY_HEAT_KILL_TREES)
call DecUnitAbilityLevel(bj_lastCreatedUnit, ABILITY_HEAT_KILL_TREES)
//call SetUnitAbilityLevel(bj_lastCreatedUnit, ABILITY_HEAT_KILL_TREES, radiusLevel)
call KillUnit(bj_lastCreatedUnit)
endfunction
function KillTreesInRangeTOW takes real x, real y, integer radiusLevel returns nothing
set bj_lastCreatedUnit = CreateUnit(PLAYER_DUMMY, UNIT_DUMMY_KILL_TREES, x, y, bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit, ABILITY_TOW_KILL_TREES)
set udg__AbilityA = BlzGetUnitAbility(bj_lastCreatedUnit, ABILITY_TOW_KILL_TREES)
set udg__RealA = BlzGetAbilityRealLevelField(udg__AbilityA, ABILITY_RLF_FULL_DAMAGE_RADIUS_DDA1, radiusLevel - 1)
// Game only reads full damage radius for level 1, so set the radius for level 1
// to what it is in the object editor for the current level
call BlzSetAbilityRealLevelField(udg__AbilityA, ABILITY_RLF_FULL_DAMAGE_RADIUS_DDA1, 0, udg__RealA)
call IncUnitAbilityLevel(bj_lastCreatedUnit, ABILITY_TOW_KILL_TREES)
call DecUnitAbilityLevel(bj_lastCreatedUnit, ABILITY_TOW_KILL_TREES)
//call SetUnitAbilityLevel(bj_lastCreatedUnit, ABILITY_TOW_KILL_TREES, radiusLevel)
call KillUnit(bj_lastCreatedUnit)
endfunction
endlibrary
library NewForceFuncs initializer Init requires TimerUtils
globals
force udg_PlayerGroupUsers = CreateForce()
endglobals
private function OnGameStart takes nothing returns nothing
local integer i = 0
call ForceEnumAllies(udg_PlayerGroupUsers, Player(0), null)
loop
if (GetPlayerController(Player(i)) != MAP_CONTROL_USER or GetPlayerSlotState(Player(i)) != PLAYER_SLOT_STATE_PLAYING) then
call ForceRemovePlayer(udg_PlayerGroupUsers, Player(i))
endif
set i = i + 1
exitwhen (i == bj_MAX_PLAYERS)
endloop
call ReleaseTimer(GetExpiredTimer())
endfunction
private function Init takes nothing returns nothing
call TimerStart(NewTimer(), 0.00, false, function OnGameStart)
endfunction
endlibrary
library NewGroupFuncs
private function PrintGroupEnum takes nothing returns nothing
set udg__IntegerA = udg__IntegerA + 1
call LogQuick(GetUnitName(GetEnumUnit()))
endfunction
function PrintGroup takes group g returns nothing
set udg__IntegerA = 0
call ForGroup(g, function PrintGroupEnum)
call LogQuick("Counted " + I2S(udg__IntegerA))
endfunction
function KillEnumUnit takes nothing returns nothing
call KillUnit(GetEnumUnit())
endfunction
private function IsBarricade takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit()) == UNIT_BARRICADE
endfunction
function KillBarricadesInRange takes real x, real y, real radius returns nothing
call GroupEnumUnitsInRange(udg__UnitGroupA, x, y, radius, Filter(function IsBarricade))
call ForGroup(udg__UnitGroupA, function KillEnumUnit)
endfunction
function KillBarricadesInRangeLoc takes location loc, real radius returns nothing
call KillBarricadesInRange(GetLocationX(loc), GetLocationY(loc), radius)
endfunction
endlibrary
library LocationUtils initializer Init
function GetDistance takes real x1, real y1, real x2, real y2 returns real
local real dx = x2 - x1
local real dy = y2 - y1
return SquareRoot(dx*dx + dy*dy)
endfunction
function IsDistanceWithinRange takes real x1, real y1, real x2, real y2, real range returns boolean
local real dx = x2 - x1
local real dy = y2 - y1
return dx*dx + dy*dy <= range*range
endfunction
// --------
globals
private item Item = null
real NewTargetX = 0
real NewTargetY = 0
endglobals
function FindNearestWalkablePoint takes real x, real y returns nothing
call SetItemPosition(Item, x, y)
set NewTargetX = GetItemX(Item)
set NewTargetY = GetItemY(Item)
call SetItemVisible(Item, false)
endfunction
// --------
private function Init takes nothing returns nothing
set Item = CreateItem('phlt', 0, 0)
call SetItemVisible(Item, false)
endfunction
endlibrary
library NewPlayerFuncs initializer Init
function Message takes player p, real duration, string msg returns nothing
call DisplayTimedTextToPlayer(p, 0, 0, duration, msg)
endfunction
function MessageAll takes real duration, string msg returns nothing
call Message(GetLocalPlayer(), duration, msg)
endfunction
function PlayerGetMagazines takes player p returns integer
return GetPlayerState(p, PLAYER_STATE_RESOURCE_LUMBER)
endfunction
function PlayerAddMagazines takes player p, integer amount returns nothing
call SetPlayerState(p, PLAYER_STATE_RESOURCE_LUMBER, amount + GetPlayerState(p, PLAYER_STATE_RESOURCE_LUMBER))
endfunction
function PlayerId2String takes player p returns string
local integer id = GetPlayerId(p)
if (id < 10) then
return "0" + I2S(id)
endif
return I2S(id)
endfunction
function OnGameStart takes nothing returns nothing
local integer i = 0
loop
set udg_OriginalPlayerNames[i] = GetPlayerName(Player(i))
set i = i + 1
exitwhen (i == 11)
endloop
endfunction
private function Init takes nothing returns nothing
call TimerStart(CreateTimer(), 0, false, function OnGameStart)
endfunction
endlibrary
library UnitUtils initializer Init requires TimerUtils
globals
private Table SoundTable
private TableArray t
endglobals
function UnitHasAbility takes unit u, integer abilityId returns boolean
return GetUnitAbilityLevel(u, abilityId) > 0
endfunction
function UnitHasItemType takes unit u, integer itemId returns boolean
local integer i = 0
local integer slots = BlzGetAbilityIntegerLevelField(BlzGetUnitAbility(u, 'AInv'), ABILITY_ILF_ITEM_CAPACITY, 0)
loop
exitwhen (i == slots)
if (GetItemTypeId(UnitItemInSlot(u,i)) == itemId) then
return true
endif
set i = i + 1
endloop
return false
endfunction
function UnitHasAvailableInventorySpace takes unit u returns boolean
return UnitHasItemType(u,0)
/*
local integer i = 0
loop
exitwhen (i == 6)
if (UnitItemInSlot(u,i) == null) then
return true
endif
set i = i + 1
endloop
return false
*/
endfunction
private function UnitStopAfterCallback takes nothing returns nothing
local integer id = GetTimerReleasedData(GetExpiredTimer())
call IssueImmediateOrder(t[0].unit[id], "stop")
call t[0].remove(id)
endfunction
function UnitStopAfter takes unit u, real duration returns nothing
local integer id = GetHandleId(u)
set t[0].unit[id] = u
call TimerStart(NewTimerEx(id), duration, false, function UnitStopAfterCallback)
endfunction
private function UnitHoldPositionAfterCallback takes nothing returns nothing
local integer id = GetTimerReleasedData(GetExpiredTimer())
call IssueImmediateOrder(t[1].unit[id], "holdposition")
call t[1].remove(id)
endfunction
function UnitHoldPositionAfter takes unit u, real duration returns nothing
local integer id = GetHandleId(u)
set t[1].unit[id] = u
call TimerStart(NewTimerEx(id), duration, false, function UnitHoldPositionAfterCallback)
endfunction
private function UnitSetRangeCallback takes nothing returns nothing
local integer id = GetTimerReleasedData(GetExpiredTimer())
call SetUnitAcquireRange(t[2].unit[id], 1500)
call t[2].remove(id)
endfunction
// ONLY FOR ZOMBIE UNITS
// Default acquisition range is assumed to be 1500
function UnitSetRangeTimed takes unit u, real range, real duration returns nothing
local integer id = GetHandleId(u)
if ((id == 0) or (t[2].unit[id] != null)) then
return
endif
set t[2].unit[id] = u
call SetUnitAcquireRange(u, range)
call TimerStart(NewTimerEx(id), duration, false, function UnitSetRangeCallback)
endfunction
// ----
function UnitEnableFly takes unit u returns nothing
if (UnitAddAbility(u, 'Amrf')) then
call UnitRemoveAbility(u, 'Amrf')
endif
endfunction
function UnitShareVisionAll takes unit u, boolean flag returns nothing
local integer i = 0
loop
call UnitShareVision(u, Player(i), flag)
set i = i + 1
exitwhen (i == bj_MAX_PLAYERS)
endloop
endfunction
function GetArmorValueDamageFactor takes real armor returns real
if (armor < 0.00) then
return 2.00 - Pow(1.00 - DEFENSE_ARMOR /*0.943*/, 0.00 - armor)
endif
return 1.00 - ((armor * DEFENSE_ARMOR) / (1.00 + DEFENSE_ARMOR * armor))
endfunction
function UnitRestartAbilityCooldown takes unit u, integer abilityId returns nothing
call BlzStartUnitAbilityCooldown(u, abilityId, BlzGetUnitAbilityCooldown(u, abilityId, GetUnitAbilityLevel(u, abilityId) - 1))
endfunction
private function UnitRemoveLoopingSound takes nothing returns nothing
local timer tmr = GetExpiredTimer()
local integer id = GetTimerData(tmr)
if (not UnitAlive(SoundTable[id].unit[0])) then
call StopSound(SoundTable[id].sound[1], true, true)
call SoundTable[id].destroy()
call ReleaseTimer(tmr)
endif
set tmr = null
endfunction
function UnitSetLoopingSound takes unit u, string fileName, string soundLabel, integer duration, integer volume, real period returns nothing
local integer id = GetHandleId(u)
local sound s = CreateSound(fileName, true, true, false, 10, 10, "DefaultEAXON")
call SetSoundParamsFromLabel(s, soundLabel)
call SetSoundDuration(s, duration)
call SetSoundVolume(s, volume)
set SoundTable[id] = Table.create()
set SoundTable[id].unit[0] = u
set SoundTable[id].sound[1] = s
call AttachSoundToUnitBJ(s,u)
call PlaySoundBJ(s)
call TimerStart(NewTimerEx(id), period, true, function UnitRemoveLoopingSound)
set s = null
endfunction
function UnitGetNearestEnemyUnit takes unit source, real maxRange returns nothing
local player owner = GetOwningPlayer(source)
local real x = GetUnitX(source)
local real y = GetUnitY(source)
local real dx
local real dy
local real distsq
local real best = maxRange*maxRange
local integer i = 0
local integer size
local unit u
set udg__NearestEnemyUnit = null
call GroupEnumUnitsInRange(udg__UnitGroupA, x, y, maxRange, null)
set size = BlzGroupGetSize(udg__UnitGroupA)
loop
exitwhen (i >= size)
set u = BlzGroupUnitAt(udg__UnitGroupA, i)
if (IsUnitEnemy(u, owner) and UnitAlive(u) and IsUnitVisible(u, owner) and not BlzIsUnitInvulnerable(u)) then
set dx = x - GetUnitX(u)
set dy = y - GetUnitY(u)
set distsq = dx*dx + dy*dy
if (distsq < best) then
set udg__NearestEnemyUnit = u
set best = distsq
endif
endif
set i = i + 1
endloop
set u = null
endfunction
private function Init takes nothing returns nothing
set SoundTable = Table.create()
set t = TableArray[3]
endfunction
endlibrary
library NewItemFuncs
function UACreateItem takes integer itemId, real x, real y returns item
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl", x, y))
return CreateItem(itemId, x, y)
endfunction
endlibrary
library AbilityUtils requires LocationUtils
module Ability
implement Alloc
player owner
unit caster
unit target
real casterX
real casterY
real targetX
real targetY
integer abilityId
integer abilityLevel
ability abilityHandle
// Lazily initialized
private real _distance
private location _casterLoc
private location _targetLoc
private timer _timer
static method create takes nothing returns thistype
local thistype this = thistype.allocate()
set .caster = GetTriggerUnit()
set .target = GetSpellTargetUnit()
set .owner = GetOwningPlayer(.caster)
set .casterX = GetUnitX(.caster)
set .casterY = GetUnitY(.caster)
set .targetX = GetSpellTargetX()
set .targetY = GetSpellTargetY()
set .abilityId = GetSpellAbilityId()
set .abilityLevel = GetUnitAbilityLevel(.caster, .abilityId) - 1
set .abilityHandle = BlzGetUnitAbility(.caster, .abilityId)
set ._distance = -1
set ._casterLoc = null
set ._targetLoc = null
set ._timer = null
return this
endmethod
method operator radius takes nothing returns real
return 0.5 * BlzGetAbilityRealLevelField(.abilityHandle, ABILITY_RLF_AREA_OF_EFFECT, .abilityLevel)
endmethod
method operator distance takes nothing returns real
if (._distance < 0) then
set ._distance = GetDistance(.casterX, .casterY, .targetX, .targetY)
endif
return ._distance
endmethod
method operator casterLoc takes nothing returns location
if (._casterLoc == null) then
set ._casterLoc = Location(.casterX, .casterY)
endif
return ._casterLoc
endmethod
method operator targetLoc takes nothing returns location
if (._targetLoc == null) then
set ._targetLoc = Location(.targetX, .targetY)
endif
return ._targetLoc
endmethod
method offsetTargetLocPolar takes real distance, real radians returns nothing
if (._targetLoc == null) then
set ._targetLoc = Location(.targetX, .targetY)
endif
call MoveLocation(._targetLoc, .targetX + distance * Cos(radians), .targetY + distance * Sin(radians))
set .targetX = GetLocationX(._targetLoc)
set .targetY = GetLocationY(._targetLoc)
endmethod
method offsetTargetLocPolarRandom takes real maxDistance returns nothing
call .offsetTargetLocPolar(GetRandomReal(0, maxDistance), GetRandomAngleRad())
endmethod
method operator timer takes nothing returns timer
if (._timer == null) then
set ._timer = NewTimerEx(this)
endif
return ._timer
endmethod
method destroy takes nothing returns nothing
set .caster = null
set .target = null
set .abilityHandle = null
if (._casterLoc != null) then
call RemoveLocation(._casterLoc)
set ._casterLoc = null
endif
if (._targetLoc != null) then
call RemoveLocation(._targetLoc)
set ._targetLoc = null
endif
if (._timer != null) then
call ReleaseTimer(._timer)
set ._timer = null
endif
call .deallocate()
endmethod
endmodule
///! textmacro REGISTER_SPELL takes ABILITY_ID
//call RegisterSpellEffectEvent($ABILITY_ID$, function thistype.onCast)
///! endtextmacro
endlibrary
scope NewJump
globals
constant real JUMP_MAX_RANGE = 350.00
constant real JUMP_MAX_RANGE_CYBORG = 475.00
endglobals
private function InBuilding takes real x, real y returns boolean
if (RectContainsCoords(udg_rect134, x, y)) then
return true
elseif (RectContainsCoords(udg_rect135, x, y)) then
return true
elseif (RectContainsCoords(udg_rect136, x, y)) then
return true
elseif (RectContainsCoords(udg_rect137, x, y)) then
return true
elseif (RectContainsCoords(udg_rect138, x, y)) then
return true
endif
return false
endfunction
struct Jump extends array
implement Alloc
private unit caster
private real casterX
private real casterY
private real targetX
private real targetY
private real angle
private real cos
private real sin
private real dist
private timer timer
private integer i
private integer j
private integer k
static method create takes nothing returns thistype
return allocate()
endmethod
private static method jumpLoop takes nothing returns nothing
local timer t = GetExpiredTimer()
local thistype this = GetTimerData(t)
local real x = GetUnitX(.caster)
local real y = GetUnitY(.caster)
if (.i > .j) then
call .destroy()
call SetUnitPathing(.caster, true)
call SetUnitFlyHeight(.caster, 0, 900)
call StopSound(udg_sound63, false, true)
if (.k >= 2)then
call SetUnitAnimation(.caster ,"Death")
set bj_lastCreatedUnit = CreateUnit(Player(24), 'h003', x, y, bj_UNIT_FACING)
call UnitApplyTimedLife(bj_lastCreatedUnit, 'BTLF', 2.00)
call UnitAddAbility(bj_lastCreatedUnit, 'A051')
call IssueTargetOrderById(bj_lastCreatedUnit, 852075, .caster)
call SetWidgetLife(.caster, GetWidgetLife(.caster) - (80 * .k))
call PlaySoundAtUnitLoc(udg_sound114, .caster)
endif
if (RectContainsUnit(udg_rect119, .caster)) then
call Func0240(.caster, 3, GetPlayerName(GetOwningPlayer(.caster)) + ": Gross...")
endif
else
set x = x + 25 * .cos
set y = y + 25 * .sin
call SetUnitPosition(.caster, x, y)
set .i = .i + 1
if (.i < .j/2) then
call SetUnitFlyHeight(.caster, .i*9, 1000)
else
call SetUnitFlyHeight(.caster, .k*9 - .i*9, 1000)
endif
endif
set t = null
endmethod
private static method beginJump takes nothing returns nothing
local timer t = GetExpiredTimer()
local thistype this = GetTimerData(t)
call UnitEnableFly(.caster)
call AttachSoundToUnit(udg_sound63, .caster)
call SetSoundVolume(udg_sound63, 127)
call StartSound(udg_sound63)
call SetUnitPathing(.caster, false)
call BlzStartUnitAbilityCooldown(.caster, ABILITY_JUMP, 3.00)
set .i = 1
set .j = R2I(.dist / 25)
call TimerStart(t, 0.03125, true, function thistype.jumpLoop)
set t = null
endmethod
private static method onCast takes nothing returns boolean
local thistype this
local real dx
local real dy
if (GetSpellAbilityId() != ABILITY_JUMP) then
return false
endif
set this = create()
set .caster = GetTriggerUnit()
set .casterX = GetUnitX(.caster)
set .casterY = GetUnitY(.caster)
set .targetX = GetSpellTargetX()
set .targetY = GetSpellTargetY()
set dx = .targetX - .casterX
set dy = .targetY - .casterY
set .angle = Atan2(dy,dx)
set .cos = Cos(.angle)
set .sin = Sin(.angle)
set .dist = SquareRoot(dx*dx + dy*dy)
if ((GetUnitTypeId(.caster) == HERO_CYBORG) and (.dist > JUMP_MAX_RANGE_CYBORG)) then
set .targetX = .casterX + JUMP_MAX_RANGE_CYBORG * .cos
set .targetY = .casterY + JUMP_MAX_RANGE_CYBORG * .sin
elseif (.dist > JUMP_MAX_RANGE) then
set .targetX = .casterX + JUMP_MAX_RANGE * .cos
set .targetY = .casterY + JUMP_MAX_RANGE * .sin
endif
call FindNearestWalkablePoint(.targetX, .targetY)
set .targetX = NewTargetX
set .targetY = NewTargetY
set dx = .targetX - .casterX
set dy = .targetY - .casterY
set .angle = Atan2(dy,dx)
set .cos = Cos(.angle)
set .sin = Sin(.angle)
set .dist = SquareRoot(dx*dx + dy*dy)
set .k = GetTerrainCliffLevel(.casterX, .casterY) - GetTerrainCliffLevel(.targetX, .targetY)
if (.k >= 0 and (RectContainsCoords(bj_mapInitialPlayableArea, .targetX, .targetY)) and (not InBuilding(.targetX, .targetY))) then
set .timer = NewTimerEx(this)
call TimerStart(.timer, 0.15, false, function thistype.beginJump)
else
call IssueImmediateOrderById(.caster, 851993)
call Message(GetTriggerPlayer(), 2, "Cannot jump there")
call ResetUnitAnimation(.caster)
call .destroy()
endif
return false
endmethod
method destroy takes nothing returns nothing
call ReleaseTimer(.timer)
call .deallocate()
endmethod
private static method onInit takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t, Condition(function thistype.onCast))
set t = null
endmethod
endstruct
endscope
struct ReinforcementsTank extends array
implement Alloc
static integer array SummonCount
static group array SummonGroup
private unit summon
private static method create takes nothing returns thistype
return allocate()
endmethod
private method destroy takes nothing returns nothing
set .summon = null
call .deallocate()
endmethod
private static method onLand takes nothing returns nothing
local thistype this = GetTimerReleasedData(GetExpiredTimer())
call UnitRemoveAbility(.summon, 'A04P')
call PauseUnit(.summon, false)
call .destroy()
endmethod
private static method onSpawn takes nothing returns nothing
local thistype this = GetTimerReleasedData(GetExpiredTimer())
call ShowUnit(.summon, true)
call SetUnitFlyHeight(.summon, 0, 300)
call TimerStart(NewTimerEx(this), 4.00, false, function thistype.onLand)
endmethod
private static method onCast takes nothing returns nothing
local thistype this = create()
local player p = GetTriggerPlayer()
local unit caster = GetTriggerUnit()
local integer unitId = IntegerTertiaryOp(GetPlayerTechCount(p, UNIT_MINI_COMBAT_ENGINEER, false) > 0, UNIT_MINI_RIFLEMAN, UNIT_MINI_COMBAT_ENGINEER)
local integer playerId = GetPlayerId(p)
local real x = GetUnitX(caster)
local real y = GetUnitY(caster)
set .summon = CreateUnit(p, unitId, x + GetRandomReal(-250,250), y + GetRandomReal(-250,250), GetRandomReal(0,360))
call SetUnitLifePercentBJ(.summon, 100)
call UnitEnableFly(.summon)
call SetUnitFlyHeight(.summon, 1200, 10000)
call UnitAddAbility(.summon, 'A04P')
call PauseUnit(.summon, true)
call ShowUnit(.summon, false)
if (SummonGroup[playerId] == null) then
set SummonGroup[playerId] = CreateGroup()
endif
call GroupAddUnit(SummonGroup[playerId], .summon)
call GroupAddUnit(udg_group17, .summon) // Rifle Butt
set SummonCount[playerId] = SummonCount[playerId] + 1
if (SummonCount[playerId] >= 3) then
call SetPlayerTechResearched(p, 'R009', 0)
endif
call TimerStart(NewTimerEx(this), 0.20, false, function thistype.onSpawn)
set caster = null
endmethod
private static method onSummonDeath takes nothing returns boolean
local player p = GetTriggerPlayer()
local integer id = GetPlayerId(p)
if (IsUnitInGroup(GetTriggerUnit(), SummonGroup[id])) then
set SummonCount[id] = SummonCount[id] - 1
if (SummonCount[id] < 3) then
call SetPlayerTechResearched(p, 'R009', 1)
endif
endif
return false
endmethod
private static method onInit takes nothing returns nothing
local trigger t = CreateTrigger()
call RegisterSpellEffectEvent(ABILITY_REINFORCEMENTS_TANK, function thistype.onCast)
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t, function thistype.onSummonDeath)
set t = null
endmethod
endstruct
struct PredatorDrone extends array
implement Alloc
private player owner
private unit caster
private unit drone
private timer timer
static method onUpdate takes nothing returns nothing
local thistype this = GetTimerData(GetExpiredTimer())
endmethod
static method create takes unit caster returns thistype
local thistype this = allocate()
set .owner = GetOwningPlayer(caster)
set .caster = caster
set .drone = CreateUnit(.owner, UNIT_PREDATOR_DRONE, GetUnitX(caster), GetUnitY(caster), GetUnitFacing(caster))
set .timer = NewTimerEx(this)
call TimerStart(.timer, 0.03125, true, function thistype.onUpdate)
return this
endmethod
static method onCast takes nothing returns nothing
call create(GetTriggerUnit())
endmethod
method destroy takes nothing returns nothing
call ReleaseTimer(.timer)
set .caster = null
set .drone = null
call .deallocate()
endmethod
static method onInit takes nothing returns nothing
call RegisterSpellEffectEvent(ABILITY_PREDATOR_DRONE, function thistype.onCast)
endmethod
endstruct
struct FragGrenade extends array
implement Ability
static method onExplode takes nothing returns nothing
local thistype this = GetTimerData(GetExpiredTimer())
set bj_lastCreatedUnit = CreateUnit(.owner, 'h003', .targetX, .targetY, bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit, 'A08H')
if (.abilityId == 'A017') then
call SetUnitAbilityLevel(bj_lastCreatedUnit, 'A08H', .abilityLevel + 1)
else
call SetUnitAbilityLevel(bj_lastCreatedUnit, 'A08H', 3)
endif
call DestroyEffect(AddSpecialEffect(SFX_FRAG, .targetX, .targetY))
call KillBarricadesInRangeLoc(.targetLoc, 335 + 15 * GetUnitAbilityLevel(bj_lastCreatedUnit, 'A08H'))
call KillUnit(bj_lastCreatedUnit)
call GroupRemoveUnit(udg_group28, .caster)
call PlaySoundBJ(udg_sounds02[GetRandomInt(1,2)])
call Func0221(.targetLoc, 600)
call .destroy()
endmethod
static method onThrow takes nothing returns nothing
local thistype this = GetTimerData(GetExpiredTimer())
call PlaySoundOnUnitBJ(udg_sound76, 100, .caster)
set bj_lastCreatedUnit = CreateUnit(.owner, 'h00Z', .casterX, .casterY, bj_UNIT_FACING)
call UnitApplyTimedLife(bj_lastCreatedUnit, 'BTLF', 3.00)
call IssuePointOrderById(bj_lastCreatedUnit, 851984, .targetX, .targetY)
call Func0250(.targetLoc)
call TimerStart(.timer, 2.00, false, function thistype.onExplode)
endmethod
static method onEffect takes nothing returns nothing
local thistype this = GetTimerData(GetExpiredTimer())
call GroupAddUnit(udg_group28, .caster)
if (UnitHasItemType(.caster, 'I012') or UnitHasAbility(.caster, ABILITY_GRENADE_ACCURACY)) then
call .offsetTargetLocPolarRandom(25 + .distance / 24)
else
call .offsetTargetLocPolarRandom(25 + .distance / 10)
endif
if (Chance(0.01)) then
call Func0240(.caster, 5, "|cff808000" + GetPlayerName(.owner) + ":|r FUCK OFF!")
else
call Func0240(.caster, 5, "|cff808000" + GetPlayerName(.owner) + ":|r Frag!")
endif
call SetTextTagLifespan(bj_lastCreatedTextTag, 2)
call SetTextTagPermanent(bj_lastCreatedTextTag, false)
call PlaySoundOnUnitBJ(udg_sound89, 100, .caster)
call TimerStart(.timer, 0.40, false, function thistype.onThrow)
endmethod
static method onCast takes nothing returns nothing
local thistype this = thistype.create()
call TimerStart(.timer, 0.00, false, function thistype.onEffect)
endmethod
private static method onInit takes nothing returns nothing
call RegisterSpellEffectEvent('A06Z', function thistype.onCast)
call RegisterSpellEffectEvent('A062', function thistype.onCast)
call RegisterSpellEffectEvent('A017', function thistype.onCast)
call RegisterSpellEffectEvent('A09W', function thistype.onCast)
call RegisterSpellEffectEvent('A015', function thistype.onCast)
endmethod
endstruct
struct StunGrenade extends array
implement Alloc
private unit caster
private player owner
private real targetX
private real targetY
private real unitX
private real unitY
private location targetLoc
private static method create takes nothing returns thistype
return allocate()
endmethod
private method destroy takes nothing returns nothing
call RemoveLocation(.targetLoc)
set .caster = null
set .targetLoc = null
call .deallocate()
endmethod
private static method detonate takes nothing returns nothing
local thistype this = GetTimerReleasedData(GetExpiredTimer())
local unit u = CreateUnit(PLAYER_DUMMY, UNIT_DUMMY, .targetX, .targetY, bj_UNIT_FACING)
//call SetUnitOwner(u, .owner, true)
//call SetUnitX(u, .targetX)
//call SetUnitY(u, .targetY)
call UnitAddAbility(u, 'A08L')
call IssueImmediateOrder(u, "stomp")
call UnitApplyTimedLife(u, 'BTLF', 2.0)
//call DummyReleaseTimed(u, 2.0)
call GroupRemoveUnit(udg_group28, .caster)
if (GetRandomInt(0,1) == 0) then
call PlaySoundBJ(gg_snd_StunGrenade01)
else
call PlaySoundBJ(gg_snd_StunGrenade02)
endif
call Func0221(.targetLoc, 600) // Tinnitus
set u = null
call .destroy()
endmethod
private static method throw takes nothing returns nothing
local thistype this = GetTimerReleasedData(GetExpiredTimer())
local unit u = CreateUnit(.owner, 'h00Z', .unitX, .unitY, bj_UNIT_FACING)
call PlaySoundOnUnitBJ(udg_sound76, 100, .caster)
call UnitApplyTimedLife(u, 'BTLF', 3.0)
call IssuePointOrderById(u, 851984, .targetX, .targetY)
//call Func0250(.targetLoc)
call TimerStart(NewTimerEx(this), 2.00, false, function thistype.detonate)
set u = null
endmethod
private static method onCast takes nothing returns boolean
local thistype this = create()
local real radius
local real angle
set .caster = GetTriggerUnit()
set .owner = GetTriggerPlayer()
set .targetX = GetSpellTargetX()
set .targetY = GetSpellTargetY()
set .unitX = GetUnitX(.caster)
set .unitY = GetUnitY(.caster)
set .targetLoc = Location(.targetX, .targetY)
call GroupAddUnit(udg_group28, .caster)
if (UnitHasItemType(.caster, 'I012') or UnitHasAbility(.caster, ABILITY_GRENADE_ACCURACY)) then
set radius = 25
else
set radius = 75
endif
set angle = GetRandomAngleRad()
set .targetX = .targetX + radius * Cos(angle)
set .targetY = .targetY + radius * Sin(angle)
call Func0240(.caster, 5, "|cff808000" + GetPlayerName(.owner) + ":|r Stun!")
call SetTextTagPermanent(bj_lastCreatedTextTag, false)
call SetTextTagLifespan(bj_lastCreatedTextTag, 2.0)
call PlaySoundOnUnitBJ(udg_sound89, 100, .caster)
call TimerStart(NewTimerEx(this), 0.40, false, function thistype.throw)
return false
endmethod
private static method onInit takes nothing returns nothing
call RegisterSpellEffectEvent('A08K', function thistype.onCast)
call RegisterSpellEffectEvent('A08U', function thistype.onCast)
call RegisterSpellEffectEvent('A0AL', function thistype.onCast)
endmethod
endstruct
struct WPGrenade extends array
implement Alloc
private unit caster
private player owner
private real targetX
private real targetY
private real unitX
private real unitY
private location targetLoc
private static method create takes nothing returns thistype
return allocate()
endmethod
private method destroy takes nothing returns nothing
call RemoveLocation(.targetLoc)
set .caster = null
set .targetLoc = null
call .deallocate()
endmethod
private static method detonate takes nothing returns nothing
local thistype this = GetTimerReleasedData(GetExpiredTimer())
local unit u = CreateUnit(PLAYER_DUMMY, 'h01R', .targetX, .targetY, bj_UNIT_FACING)
call UnitApplyTimedLife(u, 'BTLF', 30.0)
call GroupRemoveUnit(udg_group28, .caster)
call PlaySoundOnUnitBJ(gg_snd_ArtExplodeW, 50, u)
set u = null
call .destroy()
endmethod
private static method throw takes nothing returns nothing
local thistype this = GetTimerReleasedData(GetExpiredTimer())
local unit u = CreateUnit(.owner, 'h00Z', .unitX, .unitY, bj_UNIT_FACING)
call PlaySoundOnUnitBJ(udg_sound76, 100, .caster)
call UnitApplyTimedLife(u, 'BTLF', 3.0)
call IssuePointOrderById(u, 851984, .targetX, .targetY)
//call Func0250(.targetLoc)
call TimerStart(NewTimerEx(this), 2.00, false, function thistype.detonate)
set u = null
endmethod
private static method onCast takes nothing returns boolean
local thistype this = create()
local real radius
local real angle
set .caster = GetTriggerUnit()
set .owner = GetTriggerPlayer()
set .targetX = GetSpellTargetX()
set .targetY = GetSpellTargetY()
set .unitX = GetUnitX(.caster)
set .unitY = GetUnitY(.caster)
set .targetLoc = Location(.targetX, .targetY)
call GroupAddUnit(udg_group28, .caster)
if (UnitHasItemType(.caster, 'I012') or UnitHasAbility(.caster, ABILITY_GRENADE_ACCURACY)) then
set radius = 25
else
set radius = 75
endif
set angle = GetRandomAngleRad()
set .targetX = .targetX + radius * Cos(angle)
set .targetY = .targetY + radius * Sin(angle)
call Func0240(.caster, 5, "|cff808000" + GetPlayerName(.owner) + ":|r Willy Pete!")
call SetTextTagPermanent(bj_lastCreatedTextTag, false)
call SetTextTagLifespan(bj_lastCreatedTextTag, 2.0)
call PlaySoundOnUnitBJ(udg_sound89, 100, .caster)
call TimerStart(NewTimerEx(this), 0.40, false, function thistype.throw)
return false
endmethod
private static method onInit takes nothing returns nothing
call RegisterSpellEffectEvent('A093', function thistype.onCast)
call RegisterSpellEffectEvent('A096', function thistype.onCast)
endmethod
endstruct
function Trig_Fire_Mission_Conditions takes nothing returns boolean
local player p = GetTriggerPlayer()
local integer id = GetPlayerId(p)
if ( not ( GetSpellAbilityId() == 'A00A' ) ) then
return false
endif
if ( not ( udg_ShellsRemaining[id] >= udg_ShellsPerMission[id] ) ) then
return false
endif
return true
endfunction
function Trig_Fire_Mission_Actions takes nothing returns nothing
local player p = GetTriggerPlayer()
local integer id = GetPlayerId(p)
local location loc_location01=GetSpellTargetLoc()
local location loc_location02
local unit loc_unit01=GetSpellAbilityUnit()
local unit loc_unit02
local integer loc_integer01=1
local integer loc_integer02=udg_ShellsPerMission[id]
local integer loc_integer03=udg_MissionRadius[id]
local effect loc_effect01=AddSpecialEffectLocBJ(loc_location01,"Abilities\\Spells\\Human\\DevotionAura\\DevotionAura.mdl")
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,(loc_location01),5.,0,40,40,80)
set udg_ShellsRemaining[id] = udg_ShellsRemaining[id] - udg_ShellsPerMission[id]
call DisplayTimedTextToPlayer(p,0,0,5.,("Shells remaining: "+I2S(udg_ShellsRemaining[id])))
call VXSleep(16.-2*I2R(GetUnitAbilityLevel(loc_unit01,'A011')))
call DestroyEffect(loc_effect01)
set loc_unit02=CreateUnit(GetOwningPlayer(loc_unit01),'h00S',GetLocationX(loc_location01),GetLocationY(loc_location01),.0)
call PlaySoundAtPointBJ(udg_sound105,100,(loc_location01),500.)
call Func0250(loc_location01)
call VXSleep(.9)
call Func0221(loc_location01,1000)
loop
exitwhen loc_integer01>loc_integer02
set loc_location02=(Func0002((loc_location01),GetRandomReal(.0,I2R(loc_integer03)),GetRandomReal(0,360)))
call Func0232('A05D',"clusterrockets",OffsetLocation(loc_location02,-300,300),loc_location02,1300.)
call VXSleep(1.)
call DestroyEffect(AddSpecialEffectLoc("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",loc_location02))
call Func0238(350.,loc_location02)
call UnitDamagePoint((loc_unit01),0,350.,GetLocationX(loc_location02),GetLocationY(loc_location02),(350.+(150.*I2R(GetUnitAbilityLevelSwapped('A00A',loc_unit01)))),true,false,ATTACK_TYPE_SIEGE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call KillBarricadesInRangeLoc(loc_location02, 350)
call RemoveLocation(loc_location02)
call PlaySoundBJ(udg_sounds01[GetRandomInt(1,7)])
call Func0227(10.,.3)
call VXSleep(GetRandomReal(.04,.2))
set loc_integer01=loc_integer01+1
endloop
call RemoveLocation(loc_location01)
call RemoveUnit(loc_unit02)
set loc_location01=null
set loc_location02=null
set loc_effect01=null
set loc_unit01=null
set loc_unit02=null
endfunction
//===========================================================================
function InitTrig_Fire_Mission takes nothing returns nothing
set gg_trg_Fire_Mission = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Fire_Mission, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Fire_Mission, Condition( function Trig_Fire_Mission_Conditions ) )
call TriggerAddAction( gg_trg_Fire_Mission, function Trig_Fire_Mission_Actions )
endfunction
struct ConstrictionNet extends array
implement Alloc
private static Table NetTable
private unit target
private integer targetId
static method create takes unit target returns thistype
local thistype this = allocate()
set .target = target
set .targetId = GetHandleId(target)
return this
endmethod
private static method removeEffect takes nothing returns nothing
local thistype this = GetTimerReleasedData(GetExpiredTimer())
call UnitRemoveAbility(.target, BUFF_CONSTRICTION_NET)
call .destroy()
endmethod
private static method onCast takes nothing returns nothing
local thistype this
local unit caster
local integer abilityId
local real duration
local timer t
if (not UnitHasAttribute(GetSpellTargetUnit(), ATTRIBUTE_BOSS)) then
return
endif
set this = create(GetSpellTargetUnit())
set caster = GetTriggerUnit()
set abilityId = GetSpellAbilityId()
set duration = BlzGetAbilityRealLevelField(BlzGetUnitAbility(caster, abilityId), ABILITY_RLF_DURATION_HERO, GetUnitAbilityLevel(caster, abilityId) - 1)
set t = NetTable.timer[.targetId]
if (t == null) then
set t = NewTimerEx(this)
set NetTable.timer[.targetId] = t
endif
call TimerStart(t, duration, false, function thistype.removeEffect)
set caster = null
set t = null
endmethod
method destroy takes nothing returns nothing
call NetTable.timer.remove(.targetId)
call .deallocate()
endmethod
private static method onInit takes nothing returns nothing
set NetTable = Table.create()
call RegisterSpellEffectEvent(ABILITY_CONSTRICTION_NET, function thistype.onCast)
call RegisterSpellEffectEvent(ABILITY_CONSTRICTION_NET_MINI, function thistype.onCast)
endmethod
endstruct
function Trig_Illumination_Rounds_Conditions takes nothing returns boolean
local player p = GetTriggerPlayer()
local integer id = GetPlayerId(p)
if ( not ( GetSpellAbilityId() == 'A018' ) ) then
return false
endif
if ( not ( udg_ShellsRemaining[id] >= udg_ShellsPerMission[id] ) ) then
return false
endif
return true
endfunction
function Trig_Illumination_Rounds_Actions takes nothing returns nothing
local player p = GetTriggerPlayer()
local integer id = GetPlayerId(p)
local location loc_location01=GetSpellTargetLoc()
local location loc_location02
local unit loc_unit01=GetSpellAbilityUnit()
local unit loc_unit02
local integer loc_integer01=1
local integer loc_integer02=udg_ShellsPerMission[id]
local integer loc_integer03=udg_MissionRadius[id]
local integer loc_integer04=GetUnitAbilityLevelSwapped('A03A',loc_unit01)
local effect loc_effect01
local effect array loc_effects01
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,(loc_location01),5.,0,40,40,80)
set udg_ShellsRemaining[id] = udg_ShellsRemaining[id] - udg_ShellsPerMission[id]
call DisplayTimedTextToPlayer(p,0,0,5.,("Shells remaining: "+I2S(udg_ShellsRemaining[id])))
set loc_effect01=AddSpecialEffectLocBJ(loc_location01,"Abilities\\Spells\\Orc\\WarDrums\\DrumsCasterHeal.mdl")
call VXSleep((16.-2*I2R(GetUnitAbilityLevelSwapped('A011',(loc_unit01)))))
call DestroyEffect(loc_effect01)
loop
exitwhen loc_integer01>loc_integer02
set loc_location02=(Func0002((loc_location01),GetRandomReal(.0,I2R(loc_integer03)),GetRandomReal(0,360)))
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Human\\Flare\\FlareTarget.mdl",loc_location02))
set loc_effects01[loc_integer01]=AddSpecialEffectLoc("war3mapImported\\StrongLight.MDX",loc_location02)
call UnitDamagePointLoc(loc_unit01,0,800.,loc_location02,50.+(50.*I2R(loc_integer04)),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
set loc_unit02=CreateUnit(GetOwningPlayer(loc_unit01),'h00S',GetLocationX(loc_location02),GetLocationY(loc_location02),bj_UNIT_FACING)
call UnitAddAbility(loc_unit02,'A05Q')
call UnitApplyTimedLifeBJ(3.+I2R(loc_integer04),'BTLF',loc_unit02)
call RemoveLocation(loc_location02)
call VXSleep(GetRandomReal(1.2,4.85))
set loc_integer01=loc_integer01+1
endloop
call VXSleep(3.+I2R(loc_integer04))
set loc_integer01=1
loop
exitwhen loc_integer01>loc_integer02
call DestroyEffect(loc_effects01[loc_integer01])
set loc_integer01=loc_integer01+1
endloop
call RemoveLocation(loc_location01)
call RemoveLocation(loc_location02)
set loc_location01=null
set loc_location02=null
set loc_unit01=null
set loc_unit02=null
endfunction
//===========================================================================
function InitTrig_Illumination_Rounds takes nothing returns nothing
set gg_trg_Illumination_Rounds = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Illumination_Rounds, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Illumination_Rounds, Condition( function Trig_Illumination_Rounds_Conditions ) )
call TriggerAddAction( gg_trg_Illumination_Rounds, function Trig_Illumination_Rounds_Actions )
endfunction
scope MosMode initializer Init
private function UpdateMosStock takes nothing returns nothing
call AddUnitToStock(udg_Argis, HERO_RIFLEMAN, 11, 11)
call AddUnitToStock(udg_Argis, HERO_NAVY_CORPSMAN, 11, 11)
call AddUnitToStock(udg_Argis, HERO_GRENADIER, 11, 11)
call AddUnitToStock(udg_Argis, HERO_MACHINE_GUNNER, 11, 11)
call AddUnitToStock(udg_Argis, HERO_SCOUT, 11, 11)
call AddUnitToStock(udg_Argis, HERO_MARKSMAN, 11, 11)
call AddUnitToStock(udg_Argis, HERO_FIREBAT, 11, 11)
call AddUnitToStock(udg_Argis, HERO_COMBAT_ENGINEER, 11, 11)
call AddUnitToStock(udg_Predator, HERO_HEAVY_SUPPORT, 11, 11)
call AddUnitToStock(udg_Predator, HERO_ASSAULTMAN, 11, 11)
call AddUnitToStock(udg_Predator, HERO_CYBORG, 11, 11)
call AddUnitToStock(udg_Predator, HERO_GLOBAL_HAWK, 11, 11)
call AddUnitToStock(udg_Predator, HERO_FORWARD_OBSERVER, 11, 11)
call AddUnitToStock(udg_Predator, HERO_GHOST, 11, 11)
call AddUnitToStock(udg_Predator, HERO_COMMANDER, 11, 11)
call AddUnitToStock(udg_Predator, HERO_MEDIC, 11, 11)
call AddUnitToStock(udg_Predator, HERO_BRADLEY, 11, 11)
endfunction
private function DisableMosLimits takes nothing returns nothing
local integer i = 0
call DisableTrigger(GetTriggeringTrigger())
if (udg_boolean26) then // Rifle mode
return
endif
call DisableTrigger(udg_trigger31)
call PlaySoundBJ(gg_snd_ingamechatwhat1)
call DisplayTimedTextToForce(GetPlayersAll(), 15.00, "|cff808000Alert:|r MOS restrictions have been lifted; saving is disabled.")
set udg_NoMosLimits = true
call RemoveUnit(udg_Argis)
set udg_Argis = CreateUnit(Player(24),'h01T',5023.5,988.2,162.27)
set udg_unit18 = udg_Argis
call RemoveUnit(udg_Predator)
set udg_Predator = CreateUnit(Player(24),'h01Y',0,0,0)
loop
call SetPlayerUnitAvailableBJ(HERO_RIFLEMAN, true, Player(i))
call SetPlayerUnitAvailableBJ(HERO_NAVY_CORPSMAN, true, Player(i))
call SetPlayerUnitAvailableBJ(HERO_GRENADIER, true, Player(i))
call SetPlayerUnitAvailableBJ(HERO_MACHINE_GUNNER, true, Player(i))
call SetPlayerUnitAvailableBJ(HERO_SCOUT, true, Player(i))
call SetPlayerUnitAvailableBJ(HERO_MARKSMAN, true, Player(i))
call SetPlayerUnitAvailableBJ(HERO_FIREBAT, true, Player(i))
call SetPlayerUnitAvailableBJ(HERO_COMBAT_ENGINEER, true, Player(i))
call SetPlayerUnitAvailableBJ(HERO_HEAVY_SUPPORT, true, Player(i))
call SetPlayerUnitAvailableBJ(HERO_ASSAULTMAN, true, Player(i))
call SetPlayerUnitAvailableBJ(HERO_CYBORG, true, Player(i))
call SetPlayerUnitAvailableBJ(HERO_GLOBAL_HAWK, true, Player(i))
call SetPlayerUnitAvailableBJ(HERO_FORWARD_OBSERVER, true, Player(i))
call SetPlayerUnitAvailableBJ(HERO_GHOST, true, Player(i))
call SetPlayerUnitAvailableBJ(HERO_COMMANDER, true, Player(i))
call SetPlayerUnitAvailableBJ(HERO_MEDIC, true, Player(i))
call SetPlayerUnitAvailableBJ(HERO_BRADLEY, true, Player(i))
call UnitShareVision(udg_Argis, Player(i), true)
call UnitShareVision(udg_Predator, Player(i), true)
set i = i + 1
exitwhen (i == bj_MAX_PLAYERS)
endloop
call UpdateMosStock()
endfunction
private function Init takes nothing returns nothing
set gg_trg_MOS_Mode = CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_MOS_Mode, Player(0), "-mos", true)
call TriggerAddAction(gg_trg_MOS_Mode, function DisableMosLimits)
endfunction
endscope
scope ItemSmart initializer Init
private function OnTargetOrder takes nothing returns boolean
local unit u = null
local item it = null
local item dropItem = null
local integer id
local integer acquireSlot
local integer dropSlot = 0
local integer slotCount
local real x
local real y
// item is right-clicked
if ((GetIssuedOrderId() == OrderId("smart")) and (GetOrderTargetItem() != null)) then
set u = GetTriggerUnit()
set it = GetOrderTargetItem()
set x = GetItemX(it)
set y = GetItemY(it)
if (IsUnitInRangeXY(u, x, y, ITEM_PICK_UP_RANGE)) then
set id = GetItemTypeId(it)
// no space, drop items hoping to stack
if (not UnitHasAvailableInventorySpace(u)) then
// don't play sounds in case we temporarily drop armor
set udg_SuppressItemSounds = true
set slotCount = UnitInventoryCount(u)
loop
exitwhen (dropSlot == slotCount)
set dropItem = UnitItemInSlot(u, dropSlot)
// drop item in next slot instantly to temporarily make space
call UnitRemoveItemFromSlot(u, dropSlot)
// give item to unit, see if it stacks with anything,
// thereby freeing up inventory space
call UnitAddItem(u, it)
if (not UnitHasAvailableInventorySpace(u)) then
// could not stack with existing item
call UnitRemoveItemFromSlot(u, dropSlot) // drop acquired item instantly
call SetItemPosition(it, x, y) // put it back where it was
else
// successful item stacking
if (GetLocalPlayer() == GetTriggerPlayer()) then
call PlaySoundBJ(gg_snd_PickUpItem)
endif
call UnitAddItem(u, dropItem) // give back item dropped to make space
exitwhen true
endif
call UnitAddItem(u, dropItem) // give back item dropped to make space
set dropSlot = dropSlot + 1
endloop
// order the unit to stop, otherwise it will move onto the item
//call UnitStopAfter(u, 0.00)
set udg_SuppressItemSounds = false
set dropItem = null
endif
endif
set u = null
set it = null
endif
return false
endfunction
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(t, function OnTargetOrder)
endfunction
endscope
scope Load
function LoadCodeForPlayer takes player p, string s returns nothing
//call Log("Loading code \"|cffffcc00" + s + "|r\" for player |cffffcc00" + GetPlayerName(p) + "|r")
call SetPlayerName(p,udg_strings04[(1+GetPlayerId(p))])
set udg_integers07[0]=2
set udg_integers06[1]=20
set udg_integers06[2]=14
set udg_player01=p
set udg_string01=s
if(((StringLength(udg_string01)!=0)))then
set udg_integer07=Func0072(udg_player01,udg_string01)
if(((udg_integer07!=0)))then
call DisplayTextToForce(CreatePlayerForce(p),"Soldier ID invalid.")
return
endif
if(((((udg_integers07[1]<=99)or(((udg_integers07[1]>=(udg_integers07[2]*100))and(udg_integers07[1]<=((udg_integers07[2]+1)*100))))))))then
call DisplayTimedTextToForce(CreatePlayerForce(p),120.," ")
call DisplayTimedTextToForce(CreatePlayerForce(p),120.,("Experience is "+I2S(udg_integers07[1])))
set udg_integers04[(1+GetPlayerId(p))]=udg_integers07[1]
set udg_integers34[(1+GetPlayerId(p))]=udg_integers07[1]
set udg_integers21[(1+GetPlayerId(p))]=udg_integers07[2]
set udg_booleans03[(1+GetPlayerId(p))]=true
else
call DisplayTextToForce(CreatePlayerForce(p),"Soldier ID invalid.")
return
endif
endif
call SetPlayerName(p,(SubStringBJ(udg_strings03[(1+GetPlayerId(p))],3,StringLength(udg_strings03[(1+GetPlayerId(p))]))+(" "+udg_strings04[(1+GetPlayerId(p))])))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=19
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(((udg_integers17[bj_forLoopAIndex]<=udg_integers04[(1+GetPlayerId(p))])and(udg_integers18[bj_forLoopAIndex]>=udg_integers04[(1+GetPlayerId(p))])))then
if(udg_units01[(1+GetPlayerId(p))]!=null and GetUnitTypeId(udg_units01[(1+GetPlayerId(p))])=='H00C')then
set udg_strings03[(1+GetPlayerId(p))]=udg_strings06[bj_forLoopAIndex]
else
set udg_strings03[(1+GetPlayerId(p))]=udg_strings05[bj_forLoopAIndex]
endif
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_integers20[(1+GetPlayerId(p))]=S2I(SubStringBJ(udg_strings03[(1+GetPlayerId(p))],1,2))
endfunction
endscope
scope ZombieDeath initializer Init
private function OnDeath takes nothing returns boolean
if (GetUnitRace(GetTriggerUnit()) == RACE_UNDEAD) then
call GroupRemoveUnit(udg_ZombiePlayerUnits[GetPlayerId(GetTriggerPlayer()) + 1], GetTriggerUnit())
endif
return false
endfunction
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t, function OnDeath)
endfunction
endscope
scope Barricades initializer Init
globals
private HashTable BarricadeTable
endglobals
private function SetInvulnerable takes nothing returns nothing
local integer id = GetTimerReleasedData(GetExpiredTimer())
call SetUnitInvulnerable(BarricadeTable[id].unit[1], true)
call BarricadeTable.remove(id)
endfunction
private function OnAttack takes nothing returns boolean
local unit u = GetAttacker()
local timer t
local integer unitId
if (GetUnitTypeId(u) == UNIT_BARRICADE) then
call SetUnitInvulnerable(u, false)
set unitId = GetHandleId(u)
set t = BarricadeTable[unitId].timer[0]
if (t == null) then
set t = NewTimerEx(unitId)
set BarricadeTable[unitId].timer[0] = t
set BarricadeTable[unitId].unit[1] = u
else
call TimerStart(t, 2.00, false, function SetInvulnerable)
endif
endif
set u = null
return false
endfunction
private function Init takes nothing returns nothing
set gg_trg_BarricadeAttack = CreateTrigger()
set BarricadeTable = HashTable.create()
call TriggerRegisterAnyUnitEventBJ(gg_trg_BarricadeAttack, EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_BarricadeAttack, function OnAttack)
endfunction
endscope
scope TurretMove initializer Init
private function Turret takes nothing returns nothing
local integer i = 1
loop
exitwhen (i > udg_TurretCount)
if (UnitAlive(udg_units06[i])) then
set udg_reals02[i] = GetUnitX(udg_units06[i]) - 15.00
set udg_reals03[i] = GetUnitY(udg_units06[i]) - 15.00
call SetUnitX(udg_units07[i],udg_reals02[i])
call SetUnitY(udg_units07[i],udg_reals03[i])
else
call KillUnit(udg_units07[i])
endif
set i = i + 1
endloop
endfunction
private function Init takes nothing returns nothing
call TimerStart(CreateTimer(), 0.025, true, function Turret)
endfunction
endscope
struct LandTakeOff extends array
implement Alloc
private static Table table
private unit caster
private item item1
private item item2
private item item3
static method create takes unit caster returns thistype
local thistype this = allocate()
set .caster = caster
set table[GetHandleId(caster)] = this
return this
endmethod
private static method onFinish takes nothing returns nothing
local thistype this = GetTimerReleasedData(GetExpiredTimer())
set .item1 = UnitItemInSlot(.caster, 0)
set .item2 = UnitItemInSlot(.caster, 1)
set .item3 = UnitItemInSlot(.caster, 2)
call UnitRemoveAbility(.caster, 'A09N')
call UnitAddAbility(.caster, 'A08C')
call UnitAddItem(.caster, .item1)
call UnitAddItem(.caster, .item2)
call UnitAddItem(.caster, .item3)
call BlzSetUnitWeaponBooleanField(.caster, UNIT_WEAPON_BF_ATTACKS_ENABLED, 0, true)
call BlzUnitDisableAbility(.caster, ABILITY_SOLID_ROCKET_BOOST, false, false)
call BlzUnitDisableAbility(.caster, ABILITY_HELLFIRE_MISSILE, false, false)
call BlzUnitDisableAbility(.caster, ABILITY_INFRARED_CAMERAS, false, false)
call BlzUnitDisableAbility(.caster, ABILITY_PHOTON_BLAST, false, false)
call BlzUnitDisableAbility(.caster, ABILITY_GLOBAL_HAWK_MENU, false, false)
call UnitRestartAbilityCooldown(.caster, ABILITY_LAND_AIRCRAFT)
call .destroy()
endmethod
private static method onElevated takes nothing returns nothing
local timer t = GetExpiredTimer()
local thistype this = GetTimerData(t)
call PauseUnit(.caster, false)
call SetUnitPropWindow(.caster, GetUnitDefaultPropWindow(.caster))
call SetUnitMoveSpeed(.caster, GetUnitDefaultMoveSpeed(.caster))
call SetUnitTurnSpeed(.caster, GetUnitDefaultTurnSpeed(.caster))
//call BlzUnitDisableAbility(.caster, ABILITY_SOLID_ROCKET_BOOST, true, false)
//call BlzUnitDisableAbility(.caster, ABILITY_HELLFIRE_MISSILE, true, false)
//call BlzUnitDisableAbility(.caster, ABILITY_INFRARED_CAMERAS, true, false)
//call BlzUnitDisableAbility(.caster, ABILITY_PHOTON_BLAST, true, false)
//call BlzUnitDisableAbility(.caster, ABILITY_GLOBAL_HAWK_MENU, true, false)
call TimerStart(t, 2.00, false, function thistype.onFinish)
set t = null
endmethod
private static method castTakeOff takes nothing returns nothing
local thistype this = table[GetHandleId(GetTriggerUnit())]
local real height = GetUnitDefaultFlyHeight(.caster)
call IssueImmediateOrder(.caster, "stop")
call PauseUnit(.caster, true)
call UnitRemoveAbility(.caster, 'A09M')
call UnitRemoveAbility(.caster, ABILITY_SELF_REPAIR)
call UnitRemoveAbility(.caster, ABILITY_TAKE_OFF_AIRCRAFT)
call SetUnitFlyHeight(.caster, height, height / 5.00)
call TimerStart(NewTimerEx(this), 3.00, false, function thistype.onElevated)
endmethod
private static method onLand takes nothing returns nothing
local thistype this = GetTimerReleasedData(GetExpiredTimer())
call PauseUnit(.caster, false)
call SetUnitPropWindow(.caster, 0)
call SetUnitMoveSpeed(.caster, 0)
call SetUnitTurnSpeed(.caster, 0)
call UnitAddAbility(.caster, ABILITY_SELF_REPAIR)
call UnitAddAbility(.caster, ABILITY_TAKE_OFF_AIRCRAFT)
call UnitRestartAbilityCooldown(.caster, ABILITY_TAKE_OFF_AIRCRAFT)
call IssueTargetOrder(.caster, "heal", .caster)
endmethod
private static method castLand takes nothing returns nothing
local unit u = GetTriggerUnit()
local thistype this
if (IsTerrainPathable(GetUnitX(u), GetUnitY(u), PATHING_TYPE_WALKABILITY)) then
call Message(GetTriggerPlayer(), 3, "|cffffcc00Cannot land there|r")
set u = null
return
endif
set this = create(u)
if (GetLocalPlayer() == GetTriggerPlayer()) then
call ForceUICancel() // Close "More Actions"
endif
set .item1 = UnitItemInSlot(.caster, 0)
set .item2 = UnitItemInSlot(.caster, 1)
set .item3 = UnitItemInSlot(.caster, 2)
call UnitRemoveAbility(.caster, 'A08C')
call UnitAddAbility(.caster, 'A09N')
call UnitAddAbility(.caster, 'A09M')
call UnitAddItem(.caster, .item1)
call UnitAddItem(.caster, .item2)
call UnitAddItem(.caster, .item3)
call BlzSetUnitWeaponBooleanField(.caster, UNIT_WEAPON_BF_ATTACKS_ENABLED, 0, false)
call BlzUnitDisableAbility(.caster, ABILITY_SOLID_ROCKET_BOOST, false, true)
call BlzUnitDisableAbility(.caster, ABILITY_HELLFIRE_MISSILE, false, true)
call BlzUnitDisableAbility(.caster, ABILITY_INFRARED_CAMERAS, false, true)
call BlzUnitDisableAbility(.caster, ABILITY_PHOTON_BLAST, false, true)
call BlzUnitDisableAbility(.caster, ABILITY_GLOBAL_HAWK_MENU, false, true)
call SetUnitFlyHeight(.caster, 0, GetUnitFlyHeight(.caster) / 5.00)
call IssueImmediateOrder(.caster, "stop")
call PauseUnit(.caster, true)
call TimerStart(NewTimerEx(this), 5.00, false, function thistype.onLand)
set u = null
endmethod
method destroy takes nothing returns nothing
call table.remove(GetHandleId(.caster))
call .deallocate()
endmethod
private static method onInit takes nothing returns nothing
set table = Table.create()
call RegisterSpellEffectEvent(ABILITY_LAND_AIRCRAFT, function thistype.castLand)
call RegisterSpellEffectEvent(ABILITY_TAKE_OFF_AIRCRAFT, function thistype.castTakeOff)
endmethod
endstruct
scope AprEffect initializer Init
globals
Table AprTable
endglobals
private function OnDamage takes nothing returns boolean
local unit source = null
local unit target = null
local real armor
local real damageFactor
/*
if (BlzGetEventIsAttack()) then // logic seems to be reversed here
return false
endif
*/
set source = GetTriggerUnit() //GetEventDamageSource()
call BJDebugMsg(GetUnitName(source) + " attack dmg")
if (AprTable[GetHandleId(source)] == 2) then
set target = BlzGetEventDamageTarget()
set armor = BlzGetUnitArmor(target)
call BJDebugMsg("target " + GetUnitName(target) + " has armor " + R2S(armor))
if (armor > 0.00) then
set damageFactor = GetArmorValueDamageFactor(armor)
call BJDebugMsg(R2S(GetEventDamage() / damageFactor))
call BlzSetEventDamage(GetEventDamage() / damageFactor)
endif
else
call BJDebugMsg("does not have ability")
endif
set source = null
set target = null
return false
endfunction
private function Init takes nothing returns nothing
set AprTable = Table.create()
set gg_trg_APR_Effect = CreateTrigger()
call TriggerAddCondition(gg_trg_APR_Effect, function OnDamage)
endfunction
endscope