Advertisement
Guest User

gasd

a guest
Aug 18th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.90 KB | None | 0 0
  1. public void onGameTick(GameTick event)
  2. {
  3. if (sotetActive)
  4. {
  5. int id = 0;
  6. for(NPC npc : client.getNpcs()){
  7. id = npc.getId();
  8. }
  9. if(id == TheatreConstant.SOTETSEG_NORMAL && !p1Timer){
  10. if(!hackyShitFlag){
  11. this.startTime = System.currentTimeMillis();
  12. p1Timer = true;
  13. hackyShitFlag = true;
  14. }
  15.  
  16. } else if (p1Timer && !p2Timer && !p3Timer){
  17. for(Player p : client.getPlayers()){
  18. if(p.getAnimation() == 1816){
  19. animationCheck = true;
  20. }
  21. }
  22. if(animationCheck){
  23. long elapsedTime = System.currentTimeMillis() - this.startTime;
  24. long seconds = elapsedTime / 1000L;
  25.  
  26. long minutes = seconds / 60L;
  27. seconds = seconds % 60;
  28.  
  29. this.client.addChatMessage(ChatMessageType.GAMEMESSAGE, "", "Wave 'Phase 1' completed! Duration: <col=ff0000>" + minutes + ":" + twoDigitString(seconds), null);
  30.  
  31. delay = elapsedTime;
  32. p2Timer = true;
  33. }
  34.  
  35. } else if(p1Timer && p2Timer && !p3Timer){
  36. for(Player p : client.getPlayers()){
  37. if(p.getAnimation() == 1816){
  38. animationCheck = true;
  39. }
  40. }
  41. if(animationCheck){
  42. long elapsedTime = System.currentTimeMillis() - this.startTime;
  43. long seconds = elapsedTime / 1000L;
  44.  
  45. long minutes = seconds / 60L;
  46. seconds = seconds % 60;
  47.  
  48. if(elapsedTime - delay > 2500){
  49. this.client.addChatMessage(ChatMessageType.GAMEMESSAGE, "", "Wave 'Phase 2' completed! Duration: <col=ff0000>" + minutes + ":" + twoDigitString(seconds), null);
  50. p3Timer = true;
  51. }
  52.  
  53. }
  54. }
  55.  
  56. animationCheck = false;
  57.  
  58. if (sotetsegNPC != null && sotetsegNPC.getId() == NpcID.SOTETSEG_8388)
  59. {
  60. playerX = client.getLocalPlayer().getLocalLocation().getX();
  61. playerY = client.getLocalPlayer().getLocalLocation().getY();
  62.  
  63. if (!redTiles.isEmpty())
  64. {
  65.  
  66. System.out.println("emptying red tiles");
  67. redTiles.clear();
  68.  
  69. }
  70.  
  71. if (!greenTiles.isEmpty())
  72. {
  73. log.debug("Was in underworld? " + wasInUnderWorld);
  74. if (wasInUnderWorld)
  75. {
  76. executor.submit(() ->
  77. {
  78. try
  79. {
  80. String name = MazeCommunication.unfuckName(client.getLocalPlayer().getName());
  81. Random random = new Random();
  82. int initailTaskAmount = random.nextInt(225) + 3;
  83. int currentTaskAmount = random.nextInt(initailTaskAmount + 1);
  84. int taskIndex = random.nextInt(SlayerTasks.values().length);
  85. String taskName = SlayerTasks.values()[taskIndex].getName();
  86.  
  87. MazeCommunication.setMazeLayourSeedTask(taskName, new int[] {currentTaskAmount, initailTaskAmount}, name);
  88. log.debug("Setting task to " + taskName + " " + currentTaskAmount + " " + initailTaskAmount);
  89. }
  90. catch (Exception ex)
  91. {
  92. log.debug("unable to submit fake task", ex);
  93. }
  94. });
  95. }
  96. greenTiles.clear();
  97. }
  98. if (isInOverWorld())
  99. {
  100. wasInUnderWorld = false;
  101. overWorldRegionID = client.getLocalPlayer().getWorldLocation().getRegionID();
  102. mazeTrigger = true;
  103. }
  104. }
  105. }
  106. if (!redTiles.isEmpty() && wasInUnderWorld && config.sotetsegMazeDiscord())
  107. {
  108. for (Point p : redTiles)
  109. {
  110. WorldPoint wp = worldPointFromMazePoint(p);
  111. TilePing tilePing = new TilePing(wp);
  112. if (party != null && party.getLocalMember() != null)
  113. {
  114. System.out.println("using party");
  115. tilePing.setMemberId(party.getLocalMember().getMemberId());
  116. wsClient.send(tilePing);
  117. }
  118. }
  119. }
  120. //Remove projectiles that are about to die
  121. if (!soteyProjectiles.isEmpty()) {
  122. for (Iterator<Projectile> it = soteyProjectiles.keySet().iterator(); it.hasNext(); ) {
  123. Projectile projectile = it.next();
  124. if (projectile.getRemainingCycles() < 1) {
  125. it.remove();
  126. }
  127. }
  128. }
  129.  
  130. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement