Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.58 KB | None | 0 0
  1. /*
  2. * THIS SOFTWARE WRITTEN BY A KEYBOARD-WIELDING MONKEY BOI
  3. * No rights reserved. Use, redistribute, and modify at your own discretion,
  4. * and in accordance with Yagex and RuneLite guidelines.
  5. * However, aforementioned monkey would prefer if you don't sell this plugin for profit.
  6. * Good luck on your raids!
  7. */
  8.  
  9. package net.runelite.client.plugins.ztob;
  10.  
  11. import java.util.List;
  12. import java.util.LinkedHashMap;
  13. import java.util.ArrayList;
  14. import java.util.Map;
  15. import java.util.HashMap;
  16. import java.util.Iterator;
  17. import javax.inject.Inject;
  18. import com.google.inject.Provides;
  19. import lombok.AccessLevel;
  20. import lombok.Getter;
  21. import net.runelite.api.Point;
  22. import net.runelite.api.coords.WorldPoint;
  23. import net.runelite.api.NPC;
  24. import net.runelite.api.NpcID;
  25. import net.runelite.api.Projectile;
  26. import net.runelite.api.Client;
  27. import net.runelite.api.Tile;
  28. import net.runelite.api.GroundObject;
  29. import net.runelite.api.GraphicsObject;
  30. import net.runelite.client.eventbus.Subscribe;
  31. import net.runelite.api.events.GroundObjectSpawned;
  32. import net.runelite.api.events.NpcDespawned;
  33. import net.runelite.api.events.NpcSpawned;
  34. import net.runelite.api.events.GameTick;
  35. import net.runelite.api.events.ProjectileMoved;
  36. import net.runelite.client.config.ConfigManager;
  37. import net.runelite.client.plugins.Plugin;
  38. import net.runelite.client.plugins.PluginDescriptor;
  39. import net.runelite.client.ui.overlay.OverlayManager;
  40.  
  41. @PluginDescriptor(
  42. name = "xz_Theatre",
  43. description = "All-in-one plugin for Theatre of Blood",
  44. tags = {"ToB"},
  45. enabledByDefault = false
  46. )
  47.  
  48. public class TheatrePlugin extends Plugin {
  49. private static final int GRAPHICSOBJECT_ID_MAIDEN = 1579;
  50. private static final int NPCID_NYLOCAS_PILLAR = 8358;
  51. private static final int GROUNDOBJECT_ID_BLACKMAZE = 33034;
  52. private static final int GROUNDOBJECT_ID_REDMAZE = 33035;
  53. private static final int GROUNDOBJECT_ID_EXHUMED = 32743;
  54. private static final int ANIMATION_ID_XARPUS = 8059;
  55. private static final int GRAPHICSOBJECT_ID_YELLOW = 1595;
  56. private static final int PROJECTILE_ID_P2RANGE = 1583;
  57. private static final int PROJECTILE_ID_YELLOW = 1596;
  58. private static final int ANIMATION_ID_P3_WEB = 8127;
  59. private static final int ANIMATION_ID_P3_YELLOW = 8126;
  60. private static final int ANIMATION_ID_P3_MELEE = 8123;
  61. private static final int ANIMATION_ID_P3_MAGE = 8124;
  62. private static final int ANIMATION_ID_P3_RANGE = 8125;
  63. private static final int VERZIK_ID_P3 = NpcID.VERZIK_VITUR_8374;
  64. private static final int NPC_ID_TORNADO = 8386;
  65. private static final int PROJECTILE_ID_P3_GREEN = 1598;
  66. private static final int PROJECTILE_ID_P3_RANGE = 1594;
  67. private static final int PROJECTILE_ID_P3_MAGE = 1593;
  68. private static final int PROJECTILE_ID_P3_WEBS = 1601;
  69.  
  70.  
  71. @Getter(AccessLevel.PACKAGE)
  72. private boolean runMaiden;
  73.  
  74. @Getter(AccessLevel.PACKAGE)
  75. private List<WorldPoint> Maiden_BloodSpatters = new ArrayList<>();
  76.  
  77. private List<NPC> Maiden_Spawns = new ArrayList<>();
  78.  
  79. @Getter(AccessLevel.PACKAGE)
  80. private List<WorldPoint> Maiden_SpawnLocations = new ArrayList<>();
  81.  
  82. @Getter(AccessLevel.PACKAGE)
  83. private List<WorldPoint> Maiden_SpawnLocations2 = new ArrayList<>();
  84.  
  85.  
  86. @Getter(AccessLevel.PACKAGE)
  87. private boolean runBloat;
  88.  
  89. @Getter(AccessLevel.PACKAGE)
  90. private NPC Bloat_NPC;
  91.  
  92. private int Bloat_downCount;
  93.  
  94. @Getter(AccessLevel.PACKAGE)
  95. private Integer Bloat_State;
  96.  
  97.  
  98. @Getter(AccessLevel.PACKAGE)
  99. private boolean runNylocas;
  100.  
  101. @Getter(AccessLevel.PACKAGE)
  102. private Map<NPC, Integer> Nylocas_Pillars = new HashMap<>();
  103.  
  104. @Getter(AccessLevel.PACKAGE)
  105. private Map<NPC, Integer> Nylocas_Map = new HashMap<>();
  106.  
  107.  
  108. @Getter(AccessLevel.PACKAGE)
  109. private boolean runSotetseg;
  110.  
  111. @Getter(AccessLevel.PACKAGE)
  112. private final Map<GroundObject, Tile> RedTiles = new LinkedHashMap<>();
  113.  
  114. @Getter(AccessLevel.PACKAGE)
  115. private List<WorldPoint> RedTilesOverworld = new ArrayList<>();
  116.  
  117. private List<WorldPoint> BlackTilesOverworld = new ArrayList<>();
  118.  
  119. private List<WorldPoint> BlackTilesUnderworld = new ArrayList<>();
  120.  
  121. private List<WorldPoint> RedTilesUnderworld = new ArrayList<>();
  122.  
  123. private List<Point> GridPath = new ArrayList<>();
  124.  
  125. @Getter(AccessLevel.PACKAGE)
  126. private boolean runXarpus;
  127.  
  128. private int Xarpus_previousAnimation;
  129.  
  130. @Getter(AccessLevel.PACKAGE)
  131. private boolean Xarpus_Stare;
  132.  
  133. @Getter(AccessLevel.PACKAGE)
  134. private final Map<GroundObject, Integer> Xarpus_Exhumeds = new HashMap<>();
  135.  
  136. @Getter(AccessLevel.PACKAGE)
  137. private int Xarpus_TicksUntilShoot = 9;
  138.  
  139. @Getter(AccessLevel.PACKAGE)
  140. private NPC Xarpus_NPC;
  141.  
  142. @Getter(AccessLevel.PACKAGE)
  143. private boolean runVerzik;
  144.  
  145. @Getter(AccessLevel.PACKAGE)
  146. private final Map<Projectile, WorldPoint> Verzik_RangeProjectiles = new HashMap<>();
  147.  
  148. @Getter(AccessLevel.PACKAGE)
  149. private int P3_TicksUntilAttack = -1;
  150.  
  151. @Getter(AccessLevel.PACKAGE)
  152. private Projectile Verzik_YellowBall;
  153.  
  154. @Getter(AccessLevel.PACKAGE)
  155. private List<WorldPoint> Verzik_YellowTiles = new ArrayList<>();
  156.  
  157. @Getter(AccessLevel.PACKAGE)
  158. private NPC Verzik_NPC;
  159.  
  160. private int P3_attacksLeft;
  161.  
  162. @Inject
  163. private Client client;
  164.  
  165. @Inject
  166. private OverlayManager overlayManager;
  167.  
  168. @Inject
  169. private TheatreOverlay overlay;
  170.  
  171. @Inject
  172. private TheatreConfig config;
  173.  
  174. @Provides
  175. TheatreConfig getConfig(ConfigManager configManager) {
  176. return configManager.getConfig(TheatreConfig.class);
  177. }
  178.  
  179. @Override
  180. protected void startUp() {
  181. overlayManager.add(overlay);
  182. }
  183.  
  184. @Override
  185. protected void shutDown() {
  186. overlayManager.remove(overlay);
  187. }
  188.  
  189. @Subscribe
  190. public void onNpcSpawned(NpcSpawned npcSpawned) {
  191. NPC npc = npcSpawned.getNpc();
  192. switch (npc.getId()) {
  193. case NpcID.THE_MAIDEN_OF_SUGADINTI:
  194. case NpcID.THE_MAIDEN_OF_SUGADINTI_8361:
  195. case NpcID.THE_MAIDEN_OF_SUGADINTI_8362:
  196. case NpcID.THE_MAIDEN_OF_SUGADINTI_8363:
  197. case NpcID.THE_MAIDEN_OF_SUGADINTI_8364:
  198. case NpcID.THE_MAIDEN_OF_SUGADINTI_8365:
  199. runMaiden = true;
  200. break;
  201. case NpcID.BLOOD_SPAWN:
  202. Maiden_Spawns.add(npc);
  203. break;
  204. case NpcID.PESTILENT_BLOAT:
  205. runBloat = true;
  206. Bloat_NPC = npc;
  207. break;
  208. case NPCID_NYLOCAS_PILLAR:
  209. runNylocas = true;
  210. if (!Nylocas_Pillars.keySet().contains(npc)) {
  211. Nylocas_Pillars.put(npc, 100);
  212. }
  213. break;
  214. case 8342:
  215. case 8343:
  216. case 8344:
  217. case 8345:
  218. case 8346:
  219. case 8347:
  220. case 8348:
  221. case 8349:
  222. case 8350:
  223. case 8351:
  224. case 8352:
  225. case 8353:
  226. if (runNylocas) {
  227. Nylocas_Map.put(npc, 52);
  228. }
  229. break;
  230. case NpcID.SOTETSEG:
  231. case NpcID.SOTETSEG_8388:
  232. runSotetseg = true;
  233. RedTiles.clear();
  234. break;
  235. case NpcID.XARPUS:
  236. case NpcID.XARPUS_8339:
  237. case NpcID.XARPUS_8340:
  238. case NpcID.XARPUS_8341:
  239. runXarpus = true;
  240. Xarpus_NPC = npc;
  241. Xarpus_Stare = false;
  242. Xarpus_TicksUntilShoot = 9;
  243. Xarpus_previousAnimation = -1;
  244. break;
  245. case NpcID.VERZIK_VITUR_8369:
  246. case NpcID.VERZIK_VITUR_8370:
  247. case NpcID.VERZIK_VITUR_8371:
  248. case NpcID.VERZIK_VITUR_8372:
  249. case NpcID.VERZIK_VITUR_8373:
  250. case NpcID.VERZIK_VITUR_8374:
  251. case NpcID.VERZIK_VITUR_8375:
  252. P3_TicksUntilAttack = -1;
  253. P3_attacksLeft = 9;
  254. Verzik_NPC = npc;
  255. runVerzik = true;
  256. break;
  257. }
  258. }
  259.  
  260. @Subscribe
  261. public void onNpcDespawned(NpcDespawned npcDespawned) {
  262. NPC npc = npcDespawned.getNpc();
  263. switch (npc.getId()) {
  264. case NpcID.THE_MAIDEN_OF_SUGADINTI:
  265. case NpcID.THE_MAIDEN_OF_SUGADINTI_8361:
  266. case NpcID.THE_MAIDEN_OF_SUGADINTI_8362:
  267. case NpcID.THE_MAIDEN_OF_SUGADINTI_8363:
  268. case NpcID.THE_MAIDEN_OF_SUGADINTI_8364:
  269. case NpcID.THE_MAIDEN_OF_SUGADINTI_8365:
  270. runMaiden = false;
  271. Maiden_Spawns.clear();
  272. break;
  273. case NpcID.BLOOD_SPAWN:
  274. Maiden_Spawns.remove(npc);
  275. break;
  276. case NpcID.PESTILENT_BLOAT:
  277. runBloat = false;
  278. Bloat_NPC = null;
  279. break;
  280. case NPCID_NYLOCAS_PILLAR:
  281. if (Nylocas_Pillars.keySet().contains(npc)) {
  282. Nylocas_Pillars.remove(npc);
  283. }
  284. break;
  285. case 8342:
  286. case 8343:
  287. case 8344:
  288. case 8345:
  289. case 8346:
  290. case 8347:
  291. case 8348:
  292. case 8349:
  293. case 8350:
  294. case 8351:
  295. case 8352:
  296. case 8353:
  297. if (Nylocas_Map.keySet().contains(npc)) {
  298. Nylocas_Map.remove(npc);
  299. }
  300. break;
  301. case NpcID.SOTETSEG:
  302. case NpcID.SOTETSEG_8388:
  303. RedTiles.clear();
  304. if (client.getPlane() != 3) {
  305. runSotetseg = false;
  306. }
  307. break;
  308. case NpcID.XARPUS:
  309. case NpcID.XARPUS_8339:
  310. case NpcID.XARPUS_8340:
  311. case NpcID.XARPUS_8341:
  312. runXarpus = false;
  313. Xarpus_NPC = null;
  314. Xarpus_Stare = false;
  315. Xarpus_TicksUntilShoot = 9;
  316. Xarpus_previousAnimation = -1;
  317. Xarpus_Exhumeds.clear();
  318. break;
  319. case NpcID.VERZIK_VITUR_8369:
  320. case NpcID.VERZIK_VITUR_8370:
  321. case NpcID.VERZIK_VITUR_8371:
  322. case NpcID.VERZIK_VITUR_8372:
  323. case NpcID.VERZIK_VITUR_8373:
  324. case NpcID.VERZIK_VITUR_8374:
  325. case NpcID.VERZIK_VITUR_8375:
  326. runVerzik = false;
  327. Verzik_NPC = null;
  328. break;
  329. }
  330.  
  331. }
  332.  
  333. @Subscribe
  334. public void onGroundObjectSpawned(GroundObjectSpawned event) {
  335. if (runSotetseg) {
  336. GroundObject o = event.getGroundObject();
  337. if (o.getId() == GROUNDOBJECT_ID_BLACKMAZE) {
  338. Tile t = event.getTile();
  339. WorldPoint p = t.getWorldLocation();
  340. if (t.getPlane() == 0) {
  341. if (!BlackTilesOverworld.contains(p))
  342. BlackTilesOverworld.add(p);
  343. } else {
  344. if (!BlackTilesUnderworld.contains(p))
  345. BlackTilesUnderworld.add(p);
  346. }
  347. }
  348.  
  349. if (o.getId() == GROUNDOBJECT_ID_REDMAZE) {
  350. Tile t = event.getTile();
  351. WorldPoint p = t.getWorldLocation();
  352. if (p.getPlane() == 0) {
  353. if (!RedTiles.containsValue(t)) {
  354. RedTiles.put(o, t);
  355. }
  356. } else {
  357. if (!RedTilesUnderworld.contains(p))
  358. RedTilesUnderworld.add(p);
  359. }
  360. }
  361. }
  362.  
  363. if (runXarpus) {
  364. GroundObject o = event.getGroundObject();
  365. if (o.getId() == GROUNDOBJECT_ID_EXHUMED) {
  366. Xarpus_Exhumeds.put(o, 18);
  367. }
  368. }
  369. }
  370.  
  371. @Subscribe
  372. public void onProjectileMoved(ProjectileMoved event) {
  373. if (runVerzik) {
  374. Projectile projectile = event.getProjectile();
  375. if (projectile.getId() == PROJECTILE_ID_P2RANGE) {
  376. WorldPoint p = WorldPoint.fromLocal(client, event.getPosition());
  377. Verzik_RangeProjectiles.put(projectile, p);
  378. }
  379. }
  380. }
  381.  
  382. @Subscribe
  383. public void onGameTick(GameTick event) {
  384. if (runMaiden) {
  385. Maiden_BloodSpatters.clear();
  386. for (GraphicsObject o : client.getGraphicsObjects()) {
  387. if (o.getId() == GRAPHICSOBJECT_ID_MAIDEN) {
  388. Maiden_BloodSpatters.add(WorldPoint.fromLocal(client, o.getLocation()));
  389. }
  390. }
  391.  
  392. Maiden_SpawnLocations2.clear();
  393. Maiden_SpawnLocations2.addAll(Maiden_SpawnLocations);
  394. Maiden_SpawnLocations.clear();
  395. for (NPC spawn : Maiden_Spawns) {
  396. Maiden_SpawnLocations.add(spawn.getWorldLocation());
  397. }
  398. }
  399.  
  400. if (runBloat) {
  401. Bloat_downCount++;
  402.  
  403. if (Bloat_NPC.getAnimation() == -1) //1 = up; 2 = down; 3 = warn;
  404. {
  405. Bloat_downCount = 0;
  406. if (Bloat_NPC.getHealth() == 0) {
  407. Bloat_State = 2;
  408. } else
  409. Bloat_State = 1;
  410. } else {
  411. if (25 < Bloat_downCount && Bloat_downCount < 35) {
  412. Bloat_State = 3;
  413. } else if (Bloat_downCount < 26) {
  414. Bloat_State = 2;
  415. } else if (Bloat_NPC.getModelHeight() == 568) {
  416. Bloat_State = 2;
  417. } else
  418. Bloat_State = 1;
  419. }
  420. }
  421.  
  422. if (runNylocas) {
  423. for (Iterator<NPC> it = Nylocas_Map.keySet().iterator(); it.hasNext(); ) {
  424. NPC npc = it.next();
  425. int ticksLeft = Nylocas_Map.get(npc);
  426.  
  427. if (ticksLeft < 0) {
  428. it.remove();
  429. continue;
  430. }
  431. Nylocas_Map.replace(npc, ticksLeft - 1);
  432. }
  433.  
  434. for (NPC pillar : Nylocas_Pillars.keySet()) {
  435. int healthPercent = pillar.getHealthRatio();
  436. if (healthPercent > -1) {
  437. Nylocas_Pillars.replace(pillar, healthPercent);
  438. }
  439. }
  440. for (NPC npc : client.getNpcs()) {
  441. if (npc.getId() == 8358) {
  442. runNylocas = true;
  443. break;
  444. }
  445. runNylocas = false;
  446. }
  447. }
  448.  
  449. if (runSotetseg) {
  450. boolean sotetsegFighting = false;
  451. for (NPC npc : client.getNpcs()) {
  452. if (npc.getId() == NpcID.SOTETSEG_8388) {
  453. BlackTilesUnderworld.clear();
  454. BlackTilesOverworld.clear();
  455. RedTilesOverworld.clear();
  456. RedTilesUnderworld.clear();
  457. GridPath.clear();
  458. sotetsegFighting = true;
  459. RedTiles.clear();
  460. break;
  461. }
  462. }
  463.  
  464. if (!sotetsegFighting) {
  465. if (!BlackTilesUnderworld.isEmpty() && !RedTilesUnderworld.isEmpty() && GridPath.isEmpty()) {
  466. int minX = 99999;
  467. int minY = 99999;
  468. for (WorldPoint p : BlackTilesUnderworld) {
  469. int x = p.getX();
  470. int y = p.getY();
  471. if (x < minX) {
  472. minX = x;
  473. }
  474. if (y < minY) {
  475. minY = y;
  476. }
  477. }
  478.  
  479.  
  480. boolean messageSent = false;
  481. for (WorldPoint p : RedTilesUnderworld) {
  482. WorldPoint pN = new WorldPoint(p.getX(), p.getY() + 1, p.getPlane());
  483. WorldPoint pS = new WorldPoint(p.getX(), p.getY() - 1, p.getPlane());
  484. WorldPoint pE = new WorldPoint(p.getX() + 1, p.getY(), p.getPlane());
  485. WorldPoint pW = new WorldPoint(p.getX() - 1, p.getY(), p.getPlane());
  486.  
  487. if (!((RedTilesUnderworld.contains(pN) && RedTilesUnderworld.contains(pS)) ||
  488. (RedTilesUnderworld.contains(pE) && RedTilesUnderworld.contains(pW)))) {
  489. GridPath.add(new Point(p.getX() - minX, p.getY() - minY));
  490. if (!messageSent) {
  491. //client.addChatMessage(ChatMessageType.SERVER, "", "Maze path acquired.", null);
  492. messageSent = true;
  493. }
  494. }
  495.  
  496. }
  497. }
  498.  
  499. if (!BlackTilesOverworld.isEmpty() && !GridPath.isEmpty() && RedTilesOverworld.isEmpty()) {
  500. int minX = 99999;
  501. int minY = 99999;
  502. for (WorldPoint p : BlackTilesOverworld) {
  503. int x = p.getX();
  504. int y = p.getY();
  505. if (x < minX) {
  506. minX = x;
  507. }
  508. if (y < minY) {
  509. minY = y;
  510. }
  511. }
  512. for (Point p : GridPath) {
  513. RedTilesOverworld.add(new WorldPoint(minX + p.getX(), minY + p.getY(), 0));
  514. }
  515. }
  516. }
  517. }
  518.  
  519. if (runXarpus) {
  520. for (Iterator<GroundObject> it = Xarpus_Exhumeds.keySet().iterator(); it.hasNext(); ) {
  521. GroundObject key = it.next();
  522. Xarpus_Exhumeds.replace(key, Xarpus_Exhumeds.get(key) - 1);
  523. if (Xarpus_Exhumeds.get(key) < 0) {
  524. it.remove();
  525. }
  526. }
  527. {
  528. Xarpus_Stare = true;
  529. }
  530. if (Xarpus_Stare) {
  531. //dont hit xarpus if it looking at u
  532. } else if (Xarpus_NPC.getId() == NpcID.XARPUS_8340) {
  533. Xarpus_TicksUntilShoot--;
  534. if (Xarpus_NPC.getAnimation() == ANIMATION_ID_XARPUS && Xarpus_previousAnimation != ANIMATION_ID_XARPUS) {
  535. Xarpus_TicksUntilShoot = 3;
  536. }
  537. Xarpus_previousAnimation = Xarpus_NPC.getAnimation();
  538. }
  539.  
  540. }
  541.  
  542. if (runVerzik) {
  543. if (!Verzik_RangeProjectiles.isEmpty()) {
  544. for (Iterator<Projectile> it = Verzik_RangeProjectiles.keySet().iterator(); it.hasNext(); ) {
  545. Projectile projectile = it.next();
  546. if (projectile.getRemainingCycles() < 1) {
  547. it.remove();
  548. }
  549. }
  550. }
  551.  
  552. Verzik_YellowBall = null;
  553. Verzik_YellowTiles.clear();
  554.  
  555. for (Projectile projectile : client.getProjectiles()) {
  556. if (projectile.getId() == PROJECTILE_ID_YELLOW) {
  557. Verzik_YellowBall = projectile;
  558. break;
  559. }
  560. }
  561. for (GraphicsObject o : client.getGraphicsObjects()) {
  562. if (o.getId() == GRAPHICSOBJECT_ID_YELLOW) {
  563. Verzik_YellowTiles.add(WorldPoint.fromLocal(client, o.getLocation()));
  564. }
  565. }
  566.  
  567. if (Verzik_NPC.getId() == VERZIK_ID_P3) {
  568. boolean tornadosActive = false;
  569. for (NPC npc : client.getNpcs()) {
  570. if (npc.getId() == NPC_ID_TORNADO) {
  571. tornadosActive = true;
  572. break;
  573. }
  574. }
  575.  
  576. boolean isGreenBall = false;
  577. for (Projectile projectile : client.getProjectiles()) {
  578. if (projectile.getId() == PROJECTILE_ID_P3_GREEN) {
  579. isGreenBall = projectile.getRemainingCycles() > 210;
  580. break;
  581. }
  582. }
  583.  
  584. P3_TicksUntilAttack--;
  585. boolean isAttacking = false;
  586. for (Projectile projectile : client.getProjectiles()) {
  587. if (projectile.getId() == PROJECTILE_ID_P3_RANGE) {
  588. if (P3_TicksUntilAttack < 2) {
  589. P3_attacksLeft--;
  590. if (tornadosActive) {
  591. P3_TicksUntilAttack = 5;
  592.  
  593. } else {
  594. P3_TicksUntilAttack = 7;
  595. }
  596. if (P3_attacksLeft < 1) {
  597. P3_TicksUntilAttack = 30;
  598. }
  599. if (isGreenBall) {
  600. P3_TicksUntilAttack = 12;
  601. }
  602. }
  603. if (projectile.getId() == PROJECTILE_ID_P3_MAGE) {
  604. if (P3_TicksUntilAttack < 2) {
  605. P3_attacksLeft--;
  606. if (tornadosActive) {
  607. P3_TicksUntilAttack = 5;
  608.  
  609. } else {
  610. P3_TicksUntilAttack = 7;
  611. }
  612. if (P3_attacksLeft < 1) {
  613. P3_TicksUntilAttack = 24;
  614. }
  615. }
  616. }
  617. if (projectile.getId() == PROJECTILE_ID_P3_WEBS) {
  618. P3_attacksLeft = 4;
  619. P3_TicksUntilAttack = 11;
  620. }
  621.  
  622. /*
  623. switch (client.getProjectiles()){
  624. case PROJECTILE_ID_P3_RANGE:
  625. if (P3_TicksUntilAttack < 2){
  626. P3_attacksLeft--;
  627. if (tornadosActive){
  628. P3_TicksUntilAttack = 5;
  629.  
  630. } else {
  631. P3_TicksUntilAttack = 7;
  632. }
  633. if (P3_attacksLeft < 1){
  634. P3_TicksUntilAttack = 24;
  635. }
  636. }
  637. break;
  638. case PROJECTILE_ID_P3_MAGE:
  639. if (P3_TicksUntilAttack < 2){
  640. P3_attacksLeft--;
  641. if (tornadosActive){
  642. P3_TicksUntilAttack = 5;
  643.  
  644. } else {
  645. P3_TicksUntilAttack = 7;
  646. }
  647. if (P3_attacksLeft < 1){
  648. P3_TicksUntilAttack = 24;
  649. }
  650. }
  651. break;
  652.  
  653. }
  654. switch (Verzik_NPC.getAnimation()) {
  655. case ANIMATION_ID_P3_MAGE:
  656. if (P3_TicksUntilAttack < 2) {
  657. P3_attacksLeft--;
  658. if (tornadosActive) {
  659. P3_TicksUntilAttack = 5;
  660. } else {
  661. P3_TicksUntilAttack = 7;
  662. }
  663. if (P3_attacksLeft < 1) {
  664. P3_TicksUntilAttack = 24;
  665. }
  666. }
  667. break;
  668. case ANIMATION_ID_P3_RANGE:
  669. if (P3_TicksUntilAttack < 2) {
  670. P3_attacksLeft--;
  671. if (tornadosActive) {
  672. P3_TicksUntilAttack = 5;
  673. } else {
  674. P3_TicksUntilAttack = 7;
  675. }
  676. if (P3_attacksLeft < 1) {
  677. P3_TicksUntilAttack = 30;
  678. }
  679. if (isGreenBall) {
  680. P3_TicksUntilAttack = 12;
  681. }
  682. }
  683. break;
  684. case ANIMATION_ID_P3_MELEE:
  685. if (P3_TicksUntilAttack < 2) {
  686. P3_attacksLeft--;
  687. if (tornadosActive) {
  688. P3_TicksUntilAttack = 5;
  689. } else {
  690. P3_TicksUntilAttack = 7;
  691. }
  692. if (P3_attacksLeft < 1) {
  693. P3_TicksUntilAttack = 24;
  694. }
  695. }
  696. break;
  697. case ANIMATION_ID_P3_WEB:
  698. P3_attacksLeft = 4;
  699. P3_TicksUntilAttack = 11; //
  700. break;
  701. case ANIMATION_ID_P3_YELLOW:
  702. P3_attacksLeft = 14;
  703. P3_TicksUntilAttack = 11;
  704. break;
  705. }*/
  706. }
  707.  
  708. }
  709.  
  710.  
  711. }
  712.  
  713. }
  714. }
  715.  
  716. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement