Advertisement
Guest User

Decompiled

a guest
Jun 27th, 2021
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 131.30 KB | None | 0 0
  1. public PlVers:__version =
  2. {
  3. version = 5,
  4. filevers = "1.10.0.6474",
  5. date = "06/26/2021",
  6. time = "19:09:27"
  7. };
  8. new Float:NULL_VECTOR[3];
  9. new String:NULL_STRING[16];
  10. public Extension:__ext_core =
  11. {
  12. name = "Core",
  13. file = "core",
  14. autoload = 0,
  15. required = 0,
  16. };
  17. new MaxClients;
  18. public Extension:__ext_sdktools =
  19. {
  20. name = "SDKTools",
  21. file = "sdktools.ext",
  22. autoload = 1,
  23. required = 1,
  24. };
  25. public Extension:__ext_sdkhooks =
  26. {
  27. name = "SDKHooks",
  28. file = "sdkhooks.ext",
  29. autoload = 1,
  30. required = 1,
  31. };
  32. public Extension:__ext_regex =
  33. {
  34. name = "Regex Extension",
  35. file = "regex.ext",
  36. autoload = 1,
  37. required = 1,
  38. };
  39. new bool:CSkipList[66];
  40. new Handle:CTrie;
  41. new CTeamColors[3][1];
  42. new TFHoliday:TFHoliday_Birthday;
  43. new TFHoliday:TFHoliday_Halloween;
  44. new TFHoliday:TFHoliday_Christmas;
  45. new TFHoliday:TFHoliday_EndOfTheLine;
  46. new TFHoliday:TFHoliday_CommunityUpdate;
  47. new TFHoliday:TFHoliday_ValentinesDay;
  48. new TFHoliday:TFHoliday_MeetThePyro;
  49. new TFHoliday:TFHoliday_FullMoon;
  50. new TFHoliday:TFHoliday_HalloweenOrFullMoon;
  51. new TFHoliday:TFHoliday_HalloweenOrFullMoonOrValentines;
  52. new TFHoliday:TFHoliday_AprilFools;
  53. public Extension:__ext_tf2 =
  54. {
  55. name = "TF2 Tools",
  56. file = "game.tf2.ext",
  57. autoload = 0,
  58. required = 1,
  59. };
  60. public Extension:__ext_tf2items =
  61. {
  62. name = "TF2Items",
  63. file = "tf2items.ext.2.ep2v",
  64. autoload = 0,
  65. required = 1,
  66. };
  67. public SharedPlugin:__pl_FF2 =
  68. {
  69. name = "freak_fortress_2",
  70. file = "freak_fortress_2.smx",
  71. required = 1,
  72. };
  73. new String:TFResourceNames[][72];
  74. public SharedPlugin:__pl_tf2attributes =
  75. {
  76. name = "tf2attributes",
  77. file = "tf2attributes.smx",
  78. required = 1,
  79. };
  80. new bool:KeyDown[66];
  81. new playerParticle[66];
  82. new SPRITE_INT;
  83. public Plugin:myinfo =
  84. {
  85. name = "ssb_raidpack",
  86. description = "An ability pack for Supreme Spookmaster Bones, designed with raid boss support in mind.",
  87. author = "Spookmaster",
  88. version = "1.0",
  89. url = ""
  90. };
  91. new mortis_Type[66];
  92. new mortis_SmashCount[66];
  93. new mortis_BlockType[66];
  94. new mortis_RemainingSmashes[66];
  95. new numTimers_Mortis[66];
  96. new Float:mortis_Percent[66];
  97. new Float:mortis_Time[66];
  98. new Float:mortis_DMG[66];
  99. new Float:mortis_Radius[66];
  100. new Float:mortis_WarningTime[66];
  101. new Float:mortis_KB[66];
  102. new bool:mortis_FriendlyFire[66];
  103. new bool:mortis_Active[66][66];
  104. new rip_MaxHitsPerTarget[66];
  105. new rip_BlockType[66];
  106. new numTimers_Rip[66];
  107. new rip_ClassAnims[66];
  108. new rip_HitCounter[66][66];
  109. new Float:rip_Duration[66];
  110. new Float:rip_RemainingTime[66];
  111. new Float:rip_DMG[66];
  112. new Float:rip_ContactDMGCD[66];
  113. new Float:rip_KB[66];
  114. new Float:rip_MaxSpeed[66];
  115. new Float:rip_Radius[66];
  116. new bool:rip_IgnoreUber[66];
  117. new bool:rip_CanBeHitByPlayer[66][66];
  118. new String:rip_Model[256][264];
  119. new String:rip_NormalModel[256][264];
  120. new repo_MinionMode[66] =
  121. {
  122. -1, ...
  123. };
  124. new repo_BossIDX[66] =
  125. {
  126. -1, ...
  127. };
  128. new repo_WeaponIndex[66];
  129. new repo_MaxHits[66];
  130. new repo_HitCounter[66];
  131. new repo_BlockType[66];
  132. new numTimers_Repo[66];
  133. new repo_Class[66];
  134. new Float:repo_Duration[66];
  135. new Float:repo_RemainingTime[66];
  136. new Float:repo_HitDMG[66];
  137. new Float:repo_BombTimer[66];
  138. new Float:repo_BombDMG[66];
  139. new Float:repo_BombRadius[66];
  140. new Float:repo_MinionInvuln[66];
  141. new Float:repo_SummonerRadius[66];
  142. new bool:repo_RemoveWearables[66];
  143. new bool:repo_AboutToExplode[66];
  144. new bool:repo_AlreadyHit[66][66];
  145. new String:repo_WeaponName[64][264];
  146. new String:repo_WeaponStats[256][264];
  147. new String:repo_MinionModel[256][264];
  148. new String:repo_HitSound[256][264];
  149. new String:repo_GibSound[256][264];
  150. new chaos_SpamType[66];
  151. new chaos_BlockType[66];
  152. new numTimers_Chaos[66];
  153. new Float:chaos_StunTime[66];
  154. new Float:chaos_InvTime[66];
  155. new Float:chaos_Duration[66];
  156. new Float:chaos_SpellCD[66];
  157. new Float:chaos_DMGMultiplier[66];
  158. new Float:chaos_RemainingTime[66];
  159. new Float:chaos_RemainingUber[66];
  160. new bool:chaos_Active[66];
  161. new bool:chaos_Fireball[66];
  162. new bool:chaos_Orb[66];
  163. new bool:chaos_MIRV[66];
  164. new bool:chaos_Pumpkin[66];
  165. new bool:chaos_Bats[66];
  166. new bool:chaos_Meteor[66];
  167. new bool:chaos_Teleport[66];
  168. new bool:chaos_Monoculus[66];
  169. new bool:chaos_OnCooldown[66];
  170. new String:chaos_HUD[256][264];
  171. new String:chaos_Particle[256][264];
  172. new String:chaos_ParticlePoint[256][264];
  173. new classic_SpamType[66];
  174. new classic_MinionMode[66];
  175. new classic_BossIDX[66];
  176. new classic_WeaponIDX[66];
  177. new classic_BlockType[66];
  178. new numTimers_Classic[66];
  179. new classic_MinionClass[66];
  180. new Float:classic_StunTime[66];
  181. new Float:classic_InvTime[66];
  182. new Float:classic_RemainingUber[66];
  183. new Float:classic_Duration[66];
  184. new Float:classic_RemainingTime[66];
  185. new Float:classic_SpellCD[66];
  186. new Float:classic_MannpowerTime[66];
  187. new Float:classic_MinionInvTime[66];
  188. new Float:classic_DMGMultiplier[66];
  189. new bool:classic_RemoveWearables[66];
  190. new bool:classic_OnCooldown[66];
  191. new bool:classic_Active[66];
  192. new String:classic_MinionModel[256][264];
  193. new String:classic_WeaponName[256][264];
  194. new String:classic_WeaponStats[256][264];
  195. new String:classic_HUD[256][264];
  196. new String:classic_Particle[256][264];
  197. new String:classic_ParticlePoint[256][264];
  198. new ride_MinionCount[66];
  199. new ride_MinionMode[66];
  200. new ride_BossIDX[66];
  201. new ride_WeaponIDX[66];
  202. new ride_BlockType[66];
  203. new ride_Summoner[66];
  204. new ride_MinionClass[66];
  205. new numTimers_Ride[66];
  206. new Float:ride_DMGReduction[66];
  207. new Float:ride_MinionInvTime[66];
  208. new bool:ride_RemoveWearables[66];
  209. new String:ride_MinionModel[256][264];
  210. new String:ride_WeaponName[256][264];
  211. new String:ride_WeaponStats[256][264];
  212. new drain_BlockType[66];
  213. new numTimers_Drain[66];
  214. new Float:drain_Radius[66];
  215. new Float:drain_DMG[66];
  216. new Float:drain_Heal[66];
  217. new Float:drain_Duration[66];
  218. new Float:drain_RemainingTime[66];
  219. new bool:drain_CanOverheal[66];
  220. new String:drain_HUD[256][264];
  221. GetNumTargets(bool:checkAlive, bool:isAlive, bool:checkBoss, bool:isBoss, bool:checkTeam, TFTeam:team, bool:send)
  222. {
  223. new targs;
  224. new i = 1;
  225. while (i <= MaxClients)
  226. {
  227. if (IsValidMulti(i, checkAlive, isAlive, checkBoss, isBoss, checkTeam, team, false))
  228. {
  229. targs++;
  230. }
  231. i++;
  232. }
  233. return targs;
  234. }
  235.  
  236. TFTeam:grabEnemyTeam(client)
  237. {
  238. new TFTeam:targTeam = 2;
  239. if (IsValidClient(client, true, true))
  240. {
  241. new TFTeam:userTeam = TF2_GetClientTeam(client);
  242. if (userTeam == 2)
  243. {
  244. targTeam = 3;
  245. }
  246. }
  247. return targTeam;
  248. }
  249.  
  250. bool:IsValidMulti(client, bool:checkAlive, bool:isAlive, bool:checkBoss, bool:isBoss, bool:checkTeam, TFTeam:team, bool:send)
  251. {
  252. if (IsValidClient(client, true, true))
  253. {
  254. if (checkAlive)
  255. {
  256. new var1;
  257. if (isAlive && IsPlayerAlive(client))
  258. {
  259. if (send)
  260. {
  261. CPrintToChatAll("{red}%N failed the IVM test. Reason: we need them to be alive, but they are not.", client);
  262. }
  263. return 0;
  264. }
  265. new var2;
  266. if (isAlive && IsPlayerAlive(client))
  267. {
  268. if (send)
  269. {
  270. CPrintToChatAll("{red}%N failed the IVM test. Reason: we need them to be dead, but they are not.", client);
  271. }
  272. return 0;
  273. }
  274. }
  275. if (checkBoss)
  276. {
  277. new var3;
  278. if (isBoss && FF2_GetBossIndex(client) == -1)
  279. {
  280. if (send)
  281. {
  282. CPrintToChatAll("{red}%N failed the IVM test. Reason: we need them to be a boss, but they are not.", client);
  283. }
  284. return 0;
  285. }
  286. new var4;
  287. if (isBoss && FF2_GetBossIndex(client) != -1)
  288. {
  289. if (send)
  290. {
  291. CPrintToChatAll("{red}%N failed the IVM test. Reason: we need them to not be a boss, but they are.", client);
  292. }
  293. return 0;
  294. }
  295. }
  296. if (checkTeam)
  297. {
  298. if (team != TF2_GetClientTeam(client))
  299. {
  300. if (send)
  301. {
  302. CPrintToChatAll("{red}%N failed the IVM test. Reason: wrong team.", client);
  303. }
  304. return 0;
  305. }
  306. }
  307. if (send)
  308. {
  309. CPrintToChatAll("{green}%N passed the IVM test!", client);
  310. }
  311. return 1;
  312. }
  313. return 0;
  314. }
  315.  
  316. bool:IsValidClient(client, bool:replaycheck, bool:onlyrealclients)
  317. {
  318. new var1;
  319. if (client <= 0 || client > MaxClients)
  320. {
  321. return 0;
  322. }
  323. if (IsClientInGame(client))
  324. {
  325. if (GetEntProp(client, 0, "m_bIsCoaching", 4, 0))
  326. {
  327. return 0;
  328. }
  329. if (replaycheck)
  330. {
  331. new var2;
  332. if (IsClientSourceTV(client) || IsClientReplay(client))
  333. {
  334. return 0;
  335. }
  336. }
  337. return 1;
  338. }
  339. return 0;
  340. }
  341.  
  342. bool:IsInvuln(client)
  343. {
  344. if (IsValidClient(client, true, true))
  345. {
  346. new var1;
  347. return TF2_IsPlayerInCondition(client, 5) || TF2_IsPlayerInCondition(client, 52) || TF2_IsPlayerInCondition(client, 51) || TF2_IsPlayerInCondition(client, 57) || TF2_IsPlayerInCondition(client, 14) || TF2_IsPlayerInCondition(client, 77) || GetEntProp(client, 1, "m_takedamage", 4, 0);
  348. }
  349. return 1;
  350. }
  351.  
  352. bool:checkFile(fileType, String:file[1024], bool:debug_message)
  353. {
  354. new bool:exists;
  355. new String:path[1024];
  356. switch (fileType)
  357. {
  358. case 0:
  359. {
  360. Format(path, 256, "sound/%s", file[0]);
  361. }
  362. case 1:
  363. {
  364. Format(path, 256, "models/%s", file[0]);
  365. }
  366. case 2:
  367. {
  368. Format(path, 256, "materials/%s", file[0]);
  369. }
  370. default:
  371. {
  372. LogError("Invalid file type (%i) passed to checkFile, returning false.", fileType);
  373. return 0;
  374. }
  375. }
  376. if (FileExists(path, false, "GAME"))
  377. {
  378. exists = true;
  379. }
  380. if (debug_message)
  381. {
  382. if (exists)
  383. {
  384. CPrintToChatAll("{green}%s exists!", path);
  385. }
  386. CPrintToChatAll("{red}%s does not exist.", path);
  387. }
  388. return exists;
  389. }
  390.  
  391. void:RemoveAttachable(client, String:itemName[])
  392. {
  393. new entity;
  394. while ((entity = FindEntityByClassname(entity, itemName[0])) != -1)
  395. {
  396. if (client == GetEntPropEnt(entity, 0, "m_hOwnerEntity", 0))
  397. {
  398. TF2_RemoveWearable(client, entity);
  399. }
  400. }
  401. return 0;
  402. }
  403.  
  404. TF2_GetPlayerMaxHealth(client)
  405. {
  406. return GetEntProp(GetPlayerResourceEntity(), 0, "m_iMaxHealth", 4, client);
  407. }
  408.  
  409. CStrToLower(String:buffer[])
  410. {
  411. new len = strlen(buffer[0]);
  412. new i;
  413. while (i < len)
  414. {
  415. buffer[0][i] = CharToLower(buffer[0][i]);
  416. i++;
  417. }
  418. return 0;
  419. }
  420.  
  421. Handle:InitColorTrie()
  422. {
  423. new Handle:hTrie = CreateTrie();
  424. SetTrieValue(hTrie, "aliceblue", 15792383, true);
  425. SetTrieValue(hTrie, "allies", 5077314, true);
  426. SetTrieValue(hTrie, "ancient", 15420235, true);
  427. SetTrieValue(hTrie, "antiquewhite", 16444375, true);
  428. SetTrieValue(hTrie, "aqua", 65535, true);
  429. SetTrieValue(hTrie, "aquamarine", 8388564, true);
  430. SetTrieValue(hTrie, "arcana", 11396444, true);
  431. SetTrieValue(hTrie, "axis", 16728128, true);
  432. SetTrieValue(hTrie, "azure", 32767, true);
  433. SetTrieValue(hTrie, "beige", 16119260, true);
  434. SetTrieValue(hTrie, "bisque", 16770244, true);
  435. SetTrieValue(hTrie, "black", 0, true);
  436. SetTrieValue(hTrie, "blanchedalmond", 16772045, true);
  437. SetTrieValue(hTrie, "blue", 10079487, true);
  438. SetTrieValue(hTrie, "blueviolet", 9055202, true);
  439. SetTrieValue(hTrie, "brown", 10824234, true);
  440. SetTrieValue(hTrie, "burlywood", 14596231, true);
  441. SetTrieValue(hTrie, "cadetblue", 6266528, true);
  442. SetTrieValue(hTrie, "chartreuse", 8388352, true);
  443. SetTrieValue(hTrie, "chocolate", 13789470, true);
  444. SetTrieValue(hTrie, "collectors", 11141120, true);
  445. SetTrieValue(hTrie, "common", 11584473, true);
  446. SetTrieValue(hTrie, "community", 7385162, true);
  447. SetTrieValue(hTrie, "coral", 16744272, true);
  448. SetTrieValue(hTrie, "cornflowerblue", 6591981, true);
  449. SetTrieValue(hTrie, "cornsilk", 16775388, true);
  450. SetTrieValue(hTrie, "corrupted", 10693678, true);
  451. SetTrieValue(hTrie, "crimson", 14423100, true);
  452. SetTrieValue(hTrie, "cyan", 65535, true);
  453. SetTrieValue(hTrie, "darkblue", 139, true);
  454. SetTrieValue(hTrie, "darkcyan", 35723, true);
  455. SetTrieValue(hTrie, "darkgoldenrod", 12092939, true);
  456. SetTrieValue(hTrie, "darkgray", 11119017, true);
  457. SetTrieValue(hTrie, "darkgrey", 11119017, true);
  458. SetTrieValue(hTrie, "darkgreen", 25600, true);
  459. SetTrieValue(hTrie, "darkkhaki", 12433259, true);
  460. SetTrieValue(hTrie, "darkmagenta", 9109643, true);
  461. SetTrieValue(hTrie, "darkolivegreen", 5597999, true);
  462. SetTrieValue(hTrie, "darkorange", 16747520, true);
  463. SetTrieValue(hTrie, "darkorchid", 10040012, true);
  464. SetTrieValue(hTrie, "darkred", 9109504, true);
  465. SetTrieValue(hTrie, "darksalmon", 15308410, true);
  466. SetTrieValue(hTrie, "darkseagreen", 9419919, true);
  467. SetTrieValue(hTrie, "darkslateblue", 4734347, true);
  468. SetTrieValue(hTrie, "darkslategray", 3100495, true);
  469. SetTrieValue(hTrie, "darkslategrey", 3100495, true);
  470. SetTrieValue(hTrie, "darkturquoise", 52945, true);
  471. SetTrieValue(hTrie, "darkviolet", 9699539, true);
  472. SetTrieValue(hTrie, "deeppink", 16716947, true);
  473. SetTrieValue(hTrie, "deepskyblue", 49151, true);
  474. SetTrieValue(hTrie, "dimgray", 6908265, true);
  475. SetTrieValue(hTrie, "dimgrey", 6908265, true);
  476. SetTrieValue(hTrie, "dodgerblue", 2003199, true);
  477. SetTrieValue(hTrie, "exalted", 13421773, true);
  478. SetTrieValue(hTrie, "firebrick", 11674146, true);
  479. SetTrieValue(hTrie, "floralwhite", 16775920, true);
  480. SetTrieValue(hTrie, "forestgreen", 2263842, true);
  481. SetTrieValue(hTrie, "frozen", 4817843, true);
  482. SetTrieValue(hTrie, "fuchsia", 16711935, true);
  483. SetTrieValue(hTrie, "fullblue", 255, true);
  484. SetTrieValue(hTrie, "fullred", 16711680, true);
  485. SetTrieValue(hTrie, "gainsboro", 14474460, true);
  486. SetTrieValue(hTrie, "genuine", 5076053, true);
  487. SetTrieValue(hTrie, "ghostwhite", 16316671, true);
  488. SetTrieValue(hTrie, "gold", 16766720, true);
  489. SetTrieValue(hTrie, "goldenrod", 14329120, true);
  490. SetTrieValue(hTrie, "gray", 13421772, true);
  491. SetTrieValue(hTrie, "grey", 13421772, true);
  492. SetTrieValue(hTrie, "green", 4128574, true);
  493. SetTrieValue(hTrie, "greenyellow", 11403055, true);
  494. SetTrieValue(hTrie, "haunted", 3732395, true);
  495. SetTrieValue(hTrie, "honeydew", 15794160, true);
  496. SetTrieValue(hTrie, "hotpink", 16738740, true);
  497. SetTrieValue(hTrie, "immortal", 14986803, true);
  498. SetTrieValue(hTrie, "indianred", 13458524, true);
  499. SetTrieValue(hTrie, "indigo", 4915330, true);
  500. SetTrieValue(hTrie, "ivory", 16777200, true);
  501. SetTrieValue(hTrie, "khaki", 15787660, true);
  502. SetTrieValue(hTrie, "lavender", 15132410, true);
  503. SetTrieValue(hTrie, "lavenderblush", 16773365, true);
  504. SetTrieValue(hTrie, "lawngreen", 8190976, true);
  505. SetTrieValue(hTrie, "legendary", 13839590, true);
  506. SetTrieValue(hTrie, "lemonchiffon", 16775885, true);
  507. SetTrieValue(hTrie, "lightblue", 11393254, true);
  508. SetTrieValue(hTrie, "lightcoral", 15761536, true);
  509. SetTrieValue(hTrie, "lightcyan", 14745599, true);
  510. SetTrieValue(hTrie, "lightgoldenrodyellow", 16448210, true);
  511. SetTrieValue(hTrie, "lightgray", 13882323, true);
  512. SetTrieValue(hTrie, "lightgrey", 13882323, true);
  513. SetTrieValue(hTrie, "lightgreen", 10092441, true);
  514. SetTrieValue(hTrie, "lightpink", 16758465, true);
  515. SetTrieValue(hTrie, "lightsalmon", 16752762, true);
  516. SetTrieValue(hTrie, "lightseagreen", 2142890, true);
  517. SetTrieValue(hTrie, "lightskyblue", 8900346, true);
  518. SetTrieValue(hTrie, "lightslategray", 7833753, true);
  519. SetTrieValue(hTrie, "lightslategrey", 7833753, true);
  520. SetTrieValue(hTrie, "lightsteelblue", 11584734, true);
  521. SetTrieValue(hTrie, "lightyellow", 16777184, true);
  522. SetTrieValue(hTrie, "lime", 65280, true);
  523. SetTrieValue(hTrie, "limegreen", 3329330, true);
  524. SetTrieValue(hTrie, "linen", 16445670, true);
  525. SetTrieValue(hTrie, "magenta", 16711935, true);
  526. SetTrieValue(hTrie, "maroon", 8388608, true);
  527. SetTrieValue(hTrie, "mediumaquamarine", 6737322, true);
  528. SetTrieValue(hTrie, "mediumblue", 205, true);
  529. SetTrieValue(hTrie, "mediumorchid", 12211667, true);
  530. SetTrieValue(hTrie, "mediumpurple", 9662680, true);
  531. SetTrieValue(hTrie, "mediumseagreen", 3978097, true);
  532. SetTrieValue(hTrie, "mediumslateblue", 8087790, true);
  533. SetTrieValue(hTrie, "mediumspringgreen", 64154, true);
  534. SetTrieValue(hTrie, "mediumturquoise", 4772300, true);
  535. SetTrieValue(hTrie, "mediumvioletred", 13047173, true);
  536. SetTrieValue(hTrie, "midnightblue", 1644912, true);
  537. SetTrieValue(hTrie, "mintcream", 16121850, true);
  538. SetTrieValue(hTrie, "mistyrose", 16770273, true);
  539. SetTrieValue(hTrie, "moccasin", 16770229, true);
  540. SetTrieValue(hTrie, "mythical", 8931327, true);
  541. SetTrieValue(hTrie, "navajowhite", 16768685, true);
  542. SetTrieValue(hTrie, "navy", 128, true);
  543. SetTrieValue(hTrie, "normal", 11711154, true);
  544. SetTrieValue(hTrie, "oldlace", 16643558, true);
  545. SetTrieValue(hTrie, "olive", 10404687, true);
  546. SetTrieValue(hTrie, "olivedrab", 7048739, true);
  547. SetTrieValue(hTrie, "orange", 16753920, true);
  548. SetTrieValue(hTrie, "orangered", 16729344, true);
  549. SetTrieValue(hTrie, "orchid", 14315734, true);
  550. SetTrieValue(hTrie, "palegoldenrod", 15657130, true);
  551. SetTrieValue(hTrie, "palegreen", 10025880, true);
  552. SetTrieValue(hTrie, "paleturquoise", 11529966, true);
  553. SetTrieValue(hTrie, "palevioletred", 14184595, true);
  554. SetTrieValue(hTrie, "papayawhip", 16773077, true);
  555. SetTrieValue(hTrie, "peachpuff", 16767673, true);
  556. SetTrieValue(hTrie, "peru", 13468991, true);
  557. SetTrieValue(hTrie, "pink", 16761035, true);
  558. SetTrieValue(hTrie, "plum", 14524637, true);
  559. SetTrieValue(hTrie, "powderblue", 11591910, true);
  560. SetTrieValue(hTrie, "purple", 8388736, true);
  561. SetTrieValue(hTrie, "rare", 4942335, true);
  562. SetTrieValue(hTrie, "red", 16728128, true);
  563. SetTrieValue(hTrie, "rosybrown", 12357519, true);
  564. SetTrieValue(hTrie, "royalblue", 4286945, true);
  565. SetTrieValue(hTrie, "saddlebrown", 9127187, true);
  566. SetTrieValue(hTrie, "salmon", 16416882, true);
  567. SetTrieValue(hTrie, "sandybrown", 16032864, true);
  568. SetTrieValue(hTrie, "seagreen", 3050327, true);
  569. SetTrieValue(hTrie, "seashell", 16774638, true);
  570. SetTrieValue(hTrie, "selfmade", 7385162, true);
  571. SetTrieValue(hTrie, "sienna", 10506797, true);
  572. SetTrieValue(hTrie, "silver", 12632256, true);
  573. SetTrieValue(hTrie, "skyblue", 8900331, true);
  574. SetTrieValue(hTrie, "slateblue", 6970061, true);
  575. SetTrieValue(hTrie, "slategray", 7372944, true);
  576. SetTrieValue(hTrie, "slategrey", 7372944, true);
  577. SetTrieValue(hTrie, "snow", 16775930, true);
  578. SetTrieValue(hTrie, "springgreen", 65407, true);
  579. SetTrieValue(hTrie, "steelblue", 4620980, true);
  580. SetTrieValue(hTrie, "strange", 13593138, true);
  581. SetTrieValue(hTrie, "tan", 13808780, true);
  582. SetTrieValue(hTrie, "teal", 32896, true);
  583. SetTrieValue(hTrie, "thistle", 14204888, true);
  584. SetTrieValue(hTrie, "tomato", 16737095, true);
  585. SetTrieValue(hTrie, "turquoise", 4251856, true);
  586. SetTrieValue(hTrie, "uncommon", 11584473, true);
  587. SetTrieValue(hTrie, "unique", 16766720, true);
  588. SetTrieValue(hTrie, "unusual", 8802476, true);
  589. SetTrieValue(hTrie, "valve", 10817401, true);
  590. SetTrieValue(hTrie, "vintage", 4678289, true);
  591. SetTrieValue(hTrie, "violet", 15631086, true);
  592. SetTrieValue(hTrie, "wheat", 16113331, true);
  593. SetTrieValue(hTrie, "white", 16777215, true);
  594. SetTrieValue(hTrie, "whitesmoke", 16119285, true);
  595. SetTrieValue(hTrie, "yellow", 16776960, true);
  596. SetTrieValue(hTrie, "yellowgreen", 10145074, true);
  597. return hTrie;
  598. }
  599.  
  600. FF2_SpawnWeapon(client, String:name[], index, level, qual, String:att[], bool:visible)
  601. {
  602. if (StrEqual(name[0], "saxxy", false))
  603. {
  604. switch (TF2_GetPlayerClass(client))
  605. {
  606. case 1:
  607. {
  608. ReplaceString(name[0], 64, "saxxy", "tf_weapon_bat", false);
  609. }
  610. case 2:
  611. {
  612. ReplaceString(name[0], 64, "saxxy", "tf_weapon_club", false);
  613. }
  614. case 4:
  615. {
  616. ReplaceString(name[0], 64, "saxxy", "tf_weapon_bottle", false);
  617. }
  618. case 5:
  619. {
  620. ReplaceString(name[0], 64, "saxxy", "tf_weapon_bonesaw", false);
  621. }
  622. case 6:
  623. {
  624. ReplaceString(name[0], 64, "saxxy", "tf_weapon_fists", false);
  625. }
  626. case 7:
  627. {
  628. ReplaceString(name[0], 64, "saxxy", "tf_weapon_fireaxe", false);
  629. }
  630. case 8:
  631. {
  632. ReplaceString(name[0], 64, "saxxy", "tf_weapon_knife", false);
  633. }
  634. case 9:
  635. {
  636. ReplaceString(name[0], 64, "saxxy", "tf_weapon_wrench", false);
  637. }
  638. default:
  639. {
  640. ReplaceString(name[0], 64, "saxxy", "tf_weapon_shovel", false);
  641. }
  642. }
  643. }
  644. else
  645. {
  646. if (StrEqual(name[0], "tf_weapon_shotgun", false))
  647. {
  648. switch (TF2_GetPlayerClass(client))
  649. {
  650. case 6:
  651. {
  652. ReplaceString(name[0], 64, "tf_weapon_shotgun", "tf_weapon_shotgun_hwg", false);
  653. }
  654. case 7:
  655. {
  656. ReplaceString(name[0], 64, "tf_weapon_shotgun", "tf_weapon_shotgun_pyro", false);
  657. }
  658. case 9:
  659. {
  660. ReplaceString(name[0], 64, "tf_weapon_shotgun", "tf_weapon_shotgun_primary", false);
  661. }
  662. default:
  663. {
  664. ReplaceString(name[0], 64, "tf_weapon_shotgun", "tf_weapon_shotgun_soldier", false);
  665. }
  666. }
  667. }
  668. }
  669. new Handle:hWeapon = TF2Items_CreateItem(95);
  670. if (hWeapon)
  671. {
  672. TF2Items_SetClassname(hWeapon, name[0]);
  673. TF2Items_SetItemIndex(hWeapon, index);
  674. TF2Items_SetLevel(hWeapon, level);
  675. TF2Items_SetQuality(hWeapon, qual);
  676. new String:atts[32][128] = {
  677. {
  678. 59, 543449410, 1885431159, 1629515375, 1769108596, 1702131042, 1935765536, 979658099, 544417056, 1931812923, 0, 1449287533, 1684630625, 1684370529, 1635021889, 1684367459, 1769238085, 31092, 1466523501, 1684828783, 1701080909, 1684949356, 30821, 1818648429, 1701080909, 1633899372, 25964, 1597130310, 1098147143, 1632528242, 1231316333, 0
  679. },
  680. {
  681. 544417056, 1931812923, 0, 1449287533, 1684630625, 1684370529, 1635021889, 1684367459, 1769238085, 31092, 1466523501, 1684828783, 1701080909, 1684949356, 30821, 1818648429, 1701080909, 1633899372, 25964, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1597130310, 1098147143, 1632528242
  682. },
  683. {
  684. 1769238085, 31092, 1466523501, 1684828783, 1701080909, 1684949356, 30821, 1818648429, 1701080909, 1633899372, 25964, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1634038374, 1868980075, 1701999730, 845116275, 0, 1634038374
  685. },
  686. {
  687. 1701080909, 1633899372, 25964, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1634038374, 1868980075, 1701999730, 845116275, 0, 1634038374, 1868980075, 1701999730, 845116275, 2020438830, 0, 6576, 6596, 1
  688. },
  689. {
  690. 1597130310, 1098147143, 1632528242, 1231316333, 0, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1634038374, 1868980075, 1701999730, 845116275, 0, 1634038374, 1868980075, 1701999730, 845116275, 2020438830, 0, 6576, 6596, 1, 72, 76, 84, 92, 104, 112, 120, 132
  691. },
  692. {
  693. 1231316333, 0, 1634038374, 1868980075, 1701999730, 845116275, 0, 1634038374, 1868980075, 1701999730, 845116275, 2020438830, 0, 6576, 6596, 1, 72, 76, 84, 92, 104, 112, 120, 132, 140, 160, 172, 184, 196, 204, 216, 232
  694. },
  695. {
  696. 1868980075, 1701999730, 845116275, 2020438830, 0, 6576, 6596, 1, 72, 76, 84, 92, 104, 112, 120, 132, 140, 160, 172, 184, 196, 204, 216, 232, 244, 256, 1349082989, 6778473, 1399414637, 1701998435, 0, 1147756397
  697. },
  698. {
  699. 72, 76, 84, 92, 104, 112, 120, 132, 140, 160, 172, 184, 196, 204, 216, 232, 244, 256, 1349082989, 6778473, 1399414637, 1701998435, 0, 1147756397, 1752457573, 115, 1416191853, 1818326127, 1919902547, 101, 1130979181, 1970565217
  700. },
  701. {
  702. 140, 160, 172, 184, 196, 204, 216, 232, 244, 256, 1349082989, 6778473, 1399414637, 1701998435, 0, 1147756397, 1752457573, 115, 1416191853, 1818326127, 1919902547, 101, 1130979181, 1970565217, 7562610, 1147756397, 1852139109, 7562611, 1147756397, 1852403055, 1869182049, 29550
  703. },
  704. {
  705. 244, 256, 1349082989, 6778473, 1399414637, 1701998435, 0, 1147756397, 1752457573, 115, 1416191853, 1818326127, 1919902547, 101, 1130979181, 1970565217, 7562610, 1147756397, 1852139109, 7562611, 1147756397, 1852403055, 1869182049, 29550, 1382637421, 1852143205, 25959, 1114201965, 1684826485, 1936158313, 1953719620, 1702457202
  706. },
  707. {
  708. 1752457573, 115, 1416191853, 1818326127, 1919902547, 101, 1130979181, 1970565217, 7562610, 1147756397, 1852139109, 7562611, 1147756397, 1852403055, 1869182049, 29550, 1382637421, 1852143205, 25959, 1114201965, 1684826485, 1936158313, 1953719620, 1702457202, 100, 1214865261, 1935958373, 1937010536, 0, 1114201965, 1936417633, 1935827316
  709. },
  710. {
  711. 7562610, 1147756397, 1852139109, 7562611, 1147756397, 1852403055, 1869182049, 29550, 1382637421, 1852143205, 25959, 1114201965, 1684826485, 1936158313, 1953719620, 1702457202, 100, 1214865261, 1935958373, 1937010536, 0, 1114201965, 1936417633, 1935827316, 0, 1214865261, 1349280101, 1953393007, 115, 1231642477, 1819637358, 29550
  712. },
  713. {
  714. 1382637421, 1852143205, 25959, 1114201965, 1684826485, 1936158313, 1953719620, 1702457202, 100, 1214865261, 1935958373, 1937010536, 0, 1114201965, 1936417633, 1935827316, 0, 1214865261, 1349280101, 1953393007, 115, 1231642477, 1819637358, 29550, 1416191853, 1885695077, 1937011311, 0, 1382637421, 1886745445, 1350134896, 1953393007
  715. },
  716. {
  717. 100, 1214865261, 1935958373, 1937010536, 0, 1114201965, 1936417633, 1935827316, 0, 1214865261, 1349280101, 1953393007, 115, 1231642477, 1819637358, 29550, 1416191853, 1885695077, 1937011311, 0, 1382637421, 1886745445, 1350134896, 1953393007, 115, 1265196909, 1097624681, 1936290675, 29556, 1298751341, 1699248225, 1752460385
  718. },
  719. {
  720. 0, 1214865261, 1349280101, 1953393007, 115, 1231642477, 1819637358, 29550, 1416191853, 1885695077, 1937011311, 0, 1382637421, 1886745445, 1350134896, 1953393007, 115, 1265196909, 1097624681, 1936290675, 29556, 1298751341, 1699248225, 1752460385, 0, 1349082989, 1702453612, 1634485106, 29555, 1130979181, 1936941420, 0
  721. },
  722. {
  723. 1416191853, 1885695077, 1937011311, 0, 1382637421, 1886745445, 1350134896, 1953393007, 115, 1265196909, 1097624681, 1936290675, 29556, 1298751341, 1699248225, 1752460385, 0, 1349082989, 1702453612, 1634485106, 29555, 1130979181, 1936941420, 0, 1130979181, 1936941420, 0, 1147756397, 1919513445, 1817207909, 1919252833, 1935764547
  724. },
  725. {
  726. 115, 1265196909, 1097624681, 1936290675, 29556, 1298751341, 1699248225, 1752460385, 0, 1349082989, 1702453612, 1634485106, 29555, 1130979181, 1936941420, 0, 1130979181, 1936941420, 0, 1147756397, 1919513445, 1817207909, 1919252833, 1935764547, 115, 1164468077, 1634890872, 1918985559, 1701601889, 0, 1164468077, 1634890872
  727. },
  728. {
  729. 0, 1349082989, 1702453612, 1634485106, 29555, 1130979181, 1936941420, 0, 1130979181, 1936941420, 0, 1147756397, 1919513445, 1817207909, 1919252833, 1935764547, 115, 1164468077, 1634890872, 1918985559, 1701601889, 0, 1164468077, 1634890872, 1918985559, 1701601889, 2003134806, 1701080909, 108, 1819044171, 0, 1349410669
  730. },
  731. {
  732. 1130979181, 1936941420, 0, 1147756397, 1919513445, 1817207909, 1919252833, 1935764547, 115, 1164468077, 1634890872, 1918985559, 1701601889, 0, 1164468077, 1634890872, 1918985559, 1701601889, 2003134806, 1701080909, 108, 1819044171, 0, 1349410669, 1702453612, 1852785522, 100, 1852793695, 1769236836, 1650421359, 7566441, 1349410669
  733. },
  734. {
  735. 115, 1164468077, 1634890872, 1918985559, 1701601889, 0, 1164468077, 1634890872, 1918985559, 1701601889, 2003134806, 1701080909, 108, 1819044171, 0, 1349410669, 1702453612, 1852785522, 100, 1852793695, 1769236836, 1650421359, 7566441, 1349410669, 1702453612, 1852785522, 7882084, 1349410669, 1702453612, 1852785522, 846742884, 0
  736. },
  737. {
  738. 1918985559, 1701601889, 2003134806, 1701080909, 108, 1819044171, 0, 1349410669, 1702453612, 1852785522, 100, 1852793695, 1769236836, 1650421359, 7566441, 1349410669, 1702453612, 1852785522, 7882084, 1349410669, 1702453612, 1852785522, 846742884, 0, 1349410669, 1702453612, 1852785522, 863520100, 0, 1349410669, 1702453612, 1852785522
  739. },
  740. {
  741. 1702453612, 1852785522, 100, 1852793695, 1769236836, 1650421359, 7566441, 1349410669, 1702453612, 1852785522, 7882084, 1349410669, 1702453612, 1852785522, 846742884, 0, 1349410669, 1702453612, 1852785522, 863520100, 0, 1349410669, 1702453612, 1852785522, 880297316, 0, 1635151433, 543451500, 1866679892, 1981834350, 1702194273, 6563104
  742. },
  743. {
  744. 1702453612, 1852785522, 7882084, 1349410669, 1702453612, 1852785522, 846742884, 0, 1349410669, 1702453612, 1852785522, 863520100, 0, 1349410669, 1702453612, 1852785522, 880297316, 0, 1635151433, 543451500, 1866679892, 1981834350, 1702194273, 6563104, 1630692980, 1769108596, 1702131042, 115, 1630692980, 1769108596, 1702131042, 1836265075
  745. },
  746. {
  747. 1349410669, 1702453612, 1852785522, 863520100, 0, 1349410669, 1702453612, 1852785522, 880297316, 0, 1635151433, 543451500, 1866679892, 1981834350, 1702194273, 6563104, 1630692980, 1769108596, 1702131042, 115, 1630692980, 1769108596, 1702131042, 1836265075, 120, 7208, 7224, 1, 0, 0, 0, 0
  748. },
  749. {
  750. 880297316, 0, 1635151433, 543451500, 1866679892, 1981834350, 1702194273, 6563104, 1630692980, 1769108596, 1702131042, 115, 1630692980, 1769108596, 1702131042, 1836265075, 120, 7208, 7224, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  751. },
  752. {
  753. 1630692980, 1769108596, 1702131042, 115, 1630692980, 1769108596, 1702131042, 1836265075, 120, 7208, 7224, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  754. },
  755. {
  756. 120, 7208, 7224, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  757. },
  758. {
  759. 0, ...
  760. },
  761. {
  762. 0, ...
  763. },
  764. {
  765. 0, ...
  766. },
  767. {
  768. 0, ...
  769. },
  770. {
  771. 0, ...
  772. }
  773. };
  774. new count = ExplodeString(att[0], ";", atts, 32, 32, false);
  775. if (count % 2)
  776. {
  777. count--;
  778. }
  779. if (0 < count)
  780. {
  781. TF2Items_SetNumAttributes(hWeapon, count / 2);
  782. new i2;
  783. new i;
  784. while (i < count)
  785. {
  786. new attrib = StringToInt(atts[i], 10);
  787. if (attrib)
  788. {
  789. TF2Items_SetAttribute(hWeapon, i2, attrib, StringToFloat(atts[i + 1]));
  790. i2++;
  791. i += 2;
  792. }
  793. LogError("Bad weapon attribute passed: %s ; %s", atts[i], atts[i + 1]);
  794. CloseHandle(hWeapon);
  795. hWeapon = 0;
  796. return -1;
  797. }
  798. }
  799. else
  800. {
  801. TF2Items_SetNumAttributes(hWeapon, 0);
  802. }
  803. new entity = TF2Items_GiveNamedItem(client, hWeapon);
  804. CloseHandle(hWeapon);
  805. hWeapon = 0;
  806. if (entity == -1)
  807. {
  808. return -1;
  809. }
  810. EquipPlayerWeapon(client, entity);
  811. if (visible)
  812. {
  813. SetEntProp(entity, 0, "m_bValidatedAttachedEntity", 1, 4, 0);
  814. }
  815. else
  816. {
  817. SetEntProp(entity, 0, "m_iWorldModelIndex", -1, 4, 0);
  818. SetEntPropFloat(entity, 0, "m_flModelScale", 0.001, 0);
  819. }
  820. return entity;
  821. }
  822. return -1;
  823. }
  824.  
  825. FF2_GetArgI(boss, String:plugin_name[], String:ability_name[], String:argument[], index, defValue)
  826. {
  827. new var1;
  828. if (GetFeatureStatus(0, "FF2_GetArgNamedI"))
  829. {
  830. var1 = FF2_GetAbilityArgument(boss, plugin_name[0], ability_name[0], index, defValue);
  831. }
  832. else
  833. {
  834. var1 = FF2_GetArgNamedI(boss, plugin_name[0], ability_name[0], argument[0], FF2_GetAbilityArgument(boss, plugin_name[0], ability_name[0], index, defValue));
  835. }
  836. return var1;
  837. }
  838.  
  839. Float:FF2_GetArgF(boss, String:plugin_name[], String:ability_name[], String:argument[], index, Float:defValue)
  840. {
  841. new var1;
  842. if (GetFeatureStatus(0, "FF2_GetArgNamedI"))
  843. {
  844. var1 = FF2_GetAbilityArgumentFloat(boss, plugin_name[0], ability_name[0], index, defValue);
  845. }
  846. else
  847. {
  848. var1 = FF2_GetArgNamedF(boss, plugin_name[0], ability_name[0], argument[0], FF2_GetAbilityArgumentFloat(boss, plugin_name[0], ability_name[0], index, defValue));
  849. }
  850. return var1;
  851. }
  852.  
  853. FF2_GetArgS(boss, String:plugin_name[], String:ability_name[], String:argument[], index, String:buffer[], bufferLength)
  854. {
  855. if (GetFeatureStatus(0, "FF2_GetArgNamedI"))
  856. {
  857. FF2_GetAbilityArgumentString(boss, plugin_name[0], ability_name[0], index, buffer[0], bufferLength);
  858. }
  859. else
  860. {
  861. FF2_GetArgNamedS(boss, plugin_name[0], ability_name[0], argument[0], buffer[0], bufferLength);
  862. if (strlen(buffer[0]))
  863. {
  864. }
  865. else
  866. {
  867. FF2_GetAbilityArgumentString(boss, plugin_name[0], ability_name[0], index, buffer[0], bufferLength);
  868. }
  869. }
  870. return strlen(buffer[0]);
  871. }
  872.  
  873. TFTeam:TF2_GetClientTeam(client)
  874. {
  875. return GetClientTeam(client);
  876. }
  877.  
  878. void:TF2_ChangeClientTeam(client, TFTeam:team)
  879. {
  880. ChangeClientTeam(client, team);
  881. return 0;
  882. }
  883.  
  884. TFClassType:TF2_GetPlayerClass(client)
  885. {
  886. return GetEntProp(client, 0, "m_iClass", 4, 0);
  887. }
  888.  
  889. void:TF2_SetPlayerClass(client, TFClassType:classType, bool:weapons, bool:persistent)
  890. {
  891. SetEntProp(client, 0, "m_iClass", classType, 4, 0);
  892. if (persistent)
  893. {
  894. SetEntProp(client, 0, "m_iDesiredPlayerClass", classType, 4, 0);
  895. }
  896. return 0;
  897. }
  898.  
  899. void:TF2_RemoveWeaponSlot(client, slot)
  900. {
  901. new weaponIndex;
  902. while ((weaponIndex = GetPlayerWeaponSlot(client, slot)) != -1)
  903. {
  904. new extraWearable = GetEntPropEnt(weaponIndex, 0, "m_hExtraWearable", 0);
  905. if (extraWearable != -1)
  906. {
  907. TF2_RemoveWearable(client, extraWearable);
  908. }
  909. extraWearable = GetEntPropEnt(weaponIndex, 0, "m_hExtraWearableViewModel", 0);
  910. if (extraWearable != -1)
  911. {
  912. TF2_RemoveWearable(client, extraWearable);
  913. }
  914. RemovePlayerItem(client, weaponIndex);
  915. AcceptEntityInput(weaponIndex, "Kill", -1, -1, 0);
  916. }
  917. return 0;
  918. }
  919.  
  920. void:TF2_RemoveAllWeapons(client)
  921. {
  922. new i;
  923. while (i <= 5)
  924. {
  925. TF2_RemoveWeaponSlot(client, i);
  926. i++;
  927. }
  928. return 0;
  929. }
  930.  
  931. bool:TF2_IsPlayerInCondition(client, TFCond:cond)
  932. {
  933. new iCond = cond;
  934. switch (iCond / 32)
  935. {
  936. case 0:
  937. {
  938. new bit = 1 << iCond;
  939. if (bit == bit & GetEntProp(client, 0, "m_nPlayerCond", 4, 0))
  940. {
  941. return 1;
  942. }
  943. if (bit == bit & GetEntProp(client, 0, "_condition_bits", 4, 0))
  944. {
  945. return 1;
  946. }
  947. }
  948. case 1:
  949. {
  950. new bit = 1 << iCond + -32;
  951. if (bit == bit & GetEntProp(client, 0, "m_nPlayerCondEx", 4, 0))
  952. {
  953. return 1;
  954. }
  955. }
  956. case 2:
  957. {
  958. new bit = 1 << iCond + -64;
  959. if (bit == bit & GetEntProp(client, 0, "m_nPlayerCondEx2", 4, 0))
  960. {
  961. return 1;
  962. }
  963. }
  964. case 3:
  965. {
  966. new bit = 1 << iCond + -96;
  967. if (bit == bit & GetEntProp(client, 0, "m_nPlayerCondEx3", 4, 0))
  968. {
  969. return 1;
  970. }
  971. }
  972. case 4:
  973. {
  974. new bit = 1 << iCond + -128;
  975. if (bit == bit & GetEntProp(client, 0, "m_nPlayerCondEx4", 4, 0))
  976. {
  977. return 1;
  978. }
  979. }
  980. default:
  981. {
  982. ThrowError("Invalid TFCond value %d", iCond);
  983. }
  984. }
  985. return 0;
  986. }
  987.  
  988. RoundFloat(Float:value)
  989. {
  990. return RoundToNearest(value);
  991. }
  992.  
  993. Float:-5(Float:oper)
  994. {
  995. return oper ^ -2147483648;
  996. }
  997.  
  998. void:NecroMash_SmashClient(client, attacker)
  999. {
  1000. new Float:flPos[3] = 0.0;
  1001. new Float:flPpos[3] = 0.0;
  1002. new Float:flAngles[3] = 0.0;
  1003. if (mortis_Type[attacker] == 2)
  1004. {
  1005. GetClientEyePosition(attacker, flPos);
  1006. GetClientEyeAngles(attacker, flAngles);
  1007. new Handle:trace = TR_TraceRayFilterEx(flPos, flAngles, 1174421507, 1, 117, 0);
  1008. if (TR_DidHit(trace))
  1009. {
  1010. TR_GetEndPosition(flPos, trace);
  1011. TR_GetEndPosition(flPpos, trace);
  1012. CloseHandle(trace);
  1013. }
  1014. }
  1015. else
  1016. {
  1017. GetClientAbsOrigin(client, flPos);
  1018. GetClientAbsOrigin(client, flPpos);
  1019. GetClientEyeAngles(client, flAngles);
  1020. }
  1021. flAngles[0] = 0.0;
  1022. new Float:vForward[3] = 0.0;
  1023. GetAngleVectors(flAngles, vForward, NULL_VECTOR, NULL_VECTOR);
  1024. flPos[0] = flPos[0] - 5*0(vForward[0], 750);
  1025. flPos[1] -= 5*0(vForward[1], 750);
  1026. flPos[2] -= 5*0(vForward[2], 750);
  1027. flPos[2] += 350.0;
  1028. new gears = CreateEntityByName("prop_dynamic", -1);
  1029. if (IsValidEntity(gears))
  1030. {
  1031. DispatchKeyValueVector(gears, "origin", flPos);
  1032. DispatchKeyValueVector(gears, "angles", flAngles);
  1033. DispatchKeyValue(gears, "model", "models/props_halloween/hammer_gears_mechanism.mdl");
  1034. DispatchSpawn(gears);
  1035. }
  1036. new hammer = CreateEntityByName("prop_dynamic", -1);
  1037. if (IsValidEntity(hammer))
  1038. {
  1039. DispatchKeyValueVector(hammer, "origin", flPos);
  1040. DispatchKeyValueVector(hammer, "angles", flAngles);
  1041. DispatchKeyValue(hammer, "model", "models/props_halloween/hammer_mechanism.mdl");
  1042. DispatchSpawn(hammer);
  1043. }
  1044. new button = CreateEntityByName("prop_dynamic", -1);
  1045. if (IsValidEntity(button))
  1046. {
  1047. flPos[0] = flPos[0] + 5*0(vForward[0], 600);
  1048. flPos[1] += 5*0(vForward[1], 600);
  1049. flPos[2] += 5*0(vForward[2], 600);
  1050. flPos[2] -= 100.0;
  1051. flAngles[1] += 180.0;
  1052. DispatchKeyValueVector(button, "origin", flPos);
  1053. DispatchKeyValueVector(button, "angles", flAngles);
  1054. DispatchKeyValue(button, "model", "models/props_halloween/bell_button.mdl");
  1055. DispatchSpawn(button);
  1056. new Handle:pack;
  1057. CreateDataTimer(1.3, 113, pack, 0);
  1058. WritePackFloat(pack, flPpos[0]);
  1059. WritePackFloat(pack, flPpos[1]);
  1060. WritePackFloat(pack, flPpos[2]);
  1061. WritePackCell(pack, attacker);
  1062. new Handle:pack2;
  1063. CreateDataTimer(1.0, 115, pack2, 0);
  1064. WritePackFloat(pack2, flPpos[0]);
  1065. WritePackFloat(pack2, flPpos[1]);
  1066. WritePackFloat(pack2, flPpos[2]);
  1067. EmitSoundToAll("misc/halloween/strongman_fast_swing_01.wav", -2, 0, 75, 0, 0.25, 100, -1, flPpos, NULL_VECTOR, true, 0.0);
  1068. spawnRing(button, mortis_Radius[attacker] * 2.0, 0.0, 20.0, -230.0, "materials/particle/bendibeam.vmt", 255, 0, 0, 200, 10, 1.3, 30.0, 6.0, 10);
  1069. }
  1070. SetVariantString("OnUser2 !self:SetAnimation:smash:0:1");
  1071. AcceptEntityInput(gears, "AddOutput", -1, -1, 0);
  1072. AcceptEntityInput(gears, "FireUser2", -1, -1, 0);
  1073. SetVariantString("OnUser2 !self:SetAnimation:smash:0:1");
  1074. AcceptEntityInput(hammer, "AddOutput", -1, -1, 0);
  1075. AcceptEntityInput(hammer, "FireUser2", -1, -1, 0);
  1076. SetVariantString("OnUser2 !self:SetAnimation:hit:1.3:1");
  1077. AcceptEntityInput(button, "AddOutput", -1, -1, 0);
  1078. AcceptEntityInput(button, "FireUser2", -1, -1, 0);
  1079. CreateTimer(3.0, 171, gears, 2);
  1080. CreateTimer(3.0, 171, hammer, 2);
  1081. CreateTimer(3.0, 171, button, 2);
  1082. return 0;
  1083. }
  1084.  
  1085. Float:5*0(Float:oper1, oper2)
  1086. {
  1087. return oper1 * float(oper2);
  1088. }
  1089.  
  1090. void:ScaleVector(Float:vec[3], Float:scale)
  1091. {
  1092. vec[0] *= scale;
  1093. vec[0] + 4/* ERROR unknown load Binary */ *= scale;
  1094. vec[0] + 8/* ERROR unknown load Binary */ *= scale;
  1095. return 0;
  1096. }
  1097.  
  1098. void:MakeVectorFromPoints(Float:pt1[3], Float:pt2[3], Float:output[3])
  1099. {
  1100. output[0] = pt2[0] - pt1[0];
  1101. output[0] + 4/* ERROR unknown load Binary */ = pt2[0] + 4/* ERROR unknown load Binary */ - pt1[0] + 4/* ERROR unknown load Binary */;
  1102. output[0] + 8/* ERROR unknown load Binary */ = pt2[0] + 8/* ERROR unknown load Binary */ - pt1[0] + 8/* ERROR unknown load Binary */;
  1103. return 0;
  1104. }
  1105.  
  1106. void:NecroMash_CreateParticle(String:particle[], Float:pos[3])
  1107. {
  1108. new tblidx = FindStringTable("ParticleEffectNames");
  1109. new String:tmp[1024];
  1110. new count = GetStringTableNumStrings(tblidx);
  1111. new stridx = -1;
  1112. new i;
  1113. while (i < count)
  1114. {
  1115. ReadStringTable(tblidx, i, tmp, 256);
  1116. if (StrEqual(tmp, particle[0], false))
  1117. {
  1118. stridx = i;
  1119. new i = 1;
  1120. while (i <= MaxClients)
  1121. {
  1122. if (IsValidEntity(i))
  1123. {
  1124. if (IsClientInGame(i))
  1125. {
  1126. TE_Start("TFParticleEffect");
  1127. TE_WriteFloat("m_vecOrigin[0]", pos[0]);
  1128. TE_WriteFloat("m_vecOrigin[1]", pos[0] + 4/* ERROR unknown load Binary */);
  1129. TE_WriteFloat("m_vecOrigin[2]", pos[0] + 8/* ERROR unknown load Binary */);
  1130. TE_WriteNum("m_iParticleSystemIndex", stridx);
  1131. TE_WriteNum("entindex", -1);
  1132. TE_WriteNum("m_iAttachType", 2);
  1133. TE_SendToClient(i, 0.0);
  1134. }
  1135. }
  1136. i++;
  1137. }
  1138. return 0;
  1139. }
  1140. i++;
  1141. }
  1142. new i = 1;
  1143. while (i <= MaxClients)
  1144. {
  1145. if (IsValidEntity(i))
  1146. {
  1147. if (IsClientInGame(i))
  1148. {
  1149. TE_Start("TFParticleEffect");
  1150. TE_WriteFloat("m_vecOrigin[0]", pos[0]);
  1151. TE_WriteFloat("m_vecOrigin[1]", pos[0] + 4/* ERROR unknown load Binary */);
  1152. TE_WriteFloat("m_vecOrigin[2]", pos[0] + 8/* ERROR unknown load Binary */);
  1153. TE_WriteNum("m_iParticleSystemIndex", stridx);
  1154. TE_WriteNum("entindex", -1);
  1155. TE_WriteNum("m_iAttachType", 2);
  1156. TE_SendToClient(i, 0.0);
  1157. }
  1158. }
  1159. i++;
  1160. }
  1161. return 0;
  1162. }
  1163.  
  1164. bool:StrEqual(String:str1[], String:str2[], bool:caseSensitive)
  1165. {
  1166. return strcmp(str1[0], str2[0], caseSensitive) == 0;
  1167. }
  1168.  
  1169. CharToLower(chr)
  1170. {
  1171. if (IsCharUpper(chr))
  1172. {
  1173. return chr | 32;
  1174. }
  1175. return chr;
  1176. }
  1177.  
  1178. ExplodeString(String:text[], String:split[], String:buffers[][], maxStrings, maxStringLength, bool:copyRemainder)
  1179. {
  1180. new reloc_idx;
  1181. new idx;
  1182. new total;
  1183. new var1;
  1184. if (maxStrings < 1 || split[0])
  1185. {
  1186. return 0;
  1187. }
  1188. while ((idx = SplitString(reloc_idx + text[0], split[0], buffers[0][total], maxStringLength)) != -1)
  1189. {
  1190. reloc_idx = idx + reloc_idx;
  1191. total++;
  1192. if (maxStrings == total)
  1193. {
  1194. if (copyRemainder)
  1195. {
  1196. strcopy(buffers[0][total + -1], maxStringLength, reloc_idx - idx + text[0]);
  1197. }
  1198. return total;
  1199. }
  1200. }
  1201. total++;
  1202. strcopy(buffers[0][total], maxStringLength, reloc_idx + text[0]);
  1203. return total;
  1204. }
  1205.  
  1206. Handle:CreateDataTimer(Float:interval, <typeset 0>:func, &Handle:datapack, flags)
  1207. {
  1208. datapack = DataPack.DataPack();
  1209. flags |= 512;
  1210. return CreateTimer(interval, func, datapack, flags);
  1211. }
  1212.  
  1213. Handle:StartMessageOne(String:msgname[], client, flags)
  1214. {
  1215. new players[1];
  1216. players[0] = client;
  1217. return StartMessage(msgname[0], players, 1, flags);
  1218. }
  1219.  
  1220. bool:HasEntProp(entity, PropType:type, String:prop[])
  1221. {
  1222. if (type == 1)
  1223. {
  1224. return FindDataMapInfo(entity, prop[0], 0, 0, 0) != -1;
  1225. }
  1226. if (type)
  1227. {
  1228. return 0;
  1229. }
  1230. new String:cls[256];
  1231. if (GetEntityNetClass(entity, cls, 64))
  1232. {
  1233. return FindSendPropInfo(cls, prop[0], 0, 0, 0) != -1;
  1234. }
  1235. return 0;
  1236. }
  1237.  
  1238. bool:GetEntityClassname(entity, String:clsname[], maxlength)
  1239. {
  1240. return !!GetEntPropString(entity, 1, "m_iClassname", clsname[0], maxlength, 0);
  1241. }
  1242.  
  1243. void:SetEntityHealth(entity, amount)
  1244. {
  1245. static bool:gotconfig;
  1246. static String:prop[128];
  1247. if (!gotconfig)
  1248. {
  1249. new GameData:gc = GameData.GameData("core.games");
  1250. new bool:exists = GameData.GetKeyValue(gc, "m_iHealth", prop, 32);
  1251. CloseHandle(gc);
  1252. gc = 0;
  1253. if (!exists)
  1254. {
  1255. strcopy(prop, 32, "m_iHealth");
  1256. }
  1257. gotconfig = true;
  1258. }
  1259. new String:cls[256];
  1260. new PropFieldType:type;
  1261. new offset;
  1262. if (GetEntityNetClass(entity, cls, 64))
  1263. {
  1264. offset = FindSendPropInfo(cls, prop, type, 0, 0);
  1265. if (0 >= offset)
  1266. {
  1267. ThrowError("SetEntityHealth not supported by this mod");
  1268. return 0;
  1269. }
  1270. if (type == 2)
  1271. {
  1272. SetEntDataFloat(entity, offset, float(amount), false);
  1273. }
  1274. else
  1275. {
  1276. SetEntProp(entity, 0, prop, amount, 4, 0);
  1277. }
  1278. return 0;
  1279. }
  1280. ThrowError("SetEntityHealth not supported by this mod: Could not get serverclass name");
  1281. return 0;
  1282. }
  1283.  
  1284. GetClientButtons(client)
  1285. {
  1286. static bool:gotconfig;
  1287. static String:datamap[128];
  1288. if (!gotconfig)
  1289. {
  1290. new GameData:gc = GameData.GameData("core.games");
  1291. new bool:exists = GameData.GetKeyValue(gc, "m_nButtons", datamap, 32);
  1292. CloseHandle(gc);
  1293. gc = 0;
  1294. if (!exists)
  1295. {
  1296. strcopy(datamap, 32, "m_nButtons");
  1297. }
  1298. gotconfig = true;
  1299. }
  1300. return GetEntProp(client, 1, datamap, 4, 0);
  1301. }
  1302.  
  1303. void:EmitSoundToAll(String:sample[], entity, channel, level, flags, Float:volume, pitch, speakerentity, Float:origin[3], Float:dir[3], bool:updatePos, Float:soundtime)
  1304. {
  1305. new clients[MaxClients];
  1306. new total;
  1307. new i = 1;
  1308. while (i <= MaxClients)
  1309. {
  1310. if (IsClientInGame(i))
  1311. {
  1312. total++;
  1313. clients[0][total] = i;
  1314. }
  1315. i++;
  1316. }
  1317. if (total)
  1318. {
  1319. EmitSound(clients[0], total, sample[0], entity, channel, level, flags, volume, pitch, speakerentity, origin[0], dir[0], updatePos, soundtime);
  1320. }
  1321. return 0;
  1322. }
  1323.  
  1324. void:TE_SendToAll(Float:delay)
  1325. {
  1326. new total;
  1327. new clients[MaxClients];
  1328. new i = 1;
  1329. while (i <= MaxClients)
  1330. {
  1331. if (IsClientInGame(i))
  1332. {
  1333. total++;
  1334. clients[0][total] = i;
  1335. }
  1336. i++;
  1337. }
  1338. TE_Send(clients[0], total, delay);
  1339. return 0;
  1340. }
  1341.  
  1342. void:TE_SendToClient(client, Float:delay)
  1343. {
  1344. new players[1];
  1345. players[0] = client;
  1346. TE_Send(players, 1, delay);
  1347. return 0;
  1348. }
  1349.  
  1350. void:TE_SetupBeamRingPoint(Float:center[3], Float:Start_Radius, Float:End_Radius, ModelIndex, HaloIndex, StartFrame, FrameRate, Float:Life, Float:Width, Float:Amplitude, Color[4], Speed, Flags)
  1351. {
  1352. TE_Start("BeamRingPoint");
  1353. TE_WriteVector("m_vecCenter", center[0]);
  1354. TE_WriteFloat("m_flStartRadius", Start_Radius);
  1355. TE_WriteFloat("m_flEndRadius", End_Radius);
  1356. TE_WriteNum("m_nModelIndex", ModelIndex);
  1357. TE_WriteNum("m_nHaloIndex", HaloIndex);
  1358. TE_WriteNum("m_nStartFrame", StartFrame);
  1359. TE_WriteNum("m_nFrameRate", FrameRate);
  1360. TE_WriteFloat("m_fLife", Life);
  1361. TE_WriteFloat("m_fWidth", Width);
  1362. TE_WriteFloat("m_fEndWidth", Width);
  1363. TE_WriteFloat("m_fAmplitude", Amplitude);
  1364. TE_WriteNum("r", Color[0]);
  1365. TE_WriteNum("g", Color[0] + 4/* ERROR unknown load Binary */);
  1366. TE_WriteNum("b", Color[0] + 8/* ERROR unknown load Binary */);
  1367. TE_WriteNum("a", Color[0] + 12/* ERROR unknown load Binary */);
  1368. TE_WriteNum("m_nSpeed", Speed);
  1369. TE_WriteNum("m_nFlags", Flags);
  1370. TE_WriteNum("m_nFadeLength", 0);
  1371. return 0;
  1372. }
  1373.  
  1374. void:TE_SetupBeamPoints(Float:start[3], Float:end[3], ModelIndex, HaloIndex, StartFrame, FrameRate, Float:Life, Float:Width, Float:EndWidth, FadeLength, Float:Amplitude, Color[4], Speed)
  1375. {
  1376. TE_Start("BeamPoints");
  1377. TE_WriteVector("m_vecStartPoint", start[0]);
  1378. TE_WriteVector("m_vecEndPoint", end[0]);
  1379. TE_WriteNum("m_nModelIndex", ModelIndex);
  1380. TE_WriteNum("m_nHaloIndex", HaloIndex);
  1381. TE_WriteNum("m_nStartFrame", StartFrame);
  1382. TE_WriteNum("m_nFrameRate", FrameRate);
  1383. TE_WriteFloat("m_fLife", Life);
  1384. TE_WriteFloat("m_fWidth", Width);
  1385. TE_WriteFloat("m_fEndWidth", EndWidth);
  1386. TE_WriteFloat("m_fAmplitude", Amplitude);
  1387. TE_WriteNum("r", Color[0]);
  1388. TE_WriteNum("g", Color[0] + 4/* ERROR unknown load Binary */);
  1389. TE_WriteNum("b", Color[0] + 8/* ERROR unknown load Binary */);
  1390. TE_WriteNum("a", Color[0] + 12/* ERROR unknown load Binary */);
  1391. TE_WriteNum("m_nSpeed", Speed);
  1392. TE_WriteNum("m_nFadeLength", FadeLength);
  1393. return 0;
  1394. }
  1395.  
  1396. CPrintToChatAll(String:message[], any:_arg1)
  1397. {
  1398. CCheckTrie();
  1399. decl String:buffer[4096];
  1400. decl String:buffer2[4096];
  1401. new i = 1;
  1402. while (i <= MaxClients)
  1403. {
  1404. new var1;
  1405. if (IsClientInGame(i) && CSkipList[i])
  1406. {
  1407. CSkipList[i] = 0;
  1408. }
  1409. else
  1410. {
  1411. SetGlobalTransTarget(i);
  1412. Format(buffer, 1024, "\x01%s", message[0]);
  1413. VFormat(buffer2, 1024, buffer, 2);
  1414. CReplaceColorCodes(buffer2, 0, false, 1024);
  1415. CSendMessage(i, buffer2, 0);
  1416. }
  1417. i++;
  1418. }
  1419. return 0;
  1420. }
  1421.  
  1422. CSendMessage(client, String:message[], author)
  1423. {
  1424. if (!author)
  1425. {
  1426. author = client;
  1427. }
  1428. decl String:buffer[1024];
  1429. decl String:game[64];
  1430. GetGameFolderName(game, 16);
  1431. strcopy(buffer, 256, message[0]);
  1432. new UserMsg:index = GetUserMessageId("SayText2");
  1433. if (index == -1)
  1434. {
  1435. if (StrEqual(game, "dod", true))
  1436. {
  1437. new team = GetClientTeam(author);
  1438. if (team)
  1439. {
  1440. decl String:temp[64];
  1441. new var2 = CTeamColors;
  1442. Format(temp, 16, "\x07%06X", var2[0][var2][team + -1]);
  1443. ReplaceString(buffer, 256, "\x03", temp, false);
  1444. }
  1445. else
  1446. {
  1447. ReplaceString(buffer, 256, "\x03", "\x04", false);
  1448. }
  1449. }
  1450. PrintToChat(client, "%s", buffer);
  1451. return 0;
  1452. }
  1453. new Handle:buf = StartMessageOne("SayText2", client, 132);
  1454. new var1;
  1455. if (GetFeatureStatus(0, "GetUserMessageType") && GetUserMessageType() == 1)
  1456. {
  1457. PbSetInt(buf, "ent_idx", author, -1);
  1458. PbSetBool(buf, "chat", true, -1);
  1459. PbSetString(buf, "msg_name", buffer, -1);
  1460. PbAddString(buf, "params", "");
  1461. PbAddString(buf, "params", "");
  1462. PbAddString(buf, "params", "");
  1463. PbAddString(buf, "params", "");
  1464. }
  1465. else
  1466. {
  1467. BfWriteByte(buf, author);
  1468. BfWriteByte(buf, 1);
  1469. BfWriteString(buf, buffer);
  1470. }
  1471. EndMessage();
  1472. return 0;
  1473. }
  1474.  
  1475. Handle:AttachParticle(client, String:type[1024], String:point[1024])
  1476. {
  1477. if (IsValidClient(client, true, true))
  1478. {
  1479. playerParticle[client] = CreateEntityByName("info_particle_system", -1);
  1480. if (IsValidEdict(playerParticle[client]))
  1481. {
  1482. decl Float:pos[3];
  1483. GetClientAbsOrigin(client, pos);
  1484. TeleportEntity(playerParticle[client], pos, NULL_VECTOR, NULL_VECTOR);
  1485. DispatchKeyValue(playerParticle[client], "effect_name", type[0]);
  1486. SetVariantString("!activator");
  1487. AcceptEntityInput(playerParticle[client], "SetParent", client, playerParticle[client], 0);
  1488. SetVariantString(point[0]);
  1489. AcceptEntityInput(playerParticle[client], "SetParentAttachmentMaintainOffset", playerParticle[client], playerParticle[client], 0);
  1490. DispatchKeyValue(playerParticle[client], "targetname", "present");
  1491. DispatchSpawn(playerParticle[client]);
  1492. ActivateEntity(playerParticle[client]);
  1493. AcceptEntityInput(playerParticle[client], "Start", -1, -1, 0);
  1494. }
  1495. LogError("(CreateParticle): Could not create info_particle_system");
  1496. }
  1497. return 0;
  1498. }
  1499.  
  1500. CCheckTrie()
  1501. {
  1502. if (!CTrie)
  1503. {
  1504. CTrie = InitColorTrie();
  1505. }
  1506. return 0;
  1507. }
  1508.  
  1509. CReplaceColorCodes(String:buffer[], author, bool:removeTags, maxlen)
  1510. {
  1511. CCheckTrie();
  1512. if (removeTags)
  1513. {
  1514. ReplaceString(buffer[0], maxlen, "{default}", "", false);
  1515. ReplaceString(buffer[0], maxlen, "{teamcolor}", "", false);
  1516. }
  1517. else
  1518. {
  1519. ReplaceString(buffer[0], maxlen, "{default}", "\x01", false);
  1520. }
  1521. new var1;
  1522. if (author && removeTags)
  1523. {
  1524. new var2;
  1525. if (author < 0 || author > MaxClients)
  1526. {
  1527. ThrowError("Invalid client index %i", author);
  1528. }
  1529. if (!(IsClientInGame(author)))
  1530. {
  1531. ThrowError("Client %i is not in game", author);
  1532. }
  1533. ReplaceString(buffer[0], maxlen, "{teamcolor}", "\x03", false);
  1534. }
  1535. new cursor;
  1536. new value;
  1537. decl String:tag[128];
  1538. decl String:buff[128];
  1539. decl output[maxlen];
  1540. strcopy(output[0], maxlen, buffer[0]);
  1541. new Handle:regex = CompileRegex("{[a-zA-Z0-9]+}", 0, "", 0, 0);
  1542. new i;
  1543. while (i < 1000)
  1544. {
  1545. if (MatchRegex(regex, cursor + buffer[0], 0) < 1)
  1546. {
  1547. CloseHandle(regex);
  1548. strcopy(buffer[0], maxlen, output[0]);
  1549. return 0;
  1550. }
  1551. GetRegexSubString(regex, 0, tag, 32);
  1552. CStrToLower(tag);
  1553. cursor = StrContains(cursor + buffer[0], tag, false) + cursor + 1;
  1554. strcopy(buff, 32, tag);
  1555. ReplaceString(buff, 32, "{", "", true);
  1556. ReplaceString(buff, 32, "}", "", true);
  1557. if (GetTrieValue(CTrie, buff, value))
  1558. {
  1559. if (removeTags)
  1560. {
  1561. ReplaceString(output[0], maxlen, tag, "", false);
  1562. }
  1563. else
  1564. {
  1565. Format(buff, 32, "\x07%06X", value);
  1566. ReplaceString(output[0], maxlen, tag, buff, false);
  1567. }
  1568. }
  1569. i++;
  1570. }
  1571. LogError("[MORE COLORS] Infinite loop broken.");
  1572. return 0;
  1573. }
  1574.  
  1575. public void:CreateBoner(summoner, minion, mode, bool:isBoneZone, Float:invTime, bossIDX, TFClassType:class, bool:noWearables, String:wepName[1024], String:wepAtts[1024], wepIDX, String:model[1024], Float:loc[3])
  1576. {
  1577. new var1;
  1578. if (IsValidMulti(summoner, true, true, true, true, false, 2, false) && IsValidClient(minion, true, true))
  1579. {
  1580. FF2_SetFF2flags(minion, FF2_GetFF2flags(minion) | 128);
  1581. TF2_ChangeClientTeam(minion, TF2_GetClientTeam(summoner));
  1582. TF2_RespawnPlayer(minion);
  1583. switch (mode)
  1584. {
  1585. case 0:
  1586. {
  1587. TF2_SetPlayerClass(minion, class, true, false);
  1588. if (noWearables)
  1589. {
  1590. RemoveAttachable(minion, "tf_wear*");
  1591. RemoveAttachable(minion, "tf_powerup_bottle");
  1592. }
  1593. TF2_RemoveAllWeapons(minion);
  1594. FF2_SpawnWeapon(minion, wepName[0], wepIDX, 77, 4, wepAtts[0], true);
  1595. if (FileExists(model[0], false, "GAME"))
  1596. {
  1597. SetVariantString(model[0]);
  1598. AcceptEntityInput(minion, "SetCustomModel", -1, -1, 0);
  1599. SetEntProp(minion, 0, "m_bUseClassAnimations", 1, 4, 0);
  1600. }
  1601. CreateTimer(0.1, 169, GetClientUserId(minion), 2);
  1602. }
  1603. case 1:
  1604. {
  1605. new numHales;
  1606. new i = 1;
  1607. while (i <= MaxClients)
  1608. {
  1609. if (IsValidMulti(i, true, true, true, true, false, 2, false))
  1610. {
  1611. numHales++;
  1612. }
  1613. i++;
  1614. }
  1615. if (TF2_GetClientTeam(summoner) == FF2_GetBossTeam())
  1616. {
  1617. FF2_MakeBoss(minion, numHales + 1, bossIDX, false);
  1618. }
  1619. else
  1620. {
  1621. FF2_MakeBoss(minion, numHales + 1, bossIDX, true);
  1622. }
  1623. }
  1624. default:
  1625. {
  1626. }
  1627. }
  1628. if (invTime > 0.0)
  1629. {
  1630. TF2_AddCondition(minion, 52, invTime, 0);
  1631. TF2_AddCondition(minion, 59, invTime, 0);
  1632. }
  1633. if (isBoneZone)
  1634. {
  1635. ride_Summoner[minion] = summoner;
  1636. }
  1637. TeleportEntity(minion, loc[0], NULL_VECTOR, NULL_VECTOR);
  1638. }
  1639. return 0;
  1640. }
  1641.  
  1642. public Action:DeleteParticle(client)
  1643. {
  1644. if (IsValidEdict(playerParticle[client]))
  1645. {
  1646. new String:classname[256];
  1647. GetEdictClassname(playerParticle[client], classname, 64);
  1648. if (StrEqual(classname, "info_particle_system", false))
  1649. {
  1650. AcceptEntityInput(playerParticle[client], "Stop", -1, -1, 0);
  1651. AcceptEntityInput(playerParticle[client], "Kill", -1, -1, 0);
  1652. }
  1653. }
  1654. return 0;
  1655. }
  1656.  
  1657. public Action:FF2_OnAbility(boss, String:pluginName[], String:abilityName[], slot, status)
  1658. {
  1659. FF2_OnAbility2(boss, pluginName[0], abilityName[0], slot);
  1660. return 0;
  1661. }
  1662.  
  1663. public Action:FF2_OnAbility2(index, String:plugin_name[], String:ability_name[], action)
  1664. {
  1665. new client = GetClientOfUserId(FF2_GetBossUserId(index));
  1666. if (IsValidMulti(client, true, true, true, true, false, 2, false))
  1667. {
  1668. if (!(strcmp(ability_name[0], "ssb_mortis", true)))
  1669. {
  1670. if (mortis_WarningTime[client] >= 0.1)
  1671. {
  1672. CreateTimer(mortis_WarningTime[client], 163, GetClientUserId(client), 2);
  1673. }
  1674. activateMortis(client);
  1675. }
  1676. if (!(strcmp(ability_name[0], "ssb_rip", true)))
  1677. {
  1678. if (0.0 == rip_RemainingTime[client])
  1679. {
  1680. TF2_AddCondition(client, 28, -1.0, 0);
  1681. }
  1682. new var3 = rip_RemainingTime[client];
  1683. var3 = var3[rip_Duration[client]];
  1684. if (numTimers_Rip[client] < 1)
  1685. {
  1686. SDKHook(client, 4, 187);
  1687. CreateTimer(0.1, 159, GetClientUserId(client), 3);
  1688. numTimers_Rip[client]++;
  1689. new String:path[1024];
  1690. Format(path, 256, "models/%s", rip_Model[client]);
  1691. if (FileExists(path, false, "GAME"))
  1692. {
  1693. new String:modelTest[1024];
  1694. GetClientModel(client, modelTest, 256);
  1695. if (!(StrEqual(rip_Model[client], modelTest, true)))
  1696. {
  1697. strcopy(rip_NormalModel[client], 256, modelTest);
  1698. }
  1699. SetVariantString(path);
  1700. AcceptEntityInput(client, "SetCustomModel", -1, -1, 0);
  1701. SetEntProp(client, 0, "m_bUseClassAnimations", rip_ClassAnims[client], 4, 0);
  1702. }
  1703. }
  1704. }
  1705. if (!(strcmp(ability_name[0], "ssb_calciumrepo", true)))
  1706. {
  1707. new var4 = repo_RemainingTime[client];
  1708. var4 = var4[repo_Duration[client]];
  1709. if (numTimers_Repo[client] < 1)
  1710. {
  1711. TF2_AddCondition(client, 36, -1.0, 0);
  1712. CreateTimer(0.1, 173, GetClientUserId(client), 3);
  1713. numTimers_Repo[client]++;
  1714. }
  1715. }
  1716. if (!(strcmp(ability_name[0], "ssb_purechaos", true)))
  1717. {
  1718. if (0.0 == chaos_RemainingTime[client])
  1719. {
  1720. new var1;
  1721. if (StrEqual(chaos_Particle[client], "", true) && StrEqual(chaos_ParticlePoint[client], "", true))
  1722. {
  1723. AttachParticle(client, chaos_Particle[client], chaos_ParticlePoint[client]);
  1724. }
  1725. if (chaos_InvTime[client] > 0.0)
  1726. {
  1727. TF2_AddCondition(client, 59, -1.0, 0);
  1728. TF2_AddCondition(client, 52, -1.0, 0);
  1729. new var5 = chaos_RemainingUber[client];
  1730. var5 = var5[chaos_InvTime[client]];
  1731. }
  1732. if (chaos_StunTime[client] > 0.0)
  1733. {
  1734. TF2_StunPlayer(client, chaos_StunTime[client], 1.0, 2, 0);
  1735. CreateTimer(chaos_StunTime[client][0.1], 127, GetClientUserId(client), 2);
  1736. return 0;
  1737. }
  1738. }
  1739. enableChaos(client);
  1740. }
  1741. if (!(strcmp(ability_name[0], "ssb_bonezone_classic", true)))
  1742. {
  1743. if (0.0 == classic_RemainingTime[client])
  1744. {
  1745. new var2;
  1746. if (StrEqual(classic_Particle[client], "", true) && StrEqual(classic_ParticlePoint[client], "", true))
  1747. {
  1748. AttachParticle(client, classic_Particle[client], classic_ParticlePoint[client]);
  1749. }
  1750. if (classic_InvTime[client] > 0.0)
  1751. {
  1752. TF2_AddCondition(client, 59, -1.0, 0);
  1753. TF2_AddCondition(client, 52, -1.0, 0);
  1754. new var6 = classic_RemainingUber[client];
  1755. var6 = var6[classic_InvTime[client]];
  1756. }
  1757. if (classic_StunTime[client] > 0.0)
  1758. {
  1759. TF2_StunPlayer(client, classic_StunTime[client], 1.0, 2, 0);
  1760. CreateTimer(classic_StunTime[client][0.1], 137, GetClientUserId(client), 2);
  1761. return 0;
  1762. }
  1763. }
  1764. enableClassic(client);
  1765. }
  1766. if (!(strcmp(ability_name[0], "ssb_bonezone_raid", true)))
  1767. {
  1768. new maxTargets = ride_MinionCount[client];
  1769. if (GetNumTargets(true, false, false, true, false, 2, false) < maxTargets)
  1770. {
  1771. maxTargets = GetNumTargets(true, false, false, true, false, 2, false);
  1772. }
  1773. if (maxTargets < 1)
  1774. {
  1775. return 0;
  1776. }
  1777. new Float:userPos[3] = 0.0;
  1778. GetClientAbsOrigin(client, userPos);
  1779. new num;
  1780. while (num < maxTargets)
  1781. {
  1782. new target = GetRandomInt(1, MaxClients);
  1783. if (IsValidMulti(target, true, false, false, true, false, 2, false))
  1784. {
  1785. CreateBoner(client, target, ride_MinionMode[client], true, ride_MinionInvTime[client], ride_BossIDX[client], ride_MinionClass[client], ride_RemoveWearables[client], ride_WeaponName[client], ride_WeaponStats[client], ride_WeaponIDX[client], ride_MinionModel[client], userPos);
  1786. num++;
  1787. }
  1788. }
  1789. CreateTimer(0.1, 183, GetClientUserId(client), 3);
  1790. numTimers_Ride[client]++;
  1791. }
  1792. if (!(strcmp(ability_name[0], "ssb_soulsteal", true)))
  1793. {
  1794. new var7 = drain_RemainingTime[client];
  1795. var7 = var7[drain_Duration[client]];
  1796. if (numTimers_Drain[client] < 1)
  1797. {
  1798. CreateTimer(0.1, 149, GetClientUserId(client), 3);
  1799. numTimers_Drain[client]++;
  1800. }
  1801. }
  1802. }
  1803. return 0;
  1804. }
  1805.  
  1806. public void:GiveRandomMannpower(client, Float:duration)
  1807. {
  1808. if (IsValidClient(client, true, true))
  1809. {
  1810. switch (GetRandomInt(1, 9))
  1811. {
  1812. case 1:
  1813. {
  1814. TF2_AddCondition(client, 90, duration, 0);
  1815. }
  1816. case 2:
  1817. {
  1818. TF2_AddCondition(client, 91, duration, 0);
  1819. }
  1820. case 3:
  1821. {
  1822. TF2_AddCondition(client, 92, duration, 0);
  1823. }
  1824. case 4:
  1825. {
  1826. TF2_AddCondition(client, 93, duration, 0);
  1827. }
  1828. case 5:
  1829. {
  1830. TF2_AddCondition(client, 94, duration, 0);
  1831. }
  1832. case 6:
  1833. {
  1834. GiveRandomMannpower(client, duration);
  1835. }
  1836. case 7:
  1837. {
  1838. TF2_AddCondition(client, 96, duration, 0);
  1839. }
  1840. case 8:
  1841. {
  1842. TF2_AddCondition(client, 97, duration, 0);
  1843. }
  1844. case 9:
  1845. {
  1846. TF2_AddCondition(client, 103, duration, 0);
  1847. }
  1848. default:
  1849. {
  1850. }
  1851. }
  1852. }
  1853. return 0;
  1854. }
  1855.  
  1856. public Action:OnPlayerRunCmd(client, &buttons, &_arg2, Float:_arg3[3], Float:_arg4[3], &_arg5, &_arg6, &_arg7, &_arg8, &_arg9, _arg10[2])
  1857. {
  1858. new bool:keyDown = buttons & 1 != 0;
  1859. new var1;
  1860. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_GetRoundState() == 1)
  1861. {
  1862. new var2;
  1863. if (keyDown && KeyDown[client])
  1864. {
  1865. new var3;
  1866. if (chaos_Active[client] && chaos_SpamType[client] && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_purechaos") && chaos_OnCooldown[client])
  1867. {
  1868. ShootSpell(client, 0);
  1869. chaos_OnCooldown[client] = 1;
  1870. CreateTimer(chaos_SpellCD[client], 133, GetClientUserId(client), 2);
  1871. }
  1872. new var4;
  1873. if (classic_Active[client] && classic_SpamType[client] && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_bonezone_classic") && classic_OnCooldown[client])
  1874. {
  1875. ShootSpell(client, 1);
  1876. classic_OnCooldown[client] = 1;
  1877. CreateTimer(classic_SpellCD[client], 143, GetClientUserId(client), 2);
  1878. }
  1879. }
  1880. }
  1881. return 0;
  1882. }
  1883.  
  1884. public void:OnPluginStart()
  1885. {
  1886. HookEvent("arena_round_start", 125, 1);
  1887. HookEvent("teamplay_round_win", 123, 1);
  1888. HookEvent("player_death", 167, 1);
  1889. HookEvent("post_inventory_application", 165, 1);
  1890. return 0;
  1891. }
  1892.  
  1893. public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype, &weapon, Float:damageForce[3], Float:damagePosition[3], damagecustom)
  1894. {
  1895. new var1;
  1896. if (IsValidMulti(victim, true, true, false, true, false, 2, false) && IsValidMulti(attacker, true, true, false, true, false, 2, false))
  1897. {
  1898. new var2;
  1899. if (TF2_IsPlayerInCondition(attacker, 36) && repo_HitDMG[attacker] > 0.0 && IsInvuln(victim))
  1900. {
  1901. if (repo_AlreadyHit[attacker][victim])
  1902. {
  1903. damage = 0;
  1904. return 1;
  1905. }
  1906. new dmg = RoundFloat(repo_HitDMG[attacker]);
  1907. new vicIDX = FF2_GetBossIndex(victim);
  1908. if (FF2_GetBossIndex(victim) != -1)
  1909. {
  1910. if (FF2_GetBossMaxHealth(vicIDX) * FF2_GetBossMaxLives(vicIDX) < dmg)
  1911. {
  1912. triggerRepo(attacker, victim);
  1913. damage = 0;
  1914. return 1;
  1915. }
  1916. }
  1917. else
  1918. {
  1919. if (GetClientHealth(victim) < dmg)
  1920. {
  1921. triggerRepo(attacker, victim);
  1922. damage = 0;
  1923. return 1;
  1924. }
  1925. }
  1926. damage = repo_HitDMG[attacker];
  1927. return 1;
  1928. }
  1929. if (chaos_Active[attacker])
  1930. {
  1931. new String:inf[1024];
  1932. GetEntityClassname(inflictor, inf, 255);
  1933. if (StrContains(inf, "tf_projectile_spell", true) != -1)
  1934. {
  1935. damage = damage * chaos_DMGMultiplier[attacker];
  1936. return 1;
  1937. }
  1938. }
  1939. if (classic_Active[attacker])
  1940. {
  1941. new String:inf[1024];
  1942. GetEntityClassname(inflictor, inf, 255);
  1943. if (StrContains(inf, "zombie", true))
  1944. {
  1945. damage = damage * classic_DMGMultiplier[attacker];
  1946. return 1;
  1947. }
  1948. }
  1949. if (FF2_HasAbility(FF2_GetBossIndex(victim), "ssb_raidpack", "ssb_bonezone_raid"))
  1950. {
  1951. new Float:mult = ride_GetMultiplier(victim);
  1952. if (1.0 != mult)
  1953. {
  1954. damage = damage * mult;
  1955. return 1;
  1956. }
  1957. }
  1958. }
  1959. return 0;
  1960. }
  1961.  
  1962. public Action:ShootSpell(client, mode)
  1963. {
  1964. if (IsValidMulti(client, true, true, true, true, false, 2, false))
  1965. {
  1966. new Float:vAngles[3] = 0.0;
  1967. new Float:vPosition[3] = 0.0;
  1968. GetClientEyeAngles(client, vAngles);
  1969. GetClientEyePosition(client, vPosition);
  1970. new String:strEntname[192];
  1971. if (mode == 1)
  1972. {
  1973. strEntname = "tf_projectile_spellspawnzombie";
  1974. }
  1975. else
  1976. {
  1977. new bool:spellSelected;
  1978. while (spellSelected)
  1979. {
  1980. switch (GetRandomInt(1, 8))
  1981. {
  1982. case 1:
  1983. {
  1984. if (chaos_Fireball[client])
  1985. {
  1986. strEntname = "tf_projectile_spellfireball";
  1987. spellSelected = true;
  1988. }
  1989. }
  1990. case 2:
  1991. {
  1992. if (chaos_Orb[client])
  1993. {
  1994. strEntname = "tf_projectile_lightningorb";
  1995. spellSelected = true;
  1996. }
  1997. }
  1998. case 3:
  1999. {
  2000. if (chaos_MIRV[client])
  2001. {
  2002. strEntname = "tf_projectile_spellmirv";
  2003. spellSelected = true;
  2004. }
  2005. }
  2006. case 4:
  2007. {
  2008. if (chaos_Pumpkin[client])
  2009. {
  2010. strEntname = "tf_projectile_spellpumpkin";
  2011. spellSelected = true;
  2012. }
  2013. }
  2014. case 5:
  2015. {
  2016. if (chaos_Bats[client])
  2017. {
  2018. strEntname = "tf_projectile_spellbats";
  2019. spellSelected = true;
  2020. }
  2021. }
  2022. case 6:
  2023. {
  2024. if (chaos_Meteor[client])
  2025. {
  2026. strEntname = "tf_projectile_spellmeteorshower";
  2027. spellSelected = true;
  2028. }
  2029. }
  2030. case 7:
  2031. {
  2032. if (chaos_Teleport[client])
  2033. {
  2034. strEntname = "tf_projectile_spelltransposeteleport";
  2035. spellSelected = true;
  2036. }
  2037. }
  2038. case 8:
  2039. {
  2040. if (chaos_Monoculus[client])
  2041. {
  2042. strEntname = "tf_projectile_spellspawnboss";
  2043. spellSelected = true;
  2044. }
  2045. }
  2046. default:
  2047. {
  2048. }
  2049. }
  2050. }
  2051. }
  2052. new iTeam = GetClientTeam(client);
  2053. new iSpell = CreateEntityByName(strEntname, -1);
  2054. if (IsValidEntity(iSpell))
  2055. {
  2056. decl Float:vVelocity[3];
  2057. decl Float:vBuffer[3];
  2058. GetAngleVectors(vAngles, vBuffer, NULL_VECTOR, NULL_VECTOR);
  2059. vVelocity[0] = vBuffer[0] * 1100.0;
  2060. vVelocity[1] = vBuffer[1] * 1100.0;
  2061. vVelocity[2] = vBuffer[2] * 1100.0;
  2062. SetEntPropEnt(iSpell, 0, "m_hOwnerEntity", client, 0);
  2063. new var1;
  2064. if (GetRandomInt(0, 100) <= 5)
  2065. {
  2066. var1 = 1;
  2067. }
  2068. else
  2069. {
  2070. var1 = 0;
  2071. }
  2072. SetEntProp(iSpell, 0, "m_bCritical", var1, 1, 0);
  2073. SetEntProp(iSpell, 0, "m_iTeamNum", iTeam, 1, 0);
  2074. SetEntProp(iSpell, 0, "m_nSkin", iTeam + -2, 4, 0);
  2075. TeleportEntity(iSpell, vPosition, vAngles, NULL_VECTOR);
  2076. SetVariantInt(iTeam);
  2077. AcceptEntityInput(iSpell, "TeamNum", -1, -1, 0);
  2078. SetVariantInt(iTeam);
  2079. AcceptEntityInput(iSpell, "SetTeam", -1, -1, 0);
  2080. DispatchSpawn(iSpell);
  2081. TeleportEntity(iSpell, NULL_VECTOR, NULL_VECTOR, vVelocity);
  2082. }
  2083. return 0;
  2084. }
  2085. return 0;
  2086. }
  2087.  
  2088. public Action:Timer_NecroMash_Hit(Handle:timer, any:pack)
  2089. {
  2090. ResetPack(pack, false);
  2091. new Float:pos[3] = 0.0;
  2092. pos[0] = ReadPackFloat(pack);
  2093. pos[1] = ReadPackFloat(pack);
  2094. pos[2] = ReadPackFloat(pack);
  2095. new attacker = ReadPackCell(pack);
  2096. new shaker = CreateEntityByName("env_shake", -1);
  2097. if (shaker != -1)
  2098. {
  2099. DispatchKeyValue(shaker, "amplitude", "10");
  2100. DispatchKeyValue(shaker, "radius", "1500");
  2101. DispatchKeyValue(shaker, "duration", "1");
  2102. DispatchKeyValue(shaker, "frequency", "2.5");
  2103. DispatchKeyValue(shaker, "spawnflags", "4");
  2104. DispatchKeyValueVector(shaker, "origin", pos);
  2105. DispatchSpawn(shaker);
  2106. AcceptEntityInput(shaker, "StartShake", -1, -1, 0);
  2107. CreateTimer(1.0, 171, shaker, 2);
  2108. }
  2109. EmitSoundToAll("ambient/explosions/explode_1.wav", -2, 0, 75, 0, 0.2, 100, -1, pos, NULL_VECTOR, true, 0.0);
  2110. EmitSoundToAll("misc/halloween/strongman_fast_impact_01.wav", -2, 0, 75, 0, 0.2, 100, -1, pos, NULL_VECTOR, true, 0.0);
  2111. new Float:pos2[3] = 0.0;
  2112. new Float:Vec[3] = 0.0;
  2113. new Float:AngBuff[3] = 0.0;
  2114. new i = 1;
  2115. while (i <= MaxClients)
  2116. {
  2117. new var1;
  2118. if (IsValidMulti(i, true, true, false, true, false, 2, false) && IsValidMulti(attacker, true, true, false, true, false, 2, false))
  2119. {
  2120. new var2;
  2121. if (TF2_GetClientTeam(attacker) == TF2_GetClientTeam(i) && mortis_FriendlyFire[attacker])
  2122. {
  2123. GetClientAbsOrigin(i, pos2);
  2124. if (GetVectorDistance(pos, pos2, false) <= mortis_Radius[attacker])
  2125. {
  2126. SDKHooks_TakeDamage(i, attacker, attacker, mortis_DMG[attacker], 8384, -1, NULL_VECTOR, NULL_VECTOR);
  2127. }
  2128. if (GetVectorDistance(pos2, pos, false) <= mortis_KB[attacker])
  2129. {
  2130. MakeVectorFromPoints(pos, pos2, Vec);
  2131. GetVectorAngles(Vec, AngBuff);
  2132. AngBuff[0] = AngBuff[0] - 30.0;
  2133. GetAngleVectors(AngBuff, Vec, NULL_VECTOR, NULL_VECTOR);
  2134. NormalizeVector(Vec, Vec);
  2135. ScaleVector(Vec, mortis_KB[attacker]);
  2136. Vec[2] += mortis_KB[attacker] * 0.5;
  2137. TeleportEntity(i, NULL_VECTOR, NULL_VECTOR, Vec);
  2138. }
  2139. }
  2140. }
  2141. i++;
  2142. }
  2143. pos[2] += 10.0;
  2144. NecroMash_CreateParticle("hammer_impact_button", pos);
  2145. NecroMash_CreateParticle("hammer_bones_kickup", pos);
  2146. return 0;
  2147. }
  2148.  
  2149. public Action:Timer_NecroMash_Whoosh(Handle:timer, any:pack)
  2150. {
  2151. ResetPack(pack, false);
  2152. new Float:pos[3] = 0.0;
  2153. pos[0] = ReadPackFloat(pack);
  2154. pos[1] = ReadPackFloat(pack);
  2155. pos[2] = ReadPackFloat(pack);
  2156. EmitSoundToAll("misc/halloween/strongman_fast_whoosh_01.wav", -2, 0, 75, 0, 0.25, 100, -1, pos, NULL_VECTOR, true, 0.0);
  2157. return 0;
  2158. }
  2159.  
  2160. public bool:TraceEntityFilterPlayer(entity, contentsMask)
  2161. {
  2162. return entity > MaxClients;
  2163. }
  2164.  
  2165. public void:__ext_core_SetNTVOptional()
  2166. {
  2167. MarkNativeAsOptional("GetFeatureStatus");
  2168. MarkNativeAsOptional("RequireFeature");
  2169. MarkNativeAsOptional("AddCommandListener");
  2170. MarkNativeAsOptional("RemoveCommandListener");
  2171. MarkNativeAsOptional("BfWriteBool");
  2172. MarkNativeAsOptional("BfWriteByte");
  2173. MarkNativeAsOptional("BfWriteChar");
  2174. MarkNativeAsOptional("BfWriteShort");
  2175. MarkNativeAsOptional("BfWriteWord");
  2176. MarkNativeAsOptional("BfWriteNum");
  2177. MarkNativeAsOptional("BfWriteFloat");
  2178. MarkNativeAsOptional("BfWriteString");
  2179. MarkNativeAsOptional("BfWriteEntity");
  2180. MarkNativeAsOptional("BfWriteAngle");
  2181. MarkNativeAsOptional("BfWriteCoord");
  2182. MarkNativeAsOptional("BfWriteVecCoord");
  2183. MarkNativeAsOptional("BfWriteVecNormal");
  2184. MarkNativeAsOptional("BfWriteAngles");
  2185. MarkNativeAsOptional("BfReadBool");
  2186. MarkNativeAsOptional("BfReadByte");
  2187. MarkNativeAsOptional("BfReadChar");
  2188. MarkNativeAsOptional("BfReadShort");
  2189. MarkNativeAsOptional("BfReadWord");
  2190. MarkNativeAsOptional("BfReadNum");
  2191. MarkNativeAsOptional("BfReadFloat");
  2192. MarkNativeAsOptional("BfReadString");
  2193. MarkNativeAsOptional("BfReadEntity");
  2194. MarkNativeAsOptional("BfReadAngle");
  2195. MarkNativeAsOptional("BfReadCoord");
  2196. MarkNativeAsOptional("BfReadVecCoord");
  2197. MarkNativeAsOptional("BfReadVecNormal");
  2198. MarkNativeAsOptional("BfReadAngles");
  2199. MarkNativeAsOptional("BfGetNumBytesLeft");
  2200. MarkNativeAsOptional("BfWrite.WriteBool");
  2201. MarkNativeAsOptional("BfWrite.WriteByte");
  2202. MarkNativeAsOptional("BfWrite.WriteChar");
  2203. MarkNativeAsOptional("BfWrite.WriteShort");
  2204. MarkNativeAsOptional("BfWrite.WriteWord");
  2205. MarkNativeAsOptional("BfWrite.WriteNum");
  2206. MarkNativeAsOptional("BfWrite.WriteFloat");
  2207. MarkNativeAsOptional("BfWrite.WriteString");
  2208. MarkNativeAsOptional("BfWrite.WriteEntity");
  2209. MarkNativeAsOptional("BfWrite.WriteAngle");
  2210. MarkNativeAsOptional("BfWrite.WriteCoord");
  2211. MarkNativeAsOptional("BfWrite.WriteVecCoord");
  2212. MarkNativeAsOptional("BfWrite.WriteVecNormal");
  2213. MarkNativeAsOptional("BfWrite.WriteAngles");
  2214. MarkNativeAsOptional("BfRead.ReadBool");
  2215. MarkNativeAsOptional("BfRead.ReadByte");
  2216. MarkNativeAsOptional("BfRead.ReadChar");
  2217. MarkNativeAsOptional("BfRead.ReadShort");
  2218. MarkNativeAsOptional("BfRead.ReadWord");
  2219. MarkNativeAsOptional("BfRead.ReadNum");
  2220. MarkNativeAsOptional("BfRead.ReadFloat");
  2221. MarkNativeAsOptional("BfRead.ReadString");
  2222. MarkNativeAsOptional("BfRead.ReadEntity");
  2223. MarkNativeAsOptional("BfRead.ReadAngle");
  2224. MarkNativeAsOptional("BfRead.ReadCoord");
  2225. MarkNativeAsOptional("BfRead.ReadVecCoord");
  2226. MarkNativeAsOptional("BfRead.ReadVecNormal");
  2227. MarkNativeAsOptional("BfRead.ReadAngles");
  2228. MarkNativeAsOptional("BfRead.BytesLeft.get");
  2229. MarkNativeAsOptional("PbReadInt");
  2230. MarkNativeAsOptional("PbReadFloat");
  2231. MarkNativeAsOptional("PbReadBool");
  2232. MarkNativeAsOptional("PbReadString");
  2233. MarkNativeAsOptional("PbReadColor");
  2234. MarkNativeAsOptional("PbReadAngle");
  2235. MarkNativeAsOptional("PbReadVector");
  2236. MarkNativeAsOptional("PbReadVector2D");
  2237. MarkNativeAsOptional("PbGetRepeatedFieldCount");
  2238. MarkNativeAsOptional("PbSetInt");
  2239. MarkNativeAsOptional("PbSetFloat");
  2240. MarkNativeAsOptional("PbSetBool");
  2241. MarkNativeAsOptional("PbSetString");
  2242. MarkNativeAsOptional("PbSetColor");
  2243. MarkNativeAsOptional("PbSetAngle");
  2244. MarkNativeAsOptional("PbSetVector");
  2245. MarkNativeAsOptional("PbSetVector2D");
  2246. MarkNativeAsOptional("PbAddInt");
  2247. MarkNativeAsOptional("PbAddFloat");
  2248. MarkNativeAsOptional("PbAddBool");
  2249. MarkNativeAsOptional("PbAddString");
  2250. MarkNativeAsOptional("PbAddColor");
  2251. MarkNativeAsOptional("PbAddAngle");
  2252. MarkNativeAsOptional("PbAddVector");
  2253. MarkNativeAsOptional("PbAddVector2D");
  2254. MarkNativeAsOptional("PbRemoveRepeatedFieldValue");
  2255. MarkNativeAsOptional("PbReadMessage");
  2256. MarkNativeAsOptional("PbReadRepeatedMessage");
  2257. MarkNativeAsOptional("PbAddMessage");
  2258. MarkNativeAsOptional("Protobuf.ReadInt");
  2259. MarkNativeAsOptional("Protobuf.ReadInt64");
  2260. MarkNativeAsOptional("Protobuf.ReadFloat");
  2261. MarkNativeAsOptional("Protobuf.ReadBool");
  2262. MarkNativeAsOptional("Protobuf.ReadString");
  2263. MarkNativeAsOptional("Protobuf.ReadColor");
  2264. MarkNativeAsOptional("Protobuf.ReadAngle");
  2265. MarkNativeAsOptional("Protobuf.ReadVector");
  2266. MarkNativeAsOptional("Protobuf.ReadVector2D");
  2267. MarkNativeAsOptional("Protobuf.GetRepeatedFieldCount");
  2268. MarkNativeAsOptional("Protobuf.SetInt");
  2269. MarkNativeAsOptional("Protobuf.SetInt64");
  2270. MarkNativeAsOptional("Protobuf.SetFloat");
  2271. MarkNativeAsOptional("Protobuf.SetBool");
  2272. MarkNativeAsOptional("Protobuf.SetString");
  2273. MarkNativeAsOptional("Protobuf.SetColor");
  2274. MarkNativeAsOptional("Protobuf.SetAngle");
  2275. MarkNativeAsOptional("Protobuf.SetVector");
  2276. MarkNativeAsOptional("Protobuf.SetVector2D");
  2277. MarkNativeAsOptional("Protobuf.AddInt");
  2278. MarkNativeAsOptional("Protobuf.AddInt64");
  2279. MarkNativeAsOptional("Protobuf.AddFloat");
  2280. MarkNativeAsOptional("Protobuf.AddBool");
  2281. MarkNativeAsOptional("Protobuf.AddString");
  2282. MarkNativeAsOptional("Protobuf.AddColor");
  2283. MarkNativeAsOptional("Protobuf.AddAngle");
  2284. MarkNativeAsOptional("Protobuf.AddVector");
  2285. MarkNativeAsOptional("Protobuf.AddVector2D");
  2286. MarkNativeAsOptional("Protobuf.RemoveRepeatedFieldValue");
  2287. MarkNativeAsOptional("Protobuf.ReadMessage");
  2288. MarkNativeAsOptional("Protobuf.ReadRepeatedMessage");
  2289. MarkNativeAsOptional("Protobuf.AddMessage");
  2290. VerifyCoreVersion();
  2291. return 0;
  2292. }
  2293.  
  2294. public void:activateMortis(client)
  2295. {
  2296. new var1;
  2297. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_mortis"))
  2298. {
  2299. if (mortis_Type[client] != 2)
  2300. {
  2301. new numTargs;
  2302. if (mortis_FriendlyFire[client])
  2303. {
  2304. numTargs = RoundFloat(5*0(mortis_Percent[client], GetNumTargets(true, true, false, true, false, 2, false)));
  2305. }
  2306. else
  2307. {
  2308. new TFTeam:targTeam = grabEnemyTeam(client);
  2309. numTargs = RoundFloat(5*0(mortis_Percent[client], GetNumTargets(true, true, false, true, true, targTeam, false)));
  2310. }
  2311. new smashTarget = GetRandomInt(1, MaxClients);
  2312. new numSmashed;
  2313. while (numSmashed <= numTargs)
  2314. {
  2315. new var2;
  2316. if (IsValidMulti(smashTarget, true, true, false, true, false, 2, false) && mortis_Active[client][smashTarget])
  2317. {
  2318. new var3;
  2319. if (mortis_FriendlyFire[client] || TF2_GetClientTeam(client) == TF2_GetClientTeam(smashTarget))
  2320. {
  2321. if (mortis_Type[client])
  2322. {
  2323. mortis_Active[client][smashTarget] = true;
  2324. }
  2325. else
  2326. {
  2327. TF2_StunPlayer(smashTarget, 5.0, 1.0, 2, client);
  2328. NecroMash_SmashClient(smashTarget, client);
  2329. }
  2330. numSmashed++;
  2331. }
  2332. }
  2333. smashTarget = GetRandomInt(1, MaxClients);
  2334. }
  2335. }
  2336. if (mortis_Type[client])
  2337. {
  2338. new var4 = mortis_RemainingSmashes[client];
  2339. var4 = mortis_SmashCount[client][var4];
  2340. if (numTimers_Mortis[client] < 1)
  2341. {
  2342. CreateTimer(mortis_Time[client], 161, GetClientUserId(client), 3);
  2343. numTimers_Mortis[client]++;
  2344. }
  2345. }
  2346. }
  2347. return 0;
  2348. }
  2349.  
  2350. public void:bonerEnd(Event:hEvent, String:sEvName[], bool:bDontBroadcast)
  2351. {
  2352. new client = 1;
  2353. while (client <= MaxClients)
  2354. {
  2355. if (IsValidClient(client, true, true))
  2356. {
  2357. destroyEverything(client);
  2358. }
  2359. client++;
  2360. }
  2361. return 0;
  2362. }
  2363.  
  2364. public void:bonerStart(Event:hEvent, String:sEvName[], bool:bDontBroadcast)
  2365. {
  2366. new client = 1;
  2367. while (client <= MaxClients)
  2368. {
  2369. if (IsValidMulti(client, true, true, true, true, false, 2, false))
  2370. {
  2371. checkArgs(client);
  2372. }
  2373. client++;
  2374. }
  2375. return 0;
  2376. }
  2377.  
  2378. public Action:chaosStun(Handle:chaosStun, id)
  2379. {
  2380. new client = GetClientOfUserId(id);
  2381. if (IsValidMulti(client, true, true, true, true, false, 2, false))
  2382. {
  2383. if (chaos_RemainingUber[client] > 0.0)
  2384. {
  2385. new var1 = chaos_RemainingUber[client];
  2386. var1 = var1[-5(chaos_StunTime[client])];
  2387. if (chaos_RemainingUber[client] < 0.1)
  2388. {
  2389. TF2_RemoveCondition(client, 59);
  2390. TF2_RemoveCondition(client, 52);
  2391. chaos_RemainingUber[client] = 0;
  2392. }
  2393. }
  2394. enableChaos(client);
  2395. }
  2396. return 0;
  2397. }
  2398.  
  2399. public Action:chaosTimer(Handle:chaosTimer, id)
  2400. {
  2401. new client = GetClientOfUserId(id);
  2402. new var1;
  2403. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(client, "ssb_raidpack", "ssb_purechaos") && chaos_RemainingTime[client] >= 0.1 && numTimers_Chaos[client] <= 1)
  2404. {
  2405. if (!(StrEqual(chaos_HUD[client], "", true)))
  2406. {
  2407. SetHudTextParams(-1.0, 0.7, 0.1, 0, 255, 120, 255, 0, 6.0, 0.1, 0.2);
  2408. ShowHudText(client, -1, chaos_HUD[client]);
  2409. }
  2410. if (chaos_RemainingUber[client] > 0.0)
  2411. {
  2412. new var2 = chaos_RemainingUber[client];
  2413. var2 = var2[-0.1];
  2414. if (chaos_RemainingUber[client] < 0.1)
  2415. {
  2416. TF2_RemoveCondition(client, 59);
  2417. TF2_RemoveCondition(client, 52);
  2418. chaos_RemainingUber[client] = 0;
  2419. }
  2420. }
  2421. new var3 = chaos_RemainingTime[client];
  2422. var3 = var3[-0.1];
  2423. if (chaos_RemainingTime[client] < 0.1)
  2424. {
  2425. chaos_Active[client] = 0;
  2426. chaos_RemainingTime[client] = 0;
  2427. DeleteParticle(client);
  2428. if (chaos_RemainingUber[client] > 0.1)
  2429. {
  2430. TF2_RemoveCondition(client, 59);
  2431. TF2_RemoveCondition(client, 52);
  2432. TF2_AddCondition(client, 59, chaos_RemainingUber[client], 0);
  2433. TF2_AddCondition(client, 52, chaos_RemainingUber[client], 0);
  2434. chaos_RemainingUber[client] = 0;
  2435. }
  2436. }
  2437. return 0;
  2438. }
  2439. numTimers_Chaos[client] += -1;
  2440. KillTimer(chaosTimer, false);
  2441. return 0;
  2442. }
  2443.  
  2444. public Action:chaos_AutoFire(Handle:chaos_AutoFire, id)
  2445. {
  2446. new client = GetClientOfUserId(id);
  2447. new var1;
  2448. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(client, "ssb_raidpack", "ssb_purechaos") && chaos_RemainingTime[client] >= 0.1 && numTimers_Chaos[client] <= 1)
  2449. {
  2450. if (!(StrEqual(chaos_HUD[client], "", true)))
  2451. {
  2452. SetHudTextParams(-1.0, 0.75, chaos_SpellCD[client], 0, 255, 120, 255, 0, 6.0, 0.1, 0.2);
  2453. ShowHudText(client, -1, chaos_HUD[client]);
  2454. }
  2455. if (chaos_RemainingUber[client] > 0.0)
  2456. {
  2457. new var2 = chaos_RemainingUber[client];
  2458. var2 = var2[-5(chaos_SpellCD[client])];
  2459. if (chaos_RemainingUber[client] < 0.1)
  2460. {
  2461. TF2_RemoveCondition(client, 59);
  2462. TF2_RemoveCondition(client, 52);
  2463. chaos_RemainingUber[client] = 0;
  2464. }
  2465. }
  2466. new var3 = chaos_RemainingTime[client];
  2467. var3 = var3[-5(chaos_SpellCD[client])];
  2468. if (chaos_RemainingTime[client] < 0.1)
  2469. {
  2470. chaos_Active[client] = 0;
  2471. chaos_RemainingTime[client] = 0;
  2472. DeleteParticle(client);
  2473. if (chaos_RemainingUber[client] > 0.1)
  2474. {
  2475. TF2_RemoveCondition(client, 59);
  2476. TF2_RemoveCondition(client, 52);
  2477. TF2_AddCondition(client, 59, chaos_RemainingUber[client], 0);
  2478. TF2_AddCondition(client, 52, chaos_RemainingUber[client], 0);
  2479. chaos_RemainingUber[client] = 0;
  2480. }
  2481. }
  2482. ShootSpell(client, 0);
  2483. return 0;
  2484. }
  2485. numTimers_Chaos[client] += -1;
  2486. KillTimer(chaos_AutoFire, false);
  2487. return 0;
  2488. }
  2489.  
  2490. public Action:chaos_RemoveCooldown(Handle:chaos_RemoveCooldown, id)
  2491. {
  2492. new client = GetClientOfUserId(id);
  2493. new var1;
  2494. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_purechaos"))
  2495. {
  2496. chaos_OnCooldown[client] = 0;
  2497. }
  2498. return 0;
  2499. }
  2500.  
  2501. public void:checkArgs(client)
  2502. {
  2503. if (IsValidMulti(client, true, true, true, true, false, 2, false))
  2504. {
  2505. new idx = FF2_GetBossIndex(client);
  2506. if (FF2_HasAbility(idx, "ssb_raidpack", "ssb_mortis"))
  2507. {
  2508. setMortisArgs(client);
  2509. }
  2510. if (FF2_HasAbility(idx, "ssb_raidpack", "ssb_rip"))
  2511. {
  2512. setRipArgs(client);
  2513. }
  2514. if (FF2_HasAbility(idx, "ssb_raidpack", "ssb_calciumrepo"))
  2515. {
  2516. setRepoArgs(client);
  2517. }
  2518. if (FF2_HasAbility(idx, "ssb_raidpack", "ssb_purechaos"))
  2519. {
  2520. setChaosArgs(client);
  2521. }
  2522. if (FF2_HasAbility(idx, "ssb_raidpack", "ssb_bonezone_classic"))
  2523. {
  2524. setClassicArgs(client);
  2525. }
  2526. if (FF2_HasAbility(idx, "ssb_raidpack", "ssb_bonezone_raid"))
  2527. {
  2528. setRideArgs(client);
  2529. }
  2530. if (FF2_HasAbility(idx, "ssb_raidpack", "ssb_soulsteal"))
  2531. {
  2532. setDrainArgs(client);
  2533. }
  2534. }
  2535. return 0;
  2536. }
  2537.  
  2538. public Action:classicStun(Handle:chaosStun, id)
  2539. {
  2540. new client = GetClientOfUserId(id);
  2541. if (IsValidMulti(client, true, true, true, true, false, 2, false))
  2542. {
  2543. if (classic_RemainingUber[client] > 0.0)
  2544. {
  2545. new var1 = classic_RemainingUber[client];
  2546. var1 = var1[-5(classic_StunTime[client])];
  2547. if (classic_RemainingUber[client] < 0.1)
  2548. {
  2549. TF2_RemoveCondition(client, 59);
  2550. TF2_RemoveCondition(client, 52);
  2551. classic_RemainingUber[client] = 0;
  2552. }
  2553. }
  2554. enableClassic(client);
  2555. }
  2556. return 0;
  2557. }
  2558.  
  2559. public Action:classicTimer(Handle:classicTimer, id)
  2560. {
  2561. new client = GetClientOfUserId(id);
  2562. new var1;
  2563. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(client, "ssb_raidpack", "ssb_bonezone_classic") && classic_RemainingTime[client] >= 0.1 && numTimers_Classic[client] <= 1)
  2564. {
  2565. if (!(StrEqual(classic_HUD[client], "", true)))
  2566. {
  2567. SetHudTextParams(-1.0, 0.7, 0.1, 0, 255, 120, 255, 0, 6.0, 0.1, 0.2);
  2568. ShowHudText(client, -1, classic_HUD[client]);
  2569. }
  2570. if (classic_RemainingUber[client] > 0.0)
  2571. {
  2572. new var2 = classic_RemainingUber[client];
  2573. var2 = var2[-0.1];
  2574. if (classic_RemainingUber[client] < 0.1)
  2575. {
  2576. TF2_RemoveCondition(client, 59);
  2577. TF2_RemoveCondition(client, 52);
  2578. classic_RemainingUber[client] = 0;
  2579. }
  2580. }
  2581. new var3 = classic_RemainingTime[client];
  2582. var3 = var3[-0.1];
  2583. if (classic_RemainingTime[client] < 0.1)
  2584. {
  2585. classic_Active[client] = 0;
  2586. classic_RemainingTime[client] = 0;
  2587. DeleteParticle(client);
  2588. if (classic_RemainingUber[client] > 0.1)
  2589. {
  2590. TF2_RemoveCondition(client, 59);
  2591. TF2_RemoveCondition(client, 52);
  2592. TF2_AddCondition(client, 59, classic_RemainingUber[client], 0);
  2593. TF2_AddCondition(client, 52, classic_RemainingUber[client], 0);
  2594. classic_RemainingUber[client] = 0;
  2595. }
  2596. }
  2597. return 0;
  2598. }
  2599. numTimers_Classic[client] += -1;
  2600. KillTimer(classicTimer, false);
  2601. return 0;
  2602. }
  2603.  
  2604. public Action:classic_AutoFire(Handle:classic_AutoFire, id)
  2605. {
  2606. new client = GetClientOfUserId(id);
  2607. new var1;
  2608. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(client, "ssb_raidpack", "ssb_bonezone_classic") && classic_RemainingTime[client] >= 0.1 && numTimers_Classic[client] <= 1)
  2609. {
  2610. if (!(StrEqual(classic_HUD[client], "", true)))
  2611. {
  2612. SetHudTextParams(-1.0, 0.75, classic_SpellCD[client], 0, 255, 120, 255, 0, 6.0, 0.1, 0.2);
  2613. ShowHudText(client, -1, classic_HUD[client]);
  2614. }
  2615. if (classic_RemainingUber[client] > 0.0)
  2616. {
  2617. new var2 = classic_RemainingUber[client];
  2618. var2 = var2[-5(classic_SpellCD[client])];
  2619. if (classic_RemainingUber[client] < 0.1)
  2620. {
  2621. TF2_RemoveCondition(client, 59);
  2622. TF2_RemoveCondition(client, 52);
  2623. classic_RemainingUber[client] = 0;
  2624. }
  2625. }
  2626. new var3 = classic_RemainingTime[client];
  2627. var3 = var3[-5(classic_SpellCD[client])];
  2628. if (classic_RemainingTime[client] < 0.1)
  2629. {
  2630. classic_Active[client] = 0;
  2631. classic_RemainingTime[client] = 0;
  2632. DeleteParticle(client);
  2633. if (classic_RemainingUber[client] > 0.1)
  2634. {
  2635. TF2_RemoveCondition(client, 59);
  2636. TF2_RemoveCondition(client, 52);
  2637. TF2_AddCondition(client, 59, classic_RemainingUber[client], 0);
  2638. TF2_AddCondition(client, 52, classic_RemainingUber[client], 0);
  2639. classic_RemainingUber[client] = 0;
  2640. }
  2641. }
  2642. ShootSpell(client, 1);
  2643. return 0;
  2644. }
  2645. numTimers_Classic[client] += -1;
  2646. KillTimer(classic_AutoFire, false);
  2647. return 0;
  2648. }
  2649.  
  2650. public Action:classic_RemoveCooldown(Handle:classic_RemoveCooldown, id)
  2651. {
  2652. new client = GetClientOfUserId(id);
  2653. new var1;
  2654. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_bonezone_classic"))
  2655. {
  2656. classic_OnCooldown[client] = 0;
  2657. }
  2658. return 0;
  2659. }
  2660.  
  2661. public Action:classic_Summon(Handle:classic_Summon, any:pack)
  2662. {
  2663. ResetPack(pack, false);
  2664. new attacker = GetClientOfUserId(ReadPackCell(pack));
  2665. new victim = GetClientOfUserId(ReadPackCell(pack));
  2666. new var1;
  2667. if (IsValidMulti(attacker, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(attacker), "ssb_raidpack", "ssb_bonezone_classic") && IsValidClient(victim, true, true))
  2668. {
  2669. new Float:vicLoc[3] = 0.0;
  2670. GetClientAbsOrigin(victim, vicLoc);
  2671. CreateBoner(attacker, victim, classic_MinionMode[attacker], false, classic_MinionInvTime[attacker], classic_BossIDX[attacker], classic_MinionClass[attacker], classic_RemoveWearables[attacker], classic_WeaponName[attacker], classic_WeaponStats[attacker], classic_WeaponIDX[attacker], classic_MinionModel[attacker], vicLoc);
  2672. }
  2673. return 0;
  2674. }
  2675.  
  2676. public void:destroyEverything(client)
  2677. {
  2678. if (IsValidClient(client, true, true))
  2679. {
  2680. mortis_Type[client] = 0;
  2681. mortis_SmashCount[client] = 0;
  2682. mortis_BlockType[client] = 0;
  2683. mortis_RemainingSmashes[client] = 0;
  2684. mortis_Percent[client] = 0;
  2685. mortis_Time[client] = 0;
  2686. mortis_DMG[client] = 0;
  2687. mortis_Radius[client] = 0;
  2688. mortis_WarningTime[client] = 0;
  2689. mortis_KB[client] = 0;
  2690. mortis_FriendlyFire[client] = 0;
  2691. rip_MaxHitsPerTarget[client] = 0;
  2692. rip_BlockType[client] = 0;
  2693. rip_ClassAnims[client] = 0;
  2694. rip_Duration[client] = 0;
  2695. rip_RemainingTime[client] = 0;
  2696. rip_DMG[client] = 0;
  2697. rip_ContactDMGCD[client] = 0;
  2698. rip_KB[client] = 0;
  2699. rip_MaxSpeed[client] = 0;
  2700. rip_Radius[client] = 0;
  2701. rip_IgnoreUber[client] = 0;
  2702. repo_MinionMode[client] = -1;
  2703. repo_WeaponIndex[client] = 0;
  2704. repo_MaxHits[client] = 0;
  2705. repo_HitCounter[client] = 0;
  2706. repo_BlockType[client] = 0;
  2707. repo_Class[client] = 0;
  2708. repo_Duration[client] = 0;
  2709. repo_RemainingTime[client] = 0;
  2710. repo_HitDMG[client] = 0;
  2711. repo_BombTimer[client] = 0;
  2712. repo_BombDMG[client] = 0;
  2713. repo_BombRadius[client] = 0;
  2714. repo_MinionInvuln[client] = 0;
  2715. repo_RemoveWearables[client] = 0;
  2716. repo_AboutToExplode[client] = 0;
  2717. repo_SummonerRadius[client] = 0;
  2718. chaos_SpamType[client] = 0;
  2719. chaos_BlockType[client] = 0;
  2720. chaos_StunTime[client] = 0;
  2721. chaos_InvTime[client] = 0;
  2722. chaos_Duration[client] = 0;
  2723. chaos_SpellCD[client] = 0;
  2724. chaos_DMGMultiplier[client] = 0;
  2725. chaos_RemainingTime[client] = 0;
  2726. chaos_RemainingUber[client] = 0;
  2727. chaos_Active[client] = 0;
  2728. chaos_Fireball[client] = 0;
  2729. chaos_Orb[client] = 0;
  2730. chaos_MIRV[client] = 0;
  2731. chaos_Pumpkin[client] = 0;
  2732. chaos_Bats[client] = 0;
  2733. chaos_Meteor[client] = 0;
  2734. chaos_Teleport[client] = 0;
  2735. chaos_Monoculus[client] = 0;
  2736. chaos_OnCooldown[client] = 0;
  2737. classic_SpamType[client] = 0;
  2738. classic_MinionMode[client] = 0;
  2739. classic_BossIDX[client] = 0;
  2740. classic_WeaponIDX[client] = 0;
  2741. classic_BlockType[client] = 0;
  2742. classic_MinionClass[client] = 0;
  2743. classic_StunTime[client] = 0;
  2744. classic_InvTime[client] = 0;
  2745. classic_RemainingUber[client] = 0;
  2746. classic_Duration[client] = 0;
  2747. classic_RemainingTime[client] = 0;
  2748. classic_SpellCD[client] = 0;
  2749. classic_MannpowerTime[client] = 0;
  2750. classic_MinionInvTime[client] = 0;
  2751. classic_DMGMultiplier[client] = 0;
  2752. classic_RemoveWearables[client] = 0;
  2753. classic_OnCooldown[client] = 0;
  2754. ride_MinionCount[client] = 0;
  2755. ride_MinionMode[client] = 0;
  2756. ride_BossIDX[client] = 0;
  2757. ride_WeaponIDX[client] = 0;
  2758. ride_BlockType[client] = 0;
  2759. ride_Summoner[client] = 0;
  2760. ride_MinionClass[client] = 0;
  2761. ride_DMGReduction[client] = 0;
  2762. ride_MinionInvTime[client] = 0;
  2763. ride_RemoveWearables[client] = 0;
  2764. drain_BlockType[client] = 0;
  2765. drain_Radius[client] = 0;
  2766. drain_DMG[client] = 0;
  2767. drain_Heal[client] = 0;
  2768. drain_Duration[client] = 0;
  2769. drain_RemainingTime[client] = 0;
  2770. drain_CanOverheal[client] = 0;
  2771. strcopy(rip_Model[client], 256, "");
  2772. strcopy(rip_NormalModel[client], 256, "");
  2773. strcopy(repo_MinionModel[client], 256, "");
  2774. strcopy(repo_HitSound[client], 256, "");
  2775. strcopy(repo_GibSound[client], 256, "");
  2776. strcopy(repo_WeaponName[client], 64, "");
  2777. strcopy(repo_WeaponStats[client], 255, "");
  2778. strcopy(chaos_HUD[client], 255, "");
  2779. strcopy(chaos_Particle[client], 255, "");
  2780. strcopy(chaos_ParticlePoint[client], 255, "");
  2781. strcopy(classic_MinionModel[client], 256, "");
  2782. strcopy(classic_WeaponName[client], 255, "");
  2783. strcopy(classic_WeaponStats[client], 255, "");
  2784. strcopy(classic_HUD[client], 255, "");
  2785. strcopy(classic_Particle[client], 255, "");
  2786. strcopy(classic_ParticlePoint[client], 255, "");
  2787. strcopy(ride_MinionModel[client], 256, "");
  2788. strcopy(ride_WeaponName[client], 255, "");
  2789. strcopy(ride_WeaponStats[client], 255, "");
  2790. strcopy(drain_HUD[client], 255, "");
  2791. new i = 1;
  2792. while (i <= MaxClients)
  2793. {
  2794. mortis_Active[client][i] = false;
  2795. mortis_Active[i][client] = false;
  2796. rip_CanBeHitByPlayer[client][i] = true;
  2797. rip_CanBeHitByPlayer[i][client] = true;
  2798. repo_AlreadyHit[client][i] = false;
  2799. repo_AlreadyHit[i][client] = false;
  2800. rip_HitCounter[client][i] = 0;
  2801. rip_HitCounter[i][client] = 0;
  2802. i++;
  2803. }
  2804. SDKUnhook(client, 2, 109);
  2805. SDKUnhook(client, 4, 187);
  2806. DeleteParticle(client);
  2807. }
  2808. return 0;
  2809. }
  2810.  
  2811. public Action:drainTimer(Handle:drainTimer, id)
  2812. {
  2813. new client = GetClientOfUserId(id);
  2814. new var1;
  2815. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_soulsteal") && drain_RemainingTime[client] >= 0.1 && numTimers_Drain[client] <= 1)
  2816. {
  2817. if (!(StrEqual(drain_HUD[client], "", true)))
  2818. {
  2819. SetHudTextParams(-1.0, 0.7, 0.1, 0, 255, 120, 255, 0, 6.0, 0.1, 0.2);
  2820. ShowHudText(client, -1, drain_HUD[client]);
  2821. }
  2822. if (GetClientButtons(client) & 1)
  2823. {
  2824. new TFTeam:targTeam = grabEnemyTeam(client);
  2825. new Float:userPos[3] = 0.0;
  2826. GetClientAbsOrigin(client, userPos);
  2827. new i = 1;
  2828. while (i <= MaxClients)
  2829. {
  2830. if (IsValidMulti(i, true, true, false, true, true, targTeam, false))
  2831. {
  2832. new Float:vicPos[3] = 0.0;
  2833. GetClientAbsOrigin(i, vicPos);
  2834. if (GetVectorDistance(userPos, vicPos, false) <= drain_Radius[client])
  2835. {
  2836. drain_DealDamage(client, i);
  2837. }
  2838. }
  2839. i++;
  2840. }
  2841. }
  2842. else
  2843. {
  2844. CPrintToChatAll("{red}%N is not holding m1 allegedly", client);
  2845. }
  2846. new var2 = drain_RemainingTime[client];
  2847. var2 = var2[-0.1];
  2848. if (drain_RemainingTime[client] < 0.1)
  2849. {
  2850. drain_RemainingTime[client] = 0;
  2851. }
  2852. return 0;
  2853. }
  2854. numTimers_Drain[client] += -1;
  2855. KillTimer(drainTimer, false);
  2856. return 0;
  2857. }
  2858.  
  2859. public void:drain_DealDamage(attacker, victim)
  2860. {
  2861. new var1;
  2862. if (IsValidMulti(attacker, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(attacker), "ssb_raidpack", "ssb_soulsteal") && IsValidMulti(victim, true, true, false, true, false, 2, false) && IsInvuln(victim))
  2863. {
  2864. new Float:dmg = drain_DMG[attacker];
  2865. SDKHooks_TakeDamage(victim, attacker, attacker, dmg, 16777216, -1, NULL_VECTOR, NULL_VECTOR);
  2866. spawnBeam(attacker, victim, 0.1, 0, 255, 120, 255, "materials/particle/bendibeam.vmt");
  2867. new heal = RoundFloat(drain_Heal[attacker] * dmg);
  2868. if (0 < heal)
  2869. {
  2870. new idx = FF2_GetBossIndex(attacker);
  2871. new hp = FF2_GetBossHealth(idx);
  2872. new var2;
  2873. if (heal + hp >= FF2_GetBossMaxHealth(idx) && drain_CanOverheal[attacker])
  2874. {
  2875. FF2_SetBossHealth(idx, FF2_GetBossMaxHealth(idx));
  2876. }
  2877. else
  2878. {
  2879. FF2_SetBossHealth(idx, heal + hp);
  2880. }
  2881. }
  2882. }
  2883. return 0;
  2884. }
  2885.  
  2886. public void:enableChaos(client)
  2887. {
  2888. new var1;
  2889. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(client, "ssb_raidpack", "ssb_purechaos"))
  2890. {
  2891. new var2;
  2892. if (chaos_Fireball[client] && chaos_Orb[client] && chaos_MIRV[client] && chaos_Pumpkin[client] && chaos_Bats[client] && chaos_Meteor[client] && chaos_Teleport[client] && chaos_Monoculus[client])
  2893. {
  2894. FF2_LogError("[Supreme Spookmaster Pack] Error: a player has Pure Chaos enabled, but their config has blocked all spells. Aborting skill...");
  2895. return 0;
  2896. }
  2897. chaos_Active[client] = 1;
  2898. new var3 = chaos_RemainingTime[client];
  2899. var3 = var3[chaos_Duration[client]];
  2900. if (numTimers_Chaos[client] < 1)
  2901. {
  2902. if (chaos_SpamType[client])
  2903. {
  2904. CreateTimer(chaos_SpellCD[client], 131, GetClientUserId(client), 3);
  2905. }
  2906. else
  2907. {
  2908. CreateTimer(0.1, 129, GetClientUserId(client), 3);
  2909. }
  2910. numTimers_Chaos[client]++;
  2911. }
  2912. }
  2913. return 0;
  2914. }
  2915.  
  2916. public void:enableClassic(client)
  2917. {
  2918. new var1;
  2919. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(client, "ssb_raidpack", "ssb_bonezone_classic"))
  2920. {
  2921. classic_Active[client] = 1;
  2922. new var2 = classic_RemainingTime[client];
  2923. var2 = var2[classic_Duration[client]];
  2924. if (numTimers_Classic[client] < 1)
  2925. {
  2926. if (classic_SpamType[client])
  2927. {
  2928. CreateTimer(classic_SpellCD[client], 141, GetClientUserId(client), 3);
  2929. }
  2930. else
  2931. {
  2932. CreateTimer(0.1, 139, GetClientUserId(client), 3);
  2933. }
  2934. numTimers_Classic[client]++;
  2935. }
  2936. }
  2937. return 0;
  2938. }
  2939.  
  2940. public void:endRIP(client)
  2941. {
  2942. if (IsValidMulti(client, true, true, true, true, false, 2, false))
  2943. {
  2944. new i = 1;
  2945. while (i <= MaxClients)
  2946. {
  2947. rip_CanBeHitByPlayer[client][i] = true;
  2948. rip_HitCounter[client][i] = 0;
  2949. i++;
  2950. }
  2951. new String:testModel[1024];
  2952. new String:path[1024];
  2953. GetClientModel(client, testModel, 256);
  2954. Format(path, 256, "models/%s", rip_Model[client]);
  2955. new var1;
  2956. if (StrEqual(path, testModel, true) && FileExists(rip_NormalModel[client], false, "GAME"))
  2957. {
  2958. SetVariantString(rip_NormalModel[client]);
  2959. AcceptEntityInput(client, "SetCustomModel", -1, -1, 0);
  2960. SetEntProp(client, 0, "m_bUseClassAnimations", 1, 4, 0);
  2961. }
  2962. TF2_RemoveCondition(client, 28);
  2963. SDKUnhook(client, 4, 187);
  2964. }
  2965. return 0;
  2966. }
  2967.  
  2968. public Action:letItRip(Handle:letItRip, id)
  2969. {
  2970. new client = GetClientOfUserId(id);
  2971. new var1;
  2972. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_rip") && numTimers_Rip[client] <= 1 && rip_RemainingTime[client] >= 0.1)
  2973. {
  2974. new Float:userPos[3] = 0.0;
  2975. GetClientAbsOrigin(client, userPos);
  2976. new TFTeam:targTeam = grabEnemyTeam(client);
  2977. new i = 1;
  2978. while (i <= MaxClients)
  2979. {
  2980. if (IsValidMulti(i, true, true, false, true, true, targTeam, false))
  2981. {
  2982. new Float:targPos[3] = 0.0;
  2983. GetClientAbsOrigin(i, targPos);
  2984. if (GetVectorDistance(userPos, targPos, false) <= rip_Radius[client])
  2985. {
  2986. rip_DealDMG(i, client);
  2987. }
  2988. }
  2989. i++;
  2990. }
  2991. new var2 = rip_RemainingTime[client];
  2992. var2 = var2[-0.1];
  2993. if (rip_RemainingTime[client] < 0.1)
  2994. {
  2995. rip_RemainingTime[client] = 0;
  2996. endRIP(client);
  2997. }
  2998. return 0;
  2999. }
  3000. numTimers_Rip[client] += -1;
  3001. KillTimer(letItRip, false);
  3002. return 0;
  3003. }
  3004.  
  3005. public Action:mortis(Handle:mortis, id)
  3006. {
  3007. new client = GetClientOfUserId(id);
  3008. new var1;
  3009. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_mortis") && mortis_RemainingSmashes[client] > 0 && numTimers_Mortis[client] <= 1)
  3010. {
  3011. if (mortis_Type[client] == 2)
  3012. {
  3013. NecroMash_SmashClient(client, client);
  3014. }
  3015. else
  3016. {
  3017. new i = 1;
  3018. while (i <= MaxClients)
  3019. {
  3020. new var2;
  3021. if (IsValidMulti(i, true, true, false, true, false, 2, false) && mortis_Active[client][i])
  3022. {
  3023. NecroMash_SmashClient(i, client);
  3024. }
  3025. i++;
  3026. }
  3027. }
  3028. mortis_RemainingSmashes[client] += -1;
  3029. return 0;
  3030. }
  3031. if (numTimers_Mortis[client] <= 1)
  3032. {
  3033. new i = 1;
  3034. while (i <= MaxClients)
  3035. {
  3036. mortis_Active[client][i] = false;
  3037. i++;
  3038. }
  3039. }
  3040. numTimers_Mortis[client] += -1;
  3041. KillTimer(mortis, false);
  3042. return 0;
  3043. }
  3044.  
  3045. public Action:mortis_Warning(Handle:mortis_Warning, id)
  3046. {
  3047. new client = GetClientOfUserId(id);
  3048. new var1;
  3049. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_mortis"))
  3050. {
  3051. activateMortis(client);
  3052. }
  3053. return 0;
  3054. }
  3055.  
  3056. public void:playerReset(Event:gEvent, String:sEvName[], bool:bDontBroadcast)
  3057. {
  3058. new client = GetClientOfUserId(Event.GetInt(gEvent, "userid", 0));
  3059. if (IsValidClient(client, true, true))
  3060. {
  3061. destroyEverything(client);
  3062. new var1;
  3063. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_GetRoundState() == 1)
  3064. {
  3065. checkArgs(client);
  3066. }
  3067. if (IsPlayerAlive(client))
  3068. {
  3069. SDKHook(client, 2, 109);
  3070. }
  3071. }
  3072. return 0;
  3073. }
  3074.  
  3075. public Action:player_killed(Event:hEvent, String:sEvName[], bool:bDontBroadcast)
  3076. {
  3077. new victim = GetClientOfUserId(Event.GetInt(hEvent, "userid", 0));
  3078. new attacker = GetClientOfUserId(Event.GetInt(hEvent, "attacker", 0));
  3079. if (GetEventInt(hEvent, "death_flags", 0) & 32)
  3080. {
  3081. return 0;
  3082. }
  3083. if (IsValidClient(victim, true, true))
  3084. {
  3085. destroyEverything(victim);
  3086. new var1;
  3087. if (IsValidMulti(attacker, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(attacker), "ssb_raidpack", "ssb_bonezone_classic") && classic_Active[attacker])
  3088. {
  3089. if (classic_MinionMode[attacker] != -1)
  3090. {
  3091. new Handle:pack;
  3092. CreateDataTimer(0.1, 145, pack, 2);
  3093. WritePackCell(pack, GetClientUserId(attacker));
  3094. WritePackCell(pack, GetClientUserId(victim));
  3095. }
  3096. if (classic_MannpowerTime[attacker] > 0.0)
  3097. {
  3098. new i = 1;
  3099. while (i <= MaxClients)
  3100. {
  3101. new TFTeam:targTeam = TF2_GetClientTeam(attacker);
  3102. if (IsValidMulti(i, true, true, false, true, true, targTeam, false))
  3103. {
  3104. GiveRandomMannpower(i, classic_MannpowerTime[attacker]);
  3105. }
  3106. i++;
  3107. }
  3108. }
  3109. }
  3110. }
  3111. return 0;
  3112. }
  3113.  
  3114. public Action:regenToFull(Handle:minGen, id)
  3115. {
  3116. new client = GetClientOfUserId(id);
  3117. if (IsValidMulti(client, true, true, false, true, false, 2, false))
  3118. {
  3119. if (TF2_GetPlayerMaxHealth(client) > GetClientHealth(client))
  3120. {
  3121. SetEntityHealth(client, TF2_GetPlayerMaxHealth(client));
  3122. }
  3123. }
  3124. return 0;
  3125. }
  3126.  
  3127. public Action:removeMasher(Handle:remover, removeTarget)
  3128. {
  3129. RemoveEntity(removeTarget);
  3130. return 0;
  3131. }
  3132.  
  3133. public Action:repoTimer(Handle:repoTimer, id)
  3134. {
  3135. new client = GetClientOfUserId(id);
  3136. new var1;
  3137. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_calciumrepo") && repo_RemainingTime[client] >= 0.1 && numTimers_Repo[client] <= 1)
  3138. {
  3139. if (0 < repo_MaxHits[client])
  3140. {
  3141. if (repo_MaxHits[client] <= repo_HitCounter[client])
  3142. {
  3143. repo_RemainingTime[client] = 0;
  3144. }
  3145. }
  3146. new var2 = repo_RemainingTime[client];
  3147. var2 = var2[-0.1];
  3148. if (repo_RemainingTime[client] < 0.1)
  3149. {
  3150. repo_RemainingTime[client] = 0;
  3151. TF2_RemoveCondition(client, 36);
  3152. repo_HitCounter[client] = 0;
  3153. new i = 1;
  3154. while (i <= MaxClients)
  3155. {
  3156. repo_AlreadyHit[client][i] = false;
  3157. i++;
  3158. }
  3159. }
  3160. return 0;
  3161. }
  3162. numTimers_Repo[client] += -1;
  3163. KillTimer(repoTimer, false);
  3164. return 0;
  3165. }
  3166.  
  3167. public Action:repo_DelayedExplosion(Handle:repo_DelayedExplosion, any:pack)
  3168. {
  3169. ResetPack(pack, false);
  3170. new attacker = GetClientOfUserId(ReadPackCell(pack));
  3171. new victim = GetClientOfUserId(ReadPackCell(pack));
  3172. new var1;
  3173. if (IsValidMulti(attacker, true, true, true, true, false, 2, false) && IsValidMulti(victim, true, true, false, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(attacker), "ssb_raidpack", "ssb_calciumrepo"))
  3174. {
  3175. repo_Explosion(attacker, victim);
  3176. }
  3177. return 0;
  3178. }
  3179.  
  3180. public void:repo_Explosion(attacker, victim)
  3181. {
  3182. new var1;
  3183. if (IsValidMulti(attacker, true, true, true, true, false, 2, false) && IsValidMulti(victim, true, true, false, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(attacker), "ssb_raidpack", "ssb_calciumrepo"))
  3184. {
  3185. repo_AboutToExplode[victim] = 0;
  3186. repo_SummonerRadius[victim] = 0;
  3187. if (checkFile(0, repo_GibSound[attacker], false))
  3188. {
  3189. EmitSoundToAll(repo_GibSound[attacker], victim, 0, 140, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
  3190. }
  3191. new Float:groundZero[3] = 0.0;
  3192. GetClientAbsOrigin(victim, groundZero);
  3193. if (repo_BombDMG[attacker] > 0.0)
  3194. {
  3195. repo_GibParticles(groundZero);
  3196. new TFTeam:targTeam = grabEnemyTeam(attacker);
  3197. new i = 1;
  3198. while (i <= MaxClients)
  3199. {
  3200. if (IsValidMulti(i, true, true, false, true, true, targTeam, false))
  3201. {
  3202. new Float:vicLoc[3] = 0.0;
  3203. GetClientAbsOrigin(i, vicLoc);
  3204. new var2;
  3205. if (GetVectorDistance(groundZero, vicLoc, false) <= repo_BombRadius[attacker] && IsInvuln(i))
  3206. {
  3207. SDKHooks_TakeDamage(i, attacker, attacker, repo_BombDMG[attacker], 8384, -1, NULL_VECTOR, NULL_VECTOR);
  3208. }
  3209. }
  3210. i++;
  3211. }
  3212. }
  3213. SDKHooks_TakeDamage(victim, attacker, attacker, 1.0E10, 8384, -1, NULL_VECTOR, NULL_VECTOR);
  3214. if (repo_MinionMode[attacker] != -1)
  3215. {
  3216. new String:path[1024];
  3217. Format(path, 256, "models/%s", repo_MinionModel[attacker]);
  3218. new String:wepName[1024];
  3219. strcopy(wepName, 255, repo_WeaponName[attacker]);
  3220. new String:wepAtts[1024];
  3221. strcopy(wepAtts, 255, repo_WeaponStats[attacker]);
  3222. CreateBoner(attacker, victim, repo_MinionMode[attacker], false, repo_MinionInvuln[attacker], repo_BossIDX[attacker], repo_Class[attacker], repo_RemoveWearables[attacker], wepName, wepAtts, repo_WeaponIndex[attacker], path, groundZero);
  3223. }
  3224. }
  3225. return 0;
  3226. }
  3227.  
  3228. public void:repo_GibParticles(Float:vecLoc[3])
  3229. {
  3230. new bigBoom = CreateEntityByName("info_particle_system", -1);
  3231. if (IsValidEdict(bigBoom))
  3232. {
  3233. TeleportEntity(bigBoom, vecLoc[0], NULL_VECTOR, NULL_VECTOR);
  3234. DispatchKeyValue(bigBoom, "effect_name", "hammer_bones_kickup");
  3235. SetVariantString("!activator");
  3236. DispatchKeyValue(bigBoom, "targetname", "present");
  3237. DispatchSpawn(bigBoom);
  3238. ActivateEntity(bigBoom);
  3239. AcceptEntityInput(bigBoom, "Start", -1, -1, 0);
  3240. }
  3241. new bigBoom2 = CreateEntityByName("info_particle_system", -1);
  3242. if (IsValidEdict(bigBoom2))
  3243. {
  3244. TeleportEntity(bigBoom2, vecLoc[0], NULL_VECTOR, NULL_VECTOR);
  3245. DispatchKeyValue(bigBoom2, "effect_name", "hammer_bell_ring_shockwave");
  3246. SetVariantString("!activator");
  3247. DispatchKeyValue(bigBoom2, "targetname", "present");
  3248. DispatchSpawn(bigBoom2);
  3249. ActivateEntity(bigBoom2);
  3250. AcceptEntityInput(bigBoom2, "Start", -1, -1, 0);
  3251. }
  3252. return 0;
  3253. }
  3254.  
  3255. public Float:ride_GetMultiplier(client)
  3256. {
  3257. new Float:multiplier = 1.0;
  3258. new var1;
  3259. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_bonezone_raid"))
  3260. {
  3261. new i = 1;
  3262. while (i <= MaxClients)
  3263. {
  3264. new var2;
  3265. if (IsValidMulti(i, true, true, false, true, false, 2, false) && client == ride_Summoner[i])
  3266. {
  3267. multiplier += -5(ride_DMGReduction[client]);
  3268. }
  3269. i++;
  3270. }
  3271. }
  3272. if (multiplier < 0.0)
  3273. {
  3274. multiplier = 0.0;
  3275. }
  3276. return multiplier;
  3277. }
  3278.  
  3279. public Action:ride_HUD(Handle:ride_HUD, id)
  3280. {
  3281. new client = GetClientOfUserId(id);
  3282. new var1;
  3283. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_bonezone_raid") && 1.0 != ride_GetMultiplier(client) && numTimers_Ride[client] <= 1)
  3284. {
  3285. new String:bossName[1024];
  3286. FF2_GetBossName(FF2_GetBossIndex(client), bossName, 255, 0, 0);
  3287. new Float:mult = ride_GetMultiplier(client);
  3288. new i = 1;
  3289. while (i <= MaxClients)
  3290. {
  3291. if (IsValidClient(i, true, true))
  3292. {
  3293. if (IsPlayerAlive(i))
  3294. {
  3295. if (TF2_GetClientTeam(client) != TF2_GetClientTeam(i))
  3296. {
  3297. SetHudTextParams(-1.0, 0.75, 0.1, 255, 120, 0, 255, 0, 6.0, 0.1, 0.2);
  3298. ShowHudText(i, -1, "%s will now take %i-percent less damage.\nKill the minions to deal full damage!", bossName, RoundFloat(5*0(1.0 - mult, 100)));
  3299. }
  3300. if (client == i)
  3301. {
  3302. SetHudTextParams(-1.0, 0.75, 0.1, 0, 255, 120, 255, 0, 6.0, 0.1, 0.2);
  3303. ShowHudText(i, -1, "Your minions are providing you with a defensive buff!\nYou will take %i-percent less damage from most sources.", RoundFloat(5*0(1.0 - mult, 100)));
  3304. }
  3305. }
  3306. SetHudTextParams(-1.0, 0.75, 0.1, 255, 255, 255, 255, 0, 6.0, 0.1, 0.2);
  3307. ShowHudText(i, -1, "[%s]\nDamage Resistance: %i-percent", bossName, RoundFloat(5*0(1.0 - mult, 100)));
  3308. }
  3309. i++;
  3310. }
  3311. return 0;
  3312. }
  3313. numTimers_Ride[client] += -1;
  3314. KillTimer(ride_HUD, false);
  3315. return 0;
  3316. }
  3317.  
  3318. public Action:ringTracker(Handle:ringTracker, id)
  3319. {
  3320. new client = GetClientOfUserId(id);
  3321. new var1;
  3322. if (IsValidMulti(client, true, true, false, true, false, 2, false) && repo_AboutToExplode[client])
  3323. {
  3324. spawnRing(client, repo_SummonerRadius[client] * 2.0, 0.0, 20.0, 0.0, "materials/particle/bendibeam.vmt", 0, 255, 160, 200, 10, 0.1, 30.0, 6.0, 10);
  3325. return 0;
  3326. }
  3327. KillTimer(ringTracker, false);
  3328. return 0;
  3329. }
  3330.  
  3331. public Action:ripThink(client)
  3332. {
  3333. if (IsValidMulti(client, true, true, false, true, false, 2, false))
  3334. {
  3335. if (HasEntProp(client, 0, "m_flMaxspeed"))
  3336. {
  3337. SetEntPropFloat(client, 0, "m_flMaxspeed", rip_MaxSpeed[client], 0);
  3338. }
  3339. }
  3340. return 0;
  3341. }
  3342.  
  3343. public Action:rip_DamageCD(Handle:rip_DamageCD, any:pack)
  3344. {
  3345. ResetPack(pack, false);
  3346. new attacker = GetClientOfUserId(ReadPackCell(pack));
  3347. new victim = GetClientOfUserId(ReadPackCell(pack));
  3348. new var1;
  3349. if (IsValidMulti(attacker, true, true, false, true, false, 2, false) && IsValidMulti(victim, true, true, false, true, false, 2, false))
  3350. {
  3351. rip_CanBeHitByPlayer[attacker][victim] = true;
  3352. }
  3353. return 0;
  3354. }
  3355.  
  3356. public void:rip_DealDMG(victim, attacker)
  3357. {
  3358. new var1;
  3359. if (IsValidMulti(victim, true, true, false, true, false, 2, false) && IsValidClient(attacker, true, true))
  3360. {
  3361. if (rip_CanBeHitByPlayer[attacker][victim])
  3362. {
  3363. if (0 < rip_MaxHitsPerTarget[attacker])
  3364. {
  3365. if (rip_MaxHitsPerTarget[attacker] <= rip_HitCounter[attacker][victim])
  3366. {
  3367. return 0;
  3368. }
  3369. }
  3370. new bool:damageDealt;
  3371. if (IsInvuln(victim))
  3372. {
  3373. if (rip_IgnoreUber[attacker])
  3374. {
  3375. new targIDX = FF2_GetBossIndex(victim);
  3376. if (targIDX != -1)
  3377. {
  3378. FF2_SetBossHealth(targIDX, FF2_GetBossHealth(targIDX) - RoundFloat(rip_DMG[attacker]));
  3379. damageDealt = true;
  3380. }
  3381. else
  3382. {
  3383. if (GetClientHealth(victim) < RoundFloat(rip_DMG[attacker]))
  3384. {
  3385. FakeClientCommand(victim, "explode");
  3386. }
  3387. else
  3388. {
  3389. SetEntityHealth(victim, GetClientHealth(victim) - RoundFloat(rip_DMG[attacker]));
  3390. }
  3391. damageDealt = true;
  3392. }
  3393. }
  3394. }
  3395. else
  3396. {
  3397. SDKHooks_TakeDamage(victim, attacker, attacker, rip_DMG[attacker], 8384, -1, NULL_VECTOR, NULL_VECTOR);
  3398. damageDealt = true;
  3399. }
  3400. new var2;
  3401. if (damageDealt && IsPlayerAlive(victim))
  3402. {
  3403. if (rip_KB[attacker] > 0.0)
  3404. {
  3405. new Float:atkPos[3] = 0.0;
  3406. GetClientAbsOrigin(attacker, atkPos);
  3407. new Float:vicPos[3] = 0.0;
  3408. GetClientAbsOrigin(victim, vicPos);
  3409. new Float:Vector[3] = 0.0;
  3410. MakeVectorFromPoints(atkPos, vicPos, Vector);
  3411. new Float:Angles[3] = 0.0;
  3412. GetVectorAngles(Vector, Angles);
  3413. Angles[0] = Angles[0] - 30.0;
  3414. GetAngleVectors(Angles, Vector, NULL_VECTOR, NULL_VECTOR);
  3415. NormalizeVector(Vector, Vector);
  3416. ScaleVector(Vector, rip_KB[attacker]);
  3417. new var3 = Vector[2];
  3418. var3 = rip_KB[attacker][var3];
  3419. TeleportEntity(victim, NULL_VECTOR, NULL_VECTOR, Vector);
  3420. }
  3421. rip_HitCounter[attacker][victim]++;
  3422. if (rip_ContactDMGCD[attacker] > 0.0)
  3423. {
  3424. rip_CanBeHitByPlayer[attacker][victim] = false;
  3425. new Handle:pack;
  3426. CreateDataTimer(rip_ContactDMGCD[attacker], 189, pack, 0);
  3427. WritePackCell(pack, GetClientUserId(attacker));
  3428. WritePackCell(pack, GetClientUserId(victim));
  3429. }
  3430. }
  3431. }
  3432. return 0;
  3433. }
  3434. return 0;
  3435. }
  3436.  
  3437. public void:setChaosArgs(client)
  3438. {
  3439. new var1;
  3440. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_purechaos"))
  3441. {
  3442. new idx = FF2_GetBossIndex(client);
  3443. chaos_StunTime[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_purechaos", "arg1", 1, 4.0);
  3444. chaos_InvTime[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_purechaos", "arg2", 2, 4.0);
  3445. chaos_Duration[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_purechaos", "arg3", 3, 30.0);
  3446. chaos_SpamType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg4", 4, 0);
  3447. chaos_SpellCD[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_purechaos", "arg5", 5, 0.2);
  3448. chaos_DMGMultiplier[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_purechaos", "arg6", 6, 1.0);
  3449. FF2_GetArgS(idx, "ssb_raidpack", "ssb_purechaos", "arg15", 15, chaos_HUD[client], 255);
  3450. FF2_GetArgS(idx, "ssb_raidpack", "ssb_purechaos", "arg16", 16, chaos_Particle[client], 255);
  3451. FF2_GetArgS(idx, "ssb_raidpack", "ssb_purechaos", "arg17", 17, chaos_ParticlePoint[client], 255);
  3452. chaos_BlockType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg18", 18, 0);
  3453. KeyDown[client] = GetClientButtons(client) & 1 != 0;
  3454. if (chaos_Duration[client] < 0.0)
  3455. {
  3456. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 3 under ability ''ssb_purechaos''; defaulting to 30.0.", chaos_Duration[client]);
  3457. chaos_Duration[client] = 1106247680;
  3458. }
  3459. new var2;
  3460. if (chaos_SpamType[client] > 1 || chaos_SpamType[client] < 0)
  3461. {
  3462. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 4 under ability ''ssb_purechaos''; defaulting to 0.", chaos_SpamType[client]);
  3463. chaos_SpamType[client] = 0;
  3464. }
  3465. new var3;
  3466. if (chaos_SpellCD[client] < 0.1 && chaos_SpamType[client] == 1)
  3467. {
  3468. chaos_SpellCD[client] = 0;
  3469. }
  3470. if (chaos_DMGMultiplier[client] < 0.0)
  3471. {
  3472. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 6 under ability ''ssb_purechaos''; defaulting to 1.0.", chaos_DMGMultiplier[client]);
  3473. chaos_DMGMultiplier[client] = 1065353216;
  3474. }
  3475. new var4;
  3476. if (chaos_BlockType[client] < 0 || chaos_BlockType[client] > 2)
  3477. {
  3478. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 18 under ability ''ssb_purechaos''; defaulting to 0.", chaos_BlockType[client]);
  3479. chaos_BlockType[client] = 0;
  3480. }
  3481. new booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg7", 7, 1);
  3482. new var5;
  3483. if (booly > 1 || booly < 0)
  3484. {
  3485. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 7 under ability ''ssb_purechaos''; defaulting to 1.", booly);
  3486. booly = 1;
  3487. }
  3488. chaos_Fireball[client] = booly;
  3489. booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg7", 7, 1);
  3490. new var6;
  3491. if (booly > 1 || booly < 0)
  3492. {
  3493. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 7 under ability ''ssb_purechaos''; defaulting to 1.", booly);
  3494. booly = 1;
  3495. }
  3496. chaos_Fireball[client] = booly;
  3497. booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg8", 8, 1);
  3498. new var7;
  3499. if (booly > 1 || booly < 0)
  3500. {
  3501. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 8 under ability ''ssb_purechaos''; defaulting to 1.", booly);
  3502. booly = 1;
  3503. }
  3504. chaos_Orb[client] = booly;
  3505. booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg9", 9, 1);
  3506. new var8;
  3507. if (booly > 1 || booly < 0)
  3508. {
  3509. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 9 under ability ''ssb_purechaos''; defaulting to 1.", booly);
  3510. booly = 1;
  3511. }
  3512. chaos_MIRV[client] = booly;
  3513. booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg10", 10, 1);
  3514. new var9;
  3515. if (booly > 1 || booly < 0)
  3516. {
  3517. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 10 under ability ''ssb_purechaos''; defaulting to 1.", booly);
  3518. booly = 1;
  3519. }
  3520. chaos_Pumpkin[client] = booly;
  3521. booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg11", 11, 1);
  3522. new var10;
  3523. if (booly > 1 || booly < 0)
  3524. {
  3525. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 11 under ability ''ssb_purechaos''; defaulting to 1.", booly);
  3526. booly = 1;
  3527. }
  3528. chaos_Bats[client] = booly;
  3529. booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg12", 12, 1);
  3530. new var11;
  3531. if (booly > 1 || booly < 0)
  3532. {
  3533. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 12 under ability ''ssb_purechaos''; defaulting to 1.", booly);
  3534. booly = 1;
  3535. }
  3536. chaos_Meteor[client] = booly;
  3537. booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg13", 13, 1);
  3538. new var12;
  3539. if (booly > 1 || booly < 0)
  3540. {
  3541. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 13 under ability ''ssb_purechaos''; defaulting to 1.", booly);
  3542. booly = 1;
  3543. }
  3544. chaos_Teleport[client] = booly;
  3545. booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg14", 14, 1);
  3546. new var13;
  3547. if (booly > 1 || booly < 0)
  3548. {
  3549. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 14 under ability ''ssb_purechaos''; defaulting to 1.", booly);
  3550. booly = 1;
  3551. }
  3552. chaos_Monoculus[client] = booly;
  3553. }
  3554. return 0;
  3555. }
  3556.  
  3557. public void:setClassicArgs(client)
  3558. {
  3559. new var1;
  3560. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_bonezone_classic"))
  3561. {
  3562. new idx = FF2_GetBossIndex(client);
  3563. classic_StunTime[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg1", 1, 4.0);
  3564. classic_InvTime[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg2", 2, 30.0);
  3565. classic_Duration[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg3", 3, 30.0);
  3566. classic_SpamType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg4", 4, 0);
  3567. classic_SpellCD[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg5", 5, 0.1);
  3568. classic_DMGMultiplier[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg6", 6, 1.0);
  3569. classic_MannpowerTime[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg7", 7, 15.0);
  3570. classic_MinionMode[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg8", 8, 0);
  3571. classic_BossIDX[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg9", 9, 0);
  3572. FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg10", 10, classic_MinionModel[client], 256);
  3573. classic_WeaponIDX[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg11", 11, 0);
  3574. FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg12", 12, classic_WeaponName[client], 255);
  3575. FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg13", 13, classic_WeaponStats[client], 255);
  3576. new booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg14", 14, 0);
  3577. classic_MinionInvTime[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg15", 15, 3.0);
  3578. FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg16", 16, classic_HUD[client], 255);
  3579. FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg17", 17, classic_Particle[client], 255);
  3580. FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg18", 18, classic_ParticlePoint[client], 255);
  3581. classic_MinionClass[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg19", 19, 0);
  3582. classic_BlockType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg20", 20, 0);
  3583. if (classic_Duration[client] < 0.0)
  3584. {
  3585. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 3 under ability ''ssb_bonezone_classic''; defaulting to 30.0.", classic_Duration[client]);
  3586. classic_Duration[client] = 1106247680;
  3587. }
  3588. new var2;
  3589. if (classic_SpamType[client] < 0 || classic_SpamType[client] > 1)
  3590. {
  3591. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 4 under ability ''ssb_bonezone_classic''; defaulting to 0.", classic_SpamType[client]);
  3592. classic_SpamType[client] = 0;
  3593. }
  3594. new var3;
  3595. if (classic_SpellCD[client] < 0.1 && classic_SpamType[client] == 1)
  3596. {
  3597. classic_SpellCD[client] = 1036831949;
  3598. }
  3599. if (classic_DMGMultiplier[client] < 0.0)
  3600. {
  3601. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 6 under ability ''ssb_bonezone_classic''; defaulting to 1.0.", classic_DMGMultiplier[client]);
  3602. classic_DMGMultiplier[client] = 1065353216;
  3603. }
  3604. new var4;
  3605. if (classic_MinionMode[client] < -1 || classic_MinionMode[client] > 1)
  3606. {
  3607. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 8 under ability ''ssb_bonezone_classic''; defaulting to 0.", classic_MinionMode[client]);
  3608. classic_MinionMode[client] = 0;
  3609. }
  3610. new var5;
  3611. if (classic_MinionClass[client] < 1 || classic_MinionClass[client] > 9)
  3612. {
  3613. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 19 under ability ''ssb_bonezone_classic''; defaulting to 2.", classic_MinionClass[client]);
  3614. classic_MinionClass[client] = 2;
  3615. }
  3616. new var6;
  3617. if (classic_BlockType[client] < 0 || classic_BlockType[client] > 2)
  3618. {
  3619. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 20 under ability ''ssb_bonezone_classic''; defaulting to 0.", classic_BlockType[client]);
  3620. classic_BlockType[client] = 0;
  3621. }
  3622. new var7;
  3623. if (booly < 0 || booly > 1)
  3624. {
  3625. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 14 under ability ''ssb_bonezone_classic''; defaulting to 1.", booly);
  3626. booly = 1;
  3627. }
  3628. classic_RemoveWearables[client] = booly;
  3629. if (checkFile(1, classic_MinionModel[client], false))
  3630. {
  3631. PrecacheModel(classic_MinionModel[client], false);
  3632. }
  3633. }
  3634. return 0;
  3635. }
  3636.  
  3637. public void:setDrainArgs(client)
  3638. {
  3639. new var1;
  3640. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_soulsteal"))
  3641. {
  3642. new idx = FF2_GetBossIndex(client);
  3643. drain_Radius[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_soulsteal", "arg1", 1, 500.0);
  3644. drain_DMG[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_soulsteal", "arg2", 2, 5.0);
  3645. drain_Heal[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_soulsteal", "arg3", 3, 0.5);
  3646. new booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_soulsteal", "arg4", 4, 0);
  3647. drain_Duration[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_soulsteal", "arg5", 5, 15.0);
  3648. FF2_GetArgS(idx, "ssb_raidpack", "ssb_soulsteal", "arg6", 6, drain_HUD[client], 255);
  3649. drain_BlockType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_soulsteal", "arg7", 7, 0);
  3650. if (drain_Radius[client] < 0.0)
  3651. {
  3652. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 1 under ability ''ssb_soulsteal''; defaulting to 500.0.", drain_Radius[client]);
  3653. drain_Radius[client] = 1140457472;
  3654. }
  3655. if (drain_Duration[client] < 0.0)
  3656. {
  3657. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 5 under ability ''ssb_soulsteal''; defaulting to 15.0.", drain_Duration[client]);
  3658. drain_Duration[client] = 1097859072;
  3659. }
  3660. new var2;
  3661. if (drain_BlockType[client] > 2 || drain_BlockType[client] < 0)
  3662. {
  3663. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 7 under ability ''ssb_soulsteal''; defaulting to 0.", drain_BlockType[client]);
  3664. drain_BlockType[client] = 0;
  3665. }
  3666. new var3;
  3667. if (booly > 1 || booly < 0)
  3668. {
  3669. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 4 under ability ''ssb_soulsteal''; defaulting to 0.", booly);
  3670. booly = 0;
  3671. }
  3672. drain_CanOverheal[client] = booly;
  3673. }
  3674. return 0;
  3675. }
  3676.  
  3677. public void:setMortisArgs(client)
  3678. {
  3679. new var1;
  3680. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_mortis"))
  3681. {
  3682. new idx = FF2_GetBossIndex(client);
  3683. mortis_Type[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_mortis", "arg1", 1, 1);
  3684. new ff = FF2_GetArgI(idx, "ssb_raidpack", "ssb_mortis", "arg2", 2, 0);
  3685. mortis_Percent[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_mortis", "arg3", 3, 0.2);
  3686. mortis_SmashCount[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_mortis", "arg4", 4, 0);
  3687. mortis_Time[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_mortis", "arg5", 5, 0.15);
  3688. mortis_DMG[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_mortis", "arg6", 6, 5000.0);
  3689. mortis_Radius[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_mortis", "arg7", 7, 100.0);
  3690. mortis_WarningTime[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_mortis", "arg8", 8, 2.0);
  3691. mortis_KB[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_mortis", "arg9", 9, 0.0);
  3692. mortis_BlockType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_mortis", "arg10", 10, 0);
  3693. new i = 1;
  3694. while (i <= MaxClients)
  3695. {
  3696. mortis_Active[client][i] = false;
  3697. i++;
  3698. }
  3699. new var2;
  3700. if (mortis_Type[client] < 0 || mortis_Type[client] > 2)
  3701. {
  3702. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 1 under ability ''ssb_mortis''; defaulting to 1.", mortis_Type[client]);
  3703. mortis_Type[client] = 1;
  3704. }
  3705. new var3;
  3706. if (ff < 0 || ff > 1)
  3707. {
  3708. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 2 under ability ''ssb_mortis''; defaulting to 0.", ff);
  3709. ff = 0;
  3710. }
  3711. new var4;
  3712. if (mortis_Percent[client] < 0.0 || mortis_Percent[client] > 1.0)
  3713. {
  3714. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 3 under ability ''ssb_mortis''; defaulting to 0.2.", mortis_Percent[client]);
  3715. mortis_Percent[client] = 1045220557;
  3716. }
  3717. if (mortis_Radius[client] < 0.0)
  3718. {
  3719. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 7 under ability ''ssb_mortis''; defaulting to 100.0.", mortis_Radius[client]);
  3720. mortis_Radius[client] = 1120403456;
  3721. }
  3722. new var5;
  3723. if (mortis_BlockType[client] > 2 || mortis_BlockType[client] < 0)
  3724. {
  3725. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 10 under ability ''ssb_mortis''; defaulting to 0.", mortis_BlockType[client]);
  3726. mortis_BlockType[client] = 0;
  3727. }
  3728. mortis_FriendlyFire[client] = ff;
  3729. }
  3730. return 0;
  3731. }
  3732.  
  3733. public void:setRepoArgs(client)
  3734. {
  3735. new var1;
  3736. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_calciumrepo"))
  3737. {
  3738. new idx = FF2_GetBossIndex(client);
  3739. repo_Duration[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_calciumrepo", "arg1", 1, 12.0);
  3740. repo_HitDMG[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_calciumrepo", "arg2", 2, 99999.0);
  3741. repo_BombTimer[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_calciumrepo", "arg3", 3, 3.0);
  3742. repo_BombDMG[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_calciumrepo", "arg4", 4, 5000.0);
  3743. repo_BombRadius[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_calciumrepo", "arg5", 5, 500.0);
  3744. repo_MinionMode[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_calciumrepo", "arg6", 6, 0);
  3745. repo_BossIDX[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_calciumrepo", "arg7", 7, 0);
  3746. FF2_GetArgS(idx, "ssb_raidpack", "ssb_calciumrepo", "arg8", 8, repo_MinionModel[client], 256);
  3747. repo_WeaponIndex[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_calciumrepo", "arg9", 9, 0);
  3748. FF2_GetArgS(idx, "ssb_raidpack", "ssb_calciumrepo", "arg10", 10, repo_WeaponName[client], 256);
  3749. FF2_GetArgS(idx, "ssb_raidpack", "ssb_calciumrepo", "arg11", 11, repo_WeaponStats[client], 255);
  3750. new booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_calciumrepo", "arg12", 12, 0);
  3751. repo_MinionInvuln[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_calciumrepo", "arg13", 13, 3.5);
  3752. repo_MaxHits[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_calciumrepo", "arg14", 14, 0);
  3753. repo_Class[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_calciumrepo", "arg15", 15, 2);
  3754. FF2_GetArgS(idx, "ssb_raidpack", "ssb_calciumrepo", "arg16", 16, repo_HitSound[client], 256);
  3755. FF2_GetArgS(idx, "ssb_raidpack", "ssb_calciumrepo", "arg17", 17, repo_GibSound[client], 256);
  3756. repo_BlockType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_calciumrepo", "arg18", 18, 0);
  3757. if (repo_Duration[client] < 0.0)
  3758. {
  3759. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 1 under ability ''ssb_calciumrepo''; defaulting to 12.0.", repo_Duration[client]);
  3760. repo_Duration[client] = 1094713344;
  3761. }
  3762. if (repo_BombTimer[client] < 0.0)
  3763. {
  3764. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 3 under ability ''ssb_calciumrepo''; defaulting to 3.0.", repo_BombTimer[client]);
  3765. repo_BombTimer[client] = 1077936128;
  3766. }
  3767. if (repo_BombRadius[client] < 300.0)
  3768. {
  3769. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 5 under ability ''ssb_calciumrepo''; defaulting to 300.0.", repo_BombRadius[client]);
  3770. repo_BombRadius[client] = 1094713344;
  3771. }
  3772. new var2;
  3773. if (repo_MinionMode[client] < -1 || repo_MinionMode[client] > 1)
  3774. {
  3775. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 6 under ability ''ssb_calciumrepo''; defaulting to -1.", repo_MinionMode[client]);
  3776. repo_MinionMode[client] = -1;
  3777. }
  3778. new var3;
  3779. if (booly < 0 || booly > 1)
  3780. {
  3781. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 12 under ability ''ssb_calciumrepo''; defaulting to 0.", booly);
  3782. booly = 0;
  3783. }
  3784. repo_RemoveWearables[client] = booly;
  3785. if (0 > repo_MaxHits[client])
  3786. {
  3787. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 14 under ability ''ssb_calciumrepo''; defaulting to 0.", repo_MaxHits[client]);
  3788. repo_MaxHits[client] = 0;
  3789. }
  3790. new var4;
  3791. if (repo_Class[client] < 1 || repo_Class[client] > 9)
  3792. {
  3793. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 15 under ability ''ssb_calciumrepo''; defaulting to 2.", repo_Class[client]);
  3794. repo_Class[client] = 2;
  3795. }
  3796. new var5;
  3797. if (repo_BlockType[client] < 0 || repo_BlockType[client] > 2)
  3798. {
  3799. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 18 under ability ''ssb_calciumrepo''; defaulting to 0.", repo_BlockType[client]);
  3800. repo_BlockType[client] = 0;
  3801. }
  3802. if (checkFile(1, repo_MinionModel[client], false))
  3803. {
  3804. PrecacheModel(repo_MinionModel[client], false);
  3805. }
  3806. if (checkFile(0, repo_HitSound[client], false))
  3807. {
  3808. PrecacheSound(repo_HitSound[client], false);
  3809. }
  3810. if (checkFile(0, repo_GibSound[client], false))
  3811. {
  3812. PrecacheSound(repo_GibSound[client], false);
  3813. }
  3814. }
  3815. return 0;
  3816. }
  3817.  
  3818. public void:setRideArgs(client)
  3819. {
  3820. new var1;
  3821. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_bonezone_raid"))
  3822. {
  3823. new idx = FF2_GetBossIndex(client);
  3824. ride_MinionCount[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg1", 1, 6);
  3825. ride_DMGReduction[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg2", 2, 0.2);
  3826. ride_MinionMode[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg3", 3, 1);
  3827. ride_BossIDX[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg4", 4, 0);
  3828. FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg5", 5, ride_MinionModel[client], 256);
  3829. ride_WeaponIDX[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg6", 6, 0);
  3830. FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg7", 7, ride_WeaponName[client], 255);
  3831. FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg8", 8, ride_WeaponStats[client], 255);
  3832. new booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg9", 9, 1);
  3833. ride_MinionInvTime[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg10", 10, 3.0);
  3834. ride_MinionClass[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg11", 11, 2);
  3835. ride_BlockType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg12", 12, 0);
  3836. if (ride_MinionCount[client] < 1)
  3837. {
  3838. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 1 under ability ''ssb_bonezone_raid'' (must summon at least one minion); defaulting to 1.", ride_MinionCount[client]);
  3839. ride_MinionCount[client] = 1;
  3840. }
  3841. new var2;
  3842. if (ride_MinionMode[client] < 0 || ride_MinionMode[client] > 1)
  3843. {
  3844. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 3 under ability ''ssb_bonezone_raid''; defaulting to 0.", ride_MinionMode[client]);
  3845. ride_MinionMode[client] = 0;
  3846. }
  3847. new var3;
  3848. if (ride_MinionClass[client] < 1 || ride_MinionClass[client] > 9)
  3849. {
  3850. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 11 under ability ''ssb_bonezone_raid''; defaulting to 2.", ride_MinionClass[client]);
  3851. ride_MinionClass[client] = 2;
  3852. }
  3853. new var4;
  3854. if (ride_BlockType[client] < 0 || ride_BlockType[client] > 2)
  3855. {
  3856. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 12 under ability ''ssb_bonezone_raid''; defaulting to 0.", ride_BlockType[client]);
  3857. ride_BlockType[client] = 0;
  3858. }
  3859. new var5;
  3860. if (booly < 0 || booly > 1)
  3861. {
  3862. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 9 under ability ''ssb_bonezone_raid''; defaulting to 1.", booly);
  3863. booly = 1;
  3864. }
  3865. ride_RemoveWearables[client] = booly;
  3866. if (checkFile(1, ride_MinionModel[client], false))
  3867. {
  3868. PrecacheModel(ride_MinionModel[client], false);
  3869. }
  3870. }
  3871. return 0;
  3872. }
  3873.  
  3874. public void:setRipArgs(client)
  3875. {
  3876. new var1;
  3877. if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_rip"))
  3878. {
  3879. new idx = FF2_GetBossIndex(client);
  3880. rip_Duration[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_rip", "arg1", 1, 12.0);
  3881. rip_DMG[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_rip", "arg2", 2, 500.0);
  3882. rip_ContactDMGCD[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_rip", "arg3", 3, 0.0);
  3883. rip_MaxHitsPerTarget[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_rip", "arg4", 4, 0);
  3884. rip_KB[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_rip", "arg5", 5, 0.0);
  3885. FF2_GetArgS(idx, "ssb_raidpack", "ssb_rip", "arg6", 6, rip_Model[client], 256);
  3886. new booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_rip", "arg7", 7, 0);
  3887. rip_MaxSpeed[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_rip", "arg8", 8, 520.0);
  3888. rip_Radius[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_rip", "arg9", 9, 120.0);
  3889. rip_ClassAnims[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_rip", "arg10", 10, 1);
  3890. rip_BlockType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_rip", "arg11", 11, 0);
  3891. new i = 1;
  3892. while (i <= MaxClients)
  3893. {
  3894. rip_HitCounter[client][i] = 0;
  3895. rip_CanBeHitByPlayer[client][i] = true;
  3896. i++;
  3897. }
  3898. if (rip_Duration[client] < 0.0)
  3899. {
  3900. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 1 under ability ''ssb_rip''; defaulting to 12.0.", rip_Duration[client]);
  3901. rip_Duration[client] = 1094713344;
  3902. }
  3903. if (rip_DMG[client] < 0.0)
  3904. {
  3905. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 2 under ability ''ssb_rip''; defaulting to 500.0.", rip_DMG[client]);
  3906. rip_DMG[client] = 1140457472;
  3907. }
  3908. if (rip_KB[client] < 0.0)
  3909. {
  3910. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 5 under ability ''ssb_rip''; defaulting to 0.0.", rip_KB[client]);
  3911. rip_KB[client] = 0;
  3912. }
  3913. if (rip_MaxSpeed[client] < 0.0)
  3914. {
  3915. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 8 under ability ''ssb_rip''; defaulting to 520.0.", rip_MaxSpeed[client]);
  3916. rip_MaxSpeed[client] = 1140981760;
  3917. }
  3918. if (rip_Radius[client] < 0.0)
  3919. {
  3920. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 9 under ability ''ssb_rip''; defaulting to 120.0.", rip_Radius[client]);
  3921. rip_Radius[client] = 1123024896;
  3922. }
  3923. new var2;
  3924. if (rip_BlockType[client] < 0 || rip_BlockType[client] > 2)
  3925. {
  3926. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 10 under ability ''ssb_rip''; defaulting to 0.", rip_BlockType[client]);
  3927. rip_BlockType[client] = 0;
  3928. }
  3929. new var3;
  3930. if (booly < 0 || booly > 1)
  3931. {
  3932. FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 7 under ability ''ssb_rip''; defaulting to 0.", booly);
  3933. booly = 0;
  3934. }
  3935. rip_IgnoreUber[client] = booly;
  3936. if (checkFile(1, rip_Model[client], false))
  3937. {
  3938. PrecacheModel(rip_Model[client], false);
  3939. }
  3940. }
  3941. return 0;
  3942. }
  3943.  
  3944. public void:spawnBeam(client, buddy, Float:beamTiming, r, g, b, a, String:sprite[1024])
  3945. {
  3946. new var1;
  3947. if (IsValidMulti(client, true, true, false, true, false, 2, false) && IsValidEntity(buddy))
  3948. {
  3949. new Float:mainEyes[3] = 0.0;
  3950. GetClientEyePosition(client, mainEyes);
  3951. new Float:budEyes[3] = 0.0;
  3952. if (IsValidMulti(buddy, true, true, false, true, false, 2, false))
  3953. {
  3954. GetClientEyePosition(buddy, budEyes);
  3955. }
  3956. else
  3957. {
  3958. if (buddy > MaxClients)
  3959. {
  3960. if (HasEntProp(buddy, 0, "m_vecOrigin"))
  3961. {
  3962. GetEntPropVector(buddy, 0, "m_vecOrigin", budEyes, 0);
  3963. }
  3964. }
  3965. }
  3966. if (IsValidMulti(buddy, true, false, false, true, false, 2, false))
  3967. {
  3968. return 0;
  3969. }
  3970. new color[4];
  3971. color[0] = r;
  3972. color[1] = g;
  3973. color[2] = b;
  3974. color[3] = a;
  3975. SPRITE_INT = PrecacheModel(sprite[0], false);
  3976. TE_SetupBeamPoints(budEyes, mainEyes, SPRITE_INT, 0, 0, 0, beamTiming, 5.0, 5.0, 1, 15.0, color, 0);
  3977. TE_SendToAll(0.0);
  3978. }
  3979. return 0;
  3980. }
  3981.  
  3982. public void:spawnRing(client, Float:range, Float:modif_X, Float:modif_Y, Float:modif_Z, String:sprite[1024], r, g, b, alpha, fps, Float:life, Float:width, Float:amp, speed)
  3983. {
  3984. if (IsValidEntity(client))
  3985. {
  3986. new Float:center[3] = 0.0;
  3987. if (IsValidMulti(client, true, true, false, true, false, 2, false))
  3988. {
  3989. GetClientAbsOrigin(client, center);
  3990. }
  3991. else
  3992. {
  3993. if (client > MaxClients)
  3994. {
  3995. if (HasEntProp(client, 0, "m_vecOrigin"))
  3996. {
  3997. GetEntPropVector(client, 0, "m_vecOrigin", center, 0);
  3998. }
  3999. }
  4000. }
  4001. if (IsValidMulti(client, true, false, false, true, false, 2, false))
  4002. {
  4003. return 0;
  4004. }
  4005. center[0] = center[0] + modif_X;
  4006. center[1] += modif_Y;
  4007. center[2] += modif_Z;
  4008. SPRITE_INT = PrecacheModel(sprite[0], false);
  4009. new color[4];
  4010. color[0] = r;
  4011. color[1] = g;
  4012. color[2] = b;
  4013. color[3] = alpha;
  4014. TE_SetupBeamRingPoint(center, range, range + 0.5, SPRITE_INT, SPRITE_INT, 0, fps, life, width, amp, color, speed, 0);
  4015. TE_SendToAll(0.0);
  4016. }
  4017. return 0;
  4018. }
  4019.  
  4020. public void:triggerRepo(attacker, victim)
  4021. {
  4022. new var1;
  4023. if (IsValidMulti(attacker, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(attacker), "ssb_raidpack", "ssb_calciumrepo") && IsValidMulti(victim, true, true, false, true, false, 2, false))
  4024. {
  4025. if (repo_BombTimer[attacker] > 0.0)
  4026. {
  4027. repo_AboutToExplode[victim] = 1;
  4028. repo_SummonerRadius[victim] = repo_BombRadius[attacker];
  4029. CreateTimer(0.1, 185, GetClientUserId(victim), 3);
  4030. TF2_StunPlayer(victim, repo_BombTimer[attacker][0.1], 1.0, 2, attacker);
  4031. if (checkFile(0, repo_HitSound[attacker], false))
  4032. {
  4033. EmitSoundToAll(repo_HitSound[attacker], victim, 0, 140, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
  4034. }
  4035. new Handle:pack;
  4036. CreateDataTimer(repo_BombTimer[attacker], 175, pack, 2);
  4037. WritePackCell(pack, GetClientUserId(attacker));
  4038. WritePackCell(pack, GetClientUserId(victim));
  4039. }
  4040. else
  4041. {
  4042. repo_Explosion(attacker, victim);
  4043. }
  4044. if (0 < repo_MaxHits[attacker])
  4045. {
  4046. repo_HitCounter[attacker]++;
  4047. }
  4048. }
  4049. return 0;
  4050. }
  4051.  
  4052.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement