Advertisement
Guest User

asdf

a guest
Aug 18th, 2019
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.73 KB | None | 0 0
  1. public void onGameTick(GameTick event)
  2. {
  3. if (sotetActive)
  4. {playerX = client.getLocalPlayer().getLocalLocation().getX();
  5. playerY = client.getLocalPlayer().getLocalLocation().getY();
  6.  
  7. int id = 0;
  8. for(NPC npc : client.getNpcs()){
  9. id = npc.getId();
  10. }
  11. if(id == TheatreConstant.SOTETSEG_NORMAL && !p1Timer){
  12. if(!hackyShitFlag){
  13. this.startTime = System.currentTimeMillis();
  14. p1Timer = true;
  15. hackyShitFlag = true;
  16. }
  17.  
  18. } else if (p1Timer && !p2Timer && !p3Timer){
  19. for(Player p : client.getPlayers()){
  20. if(p.getAnimation() == 1816){
  21. animationCheck = true;
  22. }
  23. }
  24. if(animationCheck){
  25. long elapsedTime = System.currentTimeMillis() - this.startTime;
  26. long seconds = elapsedTime / 1000L;
  27.  
  28. long minutes = seconds / 60L;
  29. seconds = seconds % 60;
  30.  
  31. this.client.addChatMessage(ChatMessageType.GAMEMESSAGE, "", "Wave 'Phase 1' completed! Duration: <col=ff0000>" + minutes + ":" + twoDigitString(seconds), null);
  32.  
  33. delay = elapsedTime;
  34. p2Timer = true;
  35. }
  36.  
  37. } else if(p1Timer && p2Timer && !p3Timer){
  38. for(Player p : client.getPlayers()){
  39. if(p.getAnimation() == 1816){
  40. animationCheck = true;
  41. }
  42. }
  43. if(animationCheck){
  44. long elapsedTime = System.currentTimeMillis() - this.startTime;
  45. long seconds = elapsedTime / 1000L;
  46.  
  47. long minutes = seconds / 60L;
  48. seconds = seconds % 60;
  49.  
  50. if(elapsedTime - delay > 2500){
  51. this.client.addChatMessage(ChatMessageType.GAMEMESSAGE, "", "Wave 'Phase 2' completed! Duration: <col=ff0000>" + minutes + ":" + twoDigitString(seconds), null);
  52. p3Timer = true;
  53. }
  54.  
  55. }
  56. }
  57.  
  58. animationCheck = false;
  59. if (sotetsegNPC != null && sotetsegNPC.getId() == NpcID.SOTETSEG_8388)
  60. {
  61. if (!redTiles.isEmpty())
  62. {
  63. redTiles.clear();
  64. }
  65.  
  66. if (isInOverWorld())
  67. {
  68. wasInUnderWorld = false;
  69. overWorldRegionID = client.getLocalPlayer().getWorldLocation().getRegionID();
  70. mazeTrigger = true;
  71. }
  72. }
  73.  
  74. if (!redTiles.isEmpty() && wasInUnderWorld && config.sotetsegMazeDiscord())
  75. {
  76. for (Point p : redTiles)
  77. {
  78. WorldPoint wp = worldPointFromMazePoint(p);
  79. TilePing tilePing = new TilePing(wp);
  80. if (party != null && party.getLocalMember() != null)
  81. {
  82. tilePing.setMemberId(party.getLocalMember().getMemberId());
  83. wsClient.send(tilePing);
  84. }
  85. }
  86. }
  87. }
  88. //Remove projectiles that are about to die
  89. if (!soteyProjectiles.isEmpty()) {
  90. for (Iterator<Projectile> it = soteyProjectiles.keySet().iterator(); it.hasNext(); ) {
  91. Projectile projectile = it.next();
  92. if (projectile.getRemainingCycles() < 1) {
  93. it.remove();
  94. }
  95. }
  96. }
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement