Advertisement
Scarjit

Sc2 Paste (MD5 Lib)

Feb 28th, 2014
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 150.04 KB | None | 0 0
  1. //==================================================================================================
  2. //
  3. // Generated Map Script
  4. //
  5. // Name: Blood Tournament REVIVED
  6. //
  7. //==================================================================================================
  8. include "TriggerLibs/NativeLib"
  9.  
  10. //--------------------------------------------------------------------------------------------------
  11. // Library: MD5_Hash
  12. //--------------------------------------------------------------------------------------------------
  13. // Function Declarations
  14. void lib1_gf_InitializeHashInput ();
  15. void lib1_gf_AddBooleanToHashInput (bool lp_boolean);
  16. void lib1_gf_AddByteToHashInput (byte lp_byte);
  17. void lib1_gf_AddBytesToHashInput (byte lp_byte, int lp_amount);
  18. void lib1_gf_AddIntegerToHashInput (int lp_integer);
  19. void lib1_gf_AddIntegersToHashInput (int lp_integer, int lp_amount);
  20. void lib1_gf_AddRealToHashInput (fixed lp_real);
  21. void lib1_gf_AddStringToHashInput (string lp_string);
  22. void lib1_gf_AddUnitToHashInput (unit lp_unit);
  23. string lib1_gf_GenerateMD5HashCode ();
  24. string lib1_gf_GenerateSHA256HashCode ();
  25.  
  26. // Custom Script
  27. //--------------------------------------------------------------------------------------------------
  28. // Custom Script: Global Script
  29. //--------------------------------------------------------------------------------------------------
  30. // Copyright (C) 2011 by Danny de Jong
  31. //
  32. // Permission is hereby granted, free of charge, to any person obtaining a copy
  33. // of this software and associated documentation files (the "Software"), to deal
  34. // in the Software without restriction, including without limitation the rights
  35. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  36. // copies of the Software, and to permit persons to whom the Software is
  37. // furnished to do so, subject to the following conditions:
  38. //
  39. // The above copyright notice and this permission notice shall be included in
  40. // all copies or substantial portions of the Software.
  41. //
  42. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  43. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  44. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  45. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  46. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  47. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  48. // THE SOFTWARE.
  49. // Hash Input
  50. byte[1024] HashInputData;
  51. int HashInputSize = 0;
  52. int GetHashInputLittleEndianInt( int position )
  53. {
  54. int temp;
  55. int result;
  56. position *= 4;
  57. result = HashInputData[position];
  58. temp = HashInputData[position + 1];
  59. result |= temp << 8;
  60. temp = HashInputData[position + 2];
  61. result |= temp << 16;
  62. temp = HashInputData[position + 3];
  63. result |= temp << 24;
  64. return result;
  65. }
  66. int GetHashInputBigEndianInt( int position )
  67. {
  68. int temp;
  69. int result;
  70. position *= 4;
  71. temp = HashInputData[position];
  72. result = temp << 24;
  73. temp = HashInputData[position + 1];
  74. result |= temp << 16;
  75. temp = HashInputData[position + 2];
  76. result |= temp << 8;
  77. temp = HashInputData[position + 3];
  78. result |= temp;
  79. return result;
  80. }
  81. // ASCII conversion
  82. string asciiTable = "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff";
  83. byte CharToAsciiCode(string charContainingString, int charPosition)
  84. {
  85. return StringFind( asciiTable, StringSub( charContainingString, charPosition + 1, charPosition + 1), c_stringCase );
  86. }
  87. // Hex Conversion
  88. string[16] HexTable;
  89. string GetHexChar( int number )
  90. {
  91. return HexTable[number];
  92. }
  93. string GetUnsignedLittleEndianHexRepresentation( int unsignedInt )
  94. {
  95. string representation = "";
  96. representation += GetHexChar( ( unsignedInt & 0x000000F0 ) >> 4 );
  97. representation += GetHexChar( ( unsignedInt & 0x0000000F ) );
  98. representation += GetHexChar( ( unsignedInt & 0x0000F000 ) >> 12 );
  99. representation += GetHexChar( ( unsignedInt & 0x00000F00) >> 8 );
  100. representation += GetHexChar( ( unsignedInt & 0x00F00000 ) >> 20 );
  101. representation += GetHexChar( ( unsignedInt & 0x000F0000) >> 16 );
  102. if ( unsignedInt >= 0 )
  103. {
  104. representation += GetHexChar( unsignedInt >> 28 );
  105. }
  106. else
  107. {
  108. unsignedInt += 0x7FFFFFFF + 1;
  109. representation += GetHexChar( 0x8 + ( unsignedInt >> 28 ) );
  110. }
  111. representation += GetHexChar( ( unsignedInt & 0x0F000000) >> 24 );
  112. return representation;
  113. }
  114. string GetUnsignedHexRepresentation( int unsignedInt )
  115. {
  116. string representation = "";
  117.  
  118. if ( unsignedInt >= 0 )
  119. {
  120. representation += GetHexChar( unsignedInt >> 28 );
  121. }
  122. else
  123. {
  124. unsignedInt += 0x7FFFFFFF + 1;
  125. representation += GetHexChar( 0x8 + ( unsignedInt >> 28 ) );
  126. }
  127. representation += GetHexChar( ( unsignedInt & 0x0F000000) >> 24 );
  128. representation += GetHexChar( ( unsignedInt & 0x00F00000 ) >> 20 );
  129. representation += GetHexChar( ( unsignedInt & 0x000F0000) >> 16 );
  130. representation += GetHexChar( ( unsignedInt & 0x0000F000 ) >> 12 );
  131. representation += GetHexChar( ( unsignedInt & 0x00000F00) >> 8 );
  132. representation += GetHexChar( ( unsignedInt & 0x000000F0 ) >> 4 );
  133. representation += GetHexChar( ( unsignedInt & 0x0000000F ) );
  134. return representation;
  135. }
  136. // Resolve data function
  137. int GetFixedDataAsInt(fixed fixedVar)
  138. {
  139. int data;
  140. data= ( FixedToInt(fixedVar) << 12 );
  141. fixedVar -= data;
  142. data|= FixedToInt( fixedVar* Pow2(12) );
  143. return data;
  144. }
  145. // Operations
  146. int UnsignedRightShift( int input, int shift ) // Right shift pads bit 1's when the value is under zero for signed integers. So this is the work-around.
  147. {
  148. return input >> shift & ~( -1 << ( 32 - shift ) );
  149. }
  150. int UnsignedLeftRotate( int input, int rotation )
  151. {
  152. rotation = ModI( rotation, 32 );
  153. return ( input << rotation ) | UnsignedRightShift (input, 32 - rotation );
  154. }
  155. int UnsignedRightRotate( int input, int rotation )
  156. {
  157. rotation = ModI( rotation, 32 );
  158. return UnsignedRightShift( input, rotation ) | ( input << ( 32 - rotation ) );
  159. }
  160. int UnsignedLeftRotate32( int input, int rotation ) // Optimized version for rotation within range 0 =< x =< 32
  161. {
  162. return ( input << rotation ) | UnsignedRightShift (input, 32 - rotation );
  163. }
  164. int UnsignedRightRotate32( int input, int rotation ) // Optimized version for rotation within range 0 =< x =< 32
  165. {
  166. return UnsignedRightShift( input, rotation ) | ( input << ( 32 - rotation ) );
  167. }
  168.  
  169. //--------------------------------------------------------------------------------------------------
  170. // Custom Script: MD5 Script
  171. //--------------------------------------------------------------------------------------------------
  172. // Copyright (C) 2011 by Danny de Jong
  173. //
  174. // Permission is hereby granted, free of charge, to any person obtaining a copy
  175. // of this software and associated documentation files (the "Software"), to deal
  176. // in the Software without restriction, including without limitation the rights
  177. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  178. // copies of the Software, and to permit persons to whom the Software is
  179. // furnished to do so, subject to the following conditions:
  180. //
  181. // The above copyright notice and this permission notice shall be included in
  182. // all copies or substantial portions of the Software.
  183. //
  184. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  185. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  186. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  187. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  188. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  189. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  190. // THE SOFTWARE.
  191. int Md5F( int b, int c, int d )
  192. {
  193. return d ^ ( b & ( c ^ d ) );
  194. }
  195. int Md5G( int b, int c, int d )
  196. {
  197. return c ^ ( d & ( b ^ c ) );
  198. }
  199. int Md5H( int b, int c, int d )
  200. {
  201. return b ^ c ^ d;
  202. }
  203. int Md5I( int b, int c, int d )
  204. {
  205. return c ^ (b | (~d));
  206. }
  207. int Md5FF( int a, int b, int c, int d, int w, int r, int k )
  208. {
  209. return UnsignedLeftRotate32( ( a + Md5F( b, c, d ) + k + w ), r ) + b;
  210. }
  211. int Md5GG( int a, int b, int c, int d, int w, int r, int k )
  212. {
  213. return UnsignedLeftRotate32( ( a + Md5G( b, c, d ) + k + w ), r ) + b;
  214. }
  215. int Md5HH( int a, int b, int c, int d, int w, int r, int k )
  216. {
  217. return UnsignedLeftRotate32( ( a + Md5H( b, c, d ) + k + w ), r ) + b;
  218. }
  219. int Md5II( int a, int b, int c, int d, int w, int r, int k )
  220. {
  221. return UnsignedLeftRotate32( ( a + Md5I( b, c, d ) + k + w ), r ) + b;
  222. }
  223. string GenerateMd5HashCode()
  224. {
  225. // Variables
  226. int h0 = 0x67452301;
  227. int h1 = 0x0E000000 << 4 | 0x0FCDAB89;
  228. int h2 = 0x09000000 << 4 | 0x08BADCFE;
  229. int h3 = 0x10325476;
  230. int a; int b; int c; int d;
  231. int i = 0; int j = 0;
  232. int messageNBits;
  233. int paddingLength;
  234. // Prepare message
  235. messageNBits = HashInputSize * 8;
  236. HashInputData[HashInputSize] = 0x80;
  237. HashInputSize += 1;
  238. paddingLength = 56 - ModI( HashInputSize, 64 );
  239. if ( paddingLength < 0 )
  240. {
  241. paddingLength += 64;
  242. }
  243. while ( i < paddingLength )
  244. {
  245. HashInputData[HashInputSize] = 0;
  246. HashInputSize += 1;
  247. i += 1;
  248. }
  249. //Note: You might want to change this when the hash input increases in size.
  250. HashInputData[HashInputSize] = messageNBits;
  251. HashInputSize += 1;
  252. HashInputData[HashInputSize] = messageNBits >> 8;
  253. HashInputSize += 1;
  254. HashInputData[HashInputSize] = 0;
  255. HashInputSize += 1;
  256. HashInputData[HashInputSize] = 0;
  257. HashInputSize += 1;
  258. HashInputData[HashInputSize] = 0;
  259. HashInputSize += 1;
  260. HashInputData[HashInputSize] = 0;
  261. HashInputSize += 1;
  262. HashInputData[HashInputSize] = 0;
  263. HashInputSize += 1;
  264. HashInputData[HashInputSize] = 0;
  265. HashInputSize += 1;
  266. // Loop
  267. i = 0;
  268. while ( i < ( HashInputSize - 1 ) )
  269. {
  270. a = h0;
  271. b = h1;
  272. c = h2;
  273. d = h3;
  274. a = Md5FF( a, b, c, d, GetHashInputLittleEndianInt( j ), 7, 0x0d000000 << 4 | 0x076aa478 );
  275. d = Md5FF( d, a, b, c, GetHashInputLittleEndianInt( j + 1 ), 12, 0x0e000000 << 4 | 0x08c7b756 );
  276. c = Md5FF( c, d, a, b, GetHashInputLittleEndianInt( j + 2 ), 17, 0x242070db );
  277. b = Md5FF( b, c, d, a, GetHashInputLittleEndianInt( j + 3 ), 22, 0x0c000000 << 4 | 0x01bdceee );
  278. a = Md5FF( a, b, c, d, GetHashInputLittleEndianInt( j + 4 ), 7, 0x0f000000 << 4 | 0x057c0faf );
  279. d = Md5FF( d, a, b, c, GetHashInputLittleEndianInt( j + 5 ), 12, 0x4787c62a );
  280. c = Md5FF( c, d, a, b, GetHashInputLittleEndianInt( j + 6 ), 17, 0x0a000000 << 4 | 0x08304613 );
  281. b = Md5FF( b, c, d, a, GetHashInputLittleEndianInt( j + 7 ), 22, 0x0f000000 << 4 | 0x0d469501 );
  282. a = Md5FF( a, b, c, d, GetHashInputLittleEndianInt( j + 8 ), 7, 0x698098d8 );
  283. d = Md5FF( d, a, b, c, GetHashInputLittleEndianInt( j + 9 ), 12, 0x08000000 << 4 | 0x0b44f7af );
  284. c = Md5FF( c, d, a, b, GetHashInputLittleEndianInt( j + 10 ), 17, 0x0f000000 << 4 | 0x0fff5bb1 );
  285. b = Md5FF( b, c, d, a, GetHashInputLittleEndianInt( j + 11 ), 22, 0x08000000 << 4 | 0x095cd7be );
  286. a = Md5FF( a, b, c, d, GetHashInputLittleEndianInt( j + 12 ), 7, 0x6b901122 );
  287. d = Md5FF( d, a, b, c, GetHashInputLittleEndianInt( j + 13 ), 12, 0x0f000000 << 4 | 0x0d987193 );
  288. c = Md5FF( c, d, a, b, GetHashInputLittleEndianInt( j+ 14 ), 17, 0x0a000000 << 4 | 0x0679438e );
  289. b = Md5FF( b, c, d, a, GetHashInputLittleEndianInt( j + 15 ), 22, 0x49b40821 );
  290. a = Md5GG( a, b, c, d, GetHashInputLittleEndianInt( j + 1 ), 5, 0x0f000000 << 4 | 0x061e2562 );
  291. d = Md5GG( d, a, b, c, GetHashInputLittleEndianInt( j + 6 ), 9, 0x0c000000 << 4 | 0x0040b340 );
  292. c = Md5GG( c, d, a, b, GetHashInputLittleEndianInt( j + 11 ), 14, 0x265e5a51 );
  293. b = Md5GG( b, c, d, a, GetHashInputLittleEndianInt( j ), 20, 0x0e000000 << 4 | 0x09b6c7aa );
  294. a = Md5GG( a, b, c, d, GetHashInputLittleEndianInt( j + 5 ), 5, 0x0d000000 << 4 | 0x062f105d );
  295. d = Md5GG( d, a, b, c, GetHashInputLittleEndianInt( j + 10 ), 9, 0x02441453 );
  296. c = Md5GG( c, d, a, b, GetHashInputLittleEndianInt( j + 15 ), 14, 0x0d000000 << 4 | 0x08a1e681 );
  297. b = Md5GG( b, c, d, a, GetHashInputLittleEndianInt( j + 4 ), 20, 0x0e000000 << 4 | 0x07d3fbc8 );
  298. a = Md5GG( a, b, c, d, GetHashInputLittleEndianInt( j + 9 ), 5, 0x21e1cde6 );
  299. d = Md5GG( d, a, b, c, GetHashInputLittleEndianInt( j + 14 ), 9, 0x0c000000 << 4 | 0x033707d6 );
  300. c = Md5GG( c, d, a, b, GetHashInputLittleEndianInt( j + 3 ), 14, 0x0f000000 << 4 | 0x04d50d87 );
  301. b = Md5GG( b, c, d, a, GetHashInputLittleEndianInt( j + 8 ), 20, 0x455a14ed );
  302. a = Md5GG( a, b, c, d, GetHashInputLittleEndianInt( j + 13 ), 5, 0x0a000000 << 4 | 0x09e3e905 );
  303. d = Md5GG( d, a, b, c, GetHashInputLittleEndianInt( j + 2 ), 9, 0x0f000000 << 4 | 0x0cefa3f8 );
  304. c = Md5GG( c, d, a, b, GetHashInputLittleEndianInt( j + 7 ), 14, 0x676f02d9 );
  305. b = Md5GG( b, c, d, a, GetHashInputLittleEndianInt( j + 12 ), 20, 0x08000000 << 4 | 0x0d2a4c8a );
  306. a = Md5HH( a, b, c, d, GetHashInputLittleEndianInt( j + 5 ), 4, 0x0f000000 << 4 | 0x0ffa3942 );
  307. d = Md5HH( d, a, b, c, GetHashInputLittleEndianInt( j + 8 ), 11, 0x08000000 << 4 | 0x0771f681 );
  308. c = Md5HH( c, d, a, b, GetHashInputLittleEndianInt( j + 11 ), 16, 0x6d9d6122 );
  309. b = Md5HH( b, c, d, a, GetHashInputLittleEndianInt( j + 14 ), 23, 0x0f000000 << 4 | 0x0de5380c );
  310. a = Md5HH( a, b, c, d, GetHashInputLittleEndianInt( j + 1 ), 4, 0x0a000000 << 4 | 0x04beea44 );
  311. d = Md5HH( d, a, b, c, GetHashInputLittleEndianInt( j + 4 ), 11, 0x4bdecfa9 );
  312. c = Md5HH( c, d, a, b, GetHashInputLittleEndianInt( j + 7 ), 16, 0x0f000000 << 4 | 0x06bb4b60 );
  313. b = Md5HH( b, c, d, a, GetHashInputLittleEndianInt( j + 10 ), 23, 0x0b000000 << 4 | 0x0ebfbc70 );
  314. a = Md5HH( a, b, c, d, GetHashInputLittleEndianInt( j + 13 ), 4, 0x289b7ec6 );
  315. d = Md5HH( d, a, b, c, GetHashInputLittleEndianInt( j + 0 ), 11, 0x0e000000 << 4 | 0x0aa127fa );
  316. c = Md5HH( c, d, a, b, GetHashInputLittleEndianInt( j + 3 ), 16, 0x0d000000 << 4 | 0x04ef3085 );
  317. b = Md5HH( b, c, d, a, GetHashInputLittleEndianInt( j + 6 ), 23, 0x04881d05 );
  318. a = Md5HH( a, b, c, d, GetHashInputLittleEndianInt( j + 9 ), 4, 0x0d000000 << 4 | 0x09d4d039 );
  319. d = Md5HH( d, a, b, c, GetHashInputLittleEndianInt( j + 12 ), 11, 0x0e000000 << 4 | 0x06db99e5 );
  320. c = Md5HH( c, d, a, b, GetHashInputLittleEndianInt( j + 15 ), 16, 0x1fa27cf8 );
  321. b = Md5HH( b, c, d, a, GetHashInputLittleEndianInt( j + 2 ), 23, 0x0c000000 << 4 | 0x04ac5665 );
  322. a = Md5II( a, b, c, d, GetHashInputLittleEndianInt( j ), 6, 0x0f000000 << 4 | 0x04292244 );
  323. d = Md5II( d, a, b, c, GetHashInputLittleEndianInt( j + 7 ), 10, 0x432aff97 );
  324. c = Md5II( c, d, a, b, GetHashInputLittleEndianInt( j + 14 ), 15, 0x0a000000 << 4 | 0x0b9423a7 );
  325. b = Md5II( b, c, d, a, GetHashInputLittleEndianInt( j + 5 ), 21, 0x0f000000 << 4 | 0x0c93a039 );
  326. a = Md5II( a, b, c, d, GetHashInputLittleEndianInt( j + 12 ), 6, 0x655b59c3 );
  327. d = Md5II( d, a, b, c, GetHashInputLittleEndianInt( j + 3 ), 10, 0x08000000 << 4 | 0x0f0ccc92 );
  328. c = Md5II( c, d, a, b, GetHashInputLittleEndianInt( j + 10 ), 15, 0x0f000000 << 4 | 0x0feff47d );
  329. b = Md5II( b, c, d, a, GetHashInputLittleEndianInt( j + 1 ), 21, 0x08000000 << 4 | 0x05845dd1 );
  330. a = Md5II( a, b, c, d, GetHashInputLittleEndianInt( j + 8 ), 6, 0x6fa87e4f );
  331. d = Md5II( d, a, b, c, GetHashInputLittleEndianInt( j + 15 ), 10, 0x0f000000 << 4 | 0x0e2ce6e0 );
  332. c = Md5II( c, d, a, b, GetHashInputLittleEndianInt( j + 6 ), 15, 0x0a000000 << 4 | 0x03014314 );
  333. b = Md5II( b, c, d, a, GetHashInputLittleEndianInt( j + 13 ), 21, 0x4e0811a1 );
  334. a = Md5II( a, b, c, d, GetHashInputLittleEndianInt( j + 4 ), 6, 0x0f000000 << 4 | 0x07537e82 );
  335. d = Md5II( d, a, b, c, GetHashInputLittleEndianInt( j + 11 ), 10, 0x0b000000 << 4 | 0x0d3af235 );
  336. c = Md5II( c, d, a, b, GetHashInputLittleEndianInt( j + 2 ), 15, 0x2ad7d2bb );
  337. b = Md5II( b, c, d, a, GetHashInputLittleEndianInt( j + 9 ), 21, 0x0e000000 << 4 | 0x0b86d391 );
  338. h0 += a;
  339. h1 += b;
  340. h2 += c;
  341. h3 += d;
  342. i += 64;
  343. j += 16;
  344. }
  345.  
  346. return GetUnsignedLittleEndianHexRepresentation( h0 ) + GetUnsignedLittleEndianHexRepresentation( h1 ) + GetUnsignedLittleEndianHexRepresentation( h2 ) + GetUnsignedLittleEndianHexRepresentation( h3 );
  347. }
  348.  
  349. //--------------------------------------------------------------------------------------------------
  350. // Custom Script: SHA256 Script
  351. //--------------------------------------------------------------------------------------------------
  352. // Copyright (C) 2011 by Danny de Jong
  353. //
  354. // Permission is hereby granted, free of charge, to any person obtaining a copy
  355. // of this software and associated documentation files (the "Software"), to deal
  356. // in the Software without restriction, including without limitation the rights
  357. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  358. // copies of the Software, and to permit persons to whom the Software is
  359. // furnished to do so, subject to the following conditions:
  360. //
  361. // The above copyright notice and this permission notice shall be included in
  362. // all copies or substantial portions of the Software.
  363. //
  364. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  365. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  366. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  367. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  368. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  369. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  370. // THE SOFTWARE.
  371. int Sha256Ch( int x, int y, int z )
  372. {
  373. return ( x & y ) ^ ( ~x & z );
  374. }
  375. int Sha256Maj( int x, int y, int z )
  376. {
  377. return ( x & y ) ^ ( x & z ) ^ ( y & z );
  378. }
  379. int Sha256CapitalSigma0( int x )
  380. {
  381. return UnsignedRightRotate32( x, 2 ) ^ UnsignedRightRotate32( x, 13 ) ^ UnsignedRightRotate32( x, 22 );
  382. }
  383. int Sha256CapitalSigma1( int x )
  384. {
  385. return UnsignedRightRotate32( x, 6 ) ^ UnsignedRightRotate32( x, 11 ) ^ UnsignedRightRotate32( x, 25 );
  386. }
  387. int Sha256Sigma0( int x )
  388. {
  389. return UnsignedRightRotate32( x, 7 ) ^ UnsignedRightRotate32( x, 18 ) ^ UnsignedRightShift( x, 3 );
  390. }
  391. int Sha256Sigma1( int x )
  392. {
  393. return UnsignedRightRotate32( x, 17 ) ^ UnsignedRightRotate32( x, 19 ) ^ UnsignedRightShift( x, 10 );
  394. }
  395. int Sha256T0( int e, int f, int g, int h, int k, int w )
  396. {
  397. return h + Sha256CapitalSigma1( e ) + Sha256Ch( e, f, g ) + k + w;
  398. }
  399. int Sha256T1( int a, int b, int c )
  400. {
  401. return Sha256CapitalSigma0( a ) + Sha256Maj( a, b, c );
  402. }
  403. string GenerateSha256HashCode()
  404. {
  405. // Variables
  406. int h0 = 0x6a09e667;
  407. int h1 = 0x0b000000 << 4 | 0x0b67ae85;
  408. int h2 = 0x3c6ef372;
  409. int h3 = 0x0a000000 << 4 | 0x054ff53a;
  410. int h4 = 0x510e527f;
  411. int h5 = 0x09000000 << 4 | 0x0b05688c;
  412. int h6 = 0x1f83d9ab;
  413. int h7 = 0x5be0cd19;
  414. int a; int b; int c; int d; int e; int f; int g; int h; int t0; int t1;
  415. int[64] w;
  416. int i = 0; int j = 0; int k = 0;
  417. int messageNBits;
  418. int paddingLength;
  419. // Prepare message
  420. messageNBits = HashInputSize * 8;
  421. HashInputData[HashInputSize] = 0x80;
  422. HashInputSize += 1;
  423. paddingLength = 56 - ModI( HashInputSize, 64 );
  424. if ( paddingLength < 0 )
  425. {
  426. paddingLength += 64;
  427. }
  428. while ( i < paddingLength )
  429. {
  430. HashInputData[HashInputSize] = 0;
  431. HashInputSize += 1;
  432. i += 1;
  433. }
  434. //Note: You might want to change this when the hash input increases in size.
  435. HashInputData[HashInputSize] = 0;
  436. HashInputSize += 1;
  437. HashInputData[HashInputSize] = 0;
  438. HashInputSize += 1;
  439. HashInputData[HashInputSize] = 0;
  440. HashInputSize += 1;
  441. HashInputData[HashInputSize] = 0;
  442. HashInputSize += 1;
  443. HashInputData[HashInputSize] = 0;
  444. HashInputSize += 1;
  445. HashInputData[HashInputSize] = 0;
  446. HashInputSize += 1;
  447. HashInputData[HashInputSize] = messageNBits >> 8;
  448. HashInputSize += 1;
  449. HashInputData[HashInputSize] = messageNBits;
  450. HashInputSize += 1;
  451. // Loop
  452. i = 0;
  453. while ( i < ( HashInputSize - 1 ) )
  454. {
  455. // Working Variables
  456. a = h0;
  457. b = h1;
  458. c = h2;
  459. d = h3;
  460. e = h4;
  461. f = h5;
  462. g = h6;
  463. h = h7;
  464. // Preparing Extra Message Schedule
  465. j = 0;
  466. while ( j < 16 )
  467. {
  468. w[j] = GetHashInputBigEndianInt( k );
  469. j += 1;
  470. k += 1;
  471. }
  472. while ( j < 64 )
  473. {
  474. w[j] = Sha256Sigma1( w[j - 2] ) +
  475. w[j - 7] +
  476. Sha256Sigma0( w[j - 15] ) +
  477. w[j - 16];
  478.  
  479. j += 1;
  480. }
  481. // 0 to 15
  482. t0 = Sha256T0( e, f, g, h, 0x428a2f98, w[0] ); t1 = Sha256T1( a, b, c );
  483. h = t0 + t1; d += t0; i += 1;
  484. t0 = Sha256T0( d, e, f, g, 0x71374491, w[1] ); t1 = Sha256T1( h, a, b );
  485. g = t0 + t1; c += t0; i += 1;
  486. t0 = Sha256T0( c, d, e, f, 0x0b000000 << 4 | 0x05c0fbcf, w[2] ); t1 = Sha256T1( g, h, a );
  487. f = t0 + t1; b += t0; i += 1;
  488. t0 = Sha256T0( b, c, d, e, 0x0e000000 << 4 | 0x09b5dba5, w[3] ); t1 = Sha256T1( f, g, h );
  489. e = t0 + t1; a += t0; i += 1;
  490. t0 = Sha256T0( a, b, c, d, 0x3956c25b, w[4] ); t1 = Sha256T1( e, f, g );
  491. d = t0 + t1; h += t0; i += 1;
  492. t0 = Sha256T0( h, a, b, c, 0x59f111f1, w[5] ); t1 = Sha256T1( d, e, f );
  493. c = t0 + t1; g += t0; i += 1;
  494. t0 = Sha256T0( g, h, a, b, 0x09000000 << 4 | 0x023f82a4, w[6] ); t1 = Sha256T1( c, d, e );
  495. b = t0 + t1; f += t0; i += 1;
  496. t0 = Sha256T0( f, g, h, a, 0x0a000000 << 4 | 0x0b1c5ed5, w[7] ); t1 = Sha256T1( b, c, d );
  497. a = t0 + t1; e += t0; i += 1;
  498. t0 = Sha256T0( e, f, g, h, 0x0d000000 << 4 | 0x0807aa98, w[8] ); t1 = Sha256T1( a, b, c );
  499. h = t0 + t1; d += t0; i += 1;
  500. t0 = Sha256T0( d, e, f, g, 0x12835b01, w[9] ); t1 = Sha256T1( h, a, b );
  501. g = t0 + t1; c += t0; i += 1;
  502. t0 = Sha256T0( c, d, e, f, 0x243185be, w[10] ); t1 = Sha256T1( g, h, a );
  503. f = t0 + t1; b += t0; i += 1;
  504. t0 = Sha256T0( b, c, d, e, 0x550c7dc3, w[11] ); t1 = Sha256T1( f, g, h );
  505. e = t0 + t1; a += t0; i += 1;
  506. t0 = Sha256T0( a, b, c, d, 0x72be5d74, w[12] ); t1 = Sha256T1( e, f, g );
  507. d = t0 + t1; h += t0; i += 1;
  508. t0 = Sha256T0( h, a, b, c, 0x08000000 << 4 | 0x00deb1fe, w[13] ); t1 = Sha256T1( d, e, f );
  509. c = t0 + t1; g += t0; i += 1;
  510. t0 = Sha256T0( g, h, a, b, 0x09000000 << 4 | 0x0bdc06a7, w[14] ); t1 = Sha256T1( c, d, e );
  511. b = t0 + t1; f += t0; i += 1;
  512. t0 = Sha256T0( f, g, h, a, 0x0c000000 << 4 | 0x019bf174, w[15] ); t1 = Sha256T1( b, c, d );
  513. a = t0 + t1; e += t0;
  514. // 16 to 31
  515. t0 = Sha256T0( e, f, g, h, 0x0e000000 << 4 | 0x049b69c1, w[16] ); t1 = Sha256T1( a, b, c );
  516. h = t0 + t1; d += t0;
  517. t0 = Sha256T0( d, e, f, g, 0x0e000000 << 4 | 0x0fbe4786, w[17] ); t1 = Sha256T1( h, a, b );
  518. g = t0 + t1; c += t0;
  519. t0 = Sha256T0( c, d, e, f, 0x0fc19dc6, w[18] ); t1 = Sha256T1( g, h, a );
  520. f = t0 + t1; b += t0;
  521. t0 = Sha256T0( b, c, d, e, 0x240ca1cc, w[19] ); t1 = Sha256T1( f, g, h );
  522. e = t0 + t1; a += t0;
  523. t0 = Sha256T0( a, b, c, d, 0x2de92c6f, w[20] ); t1 = Sha256T1( e, f, g );
  524. d = t0 + t1; h += t0;
  525. t0 = Sha256T0( h, a, b, c, 0x4a7484aa, w[21] ); t1 = Sha256T1( d, e, f );
  526. c = t0 + t1; g += t0;
  527. t0 = Sha256T0( g, h, a, b, 0x5cb0a9dc, w[22] ); t1 = Sha256T1( c, d, e );
  528. b = t0 + t1; f += t0;
  529. t0 = Sha256T0( f, g, h, a, 0x76f988da, w[23] ); t1 = Sha256T1( b, c, d );
  530. a = t0 + t1; e += t0;
  531. t0 = Sha256T0( e, f, g, h, 0x09000000 << 4 | 0x083e5152, w[24] ); t1 = Sha256T1( a, b, c );
  532. h = t0 + t1; d += t0;
  533. t0 = Sha256T0( d, e, f, g, 0x0a000000 << 4 | 0x0831c66d, w[25] ); t1 = Sha256T1( h, a, b );
  534. g = t0 + t1; c += t0;
  535. t0 = Sha256T0( c, d, e, f, 0x0b000000 << 4 | 0x000327c8, w[26] ); t1 = Sha256T1( g, h, a );
  536. f = t0 + t1; b += t0;
  537. t0 = Sha256T0( b, c, d, e, 0x0b000000 << 4 | 0x0f597fc7, w[27] ); t1 = Sha256T1( f, g, h );
  538. e = t0 + t1; a += t0;
  539. t0 = Sha256T0( a, b, c, d, 0x0c000000 << 4 | 0x06e00bf3, w[28] ); t1 = Sha256T1( e, f, g );
  540. d = t0 + t1; h += t0;
  541. t0 = Sha256T0( h, a, b, c, 0x0d000000 << 4 | 0x05a79147, w[29] ); t1 = Sha256T1( d, e, f );
  542. c = t0 + t1; g += t0;
  543. t0 = Sha256T0( g, h, a, b, 0x06ca6351, w[30] ); t1 = Sha256T1( c, d, e );
  544. b = t0 + t1; f += t0;
  545. t0 = Sha256T0( f, g, h, a, 0x14292967, w[31] ); t1 = Sha256T1( b, c, d );
  546. a = t0 + t1; e += t0;
  547. // 32 to 47
  548. t0 = Sha256T0( e, f, g, h, 0x27b70a85, w[32] ); t1 = Sha256T1( a, b, c );
  549. h = t0 + t1; d += t0;
  550. t0 = Sha256T0( d, e, f, g, 0x2e1b2138, w[33] ); t1 = Sha256T1( h, a, b );
  551. g = t0 + t1; c += t0;
  552. t0 = Sha256T0( c, d, e, f, 0x4d2c6dfc, w[34] ); t1 = Sha256T1( g, h, a );
  553. f = t0 + t1; b += t0;
  554. t0 = Sha256T0( b, c, d, e, 0x53380d13, w[35] ); t1 = Sha256T1( f, g, h );
  555. e = t0 + t1; a += t0;
  556. t0 = Sha256T0( a, b, c, d, 0x650a7354, w[36] ); t1 = Sha256T1( e, f, g );
  557. d = t0 + t1; h += t0;
  558. t0 = Sha256T0( h, a, b, c, 0x766a0abb, w[37] ); t1 = Sha256T1( d, e, f );
  559. c = t0 + t1; g += t0;
  560. t0 = Sha256T0( g, h, a, b, 0x08000000 << 4 | 0x01c2c92e, w[38] ); t1 = Sha256T1( c, d, e );
  561. b = t0 + t1; f += t0;
  562. t0 = Sha256T0( f, g, h, a, 0x09000000 << 4 | 0x02722c85, w[39] ); t1 = Sha256T1( b, c, d );
  563. a = t0 + t1; e += t0;
  564. t0 = Sha256T0( e, f, g, h, 0x0a000000 << 4 | 0x02bfe8a1, w[40] ); t1 = Sha256T1( a, b, c );
  565. h = t0 + t1; d += t0;
  566. t0 = Sha256T0( d, e, f, g, 0x0a000000 << 4 | 0x081a664b, w[41] ); t1 = Sha256T1( h, a, b );
  567. g = t0 + t1; c += t0;
  568. t0 = Sha256T0( c, d, e, f, 0x0c000000 << 4 | 0x024b8b70, w[42] ); t1 = Sha256T1( g, h, a );
  569. f = t0 + t1; b += t0;
  570. t0 = Sha256T0( b, c, d, e, 0x0c000000 << 4 | 0x076c51a3, w[43] ); t1 = Sha256T1( f, g, h );
  571. e = t0 + t1; a += t0;
  572. t0 = Sha256T0( a, b, c, d, 0x0d000000 << 4 | 0x0192e819, w[44] ); t1 = Sha256T1( e, f, g );
  573. d = t0 + t1; h += t0;
  574. t0 = Sha256T0( h, a, b, c, 0x0d000000 << 4 | 0x06990624, w[45] ); t1 = Sha256T1( d, e, f );
  575. c = t0 + t1; g += t0;
  576. t0 = Sha256T0( g, h, a, b, 0x0f000000 << 4 | 0x040e3585, w[46] ); t1 = Sha256T1( c, d, e );
  577. b = t0 + t1; f += t0;
  578. t0 = Sha256T0( f, g, h, a, 0x106aa070, w[47] ); t1 = Sha256T1( b, c, d );
  579. a = t0 + t1; e += t0;
  580. // 48 to 63
  581. t0 = Sha256T0( e, f, g, h, 0x19a4c116, w[48] ); t1 = Sha256T1( a, b, c );
  582. h = t0 + t1; d += t0;
  583. t0 = Sha256T0( d, e, f, g, 0x1e376c08, w[49] ); t1 = Sha256T1( h, a, b );
  584. g = t0 + t1; c += t0;
  585. t0 = Sha256T0( c, d, e, f, 0x2748774c, w[50] ); t1 = Sha256T1( g, h, a );
  586. f = t0 + t1; b += t0;
  587. t0 = Sha256T0( b, c, d, e, 0x34b0bcb5, w[51] ); t1 = Sha256T1( f, g, h );
  588. e = t0 + t1; a += t0;
  589. t0 = Sha256T0( a, b, c, d, 0x391c0cb3, w[52] ); t1 = Sha256T1( e, f, g );
  590. d = t0 + t1; h += t0;
  591. t0 = Sha256T0( h, a, b, c, 0x4ed8aa4a, w[53] ); t1 = Sha256T1( d, e, f );
  592. c = t0 + t1; g += t0;
  593. t0 = Sha256T0( g, h, a, b, 0x5b9cca4f, w[54] ); t1 = Sha256T1( c, d, e );
  594. b = t0 + t1; f += t0;
  595. t0 = Sha256T0( f, g, h, a, 0x682e6ff3, w[55] ); t1 = Sha256T1( b, c, d );
  596. a = t0 + t1; e += t0;
  597. t0 = Sha256T0( e, f, g, h, 0x748f82ee, w[56] ); t1 = Sha256T1( a, b, c );
  598. h = t0 + t1; d += t0;
  599. t0 = Sha256T0( d, e, f, g, 0x78a5636f, w[57] ); t1 = Sha256T1( h, a, b );
  600. g = t0 + t1; c += t0;
  601. t0 = Sha256T0( c, d, e, f, 0x08000000 << 4 | 0x04c87814, w[58] ); t1 = Sha256T1( g, h, a );
  602. f = t0 + t1; b += t0;
  603. t0 = Sha256T0( b, c, d, e, 0x08000000 << 4 | 0x0cc70208, w[59] ); t1 = Sha256T1( f, g, h );
  604. e = t0 + t1; a += t0;
  605. t0 = Sha256T0( a, b, c, d, 0x09000000 << 4 | 0x00befffa, w[60] ); t1 = Sha256T1( e, f, g );
  606. d = t0 + t1; h += t0;
  607. t0 = Sha256T0( h, a, b, c, 0x0a000000 << 4 | 0x04506ceb, w[61] ); t1 = Sha256T1( d, e, f );
  608. c = t0 + t1; g += t0;
  609. t0 = Sha256T0( g, h, a, b, 0x0b000000 << 4 | 0x0ef9a3f7, w[62] ); t1 = Sha256T1( c, d, e );
  610. b = t0 + t1; f += t0;
  611. t0 = Sha256T0( f, g, h, a, 0x0c000000 << 4 | 0x067178f2, w[63] ); t1 = Sha256T1( b, c, d );
  612. a = t0 + t1; e += t0;
  613. h0 += a;
  614. h1 += b;
  615. h2 += c;
  616. h3 += d;
  617. h4 += e;
  618. h5 += f;
  619. h6 += g;
  620. h7 += h;
  621. i += 49;
  622. }
  623. return GetUnsignedHexRepresentation(h0) +
  624. GetUnsignedHexRepresentation(h1) +
  625. GetUnsignedHexRepresentation(h2) +
  626. GetUnsignedHexRepresentation(h3) +
  627. GetUnsignedHexRepresentation(h4) +
  628. GetUnsignedHexRepresentation(h5) +
  629. GetUnsignedHexRepresentation(h6) +
  630. GetUnsignedHexRepresentation(h7);
  631. }
  632.  
  633. void lib1_InitCustomScript () {
  634. }
  635.  
  636. // Functions
  637. void lib1_gf_InitializeHashInput () {
  638. // Variable Declarations
  639. string lv_emptyString;
  640.  
  641. // Variable Initialization
  642. lv_emptyString = "";
  643.  
  644. // Implementation
  645. HashInputSize = 0;
  646. if ( HexTable[0] == "" )
  647. {
  648. HexTable[0] = "0"; HexTable[1] = "1"; HexTable[2] = "2"; HexTable[3] = "3";
  649. HexTable[4] = "4"; HexTable[5] = "5"; HexTable[6] = "6"; HexTable[7] = "7";
  650. HexTable[8] = "8"; HexTable[9] = "9"; HexTable[10] = "a"; HexTable[11] = "b";
  651. HexTable[12] = "c"; HexTable[13] = "d"; HexTable[14] = "e"; HexTable[15] = "f";
  652. }
  653. }
  654.  
  655. void lib1_gf_AddBooleanToHashInput (bool lp_boolean) {
  656. // Implementation
  657. lib1_gf_AddByteToHashInput(BoolToInt( lp_boolean ));
  658. }
  659.  
  660. void lib1_gf_AddByteToHashInput (byte lp_byte) {
  661. // Implementation
  662. HashInputData[HashInputSize] = lp_byte;
  663. HashInputSize += 1;
  664. }
  665.  
  666. void lib1_gf_AddBytesToHashInput (byte lp_byte, int lp_amount) {
  667. // Implementation
  668. IntLoopBegin(1, lp_amount);
  669. for ( ; !IntLoopDone() ; IntLoopStep() ) {
  670. lib1_gf_AddByteToHashInput(lp_byte);
  671. }
  672. IntLoopEnd();
  673. }
  674.  
  675. void lib1_gf_AddIntegerToHashInput (int lp_integer) {
  676. // Implementation
  677. lib1_gf_AddByteToHashInput(lp_integer);
  678. lib1_gf_AddByteToHashInput(lp_integer >> 8);
  679. lib1_gf_AddByteToHashInput(lp_integer >> 16);
  680. lib1_gf_AddByteToHashInput(lp_integer >> 24);
  681. }
  682.  
  683. void lib1_gf_AddIntegersToHashInput (int lp_integer, int lp_amount) {
  684. // Implementation
  685. IntLoopBegin(1, lp_amount);
  686. for ( ; !IntLoopDone() ; IntLoopStep() ) {
  687. lib1_gf_AddIntegerToHashInput(lp_integer);
  688. }
  689. IntLoopEnd();
  690. }
  691.  
  692. void lib1_gf_AddRealToHashInput (fixed lp_real) {
  693. // Implementation
  694. lib1_gf_AddIntegerToHashInput(GetFixedDataAsInt( lp_real ));
  695. }
  696.  
  697. void lib1_gf_AddStringToHashInput (string lp_string) {
  698. // Implementation
  699. IntLoopBegin(0, (StringLength(lp_string) - 1));
  700. for ( ; !IntLoopDone() ; IntLoopStep() ) {
  701. lib1_gf_AddByteToHashInput(CharToAsciiCode( lp_string, IntLoopCurrent() ));
  702. }
  703. IntLoopEnd();
  704. }
  705.  
  706. void lib1_gf_AddUnitToHashInput (unit lp_unit) {
  707. // Implementation
  708. lib1_gf_AddStringToHashInput((UnitGetType(lp_unit)));
  709. lib1_gf_AddRealToHashInput(UnitGetPropertyFixed(lp_unit, c_unitPropLife, c_unitPropCurrent));
  710. lib1_gf_AddRealToHashInput(UnitGetPropertyFixed(lp_unit, c_unitPropShields, c_unitPropCurrent));
  711. lib1_gf_AddRealToHashInput(UnitGetPropertyFixed(lp_unit, c_unitPropEnergy, c_unitPropCurrent));
  712. }
  713.  
  714. string lib1_gf_GenerateMD5HashCode () {
  715. // Implementation
  716. return GenerateMd5HashCode();
  717. }
  718.  
  719. string lib1_gf_GenerateSHA256HashCode () {
  720. // Implementation
  721. return GenerateSha256HashCode();
  722. }
  723.  
  724. //--------------------------------------------------------------------------------------------------
  725. // Library Initialization
  726. //--------------------------------------------------------------------------------------------------
  727. bool lib1_InitLib_completed = false;
  728.  
  729. void lib1_InitLib () {
  730. if (lib1_InitLib_completed) {
  731. return;
  732. }
  733.  
  734. lib1_InitCustomScript();
  735.  
  736. lib1_InitLib_completed = true;
  737. }
  738.  
  739. //--------------------------------------------------------------------------------------------------
  740. // Library Initialization
  741. //--------------------------------------------------------------------------------------------------
  742. void InitLibs () {
  743. libNtve_InitLib();
  744. lib1_InitLib();
  745. }
  746.  
  747. //--------------------------------------------------------------------------------------------------
  748. // Constants
  749. //--------------------------------------------------------------------------------------------------
  750. const string gv_bank_code = "IKXEX ONAFS IYRNC LYILD HQSBO YDSMI SKPKP IFZEE CRN";
  751.  
  752. //--------------------------------------------------------------------------------------------------
  753. // Global Variables
  754. //--------------------------------------------------------------------------------------------------
  755. int[9] gv_bonusRoundScore;
  756. int gv_bonusRoundPlayer;
  757. bank[9] gv_bank;
  758. int[9] gv_bank_kills;
  759. int[9] gv_bank_wins;
  760. int[9] gv_bank_loses;
  761. string[9] gv_bank_wins_sec;
  762. string[9] gv_bank_loses_sec;
  763. string[9] gv_bank_kills_sec;
  764. int gv_unstucks;
  765. bool[9] gv_playerunstucks;
  766. string gv_texttotypein;
  767. int gv_banktoreset;
  768. int gv_invocer;
  769. bool[9] gv_betatester;
  770. int gv_nC3A4chsteRunde;
  771. int[16] gv_kills;
  772. string[16] gv_kills_string;
  773. int gv_killDialogfenster;
  774. int[9] gv_killDialoggegenstand;
  775. int gv_timerWindow;
  776. timer gv_timer;
  777.  
  778. void InitGlobals () {
  779. int init_i;
  780.  
  781. gv_bonusRoundPlayer = 1;
  782. for (init_i = 0; init_i <= 8; init_i += 1) {
  783. gv_bank_wins_sec[init_i] = "";
  784. }
  785. for (init_i = 0; init_i <= 8; init_i += 1) {
  786. gv_bank_loses_sec[init_i] = "";
  787. }
  788. for (init_i = 0; init_i <= 8; init_i += 1) {
  789. gv_bank_kills_sec[init_i] = "";
  790. }
  791. gv_texttotypein = "";
  792. for (init_i = 0; init_i <= 15; init_i += 1) {
  793. gv_kills_string[init_i] = "";
  794. }
  795. gv_killDialogfenster = c_invalidDialogId;
  796. for (init_i = 0; init_i <= 8; init_i += 1) {
  797. gv_killDialoggegenstand[init_i] = c_invalidDialogControlId;
  798. }
  799. gv_timerWindow = c_timerWindowNone;
  800. gv_timer = TimerCreate();
  801. }
  802.  
  803. //--------------------------------------------------------------------------------------------------
  804. // Global Function Declarations
  805. //--------------------------------------------------------------------------------------------------
  806. void gf_CopyRightBot (int lp_player, point lp_punkt1, point lp_punkt2);
  807. void gf_CopyLeftBot (int lp_player, point lp_punkt1, point lp_punkt2);
  808. void gf_CopyRightTop (int lp_player, point lp_punkt1, point lp_punkt2);
  809. void gf_CopyLeftTop (int lp_player, point lp_punkt1, point lp_punkt2);
  810. void gf_CopyRotateBotRight (int lp_player, point lp_punkt1, point lp_punkt2);
  811. void gf_CopyRotateTopLeft (int lp_player, point lp_punkt1, point lp_punkt2);
  812. void gf_CopyRotateTopRight (int lp_player, point lp_punkt1, point lp_punkt2);
  813. void gf_CopyRotateBotLeft (int lp_player, point lp_punkt1, point lp_punkt2);
  814. bool gf_BonusRoundDead (int lp_player);
  815. int gf_getlivingplayers ();
  816. void gf_startTimer (int lp_time, int lp_round);
  817. void gf_CopyMidLeft (int lp_player, point lp_punkt1, point lp_punkt2);
  818. void gf_CopyMidRight (int lp_player, point lp_punkt1, point lp_punkt2);
  819.  
  820. //--------------------------------------------------------------------------------------------------
  821. // Trigger Variables
  822. //--------------------------------------------------------------------------------------------------
  823. trigger gt_T1Dies;
  824. trigger gt_T2Dies;
  825. trigger gt_T3Dies;
  826. trigger gt_T4Dies;
  827. trigger gt_T5Dies;
  828. trigger gt_Midcleanup;
  829. trigger gt_UnitinBonusrounddies;
  830. trigger gt_BonusRound1akaRound5;
  831. trigger gt_BonusRound2akaRound9;
  832. trigger gt_QuarterFinal;
  833. trigger gt_SemiFinal;
  834. trigger gt_Final;
  835. trigger gt_KillPylo;
  836. trigger gt_Vor1;
  837. trigger gt_Round1;
  838. trigger gt_Round2;
  839. trigger gt_Round3;
  840. trigger gt_Round4;
  841. trigger gt_Round6;
  842. trigger gt_Round7;
  843. trigger gt_Round8;
  844. trigger gt_Killall;
  845. trigger gt_AntiIdle;
  846. trigger gt_UnitInMiddledies;
  847. trigger gt_CreateBank;
  848. trigger gt_SaveBanks;
  849. trigger gt_getAlivePlayers;
  850. trigger gt_testtextpos;
  851. trigger gt_Unstuck;
  852. trigger gt_beta;
  853. trigger gt_code;
  854. trigger gt_give;
  855. trigger gt_kick;
  856. trigger gt_resetBank;
  857. trigger gt_shure;
  858. trigger gt_id;
  859. trigger gt_CreateDialog;
  860. trigger gt_DestroyDialog;
  861. trigger gt_GlobalIni;
  862. trigger gt_AntiMoveafterBuild;
  863. trigger gt_KillNoob;
  864. trigger gt_AntiMoveafterWavestart;
  865. trigger gt_BanditCrit;
  866. trigger gt_KnightDmgReduce;
  867.  
  868. //--------------------------------------------------------------------------------------------------
  869. // Global Functions
  870. //--------------------------------------------------------------------------------------------------
  871. void gf_CopyRightBot (int lp_player, point lp_punkt1, point lp_punkt2) {
  872. int autoE2DFC705_ae;
  873. int autoE2DFC705_ai;
  874. int autoB46B2889_ae;
  875. int autoB46B2889_ai;
  876.  
  877. // Variable Declarations
  878. int lv_i;
  879. unitgroup lv_unitgroup;
  880. fixed[201] lv_dy;
  881. fixed[201] lv_dx;
  882. unit[201] lv_unitname;
  883.  
  884. // Variable Initialization
  885. lv_unitgroup = UnitGroupEmpty();
  886.  
  887. // Implementation
  888. RegionSetCenter(RegionFromId(1), Point((PointGetX(lp_punkt1) - 6.0), (PointGetY(lp_punkt1) + 5.0)));
  889. lv_unitgroup = null;
  890. lv_unitgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(1), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  891. autoE2DFC705_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  892. autoE2DFC705_ai = 1;
  893. lv_i = 1;
  894. for ( ; ( (autoE2DFC705_ai >= 0 && lv_i <= autoE2DFC705_ae) || (autoE2DFC705_ai <= 0 && lv_i >= autoE2DFC705_ae) ) ; lv_i += autoE2DFC705_ai ) {
  895. if ((UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)) == "Pylon")) {
  896. }
  897. else {
  898. lv_dy[lv_i] = (PointGetY(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetY(lp_punkt1));
  899. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dy[lv_i], c_fixedPrecisionAny));
  900. lv_dx[lv_i] = (PointGetX(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetX(lp_punkt1));
  901. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dx[lv_i], c_fixedPrecisionAny));
  902. lv_unitname[lv_i] = UnitGroupUnit(lv_unitgroup, lv_i);
  903. }
  904. }
  905. autoB46B2889_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  906. autoB46B2889_ai = 1;
  907. lv_i = 1;
  908. for ( ; ( (autoB46B2889_ai >= 0 && lv_i <= autoB46B2889_ae) || (autoB46B2889_ai <= 0 && lv_i >= autoB46B2889_ae) ) ; lv_i += autoB46B2889_ai ) {
  909. UnitCreate(1, UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)), 0, lp_player, Point((PointGetX(lp_punkt2) + lv_dy[lv_i]), (PointGetY(lp_punkt2) + lv_dx[lv_i])), 270.0);
  910. libNtve_gf_MakeUnitUncommandable(UnitLastCreated(), true);
  911. }
  912. }
  913.  
  914. void gf_CopyLeftBot (int lp_player, point lp_punkt1, point lp_punkt2) {
  915. int autoD8F798D6_ae;
  916. int autoD8F798D6_ai;
  917. int auto86949202_ae;
  918. int auto86949202_ai;
  919.  
  920. // Variable Declarations
  921. int lv_i;
  922. unitgroup lv_unitgroup;
  923. fixed[201] lv_dy;
  924. fixed[201] lv_dx;
  925. unit[201] lv_unitname;
  926.  
  927. // Variable Initialization
  928. lv_unitgroup = UnitGroupEmpty();
  929.  
  930. // Implementation
  931. RegionSetCenter(RegionFromId(1), Point((PointGetX(lp_punkt1) - 6.0), (PointGetY(lp_punkt1) + 5.0)));
  932. lv_unitgroup = null;
  933. lv_unitgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(1), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  934. autoD8F798D6_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  935. autoD8F798D6_ai = 1;
  936. lv_i = 1;
  937. for ( ; ( (autoD8F798D6_ai >= 0 && lv_i <= autoD8F798D6_ae) || (autoD8F798D6_ai <= 0 && lv_i >= autoD8F798D6_ae) ) ; lv_i += autoD8F798D6_ai ) {
  938. if ((UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)) == "Pylon")) {
  939. }
  940. else {
  941. lv_dy[lv_i] = (PointGetY(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetY(lp_punkt1));
  942. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dy[lv_i], c_fixedPrecisionAny));
  943. lv_dx[lv_i] = (PointGetX(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetX(lp_punkt1));
  944. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dx[lv_i], c_fixedPrecisionAny));
  945. lv_unitname[lv_i] = UnitGroupUnit(lv_unitgroup, lv_i);
  946. }
  947. }
  948. auto86949202_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  949. auto86949202_ai = 1;
  950. lv_i = 1;
  951. for ( ; ( (auto86949202_ai >= 0 && lv_i <= auto86949202_ae) || (auto86949202_ai <= 0 && lv_i >= auto86949202_ae) ) ; lv_i += auto86949202_ai ) {
  952. UnitCreate(1, UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)), 0, lp_player, Point((PointGetX(lp_punkt2) - lv_dy[lv_i]), (PointGetY(lp_punkt2) + lv_dx[lv_i])), 270.0);
  953. libNtve_gf_MakeUnitUncommandable(UnitLastCreated(), true);
  954. }
  955. }
  956.  
  957. void gf_CopyRightTop (int lp_player, point lp_punkt1, point lp_punkt2) {
  958. int auto93688349_ae;
  959. int auto93688349_ai;
  960. int auto92C74250_ae;
  961. int auto92C74250_ai;
  962.  
  963. // Variable Declarations
  964. int lv_i;
  965. unitgroup lv_unitgroup;
  966. fixed[201] lv_dy;
  967. fixed[201] lv_dx;
  968. unit[201] lv_unitname;
  969.  
  970. // Variable Initialization
  971. lv_unitgroup = UnitGroupEmpty();
  972.  
  973. // Implementation
  974. RegionSetCenter(RegionFromId(1), Point((PointGetX(lp_punkt1) - 6.0), (PointGetY(lp_punkt1) + 5.0)));
  975. lv_unitgroup = null;
  976. lv_unitgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(1), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  977. auto93688349_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  978. auto93688349_ai = 1;
  979. lv_i = 1;
  980. for ( ; ( (auto93688349_ai >= 0 && lv_i <= auto93688349_ae) || (auto93688349_ai <= 0 && lv_i >= auto93688349_ae) ) ; lv_i += auto93688349_ai ) {
  981. if ((UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)) == "Pylon")) {
  982. }
  983. else {
  984. lv_dy[lv_i] = (PointGetY(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetY(lp_punkt1));
  985. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dy[lv_i], c_fixedPrecisionAny));
  986. lv_dx[lv_i] = (PointGetX(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetX(lp_punkt1));
  987. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dx[lv_i], c_fixedPrecisionAny));
  988. lv_unitname[lv_i] = UnitGroupUnit(lv_unitgroup, lv_i);
  989. }
  990. }
  991. auto92C74250_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  992. auto92C74250_ai = 1;
  993. lv_i = 1;
  994. for ( ; ( (auto92C74250_ai >= 0 && lv_i <= auto92C74250_ae) || (auto92C74250_ai <= 0 && lv_i >= auto92C74250_ae) ) ; lv_i += auto92C74250_ai ) {
  995. UnitCreate(1, UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)), 0, lp_player, Point((PointGetX(lp_punkt2) + lv_dy[lv_i]), (PointGetY(lp_punkt2) - lv_dx[lv_i])), 270.0);
  996. libNtve_gf_MakeUnitUncommandable(UnitLastCreated(), true);
  997. }
  998. }
  999.  
  1000. void gf_CopyLeftTop (int lp_player, point lp_punkt1, point lp_punkt2) {
  1001. int auto78B873D3_ae;
  1002. int auto78B873D3_ai;
  1003. int autoC1576191_ae;
  1004. int autoC1576191_ai;
  1005.  
  1006. // Variable Declarations
  1007. int lv_i;
  1008. unitgroup lv_unitgroup;
  1009. fixed[201] lv_dy;
  1010. fixed[201] lv_dx;
  1011. unit[201] lv_unitname;
  1012.  
  1013. // Variable Initialization
  1014. lv_unitgroup = UnitGroupEmpty();
  1015.  
  1016. // Implementation
  1017. RegionSetCenter(RegionFromId(1), Point((PointGetX(lp_punkt1) - 6.0), (PointGetY(lp_punkt1) + 5.0)));
  1018. lv_unitgroup = null;
  1019. lv_unitgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(1), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1020. auto78B873D3_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1021. auto78B873D3_ai = 1;
  1022. lv_i = 1;
  1023. for ( ; ( (auto78B873D3_ai >= 0 && lv_i <= auto78B873D3_ae) || (auto78B873D3_ai <= 0 && lv_i >= auto78B873D3_ae) ) ; lv_i += auto78B873D3_ai ) {
  1024. if ((UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)) == "Pylon")) {
  1025. }
  1026. else {
  1027. lv_dy[lv_i] = (PointGetY(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetY(lp_punkt1));
  1028. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dy[lv_i], c_fixedPrecisionAny));
  1029. lv_dx[lv_i] = (PointGetX(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetX(lp_punkt1));
  1030. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dx[lv_i], c_fixedPrecisionAny));
  1031. lv_unitname[lv_i] = UnitGroupUnit(lv_unitgroup, lv_i);
  1032. }
  1033. }
  1034. autoC1576191_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1035. autoC1576191_ai = 1;
  1036. lv_i = 1;
  1037. for ( ; ( (autoC1576191_ai >= 0 && lv_i <= autoC1576191_ae) || (autoC1576191_ai <= 0 && lv_i >= autoC1576191_ae) ) ; lv_i += autoC1576191_ai ) {
  1038. UnitCreate(1, UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)), 0, lp_player, Point((PointGetX(lp_punkt2) - lv_dy[lv_i]), (PointGetY(lp_punkt2) - lv_dx[lv_i])), 270.0);
  1039. libNtve_gf_MakeUnitUncommandable(UnitLastCreated(), true);
  1040. }
  1041. }
  1042.  
  1043. void gf_CopyRotateBotRight (int lp_player, point lp_punkt1, point lp_punkt2) {
  1044. int auto6BF02EE8_ae;
  1045. int auto6BF02EE8_ai;
  1046. int autoEE6ED23A_ae;
  1047. int autoEE6ED23A_ai;
  1048. int autoD69A111D_ae;
  1049. int autoD69A111D_ai;
  1050. int auto090A8C61_ae;
  1051. int auto090A8C61_ai;
  1052. int autoD507034A_ae;
  1053. int autoD507034A_ai;
  1054.  
  1055. // Variable Declarations
  1056. unitgroup lv_cleanupgroup;
  1057. int lv_i;
  1058. unitgroup lv_unitgroup;
  1059. fixed[201] lv_dy;
  1060. fixed[201] lv_dx;
  1061. unit[201] lv_unitname;
  1062.  
  1063. // Variable Initialization
  1064. lv_cleanupgroup = UnitGroupEmpty();
  1065. lv_unitgroup = UnitGroupEmpty();
  1066.  
  1067. // Implementation
  1068. RegionSetCenter(RegionFromId(1), Point((PointGetX(lp_punkt1) - 6.0), (PointGetY(lp_punkt1) + 5.0)));
  1069. lv_unitgroup = null;
  1070. lv_unitgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(1), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1071. auto6BF02EE8_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1072. auto6BF02EE8_ai = 1;
  1073. lv_i = 1;
  1074. for ( ; ( (auto6BF02EE8_ai >= 0 && lv_i <= auto6BF02EE8_ae) || (auto6BF02EE8_ai <= 0 && lv_i >= auto6BF02EE8_ae) ) ; lv_i += auto6BF02EE8_ai ) {
  1075. if ((UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)) == "Pylon")) {
  1076. }
  1077. else {
  1078. lv_dy[lv_i] = (PointGetY(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetY(lp_punkt1));
  1079. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dy[lv_i], c_fixedPrecisionAny));
  1080. lv_dx[lv_i] = (PointGetX(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetX(lp_punkt1));
  1081. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dx[lv_i], c_fixedPrecisionAny));
  1082. lv_unitname[lv_i] = UnitGroupUnit(lv_unitgroup, lv_i);
  1083. }
  1084. }
  1085. autoEE6ED23A_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1086. autoEE6ED23A_ai = 1;
  1087. lv_i = 1;
  1088. for ( ; ( (autoEE6ED23A_ai >= 0 && lv_i <= autoEE6ED23A_ae) || (autoEE6ED23A_ai <= 0 && lv_i >= autoEE6ED23A_ae) ) ; lv_i += autoEE6ED23A_ai ) {
  1089. UnitCreate(1, UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)), 0, lp_player, Point((PointGetX(PointFromId(32)) - lv_dy[lv_i]), (PointGetY(PointFromId(32)) - lv_dx[lv_i])), 270.0);
  1090. }
  1091. lv_unitgroup = null;
  1092. lv_unitgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(2), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1093. lv_i = 0;
  1094. autoD69A111D_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1095. autoD69A111D_ai = 1;
  1096. lv_i = 1;
  1097. for ( ; ( (autoD69A111D_ai >= 0 && lv_i <= autoD69A111D_ae) || (autoD69A111D_ai <= 0 && lv_i >= autoD69A111D_ae) ) ; lv_i += autoD69A111D_ai ) {
  1098. lv_unitname[lv_i] = null;
  1099. lv_dy[lv_i] = 0.0;
  1100. lv_dx[lv_i] = 0.0;
  1101. }
  1102. auto090A8C61_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1103. auto090A8C61_ai = 1;
  1104. lv_i = 1;
  1105. for ( ; ( (auto090A8C61_ai >= 0 && lv_i <= auto090A8C61_ae) || (auto090A8C61_ai <= 0 && lv_i >= auto090A8C61_ae) ) ; lv_i += auto090A8C61_ai ) {
  1106. lv_dy[lv_i] = (PointGetY(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetY(PointFromId(32)));
  1107. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dy[lv_i], c_fixedPrecisionAny));
  1108. lv_dx[lv_i] = (PointGetX(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetX(PointFromId(32)));
  1109. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dx[lv_i], c_fixedPrecisionAny));
  1110. lv_unitname[lv_i] = UnitGroupUnit(lv_unitgroup, lv_i);
  1111. }
  1112. autoD507034A_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1113. autoD507034A_ai = 1;
  1114. lv_i = 1;
  1115. for ( ; ( (autoD507034A_ai >= 0 && lv_i <= autoD507034A_ae) || (autoD507034A_ai <= 0 && lv_i >= autoD507034A_ae) ) ; lv_i += autoD507034A_ai ) {
  1116. UnitCreate(1, UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)), 0, lp_player, Point((PointGetX(lp_punkt2) + lv_dy[lv_i]), (PointGetY(lp_punkt2) + lv_dx[lv_i])), 270.0);
  1117. libNtve_gf_MakeUnitUncommandable(UnitLastCreated(), true);
  1118. }
  1119. lv_cleanupgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(2), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1120. UnitGroupLoopBegin(lv_cleanupgroup);
  1121. for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
  1122. UnitKill(UnitGroupLoopCurrent());
  1123. }
  1124. UnitGroupLoopEnd();
  1125. }
  1126.  
  1127. void gf_CopyRotateTopLeft (int lp_player, point lp_punkt1, point lp_punkt2) {
  1128. int auto32B3567F_ae;
  1129. int auto32B3567F_ai;
  1130. int auto0009CF3C_ae;
  1131. int auto0009CF3C_ai;
  1132. int auto7C8B3F12_ae;
  1133. int auto7C8B3F12_ai;
  1134. int auto3A3D76A8_ae;
  1135. int auto3A3D76A8_ai;
  1136. int autoBC075FDB_ae;
  1137. int autoBC075FDB_ai;
  1138.  
  1139. // Variable Declarations
  1140. unitgroup lv_cleanupgroup;
  1141. int lv_i;
  1142. unitgroup lv_unitgroup;
  1143. fixed[201] lv_dy;
  1144. fixed[201] lv_dx;
  1145. unit[201] lv_unitname;
  1146.  
  1147. // Variable Initialization
  1148. lv_cleanupgroup = UnitGroupEmpty();
  1149. lv_unitgroup = UnitGroupEmpty();
  1150.  
  1151. // Implementation
  1152. RegionSetCenter(RegionFromId(1), Point((PointGetX(lp_punkt1) - 6.0), (PointGetY(lp_punkt1) + 5.0)));
  1153. lv_unitgroup = null;
  1154. lv_unitgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(1), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1155. auto32B3567F_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1156. auto32B3567F_ai = 1;
  1157. lv_i = 1;
  1158. for ( ; ( (auto32B3567F_ai >= 0 && lv_i <= auto32B3567F_ae) || (auto32B3567F_ai <= 0 && lv_i >= auto32B3567F_ae) ) ; lv_i += auto32B3567F_ai ) {
  1159. if ((UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)) == "Pylon")) {
  1160. }
  1161. else {
  1162. lv_dy[lv_i] = (PointGetY(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetY(lp_punkt1));
  1163. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dy[lv_i], c_fixedPrecisionAny));
  1164. lv_dx[lv_i] = (PointGetX(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetX(lp_punkt1));
  1165. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dx[lv_i], c_fixedPrecisionAny));
  1166. lv_unitname[lv_i] = UnitGroupUnit(lv_unitgroup, lv_i);
  1167. }
  1168. }
  1169. auto0009CF3C_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1170. auto0009CF3C_ai = 1;
  1171. lv_i = 1;
  1172. for ( ; ( (auto0009CF3C_ai >= 0 && lv_i <= auto0009CF3C_ae) || (auto0009CF3C_ai <= 0 && lv_i >= auto0009CF3C_ae) ) ; lv_i += auto0009CF3C_ai ) {
  1173. UnitCreate(1, UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)), 0, lp_player, Point((PointGetX(PointFromId(32)) - lv_dy[lv_i]), (PointGetY(PointFromId(32)) - lv_dx[lv_i])), 270.0);
  1174. }
  1175. lv_unitgroup = null;
  1176. lv_unitgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(2), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1177. lv_i = 0;
  1178. auto7C8B3F12_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1179. auto7C8B3F12_ai = 1;
  1180. lv_i = 1;
  1181. for ( ; ( (auto7C8B3F12_ai >= 0 && lv_i <= auto7C8B3F12_ae) || (auto7C8B3F12_ai <= 0 && lv_i >= auto7C8B3F12_ae) ) ; lv_i += auto7C8B3F12_ai ) {
  1182. lv_unitname[lv_i] = null;
  1183. lv_dy[lv_i] = 0.0;
  1184. lv_dx[lv_i] = 0.0;
  1185. }
  1186. auto3A3D76A8_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1187. auto3A3D76A8_ai = 1;
  1188. lv_i = 1;
  1189. for ( ; ( (auto3A3D76A8_ai >= 0 && lv_i <= auto3A3D76A8_ae) || (auto3A3D76A8_ai <= 0 && lv_i >= auto3A3D76A8_ae) ) ; lv_i += auto3A3D76A8_ai ) {
  1190. lv_dy[lv_i] = (PointGetY(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetY(PointFromId(32)));
  1191. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dy[lv_i], c_fixedPrecisionAny));
  1192. lv_dx[lv_i] = (PointGetX(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetX(PointFromId(32)));
  1193. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dx[lv_i], c_fixedPrecisionAny));
  1194. lv_unitname[lv_i] = UnitGroupUnit(lv_unitgroup, lv_i);
  1195. }
  1196. autoBC075FDB_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1197. autoBC075FDB_ai = 1;
  1198. lv_i = 1;
  1199. for ( ; ( (autoBC075FDB_ai >= 0 && lv_i <= autoBC075FDB_ae) || (autoBC075FDB_ai <= 0 && lv_i >= autoBC075FDB_ae) ) ; lv_i += autoBC075FDB_ai ) {
  1200. UnitCreate(1, UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)), 0, lp_player, Point((PointGetX(lp_punkt2) - lv_dy[lv_i]), (PointGetY(lp_punkt2) - lv_dx[lv_i])), 270.0);
  1201. libNtve_gf_MakeUnitUncommandable(UnitLastCreated(), true);
  1202. }
  1203. lv_cleanupgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(2), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1204. UnitGroupLoopBegin(lv_cleanupgroup);
  1205. for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
  1206. UnitKill(UnitGroupLoopCurrent());
  1207. }
  1208. UnitGroupLoopEnd();
  1209. }
  1210.  
  1211. void gf_CopyRotateTopRight (int lp_player, point lp_punkt1, point lp_punkt2) {
  1212. int auto63C06FFD_ae;
  1213. int auto63C06FFD_ai;
  1214. int autoE29EE576_ae;
  1215. int autoE29EE576_ai;
  1216. int auto812967DA_ae;
  1217. int auto812967DA_ai;
  1218. int auto6CD5B644_ae;
  1219. int auto6CD5B644_ai;
  1220. int autoFD1AB7BC_ae;
  1221. int autoFD1AB7BC_ai;
  1222.  
  1223. // Variable Declarations
  1224. unitgroup lv_cleanupgroup;
  1225. int lv_i;
  1226. unitgroup lv_unitgroup;
  1227. fixed[201] lv_dy;
  1228. fixed[201] lv_dx;
  1229. unit[201] lv_unitname;
  1230.  
  1231. // Variable Initialization
  1232. lv_cleanupgroup = UnitGroupEmpty();
  1233. lv_unitgroup = UnitGroupEmpty();
  1234.  
  1235. // Implementation
  1236. RegionSetCenter(RegionFromId(1), Point((PointGetX(lp_punkt1) - 6.0), (PointGetY(lp_punkt1) + 5.0)));
  1237. lv_unitgroup = null;
  1238. lv_unitgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(1), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1239. auto63C06FFD_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1240. auto63C06FFD_ai = 1;
  1241. lv_i = 1;
  1242. for ( ; ( (auto63C06FFD_ai >= 0 && lv_i <= auto63C06FFD_ae) || (auto63C06FFD_ai <= 0 && lv_i >= auto63C06FFD_ae) ) ; lv_i += auto63C06FFD_ai ) {
  1243. if ((UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)) == "Pylon")) {
  1244. }
  1245. else {
  1246. lv_dy[lv_i] = (PointGetY(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetY(lp_punkt1));
  1247. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dy[lv_i], c_fixedPrecisionAny));
  1248. lv_dx[lv_i] = (PointGetX(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetX(lp_punkt1));
  1249. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dx[lv_i], c_fixedPrecisionAny));
  1250. lv_unitname[lv_i] = UnitGroupUnit(lv_unitgroup, lv_i);
  1251. }
  1252. }
  1253. autoE29EE576_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1254. autoE29EE576_ai = 1;
  1255. lv_i = 1;
  1256. for ( ; ( (autoE29EE576_ai >= 0 && lv_i <= autoE29EE576_ae) || (autoE29EE576_ai <= 0 && lv_i >= autoE29EE576_ae) ) ; lv_i += autoE29EE576_ai ) {
  1257. UnitCreate(1, UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)), 0, lp_player, Point((PointGetX(PointFromId(32)) - lv_dy[lv_i]), (PointGetY(PointFromId(32)) - lv_dx[lv_i])), 270.0);
  1258. }
  1259. lv_unitgroup = null;
  1260. lv_unitgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(2), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1261. lv_i = 0;
  1262. auto812967DA_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1263. auto812967DA_ai = 1;
  1264. lv_i = 1;
  1265. for ( ; ( (auto812967DA_ai >= 0 && lv_i <= auto812967DA_ae) || (auto812967DA_ai <= 0 && lv_i >= auto812967DA_ae) ) ; lv_i += auto812967DA_ai ) {
  1266. lv_unitname[lv_i] = null;
  1267. lv_dy[lv_i] = 0.0;
  1268. lv_dx[lv_i] = 0.0;
  1269. }
  1270. auto6CD5B644_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1271. auto6CD5B644_ai = 1;
  1272. lv_i = 1;
  1273. for ( ; ( (auto6CD5B644_ai >= 0 && lv_i <= auto6CD5B644_ae) || (auto6CD5B644_ai <= 0 && lv_i >= auto6CD5B644_ae) ) ; lv_i += auto6CD5B644_ai ) {
  1274. lv_dy[lv_i] = (PointGetY(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetY(PointFromId(32)));
  1275. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dy[lv_i], c_fixedPrecisionAny));
  1276. lv_dx[lv_i] = (PointGetX(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetX(PointFromId(32)));
  1277. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dx[lv_i], c_fixedPrecisionAny));
  1278. lv_unitname[lv_i] = UnitGroupUnit(lv_unitgroup, lv_i);
  1279. }
  1280. autoFD1AB7BC_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1281. autoFD1AB7BC_ai = 1;
  1282. lv_i = 1;
  1283. for ( ; ( (autoFD1AB7BC_ai >= 0 && lv_i <= autoFD1AB7BC_ae) || (autoFD1AB7BC_ai <= 0 && lv_i >= autoFD1AB7BC_ae) ) ; lv_i += autoFD1AB7BC_ai ) {
  1284. UnitCreate(1, UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)), 0, lp_player, Point((PointGetX(lp_punkt2) + lv_dy[lv_i]), (PointGetY(lp_punkt2) - lv_dx[lv_i])), 270.0);
  1285. libNtve_gf_MakeUnitUncommandable(UnitLastCreated(), true);
  1286. }
  1287. lv_cleanupgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(2), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1288. UnitGroupLoopBegin(lv_cleanupgroup);
  1289. for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
  1290. UnitKill(UnitGroupLoopCurrent());
  1291. }
  1292. UnitGroupLoopEnd();
  1293. }
  1294.  
  1295. void gf_CopyRotateBotLeft (int lp_player, point lp_punkt1, point lp_punkt2) {
  1296. int auto256D4428_ae;
  1297. int auto256D4428_ai;
  1298. int auto7368415E_ae;
  1299. int auto7368415E_ai;
  1300. int auto1D142CBE_ae;
  1301. int auto1D142CBE_ai;
  1302. int auto4BA307BC_ae;
  1303. int auto4BA307BC_ai;
  1304. int auto516F2568_ae;
  1305. int auto516F2568_ai;
  1306.  
  1307. // Variable Declarations
  1308. unitgroup lv_cleanupgroup;
  1309. int lv_i;
  1310. unitgroup lv_unitgroup;
  1311. fixed[201] lv_dy;
  1312. fixed[201] lv_dx;
  1313. unit[201] lv_unitname;
  1314.  
  1315. // Variable Initialization
  1316. lv_cleanupgroup = UnitGroupEmpty();
  1317. lv_unitgroup = UnitGroupEmpty();
  1318.  
  1319. // Implementation
  1320. RegionSetCenter(RegionFromId(1), Point((PointGetX(lp_punkt1) - 6.0), (PointGetY(lp_punkt1) + 5.0)));
  1321. lv_unitgroup = null;
  1322. lv_unitgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(1), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1323. auto256D4428_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1324. auto256D4428_ai = 1;
  1325. lv_i = 1;
  1326. for ( ; ( (auto256D4428_ai >= 0 && lv_i <= auto256D4428_ae) || (auto256D4428_ai <= 0 && lv_i >= auto256D4428_ae) ) ; lv_i += auto256D4428_ai ) {
  1327. if ((UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)) == "Pylon")) {
  1328. }
  1329. else {
  1330. lv_dy[lv_i] = (PointGetY(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetY(lp_punkt1));
  1331. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dy[lv_i], c_fixedPrecisionAny));
  1332. lv_dx[lv_i] = (PointGetX(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetX(lp_punkt1));
  1333. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dx[lv_i], c_fixedPrecisionAny));
  1334. lv_unitname[lv_i] = UnitGroupUnit(lv_unitgroup, lv_i);
  1335. }
  1336. }
  1337. auto7368415E_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1338. auto7368415E_ai = 1;
  1339. lv_i = 1;
  1340. for ( ; ( (auto7368415E_ai >= 0 && lv_i <= auto7368415E_ae) || (auto7368415E_ai <= 0 && lv_i >= auto7368415E_ae) ) ; lv_i += auto7368415E_ai ) {
  1341. UnitCreate(1, UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)), 0, lp_player, Point((PointGetX(PointFromId(32)) - lv_dy[lv_i]), (PointGetY(PointFromId(32)) - lv_dx[lv_i])), 270.0);
  1342. }
  1343. lv_unitgroup = null;
  1344. lv_unitgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(2), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1345. lv_i = 0;
  1346. auto1D142CBE_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1347. auto1D142CBE_ai = 1;
  1348. lv_i = 1;
  1349. for ( ; ( (auto1D142CBE_ai >= 0 && lv_i <= auto1D142CBE_ae) || (auto1D142CBE_ai <= 0 && lv_i >= auto1D142CBE_ae) ) ; lv_i += auto1D142CBE_ai ) {
  1350. lv_unitname[lv_i] = null;
  1351. lv_dy[lv_i] = 0.0;
  1352. lv_dx[lv_i] = 0.0;
  1353. }
  1354. auto4BA307BC_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1355. auto4BA307BC_ai = 1;
  1356. lv_i = 1;
  1357. for ( ; ( (auto4BA307BC_ai >= 0 && lv_i <= auto4BA307BC_ae) || (auto4BA307BC_ai <= 0 && lv_i >= auto4BA307BC_ae) ) ; lv_i += auto4BA307BC_ai ) {
  1358. lv_dy[lv_i] = (PointGetY(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetY(PointFromId(32)));
  1359. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dy[lv_i], c_fixedPrecisionAny));
  1360. lv_dx[lv_i] = (PointGetX(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetX(PointFromId(32)));
  1361. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dx[lv_i], c_fixedPrecisionAny));
  1362. lv_unitname[lv_i] = UnitGroupUnit(lv_unitgroup, lv_i);
  1363. }
  1364. auto516F2568_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1365. auto516F2568_ai = 1;
  1366. lv_i = 1;
  1367. for ( ; ( (auto516F2568_ai >= 0 && lv_i <= auto516F2568_ae) || (auto516F2568_ai <= 0 && lv_i >= auto516F2568_ae) ) ; lv_i += auto516F2568_ai ) {
  1368. UnitCreate(1, UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)), 0, lp_player, Point((PointGetX(lp_punkt2) - lv_dy[lv_i]), (PointGetY(lp_punkt2) + lv_dx[lv_i])), 270.0);
  1369. libNtve_gf_MakeUnitUncommandable(UnitLastCreated(), true);
  1370. }
  1371. lv_cleanupgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(2), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1372. UnitGroupLoopBegin(lv_cleanupgroup);
  1373. for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
  1374. UnitKill(UnitGroupLoopCurrent());
  1375. }
  1376. UnitGroupLoopEnd();
  1377. }
  1378.  
  1379. bool gf_BonusRoundDead (int lp_player) {
  1380. // Variable Declarations
  1381. int lv_unitsInMiddle;
  1382.  
  1383. // Variable Initialization
  1384.  
  1385. // Implementation
  1386. lv_unitsInMiddle = UnitCount(null, lp_player, RegionFromId(8), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1387. if ((lv_unitsInMiddle == 0)) {
  1388. return false;
  1389. }
  1390. else {
  1391. return true;
  1392. }
  1393. }
  1394.  
  1395. int gf_getlivingplayers () {
  1396. int autoEB1ED12E_ae;
  1397. int autoEB1ED12E_ai;
  1398.  
  1399. // Variable Declarations
  1400. int lv_playersalive;
  1401. int lv_n;
  1402.  
  1403. // Variable Initialization
  1404. lv_playersalive = 8;
  1405.  
  1406. // Implementation
  1407. lv_playersalive = 8;
  1408. lv_n = 0;
  1409. autoEB1ED12E_ae = 8;
  1410. autoEB1ED12E_ai = 1;
  1411. lv_n = 1;
  1412. for ( ; ( (autoEB1ED12E_ai >= 0 && lv_n <= autoEB1ED12E_ae) || (autoEB1ED12E_ai <= 0 && lv_n >= autoEB1ED12E_ae) ) ; lv_n += autoEB1ED12E_ai ) {
  1413. if ((gf_BonusRoundDead(lv_n) == false)) {
  1414. lv_playersalive -= 1;
  1415. }
  1416. else {
  1417. }
  1418. }
  1419. UIDisplayMessage(PlayerGroupAll(), c_messageAreaDirective, IntToText(lv_playersalive));
  1420. return lv_playersalive;
  1421. }
  1422.  
  1423. void gf_startTimer (int lp_time, int lp_round) {
  1424. // Implementation
  1425. TimerStart(gv_timer, lp_time, false, c_timeGame);
  1426. TimerWindowCreate(gv_timer, (StringExternal("Param/Value/77BA7AAC") + (IntToText(lp_round) + StringExternal("Param/Value/CD3E7278"))), true, false);
  1427. gv_timerWindow = TimerWindowLastCreated();
  1428. Wait(lp_time, c_timeReal);
  1429. TimerWindowDestroy(gv_timerWindow);
  1430. if ((lp_round == 1)) {
  1431. TriggerExecute(gt_Round1, true, false);
  1432. }
  1433. else if ((lp_round == 2)) {
  1434. TriggerExecute(gt_Round2, true, false);
  1435. }
  1436. else if ((lp_round == 3)) {
  1437. TriggerExecute(gt_Round3, true, false);
  1438. }
  1439. else if ((lp_round == 4)) {
  1440. TriggerExecute(gt_Round4, true, false);
  1441. }
  1442. else if ((lp_round == 5)) {
  1443. TriggerExecute(gt_BonusRound1akaRound5, true, false);
  1444. }
  1445. else if ((lp_round == 6)) {
  1446. TriggerExecute(gt_Round6, true, false);
  1447. }
  1448. else if ((lp_round == 7)) {
  1449. TriggerExecute(gt_Round7, true, false);
  1450. }
  1451. else if ((lp_round == 8)) {
  1452. TriggerExecute(gt_Round8, true, false);
  1453. }
  1454. else if ((lp_round == 9)) {
  1455. TriggerExecute(gt_BonusRound2akaRound9, true, false);
  1456. }
  1457. else if ((lp_round == 10)) {
  1458. TriggerExecute(gt_QuarterFinal, true, false);
  1459. }
  1460. TriggerExecute(gt_AntiMoveafterWavestart, true, false);
  1461. }
  1462.  
  1463. void gf_CopyMidLeft (int lp_player, point lp_punkt1, point lp_punkt2) {
  1464. int auto2FC1045B_ae;
  1465. int auto2FC1045B_ai;
  1466. int auto35279D6C_ae;
  1467. int auto35279D6C_ai;
  1468. int autoC801B290_ae;
  1469. int autoC801B290_ai;
  1470. int autoF56828AF_ae;
  1471. int autoF56828AF_ai;
  1472. int auto94E0E0D0_ae;
  1473. int auto94E0E0D0_ai;
  1474.  
  1475. // Variable Declarations
  1476. unitgroup lv_cleanupgroup;
  1477. int lv_i;
  1478. unitgroup lv_unitgroup;
  1479. fixed[201] lv_dy;
  1480. fixed[201] lv_dx;
  1481. unit[201] lv_unitname;
  1482.  
  1483. // Variable Initialization
  1484. lv_cleanupgroup = UnitGroupEmpty();
  1485. lv_unitgroup = UnitGroupEmpty();
  1486.  
  1487. // Implementation
  1488. RegionSetCenter(RegionFromId(1), Point((PointGetX(lp_punkt1) - 6.0), (PointGetY(lp_punkt1) + 5.0)));
  1489. lv_unitgroup = null;
  1490. lv_unitgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(1), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1491. auto2FC1045B_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1492. auto2FC1045B_ai = 1;
  1493. lv_i = 1;
  1494. for ( ; ( (auto2FC1045B_ai >= 0 && lv_i <= auto2FC1045B_ae) || (auto2FC1045B_ai <= 0 && lv_i >= auto2FC1045B_ae) ) ; lv_i += auto2FC1045B_ai ) {
  1495. if ((UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)) == "Pylon")) {
  1496. }
  1497. else {
  1498. lv_dy[lv_i] = (PointGetY(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetY(lp_punkt1));
  1499. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dy[lv_i], c_fixedPrecisionAny));
  1500. lv_dx[lv_i] = (PointGetX(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetX(lp_punkt1));
  1501. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dx[lv_i], c_fixedPrecisionAny));
  1502. lv_unitname[lv_i] = UnitGroupUnit(lv_unitgroup, lv_i);
  1503. }
  1504. }
  1505. auto35279D6C_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1506. auto35279D6C_ai = 1;
  1507. lv_i = 1;
  1508. for ( ; ( (auto35279D6C_ai >= 0 && lv_i <= auto35279D6C_ae) || (auto35279D6C_ai <= 0 && lv_i >= auto35279D6C_ae) ) ; lv_i += auto35279D6C_ai ) {
  1509. UnitCreate(1, UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)), 0, lp_player, Point((PointGetX(PointFromId(32)) - lv_dy[lv_i]), (PointGetY(PointFromId(32)) - lv_dx[lv_i])), 270.0);
  1510. }
  1511. lv_unitgroup = null;
  1512. lv_unitgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(2), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1513. lv_i = 0;
  1514. autoC801B290_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1515. autoC801B290_ai = 1;
  1516. lv_i = 1;
  1517. for ( ; ( (autoC801B290_ai >= 0 && lv_i <= autoC801B290_ae) || (autoC801B290_ai <= 0 && lv_i >= autoC801B290_ae) ) ; lv_i += autoC801B290_ai ) {
  1518. lv_unitname[lv_i] = null;
  1519. lv_dy[lv_i] = 0.0;
  1520. lv_dx[lv_i] = 0.0;
  1521. }
  1522. autoF56828AF_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1523. autoF56828AF_ai = 1;
  1524. lv_i = 1;
  1525. for ( ; ( (autoF56828AF_ai >= 0 && lv_i <= autoF56828AF_ae) || (autoF56828AF_ai <= 0 && lv_i >= autoF56828AF_ae) ) ; lv_i += autoF56828AF_ai ) {
  1526. lv_dy[lv_i] = (PointGetY(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetY(PointFromId(32)));
  1527. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dy[lv_i], c_fixedPrecisionAny));
  1528. lv_dx[lv_i] = (PointGetX(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetX(PointFromId(32)));
  1529. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dx[lv_i], c_fixedPrecisionAny));
  1530. lv_unitname[lv_i] = UnitGroupUnit(lv_unitgroup, lv_i);
  1531. }
  1532. auto94E0E0D0_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1533. auto94E0E0D0_ai = 1;
  1534. lv_i = 1;
  1535. for ( ; ( (auto94E0E0D0_ai >= 0 && lv_i <= auto94E0E0D0_ae) || (auto94E0E0D0_ai <= 0 && lv_i >= auto94E0E0D0_ae) ) ; lv_i += auto94E0E0D0_ai ) {
  1536. UnitCreate(1, UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)), 0, lp_player, Point((PointGetX(lp_punkt2) - lv_dy[lv_i]), (PointGetY(lp_punkt2) - lv_dx[lv_i])), 270.0);
  1537. libNtve_gf_MakeUnitUncommandable(UnitLastCreated(), true);
  1538. }
  1539. lv_cleanupgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(2), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1540. UnitGroupLoopBegin(lv_cleanupgroup);
  1541. for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
  1542. UnitKill(UnitGroupLoopCurrent());
  1543. }
  1544. UnitGroupLoopEnd();
  1545. }
  1546.  
  1547. void gf_CopyMidRight (int lp_player, point lp_punkt1, point lp_punkt2) {
  1548. int autoCB23017B_ae;
  1549. int autoCB23017B_ai;
  1550. int auto87905C22_ae;
  1551. int auto87905C22_ai;
  1552. int autoAE570210_ae;
  1553. int autoAE570210_ai;
  1554. int auto98D766F6_ae;
  1555. int auto98D766F6_ai;
  1556. int auto57D7CD56_ae;
  1557. int auto57D7CD56_ai;
  1558.  
  1559. // Variable Declarations
  1560. unitgroup lv_cleanupgroup;
  1561. int lv_i;
  1562. unitgroup lv_unitgroup;
  1563. fixed[201] lv_dy;
  1564. fixed[201] lv_dx;
  1565. unit[201] lv_unitname;
  1566.  
  1567. // Variable Initialization
  1568. lv_cleanupgroup = UnitGroupEmpty();
  1569. lv_unitgroup = UnitGroupEmpty();
  1570.  
  1571. // Implementation
  1572. RegionSetCenter(RegionFromId(1), Point((PointGetX(lp_punkt1) - 6.0), (PointGetY(lp_punkt1) + 5.0)));
  1573. lv_unitgroup = null;
  1574. lv_unitgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(1), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1575. autoCB23017B_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1576. autoCB23017B_ai = 1;
  1577. lv_i = 1;
  1578. for ( ; ( (autoCB23017B_ai >= 0 && lv_i <= autoCB23017B_ae) || (autoCB23017B_ai <= 0 && lv_i >= autoCB23017B_ae) ) ; lv_i += autoCB23017B_ai ) {
  1579. if ((UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)) == "Pylon")) {
  1580. }
  1581. else {
  1582. lv_dy[lv_i] = (PointGetY(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetY(lp_punkt1));
  1583. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dy[lv_i], c_fixedPrecisionAny));
  1584. lv_dx[lv_i] = (PointGetX(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetX(lp_punkt1));
  1585. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dx[lv_i], c_fixedPrecisionAny));
  1586. lv_unitname[lv_i] = UnitGroupUnit(lv_unitgroup, lv_i);
  1587. }
  1588. }
  1589. auto87905C22_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1590. auto87905C22_ai = 1;
  1591. lv_i = 1;
  1592. for ( ; ( (auto87905C22_ai >= 0 && lv_i <= auto87905C22_ae) || (auto87905C22_ai <= 0 && lv_i >= auto87905C22_ae) ) ; lv_i += auto87905C22_ai ) {
  1593. UnitCreate(1, UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)), 0, lp_player, Point((PointGetX(PointFromId(32)) - lv_dy[lv_i]), (PointGetY(PointFromId(32)) - lv_dx[lv_i])), 270.0);
  1594. }
  1595. lv_unitgroup = null;
  1596. lv_unitgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(2), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1597. lv_i = 0;
  1598. autoAE570210_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1599. autoAE570210_ai = 1;
  1600. lv_i = 1;
  1601. for ( ; ( (autoAE570210_ai >= 0 && lv_i <= autoAE570210_ae) || (autoAE570210_ai <= 0 && lv_i >= autoAE570210_ae) ) ; lv_i += autoAE570210_ai ) {
  1602. lv_unitname[lv_i] = null;
  1603. lv_dy[lv_i] = 0.0;
  1604. lv_dx[lv_i] = 0.0;
  1605. }
  1606. auto98D766F6_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1607. auto98D766F6_ai = 1;
  1608. lv_i = 1;
  1609. for ( ; ( (auto98D766F6_ai >= 0 && lv_i <= auto98D766F6_ae) || (auto98D766F6_ai <= 0 && lv_i >= auto98D766F6_ae) ) ; lv_i += auto98D766F6_ai ) {
  1610. lv_dy[lv_i] = (PointGetY(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetY(PointFromId(32)));
  1611. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dy[lv_i], c_fixedPrecisionAny));
  1612. lv_dx[lv_i] = (PointGetX(UnitGetPosition(UnitGroupUnit(lv_unitgroup, lv_i))) - PointGetX(PointFromId(32)));
  1613. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, FixedToText(lv_dx[lv_i], c_fixedPrecisionAny));
  1614. lv_unitname[lv_i] = UnitGroupUnit(lv_unitgroup, lv_i);
  1615. }
  1616. auto57D7CD56_ae = UnitGroupCount(lv_unitgroup, c_unitCountAlive);
  1617. auto57D7CD56_ai = 1;
  1618. lv_i = 1;
  1619. for ( ; ( (auto57D7CD56_ai >= 0 && lv_i <= auto57D7CD56_ae) || (auto57D7CD56_ai <= 0 && lv_i >= auto57D7CD56_ae) ) ; lv_i += auto57D7CD56_ai ) {
  1620. UnitCreate(1, UnitGetType(UnitGroupUnit(lv_unitgroup, lv_i)), 0, lp_player, Point((PointGetX(lp_punkt2) + lv_dy[lv_i]), (PointGetY(lp_punkt2) - lv_dx[lv_i])), 270.0);
  1621. libNtve_gf_MakeUnitUncommandable(UnitLastCreated(), true);
  1622. }
  1623. lv_cleanupgroup = UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(2), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
  1624. UnitGroupLoopBegin(lv_cleanupgroup);
  1625. for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
  1626. UnitKill(UnitGroupLoopCurrent());
  1627. }
  1628. UnitGroupLoopEnd();
  1629. }
  1630.  
  1631. //--------------------------------------------------------------------------------------------------
  1632. // Trigger: T1Dies
  1633. //--------------------------------------------------------------------------------------------------
  1634. bool gt_T1Dies_Func (bool testConds, bool runActions) {
  1635. // Actions
  1636. if (!runActions) {
  1637. return true;
  1638. }
  1639.  
  1640. UnitCreate(RandomInt(1, 2), "MercReaper", 0, 15, PointFromId(1), 270.0);
  1641. return true;
  1642. }
  1643.  
  1644. //--------------------------------------------------------------------------------------------------
  1645. void gt_T1Dies_Init () {
  1646. gt_T1Dies = TriggerCreate("gt_T1Dies_Func");
  1647. }
  1648.  
  1649. //--------------------------------------------------------------------------------------------------
  1650. // Trigger: T2Dies
  1651. //--------------------------------------------------------------------------------------------------
  1652. bool gt_T2Dies_Func (bool testConds, bool runActions) {
  1653. // Actions
  1654. if (!runActions) {
  1655. return true;
  1656. }
  1657.  
  1658. UnitCreate(RandomInt(1, 2), "MercReaper", 0, 15, PointFromId(1), 270.0);
  1659. return true;
  1660. }
  1661.  
  1662. //--------------------------------------------------------------------------------------------------
  1663. void gt_T2Dies_Init () {
  1664. gt_T2Dies = TriggerCreate("gt_T2Dies_Func");
  1665. }
  1666.  
  1667. //--------------------------------------------------------------------------------------------------
  1668. // Trigger: T3Dies
  1669. //--------------------------------------------------------------------------------------------------
  1670. bool gt_T3Dies_Func (bool testConds, bool runActions) {
  1671. // Actions
  1672. if (!runActions) {
  1673. return true;
  1674. }
  1675.  
  1676. UnitCreate(RandomInt(1, 2), "MercReaper", 0, 15, PointFromId(1), 270.0);
  1677. return true;
  1678. }
  1679.  
  1680. //--------------------------------------------------------------------------------------------------
  1681. void gt_T3Dies_Init () {
  1682. gt_T3Dies = TriggerCreate("gt_T3Dies_Func");
  1683. }
  1684.  
  1685. //--------------------------------------------------------------------------------------------------
  1686. // Trigger: T4Dies
  1687. //--------------------------------------------------------------------------------------------------
  1688. bool gt_T4Dies_Func (bool testConds, bool runActions) {
  1689. // Actions
  1690. if (!runActions) {
  1691. return true;
  1692. }
  1693.  
  1694. UnitCreate(RandomInt(1, 2), "MercReaper", 0, 15, PointFromId(1), 270.0);
  1695. return true;
  1696. }
  1697.  
  1698. //--------------------------------------------------------------------------------------------------
  1699. void gt_T4Dies_Init () {
  1700. gt_T4Dies = TriggerCreate("gt_T4Dies_Func");
  1701. }
  1702.  
  1703. //--------------------------------------------------------------------------------------------------
  1704. // Trigger: T5Dies
  1705. //--------------------------------------------------------------------------------------------------
  1706. bool gt_T5Dies_Func (bool testConds, bool runActions) {
  1707. // Actions
  1708. if (!runActions) {
  1709. return true;
  1710. }
  1711.  
  1712. UnitCreate(RandomInt(1, 2), "MercReaper", 0, 15, PointFromId(1), 270.0);
  1713. return true;
  1714. }
  1715.  
  1716. //--------------------------------------------------------------------------------------------------
  1717. void gt_T5Dies_Init () {
  1718. gt_T5Dies = TriggerCreate("gt_T5Dies_Func");
  1719. }
  1720.  
  1721. //--------------------------------------------------------------------------------------------------
  1722. // Trigger: Midcleanup
  1723. //--------------------------------------------------------------------------------------------------
  1724. bool gt_Midcleanup_Func (bool testConds, bool runActions) {
  1725. // Actions
  1726. if (!runActions) {
  1727. return true;
  1728. }
  1729.  
  1730. TriggerEnable(gt_T1Dies, false);
  1731. UnitIssueOrder(UnitFromId(119), Order(AbilityCommand("EnergyNova", 0)), c_orderQueueReplace);
  1732. Wait(5.0, c_timeReal);
  1733. TriggerEnable(gt_T1Dies, true);
  1734. return true;
  1735. }
  1736.  
  1737. //--------------------------------------------------------------------------------------------------
  1738. void gt_Midcleanup_Init () {
  1739. gt_Midcleanup = TriggerCreate("gt_Midcleanup_Func");
  1740. }
  1741.  
  1742. //--------------------------------------------------------------------------------------------------
  1743. // Trigger: Unit in Bonusround dies
  1744. //--------------------------------------------------------------------------------------------------
  1745. bool gt_UnitinBonusrounddies_Func (bool testConds, bool runActions) {
  1746. // Conditions
  1747. if (testConds) {
  1748. if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(8)) == true))) {
  1749. return false;
  1750. }
  1751. }
  1752.  
  1753. // Actions
  1754. if (!runActions) {
  1755. return true;
  1756. }
  1757.  
  1758. if ((UnitGetOwner(EventUnit()) == 15)) {
  1759. if ((libNtve_gf_KillingUnit() == UnitFromId(119))) {
  1760. }
  1761. else {
  1762. PlayerModifyPropertyInt(gv_bonusRoundPlayer, c_playerPropVespene, c_playerPropOperAdd, 10);
  1763. gv_bonusRoundScore[gv_bonusRoundPlayer] += 10;
  1764. TriggerExecute(gt_T1Dies, false, false);
  1765. }
  1766. }
  1767. else {
  1768. TriggerExecute(gt_AntiIdle, true, false);
  1769. }
  1770. return true;
  1771. }
  1772.  
  1773. //--------------------------------------------------------------------------------------------------
  1774. void gt_UnitinBonusrounddies_Init () {
  1775. gt_UnitinBonusrounddies = TriggerCreate("gt_UnitinBonusrounddies_Func");
  1776. TriggerEnable(gt_UnitinBonusrounddies, false);
  1777. TriggerAddEventUnitDied(gt_UnitinBonusrounddies, null);
  1778. }
  1779.  
  1780. //--------------------------------------------------------------------------------------------------
  1781. // Trigger: Bonus Round 1 (aka Round 5)
  1782. //--------------------------------------------------------------------------------------------------
  1783. bool gt_BonusRound1akaRound5_Func (bool testConds, bool runActions) {
  1784. // Actions
  1785. if (!runActions) {
  1786. return true;
  1787. }
  1788.  
  1789. gv_nC3A4chsteRunde = 6;
  1790. TriggerExecute(gt_AntiIdle, true, false);
  1791. TriggerEnable(gt_UnitInMiddledies, false);
  1792. TriggerEnable(gt_UnitinBonusrounddies, true);
  1793. gf_CopyMidRight(1, PointFromId(2), PointFromId(45));
  1794. TriggerExecute(gt_T1Dies, true, false);
  1795. Wait(2.0, c_timeReal);
  1796. while (!((gf_BonusRoundDead(1) == false))) {
  1797. Wait(5.0, c_timeReal);
  1798. }
  1799. TriggerExecute(gt_Midcleanup, true, true);
  1800. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, ((PlayerName(gv_bonusRoundPlayer) + StringExternal("Param/Value/4A10CA88")) + (IntToText(gv_bonusRoundScore[gv_bonusRoundPlayer]) + StringExternal("Param/Value/CEE5B47A"))));
  1801. gv_bonusRoundPlayer += 1;
  1802. gf_CopyMidRight(2, PointFromId(3), PointFromId(45));
  1803. TriggerExecute(gt_T1Dies, true, false);
  1804. Wait(2.0, c_timeReal);
  1805. while (!((gf_BonusRoundDead(2) == false))) {
  1806. Wait(5.0, c_timeReal);
  1807. }
  1808. TriggerExecute(gt_Midcleanup, true, true);
  1809. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, ((PlayerName(gv_bonusRoundPlayer) + StringExternal("Param/Value/AD6D9BB0")) + (IntToText(gv_bonusRoundScore[gv_bonusRoundPlayer]) + StringExternal("Param/Value/DFF512BA"))));
  1810. gv_bonusRoundPlayer += 1;
  1811. gf_CopyMidRight(3, PointFromId(4), PointFromId(45));
  1812. TriggerExecute(gt_T1Dies, true, true);
  1813. Wait(2.0, c_timeReal);
  1814. while (!((gf_BonusRoundDead(3) == false))) {
  1815. Wait(5.0, c_timeReal);
  1816. }
  1817. TriggerExecute(gt_Midcleanup, true, true);
  1818. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, ((PlayerName(gv_bonusRoundPlayer) + StringExternal("Param/Value/E4357519")) + (IntToText(gv_bonusRoundScore[gv_bonusRoundPlayer]) + StringExternal("Param/Value/AE256DD4"))));
  1819. gv_bonusRoundPlayer += 1;
  1820. gf_CopyMidRight(4, PointFromId(5), PointFromId(45));
  1821. TriggerExecute(gt_T1Dies, true, true);
  1822. Wait(2.0, c_timeReal);
  1823. while (!((gf_BonusRoundDead(4) == false))) {
  1824. Wait(5.0, c_timeReal);
  1825. }
  1826. TriggerExecute(gt_Midcleanup, true, true);
  1827. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, ((PlayerName(gv_bonusRoundPlayer) + StringExternal("Param/Value/D810B9F3")) + (IntToText(gv_bonusRoundScore[gv_bonusRoundPlayer]) + StringExternal("Param/Value/71FCB8FD"))));
  1828. gv_bonusRoundPlayer += 1;
  1829. gf_CopyMidRight(5, PointFromId(6), PointFromId(45));
  1830. TriggerExecute(gt_T1Dies, true, true);
  1831. Wait(2.0, c_timeReal);
  1832. while (!((gf_BonusRoundDead(5) == false))) {
  1833. Wait(5.0, c_timeReal);
  1834. }
  1835. TriggerExecute(gt_Midcleanup, true, true);
  1836. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, ((PlayerName(gv_bonusRoundPlayer) + StringExternal("Param/Value/3B8E40E2")) + (IntToText(gv_bonusRoundScore[gv_bonusRoundPlayer]) + StringExternal("Param/Value/F204C22E"))));
  1837. gv_bonusRoundPlayer += 1;
  1838. gf_CopyMidRight(6, PointFromId(7), PointFromId(45));
  1839. TriggerExecute(gt_T1Dies, true, true);
  1840. Wait(2.0, c_timeReal);
  1841. while (!((gf_BonusRoundDead(6) == false))) {
  1842. Wait(5.0, c_timeReal);
  1843. }
  1844. TriggerExecute(gt_Midcleanup, true, true);
  1845. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, ((PlayerName(gv_bonusRoundPlayer) + StringExternal("Param/Value/C3F67ED9")) + (IntToText(gv_bonusRoundScore[gv_bonusRoundPlayer]) + StringExternal("Param/Value/FF0FF50C"))));
  1846. gv_bonusRoundPlayer += 1;
  1847. gf_CopyMidRight(7, PointFromId(8), PointFromId(45));
  1848. TriggerExecute(gt_T1Dies, true, true);
  1849. Wait(2.0, c_timeReal);
  1850. while (!((gf_BonusRoundDead(7) == false))) {
  1851. Wait(5.0, c_timeReal);
  1852. }
  1853. TriggerExecute(gt_Midcleanup, true, true);
  1854. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, ((PlayerName(gv_bonusRoundPlayer) + StringExternal("Param/Value/5CB2BDF7")) + (IntToText(gv_bonusRoundScore[gv_bonusRoundPlayer]) + StringExternal("Param/Value/C72C6D74"))));
  1855. gv_bonusRoundPlayer += 1;
  1856. gf_CopyMidRight(8, PointFromId(9), PointFromId(45));
  1857. TriggerExecute(gt_T1Dies, true, true);
  1858. Wait(2.0, c_timeReal);
  1859. while (!((gf_BonusRoundDead(8) == false))) {
  1860. Wait(5.0, c_timeReal);
  1861. }
  1862. TriggerExecute(gt_Midcleanup, true, false);
  1863. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, ((PlayerName(gv_bonusRoundPlayer) + StringExternal("Param/Value/B3B15A0A")) + (IntToText(gv_bonusRoundScore[gv_bonusRoundPlayer]) + StringExternal("Param/Value/45163E4C"))));
  1864. gv_bonusRoundPlayer = 1;
  1865. gf_startTimer(30, gv_nC3A4chsteRunde);
  1866. return true;
  1867. }
  1868.  
  1869. //--------------------------------------------------------------------------------------------------
  1870. void gt_BonusRound1akaRound5_Init () {
  1871. gt_BonusRound1akaRound5 = TriggerCreate("gt_BonusRound1akaRound5_Func");
  1872. }
  1873.  
  1874. //--------------------------------------------------------------------------------------------------
  1875. // Trigger: Bonus Round 2 (aka Round 9)
  1876. //--------------------------------------------------------------------------------------------------
  1877. bool gt_BonusRound2akaRound9_Func (bool testConds, bool runActions) {
  1878. return true;
  1879. }
  1880.  
  1881. //--------------------------------------------------------------------------------------------------
  1882. void gt_BonusRound2akaRound9_Init () {
  1883. gt_BonusRound2akaRound9 = TriggerCreate("gt_BonusRound2akaRound9_Func");
  1884. }
  1885.  
  1886. //--------------------------------------------------------------------------------------------------
  1887. // Trigger: QuarterFinal
  1888. //--------------------------------------------------------------------------------------------------
  1889. bool gt_QuarterFinal_Func (bool testConds, bool runActions) {
  1890. int auto68C7D9A2_ae;
  1891. int auto68C7D9A2_ai;
  1892.  
  1893. // Variable Declarations
  1894. int lv_i;
  1895.  
  1896. // Variable Initialization
  1897.  
  1898. // Actions
  1899. if (!runActions) {
  1900. return true;
  1901. }
  1902.  
  1903. TriggerEnable(gt_UnitInMiddledies, true);
  1904. TriggerEnable(gt_UnitinBonusrounddies, false);
  1905. UIClearMessages(PlayerGroupAll(), c_messageAreaAll);
  1906. UIDisplayMessage(PlayerGroupAll(), c_messageAreaDirective, StringExternal("Param/Value/C9B8A668"));
  1907. Wait(5.0, c_timeReal);
  1908. UIClearMessages(PlayerGroupAll(), c_messageAreaAll);
  1909. auto68C7D9A2_ae = 8;
  1910. auto68C7D9A2_ai = 1;
  1911. lv_i = 1;
  1912. for ( ; ( (auto68C7D9A2_ai >= 0 && lv_i <= auto68C7D9A2_ae) || (auto68C7D9A2_ai <= 0 && lv_i >= auto68C7D9A2_ae) ) ; lv_i += auto68C7D9A2_ai ) {
  1913. GameOver(lv_i, c_gameOverVictory, true, true);
  1914. }
  1915. return true;
  1916. }
  1917.  
  1918. //--------------------------------------------------------------------------------------------------
  1919. void gt_QuarterFinal_Init () {
  1920. gt_QuarterFinal = TriggerCreate("gt_QuarterFinal_Func");
  1921. }
  1922.  
  1923. //--------------------------------------------------------------------------------------------------
  1924. // Trigger: SemiFinal
  1925. //--------------------------------------------------------------------------------------------------
  1926. bool gt_SemiFinal_Func (bool testConds, bool runActions) {
  1927. return true;
  1928. }
  1929.  
  1930. //--------------------------------------------------------------------------------------------------
  1931. void gt_SemiFinal_Init () {
  1932. gt_SemiFinal = TriggerCreate("gt_SemiFinal_Func");
  1933. }
  1934.  
  1935. //--------------------------------------------------------------------------------------------------
  1936. // Trigger: Final
  1937. //--------------------------------------------------------------------------------------------------
  1938. bool gt_Final_Func (bool testConds, bool runActions) {
  1939. return true;
  1940. }
  1941.  
  1942. //--------------------------------------------------------------------------------------------------
  1943. void gt_Final_Init () {
  1944. gt_Final = TriggerCreate("gt_Final_Func");
  1945. }
  1946.  
  1947. //--------------------------------------------------------------------------------------------------
  1948. // Trigger: KillPylo
  1949. //--------------------------------------------------------------------------------------------------
  1950. bool gt_KillPylo_Func (bool testConds, bool runActions) {
  1951. // Conditions
  1952. if (testConds) {
  1953. if (!((UnitGetType(EventUnit()) == "Pylon"))) {
  1954. return false;
  1955. }
  1956. }
  1957.  
  1958. // Actions
  1959. if (!runActions) {
  1960. return true;
  1961. }
  1962.  
  1963. UnitKill(EventUnit());
  1964. return true;
  1965. }
  1966.  
  1967. //--------------------------------------------------------------------------------------------------
  1968. void gt_KillPylo_Init () {
  1969. gt_KillPylo = TriggerCreate("gt_KillPylo_Func");
  1970. TriggerAddEventUnitRegion(gt_KillPylo, null, RegionFromId(7), true);
  1971. TriggerAddEventUnitRegion(gt_KillPylo, null, RegionFromId(18), true);
  1972. }
  1973.  
  1974. //--------------------------------------------------------------------------------------------------
  1975. // Trigger: Vor1
  1976. //--------------------------------------------------------------------------------------------------
  1977. bool gt_Vor1_Func (bool testConds, bool runActions) {
  1978. playergroup auto5D567340_g;
  1979. int auto5D567340_p;
  1980.  
  1981. // Variable Declarations
  1982. int lv_i;
  1983.  
  1984. // Variable Initialization
  1985.  
  1986. // Actions
  1987. if (!runActions) {
  1988. return true;
  1989. }
  1990.  
  1991. auto5D567340_g = PlayerGroupAll();
  1992. auto5D567340_p = 1;
  1993. for ( ; auto5D567340_p <= PlayerGroupCount(auto5D567340_g) ; auto5D567340_p += BoolToInt(lv_i == PlayerGroupPlayer(auto5D567340_g, auto5D567340_p)) ) {
  1994. lv_i = PlayerGroupPlayer(auto5D567340_g, auto5D567340_p);
  1995. libNtve_gf_SetUpgradeLevelForPlayer(lv_i, "ExtendedThermalLance", 0);
  1996. PlayerModifyPropertyInt(lv_i, c_playerPropSuppliesLimit, c_playerPropOperSetTo, 9999);
  1997. PlayerModifyPropertyInt(lv_i, c_playerPropSuppliesMade, c_playerPropOperSetTo, 9999);
  1998. PlayerModifyPropertyInt(lv_i, c_playerPropMinerals, c_playerPropOperSetTo, 150);
  1999. }
  2000. gf_startTimer(60, 1);
  2001. return true;
  2002. }
  2003.  
  2004. //--------------------------------------------------------------------------------------------------
  2005. void gt_Vor1_Init () {
  2006. gt_Vor1 = TriggerCreate("gt_Vor1_Func");
  2007. TriggerAddEventMapInit(gt_Vor1);
  2008. }
  2009.  
  2010. //--------------------------------------------------------------------------------------------------
  2011. // Trigger: Round1
  2012. //--------------------------------------------------------------------------------------------------
  2013. bool gt_Round1_Func (bool testConds, bool runActions) {
  2014. int autoB2F31A88_ae;
  2015. int autoB2F31A88_ai;
  2016.  
  2017. // Variable Declarations
  2018. int lv_i;
  2019.  
  2020. // Variable Initialization
  2021.  
  2022. // Actions
  2023. if (!runActions) {
  2024. return true;
  2025. }
  2026.  
  2027. autoB2F31A88_ae = 8;
  2028. autoB2F31A88_ai = 1;
  2029. lv_i = 1;
  2030. for ( ; ( (autoB2F31A88_ai >= 0 && lv_i <= autoB2F31A88_ae) || (autoB2F31A88_ai <= 0 && lv_i >= autoB2F31A88_ae) ) ; lv_i += autoB2F31A88_ai ) {
  2031. PlayerModifyPropertyInt(lv_i, c_playerPropMinerals, c_playerPropOperAdd, 150);
  2032. }
  2033. gf_CopyLeftBot(1, PointFromId(2), PointFromId(19));
  2034. gf_CopyLeftTop(2, PointFromId(3), PointFromId(26));
  2035. gf_CopyRightBot(3, PointFromId(4), PointFromId(23));
  2036. gf_CopyRightTop(4, PointFromId(5), PointFromId(22));
  2037. gf_CopyRotateBotLeft(5, PointFromId(6), PointFromId(20));
  2038. gf_CopyRotateBotRight(6, PointFromId(7), PointFromId(24));
  2039. gf_CopyRotateTopLeft(7, PointFromId(8), PointFromId(25));
  2040. gf_CopyRotateTopRight(8, PointFromId(9), PointFromId(21));
  2041. UnitPauseAll(true);
  2042. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(6), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(6))), c_orderQueueReplace);
  2043. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(3), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(3))), c_orderQueueReplace);
  2044. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(4), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(4))), c_orderQueueReplace);
  2045. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(5), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(5))), c_orderQueueReplace);
  2046. UnitPauseAll(false);
  2047. gv_nC3A4chsteRunde = 2;
  2048. Wait(30.0, c_timeReal);
  2049. TriggerExecute(gt_AntiIdle, true, false);
  2050. return true;
  2051. }
  2052.  
  2053. //--------------------------------------------------------------------------------------------------
  2054. void gt_Round1_Init () {
  2055. gt_Round1 = TriggerCreate("gt_Round1_Func");
  2056. }
  2057.  
  2058. //--------------------------------------------------------------------------------------------------
  2059. // Trigger: Round2
  2060. //--------------------------------------------------------------------------------------------------
  2061. bool gt_Round2_Func (bool testConds, bool runActions) {
  2062. int auto80C0F80B_ae;
  2063. int auto80C0F80B_ai;
  2064.  
  2065. // Variable Declarations
  2066. int lv_i;
  2067.  
  2068. // Variable Initialization
  2069.  
  2070. // Actions
  2071. if (!runActions) {
  2072. return true;
  2073. }
  2074.  
  2075. auto80C0F80B_ae = 8;
  2076. auto80C0F80B_ai = 1;
  2077. lv_i = 1;
  2078. for ( ; ( (auto80C0F80B_ai >= 0 && lv_i <= auto80C0F80B_ae) || (auto80C0F80B_ai <= 0 && lv_i >= auto80C0F80B_ae) ) ; lv_i += auto80C0F80B_ai ) {
  2079. PlayerModifyPropertyInt(lv_i, c_playerPropMinerals, c_playerPropOperAdd, 300);
  2080. }
  2081. gf_CopyLeftBot(1, PointFromId(2), PointFromId(19));
  2082. gf_CopyLeftTop(3, PointFromId(4), PointFromId(26));
  2083. gf_CopyRightBot(2, PointFromId(3), PointFromId(23));
  2084. gf_CopyRightTop(4, PointFromId(5), PointFromId(22));
  2085. gf_CopyRotateBotLeft(5, PointFromId(6), PointFromId(20));
  2086. gf_CopyRotateBotRight(7, PointFromId(8), PointFromId(24));
  2087. gf_CopyRotateTopLeft(6, PointFromId(7), PointFromId(25));
  2088. gf_CopyRotateTopRight(8, PointFromId(9), PointFromId(21));
  2089. UnitPauseAll(true);
  2090. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(6), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(6))), c_orderQueueReplace);
  2091. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(3), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(3))), c_orderQueueReplace);
  2092. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(4), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(4))), c_orderQueueReplace);
  2093. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(5), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(5))), c_orderQueueReplace);
  2094. UnitPauseAll(false);
  2095. gv_nC3A4chsteRunde = 3;
  2096. Wait(30.0, c_timeReal);
  2097. TriggerExecute(gt_AntiIdle, true, false);
  2098. return true;
  2099. }
  2100.  
  2101. //--------------------------------------------------------------------------------------------------
  2102. void gt_Round2_Init () {
  2103. gt_Round2 = TriggerCreate("gt_Round2_Func");
  2104. }
  2105.  
  2106. //--------------------------------------------------------------------------------------------------
  2107. // Trigger: Round3
  2108. //--------------------------------------------------------------------------------------------------
  2109. bool gt_Round3_Func (bool testConds, bool runActions) {
  2110. int auto85A2A91D_ae;
  2111. int auto85A2A91D_ai;
  2112.  
  2113. // Variable Declarations
  2114. int lv_i;
  2115.  
  2116. // Variable Initialization
  2117.  
  2118. // Actions
  2119. if (!runActions) {
  2120. return true;
  2121. }
  2122.  
  2123. auto85A2A91D_ae = 8;
  2124. auto85A2A91D_ai = 1;
  2125. lv_i = 1;
  2126. for ( ; ( (auto85A2A91D_ai >= 0 && lv_i <= auto85A2A91D_ae) || (auto85A2A91D_ai <= 0 && lv_i >= auto85A2A91D_ae) ) ; lv_i += auto85A2A91D_ai ) {
  2127. PlayerModifyPropertyInt(lv_i, c_playerPropMinerals, c_playerPropOperAdd, 400);
  2128. }
  2129. gf_CopyLeftBot(1, PointFromId(2), PointFromId(19));
  2130. gf_CopyLeftTop(4, PointFromId(5), PointFromId(26));
  2131. gf_CopyRightBot(2, PointFromId(3), PointFromId(23));
  2132. gf_CopyRightTop(3, PointFromId(4), PointFromId(22));
  2133. gf_CopyRotateBotLeft(5, PointFromId(6), PointFromId(20));
  2134. gf_CopyRotateBotRight(8, PointFromId(9), PointFromId(24));
  2135. gf_CopyRotateTopLeft(6, PointFromId(7), PointFromId(25));
  2136. gf_CopyRotateTopRight(7, PointFromId(8), PointFromId(21));
  2137. UnitPauseAll(true);
  2138. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(6), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(6))), c_orderQueueReplace);
  2139. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(3), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(3))), c_orderQueueReplace);
  2140. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(4), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(4))), c_orderQueueReplace);
  2141. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(5), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(5))), c_orderQueueReplace);
  2142. UnitPauseAll(false);
  2143. gv_nC3A4chsteRunde = 4;
  2144. Wait(30.0, c_timeReal);
  2145. TriggerExecute(gt_AntiIdle, true, false);
  2146. return true;
  2147. }
  2148.  
  2149. //--------------------------------------------------------------------------------------------------
  2150. void gt_Round3_Init () {
  2151. gt_Round3 = TriggerCreate("gt_Round3_Func");
  2152. }
  2153.  
  2154. //--------------------------------------------------------------------------------------------------
  2155. // Trigger: Round4
  2156. //--------------------------------------------------------------------------------------------------
  2157. bool gt_Round4_Func (bool testConds, bool runActions) {
  2158. int auto861D76DE_ae;
  2159. int auto861D76DE_ai;
  2160.  
  2161. // Variable Declarations
  2162. int lv_i;
  2163.  
  2164. // Variable Initialization
  2165.  
  2166. // Actions
  2167. if (!runActions) {
  2168. return true;
  2169. }
  2170.  
  2171. auto861D76DE_ae = 8;
  2172. auto861D76DE_ai = 1;
  2173. lv_i = 1;
  2174. for ( ; ( (auto861D76DE_ai >= 0 && lv_i <= auto861D76DE_ae) || (auto861D76DE_ai <= 0 && lv_i >= auto861D76DE_ae) ) ; lv_i += auto861D76DE_ai ) {
  2175. PlayerModifyPropertyInt(lv_i, c_playerPropMinerals, c_playerPropOperAdd, 630);
  2176. }
  2177. gf_CopyLeftBot(1, PointFromId(2), PointFromId(19));
  2178. gf_CopyLeftTop(5, PointFromId(6), PointFromId(26));
  2179. gf_CopyRightBot(2, PointFromId(3), PointFromId(23));
  2180. gf_CopyRightTop(6, PointFromId(7), PointFromId(22));
  2181. gf_CopyRotateBotLeft(3, PointFromId(4), PointFromId(20));
  2182. gf_CopyRotateBotRight(7, PointFromId(8), PointFromId(24));
  2183. gf_CopyRotateTopLeft(4, PointFromId(5), PointFromId(25));
  2184. gf_CopyRotateTopRight(8, PointFromId(9), PointFromId(21));
  2185. UnitPauseAll(true);
  2186. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(6), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(6))), c_orderQueueReplace);
  2187. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(3), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(3))), c_orderQueueReplace);
  2188. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(4), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(4))), c_orderQueueReplace);
  2189. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(5), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(5))), c_orderQueueReplace);
  2190. UnitPauseAll(false);
  2191. gv_nC3A4chsteRunde = 5;
  2192. UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, StringExternal("Param/Value/F0BB2D0B"));
  2193. Wait(30.0, c_timeReal);
  2194. TriggerExecute(gt_AntiIdle, true, false);
  2195. return true;
  2196. }
  2197.  
  2198. //--------------------------------------------------------------------------------------------------
  2199. void gt_Round4_Init () {
  2200. gt_Round4 = TriggerCreate("gt_Round4_Func");
  2201. }
  2202.  
  2203. //--------------------------------------------------------------------------------------------------
  2204. // Trigger: Round6
  2205. //--------------------------------------------------------------------------------------------------
  2206. bool gt_Round6_Func (bool testConds, bool runActions) {
  2207. int autoE3DF8867_ae;
  2208. int autoE3DF8867_ai;
  2209.  
  2210. // Variable Declarations
  2211. int lv_i;
  2212.  
  2213. // Variable Initialization
  2214.  
  2215. // Actions
  2216. if (!runActions) {
  2217. return true;
  2218. }
  2219.  
  2220. TriggerEnable(gt_UnitInMiddledies, true);
  2221. TriggerEnable(gt_UnitinBonusrounddies, false);
  2222. autoE3DF8867_ae = 8;
  2223. autoE3DF8867_ai = 1;
  2224. lv_i = 1;
  2225. for ( ; ( (autoE3DF8867_ai >= 0 && lv_i <= autoE3DF8867_ae) || (autoE3DF8867_ai <= 0 && lv_i >= autoE3DF8867_ae) ) ; lv_i += autoE3DF8867_ai ) {
  2226. PlayerModifyPropertyInt(lv_i, c_playerPropMinerals, c_playerPropOperAdd, 600);
  2227. }
  2228. gf_CopyLeftBot(1, PointFromId(2), PointFromId(19));
  2229. gf_CopyLeftTop(6, PointFromId(7), PointFromId(26));
  2230. gf_CopyRightBot(2, PointFromId(3), PointFromId(23));
  2231. gf_CopyRightTop(7, PointFromId(8), PointFromId(22));
  2232. gf_CopyRotateBotLeft(3, PointFromId(4), PointFromId(20));
  2233. gf_CopyRotateBotRight(8, PointFromId(9), PointFromId(24));
  2234. gf_CopyRotateTopLeft(4, PointFromId(5), PointFromId(25));
  2235. gf_CopyRotateTopRight(5, PointFromId(6), PointFromId(21));
  2236. UnitPauseAll(true);
  2237. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(6), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(6))), c_orderQueueReplace);
  2238. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(3), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(3))), c_orderQueueReplace);
  2239. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(4), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(4))), c_orderQueueReplace);
  2240. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(5), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(5))), c_orderQueueReplace);
  2241. UnitPauseAll(false);
  2242. gv_nC3A4chsteRunde = 7;
  2243. Wait(30.0, c_timeReal);
  2244. TriggerExecute(gt_AntiIdle, true, false);
  2245. return true;
  2246. }
  2247.  
  2248. //--------------------------------------------------------------------------------------------------
  2249. void gt_Round6_Init () {
  2250. gt_Round6 = TriggerCreate("gt_Round6_Func");
  2251. }
  2252.  
  2253. //--------------------------------------------------------------------------------------------------
  2254. // Trigger: Round7
  2255. //--------------------------------------------------------------------------------------------------
  2256. bool gt_Round7_Func (bool testConds, bool runActions) {
  2257. int autoAA3AFB8F_ae;
  2258. int autoAA3AFB8F_ai;
  2259.  
  2260. // Variable Declarations
  2261. int lv_i;
  2262.  
  2263. // Variable Initialization
  2264.  
  2265. // Actions
  2266. if (!runActions) {
  2267. return true;
  2268. }
  2269.  
  2270. autoAA3AFB8F_ae = 8;
  2271. autoAA3AFB8F_ai = 1;
  2272. lv_i = 1;
  2273. for ( ; ( (autoAA3AFB8F_ai >= 0 && lv_i <= autoAA3AFB8F_ae) || (autoAA3AFB8F_ai <= 0 && lv_i >= autoAA3AFB8F_ae) ) ; lv_i += autoAA3AFB8F_ai ) {
  2274. PlayerModifyPropertyInt(lv_i, c_playerPropMinerals, c_playerPropOperAdd, 1000);
  2275. libNtve_gf_SetUpgradeLevelForPlayer(lv_i, "ExtendedThermalLance", 0);
  2276. }
  2277. gf_CopyLeftBot(1, PointFromId(2), PointFromId(19));
  2278. gf_CopyLeftTop(7, PointFromId(8), PointFromId(26));
  2279. gf_CopyRightBot(2, PointFromId(3), PointFromId(23));
  2280. gf_CopyRightTop(8, PointFromId(9), PointFromId(22));
  2281. gf_CopyRotateBotLeft(3, PointFromId(4), PointFromId(20));
  2282. gf_CopyRotateBotRight(5, PointFromId(6), PointFromId(24));
  2283. gf_CopyRotateTopLeft(4, PointFromId(5), PointFromId(25));
  2284. gf_CopyRotateTopRight(6, PointFromId(7), PointFromId(21));
  2285. UnitPauseAll(true);
  2286. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(6), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(6))), c_orderQueueReplace);
  2287. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(3), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(3))), c_orderQueueReplace);
  2288. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(4), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(4))), c_orderQueueReplace);
  2289. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(5), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(5))), c_orderQueueReplace);
  2290. UnitPauseAll(false);
  2291. gv_nC3A4chsteRunde = 8;
  2292. Wait(30.0, c_timeReal);
  2293. TriggerExecute(gt_AntiIdle, true, false);
  2294. return true;
  2295. }
  2296.  
  2297. //--------------------------------------------------------------------------------------------------
  2298. void gt_Round7_Init () {
  2299. gt_Round7 = TriggerCreate("gt_Round7_Func");
  2300. }
  2301.  
  2302. //--------------------------------------------------------------------------------------------------
  2303. // Trigger: Round8
  2304. //--------------------------------------------------------------------------------------------------
  2305. bool gt_Round8_Func (bool testConds, bool runActions) {
  2306. int autoE02A2EE8_ae;
  2307. int autoE02A2EE8_ai;
  2308.  
  2309. // Variable Declarations
  2310. int lv_i;
  2311.  
  2312. // Variable Initialization
  2313.  
  2314. // Actions
  2315. if (!runActions) {
  2316. return true;
  2317. }
  2318.  
  2319. autoE02A2EE8_ae = 8;
  2320. autoE02A2EE8_ai = 1;
  2321. lv_i = 1;
  2322. for ( ; ( (autoE02A2EE8_ai >= 0 && lv_i <= autoE02A2EE8_ae) || (autoE02A2EE8_ai <= 0 && lv_i >= autoE02A2EE8_ae) ) ; lv_i += autoE02A2EE8_ai ) {
  2323. PlayerModifyPropertyInt(lv_i, c_playerPropMinerals, c_playerPropOperAdd, 1000);
  2324. }
  2325. gf_CopyLeftBot(1, PointFromId(2), PointFromId(19));
  2326. gf_CopyLeftTop(8, PointFromId(9), PointFromId(26));
  2327. gf_CopyRightBot(2, PointFromId(3), PointFromId(23));
  2328. gf_CopyRightTop(5, PointFromId(6), PointFromId(22));
  2329. gf_CopyRotateBotLeft(3, PointFromId(4), PointFromId(20));
  2330. gf_CopyRotateBotRight(6, PointFromId(7), PointFromId(24));
  2331. gf_CopyRotateTopLeft(4, PointFromId(5), PointFromId(25));
  2332. gf_CopyRotateTopRight(7, PointFromId(8), PointFromId(21));
  2333. UnitPauseAll(true);
  2334. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(6), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(6))), c_orderQueueReplace);
  2335. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(3), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(3))), c_orderQueueReplace);
  2336. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(4), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(4))), c_orderQueueReplace);
  2337. UnitGroupIssueOrder(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(5), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), OrderTargetingPoint(AbilityCommand("attack", 0), RegionGetCenter(RegionFromId(5))), c_orderQueueReplace);
  2338. UnitPauseAll(false);
  2339. gv_nC3A4chsteRunde = 9;
  2340. UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, StringExternal("Param/Value/AB060DB1"));
  2341. Wait(30.0, c_timeReal);
  2342. TriggerExecute(gt_AntiIdle, true, false);
  2343. return true;
  2344. }
  2345.  
  2346. //--------------------------------------------------------------------------------------------------
  2347. void gt_Round8_Init () {
  2348. gt_Round8 = TriggerCreate("gt_Round8_Func");
  2349. }
  2350.  
  2351. //--------------------------------------------------------------------------------------------------
  2352. // Trigger: Killall
  2353. //--------------------------------------------------------------------------------------------------
  2354. bool gt_Killall_Func (bool testConds, bool runActions) {
  2355. // Actions
  2356. if (!runActions) {
  2357. return true;
  2358. }
  2359.  
  2360. UnitIssueOrder(UnitFromId(119), Order(AbilityCommand("EnergyNova", 0)), c_orderQueueReplace);
  2361. TriggerExecute(gt_DestroyDialog, true, false);
  2362. return true;
  2363. }
  2364.  
  2365. //--------------------------------------------------------------------------------------------------
  2366. void gt_Killall_Init () {
  2367. gt_Killall = TriggerCreate("gt_Killall_Func");
  2368. }
  2369.  
  2370. //--------------------------------------------------------------------------------------------------
  2371. // Trigger: Anti-Idle
  2372. //--------------------------------------------------------------------------------------------------
  2373. bool gt_AntiIdle_Func (bool testConds, bool runActions) {
  2374. // Actions
  2375. if (!runActions) {
  2376. return true;
  2377. }
  2378.  
  2379. UnitGroupLoopBegin(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(11), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
  2380. for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
  2381. UnitIssueOrder(UnitGroupLoopCurrent(), OrderTargetingPoint(AbilityCommand("attack", 0), PointFromId(1)), c_orderQueueAddToEnd);
  2382. }
  2383. UnitGroupLoopEnd();
  2384. UnitGroupLoopBegin(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(9), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
  2385. for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
  2386. UnitIssueOrder(UnitGroupLoopCurrent(), OrderTargetingPoint(AbilityCommand("attack", 0), PointFromId(1)), c_orderQueueAddToEnd);
  2387. }
  2388. UnitGroupLoopEnd();
  2389. UnitGroupLoopBegin(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(10), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
  2390. for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
  2391. UnitIssueOrder(UnitGroupLoopCurrent(), OrderTargetingPoint(AbilityCommand("attack", 0), PointFromId(1)), c_orderQueueAddToEnd);
  2392. }
  2393. UnitGroupLoopEnd();
  2394. UnitGroupLoopBegin(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(12), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
  2395. for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
  2396. UnitIssueOrder(UnitGroupLoopCurrent(), OrderTargetingPoint(AbilityCommand("attack", 0), PointFromId(1)), c_orderQueueAddToEnd);
  2397. }
  2398. UnitGroupLoopEnd();
  2399. UnitGroupLoopBegin(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(8), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
  2400. for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
  2401. UnitIssueOrder(UnitGroupLoopCurrent(), OrderTargetingPoint(AbilityCommand("attack", 0), PointFromId(1)), c_orderQueueAddToEnd);
  2402. }
  2403. UnitGroupLoopEnd();
  2404. return true;
  2405. }
  2406.  
  2407. //--------------------------------------------------------------------------------------------------
  2408. void gt_AntiIdle_Init () {
  2409. gt_AntiIdle = TriggerCreate("gt_AntiIdle_Func");
  2410. TriggerAddEventTimePeriodic(gt_AntiIdle, 20.0, c_timeReal);
  2411. }
  2412.  
  2413. //--------------------------------------------------------------------------------------------------
  2414. // Trigger: Unit In Middle dies
  2415. //--------------------------------------------------------------------------------------------------
  2416. bool gt_UnitInMiddledies_Func (bool testConds, bool runActions) {
  2417. // Variable Declarations
  2418. int lv_n;
  2419.  
  2420. // Variable Initialization
  2421.  
  2422. // Conditions
  2423. if (testConds) {
  2424. if (!(((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(7)) == true) && (UnitGetOwner(libNtve_gf_KillingUnit()) != 15)))) {
  2425. return false;
  2426. }
  2427. }
  2428.  
  2429. // Actions
  2430. if (!runActions) {
  2431. return true;
  2432. }
  2433.  
  2434. TriggerExecute(gt_DestroyDialog, true, false);
  2435. lv_n = 0;
  2436. if ((gf_getlivingplayers() == 1)) {
  2437. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, (StringExternal("Param/Value/1A1EA7AB") + IntToText(libNtve_gf_KillingPlayer())));
  2438. TriggerExecute(gt_Killall, true, true);
  2439. Wait(0.5, c_timeReal);
  2440. gv_kills[libNtve_gf_KillingPlayer()] += libNtve_gf_UnitGetPropertyKills(UnitFromId(119), c_unitPropCurrent);
  2441. UnitSetPropertyFixed(UnitFromId(119), c_unitPropKills, 0.0);
  2442. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, (StringExternal("Param/Value/75D60C18") + IntToText(gv_kills[libNtve_gf_KillingPlayer()])));
  2443. TriggerExecute(gt_DestroyDialog, true, false);
  2444. gf_startTimer(30, gv_nC3A4chsteRunde);
  2445. }
  2446. else {
  2447. }
  2448. return true;
  2449. }
  2450.  
  2451. //--------------------------------------------------------------------------------------------------
  2452. void gt_UnitInMiddledies_Init () {
  2453. gt_UnitInMiddledies = TriggerCreate("gt_UnitInMiddledies_Func");
  2454. TriggerAddEventUnitDied(gt_UnitInMiddledies, null);
  2455. }
  2456.  
  2457. //--------------------------------------------------------------------------------------------------
  2458. // Trigger: CreateBank
  2459. //--------------------------------------------------------------------------------------------------
  2460. bool gt_CreateBank_Func (bool testConds, bool runActions) {
  2461. int autoD1852FA5_ae;
  2462. int autoD1852FA5_ai;
  2463.  
  2464. // Variable Declarations
  2465. string lv_hashcode;
  2466. int lv_i;
  2467. int lv_true;
  2468.  
  2469. // Variable Initialization
  2470. lv_hashcode = "";
  2471.  
  2472. // Actions
  2473. if (!runActions) {
  2474. return true;
  2475. }
  2476.  
  2477. autoD1852FA5_ae = 8;
  2478. autoD1852FA5_ai = 1;
  2479. lv_i = 1;
  2480. for ( ; ( (autoD1852FA5_ai >= 0 && lv_i <= autoD1852FA5_ae) || (autoD1852FA5_ai <= 0 && lv_i >= autoD1852FA5_ae) ) ; lv_i += autoD1852FA5_ai ) {
  2481. if ((PlayerType(lv_i) == c_playerTypeUser)) {
  2482. BankLoad("BloodTournament", lv_i);
  2483. BankOptionSet(BankLastCreated(), c_bankOptionSignature, true);
  2484. BankSectionCreate(BankLastCreated(), "Stats");
  2485. BankSectionCreate(BankLastCreated(), "Achivement");
  2486. BankSectionCreate(BankLastCreated(), "Security");
  2487. BankSectionCreate(BankLastCreated(), "Random_Stuff");
  2488. BankValueSetFromString(BankLastCreated(), "Random_Stuff", "ID", PlayerHandle(lv_i));
  2489. gv_bank[lv_i] = BankLastCreated();
  2490. gv_bank_wins[lv_i] = BankValueGetAsInt(gv_bank[lv_i], "Stats", "Wins");
  2491. gv_bank_loses[lv_i] = BankValueGetAsInt(gv_bank[lv_i], "Stats", "Loses");
  2492. gv_bank_kills[lv_i] = BankValueGetAsInt(gv_bank[lv_i], "Stats", "Kills");
  2493. gv_bank_wins_sec[lv_i] = BankValueGetAsString(gv_bank[lv_i], "Security", "Wins");
  2494. gv_bank_loses_sec[lv_i] = BankValueGetAsString(gv_bank[lv_i], "Security", "Loses");
  2495. gv_bank_kills_sec[lv_i] = BankValueGetAsString(gv_bank[lv_i], "Security", "Kills");
  2496. BankValueSetFromInt(BankLastCreated(), "Debug", "Kills", gv_bank_kills[lv_i]);
  2497. BankValueSetFromInt(BankLastCreated(), "Debug", "Loses", gv_bank_loses[lv_i]);
  2498. BankValueSetFromInt(BankLastCreated(), "Debug", "Wins", gv_bank_wins[lv_i]);
  2499. lib1_gf_InitializeHashInput();
  2500. lib1_gf_AddStringToHashInput(gv_bank_code);
  2501. lib1_gf_AddIntegerToHashInput(gv_bank_wins[lv_i]);
  2502. lv_hashcode = lib1_gf_GenerateSHA256HashCode();
  2503. if ((lv_hashcode == gv_bank_wins_sec[lv_i])) {
  2504. }
  2505. else {
  2506. lv_true += 1;
  2507. }
  2508. lib1_gf_InitializeHashInput();
  2509. lib1_gf_AddStringToHashInput(gv_bank_code);
  2510. lib1_gf_AddIntegerToHashInput(gv_bank_loses[lv_i]);
  2511. lv_hashcode = lib1_gf_GenerateSHA256HashCode();
  2512. if ((lv_hashcode == gv_bank_loses_sec[lv_i])) {
  2513. }
  2514. else {
  2515. lv_true += 1;
  2516. }
  2517. lib1_gf_InitializeHashInput();
  2518. lib1_gf_AddStringToHashInput(gv_bank_code);
  2519. lib1_gf_AddIntegerToHashInput(gv_bank_kills[lv_i]);
  2520. lv_hashcode = lib1_gf_GenerateSHA256HashCode();
  2521. if ((lv_hashcode == gv_bank_kills_sec[lv_i])) {
  2522. }
  2523. else {
  2524. lv_true += 1;
  2525. }
  2526. if ((lv_true != 0)) {
  2527. BankSectionRemove(gv_bank[lv_i], "Stats");
  2528. BankSectionRemove(gv_bank[lv_i], "Security");
  2529. BankSectionRemove(gv_bank[lv_i], "Random_Stuff");
  2530. BankSectionRemove(gv_bank[lv_i], "Achivement");
  2531. BankSectionCreate(gv_bank[lv_i], "Stats");
  2532. BankSectionCreate(gv_bank[lv_i], "Achivement");
  2533. BankSectionCreate(gv_bank[lv_i], "Security");
  2534. BankSectionCreate(gv_bank[lv_i], "Random_Stuff");
  2535. }
  2536. else {
  2537. }
  2538. lv_true = 0;
  2539. }
  2540. else {
  2541. UIDisplayMessage(PlayerGroupSingle(lv_i), c_messageAreaChat, StringExternal("Param/Value/328D0FE3"));
  2542. }
  2543. }
  2544. return true;
  2545. }
  2546.  
  2547. //--------------------------------------------------------------------------------------------------
  2548. void gt_CreateBank_Init () {
  2549. gt_CreateBank = TriggerCreate("gt_CreateBank_Func");
  2550. TriggerAddEventMapInit(gt_CreateBank);
  2551. }
  2552.  
  2553. //--------------------------------------------------------------------------------------------------
  2554. // Trigger: SaveBanks
  2555. //--------------------------------------------------------------------------------------------------
  2556. bool gt_SaveBanks_Func (bool testConds, bool runActions) {
  2557. int autoC6D60BBB_ae;
  2558. int autoC6D60BBB_ai;
  2559.  
  2560. // Variable Declarations
  2561. string lv_hash;
  2562. int lv_i;
  2563. int lv_w;
  2564. int lv_l;
  2565.  
  2566. // Variable Initialization
  2567. lv_hash = "";
  2568.  
  2569. // Actions
  2570. if (!runActions) {
  2571. return true;
  2572. }
  2573.  
  2574. autoC6D60BBB_ae = 8;
  2575. autoC6D60BBB_ai = 1;
  2576. lv_i = 1;
  2577. for ( ; ( (autoC6D60BBB_ai >= 0 && lv_i <= autoC6D60BBB_ae) || (autoC6D60BBB_ai <= 0 && lv_i >= autoC6D60BBB_ae) ) ; lv_i += autoC6D60BBB_ai ) {
  2578. if ((PlayerType(lv_i) == c_playerTypeUser)) {
  2579. BankValueSetFromInt(gv_bank[lv_i], "Stats", "Wins", (gv_bank_wins[lv_i] + lv_w));
  2580. BankValueSetFromInt(gv_bank[lv_i], "Stats", "Loses", (gv_bank_loses[lv_i] + lv_l));
  2581. BankValueSetFromInt(gv_bank[lv_i], "Stats", "Kills", (gv_bank_kills[lv_i] + gv_kills[lv_i]));
  2582. lib1_gf_InitializeHashInput();
  2583. lib1_gf_AddStringToHashInput(gv_bank_code);
  2584. lib1_gf_AddIntegerToHashInput((gv_bank_wins[lv_i] + lv_w));
  2585. lv_hash = lib1_gf_GenerateSHA256HashCode();
  2586. BankValueSetFromString(gv_bank[lv_i], "Security", "Wins", lv_hash);
  2587. lib1_gf_InitializeHashInput();
  2588. lib1_gf_AddStringToHashInput(gv_bank_code);
  2589. lib1_gf_AddIntegerToHashInput((gv_bank_loses[lv_i] + lv_l));
  2590. lv_hash = lib1_gf_GenerateSHA256HashCode();
  2591. BankValueSetFromString(gv_bank[lv_i], "Security", "Loses", lv_hash);
  2592. lib1_gf_InitializeHashInput();
  2593. lib1_gf_AddStringToHashInput(gv_bank_code);
  2594. lib1_gf_AddIntegerToHashInput((gv_bank_kills[lv_i] + gv_kills[lv_i]));
  2595. lv_hash = lib1_gf_GenerateSHA256HashCode();
  2596. BankValueSetFromString(gv_bank[lv_i], "Security", "Kills", lv_hash);
  2597. lib1_gf_InitializeHashInput();
  2598. lib1_gf_AddStringToHashInput(gv_bank_code);
  2599. lib1_gf_AddStringToHashInput(PlayerHandle(lv_i));
  2600. lv_hash = lib1_gf_GenerateSHA256HashCode();
  2601. BankValueSetFromString(gv_bank[lv_i], "Security", "ID", lv_hash);
  2602. BankSave(gv_bank[lv_i]);
  2603. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, StringExternal("Param/Value/406D7FDF"));
  2604. }
  2605. else {
  2606. }
  2607. }
  2608. return true;
  2609. }
  2610.  
  2611. //--------------------------------------------------------------------------------------------------
  2612. void gt_SaveBanks_Init () {
  2613. gt_SaveBanks = TriggerCreate("gt_SaveBanks_Func");
  2614. TriggerAddEventChatMessage(gt_SaveBanks, c_playerAny, "-save", true);
  2615. }
  2616.  
  2617. //--------------------------------------------------------------------------------------------------
  2618. // Trigger: -getAlivePlayers
  2619. //--------------------------------------------------------------------------------------------------
  2620. bool gt_getAlivePlayers_Func (bool testConds, bool runActions) {
  2621. int auto005D0F5E_ae;
  2622. int auto005D0F5E_ai;
  2623.  
  2624. // Variable Declarations
  2625. int lv_playersalive;
  2626. int lv_n;
  2627.  
  2628. // Variable Initialization
  2629. lv_playersalive = 8;
  2630.  
  2631. // Actions
  2632. if (!runActions) {
  2633. return true;
  2634. }
  2635.  
  2636. lv_playersalive = 8;
  2637. lv_n = 0;
  2638. auto005D0F5E_ae = 8;
  2639. auto005D0F5E_ai = 1;
  2640. lv_n = 1;
  2641. for ( ; ( (auto005D0F5E_ai >= 0 && lv_n <= auto005D0F5E_ae) || (auto005D0F5E_ai <= 0 && lv_n >= auto005D0F5E_ae) ) ; lv_n += auto005D0F5E_ai ) {
  2642. if ((gf_BonusRoundDead(lv_n) == false)) {
  2643. lv_playersalive -= 1;
  2644. }
  2645. else {
  2646. }
  2647. }
  2648. UIDisplayMessage(PlayerGroupAll(), c_messageAreaDirective, IntToText(lv_playersalive));
  2649. return true;
  2650. }
  2651.  
  2652. //--------------------------------------------------------------------------------------------------
  2653. void gt_getAlivePlayers_Init () {
  2654. gt_getAlivePlayers = TriggerCreate("gt_getAlivePlayers_Func");
  2655. TriggerAddEventChatMessage(gt_getAlivePlayers, c_playerAny, "-getaliveplayers", true);
  2656. }
  2657.  
  2658. //--------------------------------------------------------------------------------------------------
  2659. // Trigger: -testtextpos
  2660. //--------------------------------------------------------------------------------------------------
  2661. bool gt_testtextpos_Func (bool testConds, bool runActions) {
  2662. // Actions
  2663. if (!runActions) {
  2664. return true;
  2665. }
  2666.  
  2667. UIDisplayMessage(PlayerGroupSingle(EventPlayer()), c_messageAreaDirective, StringExternal("Param/Value/245D6B09"));
  2668. UIDisplayMessage(PlayerGroupSingle(EventPlayer()), c_messageAreaChat, StringExternal("Param/Value/93A20E9F"));
  2669. UIDisplayMessage(PlayerGroupSingle(EventPlayer()), c_messageAreaCheat, StringExternal("Param/Value/B4CC993B"));
  2670. UIDisplayMessage(PlayerGroupSingle(EventPlayer()), c_messageAreaDebug, StringExternal("Param/Value/84C5780A"));
  2671. UIDisplayMessage(PlayerGroupSingle(EventPlayer()), c_messageAreaError, StringExternal("Param/Value/6EDD504E"));
  2672. UIDisplayMessage(PlayerGroupSingle(EventPlayer()), c_messageAreaSubtitle, StringExternal("Param/Value/FD882DE6"));
  2673. UIDisplayMessage(PlayerGroupSingle(EventPlayer()), c_messageAreaCinematic, StringExternal("Param/Value/FD65577B"));
  2674. UIDisplayMessage(PlayerGroupSingle(EventPlayer()), c_messageAreaWarning, StringExternal("Param/Value/8AD7F4D2"));
  2675. UIDisplayMessage(PlayerGroupSingle(EventPlayer()), c_messageAreaObjective, StringExternal("Param/Value/4C49BD86"));
  2676. return true;
  2677. }
  2678.  
  2679. //--------------------------------------------------------------------------------------------------
  2680. void gt_testtextpos_Init () {
  2681. gt_testtextpos = TriggerCreate("gt_testtextpos_Func");
  2682. TriggerAddEventChatMessage(gt_testtextpos, c_playerAny, "-testtextpos", true);
  2683. }
  2684.  
  2685. //--------------------------------------------------------------------------------------------------
  2686. // Trigger: Unstuck
  2687. //--------------------------------------------------------------------------------------------------
  2688. bool gt_Unstuck_Func (bool testConds, bool runActions) {
  2689. // Actions
  2690. if (!runActions) {
  2691. return true;
  2692. }
  2693.  
  2694. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, StringExternal("Param/Value/5DC4751A"));
  2695. if ((gv_playerunstucks[EventPlayer()] == false)) {
  2696. gv_playerunstucks[EventPlayer()] = true;
  2697. gv_unstucks += 1;
  2698. if ((gv_unstucks >= RoundI((IntToFixed(PlayerGroupCount(PlayerGroupAlliance(c_playerGroupEnemy, 1))) / 2.0)))) {
  2699. TriggerExecute(gt_AntiIdle, true, false);
  2700. gv_unstucks = 0;
  2701. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, StringExternal("Param/Value/B6B8581B"));
  2702. gv_playerunstucks[1] = false;
  2703. gv_playerunstucks[2] = false;
  2704. gv_playerunstucks[3] = false;
  2705. gv_playerunstucks[4] = false;
  2706. gv_playerunstucks[5] = false;
  2707. gv_playerunstucks[6] = false;
  2708. gv_playerunstucks[7] = false;
  2709. gv_playerunstucks[8] = false;
  2710. }
  2711. else {
  2712. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, (IntToText(gv_unstucks) + StringExternal("Param/Value/046C7A0E")));
  2713. }
  2714. }
  2715. else {
  2716. }
  2717. return true;
  2718. }
  2719.  
  2720. //--------------------------------------------------------------------------------------------------
  2721. void gt_Unstuck_Init () {
  2722. gt_Unstuck = TriggerCreate("gt_Unstuck_Func");
  2723. TriggerAddEventChatMessage(gt_Unstuck, c_playerAny, "-unstuck", true);
  2724. }
  2725.  
  2726. //--------------------------------------------------------------------------------------------------
  2727. // Trigger: -beta
  2728. //--------------------------------------------------------------------------------------------------
  2729. bool gt_beta_Func (bool testConds, bool runActions) {
  2730. // Actions
  2731. if (!runActions) {
  2732. return true;
  2733. }
  2734.  
  2735. if (((PlayerHandle(EventPlayer()) == "2-S2-1-1749687") || (PlayerHandle(EventPlayer()) == "2-S2-1-2359579") || (PlayerHandle(EventPlayer()) == "2-S2-1-1557643") || (PlayerHandle(EventPlayer()) == "2-S2-1-1903968") || (GameIsOnline() == false))) {
  2736. gv_betatester[EventPlayer()] = true;
  2737. UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, StringExternal("Param/Value/E3F45CB3"));
  2738. HelpPanelAddTip(PlayerGroupSingle(EventPlayer()), libNtve_gf_FormatTipTitle(StringExternal("Param/Value/3627DA5E"), 4), StringExternal("Param/Value/C9271509"), StringExternal("Param/Value/AAAF54A7"), "Assets\\Textures\\btn-upgrade-protoss-groundweaponslevel3.dds");
  2739. }
  2740. else {
  2741. SoundPlay(SoundLink("330mmBarrageCannonsUnMorph", 0), PlayerGroupSingle(EventPlayer()), 100.0, 0.0);
  2742. }
  2743. return true;
  2744. }
  2745.  
  2746. //--------------------------------------------------------------------------------------------------
  2747. void gt_beta_Init () {
  2748. gt_beta = TriggerCreate("gt_beta_Func");
  2749. TriggerAddEventChatMessage(gt_beta, c_playerAny, "-beta", true);
  2750. }
  2751.  
  2752. //--------------------------------------------------------------------------------------------------
  2753. // Trigger: -code
  2754. //--------------------------------------------------------------------------------------------------
  2755. bool gt_code_Func (bool testConds, bool runActions) {
  2756. // Actions
  2757. if (!runActions) {
  2758. return true;
  2759. }
  2760.  
  2761. UIDisplayMessage(PlayerGroupSingle(EventPlayer()), c_messageAreaChat, StringToText(PlayerHandle(EventPlayer())));
  2762. return true;
  2763. }
  2764.  
  2765. //--------------------------------------------------------------------------------------------------
  2766. void gt_code_Init () {
  2767. gt_code = TriggerCreate("gt_code_Func");
  2768. TriggerAddEventChatMessage(gt_code, c_playerAny, "-code", true);
  2769. }
  2770.  
  2771. //--------------------------------------------------------------------------------------------------
  2772. // Trigger: -give
  2773. //--------------------------------------------------------------------------------------------------
  2774. bool gt_give_Func (bool testConds, bool runActions) {
  2775. // Variable Declarations
  2776. int lv_player;
  2777. int lv_amount;
  2778. bool lv_vespine;
  2779.  
  2780. // Variable Initialization
  2781.  
  2782. // Conditions
  2783. if (testConds) {
  2784. if (!((gv_betatester[EventPlayer()] == true))) {
  2785. return false;
  2786. }
  2787. }
  2788.  
  2789. // Actions
  2790. if (!runActions) {
  2791. return true;
  2792. }
  2793.  
  2794. lv_player = StringToInt(StringWord(EventChatMessage(false), 2));
  2795. lv_amount = StringToInt(StringWord(EventChatMessage(false), 3));
  2796. if ((StringWord(EventChatMessage(false), 4) == "V")) {
  2797. PlayerModifyPropertyInt(lv_player, c_playerPropVespene, c_playerPropOperAdd, lv_amount);
  2798. }
  2799. else {
  2800. PlayerModifyPropertyInt(lv_player, c_playerPropMinerals, c_playerPropOperAdd, lv_amount);
  2801. }
  2802. return true;
  2803. }
  2804.  
  2805. //--------------------------------------------------------------------------------------------------
  2806. void gt_give_Init () {
  2807. gt_give = TriggerCreate("gt_give_Func");
  2808. TriggerAddEventChatMessage(gt_give, c_playerAny, "-give", false);
  2809. }
  2810.  
  2811. //--------------------------------------------------------------------------------------------------
  2812. // Trigger: -kick
  2813. //--------------------------------------------------------------------------------------------------
  2814. bool gt_kick_Func (bool testConds, bool runActions) {
  2815. // Conditions
  2816. if (testConds) {
  2817. if (!((gv_betatester[EventPlayer()] == true))) {
  2818. return false;
  2819. }
  2820. }
  2821.  
  2822. // Actions
  2823. if (!runActions) {
  2824. return true;
  2825. }
  2826.  
  2827. GameOver(StringToInt(StringWord(EventChatMessage(false), 2)), c_gameOverDefeat, false, false);
  2828. UIDisplayMessage(PlayerGroupAll(), c_messageAreaWarning, (PlayerName(StringToInt(StringWord(EventChatMessage(false), 2))) + StringExternal("Param/Value/BD680F96")));
  2829. return true;
  2830. }
  2831.  
  2832. //--------------------------------------------------------------------------------------------------
  2833. void gt_kick_Init () {
  2834. gt_kick = TriggerCreate("gt_kick_Func");
  2835. TriggerAddEventChatMessage(gt_kick, c_playerAny, "-kick", false);
  2836. }
  2837.  
  2838. //--------------------------------------------------------------------------------------------------
  2839. // Trigger: -resetBank
  2840. //--------------------------------------------------------------------------------------------------
  2841. bool gt_resetBank_Func (bool testConds, bool runActions) {
  2842. // Conditions
  2843. if (testConds) {
  2844. if (!(((PlayerHandle(EventPlayer()) == "2-S2-1-1749687") || (PlayerHandle(EventPlayer()) == "2-S2-1-1903968")))) {
  2845. return false;
  2846. }
  2847. }
  2848.  
  2849. // Actions
  2850. if (!runActions) {
  2851. return true;
  2852. }
  2853.  
  2854. gv_banktoreset = StringToInt(StringWord(EventChatMessage(false), 2));
  2855. gv_invocer = EventPlayer();
  2856. gv_texttotypein = (PlayerHandle(gv_banktoreset) + IntToString(gv_invocer));
  2857. UIDisplayMessage(PlayerGroupSingle(EventPlayer()), c_messageAreaChat, (StringExternal("Param/Value/4FED955C") + (StringToText(gv_texttotypein) + StringExternal("Param/Value/C5A94878"))));
  2858. UIDisplayMessage(PlayerGroupSingle(EventPlayer()), c_messageAreaChat, StringExternal("Param/Value/08A59D38"));
  2859. return true;
  2860. }
  2861.  
  2862. //--------------------------------------------------------------------------------------------------
  2863. void gt_resetBank_Init () {
  2864. gt_resetBank = TriggerCreate("gt_resetBank_Func");
  2865. TriggerAddEventChatMessage(gt_resetBank, c_playerAny, "-resetBank", false);
  2866. }
  2867.  
  2868. //--------------------------------------------------------------------------------------------------
  2869. // Trigger: shure
  2870. //--------------------------------------------------------------------------------------------------
  2871. bool gt_shure_Func (bool testConds, bool runActions) {
  2872. // Conditions
  2873. if (testConds) {
  2874. if (!((PlayerHandle(EventPlayer()) == "2-S2-1-1749687"))) {
  2875. return false;
  2876. }
  2877.  
  2878. if (!((EventChatMessage(false) == gv_texttotypein))) {
  2879. return false;
  2880. }
  2881.  
  2882. if (!((PlayerHandle(EventPlayer()) == "2-S2-1-1903968"))) {
  2883. return false;
  2884. }
  2885. }
  2886.  
  2887. // Actions
  2888. if (!runActions) {
  2889. return true;
  2890. }
  2891.  
  2892. BankSectionRemove(gv_bank[gv_banktoreset], "Stats");
  2893. BankSectionRemove(gv_bank[gv_banktoreset], "Achivement");
  2894. BankSectionRemove(gv_bank[gv_banktoreset], "Security");
  2895. BankSectionRemove(gv_bank[gv_banktoreset], "Random_Stuff");
  2896. UIDisplayMessage(PlayerGroupSingle(EventPlayer()), c_messageAreaChat, StringExternal("Param/Value/651ABCAE"));
  2897. BankSave(gv_bank[gv_banktoreset]);
  2898. return true;
  2899. }
  2900.  
  2901. //--------------------------------------------------------------------------------------------------
  2902. void gt_shure_Init () {
  2903. gt_shure = TriggerCreate("gt_shure_Func");
  2904. TriggerAddEventChatMessage(gt_shure, c_playerAny, "", false);
  2905. }
  2906.  
  2907. //--------------------------------------------------------------------------------------------------
  2908. // Trigger: -id
  2909. //--------------------------------------------------------------------------------------------------
  2910. bool gt_id_Func (bool testConds, bool runActions) {
  2911. // Actions
  2912. if (!runActions) {
  2913. return true;
  2914. }
  2915.  
  2916. UIDisplayMessage(PlayerGroupSingle(EventPlayer()), c_messageAreaChat, (StringExternal("Param/Value/FDCD1AA1") + StringToText(PlayerHandle(EventPlayer()))));
  2917. return true;
  2918. }
  2919.  
  2920. //--------------------------------------------------------------------------------------------------
  2921. void gt_id_Init () {
  2922. gt_id = TriggerCreate("gt_id_Func");
  2923. TriggerAddEventChatMessage(gt_id, c_playerAny, "-id", true);
  2924. }
  2925.  
  2926. //--------------------------------------------------------------------------------------------------
  2927. // Trigger: CreateDialog
  2928. //--------------------------------------------------------------------------------------------------
  2929. bool gt_CreateDialog_Func (bool testConds, bool runActions) {
  2930. int autoDD41E6D1_ae;
  2931. int autoDD41E6D1_ai;
  2932.  
  2933. // Variable Declarations
  2934. int lv_i;
  2935.  
  2936. // Variable Initialization
  2937. lv_i = 1;
  2938.  
  2939. // Actions
  2940. if (!runActions) {
  2941. return true;
  2942. }
  2943.  
  2944. DialogCreate(500, 400, c_anchorBottomRight, 0, 0, true);
  2945. gv_killDialogfenster = DialogLastCreated();
  2946. DialogSetImage(gv_killDialogfenster, "Assets\\Textures\\blank.dds");
  2947. autoDD41E6D1_ae = 8;
  2948. autoDD41E6D1_ai = 1;
  2949. lv_i = 1;
  2950. for ( ; ( (autoDD41E6D1_ai >= 0 && lv_i <= autoDD41E6D1_ae) || (autoDD41E6D1_ai <= 0 && lv_i >= autoDD41E6D1_ae) ) ; lv_i += autoDD41E6D1_ai ) {
  2951. libNtve_gf_CreateDialogItemLabel(gv_killDialogfenster, 50, 50, c_anchorTopLeft, 50, (50 - (50 * lv_i)), ((PlayerName(lv_i) + StringExternal("Param/Value/A99E6FCA")) + (IntToText(gv_kills[lv_i]) + StringExternal("Param/Value/583DDDD4"))), ColorWithAlpha(0,0,0,0), false, 0.0);
  2952. gv_killDialoggegenstand[lv_i] = DialogControlLastCreated();
  2953. }
  2954. DialogSetVisible(gv_killDialogfenster, PlayerGroupAll(), true);
  2955. return true;
  2956. }
  2957.  
  2958. //--------------------------------------------------------------------------------------------------
  2959. void gt_CreateDialog_Init () {
  2960. gt_CreateDialog = TriggerCreate("gt_CreateDialog_Func");
  2961. TriggerAddEventMapInit(gt_CreateDialog);
  2962. }
  2963.  
  2964. //--------------------------------------------------------------------------------------------------
  2965. // Trigger: DestroyDialog
  2966. //--------------------------------------------------------------------------------------------------
  2967. bool gt_DestroyDialog_Func (bool testConds, bool runActions) {
  2968. // Actions
  2969. if (!runActions) {
  2970. return true;
  2971. }
  2972.  
  2973. DialogDestroy(gv_killDialogfenster);
  2974. TriggerExecute(gt_CreateDialog, true, false);
  2975. return true;
  2976. }
  2977.  
  2978. //--------------------------------------------------------------------------------------------------
  2979. void gt_DestroyDialog_Init () {
  2980. gt_DestroyDialog = TriggerCreate("gt_DestroyDialog_Func");
  2981. }
  2982.  
  2983. //--------------------------------------------------------------------------------------------------
  2984. // Trigger: Global Ini
  2985. //--------------------------------------------------------------------------------------------------
  2986. bool gt_GlobalIni_Func (bool testConds, bool runActions) {
  2987. int autoDD765298_ae;
  2988. int autoDD765298_ai;
  2989.  
  2990. // Variable Declarations
  2991. int lv_i;
  2992.  
  2993. // Variable Initialization
  2994.  
  2995. // Actions
  2996. if (!runActions) {
  2997. return true;
  2998. }
  2999.  
  3000. autoDD765298_ae = 9;
  3001. autoDD765298_ai = 1;
  3002. lv_i = 1;
  3003. for ( ; ( (autoDD765298_ai >= 0 && lv_i <= autoDD765298_ae) || (autoDD765298_ai <= 0 && lv_i >= autoDD765298_ae) ) ; lv_i += autoDD765298_ai ) {
  3004. VisRevealArea(lv_i, RegionEntireMap(), 0.0, false);
  3005. PlayerModifyPropertyInt(1, c_playerPropMinerals, c_playerPropOperSetTo, 1000);
  3006. libNtve_gf_SetUpgradeLevelForPlayer(lv_i, "ExtendedThermalLance", 1);
  3007. }
  3008. return true;
  3009. }
  3010.  
  3011. //--------------------------------------------------------------------------------------------------
  3012. void gt_GlobalIni_Init () {
  3013. gt_GlobalIni = TriggerCreate("gt_GlobalIni_Func");
  3014. TriggerAddEventMapInit(gt_GlobalIni);
  3015. }
  3016.  
  3017. //--------------------------------------------------------------------------------------------------
  3018. // Trigger: Anti-MoveafterBuild
  3019. //--------------------------------------------------------------------------------------------------
  3020. bool gt_AntiMoveafterBuild_Func (bool testConds, bool runActions) {
  3021. // Actions
  3022. if (!runActions) {
  3023. return true;
  3024. }
  3025.  
  3026. UnitBehaviorAdd(EventUnit(), "Invulnerable", UnitFromId(119), 1);
  3027. Wait(2.0, c_timeReal);
  3028. libNtve_gf_PauseUnit(EventUnit(), true);
  3029. return true;
  3030. }
  3031.  
  3032. //--------------------------------------------------------------------------------------------------
  3033. void gt_AntiMoveafterBuild_Init () {
  3034. gt_AntiMoveafterBuild = TriggerCreate("gt_AntiMoveafterBuild_Func");
  3035. TriggerAddEventUnitRegion(gt_AntiMoveafterBuild, null, RegionFromId(15), true);
  3036. TriggerAddEventUnitRegion(gt_AntiMoveafterBuild, null, RegionFromId(16), true);
  3037. TriggerAddEventUnitRegion(gt_AntiMoveafterBuild, null, RegionFromId(13), true);
  3038. TriggerAddEventUnitRegion(gt_AntiMoveafterBuild, null, RegionFromId(14), true);
  3039. }
  3040.  
  3041. //--------------------------------------------------------------------------------------------------
  3042. // Trigger: Kill Noob
  3043. //--------------------------------------------------------------------------------------------------
  3044. bool gt_KillNoob_Func (bool testConds, bool runActions) {
  3045. // Variable Declarations
  3046. int lv_i;
  3047.  
  3048. // Variable Initialization
  3049.  
  3050. // Conditions
  3051. if (testConds) {
  3052. if (!((UnitGetType(EventUnit()) != "Larva"))) {
  3053. return false;
  3054. }
  3055.  
  3056. if (!((UnitGetType(EventUnit()) != "Pylon"))) {
  3057. return false;
  3058. }
  3059. }
  3060.  
  3061. // Actions
  3062. if (!runActions) {
  3063. return true;
  3064. }
  3065.  
  3066. lv_i += 1;
  3067. if ((UnitGetOwner(EventUnit()) == 1)) {
  3068. UnitKill(UnitFromId(78));
  3069. }
  3070. else if ((UnitGetOwner(EventUnit()) == 2)) {
  3071. UnitKill(UnitFromId(79));
  3072. }
  3073. else if ((UnitGetOwner(EventUnit()) == 3)) {
  3074. UnitKill(UnitFromId(80));
  3075. }
  3076. else if ((UnitGetOwner(EventUnit()) == 4)) {
  3077. UnitKill(UnitFromId(81));
  3078. }
  3079. else if ((UnitGetOwner(EventUnit()) == 5)) {
  3080. UnitKill(UnitFromId(82));
  3081. }
  3082. else if ((UnitGetOwner(EventUnit()) == 6)) {
  3083. UnitKill(UnitFromId(83));
  3084. }
  3085. else if ((UnitGetOwner(EventUnit()) == 7)) {
  3086. UnitKill(UnitFromId(84));
  3087. }
  3088. else if ((UnitGetOwner(EventUnit()) == 8)) {
  3089. UnitKill(UnitFromId(85));
  3090. }
  3091. if ((lv_i == 8)) {
  3092. TriggerEnable(TriggerGetCurrent(), false);
  3093. }
  3094. else {
  3095. }
  3096. return true;
  3097. }
  3098.  
  3099. //--------------------------------------------------------------------------------------------------
  3100. void gt_KillNoob_Init () {
  3101. gt_KillNoob = TriggerCreate("gt_KillNoob_Func");
  3102. TriggerAddEventUnitRegion(gt_KillNoob, null, RegionFromId(13), true);
  3103. TriggerAddEventUnitRegion(gt_KillNoob, null, RegionFromId(15), true);
  3104. TriggerAddEventUnitRegion(gt_KillNoob, null, RegionFromId(16), true);
  3105. TriggerAddEventUnitRegion(gt_KillNoob, null, RegionFromId(14), true);
  3106. }
  3107.  
  3108. //--------------------------------------------------------------------------------------------------
  3109. // Trigger: Anti-MoveafterWavestart
  3110. //--------------------------------------------------------------------------------------------------
  3111. bool gt_AntiMoveafterWavestart_Func (bool testConds, bool runActions) {
  3112. // Actions
  3113. if (!runActions) {
  3114. return true;
  3115. }
  3116.  
  3117. UnitGroupLoopBegin(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(16), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
  3118. for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
  3119. libNtve_gf_PauseUnit(UnitGroupLoopCurrent(), true);
  3120. }
  3121. UnitGroupLoopEnd();
  3122. UnitGroupLoopBegin(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(15), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
  3123. for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
  3124. libNtve_gf_PauseUnit(UnitGroupLoopCurrent(), true);
  3125. }
  3126. UnitGroupLoopEnd();
  3127. UnitGroupLoopBegin(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(13), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
  3128. for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
  3129. libNtve_gf_PauseUnit(UnitGroupLoopCurrent(), true);
  3130. }
  3131. UnitGroupLoopEnd();
  3132. UnitGroupLoopBegin(UnitGroupAlliance(c_playerAny, c_unitAllianceAny, RegionFromId(14), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
  3133. for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
  3134. libNtve_gf_PauseUnit(UnitGroupLoopCurrent(), true);
  3135. }
  3136. UnitGroupLoopEnd();
  3137. return true;
  3138. }
  3139.  
  3140. //--------------------------------------------------------------------------------------------------
  3141. void gt_AntiMoveafterWavestart_Init () {
  3142. gt_AntiMoveafterWavestart = TriggerCreate("gt_AntiMoveafterWavestart_Func");
  3143. }
  3144.  
  3145. //--------------------------------------------------------------------------------------------------
  3146. // Trigger: BanditCrit
  3147. //--------------------------------------------------------------------------------------------------
  3148. bool gt_BanditCrit_Func (bool testConds, bool runActions) {
  3149. // Variable Declarations
  3150. fixed lv_basedmg;
  3151. fixed lv_critdmg;
  3152. fixed lv_fulldmg;
  3153.  
  3154. // Variable Initialization
  3155. lv_basedmg = UnitWeaponDamage(EventUnitDamageSourceUnit(), 1, c_unitAttributeNone, false);
  3156. lv_critdmg = StringToFixed(CatalogFieldValueGet(c_gameCatalogEffect, "BanditCrit", "Amount", EventUnitDamageSourcePlayer()));
  3157. lv_fulldmg = (lv_basedmg + lv_critdmg);
  3158.  
  3159. // Actions
  3160. if (!runActions) {
  3161. return true;
  3162. }
  3163.  
  3164. TextTagCreate(FixedToText(lv_fulldmg, 0), 30, UnitGetPosition(EventUnitDamageSourceUnit()), 1.0, true, false, PlayerGroupAll());
  3165. TextTagSetColor(TextTagLastCreated(), c_textTagColorText, Color(100.00, 0.00, 0.00));
  3166. TextTagSetTime(TextTagLastCreated(), c_textTagTimeDuration, 5.0);
  3167. TextTagSetVelocity(TextTagLastCreated(), 0.5, 90.0);
  3168. TextTagShow(TextTagLastCreated(), PlayerGroupAll(), true);
  3169. return true;
  3170. }
  3171.  
  3172. //--------------------------------------------------------------------------------------------------
  3173. void gt_BanditCrit_Init () {
  3174. gt_BanditCrit = TriggerCreate("gt_BanditCrit_Func");
  3175. TriggerAddEventUnitDamaged(gt_BanditCrit, null, c_unitDamageTypeAny, c_unitDamageEither, "BanditCrit");
  3176. }
  3177.  
  3178. //--------------------------------------------------------------------------------------------------
  3179. // Trigger: KnightDmgReduce
  3180. //--------------------------------------------------------------------------------------------------
  3181. bool gt_KnightDmgReduce_Func (bool testConds, bool runActions) {
  3182. // Conditions
  3183. if (testConds) {
  3184. if (!((UnitGetType(EventUnit()) == "KnightGeneral"))) {
  3185. return false;
  3186. }
  3187. }
  3188.  
  3189. // Actions
  3190. if (!runActions) {
  3191. return true;
  3192. }
  3193.  
  3194. UnitSetPropertyFixed(EventUnit(), c_unitPropLife, (UnitGetPropertyFixed(EventUnit(), c_unitPropLife, c_unitPropCurrent) + (EventUnitDamageAmount() * 0.3)));
  3195. return true;
  3196. }
  3197.  
  3198. //--------------------------------------------------------------------------------------------------
  3199. void gt_KnightDmgReduce_Init () {
  3200. gt_KnightDmgReduce = TriggerCreate("gt_KnightDmgReduce_Func");
  3201. TriggerEnable(gt_KnightDmgReduce, false);
  3202. TriggerAddEventUnitDamaged(gt_KnightDmgReduce, null, c_unitDamageTypeAny, c_unitDamageEither, "Engage");
  3203. }
  3204.  
  3205. //--------------------------------------------------------------------------------------------------
  3206. // Trigger Initialization
  3207. //--------------------------------------------------------------------------------------------------
  3208. void InitTriggers () {
  3209. gt_T1Dies_Init();
  3210. gt_T2Dies_Init();
  3211. gt_T3Dies_Init();
  3212. gt_T4Dies_Init();
  3213. gt_T5Dies_Init();
  3214. gt_Midcleanup_Init();
  3215. gt_UnitinBonusrounddies_Init();
  3216. gt_BonusRound1akaRound5_Init();
  3217. gt_BonusRound2akaRound9_Init();
  3218. gt_QuarterFinal_Init();
  3219. gt_SemiFinal_Init();
  3220. gt_Final_Init();
  3221. gt_KillPylo_Init();
  3222. gt_Vor1_Init();
  3223. gt_Round1_Init();
  3224. gt_Round2_Init();
  3225. gt_Round3_Init();
  3226. gt_Round4_Init();
  3227. gt_Round6_Init();
  3228. gt_Round7_Init();
  3229. gt_Round8_Init();
  3230. gt_Killall_Init();
  3231. gt_AntiIdle_Init();
  3232. gt_UnitInMiddledies_Init();
  3233. gt_CreateBank_Init();
  3234. gt_SaveBanks_Init();
  3235. gt_getAlivePlayers_Init();
  3236. gt_testtextpos_Init();
  3237. gt_Unstuck_Init();
  3238. gt_beta_Init();
  3239. gt_code_Init();
  3240. gt_give_Init();
  3241. gt_kick_Init();
  3242. gt_resetBank_Init();
  3243. gt_shure_Init();
  3244. gt_id_Init();
  3245. gt_CreateDialog_Init();
  3246. gt_DestroyDialog_Init();
  3247. gt_GlobalIni_Init();
  3248. gt_AntiMoveafterBuild_Init();
  3249. gt_KillNoob_Init();
  3250. gt_AntiMoveafterWavestart_Init();
  3251. gt_BanditCrit_Init();
  3252. gt_KnightDmgReduce_Init();
  3253. }
  3254.  
  3255. //--------------------------------------------------------------------------------------------------
  3256. // Map Initialization
  3257. //--------------------------------------------------------------------------------------------------
  3258. void InitMap () {
  3259. InitLibs();
  3260. InitGlobals();
  3261. InitTriggers();
  3262. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement